- 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