[targetcli] update to 2.1.fb26-2

Andy Grover grover at fedoraproject.org
Tue Jun 18 18:23:09 UTC 2013


commit a8fc80634b837cad6d155bd748eee05a7ec09e7d
Author: Andy Grover <agrover at redhat.com>
Date:   Tue Jun 18 10:53:48 2013 -0700

    update to 2.1.fb26-2
    
    Signed-off-by: Andy Grover <agrover at redhat.com>

 targetcli-modules-not-loaded.patch |   31 +++++++++++++++++++++++++++++++
 targetcli.spec                     |    8 +++++++-
 2 files changed, 38 insertions(+), 1 deletions(-)
---
diff --git a/targetcli-modules-not-loaded.patch b/targetcli-modules-not-loaded.patch
new file mode 100644
index 0000000..4fa9ea1
--- /dev/null
+++ b/targetcli-modules-not-loaded.patch
@@ -0,0 +1,31 @@
+commit a221a535d718c3abbc53ee44713188d70db65a7d
+Author: Andy Grover <agrover at redhat.com>
+Date:   Tue Jun 18 10:49:50 2013 -0700
+
+    Catch module load errors
+    
+    If targetcli is not run for the first time not as root, refresh() will
+    fail because it can't load modules. This returns a nicer error message
+    in that case.
+    
+    See https://bugzilla.redhat.com/show_bug.cgi?id=973852
+    
+    Signed-off-by: Andy Grover <agrover at redhat.com>
+
+diff --git a/scripts/targetcli b/scripts/targetcli
+index a2cbff1..269dc1a 100755
+--- a/scripts/targetcli
++++ b/scripts/targetcli
+@@ -64,8 +64,11 @@ def main():
+ 
+     try:
+         root_node.refresh()
+-    except RTSLibError, error:
++    except Exception, error:
+         shell.con.display(shell.con.render_text(str(error), 'red'))
++        if not is_root:
++            shell.con.display(shell.con.render_text("Retry as root.", 'red'))
++        sys.exit(-1)
+ 
+     if len(sys.argv) > 1:
+         shell.run_cmdline(" ".join(sys.argv[1:]))
diff --git a/targetcli.spec b/targetcli.spec
index f3ee2b5..3c58271 100644
--- a/targetcli.spec
+++ b/targetcli.spec
@@ -5,10 +5,11 @@ License:        AGPLv3
 Group:          System Environment/Libraries
 Summary:        An administration shell for storage targets
 Version:        2.1.fb26
-Release:        1%{?dist}
+Release:        2%{?dist}
 URL:            https://fedorahosted.org/targetcli-fb/
 Source:         https://fedorahosted.org/released/targetcli-fb/%{oname}-%{version}.tar.gz
 Source1:        targetcli.service
+Patch0:         %{name}-modules-not-loaded.patch
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 BuildArch:      noarch
 BuildRequires:  python-devel python-configshell python-ethtool epydoc
@@ -28,6 +29,7 @@ users will also need to install and use fcoe-utils.
 
 %prep
 %setup -q -n %{oname}-%{version}
+%patch0 -p1
 
 %build
 %{__python} setup.py build
@@ -65,6 +67,10 @@ rm -rf %{buildroot}
 %{_mandir}/man8/targetcli.8.gz
 
 %changelog
+* Mon Jun 18 2013 Andy Grover <agrover at redhat.com> - 2.1.fb26-2
+- Add patch
+  * modules-not-loaded.patch
+
 * Fri Jun 7 2013 Andy Grover <agrover at redhat.com> - 2.1.fb26-1
 - New upstream release
 


More information about the scm-commits mailing list