Hello community,
here is the log from the commit of package yast2-iscsi-client for
openSUSE:Factory checked in at 2013-11-19 16:29:18
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/yast2-iscsi-client (Old)
and /work/SRC/openSUSE:Factory/.yast2-iscsi-client.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "yast2-iscsi-client"
Changes:
--------
--- /work/SRC/openSUSE:Factory/yast2-iscsi-client/yast2-iscsi-client.changes
2013-10-20 10:54:40.000000000 +0200
+++
/work/SRC/openSUSE:Factory/.yast2-iscsi-client.new/yast2-iscsi-client.changes
2013-11-19 16:29:19.000000000 +0100
@@ -1,0 +2,6 @@
+Tue Nov 12 14:29:00 CET 2013 - [email protected]
+
+- add IPv6 support (fate #316261)
+- 3.1.1
+
+-------------------------------------------------------------------
Old:
----
yast2-iscsi-client-3.1.0.tar.bz2
New:
----
yast2-iscsi-client-3.1.1.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ yast2-iscsi-client.spec ++++++
--- /var/tmp/diff_new_pack.qiMWea/_old 2013-11-19 16:29:20.000000000 +0100
+++ /var/tmp/diff_new_pack.qiMWea/_new 2013-11-19 16:29:20.000000000 +0100
@@ -17,7 +17,7 @@
Name: yast2-iscsi-client
-Version: 3.1.0
+Version: 3.1.1
Release: 0
BuildRoot: %{_tmppath}/%{name}-%{version}-build
++++++ yast2-iscsi-client-3.1.0.tar.bz2 -> yast2-iscsi-client-3.1.1.tar.bz2
++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/yast2-iscsi-client-3.1.0/CONTRIBUTING.md
new/yast2-iscsi-client-3.1.1/CONTRIBUTING.md
--- old/yast2-iscsi-client-3.1.0/CONTRIBUTING.md 1970-01-01
01:00:00.000000000 +0100
+++ new/yast2-iscsi-client-3.1.1/CONTRIBUTING.md 2013-11-19
13:43:14.000000000 +0100
@@ -0,0 +1,87 @@
+YaST Contribution Guidelines
+============================
+
+YaST is an open source project and as such it welcomes all kinds of
+contributions. If you decide to contribute, please follow these guidelines to
+ensure the process is effective and pleasant both for you and YaST maintainers.
+
+There are two main forms of contribution: reporting bugs and performing code
+changes.
+
+Bug Reports
+-----------
+
+If you find a problem, please report it either using
+[Bugzilla](https://bugzilla.novell.com/enter_bug.cgi?format=guided&product=openSUSE+Factory&component=YaST2)
+or [GitHub issues](../../issues). (For Bugzilla, use the [simplified
+registration](https://secure-www.novell.com/selfreg/jsp/createSimpleAccount.jsp)
+if you don't have an account yet.)
+
+If you find a problem, please report it either using
+[Bugzilla](https://bugzilla.novell.com/) or GitHub issues. We can't guarantee
+that every bug will be fixed, but we'll try.
+
+When creating a bug report, please follow our [bug reporting
+guidelines](http://en.opensuse.org/openSUSE:Report_a_YaST_bug).
+
+Code Changes
+------------
+
+We welcome all kinds of code contributions, from simple bug fixes to
significant
+refactorings and implementation of new features. However, before making any
+non-trivial contribution, get in touch with us first — this can prevent wasted
+effort on both sides. Also, have a look at our [development
+documentation](http://en.opensuse.org/openSUSE:YaST_development).
+
+To send us your code change, use GitHub pull requests. The workflow is as
+follows:
+
+ 1. Fork the project.
+
+ 2. Create a topic branch based on `master`.
+
+ 3. Implement your change, including tests (if possible). Make sure you adhere
+ to the [Ruby style
+ guide](https://github.com/SUSE/style-guides/blob/master/Ruby.md).
+
+ 4. Make sure your change didn't break anything by building the RPM package
+ (`rake osc:build`). The build process includes running the full testsuite.
+
+ 5. Publish the branch and create a pull request.
+
+ 6. YaST developers will review your change and possibly point out issues.
+ Adapt the code under their guidance until they are all resolved.
+
+ 7. Finally, the pull request will get merged or rejected.
+
+See also [GitHub's guide on
+contributing](https://help.github.com/articles/fork-a-repo).
+
+If you want to do multiple unrelated changes, use separate branches and pull
+requests.
+
+Do not change the `VERSION` and `*.changes` files as this could lead to
+conflicts.
+
+### Commits
+
+Each commit in the pull request should do only one thing, which is clearly
+described by its commit message. Especially avoid mixing formatting changes and
+functional changes into one commit. When writing commit messages, adhere to
+[widely used
+conventions](http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html).
+
+If your commit is related to a bug in Buzgilla or an issue on GitHub, make sure
+you mention it in the commit message for cross-reference. Use format like
+bnc#775814 or gh#yast/yast-foo#42. See also [GitHub
+autolinking](https://help.github.com/articles/github-flavored-markdown#references)
+and [openSUSE abbreviation
+reference](http://en.opensuse.org/openSUSE:Packaging_Patches_guidelines#Current_set_of_abbreviations).
+
+Additional Information
+----------------------
+
+If you have any question, feel free to ask at the [development mailing
+list](http://lists.opensuse.org/yast-devel/) or at the
+[#yast](http://webchat.freenode.net/?channels=%23yast) IRC channel on freenode.
+We'll do our best to provide a timely and accurate answer.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/yast2-iscsi-client-3.1.0/VERSION
new/yast2-iscsi-client-3.1.1/VERSION
--- old/yast2-iscsi-client-3.1.0/VERSION 2013-10-17 14:38:02.000000000
+0200
+++ new/yast2-iscsi-client-3.1.1/VERSION 2013-11-19 13:43:14.000000000
+0100
@@ -1 +1 @@
-3.1.0
+3.1.1
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/yast2-iscsi-client-3.1.0/package/yast2-iscsi-client.changes
new/yast2-iscsi-client-3.1.1/package/yast2-iscsi-client.changes
--- old/yast2-iscsi-client-3.1.0/package/yast2-iscsi-client.changes
2013-10-17 14:38:02.000000000 +0200
+++ new/yast2-iscsi-client-3.1.1/package/yast2-iscsi-client.changes
2013-11-19 13:43:14.000000000 +0100
@@ -1,4 +1,10 @@
-------------------------------------------------------------------
+Tue Nov 12 14:29:00 CET 2013 - [email protected]
+
+- add IPv6 support (fate #316261)
+- 3.1.1
+
+-------------------------------------------------------------------
Wed Sep 18 16:40:45 UTC 2013 - [email protected]
- do not use *.spec.in template, use *.spec file with RPM macros
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/yast2-iscsi-client-3.1.0/src/include/iscsi-client/widgets.rb
new/yast2-iscsi-client-3.1.1/src/include/iscsi-client/widgets.rb
--- old/yast2-iscsi-client-3.1.0/src/include/iscsi-client/widgets.rb
2013-10-17 14:38:02.000000000 +0200
+++ new/yast2-iscsi-client-3.1.1/src/include/iscsi-client/widgets.rb
2013-11-19 13:43:14.000000000 +0100
@@ -589,6 +589,7 @@
event = deep_copy(event)
ret = true
ip = Builtins.tostring(UI.QueryWidget(:hostname, :Value))
+ ip.strip!
port = Builtins.tostring(UI.QueryWidget(:port, :Value))
# validate IP address
if !IscsiClientLib.useISNS
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/yast2-iscsi-client-3.1.0/src/modules/IscsiClientLib.rb
new/yast2-iscsi-client-3.1.1/src/modules/IscsiClientLib.rb
--- old/yast2-iscsi-client-3.1.0/src/modules/IscsiClientLib.rb 2013-10-17
14:38:02.000000000 +0200
+++ new/yast2-iscsi-client-3.1.1/src/modules/IscsiClientLib.rb 2013-11-19
13:43:14.000000000 +0100
@@ -92,10 +92,17 @@
nil
end
- def GetAdmCmd(params)
+ # Create and return complete iscsciadm command by adding the string
+ # argument as options. If allowed, write the command to y2log file.
+ #
+ # @param [String] params options for iscsiadm command
+ # @param [Boolean] do_log write command to y2log?
+ # @return [String] complete command
+ #
+ def GetAdmCmd(params, do_log=true)
ret = "LC_ALL=POSIX iscsiadm"
ret = Ops.add(Ops.add(ret, " "), params)
- Builtins.y2milestone("GetAdmCmd:%1", ret)
+ Builtins.y2milestone("GetAdmCmd: #{ret}") if do_log
ret
end
@@ -681,17 +688,18 @@
# update authentication value
def setValue(name, value)
- Builtins.y2milestone("set %1 for record %2", name, @currentRecord)
- command = GetAdmCmd(
- Builtins.sformat(
- "-m node -I %3 -T %1 -p %2 --op=update --name=%4 --value=%5",
- Ops.get(@currentRecord, 1, ""),
- Ops.get(@currentRecord, 0, ""),
- Ops.get(@currentRecord, 2, "default"),
- name,
- value
- )
- )
+ rec = @currentRecord
+ Builtins.y2milestone("set %1 for record %2", name, rec)
+
+ log = !name.include?("password");
+ cmd = "-m node -I #{rec[2]||"default"} -T #{rec[1]||""} -p #{rec[0]||""}
--name=#{name}"
+
+ command = GetAdmCmd("#{cmd} --value=#{value}", log)
+ if !log
+ value = "*****" if !value.empty?
+ Builtins.y2milestone("AdmCmd:LC_ALL=POSIX iscsiadm #{cmd}
--value=#{value}")
+ end
+
ret = true
retcode = Convert.convert(
SCR.Execute(path(".target.bash_output"), command),
@@ -711,19 +719,39 @@
# check whether two given IP addresses (including ports) are equal
def ipEqual?(session_ip, current_ip)
- if !session_ip.start_with?("[")
- # IPv4 - compare directly
- return session_ip == current_ip
+ if !session_ip || !current_ip
+ return false
+ end
+ if session_ip.empty? || current_ip.empty?
+ return false
end
- # get IP and port for IPv6
- match_data = session_ip.match(/\[([:\w]+)\](:(\d+))?/)
- s_ip = IPAddr.new(match_data[1] || "")
- s_port = match_data[3] || ""
- match_data = current_ip.match(/\[([:\w]+)\](:(\d+))?/)
- c_ip = IPAddr.new(match_data[1] || "")
- c_port = match_data[3] || ""
- return (s_ip == c_ip) && (s_port == c_port)
+ if !session_ip.start_with?("[") && !current_ip.start_with?("[")
+ # both IPv4 - compare directly
+ return session_ip == current_ip
+ elsif session_ip.start_with?("[") && current_ip.start_with?("[")
+ # both IPv6 - compare IPv6 and port separately
+ ip_port_regex = /\[([:\w]+)\](:(\d+))?/
+
+ if match_data = session_ip.match(ip_port_regex)
+ s_ip = IPAddr.new(match_data[1] || "")
+ s_port = match_data[3] || ""
+ else
+ Builtins.y2error("Session IP %1 not matching", session_ip)
+ return false
+ end
+ if match_data = current_ip.match(ip_port_regex)
+ c_ip = IPAddr.new(match_data[1] || "")
+ c_port = match_data[3] || ""
+ else
+ Builtins.y2error("Current IP %1 not matching", current_ip)
+ return false
+ end
+ return (s_ip == c_ip) && (s_port == c_port)
+ else
+ # comparing IPv4 and IPv6
+ return false
+ end
rescue ArgumentError => e
Builtins.y2error("Invalid IP address, error: %1", "#{e}")
@@ -854,7 +882,7 @@
else
setValue("node.session.auth.username", "")
setValue("node.session.auth.password", "")
- setValue("node.session.auth.authmethod", "")
+ setValue("node.session.auth.authmethod", "None")
end
else
setValue("node.session.auth.authmethod", "None")
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/yast2-iscsi-client-3.1.0/test/ipEqual_spec.rb
new/yast2-iscsi-client-3.1.1/test/ipEqual_spec.rb
--- old/yast2-iscsi-client-3.1.0/test/ipEqual_spec.rb 2013-10-17
14:38:02.000000000 +0200
+++ new/yast2-iscsi-client-3.1.1/test/ipEqual_spec.rb 2013-11-19
13:43:14.000000000 +0100
@@ -34,6 +34,36 @@
expect(@iscsilib.ipEqual?("[213:23:]", "...")).to be_false
end
end
+ context "with invalid IPv6 arguments not matching" do
+ it "returns false" do
+ expect(@iscsilib.ipEqual?("[???]", "[***]")).to be_false
+ end
+ end
+ context "with 2 empty arguments" do
+ it "returns false" do
+ expect(@iscsilib.ipEqual?("", "")).to be_false
+ end
+ end
+ context "with empty argument session IP" do
+ it "returns false" do
+ expect(@iscsilib.ipEqual?("", "10.10.10.1:500")).to be_false
+ end
+ end
+ context "with empty argument current IP" do
+ it "returns false" do
+ expect(@iscsilib.ipEqual?("[2620:0113:1c0:8080:4ec:544a:000d:3d62]",
"")).to be_false
+ end
+ end
+ context "with nil arguments" do
+ it "returns false" do
+ expect(@iscsilib.ipEqual?(nil, nil)).to be_false
+ end
+ end
+ context "with one nil argument" do
+ it "returns false" do
+ expect(@iscsilib.ipEqual?(nil, "10.10.10.1:500")).to be_false
+ end
+ end
context "with equal (but different string) and valid IPv6 arguments
(without port)" do
it "returns true" do
expect(@iscsilib.ipEqual?("[2620:0113:1c0:8080:4ec:544a:000d:3d62]",
@@ -52,6 +82,11 @@
"[20:113:80c0:8080::544a:3b9d:3d62]:456")).to be_true
end
end
+ context "with equal (different string, one abbreviated) valid IPv6
arguments" do
+ it "returns true" do
+ expect(@iscsilib.ipEqual?("[::1]", "[0:0:0:0:0:0:0:1]")).to be_true
+ end
+ end
context "with equal (but different string) IPv6 arguments and different
ports" do
it "returns false" do
expect(@iscsilib.ipEqual?("[2620:0113:80c0:8080:54ec:004a:3b9d:3d62]:456",
--
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]