Gentoo Archives: gentoo-user

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

Replies

Subject Author
Re: [gentoo-user] Emerge with --root option : users not created Shinkan <shinkan@×××××.com>