summaryrefslogtreecommitdiffstats
path: root/meta/recipes-connectivity/resolvconf
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-connectivity/resolvconf')
-rw-r--r--meta/recipes-connectivity/resolvconf/resolvconf/0001-avoid-using-m-option-for-readlink.patch37
-rw-r--r--meta/recipes-connectivity/resolvconf/resolvconf/fix-path-for-busybox.patch20
-rw-r--r--meta/recipes-connectivity/resolvconf/resolvconf_1.92.bb (renamed from meta/recipes-connectivity/resolvconf/resolvconf_1.83.bb)23
3 files changed, 48 insertions, 32 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/fix-path-for-busybox.patch b/meta/recipes-connectivity/resolvconf/resolvconf/fix-path-for-busybox.patch
deleted file mode 100644
index 1aead07869..0000000000
--- a/meta/recipes-connectivity/resolvconf/resolvconf/fix-path-for-busybox.patch
+++ /dev/null
@@ -1,20 +0,0 @@
1
2busybox installs readlink into /usr/bin, so ensure /usr/bin
3is in the path.
4
5Upstream-Status: Submitted
6Signed-off-by: Saul Wold <sgw@linux.intel.com>
7
8Index: resolvconf-1.76/etc/resolvconf/update.d/libc
9===================================================================
10--- resolvconf-1.76.orig/etc/resolvconf/update.d/libc
11+++ resolvconf-1.76/etc/resolvconf/update.d/libc
12@@ -16,7 +16,7 @@
13 #
14
15 set -e
16-PATH=/sbin:/bin
17+PATH=/sbin:/bin:/usr/bin
18
19 [ -x /lib/resolvconf/list-records ] || exit 1
20
diff --git a/meta/recipes-connectivity/resolvconf/resolvconf_1.83.bb b/meta/recipes-connectivity/resolvconf/resolvconf_1.92.bb
index 33ee553d19..c3ce5bc22e 100644
--- a/meta/recipes-connectivity/resolvconf/resolvconf_1.83.bb
+++ b/meta/recipes-connectivity/resolvconf/resolvconf_1.92.bb
@@ -5,18 +5,17 @@ itself up as the intermediary between programs that supply \
5nameserver information and programs that need nameserver \ 5nameserver information and programs that need nameserver \
6information." 6information."
7SECTION = "console/network" 7SECTION = "console/network"
8LICENSE = "GPLv2+" 8LICENSE = "GPL-2.0-or-later"
9LIC_FILES_CHKSUM = "file://COPYING;md5=c93c0550bd3173f4504b2cbd8991e50b" 9LIC_FILES_CHKSUM = "file://COPYING;md5=c93c0550bd3173f4504b2cbd8991e50b"
10AUTHOR = "Thomas Hood"
11HOMEPAGE = "http://packages.debian.org/resolvconf" 10HOMEPAGE = "http://packages.debian.org/resolvconf"
12RDEPENDS_${PN} = "bash" 11RDEPENDS:${PN} = "bash sed util-linux-flock"
13 12
14SRC_URI = "git://salsa.debian.org/debian/resolvconf.git;protocol=https \ 13SRC_URI = "git://salsa.debian.org/debian/resolvconf.git;protocol=https;branch=unstable \
15 file://fix-path-for-busybox.patch \
16 file://99_resolvconf \ 14 file://99_resolvconf \
17 " 15 file://0001-avoid-using-m-option-for-readlink.patch \
16 "
18 17
19SRCREV = "d001dd2b7ce4c854eaa29e46b9640ab66c6e70bb" 18SRCREV = "86047276c80705c51859a19f0c472102e0822f34"
20 19
21S = "${WORKDIR}/git" 20S = "${WORKDIR}/git"
22 21
@@ -24,15 +23,13 @@ S = "${WORKDIR}/git"
24# so we check the latest upstream from a directory that does get updated 23# so we check the latest upstream from a directory that does get updated
25UPSTREAM_CHECK_URI = "${DEBIAN_MIRROR}/main/r/resolvconf/" 24UPSTREAM_CHECK_URI = "${DEBIAN_MIRROR}/main/r/resolvconf/"
26 25
27inherit allarch
28
29do_compile () { 26do_compile () {
30 : 27 :
31} 28}
32 29
33do_install () { 30do_install () {
34 install -d ${D}${sysconfdir}/default/volatiles 31 install -d ${D}${sysconfdir}/default/volatiles
35 install -m 0644 ${WORKDIR}/99_resolvconf ${D}${sysconfdir}/default/volatiles 32 install -m 0644 ${UNPACKDIR}/99_resolvconf ${D}${sysconfdir}/default/volatiles
36 if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then 33 if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
37 install -d ${D}${sysconfdir}/tmpfiles.d 34 install -d ${D}${sysconfdir}/tmpfiles.d
38 echo "d /run/${BPN}/interface - - - -" \ 35 echo "d /run/${BPN}/interface - - - -" \
@@ -40,12 +37,14 @@ do_install () {
40 fi 37 fi
41 install -d ${D}${base_libdir}/${BPN} 38 install -d ${D}${base_libdir}/${BPN}
42 install -d ${D}${sysconfdir}/${BPN} 39 install -d ${D}${sysconfdir}/${BPN}
40 install -d ${D}${nonarch_base_libdir}/${BPN}
43 ln -snf ${localstatedir}/run/${BPN} ${D}${sysconfdir}/${BPN}/run 41 ln -snf ${localstatedir}/run/${BPN} ${D}${sysconfdir}/${BPN}/run
44 install -d ${D}${sysconfdir} ${D}${base_sbindir} 42 install -d ${D}${sysconfdir} ${D}${base_sbindir}
45 install -d ${D}${mandir}/man8 ${D}${docdir}/${P} 43 install -d ${D}${mandir}/man8 ${D}${docdir}/${P}
46 cp -pPR etc/resolvconf ${D}${sysconfdir}/ 44 cp -pPR etc/resolvconf ${D}${sysconfdir}/
47 chown -R root:root ${D}${sysconfdir}/ 45 chown -R root:root ${D}${sysconfdir}/
48 install -m 0755 bin/resolvconf ${D}${base_sbindir}/ 46 install -m 0755 bin/resolvconf ${D}${base_sbindir}/
47 install -m 0755 bin/normalize-resolvconf ${D}${nonarch_base_libdir}/${BPN}
49 install -m 0755 bin/list-records ${D}${base_libdir}/${BPN} 48 install -m 0755 bin/list-records ${D}${base_libdir}/${BPN}
50 install -d ${D}/${sysconfdir}/network/if-up.d 49 install -d ${D}/${sysconfdir}/network/if-up.d
51 install -m 0755 debian/resolvconf.000resolvconf.if-up ${D}/${sysconfdir}/network/if-up.d/000resolvconf 50 install -m 0755 debian/resolvconf.000resolvconf.if-up ${D}/${sysconfdir}/network/if-up.d/000resolvconf
@@ -55,7 +54,7 @@ do_install () {
55 install -m 0644 man/resolvconf.8 ${D}${mandir}/man8/ 54 install -m 0644 man/resolvconf.8 ${D}${mandir}/man8/
56} 55}
57 56
58pkg_postinst_${PN} () { 57pkg_postinst:${PN} () {
59 if [ -z "$D" ]; then 58 if [ -z "$D" ]; then
60 if command -v systemd-tmpfiles >/dev/null; then 59 if command -v systemd-tmpfiles >/dev/null; then
61 systemd-tmpfiles --create ${sysconfdir}/tmpfiles.d/resolvconf.conf 60 systemd-tmpfiles --create ${sysconfdir}/tmpfiles.d/resolvconf.conf
@@ -65,4 +64,4 @@ pkg_postinst_${PN} () {
65 fi 64 fi
66} 65}
67 66
68FILES_${PN} += "${base_libdir}/${BPN}" 67FILES:${PN} += "${base_libdir}/${BPN} ${nonarch_base_libdir}/${BPN}"