]> git.pld-linux.org Git - packages/ca-certificates.git/commitdiff
- add /etc/ca-certificates.d to support local certs, so there won't be need to edit...
authorElan Ruusamäe <glen@pld-linux.org>
Sat, 12 May 2012 13:15:57 +0000 (13:15 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    ca-certificates.d.patch -> 1.1
    ca-certificates.spec -> 1.50

ca-certificates.d.patch [new file with mode: 0644]
ca-certificates.spec

diff --git a/ca-certificates.d.patch b/ca-certificates.d.patch
new file mode 100644 (file)
index 0000000..80b2ba2
--- /dev/null
@@ -0,0 +1,59 @@
+--- ca-certificates-20120212/sbin/update-ca-certificates~      2012-05-12 16:08:15.813747796 +0300
++++ ca-certificates-20120212/sbin/update-ca-certificates       2012-05-12 16:09:57.727422190 +0300
+@@ -41,6 +41,7 @@
+ done
+ CERTSCONF=$DESTDIR/etc/ca-certificates.conf
++CERTSCONFD=$DESTDIR/etc/ca-certificates.d
+ CERTSDIR=$DESTDIR/usr/share/ca-certificates
+ LOCALCERTSDIR=$DESTDIR/etc/certs
+ CERTBUNDLE=$DESTDIR/etc/certs/ca-certificates.crt
+@@ -105,25 +106,30 @@
+ echo -n "Updating certificates in $ETCCERTSDIR... "
+-# Handle certificates that should be removed.  This is an explicit act
+-# by prefixing lines in the configuration files with exclamation marks (!).
+-sed -n -e '/^$/d' -e 's/^!//p' $CERTSCONF | while read crt
+-do
+-  remove "$CERTSDIR/$crt"
+-done
++for conf in $CERTSCONF $CERTSCONFD/*.conf; do
++  # skip inexistent files (matched by glob)
++  [ -f $conf ] || continue
++
++  # Handle certificates that should be removed.  This is an explicit act
++  # by prefixing lines in the configuration files with exclamation marks (!).
++  sed -n -e '/^$/d' -e 's/^!//p' $conf | while read crt
++  do
++    remove "$CERTSDIR/$crt"
++  done
+-sed -e '/^$/d' -e '/^#/d' -e '/^!/d' $CERTSCONF | while read crt
+-do
+-  if test -f "$CERTSDIR/$crt"
+-  then
+-    add "$CERTSDIR/$crt"
+-  elif test -f "$LOCALCERTSDIR/$crt"
+-  then
+-    add "$LOCALCERTSDIR/$crt"
+-  else
+-    echo "W: $CERTSDIR/$crt or $LOCALCERTSDIR/$crt not found, but listed in $CERTSCONF." >&2
+-    continue
+-  fi
++  sed -e '/^$/d' -e '/^#/d' -e '/^!/d' $conf | while read crt
++  do
++    if test -f "$CERTSDIR/$crt"
++    then
++      add "$CERTSDIR/$crt"
++    elif test -f "$LOCALCERTSDIR/$crt"
++    then
++      add "$LOCALCERTSDIR/$crt"
++    else
++      echo "W: $CERTSDIR/$crt or $LOCALCERTSDIR/$crt not found, but listed in $conf." >&2
++      continue
++    fi
++  done
+ done
+ rm -f "$CERTBUNDLE"
index 4e586498f1dce7c379e36a44d1876b599b67cd38..cb8705b09149046053ad1de4aa9675ad091df741 100644 (file)
@@ -1,9 +1,5 @@
 # TODO
 # - cleanup dead links from /etc/openssl/certs after -update uninstall
 # TODO
 # - cleanup dead links from /etc/openssl/certs after -update uninstall
-# - deal with removed (renamed) certs on upgrade (as new config is created as
-#   .rpmnew). create some merge tool (or split /etc/ca-certificates.conf to
-#   /etc/ca-certificates.d): http://pastebin.com/04hZd2x0
-#
 # - https://bugzilla.mozilla.org/show_bug.cgi?id=549701 and
 #   http://groups.google.com/group/mozilla.dev.security.policy/browse_thread/thread/b6493a285ba79998#
 # - add certs noted in TODO file
 # - https://bugzilla.mozilla.org/show_bug.cgi?id=549701 and
 #   http://groups.google.com/group/mozilla.dev.security.policy/browse_thread/thread/b6493a285ba79998#
 # - add certs noted in TODO file
@@ -68,6 +64,7 @@ Patch3:               %{name}-c_rehash.sh.patch
 Patch4:                %{name}-endline.patch
 Patch5:                %{name}-mozilla.patch
 Patch6:                %{name}-DESTDIR.patch
 Patch4:                %{name}-endline.patch
 Patch5:                %{name}-mozilla.patch
 Patch6:                %{name}-DESTDIR.patch
+Patch7:                %{name}.d.patch
 URL:           http://www.cacert.org/
 BuildRequires: openssl-tools
 BuildRequires: python
 URL:           http://www.cacert.org/
 BuildRequires: openssl-tools
 BuildRequires: python
@@ -119,6 +116,7 @@ Skrypt i dane do odświeżania bazy certyfikatów CA.
 %patch4 -p1
 %patch5 -p1
 %patch6 -p1
 %patch4 -p1
 %patch5 -p1
 %patch6 -p1
+%patch7 -p1
 
 %{__sed} -i -e 's,@openssldir@,%{openssldir},' sbin/update-ca-certificates*
 
 
 %{__sed} -i -e 's,@openssldir@,%{openssldir},' sbin/update-ca-certificates*
 
@@ -182,8 +180,7 @@ rm mozilla/{Thawte,thawte,Certum,IGC_A,Deutsche_Telekom_Root_CA_2,Juur-SK}*.crt
 
 %install
 rm -rf $RPM_BUILD_ROOT
 
 %install
 rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT{%{_datadir}/%{name},%{_sbindir},%{certsdir}}
-
+install -d $RPM_BUILD_ROOT{%{_datadir}/%{name},%{_sbindir},%{certsdir},%{_sysconfdir}/ca-certificates.d}
 %{__make} install \
        DESTDIR=$RPM_BUILD_ROOT
 
 %{__make} install \
        DESTDIR=$RPM_BUILD_ROOT
 
@@ -214,4 +211,5 @@ rm -rf $RPM_BUILD_ROOT
 %defattr(644,root,root,755)
 %attr(755,root,root) %{_sbindir}/update-ca-certificates
 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/ca-certificates.conf
 %defattr(644,root,root,755)
 %attr(755,root,root) %{_sbindir}/update-ca-certificates
 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/ca-certificates.conf
+%dir %{_sysconfdir}/ca-certificates.d
 %{_datadir}/ca-certificates
 %{_datadir}/ca-certificates
This page took 0.037025 seconds and 4 git commands to generate.