Gentoo Archives: gentoo-embedded

From: Ed W <lists@××××××××××.com>
To: gentoo-embedded@l.g.o
Subject: Re: [gentoo-embedded] emerge --root : users not created
Date: Mon, 14 Dec 2009 17:14:41
Message-Id: 4B267265.7080406@wildgooses.com
In Reply to: [gentoo-embedded] emerge --root : users not created by Shinkan
1 Yep, seems like a known bug
2
3 Also the bug exists if you merge in a binary package I believe?
4
5 Quite annoying - workarounds would be highly appreciated!
6
7 Ed
8
9
10 Shinkan wrote:
11 > Hi everyone,
12 >
13 > I posted this on gentoo-user initially, but someone answered and
14 > advised to post this to embedded :
15 >
16 > I wanted to submit this as a bug on bugzilla, but I must be sure there
17 > is nothing that I miss.
18 >
19 > Let's say I have a /target dir.
20 > If I do 'emerge --root=/target <someport>' (cross-emerge), and that
21 > <someport> is supposed to create users (like vixie-cron, clamav or
22 > many others), users are not created on /target. I can verify that by
23 > chrooting on /target and making something that requires this user
24 > (such as launching clamd for clamav), or simply by looking at
25 > /target/etc/passwd to see that there's no expected users.
26 >
27 > Am I missing somethings or is this really a bug ?
28 >
29 >
30 > Here is "Willie Wong" answer :
31 >
32 > If you don't get a better answer here, you should ask the embedded
33 > group. But I think it maybe a bug:
34 >
35 > Looking at eutils.eclass, in function enewuser, it explicitly checks
36 > for whether the shell specified is available in ${ROOT}, but when it
37 > comes time to create the actual user, it calls the system useradd,
38 > which I think will add the user to /etc, and not ${ROOT}/etc...
39 >
40 > Though, I cannot right now think of how to actually change it so that
41 > it will create the appropriate accounts in a modified ${ROOT}. AFAIK
42 > useradd does not support this. It may require re-implementing useradd
43 > in portage? Which will just be silly.
44 >
45 > Perhaps ${ROOT} is not designed to be used the way you intend to use
46 > it? It looks like you are building embedded or cross-compiled, right?
47 > Maybe a work-around is to do everything in a CHROOT?
48 >
49 > Anyway, ask gentoo-embedded to see if there's any work arounds, and
50 > maybe ask gentoo-dev to clarify on what $ROOT is used for?
51 >
52 > Thanks in advance.
53 >
54 > --
55 > Pierre.
56 > "Sometimes when I'm talking, my words can't keep up with my thoughts.
57 > I wonder why we think faster than we speak. Probably so we can think
58 > twice." - Bill Watterson

Replies

Subject Author
Re: [gentoo-embedded] emerge --root : users not created Sven Rebhan <odinshorse@××××××××××.com>