diff mbox series

resolvconf: make it work

Message ID 20221115134531.34920-1-Qi.Chen@windriver.com
State Accepted, archived
Commit 1b0581fd241cc9de2feda896aefbf055dc0099dc
Headers show
Series resolvconf: make it work | expand

Commit Message

ChenQi Nov. 15, 2022, 1:45 p.m. UTC
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, coreutils, util-linux-flock.
   util-linux-flock is needed by our busybox does not support '-w'
   by default. coreutils is needed by the busybox's readlink does
   not support '-m'. sed is needed because we want to avoid package
   QA issue complaining sed is needed by no one provides it.

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
---
 meta/recipes-connectivity/resolvconf/resolvconf_1.91.bb | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

Comments

Alexandre Belloni Nov. 15, 2022, 8:39 p.m. UTC | #1
Hello,

This fails sstatetests.SStateTests.test_sstate_allarch_samesigs:

https://autobuilder.yoctoproject.org/typhoon/#/builders/87/builds/4409/steps/14/logs/stdio

-  'resolvconf/do_package_qa': 'a309bf7fd05364ea8b524a605246f7929768bca185713f913df0f3f1e5f1ce55',
-  'resolvconf/do_package_write_rpm': '1e136a6121876927c84587c8ec80794359ad998e09048c77e7d363ba756d41f0',
+  'resolvconf/do_package_qa': '7bc9828812907356dc4e1fe5df96af30e195a99e54745e2a5ea96d24974b0142',
+  'resolvconf/do_package_write_rpm': '7eeaacc3b706560a0bd9e889a661be05eef25250aff8c82891b7c70f09de7451',


On 15/11/2022 21:45:31+0800, Chen Qi wrote:
> 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, coreutils, util-linux-flock.
>    util-linux-flock is needed by our busybox does not support '-w'
>    by default. coreutils is needed by the busybox's readlink does
>    not support '-m'. sed is needed because we want to avoid package
>    QA issue complaining sed is needed by no one provides it.
> 
> Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
> ---
>  meta/recipes-connectivity/resolvconf/resolvconf_1.91.bb | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/meta/recipes-connectivity/resolvconf/resolvconf_1.91.bb b/meta/recipes-connectivity/resolvconf/resolvconf_1.91.bb
> index 94fd2c1a70..3bf5ec6c32 100644
> --- a/meta/recipes-connectivity/resolvconf/resolvconf_1.91.bb
> +++ b/meta/recipes-connectivity/resolvconf/resolvconf_1.91.bb
> @@ -9,7 +9,7 @@ LICENSE = "GPL-2.0-or-later"
>  LIC_FILES_CHKSUM = "file://COPYING;md5=c93c0550bd3173f4504b2cbd8991e50b"
>  AUTHOR = "Thomas Hood"
>  HOMEPAGE = "http://packages.debian.org/resolvconf"
> -RDEPENDS:${PN} = "bash"
> +RDEPENDS:${PN} = "bash sed coreutils util-linux-flock"
>  
>  SRC_URI = "git://salsa.debian.org/debian/resolvconf.git;protocol=https;branch=unstable \
>             file://99_resolvconf \
> @@ -39,12 +39,14 @@ do_install () {
>  	fi
>  	install -d ${D}${base_libdir}/${BPN}
>  	install -d ${D}${sysconfdir}/${BPN}
> +	install -d ${D}${nonarch_base_libdir}/${BPN}
>  	ln -snf ${localstatedir}/run/${BPN} ${D}${sysconfdir}/${BPN}/run
>  	install -d ${D}${sysconfdir} ${D}${base_sbindir}
>  	install -d ${D}${mandir}/man8 ${D}${docdir}/${P}
>  	cp -pPR etc/resolvconf ${D}${sysconfdir}/
>  	chown -R root:root ${D}${sysconfdir}/
>  	install -m 0755 bin/resolvconf ${D}${base_sbindir}/
> +	install -m 0755 bin/normalize-resolvconf ${D}${nonarch_base_libdir}/${BPN}
>  	install -m 0755 bin/list-records ${D}${base_libdir}/${BPN}
>  	install -d ${D}/${sysconfdir}/network/if-up.d
>  	install -m 0755 debian/resolvconf.000resolvconf.if-up ${D}/${sysconfdir}/network/if-up.d/000resolvconf
> @@ -64,4 +66,4 @@ pkg_postinst:${PN} () {
>  	fi
>  }
>  
> -FILES:${PN} += "${base_libdir}/${BPN}"
> +FILES:${PN} += "${base_libdir}/${BPN} ${nonarch_base_libdir}/${BPN}"
> -- 
> 2.17.1
> 

> 
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#173345): https://lists.openembedded.org/g/openembedded-core/message/173345
> Mute This Topic: https://lists.openembedded.org/mt/95042786/3617179
> Group Owner: openembedded-core+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [alexandre.belloni@bootlin.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
ChenQi Nov. 16, 2022, 5:23 a.m. UTC | #2
Got it. It seems that after adding those RDEPENDS, resolvconf cannot remain as allarch.
I'll send out V2.

Regards,
Qi

-----Original Message-----
From: Alexandre Belloni <alexandre.belloni@bootlin.com> 
Sent: Wednesday, November 16, 2022 4:39 AM
To: Chen, Qi <Qi.Chen@windriver.com>
Cc: openembedded-core@lists.openembedded.org
Subject: Re: [OE-core][PATCH] resolvconf: make it work

Hello,

This fails sstatetests.SStateTests.test_sstate_allarch_samesigs:

https://autobuilder.yoctoproject.org/typhoon/#/builders/87/builds/4409/steps/14/logs/stdio

-  'resolvconf/do_package_qa': 'a309bf7fd05364ea8b524a605246f7929768bca185713f913df0f3f1e5f1ce55',
-  'resolvconf/do_package_write_rpm': '1e136a6121876927c84587c8ec80794359ad998e09048c77e7d363ba756d41f0',
+  'resolvconf/do_package_qa': 
+ '7bc9828812907356dc4e1fe5df96af30e195a99e54745e2a5ea96d24974b0142',
+  'resolvconf/do_package_write_rpm': 
+ '7eeaacc3b706560a0bd9e889a661be05eef25250aff8c82891b7c70f09de7451',


On 15/11/2022 21:45:31+0800, Chen Qi wrote:
> 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, coreutils, util-linux-flock.
>    util-linux-flock is needed by our busybox does not support '-w'
>    by default. coreutils is needed by the busybox's readlink does
>    not support '-m'. sed is needed because we want to avoid package
>    QA issue complaining sed is needed by no one provides it.
> 
> Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
> ---
>  meta/recipes-connectivity/resolvconf/resolvconf_1.91.bb | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/meta/recipes-connectivity/resolvconf/resolvconf_1.91.bb 
> b/meta/recipes-connectivity/resolvconf/resolvconf_1.91.bb
> index 94fd2c1a70..3bf5ec6c32 100644
> --- a/meta/recipes-connectivity/resolvconf/resolvconf_1.91.bb
> +++ b/meta/recipes-connectivity/resolvconf/resolvconf_1.91.bb
> @@ -9,7 +9,7 @@ LICENSE = "GPL-2.0-or-later"
>  LIC_FILES_CHKSUM = "file://COPYING;md5=c93c0550bd3173f4504b2cbd8991e50b"
>  AUTHOR = "Thomas Hood"
>  HOMEPAGE = "http://packages.debian.org/resolvconf"
> -RDEPENDS:${PN} = "bash"
> +RDEPENDS:${PN} = "bash sed coreutils util-linux-flock"
>  
>  SRC_URI = "git://salsa.debian.org/debian/resolvconf.git;protocol=https;branch=unstable \
>             file://99_resolvconf \
> @@ -39,12 +39,14 @@ do_install () {
>  	fi
>  	install -d ${D}${base_libdir}/${BPN}
>  	install -d ${D}${sysconfdir}/${BPN}
> +	install -d ${D}${nonarch_base_libdir}/${BPN}
>  	ln -snf ${localstatedir}/run/${BPN} ${D}${sysconfdir}/${BPN}/run
>  	install -d ${D}${sysconfdir} ${D}${base_sbindir}
>  	install -d ${D}${mandir}/man8 ${D}${docdir}/${P}
>  	cp -pPR etc/resolvconf ${D}${sysconfdir}/
>  	chown -R root:root ${D}${sysconfdir}/
>  	install -m 0755 bin/resolvconf ${D}${base_sbindir}/
> +	install -m 0755 bin/normalize-resolvconf 
> +${D}${nonarch_base_libdir}/${BPN}
>  	install -m 0755 bin/list-records ${D}${base_libdir}/${BPN}
>  	install -d ${D}/${sysconfdir}/network/if-up.d
>  	install -m 0755 debian/resolvconf.000resolvconf.if-up 
> ${D}/${sysconfdir}/network/if-up.d/000resolvconf
> @@ -64,4 +66,4 @@ pkg_postinst:${PN} () {
>  	fi
>  }
>  
> -FILES:${PN} += "${base_libdir}/${BPN}"
> +FILES:${PN} += "${base_libdir}/${BPN} ${nonarch_base_libdir}/${BPN}"
> --
> 2.17.1
> 

> 
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#173345): https://lists.openembedded.org/g/openembedded-core/message/173345
> Mute This Topic: https://lists.openembedded.org/mt/95042786/3617179
> Group Owner: openembedded-core+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [alexandre.belloni@bootlin.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
Khem Raj Nov. 16, 2022, 6:35 a.m. UTC | #3
On Tue, Nov 15, 2022 at 5:45 AM Chen Qi <Qi.Chen@windriver.com> wrote:
>
> 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, coreutils, util-linux-flock.
>    util-linux-flock is needed by our busybox does not support '-w'
>    by default. coreutils is needed by the busybox's readlink does
>    not support '-m'. sed is needed because we want to avoid package
>    QA issue complaining sed is needed by no one provides it.

Can we avoid dependency on coreutils ? maybe check why -m is needed
and perhaps just use
absolute link.

>
> Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
> ---
>  meta/recipes-connectivity/resolvconf/resolvconf_1.91.bb | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/meta/recipes-connectivity/resolvconf/resolvconf_1.91.bb b/meta/recipes-connectivity/resolvconf/resolvconf_1.91.bb
> index 94fd2c1a70..3bf5ec6c32 100644
> --- a/meta/recipes-connectivity/resolvconf/resolvconf_1.91.bb
> +++ b/meta/recipes-connectivity/resolvconf/resolvconf_1.91.bb
> @@ -9,7 +9,7 @@ LICENSE = "GPL-2.0-or-later"
>  LIC_FILES_CHKSUM = "file://COPYING;md5=c93c0550bd3173f4504b2cbd8991e50b"
>  AUTHOR = "Thomas Hood"
>  HOMEPAGE = "http://packages.debian.org/resolvconf"
> -RDEPENDS:${PN} = "bash"
> +RDEPENDS:${PN} = "bash sed coreutils util-linux-flock"
>
>  SRC_URI = "git://salsa.debian.org/debian/resolvconf.git;protocol=https;branch=unstable \
>             file://99_resolvconf \
> @@ -39,12 +39,14 @@ do_install () {
>         fi
>         install -d ${D}${base_libdir}/${BPN}
>         install -d ${D}${sysconfdir}/${BPN}
> +       install -d ${D}${nonarch_base_libdir}/${BPN}
>         ln -snf ${localstatedir}/run/${BPN} ${D}${sysconfdir}/${BPN}/run
>         install -d ${D}${sysconfdir} ${D}${base_sbindir}
>         install -d ${D}${mandir}/man8 ${D}${docdir}/${P}
>         cp -pPR etc/resolvconf ${D}${sysconfdir}/
>         chown -R root:root ${D}${sysconfdir}/
>         install -m 0755 bin/resolvconf ${D}${base_sbindir}/
> +       install -m 0755 bin/normalize-resolvconf ${D}${nonarch_base_libdir}/${BPN}
>         install -m 0755 bin/list-records ${D}${base_libdir}/${BPN}
>         install -d ${D}/${sysconfdir}/network/if-up.d
>         install -m 0755 debian/resolvconf.000resolvconf.if-up ${D}/${sysconfdir}/network/if-up.d/000resolvconf
> @@ -64,4 +66,4 @@ pkg_postinst:${PN} () {
>         fi
>  }
>
> -FILES:${PN} += "${base_libdir}/${BPN}"
> +FILES:${PN} += "${base_libdir}/${BPN} ${nonarch_base_libdir}/${BPN}"
> --
> 2.17.1
>
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#173345): https://lists.openembedded.org/g/openembedded-core/message/173345
> Mute This Topic: https://lists.openembedded.org/mt/95042786/1997914
> Group Owner: openembedded-core+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [raj.khem@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
ChenQi Nov. 17, 2022, 11:13 a.m. UTC | #4
Hi Khem,

Thanks for your suggestion. Yes, we can avoid dependency on coreutils by using 'readlink -f'.

I checked the git history a little bit, resolvconf wants to depend on coreutils, and looking at the '-m' option, we can reasonably guess it wants to handle the case of parent directory not existing. 
But in our case, /etc is always there. There's really no need to use '-m'. 'readlink -f' can also work.
I've used a patch to avoid coreutils dependency in V3. It will be sent out soon.

Regards,
Qi

-----Original Message-----
From: Khem Raj <raj.khem@gmail.com> 
Sent: Wednesday, November 16, 2022 2:36 PM
To: Chen, Qi <Qi.Chen@windriver.com>
Cc: openembedded-core@lists.openembedded.org
Subject: Re: [OE-core][PATCH] resolvconf: make it work

On Tue, Nov 15, 2022 at 5:45 AM Chen Qi <Qi.Chen@windriver.com> wrote:
>
> 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, coreutils, util-linux-flock.
>    util-linux-flock is needed by our busybox does not support '-w'
>    by default. coreutils is needed by the busybox's readlink does
>    not support '-m'. sed is needed because we want to avoid package
>    QA issue complaining sed is needed by no one provides it.

Can we avoid dependency on coreutils ? maybe check why -m is needed and perhaps just use absolute link.

>
> Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
> ---
>  meta/recipes-connectivity/resolvconf/resolvconf_1.91.bb | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/meta/recipes-connectivity/resolvconf/resolvconf_1.91.bb 
> b/meta/recipes-connectivity/resolvconf/resolvconf_1.91.bb
> index 94fd2c1a70..3bf5ec6c32 100644
> --- a/meta/recipes-connectivity/resolvconf/resolvconf_1.91.bb
> +++ b/meta/recipes-connectivity/resolvconf/resolvconf_1.91.bb
> @@ -9,7 +9,7 @@ LICENSE = "GPL-2.0-or-later"
>  LIC_FILES_CHKSUM = "file://COPYING;md5=c93c0550bd3173f4504b2cbd8991e50b"
>  AUTHOR = "Thomas Hood"
>  HOMEPAGE = "http://packages.debian.org/resolvconf"
> -RDEPENDS:${PN} = "bash"
> +RDEPENDS:${PN} = "bash sed coreutils util-linux-flock"
>
>  SRC_URI = "git://salsa.debian.org/debian/resolvconf.git;protocol=https;branch=unstable \
>             file://99_resolvconf \
> @@ -39,12 +39,14 @@ do_install () {
>         fi
>         install -d ${D}${base_libdir}/${BPN}
>         install -d ${D}${sysconfdir}/${BPN}
> +       install -d ${D}${nonarch_base_libdir}/${BPN}
>         ln -snf ${localstatedir}/run/${BPN} ${D}${sysconfdir}/${BPN}/run
>         install -d ${D}${sysconfdir} ${D}${base_sbindir}
>         install -d ${D}${mandir}/man8 ${D}${docdir}/${P}
>         cp -pPR etc/resolvconf ${D}${sysconfdir}/
>         chown -R root:root ${D}${sysconfdir}/
>         install -m 0755 bin/resolvconf ${D}${base_sbindir}/
> +       install -m 0755 bin/normalize-resolvconf 
> + ${D}${nonarch_base_libdir}/${BPN}
>         install -m 0755 bin/list-records ${D}${base_libdir}/${BPN}
>         install -d ${D}/${sysconfdir}/network/if-up.d
>         install -m 0755 debian/resolvconf.000resolvconf.if-up 
> ${D}/${sysconfdir}/network/if-up.d/000resolvconf
> @@ -64,4 +66,4 @@ pkg_postinst:${PN} () {
>         fi
>  }
>
> -FILES:${PN} += "${base_libdir}/${BPN}"
> +FILES:${PN} += "${base_libdir}/${BPN} ${nonarch_base_libdir}/${BPN}"
> --
> 2.17.1
>
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#173345): 
> https://lists.openembedded.org/g/openembedded-core/message/173345
> Mute This Topic: https://lists.openembedded.org/mt/95042786/1997914
> Group Owner: openembedded-core+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
> [raj.khem@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
diff mbox series

Patch

diff --git a/meta/recipes-connectivity/resolvconf/resolvconf_1.91.bb b/meta/recipes-connectivity/resolvconf/resolvconf_1.91.bb
index 94fd2c1a70..3bf5ec6c32 100644
--- a/meta/recipes-connectivity/resolvconf/resolvconf_1.91.bb
+++ b/meta/recipes-connectivity/resolvconf/resolvconf_1.91.bb
@@ -9,7 +9,7 @@  LICENSE = "GPL-2.0-or-later"
 LIC_FILES_CHKSUM = "file://COPYING;md5=c93c0550bd3173f4504b2cbd8991e50b"
 AUTHOR = "Thomas Hood"
 HOMEPAGE = "http://packages.debian.org/resolvconf"
-RDEPENDS:${PN} = "bash"
+RDEPENDS:${PN} = "bash sed coreutils util-linux-flock"
 
 SRC_URI = "git://salsa.debian.org/debian/resolvconf.git;protocol=https;branch=unstable \
            file://99_resolvconf \
@@ -39,12 +39,14 @@  do_install () {
 	fi
 	install -d ${D}${base_libdir}/${BPN}
 	install -d ${D}${sysconfdir}/${BPN}
+	install -d ${D}${nonarch_base_libdir}/${BPN}
 	ln -snf ${localstatedir}/run/${BPN} ${D}${sysconfdir}/${BPN}/run
 	install -d ${D}${sysconfdir} ${D}${base_sbindir}
 	install -d ${D}${mandir}/man8 ${D}${docdir}/${P}
 	cp -pPR etc/resolvconf ${D}${sysconfdir}/
 	chown -R root:root ${D}${sysconfdir}/
 	install -m 0755 bin/resolvconf ${D}${base_sbindir}/
+	install -m 0755 bin/normalize-resolvconf ${D}${nonarch_base_libdir}/${BPN}
 	install -m 0755 bin/list-records ${D}${base_libdir}/${BPN}
 	install -d ${D}/${sysconfdir}/network/if-up.d
 	install -m 0755 debian/resolvconf.000resolvconf.if-up ${D}/${sysconfdir}/network/if-up.d/000resolvconf
@@ -64,4 +66,4 @@  pkg_postinst:${PN} () {
 	fi
 }
 
-FILES:${PN} += "${base_libdir}/${BPN}"
+FILES:${PN} += "${base_libdir}/${BPN} ${nonarch_base_libdir}/${BPN}"