Hello community,
here is the log from the commit of package yast2-ntp-client for openSUSE:Factory checked in at 2019-07-31 14:22:43
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/yast2-ntp-client (Old)
and /work/SRC/openSUSE:Factory/.yast2-ntp-client.new.4126 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "yast2-ntp-client"
Wed Jul 31 14:22:43 2019 rev:112 rq:713621 version:4.2.2
Changes:
--------
--- /work/SRC/openSUSE:Factory/yast2-ntp-client/yast2-ntp-client.changes 2019-03-21 09:52:10.282807175 +0100
+++ /work/SRC/openSUSE:Factory/.yast2-ntp-client.new.4126/yast2-ntp-client.changes 2019-07-31 14:22:49.446453418 +0200
@@ -1,0 +2,28 @@
+Thu Jul 4 10:29:27 UTC 2019 - Imobach Gonzalez Sosa
+
+- Fix 'ntp-client' behaviour when running in firstboot
+ (bsc#1140199).
+- 4.2.2
+
+-------------------------------------------------------------------
+Thu Jul 4 10:29:27 UTC 2019 - knut.anderssen@suse.com
+
+- Added cwm/popup dependency (bsc#893065, bsc#1039985)
+
+-------------------------------------------------------------------
+Thu Jun 13 16:09:13 CEST 2019 - schubi@suse.de
+
+- Enable/disable chronyd service: Enable/disable chrony-wait
+ service too (bsc#1137196).
+
+- 4.2.1
+
+-------------------------------------------------------------------
+Fri May 31 12:35:08 UTC 2019 - Stasiek Michalski
+
+- Add metainfo (fate#319035)
+- Revamp spec
+- Replace GenericName with Comment
+- 4.2.0
+
+-------------------------------------------------------------------
Old:
----
yast2-ntp-client-4.1.8.tar.bz2
New:
----
yast2-ntp-client-4.2.2.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ yast2-ntp-client.spec ++++++
--- /var/tmp/diff_new_pack.0qcKMo/_old 2019-07-31 14:22:49.986453110 +0200
+++ /var/tmp/diff_new_pack.0qcKMo/_new 2019-07-31 14:22:49.986453110 +0200
@@ -17,50 +17,56 @@
Name: yast2-ntp-client
-Version: 4.1.8
+Version: 4.2.2
Release: 0
Summary: YaST2 - NTP Client Configuration
License: GPL-2.0-or-later
Group: System/YaST
-BuildRoot: %{_tmppath}/%{name}-%{version}-build
+Url: https://github.com/yast/yast-ntp-client
+
Source0: %{name}-%{version}.tar.bz2
+
BuildRequires: augeas-lenses
BuildRequires: autoyast2-installation
BuildRequires: perl-XML-Writer
BuildRequires: update-desktop-files
-BuildRequires: yast2 >= 3.2.21
+# cwm/popup
+BuildRequires: yast2 >= 4.1.15
BuildRequires: yast2-country-data
-BuildRequires: yast2-devtools >= 3.1.10
+BuildRequires: yast2-devtools >= 4.2.2
BuildRequires: rubygem(%rb_default_ruby_abi:cfa) >= 0.6.0
BuildRequires: rubygem(%rb_default_ruby_abi:rspec)
BuildRequires: rubygem(%rb_default_ruby_abi:yast-rake)
# proper acting TargetFile when scr is switched
Requires: augeas-lenses
-Requires: yast2 >= 3.2.21
+# cwm/popup
+Requires: yast2 >= 4.1.15
Requires: yast2-country-data
# needed for network/config agent
# Yast::Lan.dhcp_ntp_servers
Requires: yast2-network >= 4.1.17
Requires: yast2-ruby-bindings >= 1.0.0
Requires: rubygem(%rb_default_ruby_abi:cfa) >= 0.6.0
-BuildArch: noarch
Obsoletes: yast2-ntp-client-devel-doc
+BuildArch: noarch
+
%description
This package contains the YaST2 component for NTP client configuration.
%prep
-%setup -n %{name}-%{version}
+%setup -q
%check
-rake test:unit
+%yast_check
%build
%install
-rake install DESTDIR="%{buildroot}"
+%yast_install
+%yast_metainfo
%post
# upgrade old name and convert it to chrony (bsc#1079122)
@@ -70,21 +76,17 @@
fi
%files
-%defattr(-,root,root)
-%dir %{yast_yncludedir}/ntp-client
-%{yast_clientdir}/*
-%{yast_dir}/lib
-%{yast_yncludedir}/ntp-client/*
-%{yast_moduledir}/*.rb
-%{yast_desktopdir}/ntp-client.desktop
-%{yast_ydatadir}/ntp_servers.yml
-%{yast_schemadir}/autoyast/rnc/ntpclient.rnc
-%{yast_dir}/lib
-%ghost /etc/cron.d/suse-ntp_synchronize
+%{yast_clientdir}
+%{yast_libdir}
+%{yast_yncludedir}
+%{yast_moduledir}
+%{yast_desktopdir}
+%{yast_metainfodir}
+%{yast_ydatadir}
+%{yast_schemadir}
+%ghost %{_sysconfdir}/cron.d/suse-ntp_synchronize
%{yast_icondir}
-%dir %{yast_docdir}
%license COPYING
-%doc %{yast_docdir}/README.md
-%doc %{yast_docdir}/CONTRIBUTING.md
+%doc %{yast_docdir}
%changelog
++++++ yast2-ntp-client-4.1.8.tar.bz2 -> yast2-ntp-client-4.2.2.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-ntp-client-4.1.8/Dockerfile new/yast2-ntp-client-4.2.2/Dockerfile
--- old/yast2-ntp-client-4.1.8/Dockerfile 2019-03-20 10:42:42.000000000 +0100
+++ new/yast2-ntp-client-4.2.2/Dockerfile 2019-07-05 16:08:44.000000000 +0200
@@ -1,3 +1,3 @@
-FROM yastdevel/ruby
+FROM registry.opensuse.org/yast/head/containers/yast-ruby:latest
COPY . /usr/src/app
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-ntp-client-4.1.8/package/yast2-ntp-client.changes new/yast2-ntp-client-4.2.2/package/yast2-ntp-client.changes
--- old/yast2-ntp-client-4.1.8/package/yast2-ntp-client.changes 2019-03-20 10:42:42.000000000 +0100
+++ new/yast2-ntp-client-4.2.2/package/yast2-ntp-client.changes 2019-07-05 16:08:44.000000000 +0200
@@ -1,4 +1,32 @@
-------------------------------------------------------------------
+Thu Jul 4 10:29:27 UTC 2019 - Imobach Gonzalez Sosa
+
+- Fix 'ntp-client' behaviour when running in firstboot
+ (bsc#1140199).
+- 4.2.2
+
+-------------------------------------------------------------------
+Thu Jul 4 10:29:27 UTC 2019 - knut.anderssen@suse.com
+
+- Added cwm/popup dependency (bsc#893065, bsc#1039985)
+
+-------------------------------------------------------------------
+Thu Jun 13 16:09:13 CEST 2019 - schubi@suse.de
+
+- Enable/disable chronyd service: Enable/disable chrony-wait
+ service too (bsc#1137196).
+
+- 4.2.1
+
+-------------------------------------------------------------------
+Fri May 31 12:35:08 UTC 2019 - Stasiek Michalski
+
+- Add metainfo (fate#319035)
+- Revamp spec
+- Replace GenericName with Comment
+- 4.2.0
+
+-------------------------------------------------------------------
Tue Mar 19 16:33:52 UTC 2019 - ancor@suse.com
- Activate translations for the SelectFrom widget (bsc#1126523,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-ntp-client-4.1.8/package/yast2-ntp-client.spec new/yast2-ntp-client-4.2.2/package/yast2-ntp-client.spec
--- old/yast2-ntp-client-4.1.8/package/yast2-ntp-client.spec 2019-03-20 10:42:42.000000000 +0100
+++ new/yast2-ntp-client-4.2.2/package/yast2-ntp-client.spec 2019-07-05 16:08:44.000000000 +0200
@@ -12,55 +12,61 @@
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
-# Please submit bugfixes or comments via http://bugs.opensuse.org/
+# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
Name: yast2-ntp-client
-Version: 4.1.8
+Version: 4.2.2
Release: 0
Summary: YaST2 - NTP Client Configuration
License: GPL-2.0-or-later
Group: System/YaST
-BuildRoot: %{_tmppath}/%{name}-%{version}-build
+Url: https://github.com/yast/yast-ntp-client
+
Source0: %{name}-%{version}.tar.bz2
+
BuildRequires: augeas-lenses
BuildRequires: autoyast2-installation
BuildRequires: perl-XML-Writer
BuildRequires: update-desktop-files
-BuildRequires: yast2 >= 3.2.21
+# cwm/popup
+BuildRequires: yast2 >= 4.1.15
BuildRequires: yast2-country-data
-BuildRequires: yast2-devtools >= 3.1.10
+BuildRequires: yast2-devtools >= 4.2.2
BuildRequires: rubygem(%rb_default_ruby_abi:cfa) >= 0.6.0
BuildRequires: rubygem(%rb_default_ruby_abi:rspec)
BuildRequires: rubygem(%rb_default_ruby_abi:yast-rake)
# proper acting TargetFile when scr is switched
Requires: augeas-lenses
-Requires: yast2 >= 3.2.21
+# cwm/popup
+Requires: yast2 >= 4.1.15
Requires: yast2-country-data
# needed for network/config agent
# Yast::Lan.dhcp_ntp_servers
Requires: yast2-network >= 4.1.17
Requires: yast2-ruby-bindings >= 1.0.0
Requires: rubygem(%rb_default_ruby_abi:cfa) >= 0.6.0
-BuildArch: noarch
Obsoletes: yast2-ntp-client-devel-doc
+BuildArch: noarch
+
%description
This package contains the YaST2 component for NTP client configuration.
%prep
-%setup -n %{name}-%{version}
+%setup -q
%check
-rake test:unit
+%yast_check
%build
%install
-rake install DESTDIR="%{buildroot}"
+%yast_install
+%yast_metainfo
%post
# upgrade old name and convert it to chrony (bsc#1079122)
@@ -70,21 +76,17 @@
fi
%files
-%defattr(-,root,root)
-%dir %{yast_yncludedir}/ntp-client
-%{yast_clientdir}/*
-%{yast_dir}/lib
-%{yast_yncludedir}/ntp-client/*
-%{yast_moduledir}/*.rb
-%{yast_desktopdir}/ntp-client.desktop
-%{yast_ydatadir}/ntp_servers.yml
-%{yast_schemadir}/autoyast/rnc/ntpclient.rnc
-%{yast_dir}/lib
-%ghost /etc/cron.d/suse-ntp_synchronize
+%{yast_clientdir}
+%{yast_libdir}
+%{yast_yncludedir}
+%{yast_moduledir}
+%{yast_desktopdir}
+%{yast_metainfodir}
+%{yast_ydatadir}
+%{yast_schemadir}
+%ghost %{_sysconfdir}/cron.d/suse-ntp_synchronize
%{yast_icondir}
-%dir %{yast_docdir}
%license COPYING
-%doc %{yast_docdir}/README.md
-%doc %{yast_docdir}/CONTRIBUTING.md
+%doc %{yast_docdir}
%changelog
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-ntp-client-4.1.8/src/clients/ntp-client.rb new/yast2-ntp-client-4.2.2/src/clients/ntp-client.rb
--- old/yast2-ntp-client-4.1.8/src/clients/ntp-client.rb 2019-03-20 10:42:42.000000000 +0100
+++ new/yast2-ntp-client-4.2.2/src/clients/ntp-client.rb 2019-07-05 16:08:44.000000000 +0200
@@ -8,6 +8,9 @@
# $Id$
#
# Main file for ntp-client configuration. Uses all other files.
+
+Yast.import "Stage"
+
module Yast
class NtpClientClient < Client
def main
@@ -43,9 +46,11 @@
end
# CommandLine handler for running GUI
- # @return [Boolean] true if settings were saved
+ # @return [Boolean,Symbol] true if settings were saved; :next, :abort or :back
+ # when running in 'firstboot'
def GuiHandler
ret = NtpClientSequence()
+ return ret if Yast::Stage.firstboot
return false if ret == :abort || ret == :back || ret.nil?
true
end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-ntp-client-4.1.8/src/desktop/ntp-client.desktop new/yast2-ntp-client-4.2.2/src/desktop/ntp-client.desktop
--- old/yast2-ntp-client-4.1.8/src/desktop/ntp-client.desktop 2019-03-20 10:42:42.000000000 +0100
+++ new/yast2-ntp-client-4.2.2/src/desktop/ntp-client.desktop 1970-01-01 01:00:00.000000000 +0100
@@ -1,25 +0,0 @@
-[Desktop Entry]
-Type=Application
-Categories=Settings;System;Qt;X-SuSE-YaST;X-SuSE-YaST-Net_advanced;
-
-X-KDE-ModuleType=Library
-X-KDE-HasReadOnlyMode=true
-X-SuSE-YaST-Call=ntp-client
-
-X-SuSE-YaST-Group=Net_advanced
-X-SuSE-YaST-Argument=
-X-SuSE-YaST-RootOnly=true
-X-SuSE-YaST-AutoInst=all
-X-SuSE-YaST-Geometry=
-X-SuSE-YaST-SortKey=
-X-SuSE-YaST-AutoInstResource=ntp-client
-X-SuSE-YaST-AutoInstClonable=true
-X-SuSE-YaST-AutoInstSchema=ntpclient.rnc
-X-SuSE-YaST-Keywords=time,sync,synchronization,NTP
-
-Icon=yast-ntp-client
-Exec=xdg-su -c "/sbin/yast2 ntp-client"
-
-Name=NTP Configuration
-GenericName=Configure an NTP client or server
-StartupNotify=true
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-ntp-client-4.1.8/src/desktop/org.opensuse.yast.NTPClient.desktop new/yast2-ntp-client-4.2.2/src/desktop/org.opensuse.yast.NTPClient.desktop
--- old/yast2-ntp-client-4.1.8/src/desktop/org.opensuse.yast.NTPClient.desktop 1970-01-01 01:00:00.000000000 +0100
+++ new/yast2-ntp-client-4.2.2/src/desktop/org.opensuse.yast.NTPClient.desktop 2019-07-05 16:08:44.000000000 +0200
@@ -0,0 +1,26 @@
+[Desktop Entry]
+Type=Application
+Categories=Settings;System;Qt;X-SuSE-YaST;X-SuSE-YaST-Net_advanced;
+
+X-KDE-ModuleType=Library
+X-KDE-HasReadOnlyMode=true
+X-SuSE-YaST-Call=ntp-client
+
+X-SuSE-YaST-Group=Net_advanced
+X-SuSE-YaST-Argument=
+X-SuSE-YaST-RootOnly=true
+X-SuSE-YaST-AutoInst=all
+X-SuSE-YaST-Geometry=
+X-SuSE-YaST-SortKey=
+X-SuSE-YaST-AutoInstResource=ntp-client
+X-SuSE-YaST-AutoInstClonable=true
+X-SuSE-YaST-AutoInstSchema=ntpclient.rnc
+X-SuSE-YaST-Keywords=time,sync,synchronization,NTP
+
+Icon=yast-ntp-client
+Exec=xdg-su -c "/sbin/yast2 ntp-client"
+
+Name=YaST NTP Configuration
+GenericName=NTP Configuration
+Comment=Configure an NTP client or server
+StartupNotify=true
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-ntp-client-4.1.8/src/include/ntp-client/wizards.rb new/yast2-ntp-client-4.2.2/src/include/ntp-client/wizards.rb
--- old/yast2-ntp-client-4.1.8/src/include/ntp-client/wizards.rb 2019-03-20 10:42:42.000000000 +0100
+++ new/yast2-ntp-client-4.2.2/src/include/ntp-client/wizards.rb 2019-07-05 16:08:44.000000000 +0200
@@ -40,7 +40,7 @@
}
Wizard.CreateDialog
- Wizard.SetDesktopTitleAndIcon("ntp-client")
+ Wizard.SetDesktopTitleAndIcon("org.opensuse.yast.NTPClient")
ret = Sequencer.Run(aliases, sequence)
UI.CloseDialog
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-ntp-client-4.1.8/src/lib/y2ntp_client/dialog/main.rb new/yast2-ntp-client-4.2.2/src/lib/y2ntp_client/dialog/main.rb
--- old/yast2-ntp-client-4.1.8/src/lib/y2ntp_client/dialog/main.rb 2019-03-20 10:42:42.000000000 +0100
+++ new/yast2-ntp-client-4.2.2/src/lib/y2ntp_client/dialog/main.rb 2019-07-05 16:08:44.000000000 +0200
@@ -5,7 +5,7 @@
Yast.import "Label"
Yast.import "NtpClient"
-Yast.import "Stage"
+Yast.import "Mode"
module Y2NtpClient
module Dialog
@@ -55,7 +55,8 @@
end
def abort_button
- Yast::Label.CancelButton
+ return Yast::Label.CancelButton unless installation?
+ nil
end
def hardware_clock_widgets
@@ -70,13 +71,23 @@
end
def back_button
- # no back button
- ""
+ return "" unless installation?
+ nil
end
def next_button
- # FIXME: it probably cannot run in initial stage, so not needed
- Yast::Stage.initial ? Yast::Label.AcceptButton : Yast::Label.OKButton
+ return Yast::Label.OKButton unless installation?
+ nil
+ end
+
+ # Determines whether running in installation mode
+ #
+ # We do not use Stage.initial because of firstboot, which runs in 'installation' mode
+ # but in 'firstboot' stage.
+ #
+ # @return [Boolean] Boolean if running in installation or update mode
+ def installation?
+ Yast::Mode.installation || Yast::Mode.update
end
end
end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-ntp-client-4.1.8/src/modules/NtpClient.rb new/yast2-ntp-client-4.2.2/src/modules/NtpClient.rb
--- old/yast2-ntp-client-4.1.8/src/modules/NtpClient.rb 2019-03-20 10:42:42.000000000 +0100
+++ new/yast2-ntp-client-4.2.2/src/modules/NtpClient.rb 2019-07-05 16:08:44.000000000 +0200
@@ -92,9 +92,14 @@
# The interval of synchronization in minutes.
@sync_interval = DEFAULT_SYNC_INTERVAL
- # Service name of the NTP daemon
+ # Service names of the NTP daemon
@service_name = "chronyd"
+ # "chrony-wait" service has also to be handled in order to ensure that
+ # "chronyd" is working correctly and do not depend on the network status.
+ # bsc#1137196, bsc#1129730
+ @wait_service_name = "chrony-wait"
+
# Netconfig policy: for merging and prioritizing static and DHCP config.
# https://github.com/openSUSE/sysconfig/blob/master/doc/README.netconfig
# https://github.com/openSUSE/sysconfig/blob/master/config/sysconfig.config-ne...
@@ -795,24 +800,37 @@
success
end
- # Enable or disable ntp service depending on @run_service value
+ # Enable or disable chrony services depending on @run_service value
+ # "chrony-wait" service has also to be handled in order to ensure that
+ # "chronyd" is working correctly and do not depend on the network status.
#
- # * When disabling, it also stops the service.
- # * When enabling, it tries to restart the service unless it's in write
+ # * When disabling, it also stops the services.
+ # * When enabling, it tries to restart the services unless it's in write
# only mode.
def check_service
- adjusted = @run_service ? Service.Enable(@service_name) : Service.Disable(@service_name)
-
- # error report
- Report.Error(Message.CannotAdjustService("NTP")) unless adjusted
-
if @run_service
- unless @write_only
- # error report
- Report.Error(_("Cannot restart the NTP daemon.")) unless Service.Restart(@service_name)
+ # Enable and run services
+ if !Service.Enable(@service_name)
+ Report.Error(Message.CannotAdjustService(@service_name))
+ elsif !Service.Enable(@wait_service_name)
+ Report.Error(Message.CannotAdjustService(@wait_service_name))
+ end
+ if !@write_only
+ if !Service.Restart(@service_name)
+ Report.Error(_("Cannot restart \"%s\" service.") % @service_name)
+ elsif !Service.Restart(@wait_service_name)
+ Report.Error(_("Cannot restart \"%s\" service.") % @wait_service_name)
+ end
end
else
+ # Disable and stop services
+ if !Service.Disable(@service_name)
+ Report.Error(Message.CannotAdjustService(@service_name))
+ elsif !Service.Disable(@wait_service_name)
+ Report.Error(Message.CannotAdjustService(@wait_service_name))
+ end
Service.Stop(@service_name)
+ Service.Stop(@wait_service_name)
end
end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-ntp-client-4.1.8/test/ntp_client_test.rb new/yast2-ntp-client-4.2.2/test/ntp_client_test.rb
--- old/yast2-ntp-client-4.1.8/test/ntp_client_test.rb 2019-03-20 10:42:42.000000000 +0100
+++ new/yast2-ntp-client-4.2.2/test/ntp_client_test.rb 2019-07-05 16:08:44.000000000 +0200
@@ -283,10 +283,37 @@
subject.Write
end
- it "checks ntp service" do
- expect(subject).to receive(:check_service)
+ context "services will be started" do
+ before do
+ subject.run_service = true
+ subject.write_only = false
+ end
- subject.Write
+ it "enables and restarts services" do
+ allow(subject).to receive(:check_service).and_call_original
+ expect(Yast::Service).to receive(:Enable).with("chronyd").and_return(true)
+ expect(Yast::Service).to receive(:Enable).with("chrony-wait").and_return(true)
+ expect(Yast::Service).to receive(:Restart).with("chronyd").and_return(true)
+ expect(Yast::Service).to receive(:Restart).with("chrony-wait").and_return(true)
+
+ subject.Write
+ end
+ end
+
+ context "services will be stopped" do
+ before do
+ subject.run_service = false
+ end
+
+ it "disables and stops services" do
+ allow(subject).to receive(:check_service).and_call_original
+ expect(Yast::Service).to receive(:Disable).with("chronyd").and_return(true)
+ expect(Yast::Service).to receive(:Disable).with("chrony-wait").and_return(true)
+ expect(Yast::Service).to receive(:Stop).with("chronyd").and_return(true)
+ expect(Yast::Service).to receive(:Stop).with("chrony-wait").and_return(true)
+
+ subject.Write
+ end
end
it "updates cron settings" do