From a4aa0336da3d979a624c62e62906cf3133ef5a78004c3fe674b1ef8f460ac3c5 Mon Sep 17 00:00:00 2001 From: Dominique Leuenberger Date: Sat, 23 Sep 2017 19:36:11 +0000 Subject: [PATCH] Accepting request 528233 from security 1 OBS-URL: https://build.opensuse.org/request/show/528233 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/openssl-ibmca?expand=0&rev=27 --- openssl-ibmca-configure.patch | 11 ----------- openssl-ibmca-fix-enginepath.patch | 13 ------------- openssl-ibmca.changes | 12 ++++++++++++ openssl-ibmca.spec | 22 +++++++++++++--------- 4 files changed, 25 insertions(+), 33 deletions(-) delete mode 100644 openssl-ibmca-configure.patch delete mode 100644 openssl-ibmca-fix-enginepath.patch diff --git a/openssl-ibmca-configure.patch b/openssl-ibmca-configure.patch deleted file mode 100644 index e66be30..0000000 --- a/openssl-ibmca-configure.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- configure 2016-03-31 18:07:02.238114067 -0400 -+++ configure 2016-03-31 18:09:16.168114067 -0400 -@@ -11511,7 +11511,7 @@ - $as_echo_n "(cached) " >&6 - else - ac_check_lib_save_LIBS=$LIBS --LIBS="-lica $LIBS" -+LIBS="-lica -lpthread $LIBS" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext - /* end confdefs.h. */ - diff --git a/openssl-ibmca-fix-enginepath.patch b/openssl-ibmca-fix-enginepath.patch deleted file mode 100644 index 5936e70..0000000 --- a/openssl-ibmca-fix-enginepath.patch +++ /dev/null @@ -1,13 +0,0 @@ -Index: openssl-ibmca-1.3.0/src/openssl.cnf.sample -=================================================================== ---- openssl-ibmca-1.3.0.orig/src/openssl.cnf.sample -+++ openssl-ibmca-1.3.0/src/openssl.cnf.sample -@@ -23,7 +23,7 @@ ibmca = ibmca_section - # The openssl engine path for libibmca.so. - # Set the dynamic_path to where the libibmca.so engine - # resides on the system. --dynamic_path = /usr/local/lib/libibmca.so -+dynamic_path = /lib64/engines/libibmca.so - engine_id = ibmca - init = 1 - diff --git a/openssl-ibmca.changes b/openssl-ibmca.changes index 7194a8d..246fadb 100644 --- a/openssl-ibmca.changes +++ b/openssl-ibmca.changes @@ -1,3 +1,15 @@ +------------------------------------------------------------------- +Fri Sep 22 07:50:52 UTC 2017 - mpost@suse.com + +- Now that the openSSL engines directory is versioned: + * Modified the spec file to query the libcrypto package + for which directory to install the engine into. + * Removed openssl-ibmca-fix-enginepath.patch. Replaced it + with a sed command so that it will provide the correct + versioned engines directory +- Removed openssl-ibmca-configure.patch. It doesn't seem to + be needed any longer. + ------------------------------------------------------------------- Tue Apr 11 15:09:03 UTC 2017 - mpost@suse.com diff --git a/openssl-ibmca.spec b/openssl-ibmca.spec index 398f85b..49c73ba 100644 --- a/openssl-ibmca.spec +++ b/openssl-ibmca.spec @@ -25,9 +25,7 @@ Group: Hardware/Other Url: http://sourceforge.net/projects/opencryptoki Source: http://sourceforge.net/projects/opencryptoki/files/libica%%20OpenSSL%%20Engine/ibmca-%{version}/openssl-ibmca-%{version}.tar.bz2 Source1: baselibs.conf -Patch1: openssl-ibmca-configure.patch -Patch2: openssl-ibmca-fix-enginepath.patch -Patch3: openssl-ibmca-fix-sha512-evp-digest-to-use-evp_md_flag_pkey_method_signature.patch +Patch1: openssl-ibmca-fix-sha512-evp-digest-to-use-evp_md_flag_pkey_method_signature.patch BuildRequires: libica-devel >= 2.4.0 BuildRequires: libica-tools >= 2.4.0 BuildRequires: openssl-devel @@ -41,20 +39,26 @@ IBM eServer Cryptographic Accelerator (ICA). %prep %setup -q -%patch1 -%patch2 -p1 -%patch3 -p1 +%patch1 -p1 %build +# The directory where crypto engines are located is owned by the libcrypto package. +# Find out where that is for this version of the distribution. +%define _ENGINE_DIR %(pkg-config --variable=enginesdir libcrypto) + export CFLAGS="%{optflags}" export CPPFLAGS="%{optflags}" %configure \ - --libdir=/%{_lib}/engines + --libdir=%{_ENGINE_DIR} make %{?_smp_mflags} %install +# Update the sample config file so that the dynamic path points +# to the correct version of the engines directory. +sed -i -e "/^dynamic_path/s, = .*/, = %{_ENGINE_DIR}/," src/openssl.cnf.sample + make %{?_smp_mflags} DESTDIR=%{buildroot} install -rm %{buildroot}/%{_lib}/engines/libibmca.la +rm %{buildroot}/%{_ENGINE_DIR}/libibmca.la %post #Original fix for bsc#942839 was to update on first install @@ -108,7 +112,7 @@ fi %defattr(-, root, root) %doc README COPYING %doc src/openssl.cnf.sample -/%{_lib}/engines/libibmca.* +%{_ENGINE_DIR}/libibmca.* %{_mandir}/man5/ibmca.5%{ext_man} %changelog