Fixed ca-certificates package
This commit is contained in:
parent
cdacf16826
commit
ba4f0f2500
2 changed files with 36 additions and 15 deletions
|
@ -5,22 +5,26 @@ pkgrel=2
|
|||
fetch(){
|
||||
curl http://ftp.debian.org/debian/pool/main/c/ca-certificates/ca-certificates_20200601~deb10u2.tar.xz -o $pkgname-$pkgver.tar.gz
|
||||
tar -xf $pkgname-$pkgver.tar.gz
|
||||
mv work $pkgname-$pkgver
|
||||
cd $pkgname-$pkgver
|
||||
patch -p1 < ../../libressl-update-rehash.patch
|
||||
}
|
||||
|
||||
|
||||
build() {
|
||||
cd work
|
||||
make
|
||||
cd $pkgname-$pkgver
|
||||
gmake
|
||||
}
|
||||
|
||||
package() {
|
||||
mkdir build
|
||||
mkdir -p build/usr/bin
|
||||
mkdir -p build/usr/sbin
|
||||
mkdir -p build/etc/ssl/
|
||||
mkdir -p build/usr/share/ca-certificates
|
||||
cd $pkgname-$pkgver
|
||||
mkdir -p $pkgdir/usr/bin
|
||||
mkdir -p $pkgdir/usr/sbin
|
||||
mkdir -p $pkgdir/etc/ssl/
|
||||
mkdir -p $pkgdir/etc/ca-certificates/update.d
|
||||
mkdir -p $pkgdir/usr/share/ca-certificates/
|
||||
|
||||
make install DESTDIR="$pkgdir/build"
|
||||
gmake install DESTDIR="$pkgdir"
|
||||
|
||||
(
|
||||
echo "# Automatically generated by ${pkgname}-${pkgver}-${pkgrel}"
|
||||
|
@ -28,15 +32,18 @@ package() {
|
|||
echo "# Do not edit."
|
||||
cd "$pkgdir"/usr/share/ca-certificates
|
||||
find . -name '*.crt' | sort | cut -b3-
|
||||
) > "$pkgdir/build"/etc/ca-certificates.conf
|
||||
) > "$pkgdir"/etc/ca-certificates.conf
|
||||
|
||||
cat > "$pkgdir/build"/etc/ca-certificates/update.d/certhash <<-EOF
|
||||
cat > "$pkgdir"/etc/ca-certificates/update.d/certhash <<-EOF
|
||||
#!/bin/sh
|
||||
exec /usr/bin/c_rehash /etc/ssl/certs
|
||||
exec openssl certhash /etc/ssl/certs
|
||||
EOF
|
||||
|
||||
cat "$pkgdir/build"/usr/share/ca-certificates/mozilla/*.crt > $pkgdir/build/etc/ssl/cert.pem
|
||||
chmod +x "$pkgdir/build"/etc/ca-certificates/update.d/certhash
|
||||
mv -v ${pkgdir}/build/usr/sbin/* ${pkgdir}/build/usr/bin/
|
||||
rm -rf ${pkgdir}/build/usr/sbin
|
||||
cat "$pkgdir"/usr/share/ca-certificates/mozilla/*.crt > $pkgdir/etc/ssl/cert.pem
|
||||
chmod +x "$pkgdir"/etc/ca-certificates/update.d/certhash
|
||||
}
|
||||
|
||||
license() {
|
||||
cd $pkgname-$pkgver
|
||||
cat debian/copyright
|
||||
}
|
||||
|
|
14
pkgs/ca-certificates/libressl-update-rehash.patch
Normal file
14
pkgs/ca-certificates/libressl-update-rehash.patch
Normal file
|
@ -0,0 +1,14 @@
|
|||
--- a/sbin/update-ca-certificates
|
||||
+++ b/sbin/update-ca-certificates
|
||||
@@ -183,9 +183,9 @@
|
||||
done
|
||||
if [ "$verbose" = 0 ]
|
||||
then
|
||||
- openssl rehash . > /dev/null
|
||||
+ openssl certhash . > /dev/null
|
||||
else
|
||||
- openssl rehash -v .
|
||||
+ openssl certhash -v .
|
||||
fi
|
||||
fi
|
||||
|
Loading…
Reference in a new issue