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