On Sun, Jan 25, 2015 at 12:14 PM, Rob Landley <r...@landley.net> wrote:
> On 01/17/15 00:09, enh wrote:
>> more progress...
>>
>> Right now toybox provides the following new commands that we didn’t
>> have with toolbox:
>>
>>     acpi
>>     basename blockdev bzcat
>>     cal chgrp chroot cksum comm cut
>>     dirname dos2unix
>>     echo egrep env expand
>>     fallocate fgrep find free
>>     groups
>>     head hostname hwclock
>>     killall
>>     logname losetup lspci lsusb
>>     md5sum modinfo more mountpoint
>>     nice nl
>>     od
>>     paste patch pidof pmap pwd
>>     realpath
>>     sed seq setsid sha1sum sort split stat strings sysctl
>>     tac tail taskset tee time timeout tr truncate
>>     uname uniq unix2dos usleep
>>     wc which whoami xargs
>>     yes
>
> Some of these commands (hwclock, more, and tr) are in pending.
> As you've seen from the review of Luis' patches, things in pending often
> have reasons for being there. If android is going to start using those,
> I _really_ need to clean them up.

the reason these commands are in a separate list is that they're
commands we didn't have before. i'm assuming that "something is better
than nothing", and also that nothing helps shake out the bugs than
getting a bunch of users. (more(1) is actually something we had
before, albeit as a shell alias. but the toybox one is still better,
so that didn't feel like a risky move.)

> I'm in the process of cleaning up hwclock, I'll prioritize more and tr.
>
> Actually tr is already high on my list, it's #3 on the list of most
> commonly called remaining busybox commands in aboriginal:
>
>   http://landley.net/notes-2015.html#16-01-2015
>
> It's after sed (which can switch over next release), and expr (which I
> was poking at yesterday and needs that redo for priority grouping I had
> to poke the posix guys to update the html version of the spec about)...
>
>> I’ve moved the following commands over to toybox, removing the old
>> toolbox implementations:
>>
>>     cat chcon chmod chown clear cmp cp
>>     date dmesg
>>     false
>>     getenforce
>>     id ifconfig inotifyd(notify) insmod
>>     kill
>>     ln lsmod
>>     mkdir mknod mkswap mv
>>     netstat nohup
>>     printenv
>>     readlink rm rmdir rmmod
>>     setenforce sleep sync swapoff swapon
>>     true
>>     vmstat
>
> Pending here is chcon, getenforce, setenforce, and netstat.
>
> Three of those are from you, so I have no fears about you running into
> something unexpected.
>
> Netstat is from Ashwini Sharma's team (which may choose to decloak
> someday), and I just haven't had a chance to look at 650 lines of
> network code yet.

the reason i didn't just switch everything over on day one is because
i've actually been going through the tools one by one trying to
convince myself that they're at least as good as and roughly
compatible with what we had before. (again, this is why there are two
lists. my bar can be lower from with the stuff that wasn't part of the
default system image in the past.) the pending netstat seemed to be a
compatible superset of what we had that produced similar results, so
i'm not too worried about that.

> (Promoting route.c is my next networking todo item.
> Longer-term, we probably need something like iptables but that's not in
> the roadmap yet because I can't even scope it without more research.
> ipchains is toast but there's a new one, ipspikes? iprestraints?
> ipwhips? I forget, I assume it's in keeping with the established naming
> theme...)
>
>> next to look at:
>>
>>     df --- missing -h; column alignment broken. no need to support old
>> Android output format.
>>     du --- our default block size was 512; -h output slightly
>> different. [patch sent upstream]
>>     ls --- missing -Z
>>     route --- superset?
>>     touch --- ours has nonstandard -l (equivalent to standard -h),
>> better resolution. [patch sent upstream]
>
> Which means I need to look at all of those too, of course. (But ls -Z I
> need a patch from you.)

yeah, i'll get back to the SELinux toybox patches at some point but
i've been too busy to make any progress recently.

i think the reason ls is in this list (rather than my separate
"missing SELinux stuff" list) is because you said you had some known
output formatting bugs you wanted to fix first?

> In addition to the actual toys/pending/*.c files, toys/pending/README
> has a list of commands that predate the pending directory, but could use
> another review/cleanup pass. (These aren't as bad, but I'm not happy
> with them yet.) Of that, you're using:
>
>   vmstat: as hg commit 1171 (http://127.0.0.1/hg/toybox/rev/1171)
>           explains, several of the fields aren't displaying what other
>           versions do, and it's not obvious _what_ the other versions
>           are displaying. (It's clearly not raw /proc data.)
>
>   chroot: because of http://landley.net/notes-2011.html#02-06-2011
>           (I need to add a pivot_root mode that you can't trivially
>            escape from as root within the chroot, for containers.
>            Really this is a workaround for a longstanding kernel bug.
>            Currently no worse than other chroot implementations, but
>            I want to do it _right. Design issue, not implementation.)
>
>   mountpoint: because of the comment "Ignore the fact a file can be
>               a mountpoint for --bind mounts.", and because it thinks
>               a symlink to a mountpoint is a mountpoint, and because
>               minor code duplication. But I can fix two of those
>               right now...
>
>   xargs: Rich Felker rightfully points out that it doesn't implement
>          the INSANE posix newline and whitespace parsing stuff.
>          (because -0 renders all that obsolete, but posix is stuck
>          back in the 1980's in a number of places, such as this.)
>          Hence XARGS_PEDANTIC, which I haven't implemented yet.
>          Also several options are commented out in the help text, which
>          is a reminder to me I haven't implemented those yet.
>
>   cut: I haven't even reviewed this one enough to change the coding
>        style yet. (We've got lines over 80 chars, single line /* */
>        style comments, error messages that assume the reader knows
>        more than a couple dozen words of english...) The code may be
>        solid, I just haven't verified it yet.
>
>   modinfo: I think commit 934 got most of this but I wanted to do
>            another pass. (My test system is static, I need to set up
>            a test system with modules.) Also little things like if
>            strlen(field) > 15 the printf in output_field() shouldn't
>            be actually donin anything _wrong_, but ew. And
>            sizeof(modinfo_tags) / sizeof(*modinfo_tags) is
>            ARRAY_LEN(modinfo_tags) from toys.h...

stock Android doesn't actually use modules, but we don't prevent OEMs
from doing so. the *mod* commands are really just for the benefit of
anyone who chooses to use them.

>   expand: I don't remember... Ah, commit 1061 says "this gets expand
>           off my to-review list" but I forgot to remove it. :)
>
> Rob
_______________________________________________
Toybox mailing list
Toybox@lists.landley.net
http://lists.landley.net/listinfo.cgi/toybox-landley.net

Reply via email to