Hello community,

here is the log from the commit of package yast2-network for openSUSE:Leap:15.2 
checked in at 2020-02-10 16:41:25
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Leap:15.2/yast2-network (Old)
 and      /work/SRC/openSUSE:Leap:15.2/.yast2-network.new.26092 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "yast2-network"

Mon Feb 10 16:41:25 2020 rev:119 rq:772191 version:4.2.52

Changes:
--------
--- /work/SRC/openSUSE:Leap:15.2/yast2-network/yast2-network.changes    
2020-02-04 17:55:04.996773316 +0100
+++ /work/SRC/openSUSE:Leap:15.2/.yast2-network.new.26092/yast2-network.changes 
2020-02-10 16:41:31.639706455 +0100
@@ -1,0 +2,14 @@
+Thu Feb  6 15:48:23 UTC 2020 - Knut Anderssen <kanders...@suse.com>
+
+- Prevent assignation of values not defined in the AutoYaST profile
+  when reading the interfaces section (bsc#1162671)
+- 4.2.52
+
+-------------------------------------------------------------------
+Tue Feb  4 19:06:52 UTC 2020 - Knut Anderssen <kanders...@suse.com>
+
+- Do not break when reading interface config files with trailing
+  spaces (bsc#1161300)
+- 4.2.51
+
+-------------------------------------------------------------------

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

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

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

Other differences:
------------------
++++++ yast2-network.spec ++++++
--- /var/tmp/diff_new_pack.8H11xY/_old  2020-02-10 16:41:31.931706661 +0100
+++ /var/tmp/diff_new_pack.8H11xY/_new  2020-02-10 16:41:31.931706661 +0100
@@ -17,7 +17,7 @@
 
 
 Name:           yast2-network
-Version:        4.2.50
+Version:        4.2.52
 Release:        0
 Summary:        YaST2 - Network Configuration
 License:        GPL-2.0-only

++++++ yast2-network-4.2.50.tar.bz2 -> yast2-network-4.2.52.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-network-4.2.50/package/yast2-network.changes 
new/yast2-network-4.2.52/package/yast2-network.changes
--- old/yast2-network-4.2.50/package/yast2-network.changes      2020-02-03 
12:56:07.000000000 +0100
+++ new/yast2-network-4.2.52/package/yast2-network.changes      2020-02-06 
17:18:37.000000000 +0100
@@ -1,4 +1,18 @@
 -------------------------------------------------------------------
+Thu Feb  6 15:48:23 UTC 2020 - Knut Anderssen <kanders...@suse.com>
+
+- Prevent assignation of values not defined in the AutoYaST profile
+  when reading the interfaces section (bsc#1162671)
+- 4.2.52
+
+-------------------------------------------------------------------
+Tue Feb  4 19:06:52 UTC 2020 - Knut Anderssen <kanders...@suse.com>
+
+- Do not break when reading interface config files with trailing
+  spaces (bsc#1161300)
+- 4.2.51
+
+-------------------------------------------------------------------
 Mon Feb  3 10:44:31 UTC 2020 - Knut Anderssen <kanders...@suse.com>
 
 - Fix connection configuration summary when using a remote
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-network-4.2.50/package/yast2-network.spec 
new/yast2-network-4.2.52/package/yast2-network.spec
--- old/yast2-network-4.2.50/package/yast2-network.spec 2020-02-03 
12:56:07.000000000 +0100
+++ new/yast2-network-4.2.52/package/yast2-network.spec 2020-02-06 
17:18:37.000000000 +0100
@@ -17,7 +17,7 @@
 
 
 Name:           yast2-network
-Version:        4.2.50
+Version:        4.2.52
 Release:        0
 Summary:        YaST2 - Network Configuration
 License:        GPL-2.0-only
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-network-4.2.50/src/lib/y2network/autoinst/interfaces_reader.rb 
new/yast2-network-4.2.52/src/lib/y2network/autoinst/interfaces_reader.rb
--- old/yast2-network-4.2.50/src/lib/y2network/autoinst/interfaces_reader.rb    
2020-02-03 12:56:07.000000000 +0100
+++ new/yast2-network-4.2.52/src/lib/y2network/autoinst/interfaces_reader.rb    
2020-02-06 17:18:37.000000000 +0100
@@ -91,8 +91,10 @@
           # TODO: report if ipaddr missing for static config
           ipaddr = IPAddress.from_string(interface_section.ipaddr)
           # Assign first netmask, as prefixlen has precedence so it will 
overwrite it
-          ipaddr.netmask = interface_section.netmask if 
interface_section.netmask
-          ipaddr.prefix = interface_section.prefixlen.to_i if 
interface_section.prefixlen
+          ipaddr.netmask = interface_section.netmask if 
!interface_section.netmask.to_s.empty?
+          if !interface_section.prefixlen.to_s.empty?
+            ipaddr.prefix = interface_section.prefixlen.to_i
+          end
           if !interface_section.broadcast.empty?
             broadcast = IPAddress.new(interface_section.broadcast)
           end
@@ -112,17 +114,17 @@
           ipaddr.prefix = alias_h["PREFIXLEN"].delete("/").to_i if 
alias_h["PREFIXLEN"]
           config.ip_aliases << ConnectionConfig::IPConfig.new(ipaddr, label: 
alias_h["LABEL"])
         end
-        if interface_section.startmode
+        if !interface_section.startmode.to_s.empty?
           config.startmode = Startmode.create(interface_section.startmode)
         end
-        if config.startmode.name == "ifplugd" && 
interface_section.ifplugd_priority
+        if config.startmode.name == "ifplugd" && 
!interface_section.ifplugd_priority.to_s.empty?
           config.startmode.priority = interface_section.ifplugd_priority
         end
-        config.mtu = interface_section.mtu.to_i if interface_section.mtu
+        config.mtu = interface_section.mtu.to_i if 
!interface_section.mtu.to_s.empty?
         if interface_section.ethtool_options
           config.ethtool_options = interface_section.ethtool_options
         end
-        config.firewall_zone = interface_section.zone if interface_section.zone
+        config.firewall_zone = interface_section.zone if 
!interface_section.zone.to_s.empty?
         if !interface_section.dhclient_set_hostname.empty?
           config.dhclient_set_hostname = 
interface_section.dhclient_set_hostname == "yes"
         end
@@ -131,44 +133,55 @@
       end
 
       def load_wireless(config, interface_section)
-        config.mode = interface_section.wireless_mode if 
interface_section.wireless_mode
-        config.ap = interface_section.wireless_ap if 
interface_section.wireless_ap
-        if interface_section.wireless_bitrate
+        if !interface_section.wireless_mode.to_s.empty?
+          config.mode = interface_section.wireless_mode
+        end
+        config.ap = interface_section.wireless_ap if 
!interface_section.wireless_ap.to_s.empty?
+        if !interface_section.wireless_bitrate.to_s.empty?
           config.bitrate = interface_section.wireless_bitrate.to_f
         end
         config.ca_cert = interface_section.wireless_ca_cert if 
interface_section.wireless_ca_cert
-        if interface_section.wireless_channel
+        if !interface_section.wireless_channel.to_s.empty?
           config.channel = interface_section.wireless_channel.to_i
         end
-        if interface_section.wireless_client_cert
+        if !interface_section.wireless_client_cert.to_s.empty?
           config.client_cert = interface_section.wireless_client_cert
         end
-        if interface_section.wireless_client_key
+        if !interface_section.wireless_client_key.to_s.empty?
           config.client_key = interface_section.wireless_client_key
         end
         config.essid = interface_section.wireless_essid if 
interface_section.wireless_essid
         if interface_section.wireless_auth_mode
           config.auth_mode = interface_section.wireless_auth_mode.to_sym
         end
-        config.nick = interface_section.wireless_nick if 
interface_section.wireless_nick
-        config.nwid = interface_section.wireless_nwid if 
interface_section.wireless_nwid
-        if interface_section.wireless_wpa_anonid
+        if !interface_section.wireless_nick.to_s.empty?
+          config.nick = interface_section.wireless_nick
+        end
+        if !interface_section.wireless_nwid.to_s.empty?
+          config.nwid = interface_section.wireless_nwid
+        end
+
+        if !interface_section.wireless_wpa_anonid.to_s.empty?
           config.wpa_anonymous_identity = interface_section.wireless_wpa_anonid
         end
-        if interface_section.wireless_wpa_identity
+        if !interface_section.wireless_wpa_identity.to_s.empty?
           config.wpa_identity = interface_section.wireless_wpa_identity
         end
-        if interface_section.wireless_wpa_password
+        if !interface_section.wireless_wpa_password.to_s.empty?
           config.wpa_password = interface_section.wireless_wpa_password
         end
-        config.wpa_psk = interface_section.wireless_wpa_psk if 
interface_section.wireless_wpa_psk
+        if !interface_section.wireless_wpa_psk.to_s.empty?
+          config.wpa_psk = interface_section.wireless_wpa_psk
+        end
         config.keys = []
         (0..3).each do |i|
           key = interface_section.public_send(:"wireless_key#{i}")
           config.keys << key if key && !key.empty?
         end
-        config.default_key = interface_section.wireless_key.to_i if 
interface_section.wireless_key
-        if interface_section.wireless_key_length
+        if !interface_section.wireless_key.to_s.empty?
+          config.default_key = interface_section.wireless_key.to_i
+        end
+        if !interface_section.wireless_key_length.to_s.empty?
           config.key_length = interface_section.wireless_key_length.to_i
         end
 
@@ -176,14 +189,16 @@
       end
 
       def load_vlan(config, interface_section)
-        config.vlan_id = interface_section.vlan_id.to_i if 
interface_section.vlan_id
+        config.vlan_id = interface_section.vlan_id.to_i if 
!interface_section.vlan_id.to_s.empty?
         config.parent_device = interface_section.etherdevice
       end
 
       def load_bridge(config, interface_section)
         config.ports = interface_section.bridge_ports.split
-        config.stp = interface_section.bridge_stp == "on" if 
interface_section.bridge_stp
-        if interface_section.bridge_forward_delay
+        if !interface_section.bridge_stp.to_s.empty?
+          config.stp = interface_section.bridge_stp == "on"
+        end
+        if !interface_section.bridge_forward_delay.to_s.empty?
           config.forward_delay = interface_section.bridge_forward_delay.to_i
         end
 
@@ -191,7 +206,7 @@
       end
 
       def load_bonding(config, interface_section)
-        if interface_section.bonding_module_opts
+        if !interface_section.bonding_module_opts.empty?
           config.options = interface_section.bonding_module_opts
         end
         config.slaves = []
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-network-4.2.50/src/lib/y2network/autoinst_profile/interface_section.rb
 
new/yast2-network-4.2.52/src/lib/y2network/autoinst_profile/interface_section.rb
--- 
old/yast2-network-4.2.50/src/lib/y2network/autoinst_profile/interface_section.rb
    2020-02-03 12:56:07.000000000 +0100
+++ 
new/yast2-network-4.2.52/src/lib/y2network/autoinst_profile/interface_section.rb
    2020-02-06 17:18:37.000000000 +0100
@@ -259,6 +259,9 @@
       def initialize(*_args)
         super
 
+        # TODO: Initializing all the attributes to an empty string makes
+        # hard to know whether the value was defined or not at all. We probably
+        # should ommit this initialization
         self.class.attributes.each do |attr|
           # init everything to empty string
           public_send(:"#{attr[:name]}=", "")
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-network-4.2.50/src/lib/y2network/sysconfig/interface_file.rb 
new/yast2-network-4.2.52/src/lib/y2network/sysconfig/interface_file.rb
--- old/yast2-network-4.2.50/src/lib/y2network/sysconfig/interface_file.rb      
2020-02-03 12:56:07.000000000 +0100
+++ new/yast2-network-4.2.52/src/lib/y2network/sysconfig/interface_file.rb      
2020-02-06 17:18:37.000000000 +0100
@@ -516,7 +516,7 @@
       # @return [Object] Value for the given key
       def fetch_scalar(key, type)
         path = Yast::Path.new(".network.value.\"#{interface}\".#{key}")
-        value = Yast::SCR.Read(path)
+        value = Yast::SCR.Read(path)&.strip
         send("value_as_#{type}", value)
       end
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-network-4.2.50/test/data/scr_read/etc/sysconfig/network/ifcfg-eth0 
new/yast2-network-4.2.52/test/data/scr_read/etc/sysconfig/network/ifcfg-eth0
--- 
old/yast2-network-4.2.50/test/data/scr_read/etc/sysconfig/network/ifcfg-eth0    
    2020-02-03 12:56:07.000000000 +0100
+++ 
new/yast2-network-4.2.52/test/data/scr_read/etc/sysconfig/network/ifcfg-eth0    
    2020-02-06 17:18:37.000000000 +0100
@@ -1,10 +1,10 @@
 BOOTPROTO='static'
 BROADCAST=''
 ETHTOOL_OPTIONS=''
-IPADDR='192.168.123.1/24'
+IPADDR='192.168.123.1/24'  
 MTU='1500'
-NAME='Ethernet Card 0'
-NETWORK=''
+NAME='Ethernet Card 0' 
+NETWORK='' 
 REMOTE_IPADDR=''
 STARTMODE='auto'
 DHCLIENT_SET_HOSTNAME='yes'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-network-4.2.50/test/y2network/autoinst/interfaces_reader_test.rb 
new/yast2-network-4.2.52/test/y2network/autoinst/interfaces_reader_test.rb
--- old/yast2-network-4.2.50/test/y2network/autoinst/interfaces_reader_test.rb  
2020-02-03 12:56:07.000000000 +0100
+++ new/yast2-network-4.2.52/test/y2network/autoinst/interfaces_reader_test.rb  
2020-02-06 17:18:37.000000000 +0100
@@ -38,7 +38,6 @@
         "device"                => "eth1",
         "name"                  => "",
         "ipaddr"                => "192.168.10.10",
-        "netmask"               => "255.255.255.0",
         "dhclient_set_hostname" => "no",
         "prefixlen"             => "24"
       },


Reply via email to