From dec46177dbe9cd5cde877611a03e53be51f37ab2 Mon Sep 17 00:00:00 2001
From: Rob Landley
Although previous versions of Posix have their own +stable URLs (where you can still find +SUSv3 and +SUSv2), +the 2008 release of SUSv4 was replaced by a 2013 release also claiming +to be SUSv4, then again by a 2018 release still at the same URL. Similarly, +the other version numbers claim not to have changed, but instead adopted some +sort of "Windows 95" naming scheme ("The Open Group Base Specifications Issue +7, 2018 edition"). Since a moving target isn't a standard, we've stuck +with the 2008 version and ignored whatever changes they make +until they stop this forced-upgrade-behind-your back nonsense. +Luckily you can still find the original content +here. +(We haven't changed the URLs in each command to the longer version yet, +but can if conflicts arise.)
+ +Unfortunately posix describes an incomplete subset of reality, lacking any mention of commands such as init or mount required to @@ -66,14 +83,14 @@ and ipcs, but not ipcmk, so you can use System V IPC resources but not create them. And widely used real-world commands such as tar and cpio (the basis of initramfs and RPM) which were present in earlier versions of the standard have been removed, while obsolete commands like -cksum, sccs and uucp remain with no mention of modern counterparts like -crc32/sha1sum, svn/git or scp/rsync. Meanwhile the commands themselves -are missing dozens of features and specify silly things like ebcdic -support in dd or that wc should use %d (not %ld) for byte counts. So +cksum, compress, sccs and uucp remain with no mention of modern counterparts +like crc32/sha1sum, gzip/xz, svn/git or scp/rsync. Meanwhile the commands +themselves are missing dozens of features and specify silly things like ebcdic +support in dd or that wc should use %d (not %lld) for byte counts. So we have to extensively filter posix to get a useful set of recommendations.
Starting with the -full "utilities" list, +full "utilities" list, we first remove generally obsolete commands (compess ed ex pr uncompress uccp uustat uux), commands for the pre-CVS "SCCS" source control system (admin delta get prs rmdel sact sccs unget @@ -82,13 +99,13 @@ qalter qdel qhold qmove qmsg qrerun qrls qselect qsig qstat qsub).
Some commands are for a compiler toolchain (ar c99 cflow ctags cxref gencat iconv lex m4 make nm strings strip tsort yacc), which is outside of toybox's -mandate and should be supplied externally. (Again, some of these may be +mandate and should be supplied externally. (Again, some of these may be revisited later, but not for toybox 1.0.)
-Some commands are part of a command shell, and cannot be implemented as +
Some commands are part of a command shell, and can't be implemented as separate executables (alias bg cd command fc fg getopts hash jobs kill read -type ulimit umask unalias wait). These may be revisited as part of a built-in -toybox shell, but are not exported into $PATH via symlinks. (If you fork a +type ulimit umask unalias wait). These may be revisited as part of a built-in +toybox shell, but are not exported into $PATH via symlinks. (If you fork a child process and have it "cd" then exit, you've accomplished nothing.) Again, what posix provides is incomplete: a shell also needs exit, if, while, for, case, export, set, unset, trap, exec... (And for bash compatibility @@ -189,6 +206,27 @@ su sync tar umount useradd userdel usermod zcat +
Discussion of standards wouldn't be complete without the Internet +Engineering Task Force's "Request For Comments" collection.
+ +These are more about protocols than commands. The noise level is +extremely high: there's thousands of RFCs, many describing a proposed idea +that never took off, and less than 1% of the resulting documents are +currently relevant to toybox. And the documents are numbered based on the +order they were received, with no real attempt at coherently indexing +the result. As with man pages they can be long and complicated or +terse and impenetrable, +have developed a certain amount of bureaucracy over the years, and often the easiest way to understand what +they document is to find an earlier version to read first.
+ +That said, RFC documents can be useful (especially for networking protocols) +and the three URL templates the recommended starting files +for new commands (toys/example/skeleton.c or toys/example/hello.c depending on how much +plumbing you want to start with) provide point to are posix, lsb, and +rfc pages.
+