From 20c57d78213df039c1960dea517a85f78a535205 Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: May 14 2021 04:16:25 +0000 Subject: import nvmetcli-0.7-3.el8 --- diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..5a439e7 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +SOURCES/nvmetcli-0.7.tar.gz diff --git a/.nvmetcli.metadata b/.nvmetcli.metadata new file mode 100644 index 0000000..55a2b63 --- /dev/null +++ b/.nvmetcli.metadata @@ -0,0 +1 @@ +478aa83bef1cdbfd7b47ecb5ad49add8c667c949 SOURCES/nvmetcli-0.7.tar.gz diff --git a/SOURCES/0001-Documentation-fix-typo.patch b/SOURCES/0001-Documentation-fix-typo.patch new file mode 100644 index 0000000..b54ef88 --- /dev/null +++ b/SOURCES/0001-Documentation-fix-typo.patch @@ -0,0 +1,28 @@ +From 297f40aef117875d98303b0535fb076626b91a19 Mon Sep 17 00:00:00 2001 +From: Maurizio Lombardi +Date: Mon, 1 Feb 2021 15:47:56 +0100 +Subject: [PATCH] Documentation: fix typo + +Signed-off-by: Maurizio Lombardi +Reviewed-by: Chaitanya Kulkarni +Signed-off-by: Christoph Hellwig +--- + Documentation/nvmetcli.txt | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/Documentation/nvmetcli.txt b/Documentation/nvmetcli.txt +index 05a0344..7d6ffda 100644 +--- a/Documentation/nvmetcli.txt ++++ b/Documentation/nvmetcli.txt +@@ -116,7 +116,7 @@ your devices and all dependent modules are loaded, + and configfs is mounted on /sys/kernel/config + using: + +- mount -t configs none /sys/kernel/config ++ mount -t configfs none /sys/kernel/config + + The following section walks through a configuration example. + +-- +2.30.2 + diff --git a/SOURCES/0002-nvmetcli-don-t-remove-ANA-Group-1-on-clear.patch b/SOURCES/0002-nvmetcli-don-t-remove-ANA-Group-1-on-clear.patch new file mode 100644 index 0000000..915381f --- /dev/null +++ b/SOURCES/0002-nvmetcli-don-t-remove-ANA-Group-1-on-clear.patch @@ -0,0 +1,33 @@ +From 0827df8deb5304854d9efc58e9df5971aa66f490 Mon Sep 17 00:00:00 2001 +From: Hannes Reinecke +Date: Fri, 27 Mar 2020 08:01:34 +0100 +Subject: [PATCH] nvmetcli: don't remove ANA Group 1 on clear + +The first ANA group is maintained by the kernel so it cannot +be deleted. + +Signed-off-by: Hannes Reinecke +Signed-off-by: Christoph Hellwig +--- + nvmet/nvme.py | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/nvmet/nvme.py b/nvmet/nvme.py +index 0647ddc..fdec4ff 100644 +--- a/nvmet/nvme.py ++++ b/nvmet/nvme.py +@@ -845,6 +845,11 @@ class ANAGroup(CFSNode): + + a._setup_attrs(n, err_func) + ++ def delete(self): ++ # ANA Group 1 is automatically created/deleted ++ if self.grpid != 1: ++ super(ANAGroup, self).delete() ++ + def dump(self): + d = super(ANAGroup, self).dump() + d['grpid'] = self.grpid +-- +2.30.2 + diff --git a/SPECS/nvmetcli.spec b/SPECS/nvmetcli.spec new file mode 100644 index 0000000..6177774 --- /dev/null +++ b/SPECS/nvmetcli.spec @@ -0,0 +1,87 @@ +Name: nvmetcli +License: ASL 2.0 +Group: Applications/System +Summary: An adminstration shell for NVMe storage targets +Version: 0.7 +Release: 3%{?dist} +URL: ftp://ftp.infradead.org/pub/nvmetcli/ +Source: ftp://ftp.infradead.org/pub/nvmetcli/%{name}-%{version}.tar.gz +Patch0: 0001-Documentation-fix-typo.patch +Patch1: 0002-nvmetcli-don-t-remove-ANA-Group-1-on-clear.patch +BuildArch: noarch +BuildRequires: python3-devel python3-setuptools systemd-units asciidoc xmlto +Requires: python3-configshell python3-kmod +Requires(post): systemd +Requires(preun): systemd +Requires(postun): systemd + +%description +This package contains the command line interface to the NVMe over Fabrics +nvmet in the Linux kernel. It allows configuring the nvmet interactively +as well as saving / restoring the configuration to / from a json file. + +%prep +%setup -q +%patch0 -p1 +%patch1 -p1 + +%build +%{__python3} setup.py build +cd Documentation +make +gzip --stdout nvmetcli.8 > nvmetcli.8.gz + +%install +%{__python3} setup.py install --skip-build --root %{buildroot} +mkdir -p %{buildroot}%{_unitdir} +mkdir -p %{buildroot}%{_sysconfdir}/nvmet +install -m 644 nvmet.service %{buildroot}%{_unitdir}/nvmet.service +mkdir -p %{buildroot}%{_mandir}/man8/ +install -m 644 Documentation/nvmetcli.8.gz %{buildroot}%{_mandir}/man8/ + +%post +%systemd_post nvmet.service + +%preun +%systemd_preun nvmet.service + +%postun +%systemd_postun_with_restart nvmet.service + +%files +%{python3_sitelib}/* +%dir %{_sysconfdir}/nvmet +%{_sbindir}/nvmetcli +%{_unitdir}/nvmet.service +%doc README +%license COPYING +%{_mandir}/man8/nvmetcli.8.gz + +%changelog +* Wed Apr 28 2021 Maurizio Lombardi - 0.7-3 +- Fix a failure when executing a clear command + +* Thu Apr 22 2021 Maurizio Lombardi - 0.7-1 +- Fix typo in the documentation + +* Thu Apr 22 2021 Maurizio Lombardi - 0.7-1 +- Update to the latest version + +* Fri Sep 14 2018 Maurizio Lombardi - 0.6-2 +- Support python3 dictionary access. + +* Fri Jul 06 2018 Maurizio Lombardi - 0.6-1 +- Update for new upstream release + +* Thu Jul 27 2017 Fedora Release Engineering - 0.4-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + +* Tue May 9 2017 Andy Grover - 0.4-1 +- Update for new upstream release +- Remove fix-setup.patch + +* Tue Feb 21 2017 Andy Grover - 0.3-1 +- Update for new upstream release + +* Wed Oct 12 2016 Andy Grover - 0.2-1 +- Initial packaging