Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package yast2-fcoe-client for
openSUSE:Factory checked in at 2022-08-23 14:25:52
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/yast2-fcoe-client (Old)
and /work/SRC/openSUSE:Factory/.yast2-fcoe-client.new.2083 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "yast2-fcoe-client"
Tue Aug 23 14:25:52 2022 rev:58 rq:992234 version:4.5.1
Changes:
--------
--- /work/SRC/openSUSE:Factory/yast2-fcoe-client/yast2-fcoe-client.changes
2022-04-14 17:25:29.855265642 +0200
+++
/work/SRC/openSUSE:Factory/.yast2-fcoe-client.new.2083/yast2-fcoe-client.changes
2022-08-23 14:26:28.547203549 +0200
@@ -1,0 +2,8 @@
+Thu Jul 21 10:07:04 UTC 2022 - Knut Anderssen <[email protected]>
+
+- Use yast2-network to write the sysconfig files in order to be
+ aware of the new connections added during the installation
+ (bsc#1199554).
+- 4.5.1
+
+-------------------------------------------------------------------
Old:
----
yast2-fcoe-client-4.5.0.tar.bz2
New:
----
yast2-fcoe-client-4.5.1.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ yast2-fcoe-client.spec ++++++
--- /var/tmp/diff_new_pack.iXFu1p/_old 2022-08-23 14:26:28.935204403 +0200
+++ /var/tmp/diff_new_pack.iXFu1p/_new 2022-08-23 14:26:28.939204411 +0200
@@ -17,7 +17,7 @@
Name: yast2-fcoe-client
-Version: 4.5.0
+Version: 4.5.1
Release: 0
Summary: YaST2 - Configuration of Fibre Channel over Ethernet
License: GPL-2.0-only
@@ -28,10 +28,12 @@
BuildRequires: update-desktop-files
BuildRequires: yast2
BuildRequires: yast2-devtools >= 4.4.0
+BuildRequires: yast2-network >= 4.5.5
BuildRequires: rubygem(%{rb_default_ruby_abi}:rspec)
-# Yast2::Systemd::Service
Requires: fcoe-utils
+# Yast2::Systemd::Service
Requires: yast2 >= 4.1.3
+Requires: yast2-network >= 4.5.5
Requires: yast2-ruby-bindings >= 1.0.0
Supplements: autoyast(fcoe-client)
BuildArch: noarch
++++++ yast2-fcoe-client-4.5.0.tar.bz2 -> yast2-fcoe-client-4.5.1.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/yast2-fcoe-client-4.5.0/package/yast2-fcoe-client.changes
new/yast2-fcoe-client-4.5.1/package/yast2-fcoe-client.changes
--- old/yast2-fcoe-client-4.5.0/package/yast2-fcoe-client.changes
2022-04-12 13:34:05.000000000 +0200
+++ new/yast2-fcoe-client-4.5.1/package/yast2-fcoe-client.changes
2022-08-02 13:05:49.000000000 +0200
@@ -1,4 +1,12 @@
-------------------------------------------------------------------
+Thu Jul 21 10:07:04 UTC 2022 - Knut Anderssen <[email protected]>
+
+- Use yast2-network to write the sysconfig files in order to be
+ aware of the new connections added during the installation
+ (bsc#1199554).
+- 4.5.1
+
+-------------------------------------------------------------------
Wed Apr 06 13:24:58 UTC 2022 - Ladislav Slez??k <[email protected]>
- Bump version to 4.5.0 (bsc#1198109)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/yast2-fcoe-client-4.5.0/package/yast2-fcoe-client.spec
new/yast2-fcoe-client-4.5.1/package/yast2-fcoe-client.spec
--- old/yast2-fcoe-client-4.5.0/package/yast2-fcoe-client.spec 2022-04-12
13:34:05.000000000 +0200
+++ new/yast2-fcoe-client-4.5.1/package/yast2-fcoe-client.spec 2022-08-02
13:05:49.000000000 +0200
@@ -17,7 +17,7 @@
Name: yast2-fcoe-client
-Version: 4.5.0
+Version: 4.5.1
Release: 0
Summary: YaST2 - Configuration of Fibre Channel over Ethernet
License: GPL-2.0-only
@@ -28,10 +28,12 @@
BuildRequires: update-desktop-files
BuildRequires: yast2
BuildRequires: yast2-devtools >= 4.4.0
+BuildRequires: yast2-network >= 4.5.5
BuildRequires: rubygem(%{rb_default_ruby_abi}:rspec)
-# Yast2::Systemd::Service
Requires: fcoe-utils
+# Yast2::Systemd::Service
Requires: yast2 >= 4.1.3
+Requires: yast2-network >= 4.5.5
Requires: yast2-ruby-bindings >= 1.0.0
Supplements: autoyast(fcoe-client)
BuildArch: noarch
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/yast2-fcoe-client-4.5.0/src/modules/FcoeClient.rb
new/yast2-fcoe-client-4.5.1/src/modules/FcoeClient.rb
--- old/yast2-fcoe-client-4.5.0/src/modules/FcoeClient.rb 2022-04-12
13:34:05.000000000 +0200
+++ new/yast2-fcoe-client-4.5.1/src/modules/FcoeClient.rb 2022-08-02
13:05:49.000000000 +0200
@@ -32,6 +32,7 @@
require "yast"
require "yast2/systemd/socket"
+require "y2network/fcoe_conn_generator"
module Yast
class FcoeClientClass < Module
@@ -77,6 +78,7 @@
Yast.import "NetworkService"
Yast.import "String"
Yast.import "FileUtils"
+ Yast.import "Lan"
# Data
@@ -1225,50 +1227,19 @@
success
end
+ # Writes the network configuration for the FCoE Vlan interface and the
related parent device
#
- # Write ifcfg-files in /etc/sysconfig/network (for FCoE VLAN interface and
underlying interface)
- # using network.scr from yast2/library/network
- #
+ # @return [Boolean] whether it wrote the ifcfg files for netcards or not
def WriteSysconfigFiles
- netcards = GetNetworkCards()
- success = true
+ netcards = GetNetworkCards().select { |c| fcoe_vlan?(c) }
+ return true if netcards.empty?
- netcards.each do |card|
- fcoe_vlan = fcoe_vlan(card)
- # write ifcfg-<if>.<VLAN> only if VLAN was created (not for VLAN = 0
which means
- # FCoE is started on the network interface itself)
- next if fcoe_vlan.nil?
-
- dev_name = card.fetch("dev_name", "")
- vid = card.fetch("vlan_interface", "")
- if vid != "0"
- Builtins.y2milestone("Writing /etc/sysconfig/network/ifcfg-%1",
fcoe_vlan)
- vifcfg_path = path(".network.value") + fcoe_vlan
- # write /etc/sysconfig/network/ifcfg-<fcoe-vlan-interface>, e.g.
ifcfg-eth3.200
- SCR.Write(vifcfg_path + "BOOTPROTO", "static")
- SCR.Write(vifcfg_path + "STARTMODE", "nfsroot")
- SCR.Write(vifcfg_path + "ETHERDEVICE", dev_name)
- SCR.Write(vifcfg_path + "USERCONTROL", "no")
- SCR.Write(vifcfg_path + "VLAN_ID", vid)
- end
- ifcfg_file = "/etc/sysconfig/network/ifcfg-#{dev_name}"
- Builtins.y2milestone("Writing %1", ifcfg_file)
+ Yast::Lan.read_config(report: false) unless Yast::Lan.yast_config
+ conn_generator = Y2Network::FcoeConnGenerator.new(Yast::Lan.yast_config)
+ netcards.each { |card| conn_generator.update_connections_for(card) }
+ Yast::Lan.write_config(only: [:connections])
- # write /etc/sysconfig/network/ifcfg-<interface> (underlying
interface), e.g. ifcfg-eth3
- ifcfg_path = path(".network.value") + dev_name
- SCR.Write(ifcfg_path + "STARTMODE", "nfsroot")
- # don't overwrite BOOTPROTO !!!
- if !FileUtils.Exists(ifcfg_file)
- SCR.Write(ifcfg_path + "BOOTPROTO", "static")
- SCR.Write(ifcfg_path + "NAME", card.fetch("device", ""))
- end
- end
- # This is very important- it flushes the cache, and stores the
configuration on the disk
- success = SCR.Write(path(".network"), nil)
- if !success
- Builtins.y2error("Error writing /etc/sysconfig/network/ifcfg-files")
- end
- success
+ true
end
#
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/yast2-fcoe-client-4.5.0/test/fcoe_client_write_spec.rb
new/yast2-fcoe-client-4.5.1/test/fcoe_client_write_spec.rb
--- old/yast2-fcoe-client-4.5.0/test/fcoe_client_write_spec.rb 2022-04-12
13:34:05.000000000 +0200
+++ new/yast2-fcoe-client-4.5.1/test/fcoe_client_write_spec.rb 2022-08-02
13:05:49.000000000 +0200
@@ -1,6 +1,7 @@
#!/usr/bin/env rspec
require_relative "test_helper"
Yast.import "FcoeClient"
+Yast.import "Lan"
describe Yast::FcoeClientClass do
subject { Yast::FcoeClient }
@@ -16,8 +17,13 @@
end
describe "#WriteSysconfigFiles" do
+ let(:config) { stub_const("Y2Network::Config", double.as_null_object) }
+
before do
allow(subject).to receive(:GetNetworkCards).and_return(interfaces)
+ allow(Yast::Lan).to receive(:yast_config).and_return(config)
+ allow(Yast::Lan).to receive(:read_config)
+ allow(Yast::Lan).to receive(:write_config)
end
@@ -30,13 +36,8 @@
]
end
- it "smokes not" do
- expect { subject.WriteSysconfigFiles }.to_not raise_error
- end
-
- it "writes nothing into /etc/sysconfig/network" do
- expect(Yast::SCR).to_not receive(:Write)
- .with(path_matching(/^\.network\..*/), anything)
+ it "does not modify the network configuration" do
+ expect(Yast::Lan).to_not receive(:write_config)
subject.WriteSysconfigFiles
end
@@ -52,31 +53,18 @@
end
before do
- allow(Yast::SCR).to receive(:Write).and_return(true)
allow(Yast::FileUtils).to receive(:Exists).and_return(false)
end
- it "smokes not" do
- expect { subject.WriteSysconfigFiles }.to_not raise_error
- end
-
- it "writes the sysconfig configuration for the interface and its FCoE
VLAN" do
- expect(Yast::SCR).to receive(:Write)
- .with(path_matching(/^\.network\.value\.\"eth1.500-fcoe\"\.*/),
anything)
- expect(Yast::SCR).to receive(:Write)
- .with(path_matching(/^\.network\.value\.\"eth1\"\.*/), anything)
- # A final call is also needed to flush the content
- expect(Yast::SCR).to receive(:Write).with(Yast::Path.new(".network"),
nil)
+ it "calls the FCoE connection generator to add or update the device and
VLAN connections" do
+ expect_any_instance_of(Y2Network::FcoeConnGenerator)
+ .to receive(:update_connections_for).once.with(interfaces[1])
subject.WriteSysconfigFiles
end
- it "writes nothing in /etc/sysconfig/network for interfaces without FCoE
VLAN" do
- allow(Yast::SCR).to receive(:Write) do |path, value|
- # All calls to SCR.Write must contain a path starting with
".network.value.\"eth1"
- # or exactly the path ".network" (for flushing)
- expect(path.to_s).to
match("(^\.network$)|(^\.network\.value\.\"eth1(\.|\"))")
- end
+ it "writes the modified network connections configuration" do
+ expect(Yast::Lan).to receive(:write_config).with(only: [:connections])
subject.WriteSysconfigFiles
end