[arch-commits] Commit in nsd/trunk (PKGBUILD install service sysusers.d)

Gaëtan Bisson bisson at archlinux.org
Sat Dec 16 22:48:17 UTC 2017


    Date: Saturday, December 16, 2017 @ 22:48:16
  Author: bisson
Revision: 274618

switch to systemd-sysusers.d

Added:
  nsd/trunk/sysusers.d
Modified:
  nsd/trunk/PKGBUILD
  nsd/trunk/service
Deleted:
  nsd/trunk/install

------------+
 PKGBUILD   |   14 ++++++++------
 install    |   11 -----------
 service    |    1 +
 sysusers.d |    1 +
 4 files changed, 10 insertions(+), 17 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2017-12-16 19:28:16 UTC (rev 274617)
+++ PKGBUILD	2017-12-16 22:48:16 UTC (rev 274618)
@@ -5,7 +5,7 @@
 
 pkgname=nsd
 pkgver=4.1.19
-pkgrel=1
+pkgrel=2
 pkgdesc='Authoritative only, high performance and simple DNS server'
 url='https://www.nlnetlabs.nl/nsd/'
 license=('BSD')
@@ -15,14 +15,14 @@
 validpgpkeys=('EDFAA3F2CA4E6EB05681AF8E9F6F1C2D7E045F8D')
 source=("https://www.nlnetlabs.nl/downloads/${pkgname}/${pkgname}-${pkgver}.tar.gz"{,.asc}
         'tmpfiles.d'
+	'sysusers.d'
         'service')
 sha256sums=('b0782cb9b57416888d488b6460b071cd85ecb5f99381865b3a7f93dddf9e02c5'
             'SKIP'
             '8e72816177069d6b82306c4b61ca4d0eefd2a77a31ea79c50635eea5aecf8c5b'
-            '5ec7616df32c29ddec25a6ec772db5053e234410cf1042f2945d0f554b1f9b65')
+	    '6490660d5d4b3e28e16d73e50e35a786a41149917999939fac461ebc60465c79'
+            'ba87a4cd10395e13ffd34f42714cfd98d3818b35aa96240e28523837d109a1df')
 
-install=install
-
 build() {
 	cd "${srcdir}/${pkgname}-${pkgver}"
 	./configure \
@@ -40,12 +40,14 @@
 package() {
 	cd "${srcdir}/${pkgname}-${pkgver}"
 	make DESTDIR="${pkgdir}" install
-	install -Dm644 ../tmpfiles.d "${pkgdir}"/usr/lib/tmpfiles.d/nsd.conf
-	install -Dm644 ../service "${pkgdir}"/usr/lib/systemd/system/nsd.service
 	rmdir "${pkgdir}"/{tmp,run/{nsd,}}
+	chmod 700 "${pkgdir}"/var/db/nsd
 
 	rm doc/differences.pdf
 	install -d "${pkgdir}"/usr/share/{doc,licenses}/"${pkgname}"
 	install -m644 doc/* "${pkgdir}"/usr/share/doc/"${pkgname}"
 	ln -s ../../doc/"${pkgname}"/LICENSE "${pkgdir}"/usr/share/licenses/"${pkgname}"/LICENSE
+	install -Dm644 ../service "${pkgdir}"/usr/lib/systemd/system/nsd.service
+	install -Dm644 ../tmpfiles.d "${pkgdir}"/usr/lib/tmpfiles.d/nsd.conf
+	install -Dm644 ../sysusers.d "${pkgdir}"/usr/lib/sysusers.d/nsd.conf
 }

Deleted: install
===================================================================
--- install	2017-12-16 19:28:16 UTC (rev 274617)
+++ install	2017-12-16 22:48:16 UTC (rev 274618)
@@ -1,11 +0,0 @@
-post_upgrade() {
-	usr/bin/systemd-tmpfiles --create nsd.conf || true
-}
-
-post_install() {
-	getent group nsd &>/dev/null || groupadd -r nsd >/dev/null
-	getent passwd nsd &>/dev/null || useradd -r -g nsd -d /dev/null -s /bin/false -c nsd nsd >/dev/null
-	chown nsd:nsd /var/db/nsd
-	chmod 700 /var/db/nsd
-	post_upgrade
-}

Modified: service
===================================================================
--- service	2017-12-16 19:28:16 UTC (rev 274617)
+++ service	2017-12-16 22:48:16 UTC (rev 274618)
@@ -4,6 +4,7 @@
 
 [Service]
 PIDFile=/run/nsd/nsd.pid
+ExecStartPre=/usr/bin/chown nsd:nsd /var/db/nsd
 ExecStart=/usr/bin/nsd -d -c /etc/nsd/nsd.conf
 ExecReload=/bin/kill -HUP $MAINPID
 ExecStop=/bin/kill -TERM $MAINPID

Added: sysusers.d
===================================================================
--- sysusers.d	                        (rev 0)
+++ sysusers.d	2017-12-16 22:48:16 UTC (rev 274618)
@@ -0,0 +1 @@
+u nsd - - /dev/null



More information about the arch-commits mailing list