aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2019-05-19Add pointless trailing --sparse entry for exact binary compartibility.Rob Landley
There's no possible use for this, but debian's tar produces it, so...
2019-05-19Add --sparse file creation support to tar.Rob Landley
And fix tar cv to produce output to stderr when archive going to stdout.
2019-05-18Fix a dead link, add link to OpenBSD suggested template license,Rob Landley
and record Kirk McKusick's email for posterity. (I posted it to the mailing list when it happened, but this is more obvious...)
2019-05-17Fix a missing else, and an inverted test hidden by the missing else.Rob Landley
Add test to show failure case.
2019-05-16Have ps.c human_readable fields use all the available space.Rob Landley
2019-05-16Use the space reserved in the header to display more precision.Rob Landley
2019-05-16Add human_readable_long() for more than 3 digits of output.Rob Landley
2019-05-16Minor code shrink.Rob Landley
2019-05-14Checked in a debugging printf. Oops.Rob Landley
2019-05-14Typo caused a segfault. (Oops.)Rob Landley
2019-05-13Use FLAG() macros in lsRob Landley
2019-05-13Comment tweak.Rob Landley
2019-05-13Fix a couple error paths that don't continue archive create/extract properly.Rob Landley
2019-05-12Add VERBOSE=nopass to not show successful tests.Rob Landley
2019-05-12Disable lsattr from "make tests" because behavior differs with filesystem.Rob Landley
Also, debian's lsattr is producing longer output lines with new fields, possibly an ioctl switch from FS_IOC_GETFLAGS -> FS_IOC_FSGETXATTR? Anyway, todo items here...
2019-05-12Fix readlink0() to blank string on failure.Rob Landley
2019-05-11Teach tar to extract type 'S' sparse file headers.Rob Landley
2019-05-10Walk -M /dir:/dir0:/dirN in man.makepost
Iterate over MANPATH and ordered sections using a manpath() helper equivalent of indenting logic of man x, man 1 x, and man -k each with a strsep loop.
2019-05-06Some "echo" variants default to -e, use printf "%s\n" to avoid that.Rob Landley
2019-05-06Greatly simplify and speed up regexec0() using REG_STARTEND.Rob Landley
This is a 15 year old freebsd extension (presumably thus also available on MacOS) that glibc adopted in 2004, uClibc adopted in 2005, and bionic supports. The only thing that DOESN'T support it is musl, once again because its maintainer explicitly decided not to (https://www.openwall.com/lists/musl/2013/01/15/26), so add an #ifdef to let musl stay uniquely broken. (It'll stop at first NUL, everything else can match NULs). Finally fixes "s/x/y/g on a megabyte line of x's takes forever" issue.
2019-05-06Round allocation up to page size so s/x/yy/g thrashes less.Rob Landley
And remove a "nine princes in amber" themed name I missed.
2019-05-04Optimize regexec0() for long lines.Rob Landley
Don't strlen() to find NUL to skip to until after we've confirmed first section hasn't got a match (by calling regexec() on it).
2019-05-04Optimize s//g to avoid fresh strdup/free of entire line for each match.Rob Landley
Instead have one target string and fill it out from start to finish writing to each location once.
2019-05-03Add a couple comments.Rob Landley
2019-05-03env: fix case where a variable is replaced.Elliott Hughes
Found when trying to update the toybox prebuilt used for the Android build. Also add the corresponding test.
2019-05-02Android moved the scheduler policy functions in Q.Elliott Hughes
They're forwarded to libprocessgroup, but we may as well go straight to the source since neither library is in the NDK anyway. This code is unfortunate because it means that even `toybox true` ends up pulling in a JSON parser at runtime, because ps might call get_sched_policy/get_sched_policy_name. I'll experiment with dlopen-on-demand in portability.c and see whether the savings are worthwhile, but for now at least use the current library directly so we can save *one* dlopen!
2019-05-01man: support MANPATH.Elliott Hughes
(This and `git clone` is how I use the latest man7.org pages all the time instead of my system's man pages.)
2019-05-01tar: use same tools for decompression as for compression.Elliott Hughes
This is what GNU tar does, so Android's build system jail allows bzip2, gzip, and xz, but not bzcat, zcat, and xzcat. Why the function? Because auto-detection works by setting toyflags, so we need to make sure we test the flags late, so it's either two copies of this or a function.
2019-04-30Make echo -E switch off -e.Rob Landley
2019-04-30echo: add -E.Elliott Hughes
POSIX finally gave us a way to use echo in a portable way despite differences of opinion about whether to default interpretation of escape sequences to on or off: -e enables and -E disables (as already implemented by busybox and coreutils). http://austingroupbugs.net/view.php?id=1222
2019-04-29Search name and first line with man -k regex.makepost
Exec -k value as regex on basename, and on the first content line outside a tag or on a referenced see-other, whichever appears earlier. Reuse zcat choice as a function when looping over files. Fix \-\- and glob.h include leftover. Handle man-pages example newlines. Clarify the todos, naming package and issue. Remaining items are more of a wishlist than a plan. Remove `<1>2` because it doesn't let `-k .` work, please look into that.
2019-04-26gzip: fix permissions perservation despite umask.Elliott Hughes
2019-04-26Add -M and switch test suite to use it (so test doesn't need to run as root).Rob Landley
2019-04-26Read .gz/.xz man pages and check sections in "man man" order.Rob Landley
2019-04-26gzip: fix regressions caused by 7964e1f78b58d9c365361cc36b0422d9d56cd204.Elliott Hughes
The permissions preservation test still fails for me, but that seems to be because my environment changed: it's failing because of my umask. I'll fix that in a separate patch, since it's unrelated.
2019-04-26more: better behavior with directories.Elliott Hughes
Also fix the non-tty output. Also tweak our output so the tests pass with TEST_HOST=1 too.
2019-04-26file: improve test coverage.Elliott Hughes
Use a real .class file and add tests for the other formats that file(1) recognizes and we already have sample input in tests/files/.
2019-04-26file: add test ELF binaries.Elliott Hughes
We keep regressing on this, and the ELF stuff is quite complicated, so even though checking in binaries isn't my first choice, this seems like a good use of 20KiB...
2019-04-26file: fix ELF note parsing.Elliott Hughes
Commit 9448c33944651c1644ffbd0f52cf9d43cae19599 broke ELF note parsing, because the bounds checking was off. Fix that but also generalize it so that we won't need note-specific bounds checking in future.
2019-04-23Remove librt, which is pulling in libpthread.Rob Landley
It hasn't been needed (for clock_gettime) since glibc 2.17 came out in December 2012 (which is more or less our 7 year support horizon) and Devuan 2.0 is not eliminating this with --as-needed (presumably due to some weak symbol nonsense), so... fix that bug.
2019-04-22struct deflate no longer lives in TT so must be explicitly zeroed, and useRob Landley
libbuf instead of toybuf in lib/
2019-04-22More TEST_HOST -> toyonlyRob Landley
2019-04-22Switch some SKIP_HOST tests to toyonly. (The host could be toybox.)Rob Landley
2019-04-22vi.c changes to vi cmd executionJarno Mäkipää
Reimplemented to command mode execution to follow vi cmd pattern. (REG)[COUNT0]{CMD}[COUNT1]<MOV>(SYM) Most of the moves can be executed intependently or before command, some require character after. (possibly with utf8) Some of the commands do not require move, such as D, J, dd, yy, x... There is also tons of special cases where move behaves differently depending on command. For example 1cw and 1ce appear to be the same but 1dw and 1de are not... Most of the operations still need reimplementing and lots of cleanup in order them to behave correctly refactored word move to work with utf-8
2019-04-22And same flip in the airlock install.Rob Landley
2019-04-22Ahem: _decompression_ is ready, compression isn't yet. Change defconfig y/n.Rob Landley
2019-04-21Remove some commands from airlock install PENDING that are now in defconfig.Rob Landley
2019-04-21Promote gzip/zcat but keep gunzip default n until lib/deflate.c finished.Rob Landley
2019-04-21A little more cleanup on gzip.Rob Landley
2019-04-21Promote tar.Rob Landley
There's probably more to do, but it seems usable at this point.