Name: ca-certificates Version: 2010.10 Release: 1mamba Summary: The Mozilla CA root certificate bundle Group: System/Tools Vendor: openmamba Distribution: openmamba Packager: gil URL: http://www.mozilla.org/ # cvs -d :pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot co -p mozilla/security/nss/lib/ckfw/builtins/certdata.txt > certdata.txt Source: ca-certificates-%{version}-src.tar.gz License: Public Domain BuildRequires: openssl BuildRequires: perl BuildRequires: python26 BuildRequires: rcs BuildRequires: sun-java BuildRoot: %{_tmppath}/%{name}-%{version}-root %description This package contains the set of CA certificates chosen by the Mozilla Foundation for use with the Internet PKI. %prep %setup -q -n %{name} mkdir %{name} %{name}/certs %{name}/java # certdata2pem.py from Philipp Kern pkern@debian.org sed -i 's|#!/usr/bin/python|#!%{__python26}|' certdata2pem.py %build cp certdata.txt blacklist.txt %{name}/certs pushd %{name}/certs %{__python26} ../../certdata2pem.py popd pushd %{name} ( cat < ca-bundle.crt ( cat < ca-bundle.trust.crt for f in certs/*.crt; do tbits=`sed -n '/^# openssl-trust/{s/^.*=//;p;}' $f` case $tbits in *serverAuth*) openssl x509 -text -in "$f" >> ca-bundle.crt ;; esac if [ -n "$tbits" ]; then targs="" for t in $tbits; do targs="${targs} -addtrust $t" done openssl x509 -text -in "$f" -trustout $targs >> ca-bundle.trust.crt fi done popd # generate-cacerts.pl from red hat, fedora pushd %{name}/java test -s ../ca-bundle.crt || exit 1 %{__perl} ../../generate-cacerts.pl %{_bindir}/keytool ../ca-bundle.crt touch -r ../../certdata.txt cacerts popd %install [ "%{buildroot}" != / ] && rm -rf "%{buildroot}" mkdir -p %{buildroot}{%{_sysconfdir}/pki/tls/certs,%{_sysconfdir}/pki/java} install -p -m 644 %{name}/ca-bundle.crt %{buildroot}%{_sysconfdir}/pki/tls/certs/ca-bundle.crt install -p -m 644 %{name}/ca-bundle.trust.crt %{buildroot}%{_sysconfdir}/pki/tls/certs/ca-bundle.trust.crt ln -s certs/ca-bundle.crt %{buildroot}%{_sysconfdir}/pki/tls/cert.pem touch -r certdata.txt %{buildroot}%{_sysconfdir}/pki/tls/certs/ca-bundle.crt touch -r certdata.txt %{buildroot}%{_sysconfdir}/pki/tls/certs/ca-bundle.trust.crt mkdir -p -m 700 %{buildroot}%{_sysconfdir}/pki/java install -p -m 644 %{name}/java/cacerts %{buildroot}%{_sysconfdir}/pki/java/ mkdir -p -m 755 %{buildroot}%{_sysconfdir}/ssl/certs ln -s ../../pki/tls/certs/ca-bundle.crt %{buildroot}%{_sysconfdir}/ssl/certs/ ln -s ../../pki/tls/certs/ca-bundle.trust.crt %{buildroot}%{_sysconfdir}/ssl/certs/ #mkdir -p %{buildroot}%{_datadir}/%{name} #install -p -m 644 %{name}/ca-bundle.crt %{buildroot}%{_datadir}/%{name} %clean [ "%{buildroot}" != / ] && rm -rf "%{buildroot}" %files %defattr(-,root,root) %config(noreplace) %{_sysconfdir}/pki/java/cacerts %dir %{_sysconfdir}/pki/tls %dir %{_sysconfdir}/pki/tls/certs %config(noreplace) %{_sysconfdir}/pki/tls/certs/ca-bundle.*crt %{_sysconfdir}/pki/tls/cert.pem %dir %{_sysconfdir}/ssl %{_sysconfdir}/ssl/certs %changelog * Tue Oct 05 2010 gil 2010.10-1mamba - package created by autospec