Hello community,
here is the log from the commit of package yast2-iscsi-lio-server for
openSUSE:Factory checked in at 2019-01-03 18:06:29
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/yast2-iscsi-lio-server (Old)
and /work/SRC/openSUSE:Factory/.yast2-iscsi-lio-server.new.28833 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "yast2-iscsi-lio-server"
Thu Jan 3 18:06:29 2019 rev:32 rq:659050 version:4.1.2
Changes:
--------
---
/work/SRC/openSUSE:Factory/yast2-iscsi-lio-server/yast2-iscsi-lio-server.changes
2018-08-18 00:05:18.971293170 +0200
+++
/work/SRC/openSUSE:Factory/.yast2-iscsi-lio-server.new.28833/yast2-iscsi-lio-server.changes
2019-01-03 18:06:30.712146555 +0100
@@ -1,0 +2,23 @@
+Mon Dec 17 15:11:06 UTC 2018 - [email protected]
+
+- Hardening commands execution (part of bsc#1118291).
+- Replace backticks by Yast::Execute.
+- 4.1.2
+
+-------------------------------------------------------------------
+Sun Nov 25 00:37:27 UTC 2018 - Stasiek Michalski <[email protected]>
+
+- Provide icon with module (boo#1109310)
+- 4.1.1
+
+-------------------------------------------------------------------
+Tue Oct 16 15:46:06 CEST 2018 - [email protected]
+
+- Added license file to spec.
+
+-------------------------------------------------------------------
+Mon Aug 20 10:26:02 CEST 2018 - [email protected]
+
+- Switched license in spec file from SPDX2 to SPDX3 format.
+
+-------------------------------------------------------------------
Old:
----
yast2-iscsi-lio-server-4.1.0.tar.bz2
New:
----
yast2-iscsi-lio-server-4.1.2.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ yast2-iscsi-lio-server.spec ++++++
--- /var/tmp/diff_new_pack.5MULz6/_old 2019-01-03 18:06:31.120146193 +0100
+++ /var/tmp/diff_new_pack.5MULz6/_new 2019-01-03 18:06:31.124146189 +0100
@@ -17,15 +17,15 @@
Name: yast2-iscsi-lio-server
-Version: 4.1.0
+Version: 4.1.2
Release: 0
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Source0: %{name}-%{version}.tar.bz2
BuildRequires: update-desktop-files
-# Yast2::ServiceWidget
-BuildRequires: yast2 >= 4.1.0
+# Yast2::Execute.stdout
+BuildRequires: yast2 >= 4.1.42
BuildRequires: yast2-devtools >= 3.1.10
BuildRequires: rubygem(%rb_default_ruby_abi:rspec)
BuildRequires: rubygem(%rb_default_ruby_abi:yast-rake)
@@ -33,15 +33,15 @@
Requires: python3-rtslib-fb
Requires: python3-targetcli-fb
-# Yast2::ServiceWidget
-Requires: yast2 >= 4.1.0
+# Yast2::Execute.stdout
+Requires: yast2 >= 4.1.42
BuildArch: noarch
Requires: yast2-ruby-bindings >= 1.0.0
Summary: Configuration of iSCSI LIO target
-License: GPL-2.0
+License: GPL-2.0-only
Group: System/YaST
%description
@@ -65,5 +65,7 @@
%{yast_clientdir}/iscsi-lio-server.rb
%{yast_desktopdir}/iscsi-lio-server.desktop
%doc %{yast_docdir}
+%{yast_icondir}
+%license COPYING
%changelog
++++++ yast2-iscsi-lio-server-4.1.0.tar.bz2 ->
yast2-iscsi-lio-server-4.1.2.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/yast2-iscsi-lio-server-4.1.0/package/yast2-iscsi-lio-server.changes
new/yast2-iscsi-lio-server-4.1.2/package/yast2-iscsi-lio-server.changes
--- old/yast2-iscsi-lio-server-4.1.0/package/yast2-iscsi-lio-server.changes
2018-08-16 17:10:39.000000000 +0200
+++ new/yast2-iscsi-lio-server-4.1.2/package/yast2-iscsi-lio-server.changes
2018-12-18 09:28:03.000000000 +0100
@@ -1,4 +1,27 @@
-------------------------------------------------------------------
+Mon Dec 17 15:11:06 UTC 2018 - [email protected]
+
+- Hardening commands execution (part of bsc#1118291).
+- Replace backticks by Yast::Execute.
+- 4.1.2
+
+-------------------------------------------------------------------
+Sun Nov 25 00:37:27 UTC 2018 - Stasiek Michalski <[email protected]>
+
+- Provide icon with module (boo#1109310)
+- 4.1.1
+
+-------------------------------------------------------------------
+Tue Oct 16 15:46:06 CEST 2018 - [email protected]
+
+- Added license file to spec.
+
+-------------------------------------------------------------------
+Mon Aug 20 10:26:02 CEST 2018 - [email protected]
+
+- Switched license in spec file from SPDX2 to SPDX3 format.
+
+-------------------------------------------------------------------
Tue Aug 7 12:09:41 UTC 2018 - [email protected]
- Use Yast2::ServiceWidget to manage the service status
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/yast2-iscsi-lio-server-4.1.0/package/yast2-iscsi-lio-server.spec
new/yast2-iscsi-lio-server-4.1.2/package/yast2-iscsi-lio-server.spec
--- old/yast2-iscsi-lio-server-4.1.0/package/yast2-iscsi-lio-server.spec
2018-08-16 17:10:39.000000000 +0200
+++ new/yast2-iscsi-lio-server-4.1.2/package/yast2-iscsi-lio-server.spec
2018-12-18 09:28:03.000000000 +0100
@@ -17,15 +17,15 @@
Name: yast2-iscsi-lio-server
-Version: 4.1.0
+Version: 4.1.2
Release: 0
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Source0: %{name}-%{version}.tar.bz2
BuildRequires: update-desktop-files
-# Yast2::ServiceWidget
-BuildRequires: yast2 >= 4.1.0
+# Yast2::Execute.stdout
+BuildRequires: yast2 >= 4.1.42
BuildRequires: yast2-devtools >= 3.1.10
BuildRequires: rubygem(%rb_default_ruby_abi:rspec)
BuildRequires: rubygem(%rb_default_ruby_abi:yast-rake)
@@ -33,15 +33,15 @@
Requires: python3-rtslib-fb
Requires: python3-targetcli-fb
-# Yast2::ServiceWidget
-Requires: yast2 >= 4.1.0
+# Yast2::Execute.stdout
+Requires: yast2 >= 4.1.42
BuildArch: noarch
Requires: yast2-ruby-bindings >= 1.0.0
Summary: Configuration of iSCSI LIO target
-License: GPL-2.0
+License: GPL-2.0-only
Group: System/YaST
%description
@@ -65,5 +65,7 @@
%{yast_clientdir}/iscsi-lio-server.rb
%{yast_desktopdir}/iscsi-lio-server.desktop
%doc %{yast_docdir}
+%{yast_icondir}
+%license COPYING
%changelog
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/yast2-iscsi-lio-server-4.1.0/src/icons/hicolor/scalable/apps/yast-iscsi-server.svg
new/yast2-iscsi-lio-server-4.1.2/src/icons/hicolor/scalable/apps/yast-iscsi-server.svg
---
old/yast2-iscsi-lio-server-4.1.0/src/icons/hicolor/scalable/apps/yast-iscsi-server.svg
1970-01-01 01:00:00.000000000 +0100
+++
new/yast2-iscsi-lio-server-4.1.2/src/icons/hicolor/scalable/apps/yast-iscsi-server.svg
2018-12-18 09:28:03.000000000 +0100
@@ -0,0 +1,132 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg width="128" height="128" version="1.1" viewBox="0 0 128 128.00001"
xmlns="http://www.w3.org/2000/svg">
+<defs>
+<linearGradient id="e" x1="2" x2="30" y1="27" y2="27"
gradientTransform="matrix(4,0,0,4,0,-4)" gradientUnits="userSpaceOnUse">
+<stop stop-color="#5e5c64" offset="0"/>
+<stop stop-color="#9a9996" offset=".035714"/>
+<stop stop-color="#5e5c64" offset=".071429"/>
+<stop stop-color="#5e5c64" offset=".92857"/>
+<stop stop-color="#9a9996" offset=".96429"/>
+<stop stop-color="#5e5c64" offset="1"/>
+</linearGradient>
+<linearGradient id="d" x1="10" x2="10" y1="3" y2="37"
gradientTransform="matrix(.5 0 0 .5 -6.25e-8 3.5)"
gradientUnits="userSpaceOnUse">
+<stop stop-color="#acaba8" offset="0"/>
+<stop stop-color="#cac9c6" offset="1"/>
+</linearGradient>
+<linearGradient id="c" x1="3" x2="29" y1="17" y2="17"
gradientTransform="translate(0,-2)" gradientUnits="userSpaceOnUse">
+<stop stop-color="#9a9996" offset="0"/>
+<stop stop-color="#deddda" offset=".037101"/>
+<stop stop-color="#9a9996" offset=".076507"/>
+<stop stop-color="#9a9996" offset=".92289"/>
+<stop stop-color="#deddda" offset=".96229"/>
+<stop stop-color="#9a9996" offset="1"/>
+</linearGradient>
+<linearGradient id="b" x1="13.17" x2="13" y1="21" y2="11"
gradientTransform="translate(0,-3)" gradientUnits="userSpaceOnUse">
+<stop stop-color="#f6f5f4" offset="0"/>
+<stop stop-color="#deddda" offset="1"/>
+</linearGradient>
+</defs>
+<rect x="8" y="24" width="112" height="24" ry="4" fill="#5e5c64"/>
+<rect x="8" y="48" width="112" height="24" ry="4" fill="#5e5c64"/>
+<rect x="8" y="72" width="112" height="24" ry="4.2348" fill="#5e5c64"/>
+<rect x="8" y="92" width="112" height="20" ry="4" fill="url(#e)"/>
+<rect x="8" y="12" width="112" height="20" ry="4" fill="#9a9996"/>
+<rect x="8" y="36" width="112" height="20" ry="4" fill="#9a9996"/>
+<rect x="8" y="60" width="112" height="20" ry="4" fill="#9a9996"/>
+<rect x="8" y="84" width="112" height="20" ry="4" fill="#9a9996"/>
+<rect x="56" y="16" width="60" height="12" ry="0" fill="#3d3846"/>
+<rect x="56" y="20" width="60" height="8" ry="0" fill="#5e5c64"/>
+<rect x="56" y="40" width="60" height="12" ry="0" fill="#3d3846"/>
+<rect x="56" y="44" width="60" height="8" ry="0" fill="#5e5c64"/>
+<rect x="56" y="64" width="60" height="12" ry="0" fill="#3d3846"/>
+<rect x="56" y="68" width="60" height="8" ry="0" fill="#5e5c64"/>
+<rect x="56" y="88" width="60" height="12" ry="0" fill="#3d3846"/>
+<rect x="56" y="92" width="60" height="8" ry="0" fill="#5e5c64"/>
+<rect x="16" y="16" width="4" height="8" ry="2" fill="#5e5c64"/>
+<rect x="16" y="20" width="4" height="4" ry="2" fill="#f6d32d"/>
+<rect x="24" y="16" width="4" height="8" ry="2" fill="#5e5c64"/>
+<rect x="24" y="20" width="4" height="4" ry="2" fill="#33d17a"/>
+<rect x="16" y="40" width="4" height="8" ry="2" fill="#5e5c64"/>
+<rect x="16" y="44" width="4" height="4" ry="2" fill="#33d17a"/>
+<rect x="24" y="40" width="4" height="8" ry="2" fill="#5e5c64"/>
+<rect x="24" y="44" width="4" height="4" ry="2" fill="#e01b24"/>
+<rect x="16" y="64" width="4" height="8" ry="2" fill="#5e5c64"/>
+<rect x="16" y="68" width="4" height="4" ry="2" fill="#e01b24"/>
+<rect x="24" y="64" width="4" height="8" ry="2" fill="#5e5c64"/>
+<rect x="24" y="68" width="4" height="4" ry="2" fill="#f6d32d"/>
+<rect x="16" y="88" width="4" height="8" ry="2" fill="#5e5c64"/>
+<rect x="16" y="92" width="4" height="4" ry="2" fill="#f6d32d"/>
+<rect x="24" y="88" width="4" height="8" ry="2" fill="#5e5c64"/>
+<rect x="24" y="92" width="4" height="4" ry="2" fill="#33d17a"/>
+<rect x="60" y="44" width="4" height="8" fill="#3d3846"/>
+<rect x="60" y="40" width="4" height="4" fill="#241f31"/>
+<rect x="68" y="44" width="4" height="8" fill="#3d3846"/>
+<rect x="68" y="40" width="4" height="4" fill="#241f31"/>
+<rect x="76" y="44" width="4" height="8" fill="#3d3846"/>
+<rect x="76" y="40" width="4" height="4" fill="#241f31"/>
+<rect x="84" y="44" width="4" height="8" fill="#3d3846"/>
+<rect x="84" y="40" width="4" height="4" fill="#241f31"/>
+<rect x="92" y="44" width="4" height="8" fill="#3d3846"/>
+<rect x="92" y="40" width="4" height="4" fill="#241f31"/>
+<rect x="100" y="44" width="4" height="8" fill="#3d3846"/>
+<rect x="100" y="40" width="4" height="4" fill="#241f31"/>
+<rect x="108" y="44" width="4" height="8" fill="#3d3846"/>
+<rect x="108" y="40" width="4" height="4" fill="#241f31"/>
+<rect x="60" y="20" width="4" height="8" fill="#3d3846"/>
+<rect x="60" y="16" width="4" height="4" fill="#241f31"/>
+<rect x="68" y="20" width="4" height="8" fill="#3d3846"/>
+<rect x="68" y="16" width="4" height="4" fill="#241f31"/>
+<rect x="76" y="20" width="4" height="8" fill="#3d3846"/>
+<rect x="76" y="16" width="4" height="4" fill="#241f31"/>
+<rect x="84" y="20" width="4" height="8" fill="#3d3846"/>
+<rect x="84" y="16" width="4" height="4" fill="#241f31"/>
+<rect x="92" y="20" width="4" height="8" fill="#3d3846"/>
+<rect x="92" y="16" width="4" height="4" fill="#241f31"/>
+<rect x="100" y="20" width="4" height="8" fill="#3d3846"/>
+<rect x="100" y="16" width="4" height="4" fill="#241f31"/>
+<rect x="108" y="20" width="4" height="8" fill="#3d3846"/>
+<rect x="108" y="16" width="4" height="4" fill="#241f31"/>
+<rect x="60" y="68" width="4" height="8" fill="#3d3846"/>
+<rect x="60" y="64" width="4" height="4" fill="#241f31"/>
+<rect x="68" y="68" width="4" height="8" fill="#3d3846"/>
+<rect x="68" y="64" width="4" height="4" fill="#241f31"/>
+<rect x="76" y="68" width="4" height="8" fill="#3d3846"/>
+<rect x="76" y="64" width="4" height="4" fill="#241f31"/>
+<rect x="84" y="68" width="4" height="8" fill="#3d3846"/>
+<rect x="84" y="64" width="4" height="4" fill="#241f31"/>
+<rect x="92" y="68" width="4" height="8" fill="#3d3846"/>
+<rect x="92" y="64" width="4" height="4" fill="#241f31"/>
+<rect x="100" y="68" width="4" height="8" fill="#3d3846"/>
+<rect x="100" y="64" width="4" height="4" fill="#241f31"/>
+<rect x="108" y="68" width="4" height="8" fill="#3d3846"/>
+<rect x="108" y="64" width="4" height="4" fill="#241f31"/>
+<rect x="60" y="92" width="4" height="8" fill="#3d3846"/>
+<rect x="60" y="88" width="4" height="4" fill="#241f31"/>
+<rect x="68" y="92" width="4" height="8" fill="#3d3846"/>
+<rect x="68" y="88" width="4" height="4" fill="#241f31"/>
+<rect x="76" y="92" width="4" height="8" fill="#3d3846"/>
+<rect x="76" y="88" width="4" height="4" fill="#241f31"/>
+<rect x="84" y="92" width="4" height="8" fill="#3d3846"/>
+<rect x="84" y="88" width="4" height="4" fill="#241f31"/>
+<rect x="92" y="92" width="4" height="8" fill="#3d3846"/>
+<rect x="92" y="88" width="4" height="4" fill="#241f31"/>
+<rect x="100" y="92" width="4" height="8" fill="#3d3846"/>
+<rect x="100" y="88" width="4" height="4" fill="#241f31"/>
+<rect x="108" y="92" width="4" height="8" fill="#3d3846"/>
+<rect x="108" y="88" width="4" height="4" fill="#241f31"/>
+<g transform="matrix(2,0,0,2,67,68)">
+<rect x="3" y="8" width="26" height="17" ry="2"/>
+<rect x="3" y="6" width="26" height="17" ry="2" fill="url(#c)"/>
+<rect x="3" y="5" width="26" height="17" ry="2" fill="url(#d)"/>
+<rect x="27" y="20" width="1" height="1" ry=".5" fill="#77767b"/>
+<rect x="27" y="6" width="1" height="1" ry=".5" fill="#77767b"/>
+<rect x="13" y="6" width="1" height="1" ry=".5" fill="#77767b"/>
+<rect x="5" y="6" width="1" height="1" ry=".5" fill="#77767b"/>
+<rect x="5" y="20" width="1" height="1" ry=".5" fill="#77767b"/>
+<rect x="13" y="20" width="1" height="1" ry=".5" fill="#77767b"/>
+<path d="m8 7a1.0001 1.0001 0 0 0 -1 1c0 0.56413-0.43587 1-1 1a1.0001 1.0001 0
0 0 -1 1v8a1.0001 1.0001 0 0 0 1 1c0.56413 0 1 0.43587 1 1a1.0001 1.0001 0 0 0
1 1h3a1.0001 1.0001 0 0 0 1 -1c0-0.56346 0.43489-0.99897 0.99805-1 0.01065
3.46e-4 0.02158 0.0013 0.03125 2e-3a1.0001 1.0001 0 0 0 0.14062
-2e-3h1.6406c1.2858 1.2032 2.9617 1.9988 4.7246 2 1.8326 0 3.6534-0.75494
4.9492-2.0508s2.0508-3.1166
2.0508-4.9492-0.75494-3.6534-2.0508-4.9492c-1.2958-1.2958-3.1166-2.0508-4.9492-2.0508a1.0001
1.0001 0 0 0 -2e-3 0c-1.7604 0.00265-3.4325 0.79887-4.7168 2h-1.8164c-0.56413
0-1-0.43587-1-1a1.0001 1.0001 0 0 0 -1 -1z" fill="#acaba8"/>
+<path d="m8 6a1.0001 1.0001 0 0 0 -1 1c0 0.56413-0.43587 1-1 1a1.0001 1.0001 0
0 0 -1 1v8a1.0001 1.0001 0 0 0 1 1c0.56413 0 1 0.43587 1 1a1.0001 1.0001 0 0 0
1 1h3a1.0001 1.0001 0 0 0 1 -1c0-0.56346 0.43489-0.99897 0.99805-1 0.01065
3.46e-4 0.02158 0.0013 0.03125 2e-3a1.0001 1.0001 0 0 0 0.14062
-2e-3h1.6406c1.2858 1.2032 2.9617 1.9988 4.7246 2 1.8326 0 3.6534-0.75494
4.9492-2.0508s2.0508-3.1166
2.0508-4.9492-0.75494-3.6534-2.0508-4.9492c-1.2958-1.2958-3.1166-2.0508-4.9492-2.0508a1.0001
1.0001 0 0 0 -2e-3 0c-1.7604 0.00265-3.4325 0.79887-4.7168 2h-1.8164c-0.56413
0-1-0.43587-1-1a1.0001 1.0001 0 0 0 -1 -1z" fill="url(#b)"/>
+<rect x="18" y="10" width="4" height="4" ry="2" fill="#adaba7"/>
+<rect x="18" y="11" width="4" height="4" ry="2" fill="#cac9c6"/>
+</g>
+</svg>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/yast2-iscsi-lio-server-4.1.0/src/icons/hicolor/symbolic/apps/yast-iscsi-server-symbolic.svg
new/yast2-iscsi-lio-server-4.1.2/src/icons/hicolor/symbolic/apps/yast-iscsi-server-symbolic.svg
---
old/yast2-iscsi-lio-server-4.1.0/src/icons/hicolor/symbolic/apps/yast-iscsi-server-symbolic.svg
1970-01-01 01:00:00.000000000 +0100
+++
new/yast2-iscsi-lio-server-4.1.2/src/icons/hicolor/symbolic/apps/yast-iscsi-server-symbolic.svg
2018-12-18 09:28:03.000000000 +0100
@@ -0,0 +1,3 @@
+<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16">
+ <path d="M 2 0 C 0.892 0 0 0.892 0 2 L 0 14 C 0 15.108 0.892 16 2 16 L 10 16
L 10 14 L 2 14 L 2 2 L 2 0 z M 14 0 L 14 2 L 14 10 L 16 10 L 16 2 C 16 0.892
15.108 0 14 0 z M 5 1 C 3.892 1 3 1.892 3 3 L 3 10 C 3 11.108 3.892 12 5 12 L
10 12 L 10 10 L 13 10 L 13 3 C 13 1.892 12.108 1 11 1 L 5 1 z M 8 3 C 9.662 3
11 4.338 11 6 C 11 7.662 9.662 9 8 9 L 5 9 L 5 6 C 5 4.338 6.338 3 8 3 z M 8 5
C 7.446 5 7 5.446 7 6 C 7 6.554 7.446 7 8 7 C 8.554 7 9 6.554 9 6 C 9 5.446
8.554 5 8 5 z M 11 11 L 11 16 L 16 16 L 16 11 L 11 11 z M 12 12 L 13 12 L 13 13
L 14 13 L 14 12 L 15 12 L 15 14 L 14 14 L 14 15 L 13 15 L 13 14 L 12 14 L 12 12
z " fill="#c0bfbc" />
+</svg>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/yast2-iscsi-lio-server-4.1.0/src/include/iscsi-lio-server/TargetData.rb
new/yast2-iscsi-lio-server-4.1.2/src/include/iscsi-lio-server/TargetData.rb
--- old/yast2-iscsi-lio-server-4.1.0/src/include/iscsi-lio-server/TargetData.rb
2018-08-16 17:10:39.000000000 +0200
+++ new/yast2-iscsi-lio-server-4.1.2/src/include/iscsi-lio-server/TargetData.rb
2018-12-18 09:28:03.000000000 +0100
@@ -1,4 +1,26 @@
+# encoding: utf-8
+
+# Copyright (c) [2017, 2018] SUSE LLC
+#
+# All Rights Reserved.
+#
+# This program is free software; you can redistribute it and/or modify it
+# under the terms of version 2 of the GNU General Public License as published
+# by the Free Software Foundation.
+#
+# This program is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+# more details.
+#
+# You should have received a copy of the GNU General Public License along
+# with this program; if not, contact SUSE LLC.
+#
+# To contact SUSE LLC about this file by physical or electronic mail, you may
+# find current contact information at www.suse.com.
+
require "yast"
+require "yast2/execute"
class Backstores
RE_BACKSTORE_PATH = /\/[\w\/\.]+\s/
@@ -340,7 +362,7 @@
@tpg_num = nil
#the string for a mapping lun, like mapped_lun1
- @mapping_lun_name = nil
+ @mapping_lun_name = nil
#the string for a mapped lun, like "lun2" in "[lun2 fileio/iscsi_file1
(rw)]"
@mapped_lun_name = nil
@@ -356,18 +378,14 @@
#A pointer points to the acl rule for a specific initiator we are handling
@current_acl_rule = nil
- # the command need to execute and the result
- @cmd = nil
- @cmd_out = nil
@targets_list = TargetList.new
self.analyze
end
-
def analyze
# We need to re-new @target_list, because something may be deleted
@targets_list = TargetList.new
- @target_outout = `targetcli ls`.split("\n")
+ @target_outout = Yast::Execute.locally!.stdout("targetcli",
"ls").split("\n")
@target_outout.each do |line|
#handle iqn targets here.
if RE_IQN_TARGET.match(line)
@@ -401,50 +419,19 @@
@current_acls_group = @current_tpg.fetch_acls("acls")
end
- # handle acl rules for an IQN initaitor here
+ # handle acl rules for an IQN initiator here
if RE_ACL_IQN_RULE.match(line)
@initiator_name = RE_IQN_NAME.match(line).to_s
@current_acls_group.store_rule(@initiator_name)
- @current_acl_rule = @current_acls_group.fetch_rule(@initiator_name)
- # get authentication information here.
- @cmd = "targetcli iscsi/" + @current_target.fetch_target_name + \
- "/tpg" + @current_tpg.fetch_tpg_number + "/acls/" +
@initiator_name + "/ get auth userid"
- @cmd_out = `#{@cmd}`
- @current_acl_rule.store_userid(@cmd_out[7 , @cmd.length])
- @cmd = "targetcli iscsi/" + @current_target.fetch_target_name + \
- "/tpg" + @current_tpg.fetch_tpg_number + "/acls/" +
@initiator_name + "/ get auth password"
- @cmd_out = `#{@cmd}`
- @current_acl_rule.store_password(@cmd_out[9 , @cmd.length])
- @cmd = "targetcli iscsi/" + @current_target.fetch_target_name + \
- "/tpg" + @current_tpg.fetch_tpg_number + "/acls/" +
@initiator_name + "/ get auth mutual_userid"
- @cmd_out = `#{@cmd}`
- @current_acl_rule.store_mutual_userid(@cmd_out[14 , @cmd.length])
- @cmd = "targetcli iscsi/" + @current_target.fetch_target_name() + \
- "/tpg" + @current_tpg.fetch_tpg_number + "/acls/" +
@initiator_name + "/ get auth mutual_password"
- @cmd_out = `#{@cmd}`
- @current_acl_rule.store_mutual_password(@cmd_out[16 , @cmd.length])
+
+ save_current_acl_rule
end
# handle acl rules for an EUI initaitor here
if RE_ACL_EUI_RULE.match(line)
@initiator_name = RE_EUI_NAME.match(line).to_s
@current_acls_group.store_rule(@initiator_name)
- @current_acl_rule = @current_acls_group.fetch_rule(@initiator_name)
- @cmd = "targetcli iscsi/" + @current_target.fetch_target_name + \
- "/tpg" + @current_tpg.fetch_tpg_number + "/acls/" +
@initiator_name + "/ get auth userid"
- @cmd_out = `#{@cmd}`
- @current_acl_rule.store_userid(@cmd_out[7 , @cmd.length])
- @cmd = "targetcli iscsi/" + @current_target.fetch_target_name + \
- "/tpg" + @current_tpg.fetch_tpg_number + "/acls/" +
@initiator_name + "/ get auth password"
- @cmd_out = `#{@cmd}`
- @current_acl_rule.store_password(@cmd_out[9 , @cmd.length])
- @cmd = "targetcli iscsi/" + @current_target.fetch_target_name + \
- "/tpg" + @current_tpg.fetch_tpg_number + "/acls/" +
@initiator_name + "/ get auth mutual_userid"
- @cmd_out = `#{@cmd}`
- @current_acl_rule.store_mutual_userid(@cmd_out[14 , @cmd.length])
- @cmd = "targetcli iscsi/" + @current_target.fetch_target_name + \
- "/tpg" + @current_tpg.fetch_tpg_number + "/acls/" +
@initiator_name + "/ get auth mutual_password"
- @cmd_out = `#{@cmd}`
- @current_acl_rule.store_mutual_password(@cmd_out[16 , @cmd.length])
+
+ save_current_acl_rule
end
# handle mapped luns here
@@ -504,6 +491,27 @@
list
end
+private
+
+ # Saves acl authentication information
+ def save_current_acl_rule
+ @current_acl_rule = @current_acls_group.fetch_rule(@initiator_name)
+
+ @current_acl_rule.store_userid(acl_auth_info("userid"))
+ @current_acl_rule.store_password(acl_auth_info("password"))
+ @current_acl_rule.store_mutual_userid(acl_auth_info("mutual_userid"))
+ @current_acl_rule.store_mutual_password(acl_auth_info("mutual_password"))
+ end
+
+ # Runs a targetcli command to get specific acl authentication information
+ #
+ # @param data [String] e.g., "userid", "password", "mutual_userid" or
"mutual_password"
+ # @return [String]
+ def acl_auth_info(data)
+ acl =
"iscsi/#{@current_target.fetch_target_name}/tpg#{@current_tpg.fetch_tpg_number}/acls/#{@initiator_name}/"
+
+ Yast::Execute.locally!.stdout("targetcli", acl, "get", "auth",
data).split("=", 2).last
+ end
end
class DiscoveryAuth
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/yast2-iscsi-lio-server-4.1.0/test/backstores_test.rb
new/yast2-iscsi-lio-server-4.1.2/test/backstores_test.rb
--- old/yast2-iscsi-lio-server-4.1.0/test/backstores_test.rb 2018-08-16
17:10:39.000000000 +0200
+++ new/yast2-iscsi-lio-server-4.1.2/test/backstores_test.rb 2018-12-18
09:28:03.000000000 +0100
@@ -1,8 +1,27 @@
-#! /usr/bin/env rspec --format doc
+#!/usr/bin/env rspec
+# encoding: utf-8
+
+# Copyright (c) [2018] SUSE LLC
+#
+# All Rights Reserved.
+#
+# This program is free software; you can redistribute it and/or modify it
+# under the terms of version 2 of the GNU General Public License as published
+# by the Free Software Foundation.
+#
+# This program is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+# more details.
+#
+# You should have received a copy of the GNU General Public License along
+# with this program; if not, contact SUSE LLC.
+#
+# To contact SUSE LLC about this file by physical or electronic mail, you may
+# find current contact information at www.suse.com.
require_relative "./test_helper"
-require "yast"
-require "yast2/execute" # this one should actually be part of TargetData
+
require "TargetData"
describe Backstores do
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/yast2-iscsi-lio-server-4.1.0/test/target_data_test.rb
new/yast2-iscsi-lio-server-4.1.2/test/target_data_test.rb
--- old/yast2-iscsi-lio-server-4.1.0/test/target_data_test.rb 2018-08-16
17:10:39.000000000 +0200
+++ new/yast2-iscsi-lio-server-4.1.2/test/target_data_test.rb 2018-12-18
09:28:03.000000000 +0100
@@ -1,90 +1,114 @@
-#! /usr/bin/env rspec --format doc
+#!/usr/bin/env rspec
+# encoding: utf-8
+
+# Copyright (c) [2018] SUSE LLC
+#
+# All Rights Reserved.
+#
+# This program is free software; you can redistribute it and/or modify it
+# under the terms of version 2 of the GNU General Public License as published
+# by the Free Software Foundation.
+#
+# This program is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+# more details.
+#
+# You should have received a copy of the GNU General Public License along
+# with this program; if not, contact SUSE LLC.
+#
+# To contact SUSE LLC about this file by physical or electronic mail, you may
+# find current contact information at www.suse.com.
require_relative "./test_helper"
-require "yast"
-require "yast2/execute" # this one should actually be part of TargetData
+
require "TargetData"
describe TargetData do
describe "#analyze" do
- it "parses an empty output" do
- output = ""
- # Stubbing the backtick method is a bit tricky.
- expect_any_instance_of(described_class)
- .to receive(:`)
- .with("targetcli ls")
- .and_return(output)
+ before do
+ allow(Yast::Execute).to receive(:locally!).and_return(execute_object)
- td = TargetData.new
- expect(td.get_target_names_array).to eq([])
+ allow(execute_object).to receive(:stdout).with("targetcli",
"ls").and_return(output)
end
- it "parses a typical output" do
- output = fixture("ls-typical")
- # Anyway, the problem is that the method calls it multiple times
- # with various arguments. Refactoring is needed to make this work.
- test_unitls = Test_Utils.new
- expect(test_unitls.setup).to eq(0)
- expect_any_instance_of(described_class)
- .to receive(:`)
- .with("targetcli ls")
- .and_return(output)
- acl =
"iscsi/iqn.2018-01.suse.com.lszhu.target/tpg5/acls/iqn.2018-01.suse.com.lszhu.init/"
- target_name = "iqn.2018-01.suse.com.lszhu.target"
- tpg_num = "5"
- lun_info = {"lun0 "=>["0 ", "var-tmp-target.raw", "/var/tmp/target.raw",
"file"]}
- portals = ["192.168.100.12", "1234"], ["192.168.101.12", "1234"]
- acl_initiator_names = ["iqn.2018-01.suse.com.lszhu.init"]
- user_id = "teddybear"
- password = "plush"
- mutual_userid = "foo"
- mutual_password = "bar"
- mapping_lun_num = "7"
- mapped_lun_num = "0"
-
- expect_any_instance_of(described_class).to receive(:`)
- .with("targetcli #{acl} get auth userid")
- .and_return("userid=teddybear")
-
- expect_any_instance_of(described_class).to receive(:`)
- .with("targetcli #{acl} get auth password")
- .and_return("password=plush")
-
- expect_any_instance_of(described_class).to receive(:`)
- .with("targetcli #{acl} get auth mutual_userid")
- .and_return("mutual_userid=foo")
-
- expect_any_instance_of(described_class).to receive(:`)
- .with("targetcli #{acl} get auth mutual_password")
- .and_return("mutual_password=bar")
-
- td = TargetData.new
- expect(td.get_target_names_array).to
eq(["iqn.2018-01.suse.com.lszhu.target"])
-
expect(td.get_target_list.fetch_target(target_name).fetch_target_name).to
eq(target_name)
- tpg = td.get_target_list.fetch_target(target_name).get_default_tpg
- expect(tpg.fetch_tpg_number).to eq(tpg_num)
- expect(tpg.get_luns_info).to eq(lun_info)
- expect(tpg.fetch_portal).to eq(portals)
- expect(tpg.fetch_acls("acls").get_acl_intitiator_names).to
eq(acl_initiator_names)
- acl_rule = tpg.fetch_acls("acls").fetch_rule(acl_initiator_names[0])
- expect(acl_rule.fetch_userid).to eq(user_id)
- expect(acl_rule.fetch_mutual_userid).to eq(mutual_userid)
- expect(acl_rule.fetch_password).to eq(password)
- expect(acl_rule.fetch_mutual_password).to eq(mutual_password)
- mapped_lun = acl_rule.get_mapped_lun.fetch(mapping_lun_num)
- expect(acl_rule.fetch_mutual_password).to eq(mutual_password)
- expect(mapped_lun.fetch_mapping_lun_number).to eq(mapping_lun_num)
- expect(mapped_lun.fetch_mapped_lun_number).to eq(mapped_lun_num)
+ let(:execute_object) { Yast::Execute.new }
+
+ context "when 'targetcli ls' output is empty" do
+ let(:output) { "" }
+
+ it "does not read target names" do
+ expect(subject.get_target_names_array).to eq([])
+ end
+ end
+
+ context "when 'targetcli ls' output is valid" do
+ let(:output) { fixture("ls-typical") }
+
+ before do
+ allow(execute_object).to receive(:stdout).with("targetcli", acl,
"get", "auth", "userid")
+ .and_return("userid=teddybear")
+
+ allow(execute_object).to receive(:stdout).with("targetcli", acl,
"get", "auth", "password")
+ .and_return("password=plush")
+
+ allow(execute_object).to receive(:stdout).with("targetcli", acl,
"get", "auth", "mutual_userid")
+ .and_return("mutual_userid=foo")
+
+ allow(execute_object).to receive(:stdout).with("targetcli", acl,
"get", "auth", "mutual_password")
+ .and_return("mutual_password=bar")
+ end
+
+ let(:acl) {
"iscsi/iqn.2018-01.suse.com.lszhu.target/tpg5/acls/iqn.2018-01.suse.com.lszhu.init/"
}
+
+ it "reads the data correctly" do
+ # Anyway, the problem is that the method calls it multiple times
+ # with various arguments. Refactoring is needed to make this work.
+ test_unitls = Test_Utils.new
+ expect(test_unitls.setup).to eq(0)
+
+ target_name = "iqn.2018-01.suse.com.lszhu.target"
+ tpg_num = "5"
+ lun_info = {"lun0 "=>["0 ", "var-tmp-target.raw",
"/var/tmp/target.raw", "file"]}
+ portals = ["192.168.100.12", "1234"], ["192.168.101.12", "1234"]
+ acl_initiator_names = ["iqn.2018-01.suse.com.lszhu.init"]
+ user_id = "teddybear"
+ password = "plush"
+ mutual_userid = "foo"
+ mutual_password = "bar"
+ mapping_lun_num = "7"
+ mapped_lun_num = "0"
+
+ expect(subject.get_target_names_array).to
eq(["iqn.2018-01.suse.com.lszhu.target"])
+
expect(subject.get_target_list.fetch_target(target_name).fetch_target_name).to
eq(target_name)
+
+ tpg = subject.get_target_list.fetch_target(target_name).get_default_tpg
+
+ expect(tpg.fetch_tpg_number).to eq(tpg_num)
+ expect(tpg.get_luns_info).to eq(lun_info)
+ expect(tpg.fetch_portal).to eq(portals)
+ expect(tpg.fetch_acls("acls").get_acl_intitiator_names).to
eq(acl_initiator_names)
+
+ acl_rule = tpg.fetch_acls("acls").fetch_rule(acl_initiator_names.first)
+
+ expect(acl_rule.fetch_userid).to eq(user_id)
+ expect(acl_rule.fetch_mutual_userid).to eq(mutual_userid)
+ expect(acl_rule.fetch_password).to eq(password)
+ expect(acl_rule.fetch_mutual_password).to eq(mutual_password)
+
+ mapped_lun = acl_rule.get_mapped_lun.fetch(mapping_lun_num)
+
+ expect(mapped_lun.fetch_mapping_lun_number).to eq(mapping_lun_num)
+ expect(mapped_lun.fetch_mapped_lun_number).to eq(mapped_lun_num)
+ end
end
- it "parses an error output" do
- output = <<EOS
-WWN not valid as: iqn, naa, eui
-EOS
- expect_any_instance_of(described_class).to receive(:`).and_return(output)
+ context "when 'targetcli ls' output is not valid" do
+ let(:output) { "WWN not valid as: iqn, naa, eui" }
- td = TargetData.new
- expect(td.get_target_names_array).to eq([])
+ it "does not read target names" do
+ expect(subject.get_target_names_array).to eq([])
+ end
end
end
end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/yast2-iscsi-lio-server-4.1.0/test/test_helper.rb
new/yast2-iscsi-lio-server-4.1.2/test/test_helper.rb
--- old/yast2-iscsi-lio-server-4.1.0/test/test_helper.rb 2018-08-16
17:10:39.000000000 +0200
+++ new/yast2-iscsi-lio-server-4.1.2/test/test_helper.rb 2018-12-18
09:28:03.000000000 +0100
@@ -1,3 +1,27 @@
+#!/usr/bin/env rspec
+# encoding: utf-8
+
+# Copyright (c) [2018] SUSE LLC
+#
+# All Rights Reserved.
+#
+# This program is free software; you can redistribute it and/or modify it
+# under the terms of version 2 of the GNU General Public License as published
+# by the Free Software Foundation.
+#
+# This program is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+# more details.
+#
+# You should have received a copy of the GNU General Public License along
+# with this program; if not, contact SUSE LLC.
+#
+# To contact SUSE LLC about this file by physical or electronic mail, you may
+# find current contact information at www.suse.com.
+
+require "yast"
+
$LOAD_PATH << File.expand_path("../../src/include/iscsi-lio-server", __FILE__)
def fixture(name)