[OE-core] [PATCH] bitbake.conf/image.bbclass: Ensure images use the correct passwd/group files

Martin Jansa martin.jansa at gmail.com
Thu Dec 8 07:05:49 UTC 2011


On Thu, Dec 08, 2011 at 12:53:11AM +0100, Andreas Müller wrote:
> On Wednesday, December 07, 2011 06:34:07 PM Richard Purdie wrote:
> > We need pseudo to use the rootfs passwd/group files belonging to the
> > rootfs when building images. This patch ensures that we use the rootfs
> > files instead of those in the sysroot which can lead to incorrect file
> > ownership issues.
> > 
> > Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
> > 
> > diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass
> > index 4642fa6..865d430 100644
> > --- a/meta/classes/image.bbclass
> > +++ b/meta/classes/image.bbclass
> > @@ -121,6 +121,8 @@ IMAGE_LINGUAS ?= "de-de fr-fr en-gb"
> > 
> >  LINGUAS_INSTALL = "${@" ".join(map(lambda s: "locale-base-%s" % s,
> > d.getVar('IMAGE_LINGUAS', 1).split()))}"
> > 
> > +PSEUDO_PASSWD = "${IMAGE_ROOTFS}"
> > +
> >  do_rootfs[nostamp] = "1"
> >  do_rootfs[dirs] = "${TOPDIR}"
> >  do_rootfs[lockfiles] += "${IMAGE_ROOTFS}.lock"
> > diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf
> > index e80cc32..eeb1fc4 100644
> > --- a/meta/conf/bitbake.conf
> > +++ b/meta/conf/bitbake.conf
> > @@ -580,11 +580,12 @@ SRC_URI = "file://${FILE}"
> > 
> >  # Use pseudo as the fakeroot implementation
> >  PSEUDO_LOCALSTATEDIR ?= "${WORKDIR}/pseudo/"
> > +PSEUDO_PASSWD ?= "${STAGING_DIR_TARGET}"
> >  export PSEUDO_DISABLED = "1"
> >  #export PSEUDO_PREFIX = "${STAGING_DIR_NATIVE}${prefix_native}"
> >  #export PSEUDO_BINDIR = "${STAGING_DIR_NATIVE}${bindir_native}"
> >  #export PSEUDO_LIBDIR =
> > "${STAGING_DIR_NATIVE}$PSEUDOBINDIR/../lib/pseudo/lib -FAKEROOTENV =
> > "PSEUDO_PREFIX=${STAGING_DIR_NATIVE}${prefix_native}
> > PSEUDO_LOCALSTATEDIR=${PSEUDO_LOCALSTATEDIR}
> > PSEUDO_PASSWD=${STAGING_DIR_TARGET} PSEUDO_NOSYMLINKEXP=1
> > PSEUDO_DISABLED=0" +FAKEROOTENV =
> > "PSEUDO_PREFIX=${STAGING_DIR_NATIVE}${prefix_native}
> > PSEUDO_LOCALSTATEDIR=${PSEUDO_LOCALSTATEDIR}
> > PSEUDO_PASSWD=${PSEUDO_PASSWD} PSEUDO_NOSYMLINKEXP=1 PSEUDO_DISABLED=0"
> > FAKEROOTNOENV = "PSEUDO_UNLOAD=1"
> >  FAKEROOTDIRS = "${PSEUDO_LOCALSTATEDIR}"
> >  PREFERRED_PROVIDER_virtual/fakeroot-native ?= "pseudo-native"
> dbus still needs manual call of 
> 
> 	chown messagebus:messagebus /var/run/dbus /var/lib/dbus
> 
> ( it is root:root on my image) and
> 
> 	chown root:messagebus /usr/libexec/dbus-daemon-launch-helper
> 
> ( it is avahi:netdev on my image )
> 
> Does this one fix it?

It did for me, see:
http://bugzilla.pokylinux.org/show_bug.cgi?id=1711

> To test: Is it enough to rebuild dbus?

I had right owners in dbus package, wrong only in rootfs, so your issue
could be different.

Regards,
-- 
Martin 'JaMa' Jansa     jabber: Martin.Jansa at gmail.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.openembedded.org/pipermail/openembedded-core/attachments/20111208/e62af552/attachment-0002.sig>


More information about the Openembedded-core mailing list