- use same method for generating /etc/certs/ca-certificates.crt at package build...
authorElan Ruusamäe <glen@pld-linux.org>
Wed, 5 May 2010 11:18:58 +0000 (11:18 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
- %20 vs space fix workaround

Changed files:
    ca-certificates-DESTDIR.patch -> 1.1
    ca-certificates.spec -> 1.32

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

diff --git a/ca-certificates-DESTDIR.patch b/ca-certificates-DESTDIR.patch
new file mode 100644 (file)
index 0000000..c885375
--- /dev/null
@@ -0,0 +1,36 @@
+--- ca-certificates-20090814/sbin/update-ca-certificates~      2010-05-05 14:10:46.000000000 +0300
++++ ca-certificates-20090814/sbin/update-ca-certificates       2010-05-05 14:10:52.783355044 +0300
+@@ -23,6 +23,7 @@
+ verbose=0
+ fresh=0
++DESTDIR=
+ while [ $# -gt 0 ];
+ do
+   case $1 in
+@@ -30,6 +31,8 @@
+       verbose=1;;
+   --fresh|-f)
+       fresh=1;;
++  --destdir)
++      DESTDIR=$2; shift;;
+   --help|-h|*)
+       echo "$0: [--verbose] [--fresh]"
+       exit;;
+@@ -37,11 +40,11 @@
+   shift
+ done
+-CERTSCONF=/etc/ca-certificates.conf
+-CERTSDIR=/usr/share/ca-certificates
+-LOCALCERTSDIR=/etc/certs
+-CERTBUNDLE=/etc/certs/ca-certificates.crt
+-ETCCERTSDIR=/etc/openssl/certs
++CERTSCONF=$DESTDIR/etc/ca-certificates.conf
++CERTSDIR=$DESTDIR/usr/share/ca-certificates
++LOCALCERTSDIR=$DESTDIR/etc/certs
++CERTBUNDLE=$DESTDIR/etc/certs/ca-certificates.crt
++ETCCERTSDIR=$DESTDIR/etc/openssl/certs
+ cleanup() {
+   rm -f "$TEMPBUNDLE"
index fc44bac83761578c332434b2c4f69d7fb070bfa7..c92c351513981e51f4a895cf289e4e8184dca7b4 100644 (file)
@@ -8,7 +8,7 @@ Summary:        Common CA Certificates PEM files
 Summary(pl.UTF-8):     Pliki PEM popularnych certyfikatów CA
 Name:          ca-certificates
 Version:       20090814
-Release:       6
+Release:       6.4
 License:       distributable
 Group:         Libraries
 Source0:       ftp://ftp.debian.org/debian/pool/main/c/ca-certificates/%{name}_%{version}.tar.gz
@@ -61,6 +61,7 @@ Patch2:               %{name}-etc-certs.patch
 Patch3:                %{name}-c_rehash.sh.patch
 Patch4:                %{name}-endline.patch
 Patch5:                %{name}-mozilla.patch
+Patch6:                %{name}-DESTDIR.patch
 URL:           http://www.cacert.org/
 BuildRequires: openssl-tools
 BuildRequires: python
@@ -72,6 +73,7 @@ BuildArch:    noarch
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %define                certsdir        /etc/certs
+%define                openssldir      /etc/openssl/certs
 
 %description
 Common CA Certificates PEM files.
@@ -101,6 +103,7 @@ Skrypt i dane do odświeżania bazy certyfikatów CA.
 %patch3 -p1
 %patch4 -p1
 %patch5 -p1
+%patch6 -p1
 
 %{__unzip} -qq %{SOURCE1} -d thawte
 # resolve file name clash
@@ -141,7 +144,7 @@ openssl x509 -inform DER -in %{SOURCE18} -outform PEM -out terena/$(basename %{S
 install -d esteid
 cp -a %{SOURCE19} esteid
 cp -a %{SOURCE20} esteid
-cp -a %{SOURCE21} esteid
+cp -a %{SOURCE21} esteid/ESTEID-SK_2007.crt
 for a in esteid/*.PEM.cer; do
        mv "$a" "${a%.PEM.cer}.crt"
 done
@@ -169,10 +172,10 @@ cd $RPM_BUILD_ROOT%{_datadir}/ca-certificates
 find . -name '*.crt' | sort | cut -b3-
 ) > $RPM_BUILD_ROOT%{_sysconfdir}/ca-certificates.conf
 
-find $RPM_BUILD_ROOT%{_datadir}/ca-certificates -name '*.crt' | while read cert ; do
-       cat "$cert" >> $RPM_BUILD_ROOT%{certsdir}/ca-certificates.crt
-       echo >>$RPM_BUILD_ROOT%{certsdir}/ca-certificates.crt
-done
+# build %{certsdir}/ca-certificates.crt
+install -d $RPM_BUILD_ROOT%{openssldir}
+./sbin/update-ca-certificates --destdir $RPM_BUILD_ROOT
+rm -rf $RPM_BUILD_ROOT%{openssldir}
 
 %clean
 rm -rf $RPM_BUILD_ROOT
This page took 0.036063 seconds and 4 git commands to generate.