From 8c9271e25c83e23cce857e3d79b47280b88a5ec4 Mon Sep 17 00:00:00 2001 From: Patrick J Volkerding Date: Thu, 31 May 2018 04:55:33 +0000 Subject: Thu May 31 04:55:33 UTC 2018 a/kernel-generic-4.14.47-x86_64-1.txz: Upgraded. a/kernel-huge-4.14.47-x86_64-1.txz: Upgraded. SCSI_DPT_I2O m -> y SCSI_ISCI m -> y (thanks to wael_h) a/kernel-modules-4.14.47-x86_64-1.txz: Upgraded. a/pkgtools-15.0-noarch-14.txz: Rebuilt. installpkg: rarely, an uncompressed size that's not quite to the next level (e.g., 1020K) will exceed the expected length and cause a --terse line to be one character longer than --terselength. Chop lines to --terselength before outputting them. The trailing ']' might be dropped, but no big deal. ap/slackpkg-2.83.0-noarch-1.txz: Upgraded. Release 2.83.0; thanks to orbea, Didier Spaier, burdi01, David Allen, Eduard Rozenberg, and Stuart Winter for various fixes and enhancements. Allow using vimdiff to compare .new and original files Numerous fixups for alternate $ROOT .new config files are sorted so that display order should be consistent among multiple machines Abort operation if system date is near epoch (mostly relevant for ARM machines and others with no RTC) Update Slackware ARM gpg key Update Slackware ARM mirror list No longer offer to run lilo - simply advise user that the kernel image has changed and give advice, but also require a keypress to (hopefully) confirm that the message was actually read mandoc lint fixes to slackpkg.8 Warn user if a -current mirror is selected (but only warn once) d/git-2.17.1-x86_64-1.txz: Upgraded. d/kernel-headers-4.14.47-x86-1.txz: Upgraded. d/rust-1.26.1-x86_64-1.txz: Upgraded. k/kernel-source-4.14.47-noarch-1.txz: Upgraded. l/fftw-3.3.8-x86_64-1.txz: Upgraded. l/imagemagick-6.9.9_48-x86_64-1.txz: Upgraded. n/network-scripts-15.0-noarch-8.txz: Rebuilt. Allow setting an interface in promiscuous mode; this is needed for networking to function properly in containers Fixup setting of IPALIASES (allow non /32 masks; not only is the /32 mask not required and even undesirable in some cases, this makes ipv6 support easier to integrate (and Darren is working on that as well) Thanks to Darren Austin. n/stunnel-5.46-x86_64-1.txz: Upgraded. n/ulogd-2.0.7-x86_64-2.txz: Rebuilt. Fixed empty logrotate file. x/xorg-server-1.20.0-x86_64-2.txz: Rebuilt. Patched to fix nouveau segfault. Thanks to Rod3775 for the patch. x/xorg-server-xephyr-1.20.0-x86_64-2.txz: Rebuilt. x/xorg-server-xnest-1.20.0-x86_64-2.txz: Rebuilt. x/xorg-server-xvfb-1.20.0-x86_64-2.txz: Rebuilt. xap/network-manager-applet-1.8.12-x86_64-2.txz: Rebuilt. Patched crash bug. Thanks to gmgf. isolinux/initrd.img: Rebuilt. kernels/*: Upgraded. usb-and-pxe-installers/usbboot.img: Rebuilt. --- source/ap/slackpkg/files/core-functions.sh | 100 ++++++++++++++++++----------- 1 file changed, 63 insertions(+), 37 deletions(-) (limited to 'source/ap/slackpkg/files/core-functions.sh') diff --git a/source/ap/slackpkg/files/core-functions.sh b/source/ap/slackpkg/files/core-functions.sh index 919bf80b6..667667cf1 100644 --- a/source/ap/slackpkg/files/core-functions.sh +++ b/source/ap/slackpkg/files/core-functions.sh @@ -58,6 +58,9 @@ spinning() { # function system_setup() { + # Create $WORKDIR just in case + mkdir -p "${ROOT}/${WORKDIR}" + # Set LOCAL if mirror isn't through network # If mirror is through network, select the command to fetch # files and packages from there. @@ -123,7 +126,7 @@ function system_setup() { ;; arm*) ARCH=arm[v5tel]* - SLACKKEY=${SLACKKEY:-"ARMedslack Security (ARMedslack Linux Project Security) "} + SLACKKEY=${SLACKKEY:-"Slackware ARM (Slackware ARM Linux Project) "} PKGMAIN=${PKGMAIN:-slackware} ;; powerpc|ppc) @@ -151,7 +154,7 @@ function system_setup() { fi SLACKCFVERSION=$(grep "# v[0-9.]\+" $CONF/slackpkg.conf | cut -f2 -dv) - CHECKSUMSFILE=$WORKDIR/CHECKSUMS.md5 + CHECKSUMSFILE=${ROOT}/${WORKDIR}/CHECKSUMS.md5 KERNELMD5=$(md5sum /boot/vmlinuz 2>/dev/null) DIALOG_MAXARGS=${DIALOG_MAXARGS:-19500} echo "$0 $VERSION - Slackware Linux $SLACKWARE_VERSION" > $TMPDIR/timestamp @@ -186,7 +189,7 @@ ARCH values\n" # Check if the config files are updated to the new slackpkg version # - if [ "$WORKDIR" = "" ]; then + if [ "${ROOT}/${WORKDIR}" = "" ]; then echo -e "\ \nYou need to upgrade your slackpkg.conf.\n\ This is a new slackpkg version and many changes happened in config files.\n\ @@ -223,7 +226,7 @@ the problem.\n" # Checking if is the first time running slackpkg # - if ! [ -f ${WORKDIR}/pkglist ] && [ "$CMD" != "update" ]; then + if ! [ -f ${ROOT}/${WORKDIR}/pkglist ] && [ "$CMD" != "update" ]; then if [ "$SOURCE" = "" ]; then echo -e "\ \nThis appears to be the first time you have run slackpkg.\n\ @@ -250,16 +253,39 @@ Before you install|upgrade|reinstall anything you need to run:\n\n\ Please edit that file and uncomment ONE mirror. Slackpkg\n\ only works with ONE mirror selected.\n" cleanup - else - COUNT=$(echo $SOURCE | wc -w | tr -d " ") - if [ "$COUNT" != "1" ]; then - echo -e "\n\ -Slackpkg only works with ONE mirror selected. Please edit your\n\ -${CONF}/mirrors and comment all but one line - two or more\n\ -mirrors uncommented is not valid syntax.\n" + fi + if echo $SOURCE|grep -q " "; then + echo " +Slackpkg only works with ONE mirror selected. Please edit your +${CONF}/mirrors and comment all but one line - two or more +mirrors uncommented is not valid syntax. +" + cleanup + fi + MIRROR_VERSION=$(echo $SOURCE|sed "s/.*-//;s/.$//") + if [ "$MIRROR_VERSION" = "current" ] && [ ! -f ${ROOT}/${WORKDIR}/current ]; then + echo -n " +You have selected a mirror for Slackware -current in ${CONF}/mirrors, +but Slackware version $SLACKWARE_VERSION appears to be installed. + +Slackware -current is the development (i.e. unstable) tree. + +Is this really what you want? + +To confirm your choice, press Y, else press N. Then, press Enter: " + read current + if [ "$current" = "Y" ] || [ "$current" = "y" ]; then + touch ${ROOT}/${WORKDIR}/current + echo -n " +Slackpkg will not show this warning again unless you remove the +${WORKDIR}/current file. +" + sleep 1 + else cleanup fi fi + [ ! "$MIRROR_VERSION" = "current" ] && rm -f ${ROOT}/${WORKDIR}/current # It will check if the mirror selected are ftp.slackware.com # if set to "ftp.slackware.com" tell the user to choose another @@ -309,7 +335,7 @@ use slackpkg.\n" # if ! [ $(which md5sum 2>/dev/null) ]; then CHECKMD5=off - elif ! [ -f ${WORKDIR}/CHECKSUMS.md5 ] && \ + elif ! [ -f ${ROOT}/${WORKDIR}/CHECKSUMS.md5 ] && \ [ "$CMD" != "update" ] && \ [ "$CHECKMD5" = "on" ]; then echo -e "\n\ @@ -564,7 +590,7 @@ function makelist() { else ls -1 $ROOT/var/log/packages/* | awk -f /usr/libexec/slackpkg/pkglist.awk | applyblacklist > ${TMPDIR}/tmplist fi - cat ${WORKDIR}/pkglist | applyblacklist > ${TMPDIR}/pkglist + cat ${ROOT}/${WORKDIR}/pkglist | applyblacklist > ${TMPDIR}/pkglist touch ${TMPDIR}/waiting @@ -666,7 +692,7 @@ function makelist() { done ;; install-new) - for i in $(awk -f /usr/libexec/slackpkg/install-new.awk ${WORKDIR}/ChangeLog.txt |\ + for i in $(awk -f /usr/libexec/slackpkg/install-new.awk ${ROOT}/${WORKDIR}/ChangeLog.txt |\ sort -u ) dialog aaa_terminfo fontconfig \ ntfs-3g ghostscript wqy-zenhei-font-ttf \ xbacklight xf86-video-geode ; do @@ -703,8 +729,8 @@ function makelist() { if [ "$CMD" = "file-search" ]; then # Search filelist.gz for possible matches for i in ${PRIORITY[@]}; do - if [ -e ${WORKDIR}/${i}-filelist.gz ]; then - PKGS="$(zegrep -w "${INPUTLIST}" ${WORKDIR}/${i}-filelist.gz | \ + if [ -e ${ROOT}/${WORKDIR}/${i}-filelist.gz ]; then + PKGS="$(zegrep -w "${INPUTLIST}" ${ROOT}/${WORKDIR}/${i}-filelist.gz | \ cut -d\ -f 1 | awk -F'/' '{print $NF}')" for FULLNAME in $PKGS ; do NAME=$(cutpkg ${FULLNAME}) @@ -846,7 +872,7 @@ function getpkg() { PKGNAME=( $(grep -m 1 -- "[[:space:]]${1/%.t[blxg]z/}[[:space:]]" ${TMPDIR}/pkglist) ) NAMEPKG=${PKGNAME[5]}.${PKGNAME[7]} FULLPATH=${PKGNAME[6]} - CACHEPATH=${TEMP}/${FULLPATH} + CACHEPATH=${ROOT}/${TEMP}/${FULLPATH} # Create destination dir if it isn't there if ! [ -d $CACHEPATH ]; then @@ -944,8 +970,8 @@ function getpkg() { # function checkchangelog() { - if ! [ -e ${WORKDIR}/ChangeLog.txt ]; then - touch ${WORKDIR}/ChangeLog.txt + if ! [ -e ${ROOT}/${WORKDIR}/ChangeLog.txt ]; then + touch ${ROOT}/${WORKDIR}/ChangeLog.txt fi echo -e "\tDownloading..." @@ -961,7 +987,7 @@ Please check your mirror and try again." cleanup fi - if diff --brief ${WORKDIR}/ChangeLog.txt $TMPDIR/ChangeLog.txt ; then + if diff --brief ${ROOT}/${WORKDIR}/ChangeLog.txt $TMPDIR/ChangeLog.txt ; then return 0 else return 1 @@ -980,7 +1006,7 @@ function updatefilelists() fi fi echo - cp ${TMPDIR}/ChangeLog.txt ${WORKDIR}/ChangeLog.txt + cp ${TMPDIR}/ChangeLog.txt ${ROOT}/${WORKDIR}/ChangeLog.txt # # Download MANIFEST, FILELIST.TXT and CHECKSUMS.md5 @@ -1036,10 +1062,10 @@ function updatefilelists() ISOK=$(checkmd5 ${TMPDIR}/FILELIST.TXT) fi if [ "$ISOK" = "1" ]; then - if ! [ -e $WORKDIR/LASTUPDATE ]; then - echo "742868196" > $WORKDIR/LASTUPDATE + if ! [ -e ${ROOT}/${WORKDIR}/LASTUPDATE ]; then + echo "742868196" > ${ROOT}/${WORKDIR}/LASTUPDATE fi - LASTUPDATE=$(cat $WORKDIR/LASTUPDATE) + LASTUPDATE=$(cat ${ROOT}/${WORKDIR}/LASTUPDATE) ACTUALDATE=$(date -d "$(head -1 $TMPDIR/FILELIST.TXT)" "+%s") if [ $ACTUALDATE -lt $LASTUPDATE ]; then echo -e "\ @@ -1051,7 +1077,7 @@ function updatefilelists() fi echo fi - echo $ACTUALDATE > $WORKDIR/LASTUPDATE + echo $ACTUALDATE > ${ROOT}/${WORKDIR}/LASTUPDATE else rm $TMPDIR/FILELIST.TXT fi @@ -1090,12 +1116,12 @@ function updatefilelists() grep "\.t[blxg]z$" $FILELIST| \ awk -f /usr/libexec/slackpkg/pkglist.awk |\ sed -e 's/^M//g' > ${TMPDIR}/pkglist - cp ${TMPDIR}/pkglist ${WORKDIR}/pkglist + cp ${TMPDIR}/pkglist ${ROOT}/${WORKDIR}/pkglist # Create the slackware tree under TEMP directory - for i in $( cut -f7 -d\ ${WORKDIR}/pkglist | sort -u ) ; do - if ! [ -d ${TEMP}/${i} ]; then - mkdir -p ${TEMP}/${i} + for i in $( cut -f7 -d\ ${ROOT}/${WORKDIR}/pkglist | sort -u ) ; do + if ! [ -d ${ROOT}/${TEMP}/${i} ]; then + mkdir -p ${ROOT}/${TEMP}/${i} fi done @@ -1109,11 +1135,11 @@ function updatefilelists() bunzip2 -c $TMPDIR/${i}-MANIFEST.bz2 | awk -f /usr/libexec/slackpkg/filelist.awk | \ gzip > ${TMPDIR}/${i}-filelist.gz done - cp ${TMPDIR}/*-filelist.gz ${WORKDIR}/ + cp ${TMPDIR}/*-filelist.gz ${ROOT}/${WORKDIR}/ - if [ -r ${WORKDIR}/filelist.gz ]; then - rm ${WORKDIR}/filelist.gz - ln -s ${WORKDIR}/${MAIN}-filelist.gz ${WORKDIR}/filelist.gz + if [ -r ${ROOT}/${WORKDIR}/filelist.gz ]; then + rm ${ROOT}/${WORKDIR}/filelist.gz + ln -s ${ROOT}/${WORKDIR}/${MAIN}-filelist.gz ${ROOT}/${WORKDIR}/filelist.gz fi # Concatenate PACKAGE.TXT files @@ -1122,15 +1148,15 @@ function updatefilelists() for i in $DIRS; do cat $TMPDIR/${i}-PACKAGES.TXT >> $TMPDIR/PACKAGES.TXT done - cp $TMPDIR/PACKAGES.TXT ${WORKDIR}/PACKAGES.TXT + cp $TMPDIR/PACKAGES.TXT ${ROOT}/${WORKDIR}/PACKAGES.TXT if [ -e $TMPDIR/CHECKSUMS.md5 ]; then - cp $TMPDIR/CHECKSUMS.md5 $WORKDIR/CHECKSUMS.md5 2>/dev/null + cp $TMPDIR/CHECKSUMS.md5 ${ROOT}/${WORKDIR}/CHECKSUMS.md5 2>/dev/null fi if [ -e $TMPDIR/CHECKSUMS.md5.asc ]; then cp $TMPDIR/CHECKSUMS.md5.asc \ - $WORKDIR/CHECKSUMS.md5.asc 2>/dev/null + ${ROOT}/${WORKDIR}/CHECKSUMS.md5.asc 2>/dev/null fi } @@ -1312,7 +1338,7 @@ generate_template() { [ "$SPINNING" = "off" ] || spinning ${TMPDIR}/waiting & for i in $ROOT/var/log/packages/* ; do PKGNAME=$( cutpkg $(basename $i)) - grep -q " $PKGNAME " ${WORKDIR}/pkglist && \ + grep -q " $PKGNAME " ${ROOT}/${WORKDIR}/pkglist && \ echo $PKGNAME >> $TMPDIR/$TEMPLATE.work done rm $TMPDIR/waiting -- cgit v1.2.3-80-g2a13