mirror of
https://gitdl.cn/https://github.com/chakralinux/core.git
synced 2025-02-03 10:07:15 +08:00
update ca-certificates
This commit is contained in:
parent
07ab0b59b6
commit
e583615d73
@ -2,46 +2,42 @@
|
||||
# Core packages for Chakra, part of chakra-project.org
|
||||
#
|
||||
|
||||
pkgname=ca-certificates
|
||||
pkgbase=ca-certificates
|
||||
pkgname=(ca-certificates-utils ca-certificates)
|
||||
pkgver=20140325
|
||||
pkgrel=1
|
||||
pkgrel=2
|
||||
pkgdesc='Common CA certificates'
|
||||
arch=('any')
|
||||
url='http://packages.qa.debian.org/c/ca-certificates.html'
|
||||
license=('MPL' 'GPL')
|
||||
source=("http://ftp.debian.org/debian/pool/main/c/${pkgname}/${pkgname}_${pkgver}.tar.xz")
|
||||
depends=('bash' 'run-parts' 'openssl' 'findutils' 'coreutils' 'sed')
|
||||
makedepends=('ruby' 'python2')
|
||||
install='ca-certificates.install'
|
||||
backup=('etc/ca-certificates.conf')
|
||||
md5sums=('0436aba482091da310bd762e1deca8b4')
|
||||
makedepends=('python2')
|
||||
source=("http://ftp.debian.org/debian/pool/main/c/${pkgbase}/${pkgbase}_${pkgver}.tar.xz"
|
||||
confd.patch)
|
||||
sha256sums=('c0e3d8c517995db2737f7f1a9b69d654b8823fa6d337871c6ce111fcf083454a'
|
||||
'6a6efe688bd7f40dc57d07ad6bfdbb83f4853a1964c55e0620e833e6c2945dab')
|
||||
|
||||
prepare() {
|
||||
cd ${srcdir}/${pkgname}
|
||||
|
||||
sed 's|/usr/bin/python|/usr/bin/python2|g' -i mozilla/certdata2pem.py
|
||||
sed 's|python|python2|g' -i mozilla/Makefile
|
||||
cd "${srcdir}/${pkgbase}"
|
||||
patch -Np1 -i ../confd.patch
|
||||
}
|
||||
|
||||
build() {
|
||||
cd ${srcdir}/${pkgname}
|
||||
make
|
||||
package_ca-certificates-utils() {
|
||||
pkgdesc+=" (utilities)"
|
||||
backup=('etc/ca-certificates.conf')
|
||||
install=ca-certificates-utils.install
|
||||
provides=(ca-certificates)
|
||||
|
||||
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"
|
||||
}
|
||||
|
||||
package() {
|
||||
cd ${srcdir}/${pkgname}
|
||||
|
||||
install -d -m755 "${pkgdir}"/{etc/ca-certificates/update.d,usr/{sbin,share/ca-certificates},etc/ssl/certs}
|
||||
make install DESTDIR="${pkgdir}"
|
||||
install -D -m644 sbin/update-ca-certificates.8 "${pkgdir}/usr/share/man/man8/update-ca-certificates.8"
|
||||
|
||||
(
|
||||
echo "# Automatically generated by ${pkgname}-${pkgver}-${pkgrel}"
|
||||
echo "# see update-ca-certificates man page"
|
||||
echo "# "
|
||||
cd ${pkgdir}/usr/share/ca-certificates
|
||||
find . -name '*.crt' | sort | cut -b3-
|
||||
) > ${pkgdir}/etc/ca-certificates.conf
|
||||
package_ca-certificates() {
|
||||
pkgdesc+=" (default providers)"
|
||||
depends=(ca-certificates-{mozilla,cacert})
|
||||
}
|
||||
|
||||
# vim:set ts=2 sw=2 et:
|
||||
|
18
ca-certificates/ca-certificates-utils.install
Normal file
18
ca-certificates/ca-certificates-utils.install
Normal file
@ -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
|
||||
}
|
@ -1,21 +0,0 @@
|
||||
post_install() {
|
||||
usr/sbin/update-ca-certificates --fresh
|
||||
}
|
||||
|
||||
post_upgrade() {
|
||||
usr/sbin/update-ca-certificates --fresh
|
||||
}
|
||||
|
||||
pre_remove() {
|
||||
# clean up certificates
|
||||
local _backup=$(mktemp)
|
||||
mv etc/ca-certificates.conf ${_backup}
|
||||
echo > etc/ca-certificates.conf
|
||||
usr/sbin/update-ca-certificates --fresh
|
||||
mv ${_backup} etc/ca-certificates.conf
|
||||
}
|
||||
|
||||
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
|
||||
}
|
28
ca-certificates/confd.patch
Normal file
28
ca-certificates/confd.patch
Normal file
@ -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.
|
35
p11-kit/PKGBUILD
Normal file
35
p11-kit/PKGBUILD
Normal file
@ -0,0 +1,35 @@
|
||||
# $Id$
|
||||
# Maintainer: Ionut Biru <ibiru@archlinux.org>
|
||||
|
||||
pkgname=p11-kit
|
||||
pkgver=0.21.3
|
||||
pkgrel=1
|
||||
pkgdesc="Library to work with PKCS#11 modules"
|
||||
arch=(i686 x86_64)
|
||||
url="http://p11-glue.freedesktop.org"
|
||||
license=('BSD')
|
||||
depends=('glibc' 'libtasn1' 'libffi')
|
||||
source=($url/releases/$pkgname-$pkgver.tar.gz{,.sig})
|
||||
md5sums=('6db518aa96f929182ee4d364f4f0c5df'
|
||||
'SKIP')
|
||||
|
||||
build() {
|
||||
cd $pkgname-$pkgver
|
||||
./configure --prefix=/usr --sysconfdir=/etc \
|
||||
--with-module-path=/usr/lib/pkcs11 \
|
||||
--with-trust-paths=/etc/ca-certificates/trust-source:/usr/share/ca-certificates/trust-source
|
||||
make
|
||||
}
|
||||
|
||||
check() {
|
||||
cd $pkgname-$pkgver
|
||||
make check
|
||||
}
|
||||
|
||||
package() {
|
||||
cd $pkgname-$pkgver
|
||||
make DESTDIR="$pkgdir" install
|
||||
install -Dm644 COPYING $pkgdir/usr/share/licenses/$pkgname/COPYING
|
||||
}
|
||||
|
||||
# vim:set ts=2 sw=2 et:
|
Loading…
Reference in New Issue
Block a user