Subject: [alpine-aports] [PATCH] main/openntpd: fixes privelege seperation defaults

From: systmkor <[email-masked]>
Date: Thu, 27 Aug 2015 12:18:17 -0700

- compiles default privelege seperation user as ntp instead of _ntp
 - creates required chroot directory /var/empty
---
 main/openntpd/APKBUILD | 15 ++++++++-------
 1 file changed, 8 insertions(+), 7 deletions(-)

diff --git a/main/openntpd/APKBUILD b/main/openntpd/APKBUILD
index d2de528..9886012 100644
--- a/main/openntpd/APKBUILD
+++ b/main/openntpd/APKBUILD
@@ -4,14 +4,14 @@ pkgver=5.7_p4
 _myver=${pkgver/_/}
 pkgrel=0
 pkgdesc="Lightweight NTP server ported from OpenBSD"
-url=http://www.openntpd.org/
+url="http://www.openntpd.org/"
 install="$pkgname.pre-install $pkgname.pre-upgrade $pkgname.post-upgrade"
 
 subpackages="openntpd-doc"
-depends=
+depends=""
 makedepends="openssl-dev linux-headers bsd-compat-headers"
 arch="all"
-license=BSD
+license="BSD"
 source="
 	http://ftp.openbsd.org/pub/OpenBSD/OpenNTPD/openntpd-$_myver.tar.gz
 	openntpd.confd
@@ -29,7 +29,6 @@ prepare() {
 		*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
 		esac
 	done
-	sed -i '/NTPD_USER/s:_ntp:ntp:' src/ntpd.h || return 1
 }
 
 build() {
@@ -41,15 +40,17 @@ build() {
 		--localstatedir=/var \
 		--mandir=/usr/share/man \
 		--sysconfdir=/etc \
+		--with-privsep-user=ntp \
 		|| return 1
 	make || return 1
 }
 
 package() {
 	cd "$_builddir"
-	make install DESTDIR="$pkgdir"
-	install -Dm755 ../openntpd.initd "$pkgdir/etc/init.d/$pkgname"
-	install -Dm644 ../openntpd.confd "$pkgdir/etc/conf.d/$pkgname"
+	make install DESTDIR="$pkgdir" || return 1
+	mkdir -p "$pkgdir"/var/empty || return 1
+	install -Dm755 "$srcdir"/openntpd.initd "$pkgdir"/etc/init.d/"$pkgname" || return 1
+	install -Dm644 "$srcdir"/openntpd.confd "$pkgdir"/etc/conf.d/"$pkgname" || return 1
 }
 
 md5sums="9d818a143fbc5d830203fa2f4b4c6a2a  openntpd-5.7p4.tar.gz
-- 
2.4.1

---
Unsubscribe:  [email-masked]
Help:         [email-masked]
---