Compare commits
10 Commits
5215822e04
...
ceb5ea73d3
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ceb5ea73d3 | ||
|
|
cb6fd31a2a | ||
|
|
106115ec6b | ||
|
|
8ebaf3da26 | ||
|
|
e4104c058c | ||
|
|
83fa9b7fa9 | ||
|
|
7af0b5dba3 | ||
|
|
8811fd8a0d | ||
|
|
d2d2a1edd8 | ||
|
|
f4863df394 |
@ -1,21 +0,0 @@
|
||||
commit ed5ff9b9505e50b545e86dfbdd32077f0ddda0cb
|
||||
Author: Taylor Jakobson <tjakobs@us.ibm.com>
|
||||
Date: Thu Feb 1 14:44:32 2018 -0600
|
||||
|
||||
Use signed char instead of char
|
||||
|
||||
Python3 does not have the "character" type, use signed char instead.
|
||||
|
||||
diff --git a/targetcli/ui_backstore.py b/targetcli/ui_backstore.py
|
||||
index 3a2db10..5af448f 100644
|
||||
--- a/targetcli/ui_backstore.py
|
||||
+++ b/targetcli/ui_backstore.py
|
||||
@@ -536,7 +536,7 @@ class UIBlockBackstore(UIBackstore):
|
||||
except (OSError, IOError):
|
||||
raise ExecutionError("Could not open %s" % dev)
|
||||
# ioctl returns an int. Provision a buffer for it
|
||||
- buf = array.array('c', [chr(0)] * 4)
|
||||
+ buf = array.array('b', [0] * 4)
|
||||
try:
|
||||
fcntl.ioctl(f, BLKROGET, buf)
|
||||
except (OSError, IOError):
|
||||
30
fix-mapping-the-new-LUN-to-the-node-ACL.patch
Normal file
30
fix-mapping-the-new-LUN-to-the-node-ACL.patch
Normal file
@ -0,0 +1,30 @@
|
||||
From 560993168d85ec7c84e9aacba5659aa17b40588c Mon Sep 17 00:00:00 2001
|
||||
From: Maurizio Lombardi <mlombard@redhat.com>
|
||||
Date: Tue, 30 Jan 2024 13:03:08 +0100
|
||||
Subject: [PATCH] Fix mapping the new LUN to the node ACL
|
||||
|
||||
Signed-off-by: Maurizio Lombardi <mlombard@redhat.com>
|
||||
|
||||
---
|
||||
targetcli/ui_target.py | 5 ++---
|
||||
1 file changed, 2 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/targetcli/ui_target.py b/targetcli/ui_target.py
|
||||
index 2c46765..56f5419 100644
|
||||
--- a/targetcli/ui_target.py
|
||||
+++ b/targetcli/ui_target.py
|
||||
@@ -1151,9 +1151,8 @@ class UILUNs(UINode):
|
||||
possible_mlun += 1
|
||||
mapped_lun = possible_mlun
|
||||
|
||||
- else:
|
||||
- mlun = MappedLUN(acl, mapped_lun, lun_object, write_protect=False)
|
||||
- self.shell.log.info("Created LUN %d->%d mapping in node ACL %s"
|
||||
+ mlun = MappedLUN(acl, mapped_lun, lun_object, write_protect=False)
|
||||
+ self.shell.log.info("Created LUN %d->%d mapping in node ACL %s"
|
||||
% (mlun.tpg_lun.lun, mlun.mapped_lun, acl.node_wwn))
|
||||
self.parent.refresh()
|
||||
|
||||
--
|
||||
2.27.0
|
||||
|
||||
43
remove-reference-to-MAX_LUN.patch
Normal file
43
remove-reference-to-MAX_LUN.patch
Normal file
@ -0,0 +1,43 @@
|
||||
From 4424eba4ba9f5c66c0cd8691fd4aad87ee19640f Mon Sep 17 00:00:00 2001
|
||||
From: Maurizio Lombardi <mlombard@redhat.com>
|
||||
Date: Thu, 19 Oct 2023 14:15:54 +0200
|
||||
Subject: [PATCH] target: remove the reference to MAX_LUN
|
||||
|
||||
The MappedLUN.MAX_LUN symbol has been removed from rtslib.
|
||||
Remove the reference to it.
|
||||
|
||||
Signed-off-by: Maurizio Lombardi <mlombard@redhat.com>
|
||||
|
||||
---
|
||||
targetcli/ui_target.py | 15 +++++----------
|
||||
1 file changed, 5 insertions(+), 10 deletions(-)
|
||||
|
||||
diff --git a/targetcli/ui_target.py b/targetcli/ui_target.py
|
||||
index e8ba6c6..2c46765 100644
|
||||
--- a/targetcli/ui_target.py
|
||||
+++ b/targetcli/ui_target.py
|
||||
@@ -1146,16 +1146,11 @@ class UILUNs(UINode):
|
||||
mapped_lun = 0
|
||||
existing_mluns = [mlun.mapped_lun for mlun in acl.mapped_luns]
|
||||
if mapped_lun in existing_mluns:
|
||||
- mapped_lun = None
|
||||
- for possible_mlun in six.moves.range(MappedLUN.MAX_LUN):
|
||||
- if possible_mlun not in existing_mluns:
|
||||
- mapped_lun = possible_mlun
|
||||
- break
|
||||
-
|
||||
- if mapped_lun == None:
|
||||
- self.shell.log.warning(
|
||||
- "Cannot map new lun %s into ACL %s"
|
||||
- % (lun_object.lun, acl.node_wwn))
|
||||
+ possible_mlun = 0
|
||||
+ while possible_mlun in existing_mluns:
|
||||
+ possible_mlun += 1
|
||||
+ mapped_lun = possible_mlun
|
||||
+
|
||||
else:
|
||||
mlun = MappedLUN(acl, mapped_lun, lun_object, write_protect=False)
|
||||
self.shell.log.info("Created LUN %d->%d mapping in node ACL %s"
|
||||
--
|
||||
2.27.0
|
||||
|
||||
BIN
targetcli-fb-2.1.56.tar.gz
Normal file
BIN
targetcli-fb-2.1.56.tar.gz
Normal file
Binary file not shown.
@ -1,14 +1,15 @@
|
||||
Name: targetcli
|
||||
Version: 2.1.fb48
|
||||
Release: 9
|
||||
License: ASL 2.0
|
||||
Summary: Generic SCSI target CLI shell
|
||||
Version: 2.1.56
|
||||
Release: 3
|
||||
URL: https://github.com/open-iscsi/targetcli-fb
|
||||
Source: https://github.com/open-iscsi/targetcli-fb/archive/v2.1.fb48.tar.gz
|
||||
Patch0000: 0000-signed-char.patch
|
||||
Source: https://github.com/open-iscsi/targetcli-fb/archive/v%{version}/targetcli-fb-%{version}.tar.gz
|
||||
Patch01: remove-reference-to-MAX_LUN.patch
|
||||
Patch02: fix-mapping-the-new-LUN-to-the-node-ACL.patch
|
||||
BuildArch: noarch
|
||||
BuildRequires: python3-devel python3-setuptools
|
||||
Requires: python3-rtslib target-restore python3-configshell python3-six python3-dbus python3-gobject
|
||||
BuildRequires: python3-devel python3-setuptools systemd
|
||||
Requires: python3-rtslib target-restore python3-configshell python3-six python3-dbus python3-gobject-base
|
||||
|
||||
%description
|
||||
Targetcli is an administration tool for managing storage targets
|
||||
@ -24,24 +25,44 @@ Help document for the %{name} package.
|
||||
%autosetup -n targetcli-fb-%{version} -p1
|
||||
|
||||
%build
|
||||
%{__python3} setup.py build
|
||||
gzip --stdout targetcli.8 > targetcli.8.gz
|
||||
%py3_build
|
||||
|
||||
%install
|
||||
%{__python3} setup.py install --skip-build --root %{buildroot}
|
||||
install -d %{buildroot}%{_sysconfdir}/target/backup
|
||||
install -D -m 644 targetcli.8.gz %{buildroot}%{_mandir}/man8/targetcli.8.gz
|
||||
%py3_install
|
||||
mkdir -p %{buildroot}%{_sysconfdir}/target/backup
|
||||
mkdir -p %{buildroot}%{_mandir}/man8/
|
||||
install -m 644 targetcli*.8 %{buildroot}%{_mandir}/man8/
|
||||
mkdir -p %{buildroot}%{_unitdir}/
|
||||
install -m 644 systemd/* %{buildroot}%{_unitdir}/
|
||||
|
||||
%files
|
||||
%doc COPYING README.md
|
||||
%{python3_sitelib}/*
|
||||
%doc README.md
|
||||
%license COPYING
|
||||
%{python3_sitelib}/targetcli*
|
||||
%{_bindir}/targetcli
|
||||
%{_bindir}/targetclid
|
||||
%{_unitdir}/*
|
||||
%dir %{_sysconfdir}/target
|
||||
%dir %{_sysconfdir}/target/backup
|
||||
|
||||
%files help
|
||||
%{_mandir}/man8/targetcli.8.gz
|
||||
%{_mandir}/man8/targetcli*.8*
|
||||
|
||||
%changelog
|
||||
* Mon May 13 2024 yanshuai <yanshuai@kylinos.cn> - 2.1.56-3
|
||||
- fix mapping the new LUN to the node ACL
|
||||
|
||||
* Wed May 8 2024 yanshuai <yanshuai@kylinos.cn> - 2.1.56-2
|
||||
- remove the reference to MAX_LUN
|
||||
|
||||
* Mon Jul 24 2023 zhangchenglin <zhangchenglin@kylinos.cn> - 2.1.56-1
|
||||
- upgrade version to 2.1.56
|
||||
|
||||
* Wed Dec 29 2021 wulei <wulei80@huawei.com> - 2.1.54-1
|
||||
- Package update
|
||||
|
||||
* Wed Jul 15 2020 wangyue <wangyue92@huawei.com> - 2.1.fb48-10
|
||||
- fix unexpected error raised when adding luns
|
||||
|
||||
* Fri Feb 14 2020 lingsheng <lingsheng@huawei.com> - 2.1.fb48-9
|
||||
- Package int
|
||||
|
||||
BIN
v2.1.fb48.tar.gz
BIN
v2.1.fb48.tar.gz
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user