Update the package to 1.13 and add the "post" scriptlet

Resolves: #1925653

Signed-off-by: Maurizio Lombardi <mlombard@redhat.com>
This commit is contained in:
Maurizio Lombardi 2021-03-19 15:55:34 +01:00
parent f0cfa3be50
commit 18c921b511
4 changed files with 38 additions and 12 deletions

1
.gitignore vendored
View File

@ -17,3 +17,4 @@
/v1.10.1.tar.gz
/v1.11.tar.gz
/v1.11.1.tar.gz
/v1.13.tar.gz

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

@ -2,8 +2,8 @@
#%%global shortcommit0 %%(c=%%{commit0}; echo ${c:0:7})
Name: nvme-cli
Version: 1.11.1
Release: 3%{?dist}
Version: 1.13
Release: 1%{?dist}
Summary: NVMe management command line interface
License: GPLv2+
@ -11,7 +11,8 @@ URL: https://github.com/linux-nvme/nvme-cli
#Source0: https://github.com/linux-nvme/%%{name}/archive/%%{commit0}.tar.gz
Source0: https://github.com/linux-nvme/%{name}/archive/v%{version}.tar.gz
BuildRequires: make
Patch0: nvme-cli-makefile-dont-install-host-params-patch
BuildRequires: libuuid-devel
BuildRequires: gcc
BuildRequires: systemd-devel
@ -22,6 +23,7 @@ nvme-cli provides NVM-Express user space tooling for Linux.
%prep
#%%setup -qn %%{name}-%%{commit0}
%setup -q
%patch0 -p1
%build
@ -38,8 +40,8 @@ mkdir -p %{buildroot}%{_sysconfdir}/nvme
# hostid and hostnqn are supposed to be unique per machine. We obviously
# can't package them.
rm -f %{buildroot}%{_sysconfdir}/nvme/hostid
rm -f %{buildroot}%{_sysconfdir}/nvme/hostnqn
#rm -f %{buildroot}%{_sysconfdir}/nvme/hostid
#rm -f %{buildroot}%{_sysconfdir}/nvme/hostnqn
# Do not install the dracut rule yet. See rhbz 1742764
rm -f %{buildroot}/usr/lib/dracut/dracut.conf.d/70-nvmf-autoconnect.conf
@ -53,7 +55,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/discovery.conf
%{_unitdir}/nvmefc-boot-connections.service
%{_unitdir}/nvmf-autoconnect.service
%{_unitdir}/nvmf-connect.target
@ -63,13 +64,24 @@ rm -f %{buildroot}/usr/lib/dracut/dracut.conf.d/70-nvmf-autoconnect.conf
# Do not install the dracut rule yet. See rhbz 1742764
# /usr/lib/dracut/dracut.conf.d/70-nvmf-autoconnect.conf
%post
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
uuidgen > %{_sysconfdir}/nvme/hostid
fi
# apply udev and systemd changes that we did
systemctl enable nvmefc-boot-connections
systemctl daemon-reload
udevadm control --reload-rules && udevadm trigger
fi
%changelog
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.11.1-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.11.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Fri Mar 19 2020 Maurizio Lombardi <mlombard@redhat.com> - 1.12-1
- Update to 1.13 and add postin scriptlet
* Sat Apr 25 2020 luto@kernel.org - 1.11.1-1
- Update to 1.11

View File

@ -1 +1 @@
SHA512 (v1.11.1.tar.gz) = 467e327f45500d80cebd6e5e55d4e6d3731a754423e71180efa9d4f5e98f0774f7a31393fefc2794250b487446005dad8e7002a27aff1f2b285983d55ec0d0b3
SHA512 (v1.13.tar.gz) = 03b9e1ea4fc5051f64ff387eea08fe9563df8075f56c5916052511b5f0a6810123cb7dffd3df393319bcfd215a93047c1ad3534d447a07808f456ea9cdcabbf5