From: Jan Rękorajski Date: Sat, 1 Nov 2008 18:20:10 +0000 (+0000) Subject: - allow placing ca certs in /etc/certs (I'm fed up with messing in /usr) X-Git-Tag: auto/th/ca-certificates-20080809-1~2 X-Git-Url: http://git.pld-linux.org/?p=packages%2Fca-certificates.git;a=commitdiff_plain;h=70208ba6bb532d71d21eaa584aad2122b7d88248 - allow placing ca certs in /etc/certs (I'm fed up with messing in /usr) Changed files: ca-certificates-etc-certs.patch -> 1.1 --- diff --git a/ca-certificates-etc-certs.patch b/ca-certificates-etc-certs.patch new file mode 100644 index 0000000..d174375 --- /dev/null +++ b/ca-certificates-etc-certs.patch @@ -0,0 +1,48 @@ +--- ca-certificates/sbin/update-ca-certificates 2008-11-01 18:39:19.000000000 +0100 ++++ ca-certificates/sbin/update-ca-certificates-local 2008-11-01 19:17:39.138384960 +0100 +@@ -37,6 +37,7 @@ + + CERTSCONF=/etc/ca-certificates.conf + CERTSDIR=/usr/share/ca-certificates ++LOCALCERTSDIR=/etc/certs + CERTBUNDLE=/etc/openssl/ca-certificates.crt + ETCCERTSDIR=/etc/openssl/certs + cd $ETCCERTSDIR +@@ -46,6 +47,7 @@ + do + case $(readlink $symlink) in + $CERTSDIR*) rm -f $symlink;; ++ $LOCALCERTSDIR*) rm -f $symlink;; + esac + done + find . -type l -print | while read symlink +@@ -60,7 +62,7 @@ + removed="$(sed -ne 's/^!//p' $CERTSCONF | while read crt + do + if test "$crt" = ""; then continue; fi +- pem=$(basename "$crt" .crt).pem ++ pem=$(basename "$crt" | sed 's/.crt$/.pem/') + if test -e "$pem"; then + rm -f "$pem" + echo "-$ETCCERTSDIR/$pem" +@@ -70,11 +72,16 @@ + added="$(sed -e '/^#/d' -e '/^!/d' $CERTSCONF | while read crt + do + if test "$crt" = ""; then continue; fi +- if ! test -f "$CERTSDIR/$crt"; then continue; fi +- pem=$(basename "$crt" .crt).pem ++ if ! test -f "$CERTSDIR/$crt" && ! test -f "$LOCALCERTSDIR/$crt" ; then continue; fi ++ pem=$(basename "$crt" | sed 's/.crt$/.pem/') + if ! test -e "$pem"; then echo "+$ETCCERTSDIR/$pem"; fi +- ln -sf "$CERTSDIR/$crt" "$pem" +- cat "$CERTSDIR/$crt" >> "$bundletmp" ++ if test -f "$CERTSDIR/$crt" ; then ++ ln -sf "$CERTSDIR/$crt" "$pem" ++ cat "$CERTSDIR/$crt" >> "$bundletmp" ++ elif test -f "$LOCALCERTSDIR/$crt" ; then ++ ln -sf "$LOCALCERTSDIR/$crt" "$pem" ++ cat "$LOCALCERTSDIR/$crt" >> "$bundletmp" ++ fi + done)" + chmod 0644 "$bundletmp" + mv -f "$bundletmp" "$CERTBUNDLE"