summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorTimothy2019-04-20 22:39:47 +0000
committerTimothy2019-04-20 22:39:47 +0000
commit298d538aceeac3a6239f1fea1fc1dbfc97f00f0c (patch)
tree2a3565e89b815b9643ca64e2dc9a73680b699160
parentcf2494fe542e4859b5fdfe18dc445904c670163b (diff)
downloadaur-298d538aceeac3a6239f1fea1fc1dbfc97f00f0c.tar.gz
Further updated PKGBUILD to bring it inline with the base ntpsec package: Installs default config files, sets up system user, adds Arch Linux pools to config and no longer manually installs systemd service
-rw-r--r--.SRCINFO6
-rw-r--r--PKGBUILD15
-rw-r--r--ntpsec.sysusers2
-rw-r--r--use-arch-pool.patch16
4 files changed, 32 insertions, 7 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 3e71f150531..822f7b38ad1 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = ntpsec-git
pkgdesc = Security-hardened Network Time Protocol implementation (Git HEAD)
pkgver = 1.1.3.r478.31d756bcb
- pkgrel = 1
+ pkgrel = 2
url = https://www.ntpsec.org/
arch = i686
arch = x86_64
@@ -15,6 +15,7 @@ pkgbase = ntpsec-git
makedepends = pps-tools
makedepends = w3m
depends = avahi
+ depends = libbsd
depends = libseccomp
depends = python
optdepends = gnuplot: for ntpviz
@@ -25,8 +26,9 @@ pkgbase = ntpsec-git
provides = ntpsec
conflicts = ntp
conflicts = ntpsec
+ backup = etc/ntp.d/default.conf
+ backup = etc/ntp.d/use-pool
source = git+https://gitlab.com/NTPsec/ntpsec.git
- validpgpkeys = DA3FDF774CC70FA64729EC4505D9B371477C7528
sha512sums = SKIP
pkgname = ntpsec-git
diff --git a/PKGBUILD b/PKGBUILD
index 1a39c02483e..196b0b2164b 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -3,12 +3,12 @@
pkgname=ntpsec-git
pkgver=1.1.3.r478.31d756bcb
-pkgrel=1
+pkgrel=2
pkgdesc="Security-hardened Network Time Protocol implementation (Git HEAD)"
arch=('i686' 'x86_64' 'arm' 'armv6h' 'armv7h' 'aarch64')
url="https://www.ntpsec.org/"
license=('custom')
-depends=('avahi' 'libseccomp' 'python')
+depends=('avahi' 'libbsd' 'libseccomp' 'python')
makedepends=('asciidoc' 'git' 'pps-tools' 'w3m')
optdepends=('gnuplot: for ntpviz'
'libevent: for ntpdig'
@@ -18,7 +18,8 @@ provides=('ntp' 'ntpsec')
conflicts=('ntp' 'ntpsec')
source=("git+https://gitlab.com/NTPsec/ntpsec.git")
sha512sums=('SKIP')
-validpgpkeys=('DA3FDF774CC70FA64729EC4505D9B371477C7528')
+backup=('etc/ntp.d/default.conf'
+ 'etc/ntp.d/use-pool')
pkgver() {
cd "${pkgname%%-git}"
@@ -28,7 +29,7 @@ pkgver() {
prepare() {
cd "${pkgname%%-git}"
- for patch in ../*.patch; do
+ for patch in ../../*.patch; do
if [ ! -f "$patch" ]; then
break;
else
@@ -56,6 +57,10 @@ package() {
./waf install --destdir="$pkgdir/"
install -Dm 644 etc/logrotate-config.ntpd "$pkgdir/etc/logrotate.d/ntpd"
- install -Dm 644 etc/ntpd.service "$pkgdir/usr/lib/systemd/system/ntpd.service"
install -Dm 644 docs/copyright.text "$pkgdir/usr/share/licenses/${pkgname}/COPYING"
+ install -Dm 644 ../../ntpsec.sysusers "$pkgdir/usr/lib/sysusers.d/ntpsec.conf"
+ install -dm 700 -g 212 -o 212 "$pkgdir/var/lib/ntp"
+ for configfile in etc/ntp.d/*; do
+ install -Dm 644 "$configfile" "$pkgdir/$configfile"
+ done
} \ No newline at end of file
diff --git a/ntpsec.sysusers b/ntpsec.sysusers
new file mode 100644
index 00000000000..a8f99818cce
--- /dev/null
+++ b/ntpsec.sysusers
@@ -0,0 +1,2 @@
+g ntp 212
+u ntp 212 "NTP system user" /var/lib/ntp
diff --git a/use-arch-pool.patch b/use-arch-pool.patch
new file mode 100644
index 00000000000..716a516c134
--- /dev/null
+++ b/use-arch-pool.patch
@@ -0,0 +1,16 @@
+diff -ruN ntpsec-1.1.2.old/etc/ntp.d/use-pool ntpsec-1.1.2/etc/ntp.d/use-pool
+--- ntpsec-1.1.2.old/etc/ntp.d/use-pool 2018-09-16 21:36:46.765346436 -0400
++++ ntpsec-1.1.2/etc/ntp.d/use-pool 2018-09-16 21:38:01.871168699 -0400
+@@ -28,7 +28,11 @@
+ # Alternatively, if you are running Linux your distribution may have
+ # a designated pool disparcher, e.g. ubuntu.pool.ntp.org
+ #
+-pool pool.ntp.org iburst
++pool 0.arch.pool.ntp.org iburst
++pool 1.arch.pool.ntp.org iburst
++pool 2.arch.pool.ntp.org iburst
++pool 3.arch.pool.ntp.org iburst
++
+
+ # The following sets edit modes for GNU EMACS
+ # Local Variables: