diff options
Diffstat (limited to 'source')
-rw-r--r-- | source/a/pkgtools/manpages/upgradepkg.8 | 12 | ||||
-rwxr-xr-x | source/a/pkgtools/pkgtools.SlackBuild | 2 | ||||
-rw-r--r-- | source/a/pkgtools/scripts/upgradepkg | 49 | ||||
-rw-r--r-- | source/l/glibc/doinst.sh-glibc | 67 | ||||
-rw-r--r-- | source/l/glibc/doinst.sh-glibc-solibs | 68 | ||||
-rwxr-xr-x | source/l/glibc/glibc.SlackBuild | 2 | ||||
-rw-r--r-- | source/l/glibc/slack-desc.glibc-solibs-linuxthreads | 19 |
7 files changed, 123 insertions, 96 deletions
diff --git a/source/a/pkgtools/manpages/upgradepkg.8 b/source/a/pkgtools/manpages/upgradepkg.8 index af526648..757d6003 100644 --- a/source/a/pkgtools/manpages/upgradepkg.8 +++ b/source/a/pkgtools/manpages/upgradepkg.8 @@ -66,7 +66,12 @@ If the old and new packages have the same name, a single argument is all that is required. If the packages have different names, supply the name of the old package followed by a percent symbol (%), then the name of the new package. Do not add any extra whitespace between pairs of old/new package names. - +.P +Before upgrading a package, save any configuration files (such as in /etc) +that you wish to keep. Sometimes these will be preserved, but it depends on +the package structure. If you want to force new versions of the config files +to be installed, remove the old ones manually prior to running upgradepkg. +.P If upgradepkg finds more than one installed package matching the old package's name, it will remove them all. .TP @@ -101,11 +106,6 @@ Maximum line length of --terse mode output. Default is the number of terminal co .TP .B \--verbose Show all the gory details of the upgrade. -.SH BUGS -Before upgrading a package, save any configuration files (such as in /etc) -that you wish to keep. Sometimes these will be preserved, but it depends on -the package structure. If you want to force new versions of the config files -to be installed, remove the old ones manually prior to running upgradepkg. .SH AUTHOR Patrick J. Volkerding <volkerdi@slackware.com> .SH "SEE ALSO" diff --git a/source/a/pkgtools/pkgtools.SlackBuild b/source/a/pkgtools/pkgtools.SlackBuild index 15e0fb1b..f0cc6da4 100755 --- a/source/a/pkgtools/pkgtools.SlackBuild +++ b/source/a/pkgtools/pkgtools.SlackBuild @@ -30,7 +30,7 @@ PKGNAM=pkgtools # *** UPDATE THESE WITH EACH BUILD: VERSION=15.0 ARCH=${ARCH:-noarch} -BUILD=${BUILD:-15} +BUILD=${BUILD:-16} # If the variable PRINT_PACKAGE_NAME is set, then this script will report what # the name of the created package would be, and then exit. This information diff --git a/source/a/pkgtools/scripts/upgradepkg b/source/a/pkgtools/scripts/upgradepkg index 1acae7d6..500a970a 100644 --- a/source/a/pkgtools/scripts/upgradepkg +++ b/source/a/pkgtools/scripts/upgradepkg @@ -62,27 +62,24 @@ pkgbase() { usage() { cat << EOF -Usage: upgradepkg newpackage [newpackage2 ... ] - upgradepkg oldpackage%newpackage [oldpackage2%newpackage2 ... ] - -Upgradepkg upgrades a Slackware package (.tgz, .tbz, .tlz, .txz) from an -older version to a newer one. It does this by INSTALLING the new package -onto the system, and then REMOVING any files from the old package that -aren't in the new package. If the old and new packages have the same -name, a single argument is all that is required. If the packages have -different names, supply the name of the old package followed by a percent -symbol (%), then the name of the new package. Do not add any extra -whitespace between pairs of old/new package names. - -Before upgrading a package, save any configuration files (such as in /etc) -that you wish to keep. Sometimes these will be preserved, but it depends -on the package. If you want to force new versions of the config files -to be installed, remove the old ones manually prior to running upgradepkg. - -To upgrade in a directory other than / (such as /mnt): - - ROOT=/mnt upgradepkg package.tgz (or .tbz, .tlz, .txz) - +Usage: upgradepkg [options] <newpackage> ... + upgradepkg [options] <oldpackage%newpackage> ... + +Upgrade, install, or reinstall Slackware packages (.tgz, .tbz, .tlz, .txz). + +To operate on an alternate directory, such as /mnt: + ROOT=/mnt upgradepkg package.txz + +Options: + --dry-run only display what would be done + --install-new install new packages also + --reinstall upgrade packages of the same version + --terse display a single line for each package operation + --terselength <length> maximum line length of terse output + --verbose display all the gory details of the upgrade + --help display this help + +For more details see upgradepkg(8). EOF } @@ -106,7 +103,7 @@ else fi # --help or no args? -if [ "$1" = "" -o "$1" = "--help" -o "$1" = "-?" ]; then +if [ "$1" = "" -o "$1" = "-help" -o "$1" = "--help" -o "$1" = "-?" ]; then usage; exit 1; fi @@ -208,7 +205,7 @@ for ARG; do # Simple package integrity check: if ! [ -f "$NEW" ]; then ERRCODE=4 - ! [ $TERSE ] && echo "Cannot install $ARG: file not found" + echo "Cannot install $NEW: file not found" continue; fi @@ -224,7 +221,7 @@ for ARG; do # Make sure the extension is valid: if [ "$NNAME" = "$NEW" ]; then # We won't throw an ERRCODE for this, but the package is skipped: - ! [ $TERSE ] && echo "Cannot install $OLD: invalid package extension" + echo "Cannot install $OLD: invalid package extension" continue; fi @@ -250,7 +247,7 @@ for ARG; do echo "$OLD would not be upgraded (no installed package named $SHORT)." else ! [ $TERSE ] && echo - ! [ $TERSE ] && echo "Error: there is no installed package named $OLD." + echo "Error: there is no installed package named $OLD." ! [ $TERSE ] && echo " (looking for $ROOT/var/log/packages/$OLD)" ! [ $TERSE ] && echo fi @@ -286,7 +283,7 @@ EOF echo "$NEW incoming package not found (command line)." else ! [ $TERSE ] && echo - ! [ $TERSE ] && echo "Error: incoming package $INCOMINGDIR/$NNAME not found." + echo "Error: incoming package $INCOMINGDIR/$NNAME not found." ! [ $TERSE ] && echo fi ERRCODE=1 diff --git a/source/l/glibc/doinst.sh-glibc b/source/l/glibc/doinst.sh-glibc index fc947587..e9929739 100644 --- a/source/l/glibc/doinst.sh-glibc +++ b/source/l/glibc/doinst.sh-glibc @@ -1,6 +1,6 @@ #!/bin/sh # Copyright (C) 2002, 2005 Slackware Linux, Inc. -# Copyright 2005, 2006, 2007, 2011, 2012 Patrick J. Volkerding, Sebeka, Minnesota, USA +# Copyright 2005, 2006, 2007, 2011, 2012, 2018 Patrick J. Volkerding, Sebeka, Minnesota, USA # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License @@ -35,30 +35,55 @@ if [ -d lib/tls ]; then mv lib/tls lib/obsolete fi if [ -x sbin/ldconfig ]; then - sbin/ldconfig -r . + sbin/ldconfig -r . 2> /dev/null fi # Install NPTL glibc libraries: if [ -x /sbin/ldconfig -a -d lib/incoming ]; then # swap on the fly - # First create copies of the incoming libraries: - ( cd lib/incoming - for file in * ; do - if [ ! -r ../${file}.incoming ]; then - cp -a $file ../${file}.incoming - fi - done - ) - # Then switch to them all at once: - /sbin/ldconfig -l lib/*.incoming 2> /dev/null - # Finally, rename them and clean up: - ( cd lib - for file in *.incoming ; do - rm -f `basename $file .incoming` - cp -a $file `basename $file .incoming` - /sbin/ldconfig -l `basename $file .incoming` - rm -f $file - done - ) + # Try to protect with flock against another installpkg/removepkg running + # ldconfig while we're doing the on-the-fly install: + mkdir -p run/lock/pkgtools + ( flock 9 || exit 11 + # First create copies of the incoming libraries: + ( cd lib/incoming + for file in * ; do + if [ ! -r ../${file}.incoming ]; then + cp -a $file ../${file}.incoming + fi + done + ) + # Then switch to them all at once: + /sbin/ldconfig -l lib/*.incoming 2> /dev/null + # Remove old versions of the glibc libraries. If you really don't want to + # do this for some reason, create a file /etc/glibc-nowipe. + if [ ! -r etc/glibc-nowipe ]; then + ( cd lib + for INCOMING in incoming/*-* ; do + LIBPREFIX=$(basename $INCOMING | cut -f 1 -d -) + for LIBRARY in ${LIBPREFIX}-* ; do + # Don't remove the library if it ends in .incoming: + if [ "$(echo $LIBRARY | rev | cut -f 1 -d .)" = "gnimocni" ]; then + continue + fi + # Don't remove symlinks: + if [ -L $LIBRARY ]; then + continue + fi + rm -f $LIBRARY + done + done + ) + fi + # Finally, rename them and clean up: + ( cd lib + for file in *.incoming ; do + rm -f `basename $file .incoming` + cp -a $file `basename $file .incoming` + /sbin/ldconfig -l `basename $file .incoming` 2> /dev/null + rm -f $file + done + ) + ) 9> run/lock/pkgtools/ldconfig.lock else # no ldconfig? Good, it's safe to just jam it on home (and make links below): ( cd lib/incoming for file in * ; do diff --git a/source/l/glibc/doinst.sh-glibc-solibs b/source/l/glibc/doinst.sh-glibc-solibs index a11c36a5..a285f4ed 100644 --- a/source/l/glibc/doinst.sh-glibc-solibs +++ b/source/l/glibc/doinst.sh-glibc-solibs @@ -1,6 +1,6 @@ #!/bin/sh # Copyright (C) 2002, 2005 Slackware Linux, Inc. -# Copyright 2005, 2006, 2011, 2012 Patrick J. Volkerding, Sebeka, Minnesota, USA +# Copyright 2005, 2006, 2011, 2012, 2018 Patrick J. Volkerding, Sebeka, Minnesota, USA # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License @@ -35,30 +35,55 @@ if [ -d lib/tls ]; then mv lib/tls lib/obsolete fi if [ -x sbin/ldconfig ]; then - sbin/ldconfig -r . + sbin/ldconfig -r . 2> /dev/null fi # Install NPTL glibc libraries: if [ -x /sbin/ldconfig -a -d lib/incoming ]; then # swap on the fly - # First create copies of the incoming libraries: - ( cd lib/incoming - for file in * ; do - if [ ! -r ../${file}.incoming ]; then - cp -a $file ../${file}.incoming - fi - done - ) - # Then switch to them all at once: - /sbin/ldconfig -l lib/*.incoming 2> /dev/null - # Finally, rename them and clean up: - ( cd lib - for file in *.incoming ; do - rm -f `basename $file .incoming` - cp -a $file `basename $file .incoming` - /sbin/ldconfig -l `basename $file .incoming` - rm -f $file - done - ) + # Try to protect with flock against another installpkg/removepkg running + # ldconfig while we're doing the on-the-fly install: + mkdir -p run/lock/pkgtools + ( flock 9 || exit 11 + # First create copies of the incoming libraries: + ( cd lib/incoming + for file in * ; do + if [ ! -r ../${file}.incoming ]; then + cp -a $file ../${file}.incoming + fi + done + ) + # Then switch to them all at once: + /sbin/ldconfig -l lib/*.incoming 2> /dev/null + # Remove old versions of the glibc libraries. If you really don't want to + # do this for some reason, create a file /etc/glibc-nowipe. + if [ ! -r etc/glibc-nowipe ]; then + ( cd lib + for INCOMING in incoming/*-* ; do + LIBPREFIX=$(basename $INCOMING | cut -f 1 -d -) + for LIBRARY in ${LIBPREFIX}-* ; do + # Don't remove the library if it ends in .incoming: + if [ "$(echo $LIBRARY | rev | cut -f 1 -d .)" = "gnimocni" ]; then + continue + fi + # Don't remove symlinks: + if [ -L $LIBRARY ]; then + continue + fi + rm -f $LIBRARY + done + done + ) + fi + # Finally, rename them and clean up: + ( cd lib + for file in *.incoming ; do + rm -f `basename $file .incoming` + cp -a $file `basename $file .incoming` + /sbin/ldconfig -l `basename $file .incoming` 2> /dev/null + rm -f $file + done + ) + ) 9> run/lock/pkgtools/ldconfig.lock else # no ldconfig? Good, it's safe to just jam it on home (and make links below): ( cd lib/incoming for file in * ; do @@ -134,4 +159,3 @@ fi if [ -x /sbin/telinit ]; then /sbin/telinit u fi - diff --git a/source/l/glibc/glibc.SlackBuild b/source/l/glibc/glibc.SlackBuild index b5fdf021..57479292 100755 --- a/source/l/glibc/glibc.SlackBuild +++ b/source/l/glibc/glibc.SlackBuild @@ -27,7 +27,7 @@ cd $(dirname $0) ; CWD=$(pwd) PKGNAM=glibc VERSION=${VERSION:-$(echo glibc-*.tar.xz | rev | cut -f 3- -d . | cut -f 1 -d - | rev)} CHECKOUT=${CHECKOUT:-""} -BUILD=${BUILD:-2} +BUILD=${BUILD:-3} # I was considering disabling NSCD, but MoZes talked me out of it. :) #DISABLE_NSCD=" --disable-nscd " diff --git a/source/l/glibc/slack-desc.glibc-solibs-linuxthreads b/source/l/glibc/slack-desc.glibc-solibs-linuxthreads deleted file mode 100644 index fd91f4c5..00000000 --- a/source/l/glibc/slack-desc.glibc-solibs-linuxthreads +++ /dev/null @@ -1,19 +0,0 @@ -# HOW TO EDIT THIS FILE: -# The "handy ruler" below makes it easier to edit a package description. Line -# up the first '|' above the ':' following the base package name, and the '|' on -# the right side marks the last column you can put a character in. You must make -# exactly 11 lines for the formatting to be correct. It's also customary to -# leave one space after the ':'. - - |-----handy-ruler------------------------------------------------------| -glibc-solibs-linuxthreads: glibc-solibs-linuxthreads (LinuxThreads shared GNU C libraries) -glibc-solibs-linuxthreads: -glibc-solibs-linuxthreads: This package contains the shared libraries for glibc that uses -glibc-solibs-linuxthreads: LinuxThreads, the threading implementation in Linux 2.4.x and -glibc-solibs-linuxthreads: earlier kernels. In some cases you'll need to use these libraries -glibc-solibs-linuxthreads: to run old binaries by setting these environment variables: -glibc-solibs-linuxthreads: export LD_ASSUME_KERNEL=2.4.33 -glibc-solibs-linuxthreads: export LD_LIBRARY_PATH=/lib/obsolete/linuxthreads -glibc-solibs-linuxthreads: old-program -glibc-solibs-linuxthreads: Most users should have no need for this package. Recompile. :-) -glibc-solibs-linuxthreads: |