diff options
author | Eric Hameleers <alien@slackware.com> | 2020-12-26 11:17:36 +0000 |
---|---|---|
committer | Eric Hameleers <alien@slackware.com> | 2020-12-26 11:17:36 +0000 |
commit | 04e934d9c1df1dbb426c3e7675109ae8e2336e9c (patch) | |
tree | 37edd5421c484c8bce80ec7c509663d1fdaf6398 | |
parent | 97e28cb5587301323584be6e51ba1edde6304810 (diff) | |
download | asb-04e934d9c1df1dbb426c3e7675109ae8e2336e9c.tar.gz asb-04e934d9c1df1dbb426c3e7675109ae8e2336e9c.tar.xz |
vcvrack: apply realtime capabilities to the binary to prevent it from crashing
-rwxr-xr-x | vcvrack/build/vcvrack.SlackBuild | 15 |
1 files changed, 14 insertions, 1 deletions
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 <alien@slackware.com> # * Initial build, includes one required plugin 'Fundamental'. +# 1.1.6-2: 26/Dec/2020 by Eric Hameleers <alien@slackware.com> +# * 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 <<EOINS >> $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 |