2019-12-28 17:13:20 +03:00
|
|
|
%define openssl_ver 1.0.2
|
2015-06-12 15:14:29 +10:00
|
|
|
%define major 1.0.0
|
|
|
|
%define engines_name %mklibname openssl-engines %{major}
|
|
|
|
%define libcrypto %mklibname crypto %{major}
|
|
|
|
%define libssl %mklibname ssl %{major}
|
2014-06-06 19:57:28 +11:00
|
|
|
%define devname %mklibname openssl -d
|
2012-02-01 14:54:40 +04:00
|
|
|
%define staticname %mklibname openssl -s -d
|
|
|
|
|
2017-11-09 14:39:01 +10:00
|
|
|
# patchelf 0.9 is buggy so compat libraries are experimental for now
|
|
|
|
%bcond_without compat
|
|
|
|
%define major_compat 10
|
|
|
|
%define libcrypto_compat %mklibname crypto %{major_compat}
|
|
|
|
%define libssl_compat %mklibname ssl %{major_compat}
|
|
|
|
|
2012-02-01 14:54:40 +04:00
|
|
|
%define conflict2 %mklibname openssl 0.9.8
|
|
|
|
|
|
|
|
# Number of threads to spawn when testing some threading fixes.
|
2018-03-31 19:17:02 +03:00
|
|
|
#define thread_test_threads %%{?threads:%%{threads}}%%{!?threads:1}
|
2012-02-01 14:54:40 +04:00
|
|
|
|
|
|
|
%define with_krb5 %{?_with_krb5:1}%{!?_with_krb5:0}
|
|
|
|
|
2018-12-24 23:18:17 +03:00
|
|
|
# This directory is defined in /usr/bin/openssl-config and /etc/rpm/macros.d/openssl.macros
|
|
|
|
# during the build.
|
|
|
|
# The purpose is a system-wide definition of this directory
|
|
|
|
# to guarantee consistency across the whole repository.
|
2018-12-26 06:49:22 +03:00
|
|
|
%define _openssldir %{_sysconfdir}/pki/tls
|
2018-12-23 10:28:27 +03:00
|
|
|
|
2012-02-01 14:54:40 +04:00
|
|
|
Summary: Secure Sockets Layer communications libs & utils
|
|
|
|
Name: openssl
|
2019-12-31 06:40:09 +03:00
|
|
|
Version: %{openssl_ver}u
|
|
|
|
Release: 1
|
2012-02-01 14:54:40 +04:00
|
|
|
License: BSD-like
|
|
|
|
Group: System/Libraries
|
2016-05-04 13:05:01 +03:00
|
|
|
Url: https://www.openssl.org
|
2012-02-01 14:54:40 +04:00
|
|
|
Source0: ftp://ftp.openssl.org/source/%{name}-%{version}.tar.gz
|
|
|
|
Source1: ftp://ftp.openssl.org/source/%{name}-%{version}.tar.gz.asc
|
|
|
|
Source2: Makefile.certificate
|
|
|
|
Source3: make-dummy-cert
|
|
|
|
Source4: openssl-thread-test.c
|
2018-12-23 10:28:27 +03:00
|
|
|
Source5: openssl-config
|
2018-12-24 23:18:17 +03:00
|
|
|
Source6: openssl.macros
|
2016-12-09 19:01:25 +10:00
|
|
|
# Based on https://github.com/gost-engine/engine
|
|
|
|
# Never remove gost-engine patches
|
2017-06-30 23:02:17 +10:00
|
|
|
Patch0: openssl-1.0.2l-gost-engine.patch
|
2019-12-28 19:30:37 +03:00
|
|
|
# Backport GOST 2015 identificators and GOST OIDs for Edwards parameter sets
|
|
|
|
Patch1: openssl-1.0.2-Backport-GOST-2015-identificators-and-GOST-OIDs-for-.patch
|
2015-04-05 23:12:44 +10:00
|
|
|
# Handle RPM_OPT_FLAGS in Configure
|
2016-09-13 11:10:42 +10:00
|
|
|
Patch2: openssl-1.0.2e-optflags.patch
|
2014-06-06 19:57:28 +11:00
|
|
|
Patch3: openssl-1.0.1c-fix-perlpath.pl
|
2012-02-01 14:54:40 +04:00
|
|
|
# (oe) support Brazilian Government OTHERNAME X509v3 field (#14158)
|
|
|
|
# http://www.iti.gov.br/resolucoes/RESOLU__O_13_DE_26_04_2002.PDF
|
2017-06-30 23:02:17 +10:00
|
|
|
Patch6: openssl-1.0.2l-icpbrasil.patch
|
2016-09-13 11:10:42 +10:00
|
|
|
Patch7: openssl-1.0.2-defaults.patch
|
|
|
|
Patch12: openssl-1.0.2-x509.patch
|
|
|
|
Patch13: openssl-1.0.2-add-engines.patch
|
|
|
|
Patch302: openssl-1.0.2-enginesdir.patch
|
2012-03-18 04:46:02 +04:00
|
|
|
Patch303: openssl-0.9.8a-no-rpath.patch
|
2016-09-13 11:10:42 +10:00
|
|
|
Patch304: openssl-1.0.2-test-use-localhost.patch
|
2014-06-06 19:57:28 +11:00
|
|
|
BuildRequires: bc
|
2017-11-09 14:39:01 +10:00
|
|
|
%if %{with compat}
|
|
|
|
# readelf is used to produce libcrypto.so.10 and libssl.so.10
|
|
|
|
# needed for compatibility with Fedora/RHEL (Viber etc)
|
|
|
|
BuildRequires: patchelf >= 0.10-0.20170615.2
|
|
|
|
%endif
|
2014-06-06 19:57:28 +11:00
|
|
|
%{?_with_krb5:BuildRequires: krb5-devel}
|
|
|
|
BuildRequires: sctp-devel
|
|
|
|
BuildRequires: pkgconfig(zlib)
|
2014-06-06 02:16:35 +11:00
|
|
|
Requires: %{engines_name} = %{EVRD}
|
2012-02-01 14:54:40 +04:00
|
|
|
Requires: perl-base
|
|
|
|
Requires: rootcerts
|
2012-04-17 17:59:27 +04:00
|
|
|
Provides: /usr/bin/openssl
|
2018-12-23 11:48:16 +03:00
|
|
|
Provides: openssl-config
|
2012-02-01 14:54:40 +04:00
|
|
|
|
|
|
|
%description
|
|
|
|
The openssl certificate management tool and the shared libraries that provide
|
|
|
|
various encryption and decription algorithms and protocols, including DES, RC4,
|
|
|
|
RSA and SSL.
|
|
|
|
|
2015-06-12 15:14:29 +10:00
|
|
|
%files
|
2017-01-28 10:52:44 +03:00
|
|
|
%doc FAQ LICENSE NEWS PROBLEMS main-doc-info/README*
|
2015-06-12 15:14:29 +10:00
|
|
|
%doc README README.ASN1 README.ENGINE
|
|
|
|
%dir %{_sysconfdir}/pki
|
|
|
|
%dir %{_sysconfdir}/pki/CA
|
|
|
|
%dir %{_sysconfdir}/pki/CA/private
|
2018-12-26 06:49:22 +03:00
|
|
|
%dir %{_openssldir}
|
|
|
|
%dir %{_openssldir}/certs
|
|
|
|
%dir %{_openssldir}/misc
|
|
|
|
%dir %{_openssldir}/private
|
|
|
|
%dir %{_openssldir}/rootcerts
|
|
|
|
%attr(0644,root,root) %config(noreplace) %{_openssldir}/openssl.cnf
|
|
|
|
%attr(0755,root,root) %{_openssldir}/certs/make-dummy-cert
|
|
|
|
%attr(0644,root,root) %{_openssldir}/certs/Makefile
|
|
|
|
%attr(0755,root,root) %{_openssldir}/misc/*
|
2015-06-12 15:14:29 +10:00
|
|
|
%attr(0755,root,root) %{_bindir}/*
|
|
|
|
%attr(0644,root,root) %{_mandir}/man[157]/*
|
|
|
|
|
|
|
|
#----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
%package -n %{engines_name}
|
2012-02-01 14:54:40 +04:00
|
|
|
Summary: Engines for openssl
|
|
|
|
Group: System/Libraries
|
2014-06-06 02:16:35 +11:00
|
|
|
Provides: openssl-engines = %{EVRD}
|
2019-12-28 17:13:20 +03:00
|
|
|
# libgost.so was moved to openssl-gost-engine
|
2019-12-30 15:37:35 +10:00
|
|
|
Requires: %{_lib}openssl-gost-engine%{major}
|
2012-02-01 14:54:40 +04:00
|
|
|
|
2015-06-12 15:14:29 +10:00
|
|
|
%description -n %{engines_name}
|
2012-02-01 14:54:40 +04:00
|
|
|
This package provides engines for openssl.
|
|
|
|
|
2015-06-12 15:14:29 +10:00
|
|
|
%files -n %{engines_name}
|
2018-03-31 19:17:02 +03:00
|
|
|
%doc FAQ LICENSE NEWS PROBLEMS main-doc-info/README*
|
|
|
|
%doc README README.ASN1 README.ENGINE
|
2017-06-30 23:02:17 +10:00
|
|
|
%attr(0755,root,root) %dir %{_libdir}/openssl-%{major}/engines
|
|
|
|
%attr(0755,root,root) %{_libdir}/openssl-%{major}/engines/*.so
|
2015-06-12 15:14:29 +10:00
|
|
|
|
|
|
|
#----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
%package -n %{libcrypto}
|
|
|
|
Summary: Secure Sockets Layer communications libs
|
|
|
|
Group: System/Libraries
|
2019-08-01 15:53:36 +00:00
|
|
|
Requires: %{libssl} = %{EVRD}
|
2015-06-12 15:14:29 +10:00
|
|
|
|
|
|
|
%description -n %{libcrypto}
|
|
|
|
The libraries files are needed for various cryptographic algorithms
|
|
|
|
and protocols, including DES, RC4, RSA and SSL.
|
|
|
|
|
|
|
|
%files -n %{libcrypto}
|
2017-01-28 10:52:44 +03:00
|
|
|
%doc FAQ LICENSE NEWS PROBLEMS README*
|
2015-06-12 15:14:29 +10:00
|
|
|
%{_libdir}/libcrypto.so.%{major}*
|
|
|
|
|
|
|
|
#----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
%package -n %{libssl}
|
2012-02-01 14:54:40 +04:00
|
|
|
Summary: Secure Sockets Layer communications libs
|
|
|
|
Group: System/Libraries
|
2015-06-13 01:54:29 +10:00
|
|
|
Conflicts: %{_lib}openssl1.0.0 < 1.0.1n
|
|
|
|
Obsoletes: %{_lib}openssl1.0.0 < 1.0.1n
|
2016-03-14 23:49:04 +10:00
|
|
|
# needed to avoid undefined symbols in rpm (rpm depends on neon library)
|
|
|
|
Conflicts: %{_lib}neon0.27 < 0.30.1
|
2016-05-12 16:44:23 +10:00
|
|
|
# needed to avoid undefined symbols in curl and wget as they block update
|
|
|
|
Conflicts: curl < 1:7.47.1
|
|
|
|
Conflicts: wget < 1.17.1
|
2012-02-01 14:54:40 +04:00
|
|
|
|
2015-06-12 15:14:29 +10:00
|
|
|
%description -n %{libssl}
|
2012-02-01 14:54:40 +04:00
|
|
|
The libraries files are needed for various cryptographic algorithms
|
|
|
|
and protocols, including DES, RC4, RSA and SSL.
|
|
|
|
|
2015-06-12 15:14:29 +10:00
|
|
|
%files -n %{libssl}
|
2017-01-28 10:52:44 +03:00
|
|
|
%doc FAQ LICENSE NEWS PROBLEMS README*
|
2015-06-12 15:14:29 +10:00
|
|
|
%{_libdir}/libssl.so.%{major}*
|
|
|
|
|
|
|
|
#----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
%package -n %{devname}
|
2012-02-01 14:54:40 +04:00
|
|
|
Summary: Secure Sockets Layer communications libs & headers & utils
|
|
|
|
Group: Development/Other
|
2015-06-12 15:14:29 +10:00
|
|
|
Requires: %{libssl} = %{EVRD}
|
|
|
|
Requires: %{libcrypto} = %{EVRD}
|
2012-02-01 14:54:40 +04:00
|
|
|
Provides: libopenssl-devel
|
2014-06-06 02:16:35 +11:00
|
|
|
Provides: %{name}-devel = %{EVRD}
|
2012-02-01 14:54:40 +04:00
|
|
|
|
2015-06-12 15:14:29 +10:00
|
|
|
%description -n %{devname}
|
2012-02-01 14:54:40 +04:00
|
|
|
The libraries and include files needed to compile apps with support
|
|
|
|
for various cryptographic algorithms and protocols, including DES, RC4, RSA
|
|
|
|
and SSL.
|
|
|
|
|
2015-06-12 15:14:29 +10:00
|
|
|
%files -n %{devname}
|
|
|
|
%doc CHANGES doc/* devel-doc-info/README*
|
|
|
|
%dir %{_includedir}/openssl
|
|
|
|
%{multiarch_includedir}/openssl/opensslconf.h
|
|
|
|
%{_includedir}/openssl/*
|
|
|
|
%{_libdir}/libcrypto.so
|
|
|
|
%{_libdir}/libssl.so
|
|
|
|
%{_mandir}/man3/*
|
|
|
|
%{_libdir}/pkgconfig/*
|
2018-12-24 23:18:17 +03:00
|
|
|
%{_sys_macros_dir}/openssl.macros
|
2015-06-12 15:14:29 +10:00
|
|
|
|
|
|
|
#----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
%package -n %{staticname}
|
2012-02-01 14:54:40 +04:00
|
|
|
Summary: Secure Sockets Layer communications static libs
|
|
|
|
Group: Development/Other
|
2014-06-06 19:57:28 +11:00
|
|
|
Requires: %{devname} = %{EVRD}
|
2012-02-01 14:54:40 +04:00
|
|
|
Provides: libopenssl-static-devel
|
2014-06-06 02:16:35 +11:00
|
|
|
Provides: %{name}-static-devel = %{EVRD}
|
2012-02-01 14:54:40 +04:00
|
|
|
|
2015-06-12 15:14:29 +10:00
|
|
|
%description -n %{staticname}
|
2012-02-01 14:54:40 +04:00
|
|
|
The static libraries needed to compile apps with support for various
|
|
|
|
cryptographic algorithms and protocols, including DES, RC4, RSA and SSL.
|
|
|
|
|
2015-06-12 15:14:29 +10:00
|
|
|
%files -n %{staticname}
|
2018-03-31 19:17:02 +03:00
|
|
|
%doc FAQ LICENSE NEWS PROBLEMS main-doc-info/README*
|
|
|
|
%doc README README.ASN1 README.ENGINE
|
2015-06-12 15:14:29 +10:00
|
|
|
%attr(0644,root,root) %{_libdir}/lib*.a
|
|
|
|
|
|
|
|
#----------------------------------------------------------------------------
|
|
|
|
|
2017-11-09 14:39:01 +10:00
|
|
|
%if %{with compat}
|
|
|
|
%package -n %{libcrypto_compat}
|
|
|
|
Summary: Secure Sockets Layer communications libs (Fedora compatibility only)
|
|
|
|
Group: System/Libraries
|
|
|
|
|
|
|
|
%description -n %{libcrypto_compat}
|
|
|
|
The libraries files are needed for various cryptographic algorithms
|
|
|
|
and protocols, including DES, RC4, RSA and SSL.
|
|
|
|
|
|
|
|
%files -n %{libcrypto_compat}
|
|
|
|
%doc FAQ LICENSE NEWS PROBLEMS README*
|
|
|
|
%{_libdir}/libcrypto.so.%{major_compat}*
|
|
|
|
%endif
|
|
|
|
|
|
|
|
#----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
%if %{with compat}
|
|
|
|
%package -n %{libssl_compat}
|
|
|
|
Summary: Secure Sockets Layer communications libs (Fedora compatibility only)
|
|
|
|
Group: System/Libraries
|
|
|
|
|
|
|
|
%description -n %{libssl_compat}
|
|
|
|
The libraries files are needed for various cryptographic algorithms
|
|
|
|
and protocols, including DES, RC4, RSA and SSL.
|
|
|
|
|
|
|
|
%files -n %{libssl_compat}
|
|
|
|
%doc FAQ LICENSE NEWS PROBLEMS README*
|
|
|
|
%{_libdir}/libssl.so.%{major_compat}*
|
|
|
|
%endif
|
|
|
|
|
|
|
|
#----------------------------------------------------------------------------
|
|
|
|
|
2012-02-01 14:54:40 +04:00
|
|
|
%prep
|
2014-06-06 02:16:35 +11:00
|
|
|
%setup -q
|
2016-12-09 17:05:32 +10:00
|
|
|
%patch0 -p1 -b .gost
|
2019-12-28 19:30:37 +03:00
|
|
|
%patch1 -p1
|
2015-04-05 23:12:44 +10:00
|
|
|
%patch2 -p1 -b .optflags
|
2014-06-06 19:57:28 +11:00
|
|
|
%patch3 -p1 -b .perl
|
2015-04-05 23:12:44 +10:00
|
|
|
%patch6 -p1 -b .icpbrasil
|
2012-02-01 14:54:40 +04:00
|
|
|
%patch7 -p1 -b .defaults
|
|
|
|
%{?_with_krb5:%patch8 -p1 -b .krb5}
|
|
|
|
%patch12 -p1 -b .x509
|
|
|
|
%patch13 -p1 -b .version-add-engines
|
|
|
|
|
|
|
|
%patch302 -p1 -b .engines
|
2012-03-18 04:46:02 +04:00
|
|
|
%patch303 -p1 -b .no-rpath
|
2015-04-05 23:12:44 +10:00
|
|
|
%patch304 -p1 -b .test-use-localhost
|
2012-02-01 14:54:40 +04:00
|
|
|
|
|
|
|
perl -pi -e "s,^(OPENSSL_LIBNAME=).+$,\1%{_lib}," Makefile.org engines/Makefile
|
|
|
|
|
|
|
|
# fix perl path
|
|
|
|
perl util/perlpath.pl %{_bindir}/perl
|
|
|
|
|
|
|
|
cp %{SOURCE2} Makefile.certificate
|
|
|
|
cp %{SOURCE3} make-dummy-cert
|
|
|
|
cp %{SOURCE4} openssl-thread-test.c
|
|
|
|
|
2015-04-05 23:12:44 +10:00
|
|
|
%build
|
2012-02-01 14:54:40 +04:00
|
|
|
%serverbuild
|
|
|
|
|
|
|
|
# Figure out which flags we want to use.
|
|
|
|
# default
|
|
|
|
sslarch=%{_os}-%{_arch}
|
2014-06-06 19:57:28 +11:00
|
|
|
%ifarch %{ix86}
|
2012-02-01 14:54:40 +04:00
|
|
|
sslarch=linux-elf
|
|
|
|
if ! echo %{_target} | grep -q i[56]86 ; then
|
2017-01-28 10:52:44 +03:00
|
|
|
sslflags="no-asm"
|
2012-02-01 14:54:40 +04:00
|
|
|
fi
|
|
|
|
%endif
|
2012-02-01 18:06:06 +04:00
|
|
|
%ifarch %{arm}
|
|
|
|
sslarch=linux-generic32
|
|
|
|
%endif
|
2012-02-01 14:54:40 +04:00
|
|
|
|
|
|
|
# ia64, x86_64, ppc, ppc64 are OK by default
|
|
|
|
# Configure the build tree. Override OpenSSL defaults with known-good defaults
|
|
|
|
# usable on all platforms. The Configure script already knows to use -fPIC and
|
|
|
|
# RPM_OPT_FLAGS, so we can skip specifiying them here.
|
|
|
|
./Configure \
|
2018-12-26 06:49:22 +03:00
|
|
|
--openssldir=%{_openssldir} ${sslflags} \
|
2017-06-30 23:02:17 +10:00
|
|
|
--enginesdir=%{_libdir}/openssl-%{major}/engines \
|
2017-01-28 10:52:44 +03:00
|
|
|
--prefix=%{_prefix} --libdir=%{_lib}/ %{?_with_krb5:--with-krb5-flavor=MIT -I%{_prefix}/kerberos/include -L%{_prefix}/kerberos/%{_lib}} \
|
2019-06-17 08:04:16 +03:00
|
|
|
zlib no-idea no-rc5 enable-camellia enable-seed enable-tlsext enable-rfc3779 enable-cms enable-md2 sctp shared ${sslarch}
|
2012-02-01 14:54:40 +04:00
|
|
|
|
|
|
|
# Add -Wa,--noexecstack here so that libcrypto's assembler modules will be
|
|
|
|
# marked as not requiring an executable stack.
|
|
|
|
RPM_OPT_FLAGS="%{optflags} -Wa,--noexecstack"
|
2012-04-10 15:27:51 +04:00
|
|
|
|
2012-02-01 14:54:40 +04:00
|
|
|
make depend
|
|
|
|
make all build-shared
|
|
|
|
|
|
|
|
# Generate hashes for the included certs.
|
|
|
|
make rehash build-shared
|
|
|
|
|
|
|
|
%check
|
|
|
|
# Verify that what was compiled actually works.
|
|
|
|
export LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
|
|
|
|
|
|
|
|
make -C test apps tests
|
|
|
|
|
|
|
|
gcc -o openssl-thread-test \
|
2017-01-28 10:52:44 +03:00
|
|
|
%{?_with_krb5:`krb5-config --cflags`} \
|
|
|
|
-I./include \
|
|
|
|
%{optflags} \
|
|
|
|
openssl-thread-test.c \
|
|
|
|
-L. -lssl -lcrypto \
|
|
|
|
%{?_with_krb5:`krb5-config --libs`} \
|
|
|
|
-lpthread -lz -ldl
|
2012-02-01 14:54:40 +04:00
|
|
|
|
|
|
|
./openssl-thread-test --threads %{thread_test_threads}
|
|
|
|
|
|
|
|
%install
|
|
|
|
|
|
|
|
%makeinstall \
|
2017-01-28 10:52:44 +03:00
|
|
|
INSTALL_PREFIX=%{buildroot} \
|
|
|
|
MANDIR=%{_mandir} \
|
|
|
|
build-shared
|
2012-02-01 14:54:40 +04:00
|
|
|
|
|
|
|
# the makefiles is too borked...
|
2017-06-30 23:02:17 +10:00
|
|
|
install -d %{buildroot}%{_libdir}/openssl-%{major}
|
|
|
|
mv %{buildroot}%{_libdir}/engines %{buildroot}%{_libdir}/openssl-%{major}/engines
|
2012-02-01 14:54:40 +04:00
|
|
|
|
|
|
|
# make the rootcerts dir
|
2018-12-26 06:49:22 +03:00
|
|
|
install -d %{buildroot}%{_openssldir}/rootcerts
|
2012-02-01 14:54:40 +04:00
|
|
|
|
|
|
|
# Install a makefile for generating keys and self-signed certs, and a script
|
|
|
|
# for generating them on the fly.
|
2018-12-26 06:49:22 +03:00
|
|
|
install -d %{buildroot}%{_openssldir}/certs
|
|
|
|
install -m0644 Makefile.certificate %{buildroot}%{_openssldir}/certs/Makefile
|
|
|
|
install -m0755 make-dummy-cert %{buildroot}%{_openssldir}/certs/make-dummy-cert
|
2012-02-01 14:54:40 +04:00
|
|
|
|
|
|
|
# Pick a CA script.
|
2018-12-26 06:49:22 +03:00
|
|
|
mv %{buildroot}%{_openssldir}/misc/CA.sh %{buildroot}%{_openssldir}/misc/CA
|
2012-02-01 14:54:40 +04:00
|
|
|
|
|
|
|
install -d %{buildroot}%{_sysconfdir}/pki/CA
|
|
|
|
install -d %{buildroot}%{_sysconfdir}/pki/CA/private
|
|
|
|
|
|
|
|
# openssl was named ssleay in "ancient" times.
|
|
|
|
ln -snf openssl %{buildroot}%{_bindir}/ssleay
|
|
|
|
|
|
|
|
# The man pages rand.3 and passwd.1 conflict with other packages
|
|
|
|
# Rename them to ssl-* and also make a symlink from openssl-* to ssl-*
|
|
|
|
mv %{buildroot}%{_mandir}/man1/passwd.1 %{buildroot}%{_mandir}/man1/ssl-passwd.1
|
2012-02-01 18:06:06 +04:00
|
|
|
ln -sf ssl-passwd.1%{_extension} %{buildroot}%{_mandir}/man1/openssl-passwd.1%{_extension}
|
2012-02-01 14:54:40 +04:00
|
|
|
|
|
|
|
for i in rand err; do
|
2017-01-28 10:52:44 +03:00
|
|
|
mv %{buildroot}%{_mandir}/man3/$i.3 %{buildroot}%{_mandir}/man3/ssl-$i.3
|
|
|
|
ln -snf ssl-$i.3%{_extension} %{buildroot}%{_mandir}/man3/openssl-$i.3%{_extension}
|
2012-02-01 14:54:40 +04:00
|
|
|
done
|
|
|
|
|
|
|
|
rm -rf {main,devel}-doc-info
|
|
|
|
mkdir -p {main,devel}-doc-info
|
|
|
|
cat - << EOF > main-doc-info/README.Mandriva-manpage
|
|
|
|
Warning:
|
|
|
|
The man page of passwd, passwd.1, has been renamed to ssl-passwd.1
|
|
|
|
to avoid a conflict with passwd.1 man page from the package passwd.
|
|
|
|
EOF
|
|
|
|
|
|
|
|
cat - << EOF > devel-doc-info/README.Mandriva-manpage
|
|
|
|
Warning:
|
|
|
|
The man page of rand, rand.3, has been renamed to ssl-rand.3
|
|
|
|
to avoid a conflict with rand.3 from the package man-pages
|
|
|
|
The man page of err, err.3, has been renamed to ssl-err.3
|
|
|
|
to avoid a conflict with err.3 from the package man-pages
|
|
|
|
EOF
|
|
|
|
|
|
|
|
chmod 755 %{buildroot}%{_libdir}/pkgconfig
|
|
|
|
|
|
|
|
%multiarch_includes %{buildroot}%{_includedir}/openssl/opensslconf.h
|
|
|
|
|
|
|
|
# strip cannot touch these unless 755
|
2017-06-30 23:02:17 +10:00
|
|
|
chmod 755 %{buildroot}%{_libdir}/openssl-%{major}/engines/*.so*
|
2012-02-01 14:54:40 +04:00
|
|
|
chmod 755 %{buildroot}%{_libdir}/*.so*
|
|
|
|
chmod 755 %{buildroot}%{_bindir}/*
|
|
|
|
|
2017-11-09 14:39:01 +10:00
|
|
|
%if %{with compat}
|
|
|
|
# RHEL/Fedora compatibility libraries
|
|
|
|
cp %{buildroot}%{_libdir}/libcrypto.so.%{major} %{buildroot}%{_libdir}/libcrypto.so.%{major_compat}
|
|
|
|
cp %{buildroot}%{_libdir}/libssl.so.%{major} %{buildroot}%{_libdir}/libssl.so.%{major_compat}
|
|
|
|
patchelf --set-soname libcrypto.so.%{major_compat} %{buildroot}%{_libdir}/libcrypto.so.%{major_compat}
|
|
|
|
patchelf --set-soname libssl.so.%{major_compat} %{buildroot}%{_libdir}/libssl.so.%{major_compat}
|
|
|
|
%endif
|
|
|
|
|
2012-02-01 14:54:40 +04:00
|
|
|
# nuke a mistake
|
|
|
|
rm -f %{buildroot}%{_mandir}/man3/.3
|
|
|
|
|
|
|
|
# Fix libdir.
|
|
|
|
pushd %{buildroot}%{_libdir}/pkgconfig
|
2017-01-28 10:52:44 +03:00
|
|
|
for i in *.pc ; do
|
|
|
|
sed 's,^libdir=${exec_prefix}/lib$,libdir=${exec_prefix}/%{_lib},g' \
|
|
|
|
$i >$i.tmp && \
|
|
|
|
cat $i.tmp >$i && \
|
|
|
|
rm -f $i.tmp
|
|
|
|
done
|
2012-02-01 14:54:40 +04:00
|
|
|
popd
|
|
|
|
|
|
|
|
# adjust ssldir
|
2018-12-26 06:49:22 +03:00
|
|
|
perl -pi -e "s|^CATOP=.*|CATOP=%{_openssldir}|g" %{buildroot}%{_openssldir}/misc/CA
|
|
|
|
perl -pi -e "s|^\\\$CATOP\=\".*|\\\$CATOP\=\"%{_openssldir}\";|g" %{buildroot}%{_openssldir}/misc/CA.pl
|
|
|
|
perl -pi -e "s|\./demoCA|%{_openssldir}|g" %{buildroot}%{_openssldir}/openssl.cnf
|
2018-12-23 10:28:27 +03:00
|
|
|
|
|
|
|
# install openssl-config
|
|
|
|
install -m0755 %{SOURCE5} %{buildroot}/%{_bindir}/
|
|
|
|
# define values in openssl-config
|
|
|
|
sed -i %{buildroot}/%{_bindir}/openssl-config \
|
|
|
|
-e "s#@VERSION@#%{version}#g" \
|
2018-12-26 06:49:22 +03:00
|
|
|
-e "s#@OPENSSLDIR@#%{_openssldir}#g" \
|
2018-12-23 10:28:27 +03:00
|
|
|
-e "s#@CPPFLAGS@#${CPPFLAGS}#g" \
|
|
|
|
-e "s#@CFLAGS@#${RPM_OPT_FLAGS}#g" \
|
|
|
|
-e "s#@LDFLAGS@#%{ldflags}#g"
|
|
|
|
# test openssl-config
|
2018-12-26 06:49:22 +03:00
|
|
|
[ "$(%{buildroot}/%{_bindir}/openssl-config --openssldir)" = '%{_openssldir}' ]
|
2018-12-24 23:18:17 +03:00
|
|
|
|
|
|
|
# make and install openssl.macros
|
|
|
|
install -d -m0755 %{buildroot}/%{_sys_macros_dir}
|
2018-12-26 06:49:22 +03:00
|
|
|
cat %{SOURCE6} | sed -e "s#@OPENSSLDIR@#%{_openssldir}#g" > %{buildroot}/%{_sys_macros_dir}/openssl.macros
|
2018-12-24 23:18:17 +03:00
|
|
|
chmod 0644 %{buildroot}/%{_sys_macros_dir}/openssl.macros
|
|
|
|
# verify openssl.macros
|
2018-12-26 06:49:22 +03:00
|
|
|
grep -q '%{_openssldir}' %{buildroot}%{_sys_macros_dir}/openssl.macros
|
2019-12-28 17:13:20 +03:00
|
|
|
|
|
|
|
# is now built in openssl-gost-engines
|
|
|
|
rm -fv %{buildroot}%{_libdir}/openssl-%{major}/engines/libgost.so
|