From 39f4416dfd79013103de98e6c1cdcf70d23d3217 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20Hor=C3=A1k?= Date: Tue, 2 Feb 2021 12:17:23 +0000 Subject: [PATCH] - build with libzfcphbaapi as standalone library to avoid dependency on obsolete libhbaapi (#1922413) --- libzfcphbaapi.spec | 33 ++++++++++----------------------- 1 file changed, 10 insertions(+), 23 deletions(-) diff --git a/libzfcphbaapi.spec b/libzfcphbaapi.spec index 2e072df..43d0ad3 100644 --- a/libzfcphbaapi.spec +++ b/libzfcphbaapi.spec @@ -3,7 +3,7 @@ Name: libzfcphbaapi Summary: HBA API for the zFCP device driver Version: 2.2.0 -Release: 9%{?dist} +Release: 10%{?dist} License: CPL URL: http://www.ibm.com/developerworks/linux/linux390/zfcp-hbaapi.html # http://www.ibm.com/developerworks/linux/linux390/zfcp-hbaapi-%%{hbaapiver}.html @@ -17,15 +17,10 @@ BuildRequires: automake BuildRequires: doxygen BuildRequires: libsysfs-devel BuildRequires: sg3_utils-devel -BuildRequires: libhbaapi-devel BuildRequires: make -Requires: libhbaapi Requires(post): grep sed Requires(postun): grep sed -# exclude plugin soname from Provides -%global __provides_exclude ^(libzfcphbaapi-%{version}[.]so.*)$ - %description zFCP HBA API Library is an implementation of FC-HBA (see www.t11.org) for the zFCP device driver. @@ -50,7 +45,7 @@ Documentation for the zFCP HBA API Library. %build -%configure --disable-static --enable-vendor-lib +%configure --disable-static make EXTRA_CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing" @@ -58,25 +53,11 @@ make EXTRA_CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing" %makeinstall docdir=$RPM_BUILD_ROOT%{_docdir}/%{name} # keep only html docs rm -rf $RPM_BUILD_ROOT%{_docdir}/%{name}/latex -# remove unwanted files -rm -f $RPM_BUILD_ROOT%{_libdir}/%{name}.* %post # remove old entry from hba.conf on upgrade -if [ $1 == 2 ]; then - grep -q -e "^libzfcphbaapi" /etc/hba.conf && - sed -i.orig -e "/^libzfcphbaapi/d" /etc/hba.conf -fi -# add entry to hba.conf on install and upgrade (resulting in a refresh together with ^) -# the grep ensures there won't be a duplicate entry after reinstall -grep -q -e "^libzfcphbaapi" /etc/hba.conf || - echo "libzfcphbaapi %{_libdir}/libzfcphbaapi-%{version}.so" >> /etc/hba.conf -: - -%postun -# remove entry from hba.conf on uninstall -if [ $1 == 0 ]; then +if [ $1 == 2 -a -f /etc/hba.conf ]; then grep -q -e "^libzfcphbaapi" /etc/hba.conf && sed -i.orig -e "/^libzfcphbaapi/d" /etc/hba.conf fi @@ -87,7 +68,7 @@ fi %doc README COPYING ChangeLog AUTHORS LICENSE %{_bindir}/zfcp_ping %{_bindir}/zfcp_show -%{_libdir}/%{name}-%{version}.so +%{_libdir}/%{name}.so.* %{_mandir}/man3/libzfcphbaapi.3* %{_mandir}/man3/SupportedHBAAPIs.3* %{_mandir}/man3/UnSupportedHBAAPIs.3* @@ -95,6 +76,9 @@ fi %{_mandir}/man8/zfcp_show.8* %exclude %{_mandir}/man3/hbaapi.h.3* %exclude %{_docdir}/%{name}/html +%exclude %{_libdir}/%{name}.so +%exclude %{_libdir}/%{name}.la +%exclude %{_includedir}/hbaapi.h %files docs @@ -102,6 +86,9 @@ fi %changelog +* Tue Feb 02 2021 Dan HorĂ¡k - 2.2.0-10 +- build with libzfcphbaapi as standalone library to avoid dependency on obsolete libhbaapi (#1922413) + * Tue Jan 26 2021 Fedora Release Engineering - 2.2.0-9 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild