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