From 04e934d9c1df1dbb426c3e7675109ae8e2336e9c Mon Sep 17 00:00:00 2001 From: Eric Hameleers Date: Sat, 26 Dec 2020 11:17:36 +0000 Subject: vcvrack: apply realtime capabilities to the binary to prevent it from crashing --- vcvrack/build/vcvrack.SlackBuild | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/vcvrack/build/vcvrack.SlackBuild b/vcvrack/build/vcvrack.SlackBuild index 3503520f..0e37ad82 100755 --- a/vcvrack/build/vcvrack.SlackBuild +++ b/vcvrack/build/vcvrack.SlackBuild @@ -33,6 +33,9 @@ # Changelog: # 1.1.6-1: 25/Dec/2020 by Eric Hameleers # * Initial build, includes one required plugin 'Fundamental'. +# 1.1.6-2: 26/Dec/2020 by Eric Hameleers +# * Apply realtime capability to the Rack binary or else it will +# crash when you attempt to enable RT. # # Run 'sh vcvrack.SlackBuild' to build a Slackware package. # The package (.t?z) and .txt file as well as build logs are created in /tmp . @@ -43,7 +46,7 @@ PRGNAM=vcvrack SRCNAM=Rack VERSION=${VERSION:-1.1.6} -BUILD=${BUILD:-1} +BUILD=${BUILD:-2} NUMJOBS=${NUMJOBS:-" -j$(nproc) "} TAG=${TAG:-alien} @@ -323,9 +326,19 @@ EOT # The icon for the menu entry: install -D -m 0644 res/icon.png $PKG/usr/share/pixmaps/${SRCNAM}.png +# Only allow execution by user in 'audio' group: +chown root:audio $PKG/usr/share/$PRGNAM/$SRCNAM +chmod 0750 $PKG/usr/share/$PRGNAM/$SRCNAM + # Add this to the doinst.sh: mkdir -p $PKG/install cat <> $PKG/install/doinst.sh +if [ -x /sbin/setcap ]; then + # Give Rack binary realtime capabilities, otherwise it will crash + # when you select RT priority despite your PAM settings: + /sbin/setcap cap_ipc_lock,cap_sys_nice=ep usr/share/$PRGNAM/$SRCNAM +fi + # Update the desktop database: if [ -x usr/bin/update-desktop-database ]; then chroot . /usr/bin/update-desktop-database usr/share/applications > /dev/null 2>&1 -- cgit v1.2.3-65-gdbad