Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build(linux): make postinst use which to find sunshine #2812

Merged
merged 1 commit into from
Jul 7, 2024

Conversation

gschintgen
Copy link
Contributor

Description

When building locally, cmake defaults to a prefix of /usr/local. In particular sunshine ends up being /usr/local/bin/sunshine. However the postinst script uses a hardcoded path /usr/bin/sunshine. This leads to a failing setup when the locally built sunshine is packaged as a .deb using cpack. This commit fixes this minor issue by making the postinst script search for the binary using which.

Or should we also generate postinst via cmake's configure_file in order to properly hardcode the correct path? I'm not really familiar with cmake but I could give it a try. (I am also wondering if it's really an "asset" or if it rather belongs in "packaging")

Screenshot

Issues Fixed or Closed

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Dependency update (updates to dependencies)
  • Documentation update (changes to documentation)
  • Repository update (changes to repository files, e.g. .github/...)

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have added or updated the in code docstring/documentation-blocks for new or existing methods/components

Branch Updates

LizardByte requires that branches be up-to-date before merging. This means that after any PR is merged, this branch
must be updated before it can be merged. You must also
Allow edits from maintainers.

  • I want maintainers to keep my branch updated

@ReenigneArcher ReenigneArcher changed the title build/deb: make postinst use which to find sunshine build(linux): make postinst use which to find sunshine Jul 7, 2024
@ReenigneArcher
Copy link
Member

Thanks for the PR, this looks okay to me.

I am also wondering if it's really an "asset" or if it rather belongs in "packaging"

packaging is a directory used to handle the more unique packaging things like AppImage, flatpak, brew, and macports. The post-install script is pretty much universal, so I don't think it should go in packaging at this time.

Copy link

codecov bot commented Jul 7, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 8.98%. Comparing base (3cc12df) to head (59c4f81).
Report is 134 commits behind head on master.

Additional details and impacted files
@@          Coverage Diff           @@
##           master   #2812   +/-   ##
======================================
  Coverage    8.98%   8.98%           
======================================
  Files          95      95           
  Lines       17304   17304           
  Branches     8232    8232           
======================================
  Hits         1555    1555           
- Misses      12884   12947   +63     
+ Partials     2865    2802   -63     
Flag Coverage Δ
Linux 6.78% <ø> (ø)
Windows 4.16% <ø> (ø)
macOS-12 10.09% <ø> (ø)
macOS-13 10.01% <ø> (+0.01%) ⬆️
macOS-14 10.30% <ø> (ø)

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

see 24 files with indirect coverage changes

@ReenigneArcher ReenigneArcher merged commit 5cea1e1 into LizardByte:master Jul 7, 2024
49 checks passed
KuleRucket pushed a commit to KuleRucket/Sunshine that referenced this pull request Oct 9, 2024
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.

2 participants