logo

oasis-root

Compiled tree of Oasis Linux based on own branch at <https://hacktivis.me/git/oasis/> git clone https://anongit.hacktivis.me/git/oasis-root.git
commit: 88c3c68352b40cc0c669cb838219417c1ad80a1e
parent 1ee2658a5408ffbec042897872af4a5f26047e4c
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date:   Wed, 25 Jun 2025 16:33:46 +0200

oasis e1ad3c0288

Diffstat:

Mbin/cat0
Mbin/chown0
Mbin/cmp0
Mbin/echo0
Mbin/head0
Mbin/install0
Mbin/join0
Mbin/mv0
Mbin/printf0
Mbin/realpath0
Mbin/rm0
Mbin/sha1sum0
Mbin/sha256sum0
Mbin/sha512sum0
Mbin/shuf0
Mbin/sleep0
Mbin/split0
Mbin/timeout0
Mbin/truncate0
Mbin/which0
Mlibexec/sshd-session0
Mshare/man/man1/chown.130++++++++++++++++++++++++++++--
Mshare/man/man1/printf.165++++++++++++++++++++++-------------------------------------------
Mshare/man/man1/realpath.113+++++++++----
Mshare/man/man1/sleep.17++++---
Mshare/man/man1/timeout.17++++---
26 files changed, 67 insertions(+), 55 deletions(-)

diff --git a/bin/cat b/bin/cat Binary files differ. diff --git a/bin/chown b/bin/chown Binary files differ. diff --git a/bin/cmp b/bin/cmp Binary files differ. diff --git a/bin/echo b/bin/echo Binary files differ. diff --git a/bin/head b/bin/head Binary files differ. diff --git a/bin/install b/bin/install Binary files differ. diff --git a/bin/join b/bin/join Binary files differ. diff --git a/bin/mv b/bin/mv Binary files differ. diff --git a/bin/printf b/bin/printf Binary files differ. diff --git a/bin/realpath b/bin/realpath Binary files differ. diff --git a/bin/rm b/bin/rm Binary files differ. diff --git a/bin/sha1sum b/bin/sha1sum Binary files differ. diff --git a/bin/sha256sum b/bin/sha256sum Binary files differ. diff --git a/bin/sha512sum b/bin/sha512sum Binary files differ. diff --git a/bin/shuf b/bin/shuf Binary files differ. diff --git a/bin/sleep b/bin/sleep Binary files differ. diff --git a/bin/split b/bin/split Binary files differ. diff --git a/bin/timeout b/bin/timeout Binary files differ. diff --git a/bin/truncate b/bin/truncate Binary files differ. diff --git a/bin/which b/bin/which Binary files differ. diff --git a/libexec/sshd-session b/libexec/sshd-session Binary files differ. diff --git a/share/man/man1/chown.1 b/share/man/man1/chown.1 @@ -13,11 +13,21 @@ .Op Fl h | Fl R Op Fl HLP .Ar owner Ns Op : Ns Ar group .Ar file... +.Nm chown +.Op Fl v +.Op Fl h | Fl R Op Fl HLP +.Fl -reference Ar ref_file +.Ar file... .Nm chgrp .Op Fl v .Op Fl h | Fl R Op Fl HLP .Ar group .Ar file... +.Nm chgrp +.Op Fl v +.Op Fl h | Fl R Op Fl HLP +.Fl -reference Ar ref_file +.Ar file... .Sh DESCRIPTION .Nm chown sets the user ID given by @@ -38,7 +48,16 @@ The and .Ar group arguments can be either numeric IDs, or names. -Ownership refers to both user and group. +Unless specified, ownership refers to both user and group. +.Pp +If +.Fl -reference +is used instead +.Nm chown +sets both user and group ownership +and +.Nm chmod +sets only group ownership. .Sh OPTIONS .Bl -tag -width Ds .It Fl h @@ -66,6 +85,11 @@ is also specified, change ownership of symbolic links without dereferencing. .It Fl R Recurse into directories. +.It Fl -reference Ar ref_file +Copy ownership from +.Ar ref_file +into each +.Ar file . .It Fl v Verbose, print a message about each processed file, whether a change was made or not. .El @@ -81,6 +105,8 @@ specification. .Pp The .Fl v -option is an extension, also present in GNU coreutils. +and +.Fl -reference +options are extensions, also present in GNU coreutils. .Sh AUTHORS .An Haelwenn (lanodan) Monnier Aq Mt contact+utils@hacktivis.me diff --git a/share/man/man1/printf.1 b/share/man/man1/printf.1 @@ -29,7 +29,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd March 9, 2025 +.Dd May 26, 2025 .Dt PRINTF 1 .Os .Sh NAME @@ -74,8 +74,8 @@ The format string is reused as often as necessary to satisfy the Any extra format specifications are evaluated with zero or the null string. .Pp -Character escape sequences are in backslash notation as defined in the -.St -ansiC , +Character escape sequences are in backslash notation as defined in +.St -isoC-2011 , with extensions. The characters and their meanings are as follows: @@ -101,8 +101,14 @@ Write a <vertical tab> character. Write a <single quote> character. .It Cm \e\e Write a backslash character. -.It Cm \ec Ns Ar char -Write a control character, where: +.It Cm \ec | Cm \ec Ns Ar char +In +.Cm %b +cut the string argument and make +.Nm printf +exits. +.Pp +Otherwise as format conversion escape: Write a control character, where: .Bl -bullet -compact .It .Cm @ @@ -332,6 +338,13 @@ and that an additional escape sequence stops further output from this .Nm invocation. +.It Cm q +Print +.Ar argument +so it can be reused for shell input, +escaping control characters and single-quote with POSIX.1-2024 +.Cm $'' +(dollar-single-quote) syntax. .It Cm n$ Allows reordering of the output according to .Ar argument . @@ -414,6 +427,10 @@ backslash-escapes are extensions inspired by .Xr sh 1 Ns 's dollar-single-quote($'…') escapes. +.Pp +The +.Cm %q +format specifier is an extension inspired by GNU coreutils. .Sh HISTORY The .Nm @@ -422,41 +439,3 @@ command appeared in It is modeled after the standard library function, .Xr printf 3 . -.Sh CAVEATS -ANSI hexadecimal character constants were deliberately not provided. -.Pp -Trying to print a dash ("-") as the first character causes -.Nm -to interpret the dash as a program argument. -.Nm -- -must be used before -.Ar format . -.Pp -If the locale contains multibyte characters -(such as UTF-8), -the -.Cm c -format and -.Cm b -and -.Cm s -formats with a precision -may not operate as expected. -.Sh BUGS -Since the floating point numbers are translated from ASCII -to floating-point and then back again, floating-point precision may be lost. -(By default, the number is translated to an IEEE-754 double-precision -value before being printed. -The -.Cm L -modifier may produce additional precision, depending on the hardware platform.) -.Pp -The escape sequence \e000 is the string terminator. -When present in the argument for the -.Cm b -format, the argument will be truncated at the \e000 character. -.Pp -Multibyte characters are not recognized in format strings (this is only -a problem if -.Ql % -can appear inside a multibyte character). diff --git a/share/man/man1/realpath.1 b/share/man/man1/realpath.1 @@ -11,7 +11,7 @@ .Nm .Op Fl E Ns | Ns Fl e .Op Fl n Ns | Ns Fl z -.Op Fl s +.Op Fl qs .Ar path... .Sh DESCRIPTION The @@ -35,6 +35,11 @@ Fail when does not exists. .It Fl n Do not print a trailing separator. +.It Fl q +Do not print errors/warnings when +.Xr realpath 3 +fails. +Messages about other errors, such as bad usage, are still printed. .It Fl s Do not resolve symlinks. .It Fl z @@ -52,9 +57,9 @@ specification. .Pp The options .Fl n , -.Fl s -and -.Fl z +.Fl q , +.Fl s , +.Fl z , and support for multiple .Ar path arguments are extensions present for compatibility with existing software. diff --git a/share/man/man1/sleep.1 b/share/man/man1/sleep.1 @@ -1,7 +1,7 @@ .\" utils-std: Collection of commonly available Unix tools .\" Copyright 2017 Haelwenn (lanodan) Monnier <contact+utils@hacktivis.me> .\" SPDX-License-Identifier: MPL-2.0 -.Dd July 25, 2024 +.Dd June 18, 2025 .Dt SLEEP 1 .Os .Sh NAME @@ -13,12 +13,13 @@ .Sh DESCRIPTION The .Nm -utily shell suspends execution for the total of each +utily shall suspends execution for the total of each .Ar duration argument. .Pp .Ar duration -is a non-negative decimal number including floats, optionally followed by a suffix: s for seconds (default), m for minutes, h for hours. +is a string containing non-negative decimal numbers including floats, terminated by a suffix: s for seconds, m for minutes, h for hours, d for days. +If the final number doesn't have a suffix it is assumed to be seconds. Longer durations are taken as out of scope. .Sh EXIT STATUS .Ex -std diff --git a/share/man/man1/timeout.1 b/share/man/man1/timeout.1 @@ -1,7 +1,7 @@ .\" utils-std: Collection of commonly available Unix tools .\" Copyright 2017 Haelwenn (lanodan) Monnier <contact+utils@hacktivis.me> .\" SPDX-License-Identifier: MPL-2.0 -.Dd July 22, 2024 +.Dd June 18, 2025 .Dt TIMEOUT 1 .Os .Sh NAME @@ -24,8 +24,9 @@ and terminates it, if still running after .Ar duration . .Pp .Ar duration -is a non-negative decimal number including floats, -optionally followed by a suffix: s for seconds (default), m for minutes, h for hours. +is a string containing non-negative decimal numbers including floats, terminated by a suffix: s for seconds, m for minutes, h for hours, d for days. +If the final number doesn't have a suffix it is assumed to be seconds. +Longer durations are taken as out of scope. .Sh OPTIONS .Bl -tag -width __ .It Fl f