Version 1.0 - 11/Nov/2013

- slackpkg+ 1.0 stable finally relased
  - All repositories aligned to newest slackware version
  - Documentation reformatting and some typo fix (thanx to idlemoor)
  - Added function 'notification on event' that allow to insert reminders
    when you install/ugrade/remove some packages. See slackpkgplus.conf samples.
    (thanks to phenixia2003)
This commit is contained in:
Matteo Rossini 2013-11-11 15:20:30 +01:00
parent 2d207c0681
commit 25e266aa2d
7 changed files with 223 additions and 20 deletions

View file

@ -1,3 +1,11 @@
Version 1.0 - 11/Nov/2013
- slackpkg+ 1.0 stable finally relased
- All repositories aligned to newest slackware version
- Documentation reformatting and some typo fix (thanx to idlemoor)
- Added function 'notification on event' that allow to insert reminders
when you install/ugrade/remove some packages. See slackpkgplus.conf samples.
(thanks to phenixia2003)
Version 1.0rc3 - 28/Oct/2013
- slackpkg+ 1.0 release candidate 3. Last call. :)
- Added setupmultilib.sh in /usr/doc/slackpkg+-*, an helper for configure

View file

@ -1,3 +1,11 @@
Version 1.0 - 11/Nov/2013
- slackpkg+ 1.0 stable finally relased
- All repositories aligned to newest slackware version
- Documentation reformatting and some typo fix (thanx to idlemoor)
- Added function 'notification on event' that allow to insert reminders
when you install/ugrade/remove some packages. See slackpkgplus.conf samples.
(thanks to phenixia2003)
Version 1.0rc3 - 28/Oct/2013
- slackpkg+ 1.0 release candidate 3. Last call. :)
- Added setupmultilib.sh in /usr/doc/slackpkg+-*, an helper for configure

View file

@ -1,27 +1,29 @@
Supported Repositories:
> Supports GPG
> 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}/
> 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}/
> zerouno: http://www.z01.eu/repo-slack/slackware64-current/
> 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/
> mlws: http://www.microlinux.fr/slackware/MLWS-{14.0,14.1}-{32,64}bit/
> msb: http://slackware.org.uk/msb/{14.0,14.1}/1.6/{x86,x86_64}/
> slackers: http://www.slackers.it/repository/
> 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}/
> 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}/
> zerouno: http://www.z01.eu/repo-slack/slackware64-current/
> 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/
> mlws: http://www.microlinux.fr/slackware/MLWS-{14.0,14.1}-{32,64}bit/
> msb: http://slackware.org.uk/msb/{14.0,14.1}/1.6/{x86,x86_64}/
> slackers: http://www.slackers.it/repository/
> slacke17: http://ngc891.blogdns.net/pub/slacke17/slackware{,64,arm}-{14.0,14.1}/
>
> Does NOT support GPG
> salixos(*): http://download.salixos.org/{i486,x86_64}/{13.37,14.0}/
> salixext: http://people.salixos.org/ralvex/repository/x86_64/14.0/
> rlworkman: http://rlworkman.net/pkgs/{13.37,14.0}/
> slackel: http://www.slackel.gr/repo/{i486,x86_64}/current/
> 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/
(*) salixos partially supports GPG. This repository contains the .asc file for CHECKSUMS.md5,
so the 'update' process works with CHECKGPG=on and repository authenticity is guaranteed.
(*) salixos and rlworkman 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
install the packages with 'slackpkg -checkgpg=off install <packagename>', but the
authenticity is guaranteed by the md5 authenticity.

View file

@ -81,7 +81,7 @@ if [ "$ANS" == "y" -o "$ANS" == "Y" ];then
echo "# slackpkg update gpg"
echo "# slackpkg update"
echo "# slackpkg upgrade gcc glibc"
echo "# slackpkg remove multilib"
echo "# slackpkg install multilib"
fi
echo "To keep multilib updated, simply type:"
echo "# slackpkg upgrade-all"

View file

@ -3,6 +3,8 @@
declare -A MIRRORPLUS
declare -A NOTIFYMSG
if [ -e /etc/slackpkg/slackpkgplus.conf ];then
# You can override SLACKPKGPLUS VERBOSE USEBL from command-line
EXTSLACKPKGPLUS=$SLACKPKGPLUS
@ -23,6 +25,10 @@ fi
if [ "$SLACKPKGPLUS" = "on" ];then
SPKGPLUS_VERSION="1.0"
VERSION="$VERSION / slackpkg+ $SPKGPLUS_VERSION"
if [ ! -e "$WORKDIR" ];then
mkdir -p "$WORKDIR"
fi
@ -543,6 +549,113 @@ if [ "$SLACKPKGPLUS" = "on" ];then
fi
}
# -- handle the event $1 that occured on packages $SHOWLIST
#
# $1 the event that occurs, which can be install, upgrade, remove
#
function handle_event() {
local EVENT="$1"
local SELKEYS=""
local KEY
local PATLIST
local EXPR
local MSG
local MSGLIST=""
local USERKEY
find /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
if [ "$EVENT" == "remove" ] ; then
echo "$SHOWLIST" | tr " " "\n" | sort > ${TMPDIR}/showlist.tmp
comm -1 ${TMPDIR}/installed.tmp ${TMPDIR}/showlist.tmp | rev | cut -f4- -d"-" | rev > ${TMPDIR}/basenames.tmp
else
echo "$SHOWLIST" | tr " " "\n" | rev | cut -f2- -d"." | rev | sort > ${TMPDIR}/showlist.tmp
comm -1 -2 ${TMPDIR}/installed.tmp ${TMPDIR}/showlist.tmp | rev | cut -f4- -d"-" | rev > ${TMPDIR}/basenames.tmp
fi
SELKEYS=$(echo "${!NOTIFYMSG[@]}" | tr " " "\n" | grep "^on_${EVENT}@" | tr "\n" " ")
for KEY in $SELKEYS ; do
PATLIST="${KEY#*@}"
EXPR=$(echo -en "$PATLIST" | \
tr --squeeze-repeats "," | \
sed -e "s/,$//" -e "s/^/(&/" -e "s/,/)|(/g" -e "s/$/&)/")
NV_MATCHPKGS=$(grep -E "$EXPR" ${TMPDIR}/basenames.tmp | tr "\n" "," | sed -e "s/,$//")
if [ ! -z "$NV_MATCHPKGS" ] ; then
MSG=$(eval "echo \"${NOTIFYMSG[$KEY]}\"")
[ -z "MSGLIST" ] && MSGLIST="$MSG\n" || MSGLIST="$MSGLIST\n$MSG"
fi
done
if [ ! -z "$MSGLIST" ] ; then
if [ "$DIALOG" = "on" ] || [ "$DIALOG" = "ON" ] ; then
dialog --title "post-$EVENT notifications" --backtitle "slackpkg $VERSION" --msgbox "$MSGLIST" 12 70
else
MSGLIST="====[ POST-${EVENT} NOTIFICATIONS ]===================================== \n${MSGLIST}\n======================================================================="
echo -e "\n$MSGLIST" | more
echo -en "Hit a key to continue or wait 10 seconds\r"
read -t 10 USERKEY
echo " "
fi
fi
}
# Overrides original remove_pkg(). Required by the notification mechanism.
function remove_pkg() {
local i
for i in $SHOWLIST; do
echo -e "\nPackage: $i"
echo -e "\tRemoving... "
removepkg $i
done
handle_event "remove"
}
# Overrides original remove_pkg(). Required by the notification mechanism.
function upgrade_pkg() {
local i
if [ "$DOWNLOAD_ALL" = "on" ]; then
OLDDEL="$DELALL"
DELALL="off"
for i in $SHOWLIST; do
getpkg $i true
done
DELALL="$OLDDEL"
fi
for i in $SHOWLIST; do
getpkg $i upgradepkg Upgrading
done
handle_event "upgrade"
}
# Overrides original remove_pkg(). Required by the notification mechanism.
function install_pkg() {
local i
if [ "$DOWNLOAD_ALL" = "on" ]; then
OLDDEL="$DELALL"
DELALL="off"
for i in $SHOWLIST; do
getpkg $i true
done
DELALL="$OLDDEL"
fi
for i in $SHOWLIST; do
getpkg $i installpkg Installing
done
handle_event "install"
}
DOWNLOADER="wget --no-check-certificate --passive-ftp -O"

View file

@ -40,12 +40,48 @@ MIRRORPLUS['slacky']=http://repository.slacky.eu/slackware-14.1/
# use this to keep the slackpkg+ package updated
MIRRORPLUS['slackpkgplus']=http://slakfinder.org/slackpkg+/
# Local repository:
#MIRRORPLUS['alienbob']=file://repositories/alien/sbrepos/14.1/x86/
#
# Local packages (you do not need metadata nor 'slackpkg update' command):
#MIRRORPLUS['myrepo']=dir://repositories/mypackages/
# -- Each entry in the hash table NOTIFYMSG allows to associate a message
# to an event. At runtime, when an event E is triggered the associated
# message NOTIFYMSG[E], if any, is printed, in a dialog when DIALOG=on,
# on the standard output otherwise.
#
# The syntax of the variable NOTIFYMSG is as below :
#
# NOTIFYMSG[<EVENT>]="<MESSAGE>"
#
# EVENT ::= <EVENTID>@<PATTERNLIST>
# EVENTID ::= on_install|on_upgrade|on_remove
# PATTERNLIST ::= <PATTERN>[,PATTERNLIST]
# MESSAGE ::= string
#
# Each PATTERN can be the basename of a package (i.e mesa), or a regular
# expression (mozilla-.*)
#
# When an event occurs, the basenames of packages that match a given
# PATTERNLIST is available at runtime through the variable NV_MATCHPKGS.
# Attention, this variable must be escaped (i.e \${NV_MATCHPKGS}) when
# referenced inside the MESSAGE associated to an EVENT.
#
NOTIFYMSG[on_install@mesa.*,xorg-server]="Package(s) \$NV_MATCHPKGS has(have) been (re)installed.\n\
\n\
In order to use graphical softwares, you should reinstall any proprietary\
driver in use (nVidia, aTi)."
NOTIFYMSG[on_upgrade@mesa.*,xorg-server]="Package(s) \$NV_MATCHPKGS has(have) been updated.\n\
\n\
In order to use graphical softwares, you should reinstall any proprietary\
driver in use (nVidia, aTi)."
#
# Supported Repositories (see /usr/doc/slackpkg+-* for details):
#

View file

@ -54,5 +54,41 @@ MIRRORPLUS['slackpkgplus']=http://slakfinder.org/slackpkg+/
#MIRRORPLUS['myrepo']=dir://repositories/mypackages/
# -- Each entry in the hash table NOTIFYMSG allows to associate a message
# to an event. At runtime, when an event E is triggered the associated
# message NOTIFYMSG[E], if any, is printed, in a dialog when DIALOG=on,
# on the standard output otherwise.
#
# The syntax of the variable NOTIFYMSG is as below :
#
# NOTIFYMSG[<EVENT>]="<MESSAGE>"
#
# EVENT ::= <EVENTID>@<PATTERNLIST>
# EVENTID ::= on_install|on_upgrade|on_remove
# PATTERNLIST ::= <PATTERN>[,PATTERNLIST]
# MESSAGE ::= string
#
# Each PATTERN can be the basename of a package (i.e mesa), or a regular
# expression (mozilla-.*)
#
# When an event occurs, the basenames of packages that match a given
# PATTERNLIST is available at runtime through the variable NV_MATCHPKGS.
# Attention, this variable must be escaped (i.e \${NV_MATCHPKGS}) when
# referenced inside the MESSAGE associated to an EVENT.
#
NOTIFYMSG[on_install@mesa.*,xorg-server]="Package(s) \$NV_MATCHPKGS has(have) been (re)installed.\n\
\n\
In order to use graphical softwares, you should reinstall any proprietary\
driver in use (nVidia, aTi), with 32-bit driver files if your system is\
multilib enabled."
NOTIFYMSG[on_upgrade@mesa.*,xorg-server]="Package(s) \$NV_MATCHPKGS has(have) been updated.\n\
\n\
In order to use graphical softwares, you should reinstall any proprietary\
driver in use (nVidia, aTi), with 32-bit driver files if your system is\
multilib enabled."
# Supported Repositories (see /usr/doc/slackpkg+-* for details):
#