mirror of
https://github.com/zuno/slackpkgplus
synced 2024-12-27 09:58:34 +01:00
Slackpkg+ 0.9.7.2 released
Version 0.9.7.2 - 09/Sep/2013 - Added support for unrepositorized local directory in config file - Added USEBL to temporary skip blacklist check (USEBL=0 slackpkg install..)
This commit is contained in:
parent
02243c0d7a
commit
a27d6e5d48
6 changed files with 98 additions and 5 deletions
|
@ -1,3 +1,7 @@
|
||||||
|
Version 0.9.7.2 - 09/Sep/2013
|
||||||
|
- Added support for unrepositorized local directory in config file
|
||||||
|
- Added USEBL to temporary skip blacklist check (USEBL=0 slackpkg install..)
|
||||||
|
|
||||||
Version 0.9.7.1 - 06/Sep/2013
|
Version 0.9.7.1 - 06/Sep/2013
|
||||||
- fixed a bug on 'slackpkg upgrade file:..'
|
- fixed a bug on 'slackpkg upgrade file:..'
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,7 @@
|
||||||
|
Version 0.9.7.2 - 09/Sep/2013
|
||||||
|
- Added support for unrepositorized local directory in config file
|
||||||
|
- Added USEBL to temporary skip blacklist check (USEBL=0 slackpkg install..)
|
||||||
|
|
||||||
Version 0.9.7.1 - 06/Sep/2013
|
Version 0.9.7.1 - 06/Sep/2013
|
||||||
- fixed a bug on 'slackpkg upgrade file:..'
|
- fixed a bug on 'slackpkg upgrade file:..'
|
||||||
|
|
||||||
|
|
19
src/README
19
src/README
|
@ -37,6 +37,25 @@ then 'slackpkg upgrade-all' will upgrade it.
|
||||||
|
|
||||||
-----
|
-----
|
||||||
|
|
||||||
|
the MIRRORPLUS array define all mirrors. It accepts a lot of protocols:
|
||||||
|
|
||||||
|
1) http/ftp/https:
|
||||||
|
MIRRORPLUS['slacky']=http://repository.slacky.eu/slackware64/
|
||||||
|
the mirror must contains all metadata files (CHECKSUMS.md5 ...)
|
||||||
|
you must run 'slackpkg update' after add/remove a repository
|
||||||
|
2) local mirror:
|
||||||
|
MIRRORPLUS['alienlocal']=file://mirrors/alienbob/x86/14.0/
|
||||||
|
the directory must contains all metadata files (CHECKSUMS.md5 ...)
|
||||||
|
you must run 'slackpkg update' after add/remove a repository
|
||||||
|
3) local packages directory:
|
||||||
|
MIRRORPLUS['mypackages']=dir://mypackages/
|
||||||
|
all packages must to be in a single directory (subdirectory not allowed)
|
||||||
|
'slackpkg update' ignore these repository. Every time you run slackpkg
|
||||||
|
it read the directory contents.
|
||||||
|
|
||||||
|
|
||||||
|
-----
|
||||||
|
|
||||||
|
|
||||||
Usage:
|
Usage:
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,14 @@
|
||||||
|
|
||||||
declare -A MIRRORPLUS
|
declare -A MIRRORPLUS
|
||||||
if [ -e /etc/slackpkg/slackpkgplus.conf ];then
|
if [ -e /etc/slackpkg/slackpkgplus.conf ];then
|
||||||
|
USEBLACKLIST=true
|
||||||
|
if [ "$USEBL" == "0" ];then
|
||||||
|
USEBLACKLIST=false
|
||||||
|
fi
|
||||||
. /etc/slackpkg/slackpkgplus.conf
|
. /etc/slackpkg/slackpkgplus.conf
|
||||||
|
if [ "$USEBL" == "0" ];then
|
||||||
|
USEBLACKLIST=false
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$SLACKPKGPLUS" = "on" ];then
|
if [ "$SLACKPKGPLUS" = "on" ];then
|
||||||
|
@ -31,6 +38,19 @@ if [ "$SLACKPKGPLUS" = "on" ];then
|
||||||
URLFILE=$(echo $URLFILE|sed "s#^.*/SLACKPKGPLUS_$PREPO/#${MIRRORPLUS[$PREPO]}#")
|
URLFILE=$(echo $URLFILE|sed "s#^.*/SLACKPKGPLUS_$PREPO/#${MIRRORPLUS[$PREPO]}#")
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
echo $URLFILE
|
||||||
|
|
||||||
|
if echo $URLFILE | grep "^dir:/"|grep -q "/PACKAGES.TXT$";then
|
||||||
|
touch $2
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
if echo $URLFILE | grep "^dir:/"|grep -q "/MANIFEST.bz2$";then
|
||||||
|
echo -n|bzip2 -c >$2
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
URLFILE=$(echo $URLFILE|sed -e 's_^dir:/_file://_')
|
||||||
|
|
||||||
if echo $URLFILE | grep -q "^file://" ; then
|
if echo $URLFILE | grep -q "^file://" ; then
|
||||||
URLFILE=${URLFILE:6}
|
URLFILE=${URLFILE:6}
|
||||||
if [ -f $URLFILE ];then
|
if [ -f $URLFILE ];then
|
||||||
|
@ -52,6 +72,9 @@ if [ "$SLACKPKGPLUS" = "on" ];then
|
||||||
if [ "$CHECKGPG" = "on" ];then
|
if [ "$CHECKGPG" = "on" ];then
|
||||||
for PREPO in $REPOPLUS;do
|
for PREPO in $REPOPLUS;do
|
||||||
URLFILE=${MIRRORPLUS[${PREPO/SLACKPKGPLUS_}]}CHECKSUMS.md5.asc
|
URLFILE=${MIRRORPLUS[${PREPO/SLACKPKGPLUS_}]}CHECKSUMS.md5.asc
|
||||||
|
if echo $URLFILE | grep -q "^dir:/" ; then
|
||||||
|
continue
|
||||||
|
fi
|
||||||
if echo $URLFILE | grep -q "^file://" ; then
|
if echo $URLFILE | grep -q "^file://" ; then
|
||||||
URLFILE=${URLFILE:6}
|
URLFILE=${URLFILE:6}
|
||||||
cp -v $URLFILE ${TMPDIR}/CHECKSUMS.md5-$PREPO.asc
|
cp -v $URLFILE ${TMPDIR}/CHECKSUMS.md5-$PREPO.asc
|
||||||
|
@ -91,6 +114,8 @@ if [ "$SLACKPKGPLUS" = "on" ];then
|
||||||
if echo $URLFILE | grep -q "^file://" ; then
|
if echo $URLFILE | grep -q "^file://" ; then
|
||||||
URLFILE=${URLFILE:6}
|
URLFILE=${URLFILE:6}
|
||||||
cp -v $URLFILE ${TMPDIR}/CHECKSUMS.md5-$PREPO
|
cp -v $URLFILE ${TMPDIR}/CHECKSUMS.md5-$PREPO
|
||||||
|
elif echo $URLFILE | grep -q "^dir:/" ; then
|
||||||
|
continue
|
||||||
else
|
else
|
||||||
$DOWNLOADER ${TMPDIR}/CHECKSUMS.md5-$PREPO ${MIRRORPLUS[${PREPO/SLACKPKGPLUS_}]}CHECKSUMS.md5
|
$DOWNLOADER ${TMPDIR}/CHECKSUMS.md5-$PREPO ${MIRRORPLUS[${PREPO/SLACKPKGPLUS_}]}CHECKSUMS.md5
|
||||||
fi
|
fi
|
||||||
|
@ -99,6 +124,9 @@ if [ "$SLACKPKGPLUS" = "on" ];then
|
||||||
fi
|
fi
|
||||||
if [ $(basename $1) = "GPG-KEY" ];then
|
if [ $(basename $1) = "GPG-KEY" ];then
|
||||||
for PREPO in $REPOPLUS;do
|
for PREPO in $REPOPLUS;do
|
||||||
|
if [ "${PREPO:0:4}" = "dir:" ];then
|
||||||
|
continue
|
||||||
|
fi
|
||||||
URLFILE=${MIRRORPLUS[${PREPO/SLACKPKGPLUS_}]}GPG-KEY
|
URLFILE=${MIRRORPLUS[${PREPO/SLACKPKGPLUS_}]}GPG-KEY
|
||||||
if echo $URLFILE | grep -q "^file://" ; then
|
if echo $URLFILE | grep -q "^file://" ; then
|
||||||
URLFILE=${URLFILE:6}
|
URLFILE=${URLFILE:6}
|
||||||
|
@ -130,7 +158,11 @@ if [ "$SLACKPKGPLUS" = "on" ];then
|
||||||
echo 1
|
echo 1
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
gpg --verify ${1}.asc ${1} 2>/dev/null && echo "1" || echo "0"
|
if [ -e "${1}.asc" ];then
|
||||||
|
gpg --verify ${1}.asc ${1} 2>/dev/null && echo "1" || echo "0"
|
||||||
|
else
|
||||||
|
echo 1
|
||||||
|
fi
|
||||||
if [ "$(basename $1)" == "CHECKSUMS.md5" ];then
|
if [ "$(basename $1)" == "CHECKSUMS.md5" ];then
|
||||||
X86_64=$(ls /var/log/packages/aaa_base*x86_64*|head -1 2>/dev/null)
|
X86_64=$(ls /var/log/packages/aaa_base*x86_64*|head -1 2>/dev/null)
|
||||||
for PREPO in $REPOPLUS;do
|
for PREPO in $REPOPLUS;do
|
||||||
|
@ -149,14 +181,20 @@ if [ "$SLACKPKGPLUS" = "on" ];then
|
||||||
local MD5ORIGINAL
|
local MD5ORIGINAL
|
||||||
local MD5DOWNLOAD
|
local MD5DOWNLOAD
|
||||||
local PREPO
|
local PREPO
|
||||||
|
local ARG
|
||||||
|
|
||||||
if echo $1|egrep -q "/SLACKPKGPLUS_(file|dir|http|ftp|https)[0-9]";then
|
if echo $1|egrep -q "/SLACKPKGPLUS_(file|dir|http|ftp|https)[0-9]";then
|
||||||
echo 1
|
echo 1
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
PREPO=$(echo $1 | rev | cut -f3 -d/ | rev)
|
ARG=$(echo $1|sed "s|^$TEMP/||")
|
||||||
|
PREPO=$(echo $ARG | cut -f2 -d/|sed 's/SLACKPKGPLUS_//' )
|
||||||
|
if echo ${MIRRORPLUS[$PREPO]}|grep -q ^dir:/;then
|
||||||
|
echo 1
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
|
||||||
MD5ORIGINAL=$(egrep -v " \.(/extra)?/source/" ${CHECKSUMSFILE} | grep -w $PREPO | grep -m1 "/$(basename $1)$" | cut -f1 -d \ )
|
MD5ORIGINAL=$( grep -m1 "$ARG$" ${CHECKSUMSFILE} | cut -f1 -d \ )
|
||||||
MD5DOWNLOAD=$(md5sum ${1} | cut -f1 -d \ )
|
MD5DOWNLOAD=$(md5sum ${1} | cut -f1 -d \ )
|
||||||
if [ "$MD5ORIGINAL" = "$MD5DOWNLOAD" ]; then
|
if [ "$MD5ORIGINAL" = "$MD5DOWNLOAD" ]; then
|
||||||
echo 1
|
echo 1
|
||||||
|
@ -377,7 +415,7 @@ if [ "$SLACKPKGPLUS" = "on" ];then
|
||||||
|
|
||||||
# Test repositories
|
# Test repositories
|
||||||
for pp in ${REPOPLUS[*]};do
|
for pp in ${REPOPLUS[*]};do
|
||||||
echo "${MIRRORPLUS[$pp]}"|grep -q -e ^http:// -e ^https:// -e ^ftp:// -e ^file://
|
echo "${MIRRORPLUS[$pp]}"|grep -q -e ^http:// -e ^https:// -e ^ftp:// -e ^file:// -e ^dir:/
|
||||||
if [ $? -ne 0 ];then
|
if [ $? -ne 0 ];then
|
||||||
echo "Repository '$pp' not configured." >> $TMPDIR/error.log
|
echo "Repository '$pp' not configured." >> $TMPDIR/error.log
|
||||||
echo "Add:" >> $TMPDIR/error.log
|
echo "Add:" >> $TMPDIR/error.log
|
||||||
|
@ -445,6 +483,9 @@ if [ "$SLACKPKGPLUS" = "on" ];then
|
||||||
# -- This is to prevent silent exclusion of multilib package
|
# -- This is to prevent silent exclusion of multilib package
|
||||||
# aaa_elflibs-compat32 when /etc/slackpkg/blacklist contains the
|
# aaa_elflibs-compat32 when /etc/slackpkg/blacklist contains the
|
||||||
# pattern aaa_elflibs.
|
# pattern aaa_elflibs.
|
||||||
|
if ! $USEBLACKLIST ;then
|
||||||
|
>${TMPDIR}/blacklist
|
||||||
|
fi
|
||||||
if $MLREPO_SELELECTED && grep -q "^aaa_elflibs$" ${TMPDIR}/blacklist && ! grep -q "^aaa_elflibs-compat32$" ${TMPDIR}/blacklist ; then
|
if $MLREPO_SELELECTED && grep -q "^aaa_elflibs$" ${TMPDIR}/blacklist && ! grep -q "^aaa_elflibs-compat32$" ${TMPDIR}/blacklist ; then
|
||||||
sed -i --expression "s/^aaa_elflibs/#aaa_elflibs/" ${TMPDIR}/blacklist
|
sed -i --expression "s/^aaa_elflibs/#aaa_elflibs/" ${TMPDIR}/blacklist
|
||||||
grep -vEw -f ${TMPDIR}/blacklist -f ${TMPDIR}/blacklist.slackpkgplus | grep -v "[ ]aaa_elflibs[ ]" >${TMPDIR}/blacklist.tmp
|
grep -vEw -f ${TMPDIR}/blacklist -f ${TMPDIR}/blacklist.slackpkgplus | grep -v "[ ]aaa_elflibs[ ]" >${TMPDIR}/blacklist.tmp
|
||||||
|
@ -473,6 +514,19 @@ if [ "$SLACKPKGPLUS" = "on" ];then
|
||||||
PRIORITYIDX=1
|
PRIORITYIDX=1
|
||||||
|
|
||||||
touch ${TMPDIR}/pkglist-pre
|
touch ${TMPDIR}/pkglist-pre
|
||||||
|
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_//_/_')
|
||||||
|
MIRRORPLUS[$PREPO]="dir:$localpath/"
|
||||||
|
if [ ! -d "$localpath" ];then
|
||||||
|
continue
|
||||||
|
fi
|
||||||
|
( cd $localpath
|
||||||
|
ls -ld *.t[blxg]z|tac|grep ^-|awk '{print "./SLACKPKGPLUS_'$PREPO'/"$NF}'|awk -f /usr/libexec/slackpkg/pkglist.awk >> ${TMPDIR}/pkglist-pre
|
||||||
|
)
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
if [ "$CMD" == "install" ] || [ "$CMD" == "upgrade" ] || [ "$CMD" == "reinstall" ] || [ "$CMD" == "remove" ] ; then
|
if [ "$CMD" == "install" ] || [ "$CMD" == "upgrade" ] || [ "$CMD" == "reinstall" ] || [ "$CMD" == "remove" ] ; then
|
||||||
|
|
||||||
|
@ -554,7 +608,7 @@ if [ "$SLACKPKGPLUS" = "on" ];then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# You can specify 'slackpkg install reponame' where reponame is a thirdy part repository
|
# You can specify 'slackpkg install reponame' where reponame is a thirdy part repository
|
||||||
elif grep -q "^SLACKPKGPLUS_${pref}[ ]" ${WORKDIR}/pkglist ; then
|
elif grep -q "^SLACKPKGPLUS_${pref}[ ]" ${WORKDIR}/pkglist ${TMPDIR}/pkglist-pre ; then
|
||||||
|
|
||||||
echo "$pref" | grep -qi "multilib" && MLREPO_SELELECTED=true
|
echo "$pref" | grep -qi "multilib" && MLREPO_SELELECTED=true
|
||||||
|
|
||||||
|
|
|
@ -15,6 +15,7 @@ VERBOSE=1
|
||||||
|
|
||||||
# Examples:
|
# Examples:
|
||||||
#PKGS_PRIORITY=( restricted:vlc )
|
#PKGS_PRIORITY=( restricted:vlc )
|
||||||
|
#PKGS_PRIORITY=( myrepo:.* )
|
||||||
#
|
#
|
||||||
|
|
||||||
# List repository you want to use (defined below).
|
# List repository you want to use (defined below).
|
||||||
|
@ -38,6 +39,11 @@ MIRRORPLUS['slackpkgplus']=http://slakfinder.org/slackpkg+/
|
||||||
# Slackware current - i386
|
# Slackware current - i386
|
||||||
|
|
||||||
|
|
||||||
|
# Local repository:
|
||||||
|
#MIRRORPLUS['alienbob']=file://repositories/alien/sbrepos/14.0/x86/
|
||||||
|
#
|
||||||
|
# Local packages (you do not need metadata nor 'slackpkg update' command):
|
||||||
|
#MIRRORPLUS['myrepo']=dir://repositories/mypackages/
|
||||||
|
|
||||||
# Supported Repositories (see /usr/doc/slackpkg+-* for details):
|
# Supported Repositories (see /usr/doc/slackpkg+-* for details):
|
||||||
#
|
#
|
||||||
|
|
|
@ -14,6 +14,7 @@ VERBOSE=1
|
||||||
|
|
||||||
# Examples:
|
# Examples:
|
||||||
#PKGS_PRIORITY=( restricted:vlc )
|
#PKGS_PRIORITY=( restricted:vlc )
|
||||||
|
#PKGS_PRIORITY=( myrepo:.* )
|
||||||
#
|
#
|
||||||
# If you want a multilib system, uncomment the multilib repository and set:
|
# If you want a multilib system, uncomment the multilib repository and set:
|
||||||
#PKGS_PRIORITY=( multilib:.* )
|
#PKGS_PRIORITY=( multilib:.* )
|
||||||
|
@ -41,6 +42,11 @@ MIRRORPLUS['slackpkgplus']=http://slakfinder.org/slackpkg+/
|
||||||
#MIRRORPLUS['multilib']=http://taper.alienbase.nl/mirrors/people/alien/multilib/current/
|
#MIRRORPLUS['multilib']=http://taper.alienbase.nl/mirrors/people/alien/multilib/current/
|
||||||
#MIRRORPLUS['zerouno']=http://www.z01.eu/repo-slack/slackware64-current/
|
#MIRRORPLUS['zerouno']=http://www.z01.eu/repo-slack/slackware64-current/
|
||||||
|
|
||||||
|
# Local repository:
|
||||||
|
#MIRRORPLUS['alienbob']=file://repositories/alien/sbrepos/14.0/x86/
|
||||||
|
#
|
||||||
|
# Local packages (you do not need metadata nor 'slackpkg update' command):
|
||||||
|
#MIRRORPLUS['myrepo']=dir://repositories/mypackages/
|
||||||
|
|
||||||
|
|
||||||
# Supported Repositories (see /usr/doc/slackpkg+-* for details):
|
# Supported Repositories (see /usr/doc/slackpkg+-* for details):
|
||||||
|
|
Loading…
Reference in a new issue