Gentoo Archives: gentoo-user

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