]> git.pld-linux.org Git - packages/openssl.git/blame_incremental - openssl.spec
doc/openssl_button.gif doc/openssl_button.html are missing as well
[packages/openssl.git] / openssl.spec
... / ...
CommitLineData
1# TODO
2# - consider dropping last optflags.patch hunk and return to SOMAJOR (.so.1) sonames
3# - find a way to simplify (drop) openssl-optflags.patch, it's pain to update here in pld
4#
5# Conditional build:
6%bcond_without tests # don't perform "make tests"
7%bcond_without zlib # zlib: note - enables CVE-2012-4929 vulnerability
8%bcond_without sslv2 # SSLv2: note - many flaws http://en.wikipedia.org/wiki/Transport_Layer_Security#SSL_2.0
9%bcond_without sslv3 # SSLv3: note - enables CVE-2014-3566 vulnerability
10%bcond_with purify # Compile openssl with "-DPURIFY", useful when one wants to
11 # use valgrind debugger against openssl-linked programs
12
13%include /usr/lib/rpm/macros.perl
14Summary: OpenSSL Toolkit libraries for the "Secure Sockets Layer" (SSL v2/v3)
15Summary(de.UTF-8): Secure Sockets Layer (SSL)-Kommunikationslibrary
16Summary(es.UTF-8): Biblioteca C que suministra algoritmos y protocolos criptográficos
17Summary(fr.UTF-8): Utilitaires de communication SSL (Secure Sockets Layer)
18Summary(pl.UTF-8): Biblioteki OpenSSL (SSL v2/v3)
19Summary(pt_BR.UTF-8): Uma biblioteca C que fornece vários algoritmos e protocolos criptográficos
20Summary(ru.UTF-8): Библиотеки и утилиты для соединений через Secure Sockets Layer
21Summary(uk.UTF-8): Бібліотеки та утиліти для з'єднань через Secure Sockets Layer
22Name: openssl
23# 1.0.2 will be LTS release
24# Version 1.0.2 will be supported until 2019-12-31.
25# https://www.openssl.org/about/releasestrat.html
26Version: 1.0.2e
27Release: 1
28License: Apache-like
29Group: Libraries
30Source0: ftp://ftp.openssl.org/source/%{name}-%{version}.tar.gz
31# Source0-md5: 2218c1a6f807f7206c11eb3ee3a5ec80
32Source1: https://raw.githubusercontent.com/openssl/openssl/OpenSSL_1_0_2-stable/util/pod2mantest
33# Source1-md5: 0811d285202cebe91003771475802b4f
34Source2: %{name}.1.pl
35Source3: %{name}-ssl-certificate.sh
36Source4: %{name}-c_rehash.sh
37Patch0: %{name}-alpha-ccc.patch
38Patch1: %{name}-optflags.patch
39Patch2: %{name}-include.patch
40Patch3: %{name}-man-namespace.patch
41Patch4: %{name}-asflag.patch
42Patch5: %{name}-ca-certificates.patch
43Patch6: %{name}-ldflags.patch
44Patch7: %{name}-find.patch
45Patch8: pic.patch
46Patch10: %{name}_fix_for_x32.patch
47URL: http://www.openssl.org/
48BuildRequires: bc
49BuildRequires: perl-devel >= 1:5.6.1
50BuildRequires: rpm-perlprov >= 4.1-13
51BuildRequires: rpmbuild(macros) >= 1.213
52BuildRequires: sed >= 4.0
53Requires: ca-certificates >= 20080809-4
54Requires: rpm-whiteout >= 1.7
55Obsoletes: SSLeay
56Obsoletes: SSLeay-devel
57Obsoletes: SSLeay-perl
58Obsoletes: libopenssl0
59%if "%{pld_release}" == "ac"
60Conflicts: neon < 0.26.3-3
61Conflicts: ntpd < 4.2.4p8-10
62Conflicts: openssh-clients < 2:5.8p1-9
63Conflicts: openssh-server < 2:5.8p1-9
64%else
65Conflicts: neon < 0.29.6-8
66Conflicts: openssh-clients < 2:6.2p2-3
67Conflicts: openssh-server < 2:6.2p2-3
68%endif
69BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
70
71%description
72The OpenSSL Project is a collaborative effort to develop a robust,
73commercial-grade, full-featured, and Open Source toolkit implementing
74the Secure Sockets Layer (SSL v2/v3) and Transport Layer Security (TLS
75v1) protocols with full-strength cryptography world-wide. The project
76is managed by a worldwide community of volunteers that use the
77Internet to communicate, plan, and develop the OpenSSL tookit and its
78related documentation.
79
80OpenSSL is based on the excellent SSLeay library developed by Eric A.
81Young and Tim J. Hudson. The OpenSSL toolkit is licensed under an
82Apache-style licence, which basically means that you are free to get
83and use it for commercial and non-commercial purposes subject to some
84simple license conditions.
85
86This package contains shared libraries only, install openssl-tools if
87you want to use openssl cmdline tool.
88
89%description -l de.UTF-8
90Openssl enthält das OpenSSL Zertifikatsmanagementtool und shared
91libraries, die verschiedene Verschlüsselungs- und
92Entschlüsselungsalgorithmen und -protokolle, wie DES, RC4, RSA und SSL
93zur Verfügung stellen.
94
95%description -l es.UTF-8
96Biblioteca C que suministra algoritmos y protocolos criptográficos.
97
98%description -l fr.UTF-8
99OpenSSL est un outiil de gestion des certificats et les librairies
100partagees qui fournit plusieurs protocoles et algorithmes de
101codage/decodage, incluant DES, RC4, RSA et SSL.
102
103%description -l pl.UTF-8
104Implementacja protokołów kryptograficznych Secure Socket Layer (SSL)
105v2/v3 oraz Transport Layer Security (TLS v1).
106
107%description -l pt_BR.UTF-8
108Uma biblioteca C que fornece vários algoritmos e protocolos
109criptográficos, incluindo DES, RC4, RSA e SSL. Inclui bibliotecas
110compartilhadas e utilitários.
111
112%description -l ru.UTF-8
113Программа openssl для работы с сертификатами и разделяемые библиотеки,
114которые реализуют множетсво криптографических алгоритмов, включая DES,
115RC4, RSA и SSL.
116
117%description -l uk.UTF-8
118Програма openssl для роботи з сертифікатами та бібліотеки спільного
119користування, що реалізують велику кількість криптографічних
120алгоритмів, включаючи DES, RC4, RSA та SSL.
121
122%package engines
123Summary: OpenSSL optional crypto engines
124Summary(pl.UTF-8): Opcjonalne silniki kryptograficzne dla OpenSSL-a
125Group: Libraries
126Requires: %{name} = %{version}-%{release}
127
128%description engines
129With OpenSSL 0.9.6, a new component was added to support alternative
130cryptography implementations, most commonly for interfacing with
131external crypto devices (eg. accelerator cards). This component is
132called ENGINE.
133
134There are currently built-in ENGINE implementations for the following
135crypto devices:
136
137- CryptoSwift
138- Compaq Atalla
139- nCipher CHIL
140- Nuron
141- Broadcom uBSec
142
143In addition, dynamic binding to external ENGINE implementations is now
144provided by a special ENGINE called "dynamic".
145
146%description engines -l pl.UTF-8
147Począwszy od OpenSSL-a 0.9.6 został dodany nowy komponent, mający
148wspierać alternatywne implementacje kryptografii, przeważnie
149współpracujące z zewnętrznymi urządzeniami kryptograficznymi (np.
150kartami akceleratorów). Komponent ten jest nazywany SILNIKIEM (ang.
151ENGINE).
152
153Obecnie istnieją wbudowane implementacje silników dla następujących
154urządzeń kryptograficznych:
155- CryptoSwift
156- Compaq Atalla
157- nCipher CHIL
158- Nuron
159- Broadcom uBSec
160
161Ponadto zapewnione jest dynamiczne wiązanie dla zewnętrznych
162implementacji silników poprzez specjalny silnik o nazwie "dynamic".
163
164%package tools
165Summary: OpenSSL command line tool and utilities
166Summary(pl.UTF-8): Zestaw narzędzi i skryptów
167Group: Applications/Communications
168Requires: %{name} = %{version}-%{release}
169Requires: which
170
171%description tools
172The OpenSSL Toolkit cmdline tool openssl and utility scripts.
173
174%description tools -l pl.UTF-8
175Zestaw narzędzi i skryptów wywoływanych z linii poleceń.
176
177%package tools-perl
178Summary: OpenSSL utilities written in Perl
179Summary(pl.UTF-8): Narzędzia OpenSSL napisane w perlu
180Group: Applications/Communications
181Requires: %{name} = %{version}-%{release}
182
183%description tools-perl
184OpenSSL Toolkit tools written in Perl.
185
186%description tools-perl -l pl.UTF-8
187Narzędzia OpenSSL napisane w perlu.
188
189%package devel
190Summary: Development part of OpenSSL Toolkit libraries
191Summary(de.UTF-8): Secure Sockets Layer Kommunikationslibrary: statische libraries+header
192Summary(es.UTF-8): Bibliotecas y archivos de inclusión para desarrollo OpenSSL
193Summary(fr.UTF-8): Librairies statiques, headers et utilitaires pour communication SSL
194Summary(pl.UTF-8): Część bibiloteki OpenSSL przeznaczona dla programistów
195Summary(pt_BR.UTF-8): Bibliotecas e arquivos de inclusão para desenvolvimento OpenSSL
196Summary(ru.UTF-8): Библиотеки, хедеры и утилиты для Secure Sockets Layer
197Summary(uk.UTF-8): Бібліотеки, хедери та утиліти для Secure Sockets Layer
198Group: Development/Libraries
199Requires: %{name} = %{version}-%{release}
200Obsoletes: libopenssl0-devel
201
202%description devel
203Development part of OpenSSL library.
204
205%description devel -l es.UTF-8
206Bibliotecas y archivos de inclusión para desarrollo OpenSSL
207
208%description devel -l pl.UTF-8
209Część biblioteki OpenSSL przeznaczona dla programistów.
210
211%description devel -l pt_BR.UTF-8
212Uma biblioteca C que fornece vários algoritmos e protocolos
213criptográficos, incluindo DES, RC4, RSA e SSL. Inclui bibliotecas e
214arquivos de inclusão para desenvolvimento.
215
216%description devel -l ru.UTF-8
217Программа openssl для работы с сертификатами и разделяемые библиотеки,
218которые реализуют множетсво криптографических алгоритмов, включая DES,
219RC4, RSA и SSL. Включает библиотеки и хедеры для разработки приложений
220с использованием SSL.
221
222%description devel -l uk.UTF-8
223Програма openssl для роботи з сертифікатами та бібліотеки спільного
224користування, що реалізують велику кількість криптографічних
225алгоритмів, включаючи DES, RC4, RSA та SSL. Містить бібліотеки та
226хедери для розробки програм з використанням SSL.
227
228%package static
229Summary: Static OpenSSL libraries
230Summary(pl.UTF-8): Statyczne wersje bibliotek z OpenSSL
231Summary(pt_BR.UTF-8): Bibliotecas estáticas para desenvolvimento com openssl
232Summary(ru.UTF-8): Статические библиотеки разработчика для OpenSSL
233Summary(uk.UTF-8): Статичні бібліотеки програміста для OpenSSL
234Group: Development/Libraries
235Requires: %{name}-devel = %{version}-%{release}
236
237%description static
238Static OpenSSL Toolkit libraries.
239
240%description static -l pl.UTF-8
241Statyczne wersje bibliotek z OpenSSL.
242
243%description static -l pt_BR.UTF-8
244Bibliotecas estáticas para desenvolvimento com openssl.
245
246%description static -l ru.UTF-8
247Программа openssl для работы с сертификатами и разделяемые библиотеки,
248которые реализуют множетсво криптографических алгоритмов, включая DES,
249RC4, RSA и SSL. Включает статические библиотеки для разработки
250приложений с использованием OpenSSL.
251
252%description static -l uk.UTF-8
253Програма openssl для роботи з сертифікатами та бібліотеки спільного
254користування, що реалізують велику кількість криптографічних
255алгоритмів, включаючи DES, RC4, RSA та SSL. Містить статичні
256бібліотеки для розробки програм з використанням SSL.
257
258%prep
259%setup -q
260%patch0 -p1
261%patch1 -p1
262%patch2 -p1
263%patch3 -p1
264%patch4 -p1
265%patch5 -p1
266%patch6 -p1
267%patch7 -p1
268%patch8 -p1
269%patch10 -p1
270
271sed -i -e 's|\$prefix/\$libdir/engines|/%{_lib}/engines|g' Configure
272
273# fix packaging error
274# https://github.com/openssl/openssl/issues/491
275ln -s . test/openssl-1.0.2e
276
277# also pod2man missing
278# https://github.com/openssl/openssl/issues/490
279install -p %{SOURCE1} util
280
281%build
282touch Makefile.*
283
284%{__perl} util/perlpath.pl %{__perl}
285
286OPTFLAGS="%{rpmcflags} %{rpmcppflags} %{?with_purify:-DPURIFY}" \
287PERL="%{__perl}" \
288%{__perl} ./Configure \
289 --openssldir=%{_sysconfdir}/%{name} \
290 --libdir=%{_lib} \
291 shared \
292 threads \
293 %{!?with_sslv2:no-ssl2} \
294 %{!?with_sslv3:no-ssl3} \
295 %{!?with_zlib:no-}zlib \
296 enable-camelia \
297 enable-cms \
298 enable-idea \
299 enable-md2 \
300 enable-mdc2 \
301 enable-rc5 \
302 enable-rfc3779 \
303 enable-seed \
304 enable-tlsext \
305%ifarch %{x8664}
306 enable-ec_nistp_64_gcc_128 \
307%endif
308%ifarch %{ix86}
309%ifarch i386
310 386 linux-elf
311# ^- allow running on 80386 (default code uses bswapl available on i486+)
312%else
313 linux-elf
314%endif
315%endif
316%ifarch alpha
317 linux-alpha+bwx-gcc
318%endif
319%ifarch %{x8664}
320 linux-x86_64
321%endif
322%ifarch x32
323 linux-x32
324%endif
325%ifarch ia64
326 linux-ia64
327%endif
328%ifarch ppc
329 linux-ppc
330%endif
331%ifarch ppc64
332 linux-ppc64
333%endif
334%ifarch sparc
335 linux-sparcv8
336%endif
337%ifarch sparcv9
338 linux-sparcv9
339%endif
340%ifarch sparc64
341 linux64-sparcv9
342%endif
343%ifarch armv4 armv5 armv5t armv5te armv5tel
344 linux-armv4
345%endif
346
347%{__make} -j1 all rehash %{?with_tests:tests} \
348 CC="%{__cc}" \
349 ASFLAG='$(CFLAG) -Wa,--noexecstack' \
350 INSTALLTOP=%{_prefix}
351
352# Rename POD sources of man pages. "openssl_" prefix is added to each
353# manpage to avoid potential conflicts with other packages.
354
355for dir in doc/{apps,ssl,crypto}; do
356 cd $dir || exit 1;
357 %{__perl} -pi -e 's/(\W)((?<!openssl_)\w+)(\(\d\))/$1openssl_$2$3/g; s/openssl_openssl/openssl/g;' *.pod;
358
359 for pod in !(openssl*).pod; do
360 mv -f $pod openssl_$pod;
361 done
362 cd ../..
363done
364
365%install
366rm -rf $RPM_BUILD_ROOT
367install -d $RPM_BUILD_ROOT{%{_sysconfdir}/%{name},%{_libdir}/%{name}} \
368 $RPM_BUILD_ROOT{%{_mandir}/{pl/man1,man{1,3,5,7}},%{_datadir}/ssl} \
369 $RPM_BUILD_ROOT/%{_lib}/engines \
370 $RPM_BUILD_ROOT%{_pkgconfigdir}
371
372%{__make} -j1 install \
373 INSTALLTOP=%{_prefix} \
374 INSTALL_PREFIX=$RPM_BUILD_ROOT \
375 MANDIR=%{_mandir}
376
377mv -f $RPM_BUILD_ROOT%{_libdir}/engines/* $RPM_BUILD_ROOT/%{_lib}/engines
378mv -f $RPM_BUILD_ROOT%{_libdir}/lib*.so.*.* $RPM_BUILD_ROOT/%{_lib}
379ln -sf /%{_lib}/$(basename $RPM_BUILD_ROOT/%{_lib}/libcrypto.*.*) $RPM_BUILD_ROOT%{_libdir}/libcrypto.so
380ln -sf /%{_lib}/$(basename $RPM_BUILD_ROOT/%{_lib}/libssl.*.*) $RPM_BUILD_ROOT%{_libdir}/libssl.so
381
382mv -f $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/misc/* $RPM_BUILD_ROOT%{_libdir}/%{name}
383rm -rf $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/misc
384
385# not installed as individual utilities (see openssl dgst instead)
386%{__rm} $RPM_BUILD_ROOT%{_mandir}/man1/{dss1,md2,md4,md5,mdc2,ripemd160,sha,sha1,sha224,sha256,sha384,sha512}.1
387
388cp -p %{SOURCE2} $RPM_BUILD_ROOT%{_mandir}/pl/man1/openssl.1
389install -p %{SOURCE3} $RPM_BUILD_ROOT%{_bindir}/ssl-certificate
390install -p %{SOURCE4} $RPM_BUILD_ROOT%{_bindir}/c_rehash.sh
391
392%clean
393rm -rf $RPM_BUILD_ROOT
394
395%post -p /sbin/ldconfig
396%postun -p /sbin/ldconfig
397
398%triggerpostun -- %{name}-tools < 1.0.0-5
399# the hashing format has changed in 1.0.0
400[ ! -x %{_sbindir}/update-ca-certificates ] || %{_sbindir}/update-ca-certificates --fresh || :
401
402%triggerpostun -- %{name} < 0.9.8i-2
403# don't do anything on --downgrade
404if [ $1 -le 1 ]; then
405 exit 0
406fi
407if [ -d /var/lib/openssl/certs ] ; then
408 mv /var/lib/openssl/certs/* %{_sysconfdir}/%{name}/certs 2>/dev/null || :
409fi
410if [ -d /var/lib/openssl/private ] ; then
411 mv /var/lib/openssl/private/* %{_sysconfdir}/%{name}/private 2>/dev/null || :
412fi
413if [ -d /var/lib/openssl ] ; then
414 for f in /var/lib/openssl/* ; do
415 [ -f "$f" ] && mv "$f" %{_sysconfdir}/%{name} 2>/dev/null || :
416 done
417 rmdir /var/lib/openssl/* 2>/dev/null || :
418 rmdir /var/lib/openssl 2>/dev/null || :
419fi
420
421%files
422%defattr(644,root,root,755)
423%doc CHANGES CHANGES.SSLeay LICENSE NEWS README doc/*.txt
424#%doc doc/openssl_button.gif doc/openssl_button.html
425%attr(755,root,root) /%{_lib}/libcrypto.so.*.*.*
426%attr(755,root,root) /%{_lib}/libssl.so.*.*.*
427%dir %{_sysconfdir}/%{name}
428%dir %{_sysconfdir}/%{name}/certs
429%dir %{_sysconfdir}/%{name}/private
430%dir %{_datadir}/ssl
431
432%files engines
433%defattr(644,root,root,755)
434%dir /%{_lib}/engines
435%attr(755,root,root) /%{_lib}/engines/*.so
436
437%files tools
438%defattr(644,root,root,755)
439%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/openssl.cnf
440%attr(755,root,root) %{_bindir}/c_rehash.sh
441%attr(755,root,root) %{_bindir}/openssl
442%attr(754,root,root) %{_bindir}/ssl-certificate
443
444%dir %{_libdir}/%{name}
445%attr(755,root,root) %{_libdir}/%{name}/CA.sh
446%attr(755,root,root) %{_libdir}/%{name}/c_hash
447%attr(755,root,root) %{_libdir}/%{name}/c_info
448%attr(755,root,root) %{_libdir}/%{name}/c_issuer
449%attr(755,root,root) %{_libdir}/%{name}/c_name
450
451%{_mandir}/man1/openssl.1*
452%{_mandir}/man1/openssl_asn1parse.1*
453%{_mandir}/man1/openssl_ca.1*
454%{_mandir}/man1/openssl_ciphers.1*
455%{_mandir}/man1/openssl_cms.1*
456%{_mandir}/man1/openssl_crl.1*
457%{_mandir}/man1/openssl_crl2pkcs7.1*
458%{_mandir}/man1/openssl_dgst.1*
459%{_mandir}/man1/openssl_dhparam.1*
460%{_mandir}/man1/openssl_dsa.1*
461%{_mandir}/man1/openssl_dsaparam.1*
462%{_mandir}/man1/openssl_ec.1*
463%{_mandir}/man1/openssl_ecparam.1*
464%{_mandir}/man1/openssl_enc.1*
465%{_mandir}/man1/openssl_errstr.1*
466%{_mandir}/man1/openssl_gendsa.1*
467%{_mandir}/man1/openssl_genpkey.1*
468%{_mandir}/man1/openssl_genrsa.1*
469%{_mandir}/man1/openssl_nseq.1*
470%{_mandir}/man1/openssl_ocsp.1*
471%{_mandir}/man1/openssl_passwd.1*
472%{_mandir}/man1/openssl_pkcs12.1*
473%{_mandir}/man1/openssl_pkcs7.1*
474%{_mandir}/man1/openssl_pkcs8.1*
475%{_mandir}/man1/openssl_pkey.1*
476%{_mandir}/man1/openssl_pkeyparam.1*
477%{_mandir}/man1/openssl_pkeyutl.1*
478%{_mandir}/man1/openssl_rand.1*
479%{_mandir}/man1/openssl_req.1*
480%{_mandir}/man1/openssl_rsa.1*
481%{_mandir}/man1/openssl_rsautl.1*
482%{_mandir}/man1/openssl_s_client.1*
483%{_mandir}/man1/openssl_s_server.1*
484%{_mandir}/man1/openssl_s_time.1*
485%{_mandir}/man1/openssl_sess_id.1*
486%{_mandir}/man1/openssl_smime.1*
487%{_mandir}/man1/openssl_speed.1*
488%{_mandir}/man1/openssl_spkac.1*
489%{_mandir}/man1/openssl_ts.1*
490%{_mandir}/man1/openssl_tsget.1*
491%{_mandir}/man1/openssl_verify.1*
492%{_mandir}/man1/openssl_version.1*
493%{_mandir}/man1/openssl_x509.1*
494%{_mandir}/man5/openssl_config.5*
495%{_mandir}/man5/openssl_x509v3_config.5*
496%lang(pl) %{_mandir}/pl/man1/openssl.1*
497
498%files tools-perl
499%defattr(644,root,root,755)
500%attr(755,root,root) %{_bindir}/c_rehash
501%attr(755,root,root) %{_libdir}/%{name}/CA.pl
502%attr(755,root,root) %{_libdir}/%{name}/tsget
503%{_mandir}/man1/openssl_CA.pl.1*
504%{_mandir}/man1/openssl_c_rehash.1*
505
506%files devel
507%defattr(644,root,root,755)
508%attr(755,root,root) %{_libdir}/libcrypto.so
509%attr(755,root,root) %{_libdir}/libssl.so
510%{_includedir}/%{name}
511%{_pkgconfigdir}/libcrypto.pc
512%{_pkgconfigdir}/libssl.pc
513%{_pkgconfigdir}/openssl.pc
514%{_mandir}/man3/openssl*.3*
515%{_mandir}/man7/openssl_des_modes.7*
516
517%files static
518%defattr(644,root,root,755)
519%{_libdir}/libcrypto.a
520%{_libdir}/libssl.a
This page took 0.036596 seconds and 4 git commands to generate.