From 213f4c441e1b31a7676bc19384bee81e72ecadf8 Mon Sep 17 00:00:00 2001 From: Eric Hameleers Date: Sat, 26 May 2007 14:10:50 +0000 Subject: Update for 4.3a --- truecrypt/build/truecrypt.SlackBuild | 55 +++++++++++++----------------------- 1 file changed, 19 insertions(+), 36 deletions(-) (limited to 'truecrypt') diff --git a/truecrypt/build/truecrypt.SlackBuild b/truecrypt/build/truecrypt.SlackBuild index 89856a3d..769fea20 100755 --- a/truecrypt/build/truecrypt.SlackBuild +++ b/truecrypt/build/truecrypt.SlackBuild @@ -21,6 +21,8 @@ # * Fix compilation under kernels 2.6.18 and 2.6.19. # 4.3: 15/apr/2007 by Eric Hameleers # * Update. +# 4.3a: 26/may/2007 by Eric Hameleers +# * Update. This fixes a security issue with seteuid. # # Run 'sh SlackBuild --cleanup' to build a Slackware package. # The package (.tgz) plus descriptive .txt file are created in /tmp . @@ -31,7 +33,7 @@ # --- INIT --- PRGNAM=truecrypt -VERSION=${VERSION:-4.3} +VERSION=${VERSION:-4.3a} ARCH=${ARCH:-i486} BUILD=1 @@ -44,8 +46,8 @@ SOURCE="${PRGNAM}-${VERSION}-source-code.tar.gz" PATCH0="${PRGNAM}-${VERSION}_ksrc.patch" # Where do we look for sources? -CWD=`pwd` -SRCDIR=`dirname $0` +CWD=$(pwd) +SRCDIR=$(dirname $0) [ "${SRCDIR:0:1}" == "." ] && SRCDIR=${CWD}/${SRCDIR} # Place to build (TMP) package (PKG) and output (OUTPUT) the program: @@ -53,12 +55,10 @@ TMP=${TMP:-/tmp/build} PKG=$TMP/package-$PRGNAM OUTPUT=${OUTPUT:-/tmp} - -# --------------------------------------------------------------------- -# If you do *not* want non-admin users to be able to use truecrypt, set -# BINPERM=0750 -BINPERM=4755 -# --------------------------------------------------------------------- +# ------------------------------------------------------------------------ +# truecrypt used to be installed with setuid root - as of 4.3a the program +# will use 'sudo' to get elevated rights. +# ------------------------------------------------------------------------ ## ## --- with a little luck, you won't have to edit below this point --- ## @@ -72,7 +72,7 @@ set -u P1=${1:-1} # Slackware 11 and up need other option (gcc > 3.3.x) -if [ `gcc -dumpversion | tr -d '.' |cut -c 1-2` -gt 33 ]; then +if [ $(gcc -dumpversion | tr -d '.' |cut -c 1-2) -gt 33 ]; then MOPT=tune else MOPT=cpu @@ -152,10 +152,10 @@ patch -p0 < $SRCDIR/${PATCH0} 2>&1 | tee $OUTPUT/patch-${PRGNAM}.log CFLAGS="$SLKCFLAGS" \ KERNEL_VER=$KVER KERNEL_SRC=$KSRC \ -./build.sh 2>&1 | tee $OUTPUT/build-${PRGNAM}.log +./build.sh 2>&1 | tee $OUTPUT/make-${PRGNAM}.log # Run a test -./Cli/truecrypt --test 2>&1 | tee -a $OUTPUT/build-${PRGNAM}.log +./Cli/truecrypt --test 2>&1 | tee -a $OUTPUT/make-${PRGNAM}.log # # Install all the needed stuff to the package dir @@ -171,7 +171,6 @@ chmod 600 $PKG/lib/modules/$KVER/extra/truecrypt.ko cd .. -# --- DOINST.SH --- # And now write the doinst.sh : mkdir -p $PKG/install cat <<-EEOOTT > $PKG/install/doinst.sh @@ -190,9 +189,6 @@ cat <<-EEOOTT > $PKG/install/doinst.sh echo "Please install the 'device-mapper' package before trying to use truecrypt." fi - # Set the correct access bits on the binary: - chmod $BINPERM usr/bin/truecrypt - # Make the device mapper module load on boot: if ! grep -e "^[^#]* dm-mod" \${RCMODULES} >/dev/null ; then echo "# Loading device mapper module (for truecrypt amongst others)" >> \${RCMODULES} @@ -221,9 +217,7 @@ cat <<-EEOOTT > $PKG/install/doinst.sh fi EEOOTT - -# --- DOCUMENTATION --- - +# Add documentation: cp Release/Readme.txt README.1st cp Release/Setup\ Files/TrueCrypt\ User\ Guide.pdf userguide.pdf @@ -232,23 +226,18 @@ cp -a $DOCS \ $PKG/usr/doc/$PRGNAM-$VERSION chmod -R a-w $PKG/usr/doc/$PRGNAM-$VERSION/* -# Compress the man page(s) -[ -d $PKG/usr/man ] && find $PKG/usr/man -name "*.?" -type f -exec gzip -9f {} \; +# Compress the man page(s): +if [ -d $PKG/usr/man ]; then + find $PKG/usr/man -name "*.?" -type f -exec gzip -9f {} \; +fi -# Strip binaries +# Strip binaries: ( cd $PKG find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null ) - -# --- OWNERSHIP, RIGHTS --- - -chmod -R o-w $PKG - - -# --- PACKAGE DESCRIPTION --- - +# Add a package description: mkdir -p $PKG/install cat $SRCDIR/slack-desc > $PKG/install/slack-desc # Substitute correct versions @@ -257,9 +246,6 @@ if [ -f $SRCDIR/slack-required ]; then cat $SRCDIR/slack-required > $PKG/install/slack-required fi - -# --- BUILDING --- - # Build the package: cd $PKG makepkg --linkadd y --chown n $OUTPUT/${PRGNAM}-${VERSION}_$(echo $KVER | tr - _)-${ARCH}-${BUILD}.tgz \ @@ -270,9 +256,6 @@ if [ -f $PKG/install/slack-required ]; then cat $PKG/install/slack-required > $OUTPUT/${PRGNAM}-${VERSION}_$(echo $KVER | tr - _)-${ARCH}-${BUILD}.dep fi - -# --- CLEANUP --- - # Clean up the extra stuff: if [ "$P1" = "--cleanup" ]; then rm -rf $TMP/tmp-$PRGNAM -- cgit v1.2.3