diff --git a/.gitignore b/.gitignore index 4a41cd0..49a15e7 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -SOURCES/rtslib-fb-2.1.fb57.tar.gz +SOURCES/rtslib-fb-2.1.fb63.tar.gz diff --git a/.python-rtslib.metadata b/.python-rtslib.metadata index 5c116d5..40b74a9 100644 --- a/.python-rtslib.metadata +++ b/.python-rtslib.metadata @@ -1 +1 @@ -72f544ff4811022966e1bc6f9c34c51df6153951 SOURCES/rtslib-fb-2.1.fb57.tar.gz +d09530859a0d8004fab0dd9dcee358a709dca119 SOURCES/rtslib-fb-2.1.fb63.tar.gz diff --git a/SOURCES/0001-Turn-off-unsupported-fabrics.patch b/SOURCES/0001-Turn-off-unsupported-fabrics.patch index dede061..40ed1af 100644 --- a/SOURCES/0001-Turn-off-unsupported-fabrics.patch +++ b/SOURCES/0001-Turn-off-unsupported-fabrics.patch @@ -1,18 +1,18 @@ -From fedcdad7023f799461bc86f912741b0b7e844204 Mon Sep 17 00:00:00 2001 +From 60b9fc9c9baf2f05e5021c8b27e173733ea62ea5 Mon Sep 17 00:00:00 2001 From: Andy Grover Date: Mon, 7 Oct 2013 15:32:27 -0700 Subject: [PATCH] Turn off unsupported fabrics Signed-off-by: Andy Grover --- - rtslib/fabric.py | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) + rtslib/fabric.py | 10 +++++----- + 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/rtslib/fabric.py b/rtslib/fabric.py -index eae6325..1ef0b67 100644 +index 2887783..a44aa7e 100644 --- a/rtslib/fabric.py +++ b/rtslib/fabric.py -@@ -441,11 +441,11 @@ fabric_modules = { +@@ -464,13 +464,13 @@ fabric_modules = { "srpt": SRPTFabricModule, "iscsi": ISCSIFabricModule, "loopback": LoopbackFabricModule, @@ -23,7 +23,11 @@ index eae6325..1ef0b67 100644 "tcm_fc": FCoEFabricModule, # "usb_gadget": USBGadgetFabricModule, # very rare, don't show - "vhost": VhostFabricModule, +- "xen_pvscsi": XenPvScsiFabricModule, +- "ibmvscsis": IbmvscsisFabricModule, +# "vhost": VhostFabricModule, ++# "xen_pvscsi": XenPvScsiFabricModule, ++# "ibmvscsis": IbmvscsisFabricModule, } # diff --git a/SOURCES/0002-Fix-comparisons-to-None.patch b/SOURCES/0002-Fix-comparisons-to-None.patch index 50a309d..327a2e7 100644 --- a/SOURCES/0002-Fix-comparisons-to-None.patch +++ b/SOURCES/0002-Fix-comparisons-to-None.patch @@ -1,4 +1,4 @@ -From 12bc042fd8afb084a8abbdf835df7be040580bfd Mon Sep 17 00:00:00 2001 +From 32d8b8ef61a3786ff409bdba7f74ab53987f04c1 Mon Sep 17 00:00:00 2001 From: Andy Grover Date: Wed, 28 Oct 2015 09:28:29 -0700 Subject: [PATCH] Fix comparisons to None diff --git a/SOURCES/0003-Fix-exception-in-convert_scsi_hctl_to_path.patch b/SOURCES/0003-Fix-exception-in-convert_scsi_hctl_to_path.patch new file mode 100644 index 0000000..4b8b166 --- /dev/null +++ b/SOURCES/0003-Fix-exception-in-convert_scsi_hctl_to_path.patch @@ -0,0 +1,25 @@ +From e6b267ec3712b5d13c352c6090dffbd0144ed028 Mon Sep 17 00:00:00 2001 +From: Andy Grover +Date: Wed, 17 May 2017 09:37:59 -0700 +Subject: [PATCH] Fix exception in convert_scsi_hctl_to_path + +Convert integers to string before using them with .join(). + +Signed-off-by: Andy Grover +--- + rtslib/utils.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/rtslib/utils.py b/rtslib/utils.py +index 1a5315e..eeb1f6c 100644 +--- a/rtslib/utils.py ++++ b/rtslib/utils.py +@@ -294,7 +294,7 @@ def convert_scsi_hctl_to_path(host, controller, target, lun): + raise RTSLibError( + "The host, controller, target and lun parameter must be integers") + +- hctl = [host, controller, target, lun] ++ hctl = [str(host), str(controller), str(target), str(lun)] + try: + scsi_device = pyudev.Device.from_name(_CONTEXT, 'scsi', ':'.join(hctl)) + except pyudev.DeviceNotFoundError: diff --git a/SOURCES/0003-Fix-regex-in-get_size_for_disk_name.patch b/SOURCES/0003-Fix-regex-in-get_size_for_disk_name.patch deleted file mode 100644 index 6aab430..0000000 --- a/SOURCES/0003-Fix-regex-in-get_size_for_disk_name.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 7011f8460b0f21b414fae2a62a330c1312ec6fc0 Mon Sep 17 00:00:00 2001 -From: Andy Grover -Date: Fri, 6 Nov 2015 09:13:35 -0800 -Subject: [PATCH] Fix regex in get_size_for_disk_name - -Would break with 'sda10'. We need to non-greedily match the first subgroup. - -Signed-off-by: Andy Grover ---- - rtslib/utils.py | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/rtslib/utils.py b/rtslib/utils.py -index 5531e8f..79a4d9d 100644 ---- a/rtslib/utils.py -+++ b/rtslib/utils.py -@@ -152,7 +152,7 @@ def get_size_for_disk_name(name): - return get_size("/sys/block/%s" % name) - except IOError: - # Maybe it's a partition? -- m = re.search(r'^([a-z0-9_\-!]+)(\d+)$', name) -+ m = re.search(r'^([a-z0-9_\-!]+?)(\d+)$', name) - if m: - # If disk name ends with a digit, Linux sticks a 'p' between it and - # the partition number in the blockdev name. diff --git a/SPECS/python-rtslib.spec b/SPECS/python-rtslib.spec index 4a46b41..aef9700 100644 --- a/SPECS/python-rtslib.spec +++ b/SPECS/python-rtslib.spec @@ -8,17 +8,17 @@ Name: python-rtslib License: ASL 2.0 Group: System Environment/Libraries Summary: API for Linux kernel LIO SCSI target -Version: 2.1.fb57 -Release: 5%{?dist} +Version: 2.1.fb63 +Release: 2%{?dist} URL: https://fedorahosted.org/targetcli-fb/ Source: https://fedorahosted.org/released/targetcli-fb/%{oname}-%{version}.tar.gz Source1: target.service Patch0: 0001-Turn-off-unsupported-fabrics.patch Patch1: 0002-Fix-comparisons-to-None.patch -Patch2: 0003-Fix-regex-in-get_size_for_disk_name.patch +Patch2: 0003-Fix-exception-in-convert_scsi_hctl_to_path.patch BuildArch: noarch -BuildRequires: python-devel epydoc python-setuptools systemd-units -Requires: python-kmod python-six +BuildRequires: python-devel epydoc python-setuptools systemd-units python-six python-pyudev +Requires: python-kmod python-six python-pyudev Requires(post): systemd Requires(preun): systemd Requires(postun): systemd @@ -128,6 +128,12 @@ popd %doc doc/html %changelog +* Wed May 17 2017 Andy Grover - 2.1.fb63-2 +- Add patch 0003 to fix #1440172 + +* Thu Mar 2 2017 Andy Grover - 2.1.fb63-1 +- Rebuild to fix now-fixed issue with redhat-rpm-config in build system + * Fri Jul 29 2016 Andy Grover - 2.1.fb57-5 - Rebuild to fix now-fixed issue with redhat-rpm-config in build system