add patch 0001-signed-char.patch

Signed-off-by: Andy Grover <agrover@redhat.com>
This commit is contained in:
Andy Grover 2018-05-08 10:53:11 -07:00
parent 8df3ac6f94
commit c13263d263
2 changed files with 27 additions and 1 deletions

21
0001-signed-char.patch Normal file
View File

@ -0,0 +1,21 @@
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

@ -5,9 +5,10 @@ License: ASL 2.0
Group: System Environment/Libraries
Summary: An administration shell for storage targets
Version: 2.1.fb48
Release: 3%{?dist}
Release: 4%{?dist}
URL: https://fedorahosted.org/targetcli-fb/
Source: https://fedorahosted.org/released/targetcli-fb/%{oname}-%{version}.tar.gz
Patch0001: 0001-signed-char.patch
BuildArch: noarch
BuildRequires: python3-devel, python3-setuptools
Requires: python3-rtslib, target-restore, python3-configshell, python3-six, python3-dbus, python3-gobject
@ -21,6 +22,7 @@ users will also need to install and use fcoe-utils.
%prep
%setup -q -n %{oname}-%{version}
%patch1 -p1
%build
%{__python3} setup.py build
@ -41,6 +43,9 @@ install -m 644 targetcli.8.gz %{buildroot}%{_mandir}/man8/
%{_mandir}/man8/targetcli.8.gz
%changelog
* Tue May 8 2018 Andy Grover <agrover@redhat.com> - 2.1.fb48-4
- Add patch 0001-signed-char.patch
* Fri Feb 09 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 2.1.fb48-3
- Escape macros in %%changelog