ac76e33 Manpage update by job 936175
~nabijaczleweli pushed to ~nabijaczleweli/voreutils git
e6a9c29 Accept Makefile.local as local config
~nabijaczleweli pushed to ~nabijaczleweli/voreutils git
Drop-in Policy-compatible coreutils replacement, at the very least.
This probably wants a better blurb.
GNU coreutils provide the following 106 binaries, according to dpkg -L coreutils | grep bin/
on Bullseye (8.32-4+b1):
splice(2)
s/copy_file_range(2)
s/sendfile(2)
s by default-n
only_POSIX_VDISABLE
character "undef
", contrasts with "<undef>
" on all known implementations? Formatting loss->overinterpretation since Issue 6. → POSIX 0001604: default output for control characters, #1018958: default output doesn't actually show "deviations from stty sane" for c_cc[VTIME] and c_cc[VMIN], #1019344: * (non-POSIX) markings in manual wrong), #1019463: unchecked overflow for rows/cols, checked for all other arguments, #1019466: CHAR empty-string argument undocumented, ^C underconstrained, #1019468: changing ispeed/ospeed says "unable to perform all requested operations" but the change sticks, #1027442: soft-wrapping broken, wraps to cols+1; also -l string -eq ...
--[no]check-order
is, uh, Not Great-c128
)getfscon()
s program verbatim but execve()
s it; trojan moment?, cf. BUGS--output-error
is multiple levels of wrong[
[=e=]
as e
: this matches 4.4BSD and GNU tr, but is nevertheless a missing POSIX feature; OTOH, POSIX tr appears to think it operates on characters, which is both very optimistic and explodes instantly, is a horrible and confused hold-over from XPG3, and doesn't match historical implementations; implements [:class:]
properly, unlike GNU tr; coreutils: tr: confusing error message w.r.t. backwards c-c set points at nonconformant behaviour; coreutils: tr: tr.1 (and tr --help) falsely claims -t is only valid when translatingst_size
for regular files--
, mirroring POSIX echoAlso an honorary glibc bug: #1017852: C locale is 7-bit (127 characters), must be 8-bit (256 characters) since POSIX Issue 7 TC2/Issue 8
TODO? for du/df, we process DU_BLOCK_SIZE=Q BLOCK_SIZE=2 as -B2 not as default block size, unlike coreutils
TODO: import descriptions of the one-line 1BSD-style imports
TODO: multicalls should default to something rather than abort when appropriate like netbsd id(1) maybe? This is already what we do with cksum
.
TODO: should posix_fadvise(sequential) where appropriate maybe?
TODO: support SMACK in addition to SELinux? or don't either way, rip it out (rm
has it) or add it in
TODO: support TrustedBSD maybe?
TODO? does "UNIX Programmer's Manual" want to have some part/entirety .Tn
ed
TODO: some sort of consistent uid/gid/pwent/grent caching?
You'll need a non-ancient C++ toolchain, a BSD AWK, GNU make, mandoc (linting and HTML manuals only, MANDOC=true
to disable), and shellcheck (for shell wrappers, SHELLCHECK=:
to disable).
libb2
and libcrypto
are required (searched with pkg-config
if available). It'd be just libcrypto
if the implementation correctly used the result size in EVP_MD.
libselinux-dev
and pkg-config
will provide SELinux support.
libgmp-dev
and pkg-config
will provide fast bignum support for factor.
Run GNU make. See the head of the Makefile for tunables,
notably VOREUTILS_VERSION
, derived from git HEAD by default,
and VOREUTILS_DATE{,_MODE}
, derived from the latest git commit affecting each file by default,
OUTDIR
(and {CMD,LIB,MAN,HTMLMAN}DIR
) where artifacts land, and
OBJDIR
where intermediate objects land; these can all be set independently,
SYMLINK
, if set to "y", will link binary altnames together symbolically.
VOREUTILS_LIB_PREFIX
(/usr/lib/voreutils/
) is the location of libstdbuf
.
Makefile.local
is sourced at the top for config persistence.
If you just want the manuals, copy MANDIR
(out/man
by default) to somewhere in your $MANPATH
(like /usr/local/man
).
Otherwise, point your $PATH
at CMDDIR
(out/cmd
); if you're using groff, $MANPATH
works automagically, otherwise, adjust it as well.
Or copy {CMD,LIB,MAN}DIR
(out/{cmd,lib,man}
) to ~/{bin,lib,man}
.
If you're feeling brave, copy them to /usr/local/{bin,lib,man}
, which globally masks your system coreutils.
Depending on which GNU coreutils bugs your system depends on, this may be undesirable.
VOREUTILS_LIB_PREFIX
needs to be set correctly (to the final destination of LIBDIR
) at build time for stdbuf
to work right.
Who knows yet!
The version is included in each output file, via the .version
directive (=> it ends up in .note
).
Unlocked stdio used by default, toggle comment in include/vore-stdio
to disable (for testing or otherwise).
TODO: temporarily permanently disabled for testing; enable later.
If C++ were good, gcc would have [[no_destroy]]
; it doesn't: use placement new
for (function-)static maps et al. like rm.cpp
.
Ideally we could do the same to main()
-scope variables, but it's too verbose.
The environment block is read-only (except as hidden by libc et al., but that's hidden) – argv and environ are const char * const *
.
argc
doesn't exist because argv
is a forward iterator: consecutive elements are *(argv + n)
; argv[0]
is self.
Enable in-line eqn(1) with
.EQ
delim %%
.EN
(or whichever delimiter is best) after .Sh DESCRIPTION
and disable it at the end.
If typesetting something that doesn't work in nroff mode (like the big equations in base64.1
) provide an .ie n
/.el
alternative in .Fn
-like syntax;
otherwise (like the polynomial in cksum.1
) enable eqn(1) preprocessing in man(1) by starting with '\" e
.
If typesetting something that doesn't work in troff mode, prefer .ie t
(cf. pathchk.1
).
In mandoc delimited eqn(1) breaks conditionals,
wrap them in braces (.el \{ [text] % eqn % [text] \}
).
Need to be attached to a teletype. Use script(1)
, for example, if the test environment doesn't allocate one by default.
Test data is compacted per data directory w/find -exec b2sum {} + | sort | mawk '{h = substr($0, 1, 128); fn = substr($0, 1 + 128 + 2); if(h == hash) {tgt = "." fname; split(fn, curs, "/"); if(curs[2] == fnames[2]) tgt = fnames[3]; print "[ -s \"" fn "\" ] && ln -sf -- \"" tgt "\" \"" fn "\""} else {hash = h; fname = fn; split(fname, fnames, "/")}}' | sh
.
Free UNIXes, hopefully. Debian, OpenBSD, and FreeBSD are on CI, as normal, bare, and fucked baselines, respectively. I also test on NetBSD (and TODO: some Illumos distro) before release.
Post to the tracker (~nabijaczleweli/voreutils@todo.sr.ht, preferable for bugs), the list (~nabijaczleweli/voreutils@lists.sr.ht, preferable for opinions and patches), or me directly (now with Platform integration!).
Not picky about patches — inline, attachment, and a git link and ref to pull are fine — just please include the repo name in the subject prefix.
All contents of this repository are subject to the 0-clause BSD licence.
To all who support further development on Patreon, in particular: