From 7e5ee73de954e6c084195b0a1fa6ef01a78d092f Mon Sep 17 00:00:00 2001 From: Patrick J Volkerding Date: Tue, 19 Jun 2018 22:35:25 +0000 Subject: Tue Jun 19 22:35:25 UTC 2018 a/acl-2.2.53-x86_64-1.txz: Upgraded. a/attr-2.4.48-x86_64-1.txz: Upgraded. n/gnupg-1.4.23-x86_64-1.txz: Upgraded. Sanitize the diagnostic output of the original file name in verbose mode. By using a made up file name in the message it was possible to fake status messages. Using this technique it was for example possible to fake the verification status of a signed mail. For more information, see: https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2018-12020 (* Security fix *) x/libXaw3d-1.6.3-x86_64-1.txz: Upgraded. x/libinput-1.11.1-x86_64-1.txz: Upgraded. x/xf86-input-mouse-1.9.3-x86_64-1.txz: Upgraded. testing/packages/pkgtools-15.0-noarch-20.txz: Rebuilt. This update is a bit scarier than usual, so we're going to test it here first and then move it into the main tree in a couple of days if there are no serious bug reports. It's well-tested here, and works with the slackpkg that's in -current now, but I don't know about slackpkg+ so that's another reason to let it cool down here first. The purpose of this update is to migrate the package database and directories from /var/log to /var/lib/pkgtools. /var/log was never a good place for this data, as it is considered by many to be a directory that could be wiped to free up some space. Originally the package database was in /var/adm, but the FSSTND (later FHS) group decided that directory should be a symlink to /var/log, and I went along with that since it was years ago and I was a n00b and didn't know any better. /var/lib/pkgtools will be a better and safer location. The removed_packages and removed_scripts directories are really just logs that aren't actually used for anything - those will remain under /var/log, but moved into /var/log/pkgtools. Everything under /var/log will be considered potentially non-permanent by the pkgtools - if any directories or symlinks disappear from there, the pkgtools will automatically recreate them as needed. In fact, the migration process will create symlinks from all the old directory locations to the new ones, so anything that expects the old locations (including slackpkg, for now) should continue to work. Once this moves into the main tree, the plan is to fix other packages to use the new installer script directory (/var/lib/pkgtools/setup) and change the installer and slackpkg to use the new native locations for everything. When slackpkg is changed over to use the new native locations, I'll also make sure to float that in testing/ for a few days before moving it to the main tree to avoid more unintentional disruption to slackpkg+ users. Be aware that the package database migration is a one-way operation, but even so if you later downgrade to an older version of the pkgtools it will still work through the compatibility symlinks. --- testing/source/pkgtools/doinst.sh | 69 ++ testing/source/pkgtools/manpages/explodepkg.8 | 41 ++ testing/source/pkgtools/manpages/installpkg.8 | 126 ++++ testing/source/pkgtools/manpages/makepkg.8 | 164 +++++ testing/source/pkgtools/manpages/pkgdiff.8 | 57 ++ testing/source/pkgtools/manpages/pkgtool.8 | 95 +++ testing/source/pkgtools/manpages/removepkg.8 | 114 ++++ testing/source/pkgtools/manpages/upgradepkg.8 | 116 ++++ testing/source/pkgtools/pkgtools.SlackBuild | 109 ++++ testing/source/pkgtools/scripts/explodepkg | 109 ++++ testing/source/pkgtools/scripts/installpkg | 713 ++++++++++++++++++++ testing/source/pkgtools/scripts/makebootdisk | 443 +++++++++++++ testing/source/pkgtools/scripts/makepkg | 452 +++++++++++++ testing/source/pkgtools/scripts/pkgdiff | 164 +++++ testing/source/pkgtools/scripts/pkgtool | 723 +++++++++++++++++++++ testing/source/pkgtools/scripts/removepkg | 438 +++++++++++++ .../pkgtools/scripts/setup.70.install-kernel | 5 + .../source/pkgtools/scripts/setup.80.make-bootdisk | 267 ++++++++ testing/source/pkgtools/scripts/setup.htmlview | 33 + testing/source/pkgtools/scripts/setup.services | 342 ++++++++++ testing/source/pkgtools/scripts/upgradepkg | 417 ++++++++++++ testing/source/pkgtools/slack-desc | 19 + 22 files changed, 5016 insertions(+) create mode 100644 testing/source/pkgtools/doinst.sh create mode 100644 testing/source/pkgtools/manpages/explodepkg.8 create mode 100644 testing/source/pkgtools/manpages/installpkg.8 create mode 100644 testing/source/pkgtools/manpages/makepkg.8 create mode 100644 testing/source/pkgtools/manpages/pkgdiff.8 create mode 100644 testing/source/pkgtools/manpages/pkgtool.8 create mode 100644 testing/source/pkgtools/manpages/removepkg.8 create mode 100644 testing/source/pkgtools/manpages/upgradepkg.8 create mode 100755 testing/source/pkgtools/pkgtools.SlackBuild create mode 100644 testing/source/pkgtools/scripts/explodepkg create mode 100644 testing/source/pkgtools/scripts/installpkg create mode 100644 testing/source/pkgtools/scripts/makebootdisk create mode 100644 testing/source/pkgtools/scripts/makepkg create mode 100644 testing/source/pkgtools/scripts/pkgdiff create mode 100644 testing/source/pkgtools/scripts/pkgtool create mode 100644 testing/source/pkgtools/scripts/removepkg create mode 100644 testing/source/pkgtools/scripts/setup.70.install-kernel create mode 100644 testing/source/pkgtools/scripts/setup.80.make-bootdisk create mode 100644 testing/source/pkgtools/scripts/setup.htmlview create mode 100644 testing/source/pkgtools/scripts/setup.services create mode 100644 testing/source/pkgtools/scripts/upgradepkg create mode 100644 testing/source/pkgtools/slack-desc (limited to 'testing') diff --git a/testing/source/pkgtools/doinst.sh b/testing/source/pkgtools/doinst.sh new file mode 100644 index 000000000..d14a67873 --- /dev/null +++ b/testing/source/pkgtools/doinst.sh @@ -0,0 +1,69 @@ +#!/bin/bash +# Migrate the package database and related directories from the long-time +# (stupid) directory /var/log to /var/lib/pkgtools. +# +# The removed_* directories will remain under /var/log (but moved to +# /var/log/pkgtools) as they contain log files of previous operations, +# not anything that's actively used for package management. Also, the +# removed_* directories can become quite large compared with the database. +# +# First, if it's just a case of missing symlinks, make them. Don't make them +# if the directories exist in /var/log - we'll do a proper migration in that +# case. +for directory in packages scripts setup ; do + if [ ! -L var/log/$directory -a ! -d var/log/$directory ]; then + if [ -d var/lib/pkgtools/$directory ]; then + # Make the symlink: + ( cd var/log ; ln -sf ../lib/pkgtools/$directory . ) + fi + fi +done +for directory in removed_packages removed_scripts ; do + if [ ! -L var/log/$directory -a ! -d var/log/$directory ]; then + mkdir -p var/log/pkgtools/$directory + ( cd var/log ; ln -sf pkgtools/$directory . ) + fi + if [ ! -L var/lib/pkgtools/$directory -a ! -d var/lib/pkgtools/$directory ]; then + mkdir -p var/lib/pkgtools + ( cd var/lib/pkgtools ; ln -sf ../../log/pkgtools/$directory . ) + fi +done +# If at this point /var/log/packages is not a symlink, we need to do the +# migration. We should already have a lock on being the only install script +# that's currently running, but also get a lock on ldconfig to freeze any +# other package operations that are happening now until after the migration +# is complete. +if [ ! -L var/log/packages ]; then + if [ ! -d run/lock/pkgtools ]; then + mkdir -p run/lock/pkgtools + fi + ( flock 9 || exit 11 + # Don't migrate if tar is running, as there may still be package operations + # going on in another process: + while pidof tar 1> /dev/null 2> /dev/null ; do + sleep 15 + done + # Just to be a bit safer from race conditions: + sleep 5 + # First, move the removed_* directories into a pkgtools subdirectory: + mkdir -p var/log/pkgtools + for directory in removed_packages removed_scripts ; do + if [ ! -d var/log/pkgtools/$directory ]; then + mkdir -p var/log/pkgtools/$directory + # Move anything found in the old location, then remove it: + mv var/log/$directory/* var/log/pkgtools/$directory 2> /dev/null + rm -rf var/log/$directory + # Make a symlink: + ( cd var/log ; ln -sf pkgtools/$directory . ) + fi + done + for directory in packages scripts setup ; do + mkdir -p var/lib/pkgtools/$directory + mv var/log/$directory/* var/lib/pkgtools/$directory 2> /dev/null + rm -rf var/log/$directory + ( cd var/log + ln -sf ../lib/pkgtools/$directory . + ) + done + ) 9> run/lock/pkgtools/ldconfig.lock +fi diff --git a/testing/source/pkgtools/manpages/explodepkg.8 b/testing/source/pkgtools/manpages/explodepkg.8 new file mode 100644 index 000000000..ddc3d47c1 --- /dev/null +++ b/testing/source/pkgtools/manpages/explodepkg.8 @@ -0,0 +1,41 @@ +.\" -*- nroff -*- +.ds g \" empty +.ds G \" empty +.\" Like TP, but if specified indent is more than half +.\" the current line-length - indent, use the default indent. +.de Tp +.ie \\n(.$=0:((0\\$1)*2u>(\\n(.lu-\\n(.iu)) .TP +.el .TP "\\$1" +.. +.TH EXPLODEPKG 8 "21 May 1994" "Slackware Version 2.0.0" +.SH NAME +explodepkg \- Extract the contents of a tar+compression package (such as a Slackware +software package) in the current directory. +.SH SYNOPSIS +.B explodepkg +.BI package +.BI [ +.BI package2, +.BI package3, +.BI ... +.BI ] +.SH DESCRIPTION +.B explodepkg +uncompresses and untars Slackware *.tgz (or .tbz, .tlz, .txz) packages (or any archive +that was created by +compressing a tarfile with one of the supported compression utilities) in the current directory. It is not usually +used to install packages, since it doesn't execute the installation scripts +in ./install or ./var/lib/pkgtools/setup. The primary use for +.B explodepkg +is in package maintenance - exploding a package in a subdirectory, making fixes +to it or upgrading the software, and then building the updated package with +.B makepkg. +.SH AUTHOR +Patrick J. Volkerding +.SH "SEE ALSO" +.BR tar(1), +.BR gzip(1), +.BR installpkg(8), +.BR makepkg(8), +.BR pkgtool(8), +.BR upgradepkg(8) diff --git a/testing/source/pkgtools/manpages/installpkg.8 b/testing/source/pkgtools/manpages/installpkg.8 new file mode 100644 index 000000000..204cc841e --- /dev/null +++ b/testing/source/pkgtools/manpages/installpkg.8 @@ -0,0 +1,126 @@ +.\" -*- nroff -*- +.ds g \" empty +.ds G \" empty +.\" Like TP, but if specified indent is more than half +.\" the current line-length - indent, use the default indent. +.de Tp +.ie \\n(.$=0:((0\\$1)*2u>(\\n(.lu-\\n(.iu)) .TP +.el .TP "\\$1" +.. +.TH INSTALLPKG 8 "22 Nov 2001" "Slackware Version 8.1.0" +.SH NAME +installpkg \- install Slackware packages. +.SH SYNOPSIS +.B installpkg +[ +.B \--warn +] +[ +.B \--md5sum +] +[ +.B \--root /otherroot +] +[ +.B \--infobox +] +[ +.B \--menu +] +[ +.B \--terse +] +[ +.B \--terselength +] +[ +.B \--ask +] +[ +.B \--priority ADD|REC|OPT|SKP +] +[ +.B \--tagfile /somedir/tagfile +] +[ +.B \--threads +] +.BI packagename +[ +.B packagename2 ... +] +.SH DESCRIPTION +.B installpkg +installs single or multiple *.txz (or .tbz, .tgz, .tlz) binary packages designed +for use with the Slackware Linux distribution onto your system. +.SH OPTIONS +.TP +.B \--warn packagename +Generate a list of files that would be overwritten to the standard output, but do +not actually install the package. The list is formatted in a suitable fashion to +use as a list of files to backup. +.TP +.B \--md5sum packagename +Record the package md5sum in the metadata written in /var/lib/pkgtools/packages. +.TP +.B \--root /otherroot +Install using a location other than / (the default) as the root of the +filesystem to install on. In the example given, use /otherroot instead. Setting +the ROOT environment variable does the same thing. +.TP +.B \--infobox +Use /bin/dialog to display an informational dialog as the package is installed. +Primarily used when installpkg is called from other scripts. +.TP +.B \--menu +Use /bin/dialog to display a menu asking the user if they would like to install the +package(s) or not. Generally used when installpkg is called from other scripts. +.TP +.B \--terse +Install the package displaying only a single description line to stdout. +.TP +.B \--terselength +Maximum line length of --terse mode output. Default is the number of terminal columns. +.TP +.B \--ask +Used with -menu mode. When selected, always ask if a package should be +installed regardless of what the package's priority is. +.TP +.B \--priority ADD|REC|OPT|SKP +When installing with the \-menu option, package priority levels (found in the file +"tagfile" in the package directory) are used to automatically install (ADD) or +skip (SKP) a package, or to suggest recommended (REC) or optional (OPT) to the user +if a menu is displayed. If a priority is set on the command line, it will override +the values set in the tagfile for the entire package list. +.TP +.B \--tagfile /somedir/tagfile +Specify a different file to use for package priorities (in this example, /somedir/tagfile +will be used). The default is "tagfile" in the package's directory. +.TP +.B \--threads +For xz/plzip compressed packages, set the maximum number of threads to be used for +decompression. Only has an effect if a multithreaded compressor was used, and then +only on large packages. The default for plzip is the number of CPU threads available. +The default for xz is 2. +.SH EXAMPLES +.TP +.B Install a font package for X: +.P +installpkg font-bh-ttf-1.0.3-noarch-1.txz +.P +Note that if a package is already installed, upgradepkg(8) should be used instead. +.TP +.B Create a backup of the files that would be overwritten if the package is installed: +.P +.nf +tar czvf /tmp/backup.tar.gz \\ + $(installpkg --warn font-bh-ttf-1.0.3-noarch-1.txz) +.fi +.SH AUTHOR +Patrick J. Volkerding +.SH "SEE ALSO" +.BR makepkg(8), +.BR removepkg(8), +.BR explodepkg(8), +.BR pkgtool(8), +.BR upgradepkg(8) diff --git a/testing/source/pkgtools/manpages/makepkg.8 b/testing/source/pkgtools/manpages/makepkg.8 new file mode 100644 index 000000000..16a98f3fb --- /dev/null +++ b/testing/source/pkgtools/manpages/makepkg.8 @@ -0,0 +1,164 @@ +.\" -*- nroff -*- +.ds g \" empty +.ds G \" empty +.\" Like TP, but if specified indent is more than half +.\" the current line-length - indent, use the default indent. +.de Tp +.ie \\n(.$=0:((0\\$1)*2u>(\\n(.lu-\\n(.iu)) .TP +.el .TP "\\$1" +.. +.TH MAKEPKG 8 "21 May 1994" "Slackware Version 2.0.0" +.SH NAME +makepkg \- make Slackware packages. +.SH SYNOPSIS +.B makepkg +[ +.B -l, --linkadd y|n +] +[ +.B -c, --chown y|n +] +[ +.B --threads +] +[ +.B --compress