From: Mark Hatle <mark.hatle@windriver.com>
To: <openembedded-core@lists.openembedded.org>
Subject: Re: [PATCH] bitbake.conf/image.bbclass: Ensure images use the correct passwd/group files
Date: Thu, 8 Dec 2011 09:40:38 -0600 [thread overview]
Message-ID: <4EE0DA76.8060807@windriver.com> (raw)
In-Reply-To: <20111208070548.GB3761@jama.jama.net>
On 12/8/11 1:05 AM, Martin Jansa wrote:
> 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@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.
Andreas: What packaging type are you using?
I know that RPM never uses the uid/gid, it always does a look up. If the look
up fails it then falls back to "root". So you should never see something like a
70, unless there is a manual chown/grp somewhere making the change.
opkg had a bug before where it only used the uid/gid number, I know Richard
patched that -- but I'm not sure what happens if the look up fails. It may fall
back to the embedded numeric ids. If that is the case, the real issue may
simply be that the uname/gname hasn't yet made it into the passwd/group files.
If you are using opkg, try switching to RPM and see if the behavior on these
files changes, if it does what the new value is.
--Mark
> Regards,
>
>
>
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
next prev parent reply other threads:[~2011-12-08 15:47 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-07 17:34 [PATCH] bitbake.conf/image.bbclass: Ensure images use the correct passwd/group files Richard Purdie
2011-12-07 17:39 ` Martin Jansa
2011-12-07 23:53 ` Andreas Müller
2011-12-08 0:01 ` Richard Purdie
2011-12-08 1:23 ` Andreas Müller
2011-12-08 7:05 ` Martin Jansa
2011-12-08 15:40 ` Mark Hatle [this message]
2011-12-08 23:21 ` Andreas Müller
2011-12-09 13:44 ` Koen Kooi
2011-12-09 15:05 ` Richard Purdie
2011-12-09 15:10 ` Koen Kooi
2011-12-10 0:41 ` Andreas Müller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4EE0DA76.8060807@windriver.com \
--to=mark.hatle@windriver.com \
--cc=openembedded-core@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox