LizardByte / Sunshine

Self-hosted game stream host for Moonlight.
http://app.lizardbyte.dev/Sunshine/
GNU General Public License v3.0
17.87k stars 864 forks source link

Unable to install RPM on Fedora atomic desktops (Kinoite 40, Silverblue 40, Aurora, Bluefin) #2972

Closed wiseindy closed 2 weeks ago

wiseindy commented 1 month ago

Is there an existing issue for this?

Is your issue described in the documentation?

Is your issue present in the latest beta/pre-release?

This issue is present in the latest pre-release

Describe the Bug

Installing the rpm fails on Fedora atomic desktops due to a read-only filesystem. The %post script here https://github.com/LizardByte/Sunshine/blob/master/src_assets/linux/misc/postinst is the cause of the failure.

# This step fails due to the %post script
rpm-ostree install sunshine-fedora-40-amd64.rpm
rpm-ostree(sunshine.post)[58328]: /usr/sbin/setcap cap_sys_admin+p /usr/bin/sunshine-v2024.805.184417
rpm-ostree(sunshine.post)[58339]: Failed to send reload request: No such file or directory
rpm-ostree(sunshine.post)[58342]: uinput: Failed to write 'change' to '/sys/devices/virtual/misc/uinput/uevent': Read-only file system

Workaround

One workaround is to repackage the rpm and remove the %post step from the rpm altogether

rpmrebuild -ep sunshine-fedora-40-amd64.rpm

If you don't have rpmrebuild installed, you can use distrobox or toolbx and install it using sudo dnf install rpmrebuild. You may also need to install nano.

Once the new package is built, install the modified package and reboot.

rpm-ostree install sunshine-0.0.0-1.x86_64.rpm
systemctl reboot

Note: The systemd service needs to be manually updated/enabled https://docs.lizardbyte.dev/projects/sunshine/en/latest/about/setup.html

Expected Behavior

No response

Additional Context

No response

Host Operating System

Linux

Operating System Version

Fedora Kinoite 40

Architecture

64 bit

Sunshine commit or version

v2024.805.184417

Package

Linux - rpm

GPU Type

Intel

GPU Model

Intel UHD Graphics 630

GPU Driver/Mesa Version

Mesa Intel(R) UHD Graphics 630 (CFL GT2)

Capture Method

X11 (Linux)

Config

default

Apps

No response

Relevant log output

rpm-ostree(sunshine.post)[58328]: /usr/sbin/setcap cap_sys_admin+p /usr/bin/sunshine-v2024.805.184417
rpm-ostree(sunshine.post)[58339]: Failed to send reload request: No such file or directory
rpm-ostree(sunshine.post)[58342]: uinput: Failed to write 'change' to '/sys/devices/virtual/misc/uinput/uevent': Read-only file system
ReenigneArcher commented 1 month ago

Can probably probe /etc/os-release and make the logic in the post install script conditional.

I'm doing something like that in our new linux build script: https://github.com/LizardByte/Sunshine/blob/master/scripts/linux_build.sh

wiseindy commented 1 month ago

Nice, yeah I'll try to find some time to put up a PR soon