Blame SPECS/mingw-openssl.spec

e3ec62
%?mingw_package_header
e3ec62
e3ec62
# For the curious:
e3ec62
# 0.9.5a soversion = 0
e3ec62
# 0.9.6  soversion = 1
e3ec62
# 0.9.6a soversion = 2
e3ec62
# 0.9.6c soversion = 3
e3ec62
# 0.9.7a soversion = 4
e3ec62
# 0.9.7ef soversion = 5
e3ec62
# 0.9.8ab soversion = 6
e3ec62
# 0.9.8g soversion = 7
e3ec62
# 0.9.8jk + EAP-FAST soversion = 8
e3ec62
# 1.0.0 soversion = 10
e3ec62
%global soversion 10
e3ec62
e3ec62
# Enable the tests.
e3ec62
# These only work some of the time, but fail randomly at other times
e3ec62
# (although I have had them complete a few times, so I don't think
e3ec62
# there is any actual problem with the binaries).
e3ec62
%global run_tests 0
e3ec62
e3ec62
# Number of threads to spawn when testing some threading fixes.
e3ec62
%global thread_test_threads %{?threads:%{threads}}%{!?threads:1}
e3ec62
e3ec62
Name:           mingw-openssl
e3ec62
Version:        1.0.2k
e3ec62
Release:        2%{?dist}
e3ec62
Summary:        MinGW port of the OpenSSL toolkit
e3ec62
e3ec62
License:        OpenSSL
e3ec62
Group:          Development/Libraries
e3ec62
URL:            http://www.openssl.org/
e3ec62
e3ec62
# We have to remove certain patented algorithms from the openssl source
e3ec62
# tarball with the hobble-openssl script which is included below.
e3ec62
# The original openssl upstream tarball cannot be shipped in the .src.rpm.
e3ec62
Source:         openssl-%{version}-hobbled.tar.xz
e3ec62
e3ec62
Source1:        hobble-openssl
e3ec62
Source2:        Makefile.certificate
e3ec62
Source6:        make-dummy-cert
e3ec62
Source7:        renew-dummy-cert
e3ec62
Source8:        openssl-thread-test.c
e3ec62
Source9:        opensslconf-new.h
e3ec62
Source10:       opensslconf-new-warning.h
e3ec62
Source11:       README.FIPS
e3ec62
Source12:       ec_curve.c
e3ec62
Source13:       ectest.c
e3ec62
e3ec62
# Build changes
e3ec62
Patch1:         openssl-1.0.2e-rpmbuild.patch
e3ec62
Patch2:         openssl-1.0.2a-defaults.patch
e3ec62
Patch4:         openssl-1.0.2i-enginesdir.patch
e3ec62
Patch5:         openssl-1.0.2a-no-rpath.patch
e3ec62
Patch6:         openssl-1.0.2a-test-use-localhost.patch
e3ec62
Patch7:         openssl-1.0.0-timezone.patch
e3ec62
Patch8:         openssl-1.0.1c-perlfind.patch
e3ec62
Patch9:         openssl-1.0.1c-aliasing.patch
e3ec62
# Bug fixes
e3ec62
Patch23:        openssl-1.0.2c-default-paths.patch
e3ec62
Patch24:        openssl-1.0.2a-issuer-hash.patch
e3ec62
# Functionality changes
e3ec62
Patch33:        openssl-1.0.0-beta4-ca-dir.patch
e3ec62
Patch34:        openssl-1.0.2a-x509.patch
e3ec62
Patch35:        openssl-1.0.2a-version-add-engines.patch
e3ec62
# Patch39:        openssl-1.0.2a-ipv6-apps.patch
e3ec62
Patch40:        openssl-1.0.2i-fips.patch
e3ec62
Patch43:        openssl-1.0.2j-krb5keytab.patch
e3ec62
Patch45:        openssl-1.0.2a-env-zlib.patch
e3ec62
Patch47:        openssl-1.0.2a-readme-warning.patch
e3ec62
Patch49:        openssl-1.0.1i-algo-doc.patch
e3ec62
Patch50:        openssl-1.0.2a-dtls1-abi.patch
e3ec62
# Patch51:        openssl-1.0.2a-version.patch
e3ec62
# Patch56:        openssl-1.0.2a-rsa-x931.patch
e3ec62
Patch58:        openssl-1.0.2a-fips-md5-allow.patch
e3ec62
Patch60:        openssl-1.0.2a-apps-dgst.patch
e3ec62
# Patch63:        openssl-1.0.2k-starttls.patch
e3ec62
Patch65:        openssl-1.0.2i-chil-fixes.patch
e3ec62
Patch66:        openssl-1.0.2h-pkgconfig.patch
e3ec62
# Patch68:        openssl-1.0.2i-secure-getenv.patch
e3ec62
# Patch70:        openssl-1.0.2a-fips-ec.patch
e3ec62
Patch71:        openssl-1.0.2g-manfix.patch
e3ec62
# Patch72:        openssl-1.0.2a-fips-ctor.patch
e3ec62
Patch73:        openssl-1.0.2c-ecc-suiteb.patch
e3ec62
Patch74:        openssl-1.0.2j-deprecate-algos.patch
e3ec62
Patch75:        openssl-1.0.2a-compat-symbols.patch
e3ec62
# Patch76:        openssl-1.0.2j-new-fips-reqs.patch
e3ec62
Patch77:        openssl-1.0.2j-downgrade-strength.patch
e3ec62
Patch78:        openssl-1.0.2k-cc-reqs.patch
e3ec62
Patch90:        openssl-1.0.2i-enc-fail.patch
e3ec62
Patch94:        openssl-1.0.2d-secp256k1.patch
e3ec62
Patch95:        openssl-1.0.2e-remove-nistp224.patch
e3ec62
Patch96:        openssl-1.0.2e-speed-doc.patch
e3ec62
Patch97:        openssl-1.0.2k-no-ssl2.patch
e3ec62
Patch98:        openssl-1.0.2k-long-hello.patch
e3ec62
# Patch99:        openssl-1.0.2k-fips-randlock.patch
e3ec62
# Backported fixes including security fixes
e3ec62
Patch80:        openssl-1.0.2e-wrap-pad.patch
e3ec62
Patch81:        openssl-1.0.2a-padlock64.patch
e3ec62
Patch82:        openssl-1.0.2i-trusted-first-doc.patch
e3ec62
Patch83:        openssl-1.0.2k-backports.patch
e3ec62
Patch84:        openssl-1.0.2k-ppc-update.patch
e3ec62
Patch85:        openssl-1.0.2k-req-x509.patch
e3ec62
Patch86:        openssl-1.0.2k-cve-2017-3736.patch
e3ec62
Patch87:        openssl-1.0.2k-cve-2017-3737.patch
e3ec62
Patch88:        openssl-1.0.2k-cve-2017-3738.patch
e3ec62
Patch89:        openssl-1.0.2k-s390x-update.patch
e3ec62
Patch100:       openssl-1.0.2k-name-sensitive.patch
e3ec62
Patch101:       openssl-1.0.2k-cve-2017-3735.patch
e3ec62
Patch102:       openssl-1.0.2k-cve-2018-0732.patch
e3ec62
Patch103:       openssl-1.0.2k-cve-2018-0737.patch
e3ec62
Patch104:       openssl-1.0.2k-cve-2018-0739.patch
e3ec62
Patch105:       openssl-1.0.2k-cve-2018-0495.patch
e3ec62
e3ec62
# MinGW-specific patches.
e3ec62
# Rename *eay32.dll to lib*.dll
e3ec62
Patch1001:      mingw32-openssl-1.0.0-beta3-libversion.patch
e3ec62
# Fix engines/ install target after lib rename
e3ec62
Patch1002:      mingw32-openssl-1.0.2a-sfx.patch
e3ec62
# Some .c file contains in #include <dlfcn.h> while it
e3ec62
# doesn't really use anything from that header
e3ec62
Patch1003:      mingw-openssl-drop-unneeded-reference-to-dlfcn-h.patch
e3ec62
# Mingw-w64 compatibility patch
e3ec62
Patch1004:      openssl_mingw64_install_fix.patch
e3ec62
# Prevent a build failure which occurs because we don't have FIPS enabled
e3ec62
Patch1005:      mingw-openssl-fix-fips-build-failure.patch
e3ec62
# The function secure_getenv is a GNU extension which isn't available on Windows
e3ec62
Patch1006:      openssl-mingw64-dont-use-secure-getenv.patch
e3ec62
# Don't include the old winsock.h as it will cause warnings/errors in packages
e3ec62
# using the openssl headers like: Please include winsock2.h before windows.h
e3ec62
Patch1007:      openssl-dont-include-winsock-h.patch
e3ec62
e3ec62
BuildArch:      noarch
e3ec62
ExclusiveArch: %{ix86} x86_64
e3ec62
e3ec62
BuildRequires:  mingw32-filesystem >= 95
e3ec62
BuildRequires:  mingw32-gcc
e3ec62
BuildRequires:  mingw32-binutils
e3ec62
BuildRequires:  mingw32-zlib
e3ec62
e3ec62
BuildRequires:  mingw64-filesystem >= 95
e3ec62
BuildRequires:  mingw64-gcc
e3ec62
BuildRequires:  mingw64-binutils
e3ec62
BuildRequires:  mingw64-zlib
e3ec62
e3ec62
BuildRequires:  perl-interpreter
e3ec62
BuildRequires:  sed
e3ec62
BuildRequires:  /usr/bin/cmp
e3ec62
BuildRequires:  lksctp-tools-devel
e3ec62
BuildRequires:  /usr/bin/rename
e3ec62
BuildRequires:  /usr/bin/pod2man
e3ec62
e3ec62
# XXX Not really sure about this one.  The build script uses
e3ec62
# /usr/bin/makedepend which comes from imake.
e3ec62
BuildRequires:  imake
e3ec62
e3ec62
%if %{run_tests}
e3ec62
# Required both to build, and to run the tests.
e3ec62
# XXX This needs to be fixed - cross-compilation should not
e3ec62
# require running executables.
e3ec62
BuildRequires:  wine
e3ec62
e3ec62
# Required to run the tests.
e3ec62
BuildRequires:  xorg-x11-server-Xvfb
e3ec62
%endif
e3ec62
e3ec62
e3ec62
%description
e3ec62
The OpenSSL toolkit provides support for secure communications between
e3ec62
machines. OpenSSL includes a certificate management tool and shared
e3ec62
libraries which provide various cryptographic algorithms and
e3ec62
protocols.
e3ec62
e3ec62
This package contains Windows (MinGW) libraries and development tools.
e3ec62
e3ec62
e3ec62
# Win32
e3ec62
%package -n mingw32-openssl
e3ec62
Summary:        MinGW port of the OpenSSL toolkit
e3ec62
#Requires:       ca-certificates >= 2008-5
e3ec62
Requires:       pkgconfig
e3ec62
e3ec62
%description -n mingw32-openssl
e3ec62
The OpenSSL toolkit provides support for secure communications between
e3ec62
machines. OpenSSL includes a certificate management tool and shared
e3ec62
libraries which provide various cryptographic algorithms and
e3ec62
protocols.
e3ec62
e3ec62
This package contains Windows (MinGW) libraries and development tools.
e3ec62
e3ec62
%package -n mingw32-openssl-static
e3ec62
Summary:        Static version of the MinGW port of the OpenSSL toolkit
e3ec62
Requires:       mingw32-openssl = %{version}-%{release}
e3ec62
e3ec62
%description -n mingw32-openssl-static
e3ec62
Static version of the MinGW port of the OpenSSL toolkit.
e3ec62
e3ec62
# Win64
e3ec62
%package -n mingw64-openssl
e3ec62
Summary:        MinGW port of the OpenSSL toolkit
e3ec62
#Requires:       ca-certificates >= 2008-5
e3ec62
Requires:       pkgconfig
e3ec62
e3ec62
%description -n mingw64-openssl
e3ec62
The OpenSSL toolkit provides support for secure communications between
e3ec62
machines. OpenSSL includes a certificate management tool and shared
e3ec62
libraries which provide various cryptographic algorithms and
e3ec62
protocols.
e3ec62
e3ec62
This package contains Windows (MinGW) libraries and development tools.
e3ec62
e3ec62
%package -n mingw64-openssl-static
e3ec62
Summary:        Static version of the MinGW port of the OpenSSL toolkit
e3ec62
Requires:       mingw64-openssl = %{version}-%{release}
e3ec62
e3ec62
%description -n mingw64-openssl-static
e3ec62
Static version of the MinGW port of the OpenSSL toolkit.
e3ec62
e3ec62
e3ec62
%?mingw_debug_package
e3ec62
e3ec62
e3ec62
%prep
e3ec62
%setup -q -n openssl-%{version}
e3ec62
e3ec62
# The hobble_openssl is called here redundantly, just to be sure.
e3ec62
# The tarball has already the sources removed.
e3ec62
%{SOURCE1} > /dev/null
e3ec62
e3ec62
cp %{SOURCE12} %{SOURCE13} crypto/ec/
e3ec62
e3ec62
%patch1 -p1 -b .rpmbuild
e3ec62
%patch2 -p1 -b .defaults
e3ec62
%patch4 -p1 -b .enginesdir %{?_rawbuild}
e3ec62
%patch5 -p1 -b .no-rpath
e3ec62
%patch6 -p1 -b .use-localhost
e3ec62
%patch7 -p1 -b .timezone
e3ec62
%patch8 -p1 -b .perlfind %{?_rawbuild}
e3ec62
%patch9 -p1 -b .aliasing
e3ec62
e3ec62
%patch23 -p1 -b .default-paths
e3ec62
%patch24 -p1 -b .issuer-hash
e3ec62
e3ec62
%patch33 -p1 -b .ca-dir
e3ec62
%patch34 -p1 -b .x509
e3ec62
%patch35 -p1 -b .version-add-engines
e3ec62
#patch39 -p1 -b .ipv6-apps
e3ec62
%patch40 -p1 -b .fips
e3ec62
%patch43 -p1 -b .krb5keytab
e3ec62
%patch45 -p1 -b .env-zlib
e3ec62
%patch47 -p1 -b .warning
e3ec62
%patch49 -p1 -b .algo-doc
e3ec62
%patch50 -p1 -b .dtls1-abi
e3ec62
#patch51 -p1 -b .version
e3ec62
#patch56 -p1 -b .x931
e3ec62
%patch58 -p1 -b .md5-allow
e3ec62
%patch60 -p1 -b .dgst
e3ec62
#patch63 -p1 -b .starttls
e3ec62
%patch65 -p1 -b .chil
e3ec62
%patch66 -p1 -b .pkgconfig
e3ec62
#patch68 -p1 -b .secure-getenv
e3ec62
#patch70 -p1 -b .fips-ec
e3ec62
%patch71 -p1 -b .manfix
e3ec62
#patch72 -p1 -b .fips-ctor
e3ec62
%patch73 -p1 -b .suiteb
e3ec62
%patch74 -p1 -b .deprecate-algos
e3ec62
%patch75 -p1 -b .compat
e3ec62
#patch76 -p1 -b .fips-reqs
e3ec62
%patch77 -p1 -b .strength
e3ec62
%patch78 -p1 -b .cc-reqs
e3ec62
%patch90 -p1 -b .enc-fail
e3ec62
%patch94 -p1 -b .secp256k1
e3ec62
%patch95 -p1 -b .nistp224
e3ec62
%patch96 -p1 -b .speed-doc
e3ec62
%patch97 -p1 -b .no-ssl2
e3ec62
%patch98 -p1 -b .long-hello
e3ec62
#patch99 -p1 -b .randlock
e3ec62
e3ec62
%patch80 -p1 -b .wrap
e3ec62
%patch81 -p1 -b .padlock64
e3ec62
%patch82 -p1 -b .trusted-first
e3ec62
%patch83 -p1 -b .backports
e3ec62
%patch84 -p1 -b .ppc-update
e3ec62
%patch85 -p1 -b .req-x509
e3ec62
%patch86 -p1 -b .mont5-carry
e3ec62
%patch87 -p1 -b .ssl-err
e3ec62
%patch88 -p1 -b .rsaz-overflow
e3ec62
%patch89 -p1 -b .s390x-update
e3ec62
%patch100 -p1 -b .name-sensitive
e3ec62
%patch101 -p1 -b .overread
e3ec62
%patch102 -p1 -b .large-dh
e3ec62
%patch103 -p1 -b .gen-timing
e3ec62
%patch104 -p1 -b .asn1-recursive
e3ec62
%patch105 -p1 -b .rohnp-fix
e3ec62
e3ec62
# MinGW specific patches
e3ec62
%patch1001 -p1 -b .mingw-libversion
e3ec62
%patch1002 -p1 -b .mingw-sfx
e3ec62
%patch1003 -p0 -b .dlfcn
e3ec62
%patch1004 -p0 -b .mingw64
e3ec62
%patch1005 -p1 -b .fips_mingw
e3ec62
%patch1006 -p1 -b .secure_getenv_mingw
e3ec62
%patch1007 -p0 -b .winsock
e3ec62
e3ec62
sed -i 's/SHLIB_VERSION_NUMBER "1.0.0"/SHLIB_VERSION_NUMBER "%{version}"/' crypto/opensslv.h
e3ec62
e3ec62
# Modify the various perl scripts to reference perl in the right location.
e3ec62
perl util/perlpath.pl `dirname %{__perl}`
e3ec62
e3ec62
# Generate a table with the compile settings for my perusal.
e3ec62
touch Makefile
e3ec62
make TABLE PERL=%{__perl}
e3ec62
e3ec62
# Create two copies of the source folder as OpenSSL doesn't support out of source builds
e3ec62
mkdir ../build_win32
e3ec62
mv * ../build_win32
e3ec62
mv ../build_win32 .
e3ec62
mkdir build_win64
e3ec62
cp -Rp build_win32/* build_win64
e3ec62
e3ec62
# Use mingw cflags instead of hardcoded ones
e3ec62
sed -i -e '/^"mingw"/ s/-fomit-frame-pointer -O3 -march=i486 -Wall/%{mingw32_cflags}/' build_win32/Configure
e3ec62
sed -i -e '/^"mingw"/ s/-O3 -Wall/%{mingw64_cflags}/' build_win64/Configure
e3ec62
e3ec62
e3ec62
%build
e3ec62
###############################################################################
e3ec62
# Win32
e3ec62
###############################################################################
e3ec62
pushd build_win32
e3ec62
e3ec62
PERL=%{__perl} \
e3ec62
./Configure \
e3ec62
  --prefix=%{mingw32_prefix} \
e3ec62
  --openssldir=%{mingw32_sysconfdir}/pki/tls \
e3ec62
  zlib enable-camellia enable-seed enable-tlsext enable-rfc3779 \
e3ec62
  enable-cms enable-md2 enable-rc5 \
e3ec62
  no-mdc2 no-ec2m no-gost no-srp \
e3ec62
  no-fips no-hw \
e3ec62
  --cross-compile-prefix=%{mingw32_target}- \
e3ec62
  --enginesdir=%{mingw32_libdir}/openssl/engines \
e3ec62
  shared mingw
e3ec62
e3ec62
# Regenerate def files as we disabled some algorithms above
e3ec62
perl util/mkdef.pl crypto ssl update
e3ec62
e3ec62
make depend
e3ec62
make all build-shared
e3ec62
e3ec62
# Generate hashes for the included certs.
e3ec62
make rehash build-shared
e3ec62
e3ec62
popd
e3ec62
e3ec62
###############################################################################
e3ec62
# Win64
e3ec62
###############################################################################
e3ec62
pushd build_win64
e3ec62
e3ec62
PERL=%{__perl} \
e3ec62
./Configure \
e3ec62
  --prefix=%{mingw64_prefix} \
e3ec62
  --openssldir=%{mingw64_sysconfdir}/pki/tls \
e3ec62
  zlib enable-camellia enable-seed enable-tlsext enable-rfc3779 \
e3ec62
  enable-cms enable-md2 \
e3ec62
  no-mdc2 no-rc5 no-ec2m no-gost no-srp \
e3ec62
  no-fips no-hw \
e3ec62
  --cross-compile-prefix=%{mingw64_target}- \
e3ec62
  --enginesdir=%{mingw64_libdir}/openssl/engines \
e3ec62
  shared mingw64
e3ec62
e3ec62
# Regenerate def files as we disabled some algorithms above
e3ec62
perl util/mkdef.pl crypto ssl update
e3ec62
e3ec62
make depend
e3ec62
make all build-shared
e3ec62
e3ec62
# Generate hashes for the included certs.
e3ec62
make rehash build-shared
e3ec62
e3ec62
popd
e3ec62
e3ec62
# Clean up the .pc files
e3ec62
for i in build_win{32,64}/libcrypto.pc build_win{32,64}/libssl.pc build_win{32,64}/openssl.pc ; do
e3ec62
  sed -i '/^Libs.private:/{s/-L[^ ]* //;s/-Wl[^ ]* //}' $i
e3ec62
done
e3ec62
e3ec62
e3ec62
%if %{run_tests}
e3ec62
%check
e3ec62
#----------------------------------------------------------------------
e3ec62
# Run some tests.
e3ec62
e3ec62
# We must revert patch33 before tests otherwise they will fail
e3ec62
patch -p1 -R < %{PATCH33}
e3ec62
e3ec62
# This is a bit of a hack, but the test scripts look for 'openssl'
e3ec62
# by name.
e3ec62
pushd build_win32/apps
e3ec62
ln -s openssl.exe openssl
e3ec62
popd
e3ec62
e3ec62
# This is useful for diagnosing Wine problems.
e3ec62
WINEDEBUG=+loaddll
e3ec62
export WINEDEBUG
e3ec62
e3ec62
# Make sure we can find the installed DLLs.
e3ec62
WINEDLLPATH=%{mingw32_bindir}
e3ec62
export WINEDLLPATH
e3ec62
e3ec62
# The tests run Wine and require an X server (but don't really use
e3ec62
# it).  Therefore we create a virtual framebuffer for the duration of
e3ec62
# the tests.
e3ec62
# XXX There is no good way to choose a random, unused display.
e3ec62
# XXX Setting depth to 24 bits avoids bug 458219.
e3ec62
unset DISPLAY
e3ec62
display=:21
e3ec62
Xvfb $display -screen 0 1024x768x24 -ac -noreset & xpid=$!
e3ec62
trap "kill -TERM $xpid ||:" EXIT
e3ec62
sleep 3
e3ec62
DISPLAY=$display
e3ec62
export DISPLAY
e3ec62
e3ec62
make LDCMD=%{mingw32_cc} -C build_win32/test apps tests
e3ec62
e3ec62
# Disable this thread test, because we don't have pthread on Windows.
e3ec62
%{mingw32_cc} -o openssl-thread-test \
e3ec62
  -I./build_win32/include \
e3ec62
  %-{_mingw32_cflags} \
e3ec62
  %-{SOURCE8} \
e3ec62
  -L./build_win32 \
e3ec62
  -lssl -lcrypto \
e3ec62
  -lpthread -lz -ldl
e3ec62
e3ec62
## `krb5-config --cflags`
e3ec62
## `krb5-config --libs`
e3ec62
#
e3ec62
./openssl-thread-test --threads %{thread_test_threads}
e3ec62
e3ec62
#----------------------------------------------------------------------
e3ec62
%endif
e3ec62
e3ec62
# Add generation of HMAC checksum of the final stripped library
e3ec62
##define __spec_install_post \
e3ec62
#    #{?__debug_package:#{__debug_install_post}} \
e3ec62
#    #{__arch_install_post} \
e3ec62
#    #{__os_install_post} \
e3ec62
#    fips/fips_standalone_sha1 $RPM_BUILD_ROOT/#{_lib}/libcrypto.so.#{version} >$RPM_BUILD_ROOT/#{_lib}/.libcrypto.so.#{version}.hmac \
e3ec62
#    ln -sf .libcrypto.so.#{version}.hmac $RPM_BUILD_ROOT/#{_lib}/.libcrypto.so.#{soversion}.hmac \
e3ec62
##{nil}
e3ec62
e3ec62
e3ec62
%install
e3ec62
mkdir -p $RPM_BUILD_ROOT%{mingw32_libdir}/openssl
e3ec62
mkdir -p $RPM_BUILD_ROOT%{mingw32_bindir}
e3ec62
mkdir -p $RPM_BUILD_ROOT%{mingw32_includedir}
e3ec62
mkdir -p $RPM_BUILD_ROOT%{mingw32_mandir}
e3ec62
e3ec62
mkdir -p $RPM_BUILD_ROOT%{mingw64_libdir}/openssl
e3ec62
mkdir -p $RPM_BUILD_ROOT%{mingw64_bindir}
e3ec62
mkdir -p $RPM_BUILD_ROOT%{mingw64_includedir}
e3ec62
mkdir -p $RPM_BUILD_ROOT%{mingw64_mandir}
e3ec62
e3ec62
%mingw_make_install INSTALL_PREFIX=$RPM_BUILD_ROOT build-shared
e3ec62
e3ec62
# Install the file applink.c (#499934)
e3ec62
install -m644 build_win32/ms/applink.c $RPM_BUILD_ROOT%{mingw32_includedir}/openssl/applink.c
e3ec62
install -m644 build_win64/ms/applink.c $RPM_BUILD_ROOT%{mingw64_includedir}/openssl/applink.c
e3ec62
e3ec62
# I have no idea why it installs the manpages in /etc, but
e3ec62
# we remove them anyway.
e3ec62
rm -r $RPM_BUILD_ROOT%{mingw32_sysconfdir}/pki/tls/man
e3ec62
rm -r $RPM_BUILD_ROOT%{mingw64_sysconfdir}/pki/tls/man
e3ec62
e3ec62
# Set permissions on lib*.dll.a so that strip works.
e3ec62
chmod 0755 $RPM_BUILD_ROOT%{mingw32_libdir}/libcrypto.dll.a
e3ec62
chmod 0755 $RPM_BUILD_ROOT%{mingw32_libdir}/libssl.dll.a
e3ec62
chmod 0755 $RPM_BUILD_ROOT%{mingw64_libdir}/libcrypto.dll.a
e3ec62
chmod 0755 $RPM_BUILD_ROOT%{mingw64_libdir}/libssl.dll.a
e3ec62
e3ec62
# Install a makefile for generating keys and self-signed certs, and a script
e3ec62
# for generating them on the fly.
e3ec62
mkdir -p $RPM_BUILD_ROOT%{mingw32_sysconfdir}/pki/tls/certs
e3ec62
install -m644 %{SOURCE2} $RPM_BUILD_ROOT%{mingw32_sysconfdir}/pki/tls/certs/Makefile
e3ec62
install -m755 %{SOURCE6} $RPM_BUILD_ROOT%{mingw32_sysconfdir}/pki/tls/certs/make-dummy-cert
e3ec62
install -m755 %{SOURCE7} $RPM_BUILD_ROOT%{mingw32_sysconfdir}/pki/tls/certs/renew-dummy-cert
e3ec62
e3ec62
mkdir -p $RPM_BUILD_ROOT%{mingw64_sysconfdir}/pki/tls/certs
e3ec62
install -m644 %{SOURCE2} $RPM_BUILD_ROOT%{mingw64_sysconfdir}/pki/tls/certs/Makefile
e3ec62
install -m755 %{SOURCE6} $RPM_BUILD_ROOT%{mingw64_sysconfdir}/pki/tls/certs/make-dummy-cert
e3ec62
install -m755 %{SOURCE7} $RPM_BUILD_ROOT%{mingw64_sysconfdir}/pki/tls/certs/renew-dummy-cert
e3ec62
e3ec62
# Pick a CA script.
e3ec62
pushd $RPM_BUILD_ROOT%{mingw32_sysconfdir}/pki/tls/misc
e3ec62
mv CA.sh CA
e3ec62
popd
e3ec62
e3ec62
pushd $RPM_BUILD_ROOT%{mingw64_sysconfdir}/pki/tls/misc
e3ec62
mv CA.sh CA
e3ec62
popd
e3ec62
e3ec62
mkdir -m700 $RPM_BUILD_ROOT%{mingw32_sysconfdir}/pki/CA
e3ec62
mkdir -m700 $RPM_BUILD_ROOT%{mingw32_sysconfdir}/pki/CA/private
e3ec62
e3ec62
mkdir -m700 $RPM_BUILD_ROOT%{mingw64_sysconfdir}/pki/CA
e3ec62
mkdir -m700 $RPM_BUILD_ROOT%{mingw64_sysconfdir}/pki/CA/private
e3ec62
e3ec62
# Exclude debug files from the main files (note: the debug files are only created after %%install, so we can't search for them directly)
e3ec62
find %{buildroot}%{mingw32_prefix} | grep -E '.(exe|dll|pyd)$' | sed 's|^%{buildroot}\(.*\)$|%%exclude \1.debug|' > mingw32-openssl.debugfiles
e3ec62
find %{buildroot}%{mingw64_prefix} | grep -E '.(exe|dll|pyd)$' | sed 's|^%{buildroot}\(.*\)$|%%exclude \1.debug|' > mingw64-openssl.debugfiles
e3ec62
e3ec62
e3ec62
# Win32
e3ec62
%files -n mingw32-openssl -f mingw32-openssl.debugfiles
e3ec62
%doc build_win32/LICENSE
e3ec62
%{mingw32_bindir}/openssl.exe
e3ec62
%{mingw32_bindir}/c_rehash
e3ec62
%{mingw32_bindir}/libcrypto-%{soversion}.dll
e3ec62
%{mingw32_bindir}/libssl-%{soversion}.dll
e3ec62
%{mingw32_libdir}/libcrypto.dll.a
e3ec62
%{mingw32_libdir}/libssl.dll.a
e3ec62
%{mingw32_libdir}/engines
e3ec62
%{mingw32_libdir}/pkgconfig/*.pc
e3ec62
%{mingw32_includedir}/openssl
e3ec62
%config(noreplace) %{mingw32_sysconfdir}/pki
e3ec62
e3ec62
%files -n mingw32-openssl-static
e3ec62
%{mingw32_libdir}/libcrypto.a
e3ec62
%{mingw32_libdir}/libssl.a
e3ec62
e3ec62
# Win64
e3ec62
%files -n mingw64-openssl -f mingw64-openssl.debugfiles
e3ec62
%doc build_win64/LICENSE
e3ec62
%{mingw64_bindir}/openssl.exe
e3ec62
%{mingw64_bindir}/c_rehash
e3ec62
%{mingw64_bindir}/libcrypto-%{soversion}.dll
e3ec62
%{mingw64_bindir}/libssl-%{soversion}.dll
e3ec62
%{mingw64_libdir}/libcrypto.dll.a
e3ec62
%{mingw64_libdir}/libssl.dll.a
e3ec62
%{mingw64_libdir}/engines
e3ec62
%{mingw64_libdir}/pkgconfig/*.pc
e3ec62
%{mingw64_includedir}/openssl
e3ec62
%config(noreplace) %{mingw64_sysconfdir}/pki
e3ec62
e3ec62
%files -n mingw64-openssl-static
e3ec62
%{mingw64_libdir}/libcrypto.a
e3ec62
%{mingw64_libdir}/libssl.a
e3ec62
e3ec62
e3ec62
%changelog
e3ec62
* Mon Aug 19 2019 Victor Toso <victortoso@redhat.com> - 1.0.2k-2
e3ec62
- Remove not applied patchs from the source list
e3ec62
  Related: rhbz#1704077
e3ec62
e3ec62
* Fri Aug 24 2018 Christophe Fergeau <cfergeau@redhat.com> - 1.0.2k-1
e3ec62
- Sync with rhel 7.6 OpenSSL 1.0.2k+patches in order to get the latest security
e3ec62
  fixes
e3ec62
- Related: rhbz#1615874
e3ec62
e3ec62
* Tue Aug 14 2018 Victor Toso <victortoso@redhat.com> - 1.0.2h-7
e3ec62
- ExclusiveArch: i686, x86_64
e3ec62
- Related: rhbz#1615874
e3ec62
e3ec62
* Thu May 31 2018 Richard W.M. Jones <rjones@redhat.com> - 1.0.2h-6
e3ec62
- Remove mktemp build dependency, part of coreutils.
e3ec62
e3ec62
* Thu Feb 08 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.2h-5
e3ec62
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
e3ec62
e3ec62
* Sat Sep 09 2017 Sandro Mani <manisandro@gmail.com> - 1.0.2h-4
e3ec62
- Exclude *.debug files from non-debug packages
e3ec62
e3ec62
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.2h-3
e3ec62
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
e3ec62
e3ec62
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.2h-2
e3ec62
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
e3ec62
e3ec62
* Sat May  7 2016 Erik van Pienbroek <epienbro@fedoraproject.org> - 1.0.2h-1
e3ec62
- Synced with native openssl-1.0.2h-1
e3ec62
- Fixes RHBZ #1332591 #1332589 #1330104 #1312861 #1312857 #1307773 #1302768
e3ec62
e3ec62
* Sat Feb  6 2016 Erik van Pienbroek <epienbro@fedoraproject.org> - 1.0.2f-1
e3ec62
- Synced with native openssl-1.0.2f-2
e3ec62
- Fixes RHBZ #1239685 #1290334 #1302768
e3ec62
e3ec62
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.2a-3
e3ec62
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
e3ec62
e3ec62
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.2a-2
e3ec62
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
e3ec62
e3ec62
* Fri Apr 24 2015 Erik van Pienbroek <epienbro@fedoraproject.org> - 1.0.2a-1
e3ec62
- Synced with native openssl-1.0.2a-1.fc23
e3ec62
- Fixes various CVE's (RHBZ #1203855 #1203856)
e3ec62
e3ec62
* Mon Dec 22 2014 Erik van Pienbroek <epienbro@fedoraproject.org> - 1.0.1j-1
e3ec62
- Synced with native openssl-1.0.1j-3.fc22
e3ec62
- Add support for RFC 5649
e3ec62
- Prevent compiler warning "Please include winsock2.h before windows.h"
e3ec62
  when using the OpenSSL headers
e3ec62
- Fixes various CVE's (RHBZ #1127889 #1127709 #1152851)
e3ec62
e3ec62
* Thu Aug 21 2014 Marc-André Lureau <marcandre.lureau@redhat.com> - 1.0.1i-1
e3ec62
- Synced with native openssl-1.0.1i-3.fc21
e3ec62
- Fixes various flaws (RHBZ#1096234 and RHBZ#1127705)
e3ec62
  CVE-2014-3505 CVE-2014-3506 CVE-2014-3507 CVE-2014-3511
e3ec62
  CVE-2014-3510 CVE-2014-3508 CVE-2014-3509 CVE-2014-0221
e3ec62
  CVE-2014-0198 CVE-2014-0224 CVE-2014-0195 CVE-2010-5298
e3ec62
  CVE-2014-3470
e3ec62
e3ec62
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.1e-7
e3ec62
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
e3ec62
e3ec62
* Wed Apr  9 2014 Erik van Pienbroek <epienbro@fedoraproject.org> - 1.0.1e-6
e3ec62
- Synced patches with native openssl-1.0.1e-44.fc21
e3ec62
- Fixes CVE-2014-0160 (RHBZ #1085066)
e3ec62
e3ec62
* Sat Jan 25 2014 Erik van Pienbroek <epienbro@fedoraproject.org> - 1.0.1e-5
e3ec62
- Synced patches with native openssl-1.0.1e-38.fc21
e3ec62
- Enable ECC support (RHBZ #1037919)
e3ec62
- Fixes CVE-2013-6450 (RHBZ #1047844)
e3ec62
- Fixes CVE-2013-4353 (RHBZ #1049062)
e3ec62
- Fixes CVE-2013-6449 (RHBZ #1045444)
e3ec62
e3ec62
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.1e-4
e3ec62
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
e3ec62
e3ec62
* Wed Jul 10 2013 Erik van Pienbroek <epienbro@fedoraproject.org> - 1.0.1e-3
e3ec62
- Rebuild to resolve InterlockedCompareExchange regression in mingw32 libraries
e3ec62
e3ec62
* Fri May 10 2013 Erik van Pienbroek <epienbro@fedoraproject.org> - 1.0.1e-2
e3ec62
- Fix build of manual pages with current pod2man (#959439)
e3ec62
e3ec62
* Sun Mar 24 2013 Erik van Pienbroek <epienbro@fedoraproject.org> - 1.0.1e-1
e3ec62
- Update to 1.0.1e (RHBZ #920868)
e3ec62
- Synced patches with native openssl-1.0.1e-4.fc19
e3ec62
e3ec62
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.1c-3
e3ec62
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
e3ec62
e3ec62
* Fri Jan 11 2013 Erik van Pienbroek <epienbro@fedoraproject.org> - 1.0.1c-2
e3ec62
- Fix FTBFS against latest pod2man
e3ec62
e3ec62
* Fri Nov  9 2012 Erik van Pienbroek <epienbro@fedoraproject.org> - 1.0.1c-1
e3ec62
- Update to 1.0.1c
e3ec62
- Synced patches with native openssl-1.0.1c-7.fc19
e3ec62
e3ec62
* Fri Jul 20 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.0d-7
e3ec62
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
e3ec62
e3ec62
* Sat Mar 10 2012 Erik van Pienbroek <epienbro@fedoraproject.org> - 1.0.0d-6
e3ec62
- Added win64 support
e3ec62
e3ec62
* Wed Mar 07 2012 Kalev Lember <kalevlember@gmail.com> - 1.0.0d-5
e3ec62
- Pass the path to perl interpreter to Configure
e3ec62
e3ec62
* Tue Mar 06 2012 Kalev Lember <kalevlember@gmail.com> - 1.0.0d-4
e3ec62
- Renamed the source package to mingw-openssl (#800443)
e3ec62
- Modernize the spec file
e3ec62
- Use mingw macros without leading underscore
e3ec62
e3ec62
* Mon Feb 27 2012 Erik van Pienbroek <epienbro@fedoraproject.org> - 1.0.0d-3
e3ec62
- Rebuild against the mingw-w64 toolchain
e3ec62
e3ec62
* Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.0d-2
e3ec62
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
e3ec62
e3ec62
* Sat Apr 23 2011 Kalev Lember <kalev@smartlink.ee> - 1.0.0d-1
e3ec62
- Update to 1.0.0d
e3ec62
- Synced patches with Fedora native openssl-1.0.0d-2
e3ec62
e3ec62
* Fri Mar 04 2011 Kai Tietz <ktietz@redhat.com>
e3ec62
- Fixes for CVE-2011-0014 openssl: OCSP stapling vulnerability
e3ec62
e3ec62
* Thu Mar  3 2011 Kai Tietz <ktietz@redhat.com> - 1.0.0a-3
e3ec62
- Bump and rebuild.
e3ec62
e3ec62
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.0a-2
e3ec62
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
e3ec62
e3ec62
* Sat Jun 19 2010 Kalev Lember <kalev@smartlink.ee> - 1.0.0a-1
e3ec62
- Updated to openssl 1.0.0a
e3ec62
- Synced patches with Fedora native openssl-1.0.0a-1
e3ec62
- Use sed to fix up cflags instead of unmaintainable patch
e3ec62
- Rebased mingw32 specific patches
e3ec62
- Disabled capieng to fix build
e3ec62
- Properly regenerate def files with mkdef.pl and drop linker-fix.patch
e3ec62
e3ec62
* Thu Nov 26 2009 Kalev Lember <kalev@smartlink.ee> - 1.0.0-0.6.beta4
e3ec62
- Merged patches from native Fedora openssl (up to 1.0.0-0.16.beta4)
e3ec62
- Dropped the patch to fix non-fips mingw build,
e3ec62
  as it's now merged into fips patch from native openssl
e3ec62
e3ec62
* Sun Nov 22 2009 Kalev Lember <kalev@smartlink.ee> - 1.0.0-0.5.beta4
e3ec62
- Updated to version 1.0.0 beta 4
e3ec62
- Merged patches from native Fedora openssl (up to 1.0.0-0.15.beta4)
e3ec62
- Added patch to fix build with fips disabled
e3ec62
e3ec62
* Fri Sep 18 2009 Kalev Lember <kalev@smartlink.ee> - 1.0.0-0.4.beta3
e3ec62
- Rebuilt to fix debuginfo
e3ec62
e3ec62
* Sun Aug 30 2009 Kalev Lember <kalev@smartlink.ee> - 1.0.0-0.3.beta3
e3ec62
- Simplified the lib renaming patch
e3ec62
e3ec62
* Sun Aug 30 2009 Erik van Pienbroek <epienbro@fedoraproject.org> - 1.0.0-0.2.beta3
e3ec62
- Fixed invalid RPM Provides
e3ec62
e3ec62
* Fri Aug 28 2009 Erik van Pienbroek <epienbro@fedoraproject.org> - 1.0.0-0.1.beta3
e3ec62
- Update to version 1.0.0 beta 3
e3ec62
- Use %%global instead of %%define
e3ec62
- Automatically generate debuginfo subpackage
e3ec62
- Merged various changes from the native Fedora package (up to 1.0.0-0.5.beta3)
e3ec62
- Don't use the %%{_mingw32_make} macro anymore as it's ugly and causes side-effects
e3ec62
- Added missing BuildRequires mingw32-dlfcn (Kalev Lember)
e3ec62
- Reworked patches to rename *eay32.dll to lib*.dll (Kalev Lember)
e3ec62
- Patch Configure script to use %%{_mingw32_cflags} (Kalev Lember)
e3ec62
e3ec62
* Sat Jul 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.8j-7
e3ec62
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
e3ec62
e3ec62
* Sat May  9 2009 Erik van Pienbroek <epienbro@fedoraproject.org> - 0.9.8j-6
e3ec62
- Add the file include/openssl/applink.c to the package (BZ #499934)
e3ec62
e3ec62
* Tue Apr 14 2009 Erik van Pienbroek <epienbro@fedoraproject.org> - 0.9.8j-5
e3ec62
- Fixed %%defattr line
e3ec62
- Added -static subpackage
e3ec62
e3ec62
* Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.8j-4
e3ec62
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
e3ec62
e3ec62
* Fri Feb 20 2009 Richard W.M. Jones <rjones@redhat.com> - 0.9.8j-3
e3ec62
- Rebuild for mingw32-gcc 4.4
e3ec62
e3ec62
* Mon Feb  2 2009 Levente Farkas <lfarkas@lfarkas.org> - 0.9.8j-2
e3ec62
- Various build fixes.
e3ec62
e3ec62
* Wed Jan 28 2009 Levente Farkas <lfarkas@lfarkas.org> - 0.9.8j-1
e3ec62
- update to new upstream version.
e3ec62
e3ec62
* Mon Dec 29 2008 Levente Farkas <lfarkas@lfarkas.org> - 0.9.8g-2
e3ec62
- minor cleanup.
e3ec62
e3ec62
* Tue Sep 30 2008 Richard W.M. Jones <rjones@redhat.com> - 0.9.8g-1
e3ec62
- Initial RPM release.