update to 2.1.fb41-2

Signed-off-by: Andy Grover <agrover@redhat.com>
This commit is contained in:
Andy Grover 2013-11-04 14:43:25 -08:00
parent e44b55a3dc
commit 87ea119a34
2 changed files with 44 additions and 10 deletions

View File

@ -9,14 +9,17 @@ License: ASL 2.0
Group: System Environment/Libraries
Summary: API for Linux kernel LIO SCSI target
Version: 2.1.fb41
Release: 1%{?dist}
Release: 2%{?dist}
URL: https://fedorahosted.org/targetcli-fb/
Source: https://fedorahosted.org/released/targetcli-fb/%{oname}-%{version}.tar.gz
Source1: target.service
Patch0: rtslib-fix-setup.patch
BuildArch: noarch
BuildRequires: python-devel epydoc python-setuptools
BuildRequires: python-devel epydoc python-setuptools systemd-units
Requires: python-kmod
Requires(post): systemd
Requires(preun): systemd
Requires(postun): systemd
%if 0%{?with_python3}
BuildRequires: python3-devel python-tools python3-setuptools
@ -110,6 +113,10 @@ popd
%doc doc/html
%changelog
* Mon Nov 4 2013 Andy Grover <agrover@redhat.com> - 2.1.fb41-2
- Update rtslib-fix-setup.patch with backported fixups
- Add in missing systemd requires
* Fri Nov 1 2013 Andy Grover <agrover@redhat.com> - 2.1.fb41-1
- New upstream version
- Remove obsolete spec stuff: clean, buildroot

View File

@ -1,11 +1,38 @@
commit ba663530889f12834216d813aee128865bdf8fea
Author: Andy Grover <agrover@redhat.com>
Date: Fri Nov 1 12:15:17 2013 -0700
Update setup.py for targetctl script
Signed-off-by: Andy Grover <agrover@redhat.com>
diff --git a/rtslib/root.py b/rtslib/root.py
index 246c285..d558445 100644
--- a/rtslib/root.py
+++ b/rtslib/root.py
@@ -70,6 +70,7 @@ class RTSRoot(CFSNode):
base kernel modules (tcm)
'''
super(RTSRoot, self).__init__()
+ modprobe('configfs')
mount_configfs()
modprobe('target_core_mod')
self._create_in_cfs_ine('any')
@@ -247,7 +248,7 @@ class RTSRoot(CFSNode):
if not restore_file:
restore_file = default_save_file
- with open(from_file, "r") as f:
+ with open(restore_file, "r") as f:
config = json.loads(f.read())
return self.restore(config, clear_existing=True,
abort_on_error=abort_on_error)
diff --git a/scripts/targetctl b/scripts/targetctl
index db8e0d2..bdf59f4 100755
--- a/scripts/targetctl
+++ b/scripts/targetctl
@@ -42,8 +42,7 @@ def save(to_file):
RTSRoot().save_to_file(save_file=to_file)
def restore(from_file):
- errors = RTSRoot().restore_from_file(restore_file=from_file,
- clear_existing=True)
+ errors = RTSRoot().restore_from_file(restore_file=from_file)
if errors:
print("Restore failed, %d errors:" % len(errors), file=err)
diff --git a/setup.py b/setup.py
index 7f41d52..5886fbc 100755
--- a/setup.py