* [gentoo-user] Emerge with --root option : users not created @ 2009-12-14 13:02 Shinkan 2009-12-14 15:13 ` Willie Wong 2009-12-14 20:41 ` Alan McKinnon 0 siblings, 2 replies; 4+ messages in thread From: Shinkan @ 2009-12-14 13:02 UTC (permalink / raw To: gentoo-user [-- Attachment #1: Type: text/plain, Size: 780 bytes --] Hi everyone, I wanted to submit this as a bug on bugzilla, but I must be sure there is nothing that I miss. Let's say I have a /target dir. If I do 'emerge --root=/target <someport>' (cross-emerge), and that <someport> is supposed to create users (like vixie-cron, clamav or many others), users are not created on /target. I can verify that by chrooting on /target and making something that requires this user (such as launching clamd for clamav), or simply by looking at /target/etc/passwd to see that there's no expected users. Am I missing somethings or is this really a bug ? Thanks in advance. -- Pierre. "Sometimes when I'm talking, my words can't keep up with my thoughts. I wonder why we think faster than we speak. Probably so we can think twice." - Bill Watterson [-- Attachment #2: Type: text/html, Size: 894 bytes --] ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [gentoo-user] Emerge with --root option : users not created 2009-12-14 13:02 [gentoo-user] Emerge with --root option : users not created Shinkan @ 2009-12-14 15:13 ` Willie Wong 2009-12-14 16:15 ` Shinkan 2009-12-14 20:41 ` Alan McKinnon 1 sibling, 1 reply; 4+ messages in thread From: Willie Wong @ 2009-12-14 15:13 UTC (permalink / raw To: gentoo-user On Mon, Dec 14, 2009 at 02:02:22PM +0100, Penguin Lover Shinkan squawked: > I wanted to submit this as a bug on bugzilla, but I must be sure there is > nothing that I miss. > > Let's say I have a /target dir. > If I do 'emerge --root=/target <someport>' (cross-emerge), and that > <someport> is supposed to create users (like vixie-cron, clamav or many > others), users are not created on /target. I can verify that by chrooting on > /target and making something that requires this user (such as launching > clamd for clamav), or simply by looking at /target/etc/passwd to see that > there's no expected users. > > Am I missing somethings or is this really a bug ? > If you don't get a better answer here, you should ask the embedded group. But I think it maybe a bug: Looking at eutils.eclass, in function enewuser, it explicitly checks for whether the shell specified is available in ${ROOT}, but when it comes time to create the actual user, it calls the system useradd, which I think will add the user to /etc, and not ${ROOT}/etc... Though, I cannot right now think of how to actually change it so that it will create the appropriate accounts in a modified ${ROOT}. AFAIK useradd does not support this. It may require re-implementing useradd in portage? Which will just be silly. Perhaps ${ROOT} is not designed to be used the way you intend to use it? It looks like you are building embedded or cross-compiled, right? Maybe a work-around is to do everything in a CHROOT? Anyway, ask gentoo-embedded to see if there's any work arounds, and maybe ask gentoo-dev to clarify on what $ROOT is used for? Cheers, W -- A plateau is a high form of flattery. Sortir en Pantoufles: up 1102 days, 13:42 ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [gentoo-user] Emerge with --root option : users not created 2009-12-14 15:13 ` Willie Wong @ 2009-12-14 16:15 ` Shinkan 0 siblings, 0 replies; 4+ messages in thread From: Shinkan @ 2009-12-14 16:15 UTC (permalink / raw To: gentoo-user [-- Attachment #1: Type: text/plain, Size: 2038 bytes --] Thanks, I'll do that ! 2009/12/14 Willie Wong <wwong@math.princeton.edu> > On Mon, Dec 14, 2009 at 02:02:22PM +0100, Penguin Lover Shinkan squawked: > > I wanted to submit this as a bug on bugzilla, but I must be sure there is > > nothing that I miss. > > > > Let's say I have a /target dir. > > If I do 'emerge --root=/target <someport>' (cross-emerge), and that > > <someport> is supposed to create users (like vixie-cron, clamav or many > > others), users are not created on /target. I can verify that by chrooting > on > > /target and making something that requires this user (such as launching > > clamd for clamav), or simply by looking at /target/etc/passwd to see that > > there's no expected users. > > > > Am I missing somethings or is this really a bug ? > > > > If you don't get a better answer here, you should ask the embedded > group. But I think it maybe a bug: > > Looking at eutils.eclass, in function enewuser, it explicitly checks > for whether the shell specified is available in ${ROOT}, but when it > comes time to create the actual user, it calls the system useradd, > which I think will add the user to /etc, and not ${ROOT}/etc... > > Though, I cannot right now think of how to actually change it so that > it will create the appropriate accounts in a modified ${ROOT}. AFAIK > useradd does not support this. It may require re-implementing useradd > in portage? Which will just be silly. > > Perhaps ${ROOT} is not designed to be used the way you intend to use > it? It looks like you are building embedded or cross-compiled, right? > Maybe a work-around is to do everything in a CHROOT? > > Anyway, ask gentoo-embedded to see if there's any work arounds, and > maybe ask gentoo-dev to clarify on what $ROOT is used for? > > Cheers, > > W > -- > A plateau is a high form of flattery. > Sortir en Pantoufles: up 1102 days, 13:42 > > -- Pierre. "Sometimes when I'm talking, my words can't keep up with my thoughts. I wonder why we think faster than we speak. Probably so we can think twice." - Bill Watterson [-- Attachment #2: Type: text/html, Size: 2613 bytes --] ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [gentoo-user] Emerge with --root option : users not created 2009-12-14 13:02 [gentoo-user] Emerge with --root option : users not created Shinkan 2009-12-14 15:13 ` Willie Wong @ 2009-12-14 20:41 ` Alan McKinnon 1 sibling, 0 replies; 4+ messages in thread From: Alan McKinnon @ 2009-12-14 20:41 UTC (permalink / raw To: gentoo-user; +Cc: Shinkan On Monday 14 December 2009 15:02:22 Shinkan wrote: > Hi everyone, > > I wanted to submit this as a bug on bugzilla, but I must be sure there is > nothing that I miss. > > Let's say I have a /target dir. > If I do 'emerge --root=/target <someport>' (cross-emerge), and that > <someport> is supposed to create users (like vixie-cron, clamav or many > others), users are not created on /target. I can verify that by chrooting > on /target and making something that requires this user (such as launching > clamd for clamav), or simply by looking at /target/etc/passwd to see that > there's no expected users. > > Am I missing somethings or is this really a bug ? What you are trying to do makes no sense. You are either cross-compiling for chroot-type purposes or cross-compiling for a different machine and arch. If it's the former, you do not need or want an /etc/passwd in the chroot - you start such things with the EUID of the intended user from the starts. If it's for another machine, what good will a passwd file be? What are you going to do with it? You certainly can't copy it to the target intact, you can't cat and append it to the passwd file on the target host, in fact you cannot make any assumptions about the target at all, not even that a passwd file is present there. The only thing you can do in that case is write an installer script that takes you tar.bz2, unpacks it on the target and then checks the status there and runs useradd as necessary depending on what it finds. -- alan dot mckinnon at gmail dot com ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2009-12-15 6:03 UTC | newest] Thread overview: 4+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2009-12-14 13:02 [gentoo-user] Emerge with --root option : users not created Shinkan 2009-12-14 15:13 ` Willie Wong 2009-12-14 16:15 ` Shinkan 2009-12-14 20:41 ` Alan McKinnon
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox