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