Blame SPECS/mingw-openssl.spec

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