!9 python-rtslib: backport one upstream patch - epoch2

From: @liuzhiqiang26
Reviewed-by: @lixiaokeng,@wubo009
Signed-off-by: @wubo009
This commit is contained in:
openeuler-ci-bot 2020-11-02 10:37:25 +08:00 committed by Gitee
commit 905b7ddfab
2 changed files with 31 additions and 1 deletions

View File

@ -0,0 +1,26 @@
From 964520037320534512713e58bf70be6c428097dc Mon Sep 17 00:00:00 2001
From: Jaroslav <niekto@niekde.sk>
Date: Tue, 7 Jul 2020 11:21:45 +0200
Subject: [PATCH 1/4] Fix EPERM errors with scsi_generic devices
Resolves https://github.com/open-iscsi/targetcli-fb/issues/158
---
rtslib/utils.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/rtslib/utils.py b/rtslib/utils.py
index eff2205..4bcadea 100644
--- a/rtslib/utils.py
+++ b/rtslib/utils.py
@@ -114,7 +114,7 @@ def is_dev_in_use(path):
'''
path = os.path.realpath(str(path))
try:
- file_fd = os.open(path, os.O_EXCL|os.O_NDELAY)
+ file_fd = os.open(path, os.O_EXCL|os.O_NDELAY|os.O_RDWR)
except OSError:
return True
else:
--
1.8.3.1

View File

@ -4,7 +4,7 @@
Name: python-rtslib
Version: 2.1.70
Release: 6
Release: 7
Summary: Python object API for Linux kernel LIO SCSI target
License: ASL 2.0
@ -12,6 +12,7 @@ URL: https://github.com/open-iscsi/%{oname}
Source0: %{url}/archive/v%{version}/%{oname}-%{version}.tar.gz
Patch1: 0001-saveconfig-copy-temp-configfile-with-permissions.patch
Patch2: 0002-saveconfig-open-the-temp-configfile-with-modes-set.patch
Patch3: 0003-Fix-EPERM-errors-with-scsi_generic-devices.patch
BuildArch: noarch
BuildRequires: systemd-units
@ -120,6 +121,9 @@ install -m 644 doc/saveconfig.json.5.gz %{buildroot}%{_mandir}/man5/
%{_mandir}/man5/saveconfig.json.5.gz
%changelog
* Mon Nov 2 2020 Zhiqiang Liu <lzhq28@mail.ustc.edu.cn> - 2.1.70-7
- backport upstream patch to solve one problem
* Fri Oct 30 2020 tianwei <tianwei12@huawei.com> - 2.1.70-6
- remove python2