]>
Commit | Line | Data |
---|---|---|
1 | # TODO | |
2 | # - cleanup dead links from /etc/openssl/certs after -update uninstall | |
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 | # | |
7 | Summary: Common CA Certificates PEM files | |
8 | Summary(pl.UTF-8): Pliki PEM popularnych certyfikatów CA | |
9 | Name: ca-certificates | |
10 | Version: 20110421 | |
11 | Release: 1 | |
12 | License: distributable | |
13 | Group: Libraries | |
14 | Source0: ftp://ftp.debian.org/debian/pool/main/c/ca-certificates/%{name}_%{version}.tar.gz | |
15 | # Source0-md5: 59edcd927a76cf78ec5bb43f248ea68d | |
16 | Source1: https://www.verisign.com/support/thawte-roots.zip | |
17 | # Source1-md5: a3709cc0279ef3fca4f86ea775066b18 | |
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 | |
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 | |
52 | Source19: http://www.sk.ee/upload/files/JUUR-SK.PEM.cer | |
53 | # Source19-md5: 805784c06c9eff3771a4b9bd631cd3f5 | |
54 | Source20: http://www.sk.ee/upload/files/ESTEID-SK.PEM.cer | |
55 | # Source20-md5: 387beee5b8539ab7d91628f486295899 | |
56 | Source21: http://www.sk.ee/upload/files/ESTEID-SK%202007.PEM.cer#/ESTEID-SK_2007.PEM.cer | |
57 | # Source21-md5: 2b1a2a77f565d68fdf5f19f6cc3a5600 | |
58 | Source22: http://www.sk.ee/upload/files/ESTEID-SK%202011.pem.cer#/ESTEID-SK_2011.pem.cer | |
59 | # Source22-md5: cfcc1e592cb0ff305158a7e32730546c | |
60 | Patch0: %{name}-undebianize.patch | |
61 | Patch1: %{name}-more-certs.patch | |
62 | Patch2: %{name}-etc-certs.patch | |
63 | Patch3: %{name}-c_rehash.sh.patch | |
64 | Patch4: %{name}-endline.patch | |
65 | Patch5: %{name}-mozilla.patch | |
66 | Patch6: %{name}-DESTDIR.patch | |
67 | URL: http://www.cacert.org/ | |
68 | BuildRequires: openssl-tools | |
69 | BuildRequires: python | |
70 | BuildRequires: python-modules | |
71 | BuildRequires: rpm >= 4.4.9-56 | |
72 | BuildRequires: sed >= 4.0 | |
73 | BuildRequires: unzip | |
74 | Obsoletes: certificates | |
75 | BuildArch: noarch | |
76 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
77 | ||
78 | %define certsdir /etc/certs | |
79 | %if "%{pld_release}" == "th" | |
80 | %define openssldir /etc/openssl/certs | |
81 | %else | |
82 | %define openssldir /var/lib/openssl/certs | |
83 | %endif | |
84 | ||
85 | %description | |
86 | Common CA Certificates PEM files. | |
87 | ||
88 | %description -l pl.UTF-8 | |
89 | Pliki PEM popularnych certyfikatów CA. | |
90 | ||
91 | %package update | |
92 | Summary: Script for updating CA Certificates database | |
93 | Summary(pl.UTF-8): Skrypt do odświeżania bazy certyfikatów CA | |
94 | Group: Libraries | |
95 | Requires: %{name} = %{version}-%{release} | |
96 | Requires: mktemp | |
97 | %if "%{pld_release}" == "ac" | |
98 | Requires: openssl-tools >= 0.9.7m-2 | |
99 | %else | |
100 | Requires: openssl-tools >= 0.9.8i-3 | |
101 | %endif | |
102 | ||
103 | %description update | |
104 | Script and data for updating CA Certificates database. | |
105 | ||
106 | %description update -l pl.UTF-8 | |
107 | Skrypt i dane do odświeżania bazy certyfikatów CA. | |
108 | ||
109 | %prep | |
110 | %setup -q | |
111 | %patch0 -p1 | |
112 | %patch1 -p1 | |
113 | %patch2 -p1 | |
114 | %patch3 -p1 | |
115 | %patch4 -p1 | |
116 | %patch5 -p1 | |
117 | %patch6 -p1 | |
118 | ||
119 | %{__sed} -i -e 's,@openssldir@,%{openssldir},' sbin/update-ca-certificates* | |
120 | ||
121 | %{__unzip} -qq %{SOURCE1} -d thawte | |
122 | ||
123 | find thawte/ -name *.pem -o -name *.txt| while read f ; do | |
124 | if (file "$f" | grep -q "PEM"); then | |
125 | ff=$(echo $f | sed -e 's|[ ,]|_|g' -e 's|[()]|=|g') | |
126 | nname=$(basename "$ff" .pem) | |
127 | nname=$(basename "$nname" .txt) | |
128 | nname=$(basename "$nname" _b64) | |
129 | cp -i "$f" "thawte/${nname}.crt" | |
130 | else | |
131 | echo "Skipping $f, doesn't look like PEM CERT" | |
132 | fi | |
133 | done | |
134 | ||
135 | install -d certum | |
136 | cp -ai %{SOURCE2} certum | |
137 | cp -ai %{SOURCE3} certum | |
138 | cp -ai %{SOURCE4} certum | |
139 | cp -ai %{SOURCE5} certum | |
140 | cp -ai %{SOURCE6} certum | |
141 | cp -ai %{SOURCE7} certum | |
142 | cp -ai %{SOURCE8} certum | |
143 | cp -ai %{SOURCE9} certum | |
144 | cp -ai %{SOURCE10} certum | |
145 | cp -ai %{SOURCE11} certum | |
146 | cp -ai %{SOURCE12} certum | |
147 | cp -ai %{SOURCE13} certum | |
148 | for a in certum/*.pem; do | |
149 | mv -i "$a" "${a%.pem}.crt" | |
150 | done | |
151 | ||
152 | install -d terena | |
153 | openssl x509 -inform DER -in %{SOURCE14} -outform PEM -out terena/$(basename %{SOURCE14}) | |
154 | openssl x509 -inform DER -in %{SOURCE15} -outform PEM -out terena/$(basename %{SOURCE15}) | |
155 | openssl x509 -inform DER -in %{SOURCE16} -outform PEM -out terena/$(basename %{SOURCE16}) | |
156 | openssl x509 -inform DER -in %{SOURCE17} -outform PEM -out terena/$(basename %{SOURCE17}) | |
157 | openssl x509 -inform DER -in %{SOURCE18} -outform PEM -out terena/$(basename %{SOURCE18}) | |
158 | ||
159 | # http://www.sk.ee/pages.php/0203040502#Root_certificates | |
160 | # JUUR-SK, ESTEID-SK and ESTEID-SK 2007 | |
161 | install -d esteid | |
162 | cp -ai %{SOURCE19} esteid | |
163 | cp -ai %{SOURCE20} esteid | |
164 | cp -ai %{SOURCE21} esteid/ESTEID-SK_2007.crt | |
165 | cp -ai %{SOURCE22} esteid/ESTEID-SK_2011.crt | |
166 | for a in esteid/*.PEM.cer; do | |
167 | mv -i "$a" "${a%.PEM.cer}.crt" | |
168 | done | |
169 | ||
170 | %build | |
171 | %{__make} | |
172 | ||
173 | # We have those and more in specific dirs | |
174 | rm mozilla/{Thawte,thawte,Certum,IGC_A,Deutsche_Telekom_Root_CA_2}*.crt | |
175 | ||
176 | # See TODO | |
177 | # rm mozilla/RSA_Security_1024_v3.crt | |
178 | ||
179 | %install | |
180 | rm -rf $RPM_BUILD_ROOT | |
181 | install -d $RPM_BUILD_ROOT{%{_datadir}/%{name},%{_sbindir},%{certsdir}} | |
182 | ||
183 | %{__make} install \ | |
184 | DESTDIR=$RPM_BUILD_ROOT | |
185 | ||
186 | find $RPM_BUILD_ROOT%{_datadir}/ca-certificates -name '*.crt' -exec sed -i -e 's/\r$//' {} \; | |
187 | ||
188 | ( | |
189 | cd $RPM_BUILD_ROOT%{_datadir}/ca-certificates | |
190 | find . -name '*.crt' | sort | cut -b3- | |
191 | ) > $RPM_BUILD_ROOT%{_sysconfdir}/ca-certificates.conf | |
192 | ||
193 | # build %{certsdir}/ca-certificates.crt | |
194 | install -d $RPM_BUILD_ROOT%{openssldir} | |
195 | ./sbin/update-ca-certificates --destdir $RPM_BUILD_ROOT | |
196 | rm -rf $RPM_BUILD_ROOT%{openssldir} | |
197 | ||
198 | %clean | |
199 | rm -rf $RPM_BUILD_ROOT | |
200 | ||
201 | %post update | |
202 | %{_sbindir}/update-ca-certificates --fresh || : | |
203 | ||
204 | %files | |
205 | %defattr(644,root,root,755) | |
206 | %config(noreplace) %verify(not md5 mtime size) %{certsdir}/ca-certificates.crt | |
207 | ||
208 | %files update | |
209 | %defattr(644,root,root,755) | |
210 | %attr(755,root,root) %{_sbindir}/update-ca-certificates | |
211 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/ca-certificates.conf | |
212 | %{_datadir}/ca-certificates |