From: Mark Hatle <mark.hatle@windriver.com>
To: "Andreas Müller" <schnitzeltony@googlemail.com>
Cc: Paul Eggleton <paul.eggleton@linux.intel.com>,
openembedded-core@lists.openembedded.org
Subject: Re: useradd.bbclass question
Date: Thu, 2 May 2013 10:53:02 -0500 [thread overview]
Message-ID: <51828BDE.6050001@windriver.com> (raw)
In-Reply-To: <CALbNGRRm15aBQXAuqcJDEsvQ2UNC-VKj8_brbGPHj-bqxTaSKw@mail.gmail.com>
On 5/2/13 10:31 AM, Andreas Müller wrote:
> On Thu, May 2, 2013 at 5:18 PM, Andreas Müller
> <schnitzeltony@googlemail.com> wrote:
>> On Thu, May 2, 2013 at 5:09 PM, Mark Hatle <mark.hatle@windriver.com> wrote:
>>> On 5/2/13 9:55 AM, Andreas Müller wrote:
>>>>
>>>> On Thu, May 2, 2013 at 4:50 PM, Mark Hatle <mark.hatle@windriver.com>
>>>> wrote:
>>>>>
>>>>> On 5/2/13 9:34 AM, Paul Eggleton wrote:
>>>>>>
>>>>>>
>>>>>> On Thursday 02 May 2013 08:35:55 Mark Hatle wrote:
>>>>>>>
>>>>>>>
>>>>>>> On 5/2/13 2:49 AM, Andreas Müller wrote:
>>>>>>>>
>>>>>>>>
>>>>>>>> on one of my build machines useradd.bbclass seem to use the UID/GID of
>>>>>>>> build host. On other machines useradd works correct.
>>>>>>>>
>>>>>>>> I have the follwing in gdm:
>>>>>>>>
>>>>>>>> <snip>
>>>>>>>> do_install_append() {
>>>>>>>>
>>>>>>>> ...
>>>>>>>> chown -R gdm:gdm ${D}${localstatedir}/lib/gdm
>>>>>>>> chmod 0750 ${D}${localstatedir}/lib/gdm
>>>>>>>>
>>>>>>>> }
>>>>>>>>
>>>>>>>> ...
>>>>>>>>
>>>>>>>> USERADD_PACKAGES = "${PN}"
>>>>>>>> USERADD_PARAM_${PN} = "--system --no-create-home --home
>>>>>>>> ${localstatedir}/lib/gdm --user-group gdm"
>>>>>>>> <snip/>
>>>>>
>>>>>
>>>>>
>>>>> I don't know how ipk and deb handle this. But with the RPM system it
>>>>> captures the uname/gname (not uid/gid) and uses that when installing the
>>>>> file(s). This way the USERADD is processed before the install and the
>>>>> right
>>>>> value is used during the install.
>>>>>
>>>>> We may have a problem here where we need to also process the useradd
>>>>> -before- the do_install runs so that it's available for pseudo to use for
>>>>> deb/ipk. (But if deb/ipk capture uid/gid vs uname/gname.. unless we set
>>>>> a
>>>>> static value we could still have a problem.)
>>>>
>>>> 1. gdm's log.do_install starts with so I assume the useradd stuff is
>>>> performed before do_install.
>>>>
>>>> | DEBUG: SITE files ['endian-little', 'bit-32', 'arm-common',
>>>> 'common-linux', 'common-glibc', 'arm-linux', 'arm-linux-gnueabi',
>>>> 'common']
>>>> | DEBUG: Executing shell function useradd_sysroot
>>>> | Running useradd commands...
>>>> | DEBUG: Shell function useradd_sysroot finished
>>>> | DEBUG: Executing shell function do_install
>>>
>>>
>>> Ahh yes, there it is.. I forgot as well.
>>>
>>> ok, so the obvious problems are resolved. The only place I can suggest you
>>> start looking would be in the sysroot's etc/passwd and etc/group files. If
>>> they are not correct -- then this indicates a failure in the easy case and
>>> could lead to incorrect values.
>> These are OK and as mentioned above (cleansstate/rebuild) definitely
>> prepared before do_install.
>>>
>>> The other thing you can do is add debugging to your script and see what uid
>>> and such it's looking for.. Dumping out the environment variables that start
>>> with 'PSEUDO_' may help. I believe the value is PSEUDO_PASSWD for the path.
>>> If it's not set it falls back to the chroot (which you won't be in) and then
>>> back to the system file --- so if PSEUDO_PASSWD isn't set this could be a
>>> clue as to the fault.
> [andreas@oe-core]$ bitbake -e gdm | grep ^PSEUDO_PASSWD
> PSEUDO_PASSWD="/home/andreas/tmp/oe-core-eglibc/sysroots/overo"
Check that path contains 'etc/passwd' and 'etc/group'. If not, that would be
the issue.. if it does contain them -- then something else is happening.
--Mark
>>>
>> I will check that - still strange to me is that I have different
>> behaviour for two hosts - both with gdm user/group.
>>
>> Andreas
next prev parent reply other threads:[~2013-05-02 16:11 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-02 7:49 useradd.bbclass question Andreas Müller
2013-05-02 13:35 ` Mark Hatle
2013-05-02 14:34 ` Paul Eggleton
2013-05-02 14:43 ` Andreas Müller
2013-05-02 14:49 ` Richard Purdie
2013-05-02 14:53 ` Paul Eggleton
2013-05-02 14:50 ` Mark Hatle
2013-05-02 14:55 ` Andreas Müller
2013-05-02 15:09 ` Mark Hatle
2013-05-02 15:18 ` Andreas Müller
2013-05-02 15:31 ` Andreas Müller
2013-05-02 15:53 ` Mark Hatle [this message]
2013-05-02 16:40 ` Andreas Müller
2013-05-02 17:03 ` Andreas Müller
2013-05-02 15:51 ` Mark Hatle
2013-05-02 15:06 ` Richard Purdie
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=51828BDE.6050001@windriver.com \
--to=mark.hatle@windriver.com \
--cc=openembedded-core@lists.openembedded.org \
--cc=paul.eggleton@linux.intel.com \
--cc=schnitzeltony@googlemail.com \
/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