From 9f4e71c86931e84b22c899b8893c54aca14c40eb Mon Sep 17 00:00:00 2001 From: Johannes Schoepfer Date: Sat, 25 Jan 2020 08:43:08 +0700 Subject: [PATCH] audio/DPF-Plugins: Add setcap. Signed-off-by: Willy Sudiarto Raharjo --- audio/DPF-Plugins/DPF-Plugins.SlackBuild | 11 ++++++++++- audio/DPF-Plugins/README | 6 ++++++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/audio/DPF-Plugins/DPF-Plugins.SlackBuild b/audio/DPF-Plugins/DPF-Plugins.SlackBuild index 0bbfcc68c4..c22199d173 100644 --- a/audio/DPF-Plugins/DPF-Plugins.SlackBuild +++ b/audio/DPF-Plugins/DPF-Plugins.SlackBuild @@ -2,7 +2,7 @@ # Slackware build script for DPF-Plugins -# Copyright 2019 Johannes Schoepfer, Germany +# Copyright 2020 Johannes Schoepfer, Germany # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -105,4 +105,13 @@ mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc cd $PKG +if [ "${SETCAP:-yes}" = "yes" ]; then + for bin in $(find . -type f -exec file '{}' + | grep " ELF .* executable, " | cut -f 1 -d : ); do + if [ -n "$(readelf -d $bin | grep libjack.so)" ]; then + echo "/sbin/setcap cap_ipc_lock,cap_sys_nice=ep $bin" >> $PKG/install/doinst.sh + chown root:audio $PKG/$bin + chmod 0750 $PKG/$bin + fi + done +fi /sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz} diff --git a/audio/DPF-Plugins/README b/audio/DPF-Plugins/README index 3f1131660b..3c84fc186d 100644 --- a/audio/DPF-Plugins/README +++ b/audio/DPF-Plugins/README @@ -14,5 +14,11 @@ LV2_ONLY=yes may be set to ommit building ladspa, dssi and vst plugins. Optional dependencies: jack,dssi,projectM +If compiled against jack, this package uses POSIX filesystem +capabilities to execute with elevated privileges (required for +realtime audio processing). This may be considered a security/stability +risk. Please read http://www.slackbuilds.org/caps/ for more information. +To disable capabilities, pass SETCAP=no to the script. + This build conflicts with "distrho-mini-series" from SBo, as that build is a subset of DPF-Plugins.