Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package yast2-ntp-client for
openSUSE:Factory checked in at 2022-09-27 20:13:14
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/yast2-ntp-client (Old)
and /work/SRC/openSUSE:Factory/.yast2-ntp-client.new.2275 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "yast2-ntp-client"
Tue Sep 27 20:13:14 2022 rev:130 rq:1006074 version:4.5.1
Changes:
--------
--- /work/SRC/openSUSE:Factory/yast2-ntp-client/yast2-ntp-client.changes
2022-04-14 17:24:47.791216478 +0200
+++
/work/SRC/openSUSE:Factory/.yast2-ntp-client.new.2275/yast2-ntp-client.changes
2022-09-27 20:13:16.253739708 +0200
@@ -1,0 +2,7 @@
+Wed Sep 21 13:10:17 UTC 2022 - Knut Anderssen <[email protected]>
+
+- Skip to write and update netconfig configuration when netconfig
+ executable does not exist (bsc#1198066, bsc#1202748)
+- 4.5.1
+
+-------------------------------------------------------------------
Old:
----
yast2-ntp-client-4.5.0.tar.bz2
New:
----
yast2-ntp-client-4.5.1.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ yast2-ntp-client.spec ++++++
--- /var/tmp/diff_new_pack.ybnaSp/_old 2022-09-27 20:13:17.005741366 +0200
+++ /var/tmp/diff_new_pack.ybnaSp/_new 2022-09-27 20:13:17.009741375 +0200
@@ -17,7 +17,7 @@
Name: yast2-ntp-client
-Version: 4.5.0
+Version: 4.5.1
Release: 0
Summary: YaST2 - NTP Client Configuration
License: GPL-2.0-or-later
++++++ yast2-ntp-client-4.5.0.tar.bz2 -> yast2-ntp-client-4.5.1.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/yast2-ntp-client-4.5.0/package/yast2-ntp-client.changes
new/yast2-ntp-client-4.5.1/package/yast2-ntp-client.changes
--- old/yast2-ntp-client-4.5.0/package/yast2-ntp-client.changes 2022-04-12
13:36:10.000000000 +0200
+++ new/yast2-ntp-client-4.5.1/package/yast2-ntp-client.changes 2022-09-26
11:46:28.000000000 +0200
@@ -1,4 +1,11 @@
-------------------------------------------------------------------
+Wed Sep 21 13:10:17 UTC 2022 - Knut Anderssen <[email protected]>
+
+- Skip to write and update netconfig configuration when netconfig
+ executable does not exist (bsc#1198066, bsc#1202748)
+- 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-ntp-client-4.5.0/package/yast2-ntp-client.spec
new/yast2-ntp-client-4.5.1/package/yast2-ntp-client.spec
--- old/yast2-ntp-client-4.5.0/package/yast2-ntp-client.spec 2022-04-12
13:36:10.000000000 +0200
+++ new/yast2-ntp-client-4.5.1/package/yast2-ntp-client.spec 2022-09-26
11:46:28.000000000 +0200
@@ -17,7 +17,7 @@
Name: yast2-ntp-client
-Version: 4.5.0
+Version: 4.5.1
Release: 0
Summary: YaST2 - NTP Client Configuration
License: GPL-2.0-or-later
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/yast2-ntp-client-4.5.0/src/modules/NtpClient.rb
new/yast2-ntp-client-4.5.1/src/modules/NtpClient.rb
--- old/yast2-ntp-client-4.5.0/src/modules/NtpClient.rb 2022-04-12
13:36:10.000000000 +0200
+++ new/yast2-ntp-client-4.5.1/src/modules/NtpClient.rb 2022-09-26
11:46:28.000000000 +0200
@@ -40,6 +40,9 @@
# The file name of systemd timer for the synchronization.
TIMER_PATH = "/etc/systemd/system/#{TIMER_FILE}".freeze
+ # @return [String] Netconfig executable
+ NETCONFIG_PATH = "/usr/sbin/netconfig".freeze
+
UNSUPPORTED_AUTOYAST_OPTIONS = [
"configure_dhcp",
"peers",
@@ -62,7 +65,6 @@
Yast.import "Language"
Yast.import "Message"
Yast.import "Mode"
- Yast.import "NetworkInterfaces"
Yast.import "Package"
Yast.import "Popup"
Yast.import "Progress"
@@ -159,6 +161,11 @@
Mode.normal
end
+ # return [Boolean] whether netconfig is present in the system or not
+ def netconfig?
+ FileUtils.Exists(NETCONFIG_PATH)
+ end
+
# Synchronize against specified server only one time and does not modify
# any configuration
# @param server [String] to sync against
@@ -338,7 +345,6 @@
return false if !go_next
progress_orig = Progress.set(false)
- NetworkInterfaces.Read
Progress.set(progress_orig)
read_policy!
@@ -389,7 +395,11 @@
Report.Error(Message.CannotWriteSettingsTo("/etc/chrony.conf")) if
!write_ntp_conf
- write_and_update_policy
+ if netconfig?
+ write_and_update_policy
+ else
+ log.info("There is no netconfig, skipping policy write")
+ end
# restart daemon
return false if !go_next
@@ -818,7 +828,7 @@
# Calls netconfig to update ntp
# @return [Boolean] true on success
def update_netconfig
- SCR.Execute(path(".target.bash"), "/sbin/netconfig update -m ntp") == 0
+ SCR.Execute(path(".target.bash"), "#{NETCONFIG_PATH} update -m ntp") == 0
end
# Writes sysconfig ntp policy and calls netconfig to update ntp. Report an
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/yast2-ntp-client-4.5.0/test/ntp_client_test.rb
new/yast2-ntp-client-4.5.1/test/ntp_client_test.rb
--- old/yast2-ntp-client-4.5.0/test/ntp_client_test.rb 2022-04-12
13:36:10.000000000 +0200
+++ new/yast2-ntp-client-4.5.1/test/ntp_client_test.rb 2022-09-26
11:46:28.000000000 +0200
@@ -4,7 +4,6 @@
require "cfa/memory_file"
Yast.import "NtpClient"
-Yast.import "NetworkInterfaces"
Yast.import "Package"
Yast.import "Service"
@@ -32,7 +31,6 @@
allow(subject).to receive(:go_next).and_return(true)
allow(subject).to receive(:progress?).and_return(false)
allow(Yast::Service).to receive(:Enabled).with("chronyd").and_return(true)
- allow(Yast::NetworkInterfaces).to receive(:Read)
allow(Yast::Progress)
allow(Yast::Package).to receive(:CheckAndInstallPackagesInteractive)
.with(["chrony"]).and_return(true)
@@ -137,7 +135,6 @@
allow(subject).to receive(:ReadSynchronization)
allow(subject).to receive(:read_policy!)
allow(Yast::Service).to
receive(:Enabled).with("chronyd").and_return(true)
- allow(Yast::NetworkInterfaces).to receive(:Read)
allow(Yast::Progress)
allow(Yast::Package).to receive(:CheckAndInstallPackagesInteractive)
.with(["chrony"]).and_return(true)
@@ -169,12 +166,6 @@
subject.Read
end
- it "reads network interfaces config" do
- expect(Yast::NetworkInterfaces).to receive(:Read)
-
- subject.Read
- end
-
it "reads ntp policy" do
expect(subject).to receive(:read_policy!)
@@ -231,6 +222,8 @@
end
describe "#Write" do
+ let(:netconfig) { true }
+
before do
allow(subject).to receive(:Abort).and_return(false)
allow(subject).to receive(:go_next).and_return(true)
@@ -238,6 +231,7 @@
allow(subject).to receive(:write_ntp_conf).and_return(true)
allow(subject).to receive(:write_and_update_policy).and_return(true)
allow(subject).to receive(:check_service)
+ allow(subject).to receive(:netconfig?).and_return(netconfig)
allow(Yast::Report)
end
@@ -268,10 +262,21 @@
expect(lines.lines).to include("pool tik.cesnet.cz iburst\n")
end
- it "writes ntp policy and updates ntp with netconfig" do
- expect(subject).to receive(:write_and_update_policy)
+ context "when netconfig is available" do
+ it "writes ntp policy and updates ntp with netconfig" do
+ expect(subject).to receive(:write_and_update_policy)
- subject.Write
+ subject.Write
+ end
+ end
+
+ context "when netconfig is not available" do
+ let(:netconfig) { false }
+ it "skips netconfig configuration" do
+ expect(subject).to_not receive(:write_and_update_policy)
+
+ subject.Write
+ end
end
context "services will be started" do
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/yast2-ntp-client-4.5.0/test/y2ntp_client/client/auto_test.rb
new/yast2-ntp-client-4.5.1/test/y2ntp_client/client/auto_test.rb
--- old/yast2-ntp-client-4.5.0/test/y2ntp_client/client/auto_test.rb
2022-04-12 13:36:10.000000000 +0200
+++ new/yast2-ntp-client-4.5.1/test/y2ntp_client/client/auto_test.rb
2022-09-26 11:46:28.000000000 +0200
@@ -14,7 +14,6 @@
before do
allow(Yast::Service).to receive(:Enabled).with("chronyd").and_return(true)
- allow(Yast::NetworkInterfaces).to receive(:Read)
allow(Yast::Package).to receive(:CheckAndInstallPackagesInteractive)
.with(["chrony"]).and_return(true)
Yast::NtpClient.Read