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