Hello community,

here is the log from the commit of package yast2-ntp-client for 
openSUSE:Factory checked in at 2016-10-20 23:06:22
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/yast2-ntp-client (Old)
 and      /work/SRC/openSUSE:Factory/.yast2-ntp-client.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "yast2-ntp-client"

Changes:
--------
--- /work/SRC/openSUSE:Factory/yast2-ntp-client/yast2-ntp-client.changes        
2016-08-18 10:19:09.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.yast2-ntp-client.new/yast2-ntp-client.changes   
2016-10-20 23:06:22.000000000 +0200
@@ -1,0 +2,7 @@
+Tue Oct 18 13:53:24 UTC 2016 - [email protected]
+
+- properly report that test failed if server without running ntp is
+  checked as ntp server (bsc#972842)
+- 3.2.0
+
+-------------------------------------------------------------------

Old:
----
  yast2-ntp-client-3.1.28.tar.bz2

New:
----
  yast2-ntp-client-3.2.0.tar.bz2

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

Other differences:
------------------
++++++ yast2-ntp-client.spec ++++++
--- /var/tmp/diff_new_pack.XCOL0f/_old  2016-10-20 23:06:23.000000000 +0200
+++ /var/tmp/diff_new_pack.XCOL0f/_new  2016-10-20 23:06:23.000000000 +0200
@@ -17,7 +17,7 @@
 
 
 Name:           yast2-ntp-client
-Version:        3.1.28
+Version:        3.2.0
 Release:        0
 Summary:        YaST2 - NTP Client Configuration
 License:        GPL-2.0+

++++++ yast2-ntp-client-3.1.28.tar.bz2 -> yast2-ntp-client-3.2.0.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-ntp-client-3.1.28/CONTRIBUTING.md 
new/yast2-ntp-client-3.2.0/CONTRIBUTING.md
--- old/yast2-ntp-client-3.1.28/CONTRIBUTING.md 2016-08-11 14:42:10.000000000 
+0200
+++ new/yast2-ntp-client-3.2.0/CONTRIBUTING.md  2016-10-19 11:25:44.000000000 
+0200
@@ -3,7 +3,7 @@
 
 YaST is an open source project and as such it welcomes all kinds of
 contributions. If you decide to contribute, please follow these guidelines to
-ensure the process is effective and pleasant both for you and YaST maintainers.
+ensure the process is effective and pleasant both for you and the YaST 
maintainers.
 
 There are two main forms of contribution: reporting bugs and performing code
 changes.
@@ -17,13 +17,11 @@
 
registration](https://secure-www.novell.com/selfreg/jsp/createSimpleAccount.jsp)
 if you don't have an account yet.)
 
-If you find a problem, please report it either using
-[Bugzilla](https://bugzilla.suse.com/) or GitHub issues. We can't guarantee
-that every bug will be fixed, but we'll try.
-
 When creating a bug report, please follow our [bug reporting
 guidelines](http://en.opensuse.org/openSUSE:Report_a_YaST_bug).
 
+We can't guarantee that every bug will be fixed, but we'll try.
+
 Code Changes
 ------------
 
@@ -44,15 +42,22 @@
      to the [Ruby style
      guide](https://github.com/SUSE/style-guides/blob/master/Ruby.md).
 
-  4. Make sure your change didn't break anything by building the RPM package
+  4. Update the package version (in `packages/*.spec`, usually by
+     `rake version:bump`) and add a new entry to the `package/*.changes` file
+     (by `osc vc package`).  
+     For bigger changes or changes which need longer discussion it is advised 
to
+     add this as a separate last commit so it can be easily updated when 
another
+     change is merged in the meantime.
+
+  5. Make sure your change didn't break anything by building the RPM package
      (`rake osc:build`). The build process includes running the full testsuite.
 
-  5. Publish the branch and create a pull request.
+  6. Publish the branch and create a pull request.
 
-  6. YaST developers will review your change and possibly point out issues.
+  7. YaST developers will review your change and possibly point out issues.
      Adapt the code under their guidance until they are all resolved.
 
-  7. Finally, the pull request will get merged or rejected.
+  8. Finally, the pull request will get merged or rejected.
 
 See also [GitHub's guide on
 contributing](https://help.github.com/articles/fork-a-repo).
@@ -60,9 +65,6 @@
 If you want to do multiple unrelated changes, use separate branches and pull
 requests.
 
-Do not change the `VERSION` and `*.changes` files as this could lead to
-conflicts.
-
 ### Commits
 
 Each commit in the pull request should do only one thing, which is clearly
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-ntp-client-3.1.28/package/yast2-ntp-client.changes 
new/yast2-ntp-client-3.2.0/package/yast2-ntp-client.changes
--- old/yast2-ntp-client-3.1.28/package/yast2-ntp-client.changes        
2016-08-11 14:42:10.000000000 +0200
+++ new/yast2-ntp-client-3.2.0/package/yast2-ntp-client.changes 2016-10-19 
11:25:44.000000000 +0200
@@ -1,4 +1,11 @@
 -------------------------------------------------------------------
+Tue Oct 18 13:53:24 UTC 2016 - [email protected]
+
+- properly report that test failed if server without running ntp is
+  checked as ntp server (bsc#972842)
+- 3.2.0
+
+-------------------------------------------------------------------
 Thu Aug 11 14:24:42 CEST 2016 - [email protected]
 
 - Error while using <type>__clock</type> in AutoYaST.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-ntp-client-3.1.28/package/yast2-ntp-client.spec 
new/yast2-ntp-client-3.2.0/package/yast2-ntp-client.spec
--- old/yast2-ntp-client-3.1.28/package/yast2-ntp-client.spec   2016-08-11 
14:42:10.000000000 +0200
+++ new/yast2-ntp-client-3.2.0/package/yast2-ntp-client.spec    2016-10-19 
11:25:44.000000000 +0200
@@ -17,7 +17,7 @@
 
 
 Name:           yast2-ntp-client
-Version:        3.1.28
+Version:        3.2.0
 Release:        0
 Summary:        YaST2 - NTP Client Configuration
 License:        GPL-2.0+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-ntp-client-3.1.28/src/modules/NtpClient.rb 
new/yast2-ntp-client-3.2.0/src/modules/NtpClient.rb
--- old/yast2-ntp-client-3.1.28/src/modules/NtpClient.rb        2016-08-11 
14:42:10.000000000 +0200
+++ new/yast2-ntp-client-3.2.0/src/modules/NtpClient.rb 2016-10-19 
11:25:44.000000000 +0200
@@ -788,13 +788,17 @@
 
       Builtins.y2milestone("sntp test response: #{output}")
 
+      return false if output["exit"] != 0
       # sntp returns always 0 if not called with option -S or -s (set system 
time)
       # so this is a workaround at least to return false in case server is not
-      # reachable. We could also take care of stdout checking if it includes
-      # "no (U|B)CST reponse", but it also implies be too dependent in the
-      # future and the ntp package should take care of it and aswer other exit
-      # code instead of 0
-      output["stderr"].include?("lookup error") ? false : output["exit"] == 0
+      # reachable.
+      return false if output["stderr"].include?("lookup error")
+      # this happens for valid address, but without ntp server. If it breaks 
in the
+      # future start complaining to sntp maintainer to not return 0 in this 
case.
+      # customer case: bsc#972842
+      return false if output["stdout"] =~ /no (U|B)CST/
+
+      true
     end
 
     # Handle UI of NTP server test answers
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-ntp-client-3.1.28/test/ntp_client_test.rb 
new/yast2-ntp-client-3.2.0/test/ntp_client_test.rb
--- old/yast2-ntp-client-3.1.28/test/ntp_client_test.rb 2016-08-11 
14:42:10.000000000 +0200
+++ new/yast2-ntp-client-3.2.0/test/ntp_client_test.rb  2016-10-19 
11:25:44.000000000 +0200
@@ -1,5 +1,7 @@
 require_relative "test_helper"
 
+require "fileutils"
+
 Yast.import "NtpClient"
 Yast.import "NetworkInterfaces"
 Yast.import "PackageSystem"
@@ -414,44 +416,44 @@
     let(:server) { "sntp.server.de" }
     let(:output) { { "stdout" => "", "stderr" => "", "exit" => 0 } }
 
-    context "given a server" do
-      context "when no ip_version is passed as argument" do
-        let(:output) do
-          {
-            "stderr" => "server_name lookup error Name or service not known",
-            "stdout" => "sntp [email protected] Thu May 12 16:14:59 UTC 2016",
-            "exit"   => 0
-          }
-        end
+    it "calls sntp command with ip version 4 by default" do
+      expect(Yast::SCR).to receive(:Execute)
+        .with(Yast::Path.new(".target.bash_output"),
+          "LANG=C /usr/sbin/sntp -#{ip_version} -K /dev/null -t 5 -c 
#{server}")
+        .and_return(output)
 
-        it "calls sntp command with ip version 4 by default" do
-          expect(Yast::SCR).to receive(:Execute)
-            .with(Yast::Path.new(".target.bash_output"),
-              "LANG=C /usr/sbin/sntp -#{ip_version} -K /dev/null -t 5 -c 
#{server}")
-            .and_return(output)
+      subject.sntp_test(server)
+    end
 
-          subject.sntp_test(server)
-        end
+    it "returns false if server is not reachable" do
+      output["stderr"] = "server_name lookup error Name or service not known"
+      expect(Yast::SCR).to receive(:Execute)
+        .with(path(".target.bash_output"),
+          "LANG=C /usr/sbin/sntp -#{ip_version} -K /dev/null -t 5 -c 
#{server}")
+        .and_return(output)
 
-        it "returns false if server is not reachable" do
-          expect(Yast::SCR).to receive(:Execute)
-            .with(path(".target.bash_output"),
-              "LANG=C /usr/sbin/sntp -#{ip_version} -K /dev/null -t 5 -c 
#{server}")
-            .and_return(output)
+      expect(subject.sntp_test(server)).to eql(false)
+    end
 
-          expect(subject.sntp_test(server)).to eql(false)
-        end
+    it "returns false if sntp response includes 'no UCST'" do
+      output["stdout"] = "sntp [email protected] Fri Sep 30 15:52:10 UTC 2016 
(1)\n" \
+        "195.113.144.2 no UCST response after 5 seconds\n"
+      expect(Yast::SCR).to receive(:Execute)
+        .with(path(".target.bash_output"),
+          "LANG=C /usr/sbin/sntp -#{ip_version} -K /dev/null -t 5 -c 
#{server}")
+        .and_return(output)
 
-        it "returns true if sntp command's exit code is 0" do
-          output["stderr"] = ""
-          expect(Yast::SCR).to receive(:Execute)
-            .with(path(".target.bash_output"),
-              "LANG=C /usr/sbin/sntp -#{ip_version} -K /dev/null -t 5 -c 
#{server}")
-            .and_return(output)
+      expect(subject.sntp_test(server)).to eql(false)
+    end
 
-          expect(subject.sntp_test(server)).to eql(true)
-        end
-      end
+    it "returns true if sntp command's exit code is 0" do
+      output["stdout"] = "sntp [email protected] Fri Sep 30 15:52:10 UTC 2016 
(1)\n"
+      expect(Yast::SCR).to receive(:Execute)
+        .with(path(".target.bash_output"),
+          "LANG=C /usr/sbin/sntp -#{ip_version} -K /dev/null -t 5 -c 
#{server}")
+        .and_return(output)
+
+      expect(subject.sntp_test(server)).to eql(true)
     end
   end
 


Reply via email to