From 0cd63da32c2d1d851e846f0a190386b14d0920f1 Mon Sep 17 00:00:00 2001 From: Adam Fidel Date: Mon, 30 Dec 2024 16:39:55 -0600 Subject: [PATCH] chore: remove unneeded workaround for caps (#65) --- build_files/base/05-override-install.sh | 3 +++ build_files/base/17-cleanup.sh | 1 - .../system/kde-sysmonitor-workaround.service | 20 ------------------- .../tmpfiles.d/kde-sysmonitor-workaround.conf | 1 - 4 files changed, 3 insertions(+), 22 deletions(-) delete mode 100644 system_files/kinoite/usr/lib/systemd/system/kde-sysmonitor-workaround.service delete mode 100644 system_files/kinoite/usr/lib/tmpfiles.d/kde-sysmonitor-workaround.conf diff --git a/build_files/base/05-override-install.sh b/build_files/base/05-override-install.sh index bf4eba52..a843cb80 100755 --- a/build_files/base/05-override-install.sh +++ b/build_files/base/05-override-install.sh @@ -56,3 +56,6 @@ mv -f /tmp/ublue-update.toml /usr/etc/ublue-update/ublue-update.toml # Register Fonts fc-cache -f /usr/share/fonts/ubuntu fc-cache -f /usr/share/fonts/inter + +# Caps +setcap 'cap_net_raw+ep' /usr/libexec/ksysguard/ksgrd_network_helper diff --git a/build_files/base/17-cleanup.sh b/build_files/base/17-cleanup.sh index d935d6f4..aa9df2cc 100755 --- a/build_files/base/17-cleanup.sh +++ b/build_files/base/17-cleanup.sh @@ -16,7 +16,6 @@ systemctl enable brew-update.timer systemctl --global enable ublue-user-setup.service systemctl --global enable podman-auto-update.timer systemctl enable check-sb-key.service -systemctl enable kde-sysmonitor-workaround.service # Hide Desktop Files. Hidden removes mime associations sed -i 's@\[Desktop Entry\]@\[Desktop Entry\]\nHidden=true@g' /usr/share/applications/fish.desktop diff --git a/system_files/kinoite/usr/lib/systemd/system/kde-sysmonitor-workaround.service b/system_files/kinoite/usr/lib/systemd/system/kde-sysmonitor-workaround.service deleted file mode 100644 index 2bef6b04..00000000 --- a/system_files/kinoite/usr/lib/systemd/system/kde-sysmonitor-workaround.service +++ /dev/null @@ -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 diff --git a/system_files/kinoite/usr/lib/tmpfiles.d/kde-sysmonitor-workaround.conf b/system_files/kinoite/usr/lib/tmpfiles.d/kde-sysmonitor-workaround.conf deleted file mode 100644 index 4bc92bc6..00000000 --- a/system_files/kinoite/usr/lib/tmpfiles.d/kde-sysmonitor-workaround.conf +++ /dev/null @@ -1 +0,0 @@ -C /usr/local/libexec/.ksysguard/ksgrd_network_helper - - - - /usr/libexec/ksysguard/ksgrd_network_helper