package update

(cherry picked from commit 74dc5cf832b2dc830d00e80c7bca6e819ef723b0)
This commit is contained in:
wu-leilei 2021-12-29 16:35:19 +08:00 committed by openeuler-sync-bot
parent d2d2a1edd8
commit 8811fd8a0d
5 changed files with 22 additions and 59 deletions

View File

@ -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):

View File

@ -1,22 +0,0 @@
From 598f988cb90e318a62a164cadb2045f4e6778bda Mon Sep 17 00:00:00 2001
From: Pavel Zakharov <pavel.zakharov@delphix.com>
Date: Tue, 20 Feb 2018 17:53:20 -0500
Subject: [PATCH] MappedLuns and Luns max number is not the same anymore
---
targetcli/ui_target.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/targetcli/ui_target.py b/targetcli/ui_target.py
index 87c5a2a..6895b38 100644
--- a/targetcli/ui_target.py
+++ b/targetcli/ui_target.py
@@ -1141,7 +1141,7 @@ def ui_command_create(self, storage_object, lun=None,
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(LUN.MAX_LUN):
+ for possible_mlun in six.moves.range(MappedLUN.MAX_LUN):
if possible_mlun not in existing_mluns:
mapped_lun = possible_mlun
break

BIN
targetcli-fb-2.1.54.tar.gz Normal file

Binary file not shown.

View File

@ -1,15 +1,13 @@
Name: targetcli
Version: 2.1.fb48
Release: 10
License: ASL 2.0
Summary: Generic SCSI target CLI shell
Version: 2.1.54
Release: 1
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
Patch0001: MappedLuns-and-Luns-max-number-is-not-the-same-anymore.patch
Source: https://github.com/open-iscsi/targetcli-fb/archive/v%{version}/targetcli-fb-%{version}.tar.gz
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
@ -22,28 +20,36 @@ Summary: Help document for the %{name} package
Help document for the %{name} package.
%prep
%autosetup -n targetcli-fb-%{version} -p1
%setup -q -n targetcli-fb-%{version}
%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
* 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

Binary file not shown.