- rel 9; revert; no hashes in main pkg
[packages/ca-certificates.git] / ca-certificates.spec
CommitLineData
8b300985
JR
1# TODO
2# - cleanup dead links from /etc/openssl/certs after -update uninstall
7d6b3825
JR
3#
4# - https://bugzilla.mozilla.org/show_bug.cgi?id=549701 and
5# http://groups.google.com/group/mozilla.dev.security.policy/browse_thread/thread/b6493a285ba79998#
6#
8bb152c1 7Summary: Common CA Certificates PEM files
500a6231 8Summary(pl.UTF-8): Pliki PEM popularnych certyfikatów CA
8bb152c1 9Name: ca-certificates
156426d3 10Version: 20090814
c3918bf2 11Release: 9
ed111db5 12License: distributable
8bb152c1 13Group: Libraries
8bb152c1 14Source0: ftp://ftp.debian.org/debian/pool/main/c/ca-certificates/%{name}_%{version}.tar.gz
156426d3 15# Source0-md5: 307052c985bec7f9a00eb84293eef779
6c894e75 16Source1: https://www.verisign.com/support/thawte-roots.zip
156426d3 17# Source1-md5: 3e50e5facce6b6bfbf68271d066005fa
ed111db5
JR
18Source2: http://www.certum.pl/keys/CA.pem
19# Source2-md5: 35610177afc9c64e70f1ce62c1885496
20Source3: http://www.certum.pl/keys/level1.pem
21# Source3-md5: ba2d2e234ef9cfd2e6e5f810c964862e
22Source4: http://www.certum.pl/keys/level2.pem
23# Source4-md5: d06578a04e8cb23071f3870430ea0cf0
24Source5: http://www.certum.pl/keys/level3.pem
25# Source5-md5: 47b67c63a52236576fc0d1150327c962
26Source6: http://www.certum.pl/keys/level4.pem
27# Source6-md5: f1f8a65d177745311a1e99f029ae5d71
28Source7: http://www.certum.pl/keys/vs.pem
29# Source7-md5: 8da19ffc48c5dcc2868b1aa55f1d5983
30Source8: http://www.certum.pl/keys/na.pem
31# Source8-md5: ba571cb35e7672ff7ae95132ac1bfec4
32Source9: http://www.certum.pl/keys/tsa.pem
33# Source9-md5: 1a7b3faf8ed00f4d80297de74862e102
34Source10: http://www.certum.pl/keys/class1.pem
35# Source10-md5: 058436b132ea2df6972821f546104a16
36Source11: http://www.certum.pl/keys/class2.pem
37# Source11-md5: 5caf7fe99b1fc6e63c40b3d081711d1b
38Source12: http://www.certum.pl/keys/class3.pem
39# Source12-md5: 07bc97e21da092ba53535c7379e1b58b
40Source13: http://www.certum.pl/keys/class4.pem
41# Source13-md5: 99ef61d509539af89f1c025b67245965
835b9580
JR
42Source14: http://crt.tcs.terena.org/TERENASSLCA.crt
43# Source14-md5: f62cd1546a8ef14e31ba1ce8eecd234a
44Source15: http://crt.tcs.terena.org/TERENAeScienceSSLCA.crt
45# Source15-md5: 5feea35ab01a373f115219706f1f57bd
46Source16: http://crt.tcs.terena.org/TERENAPersonalCA.crt
47# Source16-md5: 53eaa497c8fb0b79f14fe9f69693689a
48Source17: http://crt.tcs.terena.org/TERENAeSciencePersonalCA.crt
49# Source17-md5: e25cc655d3ebe920ca9c187e3dde9191
50Source18: http://crt.tcs.terena.org/TERENACodeSigningCA.crt
51# Source18-md5: 74c9f511ab03a4e6b7462e310abfa89b
2190f9b1
ER
52Source19: http://www.sk.ee/files/JUUR-SK.PEM.cer
53# Source19-md5: 805784c06c9eff3771a4b9bd631cd3f5
54Source20: http://www.sk.ee/files/ESTEID-SK.PEM.cer
55# Source20-md5: 387beee5b8539ab7d91628f486295899
56Source21: http://www.sk.ee/files/ESTEID-SK%202007.PEM.cer
57# Source21-md5: 2b1a2a77f565d68fdf5f19f6cc3a5600
4619b3d9 58Patch0: %{name}-undebianize.patch
ed111db5 59Patch1: %{name}-more-certs.patch
c7360e68 60Patch2: %{name}-etc-certs.patch
302ace1c 61Patch3: %{name}-c_rehash.sh.patch
55905e01 62Patch4: %{name}-endline.patch
835b9580 63Patch5: %{name}-mozilla.patch
94338ec5 64Patch6: %{name}-DESTDIR.patch
500a6231 65URL: http://www.cacert.org/
c3918bf2 66BuildRequires: openssl-tools
156426d3 67BuildRequires: python
65bcbc85 68BuildRequires: python-modules
55905e01 69BuildRequires: sed >= 4.0
ed111db5 70BuildRequires: unzip
ed111db5 71Obsoletes: certificates
5352fc69 72BuildArch: noarch
8bb152c1
ER
73BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
74
850133d0 75%define certsdir /etc/certs
94338ec5 76%define openssldir /etc/openssl/certs
850133d0 77
8bb152c1 78%description
500a6231
JB
79Common CA Certificates PEM files.
80
81%description -l pl.UTF-8
82Pliki PEM popularnych certyfikatów CA.
8bb152c1 83
302ace1c
JR
84%package update
85Summary: Script for updating CA Certificates database
86Summary(pl.UTF-8): Skrypt do odświeżania bazy certyfikatów CA
87Group: Libraries
6c894e75 88Requires: %{name} = %{version}-%{release}
74154eae 89Requires: mktemp
c3918bf2 90Requires: openssl-tools >= 0.9.8i-3
302ace1c
JR
91
92%description update
93Script and data for updating CA Certificates database.
94
6c894e75 95%description update -l pl.UTF-8
302ace1c
JR
96Skrypt i dane do odświeżania bazy certyfikatów CA.
97
8bb152c1 98%prep
156426d3 99%setup -q
ed111db5
JR
100%patch0 -p1
101%patch1 -p1
c7360e68 102%patch2 -p1
302ace1c 103%patch3 -p1
55905e01 104%patch4 -p1
835b9580 105%patch5 -p1
94338ec5 106%patch6 -p1
ed111db5 107
156426d3
JR
108%{__unzip} -qq %{SOURCE1} -d thawte
109# resolve file name clash
110mv 'thawte/Thawte Roots/Thawte Extended Validation/thawte Primary Root CA - G1 (EV)/thawte_Primary_Root_CA.pem' \
111 'thawte/Thawte Roots/Thawte Extended Validation/thawte Primary Root CA - G1 (EV)/thawte_Primary_Root_CA_CC.pem'
112
113find thawte/ -name *.pem | while read f ; do
114 ff=$(echo $f | sed -e 's|[ ,]|_|g' -e 's|[()]|=|g')
55905e01 115 cp "$f" "thawte/$(basename "$ff" .pem).crt"
ed111db5
JR
116done
117
118install -d certum
2190f9b1
ER
119cp -a %{SOURCE2} certum
120cp -a %{SOURCE3} certum
121cp -a %{SOURCE4} certum
122cp -a %{SOURCE5} certum
123cp -a %{SOURCE6} certum
124cp -a %{SOURCE7} certum
125cp -a %{SOURCE8} certum
126cp -a %{SOURCE9} certum
127cp -a %{SOURCE10} certum
128cp -a %{SOURCE11} certum
129cp -a %{SOURCE12} certum
130cp -a %{SOURCE13} certum
ebf0e82f
ER
131for a in certum/*.pem; do
132 mv "$a" "${a%.pem}.crt"
ed111db5
JR
133done
134
835b9580
JR
135install -d terena
136openssl x509 -inform DER -in %{SOURCE14} -outform PEM -out terena/$(basename %{SOURCE14})
137openssl x509 -inform DER -in %{SOURCE15} -outform PEM -out terena/$(basename %{SOURCE15})
138openssl x509 -inform DER -in %{SOURCE16} -outform PEM -out terena/$(basename %{SOURCE16})
139openssl x509 -inform DER -in %{SOURCE17} -outform PEM -out terena/$(basename %{SOURCE17})
140openssl x509 -inform DER -in %{SOURCE18} -outform PEM -out terena/$(basename %{SOURCE18})
141
2190f9b1
ER
142# http://www.sk.ee/pages.php/0203040502#Root_certificates
143# JUUR-SK, ESTEID-SK and ESTEID-SK 2007
144install -d esteid
145cp -a %{SOURCE19} esteid
146cp -a %{SOURCE20} esteid
94338ec5 147cp -a %{SOURCE21} esteid/ESTEID-SK_2007.crt
2190f9b1
ER
148for a in esteid/*.PEM.cer; do
149 mv "$a" "${a%.PEM.cer}.crt"
150done
151
ed111db5
JR
152%build
153%{__make}
154
155# We have those and more in specific dirs
835b9580 156rm mozilla/{Thawte,thawte,Certum,IGC_A,Deutsche_Telekom_Root_CA_2}*.crt
8bb152c1 157
7d6b3825
JR
158# See TODO
159# rm mozilla/RSA_Security_1024_v3.crt
160
8bb152c1
ER
161%install
162rm -rf $RPM_BUILD_ROOT
850133d0 163install -d $RPM_BUILD_ROOT{%{_datadir}/%{name},%{_sbindir},%{certsdir}}
8bb152c1
ER
164
165%{__make} install \
166 DESTDIR=$RPM_BUILD_ROOT
167
55905e01
JR
168find $RPM_BUILD_ROOT%{_datadir}/ca-certificates -name '*.crt' -exec sed -i -e 's/\r$//' {} \;
169
8bb152c1
ER
170(
171cd $RPM_BUILD_ROOT%{_datadir}/ca-certificates
172find . -name '*.crt' | sort | cut -b3-
173) > $RPM_BUILD_ROOT%{_sysconfdir}/ca-certificates.conf
174
94338ec5
ER
175# build %{certsdir}/ca-certificates.crt
176install -d $RPM_BUILD_ROOT%{openssldir}
177./sbin/update-ca-certificates --destdir $RPM_BUILD_ROOT
178rm -rf $RPM_BUILD_ROOT%{openssldir}
8bb152c1
ER
179
180%clean
181rm -rf $RPM_BUILD_ROOT
182
302ace1c 183%post update
ed9496cb 184%{_sbindir}/update-ca-certificates --fresh || :
8bb152c1
ER
185
186%files
187%defattr(644,root,root,755)
850133d0 188%config(noreplace) %verify(not md5 mtime size) %{certsdir}/ca-certificates.crt
302ace1c
JR
189
190%files update
191%defattr(644,root,root,755)
8bb152c1 192%attr(755,root,root) %{_sbindir}/update-ca-certificates
302ace1c 193%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/ca-certificates.conf
8bb152c1 194%{_datadir}/ca-certificates
This page took 0.059584 seconds and 4 git commands to generate.