summaryrefslogtreecommitdiff
path: root/extra/ntp
diff options
context:
space:
mode:
authorroot <root@rshg054.dnsready.net>2011-11-07 23:14:55 +0000
committerroot <root@rshg054.dnsready.net>2011-11-07 23:14:55 +0000
commiteffb26c3b1f00bf8bea4e2562f07f9a06eb67606 (patch)
tree428924ac7d0c871e4b7ca1fed9e221e5ef7b8081 /extra/ntp
parenta4d309341dbcd3c28ee68e818c1d5ef54114adf8 (diff)
Mon Nov 7 23:14:55 UTC 2011
Diffstat (limited to 'extra/ntp')
-rw-r--r--extra/ntp/PKGBUILD107
-rw-r--r--extra/ntp/install10
-rw-r--r--extra/ntp/ntp.conf62
-rwxr-xr-xextra/ntp/ntpd2
-rw-r--r--extra/ntp/ntpd.conf5
-rwxr-xr-xextra/ntp/ntpdate2
6 files changed, 78 insertions, 110 deletions
diff --git a/extra/ntp/PKGBUILD b/extra/ntp/PKGBUILD
index 69669c721..79bec1b56 100644
--- a/extra/ntp/PKGBUILD
+++ b/extra/ntp/PKGBUILD
@@ -1,78 +1,61 @@
-# $Id: PKGBUILD 117473 2011-04-03 17:50:26Z andrea $
-# Maintainer: kevin <kevin@archlinux.org>
+# $Id: PKGBUILD 142201 2011-11-06 05:54:25Z bisson $
+# Maintainer: Gaetan Bisson <bisson@archlinux.org>
+# Contributor: kevin <kevin@archlinux.org>
pkgname=ntp
-pkgver=4.2.6.p3
-_realver=4.2.6p3
-pkgrel=3
-pkgdesc="NTP (Network Time Protocol) tries to keep servers in sync"
-arch=(i686 x86_64)
+pkgver=4.2.6.p4
+_realver=4.2.6p4
+pkgrel=2
+pkgdesc='Network Time Protocol reference implementation'
+url='http://www.ntp.org/'
license=('custom')
-url="http://www.ntp.org/"
+arch=('i686' 'x86_64')
depends=('openssl' 'readline' 'libcap')
makedepends=('perl-html-parser')
-backup=('etc/ntp.conf' 'etc/conf.d/ntp-client.conf')
-options=('!emptydirs')
-changelog=changelog
-source=(http://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-${_realver}.tar.gz
- ntp-4.2.4-html2man.patch
- ntp.conf
- ntp-client.conf
- ntpd
- ntpdate)
-md5sums=('59876a9009b098ff59767ee45a88ebd2' '1b04e888717bb31479a6087632981723'
- '398a7f270f6ae083f47f86eb8b557a75' '58997d6cf4846d80e35a01b855376a33'
- 'bf20804e75656609e808ca21b53ea4aa' '99b49d763e5866f4f81c48d922c80b93')
+backup=('etc/ntp.conf' 'etc/conf.d/ntpd.conf')
+source=("http://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-${_realver}.tar.gz"
+ 'ntpd'
+ 'ntpdate'
+ 'ntp.conf'
+ 'ntpd.conf')
+sha1sums=('b53c4565c5d1c37494584d4fb826f82ffea285cf'
+ '97b41b8bc34f259f4e525ab2e58707c9724e72e2'
+ '63572457586379aa6bf75b6e899e71d651e643f4'
+ '6d2d234afb1db2dcb940747a62f70217246a3d13'
+ '6cfcb7bbd34499b30e31dffca2f3e1a036010271')
+
+install=install
build() {
- cd "$srcdir/$pkgname-$_realver"
- # fix man page generation
- patch -Np1 -i ../ntp-4.2.4-html2man.patch
- # configure
- export LDFLAGS="${LDFLAGS//-Wl,--as-needed}"
- # 4.2.6p3: aclocal too old, regenerate
- rm -f aclocal.m4
- libtoolize --copy --force
- ac_cv_header_dns_sd_h=0 ./configure --prefix=/usr \
- --mandir=/usr/share/man \
- --enable-linux-caps
- # build
- make
-}
+ cd "${srcdir}/${pkgname}-${_realver}"
-package() {
- cd "$srcdir/$pkgname-$_realver"
+ ./configure --prefix=/usr \
+ --mandir=/usr/share/man \
+ --enable-linux-caps \
- # install
- make DESTDIR="$pkgdir" install
+ make
+}
- # install conf files
- install -d "$pkgdir/usr/share/ntp"
- install -D -m644 conf/* "${pkgdir}/usr/share/ntp"
+package() {
+ cd "${srcdir}/${pkgname}-$_realver"
- # install launch scripts
- install -d "$pkgdir/etc/rc.d"
- install -D -m755 ${srcdir}/{ntpd,ntpdate} "$pkgdir/etc/rc.d"
+ make DESTDIR="${pkgdir}" install
- # install man pages
- cd html
- ../scripts/html2man
- sed -i 's/^[\t\ ]*$//;/./,/^$/!d' man/man*/*.[58]
- install -d "$pkgdir"/usr/share/man/man{5,8}
- install -m644 man/man5/* "$pkgdir/usr/share/man/man5/"
- install -m644 man/man8/* "$pkgdir/usr/share/man/man8/"
- mv "$pkgdir/usr/share/man/man8/ntpd.8" "$pkgdir/usr/share/man/man8/ntp-ntpd.8"
- cd ..
+ install -Dm755 ../ntpd "${pkgdir}"/etc/rc.d/ntpd
+ install -Dm755 ../ntpdate "${pkgdir}"/etc/rc.d/ntpdate
+ install -Dm644 ../ntp.conf "${pkgdir}"/etc/ntp.conf
+ install -Dm644 ../ntpd.conf "${pkgdir}"/etc/conf.d/ntpd.conf
- # install sample configs
- install -D -m644 "$srcdir/ntp.conf" "$pkgdir/etc/ntp.conf"
- install -D -m644 "$srcdir/ntp-client.conf" \
- "$pkgdir/etc/conf.d/ntp-client.conf"
+ cd html
+ ../scripts/html2man
+ install -d "${pkgdir}"/usr/share/man
+ mv man/man* "${pkgdir}"/usr/share/man
+ mv "${pkgdir}/usr/share/man/man8/ntpd.8" "${pkgdir}/usr/share/man/man8/ntp-ntpd.8" # we should ditch openntpd
+ cd ..
- # create /var/lib/ntp
- install -d "$pkgdir/var/lib/ntp"
- touch "$pkgdir/var/lib/ntp/.placeholder"
+ rmdir "${pkgdir}"/usr/{lib,sbin}
+ install -d "${pkgdir}/var/lib/ntp"
+ install -Dm644 COPYRIGHT "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
- install -Dm644 "$srcdir/$pkgname-$_realver/COPYRIGHT" \
- "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+ touch "${pkgdir}"/var/lib/ntp/.placeholder
}
diff --git a/extra/ntp/install b/extra/ntp/install
new file mode 100644
index 000000000..ad9a39d54
--- /dev/null
+++ b/extra/ntp/install
@@ -0,0 +1,10 @@
+post_upgrade() {
+ if [[ $(vercmp $2 4.2.6.p3) -le 0 ]]; then
+ cat <<EOF
+
+==> The file /etc/conf.d/ntp-client.conf has been renamed /etc/conf.d/ntpd.conf
+==> If you made changes to the former, please update the latter.
+
+EOF
+ fi
+}
diff --git a/extra/ntp/ntp.conf b/extra/ntp/ntp.conf
index 7f888e4b1..5f31fea83 100644
--- a/extra/ntp/ntp.conf
+++ b/extra/ntp/ntp.conf
@@ -1,52 +1,22 @@
-# NOTES:
-# - you should only have to update the server line below
-# - if you start getting lines like 'restrict' and 'fudge'
-# and you didnt add them, AND you run dhcpcd on your
-# network interfaces, be sure to add '-Y -N' to the
-# dhcpcd_ethX variables in /etc/conf.d/net
-
-# Name of the servers ntpd should sync with
-# Please respect the access policy as stated by the responsible person.
-#server ntp.example.tld iburst
-
-server pool.ntp.org
-
-##
-# A list of available servers can be found here:
-# http://www.pool.ntp.org/
-# http://www.pool.ntp.org/#use
-# A good way to get servers for your machine is:
-# netselect -s 3 pool.ntp.org
-##
-
-#server ntplocal.example.com prefer
-#server timeserver.example.org
-
-# Warning: Using default NTP settings will leave your NTP
-# server accessible to all hosts on the Internet.
+# With the default settings below, ntpd will only synchronize your clock.
+#
+# For details, see:
+# - the ntp.conf man page
+# - http://support.ntp.org/bin/view/Support/GettingStarted
+# - https://wiki.archlinux.org/index.php/Network_Time_Protocol_daemon
-# A default deny all (including localhost) policy
-# To use this define restrictions for all servers and clients
-#restrict default ignore
-#restrict -6 default ignore
+# Select three geolocalized NTP public servers; see http://www.pool.ntp.org/
+server 0.pool.ntp.org
+server 1.pool.ntp.org
+server 2.pool.ntp.org
-# A more open policy, allow access but deny changing the configuration
+# Only allow read-only access from localhost
restrict default nomodify nopeer
-#restrict -6 default nomodify nopeer
-
-# Allow localhost
restrict 127.0.0.1
-#restrict -6 ::1
-
-
-# To allow machines within your network to synchronize
-# their clocks with your server, but ensure they are
-# not allowed to configure the server or used as peers
-# to synchronize against, uncomment this line.
-#
-#restrict 192.168.0.0 mask 255.255.255.0 nomodify nopeer notrap
-
-# you should not need to modify the following paths
-driftfile /var/lib/ntp/ntp.drift
+# Location of drift and log files
+driftfile /var/lib/ntp/ntp.drift
+logfile /var/log/ntp.log
+# NOTE: If you run dhcpcd and have lines like 'restrict' and 'fudge' appearing
+# here, be sure to add '-Y -N' to the dhcpcd_ethX variables in /etc/conf.d/net
diff --git a/extra/ntp/ntpd b/extra/ntp/ntpd
index 825efc189..a3e886e1f 100755
--- a/extra/ntp/ntpd
+++ b/extra/ntp/ntpd
@@ -2,7 +2,7 @@
. /etc/rc.conf
. /etc/rc.d/functions
-. /etc/conf.d/ntp-client.conf
+. /etc/conf.d/ntpd.conf
PIDFILE="/var/run/ntpd/ntpd.pid"
PID=$(cat $PIDFILE 2> /dev/null)
diff --git a/extra/ntp/ntpd.conf b/extra/ntp/ntpd.conf
new file mode 100644
index 000000000..e728db579
--- /dev/null
+++ b/extra/ntp/ntpd.conf
@@ -0,0 +1,5 @@
+# client options for "ntpd -q" - ntpdate equivalent
+NTP_CLIENT_OPTION="-g"
+
+# arguments passed to ntpd when started
+NTPD_ARGS="-g"
diff --git a/extra/ntp/ntpdate b/extra/ntp/ntpdate
index 99508f4fd..4f7c8375b 100755
--- a/extra/ntp/ntpdate
+++ b/extra/ntp/ntpdate
@@ -2,7 +2,7 @@
. /etc/rc.conf
. /etc/rc.d/functions
-. /etc/conf.d/ntp-client.conf
+. /etc/conf.d/ntpd.conf
case "$1" in
start)