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

Find the correct install paths for systemd units and udev rules #2046

Merged
merged 4 commits into from
Jan 21, 2024

Conversation

PVermeer
Copy link
Contributor

Description

  • Added FindSystemd.cmake
  • Added FindUdev.cmake
  • Edited linux.cmake to load these two new modules and read the new path variables for these modules

Instead of using CMAKE_INSTALL_LIBDIR to get the system lib directory where a library would be installed (can be 'lib' or 'lib64'), now the actual install path of systemd and udev are queried via pkg-config. This should be more reliable for linux builds.

My knowledge of cmake is limited so a review would appreciated.

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

@CLAassistant
Copy link

CLAassistant commented Jan 20, 2024

CLA assistant check
All committers have signed the CLA.

@PVermeer PVermeer marked this pull request as ready for review January 20, 2024 14:31
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.

@ReenigneArcher
Copy link
Member

Looks like some linting errors to fix, and it fails on debian distros. Does something else need to be installed there?

@PVermeer
Copy link
Contributor Author

I'm assuming these FindX files are not re-used from anywhere.

I tried searching, but the closest I found was

* https://invent.kde.org/frameworks/extra-cmake-modules/-/blob/master/find-modules/FindUDev.cmake

* https://github.com/wireshark/wireshark/blob/master/cmake/modules/FindSystemd.cmake

I was inspired by:

And further the cmake docs

@PVermeer
Copy link
Contributor Author

Looks like some linting errors to fix, and it fails on debian distros. Does something else need to be installed there?

Should work. I only tested the fedora 39 container locally. I will check debian based containers later and also replace tabs with spaces for the linter. My vscode went wild with all the different formatting in the cmake files ;).

@PVermeer PVermeer marked this pull request as draft January 20, 2024 15:58
@PVermeer
Copy link
Contributor Author

Looks like some linting errors to fix, and it fails on debian distros. Does something else need to be installed there?

Linting should be fixed now and indeed udev was not installed by default on the Debian images. This is now fixed.

Also the variable for querying the systemd unit install dirs did not work on Ubuntu 20.x. Now using an older alias that works on all distros.

Tested all docker files locally so I think everything should work now :).

@PVermeer PVermeer marked this pull request as ready for review January 21, 2024 17:15
@ReenigneArcher ReenigneArcher force-pushed the fix-linux-build-lib-dir branch from a379c64 to ee34af3 Compare January 21, 2024 19:59
@ReenigneArcher ReenigneArcher merged commit 0d4dfcd into LizardByte:nightly Jan 21, 2024
42 checks passed
@PVermeer PVermeer deleted the fix-linux-build-lib-dir branch January 26, 2024 16:08
KuleRucket pushed a commit to KuleRucket/Sunshine that referenced this pull request Jun 6, 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.

[Nightly] Systemd sunshine service not found in nightly and perhaps udev rules are not installed.
3 participants