From bab3b8676662de92e34ac7ed3fe52745df1c9a9e Mon Sep 17 00:00:00 2001 From: Chen Qi Date: Thu, 17 Nov 2022 19:14:10 +0800 Subject: resolvconf: make it work The current resolvconf does not work. Make it work with the following changes. 1. Install normalize-resolvconf, which is used by resolvconf. 2. Add dependencies: sed, util-linux-flock. util-linux-flock is needed by our busybox does not support '-w' by default. sed is needed because we want to avoid package QA issue complaining sed is needed by no one provides it. 3. Add a patch to replace 'readlink -m' with 'readlink -l'. This could avoid the runtime dependency on coreutils. The replacement is safe as /etc always exits in OE's system. 4. Remove allarch inheritage. This is because the above RDEPENDS change does not allow this any more. test_sstate_allarch_samesigs would fail if we don't do this. (From OE-Core rev: 1b0581fd241cc9de2feda896aefbf055dc0099dc) Signed-off-by: Chen Qi Signed-off-by: Alexandre Belloni Signed-off-by: Richard Purdie --- .../0001-avoid-using-m-option-for-readlink.patch | 37 ++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 meta/recipes-connectivity/resolvconf/resolvconf/0001-avoid-using-m-option-for-readlink.patch (limited to 'meta/recipes-connectivity/resolvconf/resolvconf') diff --git a/meta/recipes-connectivity/resolvconf/resolvconf/0001-avoid-using-m-option-for-readlink.patch b/meta/recipes-connectivity/resolvconf/resolvconf/0001-avoid-using-m-option-for-readlink.patch new file mode 100644 index 0000000000..ab32f26754 --- /dev/null +++ b/meta/recipes-connectivity/resolvconf/resolvconf/0001-avoid-using-m-option-for-readlink.patch @@ -0,0 +1,37 @@ +From 6bf2bb136a0b3961339369bc08e58b661fba0edb Mon Sep 17 00:00:00 2001 +From: Chen Qi +Date: Thu, 17 Nov 2022 17:26:30 +0800 +Subject: [PATCH] avoid using -m option for readlink + +Use a more widely used option '-f' instead of '-m' here to +avoid dependency on coreutils. + +Looking at the git history of the resolvconf repo, the '-m' +is deliberately used. And it wants to depend on coreutils. +But in case of OE, the existence of /etc is ensured, and busybox +readlink provides '-f' option, so we can just use '-f'. In this +way, the coreutils dependency is not necessary any more. + +Upstream-Status: Inappropriate [OE Specific] + +Signed-off-by: Chen Qi +--- + etc/resolvconf/update.d/libc | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/etc/resolvconf/update.d/libc b/etc/resolvconf/update.d/libc +index 1c4f6bc..f75d22c 100755 +--- a/etc/resolvconf/update.d/libc ++++ b/etc/resolvconf/update.d/libc +@@ -57,7 +57,7 @@ fi + report_warning() { echo "$0: Warning: $*" >&2 ; } + + resolv_conf_is_symlinked_to_dynamic_file() { +- [ -L ${ETC}/resolv.conf ] && [ "$(readlink -m ${ETC}/resolv.conf)" = "$DYNAMICRSLVCNFFILE" ] ++ [ -L ${ETC}/resolv.conf ] && [ "$(readlink -f ${ETC}/resolv.conf)" = "$DYNAMICRSLVCNFFILE" ] + } + + if ! resolv_conf_is_symlinked_to_dynamic_file ; then +-- +2.17.1 + -- cgit v1.2.3-54-g00ecf