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