summaryrefslogtreecommitdiff
path: root/source/ap
diff options
context:
space:
mode:
Diffstat (limited to 'source/ap')
-rw-r--r--source/ap/slackpkg/0002-Use-CHECKSUMS.md5.asc-to-determine-ChangeLog-newness.patch57
-rw-r--r--source/ap/slackpkg/0003-mirrors-x86-.sample-Remove-bjtu.edu.cn-mirror.patch38
-rw-r--r--source/ap/slackpkg/doinst.sh1
-rwxr-xr-xsource/ap/slackpkg/slackpkg.SlackBuild22
4 files changed, 111 insertions, 7 deletions
diff --git a/source/ap/slackpkg/0002-Use-CHECKSUMS.md5.asc-to-determine-ChangeLog-newness.patch b/source/ap/slackpkg/0002-Use-CHECKSUMS.md5.asc-to-determine-ChangeLog-newness.patch
new file mode 100644
index 00000000..26796773
--- /dev/null
+++ b/source/ap/slackpkg/0002-Use-CHECKSUMS.md5.asc-to-determine-ChangeLog-newness.patch
@@ -0,0 +1,57 @@
+From e1fc7d99876aaba621fb353d8c484756e20ad0e8 Mon Sep 17 00:00:00 2001
+From: "Patrick J. Volkerding" <volkerdi@slackware.com>
+Date: Thu, 7 Jun 2018 19:03:40 -0500
+Subject: [PATCH 1/3] Use CHECKSUMS.md5.asc to determine ChangeLog newness
+
+Thanks to drgibbon on LQ for the suggestion.
+
+Signed-off-by: Robby Workman <rworkman@slackware.com>
+---
+ files/core-functions.sh | 27 +++++++++++++++++++++++++++
+ 1 file changed, 27 insertions(+)
+
+diff --git a/files/core-functions.sh b/files/core-functions.sh
+index 667667c..ec753c7 100644
+--- a/files/core-functions.sh
++++ b/files/core-functions.sh
+@@ -970,10 +970,37 @@ function getpkg() {
+ #
+ function checkchangelog()
+ {
++ if ! [ -e ${ROOT}/${WORKDIR}/CHECKSUMS.md5.asc ]; then
++ touch ${ROOT}/${WORKDIR}/CHECKSUMS.md5.asc
++ fi
++
+ if ! [ -e ${ROOT}/${WORKDIR}/ChangeLog.txt ]; then
+ touch ${ROOT}/${WORKDIR}/ChangeLog.txt
+ fi
+
++ # First we will download CHECKSUMS.md5.asc since it is a very small
++ # file and if it has not changed, we can know that the ChangeLog
++ # has not changed either. If it _has_ changed, we'll need to pull
++ # the ChangeLog to check that as well.
++ echo -e "\tDownloading..."
++ getfile ${SOURCE}CHECKSUMS.md5.asc $TMPDIR/CHECKSUMS.md5.asc
++ if ! grep -q "PGP" $TMPDIR/CHECKSUMS.md5.asc ; then
++ echo -e "\
++\nError downloading from $SOURCE.\n\
++Please check your mirror and try again."
++ cleanup
++ fi
++ if diff --brief ${ROOT}/${WORKDIR}/CHECKSUMS.md5.asc $TMPDIR/CHECKSUMS.md5.asc ; then
++ # Before returning with the result that these signatures (and
++ # therefore the ChangeLog) are the same, we need to copy the
++ # ChangeLog into ${TMPDIR} in case the user decides to
++ # "download all other files":
++ cp ${ROOT}/${WORKDIR}/ChangeLog.txt $TMPDIR/ChangeLog.txt
++ return 0
++ fi
++ # CHECKSUMS.md5.asc was different, so we'll go on to download and test
++ # the full ChangeLog.txt.
++
+ echo -e "\tDownloading..."
+ #
+ # Download ChangeLog.txt first of all and test if it's equal
+--
+2.17.1
+
diff --git a/source/ap/slackpkg/0003-mirrors-x86-.sample-Remove-bjtu.edu.cn-mirror.patch b/source/ap/slackpkg/0003-mirrors-x86-.sample-Remove-bjtu.edu.cn-mirror.patch
new file mode 100644
index 00000000..ad3a33b4
--- /dev/null
+++ b/source/ap/slackpkg/0003-mirrors-x86-.sample-Remove-bjtu.edu.cn-mirror.patch
@@ -0,0 +1,38 @@
+From 845c9adf65cc91d6f92d95fdedd514052a4b4164 Mon Sep 17 00:00:00 2001
+From: Robby Workman <rworkman@slackware.com>
+Date: Tue, 12 Jun 2018 12:46:25 -0500
+Subject: [PATCH 3/3] mirrors-x86*.sample: Remove bjtu.edu.cn mirror
+
+Thanks to Lockywolf on LQ for the report.
+---
+ files/mirrors-x86.sample | 1 -
+ files/mirrors-x86_64.sample | 1 -
+ 2 files changed, 2 deletions(-)
+
+diff --git a/files/mirrors-x86.sample b/files/mirrors-x86.sample
+index 922bc17..e31d22e 100644
+--- a/files/mirrors-x86.sample
++++ b/files/mirrors-x86.sample
+@@ -242,7 +242,6 @@
+ # ftp://mirror.its.dal.ca/slackware/slackware-current/
+ # http://mirror.its.dal.ca/slackware/slackware-current/
+ # CHINA (CN)
+-# http://mirror.bjtu.edu.cn/slackware/slackware-current/
+ # http://mirrors.163.com/slackware/slackware-current/
+ # http://mirrors.ustc.edu.cn/slackware/slackware-current/
+ # COSTA RICA (CR)
+diff --git a/files/mirrors-x86_64.sample b/files/mirrors-x86_64.sample
+index aae06f1..de65a31 100644
+--- a/files/mirrors-x86_64.sample
++++ b/files/mirrors-x86_64.sample
+@@ -240,7 +240,6 @@
+ # ftp://mirror.its.dal.ca/slackware/slackware64-current/
+ # http://mirror.its.dal.ca/slackware/slackware64-current/
+ # CHINA (CN)
+-# http://mirror.bjtu.edu.cn/slackware/slackware64-current/
+ # http://mirrors.163.com/slackware/slackware64-current/
+ # http://mirrors.ustc.edu.cn/slackware/slackware64-current/
+ # COSTA RICA (CR)
+--
+2.17.1
+
diff --git a/source/ap/slackpkg/doinst.sh b/source/ap/slackpkg/doinst.sh
index e04d744b..5e09d425 100644
--- a/source/ap/slackpkg/doinst.sh
+++ b/source/ap/slackpkg/doinst.sh
@@ -36,5 +36,4 @@ copy_mirror_file
config etc/slackpkg/mirrors.new
config etc/slackpkg/slackpkg.conf.new
config etc/slackpkg/blacklist.new
-rm -f var/lib/slackpkg/ChangeLog.txt
rm -f var/lib/slackpkg/pkglist
diff --git a/source/ap/slackpkg/slackpkg.SlackBuild b/source/ap/slackpkg/slackpkg.SlackBuild
index 7dc1949d..2d6fe94c 100755
--- a/source/ap/slackpkg/slackpkg.SlackBuild
+++ b/source/ap/slackpkg/slackpkg.SlackBuild
@@ -25,7 +25,7 @@ cd $(dirname $0) ; CWD=$(pwd)
PKGNAM=slackpkg
VERSION=${VERSION:-2.83.0}
ARCH="noarch"
-BUILD=${BUILD:-2}
+BUILD=${BUILD:-3}
# 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
@@ -76,11 +76,6 @@ gzip -d $PKG/usr/libexec/slackpkg/functions.d/*
chmod 755 $PKG/usr/libexec/slackpkg/functions.d/*
chown root:root $PKG/usr/libexec/slackpkg/functions.d/*
-# Apply patch in case /var/log/packages is a symlink:
-( cd $PKG/usr/libexec/slackpkg
- zcat $CWD/0001-Fix-for-var_log_packages-being-a-symlink.patch.gz | patch -p1 || exit 1
-) || exit 1
-
# Install man pages:
mkdir -pv $PKG/usr/man/man5
cp -av slackpkg.conf.5.gz $PKG/usr/man/man5
@@ -124,6 +119,21 @@ gzip -d $PKG/usr/doc/slackpkg-$VERSION/*
mkdir -pv $PKG/var/lib/slackpkg
mkdir -pv $PKG/var/cache/packages
+# Apply patch in case /var/log/packages is a symlink:
+( cd $PKG/usr/libexec/slackpkg
+ zcat $CWD/0001-Fix-for-var_log_packages-being-a-symlink.patch.gz | patch -p1 --verbose || exit 1
+) || exit 1
+
+# Check for new Changelog.txt by checking CHECKSUMS.md5.asc first:
+( cd $PKG/usr/libexec/slackpkg
+ zcat $CWD/0002-Use-CHECKSUMS.md5.asc-to-determine-ChangeLog-newness.patch.gz | patch -p2 --verbose || exit 1
+) || exit 1
+
+# Remove dead mirrors:
+( cd $PKG/usr/doc/slackpkg-$VERSION
+ zcat $CWD/0003-mirrors-x86-.sample-Remove-bjtu.edu.cn-mirror.patch.gz | patch -p2 --verbose || exit 1
+) || exit 1
+
mkdir -p $PKG/install
zcat $CWD/doinst.sh.gz | sed -e "s/@VERSION@/$VERSION/g" > $PKG/install/doinst.sh
cat $CWD/slack-desc > $PKG/install/slack-desc