]> git.pld-linux.org Git - packages/ca-certificates.git/blobdiff - ca-certificates.spec
- avoid missing or duplicate .pem extension
[packages/ca-certificates.git] / ca-certificates.spec
index 6eb76eb26e323f66b54580a4b0334a89ce47aebc..ae29c860a240412482fee0fccd36b31e9a9ff5a1 100644 (file)
@@ -1,8 +1,10 @@
+# TODO
+# - cleanup dead links from /etc/openssl/certs after -update uninstall
 Summary:       Common CA Certificates PEM files
 Summary(pl.UTF-8):     Pliki PEM popularnych certyfikatów CA
 Name:          ca-certificates
 Version:       20090814
-Release:       1
+Release:       5
 License:       distributable
 Group:         Libraries
 Source0:       ftp://ftp.debian.org/debian/pool/main/c/ca-certificates/%{name}_%{version}.tar.gz
@@ -37,9 +39,11 @@ Patch0:              %{name}-undebianize.patch
 Patch1:                %{name}-more-certs.patch
 Patch2:                %{name}-etc-certs.patch
 Patch3:                %{name}-c_rehash.sh.patch
+Patch4:                %{name}-endline.patch
 URL:           http://www.cacert.org/
-BuildRequires: coreutils
 BuildRequires: python
+BuildRequires: python-modules
+BuildRequires: sed >= 4.0
 BuildRequires: unzip
 Obsoletes:     certificates
 BuildArch:     noarch
@@ -73,6 +77,7 @@ Skrypt i dane do odświeżania bazy certyfikatów CA.
 %patch1 -p1
 %patch2 -p1
 %patch3 -p1
+%patch4 -p1
 
 %{__unzip} -qq %{SOURCE1} -d thawte
 # resolve file name clash
@@ -81,8 +86,7 @@ mv 'thawte/Thawte Roots/Thawte Extended Validation/thawte Primary Root CA - G1 (
 
 find thawte/ -name *.pem | while read f ; do
        ff=$(echo $f | sed -e 's|[ ,]|_|g' -e 's|[()]|=|g')
-       fff="thawte/$(basename "$ff" .pem).crt"
-       tr -d '\r' < "$f" > "$fff"
+       cp "$f" "thawte/$(basename "$ff" .pem).crt"
 done
 
 install -d certum
@@ -115,15 +119,17 @@ install -d $RPM_BUILD_ROOT{%{_datadir}/%{name},%{_sbindir},%{certsdir}}
 %{__make} install \
        DESTDIR=$RPM_BUILD_ROOT
 
+find $RPM_BUILD_ROOT%{_datadir}/ca-certificates -name '*.crt' -exec sed -i -e 's/\r$//' {} \;
+
 (
 cd $RPM_BUILD_ROOT%{_datadir}/ca-certificates
 find . -name '*.crt' | sort | cut -b3-
 ) > $RPM_BUILD_ROOT%{_sysconfdir}/ca-certificates.conf
 
-(
-cd $RPM_BUILD_ROOT%{_datadir}/ca-certificates
-find . -name '*.crt' -print0 | xargs -0 cat
-) > $RPM_BUILD_ROOT%{certsdir}/ca-certificates.crt
+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
 
 %clean
 rm -rf $RPM_BUILD_ROOT
This page took 0.078288 seconds and 4 git commands to generate.