From f5425b1c4875383d7a4963d79bca8dbf241ec05c Mon Sep 17 00:00:00 2001
From: Rob Landley
++ +"In those days spirits were brave, the stakes were high, men were real +men, women were real women and small furry creatures from Alpha Centauri +were real small furry creatures from Alpha Centauri." +
- The Hitchhiker's Guide to the Galaxy
+
Toybox 0.8.2 +(git commit) +is finally out (only two months late).
+ +The new commands this time are minor variants of existing ones +(dnsdomainname is hostname -d, arch is uname -m), but about +1/3 of toysh got implemented in pending, mkroot got merged as a "make root" target (see Build), +and Android's hermetic build +work continued resulting in a lot of fixes.
+ +The android-specific getprop, setprop, start, and stop +commands were removed from toybox because they grew dependencies on android +libraries, and since toybox tries to avoid mandatory external dependencies +they moved to another package.
+ +Build: +The new "make root" target builds a simple toybox root filesystem, +using scripts/mkroot.sh which is a stripped +down version of the external mkroot +project merged into toybox. (Alas, at the moment it wants sh and route out +of pending, which aren't quite load bearing yet.)
+ +The new "scripts/mcm-buildall.sh" convenience script builds cross +compilers based on gcc+musl multiple targets (arm, x86, mips, m68k, s390, +microblaze...) +using musl-cross-make, +and a new scripts/cross.sh to easily cross compile for one or more targets +using the resulting compilers. (This works with "make root", "make +toybox", and other builds understanding the CROSS_COMPILE environment variable.)
+ +Setting the environment variable ASAN=1 enables the +llvm address sanitizer. (You may need to +export ASAN_SYMBOLIZER_PATH on debian to use it, they add the version number to +the filename in /usr/bin which confuses llvm.)
+ +Patrick Oppenlander fixed make -j (our make is a wrapper around +scripts/make.sh which was already doing a parallel build, but if you called +make with -j it wouldn't wait for make.sh to finish and the build broke). + +
Lots of fixes for the MacOS build.
+ +New options: +We upgraded tar to extract some older tarballs, file added -b and -s +options and can also recognize older tarballs, +some xz archives, .otf fonts, perf/simpleperf data files, +android boot images, and dtb files. Upgraded file to show the device type +for block and char devices, the target for symlinks, and it says _why_ it can't +open a file.
+ +Several commands ignore some options rather than erroring on them: +patch ignores the -f -g# and --no-backup-if-mismatch options +(all of which we were already doing by default anyway), and xargs +ignores -P# (which requests parallel execution, maybe add it later but +single threading works), and Denys Nykula made wget ignore +--no-check-ceritificate and gzip ignore -n (again, we weren't doing +either anyway) to satisfy pkgsrc.
+ +William Haddon taught diff and patch to support special characters in path +names (via quoting) and more timestamp formats. +Eric Molitor implemented nl -v (with negative and zero starting values), +and fixed a MacOS compatibility issue in the build scripts. +Tom Cherry added netcat -U (UNIX domain socket support). +Denys Nykula taught wget to call ftpget for ftp:// URLs. +Ethan Sommer added ln -t and rmdir --ignore-fail-on-non-empty. +Elliott Hughes added grep -R, killall -w, tar --mode, + fixed ls -Z and spacing in -lZ and --full-time, +added xargs --max-args and removed xargs -I (which we never actually +supported) and tweaked the size calculation to more closely match other +versions, +added xargs -o and made -p read from /dev/tty, added blkid -s, SEC_TYPE for ext3, +msdos, and ntfs, f2fs and ntfs LABEL, fixed vfat/ntfs UUID, and switched +the endianness for UUID of msdos/ntfs/vfat, simplified the octal mode +display in lsof, added pidof -x (thus making the default behavior _not_ +be -x).
+ +When readdir() succeeds but stat() fails, ls now prints "??? ? ? filename" +entries instead of "cannot access" errors. (Still trying to make ls / on +android work more gracefully with the SELinux weirdness they added in 9.)
+ +Added %C to stat and made it show device type in its default output, +cmp now works +with 1 argument (implicit - as second argument reading from stdin). +sed added exit codes to the q command (q123), added Q, and fixed a +bad error message with "!". +Removed TAIL_SEEK config option (it just always does that now), +find grew several new options (%Z, -true, -false, and -newerXY), ln added -T. +The argument to mktmp --tmpdir is now optional.
+ +Bugfixes: +The unshare probe bit-rotted so it was impossible to build unshare +and nsenter on some distros. +Commit 771e94e2a08 broke toybox's ability to say "unknown command" when +you pointed a symlink at it that it that didn't correspond to a command, +pointing a symlink at another symlink +to make toybox run a command under a name it doesn't recognize +(ln -s toybox sh; ln -s sh ash) had an off by one error, +ifconfig no longer error_exits if the "read mac address" ioctl fails (Android N +and later block that for non-root users to prevent device tracking). +When the libcrypto library was disabled, md5sum was building commands it +hasn't got built-in support for yet (like sha3sum) which acted like redundant +copies of md5sum, +tar wasn't correctly reading or writing sparse files with a hole at +the end, and tar tzf blah.tar.xz was calling xz when it meant xzcat, +xargs would spuriously fail on large memory systems (due to a missing +"unsigned" in a typecast), +basename can now remove suffixes starting with a dash, +cp -r unlinks() an existing symlink before trying to +recreate the symlink (otherwise cp -r into an existing directory will +try to follow the existing symlink and create another symlink at its +destination, failing if a file already exists there, which +was confusing gentoo's package manager), timeout now produces the +right exit code when the timed command intercepts the exit signal, +and hostname -d no longer segfaults on machines with no domain name.
+ +Denys Nykula fixed the ftpget freeze (it was sending REST instead +of RETR), made mv work with a trailing slash in the source, +fixed a find segfault, +and made env always exec rather than recursing to a builtin +(on the theory #!/usr/bin/env is expected to search the $PATH).
+ +Elliott improved killall's handling of long filenames, made kill work +when killall5 is disabled (missing FORCE_FLAGS), fixed error reporting in +hostname, fixed several things in xargs, +made printf \c and \0 octal escapes work, fixed a find -name corner +case (find src/*.c -name file.c) and find dangling symlink behavior, +made some rm error messages consistent, fixed \x behavior in echo and +printf, fixed linestack.c's buffer length for utf8 U+XXXX escape printing, +fixed a race in losetup, fixed grep -F with multiple matches on the same +line and an -I failure in the existing grep tests, made readlink notice +when it has more than one argument, and made various +fixes to modinfo.
+ +Ethan Sommer reported that stat of an suid/sticky file output 5 digits of +octal stat date instead of 4. +Rob fixed an unaligned access in grep. Alessio Balsini removed an incorrect +null termination in losetup. +Jarno Mäkipää fixed hexedit +scrolling up and down on older terminals, and fixed ls segfaulting with a broken +(non-UTF8) locale (didn't expect wcrtomb to return -1). +Andrew Ilijic made ls put 2 spaces between columns like other implementations +(which helps when terminals get confused and apply UTF8 combining characters +to the space after a filename). +
+ +Library: +Added dlist_lpop() to use a dlist as a stack (it removes the last entry +instead of the first), and dlist_pop() now works on a dlist_terminate()d list. +DIRTREE_STATLESS returns entries we couldn't stat() (with a zeroed ->st +field, and ->again |= 2), but filling in the file type from readdir(). +Coversions between signal names and numbers now include all the Linux signals, +not just posix ones. The functions sig_to_num() and num_to_sig() moved into +lib/portability.h, because MacOS has different signals. +TOYFLAG_MAYFORK allows commands to run in toysh's process without forking, +but also makes them accessable from the toybox multiplexer or standalone. +A MAYFORK command has to clean up after itself (even in error paths) and +can't discard anything we need to keep (such as closing stdout).
+ +Elliott did a big xbind/xconnect cleanup (adding xbindany and xconnectany), +taught xregcomp that an empty regex matches the whole line +(because FreeBSD, and thus MacOS, doesn't already do that), and +replaced several uses of get_line() (which does single byte reads) +with getline() (which doesn't).
+ +Plumbing: +"make clean" doesn't produce a screenful of unnecessary output now, +rm, ln, cp, kill, and netcat use the FLAG() macros now, makedevs uses the new +GLOBALS naming format, timeout now uses xwaitpid(), and we fixed an +off by one error in xwaitpid().
+ +Elliott removed a workaround for old NDK versions from getconf and +moved sort off of get_rawline() (which let us remove it). +Rob undid some loop unrolling in md5sum/sha1sum (we have libcrypto if you want +an assembly optimized version instead of an understandable version).
+ +Android ndk-r20 doesn't define the __ANDROID_NDK__ symbol, so we switched +to using clang's __has_include() (which is an undefined macro and thus a NOP +resolving to false on gcc).
+ +Pending: +Rob did a lot of work on toysh: continuation support works (it knows when to ask +for another line of text and when to run what it's got), as do +nested if/else/elif statements, and while and for loops (supporting "for i" +and "for i in", but not for ((;;)) yet). +It parses pipes and redirections but doesn't perform them yet. +The next big todo chunk is environment variable resolution. +
+ +Gavin Howard fixed some bugs in bc, such as not returning error when raising +zero to a negative power. +Jarno Mäkipää continues to extend vi, adding yank and push, support for tabs, +rewriting delete, changing the drawing code, etc. Elliott also added several +fixes and features to vi, +fixed host to cope with large DNS responses, switched crontab to +use getline(), did work on man, fixed fixed several things in dd, +implemented diff --strip-trailing-cr and made diff not need /tmp. +Mike Bennett added extended attribute support to ip.c's route change.
+ +Test suite: The killall and pgrep tests were having occasional +spurious failures due to a race condition (the test script would fork() +to call sleep and for just a moment there were two instances of the test +script, reporting an extra process if killall or pgrep ran then). + +
Elliott Hughes did a lot of work on the test suite: add kill -l tests, +make losetup.test notice (and skip) if loopback +devices area already in use, blkid.test can TEST_HOST e2fsprogs blkid now, +modinfo.test notices (and skips) if there's no /proc/modules or modules +directory, ifconfig.test skips if "dummy0 up" fails and disabled the +pointtopoint tests entirely (the kernel never supported it?), +truncate.test is less +confused by SELinux, hostname.test can run some tests as non-root, +addressed a race condition in killall.test on slow systems, +made chgrp.test, chown.test, and tar.test handle an empty /etc/passwd or /etc/group +(we were checking whether they were _there_ but some android devics have +empty ones), +fixed a couple things in env.test, extended killall.test to explicitly cover +long and short names (and not assume the shell is /bin/sh), taught split.test not to rely on bash process substitution, +added missing TZ=utc to touch.test, fixed cp.test to pass for root +or with a restrictive umask, and fixed the FAILCOUNT arithmetic to use more portable +$(()). Elliott also made some tests more flexible (find.test can handle any +error message about symlink loops, etc), and disabled others (such as du) +when SELinux is enabled.
+ +Rob taught testcmd not to use the shell builtin for TEST_HOST unless there +isn't one in the $PATH, work if $PWD has a space in it, +and make kill.test stop testing the shell builtin +insead of the command, quieted tests that were producing output +other than their PASS/FAIL line, and made NOSPACE tests ignore the +presence/absence of leading/trailing whitespace as well as differences +in the amount of space.
+ +Documentation: +The roadmap got freshened up a bit, with updates +for android from Elliott. +In the design page the Features section starts with +4 new paragraphs about the scope of toybox, and a new License section talks +about 0BSD. +The "./toybox --help" output now explains how to do install_flat by hand.
+ +Sheer pedantry: +Elliott fixed a double close in loopfiles_lines() so strace doesn't +have an EBADF in it, and added a missing "static" in lib/net.c.
+"I like the cover," he said. "'Don't Panic.' It's the first helpful or intelligible thing anybody's said to me all day."
- The Hitchhiker's Guide to the Galaxy
-- cgit v1.2.3