]> git.pld-linux.org Git - packages/ca-certificates.git/blob - ca-certificates.spec
- up to 20150426
[packages/ca-certificates.git] / ca-certificates.spec
1 # TODO
2 # - cleanup dead links from /etc/openssl/certs after -update uninstall
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#
5 # - make amsn use system certs
6 # - make pidgin use system certs
7 # - swap %{certsdir}/ca-certificates.crt /etc/pki/tls/certs/ca-bundle.crt regards file vs symlink
8 #
9 Summary:        Common CA Certificates PEM files
10 Summary(pl.UTF-8):      Pliki PEM popularnych certyfikatów CA
11 Name:           ca-certificates
12 Version:        20150426
13 Release:        1
14 License:        GPL v2 (scripts), MPL v2 (mozilla certs), distributable (other certs)
15 Group:          Libraries
16 Source0:        ftp://ftp.debian.org/debian/pool/main/c/ca-certificates/%{name}_%{version}.tar.xz
17 # Source0-md5:  717455f13fb31fd014a11a468ea3895d
18 Source1:        https://www.verisign.com/support/thawte-roots.zip
19 # Source1-md5:  21a284ebdc6e8f4178d5cc10fb9e1ef2
20 Source2:        http://www.certum.pl/keys/CA.pem
21 # Source2-md5:  35610177afc9c64e70f1ce62c1885496
22 Source3:        http://www.certum.pl/keys/level1.pem
23 # Source3-md5:  ba2d2e234ef9cfd2e6e5f810c964862e
24 Source4:        http://www.certum.pl/keys/level2.pem
25 # Source4-md5:  d06578a04e8cb23071f3870430ea0cf0
26 Source5:        http://www.certum.pl/keys/level3.pem
27 # Source5-md5:  47b67c63a52236576fc0d1150327c962
28 Source6:        http://www.certum.pl/keys/level4.pem
29 # Source6-md5:  f1f8a65d177745311a1e99f029ae5d71
30 Source7:        http://www.certum.pl/keys/vs.pem
31 # Source7-md5:  8da19ffc48c5dcc2868b1aa55f1d5983
32 Source8:        http://www.certum.pl/keys/na.pem
33 # Source8-md5:  ba571cb35e7672ff7ae95132ac1bfec4
34 Source9:        http://www.certum.pl/keys/tsa.pem
35 # Source9-md5:  1a7b3faf8ed00f4d80297de74862e102
36 Source10:       http://www.certum.pl/keys/class1.pem
37 # Source10-md5: 058436b132ea2df6972821f546104a16
38 Source11:       http://www.certum.pl/keys/class2.pem
39 # Source11-md5: 5caf7fe99b1fc6e63c40b3d081711d1b
40 Source12:       http://www.certum.pl/keys/class3.pem
41 # Source12-md5: 07bc97e21da092ba53535c7379e1b58b
42 Source13:       http://www.certum.pl/keys/class4.pem
43 # Source13-md5: 99ef61d509539af89f1c025b67245965
44 Source14:       http://www.certum.pl/CTNCA.pem
45 # Source14-md5: 231b5b8bf05c5e93a9b2ebc4186eb6f7
46 Source15:       http://repository.certum.pl/class1casha2.pem
47 # Source15-md5: b52dde6e2618a21965afbe6d6676d09f
48 Source16:       http://repository.certum.pl/dvcasha2.pem
49 # Source16-md5: 88ce64a84375c95ab6f7c8515dd2a117
50 Source17:       http://repository.certum.pl/ovcasha2.pem
51 # Source17-md5: 3149c923bd23469d6b14caa6334f8b63
52 Source18:       http://repository.certum.pl/evcasha2.pem
53 # Source18-md5: ac54dc6cf3af7e243879b1c8b4aca8a3
54 #Source19:      http://repository.certum.pl/dvcasha2.pem
55 ## Source19-md5:        88ce64a84375c95ab6f7c8515dd2a117
56 Source20:       http://repository.certum.pl/gscasha2.pem
57 # Source20-md5: a29d37f95dafc08cef36015922e3b0d3
58 Source21:       http://crt.tcs.terena.org/TERENASSLCA.crt
59 # Source21-md5: f62cd1546a8ef14e31ba1ce8eecd234a
60 Source22:       http://crt.tcs.terena.org/TERENAeScienceSSLCA.crt
61 # Source22-md5: 5feea35ab01a373f115219706f1f57bd
62 Source23:       http://crt.tcs.terena.org/TERENAPersonalCA.crt
63 # Source23-md5: 53eaa497c8fb0b79f14fe9f69693689a
64 Source24:       http://crt.tcs.terena.org/TERENAeSciencePersonalCA.crt
65 # Source24-md5: e25cc655d3ebe920ca9c187e3dde9191
66 Source25:       http://crt.tcs.terena.org/TERENACodeSigningCA.crt
67 # Source25-md5: 74c9f511ab03a4e6b7462e310abfa89b
68 Source26:       http://www.sk.ee/upload/files/JUUR-SK.PEM.cer
69 # Source26-md5: 805784c06c9eff3771a4b9bd631cd3f5
70 Source27:       http://www.sk.ee/upload/files/ESTEID-SK.PEM.cer
71 # Source27-md5: 387beee5b8539ab7d91628f486295899
72 Source28:       http://www.sk.ee/upload/files/ESTEID-SK%202007.PEM.cer?/ESTEID-SK_2007.PEM.cer
73 # Source28-md5: 2b1a2a77f565d68fdf5f19f6cc3a5600
74 Source29:       http://www.sk.ee/upload/files/ESTEID-SK%202011.pem.cer?/ESTEID-SK_2011.pem.cer
75 # Source29-md5: cfcc1e592cb0ff305158a7e32730546c
76
77 Patch0:         %{name}-undebianize.patch
78 Patch1:         %{name}-more-certs.patch
79 Patch2:         %{name}-etc-certs.patch
80 Patch3:         %{name}-c_rehash.sh.patch
81 Patch5:         %{name}-DESTDIR.patch
82 Patch6:         %{name}.d.patch
83 URL:            http://www.cacert.org/
84 BuildRequires:  openssl-tools
85 BuildRequires:  python
86 BuildRequires:  python-modules
87 BuildRequires:  rpm >= 4.4.9-56
88 BuildRequires:  sed >= 4.0
89 BuildRequires:  tar >= 1:1.22
90 BuildRequires:  unzip
91 BuildRequires:  xz
92 Obsoletes:      certificates
93 BuildArch:      noarch
94 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
95
96 %define         certsdir        /etc/certs
97 %define         openssldir      /etc/openssl/certs
98
99 %description
100 Common CA Certificates PEM files.
101
102 %description -l pl.UTF-8
103 Pliki PEM popularnych certyfikatów CA.
104
105 %package update
106 Summary:        Script for updating CA Certificates database
107 Summary(pl.UTF-8):      Skrypt do odświeżania bazy certyfikatów CA
108 Group:          Libraries
109 Requires:       %{name} = %{version}-%{release}
110 Requires:       mktemp
111 %if "%{pld_release}" == "ac"
112 Requires:       openssl-tools >= 0.9.7m-6.3
113 %else
114 Requires:       openssl-tools >= 0.9.8i-3
115 %endif
116
117 %description update
118 Script and data for updating CA Certificates database.
119
120 %description update -l pl.UTF-8
121 Skrypt i dane do odświeżania bazy certyfikatów CA.
122
123 %prep
124 %setup -q
125 %patch0 -p1
126 %patch1 -p1
127 %patch2 -p1
128 %patch3 -p1
129 %patch5 -p1
130 %patch6 -p1
131
132 %{__sed} -i -e 's,@openssldir@,%{openssldir},' sbin/update-ca-certificates*
133
134 %{__unzip} -qq %{SOURCE1} -d thawte
135
136 find thawte/ -name *.pem -o -name *.txt| while read f ; do
137         if (file "$f" | grep -q "PEM"); then
138                 ff=$(echo $f | sed -e 's|[ ,]|_|g' -e 's|[()]|=|g')
139                 nname=$(basename "$ff" .pem)
140                 nname=$(basename "$nname" .txt)
141                 nname=$(basename "$nname" _b64)
142                 cp -pi "$f" "thawte/${nname}.crt"
143         else
144                 echo "Skipping $f, doesn't look like PEM CERT"
145         fi
146 done
147
148 install -d certum
149 cp -pi %{SOURCE2} certum
150 cp -pi %{SOURCE3} certum
151 cp -pi %{SOURCE4} certum
152 cp -pi %{SOURCE5} certum
153 cp -pi %{SOURCE6} certum
154 cp -pi %{SOURCE7} certum
155 cp -pi %{SOURCE8} certum
156 cp -pi %{SOURCE9} certum
157 cp -pi %{SOURCE10} certum
158 cp -pi %{SOURCE11} certum
159 cp -pi %{SOURCE12} certum
160 cp -pi %{SOURCE13} certum
161 cp -pi %{SOURCE14} certum
162 cp -pi %{SOURCE15} certum
163 cp -pi %{SOURCE16} certum
164 cp -pi %{SOURCE17} certum
165 cp -pi %{SOURCE18} certum
166 #cp -pi %{SOURCE19} certum
167 cp -pi %{SOURCE20} certum
168 for a in certum/*.pem; do
169         mv -i "$a" "${a%.pem}.crt"
170 done
171
172 # http://www.sk.ee/en/Repository/certs/rootcertificates
173 # JUUR-SK, ESTEID-SK and ESTEID-SK 2007, ESTEID-SK 2011
174 install -d esteid
175 cp -pi %{SOURCE26} esteid
176 cp -pi %{SOURCE27} esteid
177 cp -pi %{SOURCE28} esteid/ESTEID-SK_2007.crt
178 cp -pi %{SOURCE29} esteid/ESTEID-SK_2011.crt
179 for a in esteid/*.PEM.cer; do
180         mv -i "$a" "${a%.PEM.cer}.crt"
181 done
182
183 %build
184 install -d terena
185 openssl x509 -inform DER -in %{SOURCE21} -outform PEM -out terena/$(basename %{SOURCE21})
186 openssl x509 -inform DER -in %{SOURCE22} -outform PEM -out terena/$(basename %{SOURCE22})
187 openssl x509 -inform DER -in %{SOURCE23} -outform PEM -out terena/$(basename %{SOURCE23})
188 openssl x509 -inform DER -in %{SOURCE24} -outform PEM -out terena/$(basename %{SOURCE24})
189 openssl x509 -inform DER -in %{SOURCE25} -outform PEM -out terena/$(basename %{SOURCE25})
190
191 %{__make}
192
193 # We have those and more in specific dirs
194 rm mozilla/{thawte,Certum,IGC_A,Deutsche_Telekom_Root_CA_2,Juur-SK}*.crt
195
196 # See TODO
197 # rm mozilla/RSA_Security_1024_v3.crt
198
199 %install
200 rm -rf $RPM_BUILD_ROOT
201 install -d $RPM_BUILD_ROOT{%{_datadir}/%{name},%{_sbindir},%{certsdir},/etc/pki/tls/certs,%{_sysconfdir}/ca-certificates.d}
202 %{__make} install \
203         DESTDIR=$RPM_BUILD_ROOT
204
205 find $RPM_BUILD_ROOT%{_datadir}/ca-certificates -name '*.crt' -exec sed -i -e 's/\r$//' {} \;
206
207 (
208 cd $RPM_BUILD_ROOT%{_datadir}/ca-certificates
209 find . -name '*.crt' | sort | cut -b3-
210 ) > $RPM_BUILD_ROOT%{_sysconfdir}/ca-certificates.conf
211
212 # build %{certsdir}/ca-certificates.crt
213 install -d $RPM_BUILD_ROOT%{openssldir}
214 ./sbin/update-ca-certificates --destdir $RPM_BUILD_ROOT
215 rm -rf $RPM_BUILD_ROOT%{openssldir}
216
217 ln -s %{certsdir}/ca-certificates.crt $RPM_BUILD_ROOT/etc/pki/tls/certs/ca-bundle.crt
218
219 %clean
220 rm -rf $RPM_BUILD_ROOT
221
222 %post update
223 %{_sbindir}/update-ca-certificates --fresh || :
224
225 %files
226 %defattr(644,root,root,755)
227 %doc debian/README.Debian debian/changelog
228 %dir /etc/pki/tls
229 %dir /etc/pki/tls/certs
230 %config(noreplace) %verify(not md5 mtime size) /etc/pki/tls/certs/ca-bundle.crt
231 %config(noreplace) %verify(not md5 mtime size) %{certsdir}/ca-certificates.crt
232
233 %files update
234 %defattr(644,root,root,755)
235 %attr(755,root,root) %{_sbindir}/update-ca-certificates
236 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/ca-certificates.conf
237 %dir %{_sysconfdir}/ca-certificates.d
238 %{_datadir}/ca-certificates
This page took 0.118107 seconds and 4 git commands to generate.