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