import libzfcphbaapi-2.2.0-2.el8

This commit is contained in:
CentOS Sources 2020-04-28 05:37:22 -04:00 committed by Stepan Oksanichenko
parent 6b3219a536
commit d4483601df
1 changed files with 20 additions and 6 deletions

View File

@ -4,7 +4,7 @@ Name: libzfcphbaapi
Summary: HBA API for the zFCP device driver
Group: System Environment/Libraries
Version: 2.2.0
Release: 1%{?dist}
Release: 2%{?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
@ -20,8 +20,8 @@ BuildRequires: libsysfs-devel
BuildRequires: sg3_utils-devel
BuildRequires: libhbaapi-devel
Requires: libhbaapi
Requires(post): grep
Requires(preun): grep sed
Requires(post): grep sed
Requires(postun): grep sed
Provides: s390utils-libzfcphbaapi = 2:1.20.0-4
Obsoletes: s390utils-libzfcphbaapi <= 2:1.20.0-3
@ -66,13 +66,23 @@ 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
:
%preun
grep -q -e "^libzfcphbaapi" /etc/hba.conf &&
sed -i.orig -e "/^libzfcphbaapi/d" /etc/hba.conf
%postun
# remove entry from hba.conf on uninstall
if [ $1 == 0 ]; then
grep -q -e "^libzfcphbaapi" /etc/hba.conf &&
sed -i.orig -e "/^libzfcphbaapi/d" /etc/hba.conf
fi
:
@ -95,6 +105,10 @@ grep -q -e "^libzfcphbaapi" /etc/hba.conf &&
%changelog
* Wed Nov 27 2019 Dan Horák <dan[at]danny.cz> - 2.2.0-2
- fix scriptlets so they work correctly on upgrades
- Resolves: #1765520
* Wed Mar 20 2019 Dan Horák <dhorak@redhat.com> - 2.2.0-1
- updated to 2.2.0 - add port speed capabilities
- Resolves: #1612775