audio/DPF-Plugins: Add setcap.

Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
Johannes Schoepfer 2020-01-25 08:43:08 +07:00 committed by Willy Sudiarto Raharjo
parent 87ecf502ea
commit 9f4e71c869
No known key found for this signature in database
GPG Key ID: 887B8374D7333381
2 changed files with 16 additions and 1 deletions

View File

@ -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}

View File

@ -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.