]> git.pld-linux.org Git - packages/ca-certificates.git/blob - ca-certificates-etc-certs.patch
- proper patch location
[packages/ca-certificates.git] / ca-certificates-etc-certs.patch
1 --- ca-certificates/sbin/update-ca-certificates 2008-11-01 18:39:19.000000000 +0100
2 +++ ca-certificates/sbin/update-ca-certificates-local   2008-11-01 19:17:39.138384960 +0100
3 @@ -37,7 +37,7 @@
4  
5  CERTSCONF=/etc/ca-certificates.conf
6  CERTSDIR=/usr/share/ca-certificates
7 -LOCALCERTSDIR=/usr/local/share/ca-certificates
8 +LOCALCERTSDIR=/etc/certs
9  CERTBUNDLE=ca-certificates.crt
10  ETCCERTSDIR=/etc/openssl/certs
11  cd $ETCCERTSDIR
12 @@ -62,7 +62,7 @@
13  # bundle.
14  add() {
15    CERT="$1"
16 -  PEM="$ETCCERTSDIR/$(basename "$CERT" .crt | sed -e 's/ /_/g' \
17 +  PEM="$ETCCERTSDIR/$(basename "$CERT" | sed -e 's/.crt$/.pem/' -e 's/ /_/g' \
18                                                    -e 's/[()]/=/g' \
19                                                    -e 's/,/_/g').pem"
20    if ! test -e "$PEM" || [ "$(readlink "$PEM")" != "$CERT" ]
21 @@ -74,7 +74,7 @@
22  
23  remove() {
24    CERT="$1"
25 -  PEM="$ETCCERTSDIR/$(basename "$CERT" .crt).pem"
26 +  PEM="$ETCCERTSDIR/$(basename "$CERT" | sed 's/.crt$/.pem/')"
27    if test -L "$PEM"
28    then
29      rm -f "$PEM"
30 @@ -89,6 +89,7 @@
31    do
32       case $(readlink $symlink) in
33       $CERTSDIR*) rm -f $symlink;;
34 +     $LOCALCERTSDIR*) rm -f $symlink;;
35       esac
36    done
37    find . -type l -print | while read symlink
38 @@ -110,24 +110,18 @@
39  
40  sed -e '/^$/d' -e '/^#/d' -e '/^!/d' $CERTSCONF | while read crt
41  do
42 -  if ! test -f "$CERTSDIR/$crt"
43 +  if test -f "$CERTSDIR/$crt"
44    then
45 +    add "$CERTSDIR/$crt"
46 +  elif test -f "$LOCALCERTSDIR/$crt"
47 +  then
48 +    add "$LOCALCERTSDIR/$crt"
49 +  else
50 -    echo "W: $CERTSDIR/$crt not found, but listed in $CERTSCONF." >&2
51 +    echo "W: $CERTSDIR/$crt or $LOCALCERTSDIR/$crt not found, but listed in $CERTSCONF." >&2
52      continue
53    fi
54 -  add "$CERTSDIR/$crt"
55  done
56  
57 -# Now process certificate authorities installed by the local system
58 -# administrator.
59 -if [ -d "$LOCALCERTSDIR" ]
60 -then
61 -  find -L "$LOCALCERTSDIR" -type f -name '*.crt' | while read crt
62 -  do
63 -    add "$crt"
64 -  done
65 -fi
66 -
67  chmod 0644 "$TEMPBUNDLE"
68  mv -f "$TEMPBUNDLE" "$CERTBUNDLE"
69  
This page took 0.041724 seconds and 3 git commands to generate.