Skip to content

chore(packaging/copr): Use standard cmake macros#5341

Open
LecrisUT wants to merge 5 commits into
LizardByte:masterfrom
LecrisUT:chore/spec-cleanup/cmake
Open

chore(packaging/copr): Use standard cmake macros#5341
LecrisUT wants to merge 5 commits into
LizardByte:masterfrom
LecrisUT:chore/spec-cleanup/cmake

Conversation

@LecrisUT

Copy link
Copy Markdown

Description

This will pick up the distro's best generator, e.g. since Fedora 44 it uses Ninja.

For now I am starting with a small PR because I am not sure what flow you would prefer for these kind of cleanups. One PR at a time or grouped together with documented individual commits?

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

Comment thread packaging/linux/copr/Sunshine.spec
@ReenigneArcher ReenigneArcher force-pushed the chore/spec-cleanup/cmake branch from 8764719 to 4710e19 Compare June 26, 2026 15:16
ReenigneArcher
ReenigneArcher previously approved these changes Jun 26, 2026
@ReenigneArcher ReenigneArcher changed the title chore(spec): Use standard cmake macros chore(copr): Use standard cmake macros Jun 26, 2026
@ReenigneArcher ReenigneArcher changed the title chore(copr): Use standard cmake macros chore(packaging/copr): Use standard cmake macros Jun 26, 2026
@codecov

codecov Bot commented Jun 26, 2026

Copy link
Copy Markdown

Bundle Report

Bundle size has no change ✅

@codecov

codecov Bot commented Jun 26, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (master@3437a0b). Learn more about missing BASE report.
✅ All tests successful. No failed tests found.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff            @@
##             master    #5341   +/-   ##
=========================================
  Coverage          ?   27.45%           
=========================================
  Files             ?      113           
  Lines             ?    25554           
  Branches          ?    11244           
=========================================
  Hits              ?     7016           
  Misses            ?    15473           
  Partials          ?     3065           
Flag Coverage Δ
Archlinux 0.00% <ø> (?)
FreeBSD-amd64 13.24% <ø> (?)
Homebrew-macos-14 21.00% <ø> (?)
Homebrew-macos-15 21.17% <ø> (?)
Homebrew-macos-26 21.31% <ø> (?)
Homebrew-ubuntu-24.04 13.00% <ø> (?)
Linux-AppImage 12.34% <ø> (?)
Windows-AMD64 15.26% <ø> (?)
Windows-ARM64 13.30% <ø> (?)
macOS-arm64 19.27% <ø> (?)
macOS-x86_64 18.76% <ø> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.


Continue to review full report in Codecov by Harness.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3437a0b...073854d. Read the comment docs.

@ReenigneArcher

Copy link
Copy Markdown
Member

copr builds failed:

+ /usr/bin/cmake --install redhat-linux-build
CMake Error: Not a file: /builddir/build/BUILD/Sunshine-0.0.5341-build/redhat-linux-build/cmake_install.cmake
CMake Error: Error processing file: /builddir/build/BUILD/Sunshine-0.0.5341-build/redhat-linux-build/cmake_install.cmake
error: Bad exit status from /var/tmp/rpm-tmp.VdUp8U (%install)

@LecrisUT

Copy link
Copy Markdown
Author

copr builds failed:

+ /usr/bin/cmake --install redhat-linux-build
CMake Error: Not a file: /builddir/build/BUILD/Sunshine-0.0.5341-build/redhat-linux-build/cmake_install.cmake
CMake Error: Error processing file: /builddir/build/BUILD/Sunshine-0.0.5341-build/redhat-linux-build/cmake_install.cmake
error: Bad exit status from /var/tmp/rpm-tmp.VdUp8U (%install)

Probably some inconsistent cd paths or such. I will look into it

@LecrisUT LecrisUT force-pushed the chore/spec-cleanup/cmake branch 2 times, most recently from bf2d380 to 44be8f3 Compare June 30, 2026 09:50
@ReenigneArcher ReenigneArcher force-pushed the chore/spec-cleanup/cmake branch from 44be8f3 to 31781bc Compare June 30, 2026 13:59
@ReenigneArcher

Copy link
Copy Markdown
Member

Now only opensuse is failing.

https://copr.fedorainfracloud.org/coprs/build/10664281/

@LecrisUT

Copy link
Copy Markdown
Author

Now only opensuse is failing.

https://copr.fedorainfracloud.org/coprs/build/10664281/

Yeah, seems like the macro details diverge for these 2 distros1. The interface are the same, so if we can use ctest 2 the difference once again vanish.

Footnotes

  1. suse and fedora

  2. Deferred to https://github.com/LizardByte/Sunshine/pull/5361

@ReenigneArcher

Copy link
Copy Markdown
Member

You can just put the changes from your other PR into this one

@ReenigneArcher ReenigneArcher force-pushed the chore/spec-cleanup/cmake branch from 4be7530 to 073854d Compare July 1, 2026 00:26
@sonarqubecloud

sonarqubecloud Bot commented Jul 1, 2026

Copy link
Copy Markdown


# tests
if(BUILD_TESTS)
enable_testing()

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This is already in the tests/CMakeLists.txt... is it truly necessary here?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Yes, the location affects where you can run ctest from. Before you had to do it from {builddir}/tests, but with this you can do it from {builddir}

"-DSUNSHINE_PUBLISHER_NAME=LizardByte"
"-DSUNSHINE_PUBLISHER_WEBSITE=https://app.lizardbyte.dev"
"-DSUNSHINE_PUBLISHER_ISSUE_URL=https://app.lizardbyte.dev/support"
"-DCMAKE_TEST_LAUNCHER=xvfb-run"

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Was assuming there is CMake 3.29 at least everywhere, but it's not the case for opensuse leap 15.x. Leap 16 has CMake 3.31. I will check with copr team why those are not made available since opensuse 15.6 is already EOL. But also just to confirm, which opensuse version would you like to build on?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

But also just to confirm, which opensuse version would you like to build on?

Ideally whichever one is supported... but it's becoming apparent that OpenSuse is a second class citizen on copr. (#5353 (comment))

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Fwiw, we did do some work to support OBS with packit, but that kinda stalled because of lack of push from users. If interested to build there, we can probably revive the effort.

But for now, I am considering just waiting it out 1 week to see if the new chroot will be added.

@gummiangler gummiangler Jul 1, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Just to add some context regarding openSUSE: there is already an open PR by me adding Tumbleweed support, but it currently can't be merged because of an existing bug with Tumbleweed in Copr. Any changes made to accommodate Leap's older CMake version could definitely impact or break that Tumbleweed build.

Regarding OBS: that's unfortunately a no-go for the full version. Because of NVENC licensing restrictions, OBS can't build it with NVENC enabled (there is actually already an NVENC-less build sitting in games:tools on OBS right now).

Sticking with Copr is the best bet to get a fully-featured build on openSUSE, so it really does seem like waiting for Copr to sort out the chroots/bugs for both Leap and Tumbleweed is the only way forward.

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