chore: Remove unneeded workarounds for caps

This commit is contained in:
Kyle Gospodnetich 2024-08-20 08:46:19 -07:00
parent 19bed74d64
commit c47e12521e
5 changed files with 1 additions and 45 deletions

View File

@ -536,7 +536,7 @@ RUN --mount=type=cache,dst=/var/cache/rpm-ostree \
cp /usr/share/applications/org.gnome.Ptyxis.desktop /usr/share/kglobalaccel/org.gnome.Ptyxis.desktop && \
sed -i 's@\[Desktop Entry\]@\[Desktop Entry\]\nNoDisplay=true@g' /usr/share/applications/org.kde.konsole.desktop && \
rm -f /usr/share/kglobalaccel/org.kde.konsole.desktop && \
systemctl enable kde-sysmonitor-workaround.service \
setcap 'cap_net_raw+ep' /usr/libexec/ksysguard/ksgrd_network_helper \
; else \
rpm-ostree override replace \
--experimental \
@ -689,7 +689,6 @@ RUN rm -f /etc/profile.d/toolbox.sh && \
systemctl enable bazzite-flatpak-manager.service && \
systemctl disable rpm-ostreed-automatic.timer && \
systemctl enable ublue-update.timer && \
systemctl enable gamescope-workaround.service && \
systemctl enable incus-workaround.service && \
systemctl enable bazzite-hardware-setup.service && \
systemctl enable tailscaled.service && \

View File

@ -1,20 +0,0 @@
[Unit]
Description=Workaround KDE System Monitor not having the correct caps
ConditionFileIsExecutable=/usr/libexec/ksysguard/ksgrd_network_helper
After=local-fs.target
[Service]
Type=oneshot
# Copy if it doesn't exist
ExecStartPre=/usr/bin/bash -c "[ -x /usr/local/libexec/.ksysguard/ksgrd_network_helper ] || /usr/bin/cp /usr/libexec/ksysguard/ksgrd_network_helper /usr/local/libexec/.ksysguard/ksgrd_network_helper"
# This is faster than using .mount unit. Also allows for the previous line/cleanup
ExecStartPre=/usr/bin/mount --bind /usr/local/libexec/.ksysguard/ksgrd_network_helper /usr/libexec/ksysguard/ksgrd_network_helper
# Fix caps
ExecStart=/usr/sbin/setcap 'cap_net_raw+ep' /usr/libexec/ksysguard/ksgrd_network_helper
# Clean-up after ourselves
ExecStop=/usr/bin/umount /usr/libexec/ksysguard/ksgrd_network_helper
ExecStop=/usr/bin/rm /usr/local/libexec/.ksysguard/ksgrd_network_helper
RemainAfterExit=yes
[Install]
WantedBy=multi-user.target

View File

@ -1 +0,0 @@
C /usr/local/libexec/.ksysguard/ksgrd_network_helper - - - - /usr/libexec/ksysguard/ksgrd_network_helper

View File

@ -1,21 +0,0 @@
[Unit]
Description=Workaround gamescope not having the correct caps
ConditionFileIsExecutable=/usr/bin/gamescope
After=local-fs.target
Before=graphical-session-pre.target
[Service]
Type=oneshot
# Copy if it doesn't exist
ExecStartPre=/usr/bin/bash -c "[ -x /usr/local/bin/.gamescope ] || /usr/bin/cp /usr/bin/gamescope /usr/local/bin/.gamescope"
# This is faster than using .mount unit. Also allows for the previous line/cleanup
ExecStartPre=/usr/bin/mount --bind /usr/local/bin/.gamescope /usr/bin/gamescope
# Fix caps
ExecStart=/usr/sbin/setcap 'cap_sys_nice=eip' /usr/bin/gamescope
# Clean-up after ourselves
ExecStop=/usr/bin/umount /usr/bin/gamescope
ExecStop=/usr/bin/rm /usr/local/bin/.gamescope
RemainAfterExit=yes
[Install]
WantedBy=multi-user.target

View File

@ -1 +0,0 @@
C /usr/local/bin/.gamescope - - - - /usr/bin/gamescope