diff options
author | Carlo Landmeter <clandmeter@alpinelinux.org> | 2019-12-01 20:26:52 +0000 |
---|---|---|
committer | Carlo Landmeter <clandmeter@alpinelinux.org> | 2019-12-01 20:28:31 +0000 |
commit | bebc4234d6557e897fa01536d7032f2cd2a16e84 (patch) | |
tree | 79a1110518c6a31f037c6f7a83a998db563d58ee /testing/ndisc6 | |
parent | 2f801fed8842d7a863feeac19b4f14066de1bb19 (diff) | |
download | aports-bebc4234d6557e897fa01536d7032f2cd2a16e84.tar.bz2 aports-bebc4234d6557e897fa01536d7032f2cd2a16e84.tar.xz |
testing/ndisc6: various changes
- update initd
- use wrapper for resolvconf
- split dnssort due to perl
- disable suid
Diffstat (limited to 'testing/ndisc6')
-rw-r--r-- | testing/ndisc6/APKBUILD | 37 | ||||
-rw-r--r-- | testing/ndisc6/rdnssd.initd | 22 | ||||
-rw-r--r-- | testing/ndisc6/rdnssd.resolvconf | 7 |
3 files changed, 34 insertions, 32 deletions
diff --git a/testing/ndisc6/APKBUILD b/testing/ndisc6/APKBUILD index 373a2d8fac..b8a215286e 100644 --- a/testing/ndisc6/APKBUILD +++ b/testing/ndisc6/APKBUILD @@ -2,20 +2,19 @@ # Maintainer: Kevin Daudt <kdaudt@alpinelinux.org> pkgname=ndisc6 pkgver=1.0.4 -pkgrel=1 +pkgrel=2 pkgdesc="ndisc6 gathers a few diagnostic tools for IPv6 networks including" url="https://www.remlab.net/ndisc6" arch="all" license="GPL-2.0-or-later" -depends="perl" -makedepends="linux-headers" -subpackages="$pkgname-doc $pkgname-openrc" +makedepends="linux-headers perl" +depends="sed" # merge-hook uses regex not supported by bb sed +subpackages="$pkgname-doc $pkgname-openrc $pkgname-dnssort::noarch" source="https://www.remlab.net/files/ndisc6/ndisc6-$pkgver.tar.bz2 - remove-undef-gnu-source.patch - - rdnssd.initd - " -options="suid" + remove-undef-gnu-source.patch + rdnssd.initd + rdnssd.resolvconf + " build() { ./configure \ @@ -23,7 +22,8 @@ build() { --host=$CHOST \ --prefix=/usr \ --localstatedir=/var \ - --sysconfdir=/etc + --sysconfdir=/etc \ + --disable-suid-install make } @@ -33,11 +33,20 @@ check() { package() { make DESTDIR="$pkgdir" install - install -D -m755 "$srcdir"/rdnssd.initd \ - "$pkgdir"/etc/init.d/rdnssd + install -D -m755 "$srcdir"/rdnssd.initd "$pkgdir"/etc/init.d/rdnssd + install -D -m755 "$srcdir"/rdnssd.resolvconf \ + "$pkgdir"/etc/rdnssd/resolvconf +} + +dnssort() { + pkgdesc="ndisc6 dnssort (perl)" + install_if="$pkgname perl" + depends=perl + mkdir -p "$subpkgdir"/usr/bin + mv "$pkgdir"/usr/bin/dnssort "$subpkgdir"/usr/bin/ } sha512sums="6f6cd939fb7079518db5c1bcd11353c722237d7735d229f9fd20d03e9f16b1ddf07c7c78c91364886148f2a82d6805eafe7e27da6b4e7c99b111603ec5fab842 ndisc6-1.0.4.tar.bz2 d70c74f965308afbfc266071ec0d073d59cfd42f250e27c8f4f3e1c7b849a6bb9226407e74af30366d348e4213c7497791e8f2edc7b903703e611c036c250644 remove-undef-gnu-source.patch -8342a2d64b35e8f1a2354f5c7b59a7c4a8b84333b47a52f1dc7e2c8c375c35ab3a0734e6b30d1c764d57c0dadb42916a1112451a14957ebe5605e98480dc619b rdnssd.initd -" +5475dbe63b2855f6f5fdb0663dd235a4261db44f8f639b4b13712b62f9ca2adf9de6e899e72eee238a284d40d11f9fdd4778e11cdec739ee3abbffc85ac36d21 rdnssd.initd +7b23eafa78bd88d43d0910dbb6cb8d248c00425edb0826571c4d4f9129de33f07093dba4a42f05a549ef1bb9a0fd301716a30bf95ceea18d445e291f0169a444 rdnssd.resolvconf" diff --git a/testing/ndisc6/rdnssd.initd b/testing/ndisc6/rdnssd.initd index 32b68c2dbc..2d508d0221 100644 --- a/testing/ndisc6/rdnssd.initd +++ b/testing/ndisc6/rdnssd.initd @@ -1,20 +1,6 @@ #!/sbin/openrc-run -# Copyright 1999-2008 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -depend() { - need localmount - before net - use logger -} - -start() { - ebegin "Starting rdnssd" - start-stop-daemon --start --quiet --exec /usr/sbin/rdnssd -- -u root -r /etc/resolv.conf - eend $? -} - -stop() { - ebegin "Stopping rdnssd" - start-stop-daemon --stop --quiet --pidfile /run/rdnssd.pid -} +supervisor=supervise-daemon +command=/usr/sbin/rdnssd +command_args="-H /etc/rdnssd/resolvconf" +command_args_foreground="-f" diff --git a/testing/ndisc6/rdnssd.resolvconf b/testing/ndisc6/rdnssd.resolvconf new file mode 100644 index 0000000000..1553f8545e --- /dev/null +++ b/testing/ndisc6/rdnssd.resolvconf @@ -0,0 +1,7 @@ +#!/bin/sh + +if command -v resolvconf > /dev/null; then + exec resolvconf -a rdnssd < /var/run/rdnssd/resolv.conf +else + exec /etc/rdnssd/merge-hook +fi |