summaryrefslogtreecommitdiff
path: root/source/ap/slackpkg
diff options
context:
space:
mode:
Diffstat (limited to 'source/ap/slackpkg')
-rw-r--r--source/ap/slackpkg/files/ChangeLog62
-rw-r--r--source/ap/slackpkg/files/core-functions.sh100
-rw-r--r--source/ap/slackpkg/files/mirrors-arm.sample2
-rw-r--r--source/ap/slackpkg/files/pkglist.awk2
-rw-r--r--source/ap/slackpkg/files/post-functions.sh47
-rw-r--r--source/ap/slackpkg/files/slackpkg43
-rwxr-xr-xsource/ap/slackpkg/slackpkg.SlackBuild9
7 files changed, 204 insertions, 61 deletions
diff --git a/source/ap/slackpkg/files/ChangeLog b/source/ap/slackpkg/files/ChangeLog
index 774be506..464a74cf 100644
--- a/source/ap/slackpkg/files/ChangeLog
+++ b/source/ap/slackpkg/files/ChangeLog
@@ -1,4 +1,66 @@
+Thu May 24 07:24:01 UTC 2018
+---------------
+ - 2.83.0
+ - tweaks to build script
+
+Wed Apr 4 07:14:01 UTC 2018
+---------------
+ - 2.83.0beta2
+ - tweak handling of new kernel prompts
+ - mandoc lint fixes
+
+Wed Apr 4 01:06:05 UTC 2018
+---------------
+ - 2.83.0beta1 (yes, jump from 2.82.3betas)
+ - fix stray stuff in vimdiff prompt
+ - sort .new files list from looknew() (thanks to Eduard Rozenberg)
+ - make sure user is aware of kernel update (require keypress)
+ - respect $ROOT in looknew() (thanks to burdi01 on LQ)
+ - inform user that the warning about a -current mirror
+ only occurs once, and also point the location of the
+ file to remove if they want the warning back
+ - don't offer to run lilo if initrd is in lilo.conf
+
+Sat Jan 6 23:54:27 UTC 2018
+---------------
+ - 2.82.3beta5
+ - minor tweaks to slack-desc
+ - check for existence of /etc/lilo.conf too before offering
+ to run lilo after kernel upgrades
+ - make sure user actually wants to run lilo (fix answer
+ handling)
+ - warn user and require confirmation the first time a -current
+ mirror is selected (thanks to Didier Spaier)
+ - improve handling of SOURCE from /etc/slackpkg/mirrors; e.g.
+ don't fail if trailing slash is accidentally omitted
+ (thanks to Didier Spaier)
+
+Fri Jan 5 03:24:31 UTC 2018
+---------------
+ - 2.82.3beta4
+ - Abort if system date is near epoch (needed on ARM)
+
+Tue Jan 2 22:24:50 CST 2018
+---------------
+ - 2.82.3beta3
+ - included some more fixups for respecting $ROOT
+ (thanks to burdi01 on LQ)
+ - use correct GPG key for Slackware ARM
+ - update sample mirror list for Slackware ARM
+
+Thu Nov 9 04:03:07 UTC 2017
+---------------
+ - 2.82.3beta2
+ - Fix error in patch application for vimdiff addition
+ (thanks to David Allen)
+
+Wed Nov 8 00:45:00 UTC 2017
+---------------
+ - 2.82.3beta1
+ - Add an option to use vimdiff for comparing changes in .new files
+ (thanks to David Allen)
+
Sun Oct 10 07:48:13 UTC 2017
---------------
- Updated mirrors-x86*.sample to remove dead mirrors and clarify
diff --git a/source/ap/slackpkg/files/core-functions.sh b/source/ap/slackpkg/files/core-functions.sh
index 919bf80b..667667cf 100644
--- a/source/ap/slackpkg/files/core-functions.sh
+++ b/source/ap/slackpkg/files/core-functions.sh
@@ -58,6 +58,9 @@ spinning() {
#
function system_setup() {
+ # Create $WORKDIR just in case
+ mkdir -p "${ROOT}/${WORKDIR}"
+
# Set LOCAL if mirror isn't through network
# If mirror is through network, select the command to fetch
# files and packages from there.
@@ -123,7 +126,7 @@ function system_setup() {
;;
arm*)
ARCH=arm[v5tel]*
- SLACKKEY=${SLACKKEY:-"ARMedslack Security (ARMedslack Linux Project Security) <security@armedslack.org>"}
+ SLACKKEY=${SLACKKEY:-"Slackware ARM (Slackware ARM Linux Project) <mozes@slackware.com>"}
PKGMAIN=${PKGMAIN:-slackware}
;;
powerpc|ppc)
@@ -151,7 +154,7 @@ function system_setup() {
fi
SLACKCFVERSION=$(grep "# v[0-9.]\+" $CONF/slackpkg.conf | cut -f2 -dv)
- CHECKSUMSFILE=$WORKDIR/CHECKSUMS.md5
+ CHECKSUMSFILE=${ROOT}/${WORKDIR}/CHECKSUMS.md5
KERNELMD5=$(md5sum /boot/vmlinuz 2>/dev/null)
DIALOG_MAXARGS=${DIALOG_MAXARGS:-19500}
echo "$0 $VERSION - Slackware Linux $SLACKWARE_VERSION" > $TMPDIR/timestamp
@@ -186,7 +189,7 @@ ARCH values\n"
# Check if the config files are updated to the new slackpkg version
#
- if [ "$WORKDIR" = "" ]; then
+ if [ "${ROOT}/${WORKDIR}" = "" ]; then
echo -e "\
\nYou need to upgrade your slackpkg.conf.\n\
This is a new slackpkg version and many changes happened in config files.\n\
@@ -223,7 +226,7 @@ the problem.\n"
# Checking if is the first time running slackpkg
#
- if ! [ -f ${WORKDIR}/pkglist ] && [ "$CMD" != "update" ]; then
+ if ! [ -f ${ROOT}/${WORKDIR}/pkglist ] && [ "$CMD" != "update" ]; then
if [ "$SOURCE" = "" ]; then
echo -e "\
\nThis appears to be the first time you have run slackpkg.\n\
@@ -250,16 +253,39 @@ Before you install|upgrade|reinstall anything you need to run:\n\n\
Please edit that file and uncomment ONE mirror. Slackpkg\n\
only works with ONE mirror selected.\n"
cleanup
- else
- COUNT=$(echo $SOURCE | wc -w | tr -d " ")
- if [ "$COUNT" != "1" ]; then
- echo -e "\n\
-Slackpkg only works with ONE mirror selected. Please edit your\n\
-${CONF}/mirrors and comment all but one line - two or more\n\
-mirrors uncommented is not valid syntax.\n"
+ fi
+ if echo $SOURCE|grep -q " "; then
+ echo "
+Slackpkg only works with ONE mirror selected. Please edit your
+${CONF}/mirrors and comment all but one line - two or more
+mirrors uncommented is not valid syntax.
+"
+ cleanup
+ fi
+ MIRROR_VERSION=$(echo $SOURCE|sed "s/.*-//;s/.$//")
+ if [ "$MIRROR_VERSION" = "current" ] && [ ! -f ${ROOT}/${WORKDIR}/current ]; then
+ echo -n "
+You have selected a mirror for Slackware -current in ${CONF}/mirrors,
+but Slackware version $SLACKWARE_VERSION appears to be installed.
+
+Slackware -current is the development (i.e. unstable) tree.
+
+Is this really what you want?
+
+To confirm your choice, press Y, else press N. Then, press Enter: "
+ read current
+ if [ "$current" = "Y" ] || [ "$current" = "y" ]; then
+ touch ${ROOT}/${WORKDIR}/current
+ echo -n "
+Slackpkg will not show this warning again unless you remove the
+${WORKDIR}/current file.
+"
+ sleep 1
+ else
cleanup
fi
fi
+ [ ! "$MIRROR_VERSION" = "current" ] && rm -f ${ROOT}/${WORKDIR}/current
# It will check if the mirror selected are ftp.slackware.com
# if set to "ftp.slackware.com" tell the user to choose another
@@ -309,7 +335,7 @@ use slackpkg.\n"
#
if ! [ $(which md5sum 2>/dev/null) ]; then
CHECKMD5=off
- elif ! [ -f ${WORKDIR}/CHECKSUMS.md5 ] && \
+ elif ! [ -f ${ROOT}/${WORKDIR}/CHECKSUMS.md5 ] && \
[ "$CMD" != "update" ] && \
[ "$CHECKMD5" = "on" ]; then
echo -e "\n\
@@ -564,7 +590,7 @@ function makelist() {
else
ls -1 $ROOT/var/log/packages/* | awk -f /usr/libexec/slackpkg/pkglist.awk | applyblacklist > ${TMPDIR}/tmplist
fi
- cat ${WORKDIR}/pkglist | applyblacklist > ${TMPDIR}/pkglist
+ cat ${ROOT}/${WORKDIR}/pkglist | applyblacklist > ${TMPDIR}/pkglist
touch ${TMPDIR}/waiting
@@ -666,7 +692,7 @@ function makelist() {
done
;;
install-new)
- for i in $(awk -f /usr/libexec/slackpkg/install-new.awk ${WORKDIR}/ChangeLog.txt |\
+ for i in $(awk -f /usr/libexec/slackpkg/install-new.awk ${ROOT}/${WORKDIR}/ChangeLog.txt |\
sort -u ) dialog aaa_terminfo fontconfig \
ntfs-3g ghostscript wqy-zenhei-font-ttf \
xbacklight xf86-video-geode ; do
@@ -703,8 +729,8 @@ function makelist() {
if [ "$CMD" = "file-search" ]; then
# Search filelist.gz for possible matches
for i in ${PRIORITY[@]}; do
- if [ -e ${WORKDIR}/${i}-filelist.gz ]; then
- PKGS="$(zegrep -w "${INPUTLIST}" ${WORKDIR}/${i}-filelist.gz | \
+ if [ -e ${ROOT}/${WORKDIR}/${i}-filelist.gz ]; then
+ PKGS="$(zegrep -w "${INPUTLIST}" ${ROOT}/${WORKDIR}/${i}-filelist.gz | \
cut -d\ -f 1 | awk -F'/' '{print $NF}')"
for FULLNAME in $PKGS ; do
NAME=$(cutpkg ${FULLNAME})
@@ -846,7 +872,7 @@ function getpkg() {
PKGNAME=( $(grep -m 1 -- "[[:space:]]${1/%.t[blxg]z/}[[:space:]]" ${TMPDIR}/pkglist) )
NAMEPKG=${PKGNAME[5]}.${PKGNAME[7]}
FULLPATH=${PKGNAME[6]}
- CACHEPATH=${TEMP}/${FULLPATH}
+ CACHEPATH=${ROOT}/${TEMP}/${FULLPATH}
# Create destination dir if it isn't there
if ! [ -d $CACHEPATH ]; then
@@ -944,8 +970,8 @@ function getpkg() {
#
function checkchangelog()
{
- if ! [ -e ${WORKDIR}/ChangeLog.txt ]; then
- touch ${WORKDIR}/ChangeLog.txt
+ if ! [ -e ${ROOT}/${WORKDIR}/ChangeLog.txt ]; then
+ touch ${ROOT}/${WORKDIR}/ChangeLog.txt
fi
echo -e "\tDownloading..."
@@ -961,7 +987,7 @@ Please check your mirror and try again."
cleanup
fi
- if diff --brief ${WORKDIR}/ChangeLog.txt $TMPDIR/ChangeLog.txt ; then
+ if diff --brief ${ROOT}/${WORKDIR}/ChangeLog.txt $TMPDIR/ChangeLog.txt ; then
return 0
else
return 1
@@ -980,7 +1006,7 @@ function updatefilelists()
fi
fi
echo
- cp ${TMPDIR}/ChangeLog.txt ${WORKDIR}/ChangeLog.txt
+ cp ${TMPDIR}/ChangeLog.txt ${ROOT}/${WORKDIR}/ChangeLog.txt
#
# Download MANIFEST, FILELIST.TXT and CHECKSUMS.md5
@@ -1036,10 +1062,10 @@ function updatefilelists()
ISOK=$(checkmd5 ${TMPDIR}/FILELIST.TXT)
fi
if [ "$ISOK" = "1" ]; then
- if ! [ -e $WORKDIR/LASTUPDATE ]; then
- echo "742868196" > $WORKDIR/LASTUPDATE
+ if ! [ -e ${ROOT}/${WORKDIR}/LASTUPDATE ]; then
+ echo "742868196" > ${ROOT}/${WORKDIR}/LASTUPDATE
fi
- LASTUPDATE=$(cat $WORKDIR/LASTUPDATE)
+ LASTUPDATE=$(cat ${ROOT}/${WORKDIR}/LASTUPDATE)
ACTUALDATE=$(date -d "$(head -1 $TMPDIR/FILELIST.TXT)" "+%s")
if [ $ACTUALDATE -lt $LASTUPDATE ]; then
echo -e "\
@@ -1051,7 +1077,7 @@ function updatefilelists()
fi
echo
fi
- echo $ACTUALDATE > $WORKDIR/LASTUPDATE
+ echo $ACTUALDATE > ${ROOT}/${WORKDIR}/LASTUPDATE
else
rm $TMPDIR/FILELIST.TXT
fi
@@ -1090,12 +1116,12 @@ function updatefilelists()
grep "\.t[blxg]z$" $FILELIST| \
awk -f /usr/libexec/slackpkg/pkglist.awk |\
sed -e 's/^M//g' > ${TMPDIR}/pkglist
- cp ${TMPDIR}/pkglist ${WORKDIR}/pkglist
+ cp ${TMPDIR}/pkglist ${ROOT}/${WORKDIR}/pkglist
# Create the slackware tree under TEMP directory
- for i in $( cut -f7 -d\ ${WORKDIR}/pkglist | sort -u ) ; do
- if ! [ -d ${TEMP}/${i} ]; then
- mkdir -p ${TEMP}/${i}
+ for i in $( cut -f7 -d\ ${ROOT}/${WORKDIR}/pkglist | sort -u ) ; do
+ if ! [ -d ${ROOT}/${TEMP}/${i} ]; then
+ mkdir -p ${ROOT}/${TEMP}/${i}
fi
done
@@ -1109,11 +1135,11 @@ function updatefilelists()
bunzip2 -c $TMPDIR/${i}-MANIFEST.bz2 | awk -f /usr/libexec/slackpkg/filelist.awk | \
gzip > ${TMPDIR}/${i}-filelist.gz
done
- cp ${TMPDIR}/*-filelist.gz ${WORKDIR}/
+ cp ${TMPDIR}/*-filelist.gz ${ROOT}/${WORKDIR}/
- if [ -r ${WORKDIR}/filelist.gz ]; then
- rm ${WORKDIR}/filelist.gz
- ln -s ${WORKDIR}/${MAIN}-filelist.gz ${WORKDIR}/filelist.gz
+ if [ -r ${ROOT}/${WORKDIR}/filelist.gz ]; then
+ rm ${ROOT}/${WORKDIR}/filelist.gz
+ ln -s ${ROOT}/${WORKDIR}/${MAIN}-filelist.gz ${ROOT}/${WORKDIR}/filelist.gz
fi
# Concatenate PACKAGE.TXT files
@@ -1122,15 +1148,15 @@ function updatefilelists()
for i in $DIRS; do
cat $TMPDIR/${i}-PACKAGES.TXT >> $TMPDIR/PACKAGES.TXT
done
- cp $TMPDIR/PACKAGES.TXT ${WORKDIR}/PACKAGES.TXT
+ cp $TMPDIR/PACKAGES.TXT ${ROOT}/${WORKDIR}/PACKAGES.TXT
if [ -e $TMPDIR/CHECKSUMS.md5 ]; then
- cp $TMPDIR/CHECKSUMS.md5 $WORKDIR/CHECKSUMS.md5 2>/dev/null
+ cp $TMPDIR/CHECKSUMS.md5 ${ROOT}/${WORKDIR}/CHECKSUMS.md5 2>/dev/null
fi
if [ -e $TMPDIR/CHECKSUMS.md5.asc ]; then
cp $TMPDIR/CHECKSUMS.md5.asc \
- $WORKDIR/CHECKSUMS.md5.asc 2>/dev/null
+ ${ROOT}/${WORKDIR}/CHECKSUMS.md5.asc 2>/dev/null
fi
}
@@ -1312,7 +1338,7 @@ generate_template() {
[ "$SPINNING" = "off" ] || spinning ${TMPDIR}/waiting &
for i in $ROOT/var/log/packages/* ; do
PKGNAME=$( cutpkg $(basename $i))
- grep -q " $PKGNAME " ${WORKDIR}/pkglist && \
+ grep -q " $PKGNAME " ${ROOT}/${WORKDIR}/pkglist && \
echo $PKGNAME >> $TMPDIR/$TEMPLATE.work
done
rm $TMPDIR/waiting
diff --git a/source/ap/slackpkg/files/mirrors-arm.sample b/source/ap/slackpkg/files/mirrors-arm.sample
index 8a42d7b9..ee5bd81c 100644
--- a/source/ap/slackpkg/files/mirrors-arm.sample
+++ b/source/ap/slackpkg/files/mirrors-arm.sample
@@ -61,6 +61,7 @@
#ftp://ftp.slackware.pl/pub/slackwarearm/slackwarearm-x.x/
#ftp://mirrors.vbi.vt.edu/linux/slackwarearm/slackwarearm-x.x/
#ftp://mirror.slackbuilds.org/pub/slackwarearm/slackwarearm-x.x/
+#ftp://slackware.absolutehosting.net/pub/slackwarearm/slackwarearm-x.x/
#
#ftp://ftp.arm.slackware.com/slackwarearm/slackwarearm-x.x/
#
@@ -73,6 +74,7 @@
#ftp://ftp.slackware.pl/pub/slackwarearm/slackwarearm-current/
#ftp://mirrors.vbi.vt.edu/linux/slackwarearm/slackwarearm-current/
#ftp://mirror.slackbuilds.org/pub/slackwarearm/slackwarearm-current/
+#ftp://slackware.absolutehosting.net/pub/slackwarearm/slackwarearm-current/
#
#ftp://ftp.arm.slackware.com/slackwarearm/slackwarearm-current/
diff --git a/source/ap/slackpkg/files/pkglist.awk b/source/ap/slackpkg/files/pkglist.awk
index 5a0c18e8..9b4b1bcf 100644
--- a/source/ap/slackpkg/files/pkglist.awk
+++ b/source/ap/slackpkg/files/pkglist.awk
@@ -3,7 +3,7 @@
fs=FS
FS="/" ; OFS="/"
$0=INPUT
- if ( $2 != "var" ) {
+ if ( $(NF-3) != "var" ) {
DIR=$2
FULLPACK=$NF
} else {
diff --git a/source/ap/slackpkg/files/post-functions.sh b/source/ap/slackpkg/files/post-functions.sh
index c286e7af..b5fecd39 100644
--- a/source/ap/slackpkg/files/post-functions.sh
+++ b/source/ap/slackpkg/files/post-functions.sh
@@ -111,6 +111,18 @@ removeold() {
rm $i
}
+runvimdiff() {
+ BASENAME=$(basename $i .new)
+ FILEPATH=$(dirname $i)
+ FULLNAME="${FILEPATH}/${BASENAME}"
+
+ if [ -e ${FULLNAME} ]; then
+ vimdiff ${FULLNAME} ${FULLNAME}.new
+ else
+ echo "file $FULLNAME doesn't exist"
+ fi
+}
+
looknew() {
# with ONLY_NEW_DOTNEW set, slackpkg will search only for
@@ -122,12 +134,12 @@ looknew() {
fi
echo -e "\nSearching for NEW configuration files"
- FILES=$(find /etc /var/yp /usr/share/vim -name "*.new" ${ONLY_NEW_DOTNEW} \
+ FILES=$(find ${ROOT}/etc ${ROOT}/var/yp ${ROOT}/usr/share/vim -name "*.new" ${ONLY_NEW_DOTNEW} \
-not -name "rc.inet1.conf.new" \
-not -name "group.new" \
-not -name "passwd.new" \
-not -name "shadow.new" \
- -not -name "gshadow.new" 2>/dev/null)
+ -not -name "gshadow.new" 2>/dev/null | sort 2>/dev/null)
if [ "$FILES" != "" ]; then
echo -e "\n\
Some packages had new configuration files installed.
@@ -166,7 +178,7 @@ What do you want (K/O/R/P)?"
GOEX=0
while [ $GOEX -eq 0 ]; do
echo
- showmenu $i "(K)eep" "(O)verwrite" "(R)emove" "(D)iff" "(M)erge"
+ showmenu $i "(K)eep" "(O)verwrite" "(R)emove" "(D)iff" "(M)erge" "(V)imdiff"
read ANSWER
case $ANSWER in
O|o)
@@ -183,6 +195,9 @@ What do you want (K/O/R/P)?"
M|m)
mergenew $1
;;
+ V|v)
+ runvimdiff $1
+ ;;
K|k|*)
GOEX=1
;;
@@ -203,19 +218,25 @@ What do you want (K/O/R/P)?"
lookkernel() {
NEWKERNELMD5=$(md5sum /boot/vmlinuz 2>/dev/null)
if [ "$KERNELMD5" != "$NEWKERNELMD5" ]; then
- if [ -x /sbin/lilo ]; then
+ if [ -x /sbin/lilo ] && [ -r /etc/lilo.conf ] && grep -q initrd /etc/lilo.conf ; then
+ echo -e "\n
+Your kernel image was updated, and your /etc/lilo.conf indicates
+the use of an initrd for at least one of your kernels. Be sure to
+regenerate the initrd for the new kernel and handle any needed
+updates to your bootloader.
+"
+ elif [ -x /sbin/lilo ] && [ -r /etc/lilo.conf ] ; then
echo -e "\n
-Your kernel image was updated. We highly recommend you run: lilo
-Do you want slackpkg to run lilo now? (Y/n)"
- answer
- if [ "$ANSWER" != "n" ] && [ "$ANSWER" != "N" ]; then
- /sbin/lilo
- fi
+Your kernel image was updated. Be sure to handle any needed updates
+to your bootloader (possibly as simple as running /sbin/lilo).
+"
else
echo -e "\n
-Your kernel image was updated and lilo is not found on your system.
-You may need to adjust your boot manager (like GRUB) to boot appropriate
-kernel."
+Your kernel image was updated, and lilo does not appear to be used on
+your system. You may need to adjust your boot manager (like GRUB) to
+boot the appropriate kernel (after generating an initrd if required)."
fi
+ echo -e "Press any key to continue...\n "
+ read _junk
fi
}
diff --git a/source/ap/slackpkg/files/slackpkg b/source/ap/slackpkg/files/slackpkg
index 4fcdd61a..67864930 100644
--- a/source/ap/slackpkg/files/slackpkg
+++ b/source/ap/slackpkg/files/slackpkg
@@ -22,6 +22,23 @@
# Evaldo Gardenali (aka UdontKnow) evaldogardenali@fasternet.com.br
#
+# Ensure that we're not at the epoch. slackpkg breaks with GPG checks when
+# the date is so far in the past:
+if [ $( date +%s ) -le 1437841588 ]; then
+cat <<"EOF"
+Error: Your system date is wrong. slackpkg requires that the date be correct
+so that the package signatures can be verified.
+
+The date may be incorrect because you have a system such as a Raspberry Pi that
+does does not have an RTC (Real Time Clock), or that the correct date was unable
+to be read from the RTC due to a driver bug, or a missing driver.
+
+You may wish to set up NTP on your system:
+http://docs.slackware.com/howtos:network_services:ntp
+
+EOF
+ exit 1
+fi
#========================================================================
#
@@ -30,22 +47,36 @@
#
# CONF = configuration directory
-# SOURCE = A mirror of Slackware. Source can be sett by editing $CONF/mirrors
+# SOURCE = A mirror of Slackware. Source can be set by editing $CONF/mirrors
#
VERSION=@VERSION@
PATH=/bin:/usr/bin:/sbin:/usr/sbin
SLACKWARE_VERSION=$(cat /etc/slackware-version | cut -f2 -d\ )
CONF=${CONF:-/etc/slackpkg}
-SOURCE=$(sed -e 's/^[[:blank:]]*//' $CONF/mirrors | grep -m1 -e "^\([a-z]\)")
+SOURCE=$(sed -n '
+ # Remove leading and trailing blanks
+ s/^[[:blank:]]*//
+ s/[[:blank:]]*$//
+ # Only one token is allowed per line
+ /[[:blank:]]/d
+ # A single solidus should end the URI
+ s,[/]*$,/,
+ # Print the lines beginning with one of the URI schemes we look for
+ \@^file://@p
+ \@^cdrom://@p
+ \@^local://@p
+ \@^https\{0,1\}://@p
+ \@^ftps\{0,1\}://@p' $CONF/mirrors)
. $CONF/slackpkg.conf
ERROR=""
# Set temporary directory
#
-TMPDIR=$(mktemp -p /tmp -d slackpkg.XXXXXX 2>/dev/null)
+mkdir -p ${ROOT}/tmp
+TMPDIR=$(mktemp -p ${ROOT}/tmp -d slackpkg.XXXXXX 2>/dev/null)
if [ $? -ne 0 ]; then
- TMPDIR="/tmp/slackpkg.${RANDOM}"
- mkdir -m 700 $TMPDIR || TMPDIR="FAILED"
+ TMPDIR="${ROOT}/tmp/slackpkg.${RANDOM}"
+ mkdir -p -m 700 $TMPDIR || TMPDIR="FAILED"
fi
#
@@ -485,7 +516,7 @@ case "$CMD" in
if ( found != 1 ) {
print \"No packages found! Try:\n\n\tslackpkg search $PATTERN\n\nand choose one (and ONLY one package).\n\"
}
- }" ${WORKDIR}/PACKAGES.TXT 2>/dev/null
+ }" ${ROOT}/${WORKDIR}/PACKAGES.TXT 2>/dev/null
;;
new-config)
POSTINST=on
diff --git a/source/ap/slackpkg/slackpkg.SlackBuild b/source/ap/slackpkg/slackpkg.SlackBuild
index 733ae5e0..e9a4bb38 100755
--- a/source/ap/slackpkg/slackpkg.SlackBuild
+++ b/source/ap/slackpkg/slackpkg.SlackBuild
@@ -23,14 +23,15 @@
cd $(dirname $0) ; CWD=$(pwd)
PKGNAM=slackpkg
-VERSION=2.82.2
-BUILD=${BUILD:-3}
+VERSION=${VERSION:-2.83.0}
+ARCH="noarch"
+BUILD=${BUILD:-1}
# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
# the name of the created package would be, and then exit. This information
# could be useful to other scripts.
if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
- echo "$PKGNAM-$VERSION-noarch-$BUILD.txz"
+ echo "$PKGNAM-$VERSION-$ARCH-$BUILD.txz"
exit 0
fi
@@ -123,5 +124,5 @@ zcat $CWD/doinst.sh.gz | sed -e "s/@VERSION@/$VERSION/g" > $PKG/install/doinst.s
cat $CWD/slack-desc > $PKG/install/slack-desc
cd $PKG
-/sbin/makepkg -l y -c n $TMP/$PKGNAM-$VERSION-noarch-$BUILD.txz
+/sbin/makepkg -l y -c n $TMP/$PKGNAM-$VERSION-$ARCH-$BUILD.txz