Skip to content

Conversation

@FineWolf
Copy link
Contributor

@FineWolf FineWolf commented Sep 13, 2025

Description

The current published PKGBUILD (2025.628.4510-5) doesn't build on Arch currently due to the missing boost makedepends. There are also a few issues with the package itself that causes issues for non Nvidia systems.

A few changes have been made in this pull request.

Quality of life changes for you

  • I moved _commit into a variable so that, when you want to release an update, you don't have 3 places where you have to change the hash. This makes maintaining the PKGBUILD easier, and it also makes adjusting your pipelines dynamically to use a different commit easier as well (just set the _commit variable).
  • I made sure to pass -j$(nproc) to speed up building.
  • I updated the .gitignore files so that build artifacts are ignored.

Make cuda optional for building

Requiring cuda for building on non-Nvidia systems is quite a heavy requirement. Even if it is an optdepends, for a build it still will be required. Since cuda is huge (4.8 GB installed, ~2 GB download), and won't realistically be used on AMD systems, I added some logic to make it truly optional at build time. If cuda or nvidia-utils is detected as installed at build time, the build will require cuda. If not, -DCUDA_FAIL_ON_MISSING=OFF is passed. You can pass _use_cuda=true to force it on at any time.

I've adjusted the GitHub pipelines to build with cuda regardless, so that your CI processes won't be impacted, and your builds will have cuda enabled by default.

Make xorg-server-xvfb optional for building

Same comment here for xorg-server-xvfb, the end-users don't really need it; it is however super useful for testing, so I made it an optional component of the build. Your pipelines have been adjusted so that it is present in your builds as an optdepends.

Make tests failure optional when a user builds it

At the moment, the tests are failing after a build. I tried to debug it a little, but I wasn't able to identify the cause, and the resulting package still works fine on the two systems I tested them on.

The test failures all seem to be in the assertion for platf_deinit.

[  SKIPPED ] EncoderVariants/EncoderTest.ValidateEncoder/software (0 ms)
/home/amoore/Projects/OSS/pacman-repo/pkgbuilds/sunshine/src/sunshine/tests/unit/../tests_common.h:20: Failure
Value of: platf_deinit
  Actual: false
Expected: true

[...]

 0 FAILED TESTS
[  FAILED  ] Configurations/AudioTest: SetUpTestSuite or TearDownTestSuite
[  FAILED  ] MouseInputs/MouseHIDTest: SetUpTestSuite or TearDownTestSuite
[  FAILED  ] EncoderVariants/EncoderTest: SetUpTestSuite or TearDownTestSuite

Either way, it's safe to assume that if a release was made by you, that release was tested previously. Just like the community PKGBUILD beforehand was doing, I made failing on tests optional. The GitHub CI pipelines were adjusted to fail if the test fail, however, because that's quite an important metric to have during a CI build.

Restore boost 1.88 fixes from community PKGBUILD

Arch currently ships with boost 1.88 which unfortunately requires fixes in the main package. For now, to restore functionality, the fixes that were present in the community provided PKGBUILD were ported to this PKGBUILD.

There's guidance on how to possibly fix this in the upstream bug report: boostorg/process#480

Correctness fix in sunshine.install

sunshine.install was modified to use which. That may cause undesired behaviour if there is a different sunshine binary present higher in the user's PATH. The sunshine.install file was modified to use the proper installation path instead, which avoids that problem.

Screenshot

Issues Fixed or Closed

Roadmap Issues

Type of Change

  • feat: New feature (non-breaking change which adds functionality)
  • fix: Bug fix (non-breaking change which fixes an issue)
  • docs: Documentation only changes
  • style: Changes that do not affect the meaning of the code (white-space, formatting, missing semicolons, etc.)
  • refactor: Code change that neither fixes a bug nor adds a feature
  • perf: Code change that improves performance
  • test: Adding missing tests or correcting existing tests
  • build: Changes that affect the build system or external dependencies
  • ci: Changes to CI configuration files and scripts
  • chore: Other changes that don't modify src or test files
  • revert: Reverts a previous commit
  • BREAKING CHANGE: Introduces a breaking change (can be combined with any type above)

Checklist

  • Code follows the style guidelines of this project
  • Code has been self-reviewed
  • Code has been commented, particularly in hard-to-understand areas
  • Code docstring/documentation-blocks for new or existing methods/components have been added or updated
  • Unit tests have been added or updated for any new or modified functionality

AI Usage

  • None: No AI tools were used in creating this PR
  • Light: AI provided minor assistance (formatting, simple suggestions)
  • Moderate: AI helped with code generation or debugging specific parts
  • Heavy: AI generated most or all of the code changes

@CLAassistant
Copy link

CLAassistant commented Sep 13, 2025

CLA assistant check
All committers have signed the CLA.

@FineWolf
Copy link
Contributor Author

FineWolf commented Sep 13, 2025

Pushed an update: corrected a small shellcheck warning and will rebase on the latest version.

Copy link
Member

@ReenigneArcher ReenigneArcher left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the PR! I understand the points you're mentioning and agree they should be improved, but I have some concerns about merging this as is.

  1. Boost 1.87 is fetched during the cmake configure process. Sunshine uses boost 1.87 for all builds currently. I'd like to move to the newer version, but haven't investigated migrating, so thank you for the link. I think I'm okay with the boost hack for the stable here, but once we have upstream updated to 1.88. Would you be interested in helping us migrate upstream to 1.88?
  2. If this were merged as is, changes won't persist on the next stable release of Sunshine. PR(s) will need to be made upstream as well. https://github.com/LizardByte/Sunshine/tree/master/packaging/linux/Arch

Edit: looks the issue was mitigated in boost 1.89, I wonder why Arch hasn't updated to 1.89 yet, usually Arch is pretty quick.

@FineWolf

This comment was marked as resolved.

@FineWolf

This comment was marked as resolved.

@ReenigneArcher

This comment was marked as resolved.

@FineWolf
Copy link
Contributor Author

Yes, that would be ideal so everything isn't lost when we make the next stable release.

Done, see LizardByte/Sunshine#4254

Oh, I meant you could have had a separate .gitignore-aur file at the root, and then just copy that, instead of the original .gitignore.

That's way simpler. I adjusted my pull request.

@FineWolf
Copy link
Contributor Author

Updated due to changes requested in LizardByte/Sunshine#4254

@FineWolf
Copy link
Contributor Author

Removed trailing line following lint failure.

Copy link
Member

@ReenigneArcher ReenigneArcher left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it will be good to merge after these.

@sonarqubecloud
Copy link

@ReenigneArcher ReenigneArcher changed the title fix: building on Arch Linux fix(sunshine): make cuda and unit tests optional Sep 14, 2025
@ReenigneArcher ReenigneArcher merged commit acd8e03 into LizardByte:master Sep 14, 2025
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants