Mailing List Archive

busybox and virtuals (editor, pager etc.)
Hi everyone

I'm building an embedded gentoo image for an ALIX-System [1], which
should base on uclibc, busybox, baselayout-2 and openrc.

I have my own profile which inherits and strips down the official 2008.0
gentoo profile to a bare minimum. This works all fine so far.

However if I perform an emerge world:
PORTAGE_CONFIGROOT=[...] ROOT=[...] emerge world -vp

Portage wants to merge:
virtual/editor-0
app-editors/nano

virtual/pager-0
sys-apps/less

I have enabled less and vi in my busybox, therefore I don't want to
install an "external" pager and editor.

Both virtual ebuilds (virtual/editor and virtual/pager) don't list
"sys-apps/busybox" as a possible RDEPEND. This is understandable, as
busybox can be compiled with or without a pager/editor.

The problem could be circumvented by adding new local use flags to the
busybox ebuild, for instance 'editor', 'pager' 'dev-manager' etc. (which
could also be used to enable/disable those features if no "savedconfig"
was found).
Then the RDEPEND of the virtual/pager ebuild and co. have to be extended
with use dependencies, for example pager-0.ebuild:
RDEPEND="|| ( sys-apps/less
sys-apps/more
sys-apps/most
sys-apps/util-linux
app-text/lv
sys-apps/busybox[pager] )"

Of course this requires EAPI-2...


What do you think?


regards
Chris


[1] http://www.pcengines.ch/alix.htm
Re: busybox and virtuals (editor, pager etc.) [ In reply to ]
On Thursday 09 July 2009 10:24:55 Christian Affolter wrote:
> I'm building an embedded gentoo image for an ALIX-System [1], which
> should base on uclibc, busybox, baselayout-2 and openrc.
>
> I have my own profile which inherits and strips down the official 2008.0
> gentoo profile to a bare minimum. This works all fine so far.
>
> However if I perform an emerge world:
> PORTAGE_CONFIGROOT=[...] ROOT=[...] emerge world -vp
>
> Portage wants to merge:
> virtual/editor-0
> app-editors/nano
>
> virtual/pager-0
> sys-apps/less
>
> I have enabled less and vi in my busybox, therefore I don't want to
> install an "external" pager and editor.

use the profile's package.provided then
-mike
Re: busybox and virtuals (editor, pager etc.) [ In reply to ]
Hi Mike

>> However if I perform an emerge world:
>> PORTAGE_CONFIGROOT=[...] ROOT=[...] emerge world -vp
>>
>> Portage wants to merge:
>> virtual/editor-0
>> app-editors/nano
>>
>> virtual/pager-0
>> sys-apps/less
>>
>> I have enabled less and vi in my busybox, therefore I don't want to
>> install an "external" pager and editor.
>
> use the profile's package.provided then

Yes, that's what I do at the moment... However it would be much nicer if
the powerful gentoo use and dependency system could be used for this.

Furthermore BusyBox init-scripts (for crond, syslogd etc.) could be
installed according to the enabled use-flags, rather than manually.

Is there something that speaks against such a change?

If not, I'm willing to provide the necessary patches.


regards
Chris
Re: busybox and virtuals (editor, pager etc.) [ In reply to ]
On Tue, 2009-07-21 at 22:28 +0200, Christian Affolter wrote:
> Hi Mike
>
> >> However if I perform an emerge world:
> >> PORTAGE_CONFIGROOT=[...] ROOT=[...] emerge world -vp
> >>
> >> Portage wants to merge:
> >> virtual/editor-0
> >> app-editors/nano
> >>
> >> virtual/pager-0
> >> sys-apps/less
> >>
> >> I have enabled less and vi in my busybox, therefore I don't want to
> >> install an "external" pager and editor.
> >
> > use the profile's package.provided then
>
> Yes, that's what I do at the moment... However it would be much nicer if
> the powerful gentoo use and dependency system could be used for this.
>
> Furthermore BusyBox init-scripts (for crond, syslogd etc.) could be
> installed according to the enabled use-flags, rather than manually.

With as many features as busybox supports this could get out of control
quickly with USE= flags for per-options.


> Is there something that speaks against such a change?
>
> If not, I'm willing to provide the necessary patches

Patches are always most welcome. But I sorta rather tie it to something
more simple. Like maybe when 'make-symlinks' is enabled. One can assume
he/she is using busybox for the core system.


--
Ned Ludd <solar@gentoo.org>
Gentoo Linux
Re: busybox and virtuals (editor, pager etc.) [ In reply to ]
>>>> However if I perform an emerge world:
>>>> PORTAGE_CONFIGROOT=[...] ROOT=[...] emerge world -vp
>>>>
>>>> Portage wants to merge:
>>>> virtual/editor-0
>>>> app-editors/nano
>>>>
>>>> virtual/pager-0
>>>> sys-apps/less
>>>>
>>>> I have enabled less and vi in my busybox, therefore I don't want to
>>>> install an "external" pager and editor.
>>> use the profile's package.provided then
>> Yes, that's what I do at the moment... However it would be much nicer if
>> the powerful gentoo use and dependency system could be used for this.
>>
>> Furthermore BusyBox init-scripts (for crond, syslogd etc.) could be
>> installed according to the enabled use-flags, rather than manually.
>
> With as many features as busybox supports this could get out of control
> quickly with USE= flags for per-options.

That's true. On the other hand, providing use-flags only for existing
virtuals (for example cron, syslog, tar, pager, editor etc.), should
avoid an overblown use-list. In addition ebuilds such as php or apache
also come with a fair amount of use flags (which is really handy, in my
opinion).


>> Is there something that speaks against such a change?
>>
>> If not, I'm willing to provide the necessary patches
>
> Patches are always most welcome. But I sorta rather tie it to something
> more simple. Like maybe when 'make-symlinks' is enabled. One can assume
> he/she is using busybox for the core system.

Good point, thanks.


regards
Chris
Re: busybox and virtuals (editor, pager etc.) [ In reply to ]
Hi Ed

> I'm currently doing something very similar - would be interested to
> compare notes and build scripts.

Sure, right now I don't have any fancy build scripts, as I'm in the
prototype phase... More or less following the Gentoo Embedded Handbook
approaches.


> Right now I have quite a few patches
> to get all this to build correctly. Still not got dbus built though...

Luckily I don't have to use dbus ;)


> Note, I got quite a long way with mdev, but having some problems getting
> module loading working correctly with hotplug. Switched to udev for
> some testing, but may look to go back to mdev at some point.

OK, good to know. Therefore I will stick with udev.
I have static device nodes at the moment, but would like to switch to a
dynamic solution.


> Additionally I have gone hardened + aufs with the intention to use a
> squashfs+aufs root image
>
> Slightly buggered in that I can't get git built in my chroot either...
> Would like to push all this stuff out somewhere, but this makes it more
> tricky...

Why don't you use git from outside of your embedded-root?


> Good luck with your project

Thanks, same to you
Chris
Re: busybox and virtuals (editor, pager etc.) [ In reply to ]
On Wednesday 22 July 2009 09:55:55 Christian Affolter wrote:
> >>>> However if I perform an emerge world:
> >>>> PORTAGE_CONFIGROOT=[...] ROOT=[...] emerge world -vp
> >>>>
> >>>> Portage wants to merge:
> >>>> virtual/editor-0
> >>>> app-editors/nano
> >>>>
> >>>> virtual/pager-0
> >>>> sys-apps/less
> >>>>
> >>>> I have enabled less and vi in my busybox, therefore I don't want to
> >>>> install an "external" pager and editor.
> >>>
> >>> use the profile's package.provided then
> >>
> >> Yes, that's what I do at the moment... However it would be much nicer if
> >> the powerful gentoo use and dependency system could be used for this.
> >>
> >> Furthermore BusyBox init-scripts (for crond, syslogd etc.) could be
> >> installed according to the enabled use-flags, rather than manually.
> >
> > With as many features as busybox supports this could get out of control
> > quickly with USE= flags for per-options.
>
> That's true. On the other hand, providing use-flags only for existing
> virtuals (for example cron, syslog, tar, pager, editor etc.), should
> avoid an overblown use-list. In addition ebuilds such as php or apache
> also come with a fair amount of use flags (which is really handy, in my
> opinion).

once conditionalized PROVIDE support is released in portage, that is pretty
easy to do.
PROVIDE="moo? ( virtual/moo )
foo? ( virtual/foo )
etc..."
-mike
Re: busybox and virtuals (editor, pager etc.) [ In reply to ]
On Sat, 2009-07-25 at 01:55 -0400, Mike Frysinger wrote:
...

> once conditionalized PROVIDE support is released in portage, that is pretty
> easy to do.
> PROVIDE="moo? ( virtual/moo )
> foo? ( virtual/foo )
> etc..."

I think it might of been released already. Notice the change zmedico
pushed to uclibc a few days ago. Bug #270496

He added PROVIDE="elibc_uclibc? ( virtual/libc )"