]> git.pld-linux.org Git - packages/openssl.git/blob - openssl.spec
Rel 2; fixes https://github.com/openssl/openssl/issues/15465
[packages/openssl.git] / openssl.spec
1 #
2 # Conditional build:
3 %bcond_without  tests   # don't perform "make tests"
4 %bcond_without  zlib    # zlib: note - enables CVE-2012-4929 vulnerability
5 %bcond_with     sslv3   # SSLv3: note - enables CVE-2014-3566 vulnerability
6
7 Summary:        OpenSSL Toolkit libraries for the "Secure Sockets Layer" (SSL v2/v3)
8 Summary(de.UTF-8):      Secure Sockets Layer (SSL)-Kommunikationslibrary
9 Summary(es.UTF-8):      Biblioteca C que suministra algoritmos y protocolos criptográficos
10 Summary(fr.UTF-8):      Utilitaires de communication SSL (Secure Sockets Layer)
11 Summary(pl.UTF-8):      Biblioteki OpenSSL (SSL v2/v3)
12 Summary(pt_BR.UTF-8):   Uma biblioteca C que fornece vários algoritmos e protocolos criptográficos
13 Summary(ru.UTF-8):      Библиотеки и утилиты для соединений через Secure Sockets Layer
14 Summary(uk.UTF-8):      Бібліотеки та утиліти для з'єднань через Secure Sockets Layer
15 Name:           openssl
16 Version:        3.0.1
17 Release:        2
18 License:        Apache v2.0
19 Group:          Libraries
20 Source0:        https://www.openssl.org/source/%{name}-%{version}.tar.gz
21 # Source0-md5:  7d07e849d77d276891edd579a8832bb3
22 Source2:        %{name}.1.pl
23 Source3:        %{name}-ssl-certificate.sh
24 Source4:        %{name}-c_rehash.sh
25 Patch0:         %{name}-optflags.patch
26 Patch1:         %{name}-ca-certificates.patch
27 Patch2:         %{name}-find.patch
28 Patch3:         pic.patch
29 Patch4:         engines-dir.patch
30 Patch5:         bug-15465.patch
31 URL:            http://www.openssl.org/
32 %ifarch %{arm} ppc mips sparc sparcv9
33 BuildRequires:  libatomic-devel
34 %endif
35 BuildRequires:  libsctp-devel
36 BuildRequires:  linux-libc-headers >= 7:4.13
37 BuildRequires:  perl-devel >= 1:5.10.0
38 BuildRequires:  pkgconfig
39 BuildRequires:  rpm-perlprov >= 4.1-13
40 BuildRequires:  rpmbuild(macros) >= 1.213
41 BuildRequires:  sed >= 4.0
42 BuildRequires:  zlib-devel
43 Requires:       ca-certificates >= 20141019-3
44 Requires:       %{name}-tools = %{version}-%{release}
45 Requires:       rpm-whiteout >= 1.7
46 Obsoletes:      SSLeay
47 Obsoletes:      SSLeay-devel
48 Obsoletes:      SSLeay-perl
49 Obsoletes:      libopenssl0
50 Obsoletes:      openssl-engines < 3.0.0-2
51 %if "%{pld_release}" == "ac"
52 Conflicts:      neon < 0.26.3-3
53 Conflicts:      ntpd < 4.2.4p8-10
54 Conflicts:      openssh-clients < 2:5.8p1-9
55 Conflicts:      openssh-server < 2:5.8p1-9
56 %else
57 Conflicts:      neon < 0.29.6-8
58 Conflicts:      openssh-clients < 2:6.2p2-3
59 Conflicts:      openssh-server < 2:6.2p2-3
60 %endif
61 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
62
63 %description
64 The OpenSSL Project is a collaborative effort to develop a robust,
65 commercial-grade, full-featured, and Open Source toolkit implementing
66 the Secure Sockets Layer (SSL v2/v3) and Transport Layer Security (TLS
67 v1) protocols with full-strength cryptography world-wide. The project
68 is managed by a worldwide community of volunteers that use the
69 Internet to communicate, plan, and develop the OpenSSL tookit and its
70 related documentation.
71
72 OpenSSL is based on the excellent SSLeay library developed by Eric A.
73 Young and Tim J. Hudson. The OpenSSL toolkit is licensed under an
74 Apache-style licence, which basically means that you are free to get
75 and use it for commercial and non-commercial purposes subject to some
76 simple license conditions.
77
78 This package contains shared libraries only, install openssl-tools if
79 you want to use openssl cmdline tool.
80
81 %description -l de.UTF-8
82 Openssl enthält das OpenSSL Zertifikatsmanagementtool und shared
83 libraries, die verschiedene Verschlüsselungs- und
84 Entschlüsselungsalgorithmen und -protokolle, wie DES, RC4, RSA und SSL
85 zur Verfügung stellen.
86
87 %description -l es.UTF-8
88 Biblioteca C que suministra algoritmos y protocolos criptográficos.
89
90 %description -l fr.UTF-8
91 OpenSSL est un outiil de gestion des certificats et les librairies
92 partagees qui fournit plusieurs protocoles et algorithmes de
93 codage/decodage, incluant DES, RC4, RSA et SSL.
94
95 %description -l pl.UTF-8
96 Implementacja protokołów kryptograficznych Secure Socket Layer (SSL)
97 v2/v3 oraz Transport Layer Security (TLS v1).
98
99 %description -l pt_BR.UTF-8
100 Uma biblioteca C que fornece vários algoritmos e protocolos
101 criptográficos, incluindo DES, RC4, RSA e SSL. Inclui bibliotecas
102 compartilhadas e utilitários.
103
104 %description -l ru.UTF-8
105 Программа openssl для работы с сертификатами и разделяемые библиотеки,
106 которые реализуют множетсво криптографических алгоритмов, включая DES,
107 RC4, RSA и SSL.
108
109 %description -l uk.UTF-8
110 Програма openssl для роботи з сертифікатами та бібліотеки спільного
111 користування, що реалізують велику кількість криптографічних
112 алгоритмів, включаючи DES, RC4, RSA та SSL.
113
114 %package tools
115 Summary:        OpenSSL command line tool and utilities
116 Summary(pl.UTF-8):      Zestaw narzędzi i skryptów
117 Group:          Applications/Communications
118 Requires:       %{name} = %{version}-%{release}
119 Requires:       which
120
121 %description tools
122 The OpenSSL Toolkit cmdline tool openssl and utility scripts.
123
124 %description tools -l pl.UTF-8
125 Zestaw narzędzi i skryptów wywoływanych z linii poleceń.
126
127 %package tools-perl
128 Summary:        OpenSSL utilities written in Perl
129 Summary(pl.UTF-8):      Narzędzia OpenSSL napisane w perlu
130 Group:          Applications/Communications
131 Requires:       %{name} = %{version}-%{release}
132
133 %description tools-perl
134 OpenSSL Toolkit tools written in Perl.
135
136 %description tools-perl -l pl.UTF-8
137 Narzędzia OpenSSL napisane w perlu.
138
139 %package devel
140 Summary:        Development part of OpenSSL Toolkit libraries
141 Summary(de.UTF-8):      Secure Sockets Layer Kommunikationslibrary: statische libraries+header
142 Summary(es.UTF-8):      Bibliotecas y archivos de inclusión para desarrollo OpenSSL
143 Summary(fr.UTF-8):      Librairies statiques, headers et utilitaires pour communication SSL
144 Summary(pl.UTF-8):      Część bibiloteki OpenSSL przeznaczona dla programistów
145 Summary(pt_BR.UTF-8):   Bibliotecas e arquivos de inclusão para desenvolvimento OpenSSL
146 Summary(ru.UTF-8):      Библиотеки, хедеры и утилиты для Secure Sockets Layer
147 Summary(uk.UTF-8):      Бібліотеки, хедери та утиліти для Secure Sockets Layer
148 Group:          Development/Libraries
149 Requires:       %{name} = %{version}-%{release}
150 Obsoletes:      libopenssl0-devel
151
152 %description devel
153 Development part of OpenSSL library.
154
155 %description devel -l es.UTF-8
156 Bibliotecas y archivos de inclusión para desarrollo OpenSSL
157
158 %description devel -l pl.UTF-8
159 Część biblioteki OpenSSL przeznaczona dla programistów.
160
161 %description devel -l pt_BR.UTF-8
162 Uma biblioteca C que fornece vários algoritmos e protocolos
163 criptográficos, incluindo DES, RC4, RSA e SSL. Inclui bibliotecas e
164 arquivos de inclusão para desenvolvimento.
165
166 %description devel -l ru.UTF-8
167 Программа openssl для работы с сертификатами и разделяемые библиотеки,
168 которые реализуют множетсво криптографических алгоритмов, включая DES,
169 RC4, RSA и SSL. Включает библиотеки и хедеры для разработки приложений
170 с использованием SSL.
171
172 %description devel -l uk.UTF-8
173 Програма openssl для роботи з сертифікатами та бібліотеки спільного
174 користування, що реалізують велику кількість криптографічних
175 алгоритмів, включаючи DES, RC4, RSA та SSL. Містить бібліотеки та
176 хедери для розробки програм з використанням SSL.
177
178 %package static
179 Summary:        Static OpenSSL libraries
180 Summary(pl.UTF-8):      Statyczne wersje bibliotek z OpenSSL
181 Summary(pt_BR.UTF-8):   Bibliotecas estáticas para desenvolvimento com openssl
182 Summary(ru.UTF-8):      Статические библиотеки разработчика для OpenSSL
183 Summary(uk.UTF-8):      Статичні бібліотеки програміста для OpenSSL
184 Group:          Development/Libraries
185 Requires:       %{name}-devel = %{version}-%{release}
186
187 %description static
188 Static OpenSSL Toolkit libraries.
189
190 %description static -l pl.UTF-8
191 Statyczne wersje bibliotek z OpenSSL.
192
193 %description static -l pt_BR.UTF-8
194 Bibliotecas estáticas para desenvolvimento com openssl.
195
196 %description static -l ru.UTF-8
197 Программа openssl для работы с сертификатами и разделяемые библиотеки,
198 которые реализуют множетсво криптографических алгоритмов, включая DES,
199 RC4, RSA и SSL. Включает статические библиотеки для разработки
200 приложений с использованием OpenSSL.
201
202 %description static -l uk.UTF-8
203 Програма openssl для роботи з сертифікатами та бібліотеки спільного
204 користування, що реалізують велику кількість криптографічних
205 алгоритмів, включаючи DES, RC4, RSA та SSL. Містить статичні
206 бібліотеки для розробки програм з використанням SSL.
207
208 %prep
209 %setup -q
210 %patch0 -p1
211 %patch1 -p1
212 %patch2 -p1
213 %patch3 -p1
214 %patch4 -p1
215 %patch5 -p1
216
217 # fails with enable-sctp as of 1.1.1
218 %{__rm} test/recipes/80-test_ssl_new.t
219
220 %build
221 touch Makefile.*
222
223 PERL="%{__perl}" \
224 %{__perl} ./Configure \
225         --prefix=%{_prefix} \
226         --openssldir=%{_sysconfdir}/%{name} \
227         --libdir=%{_lib} \
228         -Wa,--noexecstack \
229         shared \
230         threads \
231         %{?with_sslv3:enable-ssl3}%{!?with_sslv3:no-ssl3} \
232         %{!?with_zlib:no-}zlib \
233         enable-cms \
234         enable-idea \
235         enable-md2 \
236         enable-mdc2 \
237         enable-rc5 \
238         enable-rfc3779 \
239         enable-sctp \
240         enable-seed \
241         enable-camellia \
242         enable-ktls \
243         enable-fips \
244 %ifarch %{x8664}
245         enable-ec_nistp_64_gcc_128 \
246 %endif
247 %ifarch %{ix86}
248 %ifarch i386
249         386 linux-elf
250 # ^- allow running on 80386 (default code uses bswapl available on i486+)
251 %else
252         linux-elf
253 %endif
254 %endif
255 %ifarch alpha
256         linux-alpha-gcc
257 %endif
258 %ifarch %{x8664}
259         linux-x86_64
260 %endif
261 %ifarch x32
262         linux-x32
263 %endif
264 %ifarch ia64
265         linux-ia64
266 %endif
267 %ifarch ppc
268         linux-ppc
269 %endif
270 %ifarch ppc64
271         linux-ppc64
272 %endif
273 %ifarch sparc
274         linux-sparcv8
275 %endif
276 %ifarch sparcv9
277         linux-sparcv9
278 %endif
279 %ifarch sparc64
280         linux64-sparcv9
281 %endif
282 %ifarch %{arm}
283         linux-armv4
284 %endif
285 %ifarch aarch64
286         linux-aarch64
287 %endif
288
289 v=$(awk -F= '/^VERSION=/{print $2}' Makefile)
290 test "$v" = %{version}
291
292 %{__make} -j1 all %{?with_tests:tests} \
293         CC="%{__cc}" \
294         OPTFLAGS="%{rpmcflags} %{rpmcppflags}" \
295         INSTALLTOP=%{_prefix}
296
297 %install
298 rm -rf $RPM_BUILD_ROOT
299 install -d $RPM_BUILD_ROOT{%{_sysconfdir}/%{name},%{_libdir}/%{name}} \
300         $RPM_BUILD_ROOT{%{_mandir}/{pl/man1,man{1,3,5,7}},%{_datadir}/ssl} \
301         $RPM_BUILD_ROOT%{_pkgconfigdir}
302
303 %{__make} -j1 install \
304         CC="%{__cc}" \
305         DESTDIR=$RPM_BUILD_ROOT
306
307 %{__mv} $RPM_BUILD_ROOT%{_libdir}/lib*.so.* $RPM_BUILD_ROOT/%{_lib}
308 ln -sf /%{_lib}/$(basename $RPM_BUILD_ROOT/%{_lib}/libcrypto.*) $RPM_BUILD_ROOT%{_libdir}/libcrypto.so
309 ln -sf /%{_lib}/$(basename $RPM_BUILD_ROOT/%{_lib}/libssl.*) $RPM_BUILD_ROOT%{_libdir}/libssl.so
310
311 %{__mv} $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/misc/* $RPM_BUILD_ROOT%{_libdir}/%{name}
312 %{__rm} -r $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/misc
313
314 # html version of man pages - not packaged
315 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}/html/man[1357]
316
317 cp -p %{SOURCE2} $RPM_BUILD_ROOT%{_mandir}/pl/man1/openssl.1
318 install -p %{SOURCE3} $RPM_BUILD_ROOT%{_bindir}/ssl-certificate
319 install -p %{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 %triggerpostun -- %{name}-tools < 1.0.0-5
328 # the hashing format has changed in 1.0.0
329 [ ! -x %{_sbindir}/update-ca-certificates ] || %{_sbindir}/update-ca-certificates --fresh || :
330
331 %triggerpostun -- %{name} < 0.9.8i-2
332 # don't do anything on --downgrade
333 if [ $1 -le 1 ]; then
334         exit 0
335 fi
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         rmdir /var/lib/openssl/* 2>/dev/null || :
347         rmdir /var/lib/openssl 2>/dev/null || :
348 fi
349
350 %files
351 %defattr(644,root,root,755)
352 %doc CHANGES.md NEWS.md README.md doc/*.txt
353 %attr(755,root,root) /%{_lib}/libcrypto.so.*
354 %attr(755,root,root) /%{_lib}/libssl.so.*
355 %dir /%{_lib}/engines-3
356 %attr(755,root,root) /%{_lib}/engines-3/*.so
357 %dir /%{_lib}/ossl-modules
358 %attr(755,root,root) /%{_lib}/ossl-modules/fips.so
359 %attr(755,root,root) /%{_lib}/ossl-modules/legacy.so
360 %dir %{_sysconfdir}/%{name}
361 %dir %{_sysconfdir}/%{name}/certs
362 %dir %attr(700,root,root) %{_sysconfdir}/%{name}/private
363 %dir %{_datadir}/ssl
364
365 %files tools
366 %defattr(644,root,root,755)
367 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/ct_log_list.cnf
368 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/fipsmodule.cnf
369 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/openssl.cnf
370 %attr(755,root,root) %{_bindir}/c_rehash.sh
371 %attr(755,root,root) %{_bindir}/openssl
372 %attr(754,root,root) %{_bindir}/ssl-certificate
373 %{_mandir}/man1/asn1parse.1*
374 %{_mandir}/man1/ca.1*
375 %{_mandir}/man1/ciphers.1*
376 %{_mandir}/man1/cms.1*
377 %{_mandir}/man1/crl.1*
378 %{_mandir}/man1/crl2pkcs7.1*
379 %{_mandir}/man1/dgst.1*
380 %{_mandir}/man1/dhparam.1*
381 %{_mandir}/man1/dsa.1*
382 %{_mandir}/man1/dsaparam.1*
383 %{_mandir}/man1/ec.1*
384 %{_mandir}/man1/ecparam.1*
385 %{_mandir}/man1/enc.1*
386 %{_mandir}/man1/engine.1*
387 %{_mandir}/man1/errstr.1*
388 %{_mandir}/man1/gendsa.1*
389 %{_mandir}/man1/genpkey.1*
390 %{_mandir}/man1/genrsa.1*
391 %{_mandir}/man1/kdf.1*
392 %{_mandir}/man1/mac.1*
393 %{_mandir}/man1/nseq.1*
394 %{_mandir}/man1/ocsp.1*
395 %{_mandir}/man1/openssl.1*
396 %{_mandir}/man1/openssl-*.1*
397 %{_mandir}/man1/passwd.1*
398 %{_mandir}/man1/pkcs12.1*
399 %{_mandir}/man1/pkcs7.1*
400 %{_mandir}/man1/pkcs8.1*
401 %{_mandir}/man1/pkey.1*
402 %{_mandir}/man1/pkeyparam.1*
403 %{_mandir}/man1/pkeyutl.1*
404 %{_mandir}/man1/prime.1*
405 %{_mandir}/man1/rand.1*
406 %{_mandir}/man1/rehash.1*
407 %{_mandir}/man1/req.1*
408 %{_mandir}/man1/rsa.1*
409 %{_mandir}/man1/rsautl.1*
410 %{_mandir}/man1/s_client.1*
411 %{_mandir}/man1/sess_id.1*
412 %{_mandir}/man1/smime.1*
413 %{_mandir}/man1/speed.1*
414 %{_mandir}/man1/spkac.1*
415 %{_mandir}/man1/srp.1*
416 %{_mandir}/man1/s_server.1*
417 %{_mandir}/man1/s_time.1*
418 %{_mandir}/man1/storeutl.1*
419 %{_mandir}/man1/ts.1*
420 %{_mandir}/man1/verify.1*
421 %{_mandir}/man1/version.1*
422 %{_mandir}/man1/x509.1*
423 %{_mandir}/man5/*.5*
424 %lang(pl) %{_mandir}/pl/man1/openssl.1*
425
426 %files tools-perl
427 %defattr(644,root,root,755)
428 %attr(755,root,root) %{_bindir}/c_rehash
429 %dir %{_libdir}/%{name}
430 %attr(755,root,root) %{_libdir}/%{name}/CA.pl
431 %attr(755,root,root) %{_libdir}/%{name}/tsget
432 %attr(755,root,root) %{_libdir}/%{name}/tsget.pl
433 %{_mandir}/man1/CA.pl.1*
434 %{_mandir}/man1/c_rehash.1*
435 %{_mandir}/man1/tsget.1*
436
437 %files devel
438 %defattr(644,root,root,755)
439 %attr(755,root,root) %{_libdir}/libcrypto.so
440 %attr(755,root,root) %{_libdir}/libssl.so
441 %{_includedir}/%{name}
442 %{_pkgconfigdir}/libcrypto.pc
443 %{_pkgconfigdir}/libssl.pc
444 %{_pkgconfigdir}/openssl.pc
445 %{_mandir}/man3/*.3*
446 %{_mandir}/man7/*.7*
447
448 %files static
449 %defattr(644,root,root,755)
450 %{_libdir}/libcrypto.a
451 %{_libdir}/libssl.a
This page took 0.069215 seconds and 4 git commands to generate.