diff --git a/.gitignore b/.gitignore index bc5dcae..ccfb218 100644 --- a/.gitignore +++ b/.gitignore @@ -17,3 +17,4 @@ /v1.10.1.tar.gz /v1.11.tar.gz /v1.11.1.tar.gz +/v1.13.tar.gz diff --git a/nvme-cli-makefile-dont-install-host-params-patch b/nvme-cli-makefile-dont-install-host-params-patch new file mode 100644 index 0000000..b86149e --- /dev/null +++ b/nvme-cli-makefile-dont-install-host-params-patch @@ -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' < $< > $@+ diff --git a/nvme-cli.spec b/nvme-cli.spec index a10019e..7abd1f9 100644 --- a/nvme-cli.spec +++ b/nvme-cli.spec @@ -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 - 1.11.1-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild - -* Tue Jul 28 2020 Fedora Release Engineering - 1.11.1-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild +* Fri Mar 19 2020 Maurizio Lombardi - 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 diff --git a/sources b/sources index d9f6fa3..28cffec 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (v1.11.1.tar.gz) = 467e327f45500d80cebd6e5e55d4e6d3731a754423e71180efa9d4f5e98f0774f7a31393fefc2794250b487446005dad8e7002a27aff1f2b285983d55ec0d0b3 +SHA512 (v1.13.tar.gz) = 03b9e1ea4fc5051f64ff387eea08fe9563df8075f56c5916052511b5f0a6810123cb7dffd3df393319bcfd215a93047c1ad3534d447a07808f456ea9cdcabbf5