Hello community,
here is the log from the commit of package lio-utils for openSUSE:Factory checked in at 2014-06-16 21:27:10
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/lio-utils (Old)
and /work/SRC/openSUSE:Factory/.lio-utils.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "lio-utils"
Changes:
--------
--- /work/SRC/openSUSE:Factory/lio-utils/lio-utils.changes 2014-06-01 19:40:29.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.lio-utils.new/lio-utils.changes 2014-06-16 21:27:11.000000000 +0200
@@ -1,0 +2,17 @@
+Wed Jun 4 08:51:22 PDT 2014 - lduncan@suse.com
+
+- Updated to latest from SLE 12, adding patches:
+ * 0028-lio_dump-Implement-file-option.patch
+ Implements a "--file" option for lio_dump (bnc#876881)
+ * 0029-tcm_dump-Implement-file-option.patch
+ Implements a "--file" option for tcm_dump (bnc#876881)
+ * 0030-target.service-Fixup-service-file.patch
+ Clean up systemd service file, using new "--file" options
+ (bnc#876881)
+ * 0031-lio_node-create-sys-kernel-config-target-iscsi-on-st.patch
+ create /sys/kernel/config/target/iscsi to trigger module
+ load (bnc#877731)
+ * 0032-lio-utils-remove-systemd-default-dependies.patch
+ adds DefaultDependencies=No to service file (bnc#878053)
+
+-------------------------------------------------------------------
New:
----
0028-lio_dump-Implement-file-option.patch
0029-tcm_dump-Implement-file-option.patch
0030-target.service-Fixup-service-file.patch
0031-lio_node-create-sys-kernel-config-target-iscsi-on-st.patch
0032-lio-utils-remove-systemd-default-dependies.patch
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ lio-utils.spec ++++++
--- /var/tmp/diff_new_pack.vgitwr/_old 2014-06-16 21:27:12.000000000 +0200
+++ /var/tmp/diff_new_pack.vgitwr/_new 2014-06-16 21:27:12.000000000 +0200
@@ -77,6 +77,11 @@
Patch25: 0025-target.service-Add-systemd-service-file.patch
Patch26: 0026-iscsiMib.c-fixes-for-strict-aliasing.patch
Patch27: 0027-Compile-tools-with-OPTFLAGS.patch
+Patch28: 0028-lio_dump-Implement-file-option.patch
+Patch29: 0029-tcm_dump-Implement-file-option.patch
+Patch30: 0030-target.service-Fixup-service-file.patch
+Patch31: 0031-lio_node-create-sys-kernel-config-target-iscsi-on-st.patch
+Patch32: 0032-lio-utils-remove-systemd-default-dependies.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
@@ -172,6 +177,11 @@
%patch25 -p1
%patch26 -p1
%patch27 -p1
+%patch28 -p1
+%patch29 -p1
+%patch30 -p1
+%patch31 -p1
+%patch32 -p1
%build
make %{?_smp_mflags} OPTFLAGS="$RPM_OPT_FLAGS"
++++++ 0028-lio_dump-Implement-file-option.patch ++++++
From 47c3dbd3ba322d7d00881dada8282968a2f07349 Mon Sep 17 00:00:00 2001
From: Hannes Reinecke
Date: Thu, 15 May 2014 10:06:22 +0200
Subject: lio_dump: Implement '--file' option
Implement an optino '--file' to dump the script into a file.
This is required for systemd support as the system service
unit syntax doesn't support redirection.
References: bnc#876881
Signed-off-by: Hannes Reinecke
---
lio-py/lio_dump.py | 34 ++++++++++++++++++++++++++++++++++
1 file changed, 34 insertions(+)
diff --git a/lio-py/lio_dump.py b/lio-py/lio_dump.py
index c6a3600..13c5a31 100755
--- a/lio-py/lio_dump.py
+++ b/lio-py/lio_dump.py
@@ -279,6 +279,38 @@ def lio_backup_to_file(option, opt_str, value, parser):
back.close()
return backup_file
+def lio_dump_to_file(option, opt_str, value, parser):
+ dump_file = str(value)
+
+ op = "lio_dump --stdout"
+ p = sub.Popen(op, shell=True, stdout=sub.PIPE).stdout
+ if not p:
+ print "Unable to dump LIO-Target/ConfigFS running state"
+ sys.exit(1)
+
+ try:
+ back = open(dump_file, 'w+')
+ except IOError:
+ print "cannot open " + dump_file
+ p.close()
+ sys.exit(1)
+ else:
+ line = p.readline()
+ while line:
+ print >>back, line.rstrip()
+ line = p.readline()
+
+ back.close()
+
+ p.close()
+
+ op = "chmod 755 " + dump_file
+ ret = os.system(op)
+ if ret:
+ print "Unable to mark " + dump_file + " as executable"
+
+ return dump_file
+
def main():
parser = OptionParser()
@@ -286,6 +318,8 @@ def main():
help="Dump running LIO-Target/ConfigFS syntax to STDOUT")
parser.add_option("--t", "--tofile", action="callback", callback=lio_backup_to_file, nargs=1,
type="string", dest="DATE_TIME", help="Backup running LIO-Target/ConfigFS syntax to /etc/target/backup/lio_backup-.sh")
+ parser.add_option("--f", "--file", action="callback", callback=lio_dump_to_file, nargs=1,
+ type="string", dest="DUMP_FILE", help="Save running LIO-Target/ConfigFS syntax to ")
(options, args) = parser.parse_args()
if len(sys.argv) == 1:
--
1.7.12.4
++++++ 0029-tcm_dump-Implement-file-option.patch ++++++
From 215ca5050fe994e6617fe0e1e80036f8c0f1e2e0 Mon Sep 17 00:00:00 2001
From: Hannes Reinecke
Date: Thu, 15 May 2014 10:11:12 +0200
Subject: tcm_dump: Implement '--file' option
Implement a '--file' option to dump the script into a file.
This is required for systemd integration as the systemd unit
syntax doesn't support redirection.
References: bnc#876881
Signed-off-by: Hannes Reinecke
---
tcm-py/tcm_dump.py | 33 +++++++++++++++++++++++++++++++++
1 file changed, 33 insertions(+)
diff --git a/tcm-py/tcm_dump.py b/tcm-py/tcm_dump.py
index 9e182b1..27644e4 100755
--- a/tcm-py/tcm_dump.py
+++ b/tcm-py/tcm_dump.py
@@ -264,6 +264,37 @@ def tcm_backup_to_file(option, opt_str, value, parser):
back.close()
return backup_file
+def tcm_dump_to_file(option, opt_str, value, parser):
+ dump_file = str(value)
+
+ op = "tcm_dump --stdout"
+ p = sub.Popen(op, shell=True, stdout=sub.PIPE).stdout
+ if not p:
+ print "Unable to dump Target_Core_Mod/ConfigFS running state"
+ sys.exit(1)
+
+ try:
+ back = open(dump_file, 'w+')
+ except IOError:
+ print "cannot open " + dump_file
+ p.close()
+ sys.exit(1)
+ else:
+ line = p.readline()
+ while line:
+ print >>back, line.rstrip()
+ line = p.readline()
+
+ back.close()
+
+ p.close()
+ op = "chmod 755 " + dump_file
+ ret = os.system(op)
+ if ret:
+ print "Unable to mark " + dump_file + " as executable"
+
+ return dump_file
+
def tcm_full_backup(option, opt_str, value, parser):
overwrite = str(value)
@@ -332,6 +363,8 @@ def main():
help="Dump running Target_Core_Mod/ConfigFS syntax to STDOUT")
parser.add_option("--t", "--tofile", action="callback", callback=tcm_backup_to_file, nargs=1,
type="string", dest="DATE_TIME", help="Backup running Target_Core_Mod/ConfigFS syntax to /etc/target/backup/tcm_backup-.sh")
+ parser.add_option("--f", "--file", action="callback", callback=tcm_dump_to_file, nargs=1,
+ type="string", dest="DUMP_FILE", help="Save running Target_Core_Mod/ConfigFS syntax to ")
(options, args) = parser.parse_args()
if len(sys.argv) == 1:
--
1.7.12.4
++++++ 0030-target.service-Fixup-service-file.patch ++++++
From b24ba816dd2c8bed0de942fb11907f39689148f9 Mon Sep 17 00:00:00 2001
From: Hannes Reinecke
Date: Thu, 15 May 2014 10:12:47 +0200
Subject: target.service: Fixup service file
The systemd service syntax doesn't support redirection, so we
need to use the '--file' option for tcm_dump and lio_dump.
Also ExecStopPre doesn't exist, so we need to reshuffle the
ExecStop calls.
References: bnc#876881
Signed-off-by: Hannes Reinecke
---
scripts/target.service | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/scripts/target.service b/scripts/target.service
index 212e9a2..701bbcb 100644
--- a/scripts/target.service
+++ b/scripts/target.service
@@ -4,16 +4,16 @@ Description="Generic Target Mode service"
[Service]
Type=oneshot
RemainAfterExit=yes
-ExecStart="/etc/target/tcm_start.sh"
-ExecStart="/etc/target/lio_start.sh"
-ExecStartPost=-"/etc/target/tcm_setup.sh"
-ExecStartPost=-"/etc/target/lio_setup.sh"
+ExecStart=/etc/target/tcm_start.sh
+ExecStart=/etc/target/lio_start.sh
+ExecStartPost=-/etc/target/tcm_setup.sh
+ExecStartPost=-/etc/target/lio_setup.sh
-ExecStopPre="/usr/sbin/lio_dump --stdout > /etc/target/lio_setup.sh"
-ExecStopPre="/usr/sbin/tcm_setup --stdout > /etc/target/tcm_setup.sh"
-ExecStop="/usr/sbin/tcm_fabric --unloadall"
-ExecStop="/usr/sbin/lio_node --unload"
-ExecStopPost="/usr/sbin/tcm_node --unload"
+ExecStop=/usr/sbin/lio_dump --file /etc/target/lio_setup.sh
+ExecStop=/usr/sbin/tcm_dump --file /etc/target/tcm_setup.sh
+ExecStopPost=/usr/sbin/tcm_fabric --unloadall
+ExecStopPost=/usr/sbin/lio_node --unload
+ExecStopPost=/usr/sbin/tcm_node --unload
[Install]
WantedBy=sysinit.target
--
1.7.12.4
++++++ 0031-lio_node-create-sys-kernel-config-target-iscsi-on-st.patch ++++++
From 1740f62939b36c9cd8f3549a63886500cb930f2a Mon Sep 17 00:00:00 2001
From: Hannes Reinecke
Date: Thu, 15 May 2014 12:02:37 +0200
Subject: [PATCH] lio_node: create /sys/kernel/config/target/iscsi on startup
We should attempt to create /sys/kernel/config/target/iscsi
upon startup to trigger a module load here.
References: bnc#877731
Signed-off-by: Hannes Reinecke
---
lio-py/lio_node.py | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/lio-py/lio_node.py b/lio-py/lio_node.py
index 51faef6..d69487f 100755
--- a/lio-py/lio_node.py
+++ b/lio-py/lio_node.py
@@ -1300,8 +1300,13 @@ def lio_target_enable_debug(option, opt_str, value, parser):
return
def main():
+ if not os.path.isdir(tcm_root):
+ lio_err("target_core_mod module not loaded");
if not os.path.isdir(lio_root):
- lio_err("iscsi_target_mod is not loaded")
+ mkdir_op = "mkdir -p " + lio_root
+ ret = os.system(mkdir_op)
+ if ret:
+ lio_err("Unable to load iscsi_target_mod")
parser = OptionParser()
parser.add_option("--addlunacl", action="callback", callback=lio_target_add_lunacl, nargs=5,
--
1.7.12.4
++++++ 0032-lio-utils-remove-systemd-default-dependies.patch ++++++
From: Lee Duncan
Date: Tue Jun 3 14:26:17 PDT 2014
Subject: lio-utils: remove systemd default dependencies
References: bnc#878053
Signed-off-by: Lee Duncan
---
target.service | 1 +
1 file changed, 1 insertion(+)
diff -aurp a/scripts/target.service b/scripts/target.service
--- lio-utils-4.1.orig/scripts/target.service 2014-06-03 06:44:39.000000000 -0700
+++ lio-utils-4.1/scripts/target.service 2014-06-03 14:25:19.000000000 -0700
@@ -1,5 +1,6 @@
[Unit]
Description="Generic Target Mode service"
+DefaultDependencies=No
[Service]
Type=oneshot
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org