2018-02-16 13:13:08 +01:00
|
|
|
#
|
|
|
|
# spec file for package openssl-1_1
|
|
|
|
#
|
2023-01-31 13:15:21 +01:00
|
|
|
# Copyright (c) 2023 SUSE LLC
|
2018-02-16 13:13:08 +01:00
|
|
|
#
|
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
2018-10-25 15:55:29 +02:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2018-02-16 13:13:08 +01:00
|
|
|
#
|
|
|
|
|
|
|
|
|
2021-11-30 10:07:05 +01:00
|
|
|
%if 0%{?sle_version} >= 150400 || 0%{?suse_version} >= 1550
|
|
|
|
# Enable livepatching support for SLE15-SP4 onwards. It requires
|
|
|
|
# compiler support introduced there.
|
|
|
|
%define livepatchable 1
|
|
|
|
|
|
|
|
# Set variables for livepatching.
|
|
|
|
%define _other %{_topdir}/OTHER
|
|
|
|
%define tar_basename %{_rname}-livepatch-%{version}-%{release}
|
|
|
|
%define tar_package_name %{tar_basename}.%{_arch}.tar.xz
|
|
|
|
%define clones_dest_dir %{tar_basename}/%{_arch}
|
|
|
|
%else
|
|
|
|
# Unsupported operating system.
|
|
|
|
%define livepatchable 0
|
|
|
|
%endif
|
|
|
|
|
|
|
|
%ifnarch x86_64
|
|
|
|
# Unsupported architectures must have livepatch disabled.
|
|
|
|
%define livepatchable 0
|
|
|
|
%endif
|
|
|
|
|
2018-02-16 13:13:08 +01:00
|
|
|
%define ssletcdir %{_sysconfdir}/ssl
|
|
|
|
%define maj_min 1.1
|
|
|
|
%define _rname openssl
|
|
|
|
Name: openssl-1_1
|
2023-01-31 13:15:21 +01:00
|
|
|
# Don't forget to update the version in the "openssl" meta-package!
|
2023-05-31 11:13:51 +02:00
|
|
|
Version: 1.1.1u
|
2018-02-16 13:13:08 +01:00
|
|
|
Release: 0
|
|
|
|
Summary: Secure Sockets and Transport Layer Security
|
|
|
|
License: OpenSSL
|
|
|
|
Group: Productivity/Networking/Security
|
2018-08-24 12:39:49 +02:00
|
|
|
URL: https://www.openssl.org/
|
2018-09-11 17:12:55 +02:00
|
|
|
Source: https://www.%{_rname}.org/source/%{_rname}-%{version}.tar.gz
|
2018-02-16 13:13:08 +01:00
|
|
|
# to get mtime of file:
|
|
|
|
Source1: %{name}.changes
|
|
|
|
Source2: baselibs.conf
|
2018-09-11 17:12:55 +02:00
|
|
|
Source3: https://www.%{_rname}.org/source/%{_rname}-%{version}.tar.gz.asc
|
2019-06-06 13:11:21 +02:00
|
|
|
# https://www.openssl.org/about/
|
2018-02-16 13:13:08 +01:00
|
|
|
# http://pgp.mit.edu:11371/pks/lookup?op=get&search=0xA2D29B7BF295C759#/openssl.keyring
|
2018-08-24 12:39:49 +02:00
|
|
|
Source4: %{_rname}.keyring
|
|
|
|
Source5: showciphers.c
|
2018-02-16 13:13:08 +01:00
|
|
|
# PATCH-FIX-OPENSUSE: do not install html mans it takes ages
|
2018-08-24 12:39:49 +02:00
|
|
|
Patch1: openssl-1.1.0-no-html.patch
|
|
|
|
Patch2: openssl-truststore.patch
|
|
|
|
Patch3: openssl-pkgconfig.patch
|
|
|
|
Patch4: openssl-DEFAULT_SUSE_cipher.patch
|
|
|
|
Patch5: openssl-ppc64-config.patch
|
2022-07-07 04:47:54 +02:00
|
|
|
Patch6: openssl-riscv64-config.patch
|
2019-06-06 13:11:21 +02:00
|
|
|
# PATCH-FIX-UPSTREAM jsc#SLE-6126 and jsc#SLE-6129
|
|
|
|
Patch8: 0001-s390x-assembly-pack-perlasm-support.patch
|
|
|
|
Patch9: 0002-crypto-chacha-asm-chacha-s390x.pl-add-vx-code-path.patch
|
|
|
|
Patch10: 0003-crypto-poly1305-asm-poly1305-s390x.pl-add-vx-code-pa.patch
|
|
|
|
Patch11: 0004-s390x-assembly-pack-fix-formal-interface-bug-in-chac.patch
|
|
|
|
Patch12: 0005-s390x-assembly-pack-import-chacha-from-cryptogams-re.patch
|
|
|
|
Patch13: 0006-s390x-assembly-pack-import-poly-from-cryptogams-repo.patch
|
2020-01-24 16:19:27 +01:00
|
|
|
# PATCH-FIX-UPSTREAM bsc#1152695 jsc#SLE-7861 Support for CPACF enhancements - part 1 (crypto)
|
|
|
|
Patch16: openssl-s390x-assembly-pack-add-OPENSSL_s390xcap-environment.patch
|
|
|
|
Patch17: openssl-s390x-assembly-pack-add-support-for-pcc-and-kma-inst.patch
|
|
|
|
Patch18: openssl-s390x-assembly-pack-add-OPENSSL_s390xcap-man-page.patch
|
|
|
|
Patch19: openssl-s390x-assembly-pack-update-OPENSSL_s390xcap-3.patch
|
|
|
|
Patch20: openssl-s390xcpuid.pl-fix-comment.patch
|
|
|
|
Patch21: openssl-assembly-pack-accelerate-scalar-multiplication.patch
|
|
|
|
Patch22: openssl-Enable-curve-spefific-ECDSA-implementations-via-EC_M.patch
|
|
|
|
Patch23: openssl-s390x-assembly-pack-accelerate-ECDSA.patch
|
|
|
|
Patch24: openssl-OPENSSL_s390xcap.pod-list-msa9-facility-bit-155.patch
|
|
|
|
Patch25: openssl-s390x-assembly-pack-cleanse-only-sensitive-fields.patch
|
|
|
|
Patch26: openssl-s390x-assembly-pack-fix-OPENSSL_s390xcap-z15-cpu-mas.patch
|
|
|
|
Patch27: openssl-s390x-assembly-pack-fix-msa3-stfle-bit-detection.patch
|
|
|
|
Patch28: openssl-Fix-9bf682f-which-broke-nistp224_method.patch
|
|
|
|
# FIPS patches
|
|
|
|
Patch30: openssl-1.1.1-fips.patch
|
|
|
|
Patch31: openssl-1.1.1-fips-post-rand.patch
|
|
|
|
Patch32: openssl-1.1.1-fips-crng-test.patch
|
|
|
|
Patch33: openssl-1.1.0-issuer-hash.patch
|
|
|
|
Patch34: openssl-fips-run_selftests_only_when_module_is_complete.patch
|
|
|
|
Patch35: openssl-ship_fips_standalone_hmac.patch
|
|
|
|
Patch36: openssl-fips_mode.patch
|
|
|
|
Patch37: openssl-1.1.1-evp-kdf.patch
|
|
|
|
Patch38: openssl-1.1.1-ssh-kdf.patch
|
|
|
|
Patch39: openssl-fips-dont_run_FIPS_module_installed.patch
|
|
|
|
Patch40: openssl-fips-selftests_in_nonfips_mode.patch
|
|
|
|
Patch41: openssl-fips-clearerror.patch
|
|
|
|
Patch42: openssl-fips-ignore_broken_atexit_test.patch
|
2020-01-27 15:25:49 +01:00
|
|
|
Patch43: openssl-keep_EVP_KDF_functions_version.patch
|
2020-02-21 16:33:18 +01:00
|
|
|
Patch44: openssl-fips_fix_selftests_return_value.patch
|
|
|
|
Patch45: openssl-fips-add-SHA3-selftest.patch
|
2020-02-28 10:10:25 +01:00
|
|
|
Patch46: openssl-fips_selftest_upstream_drbg.patch
|
2020-03-20 18:43:35 +01:00
|
|
|
Patch47: openssl-unknown_dgst.patch
|
2020-01-30 10:32:13 +01:00
|
|
|
# PATCH-FIX-UPSTREAM jsc#SLE-7403 Support for CPACF enhancements - part 2 (crypto)
|
2020-02-21 16:33:18 +01:00
|
|
|
Patch50: openssl-s390x-assembly-pack-accelerate-X25519-X448-Ed25519-and-Ed448.patch
|
|
|
|
Patch51: openssl-s390x-fix-x448-and-x448-test-vector-ctime-for-x25519-and-x448.patch
|
2020-12-05 18:19:30 +01:00
|
|
|
Patch52: openssl-1.1.1-system-cipherlist.patch
|
2021-01-21 15:53:39 +01:00
|
|
|
# PATCH-FIX-OPENSUSE jsc#SLE-15832 Centralized Crypto Compliance Configuration
|
|
|
|
Patch53: openssl-1_1-seclevel.patch
|
|
|
|
Patch54: openssl-1_1-use-seclevel2-in-tests.patch
|
|
|
|
Patch55: openssl-1_1-disable-test_srp-sslapi.patch
|
2021-05-24 17:50:42 +02:00
|
|
|
Patch56: openssl-add_rfc3526_rfc7919.patch
|
2021-12-14 13:43:58 +01:00
|
|
|
Patch57: openssl-1_1-use-include-directive.patch
|
2022-02-01 16:05:00 +01:00
|
|
|
#PATCH-FIX-UPSTREAM jsc#SLE-18136 POWER10 performance enhancements for cryptography
|
2022-01-28 18:51:43 +01:00
|
|
|
Patch69: openssl-1_1-Optimize-ppc64.patch
|
2022-02-01 16:05:00 +01:00
|
|
|
#PATCH-FIX-UPSTREAM jsc#SLE-19742 Backport Arm improvements from OpenSSL 3
|
2022-01-28 18:51:43 +01:00
|
|
|
Patch70: openssl-1_1-Optimize-RSA-armv8.patch
|
|
|
|
Patch71: openssl-1_1-Optimize-AES-XTS-aarch64.patch
|
|
|
|
Patch72: openssl-1_1-Optimize-AES-GCM-uarchs.patch
|
2022-02-14 13:37:47 +01:00
|
|
|
#PATCH-FIX-SUSE bsc#1182959 FIPS: Fix function and reason error codes
|
|
|
|
Patch73: openssl-1_1-FIPS-fix-error-reason-codes.patch
|
2022-09-30 12:26:12 +02:00
|
|
|
#PATCH-FIX-SUSE bsc#1180995 Default to RFC7919 groups in FIPS mode
|
|
|
|
Patch74: openssl-1_1-paramgen-default_to_rfc7919.patch
|
2022-12-14 10:46:30 +01:00
|
|
|
# PATCH-FIX-UPSTREAM jsc#PED-512
|
|
|
|
# POWER10 performance enhancements for cryptography
|
|
|
|
Patch75: openssl-1_1-AES-GCM-performance-optimzation-with-stitched-method.patch
|
|
|
|
Patch76: openssl-1_1-Fixed-counter-overflow.patch
|
|
|
|
Patch77: openssl-1_1-chacha20-performance-optimizations-for-ppc64le-with-.patch
|
|
|
|
Patch78: openssl-1_1-Fixed-conditional-statement-testing-64-and-256-bytes.patch
|
|
|
|
Patch79: openssl-1_1-Fix-AES-GCM-on-Power-8-CPUs.patch
|
2023-01-31 13:15:21 +01:00
|
|
|
#PATCH-FIX-OPENSUSE bsc#1205042 Set OpenSSL 3.0 as the default openssl
|
|
|
|
Patch80: openssl-1_1-openssl-config.patch
|
2018-02-16 13:13:08 +01:00
|
|
|
BuildRequires: pkgconfig
|
2022-02-03 18:41:11 +01:00
|
|
|
BuildRequires: pkgconfig(zlib)
|
2023-01-31 13:15:21 +01:00
|
|
|
Requires: libopenssl1_1 = %{version}-%{release}
|
2022-01-03 09:42:13 +01:00
|
|
|
%if 0%{?sle_version} >= 150400 || 0%{?suse_version} >= 1550
|
2021-02-22 13:20:01 +01:00
|
|
|
Requires: crypto-policies
|
|
|
|
%endif
|
2018-02-16 13:13:08 +01:00
|
|
|
# Needed for clean upgrade path, boo#1070003
|
|
|
|
Obsoletes: openssl-1_0_0
|
2018-02-20 12:18:48 +01:00
|
|
|
# Needed for clean upgrade from former openssl-1_1_0, boo#1081335
|
|
|
|
Obsoletes: openssl-1_1_0
|
2018-02-16 13:13:08 +01:00
|
|
|
|
|
|
|
%description
|
|
|
|
OpenSSL is a software library to be used in applications that need to
|
|
|
|
secure communications over computer networks against eavesdropping or
|
|
|
|
need to ascertain the identity of the party at the other end.
|
|
|
|
OpenSSL contains an implementation of the SSL and TLS protocols.
|
|
|
|
|
|
|
|
%package -n libopenssl1_1
|
|
|
|
Summary: Secure Sockets and Transport Layer Security
|
|
|
|
Group: Productivity/Networking/Security
|
2022-01-03 09:42:13 +01:00
|
|
|
%if 0%{?sle_version} >= 150400 || 0%{?suse_version} >= 1550
|
2021-08-25 04:52:01 +02:00
|
|
|
Requires: crypto-policies
|
|
|
|
%endif
|
2018-02-16 13:13:08 +01:00
|
|
|
Recommends: ca-certificates-mozilla
|
2018-02-20 12:18:48 +01:00
|
|
|
# Needed for clean upgrade from former openssl-1_1_0, boo#1081335
|
|
|
|
Obsoletes: libopenssl1_1_0
|
2022-02-14 16:41:59 +01:00
|
|
|
Conflicts: %{name} < %{version}-%{release}
|
2023-05-31 11:13:51 +02:00
|
|
|
# Merge back the hmac files bsc#1185116
|
|
|
|
Provides: libopenssl1_1-hmac = %{version}-%{release}
|
|
|
|
Obsoletes: libopenssl1_1-hmac < %{version}-%{release}
|
|
|
|
# Needed for clean upgrade from former openssl-1_1_0, boo#1081335
|
|
|
|
Obsoletes: libopenssl1_1_0-hmac
|
|
|
|
# Needed for clean upgrade from SLE-12 openssl-1_0_0, bsc#1158499
|
|
|
|
Obsoletes: libopenssl-1_0_0-hmac
|
2018-02-16 13:13:08 +01:00
|
|
|
|
|
|
|
%description -n libopenssl1_1
|
|
|
|
OpenSSL is a software library to be used in applications that need to
|
|
|
|
secure communications over computer networks against eavesdropping or
|
|
|
|
need to ascertain the identity of the party at the other end.
|
|
|
|
OpenSSL contains an implementation of the SSL and TLS protocols.
|
|
|
|
|
|
|
|
%package -n libopenssl-1_1-devel
|
|
|
|
Summary: Development files for OpenSSL
|
|
|
|
Group: Development/Libraries/C and C++
|
|
|
|
Requires: libopenssl1_1 = %{version}
|
2022-02-03 18:41:11 +01:00
|
|
|
Requires: pkgconfig(zlib)
|
2018-08-24 12:39:49 +02:00
|
|
|
Recommends: %{name} = %{version}
|
2018-02-16 13:13:08 +01:00
|
|
|
Conflicts: ssl-devel
|
2023-01-31 13:15:21 +01:00
|
|
|
# Conflicting names with libopenssl-3-devel
|
|
|
|
Conflicts: libopenssl-3-devel
|
2018-02-20 12:18:48 +01:00
|
|
|
# Needed for clean upgrade from former openssl-1_1_0, boo#1081335
|
|
|
|
Obsoletes: libopenssl-1_1_0-devel
|
2020-01-07 13:23:32 +01:00
|
|
|
# Needed for clean upgrade from SLE-12 openssl-1_0_0, bsc#1158499
|
|
|
|
Obsoletes: libopenssl-1_0_0-devel
|
2018-02-16 13:13:08 +01:00
|
|
|
|
|
|
|
%description -n libopenssl-1_1-devel
|
|
|
|
This subpackage contains header files for developing applications
|
|
|
|
that want to make use of the OpenSSL C API.
|
|
|
|
|
|
|
|
%package doc
|
|
|
|
Summary: Additional Package Documentation
|
|
|
|
Group: Productivity/Networking/Security
|
|
|
|
Conflicts: openssl-doc
|
|
|
|
Provides: openssl-doc = %{version}
|
|
|
|
Obsoletes: openssl-doc < %{version}
|
|
|
|
BuildArch: noarch
|
|
|
|
|
|
|
|
%description doc
|
|
|
|
This package contains optional documentation provided in addition to
|
|
|
|
this package's base documentation.
|
|
|
|
|
|
|
|
%prep
|
2021-08-25 04:52:01 +02:00
|
|
|
%autosetup -p1 -n %{_rname}-%{version}
|
2018-02-16 13:13:08 +01:00
|
|
|
|
2023-01-31 13:15:21 +01:00
|
|
|
cp apps/openssl.cnf apps/openssl-1_1.cnf
|
|
|
|
|
2018-02-16 13:13:08 +01:00
|
|
|
%build
|
|
|
|
%ifarch armv5el armv5tel
|
|
|
|
export MACHINE=armv5el
|
|
|
|
%endif
|
|
|
|
%ifarch armv6l armv6hl
|
|
|
|
export MACHINE=armv6l
|
|
|
|
%endif
|
|
|
|
|
|
|
|
./config \
|
2018-08-24 12:39:49 +02:00
|
|
|
no-idea \
|
2018-02-16 13:13:08 +01:00
|
|
|
enable-rfc3779 \
|
|
|
|
%ifarch x86_64 aarch64 ppc64le
|
|
|
|
enable-ec_nistp_64_gcc_128 \
|
|
|
|
%endif
|
|
|
|
enable-camellia \
|
2022-02-03 18:41:11 +01:00
|
|
|
zlib \
|
2018-02-16 13:13:08 +01:00
|
|
|
no-ec2m \
|
|
|
|
--prefix=%{_prefix} \
|
|
|
|
--libdir=%{_lib} \
|
|
|
|
--openssldir=%{ssletcdir} \
|
2018-10-25 15:55:29 +02:00
|
|
|
%{optflags} \
|
2021-11-30 10:07:05 +01:00
|
|
|
%if %{livepatchable}
|
|
|
|
-fpatchable-function-entry=16,14 -fdump-ipa-clones \
|
|
|
|
%endif
|
2018-02-16 13:13:08 +01:00
|
|
|
-Wa,--noexecstack \
|
|
|
|
-Wl,-z,relro,-z,now \
|
|
|
|
-fno-common \
|
|
|
|
-DTERMIO \
|
|
|
|
-DPURIFY \
|
|
|
|
-D_GNU_SOURCE \
|
|
|
|
-DOPENSSL_NO_BUF_FREELISTS \
|
|
|
|
$(getconf LFS_CFLAGS) \
|
2018-10-25 15:55:29 +02:00
|
|
|
-Wall \
|
2020-12-05 18:19:30 +01:00
|
|
|
--with-rand-seed=getrandom \
|
|
|
|
--system-ciphers-file=%{_sysconfdir}/crypto-policies/back-ends/openssl.config
|
2018-02-16 13:13:08 +01:00
|
|
|
|
2018-08-24 12:39:49 +02:00
|
|
|
# Show build configuration
|
|
|
|
perl configdata.pm --dump
|
|
|
|
|
2018-02-16 13:13:08 +01:00
|
|
|
util/mkdef.pl crypto update
|
|
|
|
make depend %{?_smp_mflags}
|
|
|
|
make all %{?_smp_mflags}
|
|
|
|
|
|
|
|
%check
|
|
|
|
export MALLOC_CHECK_=3
|
|
|
|
export MALLOC_PERTURB_=$(($RANDOM % 255 + 1))
|
2021-01-21 15:53:39 +01:00
|
|
|
#export HARNESS_VERBOSE=1
|
2022-01-28 18:51:43 +01:00
|
|
|
#export OPENSSL_FORCE_FIPS_MODE=1
|
2018-02-16 13:13:08 +01:00
|
|
|
LD_LIBRARY_PATH=`pwd` make test -j1
|
2021-01-21 15:53:39 +01:00
|
|
|
|
|
|
|
# show ciphers
|
2018-08-24 12:39:49 +02:00
|
|
|
gcc -o showciphers %{optflags} -I%{buildroot}%{_includedir} %{SOURCE5} -L%{buildroot}%{_libdir} -lssl -lcrypto
|
2018-02-16 13:13:08 +01:00
|
|
|
LD_LIBRARY_PATH=%{buildroot}%{_libdir} ./showciphers
|
|
|
|
|
|
|
|
%install
|
2021-11-30 10:07:05 +01:00
|
|
|
%if %{livepatchable}
|
|
|
|
|
|
|
|
# Ipa-clones are files generated by gcc which logs changes made across
|
|
|
|
# functions, and we need to know such changes to build livepatches
|
|
|
|
# correctly. These files are intended to be used by the livepatch
|
|
|
|
# developers and may be retrieved by using `osc getbinaries`.
|
|
|
|
#
|
|
|
|
# Create list of ipa-clones.
|
|
|
|
find . -name "*.ipa-clones" ! -empty | sed 's/^\.\///g' | sort > ipa-clones.list
|
|
|
|
|
|
|
|
# Create ipa-clones destination folder and move clones there.
|
|
|
|
mkdir -p ipa-clones/%{clones_dest_dir}
|
|
|
|
while read f; do
|
|
|
|
_dest=ipa-clones/%{clones_dest_dir}/$f
|
|
|
|
mkdir -p ${_dest%/*}
|
|
|
|
cp $f $_dest
|
|
|
|
done < ipa-clones.list
|
|
|
|
|
|
|
|
# Create tar package with the clone files.
|
|
|
|
tar cfJ %{tar_package_name} -C ipa-clones %{tar_basename}
|
|
|
|
|
|
|
|
# Copy tar package to the OTHERS folder
|
|
|
|
cp %{tar_package_name} %{_other}
|
|
|
|
|
|
|
|
%endif # livepatchable
|
|
|
|
|
2018-02-16 13:13:08 +01:00
|
|
|
%make_install %{?_smp_mflags}
|
|
|
|
# kill static libs
|
|
|
|
rm -f %{buildroot}%{_libdir}/lib*.a
|
2023-01-31 13:15:21 +01:00
|
|
|
|
|
|
|
# Rename the openssl CLI to openssl-1_1
|
|
|
|
mv %{buildroot}%{_bindir}/openssl %{buildroot}%{_bindir}/openssl-1_1
|
|
|
|
|
|
|
|
# Install the openssl-1_1.cnf config file
|
|
|
|
install -m 644 apps/openssl-1_1.cnf %{buildroot}%{_sysconfdir}/ssl/openssl-1_1.cnf
|
|
|
|
|
2018-02-16 13:13:08 +01:00
|
|
|
# remove the cnf.dist
|
2023-01-31 13:15:21 +01:00
|
|
|
rm -f %{buildroot}%{_sysconfdir}/ssl/openssl-1_1.cnf.dist
|
|
|
|
rm -f %{buildroot}%{_sysconfdir}/ssl/ct_log_list.cnf
|
|
|
|
rm -f %{buildroot}%{_sysconfdir}/ssl/ct_log_list.cnf.dist
|
2018-02-16 13:13:08 +01:00
|
|
|
ln -sf ./%{_rname} %{buildroot}/%{_includedir}/ssl
|
2023-01-31 13:15:21 +01:00
|
|
|
|
2018-02-16 13:13:08 +01:00
|
|
|
mkdir %{buildroot}/%{_datadir}/ssl
|
|
|
|
mv %{buildroot}/%{ssletcdir}/misc %{buildroot}/%{_datadir}/ssl/
|
2021-12-14 13:43:58 +01:00
|
|
|
# Create the two directories into which packages will drop their configuration
|
|
|
|
# files.
|
|
|
|
mkdir %{buildroot}/%{ssletcdir}/engines.d/
|
|
|
|
mkdir %{buildroot}/%{ssletcdir}/engdef.d/
|
2018-02-16 13:13:08 +01:00
|
|
|
|
|
|
|
# avoid file conflicts with man pages from other packages
|
|
|
|
#
|
|
|
|
pushd %{buildroot}/%{_mandir}
|
|
|
|
# some man pages now contain spaces. This makes several scripts go havoc, among them /usr/sbin/Check.
|
|
|
|
# replace spaces by underscores
|
|
|
|
#for i in man?/*\ *; do mv -v "$i" "${i// /_}"; done
|
|
|
|
which readlink &>/dev/null || function readlink { ( set +x; target=$(file $1 2>/dev/null); target=${target//* }; test -f $target && echo $target; ) }
|
|
|
|
for i in man?/*; do
|
2020-12-22 10:44:19 +01:00
|
|
|
if test -L $i ; then
|
|
|
|
LDEST=`readlink $i`
|
|
|
|
rm -f $i ${i}ssl
|
|
|
|
ln -sf ${LDEST}ssl ${i}ssl
|
|
|
|
else
|
|
|
|
mv $i ${i}ssl
|
2018-02-16 13:13:08 +01:00
|
|
|
fi
|
2020-12-22 10:44:19 +01:00
|
|
|
case "$i" in
|
|
|
|
*.1)
|
|
|
|
# these are the pages mentioned in openssl(1). They go into the main package.
|
|
|
|
echo %doc %{_mandir}/${i}ssl%{?ext_man} >> $OLDPWD/filelist;;
|
|
|
|
*)
|
|
|
|
# the rest goes into the openssl-doc package.
|
|
|
|
echo %doc %{_mandir}/${i}ssl%{?ext_man} >> $OLDPWD/filelist.doc;;
|
|
|
|
esac
|
2018-02-16 13:13:08 +01:00
|
|
|
done
|
|
|
|
popd
|
|
|
|
|
|
|
|
# Do not install demo scripts executable under /usr/share/doc
|
|
|
|
find demos -type f -perm /111 -exec chmod 644 {} \;
|
|
|
|
|
2019-12-11 08:08:38 +01:00
|
|
|
# Place showciphers.c for %%doc macro
|
2018-08-24 12:39:49 +02:00
|
|
|
cp %{SOURCE5} .
|
2018-02-16 13:13:08 +01:00
|
|
|
|
2020-01-24 16:19:27 +01:00
|
|
|
# the hmac hashes:
|
|
|
|
#
|
|
|
|
# this is a hack that re-defines the __os_install_post macro
|
|
|
|
# for a simple reason: the macro strips the binaries and thereby
|
|
|
|
# invalidates a HMAC that may have been created earlier.
|
|
|
|
# solution: create the hashes _after_ the macro runs.
|
|
|
|
#
|
2022-01-28 18:51:43 +01:00
|
|
|
# this shows up earlier because otherwise the expand of
|
2020-01-24 16:19:27 +01:00
|
|
|
# the macro is too late.
|
|
|
|
# remark: This is the same as running
|
|
|
|
# openssl dgst -sha256 -hmac 'ppaksykemnsecgtsttplmamstKMEs'
|
|
|
|
%{expand:%%global __os_install_post {%__os_install_post
|
|
|
|
|
2020-02-21 16:33:18 +01:00
|
|
|
# Point linker to the newly installed libcrypto in order to avoid BuildRequiring itself (libopenssl1_1)
|
|
|
|
export LD_LIBRARY_PATH="%{buildroot}%{_libdir}"
|
|
|
|
|
2020-01-24 16:19:27 +01:00
|
|
|
%{buildroot}%{_bindir}/fips_standalone_hmac \
|
|
|
|
%{buildroot}%{_libdir}/libssl.so.%{maj_min} > \
|
|
|
|
%{buildroot}%{_libdir}/.libssl.so.%{maj_min}.hmac
|
|
|
|
|
2020-02-21 16:33:18 +01:00
|
|
|
# As fips_standalone_hmac now uses the very same library it checksums,
|
|
|
|
# the libcrypto hmac needs to be saved to a temporary file, otherwise
|
|
|
|
# the library will detect the empty hmac and abort due to a wrong checksum
|
2020-01-24 16:19:27 +01:00
|
|
|
%{buildroot}%{_bindir}/fips_standalone_hmac \
|
|
|
|
%{buildroot}%{_libdir}/libcrypto.so.%{maj_min} > \
|
2020-02-21 16:33:18 +01:00
|
|
|
%{buildroot}%{_libdir}/.libcrypto.so.%{maj_min}.temphmac
|
|
|
|
|
|
|
|
# rename the temporary checksum to its proper name
|
|
|
|
mv %{buildroot}%{_libdir}/.libcrypto.so.%{maj_min}.temphmac %{buildroot}%{_libdir}/.libcrypto.so.%{maj_min}.hmac
|
|
|
|
unset LD_LIBRARY_PATH
|
2020-01-24 16:19:27 +01:00
|
|
|
|
|
|
|
}}
|
|
|
|
|
2018-02-16 13:13:08 +01:00
|
|
|
%post -n libopenssl1_1 -p /sbin/ldconfig
|
|
|
|
%postun -n libopenssl1_1 -p /sbin/ldconfig
|
|
|
|
|
|
|
|
%files -n libopenssl1_1
|
|
|
|
%license LICENSE
|
|
|
|
%{_libdir}/libssl.so.%{maj_min}
|
|
|
|
%{_libdir}/libcrypto.so.%{maj_min}
|
2020-01-24 16:19:27 +01:00
|
|
|
%{_libdir}/.libssl.so.%{maj_min}.hmac
|
|
|
|
%{_libdir}/.libcrypto.so.%{maj_min}.hmac
|
2023-05-31 11:13:51 +02:00
|
|
|
%{_libdir}/engines-%{maj_min}
|
2020-01-24 16:19:27 +01:00
|
|
|
|
2018-02-16 13:13:08 +01:00
|
|
|
%files -n libopenssl-1_1-devel
|
|
|
|
%{_includedir}/%{_rname}/
|
|
|
|
%{_includedir}/ssl
|
|
|
|
%{_libdir}/libssl.so
|
|
|
|
%{_libdir}/libcrypto.so
|
|
|
|
%{_libdir}/pkgconfig/libcrypto.pc
|
|
|
|
%{_libdir}/pkgconfig/libssl.pc
|
|
|
|
%{_libdir}/pkgconfig/openssl.pc
|
|
|
|
|
|
|
|
%files doc -f filelist.doc
|
|
|
|
%doc doc/* demos
|
|
|
|
%doc showciphers.c
|
|
|
|
|
|
|
|
%files -f filelist
|
|
|
|
%doc CHANGE* NEWS README
|
|
|
|
%dir %{ssletcdir}
|
2023-01-31 13:15:21 +01:00
|
|
|
%config (noreplace) %{ssletcdir}/openssl-1_1.cnf
|
2018-02-16 13:13:08 +01:00
|
|
|
%attr(700,root,root) %{ssletcdir}/private
|
2021-12-14 13:43:58 +01:00
|
|
|
%dir %{ssletcdir}/engines.d
|
|
|
|
%dir %{ssletcdir}/engdef.d
|
2018-02-16 13:13:08 +01:00
|
|
|
%dir %{_datadir}/ssl
|
|
|
|
%{_datadir}/ssl/misc
|
2023-01-31 13:15:21 +01:00
|
|
|
%{_bindir}/c_rehash-1_1
|
2020-01-24 16:19:27 +01:00
|
|
|
%{_bindir}/fips_standalone_hmac
|
2023-01-31 13:15:21 +01:00
|
|
|
%{_bindir}/openssl-1_1
|
2018-02-16 13:13:08 +01:00
|
|
|
|
|
|
|
%changelog
|