import nvme-cli-1.9-7.el8_2

This commit is contained in:
CentOS Sources 2020-06-09 17:56:53 -04:00 committed by Andrew Lukoshko
parent 1031f86cfe
commit b4ffcbbbcf
2 changed files with 21 additions and 9 deletions

View File

@ -0,0 +1,13 @@
--- nvme-cli-1.9/Makefile.orig 2020-05-27 14:04:56.259961135 -0400
+++ nvme-cli-1.9/Makefile 2020-05-27 14:05:22.796185371 -0400
@@ -125,8 +125,8 @@
$(INSTALL) -m 644 -T ./etc/discovery.conf.in $(DESTDIR)$(SYSCONFDIR)/nvme/discovery.conf; \
fi
-install-spec: install-bin install-man install-bash-completion install-zsh-completion install-etc install-systemd install-udev install-dracut
-install: install-spec install-hostparams
+install-spec: install-bin install-man install-bash-completion install-zsh-completion install-systemd install-udev install-dracut
+install: install-spec
nvme.spec: nvme.spec.in NVME-VERSION-FILE
sed -e 's/@@VERSION@@/$(NVME_VERSION)/g' < $< > $@+

View File

@ -3,7 +3,7 @@
Name: nvme-cli
Version: 1.9
Release: 5%{?dist}
Release: 7%{?dist}
Summary: NVMe management command line interface
License: GPLv2+
@ -16,6 +16,7 @@ Patch1: systemd-fix-echo-call-with-absolute-path-patch
Patch2: nvme-cli-check-sysfs-interface-before-nvme-disc-patch
Patch3: nvmf-autoconnect-add-udev-rules-to-set-iopolicy-netapp-patch
Patch4: fix-systemd-service-script-use-connect-args-patch
Patch5: nvme-cli-makefile-dont-install-host-params-patch
BuildRequires: libuuid-devel
BuildRequires: gcc
@ -32,6 +33,7 @@ nvme-cli provides NVM-Express user space tooling for Linux.
%patch2 -p1
%patch3 -p1
%patch4 -p1
%patch5 -p1
%build
@ -62,9 +64,6 @@ rm -f %{buildroot}/usr/lib/dracut/dracut.conf.d/70-nvmf-autoconnect.conf
%{_datadir}/bash-completion/completions/nvme
%{_datadir}/zsh/site-functions/_nvme
%dir %{_sysconfdir}/nvme
%{_sysconfdir}/nvme/hostnqn
%{_sysconfdir}/nvme/hostid
%{_sysconfdir}/nvme/discovery.conf
%{_unitdir}/nvmefc-boot-connections.service
%{_unitdir}/nvmf-connect.target
%{_unitdir}/nvmf-connect@.service
@ -75,13 +74,13 @@ rm -f %{buildroot}/usr/lib/dracut/dracut.conf.d/70-nvmf-autoconnect.conf
# /usr/lib/dracut/dracut.conf.d/70-nvmf-autoconnect.conf
%post
if [ $1 -eq 1 ]; then # 1 : This package is being installed for the first time
if [ ! -s %{_sysconfdir}/nvme/hostnqn ]; then
if [ $1 -eq 1 ] || [ $1 -eq 2 ]; then
if [ ! -s %{_sysconfdir}/nvme/hostnqn ]; then
echo $(nvme gen-hostnqn) > %{_sysconfdir}/nvme/hostnqn
fi
if [ ! -s %{_sysconfdir}/nvme/hostid ]; then
fi
if [ ! -s %{_sysconfdir}/nvme/hostid ]; then
uuidgen > %{_sysconfdir}/nvme/hostid
fi
fi
# apply udev and systemd changes that we did
systemctl enable nvmefc-boot-connections