summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChen Qi <Qi.Chen@windriver.com>2022-11-17 19:14:10 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2022-11-20 08:29:08 +0000
commitbab3b8676662de92e34ac7ed3fe52745df1c9a9e (patch)
treeae6438278b9d135d2841c9af01cd7503c729b821
parent2143dfd9ad443e33929b18098a188ea0514e4488 (diff)
downloadpoky-bab3b8676662de92e34ac7ed3fe52745df1c9a9e.tar.gz
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 <Qi.Chen@windriver.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/recipes-connectivity/resolvconf/resolvconf/0001-avoid-using-m-option-for-readlink.patch37
-rw-r--r--meta/recipes-connectivity/resolvconf/resolvconf_1.91.bb9
2 files changed, 42 insertions, 4 deletions
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 @@
1From 6bf2bb136a0b3961339369bc08e58b661fba0edb Mon Sep 17 00:00:00 2001
2From: Chen Qi <Qi.Chen@windriver.com>
3Date: Thu, 17 Nov 2022 17:26:30 +0800
4Subject: [PATCH] avoid using -m option for readlink
5
6Use a more widely used option '-f' instead of '-m' here to
7avoid dependency on coreutils.
8
9Looking at the git history of the resolvconf repo, the '-m'
10is deliberately used. And it wants to depend on coreutils.
11But in case of OE, the existence of /etc is ensured, and busybox
12readlink provides '-f' option, so we can just use '-f'. In this
13way, the coreutils dependency is not necessary any more.
14
15Upstream-Status: Inappropriate [OE Specific]
16
17Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
18---
19 etc/resolvconf/update.d/libc | 2 +-
20 1 file changed, 1 insertion(+), 1 deletion(-)
21
22diff --git a/etc/resolvconf/update.d/libc b/etc/resolvconf/update.d/libc
23index 1c4f6bc..f75d22c 100755
24--- a/etc/resolvconf/update.d/libc
25+++ b/etc/resolvconf/update.d/libc
26@@ -57,7 +57,7 @@ fi
27 report_warning() { echo "$0: Warning: $*" >&2 ; }
28
29 resolv_conf_is_symlinked_to_dynamic_file() {
30- [ -L ${ETC}/resolv.conf ] && [ "$(readlink -m ${ETC}/resolv.conf)" = "$DYNAMICRSLVCNFFILE" ]
31+ [ -L ${ETC}/resolv.conf ] && [ "$(readlink -f ${ETC}/resolv.conf)" = "$DYNAMICRSLVCNFFILE" ]
32 }
33
34 if ! resolv_conf_is_symlinked_to_dynamic_file ; then
35--
362.17.1
37
diff --git a/meta/recipes-connectivity/resolvconf/resolvconf_1.91.bb b/meta/recipes-connectivity/resolvconf/resolvconf_1.91.bb
index 94fd2c1a70..3f1b75d07d 100644
--- a/meta/recipes-connectivity/resolvconf/resolvconf_1.91.bb
+++ b/meta/recipes-connectivity/resolvconf/resolvconf_1.91.bb
@@ -9,10 +9,11 @@ LICENSE = "GPL-2.0-or-later"
9LIC_FILES_CHKSUM = "file://COPYING;md5=c93c0550bd3173f4504b2cbd8991e50b" 9LIC_FILES_CHKSUM = "file://COPYING;md5=c93c0550bd3173f4504b2cbd8991e50b"
10AUTHOR = "Thomas Hood" 10AUTHOR = "Thomas Hood"
11HOMEPAGE = "http://packages.debian.org/resolvconf" 11HOMEPAGE = "http://packages.debian.org/resolvconf"
12RDEPENDS:${PN} = "bash" 12RDEPENDS:${PN} = "bash sed util-linux-flock"
13 13
14SRC_URI = "git://salsa.debian.org/debian/resolvconf.git;protocol=https;branch=unstable \ 14SRC_URI = "git://salsa.debian.org/debian/resolvconf.git;protocol=https;branch=unstable \
15 file://99_resolvconf \ 15 file://99_resolvconf \
16 file://0001-avoid-using-m-option-for-readlink.patch \
16 " 17 "
17 18
18SRCREV = "859209d573e7aec0e95d812c6b52444591a628d1" 19SRCREV = "859209d573e7aec0e95d812c6b52444591a628d1"
@@ -23,8 +24,6 @@ S = "${WORKDIR}/git"
23# so we check the latest upstream from a directory that does get updated 24# so we check the latest upstream from a directory that does get updated
24UPSTREAM_CHECK_URI = "${DEBIAN_MIRROR}/main/r/resolvconf/" 25UPSTREAM_CHECK_URI = "${DEBIAN_MIRROR}/main/r/resolvconf/"
25 26
26inherit allarch
27
28do_compile () { 27do_compile () {
29 : 28 :
30} 29}
@@ -39,12 +38,14 @@ do_install () {
39 fi 38 fi
40 install -d ${D}${base_libdir}/${BPN} 39 install -d ${D}${base_libdir}/${BPN}
41 install -d ${D}${sysconfdir}/${BPN} 40 install -d ${D}${sysconfdir}/${BPN}
41 install -d ${D}${nonarch_base_libdir}/${BPN}
42 ln -snf ${localstatedir}/run/${BPN} ${D}${sysconfdir}/${BPN}/run 42 ln -snf ${localstatedir}/run/${BPN} ${D}${sysconfdir}/${BPN}/run
43 install -d ${D}${sysconfdir} ${D}${base_sbindir} 43 install -d ${D}${sysconfdir} ${D}${base_sbindir}
44 install -d ${D}${mandir}/man8 ${D}${docdir}/${P} 44 install -d ${D}${mandir}/man8 ${D}${docdir}/${P}
45 cp -pPR etc/resolvconf ${D}${sysconfdir}/ 45 cp -pPR etc/resolvconf ${D}${sysconfdir}/
46 chown -R root:root ${D}${sysconfdir}/ 46 chown -R root:root ${D}${sysconfdir}/
47 install -m 0755 bin/resolvconf ${D}${base_sbindir}/ 47 install -m 0755 bin/resolvconf ${D}${base_sbindir}/
48 install -m 0755 bin/normalize-resolvconf ${D}${nonarch_base_libdir}/${BPN}
48 install -m 0755 bin/list-records ${D}${base_libdir}/${BPN} 49 install -m 0755 bin/list-records ${D}${base_libdir}/${BPN}
49 install -d ${D}/${sysconfdir}/network/if-up.d 50 install -d ${D}/${sysconfdir}/network/if-up.d
50 install -m 0755 debian/resolvconf.000resolvconf.if-up ${D}/${sysconfdir}/network/if-up.d/000resolvconf 51 install -m 0755 debian/resolvconf.000resolvconf.if-up ${D}/${sysconfdir}/network/if-up.d/000resolvconf
@@ -64,4 +65,4 @@ pkg_postinst:${PN} () {
64 fi 65 fi
65} 66}
66 67
67FILES:${PN} += "${base_libdir}/${BPN}" 68FILES:${PN} += "${base_libdir}/${BPN} ${nonarch_base_libdir}/${BPN}"