From 87ea119a347474b1a58cffaf2b89aa42e5396bb7 Mon Sep 17 00:00:00 2001 From: Andy Grover Date: Nov 04 2013 22:43:25 +0000 Subject: update to 2.1.fb41-2 Signed-off-by: Andy Grover --- diff --git a/python-rtslib.spec b/python-rtslib.spec index 9c33312..af2e03b 100644 --- a/python-rtslib.spec +++ b/python-rtslib.spec @@ -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 - 2.1.fb41-2 +- Update rtslib-fix-setup.patch with backported fixups +- Add in missing systemd requires + * Fri Nov 1 2013 Andy Grover - 2.1.fb41-1 - New upstream version - Remove obsolete spec stuff: clean, buildroot diff --git a/rtslib-fix-setup.patch b/rtslib-fix-setup.patch index e8edde9..fb67195 100644 --- a/rtslib-fix-setup.patch +++ b/rtslib-fix-setup.patch @@ -1,11 +1,38 @@ -commit ba663530889f12834216d813aee128865bdf8fea -Author: Andy Grover -Date: Fri Nov 1 12:15:17 2013 -0700 - - Update setup.py for targetctl script - - Signed-off-by: Andy Grover - +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