diff options
author | Thai Chung | 2017-08-02 18:01:54 +0200 |
---|---|---|
committer | Thai Chung | 2017-08-02 18:05:17 +0200 |
commit | 28398ec06e648af677cf20e108062fef7d9b2384 (patch) | |
tree | c692d9fc567c534a10ae859e31168dbf85748145 | |
download | aur-28398ec06e648af677cf20e108062fef7d9b2384.tar.gz |
ntp-4.2.8p10
-rw-r--r-- | .SRCINFO | 27 | ||||
-rw-r--r-- | PKGBUILD | 50 | ||||
-rw-r--r-- | ntp.conf | 29 | ||||
-rw-r--r-- | ntp.install | 5 | ||||
-rw-r--r-- | ntpd.service | 13 | ||||
-rw-r--r-- | ntpdate.service | 12 |
6 files changed, 136 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..c4eb5720f788 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,27 @@ +pkgbase = ntp-smeared + pkgdesc = Network Time Protocol reference implementation with enabled smearing + pkgver = 4.2.8.p10 + pkgrel = 2 + url = http://www.ntp.org/ + install = ntp.install + arch = i686 + arch = x86_64 + license = custom + depends = openssl + depends = libcap + depends = libedit + provides = ntp + conflicts = ntp + options = !emptydirs + backup = etc/ntp.conf + source = https://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-4.2/ntp-4.2.8p10.tar.gz + source = ntp.conf + source = ntpd.service + source = ntpdate.service + sha1sums = 503d68cfd3e6a9354e0e28dd38b39d850b1228b2 + sha1sums = ffb67177707c86c632ecc2fbe1bc4f903fc498fb + sha1sums = 0cccca872385e0142888ab48d273fec0669b30a8 + sha1sums = 059b382d1af0c55202e2d17f2ae065a2cbfec9ee + +pkgname = ntp-smeared + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..36c51eb118fc --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,50 @@ +# Maintainer: “0xReki” <mail@0xReki.de> +# Contributor: Lukas Fleischer <lfleischer@archlinux.org> +# Contributor: Gaetan Bisson <bisson@archlinux.org> +# Contributor: kevin <kevin@archlinux.org> + +pkgname=ntp-smeared +_pkgname=ntp #-dev +_pkgver=4.2.8p10 +pkgver=${_pkgver/p/.p} +pkgrel=2 +pkgdesc='Network Time Protocol reference implementation with enabled smearing' +url='http://www.ntp.org/' +license=('custom') +arch=('i686' 'x86_64') +depends=('openssl' 'libcap' 'libedit') +backup=('etc/ntp.conf') +conflicts=('ntp') +provides=('ntp') +source=("https://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-4.2/${_pkgname}-${_pkgver}.tar.gz" + 'ntp.conf' + 'ntpd.service' + 'ntpdate.service') +sha1sums=('503d68cfd3e6a9354e0e28dd38b39d850b1228b2' + 'ffb67177707c86c632ecc2fbe1bc4f903fc498fb' + '0cccca872385e0142888ab48d273fec0669b30a8' + '059b382d1af0c55202e2d17f2ae065a2cbfec9ee') + +options=('!emptydirs') +install=ntp.install + +build() { + cd "${srcdir}/${_pkgname}-${_pkgver}" + + ./configure --prefix=/usr --libexecdir=/usr/lib --enable-linuxcaps --enable-ntp-signd --enable-leap-smear + make +} + +package() { + cd "${srcdir}/${_pkgname}-${_pkgver}" + + make DESTDIR="${pkgdir}" install + + install -Dm644 ../ntp.conf "${pkgdir}"/etc/ntp.conf + install -Dm644 ../ntpd.service "${pkgdir}"/usr/lib/systemd/system/ntpd.service + install -Dm644 ../ntpdate.service "${pkgdir}"/usr/lib/systemd/system/ntpdate.service + install -Dm644 COPYRIGHT "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" + + install -d -o 87 "${pkgdir}"/var/lib/ntp + echo > "${pkgdir}/var/lib/ntp/.placeholder" +} diff --git a/ntp.conf b/ntp.conf new file mode 100644 index 000000000000..2ed319bc6983 --- /dev/null +++ b/ntp.conf @@ -0,0 +1,29 @@ +# Please consider joining the pool: +# +# http://www.pool.ntp.org/join.html +# +# For additional information see: +# - https://wiki.archlinux.org/index.php/Network_Time_Protocol_daemon +# - http://support.ntp.org/bin/view/Support/GettingStarted +# - the ntp.conf man page + +# Associate to Google's smeared NTP pool +server time1.google.com iburst +server time2.google.com iburst +server time3.google.com iburst +server time4.google.com iburst + +# By default, the server allows: +# - all queries from the local host +# - only time queries from remote hosts, protected by rate limiting and kod +restrict default kod limited nomodify nopeer noquery notrap +restrict 127.0.0.1 +restrict ::1 + + +# Location of drift file +driftfile /var/lib/ntp/ntp.drift + +# Enable smearing +leapsmearinterval 86400 + diff --git a/ntp.install b/ntp.install new file mode 100644 index 000000000000..4df9f78543bb --- /dev/null +++ b/ntp.install @@ -0,0 +1,5 @@ +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 + true +} diff --git a/ntpd.service b/ntpd.service new file mode 100644 index 000000000000..267615cb96de --- /dev/null +++ b/ntpd.service @@ -0,0 +1,13 @@ +[Unit] +Description=Network Time Service +After=network.target nss-lookup.target +Conflicts=systemd-timesyncd.service + +[Service] +Type=forking +PrivateTmp=true +ExecStart=/usr/bin/ntpd -g -u ntp:ntp +Restart=always + +[Install] +WantedBy=multi-user.target diff --git a/ntpdate.service b/ntpdate.service new file mode 100644 index 000000000000..e85852e276cb --- /dev/null +++ b/ntpdate.service @@ -0,0 +1,12 @@ +[Unit] +Description=One-Shot Network Time Service +After=network.target nss-lookup.target +Before=ntpd.service + +[Service] +Type=oneshot +PrivateTmp=true +ExecStart=/usr/bin/ntpd -q -n -g -u ntp:ntp + +[Install] +WantedBy=multi-user.target |