Gentoo Archives: gentoo-embedded

From: Shinkan <shinkan@×××××.com>
To: gentoo-embedded@l.g.o
Subject: [gentoo-embedded] emerge --root : users not created
Date: Mon, 14 Dec 2009 16:19:24
Message-Id: 166af1cf0912140817j66fb0ba3q96f1e8285790bc8@mail.gmail.com
1 Hi everyone,
2
3 I posted this on gentoo-user initially, but someone answered and advised to
4 post this to embedded :
5
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 on
13 /target and making something that requires this user (such as launching
14 clamd for clamav), or simply by looking at /target/etc/passwd to see that
15 there's no expected users.
16
17 Am I missing somethings or is this really a bug ?
18
19
20 Here is "Willie Wong" answer :
21
22 If you don't get a better answer here, you should ask the embedded
23 group. But I think it maybe a bug:
24
25 Looking at eutils.eclass, in function enewuser, it explicitly checks
26 for whether the shell specified is available in ${ROOT}, but when it
27 comes time to create the actual user, it calls the system useradd,
28 which I think will add the user to /etc, and not ${ROOT}/etc...
29
30 Though, I cannot right now think of how to actually change it so that
31 it will create the appropriate accounts in a modified ${ROOT}. AFAIK
32 useradd does not support this. It may require re-implementing useradd
33 in portage? Which will just be silly.
34
35 Perhaps ${ROOT} is not designed to be used the way you intend to use
36 it? It looks like you are building embedded or cross-compiled, right?
37 Maybe a work-around is to do everything in a CHROOT?
38
39 Anyway, ask gentoo-embedded to see if there's any work arounds, and
40 maybe ask gentoo-dev to clarify on what $ROOT is used for?
41
42 Thanks in advance.
43
44 --
45 Pierre.
46 "Sometimes when I'm talking, my words can't keep up with my thoughts. I
47 wonder why we think faster than we speak. Probably so we can think twice." -
48 Bill Watterson

Replies

Subject Author
Re: [gentoo-embedded] emerge --root : users not created Ed W <lists@××××××××××.com>