* [gentoo-embedded] Adding new users when using buildroot?
@ 2009-09-04 17:18 Ed W
2009-09-04 17:27 ` Ned Ludd
2009-09-04 18:28 ` Sven Rebhan
0 siblings, 2 replies; 4+ messages in thread
From: Ed W @ 2009-09-04 17:18 UTC (permalink / raw
To: gentoo-embedded
Hi, I am building a small buildroot using say:
ROOT=/var/embedded/builds/base1 PORTAGE_CONFIGROOT=/var/embedded/portage
emerge -v dropbear
The end result seems to be that I get my new user added to the build
system, but not to the ROOT= system. I have seen a few people report
issues when using packages, but is this just a known limitation of
recent portage or do I need some other commandline incantations?
Obviously plenty of other ways to solve this, but curious if there is a
solution within the portage build process?
Thanks
Ed W
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [gentoo-embedded] Adding new users when using buildroot?
2009-09-04 17:18 [gentoo-embedded] Adding new users when using buildroot? Ed W
@ 2009-09-04 17:27 ` Ned Ludd
2009-09-04 18:28 ` Sven Rebhan
1 sibling, 0 replies; 4+ messages in thread
From: Ned Ludd @ 2009-09-04 17:27 UTC (permalink / raw
To: gentoo-embedded
On Fri, 2009-09-04 at 18:18 +0100, Ed W wrote:
> Hi, I am building a small buildroot using say:
>
> ROOT=/var/embedded/builds/base1 PORTAGE_CONFIGROOT=/var/embedded/portage
> emerge -v dropbear
>
> The end result seems to be that I get my new user added to the build
> system, but not to the ROOT= system. I have seen a few people report
> issues when using packages, but is this just a known limitation of
> recent portage or do I need some other commandline incantations?
>
> Obviously plenty of other ways to solve this, but curious if there is a
> solution within the portage build process?
buildroot is not the best term to use when refering to
portage/gentoo/embedded. It just confuses people.
Reason being.. http://buildroot.org/
As for users not being added in $ROOT. Yes you are right and sadly this
is a known limitation of portage/pam/and friends right now.
--
Ned Ludd <solar@gentoo.org>
Gentoo Linux
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [gentoo-embedded] Adding new users when using buildroot?
2009-09-04 17:18 [gentoo-embedded] Adding new users when using buildroot? Ed W
2009-09-04 17:27 ` Ned Ludd
@ 2009-09-04 18:28 ` Sven Rebhan
2009-09-04 18:50 ` Ed W
1 sibling, 1 reply; 4+ messages in thread
From: Sven Rebhan @ 2009-09-04 18:28 UTC (permalink / raw
To: gentoo-embedded
2009/9/4 Ed W <lists@wildgooses.com>:
> Obviously plenty of other ways to solve this, but curious if there is a
> solution within the portage build process?
I don't know of any standard way. Portage uses 'useradd' to generate
the new user
and this command does _not_ support a ROOT. The only (non-standard) way to
add a new user is by directly writing to /etc/passwd, but I'm not sure
if this works
on all OSes supported by Gentoo.
Anyway, if you follow http://gentoo.mindzoo.de/index.cgi/wiki/Cross%20Install
you will find the command
find /var/db/pkg -name '*.ebuild' -exec grep -qF 'pkg_postinst()' {}
\; -exec ebuild {} postinst \;
which reruns all postinstall sections of your cross-compiled system on
the target
and thus also creates the users.
Have fun!
Sven
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [gentoo-embedded] Adding new users when using buildroot?
2009-09-04 18:28 ` Sven Rebhan
@ 2009-09-04 18:50 ` Ed W
0 siblings, 0 replies; 4+ messages in thread
From: Ed W @ 2009-09-04 18:50 UTC (permalink / raw
To: gentoo-embedded
Sven Rebhan wrote:
> Anyway, if you follow http://gentoo.mindzoo.de/index.cgi/wiki/Cross%20Install
> you will find the command
>
> find /var/db/pkg -name '*.ebuild' -exec grep -qF 'pkg_postinst()' {}
> \; -exec ebuild {} postinst \;
>
> which reruns all postinstall sections of your cross-compiled system on
> the target
> and thus also creates the users.
>
That seems like a good idea, but I think the docs say that user creation
should be in pkg_setup() and certainly this is the case with dropbear?
Seems a bit dangerous to re-run pkg_setup for every package...?
I also noticed that since I have only busybox in my final build and it's
got pretty lousy support for adduser I may need to inject directly into
/etc/
Actually the docs here
http://devmanual.gentoo.org/ebuild-writing/users-and-groups/index.html
suggest that this IS supposed to work inside the sandbox and hence we
might reasonably expect it to work with ROOT= set. However, as Ned
says, it seems not to work right now...
Oh well
Thanks
Ed W
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2009-09-04 13:41 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-09-04 17:18 [gentoo-embedded] Adding new users when using buildroot? Ed W
2009-09-04 17:27 ` Ned Ludd
2009-09-04 18:28 ` Sven Rebhan
2009-09-04 18:50 ` Ed W
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox