summaryrefslogtreecommitdiffstats
path: root/source/a/util-linux/util-linux.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'source/a/util-linux/util-linux.SlackBuild')
-rwxr-xr-xsource/a/util-linux/util-linux.SlackBuild28
1 files changed, 22 insertions, 6 deletions
diff --git a/source/a/util-linux/util-linux.SlackBuild b/source/a/util-linux/util-linux.SlackBuild
index 294a657c2..381c89d19 100755
--- a/source/a/util-linux/util-linux.SlackBuild
+++ b/source/a/util-linux/util-linux.SlackBuild
@@ -26,7 +26,7 @@ cd $(dirname $0) ; CWD=$(pwd)
PKGNAM=util-linux
VERSION=${VERSION:-$(echo util-linux*.tar.xz | cut -d - -f 3 | rev | cut -f 3- -d . | rev)}
-BUILD=${BUILD:-4}
+BUILD=${BUILD:-5}
ADJTIMEXVERS=1.29
SETSERIALVERS=2.17
@@ -85,23 +85,32 @@ find . \
# Choose correct options depending on whether PAM is installed:
if [ -L /lib${LIBDIRSUFFIX}/libpam.so.? ]; then
LOGIN_OPTIONS=""
- # Add su default file to ensure using ENV_SUPATH with 'su':
- mkdir -p $PKG/etc/default
- cp -a $CWD/su.default $PKG/etc/default/su.new
- chown root:root $PKG/etc/default/su.new
- chmod 644 $PKG/etc/default/su.new
+ # By default, don't use the util-linux version of /bin/su:
+ SHIP_SU=${SHIP_SU:-NO}
# Add /etc/pam.d config files:
rm -rf $PKG/etc/pam.d
mkdir -p $PKG/etc/pam.d
for file in $CWD/pam.d/* ; do
cp -a ${file} $PKG/etc/pam.d/
done
+ if [ "$SHIP_SU" = "YES" ]; then
+ # Add su default file to ensure using ENV_SUPATH with 'su':
+ mkdir -p $PKG/etc/default
+ cp -a $CWD/su.default $PKG/etc/default/su.new
+ chown root:root $PKG/etc/default/su.new
+ chmod 644 $PKG/etc/default/su.new
+ # Add su /etc/pam.d files:
+ cp -a $CWD/pam.d-su/* $PKG/etc/pam.d/
+ fi
# Ensure correct perms/ownership on files in /etc/pam.d/:
chown root:root $PKG/etc/pam.d/*
chmod 644 $PKG/etc/pam.d/*
# Don't clobber existing config files:
find $PKG/etc/pam.d -type f -exec mv {} {}.new \;
else
+ # Don't use the util-linux version of /bin/su.
+ # It can't be built without PAM anyway.
+ SHIP_SU=NO
LOGIN_OPTIONS="--disable-login"
fi
@@ -181,6 +190,13 @@ make $NUMJOBS \
# Remove all overlap with the shadow package, since --disable-login doesn't quite do that:
rm $PKG/sbin/nologin $PKG/usr/man/man8/nologin.8 $PKG/sbin/sulogin $PKG/usr/man/man8/sulogin.8
+# If we aren't shipping su, remove the files:
+if [ "$SHIP_SU" = "NO" ]; then
+ rm -f $PKG/bin/su
+ rm -f $PKG/usr/man/man1/su.1
+ rm -f $PKG/usr/share/bash-completion/completions/su
+fi
+
# Move the libblkid, libfdisk, libmount, libsmartcols, and
# libuuid libraries to /lib${LIBSUFFIX}:
mkdir -p $PKG/lib${LIBDIRSUFFIX}