summaryrefslogtreecommitdiff
path: root/rtkit
diff options
context:
space:
mode:
authorTim Biermann <tbier@posteo.de>2021-07-02 07:30:19 +0000
committerTim Biermann <tbier@posteo.de>2021-07-02 07:42:26 +0000
commit2c9b6de2a4abb43b0474a05fc9bcbd5e6726fc75 (patch)
treeedb6f377f62249640c1ff5d0862bef57f1bf3249 /rtkit
parentbec20e8284bd2feccb2c9543919906044bacb3eb (diff)
downloadcontrib-2c9b6de2a4abb43b0474a05fc9bcbd5e6726fc75.tar.gz
contrib-2c9b6de2a4abb43b0474a05fc9bcbd5e6726fc75.tar.xz
rtkit: included polkit rule to allow a user to set realtime level
Diffstat (limited to 'rtkit')
-rw-r--r--rtkit/.footprint3
-rw-r--r--rtkit/Pkgfile5
-rw-r--r--rtkit/rtkit.rules6
3 files changed, 12 insertions, 2 deletions
diff --git a/rtkit/.footprint b/rtkit/.footprint
index 01c1b8f1a..8d5bf79ca 100644
--- a/rtkit/.footprint
+++ b/rtkit/.footprint
@@ -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/
diff --git a/rtkit/Pkgfile b/rtkit/Pkgfile
index 62769d4cb..e30b828a3 100644
--- a/rtkit/Pkgfile
+++ b/rtkit/Pkgfile
@@ -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
diff --git a/rtkit/rtkit.rules b/rtkit/rtkit.rules
new file mode 100644
index 000000000..250495a9f
--- /dev/null
+++ b/rtkit/rtkit.rules
@@ -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;
+ }
+});

Generated by cgit