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