From b04265874ac63a3119b2c1c1c8f9356c5fa613b5 Mon Sep 17 00:00:00 2001 From: Kevin Daudt Date: Sun, 18 Oct 2020 08:15:43 +0000 Subject: [PATCH 1/2] main/ndisc6: move from community In an ipv6-only slaac setup, there is no DHCP server to provide DNS servers to use. rdnssd, part of ndisc6[0] is a userspace program that collects this information from router advertisements and updates resolv.conf. By having this in main, this can be available in the base setup, so that Alpine Linux can be installed in an IPV6-only setup. [0]: https://www.remlab.net/ndisc6/ --- {community => main}/ndisc6/APKBUILD | 0 {community => main}/ndisc6/rdnssd.initd | 0 {community => main}/ndisc6/rdnssd.resolvconf | 0 {community => main}/ndisc6/remove-undef-gnu-source.patch | 0 4 files changed, 0 insertions(+), 0 deletions(-) rename {community => main}/ndisc6/APKBUILD (100%) rename {community => main}/ndisc6/rdnssd.initd (100%) rename {community => main}/ndisc6/rdnssd.resolvconf (100%) rename {community => main}/ndisc6/remove-undef-gnu-source.patch (100%) diff --git a/community/ndisc6/APKBUILD b/main/ndisc6/APKBUILD similarity index 100% rename from community/ndisc6/APKBUILD rename to main/ndisc6/APKBUILD diff --git a/community/ndisc6/rdnssd.initd b/main/ndisc6/rdnssd.initd similarity index 100% rename from community/ndisc6/rdnssd.initd rename to main/ndisc6/rdnssd.initd diff --git a/community/ndisc6/rdnssd.resolvconf b/main/ndisc6/rdnssd.resolvconf similarity index 100% rename from community/ndisc6/rdnssd.resolvconf rename to main/ndisc6/rdnssd.resolvconf diff --git a/community/ndisc6/remove-undef-gnu-source.patch b/main/ndisc6/remove-undef-gnu-source.patch similarity index 100% rename from community/ndisc6/remove-undef-gnu-source.patch rename to main/ndisc6/remove-undef-gnu-source.patch -- GitLab From bf34156157fcb3d5d7dc6a40ab4d8bfa73224094 Mon Sep 17 00:00:00 2001 From: Kevin Daudt Date: Mon, 19 Oct 2020 15:34:26 +0000 Subject: [PATCH 2/2] main/ndisc6: fix regex to no longer depend on sed One of the regular expressions in the merge-hook is not valid, and busybox sed throws an error on it. Fixing it is trivial and it allows us to drop the sed dependency. --- main/ndisc6/APKBUILD | 7 ++++--- main/ndisc6/rdnssd-fix-merge-hook-regex.patch | 17 +++++++++++++++++ 2 files changed, 21 insertions(+), 3 deletions(-) create mode 100644 main/ndisc6/rdnssd-fix-merge-hook-regex.patch diff --git a/main/ndisc6/APKBUILD b/main/ndisc6/APKBUILD index d58d4ca21e1..bc4544e0652 100644 --- a/main/ndisc6/APKBUILD +++ b/main/ndisc6/APKBUILD @@ -2,18 +2,18 @@ # Maintainer: Kevin Daudt pkgname=ndisc6 pkgver=1.0.4 -pkgrel=3 +pkgrel=4 pkgdesc="a small collection of useful tools for IPv6 networking" url="https://www.remlab.net/ndisc6" arch="all" license="GPL-2.0-or-later" makedepends="linux-headers perl" -depends="sed" # merge-hook uses regex not supported by bb sed subpackages="$pkgname-doc rdnssd rdnssd-openrc:openrc:noarch $pkgname-dnssort::noarch" source="https://www.remlab.net/files/ndisc6/ndisc6-$pkgver.tar.bz2 remove-undef-gnu-source.patch rdnssd.initd rdnssd.resolvconf + rdnssd-fix-merge-hook-regex.patch " build() { @@ -57,4 +57,5 @@ rdnssd() { sha512sums="6f6cd939fb7079518db5c1bcd11353c722237d7735d229f9fd20d03e9f16b1ddf07c7c78c91364886148f2a82d6805eafe7e27da6b4e7c99b111603ec5fab842 ndisc6-1.0.4.tar.bz2 182f365ab743185c594394a92a0408f0feac09e969367080be0b62b966a2e10ce59256e0aca263d5cd6809d81fa8e7370317e136659d843599daa1fb88b51bf8 remove-undef-gnu-source.patch 5475dbe63b2855f6f5fdb0663dd235a4261db44f8f639b4b13712b62f9ca2adf9de6e899e72eee238a284d40d11f9fdd4778e11cdec739ee3abbffc85ac36d21 rdnssd.initd -7b23eafa78bd88d43d0910dbb6cb8d248c00425edb0826571c4d4f9129de33f07093dba4a42f05a549ef1bb9a0fd301716a30bf95ceea18d445e291f0169a444 rdnssd.resolvconf" +7b23eafa78bd88d43d0910dbb6cb8d248c00425edb0826571c4d4f9129de33f07093dba4a42f05a549ef1bb9a0fd301716a30bf95ceea18d445e291f0169a444 rdnssd.resolvconf +6e24c20f5b54ed4867ead508e7f85dddc86804441e0876778927e815f4871d31e35e3872e1631b2b147641b18f735dcca9609072217a9e622b10b328b19d2e73 rdnssd-fix-merge-hook-regex.patch" diff --git a/main/ndisc6/rdnssd-fix-merge-hook-regex.patch b/main/ndisc6/rdnssd-fix-merge-hook-regex.patch new file mode 100644 index 00000000000..85e89136c4b --- /dev/null +++ b/main/ndisc6/rdnssd-fix-merge-hook-regex.patch @@ -0,0 +1,17 @@ +Reason: '{,1}' is not valid in regular expressions, it should be '{0,1}'. +Busybox sed does not accept the former. +Upstream: no + +diff --git a/rdnss/merge-hook.in b/rdnss/merge-hook.in +index 383a57c..00ddcb2 100644 +--- a/rdnss/merge-hook.in ++++ b/rdnss/merge-hook.in +@@ -38,7 +38,7 @@ myresolvconf="$localstatedir/run/rdnssd/resolv.conf" + + # These should be POSIX-compliant BREs + RE_NSV4='^nameserver *\([0-9]\{1,3\}\.\)\{3,3\}[0-9]\{1,3\} *$' +-RE_NSV4OR6='^nameserver *[a-fA-F0-9:\.]\{1,46\}\(%[a-zA-Z0-9]\{1,\}\)\{,1\} *$' ++RE_NSV4OR6='^nameserver *[a-fA-F0-9:\.]\{1,46\}\(%[a-zA-Z0-9]\{1,\}\)\{0,1\} *$' + + # Count how many IPv6 nameservers we can fit + -- GitLab