[arch-commits] Commit in openntpd/repos (20 files)

Balló György bgyorgy at nymeria.archlinux.org
Wed Jan 8 18:14:53 UTC 2014


    Date: Wednesday, January 8, 2014 @ 19:14:53
  Author: bgyorgy
Revision: 103646

archrelease: copy trunk to community-x86_64, community-i686

Added:
  openntpd/repos/community-i686/PKGBUILD
    (from rev 103645, openntpd/trunk/PKGBUILD)
  openntpd/repos/community-i686/linux-adjtimex.patch
    (from rev 103645, openntpd/trunk/linux-adjtimex.patch)
  openntpd/repos/community-i686/openntpd.install
    (from rev 103645, openntpd/trunk/openntpd.install)
  openntpd/repos/community-i686/openntpd.service
    (from rev 103645, openntpd/trunk/openntpd.service)
  openntpd/repos/community-i686/openntpd.tmpfiles
    (from rev 103645, openntpd/trunk/openntpd.tmpfiles)
  openntpd/repos/community-x86_64/PKGBUILD
    (from rev 103645, openntpd/trunk/PKGBUILD)
  openntpd/repos/community-x86_64/linux-adjtimex.patch
    (from rev 103645, openntpd/trunk/linux-adjtimex.patch)
  openntpd/repos/community-x86_64/openntpd.install
    (from rev 103645, openntpd/trunk/openntpd.install)
  openntpd/repos/community-x86_64/openntpd.service
    (from rev 103645, openntpd/trunk/openntpd.service)
  openntpd/repos/community-x86_64/openntpd.tmpfiles
    (from rev 103645, openntpd/trunk/openntpd.tmpfiles)
Deleted:
  openntpd/repos/community-i686/PKGBUILD
  openntpd/repos/community-i686/linux-adjtimex.patch
  openntpd/repos/community-i686/openntpd.install
  openntpd/repos/community-i686/openntpd.service
  openntpd/repos/community-i686/openntpd.tmpfiles
  openntpd/repos/community-x86_64/PKGBUILD
  openntpd/repos/community-x86_64/linux-adjtimex.patch
  openntpd/repos/community-x86_64/openntpd.install
  openntpd/repos/community-x86_64/openntpd.service
  openntpd/repos/community-x86_64/openntpd.tmpfiles

---------------------------------------+
 /PKGBUILD                             |  126 ++++++++++++
 /linux-adjtimex.patch                 |  336 ++++++++++++++++++++++++++++++++
 /openntpd.install                     |   30 ++
 /openntpd.service                     |   20 +
 /openntpd.tmpfiles                    |    2 
 community-i686/PKGBUILD               |   62 -----
 community-i686/linux-adjtimex.patch   |  168 ----------------
 community-i686/openntpd.install       |   15 -
 community-i686/openntpd.service       |   10 
 community-i686/openntpd.tmpfiles      |    1 
 community-x86_64/PKGBUILD             |   62 -----
 community-x86_64/linux-adjtimex.patch |  168 ----------------
 community-x86_64/openntpd.install     |   15 -
 community-x86_64/openntpd.service     |   10 
 community-x86_64/openntpd.tmpfiles    |    1 
 15 files changed, 514 insertions(+), 512 deletions(-)

Deleted: community-i686/PKGBUILD
===================================================================
--- community-i686/PKGBUILD	2014-01-08 18:14:42 UTC (rev 103645)
+++ community-i686/PKGBUILD	2014-01-08 18:14:53 UTC (rev 103646)
@@ -1,62 +0,0 @@
-# $Id$
-# Maintainer: Vesa Kaihlavirta <vegai at iki.fi>
-# Contributor: Mark Rosenstand <mark at borkware.net>
-# Contributor: Giorgio Lando <patroclo7 at gmail.com> (adjtimex patch)
-# Contributor: Alexander Rødseth <rodseth at gmail.com>
-
-pkgname=openntpd
-pkgver=3.9p1
-pkgrel=22
-pkgdesc='Free, easy to use implementation of the Network Time Protocol.'
-url='http://www.openntpd.org/'
-arch=('x86_64' 'i686')
-license=('BSD')
-depends=('openssl')
-conflicts=('ntp')
-backup=('etc/ntpd.conf')
-install=$pkgname.install
-source=("ftp://ftp.openbsd.org/pub/OpenBSD/OpenNTPD/$pkgname-$pkgver.tar.gz"
-	      'linux-adjtimex.patch'
-        'openntpd.tmpfiles'
-        'openntpd.service')
-sha256sums=('83dd7c1e8ec8b4567afe49af539271b5a73562fb7a3ca51df73eccba89ec8c49'
-            '3abcec94c072b5913ef7156a22049d796ff04e19105befe1ea81a66522928fd2'
-            'fe12841110c3c080519e248988c4b6334f54bd9646b015753c7e15de2a9600c5'
-            '3239fc6f69d661cd9233233da9e68bebdf7b12888febbc2f2d794742db2d8ed1')
-
-prepare() {
-  patch -Np1 -d $pkgname-$pkgver < linux-adjtimex.patch
-}
-
-build() {
-  cd $pkgname-$pkgver
-  autoreconf -fi
-  ./configure \
-    --prefix=/usr \
-    --sysconfdir=/etc \
-    --sbindir=/usr/bin \
-    --with-privsep-user=ntp \
-    --with-privsep-path=/run/openntpd/ \
-    --with-adjtimex
-  make
-}
-
-package() {
-  cd "$srcdir/$pkgname-$pkgver"
-
-  make DESTDIR="$pkgdir" install
-  install -Dm644 "$srcdir/$pkgname-$pkgver/LICENCE" \
-    "$pkgdir/usr/share/licenses/$pkgname/LICENCE"
-  sed -i 's/\*/0.0.0.0/' $pkgdir/etc/ntpd.conf
-
-  install -Dm644 "$srcdir/openntpd.tmpfiles" "$pkgdir/usr/lib/tmpfiles.d/openntpd.conf"
-  install -Dm644 "$srcdir/openntpd.service" "$pkgdir/usr/lib/systemd/system/openntpd.service"
-
-  # avoid conflict with filesystem>=2012.06
-  rm -r "$pkgdir/run"
-
-  install -dm755 "$pkgdir/usr/lib/systemd/ntp-units.d"
-  echo "$pkgname.service" > "$pkgdir/usr/lib/systemd/ntp-units.d/$pkgname.list"
-}
-
-# vim:set ts=2 sw=2 et:

Copied: openntpd/repos/community-i686/PKGBUILD (from rev 103645, openntpd/trunk/PKGBUILD)
===================================================================
--- community-i686/PKGBUILD	                        (rev 0)
+++ community-i686/PKGBUILD	2014-01-08 18:14:53 UTC (rev 103646)
@@ -0,0 +1,63 @@
+# $Id$
+# Maintainer: Vesa Kaihlavirta <vegai at iki.fi>
+# Contributor: Mark Rosenstand <mark at borkware.net>
+# Contributor: Giorgio Lando <patroclo7 at gmail.com> (adjtimex patch)
+# Contributor: Alexander Rødseth <rodseth at gmail.com>
+
+pkgname=openntpd
+pkgver=3.9p1
+pkgrel=23
+pkgdesc='Free, easy to use implementation of the Network Time Protocol.'
+url='http://www.openntpd.org/'
+arch=('x86_64' 'i686')
+license=('BSD')
+depends=('openssl')
+conflicts=('ntp')
+backup=('etc/ntpd.conf')
+install=$pkgname.install
+source=("ftp://ftp.openbsd.org/pub/OpenBSD/OpenNTPD/$pkgname-$pkgver.tar.gz"
+	      'linux-adjtimex.patch'
+        'openntpd.tmpfiles'
+        'openntpd.service')
+sha256sums=('83dd7c1e8ec8b4567afe49af539271b5a73562fb7a3ca51df73eccba89ec8c49'
+            '3abcec94c072b5913ef7156a22049d796ff04e19105befe1ea81a66522928fd2'
+            'fe12841110c3c080519e248988c4b6334f54bd9646b015753c7e15de2a9600c5'
+            '3239fc6f69d661cd9233233da9e68bebdf7b12888febbc2f2d794742db2d8ed1')
+
+prepare() {
+  patch -Np1 -d $pkgname-$pkgver < linux-adjtimex.patch
+}
+
+build() {
+  cd $pkgname-$pkgver
+  autoreconf -fi
+  ./configure \
+    --prefix=/usr \
+    --sysconfdir=/etc \
+    --sbindir=/usr/bin \
+    --with-privsep-user=ntp \
+    --with-privsep-path=/run/openntpd/ \
+    --with-adjtimex
+  make
+}
+
+package() {
+  cd "$srcdir/$pkgname-$pkgver"
+
+  make DESTDIR="$pkgdir" install
+  install -Dm644 "$srcdir/$pkgname-$pkgver/LICENCE" \
+    "$pkgdir/usr/share/licenses/$pkgname/LICENCE"
+  sed -i 's/\*/0.0.0.0/' "$pkgdir/etc/ntpd.conf"
+
+  install -d -o 87 "pkgdir/var/lib/ntp"
+  install -Dm644 "$srcdir/openntpd.tmpfiles" "$pkgdir/usr/lib/tmpfiles.d/openntpd.conf"
+  install -Dm644 "$srcdir/openntpd.service" "$pkgdir/usr/lib/systemd/system/openntpd.service"
+
+  # avoid conflict with filesystem>=2012.06
+  rm -r "$pkgdir/run"
+
+  install -dm755 "$pkgdir/usr/lib/systemd/ntp-units.d"
+  echo "$pkgname.service" > "$pkgdir/usr/lib/systemd/ntp-units.d/$pkgname.list"
+}
+
+# vim:set ts=2 sw=2 et:

Deleted: community-i686/linux-adjtimex.patch
===================================================================
--- community-i686/linux-adjtimex.patch	2014-01-08 18:14:42 UTC (rev 103645)
+++ community-i686/linux-adjtimex.patch	2014-01-08 18:14:53 UTC (rev 103646)
@@ -1,168 +0,0 @@
-Only in openntpd-3.9p1.old: configure
-diff -ur --unidirectional-new-file openntpd-3.9p1.old/configure.ac openntpd-3.9p1/configure.ac
---- openntpd-3.9p1.old/configure.ac	2006-05-14 07:29:23.000000000 +0200
-+++ openntpd-3.9p1/configure.ac	2008-02-07 13:13:18.066366142 +0100
-@@ -583,6 +583,11 @@
- 	[ builtin_arc4random=$withval ]
- )
- 
-+AC_ARG_WITH(adjtimex,
-+	    	[  --with-adjtimex         Use adjtimex to adjust kernel skew],
-+	    	[ AC_DEFINE(USE_ADJTIMEX, [], [Use adjust skew with adjtimex (experimental)]) ]
-+	    )
-+
- AC_ARG_WITH(mantype,
- 	[  --with-mantype=man|cat|doc  Set man page type],
- 	[
-diff -ur --unidirectional-new-file openntpd-3.9p1.old/defines.h openntpd-3.9p1/defines.h
---- openntpd-3.9p1.old/defines.h	2006-05-14 07:29:21.000000000 +0200
-+++ openntpd-3.9p1/defines.h	2008-02-07 13:14:34.488711868 +0100
-@@ -20,6 +20,10 @@
- # define setproctitle(x)
- #endif
- 
-+#ifdef USE_ADJTIMEX
-+# define adjtime(a,b)	(_compat_adjtime((a),(b)))
-+#endif
-+	
- #if !defined(SA_LEN)
- # if defined(HAVE_STRUCT_SOCKADDR_SA_LEN)
- #  define SA_LEN(x)	((x)->sa_len)
-Only in openntpd-3.9p1.old: ntpd.0
-Only in openntpd-3.9p1.old: ntpd.conf.0
-diff -ur --unidirectional-new-file openntpd-3.9p1.old/openbsd-compat/Makefile.in openntpd-3.9p1/openbsd-compat/Makefile.in
---- openntpd-3.9p1.old/openbsd-compat/Makefile.in	2006-05-14 07:29:19.000000000 +0200
-+++ openntpd-3.9p1/openbsd-compat/Makefile.in	2008-02-07 13:31:39.499728930 +0100
-@@ -9,7 +9,7 @@
- COMPAT=		atomicio.o bsd-arc4random.o bsd-misc.o bsd-poll.o \
- 		bsd-snprintf.o bsd-getifaddrs.o bsd-setresuid.o \
- 		bsd-setresgid.o fake-rfc2553.o
--PORT=		port-qnx.o
-+PORT=		port-linux.o port-qnx.o
- 
- VPATH=@srcdir@
- CC=@CC@
-diff -ur --unidirectional-new-file openntpd-3.9p1.old/openbsd-compat/openbsd-compat.h openntpd-3.9p1/openbsd-compat/openbsd-compat.h
---- openntpd-3.9p1.old/openbsd-compat/openbsd-compat.h	2006-05-14 07:29:19.000000000 +0200
-+++ openntpd-3.9p1/openbsd-compat/openbsd-compat.h	2008-02-07 13:17:00.272366764 +0100
-@@ -46,6 +46,11 @@
-                 __attribute__((__format__ (printf, 2, 3)));
- #endif
- 
-+#ifdef USE_ADJTIMEX
-+# include <sys/time.h>
-+int _compat_adjtime(const struct timeval *, struct timeval *);
-+#endif
-+
- #ifndef HAVE_INET_PTON
- int inet_pton(int, const char *, void *);
- #endif
-diff -ur --unidirectional-new-file openntpd-3.9p1.old/openbsd-compat/port-linux.c openntpd-3.9p1/openbsd-compat/port-linux.c
---- openntpd-3.9p1.old/openbsd-compat/port-linux.c	1970-01-01 01:00:00.000000000 +0100
-+++ openntpd-3.9p1/openbsd-compat/port-linux.c	2008-02-07 13:24:43.800366563 +0100
-@@ -0,0 +1,105 @@
-+
-+
-+/*
-+ * Copyright (c) 2004 Darren Tucker <dtucker at zip com au>
-+ *
-+ * Permission to use, copy, modify, and distribute this software for any
-+ * purpose with or without fee is hereby granted, provided that the above
-+ * copyright notice and this permission notice appear in all copies.
-+ *
-+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
-+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
-+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
-+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
-+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-+ */
-+
-+#include "includes.h"
-+
-+#ifdef USE_ADJTIMEX
-+#include <sys/timex.h>
-+#include <errno.h>
-+#ifdef adjtime
-+# undef adjtime
-+#endif
-+
-+#include "ntpd.h"
-+
-+/* scale factor used by adjtimex freq param.  1 ppm = 65536 */
-+#define ADJTIMEX_FREQ_SCALE 65536
-+
-+/* maximum change to skew per adjustment, in PPM */
-+#define MAX_SKEW_DELTA 5.0
-+
-+int
-+_compat_adjtime(const struct timeval *delta, struct timeval *olddelta)
-+{
-+	static struct timeval tlast = {0,0};
-+	static double tskew = 0;
-+	static int synced = -1;
-+	struct timeval tnow, tdelta;
-+	double skew = 0, newskew, deltaskew, adjust, interval = 0;
-+	struct timex tmx;
-+	int result, saved_errno;
-+
-+	gettimeofday(&tnow, NULL);
-+	adjust = (double)delta->tv_sec;
-+	adjust += (double)delta->tv_usec / 1000000;
-+
-+	/* Even if the caller doesn't care about the olddelta, we do */
-+	if (olddelta == NULL)
-+		olddelta = &tdelta;
-+
-+	result = adjtime(delta, olddelta);
-+	saved_errno = errno;
-+
-+	if (olddelta->tv_sec == 0 && olddelta->tv_usec == 0 &&
-+	    synced != INT_MAX)
-+		synced++;
-+	 else
-+		synced = 0;
-+
-+	/*
-+	 * do skew calculations if we have synced
-+	 */
-+	if (synced == 0 ) {
-+		tmx.modes = 0;
-+		if (adjtimex(&tmx) == -1)
-+			log_warn("adjtimex get failed");
-+		else
-+			tskew = (double)tmx.freq / ADJTIMEX_FREQ_SCALE;
-+	} else if (synced >= 1) {
-+		interval = (double)(tnow.tv_sec - tlast.tv_sec);
-+		interval += (double)(tnow.tv_usec - tlast.tv_usec) / 1000000;
-+
-+		skew = (adjust * 1000000) / interval;
-+		newskew = ((tskew * synced) + skew) / synced;
-+		deltaskew = newskew - tskew;
-+
-+		if (deltaskew > MAX_SKEW_DELTA) {
-+			log_info("skew change %0.3lf exceeds limit", deltaskew);
-+			tskew += MAX_SKEW_DELTA;
-+		} else if (deltaskew < -MAX_SKEW_DELTA) {
-+			log_info("skew change %0.3lf exceeds limit", deltaskew);
-+			tskew -= MAX_SKEW_DELTA;
-+		} else {
-+			tskew = newskew;
-+		}
-+
-+		/* Adjust the kernel skew.  */
-+		tmx.freq = (long)(tskew * ADJTIMEX_FREQ_SCALE);
-+		tmx.modes = ADJ_FREQUENCY;
-+		if (adjtimex(&tmx) == -1)
-+			log_warn("adjtimex set freq failed");
-+	}
-+
-+	log_debug("interval %0.3lf skew %0.3lf total skew %0.3lf", interval,
-+	    skew, tskew);
-+
-+	tlast = tnow;
-+	errno = saved_errno;
-+	return result;
-+}
-+#endif

Copied: openntpd/repos/community-i686/linux-adjtimex.patch (from rev 103645, openntpd/trunk/linux-adjtimex.patch)
===================================================================
--- community-i686/linux-adjtimex.patch	                        (rev 0)
+++ community-i686/linux-adjtimex.patch	2014-01-08 18:14:53 UTC (rev 103646)
@@ -0,0 +1,168 @@
+Only in openntpd-3.9p1.old: configure
+diff -ur --unidirectional-new-file openntpd-3.9p1.old/configure.ac openntpd-3.9p1/configure.ac
+--- openntpd-3.9p1.old/configure.ac	2006-05-14 07:29:23.000000000 +0200
++++ openntpd-3.9p1/configure.ac	2008-02-07 13:13:18.066366142 +0100
+@@ -583,6 +583,11 @@
+ 	[ builtin_arc4random=$withval ]
+ )
+ 
++AC_ARG_WITH(adjtimex,
++	    	[  --with-adjtimex         Use adjtimex to adjust kernel skew],
++	    	[ AC_DEFINE(USE_ADJTIMEX, [], [Use adjust skew with adjtimex (experimental)]) ]
++	    )
++
+ AC_ARG_WITH(mantype,
+ 	[  --with-mantype=man|cat|doc  Set man page type],
+ 	[
+diff -ur --unidirectional-new-file openntpd-3.9p1.old/defines.h openntpd-3.9p1/defines.h
+--- openntpd-3.9p1.old/defines.h	2006-05-14 07:29:21.000000000 +0200
++++ openntpd-3.9p1/defines.h	2008-02-07 13:14:34.488711868 +0100
+@@ -20,6 +20,10 @@
+ # define setproctitle(x)
+ #endif
+ 
++#ifdef USE_ADJTIMEX
++# define adjtime(a,b)	(_compat_adjtime((a),(b)))
++#endif
++	
+ #if !defined(SA_LEN)
+ # if defined(HAVE_STRUCT_SOCKADDR_SA_LEN)
+ #  define SA_LEN(x)	((x)->sa_len)
+Only in openntpd-3.9p1.old: ntpd.0
+Only in openntpd-3.9p1.old: ntpd.conf.0
+diff -ur --unidirectional-new-file openntpd-3.9p1.old/openbsd-compat/Makefile.in openntpd-3.9p1/openbsd-compat/Makefile.in
+--- openntpd-3.9p1.old/openbsd-compat/Makefile.in	2006-05-14 07:29:19.000000000 +0200
++++ openntpd-3.9p1/openbsd-compat/Makefile.in	2008-02-07 13:31:39.499728930 +0100
+@@ -9,7 +9,7 @@
+ COMPAT=		atomicio.o bsd-arc4random.o bsd-misc.o bsd-poll.o \
+ 		bsd-snprintf.o bsd-getifaddrs.o bsd-setresuid.o \
+ 		bsd-setresgid.o fake-rfc2553.o
+-PORT=		port-qnx.o
++PORT=		port-linux.o port-qnx.o
+ 
+ VPATH=@srcdir@
+ CC=@CC@
+diff -ur --unidirectional-new-file openntpd-3.9p1.old/openbsd-compat/openbsd-compat.h openntpd-3.9p1/openbsd-compat/openbsd-compat.h
+--- openntpd-3.9p1.old/openbsd-compat/openbsd-compat.h	2006-05-14 07:29:19.000000000 +0200
++++ openntpd-3.9p1/openbsd-compat/openbsd-compat.h	2008-02-07 13:17:00.272366764 +0100
+@@ -46,6 +46,11 @@
+                 __attribute__((__format__ (printf, 2, 3)));
+ #endif
+ 
++#ifdef USE_ADJTIMEX
++# include <sys/time.h>
++int _compat_adjtime(const struct timeval *, struct timeval *);
++#endif
++
+ #ifndef HAVE_INET_PTON
+ int inet_pton(int, const char *, void *);
+ #endif
+diff -ur --unidirectional-new-file openntpd-3.9p1.old/openbsd-compat/port-linux.c openntpd-3.9p1/openbsd-compat/port-linux.c
+--- openntpd-3.9p1.old/openbsd-compat/port-linux.c	1970-01-01 01:00:00.000000000 +0100
++++ openntpd-3.9p1/openbsd-compat/port-linux.c	2008-02-07 13:24:43.800366563 +0100
+@@ -0,0 +1,105 @@
++
++
++/*
++ * Copyright (c) 2004 Darren Tucker <dtucker at zip com au>
++ *
++ * Permission to use, copy, modify, and distribute this software for any
++ * purpose with or without fee is hereby granted, provided that the above
++ * copyright notice and this permission notice appear in all copies.
++ *
++ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
++ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
++ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
++ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
++ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
++ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
++ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
++ */
++
++#include "includes.h"
++
++#ifdef USE_ADJTIMEX
++#include <sys/timex.h>
++#include <errno.h>
++#ifdef adjtime
++# undef adjtime
++#endif
++
++#include "ntpd.h"
++
++/* scale factor used by adjtimex freq param.  1 ppm = 65536 */
++#define ADJTIMEX_FREQ_SCALE 65536
++
++/* maximum change to skew per adjustment, in PPM */
++#define MAX_SKEW_DELTA 5.0
++
++int
++_compat_adjtime(const struct timeval *delta, struct timeval *olddelta)
++{
++	static struct timeval tlast = {0,0};
++	static double tskew = 0;
++	static int synced = -1;
++	struct timeval tnow, tdelta;
++	double skew = 0, newskew, deltaskew, adjust, interval = 0;
++	struct timex tmx;
++	int result, saved_errno;
++
++	gettimeofday(&tnow, NULL);
++	adjust = (double)delta->tv_sec;
++	adjust += (double)delta->tv_usec / 1000000;
++
++	/* Even if the caller doesn't care about the olddelta, we do */
++	if (olddelta == NULL)
++		olddelta = &tdelta;
++
++	result = adjtime(delta, olddelta);
++	saved_errno = errno;
++
++	if (olddelta->tv_sec == 0 && olddelta->tv_usec == 0 &&
++	    synced != INT_MAX)
++		synced++;
++	 else
++		synced = 0;
++
++	/*
++	 * do skew calculations if we have synced
++	 */
++	if (synced == 0 ) {
++		tmx.modes = 0;
++		if (adjtimex(&tmx) == -1)
++			log_warn("adjtimex get failed");
++		else
++			tskew = (double)tmx.freq / ADJTIMEX_FREQ_SCALE;
++	} else if (synced >= 1) {
++		interval = (double)(tnow.tv_sec - tlast.tv_sec);
++		interval += (double)(tnow.tv_usec - tlast.tv_usec) / 1000000;
++
++		skew = (adjust * 1000000) / interval;
++		newskew = ((tskew * synced) + skew) / synced;
++		deltaskew = newskew - tskew;
++
++		if (deltaskew > MAX_SKEW_DELTA) {
++			log_info("skew change %0.3lf exceeds limit", deltaskew);
++			tskew += MAX_SKEW_DELTA;
++		} else if (deltaskew < -MAX_SKEW_DELTA) {
++			log_info("skew change %0.3lf exceeds limit", deltaskew);
++			tskew -= MAX_SKEW_DELTA;
++		} else {
++			tskew = newskew;
++		}
++
++		/* Adjust the kernel skew.  */
++		tmx.freq = (long)(tskew * ADJTIMEX_FREQ_SCALE);
++		tmx.modes = ADJ_FREQUENCY;
++		if (adjtimex(&tmx) == -1)
++			log_warn("adjtimex set freq failed");
++	}
++
++	log_debug("interval %0.3lf skew %0.3lf total skew %0.3lf", interval,
++	    skew, tskew);
++
++	tlast = tnow;
++	errno = saved_errno;
++	return result;
++}
++#endif

Deleted: community-i686/openntpd.install
===================================================================
--- community-i686/openntpd.install	2014-01-08 18:14:42 UTC (rev 103645)
+++ community-i686/openntpd.install	2014-01-08 18:14:53 UTC (rev 103646)
@@ -1,15 +0,0 @@
-post_install() {
-  getent group ntp &>/dev/null || groupadd -g 87 ntp >/dev/null
-  getent passwd ntp &>/dev/null || useradd -u 87 -g ntp -d /var/lib/ntp -c 'Network Time Protocol' -s /bin/false ntp >/dev/null
-
-  systemd-tmpfiles --create openntpd.conf
-  true
-}
-
-post_remove() {
-  getent passwd ntp &>/dev/null && userdel ntp >/dev/null
-  getent group ntp &>/dev/null && groupdel ntp >/dev/null
-  true
-}
-
-# vim: ts=2 sw=2 et ft=sh

Copied: openntpd/repos/community-i686/openntpd.install (from rev 103645, openntpd/trunk/openntpd.install)
===================================================================
--- community-i686/openntpd.install	                        (rev 0)
+++ community-i686/openntpd.install	2014-01-08 18:14:53 UTC (rev 103646)
@@ -0,0 +1,15 @@
+post_install() {
+  getent group ntp &>/dev/null || groupadd -g 87 ntp >/dev/null
+  getent passwd ntp &>/dev/null || useradd -u 87 -g ntp -d /var/lib/ntp -c 'Network Time Protocol' -s /bin/false ntp >/dev/null
+
+  systemd-tmpfiles --create openntpd.conf
+  true
+}
+
+post_remove() {
+  getent passwd ntp &>/dev/null && userdel ntp >/dev/null
+  getent group ntp &>/dev/null && groupdel ntp >/dev/null
+  true
+}
+
+# vim: ts=2 sw=2 et ft=sh

Deleted: community-i686/openntpd.service
===================================================================
--- community-i686/openntpd.service	2014-01-08 18:14:42 UTC (rev 103645)
+++ community-i686/openntpd.service	2014-01-08 18:14:53 UTC (rev 103646)
@@ -1,10 +0,0 @@
-[Unit]
-Description=OpenNTP Daemon
-After=network.target
-
-[Service]
-Type=forking
-ExecStart=/usr/bin/ntpd -s
-
-[Install]
-WantedBy=multi-user.target

Copied: openntpd/repos/community-i686/openntpd.service (from rev 103645, openntpd/trunk/openntpd.service)
===================================================================
--- community-i686/openntpd.service	                        (rev 0)
+++ community-i686/openntpd.service	2014-01-08 18:14:53 UTC (rev 103646)
@@ -0,0 +1,10 @@
+[Unit]
+Description=OpenNTP Daemon
+After=network.target
+
+[Service]
+Type=forking
+ExecStart=/usr/bin/ntpd -s
+
+[Install]
+WantedBy=multi-user.target

Deleted: community-i686/openntpd.tmpfiles
===================================================================
--- community-i686/openntpd.tmpfiles	2014-01-08 18:14:42 UTC (rev 103645)
+++ community-i686/openntpd.tmpfiles	2014-01-08 18:14:53 UTC (rev 103646)
@@ -1 +0,0 @@
-d /run/openntpd 0755 root root -

Copied: openntpd/repos/community-i686/openntpd.tmpfiles (from rev 103645, openntpd/trunk/openntpd.tmpfiles)
===================================================================
--- community-i686/openntpd.tmpfiles	                        (rev 0)
+++ community-i686/openntpd.tmpfiles	2014-01-08 18:14:53 UTC (rev 103646)
@@ -0,0 +1 @@
+d /run/openntpd 0755 root root -

Deleted: community-x86_64/PKGBUILD
===================================================================
--- community-x86_64/PKGBUILD	2014-01-08 18:14:42 UTC (rev 103645)
+++ community-x86_64/PKGBUILD	2014-01-08 18:14:53 UTC (rev 103646)
@@ -1,62 +0,0 @@
-# $Id$
-# Maintainer: Vesa Kaihlavirta <vegai at iki.fi>
-# Contributor: Mark Rosenstand <mark at borkware.net>
-# Contributor: Giorgio Lando <patroclo7 at gmail.com> (adjtimex patch)
-# Contributor: Alexander Rødseth <rodseth at gmail.com>
-
-pkgname=openntpd
-pkgver=3.9p1
-pkgrel=22
-pkgdesc='Free, easy to use implementation of the Network Time Protocol.'
-url='http://www.openntpd.org/'
-arch=('x86_64' 'i686')
-license=('BSD')
-depends=('openssl')
-conflicts=('ntp')
-backup=('etc/ntpd.conf')
-install=$pkgname.install
-source=("ftp://ftp.openbsd.org/pub/OpenBSD/OpenNTPD/$pkgname-$pkgver.tar.gz"
-	      'linux-adjtimex.patch'
-        'openntpd.tmpfiles'
-        'openntpd.service')
-sha256sums=('83dd7c1e8ec8b4567afe49af539271b5a73562fb7a3ca51df73eccba89ec8c49'
-            '3abcec94c072b5913ef7156a22049d796ff04e19105befe1ea81a66522928fd2'
-            'fe12841110c3c080519e248988c4b6334f54bd9646b015753c7e15de2a9600c5'
-            '3239fc6f69d661cd9233233da9e68bebdf7b12888febbc2f2d794742db2d8ed1')
-
-prepare() {
-  patch -Np1 -d $pkgname-$pkgver < linux-adjtimex.patch
-}
-
-build() {
-  cd $pkgname-$pkgver
-  autoreconf -fi
-  ./configure \
-    --prefix=/usr \
-    --sysconfdir=/etc \
-    --sbindir=/usr/bin \
-    --with-privsep-user=ntp \
-    --with-privsep-path=/run/openntpd/ \
-    --with-adjtimex
-  make
-}
-
-package() {
-  cd "$srcdir/$pkgname-$pkgver"
-
-  make DESTDIR="$pkgdir" install
-  install -Dm644 "$srcdir/$pkgname-$pkgver/LICENCE" \
-    "$pkgdir/usr/share/licenses/$pkgname/LICENCE"
-  sed -i 's/\*/0.0.0.0/' $pkgdir/etc/ntpd.conf
-
-  install -Dm644 "$srcdir/openntpd.tmpfiles" "$pkgdir/usr/lib/tmpfiles.d/openntpd.conf"
-  install -Dm644 "$srcdir/openntpd.service" "$pkgdir/usr/lib/systemd/system/openntpd.service"
-
-  # avoid conflict with filesystem>=2012.06
-  rm -r "$pkgdir/run"
-
-  install -dm755 "$pkgdir/usr/lib/systemd/ntp-units.d"
-  echo "$pkgname.service" > "$pkgdir/usr/lib/systemd/ntp-units.d/$pkgname.list"
-}
-
-# vim:set ts=2 sw=2 et:

Copied: openntpd/repos/community-x86_64/PKGBUILD (from rev 103645, openntpd/trunk/PKGBUILD)
===================================================================
--- community-x86_64/PKGBUILD	                        (rev 0)
+++ community-x86_64/PKGBUILD	2014-01-08 18:14:53 UTC (rev 103646)
@@ -0,0 +1,63 @@
+# $Id$
+# Maintainer: Vesa Kaihlavirta <vegai at iki.fi>
+# Contributor: Mark Rosenstand <mark at borkware.net>
+# Contributor: Giorgio Lando <patroclo7 at gmail.com> (adjtimex patch)
+# Contributor: Alexander Rødseth <rodseth at gmail.com>
+
+pkgname=openntpd
+pkgver=3.9p1
+pkgrel=23
+pkgdesc='Free, easy to use implementation of the Network Time Protocol.'
+url='http://www.openntpd.org/'
+arch=('x86_64' 'i686')
+license=('BSD')
+depends=('openssl')
+conflicts=('ntp')
+backup=('etc/ntpd.conf')
+install=$pkgname.install
+source=("ftp://ftp.openbsd.org/pub/OpenBSD/OpenNTPD/$pkgname-$pkgver.tar.gz"
+	      'linux-adjtimex.patch'
+        'openntpd.tmpfiles'
+        'openntpd.service')
+sha256sums=('83dd7c1e8ec8b4567afe49af539271b5a73562fb7a3ca51df73eccba89ec8c49'
+            '3abcec94c072b5913ef7156a22049d796ff04e19105befe1ea81a66522928fd2'
+            'fe12841110c3c080519e248988c4b6334f54bd9646b015753c7e15de2a9600c5'
+            '3239fc6f69d661cd9233233da9e68bebdf7b12888febbc2f2d794742db2d8ed1')
+
+prepare() {
+  patch -Np1 -d $pkgname-$pkgver < linux-adjtimex.patch
+}
+
+build() {
+  cd $pkgname-$pkgver
+  autoreconf -fi
+  ./configure \
+    --prefix=/usr \
+    --sysconfdir=/etc \
+    --sbindir=/usr/bin \
+    --with-privsep-user=ntp \
+    --with-privsep-path=/run/openntpd/ \
+    --with-adjtimex
+  make
+}
+
+package() {
+  cd "$srcdir/$pkgname-$pkgver"
+
+  make DESTDIR="$pkgdir" install
+  install -Dm644 "$srcdir/$pkgname-$pkgver/LICENCE" \
+    "$pkgdir/usr/share/licenses/$pkgname/LICENCE"
+  sed -i 's/\*/0.0.0.0/' "$pkgdir/etc/ntpd.conf"
+
+  install -d -o 87 "pkgdir/var/lib/ntp"
+  install -Dm644 "$srcdir/openntpd.tmpfiles" "$pkgdir/usr/lib/tmpfiles.d/openntpd.conf"
+  install -Dm644 "$srcdir/openntpd.service" "$pkgdir/usr/lib/systemd/system/openntpd.service"
+
+  # avoid conflict with filesystem>=2012.06
+  rm -r "$pkgdir/run"
+
+  install -dm755 "$pkgdir/usr/lib/systemd/ntp-units.d"
+  echo "$pkgname.service" > "$pkgdir/usr/lib/systemd/ntp-units.d/$pkgname.list"
+}
+
+# vim:set ts=2 sw=2 et:

Deleted: community-x86_64/linux-adjtimex.patch
===================================================================
--- community-x86_64/linux-adjtimex.patch	2014-01-08 18:14:42 UTC (rev 103645)
+++ community-x86_64/linux-adjtimex.patch	2014-01-08 18:14:53 UTC (rev 103646)
@@ -1,168 +0,0 @@
-Only in openntpd-3.9p1.old: configure
-diff -ur --unidirectional-new-file openntpd-3.9p1.old/configure.ac openntpd-3.9p1/configure.ac
---- openntpd-3.9p1.old/configure.ac	2006-05-14 07:29:23.000000000 +0200
-+++ openntpd-3.9p1/configure.ac	2008-02-07 13:13:18.066366142 +0100
-@@ -583,6 +583,11 @@
- 	[ builtin_arc4random=$withval ]
- )
- 
-+AC_ARG_WITH(adjtimex,
-+	    	[  --with-adjtimex         Use adjtimex to adjust kernel skew],
-+	    	[ AC_DEFINE(USE_ADJTIMEX, [], [Use adjust skew with adjtimex (experimental)]) ]
-+	    )
-+
- AC_ARG_WITH(mantype,
- 	[  --with-mantype=man|cat|doc  Set man page type],
- 	[
-diff -ur --unidirectional-new-file openntpd-3.9p1.old/defines.h openntpd-3.9p1/defines.h
---- openntpd-3.9p1.old/defines.h	2006-05-14 07:29:21.000000000 +0200
-+++ openntpd-3.9p1/defines.h	2008-02-07 13:14:34.488711868 +0100
-@@ -20,6 +20,10 @@
- # define setproctitle(x)
- #endif
- 
-+#ifdef USE_ADJTIMEX
-+# define adjtime(a,b)	(_compat_adjtime((a),(b)))
-+#endif
-+	
- #if !defined(SA_LEN)
- # if defined(HAVE_STRUCT_SOCKADDR_SA_LEN)
- #  define SA_LEN(x)	((x)->sa_len)
-Only in openntpd-3.9p1.old: ntpd.0
-Only in openntpd-3.9p1.old: ntpd.conf.0
-diff -ur --unidirectional-new-file openntpd-3.9p1.old/openbsd-compat/Makefile.in openntpd-3.9p1/openbsd-compat/Makefile.in
---- openntpd-3.9p1.old/openbsd-compat/Makefile.in	2006-05-14 07:29:19.000000000 +0200
-+++ openntpd-3.9p1/openbsd-compat/Makefile.in	2008-02-07 13:31:39.499728930 +0100
-@@ -9,7 +9,7 @@
- COMPAT=		atomicio.o bsd-arc4random.o bsd-misc.o bsd-poll.o \
- 		bsd-snprintf.o bsd-getifaddrs.o bsd-setresuid.o \
- 		bsd-setresgid.o fake-rfc2553.o
--PORT=		port-qnx.o
-+PORT=		port-linux.o port-qnx.o
- 
- VPATH=@srcdir@
- CC=@CC@
-diff -ur --unidirectional-new-file openntpd-3.9p1.old/openbsd-compat/openbsd-compat.h openntpd-3.9p1/openbsd-compat/openbsd-compat.h
---- openntpd-3.9p1.old/openbsd-compat/openbsd-compat.h	2006-05-14 07:29:19.000000000 +0200
-+++ openntpd-3.9p1/openbsd-compat/openbsd-compat.h	2008-02-07 13:17:00.272366764 +0100
-@@ -46,6 +46,11 @@
-                 __attribute__((__format__ (printf, 2, 3)));
- #endif
- 
-+#ifdef USE_ADJTIMEX
-+# include <sys/time.h>
-+int _compat_adjtime(const struct timeval *, struct timeval *);
-+#endif
-+
- #ifndef HAVE_INET_PTON
- int inet_pton(int, const char *, void *);
- #endif
-diff -ur --unidirectional-new-file openntpd-3.9p1.old/openbsd-compat/port-linux.c openntpd-3.9p1/openbsd-compat/port-linux.c
---- openntpd-3.9p1.old/openbsd-compat/port-linux.c	1970-01-01 01:00:00.000000000 +0100
-+++ openntpd-3.9p1/openbsd-compat/port-linux.c	2008-02-07 13:24:43.800366563 +0100
-@@ -0,0 +1,105 @@
-+
-+
-+/*
-+ * Copyright (c) 2004 Darren Tucker <dtucker at zip com au>
-+ *
-+ * Permission to use, copy, modify, and distribute this software for any
-+ * purpose with or without fee is hereby granted, provided that the above
-+ * copyright notice and this permission notice appear in all copies.
-+ *
-+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
-+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
-+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
-+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
-+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-+ */
-+
-+#include "includes.h"
-+
-+#ifdef USE_ADJTIMEX
-+#include <sys/timex.h>
-+#include <errno.h>
-+#ifdef adjtime
-+# undef adjtime
-+#endif
-+
-+#include "ntpd.h"
-+
-+/* scale factor used by adjtimex freq param.  1 ppm = 65536 */
-+#define ADJTIMEX_FREQ_SCALE 65536
-+
-+/* maximum change to skew per adjustment, in PPM */
-+#define MAX_SKEW_DELTA 5.0
-+
-+int
-+_compat_adjtime(const struct timeval *delta, struct timeval *olddelta)
-+{
-+	static struct timeval tlast = {0,0};
-+	static double tskew = 0;
-+	static int synced = -1;
-+	struct timeval tnow, tdelta;
-+	double skew = 0, newskew, deltaskew, adjust, interval = 0;
-+	struct timex tmx;
-+	int result, saved_errno;
-+
-+	gettimeofday(&tnow, NULL);
-+	adjust = (double)delta->tv_sec;
-+	adjust += (double)delta->tv_usec / 1000000;
-+
-+	/* Even if the caller doesn't care about the olddelta, we do */
-+	if (olddelta == NULL)
-+		olddelta = &tdelta;
-+
-+	result = adjtime(delta, olddelta);
-+	saved_errno = errno;
-+
-+	if (olddelta->tv_sec == 0 && olddelta->tv_usec == 0 &&
-+	    synced != INT_MAX)
-+		synced++;
-+	 else
-+		synced = 0;
-+
-+	/*
-+	 * do skew calculations if we have synced
-+	 */
-+	if (synced == 0 ) {
-+		tmx.modes = 0;
-+		if (adjtimex(&tmx) == -1)
-+			log_warn("adjtimex get failed");
-+		else
-+			tskew = (double)tmx.freq / ADJTIMEX_FREQ_SCALE;
-+	} else if (synced >= 1) {
-+		interval = (double)(tnow.tv_sec - tlast.tv_sec);
-+		interval += (double)(tnow.tv_usec - tlast.tv_usec) / 1000000;
-+
-+		skew = (adjust * 1000000) / interval;
-+		newskew = ((tskew * synced) + skew) / synced;
-+		deltaskew = newskew - tskew;
-+
-+		if (deltaskew > MAX_SKEW_DELTA) {
-+			log_info("skew change %0.3lf exceeds limit", deltaskew);
-+			tskew += MAX_SKEW_DELTA;
-+		} else if (deltaskew < -MAX_SKEW_DELTA) {
-+			log_info("skew change %0.3lf exceeds limit", deltaskew);
-+			tskew -= MAX_SKEW_DELTA;
-+		} else {
-+			tskew = newskew;
-+		}
-+
-+		/* Adjust the kernel skew.  */
-+		tmx.freq = (long)(tskew * ADJTIMEX_FREQ_SCALE);
-+		tmx.modes = ADJ_FREQUENCY;
-+		if (adjtimex(&tmx) == -1)
-+			log_warn("adjtimex set freq failed");
-+	}
-+
-+	log_debug("interval %0.3lf skew %0.3lf total skew %0.3lf", interval,
-+	    skew, tskew);
-+
-+	tlast = tnow;
-+	errno = saved_errno;
-+	return result;
-+}
-+#endif

Copied: openntpd/repos/community-x86_64/linux-adjtimex.patch (from rev 103645, openntpd/trunk/linux-adjtimex.patch)
===================================================================
--- community-x86_64/linux-adjtimex.patch	                        (rev 0)
+++ community-x86_64/linux-adjtimex.patch	2014-01-08 18:14:53 UTC (rev 103646)
@@ -0,0 +1,168 @@
+Only in openntpd-3.9p1.old: configure
+diff -ur --unidirectional-new-file openntpd-3.9p1.old/configure.ac openntpd-3.9p1/configure.ac
+--- openntpd-3.9p1.old/configure.ac	2006-05-14 07:29:23.000000000 +0200
++++ openntpd-3.9p1/configure.ac	2008-02-07 13:13:18.066366142 +0100
+@@ -583,6 +583,11 @@
+ 	[ builtin_arc4random=$withval ]
+ )
+ 
++AC_ARG_WITH(adjtimex,
++	    	[  --with-adjtimex         Use adjtimex to adjust kernel skew],
++	    	[ AC_DEFINE(USE_ADJTIMEX, [], [Use adjust skew with adjtimex (experimental)]) ]
++	    )
++
+ AC_ARG_WITH(mantype,
+ 	[  --with-mantype=man|cat|doc  Set man page type],
+ 	[
+diff -ur --unidirectional-new-file openntpd-3.9p1.old/defines.h openntpd-3.9p1/defines.h
+--- openntpd-3.9p1.old/defines.h	2006-05-14 07:29:21.000000000 +0200
++++ openntpd-3.9p1/defines.h	2008-02-07 13:14:34.488711868 +0100
+@@ -20,6 +20,10 @@
+ # define setproctitle(x)
+ #endif
+ 
++#ifdef USE_ADJTIMEX
++# define adjtime(a,b)	(_compat_adjtime((a),(b)))
++#endif
++	
+ #if !defined(SA_LEN)
+ # if defined(HAVE_STRUCT_SOCKADDR_SA_LEN)
+ #  define SA_LEN(x)	((x)->sa_len)
+Only in openntpd-3.9p1.old: ntpd.0
+Only in openntpd-3.9p1.old: ntpd.conf.0
+diff -ur --unidirectional-new-file openntpd-3.9p1.old/openbsd-compat/Makefile.in openntpd-3.9p1/openbsd-compat/Makefile.in
+--- openntpd-3.9p1.old/openbsd-compat/Makefile.in	2006-05-14 07:29:19.000000000 +0200
++++ openntpd-3.9p1/openbsd-compat/Makefile.in	2008-02-07 13:31:39.499728930 +0100
+@@ -9,7 +9,7 @@
+ COMPAT=		atomicio.o bsd-arc4random.o bsd-misc.o bsd-poll.o \
+ 		bsd-snprintf.o bsd-getifaddrs.o bsd-setresuid.o \
+ 		bsd-setresgid.o fake-rfc2553.o
+-PORT=		port-qnx.o
++PORT=		port-linux.o port-qnx.o
+ 
+ VPATH=@srcdir@
+ CC=@CC@
+diff -ur --unidirectional-new-file openntpd-3.9p1.old/openbsd-compat/openbsd-compat.h openntpd-3.9p1/openbsd-compat/openbsd-compat.h
+--- openntpd-3.9p1.old/openbsd-compat/openbsd-compat.h	2006-05-14 07:29:19.000000000 +0200
++++ openntpd-3.9p1/openbsd-compat/openbsd-compat.h	2008-02-07 13:17:00.272366764 +0100
+@@ -46,6 +46,11 @@
+                 __attribute__((__format__ (printf, 2, 3)));
+ #endif
+ 
++#ifdef USE_ADJTIMEX
++# include <sys/time.h>
++int _compat_adjtime(const struct timeval *, struct timeval *);
++#endif
++
+ #ifndef HAVE_INET_PTON
+ int inet_pton(int, const char *, void *);
+ #endif
+diff -ur --unidirectional-new-file openntpd-3.9p1.old/openbsd-compat/port-linux.c openntpd-3.9p1/openbsd-compat/port-linux.c
+--- openntpd-3.9p1.old/openbsd-compat/port-linux.c	1970-01-01 01:00:00.000000000 +0100
++++ openntpd-3.9p1/openbsd-compat/port-linux.c	2008-02-07 13:24:43.800366563 +0100
+@@ -0,0 +1,105 @@
++
++
++/*
++ * Copyright (c) 2004 Darren Tucker <dtucker at zip com au>
++ *
++ * Permission to use, copy, modify, and distribute this software for any
++ * purpose with or without fee is hereby granted, provided that the above
++ * copyright notice and this permission notice appear in all copies.
++ *
++ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
++ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
++ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
++ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
++ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
++ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
++ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
++ */
++
++#include "includes.h"
++
++#ifdef USE_ADJTIMEX
++#include <sys/timex.h>
++#include <errno.h>
++#ifdef adjtime
++# undef adjtime
++#endif
++
++#include "ntpd.h"
++
++/* scale factor used by adjtimex freq param.  1 ppm = 65536 */
++#define ADJTIMEX_FREQ_SCALE 65536
++
++/* maximum change to skew per adjustment, in PPM */
++#define MAX_SKEW_DELTA 5.0
++
++int
++_compat_adjtime(const struct timeval *delta, struct timeval *olddelta)
++{
++	static struct timeval tlast = {0,0};
++	static double tskew = 0;
++	static int synced = -1;
++	struct timeval tnow, tdelta;
++	double skew = 0, newskew, deltaskew, adjust, interval = 0;
++	struct timex tmx;
++	int result, saved_errno;
++
++	gettimeofday(&tnow, NULL);
++	adjust = (double)delta->tv_sec;
++	adjust += (double)delta->tv_usec / 1000000;
++
++	/* Even if the caller doesn't care about the olddelta, we do */
++	if (olddelta == NULL)
++		olddelta = &tdelta;
++
++	result = adjtime(delta, olddelta);
++	saved_errno = errno;
++
++	if (olddelta->tv_sec == 0 && olddelta->tv_usec == 0 &&
++	    synced != INT_MAX)
++		synced++;
++	 else
++		synced = 0;
++
++	/*
++	 * do skew calculations if we have synced
++	 */
++	if (synced == 0 ) {
++		tmx.modes = 0;
++		if (adjtimex(&tmx) == -1)
++			log_warn("adjtimex get failed");
++		else
++			tskew = (double)tmx.freq / ADJTIMEX_FREQ_SCALE;
++	} else if (synced >= 1) {
++		interval = (double)(tnow.tv_sec - tlast.tv_sec);
++		interval += (double)(tnow.tv_usec - tlast.tv_usec) / 1000000;
++
++		skew = (adjust * 1000000) / interval;
++		newskew = ((tskew * synced) + skew) / synced;
++		deltaskew = newskew - tskew;
++
++		if (deltaskew > MAX_SKEW_DELTA) {
++			log_info("skew change %0.3lf exceeds limit", deltaskew);
++			tskew += MAX_SKEW_DELTA;
++		} else if (deltaskew < -MAX_SKEW_DELTA) {
++			log_info("skew change %0.3lf exceeds limit", deltaskew);
++			tskew -= MAX_SKEW_DELTA;
++		} else {
++			tskew = newskew;
++		}
++
++		/* Adjust the kernel skew.  */
++		tmx.freq = (long)(tskew * ADJTIMEX_FREQ_SCALE);
++		tmx.modes = ADJ_FREQUENCY;
++		if (adjtimex(&tmx) == -1)
++			log_warn("adjtimex set freq failed");
++	}
++
++	log_debug("interval %0.3lf skew %0.3lf total skew %0.3lf", interval,
++	    skew, tskew);
++
++	tlast = tnow;
++	errno = saved_errno;
++	return result;
++}
++#endif

Deleted: community-x86_64/openntpd.install
===================================================================
--- community-x86_64/openntpd.install	2014-01-08 18:14:42 UTC (rev 103645)
+++ community-x86_64/openntpd.install	2014-01-08 18:14:53 UTC (rev 103646)
@@ -1,15 +0,0 @@
-post_install() {
-  getent group ntp &>/dev/null || groupadd -g 87 ntp >/dev/null
-  getent passwd ntp &>/dev/null || useradd -u 87 -g ntp -d /var/lib/ntp -c 'Network Time Protocol' -s /bin/false ntp >/dev/null
-
-  systemd-tmpfiles --create openntpd.conf
-  true
-}
-
-post_remove() {
-  getent passwd ntp &>/dev/null && userdel ntp >/dev/null
-  getent group ntp &>/dev/null && groupdel ntp >/dev/null
-  true
-}
-
-# vim: ts=2 sw=2 et ft=sh

Copied: openntpd/repos/community-x86_64/openntpd.install (from rev 103645, openntpd/trunk/openntpd.install)
===================================================================
--- community-x86_64/openntpd.install	                        (rev 0)
+++ community-x86_64/openntpd.install	2014-01-08 18:14:53 UTC (rev 103646)
@@ -0,0 +1,15 @@
+post_install() {
+  getent group ntp &>/dev/null || groupadd -g 87 ntp >/dev/null
+  getent passwd ntp &>/dev/null || useradd -u 87 -g ntp -d /var/lib/ntp -c 'Network Time Protocol' -s /bin/false ntp >/dev/null
+
+  systemd-tmpfiles --create openntpd.conf
+  true
+}
+
+post_remove() {
+  getent passwd ntp &>/dev/null && userdel ntp >/dev/null
+  getent group ntp &>/dev/null && groupdel ntp >/dev/null
+  true
+}
+
+# vim: ts=2 sw=2 et ft=sh

Deleted: community-x86_64/openntpd.service
===================================================================
--- community-x86_64/openntpd.service	2014-01-08 18:14:42 UTC (rev 103645)
+++ community-x86_64/openntpd.service	2014-01-08 18:14:53 UTC (rev 103646)
@@ -1,10 +0,0 @@
-[Unit]
-Description=OpenNTP Daemon
-After=network.target
-
-[Service]
-Type=forking
-ExecStart=/usr/bin/ntpd -s
-
-[Install]
-WantedBy=multi-user.target

Copied: openntpd/repos/community-x86_64/openntpd.service (from rev 103645, openntpd/trunk/openntpd.service)
===================================================================
--- community-x86_64/openntpd.service	                        (rev 0)
+++ community-x86_64/openntpd.service	2014-01-08 18:14:53 UTC (rev 103646)
@@ -0,0 +1,10 @@
+[Unit]
+Description=OpenNTP Daemon
+After=network.target
+
+[Service]
+Type=forking
+ExecStart=/usr/bin/ntpd -s
+
+[Install]
+WantedBy=multi-user.target

Deleted: community-x86_64/openntpd.tmpfiles
===================================================================
--- community-x86_64/openntpd.tmpfiles	2014-01-08 18:14:42 UTC (rev 103645)
+++ community-x86_64/openntpd.tmpfiles	2014-01-08 18:14:53 UTC (rev 103646)
@@ -1 +0,0 @@
-d /run/openntpd 0755 root root -

Copied: openntpd/repos/community-x86_64/openntpd.tmpfiles (from rev 103645, openntpd/trunk/openntpd.tmpfiles)
===================================================================
--- community-x86_64/openntpd.tmpfiles	                        (rev 0)
+++ community-x86_64/openntpd.tmpfiles	2014-01-08 18:14:53 UTC (rev 103646)
@@ -0,0 +1 @@
+d /run/openntpd 0755 root root -




More information about the arch-commits mailing list