Why was netcat reverted?

Rob Landley rob at landley.net
Sun Jun 27 19:26:50 UTC 2010


On Saturday 26 June 2010 20:55:52 Denys Vlasenko wrote:
> Rob, 29fe7265b8c1917eb did not remove any code from nc.c,
> it only added nc_bloaty.c which is used with CONFIG_DESKTOP.
> With CONFIG_DESKTOP off, even current tree does this:

Ah.  It hadn't occurred to me that CONFIG_DESKTOP _removes_ features.  I 
started with "make allyesconfig" and switched stuff off that didn't build in my 
environment.  I was unaware that doing this would hide features.

Are there any other cases where I have to switch config entries _off_ to enable 
functionality?

> I didn't test -ll, but I suppose it works too.

I'll test it...

> > So, loss of significant functionality, size change 11 bytes.
> >
> > Why did this happen, and is there any significant reason I can't just
> > revert it to the old version that _did_ do these things, and/or bring in
> > the toybox version that does them?
>
> nc_bloaty.c was added because I need nc which is compatible with
> original nc-1.10. It has no -f, and doesn't support -ll,
> whereas our nc was lacking a few things nc-1.10 had
> (don't remember off-hand which things).

Let me know and I'll add them.  Or adjust them until they're compatible in 
your use case.  Having two implementations of the same thing is generally not 
an improvement for busybox.

> Every single fork of nc (there are at least four)
> grew tons of incompatible extensions, which is a PITA for users.

This is because netcat was unmaintained for years.  When I first tracked it 
down circa 2000 there _was_ no official version, just some piece of code written 
by somebody using a handle (might have been "frodo") and not a real name.

> I do not want to follow them...
>
> But rants aside... I will make it so that it will be possible
> to select "your" or "mine/compatible/bloated" nc with dedicated
> CONFIG_NC_110_COMPAT option. You can set it to off.

So you're knowingly going to turn netcat into another shell with multiple 
redundant implementations merged into busybox instead of trying to make one 
version work properly?

> Does this solve the problem for you?

It probably makes my use case work, sure.  From an architectural standpont, 
it's against the whole "small, simple, remove unnecessary or redundant code" 
thing that I thought was the point of busybox.

Rob
-- 
GPLv3: as worthy a successor as The Phantom Meanace, as timely as Duke Nukem 
Forever, and as welcome as New Coke.


More information about the busybox mailing list