import nvmetcli-0.7-3.el8
This commit is contained in:
parent
f0b032e423
commit
9622b53090
2
.gitignore
vendored
2
.gitignore
vendored
@ -1 +1 @@
|
|||||||
SOURCES/nvmetcli-0.6.tar.gz
|
SOURCES/nvmetcli-0.7.tar.gz
|
||||||
|
@ -1 +1 @@
|
|||||||
0ecc5e3c3b7181659a8dd3852c928b37df95f6c4 SOURCES/nvmetcli-0.6.tar.gz
|
478aa83bef1cdbfd7b47ecb5ad49add8c667c949 SOURCES/nvmetcli-0.7.tar.gz
|
||||||
|
28
SOURCES/0001-Documentation-fix-typo.patch
Normal file
28
SOURCES/0001-Documentation-fix-typo.patch
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
From 297f40aef117875d98303b0535fb076626b91a19 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Maurizio Lombardi <mlombard@redhat.com>
|
||||||
|
Date: Mon, 1 Feb 2021 15:47:56 +0100
|
||||||
|
Subject: [PATCH] Documentation: fix typo
|
||||||
|
|
||||||
|
Signed-off-by: Maurizio Lombardi <mlombard@redhat.com>
|
||||||
|
Reviewed-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
|
||||||
|
Signed-off-by: Christoph Hellwig <hch@lst.de>
|
||||||
|
---
|
||||||
|
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
|
||||||
|
|
@ -1,62 +0,0 @@
|
|||||||
From 531d63d4e6acf6f4959e20f61f300921f764690c Mon Sep 17 00:00:00 2001
|
|
||||||
From: Lee Duncan <lduncan@suse.com>
|
|
||||||
Date: Fri, 13 Apr 2018 11:56:29 -0700
|
|
||||||
Subject: [PATCH] Support python3 dictionary access.
|
|
||||||
|
|
||||||
Support python2 and python3 dictionary access by using the iteritems
|
|
||||||
function the 'python-six' module.
|
|
||||||
|
|
||||||
Also, add info to the README about supporting both Python2 and Python3.
|
|
||||||
|
|
||||||
Signed-off-by: Lee Duncan <lduncan@suse.com>
|
|
||||||
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
|
|
||||||
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
|
|
||||||
Signed-off-by: Christoph Hellwig <hch@lst.de>
|
|
||||||
---
|
|
||||||
README | 8 +++++---
|
|
||||||
nvmet/nvme.py | 3 ++-
|
|
||||||
2 files changed, 7 insertions(+), 4 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/README b/README
|
|
||||||
index cd4bd78..c8717e8 100644
|
|
||||||
--- a/README
|
|
||||||
+++ b/README
|
|
||||||
@@ -14,9 +14,11 @@ using setup.py.
|
|
||||||
|
|
||||||
Common Package Dependencies and Problems
|
|
||||||
-----------------------------------------
|
|
||||||
-nvmetcli uses the 'python-six' and 'pyparsing' packages
|
|
||||||
-(running nvmetcli without these packages may produce
|
|
||||||
-hard-to-decipher errors).
|
|
||||||
+Both python2 and python3 are supported via use of the 'python-six'
|
|
||||||
+package.
|
|
||||||
+
|
|
||||||
+nvmetcli uses the 'pyparsing' package -- running nvmetcli without this
|
|
||||||
+package may produce hard-to-decipher errors.
|
|
||||||
|
|
||||||
Usage
|
|
||||||
-----
|
|
||||||
diff --git a/nvmet/nvme.py b/nvmet/nvme.py
|
|
||||||
index f5d0555..89bf9cd 100644
|
|
||||||
--- a/nvmet/nvme.py
|
|
||||||
+++ b/nvmet/nvme.py
|
|
||||||
@@ -23,6 +23,7 @@ import stat
|
|
||||||
import uuid
|
|
||||||
import json
|
|
||||||
from glob import iglob as glob
|
|
||||||
+from six import iteritems
|
|
||||||
|
|
||||||
DEFAULT_SAVE_FILE = '/etc/nvmet/config.json'
|
|
||||||
|
|
||||||
@@ -219,7 +220,7 @@ class CFSNode(object):
|
|
||||||
|
|
||||||
def _setup_attrs(self, attr_dict, err_func):
|
|
||||||
for group in self.attr_groups:
|
|
||||||
- for name, value in attr_dict.get(group, {}).iteritems():
|
|
||||||
+ for name, value in iteritems(attr_dict.get(group, {})):
|
|
||||||
try:
|
|
||||||
self.set_attr(group, name, value)
|
|
||||||
except CFSError as e:
|
|
||||||
--
|
|
||||||
1.8.3.1
|
|
||||||
|
|
@ -0,0 +1,33 @@
|
|||||||
|
From 0827df8deb5304854d9efc58e9df5971aa66f490 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Hannes Reinecke <hare@suse.de>
|
||||||
|
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 <hare@suse.de>
|
||||||
|
Signed-off-by: Christoph Hellwig <hch@lst.de>
|
||||||
|
---
|
||||||
|
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
|
||||||
|
|
@ -2,11 +2,12 @@ Name: nvmetcli
|
|||||||
License: ASL 2.0
|
License: ASL 2.0
|
||||||
Group: Applications/System
|
Group: Applications/System
|
||||||
Summary: An adminstration shell for NVMe storage targets
|
Summary: An adminstration shell for NVMe storage targets
|
||||||
Version: 0.6
|
Version: 0.7
|
||||||
Release: 2%{?dist}
|
Release: 3%{?dist}
|
||||||
URL: ftp://ftp.infradead.org/pub/nvmetcli/
|
URL: ftp://ftp.infradead.org/pub/nvmetcli/
|
||||||
Source: ftp://ftp.infradead.org/pub/nvmetcli/%{name}-%{version}.tar.gz
|
Source: ftp://ftp.infradead.org/pub/nvmetcli/%{name}-%{version}.tar.gz
|
||||||
Patch0: 0001-Support-python3-dictionary-access.patch
|
Patch0: 0001-Documentation-fix-typo.patch
|
||||||
|
Patch1: 0002-nvmetcli-don-t-remove-ANA-Group-1-on-clear.patch
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
BuildRequires: python3-devel python3-setuptools systemd-units asciidoc xmlto
|
BuildRequires: python3-devel python3-setuptools systemd-units asciidoc xmlto
|
||||||
Requires: python3-configshell python3-kmod
|
Requires: python3-configshell python3-kmod
|
||||||
@ -22,6 +23,7 @@ as well as saving / restoring the configuration to / from a json file.
|
|||||||
%prep
|
%prep
|
||||||
%setup -q
|
%setup -q
|
||||||
%patch0 -p1
|
%patch0 -p1
|
||||||
|
%patch1 -p1
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%{__python3} setup.py build
|
%{__python3} setup.py build
|
||||||
@ -56,6 +58,15 @@ install -m 644 Documentation/nvmetcli.8.gz %{buildroot}%{_mandir}/man8/
|
|||||||
%{_mandir}/man8/nvmetcli.8.gz
|
%{_mandir}/man8/nvmetcli.8.gz
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Wed Apr 28 2021 Maurizio Lombardi <mlombard@redhat.com> - 0.7-3
|
||||||
|
- Fix a failure when executing a clear command
|
||||||
|
|
||||||
|
* Thu Apr 22 2021 Maurizio Lombardi <mlombard@redhat.com> - 0.7-1
|
||||||
|
- Fix typo in the documentation
|
||||||
|
|
||||||
|
* Thu Apr 22 2021 Maurizio Lombardi <mlombard@redhat.com> - 0.7-1
|
||||||
|
- Update to the latest version
|
||||||
|
|
||||||
* Fri Sep 14 2018 Maurizio Lombardi <mlombard@redhat.com> - 0.6-2
|
* Fri Sep 14 2018 Maurizio Lombardi <mlombard@redhat.com> - 0.6-2
|
||||||
- Support python3 dictionary access.
|
- Support python3 dictionary access.
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user