Hello community, here is the log from the commit of package yast2-network for openSUSE:Factory checked in at 2020-11-23 15:36:22 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/yast2-network (Old) and /work/SRC/openSUSE:Factory/.yast2-network.new.5913 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "yast2-network" Mon Nov 23 15:36:22 2020 rev:436 rq:849650 version:4.3.28 Changes: -------- --- /work/SRC/openSUSE:Factory/yast2-network/yast2-network.changes 2020-10-23 12:20:47.792617466 +0200 +++ /work/SRC/openSUSE:Factory/.yast2-network.new.5913/yast2-network.changes 2020-11-23 16:26:36.724535171 +0100 @@ -1,0 +2,16 @@ +Fri Nov 20 07:23:27 UTC 2020 - Knut Anderssen <kanders...@suse.com> + +- Fixed detection of connection configuration changes (bsc#1178950) +- 4.3.28 + +------------------------------------------------------------------- +Fri Nov 20 07:23:26 UTC 2020 - Michal Filka <mfi...@suse.com> + +- bnc#1175360 + - more robust AY profile parser. Do not crash with internal error + on unknown node in interfaces section + - support for static configurations without ip address +- bnc#1175206 + - support for defined default when missing bootproto in AY + +------------------------------------------------------------------- Old: ---- yast2-network-4.3.27.tar.bz2 New: ---- yast2-network-4.3.28.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ yast2-network.spec ++++++ --- /var/tmp/diff_new_pack.7r6QL3/_old 2020-11-23 16:26:37.732537746 +0100 +++ /var/tmp/diff_new_pack.7r6QL3/_new 2020-11-23 16:26:37.732537746 +0100 @@ -17,7 +17,7 @@ Name: yast2-network -Version: 4.3.27 +Version: 4.3.28 Release: 0 Summary: YaST2 - Network Configuration License: GPL-2.0-only ++++++ yast2-network-4.3.27.tar.bz2 -> yast2-network-4.3.28.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-network-4.3.27/package/yast2-network.changes new/yast2-network-4.3.28/package/yast2-network.changes --- old/yast2-network-4.3.27/package/yast2-network.changes 2020-10-20 15:18:08.000000000 +0200 +++ new/yast2-network-4.3.28/package/yast2-network.changes 2020-11-20 12:30:12.000000000 +0100 @@ -1,4 +1,20 @@ ------------------------------------------------------------------- +Fri Nov 20 07:23:27 UTC 2020 - Knut Anderssen <kanders...@suse.com> + +- Fixed detection of connection configuration changes (bsc#1178950) +- 4.3.28 + +------------------------------------------------------------------- +Fri Nov 20 07:23:26 UTC 2020 - Michal Filka <mfi...@suse.com> + +- bnc#1175360 + - more robust AY profile parser. Do not crash with internal error + on unknown node in interfaces section + - support for static configurations without ip address +- bnc#1175206 + - support for defined default when missing bootproto in AY + +------------------------------------------------------------------- Tue Oct 20 13:03:00 UTC 2020 - Josef Reidinger <jreidin...@suse.com> - fix crash when hostname file missing (bsc#1177904) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-network-4.3.27/package/yast2-network.spec new/yast2-network-4.3.28/package/yast2-network.spec --- old/yast2-network-4.3.27/package/yast2-network.spec 2020-10-20 15:18:08.000000000 +0200 +++ new/yast2-network-4.3.28/package/yast2-network.spec 2020-11-20 12:30:12.000000000 +0100 @@ -17,7 +17,7 @@ Name: yast2-network -Version: 4.3.27 +Version: 4.3.28 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.3.27/src/lib/y2network/autoinst/interfaces_reader.rb new/yast2-network-4.3.28/src/lib/y2network/autoinst/interfaces_reader.rb --- old/yast2-network-4.3.27/src/lib/y2network/autoinst/interfaces_reader.rb 2020-10-20 15:18:08.000000000 +0200 +++ new/yast2-network-4.3.28/src/lib/y2network/autoinst/interfaces_reader.rb 2020-11-20 12:30:12.000000000 +0100 @@ -88,8 +88,14 @@ config.name = name_from_section(interface_section) config.interface = config.name # in autoyast name and interface is same if config.bootproto == BootProtocol::STATIC - # TODO: report if ipaddr missing for static config - ipaddr = IPAddress.from_string(interface_section.ipaddr) + if !interface_section.ipaddr + msg = "Configuration for #{config.name} is invalid #{interface_section.inspect}" + raise ArgumentError, msg + end + + if !interface_section.ipaddr.empty? + ipaddr = IPAddress.from_string(interface_section.ipaddr) + end # Assign first netmask, as prefixlen has precedence so it will overwrite it ipaddr.netmask = interface_section.netmask if !interface_section.netmask.to_s.empty? if !interface_section.prefixlen.to_s.empty? diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-network-4.3.27/src/lib/y2network/autoinst_profile/interface_section.rb new/yast2-network-4.3.28/src/lib/y2network/autoinst_profile/interface_section.rb --- old/yast2-network-4.3.27/src/lib/y2network/autoinst_profile/interface_section.rb 2020-10-20 15:18:08.000000000 +0200 +++ new/yast2-network-4.3.28/src/lib/y2network/autoinst_profile/interface_section.rb 2020-11-20 12:30:12.000000000 +0100 @@ -284,11 +284,13 @@ # @param config [Y2Network::ConnectionConfig] # @return [Boolean] def init_from_config(config) - @bootproto = config.bootproto.name + # nil bootproto is valid use case (missing explicit setup) - wicked defaults to static then + @bootproto = config.bootproto&.name @name = config.name if config.bootproto == BootProtocol::STATIC && config.ip - @ipaddr = config.ip.address.address.to_s - @prefixlen = config.ip.address.prefix.to_s + # missing ip is valid scenario for wicked - so use empty string here + @ipaddr = config.ip.address&.address.to_s + @prefixlen = config.ip.address&.prefix.to_s @remote_ipaddr = config.ip.remote_address.address.to_s if config.ip.remote_address @broadcast = config.ip.broadcast.address.to_s if config.ip.broadcast end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-network-4.3.27/src/lib/y2network/autoinst_profile/interfaces_section.rb new/yast2-network-4.3.28/src/lib/y2network/autoinst_profile/interfaces_section.rb --- old/yast2-network-4.3.27/src/lib/y2network/autoinst_profile/interfaces_section.rb 2020-10-20 15:18:08.000000000 +0200 +++ new/yast2-network-4.3.28/src/lib/y2network/autoinst_profile/interfaces_section.rb 2020-11-20 12:30:12.000000000 +0100 @@ -81,7 +81,9 @@ # # @param hash [Array] see {.new_from_hashes}. In this case it is array of interfaces def init_from_hashes(hash) - @interfaces = interfaces_from_hash(hash) + # we expect list of hashes here, remove everything else + h = hash.delete_if { |v| !v.is_a?(Hash) } + @interfaces = interfaces_from_hash(h) end # Method used by {.new_from_network} to populate the attributes when cloning routing settings diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-network-4.3.27/src/lib/y2network/boot_protocol.rb new/yast2-network-4.3.28/src/lib/y2network/boot_protocol.rb --- old/yast2-network-4.3.27/src/lib/y2network/boot_protocol.rb 2020-10-20 15:18:08.000000000 +0200 +++ new/yast2-network-4.3.28/src/lib/y2network/boot_protocol.rb 2020-11-20 12:30:12.000000000 +0100 @@ -35,7 +35,7 @@ # Returns the boot protocol with a given name # # @param name [String] - # @return [BootProtocol,nil] Boot protocol or nil is not found + # @return [BootProtocol,nil] Boot protocol or nil if not found def from_name(name) all.find { |t| t.name == name } end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-network-4.3.27/src/lib/y2network/clients/auto.rb new/yast2-network-4.3.28/src/lib/y2network/clients/auto.rb --- old/yast2-network-4.3.27/src/lib/y2network/clients/auto.rb 2020-10-20 15:18:08.000000000 +0200 +++ new/yast2-network-4.3.28/src/lib/y2network/clients/auto.rb 2020-11-20 12:30:12.000000000 +0100 @@ -90,6 +90,7 @@ end Yast::Lan.Import(modified_profile) + true end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-network-4.3.27/src/lib/y2network/connection_config/bonding.rb new/yast2-network-4.3.28/src/lib/y2network/connection_config/bonding.rb --- old/yast2-network-4.3.27/src/lib/y2network/connection_config/bonding.rb 2020-10-20 15:18:08.000000000 +0200 +++ new/yast2-network-4.3.28/src/lib/y2network/connection_config/bonding.rb 2020-11-20 12:30:12.000000000 +0100 @@ -42,6 +42,8 @@ options == other.options && ((slaves - other.slaves) + (other.slaves - slaves)).empty? end + alias_method :eql?, :== + def virtual? true end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-network-4.3.27/src/lib/y2network/connection_config/bridge.rb new/yast2-network-4.3.28/src/lib/y2network/connection_config/bridge.rb --- old/yast2-network-4.3.27/src/lib/y2network/connection_config/bridge.rb 2020-10-20 15:18:08.000000000 +0200 +++ new/yast2-network-4.3.28/src/lib/y2network/connection_config/bridge.rb 2020-11-20 12:30:12.000000000 +0100 @@ -49,6 +49,8 @@ stp == other.stp && forward_delay == other.forward_delay && ((ports - other.ports) + (other.ports - ports)).empty? end + + alias_method :eql?, :== end end end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-network-4.3.27/src/lib/y2network/connection_config/ctc.rb new/yast2-network-4.3.28/src/lib/y2network/connection_config/ctc.rb --- old/yast2-network-4.3.27/src/lib/y2network/connection_config/ctc.rb 2020-10-20 15:18:08.000000000 +0200 +++ new/yast2-network-4.3.28/src/lib/y2network/connection_config/ctc.rb 2020-11-20 12:30:12.000000000 +0100 @@ -67,6 +67,8 @@ end end + alias_method :eql?, :== + # Returns the complete device id which contains the read ad write # channels joined by ':' # diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-network-4.3.27/src/lib/y2network/connection_config/infiniband.rb new/yast2-network-4.3.28/src/lib/y2network/connection_config/infiniband.rb --- old/yast2-network-4.3.27/src/lib/y2network/connection_config/infiniband.rb 2020-10-20 15:18:08.000000000 +0200 +++ new/yast2-network-4.3.28/src/lib/y2network/connection_config/infiniband.rb 2020-11-20 12:30:12.000000000 +0100 @@ -42,6 +42,8 @@ public_send(method) == other.public_send(method) end end + + alias_method :eql?, :== end end end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-network-4.3.27/src/lib/y2network/connection_config/ip_config.rb new/yast2-network-4.3.28/src/lib/y2network/connection_config/ip_config.rb --- old/yast2-network-4.3.27/src/lib/y2network/connection_config/ip_config.rb 2020-10-20 15:18:08.000000000 +0200 +++ new/yast2-network-4.3.28/src/lib/y2network/connection_config/ip_config.rb 2020-11-20 12:30:12.000000000 +0100 @@ -62,6 +62,8 @@ remote_address == other.remote_address && broadcast == other.broadcast && id == other.id end + + alias_method :eql?, :== end end end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-network-4.3.27/src/lib/y2network/connection_config/lcs.rb new/yast2-network-4.3.28/src/lib/y2network/connection_config/lcs.rb --- old/yast2-network-4.3.27/src/lib/y2network/connection_config/lcs.rb 2020-10-20 15:18:08.000000000 +0200 +++ new/yast2-network-4.3.28/src/lib/y2network/connection_config/lcs.rb 2020-11-20 12:30:12.000000000 +0100 @@ -63,6 +63,8 @@ end end + alias_method :eql?, :== + # Returns the complete device id which contains the read ad write # channels joined by ':' # diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-network-4.3.27/src/lib/y2network/connection_config/qeth.rb new/yast2-network-4.3.28/src/lib/y2network/connection_config/qeth.rb --- old/yast2-network-4.3.27/src/lib/y2network/connection_config/qeth.rb 2020-10-20 15:18:08.000000000 +0200 +++ new/yast2-network-4.3.28/src/lib/y2network/connection_config/qeth.rb 2020-11-20 12:30:12.000000000 +0100 @@ -71,6 +71,8 @@ end end + alias_method :eql?, :== + # Returns the complete device id which contains the read, write and data # channels joined by ':' # diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-network-4.3.27/src/lib/y2network/connection_config/tap.rb new/yast2-network-4.3.28/src/lib/y2network/connection_config/tap.rb --- old/yast2-network-4.3.27/src/lib/y2network/connection_config/tap.rb 2020-10-20 15:18:08.000000000 +0200 +++ new/yast2-network-4.3.28/src/lib/y2network/connection_config/tap.rb 2020-11-20 12:30:12.000000000 +0100 @@ -45,6 +45,8 @@ public_send(method) == other.public_send(method) end end + + alias_method :eql?, :== end end end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-network-4.3.27/src/lib/y2network/connection_config/tun.rb new/yast2-network-4.3.28/src/lib/y2network/connection_config/tun.rb --- old/yast2-network-4.3.27/src/lib/y2network/connection_config/tun.rb 2020-10-20 15:18:08.000000000 +0200 +++ new/yast2-network-4.3.28/src/lib/y2network/connection_config/tun.rb 2020-11-20 12:30:12.000000000 +0100 @@ -45,6 +45,8 @@ public_send(method) == other.public_send(method) end end + + alias_method :eql?, :== end end end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-network-4.3.27/src/lib/y2network/connection_config/vlan.rb new/yast2-network-4.3.28/src/lib/y2network/connection_config/vlan.rb --- old/yast2-network-4.3.27/src/lib/y2network/connection_config/vlan.rb 2020-10-20 15:18:08.000000000 +0200 +++ new/yast2-network-4.3.28/src/lib/y2network/connection_config/vlan.rb 2020-11-20 12:30:12.000000000 +0100 @@ -44,6 +44,8 @@ public_send(method) == other.public_send(method) end end + + alias_method :eql?, :== end end end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-network-4.3.27/src/lib/y2network/connection_config/wireless.rb new/yast2-network-4.3.28/src/lib/y2network/connection_config/wireless.rb --- old/yast2-network-4.3.27/src/lib/y2network/connection_config/wireless.rb 2020-10-20 15:18:08.000000000 +0200 +++ new/yast2-network-4.3.28/src/lib/y2network/connection_config/wireless.rb 2020-11-20 12:30:12.000000000 +0100 @@ -103,6 +103,8 @@ end end + alias_method :eql?, :== + # @param wireless_mode [String] def mode=(wireless_mode) @mode = wireless_mode.to_s.downcase diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-network-4.3.27/src/lib/y2network/sysconfig/connection_config_writers/base.rb new/yast2-network-4.3.28/src/lib/y2network/sysconfig/connection_config_writers/base.rb --- old/yast2-network-4.3.27/src/lib/y2network/sysconfig/connection_config_writers/base.rb 2020-10-20 15:18:08.000000000 +0200 +++ new/yast2-network-4.3.28/src/lib/y2network/sysconfig/connection_config_writers/base.rb 2020-11-20 12:30:12.000000000 +0100 @@ -40,7 +40,7 @@ # # @param conn [Y2Network::ConnectionConfig::Base] Connection to take settings from def write(conn) - file.bootproto = conn.bootproto.name + file.bootproto = conn.bootproto&.name file.name = conn.description file.lladdr = conn.lladdress file.startmode = conn.startmode.to_s diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-network-4.3.27/test/y2network/config_test.rb new/yast2-network-4.3.28/test/y2network/config_test.rb --- old/yast2-network-4.3.27/test/y2network/config_test.rb 2020-10-20 15:18:08.000000000 +0200 +++ new/yast2-network-4.3.28/test/y2network/config_test.rb 2020-11-20 12:30:12.000000000 +0100 @@ -137,6 +137,18 @@ end describe "#==" do + let(:bond0) { Y2Network::VirtualInterface.new("bond0") } + let(:bond0_conn) do + Y2Network::ConnectionConfig::Bonding.new.tap do |conn| + conn.interface = "bond0" + conn.name = "bond0" + conn.slaves = ["eth0"] + end + end + + let(:interfaces) { Y2Network::InterfacesCollection.new([eth0, bond0]) } + let(:connections) { Y2Network::ConnectionConfigsCollection.new([eth0_conn, bond0_conn]) } + let(:copy) { config.copy } context "when both configuration contains the same information" do @@ -154,7 +166,9 @@ context "when connection list is different" do it "returns false" do - copy.connections = Y2Network::ConnectionConfigsCollection.new([]) + modified_bond = copy.connections.by_name("bond0") + modified_bond.options = "mode=active-backup miimon=300" + expect(copy).to_not eq(config) end end _______________________________________________ openSUSE Commits mailing list -- commit@lists.opensuse.org To unsubscribe, email commit-le...@lists.opensuse.org List Netiquette: https://en.opensuse.org/openSUSE:Mailing_list_netiquette List Archives: https://lists.opensuse.org/archives/list/commit@lists.opensuse.org