Hello community, here is the log from the commit of package lio-utils for openSUSE:Factory checked in at 2014-09-06 12:18:18 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 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-16 21:27:11.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.lio-utils.new/lio-utils.changes 2014-09-06 12:18:25.000000000 +0200 @@ -1,0 +2,24 @@ +Wed Sep 3 01:48:48 CEST 2014 - [email protected] + +- sanitize release line in specfile + +------------------------------------------------------------------- +Wed Aug 27 01:34:05 UTC 2014 - [email protected] + +- allow resetting discovery_auth one- and two-way + authentication attributes to an empty string, + adding patch (bnc#893315): + * lio-utils-allow-clearing-discovery-auth.patch + +------------------------------------------------------------------- +Mon Jun 30 10:56:06 PDT 2014 - [email protected] + +- Stop dumping read-only attibutes (bnc#881553), adding: + 0033-lio-utils-dont-dump-RO-attributes.patch + +------------------------------------------------------------------- +Tue Jun 10 10:37:11 PDT 2014 - [email protected] + +- Added dirs fabric and policy in /var/target (bnc#880355) + +------------------------------------------------------------------- New: ---- 0033-lio-utils-dont-dump-RO-attributes.patch lio-utils-allow-clearing-discovery-auth.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ lio-utils.spec ++++++ --- /var/tmp/diff_new_pack.nyDTb3/_old 2014-09-06 12:18:26.000000000 +0200 +++ /var/tmp/diff_new_pack.nyDTb3/_new 2014-09-06 12:18:26.000000000 +0200 @@ -22,7 +22,7 @@ Name: lio-utils Version: 4.1 -Release: 0.<RELEASE7> +Release: 0 Url: http://linux-iscsi.org/index.php/Lio-utils Source: lio-utils-4.1.tar.bz2 Source1: target.service @@ -82,6 +82,9 @@ 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 +Patch33: 0033-lio-utils-dont-dump-RO-attributes.patch +Patch34: lio-utils-allow-clearing-discovery-auth.patch + BuildRoot: %{_tmppath}/%{name}-%{version}-build %description @@ -182,6 +185,8 @@ %patch30 -p1 %patch31 -p1 %patch32 -p1 +%patch33 -p1 +%patch34 -p1 %build make %{?_smp_mflags} OPTFLAGS="$RPM_OPT_FLAGS" @@ -193,12 +198,18 @@ mkdir -p $RPM_BUILD_ROOT%{_vardir} mkdir $RPM_BUILD_ROOT%{_vardir}/pr mkdir $RPM_BUILD_ROOT%{_vardir}/alua +mkdir $RPM_BUILD_ROOT%{_vardir}/fabric +mkdir $RPM_BUILD_ROOT%{_vardir}/policy mkdir -p $RPM_BUILD_ROOT/etc/target +echo "#!/bin/bash" > $RPM_BUILD_ROOT/etc/target/tcm_start.sh for mod in target_core_mod target_core_file target_core_iblock target_core_pscsi ; do echo "modprobe $mod" >> $RPM_BUILD_ROOT/etc/target/tcm_start.sh done -echo "modprobe iscsi_target_mod" > $RPM_BUILD_ROOT/etc/target/lio_start.sh +chmod 755 $RPM_BUILD_ROOT/etc/target/tcm_start.sh +echo "#!/bin/bash" > $RPM_BUILD_ROOT/etc/target/lio_start.sh +echo "modprobe iscsi_target_mod" >> $RPM_BUILD_ROOT/etc/target/lio_start.sh +chmod 755 $RPM_BUILD_ROOT/etc/target/lio_start.sh (cd tcm-py; python setup.py install --prefix=%{_prefix} --root=%{buildroot}) (cd lio-py; python setup.py install --prefix=%{_prefix} --root=%{buildroot}) mkdir $RPM_BUILD_ROOT/usr/sbin @@ -258,6 +269,8 @@ %dir %{_vardir} %dir %{_vardir}/pr %dir %{_vardir}/alua +%dir %{_vardir}/fabric +%dir %{_vardir}/policy /usr/sbin/iscsi-name /usr/sbin/tcm_* /usr/sbin/lio_node ++++++ 0033-lio-utils-dont-dump-RO-attributes.patch ++++++ diff -aurp lio-utils-4.1.orig/lio-py/lio_dump.py lio-utils-4.1/lio-py/lio_dump.py --- lio-utils-4.1.orig/lio-py/lio_dump.py 2014-06-30 10:51:24.475925688 -0700 +++ lio-utils-4.1/lio-py/lio_dump.py 2014-06-30 10:53:18.195919922 -0700 @@ -136,12 +136,15 @@ def lio_target_configfs_dump(option, opt print "echo " + value.rstrip() + " > " + attrib_file os.close(p) - # Dump values of iscsi/iqn/tpgt/attrib/ + # Dump values of iscsi/iqn/tpgt/auth/ print "#### authentication for iSCSI Target Portal Group" auth_dir = lio_root + "/" + iqn + "/tpgt_" + tpgt + "/auth/" if os.path.isdir(auth_dir): auth_root = os.listdir(auth_dir) for auth in auth_root: + # authenticate_target is RO + if auth == "authenticate_target": + continue auth_file = auth_dir + auth p = os.open(auth_file, 0) value = os.read(p, 256) diff -aurp lio-utils-4.1.orig/tcm-py/tcm_dump.py lio-utils-4.1/tcm-py/tcm_dump.py --- lio-utils-4.1.orig/tcm-py/tcm_dump.py 2014-06-30 10:51:24.503925686 -0700 +++ lio-utils-4.1/tcm-py/tcm_dump.py 2014-06-30 10:51:51.695924308 -0700 @@ -205,11 +205,7 @@ def tcm_dump_configfs(option, opt_str, v dev_attrib_root = dev_root + g + "/attrib/" for h in os.listdir(dev_attrib_root): # The hw_* prefixed attributes are RO - if h == "hw_queue_depth": - continue - if h == "hw_max_sectors": - continue - if h == "hw_block_size": + if h.startswith("hw_"): continue # Do not change block-size for target_core_mod/pSCSI if h == "block_size": ++++++ lio-utils-allow-clearing-discovery-auth.patch ++++++ From: Lee Duncan <[email protected]> Subject: lio-utils: allow clearing discovery auth References: bnc#893315 When setting a discovery auth atttribute to a NULL string, we must actually write a NULL byte to reset that attribute. Acked-by: Lee Duncan <[email protected]> --- lio-py/lio_node.py | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff -aurp lio-utils-4.1.orig/lio-py/lio_node.py lio-utils-4.1/lio-py/lio_node.py --- lio-utils-4.1.orig/lio-py/lio_node.py 2014-08-26 14:59:01.535183056 -0700 +++ lio-utils-4.1/lio-py/lio_node.py 2014-08-26 18:26:35.674551572 -0700 @@ -694,6 +694,15 @@ def lio_target_set_chap_mutual_auth(opti return +def write_to_file(fname, vstr): + if not os.path.isfile(fname): + return False + if not vstr: + vstr = "\0" + with open(fname, 'w', 0) as sysfile: + res = os.write(sysfile.fileno(), vstr) + return (res > 0) + def lio_target_set_chap_discovery_auth(option, opt_str, value, parser): user = str(value[0]); password = str(value[1]); @@ -702,14 +711,10 @@ def lio_target_set_chap_discovery_auth(o if not os.path.isdir(auth_dir): lio_err("iSCSI Discovery Authentication directory " + auth_dir + " does not exist") - setuser_op = "echo -n " + user + " > " + auth_dir + "/userid" - ret = os.system(setuser_op) - if ret: + if not write_to_file(auth_dir + "/userid", user): lio_err("Unable to set CHAP username for iSCSI Discovery Authentication") - setpassword_op = "echo -n " + password + " > " + auth_dir + "/password" - ret = os.system(setpassword_op) - if ret: + if not write_to_file(auth_dir + "/password", password): lio_err("Unable to set CHAP password for iSCSI Discovery Authentication") else: lio_dbg("Successfully set CHAP authentication for iSCSI Discovery Authentication") @@ -724,14 +729,10 @@ def lio_target_set_chap_mutual_discovery if not os.path.isdir(auth_dir): lio_err("iSCSI Discovery Authentication directory " + auth_dir + " does not exist") - setuser_op = "echo -n " + user_mutual + " > " + auth_dir + "/userid_mutual" - ret = os.system(setuser_op) - if ret: + if not write_to_file(auth_dir + "/userid_mutual", user_mutual): lio_err("Unable to set mutual CHAP username for iSCSI Discovery Authentication") - setpassword_op = "echo -n " + password_mutual + " > " + auth_dir + "/password_mutual" - ret = os.system(setpassword_op) - if ret: + if not write_to_file(auth_dir + "/password_mutual", password_mutual): lio_err("Unable to set mutual CHAP password for iSCSI Discovery Authentication") else: lio_dbg("Successfully set mutual CHAP authentication for iSCSI Discovery Authentication") -- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
