Patchwork [01/40] resolveconf: Fix file owners

login
register
mail settings
Submitter Mark Hatle
Date June 22, 2011, 5:35 p.m.
Message ID <5c4ce64fb0bf1c4e8a5899e292917836953412d3.1308763995.git.mark.hatle@windriver.com>
Download mbox | patch
Permalink /patch/6257/
State New, archived
Headers show

Comments

Mark Hatle - June 22, 2011, 5:35 p.m.
The file ownership of various configuration files needs to be set to root:root
otherwise it inherits the user id of the build.

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
---
 .../resolvconf/resolvconf_1.48.bb                  |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
Khem Raj - June 23, 2011, 11:30 p.m.
On 06/22/2011 10:35 AM, Mark Hatle wrote:
> The file ownership of various configuration files needs to be set to root:root
> otherwise it inherits the user id of the build.
>
> Signed-off-by: Mark Hatle<mark.hatle@windriver.com>
> ---
>   .../resolvconf/resolvconf_1.48.bb                  |    3 ++-
>   1 files changed, 2 insertions(+), 1 deletions(-)
>
> diff --git a/meta/recipes-connectivity/resolvconf/resolvconf_1.48.bb b/meta/recipes-connectivity/resolvconf/resolvconf_1.48.bb
> index cb8aaaf..507a233 100644
> --- a/meta/recipes-connectivity/resolvconf/resolvconf_1.48.bb
> +++ b/meta/recipes-connectivity/resolvconf/resolvconf_1.48.bb
> @@ -11,7 +11,7 @@ AUTHOR = "Thomas Hood"
>   HOMEPAGE = "http://packages.debian.org/resolvconf"
>   DEPENDS = "bash"
>   RDEPENDS_${PN} = "bash"
> -PR = "r0"
> +PR = "r1"
>
>   SRC_URI = "${DEBIAN_MIRROR}/main/r/resolvconf/resolvconf_${PV}.tar.gz"
>
> @@ -27,6 +27,7 @@ do_install () {
>   	install -d ${D}${sysconfdir} ${D}${sbindir} ${D}${base_sbindir} ${D}${localstatedir}/volatile/run/resolvconf/interface
>   	install -d ${D}${mandir}/man8 ${D}${docdir}/${P}
>   	cp -pPR etc/* ${D}${sysconfdir}/
> +	chown -R root:root ${D}${sysconfdir}/

you can also modify install command 3 lines above
--group=GROUP
--mode=MODE
--owner=OWNER
--preserve-timestamps

one of above options is what you need.

>   	install -m 0755 bin/resolvconf ${D}${base_sbindir}/
>   	install -m 0644 README ${D}${docdir}/${P}/
>   	install -m 0644 man/resolvconf.8 ${D}${mandir}/man8/

Patch

diff --git a/meta/recipes-connectivity/resolvconf/resolvconf_1.48.bb b/meta/recipes-connectivity/resolvconf/resolvconf_1.48.bb
index cb8aaaf..507a233 100644
--- a/meta/recipes-connectivity/resolvconf/resolvconf_1.48.bb
+++ b/meta/recipes-connectivity/resolvconf/resolvconf_1.48.bb
@@ -11,7 +11,7 @@  AUTHOR = "Thomas Hood"
 HOMEPAGE = "http://packages.debian.org/resolvconf"
 DEPENDS = "bash"
 RDEPENDS_${PN} = "bash"
-PR = "r0"
+PR = "r1"
 
 SRC_URI = "${DEBIAN_MIRROR}/main/r/resolvconf/resolvconf_${PV}.tar.gz"
 
@@ -27,6 +27,7 @@  do_install () {
 	install -d ${D}${sysconfdir} ${D}${sbindir} ${D}${base_sbindir} ${D}${localstatedir}/volatile/run/resolvconf/interface
 	install -d ${D}${mandir}/man8 ${D}${docdir}/${P}
 	cp -pPR etc/* ${D}${sysconfdir}/
+	chown -R root:root ${D}${sysconfdir}/
 	install -m 0755 bin/resolvconf ${D}${base_sbindir}/
 	install -m 0644 README ${D}${docdir}/${P}/
 	install -m 0644 man/resolvconf.8 ${D}${mandir}/man8/