From 7e68d6630f58d3594454526cecbdfb0cfadfbde8 Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Thu, 14 May 2020 22:39:15 +0000 Subject: [PATCH] import python-rtslib-2.1.72-1.el8 --- .gitignore | 2 +- .python-rtslib.metadata | 2 +- SOURCES/0001-Turn-off-unsupported-fabrics.patch | 9 +++++---- SOURCES/0002-default_dbroot.patch | 13 +++++++++++-- SPECS/python-rtslib.spec | 11 +++++++---- 5 files changed, 25 insertions(+), 12 deletions(-) diff --git a/.gitignore b/.gitignore index 65c71cd..233ed9b 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -SOURCES/rtslib-fb-2.1.71.tar.gz +SOURCES/rtslib-fb-2.1.72.tar.gz diff --git a/.python-rtslib.metadata b/.python-rtslib.metadata index 50577fd..7bc5db4 100644 --- a/.python-rtslib.metadata +++ b/.python-rtslib.metadata @@ -1 +1 @@ -9b8cf949711c104d5bf324847c37e386a4ea8ee1 SOURCES/rtslib-fb-2.1.71.tar.gz +b44c8b66a8002c4d7eb6203639d151b0c956b11e SOURCES/rtslib-fb-2.1.72.tar.gz diff --git a/SOURCES/0001-Turn-off-unsupported-fabrics.patch b/SOURCES/0001-Turn-off-unsupported-fabrics.patch index 45b9088..3ef3e34 100644 --- a/SOURCES/0001-Turn-off-unsupported-fabrics.patch +++ b/SOURCES/0001-Turn-off-unsupported-fabrics.patch @@ -1,15 +1,16 @@ diff --git a/rtslib/fabric.py b/rtslib/fabric.py -index b529f14..8264c37 100644 +index 02e156c..ff7387f 100644 --- a/rtslib/fabric.py +++ b/rtslib/fabric.py -@@ -465,12 +465,12 @@ fabric_modules = { +@@ -464,13 +464,13 @@ fabric_modules = { + "srpt": SRPTFabricModule, "iscsi": ISCSIFabricModule, "loopback": LoopbackFabricModule, - "qla2xxx": Qla2xxxFabricModule, -+# "qla2xxx": Qla2xxxFabricModule, - "sbp": SBPFabricModule, -+# "sbp": SBPFabricModule, - "tcm_fc": FCoEFabricModule, ++# "qla2xxx": Qla2xxxFabricModule, ++# "sbp": SBPFabricModule, +# "tcm_fc": FCoEFabricModule, # "usb_gadget": USBGadgetFabricModule, # very rare, don't show - "vhost": VhostFabricModule, diff --git a/SOURCES/0002-default_dbroot.patch b/SOURCES/0002-default_dbroot.patch index 7d21d38..e381561 100644 --- a/SOURCES/0002-default_dbroot.patch +++ b/SOURCES/0002-default_dbroot.patch @@ -1,13 +1,22 @@ diff --git a/rtslib/root.py b/rtslib/root.py -index b83d7ee..49c4dfc 100644 +index 15d8cc5..c4a6d43 100644 --- a/rtslib/root.py +++ b/rtslib/root.py -@@ -166,13 +166,13 @@ class RTSRoot(CFSNode): +@@ -166,21 +166,21 @@ class RTSRoot(CFSNode): self._dbroot = self._default_dbroot return self._dbroot = fread(dbroot_path) - if self._dbroot != self._preferred_dbroot: + if self._dbroot != self._default_dbroot: + if len(FabricModule.list_registered_drivers()) is not 0: + # Writing to dbroot_path after drivers have been registered will make the kernel emit this error: + # db_root: cannot be changed: target drivers registered + from warnings import warn + warn("Cannot set dbroot to {}. Target drivers have already been registered." +- .format(self._preferred_dbroot)) ++ .format(self._default_dbroot)) + return + try: - fwrite(dbroot_path, self._preferred_dbroot+"\n") + fwrite(dbroot_path, self._default_dbroot+"\n") diff --git a/SPECS/python-rtslib.spec b/SPECS/python-rtslib.spec index 210e8ba..04902a1 100644 --- a/SPECS/python-rtslib.spec +++ b/SPECS/python-rtslib.spec @@ -21,10 +21,10 @@ Name: python-rtslib License: ASL 2.0 Group: System Environment/Libraries Summary: API for Linux kernel LIO SCSI target -Version: 2.1.71 -Release: 4%{?dist} -URL: https://fedorahosted.org/targetcli-fb/ -Source: https://fedorahosted.org/released/targetcli-fb/%{oname}-%{version}.tar.gz +Version: 2.1.72 +Release: 1%{?dist} +URL: https://github.com/open-iscsi/%{oname} +Source: %{url}/archive/v%{version}/%{oname}-%{version}.tar.gz Source1: target.service Patch0: 0001-Turn-off-unsupported-fabrics.patch Patch1: 0002-default_dbroot.patch @@ -191,6 +191,9 @@ install -m 644 doc/saveconfig.json.5.gz %{buildroot}%{_mandir}/man5/ %endif # with python2 %changelog +* Mon May 11 2020 Maurizio Lombardi - 2.1.72-1 +- Update to new upstream version + * Thu Dec 12 2019 Maurizio Lombardi - 2.1.71-4 - LIO should use /var/target for its runtime files