rtkit: included polkit rule to allow a user to set realtime level

This commit is contained in:
Tim Biermann 2021-07-02 07:30:19 +00:00
parent bec20e8284
commit 2c9b6de2a4
3 changed files with 12 additions and 2 deletions

View File

@ -1,4 +1,7 @@
drwxr-xr-x root/root etc/
drwxr-xr-x root/root etc/polkit-1/
drwxr-xr-x root/root etc/polkit-1/rules.d/
-rwxr-xr-x root/root etc/polkit-1/rules.d/60-rtkit.rules
drwxr-xr-x root/root etc/rc.d/
-rwxr-xr-x root/root etc/rc.d/rtkit
drwxr-xr-x root/root usr/

View File

@ -5,9 +5,9 @@
name=rtkit
version=0.13
release=2
release=3
source=(https://github.com/heftig/rtkit/releases/download/v$version/$name-$version.tar.xz
rtkit.service org.freedesktop.RealtimeKit1.conf)
rtkit.service org.freedesktop.RealtimeKit1.conf rtkit.rules)
build() {
# allow rtkit group to own the service besides rtkit user and root
@ -23,6 +23,7 @@ build() {
DESTDIR=$PKG meson install -C build
install -Dm755 $SRC/rtkit.service $PKG/etc/rc.d/rtkit
install -Dm755 $SRC/rtkit.rules $PKG/etc/polkit-1/rules.d/60-rtkit.rules
rm -r $PKG/usr/lib/systemd
rm -r $PKG/usr/share/dbus-1/system-services

6
rtkit/rtkit.rules Normal file
View File

@ -0,0 +1,6 @@
polkit.addRule(function(action, subject) {
if (action.id == "org.freedesktop.RealtimeKit1.acquire-high-priority"
|| action.id == "org.freedesktop.RealtimeKit1.acquire-real-time") {
return polkit.Result.YES;
}
});