Hello community,

here is the log from the commit of package yast2-network for openSUSE:Factory 
checked in at 2017-07-11 08:35:11
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/yast2-network (Old)
 and      /work/SRC/openSUSE:Factory/.yast2-network.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "yast2-network"

Tue Jul 11 08:35:11 2017 rev:373 rq:509111 version:3.3.1

Changes:
--------
--- /work/SRC/openSUSE:Factory/yast2-network/yast2-network.changes      
2017-06-07 13:08:22.259983939 +0200
+++ /work/SRC/openSUSE:Factory/.yast2-network.new/yast2-network.changes 
2017-07-11 08:35:12.612184135 +0200
@@ -1,0 +2,31 @@
+Tue Jul  4 15:06:40 UTC 2017 - [email protected]
+
+- Display a warning in AutoYaST installation when importing the DNS
+  configuration with disabled seconds stage (the second stage is
+  currently required for writing the config) (bsc#1046198)
+- 3.3.1
+
+-------------------------------------------------------------------
+Tue Jul  4 12:57:05 UTC 2017 - [email protected]
+
+- bnc#1046735
+  - do not update sysconfig when no IP is given in case of static
+    NIC configuration.
+
+-------------------------------------------------------------------
+Tue Jul  4 09:18:21 UTC 2017 - [email protected]
+
+- bsc#1044982
+  - handle bad pci class/subclass ids used by Mellanox ConnectX-3
+  - [email protected]
+- 3.3.0
+
+-------------------------------------------------------------------
+Tue Jul  4 07:21:29 UTC 2017 - [email protected]
+
+- bnc#1046677
+  - disable widgets which cannot be configured by the selected
+    network service
+- 3.2.29
+
+-------------------------------------------------------------------

Old:
----
  yast2-network-3.2.28.tar.bz2

New:
----
  yast2-network-3.3.1.tar.bz2

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ yast2-network.spec ++++++
--- /var/tmp/diff_new_pack.GH32rG/_old  2017-07-11 08:35:13.376076361 +0200
+++ /var/tmp/diff_new_pack.GH32rG/_new  2017-07-11 08:35:13.380075797 +0200
@@ -17,7 +17,7 @@
 
 
 Name:           yast2-network
-Version:        3.2.28
+Version:        3.3.1
 Release:        0
 BuildArch:      noarch
 

++++++ yast2-network-3.2.28.tar.bz2 -> yast2-network-3.3.1.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-network-3.2.28/package/yast2-network.changes 
new/yast2-network-3.3.1/package/yast2-network.changes
--- old/yast2-network-3.2.28/package/yast2-network.changes      2017-05-30 
12:36:04.195065155 +0200
+++ new/yast2-network-3.3.1/package/yast2-network.changes       2017-07-10 
10:44:20.810057139 +0200
@@ -1,4 +1,35 @@
 -------------------------------------------------------------------
+Tue Jul  4 15:06:40 UTC 2017 - [email protected]
+
+- Display a warning in AutoYaST installation when importing the DNS
+  configuration with disabled seconds stage (the second stage is
+  currently required for writing the config) (bsc#1046198)
+- 3.3.1
+
+-------------------------------------------------------------------
+Tue Jul  4 12:57:05 UTC 2017 - [email protected]
+
+- bnc#1046735
+  - do not update sysconfig when no IP is given in case of static
+    NIC configuration.
+
+-------------------------------------------------------------------
+Tue Jul  4 09:18:21 UTC 2017 - [email protected]
+
+- bsc#1044982
+  - handle bad pci class/subclass ids used by Mellanox ConnectX-3
+  - [email protected]
+- 3.3.0
+
+-------------------------------------------------------------------
+Tue Jul  4 07:21:29 UTC 2017 - [email protected]
+
+- bnc#1046677
+  - disable widgets which cannot be configured by the selected
+    network service
+- 3.2.29
+
+-------------------------------------------------------------------
 Thu May 25 09:27:09 UTC 2017 - [email protected]
 
 - bnc#1039532
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-network-3.2.28/package/yast2-network.spec 
new/yast2-network-3.3.1/package/yast2-network.spec
--- old/yast2-network-3.2.28/package/yast2-network.spec 2017-05-30 
12:36:04.195065155 +0200
+++ new/yast2-network-3.3.1/package/yast2-network.spec  2017-07-10 
10:44:20.814057139 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package yast2-network
 #
-# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -17,15 +17,13 @@
 
 
 Name:           yast2-network
-Version:        3.2.28
+Version:        3.3.1
 Release:        0
 BuildArch:      noarch
 
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 Source0:        %{name}-%{version}.tar.bz2
 
-Group:          System/YaST
-License:        GPL-2.0
 BuildRequires:  update-desktop-files
 BuildRequires:  yast2-devtools >= 3.1.15
 Requires:       yast2-proxy
@@ -70,6 +68,8 @@
 Obsoletes:      yast2-network-devel-doc
 
 Summary:        YaST2 - Network Configuration
+License:        GPL-2.0
+Group:          System/YaST
 
 %description 
 This package contains the YaST2 component for network configuration.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-network-3.2.28/src/include/network/lan/address.rb 
new/yast2-network-3.3.1/src/include/network/lan/address.rb
--- old/yast2-network-3.2.28/src/include/network/lan/address.rb 2017-05-30 
12:36:04.231065155 +0200
+++ new/yast2-network-3.3.1/src/include/network/lan/address.rb  2017-07-10 
10:44:20.934057139 +0200
@@ -1482,30 +1482,31 @@
           LanItems.device = NetworkInterfaces.device_num(ifcfgname)
         end
 
-        LanItems.bootproto = Ops.get_string(@settings, "BOOTPROTO", "")
-        if LanItems.bootproto == "static" # #104494
-          ip_changed = LanItems.ipaddr !=
-            Ops.get_string(@settings, "IPADDR", "")
-          if ip_changed
+        bootproto = @settings.fetch("BOOTPROTO", "")
+        ipaddr = @settings.fetch("IPADDR", "")
+
+        # IP is mandatory for static configuration. Makes no sense to write 
static
+        # configuration without that.
+        return ret if bootproto == "static" && ipaddr.empty?
+
+        LanItems.bootproto = bootproto
+
+        if bootproto == "static"
+          ip_changed = LanItems.ipaddr != ipaddr
+          hostname = @settings.fetch("HOSTNAME", "")
+
+          if ip_changed || hostname.empty?
+            log.info("Dropping record for #{LanItems.ipaddr} from /etc/hosts")
             Host.remove_ip(LanItems.ipaddr)
-            Builtins.y2milestone("IP has changed")
           end
 
-          LanItems.ipaddr = Ops.get_string(@settings, "IPADDR", "")
+          LanItems.ipaddr = ipaddr
           LanItems.netmask = Ops.get_string(@settings, "NETMASK", "")
           LanItems.prefix = Ops.get_string(@settings, "PREFIXLEN", "")
           LanItems.remoteip = Ops.get_string(@settings, "REMOTEIP", "")
 
-          if @hostname_initial != Ops.get_string(@settings, "HOSTNAME", "") || 
ip_changed
-            if Ops.get_string(@settings, "HOSTNAME", "") == ""
-              Host.remove_ip(LanItems.ipaddr)
-            else
-              Host.Update(
-                @hostname_initial,
-                Ops.get_string(@settings, "HOSTNAME", ""),
-                Ops.get_string(@settings, "IPADDR", "")
-              )
-            end
+          if (@hostname_initial != hostname && !hostname.empty?) || ip_changed
+            Host.Update(@hostname_initial, hostname, LanItems.ipaddr)
           end
         else
           LanItems.ipaddr = ""
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-network-3.2.28/src/include/network/lan/dhcp.rb 
new/yast2-network-3.3.1/src/include/network/lan/dhcp.rb
--- old/yast2-network-3.2.28/src/include/network/lan/dhcp.rb    2017-05-30 
12:36:04.231065155 +0200
+++ new/yast2-network-3.3.1/src/include/network/lan/dhcp.rb     2017-07-10 
10:44:20.938057139 +0200
@@ -33,10 +33,7 @@
 
       textdomain "network"
 
-      Yast.import "Label"
       Yast.import "NetworkConfig"
-      Yast.import "Popup"
-      Yast.import "Wizard"
 
       Yast.include include_target, "network/routines.rb"
       Yast.include include_target, "network/lan/help.rb"
@@ -47,10 +44,6 @@
         Frame(
           _("DHCP Client Options"),
           VBox(
-            # CheckBox label
-            #       `Left(`CheckBox(`id(`broadcast), _("Request Broad&cast 
Response"))),
-            #        `VSpacing(0.49),
-            # TextEntry label
             Left(
               InputField(
                 Id(:clientid),
@@ -93,13 +86,6 @@
     end
 
     def initDhclientOptions(_key)
-      #     boolean dhclient_broadcast = false;
-      #
-      #     
if(issubstring(NetworkConfig::DHCP["DHCLIENT_ADDITIONAL_OPTIONS"]:"", "-B"))
-      #         dhclient_broadcast = true;
-      #
-      #
-      #     UI::ChangeWidget(`id(`broadcast), `Value, dhclient_broadcast);
       UI.ChangeWidget(
         Id(:clientid),
         :Value,
@@ -117,7 +103,7 @@
       )
 
       disable_unconfigureable_items(
-        [:broadcast, :clientid, :hostname, :no_defaultroute],
+        [:clientid, :hostname, :no_defaultroute],
         false
       )
 
@@ -140,18 +126,6 @@
         "DHCLIENT_HOSTNAME_OPTION",
         UI.QueryWidget(Id(:hostname), :Value)
       )
-      #     boolean dhclient_broadcast = UI::QueryWidget(`id(`broadcast), 
`Value) == true;
-      #
-      #     string options = 
NetworkConfig::DHCP["DHCLIENT_ADDITIONAL_OPTIONS"]:"";
-      #     if(options == nil) options = "";
-      #
-      #     if(dhclient_broadcast && !issubstring(options, "-B")) {
-      #         NetworkConfig::DHCP["DHCLIENT_ADDITIONAL_OPTIONS"] = options + 
" -B";
-      #     }
-      #     else
-      #     if(!dhclient_broadcast && issubstring(options, "-B")) {
-      #         NetworkConfig::DHCP["DHCLIENT_ADDITIONAL_OPTIONS"] = 
regexpsub(options, "(.*)-B(.*)", "\\1\\2");
-      #     }
 
       nil
     end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-network-3.2.28/src/include/network/routines.rb 
new/yast2-network-3.3.1/src/include/network/routines.rb
--- old/yast2-network-3.2.28/src/include/network/routines.rb    2017-05-30 
12:36:04.299065155 +0200
+++ new/yast2-network-3.3.1/src/include/network/routines.rb     2017-07-10 
10:44:20.942057139 +0200
@@ -363,6 +363,16 @@
         when 145
           return "usb" # #22739
         when 128
+          # Mellanox ConnectX-3 series badly uses the 128 sub class
+          # Check for the specific known boards with bad subclass.
+          #
+          # Concerned devices are:
+          # 15b3:1003  MT27500 Family [ConnectX-3]
+          # 15b3:1004  MT27500/MT27520 Family [ConnectX-3/ConnectX-3 Pro 
Virtual Function]
+          # 15b3:1007  MT27520 Family [ConnectX-3 Pro]
+          if hwdevice["vendor_id"] == 71_091
+            return "ib" if [69_635, 69_636, 
69_639].include?(hwdevice["device_id"])
+          end
           # Nothing was found
           Builtins.y2error("Unknown network controller type: %1", hwdevice)
           Builtins.y2error(
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-network-3.2.28/src/include/network/widgets.rb 
new/yast2-network-3.3.1/src/include/network/widgets.rb
--- old/yast2-network-3.2.28/src/include/network/widgets.rb     2017-05-30 
12:36:04.315065155 +0200
+++ new/yast2-network-3.3.1/src/include/network/widgets.rb      2017-07-10 
10:44:20.942057139 +0200
@@ -352,6 +352,19 @@
       nil
     end
 
+    def ManagedHandle(_key, _event)
+      selected_service = UI.QueryWidget(Id(:managed), :Value)
+
+      # Disable / enable all widgets which depends on network service
+      # in the Managed dialog
+      # See include/network/lan/dhcp.rb for referenced widgets
+      [:clientid, :hostname, :no_defaultroute].each do |i|
+        UI.ChangeWidget(Id(i), :Enabled, selected_service == "wicked")
+      end
+
+      nil
+    end
+
     def managed_widget
       {
         "widget"        => :custom,
@@ -360,7 +373,7 @@
           Left(
             ComboBox(
               Id(:managed),
-              Opt(:hstretch),
+              Opt(:hstretch, :notify),
               _("Network Setup Method"),
               []
             )
@@ -369,6 +382,7 @@
         "opt"           => [],
         "help"          => @help["managed"] || "",
         "init"          => fun_ref(method(:ManagedInit), "void (string)"),
+        "handle"        => fun_ref(method(:ManagedHandle), "symbol (string, 
map)"),
         "store"         => fun_ref(method(:ManagedStore), "void (string, map)")
       }
     end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-network-3.2.28/src/modules/DNS.rb 
new/yast2-network-3.3.1/src/modules/DNS.rb
--- old/yast2-network-3.2.28/src/modules/DNS.rb 2017-05-30 12:36:04.319065155 
+0200
+++ new/yast2-network-3.3.1/src/modules/DNS.rb  2017-07-10 10:44:20.966057139 
+0200
@@ -52,6 +52,9 @@
       Yast.import "Service"
       Yast.import "String"
       Yast.import "FileUtils"
+      Yast.import "Stage"
+      Yast.import "Mode"
+      Yast.import "Report"
 
       Yast.include self, "network/routines.rb"
       Yast.include self, "network/runtime.rb"
@@ -83,6 +86,9 @@
 
       # True if DNS is already read
       @initialized = false
+
+      # report the profile error only once
+      @error_reported = false
     end
 
     # Use the parameter, coming usually from install.inf, if it is defined.
@@ -479,6 +485,23 @@
 
       @nameservers = Builtins.eval(Ops.get_list(settings, "nameservers", []))
       @searchlist = Builtins.eval(Ops.get_list(settings, "searchlist", []))
+
+      # check for AY unsupported scenarios, the name servers and the search 
domains
+      # are written in the 2nd stage, if is disabled then it cannot work 
(bsc#1046198)
+      if Stage.initial && Mode.auto && !@error_reported && !empty?
+        # lazy loading to avoid the dependency on AutoYaST, this can be 
imported only
+        # in the initial stage otherwise it might fail!
+        Yast.import "AutoinstConfig"
+
+        if !AutoinstConfig.second_stage
+          # TRANSLATORS: Warning message, the AutoYaST XML profile is incorrect
+          Report.Warning(_("DNS configuration error: The DNS configuration\n" \
+            "is written in the second installation stage (after reboot)\n" \
+            "but the second stage is disabled in the AutoYaST XML profile."))
+          @error_reported = true
+        end
+      end
+
       @modified = true
       # empty settings means that we're probably resetting the config
       # thus, setup is not initialized anymore
@@ -691,6 +714,12 @@
       fqhostname
     end
 
+    # empty configuration?
+    # @return [Boolean] true if the configuration is empty (or contains 
defaults)
+    def empty?
+      @nameservers.empty? && @searchlist.empty? && @hostname.empty? && 
@domain.empty?
+    end
+
     publish variable: :proposal_valid, type: "boolean"
     publish variable: :hostname, type: "string"
     publish variable: :domain, type: "string"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-network-3.2.28/test/build_lan_overview_test.rb 
new/yast2-network-3.3.1/test/build_lan_overview_test.rb
--- old/yast2-network-3.2.28/test/build_lan_overview_test.rb    2017-05-30 
12:36:04.335065155 +0200
+++ new/yast2-network-3.3.1/test/build_lan_overview_test.rb     2017-07-10 
10:44:20.998057139 +0200
@@ -49,8 +49,8 @@
       .to receive(:locale)
       .and_return("de")
 
-    # HACK: locale search path
-    Yast::I18n::LOCALE_DIR = File.expand_path("../locale", __FILE__)
+    # locale search path
+    stub_const("Yast::I18n::LOCALE_DIR", File.expand_path("../locale", 
__FILE__))
 
     textdomain("network")
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-network-3.2.28/test/dns_test.rb 
new/yast2-network-3.3.1/test/dns_test.rb
--- old/yast2-network-3.2.28/test/dns_test.rb   2017-05-30 12:36:04.335065155 
+0200
+++ new/yast2-network-3.3.1/test/dns_test.rb    2017-07-10 10:44:21.002057139 
+0200
@@ -78,6 +78,10 @@
     end
 
     describe ".Import" do
+      before do
+        allow(Yast::Stage).to receive(:initial).and_return(false)
+      end
+
       context "with present dhcp_hostname and write_hostname" do
         let(:settings) { { "hostname" => "host", "dhcp_hostname" => true, 
"write_hostname" => true } }
 
@@ -101,6 +105,37 @@
           expect(DNS.dhcp_hostname).to eql(false)
         end
       end
+
+      context "The AutoYaST first stage installation" do
+        let(:settings) { { "hostname" => "host", "searchlist" => 
["example.com"] } }
+
+        before do
+          allow(Yast::Stage).to receive(:initial).and_return(true)
+          allow(Yast::Mode).to receive(:auto).and_return(true)
+          allow(Yast).to receive(:import).with("AutoinstConfig")
+          # reset the internal counter
+          DNS.instance_variable_set(:@error_reported, false)
+        end
+
+        it "prints a warning when the 2nd stage is disabled for writing the 
search list" do
+          stub_const("Yast::AutoinstConfig", double(second_stage: false))
+          expect(Yast::Report).to receive(:Warning)
+          DNS.Import(settings)
+        end
+
+        it "prints the warning only once on multiple calls" do
+          stub_const("Yast::AutoinstConfig", double(second_stage: false))
+          expect(Yast::Report).to receive(:Warning).once
+          DNS.Import(settings)
+          DNS.Import(settings)
+        end
+
+        it "does not print a warning when the 2nd stage is enabled for writing 
the search list" do
+          stub_const("Yast::AutoinstConfig", double(second_stage: true))
+          expect(Yast::Report).to_not receive(:Warning)
+          DNS.Import(settings)
+        end
+      end
     end
   end
 end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-network-3.2.28/test/edit_nic_name_test.rb 
new/yast2-network-3.3.1/test/edit_nic_name_test.rb
--- old/yast2-network-3.2.28/test/edit_nic_name_test.rb 2017-05-30 
12:36:04.335065155 +0200
+++ new/yast2-network-3.3.1/test/edit_nic_name_test.rb  2017-07-10 
10:44:21.002057139 +0200
@@ -16,8 +16,7 @@
     # general mocking stuff is placed here
     before(:each) do
       # NetworkInterfaces are too low level. Everything needed should be mocked
-      NetworkInterfaces.as_null_object
-      allow(NetworkInterfaces).to receive(:adapt_old_config!)
+      stub_const("NetworkInterfaces", double(adapt_old_config!: nil))
 
       # mock devices configuration
       allow(LanItems).to receive(:ReadHardware) { [{ "dev_name" => 
CURRENT_NAME, "mac" => "00:01:02:03:04:05" }] }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-network-3.2.28/test/host_test.rb 
new/yast2-network-3.3.1/test/host_test.rb
--- old/yast2-network-3.2.28/test/host_test.rb  2017-05-30 12:36:04.335065155 
+0200
+++ new/yast2-network-3.3.1/test/host_test.rb   2017-07-10 10:44:21.002057139 
+0200
@@ -276,16 +276,6 @@
 
       Yast::Host.ResolveHostnameToStaticIPs
     end
-
-    it "doesn't call .Update when an IP already has a hostname" do
-      hostname = "linux"
-
-      Yast::Host.Update(hostname, hostname, static_ips[0])
-
-      expect(Yast::Host.ResolveHostnameToStaticIPs)
-        .not_to receive(:Update)
-        .with(fqhostname, fqhostname, static_ips[0])
-    end
   end
 
   describe ".StaticIPs" do
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-network-3.2.28/test/network_autoyast_test.rb 
new/yast2-network-3.3.1/test/network_autoyast_test.rb
--- old/yast2-network-3.2.28/test/network_autoyast_test.rb      2017-05-30 
12:36:04.371065155 +0200
+++ new/yast2-network-3.3.1/test/network_autoyast_test.rb       2017-07-10 
10:44:21.006057139 +0200
@@ -139,8 +139,7 @@
   describe "#merge_configs" do
 
     it "merges all necessary stuff" do
-      Yast.import "UI"
-      Yast::UI.as_null_object
+      stub_const("Yast::UI", double.as_null_object)
       expect(network_autoyast).to receive(:merge_dns)
       expect(network_autoyast).to receive(:merge_routing)
       expect(network_autoyast).to receive(:merge_devices)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-network-3.2.28/test/routing_test.rb 
new/yast2-network-3.3.1/test/routing_test.rb
--- old/yast2-network-3.2.28/test/routing_test.rb       2017-05-30 
12:36:04.375065155 +0200
+++ new/yast2-network-3.3.1/test/routing_test.rb        2017-07-10 
10:44:21.010057139 +0200
@@ -78,10 +78,10 @@
 
       context "when user sets IPv4 Forwarding to #{ipv4} and IPv6 to #{ipv6}" 
do
         before(:each) do
-          Yast::Wizard.as_null_object
-          Yast::Label.as_null_object
-          Yast::Netmask.as_null_object
-          Yast::Popup.as_null_object
+          stub_const("Yast::Wizard", double.as_null_object)
+          stub_const("Yast::Label", double.as_null_object)
+          stub_const("Yast::Netmask", double.as_null_object)
+          stub_const("Yast::Popup", double.as_null_object)
 
           Yast.import "UI"
           allow(Yast::UI).to receive(:QueryWidget) { "" }
@@ -260,7 +260,7 @@
 
         describe "#Read" do
           it "loads configuration from system" do
-            Yast::NetworkInterfaces.as_null_object
+            stub_const("Yast::NetworkInterfaces", double.as_null_object)
 
             expect(Yast::Routing.Read).to be true
           end


Reply via email to