From 45d3a1056e51a7fe2904dbce5bd5271cf4b7e2fe Mon Sep 17 00:00:00 2001 From: =?utf8?q?Arkadiusz=20Mi=C5=9Bkiewicz?= Date: Tue, 23 Jun 2015 07:05:25 +0200 Subject: [PATCH] - up to 2.1 --- chrony-sysheaders.patch | 119 ---------------------------------------- chrony.spec | 7 +-- 2 files changed, 2 insertions(+), 124 deletions(-) delete mode 100644 chrony-sysheaders.patch diff --git a/chrony-sysheaders.patch b/chrony-sysheaders.patch deleted file mode 100644 index ee0cfa1..0000000 --- a/chrony-sysheaders.patch +++ /dev/null @@ -1,119 +0,0 @@ -diff -urN chrony-1.31.org/chrony_timex.h chrony-1.31/chrony_timex.h ---- chrony-1.31.org/chrony_timex.h 2014-09-10 17:00:54.000000000 +0200 -+++ chrony-1.31/chrony_timex.h 1970-01-01 01:00:00.000000000 +0100 -@@ -1,73 +0,0 @@ --/* Taken from /usr/include/linux/timex.h. Avoids the need to -- * include kernel header files. */ -- --#ifndef CHRONY_TIMEX_H --#define CHRONY_TIMEX_H -- --#include -- --struct timex { -- unsigned int modes; /* mode selector */ -- long offset; /* time offset (usec) */ -- long freq; /* frequency offset (scaled ppm) */ -- long maxerror; /* maximum error (usec) */ -- long esterror; /* estimated error (usec) */ -- int status; /* clock command/status */ -- long constant; /* pll time constant */ -- long precision; /* clock precision (usec) (read only) */ -- long tolerance; /* clock frequency tolerance (ppm) -- * (read only) -- */ -- struct timeval time; /* (read only) */ -- long tick; /* (modified) usecs between clock ticks */ -- -- long ppsfreq; /* pps frequency (scaled ppm) (ro) */ -- long jitter; /* pps jitter (us) (ro) */ -- int shift; /* interval duration (s) (shift) (ro) */ -- long stabil; /* pps stability (scaled ppm) (ro) */ -- long jitcnt; /* jitter limit exceeded (ro) */ -- long calcnt; /* calibration intervals (ro) */ -- long errcnt; /* calibration errors (ro) */ -- long stbcnt; /* stability limit exceeded (ro) */ -- -- int :32; int :32; int :32; int :32; -- int :32; int :32; int :32; int :32; -- int :32; int :32; int :32; int :32; --}; -- --#define ADJ_OFFSET 0x0001 /* time offset */ --#define ADJ_FREQUENCY 0x0002 /* frequency offset */ --#define ADJ_MAXERROR 0x0004 /* maximum time error */ --#define ADJ_STATUS 0x0010 /* clock status */ --#define ADJ_TIMECONST 0x0020 /* pll time constant */ --#define ADJ_SETOFFSET 0x0100 /* add 'time' to current time */ --#define ADJ_NANO 0x2000 /* select nanosecond resolution */ --#define ADJ_TICK 0x4000 /* tick value */ --#define ADJ_OFFSET_SINGLESHOT 0x8001 /* old-fashioned adjtime */ --#define ADJ_OFFSET_SS_READ 0xa001 /* read-only adjtime */ -- --#define SHIFT_USEC 16 /* frequency offset scale (shift) */ -- --#define STA_PLL 0x0001 /* enable PLL updates (rw) */ --#define STA_PPSFREQ 0x0002 /* enable PPS freq discipline (rw) */ --#define STA_PPSTIME 0x0004 /* enable PPS time discipline (rw) */ --#define STA_FLL 0x0008 /* select frequency-lock mode (rw) */ -- --#define STA_INS 0x0010 /* insert leap (rw) */ --#define STA_DEL 0x0020 /* delete leap (rw) */ --#define STA_UNSYNC 0x0040 /* clock unsynchronized (rw) */ --#define STA_FREQHOLD 0x0080 /* hold frequency (rw) */ -- --#define STA_PPSSIGNAL 0x0100 /* PPS signal present (ro) */ --#define STA_PPSJITTER 0x0200 /* PPS signal jitter exceeded (ro) */ --#define STA_PPSWANDER 0x0400 /* PPS signal wander exceeded (ro) */ --#define STA_PPSERROR 0x0800 /* PPS signal calibration error (ro) */ -- --#define STA_CLOCKERR 0x1000 /* clock hardware fault (ro) */ --#define STA_NANO 0x2000 /* resolution (0 = us, 1 = ns) (ro) */ -- --/* This doesn't seem to be in any include files !! */ -- --extern int adjtimex(struct timex *); -- --#endif /* CHRONY_TIMEX_H */ -diff -urN chrony-1.31.org/wrap_adjtimex.c chrony-1.31/wrap_adjtimex.c ---- chrony-1.31.org/wrap_adjtimex.c 2014-09-10 17:00:54.000000000 +0200 -+++ chrony-1.31/wrap_adjtimex.c 2015-02-19 18:14:48.994437746 +0100 -@@ -22,18 +22,33 @@ - - ======================================================================= - -- This is a wrapper around the Linux adjtimex system call. It isolates the -- inclusion of from the need to include other header files, -- many of which conflict with those in on some recent distributions -- (as of Jul 2000) using kernels around 2.2.16 onwards. -+ This is a wrapper around the Linux adjtimex system call. - - */ - - #include "config.h" - --#include "chrony_timex.h" - #include "wrap_adjtimex.h" - -+#include -+ -+/* Definitions used if missing in the system headers */ -+#ifndef ADJ_TAI -+#define ADJ_TAI 0x0080 /* set TAI offset */ -+#endif -+#ifndef ADJ_SETOFFSET -+#define ADJ_SETOFFSET 0x0100 /* add 'time' to current time */ -+#endif -+#ifndef ADJ_NANO -+#define ADJ_NANO 0x2000 /* select nanosecond resolution */ -+#endif -+#ifndef ADJ_OFFSET_SS_READ -+#define ADJ_OFFSET_SS_READ 0xa001 /* read-only adjtime */ -+#endif -+ -+/* Frequency offset scale (shift) */ -+#define SHIFT_USEC 16 -+ - static int status = 0; - - int diff --git a/chrony.spec b/chrony.spec index 53ddf4a..d99a348 100644 --- a/chrony.spec +++ b/chrony.spec @@ -1,19 +1,18 @@ Summary: An NTP client/server Name: chrony -Version: 1.31.1 +Version: 2.1 Release: 1 License: GPL v2 Group: Daemons URL: http://chrony.tuxfamily.org/ Source0: http://download.tuxfamily.org/chrony/%{name}-%{version}.tar.gz -# Source0-md5: 01e54c63d09a310f30c4e399f18499df +# Source0-md5: 7ea7177fd784527d70ed929c862bba8f Source1: %{name}.conf Source2: %{name}.keys Source3: %{name}d.sysconfig Source4: %{name}d.init Source5: %{name}.logrotate Source6: %{name}d.upstart -Patch0: chrony-sysheaders.patch BuildRequires: bison BuildRequires: libcap-devel BuildRequires: nss-devel @@ -48,7 +47,6 @@ in permanently connected environments. %prep %setup -q -%patch0 -p1 %{__sed} -i -e 's,/usr/local,%{_prefix},g' *.texi.in @@ -121,7 +119,6 @@ fi %attr(754,root,root) /etc/rc.d/init.d/chronyd %attr(755,root,root) %{_bindir}/chronyc %attr(755,root,root) %{_sbindir}/chronyd -%{_mandir}/man1/chrony.1* %{_mandir}/man1/chronyc.1* %{_mandir}/man5/chrony.conf.5* %{_mandir}/man8/chronyd.8* -- 2.44.0