From 0c944ba8b2e609b45b2f9f27ea5eff0ff4412d91 Mon Sep 17 00:00:00 2001 From: Dan Horák Date: Jan 24 2018 11:04:44 +0000 Subject: - update engine filename - spec cleanup --- diff --git a/openssl-ibmca-1.4.0-link.patch b/openssl-ibmca-1.4.0-link.patch new file mode 100644 index 0000000..400671a --- /dev/null +++ b/openssl-ibmca-1.4.0-link.patch @@ -0,0 +1,47 @@ +From 29c3157a895e8c6428100a3c0229fb405a978137 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Dan=20Hor=C3=A1k?= +Date: Wed, 17 Jan 2018 13:52:02 +0100 +Subject: [PATCH] switch to ibmca.so filename to allow a standalone use +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Signed-off-by: Dan Horák +--- + src/Makefile.am | 10 +++++----- + src/openssl.cnf.sample | 2 +- + 2 files changed, 6 insertions(+), 6 deletions(-) + +diff --git a/src/Makefile.am b/src/Makefile.am +index 58e7f4e..ff27458 100644 +--- a/src/Makefile.am ++++ b/src/Makefile.am +@@ -1,10 +1,10 @@ +-lib_LTLIBRARIES=libibmca.la ++lib_LTLIBRARIES=ibmca.la + +-libibmca_la_SOURCES=e_ibmca.c e_ibmca_err.c +-libibmca_la_LIBADD=-ldl +-libibmca_la_LDFLAGS=-module -version-info 0:2:0 -shared -no-undefined -avoid-version ++ibmca_la_SOURCES=e_ibmca.c e_ibmca_err.c ++ibmca_la_LIBADD=-ldl ++ibmca_la_LDFLAGS=-module -version-info 0:2:0 -shared -no-undefined -avoid-version + +-dist_libibmca_la_SOURCES=e_ibmca_err.h e_os.h cryptlib.h ++dist_ibmca_la_SOURCES=e_ibmca_err.h e_os.h cryptlib.h + EXTRA_DIST = openssl.cnf.sample + + ACLOCAL_AMFLAGS = -I m4 +diff --git a/src/openssl.cnf.sample b/src/openssl.cnf.sample +index 0094864..e483686 100644 +--- a/src/openssl.cnf.sample ++++ b/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 = /usr/local/lib/ibmca.so + engine_id = ibmca + init = 1 + diff --git a/openssl-ibmca.spec b/openssl-ibmca.spec index 3b013cc..00721e3 100644 --- a/openssl-ibmca.spec +++ b/openssl-ibmca.spec @@ -1,55 +1,59 @@ +%global enginesdir %(pkg-config --variable=enginesdir libcrypto) + Summary: A dynamic OpenSSL engine for IBMCA Name: openssl-ibmca Version: 1.4.0 -Release: 1%{?dist} +Release: 2%{?dist} License: ASL 2.0 Group: System Environment/Libraries URL: https://github.com/opencryptoki -Source0: https://github.com/opencryptoki/%{name}/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz +Source0: https://github.com/opencryptoki/%{name}/archive/v%{version}/%{name}-%{version}.tar.gz # https://bugzilla.redhat.com/show_bug.cgi?id=584765 -Patch0: openssl-ibmca-1.4.0-libica-soname.patch +Patch0: %{name}-1.4.0-libica-soname.patch +# https://github.com/opencryptoki/openssl-ibmca/commit/29c3157a895e8c6428100a3c0229fb405a978137 +Patch1: %{name}-1.4.0-link.patch Requires: libica >= 3.1.0 BuildRequires: libica-devel >= 3.1.0 BuildRequires: automake libtool ExclusiveArch: s390 s390x -%global enginesdir %{_libdir}/engines-1.1 %description A dynamic OpenSSL engine for IBMCA crypto hardware on IBM z Systems machines. %prep -%setup -q -%patch0 -p1 -b .libica-soname +%autosetup -p1 -sh ./bootstrap.sh +./bootstrap.sh %build -%configure +%configure --libdir=%{enginesdir} make %{?_smp_mflags} %install -make install DESTDIR=$RPM_BUILD_ROOT - -rm -f $RPM_BUILD_ROOT%{_libdir}/libibmca.la - -mkdir -p $RPM_BUILD_ROOT%{enginesdir} -mv $RPM_BUILD_ROOT%{_libdir}/*.so $RPM_BUILD_ROOT%{enginesdir} +%make_install +rm -f $RPM_BUILD_ROOT%{enginesdir}/*.la pushd src sed -e 's|/usr/local/lib|%{enginesdir}|' openssl.cnf.sample > openssl.cnf.sample.%{_arch} popd + %files +%license LICENSE %doc ChangeLog README.md src/openssl.cnf.sample.%{_arch} -%{enginesdir}/libibmca.so +%{enginesdir}/ibmca.so %{_mandir}/man5/ibmca.5* %changelog +* Wed Jan 24 2018 Dan Horák - 1.4.0-2 +- update engine filename +- spec cleanup + * Mon Sep 11 2017 Dan Horák - 1.4.0-1 - updated to 1.4.0