- CVE reference for 0.9.8j
[packages/openssl.git] / openssl.spec
CommitLineData
622bc451 1#
2403ba81 2# Conditional build:
d76d59fa
JB
3%bcond_without tests # don't perform "make tests"
4%bcond_with purify # Compile openssl with \-DPURIFY, useful when one wants to
2403ba81 5 # use valgrind debugger against openssl-linked programs
623d135e 6#
779bb536 7%include /usr/lib/rpm/macros.perl
ce2ff00e 8Summary: OpenSSL Toolkit libraries for the "Secure Sockets Layer" (SSL v2/v3)
e6bfca5b
ER
9Summary(de.UTF-8): Secure Sockets Layer (SSL)-Kommunikationslibrary
10Summary(es.UTF-8): Biblioteca C que suministra algoritmos y protocolos criptográficos
11Summary(fr.UTF-8): Utilitaires de communication SSL (Secure Sockets Layer)
12Summary(pl.UTF-8): Biblioteki OpenSSL (SSL v2/v3)
13Summary(pt_BR.UTF-8): Uma biblioteca C que fornece vários algoritmos e protocolos criptográficos
14Summary(ru.UTF-8): Библиотеки и утилиты для соединений через Secure Sockets Layer
15Summary(uk.UTF-8): Бібліотеки та утиліти для з'єднань через Secure Sockets Layer
56470945 16Name: openssl
fef2f2d9 17Version: 0.9.8j
18Release: 1
d7fc4164 19License: Apache-like
56470945 20Group: Libraries
264f738a 21Source0: ftp://ftp.openssl.org/source/%{name}-%{version}.tar.gz
fef2f2d9 22# Source0-md5: a5cb5f6c3d11affb387ecf7a997cac0c
62382817 23Source2: %{name}.1.pl
ea55f735 24Source3: %{name}-ssl-certificate.sh
d231add3 25Source4: %{name}-c_rehash.sh
0d1c50df 26Patch0: %{name}-alpha-ccc.patch
e106ff02
TO
27Patch1: %{name}-optflags.patch
28Patch2: %{name}-globalCA.diff
c0cc4a35 29Patch3: %{name}-include.patch
d76d59fa 30Patch4: %{name}-libvar.patch
1c008d35
JB
31Patch5: %{name}-man-namespace.patch
32Patch6: %{name}-asflag.patch
94e64af2 33Patch7: %{name}-ca-certificates.patch
022e6851 34Patch8: %{name}-fips_install.patch
bd7f0ef1 35URL: http://www.openssl.org/
741aa025 36BuildRequires: bc
9edbb66f 37BuildRequires: perl-devel >= 1:5.6.1
38BuildRequires: rpm-perlprov >= 4.1-13
20bc1dd7 39BuildRequires: rpmbuild(macros) >= 1.213
31b28434 40BuildRequires: sed >= 4.0
04a5ad1f
AF
41Obsoletes: SSLeay
42Obsoletes: SSLeay-devel
43Obsoletes: SSLeay-perl
a280467c 44Obsoletes: libopenssl0
94e64af2 45Requires: ca-certificates >= 20080809-4
8d44b43f 46Requires: rpm-whiteout >= 1.7
0f86ef4a 47BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
21ac4f86
AF
48
49%description
50The OpenSSL Project is a collaborative effort to develop a robust,
b39fed70 51commercial-grade, full-featured, and Open Source toolkit implementing
52the Secure Sockets Layer (SSL v2/v3) and Transport Layer Security (TLS
53v1) protocols with full-strength cryptography world-wide. The project
54is managed by a worldwide community of volunteers that use the
55Internet to communicate, plan, and develop the OpenSSL tookit and its
56related documentation.
56470945 57
b39fed70 58OpenSSL is based on the excellent SSLeay library developed by Eric A.
59Young and Tim J. Hudson. The OpenSSL toolkit is licensed under an
60Apache-style licence, which basically means that you are free to get
61and use it for commercial and non-commercial purposes subject to some
62simple license conditions.
21ac4f86 63
fc19f542 64This package contains shared libraries only, install openssl-tools if
65you want to use openssl cmdline tool.
ce2ff00e 66
30e72515
JR
67%description -l de.UTF-8
68Openssl enthält das OpenSSL Zertifikatsmanagementtool und shared
69libraries, die verschiedene Verschlüsselungs- und
70Entschlüsselungsalgorithmen und -protokolle, wie DES, RC4, RSA und SSL
71zur Verfügung stellen.
453a8bf3 72
30e72515
JR
73%description -l es.UTF-8
74Biblioteca C que suministra algoritmos y protocolos criptográficos.
2fad19b0 75
30e72515 76%description -l fr.UTF-8
56470945 77OpenSSL est un outiil de gestion des certificats et les librairies
78partagees qui fournit plusieurs protocoles et algorithmes de
79codage/decodage, incluant DES, RC4, RSA et SSL.
2fad19b0 80
30e72515
JR
81%description -l pl.UTF-8
82Implementacja protokołów kryptograficznych Secure Socket Layer (SSL)
78b5e413
TP
83v2/v3 oraz Transport Layer Security (TLS v1).
84
30e72515
JR
85%description -l pt_BR.UTF-8
86Uma biblioteca C que fornece vários algoritmos e protocolos
87criptográficos, incluindo DES, RC4, RSA e SSL. Inclui bibliotecas
88compartilhadas e utilitários.
453a8bf3 89
30e72515
JR
90%description -l ru.UTF-8
91Программа openssl для работы с сертификатами и разделяемые библиотеки,
92которые реализуют множетсво криптографических алгоритмов, включая DES,
93RC4, RSA и SSL.
453a8bf3 94
30e72515
JR
95%description -l uk.UTF-8
96Програма openssl для роботи з сертифікатами та бібліотеки спільного
97користування, що реалізують велику кількість криптографічних
98алгоритмів, включаючи DES, RC4, RSA та SSL.
453a8bf3 99
ce2ff00e 100%package tools
101Summary: OpenSSL command line tool and utilities
e6bfca5b 102Summary(pl.UTF-8): Zestaw narzędzi i skryptów
fc19f542 103Group: Applications/Communications
82859ae1 104Requires: %{name} = %{version}-%{release}
ce2ff00e 105
106%description tools
107The OpenSSL Toolkit cmdline tool openssl and utility scripts.
108
30e72515
JR
109%description tools -l pl.UTF-8
110Zestaw narzędzi i skryptów wywoływanych z linii poleceń.
78b5e413 111
ce2ff00e 112%package tools-perl
113Summary: OpenSSL utilities written in Perl
e6bfca5b 114Summary(pl.UTF-8): Narzędzia OpenSSL napisane w perlu
fc19f542 115Group: Applications/Communications
82859ae1 116Requires: %{name} = %{version}-%{release}
2b2149ff 117
ce2ff00e 118%description tools-perl
d86c2c8b 119OpenSSL Toolkit tools written in Perl.
2b2149ff 120
30e72515
JR
121%description tools-perl -l pl.UTF-8
122Narzędzia OpenSSL napisane w perlu.
78b5e413 123
faddd309 124%package devel
ce2ff00e 125Summary: Development part of OpenSSL Toolkit libraries
e6bfca5b
ER
126Summary(de.UTF-8): Secure Sockets Layer Kommunikationslibrary: statische libraries+header
127Summary(es.UTF-8): Bibliotecas y archivos de inclusión para desarrollo OpenSSL
128Summary(fr.UTF-8): Librairies statiques, headers et utilitaires pour communication SSL
129Summary(pl.UTF-8): Część bibiloteki OpenSSL przeznaczona dla programistów
130Summary(pt_BR.UTF-8): Bibliotecas e arquivos de inclusão para desenvolvimento OpenSSL
131Summary(ru.UTF-8): Библиотеки, хедеры и утилиты для Secure Sockets Layer
132Summary(uk.UTF-8): Бібліотеки, хедери та утиліти для Secure Sockets Layer
9c05bcac 133Group: Development/Libraries
82859ae1 134Requires: %{name} = %{version}-%{release}
a280467c 135Obsoletes: libopenssl0-devel
faddd309
AF
136
137%description devel
138Development part of OpenSSL library.
139
30e72515
JR
140%description devel -l es.UTF-8
141Bibliotecas y archivos de inclusión para desarrollo OpenSSL
453a8bf3 142
30e72515
JR
143%description devel -l pl.UTF-8
144Część biblioteki OpenSSL przeznaczona dla programistów.
faddd309 145
30e72515
JR
146%description devel -l pt_BR.UTF-8
147Uma biblioteca C que fornece vários algoritmos e protocolos
148criptográficos, incluindo DES, RC4, RSA e SSL. Inclui bibliotecas e
149arquivos de inclusão para desenvolvimento.
453a8bf3 150
30e72515
JR
151%description devel -l ru.UTF-8
152Программа openssl для работы с сертификатами и разделяемые библиотеки,
153которые реализуют множетсво криптографических алгоритмов, включая DES,
154RC4, RSA и SSL. Включает библиотеки и хедеры для разработки приложений
155с использованием SSL.
453a8bf3 156
30e72515
JR
157%description devel -l uk.UTF-8
158Програма openssl для роботи з сертифікатами та бібліотеки спільного
159користування, що реалізують велику кількість криптографічних
160алгоритмів, включаючи DES, RC4, RSA та SSL. Містить бібліотеки та
161хедери для розробки програм з використанням SSL.
453a8bf3 162
faddd309 163%package static
ce2ff00e 164Summary: Static OpenSSL libraries
e6bfca5b
ER
165Summary(pl.UTF-8): Statyczne wersje bibliotek z OpenSSL
166Summary(pt_BR.UTF-8): Bibliotecas estáticas para desenvolvimento com openssl
167Summary(ru.UTF-8): Статические библиотеки разработчика для OpenSSL
168Summary(uk.UTF-8): Статичні бібліотеки програміста для OpenSSL
9c05bcac 169Group: Development/Libraries
82859ae1 170Requires: %{name}-devel = %{version}-%{release}
faddd309
AF
171
172%description static
ce2ff00e 173Static OpenSSL Toolkit libraries.
faddd309 174
30e72515 175%description static -l pl.UTF-8
ce2ff00e 176Statyczne wersje bibliotek z OpenSSL.
faddd309 177
30e72515
JR
178%description static -l pt_BR.UTF-8
179Bibliotecas estáticas para desenvolvimento com openssl.
453a8bf3 180
30e72515
JR
181%description static -l ru.UTF-8
182Программа openssl для работы с сертификатами и разделяемые библиотеки,
183которые реализуют множетсво криптографических алгоритмов, включая DES,
184RC4, RSA и SSL. Включает статические библиотеки для разработки
185приложений с использованием OpenSSL.
453a8bf3 186
30e72515
JR
187%description static -l uk.UTF-8
188Програма openssl для роботи з сертифікатами та бібліотеки спільного
189користування, що реалізують велику кількість криптографічних
190алгоритмів, включаючи DES, RC4, RSA та SSL. Містить статичні
191бібліотеки для розробки програм з використанням SSL.
453a8bf3 192
21ac4f86 193%prep
264f738a 194%setup -q
0384baf6 195%patch0 -p1
02c02459 196%patch1 -p1
05285465 197%patch2 -p1
9d16a74d 198%patch3 -p1
32c3ac07 199%patch4 -p1
1c008d35
JB
200%patch5 -p1
201%patch6 -p1
94e64af2 202%patch7 -p1
022e6851 203%patch8 -p0
04a32771 204
51e76169 205%{__perl} -pi -e 's#%{_prefix}/local/bin/perl#%{__perl}#g' \
229f14e7 206 `grep -l -r "%{_prefix}/local/bin/perl" *`
0d1c50df 207
d76d59fa 208%build
00466ad3 209touch Makefile.*
04a5ad1f 210
db17f76a 211%{__perl} util/perlpath.pl %{__perl}
04a5ad1f 212
1c008d35 213OPTFLAGS="%{rpmcflags} %{?with_purify:-DPURIFY}" \
9fc51b3c 214./Configure \
c949865a 215%if "%{pld_release}" == "ti"
216 --openssldir=%{_var}/lib/%{name} \
217%else
0fdaa4e3 218 --openssldir=%{_sysconfdir}/%{name} \
c949865a 219%endif
5d5181f1 220 --lib=%{_lib} \
9fc51b3c
JB
221 shared threads \
222 enable-mdc2 enable-rc5 \
51e76169 223%ifarch %{ix86}
04a32771 224%ifarch i386
9fc51b3c 225 386 linux-elf
915551a7 226# ^- allow running on 80386 (default code uses bswapl available on i486+)
51e76169 227%else
9fc51b3c 228 linux-elf
75c27cbe 229%endif
51e76169 230%endif
dfc15f38 231%ifarch alpha
9fc51b3c 232 linux-alpha+bwx-gcc
dfc15f38 233%endif
20bc1dd7 234%ifarch %{x8664}
9fc51b3c 235 linux-x86_64
e08c1652 236%endif
dfc15f38 237%ifarch ia64
9fc51b3c 238 linux-ia64
dfc15f38 239%endif
75c27cbe 240%ifarch ppc
9fc51b3c
JB
241 linux-ppc
242%endif
243%ifarch ppc64
244 linux-ppc64
75c27cbe 245%endif
05285465 246%ifarch sparc
9fc51b3c 247 linux-sparcv8
0384baf6 248%endif
36db42b5 249%ifarch sparcv9
9fc51b3c 250 linux-sparcv9
36db42b5
PS
251%endif
252%ifarch sparc64
9fc51b3c 253 linux64-sparcv9
36db42b5 254%endif
05285465 255
94d58138 256%{__make} -j1 all rehash %{?with_tests:tests} \
b84cddc8 257 CC="%{__cc}" \
1c008d35 258 ASFLAG='$(CFLAG) -Wa,--noexecstack' \
b84cddc8 259 INSTALLTOP=%{_prefix}
ce2ff00e 260
1c008d35
JB
261# Rename POD sources of man pages. "openssl_" prefix is added to each
262# manpage to avoid potential conflicts with other packages.
ce2ff00e 263
7f10be72 264for dir in doc/{apps,ssl,crypto}; do
ce2ff00e 265 cd $dir || exit 1;
db17f76a 266 %{__perl} -pi -e 's/(\W)((?<!openssl_)\w+)(\(\d\))/$1openssl_$2$3/g; s/openssl_openssl/openssl/g;' *.pod;
78b5e413 267
7f10be72 268 for pod in !(openssl*).pod; do
78b5e413 269 mv -f $pod openssl_$pod;
ce2ff00e 270 done
7f10be72 271 cd ../..
ce2ff00e 272done
273
21ac4f86 274%install
04a5ad1f 275rm -rf $RPM_BUILD_ROOT
ce2ff00e 276install -d $RPM_BUILD_ROOT{%{_sysconfdir}/%{name},%{_libdir}/%{name}} \
4b251642
JK
277 $RPM_BUILD_ROOT{%{_mandir}/{pl/man1,man{1,3,5,7}},%{_datadir}/ssl} \
278 $RPM_BUILD_ROOT%{_pkgconfigdir}
faddd309 279
fe57b0ac 280%{__make} install \
faddd309 281 INSTALLTOP=%{_prefix} \
027a4889
TO
282 INSTALL_PREFIX=$RPM_BUILD_ROOT \
283 MANDIR=%{_mandir}
04a5ad1f 284
027a4889 285install libcrypto.a libssl.a $RPM_BUILD_ROOT%{_libdir}
78b5e413 286install lib*.so.*.* $RPM_BUILD_ROOT%{_libdir}
77dadeb8
JR
287ln -sf libcrypto.so.*.* $RPM_BUILD_ROOT%{_libdir}/libcrypto.so
288ln -sf libssl.so.*.* $RPM_BUILD_ROOT%{_libdir}/libssl.so
04a5ad1f 289
c949865a 290%if "%{pld_release}" == "ti"
291ln -sf %{_var}/lib/%{name}/%{name}.cnf \
292 $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/openssl.cnf
293ln -sf %{_var}/lib/%{name}/certs \
294 $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/certs
295ln -sf %{_var}/lib/%{name}/private \
296 $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/private
297mv -f $RPM_BUILD_ROOT%{_var}/lib/%{name}/misc/* $RPM_BUILD_ROOT%{_libdir}/%{name}
298rm -rf $RPM_BUILD_ROOT%{_var}/lib/%{name}/misc
299%else
0fdaa4e3
JR
300mv -f $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/misc/* $RPM_BUILD_ROOT%{_libdir}/%{name}
301rm -rf $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/misc
c949865a 302%endif
04a5ad1f 303
1c008d35
JB
304# not installed as individual utilities (see openssl dgst instead)
305%{__rm} $RPM_BUILD_ROOT%{_mandir}/man1/{md2,md4,md5,mdc2,ripemd160,sha,sha1}.1
306
62382817 307install %{SOURCE2} $RPM_BUILD_ROOT%{_mandir}/pl/man1/openssl.1
ea55f735 308install %{SOURCE3} $RPM_BUILD_ROOT%{_bindir}/ssl-certificate
d231add3 309install %{SOURCE4} $RPM_BUILD_ROOT%{_bindir}/c_rehash.sh
9fc51b3c 310
57dc6058
JB
311%clean
312rm -rf $RPM_BUILD_ROOT
61a04a63 313
d86c2c8b 314%post -p /sbin/ldconfig
ce2ff00e 315%postun -p /sbin/ldconfig
04a5ad1f 316
c949865a 317%if "%{pld_release}" == "ti"
318%triggerin -- %{name}-tools < 0.9.8i-2
319if [ -L /var/lib/openssl/openssl.cnf ] ; then
320 echo "Saving old configuration as /var/lib/openssl/openssl.cnf.rpmsave"
321 rm /var/lib/openssl/openssl.cnf
322 mv %{_sysconfdir}/%{name}/openssl.cnf /var/lib/openssl/openssl.cnf.rpmsave 2>/dev/null || :
323fi
324%else
0fdaa4e3
JR
325%triggerpostun -- %{name} < 0.9.8i-2
326if [ -d /var/lib/openssl/certs ] ; then
327 mv /var/lib/openssl/certs/* %{_sysconfdir}/%{name}/certs 2>/dev/null || :
328fi
329if [ -d /var/lib/openssl/private ] ; then
330 mv /var/lib/openssl/private/* %{_sysconfdir}/%{name}/private 2>/dev/null || :
331fi
332if [ -d /var/lib/openssl ] ; then
333 for f in /var/lib/openssl/* ; do
334 [ -f "$f" ] && mv "$f" %{_sysconfdir}/%{name} 2>/dev/null || :
335 done
336fi
c949865a 337%endif
0fdaa4e3 338
21ac4f86 339%files
04a5ad1f 340%defattr(644,root,root,755)
57dc6058
JB
341%doc CHANGES CHANGES.SSLeay LICENSE NEWS README doc/*.txt
342%doc doc/openssl_button.gif doc/openssl_button.html
623d135e
JB
343%attr(755,root,root) %{_libdir}/libcrypto.so.*.*.*
344%attr(755,root,root) %{_libdir}/libssl.so.*.*.*
9fc51b3c
JB
345%dir %{_libdir}/engines
346%attr(755,root,root) %{_libdir}/engines/*.so
c949865a 347%if "%{pld_release}" == "ti"
348%dir %{_var}/lib/%{name}
349%dir %{_var}/lib/%{name}/certs
350%dir %{_var}/lib/%{name}/private
fa6b6d15 351%dir %{_sysconfdir}/%{name}
352%attr(755,root,root) %{_sysconfdir}/%{name}/certs
353%attr(755,root,root) %{_sysconfdir}/%{name}/private
354%else
355%dir %{_sysconfdir}/%{name}
356%dir %{_sysconfdir}/%{name}/certs
357%dir %{_sysconfdir}/%{name}/private
c949865a 358%endif
b87437db 359%dir %{_datadir}/ssl
ce2ff00e 360
361%files tools
362%defattr(644,root,root,755)
c949865a 363%if "%{pld_release}" == "ti"
364%{_sysconfdir}/%{name}/openssl.cnf
365%config(noreplace) %verify(not md5 mtime size) %{_var}/lib/%{name}/openssl.cnf
366%else
623d135e 367%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/openssl.cnf
c949865a 368%endif
ce2ff00e 369%attr(755,root,root) %{_bindir}/%{name}
d231add3 370%attr(755,root,root) %{_bindir}/c_rehash.sh
ea55f735 371%attr(754,root,root) %{_bindir}/ssl-certificate
17a30265 372
ce2ff00e 373%dir %{_libdir}/%{name}
374%attr(755,root,root) %{_libdir}/%{name}/CA.sh
375%attr(755,root,root) %{_libdir}/%{name}/c_hash
ce2ff00e 376%attr(755,root,root) %{_libdir}/%{name}/c_info
377%attr(755,root,root) %{_libdir}/%{name}/c_issuer
378%attr(755,root,root) %{_libdir}/%{name}/c_name
379
d86c2c8b 380%{_mandir}/man1/openssl.1*
381%{_mandir}/man1/openssl_asn1parse.1*
382%{_mandir}/man1/openssl_ca.1*
383%{_mandir}/man1/openssl_ciphers.1*
384%{_mandir}/man1/openssl_crl.1*
385%{_mandir}/man1/openssl_crl2pkcs7.1*
386%{_mandir}/man1/openssl_dgst.1*
387%{_mandir}/man1/openssl_dhparam.1*
388%{_mandir}/man1/openssl_dsa.1*
389%{_mandir}/man1/openssl_dsaparam.1*
9fc51b3c
JB
390%{_mandir}/man1/openssl_ec.1*
391%{_mandir}/man1/openssl_ecparam.1*
d86c2c8b 392%{_mandir}/man1/openssl_enc.1*
5d088344 393%{_mandir}/man1/openssl_errstr.1*
d86c2c8b 394%{_mandir}/man1/openssl_gendsa.1*
395%{_mandir}/man1/openssl_genrsa.1*
396%{_mandir}/man1/openssl_nseq.1*
027a4889 397%{_mandir}/man1/openssl_ocsp.1*
d86c2c8b 398%{_mandir}/man1/openssl_passwd.1*
399%{_mandir}/man1/openssl_pkcs12.1*
400%{_mandir}/man1/openssl_pkcs7.1*
401%{_mandir}/man1/openssl_pkcs8.1*
402%{_mandir}/man1/openssl_rand.1*
403%{_mandir}/man1/openssl_req.1*
404%{_mandir}/man1/openssl_rsa.1*
57dc6058 405%{_mandir}/man1/openssl_rsautl.1*
d86c2c8b 406%{_mandir}/man1/openssl_s_client.1*
407%{_mandir}/man1/openssl_s_server.1*
c0cc4a35 408%{_mandir}/man1/openssl_s_time.1*
d86c2c8b 409%{_mandir}/man1/openssl_sess_id.1*
410%{_mandir}/man1/openssl_smime.1*
411%{_mandir}/man1/openssl_speed.1*
412%{_mandir}/man1/openssl_spkac.1*
413%{_mandir}/man1/openssl_verify.1*
414%{_mandir}/man1/openssl_version.1*
415%{_mandir}/man1/openssl_x509.1*
1c008d35
JB
416%{_mandir}/man5/openssl_config.5*
417%{_mandir}/man5/openssl_x509v3_config.5*
62382817 418%lang(pl) %{_mandir}/pl/man1/openssl.1*
ce2ff00e 419
420%files tools-perl
421%defattr(644,root,root,755)
62313b5e 422%attr(755,root,root) %{_bindir}/c_rehash
ce2ff00e 423%attr(755,root,root) %{_libdir}/%{name}/CA.pl
d86c2c8b 424%{_mandir}/man1/openssl_CA.pl.1*
faddd309
AF
425
426%files devel
427%defattr(644,root,root,755)
f4434df9
PS
428%attr(755,root,root) %{_libdir}/libcrypto.so
429%attr(755,root,root) %{_libdir}/libssl.so
ce2ff00e 430%{_includedir}/%{name}
9fc51b3c
JB
431%{_pkgconfigdir}/libcrypto.pc
432%{_pkgconfigdir}/libssl.pc
8c362d23 433%{_pkgconfigdir}/openssl.pc
027a4889 434%{_mandir}/man3/openssl*.3*
1c008d35 435%{_mandir}/man7/openssl_des_modes.7*
faddd309
AF
436
437%files static
438%defattr(644,root,root,755)
48e547a4 439%{_libdir}/lib*.a
This page took 0.129188 seconds and 4 git commands to generate.