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