summaryrefslogtreecommitdiffstats
path: root/testing/source/pkgtools/pkgtools.SlackBuild
diff options
context:
space:
mode:
author Patrick J Volkerding <volkerdi@slackware.com>2018-06-19 22:35:25 +0000
committer Eric Hameleers <alien@slackware.com>2018-06-20 09:00:31 +0200
commit7e5ee73de954e6c084195b0a1fa6ef01a78d092f (patch)
tree7219c86cd7bc94b145e6e31779a1654ba5998e4c /testing/source/pkgtools/pkgtools.SlackBuild
parenta27618d0d02506153de111da1055a5af43245d13 (diff)
downloadcurrent-7e5ee73de954e6c084195b0a1fa6ef01a78d092f.tar.gz
current-7e5ee73de954e6c084195b0a1fa6ef01a78d092f.tar.xz
Tue Jun 19 22:35:25 UTC 201820180619223525
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.
Diffstat (limited to 'testing/source/pkgtools/pkgtools.SlackBuild')
-rwxr-xr-xtesting/source/pkgtools/pkgtools.SlackBuild109
1 files changed, 109 insertions, 0 deletions
diff --git a/testing/source/pkgtools/pkgtools.SlackBuild b/testing/source/pkgtools/pkgtools.SlackBuild
new file mode 100755
index 000000000..bdcb11ac0
--- /dev/null
+++ b/testing/source/pkgtools/pkgtools.SlackBuild
@@ -0,0 +1,109 @@
+#!/bin/bash
+# Copyright 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2018 Patrick J. Volkerding, Sebeka, MN, USA
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+# Set initial variables:
+cd $(dirname $0) ; CWD=$(pwd)
+if [ "$TMP" = "" ]; then
+ TMP=/tmp
+fi
+PKG=$TMP/package-pkgtools
+
+PKGNAM=pkgtools
+# *** UPDATE THESE WITH EACH BUILD:
+VERSION=15.0
+ARCH=${ARCH:-noarch}
+BUILD=${BUILD:-20}
+
+# 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
+# could be useful to other scripts.
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PKGNAM-$VERSION-$ARCH-$BUILD.txz"
+ exit 0
+fi
+
+if [ ! -d $TMP ]; then
+ mkdir -p $TMP # location to build the source
+fi
+rm -rf $PKG
+mkdir -p $PKG
+
+# Install Slackware script manpages:
+( cd $CWD/manpages
+ mkdir -p $PKG/usr/man/man8
+ for page in explodepkg.8 installpkg.8 makepkg.8 upgradepkg.8 pkgdiff.8 \
+ pkgtool.8 removepkg.8 ; do
+ cat $page | gzip -9c > $PKG/usr/man/man8/$page.gz
+ done
+)
+
+# Install internationalized manpages from
+# http://slint.fr/forSlackware/man_l10n/pkgtools/
+( cd $PKG/usr/man
+ tar xf $CWD/manpages-l10n.tar.xz
+ for page in manpages-l10n/* ; do
+ manpage=$(basename $page)
+ mkdir -p ${manpage%%.*}/man8
+ mv $page ${manpage%%.*}/man8/${page#*.}.8
+ done
+ gzip -9 */man8/*.8
+ rmdir manpages-l10n
+)
+
+# Install Slackware scripts:
+( cd $CWD/scripts
+ # Install the core Slackware package tools:
+ mkdir -p $PKG/sbin
+ # Don't include makebootdisk... it's useless since a kernel won't fit on a
+ # floppy disk, and nobody uses floppies any more anyway.
+ for file in explodepkg installpkg makepkg pkgdiff pkgtool removepkg upgradepkg ; do
+ cp -a $CWD/scripts/$file $PKG/sbin
+ done
+ chown root:root $PKG/sbin/*
+ chmod 755 $PKG/sbin/*
+ # These scripts are used during the installation:
+ mkdir -p $PKG/var/lib/pkgtools/setup/tmp
+ chmod 700 $PKG/var/lib/pkgtools/setup/tmp
+ for file in setup.* ; do
+ cp -a $file $PKG/var/lib/pkgtools/setup
+ done
+ chown root:root $PKG/var/lib/pkgtools/setup/setup.*
+ chmod 755 $PKG/var/lib/pkgtools/setup/setup.*
+ # Add a link for makebootstick:
+ ( cd $PKG/sbin ; ln -sf ../var/lib/pkgtools/setup/setup.80.make-bootdisk makebootstick )
+)
+
+# Create the base directories (not really necessary, but doesn't hurt):
+mkdir -p $PKG/var/lib/pkgtools/{packages,scripts}
+mkdir -p $PKG/var/log/pkgtools/{removed_packages,removed_scripts}
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+zcat $CWD/doinst.sh.gz > $PKG/install/doinst.sh
+
+# Build the package:
+cd $PKG
+makepkg -l y -c n $TMP/pkgtools-$VERSION-$ARCH-$BUILD.txz
+
+echo
+echo "HEY -- did you remember to update the version numbers in the setup scripts?"
+echo
+