summaryrefslogtreecommitdiffstats
path: root/patches/source/ca-certificates
diff options
context:
space:
mode:
Diffstat (limited to 'patches/source/ca-certificates')
-rwxr-xr-xpatches/source/ca-certificates/ca-certificates.SlackBuild91
-rw-r--r--patches/source/ca-certificates/doinst.sh19
-rw-r--r--patches/source/ca-certificates/patches/fixup_DESTDIR.diff49
-rw-r--r--patches/source/ca-certificates/patches/fixup_update-ca-certificates.diff12
-rw-r--r--patches/source/ca-certificates/setup.11.cacerts3
-rw-r--r--patches/source/ca-certificates/slack-desc19
6 files changed, 193 insertions, 0 deletions
diff --git a/patches/source/ca-certificates/ca-certificates.SlackBuild b/patches/source/ca-certificates/ca-certificates.SlackBuild
new file mode 100755
index 000000000..ba1be3e7d
--- /dev/null
+++ b/patches/source/ca-certificates/ca-certificates.SlackBuild
@@ -0,0 +1,91 @@
+#!/bin/sh
+
+# 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
+# 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.
+
+PKGNAM=ca-certificates
+VERSION=${VERSION:-20161130}
+ARCH=noarch
+BUILD=${BUILD:-1_slack14.1}
+
+TARVERSION=${VERSION}+nmu1
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+PKG=$TMP/package-$PKGNAM
+
+rm -rf $PKG
+mkdir -p $TMP $PKG/usr/share/ca-certificates $PKG/usr/sbin
+cd $TMP
+
+# Need both $PKGNAM and $PKGNAM-$VERSION since upstream can't decide how
+# to package their tarball:
+rm -rf $PKGNAM $PKGNAM-$VERSION
+
+# Extract the tarball:
+tar xvf $CWD/${PKGNAM}_$TARVERSION.tar.?z || exit 1
+
+# Again, both $PKGNAM and $PKGNAM-$VERSION are needed here:
+cd $PKGNAM-$VERSION || cd $PKGNAM || exit 1
+
+chown -R root:root .
+find . \
+ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
+ -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
+ -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/patches/fixup_update-ca-certificates.diff.gz | patch -p1 || exit 1
+
+make || exit 1
+make install DESTDIR=$PKG || exit 1
+
+mkdir -p $PKG/etc/ca-certificates/update.d
+printf "# Automatically generated by $PKGNAM-$VERSION \n#\n" \
+ > $PKG/etc/ca-certificates.conf.new
+( cd $PKG/usr/share/ca-certificates
+ find . -name '*.crt' | sort | cut -b3-
+) >> $PKG/etc/ca-certificates.conf.new
+
+mkdir -p $PKG/usr/man/man8
+gzip -9c sbin/update-ca-certificates.8 > \
+ $PKG/usr/man/man8/update-ca-certificates.8.gz
+
+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
+
+mkdir -p $PKG/var/log/setup
+cat $CWD/setup.11.cacerts > $PKG/var/log/setup/setup.11.cacerts
+chmod 755 $PKG/var/log/setup/setup.11.cacerts
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+zcat $CWD/doinst.sh.gz > $PKG/install/doinst.sh
+
+cd $PKG
+/sbin/makepkg -l y -c n $TMP/$PKGNAM-$VERSION-$ARCH-$BUILD.txz
diff --git a/patches/source/ca-certificates/doinst.sh b/patches/source/ca-certificates/doinst.sh
new file mode 100644
index 000000000..cfd7d795e
--- /dev/null
+++ b/patches/source/ca-certificates/doinst.sh
@@ -0,0 +1,19 @@
+config() {
+ NEW="$1"
+ OLD="$(dirname $NEW)/$(basename $NEW .new)"
+ # If there's no config file by that name, mv it over:
+ if [ ! -r $OLD ]; then
+ mv $NEW $OLD
+ elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then
+ # toss the redundant copy
+ rm $NEW
+ fi
+ # Otherwise, we leave the .new copy for the admin to consider...
+}
+
+config etc/ca-certificates.conf.new
+
+if [ -x /usr/sbin/update-ca-certificates ]; then
+ /usr/sbin/update-ca-certificates --fresh 1> /dev/null 2> /dev/null
+fi
+
diff --git a/patches/source/ca-certificates/patches/fixup_DESTDIR.diff b/patches/source/ca-certificates/patches/fixup_DESTDIR.diff
new file mode 100644
index 000000000..964064184
--- /dev/null
+++ b/patches/source/ca-certificates/patches/fixup_DESTDIR.diff
@@ -0,0 +1,49 @@
+--- ./cacert.org/Makefile.orig
++++ ./cacert.org/Makefile
+@@ -7,6 +7,7 @@
+ clean:
+
+ install:
++ mkdir -p $(CERTSDIR)
+ for p in *.crt; do \
+ install -m 644 $$p $(CERTSDIR)/cacert.org_$$p ; \
+ done
+--- ./mozilla/Makefile.orig
++++ ./mozilla/Makefile
+@@ -9,6 +9,7 @@
+ -rm -f *.crt
+
+ install:
++ mkdir -p $(CERTSDIR)
+ for p in *.crt; do \
+ install -m 644 $$p $(CERTSDIR)/$$p ; \
+ done
+--- ./sbin/Makefile.orig
++++ ./sbin/Makefile
+@@ -8,4 +8,5 @@
+ clean:
+
+ install:
++ mkdir -p $(DESTDIR)/usr/sbin
+ install -m755 update-ca-certificates $(DESTDIR)/usr/sbin/
+--- ./Makefile.orig
++++ ./Makefile
+@@ -17,7 +17,7 @@
+
+ install:
+ for dir in $(SUBDIRS); do \
+- mkdir $(DESTDIR)/$(CERTSDIR)/$$dir; \
++ mkdir -p $(DESTDIR)/$(CERTSDIR)/$$dir; \
+ $(MAKE) -C $$dir install CERTSDIR=$(DESTDIR)/$(CERTSDIR)/$$dir; \
+ done
+ for dir in sbin; do \
+--- ./spi-inc.org/Makefile.orig
++++ ./spi-inc.org/Makefile
+@@ -7,6 +7,7 @@
+ clean:
+
+ install:
++ mkdir -p $PKG/$(CERTSDIR)
+ for p in *.crt; do \
+ install -m 644 $$p $(CERTSDIR)/$$p ; \
+ done
diff --git a/patches/source/ca-certificates/patches/fixup_update-ca-certificates.diff b/patches/source/ca-certificates/patches/fixup_update-ca-certificates.diff
new file mode 100644
index 000000000..1c3940585
--- /dev/null
+++ b/patches/source/ca-certificates/patches/fixup_update-ca-certificates.diff
@@ -0,0 +1,12 @@
+diff -urN ca-certificates-20150426.orig/sbin/update-ca-certificates ca-certificates-20150426/sbin/update-ca-certificates
+--- ca-certificates-20150426.orig/sbin/update-ca-certificates 2015-04-01 13:47:25.000000000 +0100
++++ ca-certificates-20150426/sbin/update-ca-certificates 2015-09-14 22:51:39.856021883 +0100
+@@ -193,7 +193,7 @@
+ echo "Running hooks in $HOOKSDIR..."
+ VERBOSE_ARG=
+ [ "$verbose" = 0 ] || VERBOSE_ARG="--verbose"
+- eval run-parts "$VERBOSE_ARG" --test -- "$HOOKSDIR" | while read hook
++ eval run-parts "$HOOKSDIR" | while read hook
+ do
+ ( cat "$ADDED"
+ cat "$REMOVED" ) | "$hook" || echo "E: $hook exited with code $?."
diff --git a/patches/source/ca-certificates/setup.11.cacerts b/patches/source/ca-certificates/setup.11.cacerts
new file mode 100644
index 000000000..328b61c0f
--- /dev/null
+++ b/patches/source/ca-certificates/setup.11.cacerts
@@ -0,0 +1,3 @@
+#!/bin/sh
+#BLURB="Rebuild SSL certificate database."
+chroot . usr/sbin/update-ca-certificates --fresh 1> /dev/null 2> /dev/null
diff --git a/patches/source/ca-certificates/slack-desc b/patches/source/ca-certificates/slack-desc
new file mode 100644
index 000000000..c302e8283
--- /dev/null
+++ b/patches/source/ca-certificates/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# 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
+# customary to leave one space after the ':'.
+
+ |-----handy-ruler-----------------------------------------------------|
+ca-certificates: ca-certificates (PEM Files of CA Certificates)
+ca-certificates:
+ca-certificates: This package includes PEM files of CA certificates to allow SSL-based
+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:
+ca-certificates:
+ca-certificates:
+ca-certificates: