From: Victor Martinez Date: Sat, 19 Mar 2016 19:31:21 +0000 (+0100) Subject: openrdate: overlayed with ntp.patch (thanks tilman) X-Git-Url: http://gitweb/?a=commitdiff_plain;h=c05b4f57b1cce7709de27b75062572de2d3d2c56;p=ports%2Fcore-arm.git openrdate: overlayed with ntp.patch (thanks tilman) --- diff --git a/openrdate/.footprint b/openrdate/.footprint new file mode 100644 index 0000000..cb3fa65 --- /dev/null +++ b/openrdate/.footprint @@ -0,0 +1,11 @@ +drwxr-xr-x root/root etc/ +drwxr-xr-x root/root etc/cron/ +drwxr-xr-x root/root etc/cron/daily/ +-rwxr-xr-x root/root etc/cron/daily/rdate +drwxr-xr-x root/root usr/ +drwxr-xr-x root/root usr/bin/ +-rwxr-xr-x root/root usr/bin/rdate +drwxr-xr-x root/root usr/share/ +drwxr-xr-x root/root usr/share/man/ +drwxr-xr-x root/root usr/share/man/man8/ +-rw-r--r-- root/root usr/share/man/man8/rdate.8.gz diff --git a/openrdate/.md5sum b/openrdate/.md5sum new file mode 100644 index 0000000..bbf2a7e --- /dev/null +++ b/openrdate/.md5sum @@ -0,0 +1,3 @@ +5a84634e148e20b426d4d0ef0cddaf7d ntp.patch +ad9bd58e1fb7babc74d0a0a16a1248a2 openrdate-1.2.tar.gz +c212d60bdabec86c27d82b1a19223aa0 rdate diff --git a/openrdate/Pkgfile b/openrdate/Pkgfile new file mode 100644 index 0000000..9b422a5 --- /dev/null +++ b/openrdate/Pkgfile @@ -0,0 +1,18 @@ +# Description: Time setting software implementing RFC 868 (inetd time) and RFC 2030 (SNTP/NTP) protocols +# URL: http://sourceforge.net/projects/openrdate/ +# Maintainer: CRUX System Team, core-ports at crux dot nu + +name=openrdate +version=1.2 +release=2 +source=(http://downloads.sourceforge.net/project/$name/$name/$name-$version.tar.gz/$name-$version.tar.gz + rdate ntp.patch) + +build() { + cd $name-$version + patch -p1 -i $SRC/ntp.patch + ./configure --prefix=/usr + make + make DESTDIR=$PKG install + install -D -m 755 $SRC/rdate $PKG/etc/cron/daily/rdate +} diff --git a/openrdate/ntp.patch b/openrdate/ntp.patch new file mode 100644 index 0000000..7d45c3e --- /dev/null +++ b/openrdate/ntp.patch @@ -0,0 +1,13 @@ +Binary files openrdate-1.2.orig/src/.ntp.c.un~ and openrdate-1.2/src/.ntp.c.un~ differ +diff -pruN openrdate-1.2.orig/src/ntp.c openrdate-1.2/src/ntp.c +--- openrdate-1.2.orig/src/ntp.c 2016-03-19 20:09:34.688371763 +0100 ++++ openrdate-1.2/src/ntp.c 2016-03-19 20:10:02.538357136 +0100 +@@ -429,7 +429,7 @@ unpack_ntp(struct ntp_data *data, u_char + data->transmit = d / NTP_SCALE; + + /* See write_packet for why this isn't an endian problem. */ +- data->recvck = *(u_int64_t *)(packet + NTP_ORIGINATE); ++ memcpy(&data->recvck, (packet + NTP_ORIGINATE), sizeof(data->recvck)); + } + + /* diff --git a/openrdate/rdate b/openrdate/rdate new file mode 100644 index 0000000..1e9218b --- /dev/null +++ b/openrdate/rdate @@ -0,0 +1,13 @@ +#!/bin/sh +# +# /etc/cron/daily/rdate: synchronize system clock +# +# Note: +# If called with the -a option, rdate use the adjtime +# system call instead of settimeofday to gradually skew +# the local time to the remote time rather than just +# hopping. See rdate(8) and adjtime(2). + +#/usr/bin/rdate -nav pool.ntp.org + +# End of file