summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorClaus Strasburger2019-06-04 21:52:56 +0200
committerClaus Strasburger2019-06-04 22:01:26 +0200
commitc1b5cd207c7fa1708263f6614a2efe992a4899e7 (patch)
tree90c44e090d618576964b8fb933335ba60f01ab5a
downloadaur-c1b5cd207c7fa1708263f6614a2efe992a4899e7.tar.gz
initial from ABS
-rw-r--r--.SRCINFO25
-rw-r--r--PKGBUILD48
-rw-r--r--ntp.conf24
-rw-r--r--ntp.sysusers2
-rw-r--r--ntpd.service13
-rw-r--r--ntpdate.service12
6 files changed, 124 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..2be4951d0cb0
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,25 @@
+pkgbase = ntp-allclocks
+ pkgdesc = Network Time Protocol reference implementation
+ pkgver = 4.2.8.p13
+ pkgrel = 2
+ url = http://www.ntp.org/
+ arch = x86_64
+ license = custom
+ depends = openssl
+ depends = libcap
+ depends = libedit
+ options = !emptydirs
+ backup = etc/ntp.conf
+ source = https://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-4.2/ntp-4.2.8p13.tar.gz
+ source = ntp.conf
+ source = ntpd.service
+ source = ntpdate.service
+ source = ntp.sysusers
+ sha1sums = cff200a987d64e891fb349a22313ecb0feaea090
+ sha1sums = ad1d6ee2e9aca64a84a7224c88bf6008ac6c69e1
+ sha1sums = 0cccca872385e0142888ab48d273fec0669b30a8
+ sha1sums = 059b382d1af0c55202e2d17f2ae065a2cbfec9ee
+ sha1sums = e8d1c895eabeb45b1a5f096fa5fc3c088eb3ee71
+
+pkgname = ntp-allclocks
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..0f7297dc2f0d
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,48 @@
+# Maintainer: Lukas Fleischer <lfleischer@archlinux.org>
+# Contributor: Gaetan Bisson <bisson@archlinux.org>
+# Contributor: kevin <kevin@archlinux.org>
+
+pkgname=ntp
+_pkgname=ntp #-dev
+_pkgver=4.2.8p13
+pkgver=${_pkgver/p/.p}
+pkgrel=2
+pkgdesc='Network Time Protocol reference implementation'
+url='http://www.ntp.org/'
+license=('custom')
+arch=('x86_64')
+depends=('openssl' 'libcap' 'libedit')
+backup=('etc/ntp.conf')
+source=("https://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-4.2/${_pkgname}-${_pkgver}.tar.gz"
+ 'ntp.conf'
+ 'ntpd.service'
+ 'ntpdate.service'
+ 'ntp.sysusers')
+sha1sums=('cff200a987d64e891fb349a22313ecb0feaea090'
+ 'ad1d6ee2e9aca64a84a7224c88bf6008ac6c69e1'
+ '0cccca872385e0142888ab48d273fec0669b30a8'
+ '059b382d1af0c55202e2d17f2ae065a2cbfec9ee'
+ 'e8d1c895eabeb45b1a5f096fa5fc3c088eb3ee71')
+options=('!emptydirs')
+
+build() {
+ cd "${srcdir}/${_pkgname}-${_pkgver}"
+
+ ./configure --prefix=/usr --libexecdir=/usr/lib --enable-linuxcaps --enable-ntp-signd
+ 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 ../ntp.sysusers "${pkgdir}"/usr/lib/sysusers.d/ntp.conf
+ 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..4debe96182e3
--- /dev/null
+++ b/ntp.conf
@@ -0,0 +1,24 @@
+# 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 Arch's NTP pool
+server 0.arch.pool.ntp.org
+server 1.arch.pool.ntp.org
+server 2.arch.pool.ntp.org
+server 3.arch.pool.ntp.org
+
+# 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
diff --git a/ntp.sysusers b/ntp.sysusers
new file mode 100644
index 000000000000..39ffef248c2b
--- /dev/null
+++ b/ntp.sysusers
@@ -0,0 +1,2 @@
+g ntp 87 -
+u ntp 87 "Network Time Protocol" /var/lib/ntp /bin/false
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