Remove something we did, not that I'm doing something, and add something we
[platform/upstream/busybox.git] / TODO
1 Busybox TODO
2
3 Stuff that needs to be done
4
5 tr - missing SuS3 features in busybox 1.0pre10
6
7 tr doesnt support [:blank:], [:digit:] or other predefined classes, [=equiv=]
8 support is also missing.
9 ----
10 find
11   doesn't understand () or -exec, and these are actually used out in the real
12   world.  The "make uninstall" of lots of things (including busybox itself)
13   breaks because of this, and sometimes even "make install" (like udev).
14 ----
15 sh
16   The command shell situation is a big mess.  We have three or four different
17   shells that don't really share any code, and the "standalone shell" doesn't
18   work all that well (especially not in a chroot environment), due to apps not
19   being reentrant.  Unifying the various shells and figuring out a configurable
20   way of adding the minimal set of bash features a given script uses is a big
21   job, but it be a big improvement.
22
23   Note: Rob Landley (rob@landley.net) is working on this one, but very slowly...
24 ---
25 gzip
26   Can't handle compressing multiple files at once.  (I don't mean making a
27   multiple file archive, I mean compressing more than one file at a time.)
28   Some global variables aren't re-initialized between runs.
29 ---
30 gunzip
31   same problem as gzip.  "gunzip one.gz two.gz three.gz" doesn't work for
32   two.gz and three.gz due to global variables not getting reset.
33 ---
34 diff
35   We should have a diff -u command.  We have patch, we should have diff
36   (we only need to support unified diffs though).
37 ---
38 fuser
39   Would be nice.  The basic susv3 options, plus fuser -k.
40 ---
41 patch
42   should have -i support, and simple fuzz factor support to apply patches
43   at an offset shouldn't take up too much space.
44 ---
45 man
46   It would be nice to have a man command.  Not one that handles troff or
47   anything, just one that can handle preformatted ascii man pages, possibly
48   compressed.  This could probably be a script in the extras directory that
49   calls cat/zcatbzcat | more
50 ---
51 less
52   More sucks if you're used to less.  A tiny less implementation would be
53   very nice.
54 ---
55 bzip2
56   Compression-side support.
57
58
59 Architectural issues:
60
61 Do a SUSv3 audit
62   Look at the full Single Unix Specification version 3 (available online at
63   "http://www.opengroup.org/onlinepubs/009695399/nfindex.html") and
64   figure out which of our apps are compliant, and what we're missing that
65   we might actually care about.
66
67   Even better would be some kind of automated compliance test harness that
68   exercises each command line option and the various corner cases.
69 --
70 Unify archivers
71   Lots of archivers have the same general infrastructure.  The directory
72   traversal code should be factored out, and the guts of each archiver could
73   be some setup code and a series of callbacks for "add this file",
74   "add this directory", "add this symlink" and so on.
75
76   This could clean up tar and zip, and make it cheaper to add cpio and ar
77   write support, and possibly even cheaply add things like mkisofs someday,
78   if it becomes relevant.
79 ---
80 Text buffer support.
81   Several existing applets and potential additions (sort, vi, less...) read
82   a whole file into memory and act on it.  There might be an opportunity
83   for shared code in there that could be moved into libbb...
84 ---
85 Individual compilation of applets.
86   It would be nice if busybox had the option to compile to individual applets,
87   for people who want an alternate implementation less bloated than the gnu
88   utils (or simply with less political baggage), but without it being one big
89   executable.
90
91   Turning libbb into a real dll is another possibility, especially if libbb
92   could export some of the other library interfaces we've already more or less
93   got the code for (like zlib).
94 ---
95 buildroot - Make a "dogfood" option
96   Busybox is now capable of replacing most gnu packages for real world use,
97   such as developing software or in a live CD.  A system built from busybox
98   (1.00 with updated sort.c), uclibc 0.9.27, gcc, binutils, make, and a few
99   other development tools (http://www.landley.net/code/firmware has an example
100   system using autoconf, automake, bison, flex, libtools, m4, zlib,
101   and groff: dunno what subset of that is actually necessary) is capable of
102   rebuilding itself, from scratch, under itself.
103
104   It would be a good "eating our own dogfood" test if buildroot had the option
105   of using busybox instead of bzip2, coreutils, file, findutils, gawk, grep,
106   inetutils, modutils, net-tools, procps, sed, shadow, sysklogd, sysvinit, tar,
107   util-linux, and vim.  Anything that's wrong with the resulting system, we
108   can fix.  (It would be nice to be able to upgrade busybox to be able to
109   replace bash, diffutils, gzip, less, and patch as well.)
110 ---
111 Memory Allocation
112   We have a CONFIG_BUFFER mechanism that lets us select whether to do memory
113   allocation on the stack or the heap.  Unfortunately, we're not using it much.
114   We need to audit our memory allocations and turn a lot of malloc/free calls
115   into RESERVE_CONFIG_BUFFER/RELEASE_CONFIG_BUFFER.
116   
117   And while we're at it, many of the CONFIG_FEATURE_CLEAN_UP #ifdefs will be
118   optimized out by the compiler in the stack allocation case (since there's no
119   free for an alloca()), and this means that various cleanup loops that just
120   call free might also be optimized out by the compiler if written right, so
121   we can yank those #ifdefs too, and generally clean up the code.