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 2023-01-26 13:57:09
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/yast2-network (Old)
 and      /work/SRC/openSUSE:Factory/.yast2-network.new.32243 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "yast2-network"

Thu Jan 26 13:57:09 2023 rev:493 rq:1060995 version:4.5.15

Changes:
--------
--- /work/SRC/openSUSE:Factory/yast2-network/yast2-network.changes      
2023-01-24 20:37:31.077993303 +0100
+++ /work/SRC/openSUSE:Factory/.yast2-network.new.32243/yast2-network.changes   
2023-01-26 14:12:20.244871011 +0100
@@ -1,0 +2,7 @@
+Wed Jan 25 13:52:26 UTC 2023 - Knut Alejandro Anderssen González 
<kanders...@suse.com>
+
+- During installation, do not configure DHCP if there is some
+  active interface configured by firmware (jsc#PED-967).
+- 4.5.15
+
+-------------------------------------------------------------------

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

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

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

Other differences:
------------------
++++++ yast2-network.spec ++++++
--- /var/tmp/diff_new_pack.HotFyM/_old  2023-01-26 14:12:20.848874260 +0100
+++ /var/tmp/diff_new_pack.HotFyM/_new  2023-01-26 14:12:20.852874282 +0100
@@ -17,7 +17,7 @@
 
 
 Name:           yast2-network
-Version:        4.5.14
+Version:        4.5.15
 Release:        0
 Summary:        YaST2 - Network Configuration
 License:        GPL-2.0-only

++++++ yast2-network-4.5.14.tar.bz2 -> yast2-network-4.5.15.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-network-4.5.14/package/yast2-network.changes 
new/yast2-network-4.5.15/package/yast2-network.changes
--- old/yast2-network-4.5.14/package/yast2-network.changes      2023-01-24 
16:12:51.000000000 +0100
+++ new/yast2-network-4.5.15/package/yast2-network.changes      2023-01-25 
17:47:33.000000000 +0100
@@ -1,4 +1,11 @@
 -------------------------------------------------------------------
+Wed Jan 25 13:52:26 UTC 2023 - Knut Alejandro Anderssen González 
<kanders...@suse.com>
+
+- During installation, do not configure DHCP if there is some
+  active interface configured by firmware (jsc#PED-967).
+- 4.5.15
+
+-------------------------------------------------------------------
 Tue Jan 24 09:37:43 UTC 2023 - Knut Anderssen <kanders...@suse.com>
 
 - Fix the return of packages needed by the selected backend when
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-network-4.5.14/package/yast2-network.spec 
new/yast2-network-4.5.15/package/yast2-network.spec
--- old/yast2-network-4.5.14/package/yast2-network.spec 2023-01-24 
16:12:51.000000000 +0100
+++ new/yast2-network-4.5.15/package/yast2-network.spec 2023-01-25 
17:47:33.000000000 +0100
@@ -17,7 +17,7 @@
 
 
 Name:           yast2-network
-Version:        4.5.14
+Version:        4.5.15
 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.5.14/src/lib/network/network_autoconfiguration.rb 
new/yast2-network-4.5.15/src/lib/network/network_autoconfiguration.rb
--- old/yast2-network-4.5.14/src/lib/network/network_autoconfiguration.rb       
2023-01-24 16:12:51.000000000 +0100
+++ new/yast2-network-4.5.15/src/lib/network/network_autoconfiguration.rb       
2023-01-25 17:47:33.000000000 +0100
@@ -51,11 +51,11 @@
       config.interfaces.any? do |interface|
         next false unless active_config?(interface.name)
 
-        config.connections.by_name(interface.name) || 
ibft_interfaces.include?(interface.name)
+        config.connections.by_name(interface.name) || 
firmware_interfaces.include?(interface.name)
       end
     end
 
-    # Return true if the given interface is connected but it is not configured 
by iBFT or via an
+    # Return true if the given interface is connected but it is not configured 
by firmware or via an
     # ifcfg file.
     #
     # Note: (it speeds up the initialization phase of installer - bnc#872319)
@@ -63,7 +63,7 @@
     # @return [Boolean]
     def dhcp_candidate?(interface)
       return false if config.connections.by_name(interface.name)
-      return false if ibft_interfaces.include?(interface.name)
+      return false if firmware_interfaces.include?(interface.name)
 
       phy_connected?(interface.name)
     end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-network-4.5.14/src/lib/network/wicked.rb 
new/yast2-network-4.5.15/src/lib/network/wicked.rb
--- old/yast2-network-4.5.14/src/lib/network/wicked.rb  2023-01-24 
16:12:51.000000000 +0100
+++ new/yast2-network-4.5.15/src/lib/network/wicked.rb  2023-01-25 
17:47:33.000000000 +0100
@@ -26,6 +26,7 @@
     BASH_PATH = Path.new(".target.bash")
     BASH_OUTPUT_PATH = Path.new(".target.bash_output")
     IBFT_CMD = "/etc/wicked/extensions/ibft".freeze
+    WICKED_PATH = "/usr/sbin/wicked".freeze
 
     # Reloads configuration for each device named in devs
     #
@@ -83,7 +84,16 @@
     #
     # @return [Array <String>] array of interface names
     def ibft_interfaces
-      Yast::Execute.stdout.locally!(IBFT_CMD, "-l").gsub("\n", " ").split(" 
").uniq
+      Yast::Execute.stdout.locally!(IBFT_CMD, "-l").split(/\s+/).uniq
+    end
+
+    # Returns an array of interface names which are configured via firmware
+    #
+    # @return [Array <String>] array of interface names
+    def firmware_interfaces
+      output = Yast::Execute.stdout.locally!(WICKED_PATH, "firmware", 
"interfaces")
+      interfaces = output.gsub(/^\w+\s+/, "").split(/\s+/)
+      (ibft_interfaces + interfaces).uniq
     end
   end
 end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-network-4.5.14/test/network_autoconfiguration_test.rb 
new/yast2-network-4.5.15/test/network_autoconfiguration_test.rb
--- old/yast2-network-4.5.14/test/network_autoconfiguration_test.rb     
2023-01-24 16:12:51.000000000 +0100
+++ new/yast2-network-4.5.15/test/network_autoconfiguration_test.rb     
2023-01-25 17:47:33.000000000 +0100
@@ -86,14 +86,14 @@
 
   describe "#any_iface_active?" do
     let(:active) { false }
-    let(:ibft_interfaces) { [] }
+    let(:firmware_interfaces) { [] }
     let(:eth1) { Y2Network::Interface.new("eth1") }
     let(:interfaces) { Y2Network::InterfacesCollection.new([eth1, eth0]) }
 
     before do
       allow(instance).to 
receive(:active_config?).with("eth1").and_return(false)
       allow(instance).to 
receive(:active_config?).with("eth0").and_return(active)
-      allow(instance).to receive(:ibft_interfaces).and_return(ibft_interfaces)
+      allow(instance).to 
receive(:firmware_interfaces).and_return(firmware_interfaces)
     end
 
     it "returns false if there is no interface UP" do
@@ -103,8 +103,8 @@
     context "when at least one interface is UP" do
       let(:active) { true }
 
-      context "and the interface is configured through iBFT" do
-        let(:ibft_interfaces) { [eth0.name] }
+      context "and the interface is configured through firmware" do
+        let(:firmware_interfaces) { [eth0.name] }
 
         it "returns true" do
           expect(instance.any_iface_active?).to be true
@@ -128,12 +128,12 @@
   end
 
   describe "#dhcp_candidate?" do
-    let(:ibft_interfaces) { [] }
+    let(:firmware_interfaces) { [] }
     let(:connected) { true }
     let(:connections) { Y2Network::ConnectionConfigsCollection.new([]) }
 
     before do
-      allow(instance).to receive(:ibft_interfaces).and_return(ibft_interfaces)
+      allow(instance).to 
receive(:firmware_interfaces).and_return(firmware_interfaces)
       allow(instance).to 
receive(:phy_connected?).with(eth0.name).and_return(connected)
     end
 
@@ -145,8 +145,8 @@
       end
     end
 
-    context "when the given interface is configured by iBFT" do
-      let(:ibft_interfaces) { [eth0.name] }
+    context "when the given interface is configured by firmware" do
+      let(:firmware_interfaces) { [eth0.name] }
 
       it "returns false" do
         expect(instance.dhcp_candidate?(eth0)).to eql(false)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-network-4.5.14/test/wicked_test.rb 
new/yast2-network-4.5.15/test/wicked_test.rb
--- old/yast2-network-4.5.14/test/wicked_test.rb        2023-01-24 
16:12:51.000000000 +0100
+++ new/yast2-network-4.5.15/test/wicked_test.rb        2023-01-25 
17:47:33.000000000 +0100
@@ -77,4 +77,29 @@
       expect(subject.ibft_interfaces).to eql(["eth0.42", "eth0", "eth1"])
     end
   end
+
+  describe "#firmware_interfaces" do
+    let(:stdout) { instance_double("Yast::Execute") }
+    let(:output) { "ibft    eth1 eth1.10\nibft\teth2 ibft0\nnbft    
nbft0\nredfish usb0 usb0.42" }
+    let(:ibft_interfaces) { ["eth1", "eth1.10"] }
+
+    before do
+      allow(Yast::Execute).to receive(:stdout).and_return(stdout)
+      allow(stdout).to receive(:locally!).and_return(output)
+      allow(subject).to receive(:ibft_interfaces).and_return(ibft_interfaces)
+    end
+
+    it "returns an array of the interfaces configured by firmware" do
+      expect(subject.firmware_interfaces)
+        .to eql(["eth1", "eth1.10", "eth2", "ibft0", "nbft0", "usb0", 
"usb0.42"])
+    end
+
+    context "when `wicked firmware interfaces` is not present" do
+      let(:output) { "" }
+
+      it "returns the interfaces returned by the ibft extension is available" 
do
+        expect(subject.firmware_interfaces).to eql(ibft_interfaces)
+      end
+    end
+  end
 end

Reply via email to