From c62d8a9f7471ebbb95d0bc2a6ccd6ee195719b44 Mon Sep 17 00:00:00 2001
From: Rob Landley
++ +"Why," Arthur said, "is there a sofa in that field?" +"I told you!" shouted Ford, leaping to his feet. "Eddies in the space-time +continuum!" +"And this is his sofa, is it?"
+- The Hitchhiker's Guide to the Galaxy
+
Toybox 0.8.9 +(git commit) +is out, with prebuilt static binaries and +mkroot images +bootable under QEMU (built using a lightly patched linux-6.1).
+ +The new nbd-server command interoperates with nbd-client to serve +network block devices (using the v1 protocol), and Moritz Weber contributed a read-only git +implementation to pending.
+ +Features: New grep fast path for fixed or simple patterns that +don't need the full regex engine (I.E. "^", ".", "$" but not "*" or "[]") +most noticeable when searching for many patterns at once. +Improved tar --xform support parsing flags= and trailing s/// scope +flags (but using --xform now requires toybox sed in the $PATH).
+ +Added sort -C, lsusb -i, netcat -n, +swapoff -a -v, httpd -v, nbd-client -b, +a uname -p stub to mollify package builds, +sleep accepts multiple arguments, +sed now parses interlaced -e and -f arguments in order, +several new options in readlink and realpath (and better +handling of relative paths), and UDP mode in netcat is more useful now: +netcat -u -s 127.0.0.1 -p 9876 -l can type at netcat -u 127.0.0.1 9876 +in both directions. (Figuring out when the other side hangs up is an unsolved +problem, but that's UDP for you.) +Elliott added ls -N.
+ +Bugfixes: Fixed off by one error in sort -c output, +fixed sed -z and other sed cases where Linux has never obeyed +Posix (N at EOF does a default print, l escapes \n), +patch --dry-run should no longer create or delete files, +gzip/zcat couldn't handle concatenated archives, +the ./configure of gmake 4.3 depends on test treating one argument -a as a synonym for -e, +autodetectiong compression types in tar should be more reliable now +and sanitize weird path corner cases (like .. past /) better, +scripts/make.sh (and thus "make toybox") should no longer truncate log +files stderr is redirected to, +httpd now handles ? and # in URLs, +xxd disables columns for -c 0 and groups for -g 0 (so you can get +a long interrupted string of hex digits out of it), two fixes to +mountpoint (the conversion to same_file() was inappropriate because +the logic isn't quite the same, and -q should also quiet "not found" errors), +fixed httpd not always displaying index.html files instead of directory +contents, fixed comm - not recognizing it as stdin, and multiple fixes to +timeout which now kills process group and thus child processes, +isn't suspended by SIGTTIN, and recursive commands it calls don't +inherit an inappropriate SIGCHLD handler.
+ +Yi-Yo Chiang fixed loopback mount (the recent switch to xrunread() +kept the newline from losetup's output) and added tail +123 +(old-style synonym for tail -n +123). +Daniel Mentz added scmversion to the modinfo tag list (Android uses +it for external modules). Alexander Holler fixed su to not require +/etc/shadow when run as root, and nomas2000 reported an inverted test in +date's check for trailing rubbish. Daniel Mentz fixed an off by +one in grep -f that discarded the last character of the pattern file's +contents. Kelvin Zhang made modinfo better at handling symlinks. +Antoni Villalonga fixed fmt on 64 bit big endian systems (like s390x and +powerpc). Li Cheng fixed mount's type detection not autodetecting +the need to bind mount files when type "none" was specified in fstab. +Tomasz Sterna reported that modprobe resolving dependencies shouldn't +feed a NULL pointer to the syscall's options arguments (the kernel goes -EWTF), +and Vincent Donnefort made modprobe work when /proc/modules isn't available.
+ +Library: +The TOYFLAG_ARGFAIL() exit value is now the default error_msg() sets, +sendfile() now falls back to the read/write loop for any error (not just +EINVAL, the kernel sends ENOSYS and EXDEV and who knows what else), +xgetrandom() can now return arbitrary amounts of data (looping internally +as necessary), +xwaitpid() returns status 127 for cases (like bad PID) which don't +return a status for the PID, +several fixes to xabspath() as part of the readlink/realpath work, +new octal_deslash() to remove octal escapes common in kernel strings +(ala /proc/mounts), +the FLAG_x macros always use a 64 bit type now (so you don't have to +worry about toys.optflags &= ~FLAG_x; blanking the top 32 bits), +replaced memcmp() with new library function smemcmp() to placate ASAN +when returning first difference in known differing arguments of unequal length. +Elliott added three more filesystem types to fs_type_name() which is +used by stat -f and friends.
+ +Mkroot: +New scripts/test_mkroot.sh runs each target under qemu to confirm +1) it boots, 2) the block device works, 3) networking works, and 4) the clock is set +reasonably. It runs them in parallel, with an httpd instance on the host to +fetch a file from, and a timeout to detect hangs. +New scripts/root/overlay package copies $OVERLAY directory into +target filesystem, ala scripts/mkroot.sh overlay OVERLAY=$PWD/blah +The init script now mounts any /dev/?da on /mnt and when /mnt/init exists +sets $HANDOFF to that instead of running a shell prompt, so you can provide +automated control images that run code in the emulator automatically. (The +emulator process still when whatever $HANDOFF called exits.)
+ +Some kernel changes finally made it upstream so we can drop workarounds +for them, such as kernel commit +f8f0d06438e5 +fixing the longstanding +"allnoconfig has =y" issue so miniconfig doesn't need to add a magic #comment +line forcing a symbol OFF anymore. The remaining kernel patches (including +several maintained locally but hadn't merged into mkroot) moved to a +seperate repository +so mkroot.sh doesn't have to call sed on the build snapshot. (They're are also +included in the mkroot binary release directory, and were all submitted to lkml +months if not years ago.)
+ +The host airlock setup (creating the temporary restricted environment +mkroot builds packages in both so they don't pick up strange dependencies from +the host, and to prove the build can use the toybox commands) +removed a bunch of commands (dd, diff, vi, xzcat, ar, nm) no longer +needed by the linux-6.1 build. The kernel patches also remove the need +for gcc (it can use the "cc" symlink all modern distros install, and +autodetects whether that points to gcc or clang) and bc (which is just +generally obsolete). +Left those two in for one more release, but NEXT time building a vanilla +kernel without the gcc removal patch +and bc removal patch +may require you to add HOST_EXTRA="gcc bc" to the mkroot command line +for the airlock build to add extra symlinks to root/build/airlock.
+ +Added a kernel build for powerpc64 big endian, +m68k and powerpc now support "run-qemu.sh -hda file.img", and m68k only +has one /dev/?db (disabled Apple Desktop Bus in the config). +Added basic module support (the kernel build saves modules in modules.cpio.gz +so it can extract them when you rebuild the root filesystem but not the kernel) +and added scripts/root/tests which (among other things) builds two +innocuous modules that depend on each other (fscache and cachefiles) for +modprobe/insmod testing that hopefully won't break anything else. (If +there was a scripts/root/pending/ tests would be in it: it does not actually +run the test suite under mkroot yet, because toysh needs work.)
+ +Pending: Elliott made strace build on 32-bit x86. +James Farrell added diff -f. +Alexander Holler fixed two parameter substitution bugs in toysh. +Rob fixed assignment suppression, && and || parsing, math +priority, a number of ASAN test failures, untangled and commented the +brace expansion logic, and other ongoing shell work.
+ +A large rewrite of diff happened but couldn't be checked in unfinished +because if people are using stuff out of pending, how do you do a pending for +pending? (Meta-pending?)
+ +Cleanup: +cksum, od, file, getopt, gpiod, +nbd-client, better output messages for host, +and make base64 use line buffering. +Moved -Wno-string-plus-int into portability.sh and had it only apply to +clang. Moved num_cache() out of lib into netstat (its only user).
+ +In the test suite plumbing, $SKIPNEXT was replaced by $SKIP holding +a count that counts down with each test (so you can easily skip a block of +tests). Fixed txpect to actually listen to error code (oops) and to not +complain about multiple X. The old dochroot() and mkchroot() shell functions were removed from +scripts/runtest.sh because they required root access to use (which mkroot +does not). More conversion to use testcmd in individual command.tests +(both to remove workarounds for shell builtins, and to be more concise). +Remove redundant cleanup from several tests (which run as proper child processes +now, and the work directory is deleted and recreated between each, so +individual tests need less cleanup).
+ +Portability: More tests now pass on MacOS and FreeBSD +(weird filesystems, root vs wheel group name, dealing with headers that +define stdin as a macro and don't define PATH_MAX, the ancient bash in MacOS +doesn't understand &>>, won't let normal users use "chmod +s", +symlinks don't have all permission bits set, no O_PATH and the Linux definition +is used for something else, and so on), at least half of which Elliott did. +Not sure we've quite got Mac and BSD +doing "gmake test_singlecommand" right yet, but it's a lot closer. +Added all the commands to make bsd_defconfig that compile on FreeBSD 13 +(which is no guarantee they WORK). +ASAN=1 should work in more places now, including make_test_command. +The build uses $CC insted of cc in more places, and doesn't apply $ASAN +for $HOSTCC (the legacy kconfig/ directory stands no chance).
+ +Fedora inexplicably sticks \x09 style hex escapes into the dmesg output and +expects them to be parsed. +Android is still running the test suite under mksh which doesn't +understand bashisms like <(command). LLVM insisted that "ptr - 1" could +never be NULL (demonstrably untrue) and needed some (unsigned long) typecasts +to force it to actually do the math. +Khem Raj aliased timer_settime to timer_settime64 when the first isn't +available. Antoni Villalonga debianized some install paths and added +a bunch of --longopt synonyms for existing options that package builds +use. + +Documentation: The help page +generation logic (toybox help -av) now filter out invisible aliases and +outputs "See command" for visible aliases, plus fixes for broken corner +cases like nohup --help. +The local git repo +now has a simple index.html generated by a +small shell script, +linking to the git format-patch files for +each commit, applicable via git am.
+ +There was a +bug report that specifying the cross compiler prefix twice +includes the prefix twice (ala CROSS_COMPILE=prefix- CC=prefix-cc results in +prefix-prefix-cc) which is what happens when you ask it to do that, yes. It's now +better documented. (See also +this kernel patch.)
+ +Yi-Yo Chiang's losetup fix spawned an email thread where the +android developers explained why Android doesn't (and can't) +use devtmpfs. Rob forwarded a link to linux weekly news to see if he could get +any attention from the kernel guys, but they didn't reply.
+Huge as office blocks, silent as birds. They hung in the air exactly the same