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

