Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package yast2-network for openSUSE:Factory checked in at 2021-11-06 18:15:39 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/yast2-network (Old) and /work/SRC/openSUSE:Factory/.yast2-network.new.1890 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "yast2-network" Sat Nov 6 18:15:39 2021 rev:465 rq:929629 version:4.4.29 Changes: -------- --- /work/SRC/openSUSE:Factory/yast2-network/yast2-network.changes 2021-10-16 22:47:23.828679628 +0200 +++ /work/SRC/openSUSE:Factory/.yast2-network.new.1890/yast2-network.changes 2021-11-06 18:18:00.884884049 +0100 @@ -1,0 +2,17 @@ +Thu Nov 4 15:02:24 UTC 2021 - Knut Anderssen <kanders...@suse.com> + +- AutoYaST + - When the interface section contains the "device" (deprecated) + and "name" elements then use the "device" as the "name" and the + "name" as the "description". (bsc#1192270) + - Add the "description" element to the interface section. +- 4.4.29 + +------------------------------------------------------------------- +Wed Nov 3 22:19:45 UTC 2021 - Knut Anderssen <kanders...@suse.com> + +- Do not crash when checking if a virtual interface is connected + (bsc#1192183, bsc#1192270). +- 4.4.28 + +------------------------------------------------------------------- Old: ---- yast2-network-4.4.27.tar.bz2 New: ---- yast2-network-4.4.29.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ yast2-network.spec ++++++ --- /var/tmp/diff_new_pack.OBoJlC/_old 2021-11-06 18:18:01.436884336 +0100 +++ /var/tmp/diff_new_pack.OBoJlC/_new 2021-11-06 18:18:01.440884338 +0100 @@ -17,7 +17,7 @@ Name: yast2-network -Version: 4.4.27 +Version: 4.4.29 Release: 0 Summary: YaST2 - Network Configuration License: GPL-2.0-only ++++++ yast2-network-4.4.27.tar.bz2 -> yast2-network-4.4.29.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-network-4.4.27/.github/workflows/ci.yml new/yast2-network-4.4.29/.github/workflows/ci.yml --- old/yast2-network-4.4.27/.github/workflows/ci.yml 2021-10-13 17:35:41.000000000 +0200 +++ new/yast2-network-4.4.29/.github/workflows/ci.yml 2021-11-05 11:29:19.000000000 +0100 @@ -10,7 +10,6 @@ runs-on: ubuntu-latest container: image: registry.opensuse.org/yast/head/containers/yast-ruby:latest - options: --privileged steps: @@ -37,7 +36,6 @@ runs-on: ubuntu-latest container: image: registry.opensuse.org/yast/head/containers/yast-ruby:latest - options: --privileged steps: @@ -51,7 +49,6 @@ runs-on: ubuntu-latest container: image: registry.opensuse.org/yast/head/containers/yast-ruby:latest - options: --privileged steps: @@ -65,7 +62,6 @@ runs-on: ubuntu-latest container: image: registry.opensuse.org/yast/head/containers/yast-ruby:latest - options: --privileged steps: @@ -81,7 +77,6 @@ runs-on: ubuntu-latest container: image: registry.opensuse.org/yast/head/containers/yast-ruby:latest - options: --privileged steps: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-network-4.4.27/package/yast2-network.changes new/yast2-network-4.4.29/package/yast2-network.changes --- old/yast2-network-4.4.27/package/yast2-network.changes 2021-10-13 17:35:41.000000000 +0200 +++ new/yast2-network-4.4.29/package/yast2-network.changes 2021-11-05 11:29:19.000000000 +0100 @@ -1,4 +1,21 @@ ------------------------------------------------------------------- +Thu Nov 4 15:02:24 UTC 2021 - Knut Anderssen <kanders...@suse.com> + +- AutoYaST + - When the interface section contains the "device" (deprecated) + and "name" elements then use the "device" as the "name" and the + "name" as the "description". (bsc#1192270) + - Add the "description" element to the interface section. +- 4.4.29 + +------------------------------------------------------------------- +Wed Nov 3 22:19:45 UTC 2021 - Knut Anderssen <kanders...@suse.com> + +- Do not crash when checking if a virtual interface is connected + (bsc#1192183, bsc#1192270). +- 4.4.28 + +------------------------------------------------------------------- Wed Oct 13 09:09:15 UTC 2021 - Knut Anderssen <kanders...@suse.com> - Fix reading of the routing configuration (bsc#1191589) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-network-4.4.27/package/yast2-network.spec new/yast2-network-4.4.29/package/yast2-network.spec --- old/yast2-network-4.4.27/package/yast2-network.spec 2021-10-13 17:35:41.000000000 +0200 +++ new/yast2-network-4.4.29/package/yast2-network.spec 2021-11-05 11:29:19.000000000 +0100 @@ -17,7 +17,7 @@ Name: yast2-network -Version: 4.4.27 +Version: 4.4.29 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.4.27/src/autoyast-rnc/networking.rnc new/yast2-network-4.4.29/src/autoyast-rnc/networking.rnc --- old/yast2-network-4.4.27/src/autoyast-rnc/networking.rnc 2021-10-13 17:35:41.000000000 +0200 +++ new/yast2-network-4.4.29/src/autoyast-rnc/networking.rnc 2021-11-05 11:29:19.000000000 +0100 @@ -52,6 +52,7 @@ ( element device { STRING }? & #overloaded element name { STRING }? & + element description { STRING }? & lladdr? & bootproto? & diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-network-4.4.27/src/lib/y2network/autoinst/interfaces_reader.rb new/yast2-network-4.4.29/src/lib/y2network/autoinst/interfaces_reader.rb --- old/yast2-network-4.4.27/src/lib/y2network/autoinst/interfaces_reader.rb 2021-10-13 17:35:41.000000000 +0200 +++ new/yast2-network-4.4.29/src/lib/y2network/autoinst/interfaces_reader.rb 2021-11-05 11:29:19.000000000 +0100 @@ -125,6 +125,9 @@ config.lladdress = interface_section.lladdr if !interface_section.lladdr.to_s.empty? config.interface = config.name # in autoyast name and interface is same + description = interface_section.description.to_s + config.description = interface_section.description if !description.empty? + config.ip = load_ipaddr(interface_section) # handle aliases diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-network-4.4.27/src/lib/y2network/autoinst_profile/interface_section.rb new/yast2-network-4.4.29/src/lib/y2network/autoinst_profile/interface_section.rb --- old/yast2-network-4.4.27/src/lib/y2network/autoinst_profile/interface_section.rb 2021-10-13 17:35:41.000000000 +0200 +++ new/yast2-network-4.4.29/src/lib/y2network/autoinst_profile/interface_section.rb 2021-11-05 11:29:19.000000000 +0100 @@ -47,6 +47,7 @@ { name: :device }, { name: :name }, # has precedence over device { name: :lladdr }, + { name: :description }, { name: :ipaddr }, { name: :remote_ipaddr }, { name: :netmask }, @@ -266,6 +267,13 @@ hash = rename_key(hash, "bridge_forwarddelay", "bridge_forward_delay") super(hash) + # When the name and the device attributes are given then the pre network-ng behavior will be + # adopted using the name as the description and the device as the name (bsc#1192270). + unless hash.fetch("name", "").empty? || hash.fetch("device", "").empty? + self.name = hash["device"] + self.description = hash["name"] + end + return unless hash["aliases"].is_a?(Hash) self.aliases = hash["aliases"].values.map { |h| AliasSection.new_from_hashes(h) } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-network-4.4.27/src/lib/y2network/interface.rb new/yast2-network-4.4.29/src/lib/y2network/interface.rb --- old/yast2-network-4.4.27/src/lib/y2network/interface.rb 2021-10-13 17:35:41.000000000 +0200 +++ new/yast2-network-4.4.29/src/lib/y2network/interface.rb 2021-11-05 11:29:19.000000000 +0100 @@ -35,7 +35,6 @@ # @see Y2Network::PhysicalInterface # @see Y2Network::VirtualInterface class Interface - extend Forwardable include Yast::Logger # @return [String] Device name ('eth0', 'wlan0', etc.) @@ -51,8 +50,6 @@ # @return [String,nil] attr_reader :old_name - def_delegators :hardware, :drivers, :connected? - class << self # Builds an interface based on a connection # @@ -78,6 +75,22 @@ @renaming_mechanism = :none end + # Whether the interface is connected or not based on hardware information + # + # @see Hwinfo#connected? + # @return [Boolean] + def connected? + !!hardware&.connected? + end + + # Returns the list of kernel modules + # + # @return [Array<Driver>] + # @see Hwinfo#drivers + def drivers + hardware&.drivers || [] + end + # Determines whether two interfaces are equal # # @note although it is preferable to use Yast2::Equatable it uses the class diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-network-4.4.27/test/y2network/autoinst/interfaces_reader_test.rb new/yast2-network-4.4.29/test/y2network/autoinst/interfaces_reader_test.rb --- old/yast2-network-4.4.27/test/y2network/autoinst/interfaces_reader_test.rb 2021-10-13 17:35:41.000000000 +0200 +++ new/yast2-network-4.4.29/test/y2network/autoinst/interfaces_reader_test.rb 2021-11-05 11:29:19.000000000 +0100 @@ -46,6 +46,7 @@ { "bootproto" => "dhcp", "name" => "eth0", + "description" => "Ethernet Card 0", "startmode" => "boot", "dhclient_set_hostname" => "yes", "lladdr" => "02:0b:0c:0d:0e:02", @@ -88,6 +89,7 @@ it "assign properly all values in profile" do eth0_config = subject.config.by_name("eth0") expect(eth0_config.startmode.name).to eq("auto") + expect(eth0_config.description).to eq("Ethernet Card 0") expect(eth0_config.startmode.alias_name).to eq("boot") expect(eth0_config.bootproto).to eq Y2Network::BootProtocol.from_name("dhcp") expect(eth0_config.ip_aliases.size).to eq 3 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-network-4.4.27/test/y2network/autoinst_profile/interface_section_test.rb new/yast2-network-4.4.29/test/y2network/autoinst_profile/interface_section_test.rb --- old/yast2-network-4.4.27/test/y2network/autoinst_profile/interface_section_test.rb 2021-10-13 17:35:41.000000000 +0200 +++ new/yast2-network-4.4.29/test/y2network/autoinst_profile/interface_section_test.rb 2021-11-05 11:29:19.000000000 +0100 @@ -102,6 +102,17 @@ end end + context "when the device and name are given" do + let(:descr) { "Virtual Interface Card 4" } + + it "sets the device as the name and the name as the description" do + hash["name"] = descr + section = described_class.new_from_hashes(hash) + expect(section.name).to eq("eth0") + expect(section.description). to eq(descr) + end + end + context "when bridge_forwarddelay and bridge_forward_delay are both set" do let(:hash) do { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-network-4.4.27/test/y2network/interface_test.rb new/yast2-network-4.4.29/test/y2network/interface_test.rb --- old/yast2-network-4.4.27/test/y2network/interface_test.rb 2021-10-13 17:35:41.000000000 +0200 +++ new/yast2-network-4.4.29/test/y2network/interface_test.rb 2021-11-05 11:29:19.000000000 +0100 @@ -92,7 +92,7 @@ end end - describe "#modules_names" do + describe "#drivers" do let(:driver) { instance_double(Y2Network::Driver) } let(:hwinfo) { instance_double(Y2Network::Hwinfo, drivers: [driver]) } @@ -105,6 +105,39 @@ end end + describe "#connected?" do + let(:hwinfo) { instance_double(Y2Network::Hwinfo, connected?: connected) } + let(:connected) { true } + + before do + allow(interface).to receive(:hardware).and_return(hwinfo) + end + + context "when the interface has hardware information" do + context "and the interface is connected" do + it "returns true" do + expect(interface.connected?).to eq(true) + end + end + + context "and the interface is not connected" do + let(:connected) { false } + + it "returns false" do + expect(interface.connected?).to eq(false) + end + end + end + + context "when the interface does not have hardware information" do + let(:hwinfo) { nil } + + it "returns false" do + expect(interface.connected?).to eq(false) + end + end + end + describe "#update_udev_rule" do let(:udev_rule) { Y2Network::UdevRule.new_mac_based_rename("eth0", "01:23:45:67:89:ab") } let(:renaming_mechanism) { :mac }