summaryrefslogtreecommitdiff
path: root/libre
diff options
context:
space:
mode:
authorAndré Fabian Silva Delgado <emulatorman@parabola.nu>2014-09-05 04:29:10 -0300
committerAndré Fabian Silva Delgado <emulatorman@parabola.nu>2014-09-05 04:29:10 -0300
commit72293ab90315344dc711ce226a1a071b9009ad0f (patch)
tree0916361c64326ad92e26a7dee5d6e620e478cb46 /libre
parent0755a3a533723729bc7fa4cbbca5020c87ddb09b (diff)
downloadabslibre-72293ab90315344dc711ce226a1a071b9009ad0f.tar.gz
abslibre-72293ab90315344dc711ce226a1a071b9009ad0f.tar.bz2
abslibre-72293ab90315344dc711ce226a1a071b9009ad0f.zip
ca-certificates-utils: add new package to [libre] because it's a dependency of ca-certificates-cacert
Diffstat (limited to 'libre')
-rw-r--r--libre/ca-certificates-utils/PKGBUILD35
-rw-r--r--libre/ca-certificates-utils/ca-certificates-utils.install18
-rw-r--r--libre/ca-certificates-utils/confd.patch28
3 files changed, 81 insertions, 0 deletions
diff --git a/libre/ca-certificates-utils/PKGBUILD b/libre/ca-certificates-utils/PKGBUILD
new file mode 100644
index 000000000..8e502d92a
--- /dev/null
+++ b/libre/ca-certificates-utils/PKGBUILD
@@ -0,0 +1,35 @@
+# $Id: PKGBUILD 220624 2014-08-24 14:47:50Z heftig $
+# Maintainer (Arch): Pierre Schmitz <pierre@archlinux.de>
+
+pkgbase=ca-certificates
+pkgname=ca-certificates-utils
+pkgver=20140325
+pkgrel=0.2.parabola1 # build with 0.x only and keep this package on [libre] temporally until which Arch official package be moved from [testing] to some stable repo
+pkgdesc='Common CA certificates (utilities)'
+arch=('any')
+url='http://packages.qa.debian.org/c/ca-certificates.html'
+license=('MPL' 'GPL')
+depends=('bash' 'run-parts' 'openssl' 'findutils' 'coreutils' 'sed')
+makedepends=('python2')
+backup=('etc/ca-certificates.conf')
+install=ca-certificates-utils.install
+provides=(ca-certificates)
+source=("http://ftp.debian.org/debian/pool/main/c/${pkgbase}/${pkgbase}_${pkgver}.tar.xz"
+ confd.patch)
+sha256sums=('c0e3d8c517995db2737f7f1a9b69d654b8823fa6d337871c6ce111fcf083454a'
+ '6a6efe688bd7f40dc57d07ad6bfdbb83f4853a1964c55e0620e833e6c2945dab')
+
+prepare() {
+ cd "${srcdir}/${pkgbase}"
+ patch -Np1 -i ../confd.patch
+}
+
+package() {
+ cd "${srcdir}/${pkgbase}"
+
+ install -d "${pkgdir}"/{etc/{ca-certificates/update.d,ssl/certs},usr/share/ca-certificates}
+ install -Dm644 sbin/update-ca-certificates.8 "${pkgdir}/usr/share/man/man8/update-ca-certificates.8"
+ install -D sbin/update-ca-certificates "${pkgdir}/usr/bin/update-ca-certificates"
+}
+
+# vim:set noet ts=8 sw=8:
diff --git a/libre/ca-certificates-utils/ca-certificates-utils.install b/libre/ca-certificates-utils/ca-certificates-utils.install
new file mode 100644
index 000000000..8e8a483ab
--- /dev/null
+++ b/libre/ca-certificates-utils/ca-certificates-utils.install
@@ -0,0 +1,18 @@
+export LC_ALL=C
+
+post_install() {
+ usr/bin/update-ca-certificates --fresh >/dev/null 2>&1
+}
+
+post_upgrade() {
+ usr/bin/update-ca-certificates --fresh >/dev/null 2>&1
+}
+
+pre_remove() {
+ usr/bin/update-ca-certificates --fresh >/dev/null 2>&1
+}
+
+post_remove() {
+ # remove the cert file if it is empty
+ [[ -s etc/ssl/certs/ca-certificates.crt ]] || rm -f etc/ssl/certs/ca-certificates.crt
+}
diff --git a/libre/ca-certificates-utils/confd.patch b/libre/ca-certificates-utils/confd.patch
new file mode 100644
index 000000000..4cf830170
--- /dev/null
+++ b/libre/ca-certificates-utils/confd.patch
@@ -0,0 +1,28 @@
+diff -u -Nwr ca-certificates/sbin/update-ca-certificates ca-certificates.confd/sbin/update-ca-certificates
+--- ca-certificates/sbin/update-ca-certificates 2014-03-13 13:43:00.000000000 +0100
++++ ca-certificates.confd/sbin/update-ca-certificates 2014-08-24 13:36:19.264068119 +0200
+@@ -37,7 +37,7 @@
+ shift
+ done
+
+-CERTSCONF=/etc/ca-certificates.conf
++CERTSCONFS=/etc/ca-certificates/conf.d/*.conf
+ CERTSDIR=/usr/share/ca-certificates
+ LOCALCERTSDIR=/usr/local/share/ca-certificates
+ CERTBUNDLE=ca-certificates.crt
+@@ -101,6 +101,7 @@
+
+ echo -n "Updating certificates in $ETCCERTSDIR... "
+
++for CERTSCONF in $CERTSCONFS; do
+ # Handle certificates that should be removed. This is an explicit act
+ # by prefixing lines in the configuration files with exclamation marks (!).
+ sed -n -e '/^$/d' -e 's/^!//p' $CERTSCONF | while read crt
+@@ -117,6 +118,7 @@
+ fi
+ add "$CERTSDIR/$crt"
+ done
++done
+
+ # Now process certificate authorities installed by the local system
+ # administrator.