mlichvar pushed to ntp (f21). "don't step clock for leap second with -x option (#1196635)"

notifications at fedoraproject.org notifications at fedoraproject.org
Wed Apr 8 11:46:57 UTC 2015


>From cad98fe3e43004f347cbca91569beaa8a52ff9a4 Mon Sep 17 00:00:00 2001
From: Miroslav Lichvar <mlichvar at redhat.com>
Date: Thu, 26 Feb 2015 15:39:17 +0100
Subject: don't step clock for leap second with -x option (#1196635)


diff --git a/ntp-4.2.6p5-xleap.patch b/ntp-4.2.6p5-xleap.patch
new file mode 100644
index 0000000..8e492e2
--- /dev/null
+++ b/ntp-4.2.6p5-xleap.patch
@@ -0,0 +1,37 @@
+diff -up ntp-4.2.6p5/html/miscopt.html.xleap ntp-4.2.6p5/html/miscopt.html
+--- ntp-4.2.6p5/html/miscopt.html.xleap	2009-12-09 08:36:36.000000000 +0100
++++ ntp-4.2.6p5/html/miscopt.html	2015-02-18 13:36:42.245273922 +0100
+@@ -88,7 +88,7 @@
+ 						is 0.128 s. If set to zero, step adjustments will never
+ 						occur. Note: The kernel time discipline is disabled if
+ 						the step threshold is set to zero or greater than 0.5
+-						s.</dd>
++						s and the threshold is applied also to leap second corrections.</dd>
+ 					<dt><tt>stepout <i>stepout</i></tt></dt>
+ 					<dd>Specifies the stepout threshold in seconds. The default without this
+ 						command is 900 s.  If set to zero, popcorn spikes will
+diff -up ntp-4.2.6p5/html/ntpd.html.xleap ntp-4.2.6p5/html/ntpd.html
+--- ntp-4.2.6p5/html/ntpd.html.xleap	2015-02-18 13:24:29.489697158 +0100
++++ ntp-4.2.6p5/html/ntpd.html	2015-02-18 13:34:46.296031098 +0100
+@@ -146,7 +146,7 @@
+ 			<dt><tt>-U <i>interface update interval</i></tt></dt>
+ 			<dd>Number of seconds to wait between interface list scans to pick up new and delete network interface. Set to 0 to disable dynamic interface list updating. The default is to scan every 5 minutes.</dd>
+ 			<dt><tt>-x</tt></dt>
+-			<dd>Normally, the time is slewed if the offset is less than the step threshold, which is 128 ms by default, and stepped if above the threshold. This option sets the threshold to 600 s, which is well within the accuracy window to set the clock manually. Note: Since the slew rate of typical Unix kernels is limited to 0.5 ms/s, each second of adjustment requires an amortization interval of 2000 s. Thus, an adjustment as much as 600 s will take almost 14 days to complete. This option can be used with the <tt>-g</tt> and <tt>-q</tt> options. See the <tt>tinker</tt> command for other options. Note: The kernel time discipline is disabled with this option.</dd>
++			<dd>Normally, the time is slewed if the offset is less than the step threshold, which is 128 ms by default, and stepped if above the threshold. This option sets the threshold to 600 s, which is well within the accuracy window to set the clock manually. Note: Since the slew rate of typical Unix kernels is limited to 0.5 ms/s, each second of adjustment requires an amortization interval of 2000 s. Thus, an adjustment as much as 600 s will take almost 14 days to complete. This option can be used with the <tt>-g</tt> and <tt>-q</tt> options. See the <tt>tinker</tt> command for other options. Note: The kernel time discipline is disabled with this option and the step threshold is applied also to leap second corrections.</dd>
+ 	</dl>
+ 		<h4 id="cfg">The Configuration File</h4>
+ 		<p>Ordinarily, <tt>ntpd</tt> reads the <tt>ntp.conf</tt> configuration file at startup in order to determine the synchronization sources and operating modes. It is also possible to specify a working, although limited, configuration entirely on the command line, obviating the need for a configuration file. This may be particularly useful when the local host is to be configured as a broadcast client, with servers determined by listening to broadcasts at run time.</p>
+diff -up ntp-4.2.6p5/ntpd/ntp_timer.c.xleap ntp-4.2.6p5/ntpd/ntp_timer.c
+--- ntp-4.2.6p5/ntpd/ntp_timer.c.xleap	2015-02-10 10:09:34.621988098 +0100
++++ ntp-4.2.6p5/ntpd/ntp_timer.c	2015-02-10 10:15:09.825015105 +0100
+@@ -449,7 +449,8 @@ timer(void)
+ 			sys_leap = LEAP_NOWARNING;
+ 			sys_tai = leap_tai;
+ #ifdef KERNEL_PLL
+-			if (!(pll_control && kern_enable))
++			if (clock_max < 1.0 && clock_max > 0.0 &&
++					!(pll_control && kern_enable))
+ 				step_systime(-1.0);
+ #else /* KERNEL_PLL */
+ #ifndef SYS_WINNT /* WinNT port has its own leap second handling */
diff --git a/ntp.spec b/ntp.spec
index 4107fa0..a528206 100644
--- a/ntp.spec
+++ b/ntp.spec
@@ -117,6 +117,8 @@ Patch32: ntp-4.2.6p5-rsaexp.patch
 Patch33: ntp-4.2.6p5-keylen.patch
 # ntpbz #2627
 Patch34: ntp-4.2.6p5-shmperm.patch
+# ntpbz #2745
+Patch35: ntp-4.2.6p5-xleap.patch
 
 # handle unknown clock types
 Patch50: ntpstat-0.2-clksrc.patch
@@ -244,6 +246,7 @@ This package contains NTP documentation in HTML format.
 %patch32 -p1 -b .rsaexp
 %patch33 -p1 -b .keylen
 %patch34 -p1 -b .shmperm
+%patch35 -p1 -b .xleap
 
 # ntpstat patches
 %patch50 -p1 -b .clksrc
-- 
cgit v0.10.2


	http://pkgs.fedoraproject.org/cgit/ntp.git/commit/?h=f21&id=cad98fe3e43004f347cbca91569beaa8a52ff9a4


More information about the scm-commits mailing list