[Toybox] Non-roadmap todo items.
Rob Landley
rob at landley.net
Mon Jun 19 12:29:47 PDT 2017
I need to do a release of _just_ finishing up and checking in the
half-finished changes in my tree. People wanted to know what some of
those todo items are, so here's a quick glance over "git diff":
configure: make $GENERATED directory definable via a variable. (That's
non-obvious to do because make and scripts/make.sh are two different
contexts with two separate sets of variables, and ./configure can't be
imported in makefile context.)
lib: adding xstrtod() and xsendfile_sparse() (which copies a sparse
file, skipping holes, except there's a pending design issue there: what
do archivers like tar and cpio need?)
config2help.c: allow reusable hunks, and generally clean up the code. (I
factored out output_helpline() into a function, could probably check
that cleanup in by itself, if I spent the time to chip it out of the
giant scaffolding of printfs pinning the dissected code open so I can
identify its organs.)
scripts/make.sh: I'm adding getconf.c and have a mksysconf() shell
function doing a bunch of sed and grep stuff to create
generated/getconf.h from toys/*/getconf.c by converting between the user
displayable names and the #defines in the headers so I can have just one
array of names. (And it compares the "gcc -E -dM -" output so it doesn't
need #ifdef staircases but substitutes i the unknowns at header
generation time.) That's been more than half done for months, but I
haven't had time to focus on finishing it up and checking it in...
Lots of stuff in the test directory, switching testing->textcmd and so
on. My cut.test is twice the size of the checked in version but I need
to check in the modified cut for that. A comment in ls.test about doing
that $(echo -e "$(X=0;while [ $X -lt 255 ];do X=$(($X+1));[ $X -eq 47
]&& continue;printf '\\x%02x' $X; done)")" test. Whole bunch of tests
for that pending seq.c change. Lots of changes for setfattr.test.
Half-written hunk in toys/example/README explaining the difference
between hello.c and skeleton.c, what the test_* commands do, and that
the rest are obsolete things moved here because they work but shouldn't
be in defconfig.
In toys/lsb/mount.c I have a comment about "mount by uuid" and "fix -o
remount".
In toys/*/pidof.c I have "todo -x".
Lots of changes to seq.c which there was a recent thread here on.
toys/lsb/su.c has a "todo suid support" (I.E. right now you have to be
root to run it, it should work with the suid bit and prompt for password
in that case).
netcat.c: pending patch last week, and I have a rewrite in the tree to
switch to XVFORK() as a better workaround for the musl vfork() bug where
it's not annotated returns_twice so gcc optimizes away stack variables
that are still in use. And I have todo notes "fix -t, use xconnect(),
netcat -L is causing zombies". Also I removed the FD_CLOEXEC line but
don't remember why off the top of my head.
toys/net/netstat.c: I have a change to the header skipping logic, don't
rememer why. (Why I say "don't remember why" usually this means if I
read through the code I'll remember what I was doing but it could take
15 minutes to get there.)
losetup.c: I've got half of "-A Auto-detach device when unmounted"
implemented, and some (long long) typecasts in a printf to shut up the
build on targets where gcc makes "long long" and "uint64_t" the same
_size_ but it complains that they're not the same type.
nsenter.c: switch it to use the syscalls directly instead of the deeply
problematic wrappers.
stat.c: change to the help text, ala:
-%x Access time |%X Access unix time |%y File write time
-%Y File write unix time|%z Dir change time |%Z Dir change unix time
+%x Access time |%X Access unix time |%y Modification time
+%Y Mod unix time |%z Creation time |%Z Creation unix time
That's one of those things I have to stare at some more and go "hmmm"...
(The hard decisions usually aren't the ones where there's a clear winner.)
getfattr.c: with no arguments it should list xattr names, -n should be
repeatable, and... um...
$ git diff toys/*/getfattr.c | diffstat
getfattr.c | 86
++++++++++++++++++++++++++++++++++++-------------------------
1 file changed, 51 insertions(+), 35 deletions(-)
That.
gzip.c: move the deflate plumbing into here and integrate it, then move
the _inflate_ plumbing in there (from compress.c) and finish it. Plus
figure out how to do the "zlib format" stuff.
AND Implement zip.c stuff, which maybe means the inflate/deflate stuff
should live in lib.c, except the bunzip2 code used to be in lib.c and
that was the wrong thing for it. Have to decide what to do with that.
(At a structural level, I think deflate is probably the only
_compression_ code toybox needs. It should have decompression code for
everything, but from a bootstrapping perspective one simple kind of
compression is plenty for creating tarballs and initrd and such until
you can build other compression packages in the new system. So even
though I wrote half a bzip2 once upon a time, I'm not trying to do the
other half and put it in toybox.)
lsof.c: is entirely wrong, it should be more like "find"; lsof is
supposed to do "-a" so you can combine multiple tests, and this doesn't
think that way. Plus +D is useful, and -f from
http://lists.landley.net/pipermail/toybox-landley.net/2016-October/008730.html
and while we're at it
http://www.thegeekstuff.com/2012/08/lsof-command-examples
route.c: should gethostname/addrinfo be in lib/net.c? Show both v4 and
v6 with net, set based on comma or period. (I.E. specifying -A inet6 is
obsolete, autodetect already.)
You wouldn't recognize sh.c or vi.c. I'm not sure _I_ do at this point,
and may start over next time I poke at those because I got interrupted
in the middle of design work.
cpio.c: needs xattr support for initramfs (which means a new archive
format and kernel patch to teach Linux about it). While I'm there,
switch to 64 bit mtime and filesize, and support sparse files. I already
removed the "TRAILER!!!" entry so you can append to an existing archive.
cut.c: I've posted that rewrite here before, and there's a giant
cut.test that goes with it. I still haven't found a large block of time
to do one more pass over it and make sure it does everything I want.
env.c: that FLAG_0 stuff is still screwed up but I need to finish
debugging it. (The trivial fix didn't fix it.)
grep.c: --color, I posted about that here. It's a rewrite of the -o logic.
printf.c: I have debug printfs in here, I don't remember why. something
to do with octal escapes? Did I add the failing test to printf.text?
Diff isn't showing anything, make test_printf passes all the tests...
Sigh, have to look back in the mail archive to see what that was about.
Eight GAZILLION things being added to faq.html. Currently writing up one
about "Why time based releases?" The hard part there is chewing. (It
turns into a giant uneditable mass very easily. For example, I wrote all
the FAQ entries in
https://git.busybox.net/busybox/tree/docs/busybox.net/FAQ.html?id=95718b309169
and most of them are generic enough I want to port 'em over, but I need
to annotate the history to make sure nobody corrected my punctuation and
such in a way that would raise licensing issues. Yes, I care. Meanwhile,
I wrote http://nommu.org explaining some of it and should migrate that
into the kernel Documentation directory...)
Then there's 12 _previous_ trees I was doing diffs in, against things
like dd. That's just what I've dirtied my tree with since the last time
I gave up and started over with a clean tree. :)
Oh, and I have a todo.txt, todo2.txt, todo3.txt, ../todo.txt,
~/todo.txt, ~/todo.today all of which have toybox stuff in it. And a
todo directory with 11 files in it. That's not exhaustive, that's just
the first place to look for more todo items. (Other than, you know, the
roadmap and status pages. Or grepping the source for "TODO". :)
Rob
More information about the Toybox
mailing list