Add patch to fix build with new perl, minor spec cleanups

This commit is contained in:
Andrey Bondrov 2014-06-06 19:57:28 +11:00
parent aa704b0e38
commit 31939bea46
2 changed files with 31 additions and 23 deletions

View file

@ -0,0 +1,19 @@
--- openssl-1.0.1c/util/perlpath.pl~ 1999-03-10 20:57:05.000000000 +0100
+++ openssl-1.0.1c/util/perlpath.pl 2012-12-28 15:31:20.357657353 +0100
@@ -1,13 +1,13 @@
-#!/usr/local/bin/perl
+#!/usr/bin/perl
#
# modify the '#!/usr/local/bin/perl'
# line in all scripts that rely on perl.
#
-require "find.pl";
+use File::Find;
$#ARGV == 0 || print STDERR "usage: perlpath newpath (eg /usr/bin)\n";
-&find(".");
+find(\&wanted, ".");
sub wanted
{

View file

@ -1,7 +1,7 @@
%define maj 1.0.0 %define maj 1.0.0
%define engines_name %mklibname openssl-engines %{maj} %define engines_name %mklibname openssl-engines %{maj}
%define libname %mklibname openssl %{maj} %define libname %mklibname openssl %{maj}
%define develname %mklibname openssl -d %define devname %mklibname openssl -d
%define staticname %mklibname openssl -s -d %define staticname %mklibname openssl -s -d
%define conflict2 %mklibname openssl 0.9.8 %define conflict2 %mklibname openssl 0.9.8
@ -25,6 +25,7 @@ Source3: make-dummy-cert
Source4: openssl-thread-test.c Source4: openssl-thread-test.c
# (gb) 0.9.7b-4mdk: Handle RPM_OPT_FLAGS in Configure # (gb) 0.9.7b-4mdk: Handle RPM_OPT_FLAGS in Configure
Patch2: openssl-optflags.diff Patch2: openssl-optflags.diff
Patch3: openssl-1.0.1c-fix-perlpath.pl
# (oe) support Brazilian Government OTHERNAME X509v3 field (#14158) # (oe) support Brazilian Government OTHERNAME X509v3 field (#14158)
# http://www.iti.gov.br/resolucoes/RESOLU__O_13_DE_26_04_2002.PDF # http://www.iti.gov.br/resolucoes/RESOLU__O_13_DE_26_04_2002.PDF
Patch6: openssl-0.9.8-beta6-icpbrasil.diff Patch6: openssl-0.9.8-beta6-icpbrasil.diff
@ -40,15 +41,14 @@ Patch301: openssl-1.0.0-arm.patch
Patch302: openssl-1.0.0-enginesdir.patch Patch302: openssl-1.0.0-enginesdir.patch
Patch303: openssl-0.9.8a-no-rpath.patch Patch303: openssl-0.9.8a-no-rpath.patch
Patch304: openssl-1.0.1-test-use-localhost.diff Patch304: openssl-1.0.1-test-use-localhost.diff
BuildRequires: bc
%{?_with_krb5:BuildRequires: krb5-devel}
BuildRequires: sctp-devel
BuildRequires: pkgconfig(zlib)
Requires: %{engines_name} = %{EVRD} Requires: %{engines_name} = %{EVRD}
Requires: perl-base Requires: perl-base
Requires: rootcerts Requires: rootcerts
Provides: /usr/bin/openssl Provides: /usr/bin/openssl
%{?_with_krb5:BuildRequires: krb5-devel}
BuildRequires: pkgconfig(zlib)
# (tv) for test suite:
BuildRequires: bc
BuildRequires: sctp-devel
%description %description
The openssl certificate management tool and the shared libraries that provide The openssl certificate management tool and the shared libraries that provide
@ -71,7 +71,7 @@ Group: System/Libraries
The libraries files are needed for various cryptographic algorithms The libraries files are needed for various cryptographic algorithms
and protocols, including DES, RC4, RSA and SSL. and protocols, including DES, RC4, RSA and SSL.
%package -n %{develname} %package -n %{devname}
Summary: Secure Sockets Layer communications libs & headers & utils Summary: Secure Sockets Layer communications libs & headers & utils
Group: Development/Other Group: Development/Other
Requires: %{libname} = %{EVRD} Requires: %{libname} = %{EVRD}
@ -79,7 +79,7 @@ Provides: libopenssl-devel
Provides: openssl-devel = %{EVRD} Provides: openssl-devel = %{EVRD}
Provides: %{name}-devel = %{EVRD} Provides: %{name}-devel = %{EVRD}
%description -n %{develname} %description -n %{devname}
The libraries and include files needed to compile apps with support The libraries and include files needed to compile apps with support
for various cryptographic algorithms and protocols, including DES, RC4, RSA for various cryptographic algorithms and protocols, including DES, RC4, RSA
and SSL. and SSL.
@ -87,7 +87,7 @@ and SSL.
%package -n %{staticname} %package -n %{staticname}
Summary: Secure Sockets Layer communications static libs Summary: Secure Sockets Layer communications static libs
Group: Development/Other Group: Development/Other
Requires: %{develname} = %{EVRD} Requires: %{devname} = %{EVRD}
Provides: libopenssl-static-devel Provides: libopenssl-static-devel
Provides: openssl-static-devel = %{EVRD} Provides: openssl-static-devel = %{EVRD}
Provides: %{name}-static-devel = %{EVRD} Provides: %{name}-static-devel = %{EVRD}
@ -99,6 +99,7 @@ cryptographic algorithms and protocols, including DES, RC4, RSA and SSL.
%prep %prep
%setup -q %setup -q
%patch2 -p0 -b .optflags %patch2 -p0 -b .optflags
%patch3 -p1 -b .perl
%patch6 -p0 -b .icpbrasil %patch6 -p0 -b .icpbrasil
%patch7 -p1 -b .defaults %patch7 -p1 -b .defaults
%{?_with_krb5:%patch8 -p1 -b .krb5} %{?_with_krb5:%patch8 -p1 -b .krb5}
@ -127,24 +128,12 @@ cp %{SOURCE4} openssl-thread-test.c
# Figure out which flags we want to use. # Figure out which flags we want to use.
# default # default
sslarch=%{_os}-%{_arch} sslarch=%{_os}-%{_arch}
%ifarch %ix86 %ifarch %{ix86}
sslarch=linux-elf sslarch=linux-elf
if ! echo %{_target} | grep -q i[56]86 ; then if ! echo %{_target} | grep -q i[56]86 ; then
sslflags="no-asm" sslflags="no-asm"
fi fi
%endif %endif
%ifarch sparcv9
sslarch=linux-sparcv9
%endif
%ifarch alpha
sslarch=linux-alpha-gcc
%endif
%ifarch s390
sslarch="linux-generic32 -DB_ENDIAN -DNO_ASM"
%endif
%ifarch s390x
sslarch="linux-generic64 -DB_ENDIAN -DNO_ASM"
%endif
%ifarch %{arm} %ifarch %{arm}
sslarch=linux-generic32 sslarch=linux-generic32
%endif %endif
@ -295,7 +284,7 @@ perl -pi -e "s|\./demoCA|%{_sysconfdir}/pki/tls|g" %{buildroot}%{_sysconfdir}/pk
%attr(0755,root,root) %dir %{_libdir}/openssl-%{version}/engines %attr(0755,root,root) %dir %{_libdir}/openssl-%{version}/engines
%attr(0755,root,root) %{_libdir}/openssl-%{version}/engines/*.so %attr(0755,root,root) %{_libdir}/openssl-%{version}/engines/*.so
%files -n %{develname} %files -n %{devname}
%doc CHANGES doc/* devel-doc-info/README* %doc CHANGES doc/* devel-doc-info/README*
%attr(0755,root,root) %dir %{_includedir}/openssl %attr(0755,root,root) %dir %{_includedir}/openssl
%{multiarch_includedir}/openssl/opensslconf.h %{multiarch_includedir}/openssl/opensslconf.h