]> git.pld-linux.org Git - packages/openssl.git/blob - openssl.spec
- rel 2; fixes CVE-2009-1377 CVE-2009-1378 CVE-2009-1379; enable tlsext and rfc3779
[packages/openssl.git] / openssl.spec
1 #
2 # Conditional build:
3 %bcond_without  tests   # don't perform "make tests"
4 %bcond_with     purify  # Compile openssl with \-DPURIFY, useful when one wants to
5                         # use valgrind debugger against openssl-linked programs
6 #
7 %include        /usr/lib/rpm/macros.perl
8 Summary:        OpenSSL Toolkit libraries for the "Secure Sockets Layer" (SSL v2/v3)
9 Summary(de.UTF-8):      Secure Sockets Layer (SSL)-Kommunikationslibrary
10 Summary(es.UTF-8):      Biblioteca C que suministra algoritmos y protocolos criptográficos
11 Summary(fr.UTF-8):      Utilitaires de communication SSL (Secure Sockets Layer)
12 Summary(pl.UTF-8):      Biblioteki OpenSSL (SSL v2/v3)
13 Summary(pt_BR.UTF-8):   Uma biblioteca C que fornece vários algoritmos e protocolos criptográficos
14 Summary(ru.UTF-8):      Библиотеки и утилиты для соединений через Secure Sockets Layer
15 Summary(uk.UTF-8):      Бібліотеки та утиліти для з'єднань через Secure Sockets Layer
16 Name:           openssl
17 Version:        0.9.8k
18 Release:        2
19 License:        Apache-like
20 Group:          Libraries
21 Source0:        ftp://ftp.openssl.org/source/%{name}-%{version}.tar.gz
22 # Source0-md5:  e555c6d58d276aec7fdc53363e338ab3
23 Source2:        %{name}.1.pl
24 Source3:        %{name}-ssl-certificate.sh
25 Source4:        %{name}-c_rehash.sh
26 Patch0:         %{name}-alpha-ccc.patch
27 Patch1:         %{name}-optflags.patch
28 Patch2:         %{name}-globalCA.diff
29 Patch3:         %{name}-include.patch
30 Patch4:         %{name}-libvar.patch
31 Patch5:         %{name}-man-namespace.patch
32 Patch6:         %{name}-asflag.patch
33 Patch7:         %{name}-ca-certificates.patch
34 Patch8:         %{name}-fips_install.patch
35 Patch9:         %{name}-CVE-2009-1377-1378-1379.patch
36 URL:            http://www.openssl.org/
37 BuildRequires:  bc
38 BuildRequires:  perl-devel >= 1:5.6.1
39 BuildRequires:  rpm-perlprov >= 4.1-13
40 BuildRequires:  rpmbuild(macros) >= 1.213
41 BuildRequires:  sed >= 4.0
42 Obsoletes:      SSLeay
43 Obsoletes:      SSLeay-devel
44 Obsoletes:      SSLeay-perl
45 Obsoletes:      libopenssl0
46 Requires:       ca-certificates >= 20080809-4
47 Requires:       rpm-whiteout >= 1.7
48 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
49
50 %description
51 The OpenSSL Project is a collaborative effort to develop a robust,
52 commercial-grade, full-featured, and Open Source toolkit implementing
53 the Secure Sockets Layer (SSL v2/v3) and Transport Layer Security (TLS
54 v1) protocols with full-strength cryptography world-wide. The project
55 is managed by a worldwide community of volunteers that use the
56 Internet to communicate, plan, and develop the OpenSSL tookit and its
57 related documentation.
58
59 OpenSSL is based on the excellent SSLeay library developed by Eric A.
60 Young and Tim J. Hudson. The OpenSSL toolkit is licensed under an
61 Apache-style licence, which basically means that you are free to get
62 and use it for commercial and non-commercial purposes subject to some
63 simple license conditions.
64
65 This package contains shared libraries only, install openssl-tools if
66 you want to use openssl cmdline tool.
67
68 %description -l de.UTF-8
69 Openssl enthält das OpenSSL Zertifikatsmanagementtool und shared
70 libraries, die verschiedene Verschlüsselungs- und
71 Entschlüsselungsalgorithmen und -protokolle, wie DES, RC4, RSA und SSL
72 zur Verfügung stellen.
73
74 %description -l es.UTF-8
75 Biblioteca C que suministra algoritmos y protocolos criptográficos.
76
77 %description -l fr.UTF-8
78 OpenSSL est un outiil de gestion des certificats et les librairies
79 partagees qui fournit plusieurs protocoles et algorithmes de
80 codage/decodage, incluant DES, RC4, RSA et SSL.
81
82 %description -l pl.UTF-8
83 Implementacja protokołów kryptograficznych Secure Socket Layer (SSL)
84 v2/v3 oraz Transport Layer Security (TLS v1).
85
86 %description -l pt_BR.UTF-8
87 Uma biblioteca C que fornece vários algoritmos e protocolos
88 criptográficos, incluindo DES, RC4, RSA e SSL. Inclui bibliotecas
89 compartilhadas e utilitários.
90
91 %description -l ru.UTF-8
92 Программа openssl для работы с сертификатами и разделяемые библиотеки,
93 которые реализуют множетсво криптографических алгоритмов, включая DES,
94 RC4, RSA и SSL.
95
96 %description -l uk.UTF-8
97 Програма openssl для роботи з сертифікатами та бібліотеки спільного
98 користування, що реалізують велику кількість криптографічних
99 алгоритмів, включаючи DES, RC4, RSA та SSL.
100
101 %package tools
102 Summary:        OpenSSL command line tool and utilities
103 Summary(pl.UTF-8):      Zestaw narzędzi i skryptów
104 Group:          Applications/Communications
105 Requires:       %{name} = %{version}-%{release}
106
107 %description tools
108 The OpenSSL Toolkit cmdline tool openssl and utility scripts.
109
110 %description tools -l pl.UTF-8
111 Zestaw narzędzi i skryptów wywoływanych z linii poleceń.
112
113 %package tools-perl
114 Summary:        OpenSSL utilities written in Perl
115 Summary(pl.UTF-8):      Narzędzia OpenSSL napisane w perlu
116 Group:          Applications/Communications
117 Requires:       %{name} = %{version}-%{release}
118
119 %description tools-perl
120 OpenSSL Toolkit tools written in Perl.
121
122 %description tools-perl -l pl.UTF-8
123 Narzędzia OpenSSL napisane w perlu.
124
125 %package devel
126 Summary:        Development part of OpenSSL Toolkit libraries
127 Summary(de.UTF-8):      Secure Sockets Layer Kommunikationslibrary: statische libraries+header
128 Summary(es.UTF-8):      Bibliotecas y archivos de inclusión para desarrollo OpenSSL
129 Summary(fr.UTF-8):      Librairies statiques, headers et utilitaires pour communication SSL
130 Summary(pl.UTF-8):      Część bibiloteki OpenSSL przeznaczona dla programistów
131 Summary(pt_BR.UTF-8):   Bibliotecas e arquivos de inclusão para desenvolvimento OpenSSL
132 Summary(ru.UTF-8):      Библиотеки, хедеры и утилиты для Secure Sockets Layer
133 Summary(uk.UTF-8):      Бібліотеки, хедери та утиліти для Secure Sockets Layer
134 Group:          Development/Libraries
135 Requires:       %{name} = %{version}-%{release}
136 Obsoletes:      libopenssl0-devel
137
138 %description devel
139 Development part of OpenSSL library.
140
141 %description devel -l es.UTF-8
142 Bibliotecas y archivos de inclusión para desarrollo OpenSSL
143
144 %description devel -l pl.UTF-8
145 Część biblioteki OpenSSL przeznaczona dla programistów.
146
147 %description devel -l pt_BR.UTF-8
148 Uma biblioteca C que fornece vários algoritmos e protocolos
149 criptográficos, incluindo DES, RC4, RSA e SSL. Inclui bibliotecas e
150 arquivos de inclusão para desenvolvimento.
151
152 %description devel -l ru.UTF-8
153 Программа openssl для работы с сертификатами и разделяемые библиотеки,
154 которые реализуют множетсво криптографических алгоритмов, включая DES,
155 RC4, RSA и SSL. Включает библиотеки и хедеры для разработки приложений
156 с использованием SSL.
157
158 %description devel -l uk.UTF-8
159 Програма openssl для роботи з сертифікатами та бібліотеки спільного
160 користування, що реалізують велику кількість криптографічних
161 алгоритмів, включаючи DES, RC4, RSA та SSL. Містить бібліотеки та
162 хедери для розробки програм з використанням SSL.
163
164 %package static
165 Summary:        Static OpenSSL libraries
166 Summary(pl.UTF-8):      Statyczne wersje bibliotek z OpenSSL
167 Summary(pt_BR.UTF-8):   Bibliotecas estáticas para desenvolvimento com openssl
168 Summary(ru.UTF-8):      Статические библиотеки разработчика для OpenSSL
169 Summary(uk.UTF-8):      Статичні бібліотеки програміста для OpenSSL
170 Group:          Development/Libraries
171 Requires:       %{name}-devel = %{version}-%{release}
172
173 %description static
174 Static OpenSSL Toolkit libraries.
175
176 %description static -l pl.UTF-8
177 Statyczne wersje bibliotek z OpenSSL.
178
179 %description static -l pt_BR.UTF-8
180 Bibliotecas estáticas para desenvolvimento com openssl.
181
182 %description static -l ru.UTF-8
183 Программа openssl для работы с сертификатами и разделяемые библиотеки,
184 которые реализуют множетсво криптографических алгоритмов, включая DES,
185 RC4, RSA и SSL. Включает статические библиотеки для разработки
186 приложений с использованием OpenSSL.
187
188 %description static -l uk.UTF-8
189 Програма openssl для роботи з сертифікатами та бібліотеки спільного
190 користування, що реалізують велику кількість криптографічних
191 алгоритмів, включаючи DES, RC4, RSA та SSL. Містить статичні
192 бібліотеки для розробки програм з використанням SSL.
193
194 %prep
195 %setup -q
196 %patch0 -p1
197 %patch1 -p1
198 %patch2 -p1
199 %patch3 -p1
200 %patch4 -p1
201 %patch5 -p1
202 %patch6 -p1
203 %patch7 -p1
204 %patch8 -p0
205 %patch9 -p1
206
207 %{__perl} -pi -e 's#%{_prefix}/local/bin/perl#%{__perl}#g' \
208         `grep -l -r "%{_prefix}/local/bin/perl" *`
209
210 sed -i -e 's|$prefix/lib/engines|%{_libdir}/engines|g' Configure
211
212 %build
213 touch Makefile.*
214
215 %{__perl} util/perlpath.pl %{__perl}
216
217 OPTFLAGS="%{rpmcflags} %{?with_purify:-DPURIFY}" \
218 ./Configure \
219 %if "%{pld_release}" == "ti"
220         --openssldir=%{_var}/lib/%{name} \
221 %else
222         --openssldir=%{_sysconfdir}/%{name} \
223 %endif
224         --lib=%{_lib} \
225         shared threads \
226         enable-tlsext \
227         enable-seed \
228         enable-rfc3779 \
229         enable-cms \
230         enable-idea \
231         enable-mdc2 \
232         enable-rc5 \
233 %ifarch %{ix86}
234 %ifarch i386
235         386 linux-elf
236 # ^- allow running on 80386 (default code uses bswapl available on i486+)
237 %else
238         linux-elf
239 %endif
240 %endif
241 %ifarch alpha
242         linux-alpha+bwx-gcc
243 %endif
244 %ifarch %{x8664}
245         linux-x86_64
246 %endif
247 %ifarch ia64
248         linux-ia64
249 %endif
250 %ifarch ppc
251         linux-ppc
252 %endif
253 %ifarch ppc64
254         linux-ppc64
255 %endif
256 %ifarch sparc
257         linux-sparcv8
258 %endif
259 %ifarch sparcv9
260         linux-sparcv9
261 %endif
262 %ifarch sparc64
263         linux64-sparcv9
264 %endif
265
266 %{__make} -j1 all rehash %{?with_tests:tests} \
267         CC="%{__cc}" \
268         ASFLAG='$(CFLAG) -Wa,--noexecstack' \
269         INSTALLTOP=%{_prefix}
270
271 # Rename POD sources of man pages. "openssl_" prefix is added to each
272 # manpage to avoid potential conflicts with other packages.
273
274 for dir in doc/{apps,ssl,crypto}; do
275         cd $dir || exit 1;
276         %{__perl} -pi -e 's/(\W)((?<!openssl_)\w+)(\(\d\))/$1openssl_$2$3/g; s/openssl_openssl/openssl/g;' *.pod;
277
278         for pod in !(openssl*).pod; do
279                 mv -f $pod openssl_$pod;
280         done
281         cd ../..
282 done
283
284 %install
285 rm -rf $RPM_BUILD_ROOT
286 install -d $RPM_BUILD_ROOT{%{_sysconfdir}/%{name},%{_libdir}/%{name}} \
287         $RPM_BUILD_ROOT{%{_mandir}/{pl/man1,man{1,3,5,7}},%{_datadir}/ssl} \
288         $RPM_BUILD_ROOT%{_pkgconfigdir}
289
290 %{__make} install \
291         INSTALLTOP=%{_prefix} \
292         INSTALL_PREFIX=$RPM_BUILD_ROOT \
293         MANDIR=%{_mandir}
294
295 install libcrypto.a libssl.a $RPM_BUILD_ROOT%{_libdir}
296 install lib*.so.*.* $RPM_BUILD_ROOT%{_libdir}
297 ln -sf libcrypto.so.*.* $RPM_BUILD_ROOT%{_libdir}/libcrypto.so
298 ln -sf libssl.so.*.* $RPM_BUILD_ROOT%{_libdir}/libssl.so
299
300 %if "%{pld_release}" == "ti"
301 ln -sf %{_var}/lib/%{name}/%{name}.cnf \
302         $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/openssl.cnf
303 ln -sf %{_var}/lib/%{name}/certs \
304         $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/certs
305 ln -sf %{_var}/lib/%{name}/private \
306         $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/private
307 mv -f $RPM_BUILD_ROOT%{_var}/lib/%{name}/misc/* $RPM_BUILD_ROOT%{_libdir}/%{name}
308 rm -rf $RPM_BUILD_ROOT%{_var}/lib/%{name}/misc
309 %else
310 mv -f $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/misc/* $RPM_BUILD_ROOT%{_libdir}/%{name}
311 rm -rf $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/misc
312 %endif
313
314 # not installed as individual utilities (see openssl dgst instead)
315 %{__rm} $RPM_BUILD_ROOT%{_mandir}/man1/{md2,md4,md5,mdc2,ripemd160,sha,sha1}.1
316
317 install %{SOURCE2} $RPM_BUILD_ROOT%{_mandir}/pl/man1/openssl.1
318 install %{SOURCE3} $RPM_BUILD_ROOT%{_bindir}/ssl-certificate
319 install %{SOURCE4} $RPM_BUILD_ROOT%{_bindir}/c_rehash.sh
320
321 %clean
322 rm -rf $RPM_BUILD_ROOT
323
324 %post   -p /sbin/ldconfig
325 %postun -p /sbin/ldconfig
326
327 %if "%{pld_release}" == "ti"
328 %triggerin -- %{name}-tools < 0.9.8i-2
329 if [ -L /var/lib/openssl/openssl.cnf ] ; then
330         echo "Saving old configuration as /var/lib/openssl/openssl.cnf.rpmsave"
331         rm /var/lib/openssl/openssl.cnf
332         mv %{_sysconfdir}/%{name}/openssl.cnf /var/lib/openssl/openssl.cnf.rpmsave 2>/dev/null || :
333 fi
334 %else
335 %triggerpostun -- %{name} < 0.9.8i-2
336 if [ -d /var/lib/openssl/certs ] ; then
337         mv /var/lib/openssl/certs/* %{_sysconfdir}/%{name}/certs 2>/dev/null || :
338 fi
339 if [ -d /var/lib/openssl/private ] ; then
340         mv /var/lib/openssl/private/* %{_sysconfdir}/%{name}/private 2>/dev/null || :
341 fi
342 if [ -d /var/lib/openssl ] ; then
343         for f in /var/lib/openssl/* ; do
344                 [ -f "$f" ] && mv "$f" %{_sysconfdir}/%{name} 2>/dev/null || :
345         done
346 fi
347 %endif
348
349 %files
350 %defattr(644,root,root,755)
351 %doc CHANGES CHANGES.SSLeay LICENSE NEWS README doc/*.txt
352 %doc doc/openssl_button.gif doc/openssl_button.html
353 %attr(755,root,root) %{_libdir}/libcrypto.so.*.*.*
354 %attr(755,root,root) %{_libdir}/libssl.so.*.*.*
355 %dir %{_libdir}/engines
356 %attr(755,root,root) %{_libdir}/engines/*.so
357 %if "%{pld_release}" == "ti"
358 %dir %{_var}/lib/%{name}
359 %dir %{_var}/lib/%{name}/certs
360 %dir %{_var}/lib/%{name}/private
361 %dir %{_sysconfdir}/%{name}
362 %attr(755,root,root) %{_sysconfdir}/%{name}/certs
363 %attr(755,root,root) %{_sysconfdir}/%{name}/private
364 %else
365 %dir %{_sysconfdir}/%{name}
366 %dir %{_sysconfdir}/%{name}/certs
367 %dir %{_sysconfdir}/%{name}/private
368 %endif
369 %dir %{_datadir}/ssl
370
371 %files tools
372 %defattr(644,root,root,755)
373 %if "%{pld_release}" == "ti"
374 %{_sysconfdir}/%{name}/openssl.cnf
375 %config(noreplace) %verify(not md5 mtime size) %{_var}/lib/%{name}/openssl.cnf
376 %else
377 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/openssl.cnf
378 %endif
379 %attr(755,root,root) %{_bindir}/%{name}
380 %attr(755,root,root) %{_bindir}/c_rehash.sh
381 %attr(754,root,root) %{_bindir}/ssl-certificate
382
383 %dir %{_libdir}/%{name}
384 %attr(755,root,root) %{_libdir}/%{name}/CA.sh
385 %attr(755,root,root) %{_libdir}/%{name}/c_hash
386 %attr(755,root,root) %{_libdir}/%{name}/c_info
387 %attr(755,root,root) %{_libdir}/%{name}/c_issuer
388 %attr(755,root,root) %{_libdir}/%{name}/c_name
389
390 %{_mandir}/man1/openssl.1*
391 %{_mandir}/man1/openssl_asn1parse.1*
392 %{_mandir}/man1/openssl_ca.1*
393 %{_mandir}/man1/openssl_ciphers.1*
394 %{_mandir}/man1/openssl_crl.1*
395 %{_mandir}/man1/openssl_crl2pkcs7.1*
396 %{_mandir}/man1/openssl_dgst.1*
397 %{_mandir}/man1/openssl_dhparam.1*
398 %{_mandir}/man1/openssl_dsa.1*
399 %{_mandir}/man1/openssl_dsaparam.1*
400 %{_mandir}/man1/openssl_ec.1*
401 %{_mandir}/man1/openssl_ecparam.1*
402 %{_mandir}/man1/openssl_enc.1*
403 %{_mandir}/man1/openssl_errstr.1*
404 %{_mandir}/man1/openssl_gendsa.1*
405 %{_mandir}/man1/openssl_genrsa.1*
406 %{_mandir}/man1/openssl_nseq.1*
407 %{_mandir}/man1/openssl_ocsp.1*
408 %{_mandir}/man1/openssl_passwd.1*
409 %{_mandir}/man1/openssl_pkcs12.1*
410 %{_mandir}/man1/openssl_pkcs7.1*
411 %{_mandir}/man1/openssl_pkcs8.1*
412 %{_mandir}/man1/openssl_rand.1*
413 %{_mandir}/man1/openssl_req.1*
414 %{_mandir}/man1/openssl_rsa.1*
415 %{_mandir}/man1/openssl_rsautl.1*
416 %{_mandir}/man1/openssl_s_client.1*
417 %{_mandir}/man1/openssl_s_server.1*
418 %{_mandir}/man1/openssl_s_time.1*
419 %{_mandir}/man1/openssl_sess_id.1*
420 %{_mandir}/man1/openssl_smime.1*
421 %{_mandir}/man1/openssl_speed.1*
422 %{_mandir}/man1/openssl_spkac.1*
423 %{_mandir}/man1/openssl_verify.1*
424 %{_mandir}/man1/openssl_version.1*
425 %{_mandir}/man1/openssl_x509.1*
426 %{_mandir}/man5/openssl_config.5*
427 %{_mandir}/man5/openssl_x509v3_config.5*
428 %lang(pl) %{_mandir}/pl/man1/openssl.1*
429
430 %files tools-perl
431 %defattr(644,root,root,755)
432 %attr(755,root,root) %{_bindir}/c_rehash
433 %attr(755,root,root) %{_libdir}/%{name}/CA.pl
434 %{_mandir}/man1/openssl_CA.pl.1*
435
436 %files devel
437 %defattr(644,root,root,755)
438 %attr(755,root,root) %{_libdir}/libcrypto.so
439 %attr(755,root,root) %{_libdir}/libssl.so
440 %{_includedir}/%{name}
441 %{_pkgconfigdir}/libcrypto.pc
442 %{_pkgconfigdir}/libssl.pc
443 %{_pkgconfigdir}/openssl.pc
444 %{_mandir}/man3/openssl*.3*
445 %{_mandir}/man7/openssl_des_modes.7*
446
447 %files static
448 %defattr(644,root,root,755)
449 %{_libdir}/lib*.a
This page took 0.129969 seconds and 3 git commands to generate.