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