-#
+# TODO:
+# - get rid of gcc_4_2 patch and header files crapolla
+
# Conditional build:
+%bcond_without tests
%bcond_with purify # Compile openssl with \-DPURIFY, useful when one wants to
# use valgrind debugger against openssl-linked programs
#
%include /usr/lib/rpm/macros.perl
Summary: OpenSSL Toolkit libraries for the "Secure Sockets Layer" (SSL v2/v3)
-Summary(de.UTF-8): Secure Sockets Layer (SSL)-Kommunikationslibrary
-Summary(es.UTF-8): Biblioteca C que suministra algoritmos y protocolos criptográficos
-Summary(fr.UTF-8): Utilitaires de communication SSL (Secure Sockets Layer)
-Summary(pl.UTF-8): Biblioteki OpenSSL (SSL v2/v3)
-Summary(pt_BR.UTF-8): Uma biblioteca C que fornece vários algoritmos e protocolos criptográficos
-Summary(ru.UTF-8): Библиотеки и утилиты для соединений через Secure Sockets Layer
-Summary(uk.UTF-8): Бібліотеки та утиліти для з'єднань через Secure Sockets Layer
+Summary(de.UTF-8): Secure Sockets Layer (SSL)-Kommunikationslibrary
+Summary(es.UTF-8): Biblioteca C que suministra algoritmos y protocolos criptográficos
+Summary(fr.UTF-8): Utilitaires de communication SSL (Secure Sockets Layer)
+Summary(pl.UTF-8): Biblioteki OpenSSL (SSL v2/v3)
+Summary(pt_BR.UTF-8): Uma biblioteca C que fornece vários algoritmos e protocolos criptográficos
+Summary(ru.UTF-8): Библиотеки и утилиты для соединений через Secure Sockets Layer
+Summary(uk.UTF-8): Бібліотеки та утиліти для з'єднань через Secure Sockets Layer
Name: openssl
-Version: 0.9.8d
-Release: 2
+Version: 0.9.8e
+Release: 5
License: Apache-style License
Group: Libraries
Source0: ftp://ftp.openssl.org/source/%{name}-%{version}.tar.gz
-# Source0-md5: 8ed1853538e1d05a1f5ada61ebf8bffa
+# Source0-md5: 3a7ff24f6ea5cd711984722ad654b927
Source1: %{name}-ca-bundle.crt
Source2: %{name}.1.pl
Source3: %{name}-ssl-certificate.sh
Patch4: %{name}-md5-sparcv9.patch
Patch5: %{name}-libvar.patch
Patch6: %{name}-gcc_4_2.patch
+Patch7: %{name}-CVE-2007-3108.patch
URL: http://www.openssl.org/
+BuildRequires: bc
BuildRequires: perl-devel >= 1:5.6.1
BuildRequires: rpm-perlprov >= 4.1-13
BuildRequires: rpmbuild(macros) >= 1.213
%package tools
Summary: OpenSSL command line tool and utilities
-Summary(pl.UTF-8): Zestaw narzędzi i skryptów
+Summary(pl.UTF-8): Zestaw narzędzi i skryptów
Group: Applications/Communications
Requires: %{name} = %{version}-%{release}
%package tools-perl
Summary: OpenSSL utilities written in Perl
-Summary(pl.UTF-8): Narzędzia OpenSSL napisane w perlu
+Summary(pl.UTF-8): Narzędzia OpenSSL napisane w perlu
Group: Applications/Communications
Requires: %{name} = %{version}-%{release}
%package devel
Summary: Development part of OpenSSL Toolkit libraries
-Summary(de.UTF-8): Secure Sockets Layer Kommunikationslibrary: statische libraries+header
-Summary(es.UTF-8): Bibliotecas y archivos de inclusión para desarrollo OpenSSL
-Summary(fr.UTF-8): Librairies statiques, headers et utilitaires pour communication SSL
-Summary(pl.UTF-8): Część bibiloteki OpenSSL przeznaczona dla programistów
-Summary(pt_BR.UTF-8): Bibliotecas e arquivos de inclusão para desenvolvimento OpenSSL
-Summary(ru.UTF-8): Библиотеки, хедеры и утилиты для Secure Sockets Layer
-Summary(uk.UTF-8): Бібліотеки, хедери та утиліти для Secure Sockets Layer
+Summary(de.UTF-8): Secure Sockets Layer Kommunikationslibrary: statische libraries+header
+Summary(es.UTF-8): Bibliotecas y archivos de inclusión para desarrollo OpenSSL
+Summary(fr.UTF-8): Librairies statiques, headers et utilitaires pour communication SSL
+Summary(pl.UTF-8): Część bibiloteki OpenSSL przeznaczona dla programistów
+Summary(pt_BR.UTF-8): Bibliotecas e arquivos de inclusão para desenvolvimento OpenSSL
+Summary(ru.UTF-8): Библиотеки, хедеры и утилиты для Secure Sockets Layer
+Summary(uk.UTF-8): Бібліотеки, хедери та утиліти для Secure Sockets Layer
Group: Development/Libraries
Requires: %{name} = %{version}-%{release}
Obsoletes: libopenssl0-devel
%package static
Summary: Static OpenSSL libraries
-Summary(pl.UTF-8): Statyczne wersje bibliotek z OpenSSL
-Summary(pt_BR.UTF-8): Bibliotecas estáticas para desenvolvimento com openssl
-Summary(ru.UTF-8): Статические библиотеки разработчика для OpenSSL
-Summary(uk.UTF-8): Статичні бібліотеки програміста для OpenSSL
+Summary(pl.UTF-8): Statyczne wersje bibliotek z OpenSSL
+Summary(pt_BR.UTF-8): Bibliotecas estáticas para desenvolvimento com openssl
+Summary(ru.UTF-8): Статические библиотеки разработчика для OpenSSL
+Summary(uk.UTF-8): Статичні бібліотеки програміста для OpenSSL
Group: Development/Libraries
Requires: %{name}-devel = %{version}-%{release}
%patch3 -p1
%patch4 -p1
%patch5 -p1
+# XXX: gcc 4.2 hack
+cp crypto/asn1/asn1.h crypto/asn1/asn1.h.X
+cp crypto/ocsp/ocsp.h crypto/ocsp/ocsp.h.X
+cp crypto/pem/pem.h crypto/pem/pem.h.X
%patch6 -p1
+%patch7 -p1
%build
%{__perl} -pi -e 's#%{_prefix}/local/bin/perl#%{__perl}#g' \
linux64-sparcv9
%endif
-%{__make} -j1 \
- CC="%{__cc}" \
- INSTALLTOP=%{_prefix}
-
-%{__make} -j1 rehash \
+%{__make} -j1 all rehash %{?with_tests:tests} \
CC="%{__cc}" \
INSTALLTOP=%{_prefix}
mv -f $RPM_BUILD_ROOT%{_var}/lib/%{name}/misc/* $RPM_BUILD_ROOT%{_libdir}/%{name}
rm -rf $RPM_BUILD_ROOT%{_var}/lib/%{name}/misc
-mv -f $RPM_BUILD_ROOT%{_bindir}/c_rehash $RPM_BUILD_ROOT%{_libdir}/%{name}
-
find $RPM_BUILD_ROOT%{_mandir} -type f | xargs rm -f
install doc/apps/*.1 $RPM_BUILD_ROOT%{_mandir}/man1
install doc/apps/*.5 $RPM_BUILD_ROOT%{_mandir}/man5
rm $RPM_BUILD_ROOT%{_mandir}/man5/x509v3_config.5
echo ".so openssl_x509v3_config.5" > $RPM_BUILD_ROOT%{_mandir}/man5/x509v3_config.5
+rm $RPM_BUILD_ROOT%{_mandir}/man5/config.5
+echo ".so openssl_config.5" > $RPM_BUILD_ROOT%{_mandir}/man5/config.5
rm $RPM_BUILD_ROOT%{_mandir}/man7/Modes_of_DES.7
echo ".so openssl_des_modes.7" > $RPM_BUILD_ROOT%{_mandir}/man7/Modes_of_DES.7
+# XXX: gcc 4.2 hack
+install crypto/asn1/asn1.h.X $RPM_BUILD_ROOT%{_includedir}/%{name}/asn1.h
+install crypto/ocsp/ocsp.h.X $RPM_BUILD_ROOT%{_includedir}/%{name}/ocsp.h
+install crypto/pem/pem.h.X $RPM_BUILD_ROOT%{_includedir}/%{name}/pem.h
+
%clean
rm -rf $RPM_BUILD_ROOT
%files tools-perl
%defattr(644,root,root,755)
+%attr(755,root,root) %{_bindir}/c_rehash
%attr(755,root,root) %{_libdir}/%{name}/CA.pl
-%attr(755,root,root) %{_libdir}/%{name}/c_rehash
%{_mandir}/man1/openssl_CA.pl.1*
%files devel