From 96f3de8f57aeb565cae7adf362a91cf770fc3fe5 Mon Sep 17 00:00:00 2001 From: Mattero Rossini Date: Wed, 16 Apr 2014 08:22:11 +0200 Subject: [PATCH 01/21] Fixed an issue on missing VERBOSE line in config file. --- src/slackpkgplus.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/slackpkgplus.sh b/src/slackpkgplus.sh index 40989d1..87bb212 100755 --- a/src/slackpkgplus.sh +++ b/src/slackpkgplus.sh @@ -33,6 +33,10 @@ fi if [ "$SLACKPKGPLUS" = "on" ];then + if [ -z "$VERBOSE" ];then + VERBOSE=1 + fi + SPKGPLUS_VERSION="1.3.1" From 6343da195eda7eecda71df361024973f0259267d Mon Sep 17 00:00:00 2001 From: Matteo Rossini Date: Thu, 17 Apr 2014 11:56:15 +0200 Subject: [PATCH 02/21] Skipping invalid repository on update process. --- src/slackpkgplus.sh | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/slackpkgplus.sh b/src/slackpkgplus.sh index 87bb212..3245fb9 100755 --- a/src/slackpkgplus.sh +++ b/src/slackpkgplus.sh @@ -208,7 +208,7 @@ if [ "$SLACKPKGPLUS" = "on" ];then echo " Remember to import keys by launching 'slackpkg update gpg'." echo sleep 5 - echo > ${TMPDIR}/CHECKSUMS.md5 + echo > ${TMPDIR}/CHECKSUMS.md5-$PREPO fi else echo @@ -242,14 +242,16 @@ if [ "$SLACKPKGPLUS" = "on" ];then echo echo " !!! F A T A L !!!" echo " Repository '$PREPO' FAILS the CHECKSUMS.md5 download" - echo " The repository may be invald." + echo " The repository may be invalid and will be SKIPPED." echo sleep 5 - echo -e "$PREPO: Invalid repository (fails to download CHECKSUMS.md5)" >> $TMPDIR/error.log + echo -e "$PREPO: SKIPPING Invalid repository (fails to download CHECKSUMS.md5)" >> $TMPDIR/error.log + PRIORITY=( $(echo ${PRIORITY[*]}" "|sed "s/SLACKPKGPLUS_$PREPO //") ) + REPOPLUS=( $(echo " "${REPOPLUS[*]}" "|sed "s/ $PREPO //") ) + else + echo "SLACKPKGPLUS_$PREPO[MD5]" $(md5sum ${TMPDIR}/CHECKSUMS.md5-$PREPO|awk '{print $1}') >>$2 fi - echo "SLACKPKGPLUS_$PREPO[MD5]" $(md5sum ${TMPDIR}/CHECKSUMS.md5-$PREPO|awk '{print $1}') >>$2 - done fi if [ $(basename $1) = "GPG-KEY" ];then From b60e8adf1f9132c16f39cb96352cd179c649c5e4 Mon Sep 17 00:00:00 2001 From: Matteo Rossini Date: Mon, 21 Apr 2014 15:25:25 +0200 Subject: [PATCH 03/21] Isn't really needed a full rebuild of install.log file at every update process! Launch /usr/libexec/slackpkg/makeinstlog.sh manually to create it. --- src/slackpkgplus.sh | 19 ++----------------- 1 file changed, 2 insertions(+), 17 deletions(-) diff --git a/src/slackpkgplus.sh b/src/slackpkgplus.sh index 3245fb9..3740122 100755 --- a/src/slackpkgplus.sh +++ b/src/slackpkgplus.sh @@ -47,27 +47,12 @@ if [ "$SLACKPKGPLUS" = "on" ];then mkdir -p "$WORKDIR" fi - if [ "$CMD" == "update" ];then - touch $TMPDIR/info.log - if [ $VERBOSE -gt 1 ];then - /usr/libexec/slackpkg/makeinstlog.sh -t >> $TMPDIR/info.log & - else - /usr/libexec/slackpkg/makeinstlog.sh >/dev/null & - fi - PIDINSTLOG=$! + if [ ! -e $WORKDIR/install.log ];then + touch $WORKDIR/install.log fi - function cleanup(){ [ "$SPINNING" = "off" ] || tput cnorm - if [ "$CMD" == "update" ];then - if [ $VERBOSE -gt 2 ];then - echo "Updating $WORKDIR/install.log..." - else - echo "Updating install.log" - fi - echo - fi if [ "$DELALL" = "on" ] && [ "$NAMEPKG" != "" ]; then rm $CACHEPATH/$NAMEPKG &>/dev/null fi From 682c49aea7ffae6779e3739be570673d3120bee3 Mon Sep 17 00:00:00 2001 From: Matteo Rossini Date: Sun, 13 Jul 2014 17:05:44 +0200 Subject: [PATCH 04/21] Version 1.3.2 - 13/Jul/2014 - Patched to reflect changes on slackpkg 2.82.0-13 --- ChangeLog.txt | 3 +++ src/ChangeLog.txt | 3 +++ src/makeinstlog.sh | 10 ++++++---- src/repositories.txt | 3 ++- src/setupmultilib.sh | 32 ++++++++++++++++-------------- src/slackpkgplus.sh | 46 +++++++++++++++++++++++--------------------- src/zdialogplus.sh | 4 ++-- 7 files changed, 58 insertions(+), 43 deletions(-) diff --git a/ChangeLog.txt b/ChangeLog.txt index de0a40d..9598bad 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -1,3 +1,6 @@ +Version 1.3.2 - 13/Jul/2014 + - Patched to reflect changes on slackpkg 2.82.0-13 + Version 1.3.1 - 7/Mar/2014 - Improved check-updates function (thanks to phenixia2003) - Improved debug-mode diff --git a/src/ChangeLog.txt b/src/ChangeLog.txt index de0a40d..9598bad 100644 --- a/src/ChangeLog.txt +++ b/src/ChangeLog.txt @@ -1,3 +1,6 @@ +Version 1.3.2 - 13/Jul/2014 + - Patched to reflect changes on slackpkg 2.82.0-13 + Version 1.3.1 - 7/Mar/2014 - Improved check-updates function (thanks to phenixia2003) - Improved debug-mode diff --git a/src/makeinstlog.sh b/src/makeinstlog.sh index 2e2bd43..226740c 100755 --- a/src/makeinstlog.sh +++ b/src/makeinstlog.sh @@ -1,6 +1,8 @@ #!/bin/bash -WORKDIR=/var/lib/slackpkg -. /etc/slackpkg/slackpkg.conf + +CONF=${CONF:-/etc/slackpkg} # needed if you're running slackpkg 2.28.0-12 + +. $CONF/slackpkg.conf if [ -e $WORKDIR/pkglist ];then cp $WORKDIR/pkglist $WORKDIR/pkglist.tmp @@ -8,12 +10,12 @@ fi ( ( - cd /var/log/removed_packages + cd $ROOT/var/log/removed_packages ( ls -l --full-time|tail +2|cut -c11-|sed -r -e 's/\.[0-9]{9}//' -e 's,-,/,' -e 's,-,/,'|awk '{print $8,$5,$6}' grep -m1 'PACKAGE LOCATION:' * 2>/dev/null|sed -r 's/:PACKAGE LOCATION:.*(\.t.z)/ \1/' )|sort|awk '{if(x=!x){printf("%s ", $2)}else{print $2,$3,$1}}' \ |sed -e 's/$/ removed/' -e 's/-upgraded-.*/ upgraded/'|awk '{print $2,$3,$4,$1,$5}' - cd /var/log/packages + cd $ROOT/var/log/packages ( ls -l --full-time|tail +2|cut -c11-|sed -r -e 's/\.[0-9]{9}//' -e 's,-,/,' -e 's,-,/,'|awk '{print $8,$5,$6}' grep -m1 'PACKAGE LOCATION:' * 2>/dev/null|sed -r 's/:PACKAGE LOCATION:.*(\.t.z)/ \1/' )|sort|awk '{if(x=!x){printf("%s ", $2)}else{print $2,$3,$1}}' \ diff --git a/src/repositories.txt b/src/repositories.txt index f7f7326..cf62a19 100644 --- a/src/repositories.txt +++ b/src/repositories.txt @@ -9,10 +9,11 @@ Supported Repositories: > slacky: http://repository.slacky.eu/slackware{,64}-{13.37,14.0,14.1}/ > mled: http://www.microlinux.fr/slackware/MLED-{14.0,14.1}-{32,64}bit/ > mles: http://www.microlinux.fr/slackware/MLES-{14.0,14.1}-{32,64}bit/ -> msb: http://slackware.org.uk/msb/{14.0,14.1}/1.6/{x86,x86_64}/ +> msb: http://slackware.org.uk/msb/{14.0,14.1}/{1.6,1.8}/{x86,x86_64}/ > slackers: http://www.slackers.it/repository/ > slacke17: http://ngc891.blogdns.net/pub/slacke17/slackware{,64,arm}-{14.0,14.1}/ > studioware: http://studioware.org/files/packages/slackware{,64}-{13.37,14.0,14.1}/ +> slackonly: http://slackonly.com/pub/packages/14.1-x86_64/ > > Does NOT support GPG > salixos(*): http://download.salixos.org/{i486,x86_64}/{13.37,14.0,14.1}/ diff --git a/src/setupmultilib.sh b/src/setupmultilib.sh index 80a965b..fd6938b 100755 --- a/src/setupmultilib.sh +++ b/src/setupmultilib.sh @@ -1,17 +1,21 @@ #!/bin/bash +CONF=${CONF:-/etc/slackpkg} # needed if you're running slackpkg 2.28.0-12 + +. $CONF/slackpkg.conf + cd $(dirname $(readlink -f $0)) if [ ! -e repositories.txt ];then echo "Fatal. repositories.txt not found!" exit 1 fi -ISX64=$(ls /var/log/packages/aaa_base-*-x86_64-*|wc -l) +ISX64=$(ls $ROOT/var/log/packages/aaa_base-*-x86_64-*|wc -l) if [ $ISX64 -ne 1 ];then echo "Slackware multilib's are supported only from slackware x86_64!" exit 1 fi -SVER=$(grep -v ^\# /etc/slackpkg/mirrors|sed -r 's,^.*/slackware64-(current|14.1|14.0|13.37|13.0)/,\1,'|head -1) +SVER=$(grep -v ^\# $CONF/mirrors|sed -r 's,^.*/slackware64-(current|14.1|14.0|13.37|13.0)/,\1,'|head -1) if [ -z "$SVER" ];then echo "I can't detect your Slackware version." echo "Which Slackware version are you running? (current/14.1/14.0/13.37/13.0)" @@ -22,17 +26,17 @@ if ! echo $SVER|egrep -q '^(current|14.1|14.0|13.37|13.0)$';then exit 1 fi -if grep -q -e '^PKGS_PRIORITY=.* multilib:\.\* .*$' -e '^MIRRORPLUS..multilib..=.*multilib.*' /etc/slackpkg/slackpkgplus.conf;then +if grep -q -e '^PKGS_PRIORITY=.* multilib:\.\* .*$' -e '^MIRRORPLUS..multilib..=.*multilib.*' $CONF/slackpkgplus.conf;then echo "slackpkg+ seems to be already configured for multilib support. Would you like to remove multilib support from the configuration? (y/N)" read ANS if [ "$ANS" == "y" -o "$ANS" == "Y" ];then - cp /etc/slackpkg/slackpkgplus.conf /etc/slackpkg/slackpkgplus.conf.backup + cp $CONF/slackpkgplus.conf $CONF/slackpkgplus.conf.backup sed -i -r \ -e 's/^PKGS_PRIORITY=(.*) multilib:\.\* (.*)$/PKGS_PRIORITY=\1 \2/' \ -e 's/^(PKGS_PRIORITY=\( +\).*)$/#\1/' \ -e 's/^(MIRRORPLUS..multilib..=.*multilib.*)$/#\1/' \ -e 's/^REPOPLUS=(.*) multilib (.*)/REPOPLUS=\1 \2/' \ - -e 's/^(REPOPLUS=\( +\).*)$/#\1/' /etc/slackpkg/slackpkgplus.conf + -e 's/^(REPOPLUS=\( +\).*)$/#\1/' $CONF/slackpkgplus.conf echo "Multilib support has been removed from slackpkg+. Now you need to remove the installed packages (using slackpkg)." echo "Would you like this script to run slackpkg for you and remove the Multilib packages? (y/N)" read ANS @@ -59,14 +63,14 @@ echo "Would you like to setup slackpkg+ to add multilib support? (y/N)" read ANS if [ "$ANS" == "y" -o "$ANS" == "Y" ];then MULTILIBREPO="MIRRORPLUS['multilib']="$(grep -m1 '> multilib: ' repositories.txt|awk '{print $3}'|sed "s/{.*}/$SVER/") - cp /etc/slackpkg/slackpkgplus.conf /etc/slackpkg/slackpkgplus.conf.backup - if grep -q ^PKGS_PRIORITY= /etc/slackpkg/slackpkgplus.conf;then - sed -i -r -e 's/^PKGS_PRIORITY=\( (.*) \)/PKGS_PRIORITY=( multilib:.* \1 )/' /etc/slackpkg/slackpkgplus.conf + cp $CONF/slackpkgplus.conf $CONF/slackpkgplus.conf.backup + if grep -q ^PKGS_PRIORITY= $CONF/slackpkgplus.conf;then + sed -i -r -e 's/^PKGS_PRIORITY=\( (.*) \)/PKGS_PRIORITY=( multilib:.* \1 )/' $CONF/slackpkgplus.conf else - sed -i -r -e 's/^(REPOPLUS=.*)$/PKGS_PRIORITY=( multilib:.* )\n\1/' /etc/slackpkg/slackpkgplus.conf + sed -i -r -e 's/^(REPOPLUS=.*)$/PKGS_PRIORITY=( multilib:.* )\n\1/' $CONF/slackpkgplus.conf fi - sed -i -r -e 's|^(REPOPLUS=.*)$|\1\n'"$MULTILIBREPO|" /etc/slackpkg/slackpkgplus.conf - sed -i.backup -r -e 's/^(\[0-9\]\+compat32)$/\#\1/' /etc/slackpkg/blacklist + sed -i -r -e 's|^(REPOPLUS=.*)$|\1\n'"$MULTILIBREPO|" $CONF/slackpkgplus.conf + sed -i.backup -r -e 's/^(\[0-9\]\+compat32)$/\#\1/' $CONF/blacklist echo "slackpkg+ is now configured for multilib support." echo "Do you want to install the multilib now? (y/N)" read ANS @@ -75,10 +79,10 @@ if [ "$ANS" == "y" -o "$ANS" == "Y" ];then slackpkg update slackpkg upgrade multilib COMPATPKGS=$( - cd /var/log/packages + cd $ROOT/var/log/packages ls | rev |cut -f4- -d-|rev|sed -e 's/^/^slackware64 /' -e 's/$/ /' > /tmp/installed_packages1 - grep -f /tmp/installed_packages1 /var/lib/slackpkg/pkglist|awk '{print "SLACKPKGPLUS_multilib "$2"-compat32 "}' > /tmp/installed_packages2 - grep -f /tmp/installed_packages2 /var/lib/slackpkg/pkglist|awk '{print "multilib:"$2}' + grep -f /tmp/installed_packages1 $WORKDIR/pkglist|awk '{print "SLACKPKGPLUS_multilib "$2"-compat32 "}' > /tmp/installed_packages2 + grep -f /tmp/installed_packages2 $WORKDIR/pkglist|awk '{print "multilib:"$2}' ) slackpkg install $COMPATPKGS echo "Multilib installed" diff --git a/src/slackpkgplus.sh b/src/slackpkgplus.sh index 3740122..8435550 100755 --- a/src/slackpkgplus.sh +++ b/src/slackpkgplus.sh @@ -4,7 +4,9 @@ declare -A MIRRORPLUS declare -A NOTIFYMSG -if [ -e /etc/slackpkg/slackpkgplus.conf ];then +CONF=${CONF:-/etc/slackpkg} # needed if you're running slackpkg 2.28.0-12 + +if [ -e $CONF/slackpkgplus.conf ];then # You can override GREYLIST WGETOPTS SLACKPKGPLUS VERBOSE USEBL ALLOW32BIT from command-line EXTGREYLIST=$GREYLIST EXTALLOW32BIT=$ALLOW32BIT @@ -13,7 +15,7 @@ if [ -e /etc/slackpkg/slackpkgplus.conf ];then EXTUSEBL=$USEBL EXTWGETOPTS=$WGETOPTS - . /etc/slackpkg/slackpkgplus.conf + . $CONF/slackpkgplus.conf GREYLIST=${EXTGREYLIST:-$GREYLIST} ALLOW32BIT=${EXTALLOW32BIT:-$ALLOW32BIT} @@ -26,8 +28,8 @@ if [ -e /etc/slackpkg/slackpkgplus.conf ];then if [ "$USEBL" == "0" ];then USEBLACKLIST=false fi - if [ "$ENABLENOTIFY" = "on" -a -e /etc/slackpkg/notifymsg.conf ];then - . /etc/slackpkg/notifymsg.conf + if [ "$ENABLENOTIFY" = "on" -a -e $CONF/notifymsg.conf ];then + . $CONF/notifymsg.conf fi fi @@ -39,7 +41,7 @@ if [ "$SLACKPKGPLUS" = "on" ];then - SPKGPLUS_VERSION="1.3.1" + SPKGPLUS_VERSION="1.3.2" VERSION="$VERSION / slackpkg+ $SPKGPLUS_VERSION" @@ -283,7 +285,7 @@ if [ "$SLACKPKGPLUS" = "on" ];then echo 1 fi if [ "$(basename $1)" == "CHECKSUMS.md5" ];then - X86_64=$(ls /var/log/packages/aaa_base*x86_64* 2>/dev/null|head -1) + X86_64=$(ls $ROOT/var/log/packages/aaa_base*x86_64* 2>/dev/null|head -1) for PREPO in $REPOPLUS;do if [ ! -z "$X86_64" ];then if [ "$ALLOW32BIT" == "on" ];then @@ -397,9 +399,9 @@ if [ "$SLACKPKGPLUS" = "on" ];then grep -vE "(^#|^[[:blank:]]*$)" ${CONF}/blacklist > ${TMPDIR}/blacklist if echo $CMD | grep -q install ; then - ls -1 /var/log/packages/* | awk -f /usr/libexec/slackpkg/pkglist.awk > ${TMPDIR}/tmplist + ls -1 $ROOT/var/log/packages/* | awk -f /usr/libexec/slackpkg/pkglist.awk > ${TMPDIR}/tmplist else - ls -1 /var/log/packages/* | awk -f /usr/libexec/slackpkg/pkglist.awk | applyblacklist > ${TMPDIR}/tmplist + ls -1 $ROOT/var/log/packages/* | awk -f /usr/libexec/slackpkg/pkglist.awk | applyblacklist > ${TMPDIR}/tmplist fi cat ${WORKDIR}/pkglist | applyblacklist > ${TMPDIR}/pkglist @@ -503,8 +505,8 @@ if [ "$SLACKPKGPLUS" = "on" ];then # First is the package already installed? # Amazing what a little sleep will do # exclusion is so much nicer :) - INSTPKG=$(ls -1 /var/log/packages | grep -e "^${BASENAME}-[^-]\+-[^-]\+-[^-]\+") - #INSTPKG=$(ls -1 /var/log/packages | grep -e "^${BASENAME}-[^-]\+-\(${ARCH}\|fw\|noarch\)-[^-]\+") + INSTPKG=$(ls -1 $ROOT/var/log/packages | grep -e "^${BASENAME}-[^-]\+-[^-]\+-[^-]\+") + #INSTPKG=$(ls -1 $ROOT/var/log/packages | grep -e "^${BASENAME}-[^-]\+-\(${ARCH}\|fw\|noarch\)-[^-]\+") # INSTPKG is local version if [ ! "${INSTPKG}" = "" ]; then @@ -534,8 +536,8 @@ if [ "$SLACKPKGPLUS" = "on" ];then } touch $TMPDIR/greylist.1 - if [ -e /etc/slackpkg/greylist ];then - cat /etc/slackpkg/greylist|sed -e 's/#.*//'|grep -v -e '^#' -e '^$'|awk '{print $1}'|sort -u >$TMPDIR/greylist.1 + if [ -e $CONF/greylist ];then + cat $CONF/greylist|sed -e 's/#.*//'|grep -v -e '^#' -e '^$'|awk '{print $1}'|sort -u >$TMPDIR/greylist.1 cat $TMPDIR/greylist.1|sed 's/^/SLACKPKGPLUS_/' >$TMPDIR/greylist.2 fi @@ -554,7 +556,7 @@ if [ "$SLACKPKGPLUS" = "on" ];then fi done - if [ /etc/slackpkg/slackpkgplus.conf -nt $WORKDIR/pkglist -a "$CMD" != "update" ];then + if [ $CONF/slackpkgplus.conf -nt $WORKDIR/pkglist -a "$CMD" != "update" ];then echo echo "NOTICE: remember to re-run 'slackpkg update' after modifing slackpkgplus.conf" echo @@ -644,7 +646,7 @@ if [ "$SLACKPKGPLUS" = "on" ];then local MSGLIST="" local USERKEY - find /var/log/packages/ -type f -printf "%f\n" | sort > ${TMPDIR}/installed.tmp + find $ROOT/var/log/packages/ -type f -printf "%f\n" | sort > ${TMPDIR}/installed.tmp # -- Get the basename of packages which have been effectively # installed, upgraded, or removed @@ -697,8 +699,8 @@ if [ "$SLACKPKGPLUS" = "on" ];then echo -e "\nPackage: $i" echo -e "\tRemoving... " removepkg $i - if [ ! -e /var/log/packages/$i ];then - FDATE=$(ls -ltr --full-time /var/log/removed_packages/$i|tail -1 |awk '{print $6" "$7}'|sed -r -e 's/\.[0-9]{9}//' -e 's,-,/,' -e 's,-,/,') + if [ ! -e $ROOT/var/log/packages/$i ];then + FDATE=$(ls -ltr --full-time $ROOT/var/log/removed_packages/$i|tail -1 |awk '{print $6" "$7}'|sed -r -e 's/\.[0-9]{9}//' -e 's,-,/,' -e 's,-,/,') echo "$FDATE removed: $i" >> $WORKDIR/install.log fi done @@ -717,14 +719,14 @@ if [ "$SLACKPKGPLUS" = "on" ];then done DELALL="$OLDDEL" fi - ls -1 /var/log/packages > $TMPDIR/tmplist + ls -1 $ROOT/var/log/packages > $TMPDIR/tmplist for i in $SHOWLIST; do PKGFOUND=$(grep -m1 -e "^$(echo $i|rev|cut -f4- -d-|rev)-[^-]\+-[^-]\+-[^-]\+$" $TMPDIR/tmplist) REPOPOS=$(grep -m1 " $(echo $i|sed 's/\.t.z//') " $TMPDIR/pkglist|awk '{print $1}'|sed 's/SLACKPKGPLUS_//') getpkg $i upgradepkg Upgrading - if [ -e "/var/log/packages/$(echo $i|sed 's/\.t.z//')" ];then - FDATE=$(ls -l --full-time /var/log/packages/$(echo $i|sed 's/\.t.z//') |awk '{print $6" "$7}'|sed -r -e 's/\.[0-9]{9}//' -e 's,-,/,' -e 's,-,/,') + if [ -e "$ROOT/var/log/packages/$(echo $i|sed 's/\.t.z//')" ];then + FDATE=$(ls -l --full-time $ROOT/var/log/packages/$(echo $i|sed 's/\.t.z//') |awk '{print $6" "$7}'|sed -r -e 's/\.[0-9]{9}//' -e 's,-,/,' -e 's,-,/,') echo "$FDATE upgraded: $i [$REPOPOS] (was $PKGFOUND)" >> $WORKDIR/install.log fi @@ -746,13 +748,13 @@ if [ "$SLACKPKGPLUS" = "on" ];then fi for i in $SHOWLIST; do INSTALL_T='installed: ' - if [ -e /var/log/packages/$(echo $i|sed 's/\.t.z//') ];then + if [ -e $ROOT/var/log/packages/$(echo $i|sed 's/\.t.z//') ];then INSTALL_T='reinstalled:' fi REPOPOS=$(grep -m1 " $(echo $i|sed 's/\.t.z//') " $TMPDIR/pkglist|awk '{print $1}'|sed 's/SLACKPKGPLUS_//') getpkg $i installpkg Installing - if [ -e "/var/log/packages/$(echo $i|sed 's/\.t.z//')" ];then - FDATE=$(ls -l --full-time /var/log/packages/$(echo $i|sed 's/\.t.z//') |awk '{print $6" "$7}'|sed -r -e 's/\.[0-9]{9}//' -e 's,-,/,' -e 's,-,/,') + if [ -e "$ROOT/var/log/packages/$(echo $i|sed 's/\.t.z//')" ];then + FDATE=$(ls -l --full-time $ROOT/var/log/packages/$(echo $i|sed 's/\.t.z//') |awk '{print $6" "$7}'|sed -r -e 's/\.[0-9]{9}//' -e 's,-,/,' -e 's,-,/,') echo "$FDATE $INSTALL_T $i [$REPOPOS]" >> $WORKDIR/install.log fi done diff --git a/src/zdialogplus.sh b/src/zdialogplus.sh index cee0e14..e8ad344 100755 --- a/src/zdialogplus.sh +++ b/src/zdialogplus.sh @@ -27,7 +27,7 @@ if [ "$SLACKPKGPLUS" = "on" ];then rm -f $TMPDIR/dialog.tmp if [ "$2" = "upgrade" ]; then - ls -1 /var/log/packages > $TMPDIR/tmplist + ls -1 $ROOT/var/log/packages > $TMPDIR/tmplist for i in $1; do TMPONOFF=$ONOFF BASENAME=$(cutpkg $i) @@ -74,7 +74,7 @@ if [ "$SLACKPKGPLUS" = "on" ];then cat $TMPDIR/dialog.out >> $TMPDIR/error.log echo -e "------------- If you want to continue using slackpkg, disable the DIALOG option in -/etc/slackpkg/slackpkg.conf and try again. +$CONF/slackpkg.conf and try again. Help us to make slackpkg a better tool - report bugs to the slackpkg developers" >> $TMPDIR/error.log From da321982e1f5ef8570c5817572d986248d8040e8 Mon Sep 17 00:00:00 2001 From: Matteo Rossini Date: Sun, 26 Oct 2014 18:00:49 +0100 Subject: [PATCH 05/21] Version 1.3.3 - 26/Oct/2014 - Patched to avoid to install glibc-debug from alienbob multilib (thanks to phenixia2003) --- ChangeLog.txt | 4 ++++ src/ChangeLog.txt | 4 ++++ src/slackpkgplus.sh | 12 ++++++++---- 3 files changed, 16 insertions(+), 4 deletions(-) diff --git a/ChangeLog.txt b/ChangeLog.txt index 9598bad..c87386b 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -1,3 +1,7 @@ +Version 1.3.3 - 26/Oct/2014 + - Patched to avoid to install glibc-debug from alienbob multilib (thanks to + phenixia2003) + Version 1.3.2 - 13/Jul/2014 - Patched to reflect changes on slackpkg 2.82.0-13 diff --git a/src/ChangeLog.txt b/src/ChangeLog.txt index 9598bad..c87386b 100644 --- a/src/ChangeLog.txt +++ b/src/ChangeLog.txt @@ -1,3 +1,7 @@ +Version 1.3.3 - 26/Oct/2014 + - Patched to avoid to install glibc-debug from alienbob multilib (thanks to + phenixia2003) + Version 1.3.2 - 13/Jul/2014 - Patched to reflect changes on slackpkg 2.82.0-13 diff --git a/src/slackpkgplus.sh b/src/slackpkgplus.sh index 8435550..e85e7e4 100755 --- a/src/slackpkgplus.sh +++ b/src/slackpkgplus.sh @@ -41,7 +41,7 @@ if [ "$SLACKPKGPLUS" = "on" ];then - SPKGPLUS_VERSION="1.3.2" + SPKGPLUS_VERSION="1.3.3" VERSION="$VERSION / slackpkg+ $SPKGPLUS_VERSION" @@ -918,9 +918,13 @@ if [ "$SLACKPKGPLUS" = "on" ];then echo "$pref" | grep -qi "multilib" && MLREPO_SELELECTED=true - if $MLREPO_SELELECTED && [ "$CMD" == "remove" ] ; then - internal_blacklist "glibc" - internal_blacklist "gcc" + if $MLREPO_SELELECTED ; then + if [ "$CMD" == "install" ] ; then + internal_blacklist "glibc-debug" + elif [ "$CMD" == "remove" ] ; then + internal_blacklist "glibc" + internal_blacklist "gcc" + fi fi package="SLACKPKGPLUS_${pref}" From 122371c1e4c7c0e6f742f58c467da98fe135d9f6 Mon Sep 17 00:00:00 2001 From: Matteo Rossini Date: Sat, 13 Dec 2014 16:20:46 +0100 Subject: [PATCH 06/21] Version 1.4.0 - 13/Dec/2014 - Now the official repositories (slackware64, extra, patches...) are treated as thirdy party repositories, so you can add it in PKGS_PRIORITY (phenixia2003) - To put an entire repository in PKGS_PRIORITY, you no more need to add ':.*' after the name (phenixia2003) --- ChangeLog.txt | 7 ++++ src/ChangeLog.txt | 7 ++++ src/README | 63 +++++++++++++++++++++++++++------- src/repositories.txt | 49 +++++++++++++++++++++----- src/setupmultilib.sh | 6 ++-- src/slackpkgplus.sh | 39 ++++++++++++++++++--- src/slackpkgplus.x86.sample | 9 ++--- src/slackpkgplus.x86_64.sample | 12 +++---- 8 files changed, 153 insertions(+), 39 deletions(-) diff --git a/ChangeLog.txt b/ChangeLog.txt index c87386b..77d0d7f 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -1,3 +1,10 @@ +Version 1.4.0 - 13/Dec/2014 + - Now the official repositories (slackware64, extra, patches...) are treated + as thirdy party repositories, so you can add it in PKGS_PRIORITY + (phenixia2003) + - To put an entire repository in PKGS_PRIORITY, you no more need to add + ':.*' after the name (phenixia2003) + Version 1.3.3 - 26/Oct/2014 - Patched to avoid to install glibc-debug from alienbob multilib (thanks to phenixia2003) diff --git a/src/ChangeLog.txt b/src/ChangeLog.txt index c87386b..77d0d7f 100644 --- a/src/ChangeLog.txt +++ b/src/ChangeLog.txt @@ -1,3 +1,10 @@ +Version 1.4.0 - 13/Dec/2014 + - Now the official repositories (slackware64, extra, patches...) are treated + as thirdy party repositories, so you can add it in PKGS_PRIORITY + (phenixia2003) + - To put an entire repository in PKGS_PRIORITY, you no more need to add + ':.*' after the name (phenixia2003) + Version 1.3.3 - 26/Oct/2014 - Patched to avoid to install glibc-debug from alienbob multilib (thanks to phenixia2003) diff --git a/src/README b/src/README index ac3bc34..c3fc241 100644 --- a/src/README +++ b/src/README @@ -151,8 +151,19 @@ for example: PKGS_PRIORITY=( alienbob:openjdk ) accepts a regular expression, so for example - PKGS_PRIORITY=( restricted:.* ) -means 'all packages in repository restricted' + PKGS_PRIORITY=( restricted:.*vlc.* ) +means 'all packages containing the "vlc" string' + PKGS_PRIORITY=( ktown:.* ) +means 'all packages in repository ktown' + +latest item maybe replaced simply with + PKGS_PRIORITY=( ktown ) + +all packages matched from ktown ovverride all related slackware packages, unless +you do not explicitly exclude it: + PKGS_PRIORITY=( patches:harfbuzz slackware64:harfbuzz ktown ) +that means 'all ktown packages except harfbuzz' + ----- @@ -161,12 +172,16 @@ MULTILIB If you want to use a multilib system, you can automatically configure the multilib repository in slackpkgplus.conf and install multilib simply by running: -# /usr/doc/slackpkg+-1.2.0/setupmultilib.sh +# /usr/doc/slackpkg+-*/setupmultilib.sh To configure multilib manually (e.g. if you have installed multilib already), uncomment the correct "MIRRORPLUS['multilib']=...", -and uncomment "PKGS_PRIORITY=( multilib:.* )", -and add multilib to the REPOPLUS list. +and uncomment "PKGS_PRIORITY=( multilib:.* )". +If you do not plan to build yourself 32bit packages on your 64bit machine, you may +avoid to install gcc: + + PKGS_PRIORITY=( patches:gcc slackware64:gcc multilib ) + To install multilib manually, launch: # slackpkg update gpg @@ -181,7 +196,7 @@ and re-running 'slackpkg install multilib' if 'slackpkg install-new' has found any new packages. To uninstall multilib, you must remove 'multilib:.*' from PKGS_PRIORITY and from -REPOPLUS (but do not delete the related MIRRORPLUS line), then launch: +REPOPLUS, but do NOT delete the related MIRRORPLUS line, then launch: # slackpkg update # slackpkg remove multilib Note: this does NOT remove the core multilib packages, because they affect the @@ -190,29 +205,41 @@ Note: this does NOT remove the core multilib packages, because they affect the then delete or comment the related MIRRORPLUS line, and finally launch # slackpkg update +or just re-run +# /usr/doc/slackpkg+-*/setupmultilib.sh + + ----- KTOWN (LATEST KDE) If you want to install the latest KDE packages from AlienBOB's ktown repository -(presently 4.11.1), add "PKGS_PRIORITY=( ktown:.* )" then launch: +(currently 4.14.3 and 5.0.2), add "PKGS_PRIORITY=( ktown )" then launch: # slackpkg update gpg # slackpkg update # slackpkg install ktown # slackpkg upgrade-all Do not forget to read the special instructions from - http://taper.alienbase.nl/mirrors/alien-kde/current/latest/ -because you may need to remove some Slackware KDE packages. At the time of -writing, these packages are: -# slackpkg remove kdeadmin kdenetwork kdesdk kdetoys + http://taper.alienbase.nl/mirrors/alien-kde/current/latest/ (kde 4) + http://taper.alienbase.nl/mirrors/alien-kde/current/testing/ (kde 5) +because you may need to do some manual operation. At the time of writing, for kde4: +# slackpkg remove kdeadmin kdenetwork kdesdk kdetoys kwallet kdnssd +for kde5: +add to /etc/rc.d/rc.4" right after the line 'echo "Starting up X11 session manager..."': + + if [ -x /usr/bin/sddm ]; then + exec /usr/bin/sddm + fi After that, you can keep the ktown KDE up-to-date by launching: # slackpkg update # slackpkg upgrade-all +Periodically you should re-run +# slackpkg install ktown -To restore the Slackware KDE, remove 'ktown:.*' from PKGS_PRIORITY and from -REPOPLUS (but do not delete the related MIRRORPLUS line), then launch: +To restore the Slackware KDE, remove 'ktown' from PKGS_PRIORITY and from +REPOPLUS, but do NOT delete the related MIRRORPLUS line, then launch: # slackpkg update # slackpkg upgrade-all # slackpkg install kde @@ -220,6 +247,16 @@ REPOPLUS (but do not delete the related MIRRORPLUS line), then launch: then delete or comment the related MIRRORPLUS line and launch: # slackpkg update + +note that ktown5 requires ktown4, so you must configure both repositories: +PKGS_PRIORITY=( ktown5 ktown4 ) +MIRRORPLUS['ktown4']=.... +MIRRORPLUS['ktown5']=.... + +and then run +... +# slackpkg install ktown5 ktown4 + ----- diff --git a/src/repositories.txt b/src/repositories.txt index cf62a19..09c483a 100644 --- a/src/repositories.txt +++ b/src/repositories.txt @@ -4,24 +4,23 @@ Supported Repositories: > slackpkgplus: http://slakfinder.org/slackpkg+/ > multilib: http://taper.alienbase.nl/mirrors/people/alien/multilib/{13.37,14.0,14.1,current}/ > alienbob: http://taper.alienbase.nl/mirrors/people/alien/sbrepos/{13.37,14.0,14.1,current}/{x86,x86_64}/ -> ktown: http://taper.alienbase.nl/mirrors/alien-kde/{13.37,14.0,14.1,current}/latest/{x86,x86_64}/ +> ktown: http://taper.alienbase.nl/mirrors/alien-kde/{13.37,14.0,14.1,current}/{latest,testing}/{x86,x86_64}/ > restricted: http://taper.alienbase.nl/mirrors/people/alien/restricted_sbrepos/{13.37,14.0,14.1,current}/{x86,x86_64}/ > slacky: http://repository.slacky.eu/slackware{,64}-{13.37,14.0,14.1}/ -> mled: http://www.microlinux.fr/slackware/MLED-{14.0,14.1}-{32,64}bit/ -> mles: http://www.microlinux.fr/slackware/MLES-{14.0,14.1}-{32,64}bit/ +> mled: http://www.microlinux.fr/slackware/desktop-{base,extra,xfce,kde}-14.1-{32,64}bit/ +> mles: http://www.microlinux.fr/slackware/server-{14.0,14.1}-{32,64}bit/ > msb: http://slackware.org.uk/msb/{14.0,14.1}/{1.6,1.8}/{x86,x86_64}/ > slackers: http://www.slackers.it/repository/ > slacke17: http://ngc891.blogdns.net/pub/slacke17/slackware{,64,arm}-{14.0,14.1}/ > studioware: http://studioware.org/files/packages/slackware{,64}-{13.37,14.0,14.1}/ -> slackonly: http://slackonly.com/pub/packages/14.1-x86_64/ +> slackonly: http://slackonly.com/pub/packages/14.1-{x86,x86_64}/ +> rlworkman: http://rlworkman.net/pkgs/{13.37,14.0,14.1}/ > > Does NOT support GPG > salixos(*): http://download.salixos.org/{i486,x86_64}/{13.37,14.0,14.1}/ -> salixext: http://people.salixos.org/ralvex/repository/x86_64/{14.0,14.1}/ -> rlworkman(*): http://rlworkman.net/pkgs/{13.37,14.0,14.1}/ -> slackel: http://www.slackel.gr/repo/{i486,x86_64}/current/ +> slackel(*): http://www.slackel.gr/repo/{i486,x86_64}/current/ -(*) salixos and rlworkman partially supports GPG. These repositories contains the .asc file +(*) salixos and slackel partially supports GPG. These repositories contains the .asc file for CHECKSUMS.md5, so the 'update' process works with CHECKGPG=on and repository authenticity is guaranteed. Unfortunately the single packages do not include the related .asc file, so you must @@ -31,3 +30,37 @@ Supported Repositories: You can find a larger list at http://slakfinder.org + +Some specific notes: + +* multilib: + Please, run /usr/doc/slackpkg+-*/setupmultilib.sh to setup it + Periodically you should run "slackpkg install multilib" + after run "slackpkg upgrade-all" + +* ktown: + You need to put 'ktown' in PKGS_PRIORITY + Periodically you should run "slackpkg install ktown" + after run "slackpkg upgrade-all" + at moment 'latest' is 'kde4', 'testing' is 'kde5'. + after install you need to do some postinstall operation, see + http://taper.alienbase.nl/mirrors/alien-kde/current/latest/ + http://taper.alienbase.nl/mirrors/alien-kde/current/testing/ + kde4: + slackpkg remove kdeadmin kdenetwork kdesdk kdetoys kwallet kdnssd + kde5: + kde5 require kde4, so configure both repositories. + add the following lines to the Slackware file "/etc/rc.d/rc.4" right after + the line: echo "Starting up X11 session manager..." + + if [ -x /usr/bin/sddm ]; then + exec /usr/bin/sddm + fi + +* mled: + You should require to configure both 'desktop-base' and 'desktop-SOMEOTHER' repositories + See http://www.microlinux.fr/mled_installation.php + + + +Please read /usr/doc/slackpkg+-*/README for more details diff --git a/src/setupmultilib.sh b/src/setupmultilib.sh index fd6938b..4a1be98 100755 --- a/src/setupmultilib.sh +++ b/src/setupmultilib.sh @@ -32,7 +32,7 @@ if grep -q -e '^PKGS_PRIORITY=.* multilib:\.\* .*$' -e '^MIRRORPLUS..multilib..= if [ "$ANS" == "y" -o "$ANS" == "Y" ];then cp $CONF/slackpkgplus.conf $CONF/slackpkgplus.conf.backup sed -i -r \ - -e 's/^PKGS_PRIORITY=(.*) multilib:\.\* (.*)$/PKGS_PRIORITY=\1 \2/' \ + -e 's/^PKGS_PRIORITY=(.*) multilib[^ ]* (.*)$/PKGS_PRIORITY=\1 \2/' \ -e 's/^(PKGS_PRIORITY=\( +\).*)$/#\1/' \ -e 's/^(MIRRORPLUS..multilib..=.*multilib.*)$/#\1/' \ -e 's/^REPOPLUS=(.*) multilib (.*)/REPOPLUS=\1 \2/' \ @@ -67,9 +67,9 @@ if [ "$ANS" == "y" -o "$ANS" == "Y" ];then if grep -q ^PKGS_PRIORITY= $CONF/slackpkgplus.conf;then sed -i -r -e 's/^PKGS_PRIORITY=\( (.*) \)/PKGS_PRIORITY=( multilib:.* \1 )/' $CONF/slackpkgplus.conf else - sed -i -r -e 's/^(REPOPLUS=.*)$/PKGS_PRIORITY=( multilib:.* )\n\1/' $CONF/slackpkgplus.conf + sed -i -r -e '1,/^#PKGS_PRIORITY=.*$/s/^(#PKGS_PRIORITY=.*)$/\1\nPKGS_PRIORITY=( multilib: )\n/' $CONF/slackpkgplus.conf fi - sed -i -r -e 's|^(REPOPLUS=.*)$|\1\n'"$MULTILIBREPO|" $CONF/slackpkgplus.conf + sed -i -r -e 's|^(PKGS_PRIORITY=.*)$|\1\n'"$MULTILIBREPO|" $CONF/slackpkgplus.conf sed -i.backup -r -e 's/^(\[0-9\]\+compat32)$/\#\1/' $CONF/blacklist echo "slackpkg+ is now configured for multilib support." echo "Do you want to install the multilib now? (y/N)" diff --git a/src/slackpkgplus.sh b/src/slackpkgplus.sh index e85e7e4..a577bf6 100755 --- a/src/slackpkgplus.sh +++ b/src/slackpkgplus.sh @@ -6,6 +6,10 @@ declare -A NOTIFYMSG CONF=${CONF:-/etc/slackpkg} # needed if you're running slackpkg 2.28.0-12 + # regular expression used to distinguish the 3rd party repositories from the standard slackware directories. + # +SLACKDIR_REGEXP="(slackware)|(slackware64)|(extra)|(pasture)|(patches)|(testing)" + if [ -e $CONF/slackpkgplus.conf ];then # You can override GREYLIST WGETOPTS SLACKPKGPLUS VERBOSE USEBL ALLOW32BIT from command-line EXTGREYLIST=$GREYLIST @@ -41,7 +45,7 @@ if [ "$SLACKPKGPLUS" = "on" ];then - SPKGPLUS_VERSION="1.3.3" + SPKGPLUS_VERSION="1.4.0" VERSION="$VERSION / slackpkg+ $SPKGPLUS_VERSION" @@ -541,7 +545,23 @@ if [ "$SLACKPKGPLUS" = "on" ];then cat $TMPDIR/greylist.1|sed 's/^/SLACKPKGPLUS_/' >$TMPDIR/greylist.2 fi - REPOPLUS=$(echo "${REPOPLUS[*]} ${PKGS_PRIORITY[*]} ${!MIRRORPLUS[*]}"|sed 's/ /\n/g'|sed 's/:.*//'|awk '{if(!a[$1]++)print $1}') + INDEX=0 + PURE_PKGSPRIORITY="" + for pp in ${PKGS_PRIORITY[@]} ; do + repository=$(echo "$pp" | cut -f1 -d":") + + if [ "$pp" == "$repository" ] && grep -q "^SLACKPKGPLUS_${repository}[ ]" $WORKDIR/pkglist 2>/dev/null ; then + pp="$repository:.*" + PKGS_PRIORITY[$INDEX]="$repository:.*" + fi + + if ! echo "$repository" | grep -qwE "$SLACKDIR_REGEXP" ; then + PURE_PKGSPRIORITY=( ${PURE_PKGSPRIORITY[*]} $pp ) + fi + ((INDEX++)) + done + + REPOPLUS=$(echo "${REPOPLUS[*]} ${PURE_PKGSPRIORITY[*]} ${!MIRRORPLUS[*]}"|sed 's/ /\n/g'|sed 's/:.*//'|awk '{if(!a[$1]++)print $1}') PRIORITY=( ${PRIORITY[*]} SLACKPKGPLUS_$(echo $REPOPLUS|sed 's/ / SLACKPKGPLUS_/g') ) # Test repositories @@ -573,10 +593,15 @@ if [ "$SLACKPKGPLUS" = "on" ];then package=$(echo "$pp" | cut -f2- -d":") if [ ! -z "$repository" ] && [ ! -z "$package" ] ; then + + if ! echo "$repository" | grep -qwE "$SLACKDIR_REGEXP" ; then + repository="SLACKPKGPLUS_${repository}" + fi + if [ -z "$PREFIX" ] ; then - PREFIX=( SLACKPKGPLUS_${repository}:$package ) + PREFIX=( ${repository}:$package ) else - PREFIX=( ${PREFIX[*]} SLACKPKGPLUS_${repository}:$package ) + PREFIX=( ${PREFIX[*]} ${repository}:$package ) fi fi done @@ -910,7 +935,11 @@ if [ "$SLACKPKGPLUS" = "on" ];then repository=$(echo "$pref" | cut -f1 -d":") package=$(echo "$pref" | cut -f2- -d":") - PRIORITYLIST=( ${PRIORITYLIST[*]} SLACKPKGPLUS_${repository}:$package ) + if ! echo "$repository" | grep -qwE "$SLACKDIR_REGEXP" ; then + repository="SLACKPKGPLUS_${repository}" + fi + + PRIORITYLIST=( ${PRIORITYLIST[*]} ${repository}:$package ) fi # You can specify 'slackpkg install reponame' where reponame is a thirdy part repository diff --git a/src/slackpkgplus.x86.sample b/src/slackpkgplus.x86.sample index 803ffc9..70e64a4 100644 --- a/src/slackpkgplus.x86.sample +++ b/src/slackpkgplus.x86.sample @@ -1,3 +1,4 @@ +# Configuration for slackpkg+. See /usr/doc/slackpkg+-*/README for more details # Enable (on) / Disable (off) slackpkg+ SLACKPKGPLUS=on @@ -15,7 +16,7 @@ USEBL=1 # Add custom option to 'wget'. # You can solve the repository indisponibility issue by set a timeout here -WGETOPTS="--timeout=5 --tries=1" +WGETOPTS="--timeout=20 --tries=2" # Enable (on) / Disable (off) notification events (see notifymsg.conf) #ENABLENOTIFY=off @@ -26,11 +27,11 @@ GREYLIST=on # If two or more repositories contains some same packages, you can specify # from which repository you prefer to search it. # The syntax is ":" -# Accepts regular expressions. To give priority to an entire repository use ":.*" +# Accepts regular expressions. To give priority to an entire repository use "" # Examples: #PKGS_PRIORITY=( restricted:vlc ) -#PKGS_PRIORITY=( myrepo:.* ) +#PKGS_PRIORITY=( myrepo ) # # List repositories you want to use (defined below) @@ -58,6 +59,6 @@ MIRRORPLUS['slackpkgplus']=http://slakfinder.org/slackpkg+/ # -# Supported Repositories (see /usr/doc/slackpkg+-* for details): +# Supported Repositories (see /usr/doc/slackpkg+-* for details and notes): # diff --git a/src/slackpkgplus.x86_64.sample b/src/slackpkgplus.x86_64.sample index 19e38f8..287ada7 100644 --- a/src/slackpkgplus.x86_64.sample +++ b/src/slackpkgplus.x86_64.sample @@ -1,3 +1,4 @@ +# Configuration for slackpkg+. See /usr/doc/slackpkg+-*/README for more details # Enable (on) / Disable (off) slackpkg+ SLACKPKGPLUS=on @@ -22,7 +23,7 @@ USEBL=1 # Add custom option to 'wget'. # You can solve the repository indisponibility issue by set a timeout here -WGETOPTS="--timeout=5 --tries=1" +WGETOPTS="--timeout=20 --tries=2" # Enable (on) / Disable (off) notification events (see notifymsg.conf) #ENABLENOTIFY=off @@ -33,14 +34,14 @@ GREYLIST=on # If two or more repositories contains some same packages, you can specify # from which repository you prefer to search it. # The syntax is ":" -# Accepts regular expressions. To give priority to an entire repository use ":.*" +# Accepts regular expressions. To give priority to an entire repository use "" # Examples: #PKGS_PRIORITY=( restricted:vlc ) -#PKGS_PRIORITY=( myrepo:.* ) +#PKGS_PRIORITY=( myrepo ) # # If you want a multilib system, uncomment the multilib repository and set: -#PKGS_PRIORITY=( multilib:.* ) +#PKGS_PRIORITY=( multilib ) # # (Use /usr/doc/slackpkg+-*/setupmultilib.sh to setup a multilib configuration) @@ -64,7 +65,6 @@ MIRRORPLUS['slackpkgplus']=http://slakfinder.org/slackpkg+/ # Slackware current - x86_64 #MIRRORPLUS['multilib']=http://taper.alienbase.nl/mirrors/people/alien/multilib/current/ -#MIRRORPLUS['zerouno']=http://www.z01.eu/repo-slack/slackware64-current/ # Local repository: #MIRRORPLUS['alienbob']=file://repositories/alien/sbrepos/14.1/x86/ @@ -74,6 +74,6 @@ MIRRORPLUS['slackpkgplus']=http://slakfinder.org/slackpkg+/ # -# Supported Repositories (see /usr/doc/slackpkg+-* for details): +# Supported Repositories (see /usr/doc/slackpkg+-* for details and notes): # From 5c4203a401e20aaf90e8c8720d54f3db5839ae5c Mon Sep 17 00:00:00 2001 From: Matteo Rossini Date: Fri, 9 Jan 2015 18:12:42 +0100 Subject: [PATCH 07/21] Fixed 'microlinux' repositories --- src/repositories.txt | 9 ++------- src/slackpkgplus.x86.sample | 5 +++-- src/slackpkgplus.x86_64.sample | 5 +++-- 3 files changed, 8 insertions(+), 11 deletions(-) diff --git a/src/repositories.txt b/src/repositories.txt index 09c483a..8ae475e 100644 --- a/src/repositories.txt +++ b/src/repositories.txt @@ -7,7 +7,8 @@ Supported Repositories: > ktown: http://taper.alienbase.nl/mirrors/alien-kde/{13.37,14.0,14.1,current}/{latest,testing}/{x86,x86_64}/ > restricted: http://taper.alienbase.nl/mirrors/people/alien/restricted_sbrepos/{13.37,14.0,14.1,current}/{x86,x86_64}/ > slacky: http://repository.slacky.eu/slackware{,64}-{13.37,14.0,14.1}/ -> mled: http://www.microlinux.fr/slackware/desktop-{base,extra,xfce,kde}-14.1-{32,64}bit/ +> mled-desktop: http://www.microlinux.fr/slackware/desktop--14.1-{32,64}bit/ +> mled-extras: http://www.microlinux.fr/slackware/extras-14.1-{32,64}bit/ > mles: http://www.microlinux.fr/slackware/server-{14.0,14.1}-{32,64}bit/ > msb: http://slackware.org.uk/msb/{14.0,14.1}/{1.6,1.8}/{x86,x86_64}/ > slackers: http://www.slackers.it/repository/ @@ -57,10 +58,4 @@ Some specific notes: exec /usr/bin/sddm fi -* mled: - You should require to configure both 'desktop-base' and 'desktop-SOMEOTHER' repositories - See http://www.microlinux.fr/mled_installation.php - - - Please read /usr/doc/slackpkg+-*/README for more details diff --git a/src/slackpkgplus.x86.sample b/src/slackpkgplus.x86.sample index 70e64a4..4e3dabf 100644 --- a/src/slackpkgplus.x86.sample +++ b/src/slackpkgplus.x86.sample @@ -40,8 +40,9 @@ REPOPLUS=( slackpkgplus restricted alienbob slacky ) # Define mirrors (uncomment one or more mirror; remember to add it to REPOPLUS) -# Note: only multilib,alienbob,restricted,slacky repositories support GPG. If you add others -# you may need to disable gpg check in slackpkg.conf +# GPG Note: after adding a repository, you must to run 'slackpkg update gpg' +# some repositories as salixos or slackel, have a partial GPG support; +# for that repositories you may need to run slackpkg with 'slackpkg -checkgpg=off ...' # Slackware 14.1 - i386 MIRRORPLUS['alienbob']=http://taper.alienbase.nl/mirrors/people/alien/sbrepos/14.1/x86/ diff --git a/src/slackpkgplus.x86_64.sample b/src/slackpkgplus.x86_64.sample index 287ada7..9ce85cd 100644 --- a/src/slackpkgplus.x86_64.sample +++ b/src/slackpkgplus.x86_64.sample @@ -51,8 +51,9 @@ REPOPLUS=( slackpkgplus restricted alienbob slacky ) # Define mirrors (uncomment one or more mirror; remember to add it to REPOPLUS) -# Note: only multilib,alienbob,restricted,slacky repositories support GPG. If you add others -# you may need to disable gpg check in slackpkg.conf +# GPG Note: after adding a repository, you must to run 'slackpkg update gpg' +# some repositories as salixos or slackel, have a partial GPG support; +# for that repositories you may need to run slackpkg with 'slackpkg -checkgpg=off ...' # Slackware 14.1 - x86_64 #MIRRORPLUS['multilib']=http://taper.alienbase.nl/mirrors/people/alien/multilib/14.1/ From ac3758c2de0cdef7f6af2a10b54d3ce5d6049b54 Mon Sep 17 00:00:00 2001 From: Matteo Rossini Date: Sun, 14 Jun 2015 18:38:18 +0200 Subject: [PATCH 08/21] Updated repositories --- src/repositories.txt | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/repositories.txt b/src/repositories.txt index 8ae475e..53ebb7b 100644 --- a/src/repositories.txt +++ b/src/repositories.txt @@ -7,19 +7,19 @@ Supported Repositories: > ktown: http://taper.alienbase.nl/mirrors/alien-kde/{13.37,14.0,14.1,current}/{latest,testing}/{x86,x86_64}/ > restricted: http://taper.alienbase.nl/mirrors/people/alien/restricted_sbrepos/{13.37,14.0,14.1,current}/{x86,x86_64}/ > slacky: http://repository.slacky.eu/slackware{,64}-{13.37,14.0,14.1}/ -> mled-desktop: http://www.microlinux.fr/slackware/desktop--14.1-{32,64}bit/ -> mled-extras: http://www.microlinux.fr/slackware/extras-14.1-{32,64}bit/ -> mles: http://www.microlinux.fr/slackware/server-{14.0,14.1}-{32,64}bit/ -> msb: http://slackware.org.uk/msb/{14.0,14.1}/{1.6,1.8}/{x86,x86_64}/ -> slackers: http://www.slackers.it/repository/ +> mled-desktop: http://www.microlinux.fr/microlinux/desktop-14.1-{32,64}bit/ +> mled-extras: http://www.microlinux.fr/microlinux/extras-14.1-{32,64}bit/ +> mles: http://www.microlinux.fr/microlinux/server-{14.0,14.1}-{32,64}bit/ +> msb: http://slackware.org.uk/msb/{14.0,14.1}/{1.6,1.8,1.10}/{x86,x86_64}/ +> slackers: http://ponce.cc/slackers/repository/ > slacke17: http://ngc891.blogdns.net/pub/slacke17/slackware{,64,arm}-{14.0,14.1}/ > studioware: http://studioware.org/files/packages/slackware{,64}-{13.37,14.0,14.1}/ -> slackonly: http://slackonly.com/pub/packages/14.1-{x86,x86_64}/ +> slackonly: http://slackonly.com/pub/packages/{14.1,current}-{x86,x86_64}/ > rlworkman: http://rlworkman.net/pkgs/{13.37,14.0,14.1}/ > > Does NOT support GPG > salixos(*): http://download.salixos.org/{i486,x86_64}/{13.37,14.0,14.1}/ -> slackel(*): http://www.slackel.gr/repo/{i486,x86_64}/current/ +> slackel(*): http://www.slackel.gr/repo/{i486,x86_64}/{current,kde5}/ (*) salixos and slackel partially supports GPG. These repositories contains the .asc file for CHECKSUMS.md5, so the 'update' process works with CHECKGPG=on and repository authenticity From 1bd7dd1bb1f924240bdcd880156c161df7a5204f Mon Sep 17 00:00:00 2001 From: Matteo Rossini Date: Tue, 16 Jun 2015 17:39:14 +0200 Subject: [PATCH 09/21] Version 1.4.1 - 16/Jun/2015 - Fix for repositories having CHECKSUMS.md5.gz.asc --- ChangeLog.txt | 3 +++ src/ChangeLog.txt | 3 +++ src/slackpkgplus.sh | 7 ++++--- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/ChangeLog.txt b/ChangeLog.txt index 77d0d7f..035bca7 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -1,3 +1,6 @@ +Version 1.4.1 - 16/Jun/2015 + - Fix for repositories having CHECKSUMS.md5.gz.asc + Version 1.4.0 - 13/Dec/2014 - Now the official repositories (slackware64, extra, patches...) are treated as thirdy party repositories, so you can add it in PKGS_PRIORITY diff --git a/src/ChangeLog.txt b/src/ChangeLog.txt index 77d0d7f..035bca7 100644 --- a/src/ChangeLog.txt +++ b/src/ChangeLog.txt @@ -1,3 +1,6 @@ +Version 1.4.1 - 16/Jun/2015 + - Fix for repositories having CHECKSUMS.md5.gz.asc + Version 1.4.0 - 13/Dec/2014 - Now the official repositories (slackware64, extra, patches...) are treated as thirdy party repositories, so you can add it in PKGS_PRIORITY diff --git a/src/slackpkgplus.sh b/src/slackpkgplus.sh index a577bf6..032b251 100755 --- a/src/slackpkgplus.sh +++ b/src/slackpkgplus.sh @@ -45,7 +45,7 @@ if [ "$SLACKPKGPLUS" = "on" ];then - SPKGPLUS_VERSION="1.4.0" + SPKGPLUS_VERSION="1.4.1" VERSION="$VERSION / slackpkg+ $SPKGPLUS_VERSION" @@ -173,8 +173,8 @@ if [ "$SLACKPKGPLUS" = "on" ];then if [ $? -ne 0 ];then $DOWNLOADER ${TMPDIR}/CHECKSUMS.md5-$PREPO.gz.asc `echo $URLFILE|sed 's/\.asc$/.gz.asc/'` if [ $? -eq 0 ];then - $DOWNLOADER ${TMPDIR}/CHECKSUMS.md5-$PREPO.gz $URLFILE.gz - if [ $(checkgpg ${TMPDIR}/CHECKSUMS.md5-$PREPO.gz) -eq 0 ];then + $DOWNLOADER ${TMPDIR}/CHECKSUMS.md5-$PREPO.gz `echo $URLFILE|sed 's/\.asc$/.gz/'` + if [ $(checkgpg ${TMPDIR}/CHECKSUMS.md5-$PREPO.gz) -eq 1 ];then echo echo " !!! N O T I C E !!!" echo " Repository '$PREPO' does support signature checking for" @@ -184,6 +184,7 @@ if [ "$SLACKPKGPLUS" = "on" ];then echo " 'slackpkg -checkgpg=off install packge'" echo " The package authenticity remains guaranteed." echo + zcat ${TMPDIR}/CHECKSUMS.md5-$PREPO.gz > ${TMPDIR}/CHECKSUMS.md5-$PREPO sleep 5 continue fi From 8a04091b45c0bbaae938a33103183e8671d5a7a9 Mon Sep 17 00:00:00 2001 From: Matteo Rossini Date: Mon, 29 Jun 2015 23:48:25 +0200 Subject: [PATCH 10/21] Small code review --- src/slackpkgplus.sh | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/src/slackpkgplus.sh b/src/slackpkgplus.sh index 032b251..8de673a 100755 --- a/src/slackpkgplus.sh +++ b/src/slackpkgplus.sh @@ -90,7 +90,7 @@ if [ "$SLACKPKGPLUS" = "on" ];then rm -rf $TMPDIR fi exit - } + } # END cleanup() # Override the slackpkg getfile(). # The new getfile() download all file needed from all defined repositories @@ -275,7 +275,7 @@ if [ "$SLACKPKGPLUS" = "on" ];then rm $2-tmp done fi - } + } # END getfile() # override slackpkg checkgpg() # new checkgpg() is used to check gpg and to merge the CHECKSUMS.md5 files @@ -303,7 +303,7 @@ if [ "$SLACKPKGPLUS" = "on" ];then fi done fi - } + } # END checkgpg() # override slackpkg checkmd5() # Verify if the package was corrupted by checking md5sum @@ -331,7 +331,7 @@ if [ "$SLACKPKGPLUS" = "on" ];then else echo 0 fi - } + } # END checkmd5() # Found packages in repository. # This function selects the package from the higher priority @@ -343,7 +343,7 @@ if [ "$SLACKPKGPLUS" = "on" ];then # # repository_name:pattern # - function givepriority { + function givepriority() { local DIR local ARGUMENT=$1 local PKGDATA @@ -395,7 +395,7 @@ if [ "$SLACKPKGPLUS" = "on" ];then FULLNAME=$(echo "${PKGDATA[5]}.${PKGDATA[7]}") fi done - } + } # END givepriority() function searchPackages() { local i @@ -472,7 +472,7 @@ if [ "$SLACKPKGPLUS" = "on" ];then rm ${TMPDIR}/waiting echo -e "DONE\n" - } + } # END searchPackages() function searchlistEX() { local i @@ -538,7 +538,7 @@ if [ "$SLACKPKGPLUS" = "on" ];then printf " %-16s %-24s %-40s \n" "$STATUS" "$REPO" "${RAWNAME}" fi done - } + } # END searchlistEX() touch $TMPDIR/greylist.1 if [ -e $CONF/greylist ];then @@ -631,7 +631,7 @@ if [ "$SLACKPKGPLUS" = "on" ];then # function internal_blacklist() { echo "$1" >> ${TMPDIR}/blacklist.slackpkgplus - } + } # END internal_blacklist() # Override original applyblackist() so that internal blacklist will # be applied too. @@ -656,7 +656,7 @@ if [ "$SLACKPKGPLUS" = "on" ];then cat $TMPDIR/greylist.* >$TMPDIR/greylist grep -qvEw -f $TMPDIR/greylist $TMPDIR/pkglist-pre >$TMPDIR/unchecklist - } + } # END applyblacklist() # -- handle the event $1 that occured on packages $SHOWLIST # @@ -715,7 +715,7 @@ if [ "$SLACKPKGPLUS" = "on" ];then echo " " fi fi - } + } # END handle_event() # Overrides original remove_pkg(). Required by the notification mechanism. function remove_pkg() { @@ -731,7 +731,7 @@ if [ "$SLACKPKGPLUS" = "on" ];then fi done handle_event "remove" - } + } # END remove_pkg() # Overrides original upgrade_pkg(). Required by the notification mechanism. function upgrade_pkg() { @@ -758,7 +758,7 @@ if [ "$SLACKPKGPLUS" = "on" ];then done handle_event "upgrade" - } + } # END upgrade_pkg() # Overrides original install_pkg(). Required by the notification mechanism. function install_pkg() { @@ -785,7 +785,7 @@ if [ "$SLACKPKGPLUS" = "on" ];then fi done handle_event "install" - } + } # END install_pkg() function wgetdebug(){ local SRCURL @@ -823,7 +823,7 @@ if [ "$SLACKPKGPLUS" = "on" ];then return $WGETERR - } + } # END wgetdebug() DOWNLOADER="wget $WGETOPTS --no-check-certificate --passive-ftp -O" if [ "$VERBOSE" = "0" ];then From ab2a1e367172c64f9199c6102bac816f36985c4b Mon Sep 17 00:00:00 2001 From: Matteo Rossini Date: Wed, 1 Jul 2015 20:59:13 +0200 Subject: [PATCH 11/21] Version 1.4.99 - 01/Jul/2015 - Added priority by tag. Setting TAG_PRIORITY to 'yes' slackpkg+ automatically upgrade packages from repository where the tag is the same of the already installed package. --- ChangeLog.txt | 5 +++++ src/ChangeLog.txt | 5 +++++ src/slackpkgplus.sh | 40 +++++++++++++++++++++++++++++++++- src/slackpkgplus.x86.sample | 8 +++++++ src/slackpkgplus.x86_64.sample | 8 +++++++ 5 files changed, 65 insertions(+), 1 deletion(-) diff --git a/ChangeLog.txt b/ChangeLog.txt index 035bca7..a977866 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -1,3 +1,8 @@ +Version 1.4.99 - 01/Jul/2015 + - Added priority by tag. Setting TAG_PRIORITY to 'yes' slackpkg+ + automatically upgrade packages from repository where the tag is the same + of the already installed package. + Version 1.4.1 - 16/Jun/2015 - Fix for repositories having CHECKSUMS.md5.gz.asc diff --git a/src/ChangeLog.txt b/src/ChangeLog.txt index 035bca7..a977866 100644 --- a/src/ChangeLog.txt +++ b/src/ChangeLog.txt @@ -1,3 +1,8 @@ +Version 1.4.99 - 01/Jul/2015 + - Added priority by tag. Setting TAG_PRIORITY to 'yes' slackpkg+ + automatically upgrade packages from repository where the tag is the same + of the already installed package. + Version 1.4.1 - 16/Jun/2015 - Fix for repositories having CHECKSUMS.md5.gz.asc diff --git a/src/slackpkgplus.sh b/src/slackpkgplus.sh index 8de673a..a98cd73 100755 --- a/src/slackpkgplus.sh +++ b/src/slackpkgplus.sh @@ -18,6 +18,7 @@ if [ -e $CONF/slackpkgplus.conf ];then EXTVERBOSE=$VERBOSE EXTUSEBL=$USEBL EXTWGETOPTS=$WGETOPTS + EXTTAG_PRIORITY=$TAG_PRIORITY . $CONF/slackpkgplus.conf @@ -27,6 +28,7 @@ if [ -e $CONF/slackpkgplus.conf ];then VERBOSE=${EXTVERBOSE:-$VERBOSE} USEBL=${EXTUSEBL:-$USEBL} WGETOPTS=${EXTWGETOPTS:-$WGETOPTS} + TAG_PRIORITY=${EXTTAG_PRIORITY:-$TAG_PRIORITY} USEBLACKLIST=true if [ "$USEBL" == "0" ];then @@ -45,7 +47,7 @@ if [ "$SLACKPKGPLUS" = "on" ];then - SPKGPLUS_VERSION="1.4.1" + SPKGPLUS_VERSION="1.4.99" VERSION="$VERSION / slackpkg+ $SPKGPLUS_VERSION" @@ -290,6 +292,10 @@ if [ "$SLACKPKGPLUS" = "on" ];then echo 1 fi if [ "$(basename $1)" == "CHECKSUMS.md5" ];then + mv ${TMPDIR}/CHECKSUMS.md5 ${TMPDIR}/CHECKSUMS.md5-old + for PREPO in ${PRIORITY[*]};do + grep " \./$PREPO/" ${TMPDIR}/CHECKSUMS.md5-old >> ${TMPDIR}/CHECKSUMS.md5 + done X86_64=$(ls $ROOT/var/log/packages/aaa_base*x86_64* 2>/dev/null|head -1) for PREPO in $REPOPLUS;do if [ ! -z "$X86_64" ];then @@ -355,6 +361,37 @@ if [ "$SLACKPKGPLUS" = "on" ];then unset FULLNAME unset PKGDATA + AUTOP=no + if [ ! -z "$AUTOPRIORITY" ];then + if echo "$ARGUMENT"|grep -wq $AUTOPRIORITY;then + AUTOP=$TAG_PRIORITY + fi + fi + if [ "$CMD" == "upgrade-all" ];then + AUTOP=$TAG_PRIORITY + fi + if [ "$AUTOP" == "on" ] ; then + PKGINFOS=$( + cd /var/log/packages + ls $ARGUMENT-* 2>/dev/null |sed 's/$/.txz/' | awk -f /usr/libexec/slackpkg/pkglist.awk| + grep " $ARGUMENT "|awk '{print $1,$4}'| + ( read X + echo "$X"|sed -r -e 's/ [0-9]+([^0-9].*)*$/ [^ ]\\+ [^ ]\\+ [0-9]\\+\1 /' -e 's/^/ /' + echo "$X"|sed -r -e 's/ [0-9]+([^0-9].*)*$/ [^ ]\\+ [^ ]\\+ [0-9]\\+\1_slack[0-9]/' -e 's/^/ /' + )| grep -f - -n -m 1 ${TMPDIR}/pkglist + ) + if [ ! -z "$PKGINFOS" ] ; then + LINEIDX=$(echo "$PKGINFOS" | cut -f1 -d":") + PKGDATA=( $(echo "$PKGINFOS" | cut -f2- -d":") ) + sed -i --expression "${LINEIDX}d" --expression "${PRIORITYIDX}i${PKGDATA[*]}" ${TMPDIR}/pkglist + (( PRIORITYIDX++ )) + if [ "$PKGDATA" ]; then + NAME=${PKGDATA[1]} + FULLNAME=$(echo "${PKGDATA[5]}.${PKGDATA[7]}") + fi + fi + fi + for CPRIORITY in ${PRIORITY[@]} ; do [ "$PKGDATA" ] && break @@ -980,6 +1017,7 @@ if [ "$SLACKPKGPLUS" = "on" ];then # You can specify 'slackpkg install argument' where argument is a package name, part of package name, directory name in repository else package=$pref + AUTOPRIORITY=" $AUTOPRIORITY -e $package " fi if [ "$CMD" == "remove" ];then diff --git a/src/slackpkgplus.x86.sample b/src/slackpkgplus.x86.sample index 4e3dabf..fbc7ece 100644 --- a/src/slackpkgplus.x86.sample +++ b/src/slackpkgplus.x86.sample @@ -34,6 +34,14 @@ GREYLIST=on #PKGS_PRIORITY=( myrepo ) # +# Otherwise you can try to upgrade a package from a repository that contains a package with the +# same tag of the already installed package. Tipically that means to upgrade a package from the +# same author of the already installed package. +# Note that this method may not works properly where two repositories contains a package with the +# same tag. +# Set TAG_PRIORITY to 'on' to enable this function +TAG_PRIORITY=off + # List repositories you want to use (defined below) # remember to launch 'slackpkg update' if you modify that row. REPOPLUS=( slackpkgplus restricted alienbob slacky ) diff --git a/src/slackpkgplus.x86_64.sample b/src/slackpkgplus.x86_64.sample index 9ce85cd..9c55cbe 100644 --- a/src/slackpkgplus.x86_64.sample +++ b/src/slackpkgplus.x86_64.sample @@ -45,6 +45,14 @@ GREYLIST=on # # (Use /usr/doc/slackpkg+-*/setupmultilib.sh to setup a multilib configuration) +# Otherwise you can try to upgrade a package from a repository that contains a package with the +# same tag of the already installed package. Tipically that means to upgrade a package from the +# same author of the already installed package. +# Note that this method may not works properly where two repositories contains a package with the +# same tag. +# Set TAG_PRIORITY to 'on' to enable this function +TAG_PRIORITY=off + # List repositories you want to use (defined below) # remember to launch 'slackpkg update' if you modify that row. REPOPLUS=( slackpkgplus restricted alienbob slacky ) From fa0c164f2eda06fa4d4cc9e6f9a9e0e609e370f8 Mon Sep 17 00:00:00 2001 From: Matteo Rossini Date: Fri, 10 Jul 2015 20:16:58 +0200 Subject: [PATCH 12/21] Version 1.5.0 - 10/Jul/2015 - Fixed TAG_PRIORITY - Fixed repositories list --- ChangeLog.txt | 6 +++++- src/ChangeLog.txt | 6 +++++- src/README | 7 +++++++ src/greylist | 3 +++ src/repositories.txt | 2 +- src/slackpkgplus.sh | 12 +++++++----- src/slackpkgplus.x86.sample | 7 +++++++ src/slackpkgplus.x86_64.sample | 14 +++++++++++++- 8 files changed, 48 insertions(+), 9 deletions(-) diff --git a/ChangeLog.txt b/ChangeLog.txt index a977866..b160446 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -1,5 +1,9 @@ +Version 1.5.0 - 10/Jul/2015 + - Fixed TAG_PRIORITY + - Fixed repositories list + Version 1.4.99 - 01/Jul/2015 - - Added priority by tag. Setting TAG_PRIORITY to 'yes' slackpkg+ + - Added priority by tag. Setting TAG_PRIORITY to 'on' slackpkg+ automatically upgrade packages from repository where the tag is the same of the already installed package. diff --git a/src/ChangeLog.txt b/src/ChangeLog.txt index a977866..b160446 100644 --- a/src/ChangeLog.txt +++ b/src/ChangeLog.txt @@ -1,5 +1,9 @@ +Version 1.5.0 - 10/Jul/2015 + - Fixed TAG_PRIORITY + - Fixed repositories list + Version 1.4.99 - 01/Jul/2015 - - Added priority by tag. Setting TAG_PRIORITY to 'yes' slackpkg+ + - Added priority by tag. Setting TAG_PRIORITY to 'on' slackpkg+ automatically upgrade packages from repository where the tag is the same of the already installed package. diff --git a/src/README b/src/README index c3fc241..4a335ea 100644 --- a/src/README +++ b/src/README @@ -165,6 +165,13 @@ you do not explicitly exclude it: that means 'all ktown packages except harfbuzz' +Also you can set TAG_PRIORITY=on to allow slackpkg+ to select repository +from where the package was previously installed. +This method is based from tag of the installed package. +slackpkg+ search a package with the same tag in all repositories and use it. +If two repositories contains the same tag, it will honour REPOPLUS. + + ----- diff --git a/src/greylist b/src/greylist index b6bf76a..01cd67e 100644 --- a/src/greylist +++ b/src/greylist @@ -15,3 +15,6 @@ # You may want to greylist kde and/or kdei #kde #kdei +# +#do not upgrade packages installed with sbopkg; use it instead +#_SBo diff --git a/src/repositories.txt b/src/repositories.txt index 53ebb7b..9ce0f3e 100644 --- a/src/repositories.txt +++ b/src/repositories.txt @@ -12,7 +12,7 @@ Supported Repositories: > mles: http://www.microlinux.fr/microlinux/server-{14.0,14.1}-{32,64}bit/ > msb: http://slackware.org.uk/msb/{14.0,14.1}/{1.6,1.8,1.10}/{x86,x86_64}/ > slackers: http://ponce.cc/slackers/repository/ -> slacke17: http://ngc891.blogdns.net/pub/slacke17/slackware{,64,arm}-{14.0,14.1}/ +> slacke18: http://ngc891.blogdns.net/pub/slacke18/slackware{,64,arm}-14.1/ > studioware: http://studioware.org/files/packages/slackware{,64}-{13.37,14.0,14.1}/ > slackonly: http://slackonly.com/pub/packages/{14.1,current}-{x86,x86_64}/ > rlworkman: http://rlworkman.net/pkgs/{13.37,14.0,14.1}/ diff --git a/src/slackpkgplus.sh b/src/slackpkgplus.sh index a98cd73..dea50c7 100755 --- a/src/slackpkgplus.sh +++ b/src/slackpkgplus.sh @@ -47,7 +47,7 @@ if [ "$SLACKPKGPLUS" = "on" ];then - SPKGPLUS_VERSION="1.4.99" + SPKGPLUS_VERSION="1.5.0" VERSION="$VERSION / slackpkg+ $SPKGPLUS_VERSION" @@ -292,10 +292,12 @@ if [ "$SLACKPKGPLUS" = "on" ];then echo 1 fi if [ "$(basename $1)" == "CHECKSUMS.md5" ];then - mv ${TMPDIR}/CHECKSUMS.md5 ${TMPDIR}/CHECKSUMS.md5-old - for PREPO in ${PRIORITY[*]};do - grep " \./$PREPO/" ${TMPDIR}/CHECKSUMS.md5-old >> ${TMPDIR}/CHECKSUMS.md5 - done + if [ "$TAG_PRIORITY" == "on" ];then + mv ${TMPDIR}/CHECKSUMS.md5 ${TMPDIR}/CHECKSUMS.md5-old + for PREPO in ${PRIORITY[*]};do + grep " \./$PREPO/" ${TMPDIR}/CHECKSUMS.md5-old >> ${TMPDIR}/CHECKSUMS.md5 + done + fi X86_64=$(ls $ROOT/var/log/packages/aaa_base*x86_64* 2>/dev/null|head -1) for PREPO in $REPOPLUS;do if [ ! -z "$X86_64" ];then diff --git a/src/slackpkgplus.x86.sample b/src/slackpkgplus.x86.sample index fbc7ece..dce0139 100644 --- a/src/slackpkgplus.x86.sample +++ b/src/slackpkgplus.x86.sample @@ -31,8 +31,15 @@ GREYLIST=on # Examples: #PKGS_PRIORITY=( restricted:vlc ) +# OR #PKGS_PRIORITY=( myrepo ) +# +# if you have two reporitories to give priority you must set both in the same line +#PKGS_PRIORITY=( myrepo restricted:vlc ) # +# if you want to install 'ktown' repository you must set it here +#PKGS_PRIORITY=( ktown ) +# and read special instruction on /usr/doc/slackpkg+-*/repositories.txt # Otherwise you can try to upgrade a package from a repository that contains a package with the # same tag of the already installed package. Tipically that means to upgrade a package from the diff --git a/src/slackpkgplus.x86_64.sample b/src/slackpkgplus.x86_64.sample index 9c55cbe..2634335 100644 --- a/src/slackpkgplus.x86_64.sample +++ b/src/slackpkgplus.x86_64.sample @@ -10,9 +10,10 @@ SLACKPKGPLUS=on VERBOSE=1 # By default slackpkg+ deny to install 32bit packages. +# # Set this flag to 'on' allow slackpkg+ to install 32bit packages on a 64bit slackware # installation (possibly unsafe). Please, do not install both 32 and 64bit of the same -# package to avoid problems, and NEVER upgrade exitant 64bit packages with relative 32bit package. +# package to avoid problems, and NEVER upgrade existant 64bit packages with relative 32bit package. # Do not forget to install the multilibs. ALLOW32BIT=off @@ -38,12 +39,23 @@ GREYLIST=on # Examples: #PKGS_PRIORITY=( restricted:vlc ) +# OR #PKGS_PRIORITY=( myrepo ) +# +# if you have two reporitories to give priority you must set both in the same line +#PKGS_PRIORITY=( myrepo restricted:vlc ) +# +# if you want to install 'ktown' repository you must set it here +#PKGS_PRIORITY=( ktown ) +# and read special instruction on /usr/doc/slackpkg+-*/repositories.txt # # If you want a multilib system, uncomment the multilib repository and set: #PKGS_PRIORITY=( multilib ) # # (Use /usr/doc/slackpkg+-*/setupmultilib.sh to setup a multilib configuration) +# +# For both multilib and ktown set +#PKGS_PRIORITY=( multilib ktown ) # Otherwise you can try to upgrade a package from a repository that contains a package with the # same tag of the already installed package. Tipically that means to upgrade a package from the From 97aa85b460005ae0708447430a792b17e855524d Mon Sep 17 00:00:00 2001 From: Matteo Rossini Date: Fri, 20 Nov 2015 18:58:00 +0100 Subject: [PATCH 13/21] fixed a type. thanks to Ryan --- src/slackpkgplus.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/slackpkgplus.sh b/src/slackpkgplus.sh index dea50c7..6a4aef8 100755 --- a/src/slackpkgplus.sh +++ b/src/slackpkgplus.sh @@ -618,7 +618,7 @@ if [ "$SLACKPKGPLUS" = "on" ];then if [ $CONF/slackpkgplus.conf -nt $WORKDIR/pkglist -a "$CMD" != "update" ];then echo - echo "NOTICE: remember to re-run 'slackpkg update' after modifing slackpkgplus.conf" + echo "NOTICE: remember to re-run 'slackpkg update' after modifying slackpkgplus.conf" echo sleep 5 fi From 76ba05be8258ee5ef499a7d3fb9f778af380563a Mon Sep 17 00:00:00 2001 From: Matteo Rossini Date: Fri, 20 Nov 2015 19:09:45 +0100 Subject: [PATCH 14/21] Added the 'DOWNLOADER' option. You can now specify a custom downloader to use. See README for details --- src/README | 25 +++++++++++++++++++++++++ src/slackpkgplus.sh | 20 ++++++++++++-------- src/slackpkgplus.x86.sample | 4 ++++ src/slackpkgplus.x86_64.sample | 4 ++++ 4 files changed, 45 insertions(+), 8 deletions(-) diff --git a/src/README b/src/README index 4a335ea..7022154 100644 --- a/src/README +++ b/src/README @@ -378,6 +378,31 @@ in slackpkgplus.conf ----- +DOWNLOADER Option + +You can choose to use an alternative to wget. + +Note that downloader will be called as +$DOWNLOADER destinationfile url + +The base is +DOWNLOADER="wget -O" +by default slackpkgplus adds other useful options: +DOWNLOADER="wget $WGETOPTS -nv --no-check-certificate --passive-ftp -O" + +If you like curl: +DOWNLOADER="curl -o" +you can add other options BEFORE the last '-o' switch: +DOWNLOADER="curl -v -o" + +If you want use a multi-connection (parallel) download, you can install aria2 +(http://aria2.sourceforge.net/) and set +DOWNLOADER="aria2c -x 16 -s 16 --auto-file-renaming=false --allow-overwrite=true -d / -o" +if you have proxy add +DOWNLOADER="aria2c --all-proxy=someproxy:8080 -x 16 -s 16 --auto-file-renaming=false --allow-overwrite=true -d / -o" + + +----- ALLOW32BIT diff --git a/src/slackpkgplus.sh b/src/slackpkgplus.sh index 6a4aef8..474317b 100755 --- a/src/slackpkgplus.sh +++ b/src/slackpkgplus.sh @@ -18,6 +18,7 @@ if [ -e $CONF/slackpkgplus.conf ];then EXTVERBOSE=$VERBOSE EXTUSEBL=$USEBL EXTWGETOPTS=$WGETOPTS + EXTDOWNLOADER=$DOWNLOADER EXTTAG_PRIORITY=$TAG_PRIORITY . $CONF/slackpkgplus.conf @@ -28,6 +29,7 @@ if [ -e $CONF/slackpkgplus.conf ];then VERBOSE=${EXTVERBOSE:-$VERBOSE} USEBL=${EXTUSEBL:-$USEBL} WGETOPTS=${EXTWGETOPTS:-$WGETOPTS} + DOWNLOADER=${EXTDOWNLOADER:-$DOWNLOADER} TAG_PRIORITY=${EXTTAG_PRIORITY:-$TAG_PRIORITY} USEBLACKLIST=true @@ -864,15 +866,17 @@ if [ "$SLACKPKGPLUS" = "on" ];then } # END wgetdebug() - DOWNLOADER="wget $WGETOPTS --no-check-certificate --passive-ftp -O" - if [ "$VERBOSE" = "0" ];then - DOWNLOADER="wget $WGETOPTS --no-check-certificate -nv --passive-ftp -O" - elif [ "$VERBOSE" = "2" ];then + if [ -z "$DOWNLOADER" ];then DOWNLOADER="wget $WGETOPTS --no-check-certificate --passive-ftp -O" - elif [ "$VERBOSE" = "3" ];then - DOWNLOADER="wgetdebug" - elif [ "$CMD" = "update" ];then - DOWNLOADER="wget $WGETOPTS --no-check-certificate -nv --passive-ftp -O" + if [ "$VERBOSE" = "0" ];then + DOWNLOADER="wget $WGETOPTS --no-check-certificate -nv --passive-ftp -O" + elif [ "$VERBOSE" = "2" ];then + DOWNLOADER="wget $WGETOPTS --no-check-certificate --passive-ftp -O" + elif [ "$VERBOSE" = "3" ];then + DOWNLOADER="wgetdebug" + elif [ "$CMD" = "update" ];then + DOWNLOADER="wget $WGETOPTS --no-check-certificate -nv --passive-ftp -O" + fi fi # Global variable required by givepriority() diff --git a/src/slackpkgplus.x86.sample b/src/slackpkgplus.x86.sample index dce0139..f2b8045 100644 --- a/src/slackpkgplus.x86.sample +++ b/src/slackpkgplus.x86.sample @@ -18,6 +18,10 @@ USEBL=1 # You can solve the repository indisponibility issue by set a timeout here WGETOPTS="--timeout=20 --tries=2" +# If you want replace wget with another downloader search DOWNLOADER in documentation +# at /usr/doc/slackpkg+-*/README +#DOWNLOADER="wget -O" + # Enable (on) / Disable (off) notification events (see notifymsg.conf) #ENABLENOTIFY=off diff --git a/src/slackpkgplus.x86_64.sample b/src/slackpkgplus.x86_64.sample index 2634335..95bb8a6 100644 --- a/src/slackpkgplus.x86_64.sample +++ b/src/slackpkgplus.x86_64.sample @@ -26,6 +26,10 @@ USEBL=1 # You can solve the repository indisponibility issue by set a timeout here WGETOPTS="--timeout=20 --tries=2" +# If you want replace wget with another downloader search DOWNLOADER in documentation +# at /usr/doc/slackpkg+-*/README +#DOWNLOADER="wget -O" + # Enable (on) / Disable (off) notification events (see notifymsg.conf) #ENABLENOTIFY=off From 60e11fa385365d125d545474cad24259576efb00 Mon Sep 17 00:00:00 2001 From: Matteo Rossini Date: Fri, 20 Nov 2015 19:20:07 +0100 Subject: [PATCH 15/21] Updated KTOWN documentation --- src/README | 61 ++++++++++++++++++---------------- src/repositories.txt | 15 +++------ src/slackpkgplus.x86.sample | 2 +- src/slackpkgplus.x86_64.sample | 2 +- 4 files changed, 40 insertions(+), 40 deletions(-) diff --git a/src/README b/src/README index 7022154..653f9ba 100644 --- a/src/README +++ b/src/README @@ -151,7 +151,7 @@ for example: PKGS_PRIORITY=( alienbob:openjdk ) accepts a regular expression, so for example - PKGS_PRIORITY=( restricted:.*vlc.* ) + PKGS_PRIORITY=( restricted:.* vlc.* ) means 'all packages containing the "vlc" string' PKGS_PRIORITY=( ktown:.* ) means 'all packages in repository ktown' @@ -222,22 +222,37 @@ or just re-run KTOWN (LATEST KDE) If you want to install the latest KDE packages from AlienBOB's ktown repository -(currently 4.14.3 and 5.0.2), add "PKGS_PRIORITY=( ktown )" then launch: +(currently kde 4.14.3 in slackware 14.1 and kde 5.15.7 in slackware current), +add "PKGS_PRIORITY=( ktown )" # slackpkg update gpg # slackpkg update -# slackpkg install ktown -# slackpkg upgrade-all -Do not forget to read the special instructions from - http://taper.alienbase.nl/mirrors/alien-kde/current/latest/ (kde 4) - http://taper.alienbase.nl/mirrors/alien-kde/current/testing/ (kde 5) -because you may need to do some manual operation. At the time of writing, for kde4: -# slackpkg remove kdeadmin kdenetwork kdesdk kdetoys kwallet kdnssd -for kde5: -add to /etc/rc.d/rc.4" right after the line 'echo "Starting up X11 session manager..."': - if [ -x /usr/bin/sddm ]; then - exec /usr/bin/sddm - fi +To install ktown you need some attention, so please refeer to official +documentation for details: +http://alien.slackbook.org/ktown/14.1/latest/ (kde 4) +http://alien.slackbook.org/ktown/current/5/ (kde 5) + +* ktown4 on slackware 14.1: + +slackpkg install ktown +slackpkg upgrade-all +slackpkg remove kdeadmin kdenetwork kdesdk kdetoys kwallet kdnssd +slackpkg clean-system + +* ktown5 on slackware current: + +slackpkg remove libkscreen kscreen kactivities kde-workspace libmm-qt libnm-qt plasma-nm polkit-kde-agent-1 polkit-kde-kcmodules-1 kdeconnect-kde +slackpkg install ktown +slackpkg upgrade-all +slackpkg clean-system + +if you are upgrading an already installed ktown5, you may also need +slackpkg reinstall ktown +BEFORE slackpkg install ktown + + +Note - for both ktown4 and ktown5 - that the packages to remove may change in newer version of ktown (at moment are kde-4.14.3 and kde-5_15.11), so I encourage to read linked documents BEFORE install it. + After that, you can keep the ktown KDE up-to-date by launching: # slackpkg update @@ -245,25 +260,15 @@ After that, you can keep the ktown KDE up-to-date by launching: Periodically you should re-run # slackpkg install ktown -To restore the Slackware KDE, remove 'ktown' from PKGS_PRIORITY and from -REPOPLUS, but do NOT delete the related MIRRORPLUS line, then launch: +To restore the Slackware KDE, remove all 'ktown' referall in config file, then launch: # slackpkg update -# slackpkg upgrade-all +# slackpkg reinstall kde # slackpkg install kde -# slackpkg remove ktown -then delete or comment the related MIRRORPLUS line and launch: +# slackpkg upgrade-all +# slackpkg clean-system ktown # slackpkg update -note that ktown5 requires ktown4, so you must configure both repositories: -PKGS_PRIORITY=( ktown5 ktown4 ) -MIRRORPLUS['ktown4']=.... -MIRRORPLUS['ktown5']=.... - -and then run -... -# slackpkg install ktown5 ktown4 - ----- diff --git a/src/repositories.txt b/src/repositories.txt index 9ce0f3e..9632f0b 100644 --- a/src/repositories.txt +++ b/src/repositories.txt @@ -35,7 +35,7 @@ You can find a larger list at http://slakfinder.org Some specific notes: * multilib: - Please, run /usr/doc/slackpkg+-*/setupmultilib.sh to setup it + Please, run /usr/doc/slackpkg+-*/setupmultilib.sh to setup it. Periodically you should run "slackpkg install multilib" after run "slackpkg upgrade-all" @@ -45,17 +45,12 @@ Some specific notes: after run "slackpkg upgrade-all" at moment 'latest' is 'kde4', 'testing' is 'kde5'. after install you need to do some postinstall operation, see - http://taper.alienbase.nl/mirrors/alien-kde/current/latest/ - http://taper.alienbase.nl/mirrors/alien-kde/current/testing/ + http://alien.slackbook.org/ktown/14.1/latest/ + http://alien.slackbook.org/ktown/current/5/ kde4: slackpkg remove kdeadmin kdenetwork kdesdk kdetoys kwallet kdnssd kde5: - kde5 require kde4, so configure both repositories. - add the following lines to the Slackware file "/etc/rc.d/rc.4" right after - the line: echo "Starting up X11 session manager..." - - if [ -x /usr/bin/sddm ]; then - exec /usr/bin/sddm - fi + kde5 (available only in slackware-current) + slackpkg remove libkscreen kscreen kactivities kde-workspace libmm-qt libnm-qt plasma-nm polkit-kde-agent-1 polkit-kde-kcmodules-1 kdeconnect-kde Please read /usr/doc/slackpkg+-*/README for more details diff --git a/src/slackpkgplus.x86.sample b/src/slackpkgplus.x86.sample index f2b8045..52329ae 100644 --- a/src/slackpkgplus.x86.sample +++ b/src/slackpkgplus.x86.sample @@ -43,7 +43,7 @@ GREYLIST=on # # if you want to install 'ktown' repository you must set it here #PKGS_PRIORITY=( ktown ) -# and read special instruction on /usr/doc/slackpkg+-*/repositories.txt +# and DO NOT MISS to read special instruction on /usr/doc/slackpkg+-*/repositories.txt # Otherwise you can try to upgrade a package from a repository that contains a package with the # same tag of the already installed package. Tipically that means to upgrade a package from the diff --git a/src/slackpkgplus.x86_64.sample b/src/slackpkgplus.x86_64.sample index 95bb8a6..e3dbae9 100644 --- a/src/slackpkgplus.x86_64.sample +++ b/src/slackpkgplus.x86_64.sample @@ -51,7 +51,7 @@ GREYLIST=on # # if you want to install 'ktown' repository you must set it here #PKGS_PRIORITY=( ktown ) -# and read special instruction on /usr/doc/slackpkg+-*/repositories.txt +# and DO NOT MISS to read special instruction on /usr/doc/slackpkg+-*/repositories.txt # # If you want a multilib system, uncomment the multilib repository and set: #PKGS_PRIORITY=( multilib ) From e2777e0260e95e6a2fd62a91c7b6c6e204538d8c Mon Sep 17 00:00:00 2001 From: Matteo Rossini Date: Fri, 20 Nov 2015 19:32:19 +0100 Subject: [PATCH 16/21] TAG_PRIORITY=on was impacting also slackpkg install. Fixed --- src/slackpkgplus.sh | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/slackpkgplus.sh b/src/slackpkgplus.sh index 474317b..557de53 100755 --- a/src/slackpkgplus.sh +++ b/src/slackpkgplus.sh @@ -366,14 +366,16 @@ if [ "$SLACKPKGPLUS" = "on" ];then unset PKGDATA AUTOP=no - if [ ! -z "$AUTOPRIORITY" ];then - if echo "$ARGUMENT"|grep -wq $AUTOPRIORITY;then + if [[ "$CMD" == "upgrade" || "$CMD" == "upgrade-all" ]];then + if [ ! -z "$AUTOPRIORITY" ];then + if echo "$ARGUMENT"|grep -wq $AUTOPRIORITY;then + AUTOP=$TAG_PRIORITY + fi + fi + if [ "$CMD" == "upgrade-all" ];then AUTOP=$TAG_PRIORITY fi fi - if [ "$CMD" == "upgrade-all" ];then - AUTOP=$TAG_PRIORITY - fi if [ "$AUTOP" == "on" ] ; then PKGINFOS=$( cd /var/log/packages From 7d303ac5e507022a59bd987085e951152e4e9f90 Mon Sep 17 00:00:00 2001 From: Matteo Rossini Date: Fri, 20 Nov 2015 20:35:48 +0100 Subject: [PATCH 17/21] Fixed a casting problem with REPOPLUS variable. It was used both as array and as string, so under some conditions (for example a broken o misconfigured repository) the repositories update fails. --- src/slackpkgplus.sh | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/slackpkgplus.sh b/src/slackpkgplus.sh index 557de53..be4b8ee 100755 --- a/src/slackpkgplus.sh +++ b/src/slackpkgplus.sh @@ -164,7 +164,7 @@ if [ "$SLACKPKGPLUS" = "on" ];then if [ $(basename $1) = "CHECKSUMS.md5.asc" ];then if [ "$CHECKGPG" = "on" ];then - for PREPO in $REPOPLUS;do + for PREPO in ${REPOPLUS[*]};do URLFILE=${MIRRORPLUS[${PREPO/SLACKPKGPLUS_}]}CHECKSUMS.md5.asc if echo $URLFILE | grep -q "^dir:/" ; then continue @@ -222,7 +222,7 @@ if [ "$SLACKPKGPLUS" = "on" ];then fi fi if [ $(basename $1) = "ChangeLog.txt" ];then - for PREPO in $REPOPLUS;do + for PREPO in ${REPOPLUS[*]};do # Not all repositories have the ChangeLog.txt, so I use md5 of CHECKSUMS.md5 instead URLFILE=${MIRRORPLUS[${PREPO/SLACKPKGPLUS_}]}CHECKSUMS.md5 if echo $URLFILE | grep -q "^file://" ; then @@ -251,7 +251,7 @@ if [ "$SLACKPKGPLUS" = "on" ];then done fi if [ $(basename $1) = "GPG-KEY" ];then - for PREPO in $REPOPLUS;do + for PREPO in ${REPOPLUS[*]};do if [ "${PREPO:0:4}" = "dir:" ];then continue fi @@ -301,7 +301,7 @@ if [ "$SLACKPKGPLUS" = "on" ];then done fi X86_64=$(ls $ROOT/var/log/packages/aaa_base*x86_64* 2>/dev/null|head -1) - for PREPO in $REPOPLUS;do + for PREPO in ${REPOPLUS[*]};do if [ ! -z "$X86_64" ];then if [ "$ALLOW32BIT" == "on" ];then egrep -e ^[a-f0-9]{32} ${TMPDIR}/CHECKSUMS.md5-$PREPO|egrep -v -- "-(arm)-" |sed -r "s# \./# ./SLACKPKGPLUS_$PREPO/#" >> ${TMPDIR}/CHECKSUMS.md5 @@ -606,7 +606,7 @@ if [ "$SLACKPKGPLUS" = "on" ];then done REPOPLUS=$(echo "${REPOPLUS[*]} ${PURE_PKGSPRIORITY[*]} ${!MIRRORPLUS[*]}"|sed 's/ /\n/g'|sed 's/:.*//'|awk '{if(!a[$1]++)print $1}') - PRIORITY=( ${PRIORITY[*]} SLACKPKGPLUS_$(echo $REPOPLUS|sed 's/ / SLACKPKGPLUS_/g') ) + PRIORITY=( ${PRIORITY[*]} SLACKPKGPLUS_$(echo ${REPOPLUS[*]}|sed 's/ / SLACKPKGPLUS_/g') ) # Test repositories for pp in ${REPOPLUS[*]};do @@ -886,7 +886,7 @@ if [ "$SLACKPKGPLUS" = "on" ];then PRIORITYIDX=1 touch ${TMPDIR}/pkglist-pre - for PREPO in $REPOPLUS;do + for PREPO in ${REPOPLUS[*]};do pref=${MIRRORPLUS[$PREPO]} if [ "${pref:0:5}" = "dir:/" ];then localpath=$(echo "$pref" | cut -f2- -d":"|sed -e 's_/$__' -e 's_//_/_') @@ -1148,7 +1148,7 @@ if [ "$SLACKPKGPLUS" = "on" ];then printf "\n [ %-24s ] [ %-20s ]\n" "Repository" "Status" - for REPO in slackware $REPOPLUS; do + for REPO in slackware ${REPOPLUS[*]}; do if grep -q "^${REPO}$" ${TMPDIR}/updated-repos.txt ; then printf " %-24s %-20s \n" "$REPO" "AVAILABLE UPDATES" else From bdfdefea5b99e204a19950979b285adfb8f19432 Mon Sep 17 00:00:00 2001 From: Matteo Rossini Date: Fri, 20 Nov 2015 20:44:58 +0100 Subject: [PATCH 18/21] The trailing slash in MIRRORPLUS is now optional --- src/slackpkgplus.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/slackpkgplus.sh b/src/slackpkgplus.sh index be4b8ee..7b26ba2 100755 --- a/src/slackpkgplus.sh +++ b/src/slackpkgplus.sh @@ -583,6 +583,12 @@ if [ "$SLACKPKGPLUS" = "on" ];then done } # END searchlistEX() + # Ensure each repository url has a trailing slash... + # + for PREPO in "${!MIRRORPLUS[@]}" ; do + MIRRORPLUS[$PREPO]="${MIRRORPLUS[$PREPO]%/}/" + done + touch $TMPDIR/greylist.1 if [ -e $CONF/greylist ];then cat $CONF/greylist|sed -e 's/#.*//'|grep -v -e '^#' -e '^$'|awk '{print $1}'|sort -u >$TMPDIR/greylist.1 From aca37951703d5f85f7fd70d519ab0c109d002085 Mon Sep 17 00:00:00 2001 From: Matteo Rossini Date: Fri, 20 Nov 2015 20:59:35 +0100 Subject: [PATCH 19/21] use DOWNLOADCMD option instead DOWNLOADER that is already in use. --- src/README | 16 ++++++++-------- src/slackpkgplus.sh | 8 +++++--- src/slackpkgplus.x86.sample | 4 ++-- src/slackpkgplus.x86_64.sample | 4 ++-- 4 files changed, 17 insertions(+), 15 deletions(-) diff --git a/src/README b/src/README index 653f9ba..51e7839 100644 --- a/src/README +++ b/src/README @@ -383,28 +383,28 @@ in slackpkgplus.conf ----- -DOWNLOADER Option +DOWNLOADCMD Option You can choose to use an alternative to wget. Note that downloader will be called as -$DOWNLOADER destinationfile url +$DOWNLOADCMD destinationfile url The base is -DOWNLOADER="wget -O" +DOWNLOADCMD="wget -O" by default slackpkgplus adds other useful options: -DOWNLOADER="wget $WGETOPTS -nv --no-check-certificate --passive-ftp -O" +DOWNLOADCMD="wget $WGETOPTS -nv --no-check-certificate --passive-ftp -O" If you like curl: -DOWNLOADER="curl -o" +DOWNLOADCMD="curl -o" you can add other options BEFORE the last '-o' switch: -DOWNLOADER="curl -v -o" +DOWNLOADCMD="curl -v -o" If you want use a multi-connection (parallel) download, you can install aria2 (http://aria2.sourceforge.net/) and set -DOWNLOADER="aria2c -x 16 -s 16 --auto-file-renaming=false --allow-overwrite=true -d / -o" +DOWNLOADCMD="aria2c -x 16 -s 16 --auto-file-renaming=false --allow-overwrite=true -d / -o" if you have proxy add -DOWNLOADER="aria2c --all-proxy=someproxy:8080 -x 16 -s 16 --auto-file-renaming=false --allow-overwrite=true -d / -o" +DOWNLOADCMD="aria2c --all-proxy=someproxy:8080 -x 16 -s 16 --auto-file-renaming=false --allow-overwrite=true -d / -o" ----- diff --git a/src/slackpkgplus.sh b/src/slackpkgplus.sh index 7b26ba2..3bc58c7 100755 --- a/src/slackpkgplus.sh +++ b/src/slackpkgplus.sh @@ -18,7 +18,7 @@ if [ -e $CONF/slackpkgplus.conf ];then EXTVERBOSE=$VERBOSE EXTUSEBL=$USEBL EXTWGETOPTS=$WGETOPTS - EXTDOWNLOADER=$DOWNLOADER + EXTDOWNLOADCMD=$DOWNLOADCMD EXTTAG_PRIORITY=$TAG_PRIORITY . $CONF/slackpkgplus.conf @@ -29,7 +29,7 @@ if [ -e $CONF/slackpkgplus.conf ];then VERBOSE=${EXTVERBOSE:-$VERBOSE} USEBL=${EXTUSEBL:-$USEBL} WGETOPTS=${EXTWGETOPTS:-$WGETOPTS} - DOWNLOADER=${EXTDOWNLOADER:-$DOWNLOADER} + DOWNLOADCMD=${EXTDOWNLOADCMD:-$DOWNLOADCMD} TAG_PRIORITY=${EXTTAG_PRIORITY:-$TAG_PRIORITY} USEBLACKLIST=true @@ -874,7 +874,9 @@ if [ "$SLACKPKGPLUS" = "on" ];then } # END wgetdebug() - if [ -z "$DOWNLOADER" ];then + if [ ! -z "$DOWNLOADCMD" ];then + DOWNLOADER="$DOWNLOADCMD" + else DOWNLOADER="wget $WGETOPTS --no-check-certificate --passive-ftp -O" if [ "$VERBOSE" = "0" ];then DOWNLOADER="wget $WGETOPTS --no-check-certificate -nv --passive-ftp -O" diff --git a/src/slackpkgplus.x86.sample b/src/slackpkgplus.x86.sample index 52329ae..cf2920b 100644 --- a/src/slackpkgplus.x86.sample +++ b/src/slackpkgplus.x86.sample @@ -18,9 +18,9 @@ USEBL=1 # You can solve the repository indisponibility issue by set a timeout here WGETOPTS="--timeout=20 --tries=2" -# If you want replace wget with another downloader search DOWNLOADER in documentation +# If you want replace wget with another downloader search DOWNLOADCMD in documentation # at /usr/doc/slackpkg+-*/README -#DOWNLOADER="wget -O" +#DOWNLOADCMD="wget -O" # Enable (on) / Disable (off) notification events (see notifymsg.conf) #ENABLENOTIFY=off diff --git a/src/slackpkgplus.x86_64.sample b/src/slackpkgplus.x86_64.sample index e3dbae9..873d713 100644 --- a/src/slackpkgplus.x86_64.sample +++ b/src/slackpkgplus.x86_64.sample @@ -26,9 +26,9 @@ USEBL=1 # You can solve the repository indisponibility issue by set a timeout here WGETOPTS="--timeout=20 --tries=2" -# If you want replace wget with another downloader search DOWNLOADER in documentation +# If you want replace wget with another downloader search DOWNLOADCMD in documentation # at /usr/doc/slackpkg+-*/README -#DOWNLOADER="wget -O" +#DOWNLOADCMD="wget -O" # Enable (on) / Disable (off) notification events (see notifymsg.conf) #ENABLENOTIFY=off From 7c01349a320a25dd4d0ca045e690aa3a24edc736 Mon Sep 17 00:00:00 2001 From: Matteo Rossini Date: Fri, 20 Nov 2015 22:17:00 +0100 Subject: [PATCH 20/21] Version 1.5.1 - 20/Nov/2015 Note for Slackware 14.1 users: slackware-current introduce important bug fix in slackpkg 2.82.0-14 (see Slackware ChangeLog) not backported in slackware 14.1; it is not mandatory but you are encouraged to upgrade it by download it manually; be sure to graylist slackpkg to avoid an automatic downgrade. - The trailing slash in MIRRORPLUS[] is now optional (thanks to phenixia2003 and Didier Spaier) - Added DOWNLOADCMD option to add a custom downloader - Fixed a bug that causes that ALL repositories fail if ONE repository fails (thanks to FR on Alien Pasture for reporting) - Fixed TAG_PRIORITY to avoid impact in slackpkg install --- ChangeLog.txt | 12 ++++++++++++ src/ChangeLog.txt | 12 ++++++++++++ src/slackpkgplus.sh | 2 +- 3 files changed, 25 insertions(+), 1 deletion(-) diff --git a/ChangeLog.txt b/ChangeLog.txt index b160446..19933f0 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -1,3 +1,15 @@ +Version 1.5.1 - 20/Nov/2015 + Note for Slackware 14.1 users: slackware-current introduce important bug fix + in slackpkg 2.82.0-14 (see Slackware ChangeLog) not backported in slackware + 14.1; it is not mandatory but you are encouraged to upgrade it by download it + manually; be sure to graylist slackpkg to avoid an automatic downgrade. + - The trailing slash in MIRRORPLUS[] is now optional (thanks to phenixia2003 + and Didier Spaier) + - Added DOWNLOADCMD option to add a custom downloader + - Fixed a bug that causes that ALL repositories fail if ONE repository fails + (thanks to FR on Alien Pasture for reporting) + - Fixed TAG_PRIORITY to avoid impact in slackpkg install + Version 1.5.0 - 10/Jul/2015 - Fixed TAG_PRIORITY - Fixed repositories list diff --git a/src/ChangeLog.txt b/src/ChangeLog.txt index b160446..19933f0 100644 --- a/src/ChangeLog.txt +++ b/src/ChangeLog.txt @@ -1,3 +1,15 @@ +Version 1.5.1 - 20/Nov/2015 + Note for Slackware 14.1 users: slackware-current introduce important bug fix + in slackpkg 2.82.0-14 (see Slackware ChangeLog) not backported in slackware + 14.1; it is not mandatory but you are encouraged to upgrade it by download it + manually; be sure to graylist slackpkg to avoid an automatic downgrade. + - The trailing slash in MIRRORPLUS[] is now optional (thanks to phenixia2003 + and Didier Spaier) + - Added DOWNLOADCMD option to add a custom downloader + - Fixed a bug that causes that ALL repositories fail if ONE repository fails + (thanks to FR on Alien Pasture for reporting) + - Fixed TAG_PRIORITY to avoid impact in slackpkg install + Version 1.5.0 - 10/Jul/2015 - Fixed TAG_PRIORITY - Fixed repositories list diff --git a/src/slackpkgplus.sh b/src/slackpkgplus.sh index 3bc58c7..839fe29 100755 --- a/src/slackpkgplus.sh +++ b/src/slackpkgplus.sh @@ -49,7 +49,7 @@ if [ "$SLACKPKGPLUS" = "on" ];then - SPKGPLUS_VERSION="1.5.0" + SPKGPLUS_VERSION="1.5.1" VERSION="$VERSION / slackpkg+ $SPKGPLUS_VERSION" From ba9cc23ddcd0023db3c3c98260702979138254e0 Mon Sep 17 00:00:00 2001 From: Matteo Rossini Date: Sun, 22 Nov 2015 19:26:11 +0100 Subject: [PATCH 21/21] Another important casting problem. --- src/slackpkgplus.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/slackpkgplus.sh b/src/slackpkgplus.sh index 839fe29..c1e2ea7 100755 --- a/src/slackpkgplus.sh +++ b/src/slackpkgplus.sh @@ -611,7 +611,7 @@ if [ "$SLACKPKGPLUS" = "on" ];then ((INDEX++)) done - REPOPLUS=$(echo "${REPOPLUS[*]} ${PURE_PKGSPRIORITY[*]} ${!MIRRORPLUS[*]}"|sed 's/ /\n/g'|sed 's/:.*//'|awk '{if(!a[$1]++)print $1}') + REPOPLUS=( $(echo "${REPOPLUS[*]} ${PURE_PKGSPRIORITY[*]} ${!MIRRORPLUS[*]}"|sed 's/ /\n/g'|sed 's/:.*//'|awk '{if(!a[$1]++)print $1}') ) PRIORITY=( ${PRIORITY[*]} SLACKPKGPLUS_$(echo ${REPOPLUS[*]}|sed 's/ / SLACKPKGPLUS_/g') ) # Test repositories