Index: npl/system/ca_certificates/ca-certificates.SlackBuild.orig
===================================================================
--- npl/system/ca_certificates/ca-certificates.SlackBuild.orig	(revision ca72abac4881e0873f850813f3b9137f607cbe93)
+++ npl/system/ca_certificates/ca-certificates.SlackBuild.orig	(revision 6e790ab32721e3991cb4f94da3a255d441a17ec9)
@@ -1,8 +1,8 @@
-#!/bin/sh
+#!/bin/bash
 
 # Slackware build script for ca-certificates
 
 # Copyright 2009,2011  Robby Workman  Northport, AL, USA
-# Copyright 2012, 2013, 2015, 2016  Patrick J. Volkerding, Sebeka, MN, USA
+# Copyright 2012, 2013, 2015, 2016, 2018  Patrick J. Volkerding, Sebeka, MN, USA
 # All rights reserved.
 #
@@ -24,12 +24,21 @@
 # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
+cd $(dirname $0) ; CWD=$(pwd)
+
 PKGNAM=ca-certificates
-VERSION=${VERSION:-20161130}
+VERSION=${VERSION:-$(echo certdata-*.txt.xz | cut -f 2 -d - | cut -f 1 -d .)}
 ARCH=noarch
 BUILD=${BUILD:-1_slack14.2}
 
-TARVERSION=${VERSION}+nmu1
+# 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-$ARCH-$BUILD.txz"
+  exit 0
+fi
 
-CWD=$(pwd)
+TARVERSION=${VERSION}
+
 TMP=${TMP:-/tmp}
 PKG=$TMP/package-$PKGNAM
@@ -39,13 +48,10 @@
 cd $TMP
 
-# Need both $PKGNAM and $PKGNAM-$VERSION since upstream can't decide how
-# to package their tarball:
-rm -rf $PKGNAM $PKGNAM-$VERSION
+rm -rf $PKGNAM
 
 # Extract the tarball:
-tar xvf $CWD/${PKGNAM}_$TARVERSION.tar.?z || exit 1
+tar xvf $CWD/${PKGNAM}.tar.?z || exit 1
 
-# Again, both $PKGNAM and $PKGNAM-$VERSION are needed here:
-cd $PKGNAM-$VERSION || cd $PKGNAM || exit 1
+cd $PKGNAM || exit 1
 
 chown -R root:root .
@@ -56,19 +62,29 @@
  -exec chmod 644 {} \;
 
-# Obsolete?
-#zcat $CWD/patches/fixup_DESTDIR.diff.gz | patch -p1 || exit 1
+# Remove incompatible command operators used to call 'run-parts':
+zcat $CWD/fixup_update-ca-certificates.diff.gz | patch -p1 || exit 1
 
-# Remove incompatible command operators used to call 'run-parts':
-zcat $CWD/patches/fixup_update-ca-certificates.diff.gz | patch -p1 || exit 1
+# Use "c_rehash" rather than "openssl rehash". They act mostly the same, but
+# the openssl builtin is not available on older versions of Slackware, while
+# c_rehash will always be there.
+zcat $CWD/update-ca-certificates.c_rehash.diff.gz | patch -p1 || exit 1
+
+# Update to certdata.txt from $CWD:
+xzcat $CWD/certdata-${VERSION}.txt.xz > mozilla/certdata.txt
 
 make || exit 1
 make install DESTDIR=$PKG || exit 1
 
+# Remove expired certificate:
+if [ -r $PKG//usr/share/ca-certificates/mozilla/DST_Root_CA_X3.crt ]; then
+  rm -f $PKG//usr/share/ca-certificates/mozilla/DST_Root_CA_X3.crt
+fi
+
 mkdir -p $PKG/etc/ca-certificates/update.d
 printf "# Automatically generated by $PKGNAM-$VERSION \n#\n" \
-  > $PKG/etc/ca-certificates.conf.new
+  > $PKG/etc/ca-certificates.conf
 ( cd $PKG/usr/share/ca-certificates
   find . -name '*.crt' | sort | cut -b3-
-) >> $PKG/etc/ca-certificates.conf.new
+) >> $PKG/etc/ca-certificates.conf
 
 mkdir -p $PKG/usr/man/man8
@@ -77,6 +93,5 @@
 
 mkdir -p $PKG/usr/doc/$PKGNAM-$VERSION
-mv debian/NEWS debian/NEWS.Debian
-cp -a debian/NEWS.Debian debian/README.Debian $PKG/usr/doc/$PKGNAM-$VERSION
+cp -a docs/* $PKG/usr/doc/$PKGNAM-$VERSION
 
 mkdir -p $PKG/var/log/setup
Index: npl/system/ca_certificates/ca_certificates.SlackBuild
===================================================================
--- npl/system/ca_certificates/ca_certificates.SlackBuild	(revision ca72abac4881e0873f850813f3b9137f607cbe93)
+++ npl/system/ca_certificates/ca_certificates.SlackBuild	(revision 6e790ab32721e3991cb4f94da3a255d441a17ec9)
@@ -3,5 +3,5 @@
 # Automaticly created by importpackage v1.0
 # Imported from: https://mirrors.slackware.com/slackware/slackware-14.2/patches/source/ca-certificates/
-# Created at Thu Sep 20 18:32:49 CEST 2018
+# Created at ma 29 nov 2021 11:53:10 CET
 
 
@@ -11,6 +11,4 @@
 source ./ca-certificates.SlackBuild.orig
 
-mkdir -p /tmp/package-ca-certificates/etc/cron.weekly
-ln -s /usr/sbin/update-ca-certificates /tmp/package-ca-certificates/etc/cron.weekly
 
 ############ make syn3 packages
Index: npl/system/ca_certificates/ca_certificates.build
===================================================================
--- npl/system/ca_certificates/ca_certificates.build	(revision ca72abac4881e0873f850813f3b9137f607cbe93)
+++ npl/system/ca_certificates/ca_certificates.build	(revision 6e790ab32721e3991cb4f94da3a255d441a17ec9)
@@ -1,1 +1,1 @@
-6
+7
Index: npl/system/ca_certificates/ca_certificates.md5
===================================================================
--- npl/system/ca_certificates/ca_certificates.md5	(revision ca72abac4881e0873f850813f3b9137f607cbe93)
+++ npl/system/ca_certificates/ca_certificates.md5	(revision 6e790ab32721e3991cb4f94da3a255d441a17ec9)
@@ -1,11 +1,13 @@
-a09e8b63126188fd0ed77f6fbaf5d35f  ./ca-certificates_20161130+nmu1.tar.xz
-f357913107c91908803032be7651db56  ./ca_certificates_dev.pkg
-b32269196c2fa44651fb14b021430eec  ./ca_certificates.pkg
-6cb73b8350729401c29f1b2e15cff2b8  ./ca_certificates.SlackBuild
-5d289f1bc67afe47662457accc53963d  ./ca_certificates.SlackBuild.log.gz
-c23d716a27384ed57c9085d400d4cbf9  ./ca-certificates.SlackBuild.orig
-d14bfbd360d69256b0f5a916301fdb5a  ./doinst.sh.gz
-260654f21ca5431270192d94f421cfc2  ./patches/fixup_DESTDIR.diff.gz
-cc23ac9b45fa4649ade60f64fe02eb7d  ./patches/fixup_update-ca-certificates.diff.gz
+c503ec33059aacb4f4a88081cc2bd969  ./ca_certificates_dev.pkg
+1c80d0320a10ae55a9122f1053cd2074  ./ca_certificates.pkg
+bdb5f5c4ba574445ab0819e345f42081  ./ca_certificates.SlackBuild
+648c1c4d1fbd9ded03c092cb18607fe7  ./ca_certificates.SlackBuild.log.gz
+b0263ee8f963696cf657d84d49a13ed5  ./ca-certificates.SlackBuild.orig
+a36a44cf0586536772c200fd9ee10fa7  ./ca-certificates.tar.xz
+54a1ef614be13310a71f99a506d522bc  ./certdata-20211005.txt.xz
+2bc10162481837f7b4c8c7532dca0854  ./doinst.sh.gz
+cc23ac9b45fa4649ade60f64fe02eb7d  ./fixup_update-ca-certificates.diff.gz
+90833611bbc0db730880e8eb4ca7ca97  ./get-certdata.txt.sh
 5dbe990e59d512ceb425ea6475ef0ae0  ./setup.11.cacerts
-026b3a65d346d6d845f3497819b42fdb  ./slack-desc
+95c835581d5db3a3188e00f437d83dec  ./slack-desc
+e64b203a2dc95ad7de22be3f7e6d4739  ./update-ca-certificates.c_rehash.diff.gz
Index: npl/system/ca_certificates/ca_certificates.version
===================================================================
--- npl/system/ca_certificates/ca_certificates.version	(revision ca72abac4881e0873f850813f3b9137f607cbe93)
+++ npl/system/ca_certificates/ca_certificates.version	(revision 6e790ab32721e3991cb4f94da3a255d441a17ec9)
@@ -1,1 +1,1 @@
-20161130
+20211005
Index: npl/system/ca_certificates/ca_certificates_dev.build
===================================================================
--- npl/system/ca_certificates/ca_certificates_dev.build	(revision ca72abac4881e0873f850813f3b9137f607cbe93)
+++ npl/system/ca_certificates/ca_certificates_dev.build	(revision 6e790ab32721e3991cb4f94da3a255d441a17ec9)
@@ -1,1 +1,1 @@
-6
+7
Index: npl/system/ca_certificates/ca_certificates_dev.version
===================================================================
--- npl/system/ca_certificates/ca_certificates_dev.version	(revision ca72abac4881e0873f850813f3b9137f607cbe93)
+++ npl/system/ca_certificates/ca_certificates_dev.version	(revision 6e790ab32721e3991cb4f94da3a255d441a17ec9)
@@ -1,1 +1,1 @@
-20161130
+20211005
Index: npl/system/ca_certificates/get-certdata.txt.sh
===================================================================
--- npl/system/ca_certificates/get-certdata.txt.sh	(revision 6e790ab32721e3991cb4f94da3a255d441a17ec9)
+++ npl/system/ca_certificates/get-certdata.txt.sh	(revision 6e790ab32721e3991cb4f94da3a255d441a17ec9)
@@ -0,0 +1,39 @@
+#!/bin/sh
+
+# Copyright 2018  Patrick J. Volkerding, Sebeka, Minnesota, USA
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+#    notice, this list of conditions and the following disclaimer.
+#
+#  THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
+#  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+#  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO
+#  EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+#  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+#  PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+#  OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+#  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+#  OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+#  ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+CWD=$(pwd)
+
+# Make temporary directory:
+TMP_CERT_DIR=$(mktemp -d)
+
+cd $TMP_CERT_DIR
+lftpget https://hg.mozilla.org/mozilla-central/raw-file/tip/security/nss/lib/ckfw/builtins/certdata.txt
+xzcat $CWD/certdata-*.txt.xz > old
+if diff old certdata.txt > /dev/null 2> /dev/null ; then
+  echo "No certdata.txt update available"
+else
+  xz -9 certdata.txt
+  rm -f $CWD/certdata-*.txt.xz
+  mv certdata.txt.xz $CWD/certdata-$(date "+%Y%m%d").txt.xz
+  echo "New certdata.txt found and installed in $CWD"
+fi
+rm -rf $TMP_CERT_DIR
Index: npl/system/ca_certificates/slack-desc
===================================================================
--- npl/system/ca_certificates/slack-desc	(revision ca72abac4881e0873f850813f3b9137f607cbe93)
+++ npl/system/ca_certificates/slack-desc	(revision 6e790ab32721e3991cb4f94da3a255d441a17ec9)
@@ -1,7 +1,7 @@
 # HOW TO EDIT THIS FILE:
-# The "handy ruler" below makes it easier to edit a package description.  Line
+# The "handy ruler" below makes it easier to edit a package description. Line
 # up the first '|' above the ':' following the base package name, and the '|'
-# on the right side marks the last column you can put a character in.  You must
-# make exactly 11 lines for the formatting to be correct.  It's also
+# on the right side marks the last column you can put a character in. You must
+# make exactly 11 lines for the formatting to be correct. It's also
 # customary to leave one space after the ':'.
 
@@ -12,5 +12,4 @@
 ca-certificates: applications to check for the authenticity of SSL connections.
 ca-certificates:
-ca-certificates: Homepage: http://packages.qa.debian.org/c/ca-certificates.html
 ca-certificates:
 ca-certificates:
@@ -18,2 +17,3 @@
 ca-certificates:
 ca-certificates:
+ca-certificates:
