diff options
author | B. Watson <yalhcru@gmail.com> | 2018-01-19 15:37:49 -0500 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2018-01-20 07:01:18 +0700 |
commit | 903aa21b7eb609f6478d49a8c2f3f5a8bee45ec7 (patch) | |
tree | 2b3dfe3384b62ecf0d841a1db50848258a10ddd8 | |
parent | 1f8b511d1118e756b64765109aa8fe16dc2f8688 (diff) | |
download | slackbuilds-903aa21b7eb609f6478d49a8c2f3f5a8bee45ec7.tar.gz |
system/statifier: Updated for version 1.7.4, new maintainer.
Signed-off-by: B. Watson <yalhcru@gmail.com>
-rw-r--r-- | system/statifier/README | 41 | ||||
-rw-r--r-- | system/statifier/detect_vdso.diff | 24 | ||||
-rw-r--r-- | system/statifier/slack-desc | 8 | ||||
-rw-r--r-- | system/statifier/statifier.SlackBuild | 35 | ||||
-rw-r--r-- | system/statifier/statifier.info | 10 |
5 files changed, 93 insertions, 25 deletions
diff --git a/system/statifier/README b/system/statifier/README index c9c7e17210..d4c8a64be2 100644 --- a/system/statifier/README +++ b/system/statifier/README @@ -1,3 +1,38 @@ -Statifier combines a dynamically linked executable with its libraries into -one large file. The result can be easier to distribute and may make a -32-bits binary work on 64-bits. +statifier (convert dynamic executables to statically linked) + +Statifier combines a dynamically linked executable with its libraries +into one large file. The result can be easier to distribute and may +allow a 32-bit binary to run on a 64-bit-only system. + +Notes: + +1. To get statifier to work properly, VDSO support must be disabled in + the kernel. This must be done on the system statifier is being run on, + before it's run. The converted binaries themselves don't require this, + only statifier itself. If you forget to do this, statifier will appear + to run OK, but the converted binaries will segfault when run. + + For 32-bit systems only, this can be done without a reboot. + Execute this as root: + + echo "0" > /proc/sys/vm/vdso_enabled + + ...and to re-enable VDSO, replace the "0" with "1". + + For 64-bit systems, you must use kernel parameters, meaning a reboot is + required. At the lilo (elilo, grub, etc) prompt, enter: + + linux vdso=0 vdso32=0 + + ...or add 'append="vdso=0 vdso32=0"' to the kernel image section in + /etc/lilo.conf to make it permanent (not recommended). + + If you run statifier with VDSO enabled, it will remind you to disable it. + +2. Executables converted with statifier will show up as dynamic, in + 'file' output, but ldd will say 'not a dynamic executable'. + +3. Converting 32-bit executables on a 64-bit system requires multilib + and probably a 32-bit statifier package. The SlackBuild maintainer + hasn't tested multilib, and would be interested to know what kind of + results you get with it. diff --git a/system/statifier/detect_vdso.diff b/system/statifier/detect_vdso.diff new file mode 100644 index 0000000000..8ff51f75c5 --- /dev/null +++ b/system/statifier/detect_vdso.diff @@ -0,0 +1,24 @@ +diff -Naur statifier-1.7.4/src/statifier statifier-1.7.4.patched/src/statifier +--- statifier-1.7.4/src/statifier 2015-10-23 05:17:13.000000000 -0400 ++++ statifier-1.7.4.patched/src/statifier 2018-01-19 15:04:54.809053542 -0500 +@@ -7,4 +7,20 @@ + # modify it under the terms of the GNU General Public License. + # See LICENSE file in the doc directory. + ++# Modified by B. Watson for the SlackBuilds.org project: detects ++# whether VDSO has been disabled and prints a warning if not. ++if ldd /bin/ls | grep -q 'linux-\(gate\|vdso\)\.'; then ++ echo "VDSO is enabled. Converted binary will likely segfault when run." ++ if [ -e /proc/sys/vm/vdso_enabled ]; then ++ cat <<EOF ++Disable VDSO by running this command, as root: ++ echo "0" > /proc/sys/vm/vdso_enabled ++EOF ++ else ++ cat <<EOF ++To disable VDSO, reboot with 'vdso=0 vdso32=0' on the kernel command line. ++EOF ++ fi ++fi ++ + ${STATIFIER_ROOT_DIR:-/usr/lib/statifier}/statifier.sh "$@" diff --git a/system/statifier/slack-desc b/system/statifier/slack-desc index 86d7a637ec..4c5e3885cc 100644 --- a/system/statifier/slack-desc +++ b/system/statifier/slack-desc @@ -6,14 +6,14 @@ # customary to leave one space after the ':' except on otherwise blank lines. |-----handy-ruler------------------------------------------------------| -statifier: statifier (Transform dynamic executables into static files) +statifier: statifier (convert dynamic executables to statically linked) statifier: statifier: Statifier combines a dynamically linked executable with its libraries statifier: into one large file. The result can be easier to distribute and may -statifier: make a 32-bits binary work on 64-bits. -statifier: -statifier: http://statifier.sourceforge.net/ +statifier: allow a 32-bit binary to run on a 64-bit-only system. statifier: +statifier: For statifier to work correctly, the VDSO must be disabled in the +statifier: kernel. See the README for details. statifier: statifier: statifier: diff --git a/system/statifier/statifier.SlackBuild b/system/statifier/statifier.SlackBuild index af7b559276..3ce16e8914 100644 --- a/system/statifier/statifier.SlackBuild +++ b/system/statifier/statifier.SlackBuild @@ -2,12 +2,21 @@ # Slackware build script for statifier -# Written by Niels Horn <niels.horn@gmail.com> -# revision date: 2010/03/13 -# Updated by Willy Sudiarto Raharjo <willysr@slackware-id.org> +# Written by Niels Horn <email removed>, revision date: 2010/03/13 +# Updated by Willy Sudiarto Raharjo <email removed> +# Updated again and now maintained by B. Watson <yalhcru@gmail.com> + +# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details. + +# 20180118 bkw: +# - take over maintenance. +# - update for v1.7.4. +# - grammar nitpicks in README and slack-desc. +# - add useful info to README, like how to actually get this to work. +# - add patch to help the user remember to disable VDSO. PRGNAM=statifier -VERSION=${VERSION:-1.7.2} +VERSION=${VERSION:-1.7.4} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} @@ -31,7 +40,6 @@ elif [ "$ARCH" = "i686" ]; then elif [ "$ARCH" = "x86_64" ]; then LIBDIRSUFFIX="64" else - SLKCFLAGS="-O2" LIBDIRSUFFIX="" fi @@ -46,14 +54,17 @@ cd $PRGNAM-$VERSION chown -R root:root . find -L . \ \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 -o -perm 511 \) \ - -exec chmod 755 {} \; -o \ + -exec chmod 755 {} \+ -o \ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \ - -exec chmod 644 {} \; + -exec chmod 644 {} \+ # We need to patch config.x86_64 because Slackware64 is not multi-lib and we # only have the 32-bits libraries patch -p1 < $CWD/64pure.patch +# If VDSO is enabled, print a warning and directions on how to disable it. +patch -p1 < $CWD/detect_vdso.diff + # "usr/lib/" is hardcoded in the Makefile... sed -i "s,usr/lib/,usr/lib${LIBDIRSUFFIX}/," src/Makefile # And in the startup script... @@ -68,15 +79,13 @@ make install DESTDIR=$PKG find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true -( cd $PKG/usr/man - find . -type f -exec gzip -9 {} \; - for i in $( find . -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done -) +gzip $PKG/usr/man/man1/$PRGNAM.1 mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION cp -a \ - AUTHORS ChangeLog FAQ INSTALL LICENSE NEWS README RELEASE THANKS \ - TODO VERSION doc $PKG/usr/doc/$PRGNAM-$VERSION + AUTHORS ChangeLog FAQ INSTALL LICENSE NEWS \ + README RELEASE THANKS TODO VERSION doc \ + $PKG/usr/doc/$PRGNAM-$VERSION cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild mkdir -p $PKG/install diff --git a/system/statifier/statifier.info b/system/statifier/statifier.info index 7a5ed7c512..c167aefb6e 100644 --- a/system/statifier/statifier.info +++ b/system/statifier/statifier.info @@ -1,10 +1,10 @@ PRGNAM="statifier" -VERSION="1.7.2" +VERSION="1.7.4" HOMEPAGE="http://statifier.sourceforge.net/" -DOWNLOAD="http://downloads.sourceforge.net/statifier/statifier-1.7.2.tar.gz" -MD5SUM="20b80e6aebc7a36d4e0435790990f248" +DOWNLOAD="http://downloads.sourceforge.net/statifier/statifier-1.7.4.tar.gz" +MD5SUM="e6004f1436be1d525e973536d12b44de" DOWNLOAD_x86_64="UNSUPPORTED" MD5SUM_x86_64="" REQUIRES="" -MAINTAINER="Niels Horn" -EMAIL="niels.horn@gmail.com" +MAINTAINER="B. Watson" +EMAIL="yalhcru@gmail.com" |