-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
[Nightly] Systemd sunshine service not found in nightly and perhaps udev rules are not installed. #2038
Comments
Did some digging to understand cmake variable definitions because of: Sunshine/cmake/packaging/linux.cmake Lines 10 to 14 in 6cdb7f7
set(_LIBDIR_DEFAULT "lib")
# Override this default 'lib' with 'lib64' iff:
# - we are on Linux system but NOT cross-compiling
# - we are NOT on debian
# - we are NOT building for conda
# - we are on a 64 bits system
# reason is: amd64 ABI: https://github.com/hjl-tools/x86-psABI/wiki/X86-psABI
# For Debian with multiarch, use 'lib/${CMAKE_LIBRARY_ARCHITECTURE}' if
# CMAKE_LIBRARY_ARCHITECTURE is set (which contains e.g. "i386-linux-gnu"
# and CMAKE_INSTALL_PREFIX is "/usr"
# See http://wiki.debian.org/Multiarch I did some research and this should work: # Find systemd service dirs
find_package(PkgConfig QUIET)
if(PKG_CONFIG_FOUND)
pkg_check_modules(SYSTEMD "systemd")
endif()
if (SYSTEMD_FOUND)
execute_process(COMMAND ${PKG_CONFIG_EXECUTABLE}
--variable=systemd_user_unit_dir systemd
OUTPUT_VARIABLE SYSTEMD_USER_UNIT_INSTALL_DIR)
string(REGEX REPLACE "[ \t\n]+" "" SYSTEMD_USER_UNIT_INSTALL_DIR
"${SYSTEMD_USER_UNIT_INSTALL_DIR}")
execute_process(COMMAND ${PKG_CONFIG_EXECUTABLE}
--variable=systemd_system_unit_dir systemd
OUTPUT_VARIABLE SYSTEMD_SYSTEM_UNIT_INSTALL_DIR)
string(REGEX REPLACE "[ \t\n]+" "" SYSTEMD_SYSTEM_UNIT_INSTALL_DIR
"${SYSTEMD_SYSTEM_UNIT_INSTALL_DIR}")
mark_as_advanced(SYSTEMD_USER_UNIT_INSTALL_DIR SYSTEMD_SYSTEM_UNIT_INSTALL_DIR)
endif () udev # Find udev rules dir
find_package(PkgConfig QUIET)
if(PKG_CONFIG_FOUND)
pkg_check_modules(UDEV "udev")
endif()
if (UDEV_FOUND)
execute_process(COMMAND ${PKG_CONFIG_EXECUTABLE}
--variable=udevdir udev
OUTPUT_VARIABLE UDEV_RULE_INSTALL_DIR)
string(REGEX REPLACE "[ \t\n]+" "" UDEV_RULE_INSTALL_DIR
"${UDEV_RULE_INSTALL_DIR}")
set(UDEV_RULE_INSTALL_DIR "${UDEV_RULE_INSTALL_DIR}/rules.d")
mark_as_advanced(UDEV_RULE_INSTALL_DIR)
endif () I could make a PR to test this out. |
PR would be welcomed |
Had a short convo with @ReenigneArcher. We may want to consider adding support to detect the init system of the user's system. Other linux distros use alternative init systems like runit, dinit, openrc, s6, etc. |
That is a good point. I have no knowledge about other init systems but for now we could easily check if systemd is used with Sunshine/cmake/packaging/linux.cmake Lines 16 to 17 in 78ed91a
Same goes for udev. |
I'm using We would need specific files for different init system. E.g. The
|
I thought about it a little more and it makes no sense in de context of this fix. The fix was only meant to fix some paths when building the deb and rpm files in the docker containers. Can you explain a little more what you want to accomplish? Some more questions that I have are:
I think for other init systems we could write different 'FindX' files, their respective install files and probable some new docker containers if they need to be tested / released. But does LizardByte want to maintain all of this? Other option, that i could think of, is to add cmake options (variables) for other init systems. But I really have no idea of what needs to be changed. |
@PVermeer essentially, the build now fails if systemd is not found. I think your suggestion here is a decent one to at least allow Sunshine to build. #2038 (comment) |
Yeah @ReenigneArcher, Just write an 'if' statement around the systemd lines and it should build. I wouldn't advise in production since it would not throw en error. if (SYSTEMD_FOUND)
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/sunshine.service"
DESTINATION "${SYSTEMD_USER_UNIT_INSTALL_DIR}")
endif () Always happy to help :) |
Is there an existing issue for this?
Is your issue described in the documentation?
Is your issue present in the nightly release?
Describe the Bug
After fresh install of latest nightly:
Some debugging revealed that some rpm install paths are changed to
/usr/lib64/
from/usr/lib/
:Scriptlet seems fine:
I dont know if this is intentional but at least the service is not detected by systemd.
Expected Behavior
To be able to enable and start the service and udev rules to be applied.
Additional Context
No response
Host Operating System
Linux
Operating System Version
Fedora 39 Gnome up to date
Architecture
64 bit
Sunshine commit or version
sunshine-0.21.0.b94f8c0b5037d8b5cac8da51c363b263429a49cc
Package
Linux - rpm
GPU Type
AMD
GPU Model
RX 6650XT
GPU Driver/Mesa Version
23.3.3
Capture Method (Linux Only)
KMS
Config
Apps
Not relevant
Relevant log output
The text was updated successfully, but these errors were encountered: