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