blob: dd62883666b1203d50b937023c40d8a89cd17d89 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
|
- prefix absolute paths with $DESTDIR
- subtract DESTDIR from the link name when linking
- add DESTDIR again when catting certs together (Yay.)
--- ca-certificates-20090814.orig/sbin/update-ca-certificates 2009-07-08 23:23:12.000000000 +0200
+++ ca-certificates-20090814/sbin/update-ca-certificates 2009-08-22 21:10:24.210186675 +0200
@@ -37,11 +37,11 @@ do
shift
done
-CERTSCONF=/etc/ca-certificates.conf
-CERTSDIR=/usr/share/ca-certificates
-LOCALCERTSDIR=/usr/local/share/ca-certificates
+CERTSCONF=${DESTDIR}/etc/ca-certificates.conf
+CERTSDIR=${DESTDIR}/usr/share/ca-certificates
+LOCALCERTSDIR=${DESTDIR}/usr/local/share/ca-certificates
CERTBUNDLE=ca-certificates.crt
-ETCCERTSDIR=/etc/ssl/certs
+ETCCERTSDIR=${DESTDIR}/etc/ssl/certs
cleanup() {
rm -f "$TEMPBUNDLE"
@@ -60,7 +60,7 @@ REMOVED="$(mktemp -t "ca-certificates.tm
# in /etc/ssl/certs to the certificate file and its inclusion into the
# bundle.
add() {
- CERT="$1"
+ CERT="${1##${DESTDIR}}"
PEM="$ETCCERTSDIR/$(basename "$CERT" .crt | sed -e 's/ /_/g' \
-e 's/[()]/=/g' \
-e 's/,/_/g').pem"
@@ -69,7 +69,7 @@ add() {
ln -sf "$CERT" "$PEM"
echo +$PEM >> "$ADDED"
fi
- cat "$CERT" >> "$TEMPBUNDLE"
+ cat "${DESTDIR}/$CERT" >> "$TEMPBUNDLE"
}
remove() {
@@ -146,7 +146,7 @@ fi
echo "$ADDED_CNT added, $REMOVED_CNT removed; done."
-HOOKSDIR=/etc/ca-certificates/update.d
+HOOKSDIR=${DESTDIR}/etc/ca-certificates/update.d
echo -n "Running hooks in $HOOKSDIR...."
VERBOSE_ARG=
[ "$verbose" = 0 ] || VERBOSE_ARG=--verbose
|