[Toybox] Fixes to mkdir, chown, env
Rob Landley
rob at landley.net
Mon Sep 9 10:32:16 PDT 2013
On 09/05/2013 06:02:39 AM, Jacek Bukarewicz wrote:
>>
>> $ touch walrus
>> $ sudo chown root.bin walrus
>> $ ls -l walrus
>> -rw-rw-r-- 1 root bin 0 Sep 5 05:16 walrus
>>
>> It's not posix but busybox supports it too and it's used in the
>> ./configure stage of various package builds. (Do you have a specific
>> reason to remove it?)
>>
> Indeed, busybox and GNU coreutils also allow dot as delimiter
> (probably for
> historical reasons)
> I encountered this issue while testing commands that we use in our
> environment
> and which could possibly be replaced by toybox. I tried to chown a
> file to my
> user so I typed ./toybox chown j.bukarewicz xxx and toybox complained
> about
> nonexisting user 'j'.
Hmmm... That's fiddly to get right.
You can't have : in a username because that's the /etc/passwd field
delimeter.
> Busybox also fails, GNU coreutils works as expected.
Which they can pretty much only be doing by either trying multiple
lookups or loading the entire /etc/passwd username list and comparing
against that. Which we're trying not to do because android doesn't
store users in /etc/password and instead has a horrible invisible
binary database inspired by the windows registry, because that turned
out to be such a stunningly maintainable idea...
> I wasn't aware at that point that dot is allowed as delimiter,
> especially when
> manual or --help only say about colon.
Possibly the right thing to do is remove . but I remember it was added
because the ./configure stage of some package build broke. Or maybe it
was the portage build? Hmmm... There was some reason for it...
> It's nothing big. If we ever need another behavior we can probably
> maintain
> patches locally.
I'd like to do the right thing. I'm just not sure what the right thing
is here. Coreutils is doing something subtle and I can't guess off the
top of my head what it is. I'd rather _not_ do something subtle, but I
need a good test environment to show that removing a feature won't
break stuff.
The linux from scratch plus beyond linux from scratch buidls are
probably a reasonable test, and LFS 7.4 (just released) has a
corresponding BLFS release for the first time since 2008.
Let me get control images implemented for those over on the aboriginal
linux side of things, then feel free to re-raise the issue of removing
support for . as a delimeter if I forget. :)
(Natively building sabotage under aboriginal would be good too, they've
ot buckets of packages, but I believe their approach is "build
coreutils, replace busybox/toybox in the $PATH, then build more stuff
on top of it"... Doesn't prove as much as I'd like.
Thanks,
Rob
1378747936.0
More information about the Toybox
mailing list