Commit Graph

15533 Commits

Author SHA1 Message Date
Alexander V. Chernikov
79111aa26f netstat: fix format string on 32-bit archs 2023-01-27 17:45:49 +00:00
Allan Jude
5ff13fbc19 MFV: zstd 1.5.2
Merge commit 'b3392d84da5bf2162baf937c77e0557f3fd8a52b' into zstd_1.5.2

full changelog: https://github.com/facebook/zstd/compare/v1.4.8...v1.5.2

Updated sys/kern/subr_compressor.c to new API

MFC after:	3 days
Relnotes:	yes
Sponsored by:	Klara, Inc.
2023-01-27 17:22:31 +00:00
Alexander V. Chernikov
68636dcb6f netstat: make netstat -rn use netlink instead of rtsock
This change switches route listing in netstat to netlink, with fallback to rtsock.
The outputs are mostly identical, with an exception of not showing kernel
 nexthop indexes for multipath routes.

Differential Revision: https://reviews.freebsd.org/D36529
2023-01-27 15:36:10 +00:00
Ed Maste
ac4c695ad6 Retire WITHOUT_CXX option
Several important base system components are written in C++, and the
WITHOUT_CXX option produced a system that was not fully functional.
Just accept this, and remove the option to build without C++ support.

This reverts commit adc3c128c6.

Reviewed by:	brooks, kevans, jhb (earlier)
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D33108
2023-01-26 21:13:16 -05:00
Dag-Erling Smørgrav
6fc1bbbf62 w: Unlike err(3), xo_err(3) won't accept a null format string.
MFC after:	1 week
X-MFC-with:	d90ff31ae5
Sponsored by:	Klara, Inc.
Reviewed by:	imp
Differential Revision:	https://reviews.freebsd.org/D38192
2023-01-25 18:03:00 +01:00
Dag-Erling Smørgrav
d90ff31ae5 w: Complete libxo transition.
MFC after:	1 week
Sponsred by:	Klara, Inc.
Reviewed by:	markj
Differential Revision:	https://reviews.freebsd.org/D38172
2023-01-25 07:22:46 +01:00
Dag-Erling Smørgrav
14ebab25e1 find: Logic nit in man page.
Arguments follow primaries, not the other way around.

MFC after:	1 week
Sponsored by:	Klara, Inc.

Reviewed by:	markj
Differential Revision:	https://reviews.freebsd.org/D38173
2023-01-24 09:53:35 +01:00
Elliott Mitchell
e5c30ac930 vmstat: fix overflow of interrupt name buffer
sysctl() provides a count of number of bytes in the buffer.  That is the
actual buffer length.  Whereas looking for an interrupt entry with an
empty name could terminate too early, or overflow the end of the buffer.
The overflow will occur if the table of interrupt names is full.

Reviewed by:	kib
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D36628
2023-01-20 04:51:13 +02:00
Elliott Mitchell
d4d7971849 vmstat: remove shadow variables
These appear to simply be the style of arguments are left untouched and
only local variables are modified.  While some may prefer that style
this simply serves to complicate things as they're perfectly writeable.

Reviewed by:	kib
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D36628
2023-01-20 04:51:12 +02:00
Alan Somers
92e978439f cal: don't print terminal control characters unless stdout is a TTY
A similar change was made in svn r223931, but it was incomplete, working
only when the utility was invoked as "ncal".  Fix the same issue when
invoking as "cal".

PR:		268936
Reported by:	Ray Bellis <ray@bellis.me.uk>
MFC after:	2 weeks
Sponsored by:	Axcient
Reviewed by:	imp
Differential Revision: https://reviews.freebsd.org/D38045
2023-01-13 14:30:00 -07:00
Gleb Smirnoff
dd2b23006c fuser: fix loop over kinfo_proc array
The previous code would skip as many entries at the end of the
array as there were zombies in the list.  While here fix type
of cnt.

Submitted by:	Ali Abdallah <ali.abdallah suse.com>
PR:		232702
MFC After:	2 weeks
2023-01-09 08:40:20 -08:00
Kyle Evans
e898a3af97 grep: properly switch EOL indicator with -z
-z is supposed to use only the NUL byte as EOL, but we were
inadvertently using both newline and NUL due to REG_NEWLINE in cflags.

The odds of anyone relying on this bsdgrep-specific bug are quite low,
so let's just fix it.  At least one port in the wild has been reported
to expect the intended behavior.

Reported by:	Hill Ma <maahiuzeon@gmail.com>
Triaged by:	the self-proclaimed peanut gallery on Discord
2023-01-03 23:37:54 -06:00
Yoshihiro Takahashi
a1f28ec729 unzip: Document optional member list
Submitted by:	Pat Maddox (man page)
PR:		267426
MFC after:	2 weeks
2023-01-02 13:17:27 +09:00
David E. O'Brien
43dc1409c1 Restricting xargs to '-n1' is much slower and isn't needed for file(1)
Also note that libc.so.6 is an older version of libc (thus why you'd
want to find files linked against it).
2022-12-28 15:54:29 -08:00
Wolfram Schneider
433c5a8ae4 do not expect mandoc(1) to terminate in finite time
PR:		266868
2022-12-27 17:04:04 +00:00
Mike Karels
c7a0637417 bspatch.1: fix missing argument
Fix typo

MFC after:	3 days
Reviewed by:	gbe
Differential Revision:	https://reviews.freebsd.org/D37727
2022-12-22 11:13:32 -06:00
Jose Luis Duran
cf7fe60e63 grep.1: Add an ENVIRONMENT section
Document the environment variables used by grep(1).

Reviewed by:	pauamma, kevans
MFC after:	5 days
Differential Revision:	https://reviews.freebsd.org/D37726
2022-12-18 08:22:24 +01:00
Gleb Smirnoff
eaabc93764 tcp: retire TCPDEBUG
This subsystem is superseded by modern debugging facilities,
e.g. DTrace probes and TCP black box logging.

We intentionally leave SO_DEBUG in place, as many utilities may
set it on a socket.  Also the tcp::debug DTrace probes look at
this flag on a socket.

Reviewed by:		gnn, tuexen
Discussed with:		rscheff, rrs, jtl
Differential revision:	https://reviews.freebsd.org/D37694
2022-12-14 09:54:06 -08:00
Kyle Evans
54d65fdd56 diff: restyle loop a bit
This is a bit more readable, and this loop is probably unlikely to gain
any `continue` or `break`s.

Suggested by:	pstef
Differential Revision:	https://reviews.freebsd.org/D37676
2022-12-13 19:31:21 -06:00
Kyle Evans
8bf187f35b diff: fix side-by-side output with tabbed input
The previous logic conflated some things... in this block:
- j: input characters rendered so far
- nc: number of characters in the line
- col: columns rendered so far
- hw: column width ((h)ard (w)idth?)

Comparing j to hw or col to nc are naturally wrong, as col and hw are
limits on their respective counters and nc is already brought down to hw
if the input line should be truncated to start with.

Right now, we end up easily truncating lines with tabs in them as we
count each tab for $tabwidth lines in the input line, but we really
should only be accounting for them in the column count.  The problem is
most easily demonstrated by the two input files added for the tests,
the two tabbed lines lose at least a word or two even though there's
plenty of space left in the row for each side.

Reviewed by:	bapt, pstef
Sponsored by:	Klara, Inc.
Differential Revision:	https://reviews.freebsd.org/D37676
2022-12-13 19:31:21 -06:00
Ed Maste
86edb11e74 Always install llvm-objdump as objdump
Instead of providing no /usr/bin/objdump when LLVM_BINUTILS is false.

PR:		267854 [exp-run]
Reviewed by:	dim
MFC after:	2 weeks
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D37445
2022-12-12 10:36:02 -05:00
Konstantin Belousov
1bbc510134 posixshmcontrol(1): for regular shmfd, report used pages number
Reviewed by:	markj
Tested by:	pho
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D37097
2022-12-09 14:17:12 +02:00
Gleb Smirnoff
e68b379244 tcp: embed inpcb into tcpcb
For the TCP protocol inpcb storage specify allocation size that would
provide space to most of the data a TCP connection needs, embedding
into struct tcpcb several structures, that previously were allocated
separately.

The most import one is the inpcb itself.  With embedding we can provide
strong guarantee that with a valid TCP inpcb the tcpcb is always valid
and vice versa.  Also we reduce number of allocs/frees per connection.
The embedded inpcb is placed in the beginning of the struct tcpcb,
since in_pcballoc() requires that.  However, later we may want to move
it around for cache line efficiency, and this can be done with a little
effort.  The new intotcpcb() macro is ready for such move.

The congestion algorithm data, the TCP timers and osd(9) data are
also embedded into tcpcb, and temprorary struct tcpcb_mem goes away.
There was no extra allocation here, but we went through extra pointer
every time we accessed this data.

One interesting side effect is that now TCP data is allocated from
SMR-protected zone.  Potentially this allows the TCP stacks or other
TCP related modules to utilize that for their own synchronization.

Large part of the change was done with sed script:

s/tp->ccv->/tp->t_ccv./g
s/tp->ccv/\&tp->t_ccv/g
s/tp->cc_algo/tp->t_cc/g
s/tp->t_timers->tt_/tp->tt_/g
s/CCV\(ccv, osd\)/\&CCV(ccv, t_osd)/g

Dependency side effect is that code that needs to know struct tcpcb
should also know struct inpcb, that added several <netinet/in_pcb.h>.

Differential revision:	https://reviews.freebsd.org/D37127
2022-12-07 09:00:48 -08:00
John Baldwin
4fa1e855be rpcgen: Unindent a line not guarded by if (mtflag).
mtflag is used to add pthread mutex locking around operations to make
them thread-safe.  Setting the state to _SERVED is not conditional on
locking.

Reviewed by:	imp, emaste
Differential Revision:	https://reviews.freebsd.org/D37541
2022-12-04 16:32:03 -08:00
John Baldwin
f0b58b1901 rpcgen: Don't free() a pointer after realloc().
A successful realloc() already frees the old pointer.

Reported by:	GCC -Wuse-after-free
Reviewed by:	brooks, imp, emaste
Differential Revision:	https://reviews.freebsd.org/D37540
2022-12-04 16:31:35 -08:00
John Baldwin
42fb28cef4 Explicitly set CXXSTD to c++11 for old C++ code using std::auto_ptr<>.
GCC 12 defaults to C++17 which removes (not just deprecates)
std::auto_ptr<>.  Trying to use CXXSTD of c++03 doesn't work with
libc++ headers, but c++11 does.

Reviewed by:	brooks, imp, emaste
Differential Revision:	https://reviews.freebsd.org/D37531
2022-12-04 16:25:21 -08:00
Gleb Smirnoff
657729a89d Retire trpt(8).
trpt(8) was utility to pull TCP debugging data from the kernel
originating back from 4.2BSD.  It is not used nowadays by TCP
developers.  We have more powerful debugging facilities, e.g.
the Dtrace probing, the TCP black box logging and siftr.

Discussed with: rscheff, tuexen, rrs, jtl and others
2022-12-02 14:10:55 -08:00
Daniel Dowse
e442917ee4 killall(1): allow sending signals to processes with control terminal on pts(4)
PR:	268093
Reviewed by:	kib
MFC after:	1 week
2022-12-01 04:42:35 +02:00
John Baldwin
f6fdf9214a systat: Fix a bunch of use after frees in fetch_ifstat().
I think this was probably just a typo.  initifstat() continues around
a similar loop if the mib data fails to fetch, and fetch_ifstat() was
already using a FOREACH_SAFE loop here so expected to keep going.
Calling clearifstat() from the fetch routine also seems wrong, and the
sort_interface_list() call triggered by the existing needsort = 1 will
itself set needclear to trigger a future clearifstat().

Reported by:	GCC 12 -Wuse-after-free
Differential Revision:	https://reviews.freebsd.org/D36823
2022-11-22 11:11:42 -08:00
Ed Maste
20a66ab4bf Retire CLANG_IS_CC option
A small reduction in build infrastructure complexity; when we had both
Clang and GCC in the tree it was useful to have both built, and choose
one or the other to install as /usr/bin/cc.  Now only Clang is in the
tree, and there is no point in building and installing base Clang but
not providing it as cc (and c++, cpp).

Reviewed by:	imp
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D37075
2022-11-21 14:56:13 -05:00
Dag-Erling Smørgrav
b9fabe997f tftp: cleanup
Sponsored by:	Klara, Inc.
Differential Revision: https://reviews.freebsd.org/D37433
2022-11-18 17:01:30 +01:00
Dag-Erling Smørgrav
b15e052e74 tftpd: Plug memory leaks in option handling code.
Sponsored by:	Klara, Inc.
Differential Revision: https://reviews.freebsd.org/D37423
2022-11-18 16:39:44 +01:00
Dag-Erling Smørgrav
bacb00ab40 tftpd: whitespace cleanup 2022-11-17 16:42:30 +00:00
Dag-Erling Smørgrav
9f9544fd92 tftp: Fix buffer overflow and fd leak in multi-file PUT.
Sponsored by:	Klara, Inc.
Differential Revision: https://reviews.freebsd.org/D37422
2022-11-17 17:26:24 +01:00
John Baldwin
7ad9aa0b93 rs: Test actual output in the tests.
Previously the tests just verified if command line arguments raised an
error or not, they did not test how command line arguments affected
the output.  This adds some sample (if simple) input and output to
each flag test as well as adding a few additional trivial tests.

Reviewed by:	brooks
Differential Revision:	https://reviews.freebsd.org/D36835
2022-11-15 21:20:18 -08:00
John Baldwin
afb4998dd4 rs: Use getopt() and strtol() instead of mannual parsing.
This uses the "::" extension to getopt() to handle options which take
an optional argument.

The updated flag tests were all wrong before and only passed because
the manual parser failed to raise errors when a required argument was
missing.  The invalid argument test now gets a better error message.

Reviewed by:	brooks, imp, emaste
Differential Revision:	https://reviews.freebsd.org/D36834
2022-11-15 21:19:35 -08:00
John Baldwin
42d10b1b56 rs: Convert to C++ to convert elem to a std::vector<char *>.
This also updates various indices and counters from int to size_t to
pacify resulting -Wsign-compare warnings.

Reviewed by:	brooks
Differential Revision:	https://reviews.freebsd.org/D36833
2022-11-15 21:03:12 -08:00
John Baldwin
6100374ccf diff: Don't (ab)use sprintf() as a kind of strcat().
Previously print_header() used sprintf() of a buffer to itself as a
kind of string builder but without checking for overflows.  This
raised -Wformat-truncation and -Wrestrict warnings in GCC.  Instead,
just conditionally print the new timestamp fields after the initial
strftime()-formatted string.  While here, use sizeof(buf) with
strftime() rather than a magic number.

Reviewed by:	bapt
Differential Revision:	https://reviews.freebsd.org/D36814
2022-11-15 19:17:36 -08:00
John Baldwin
4e0771714d diff: Don't treat null characters like carriage returns in readhash().
The implicit fall-through in the !D_FORCEASCII case caused null
characters to be treated as carriage returns honoring the D_STRIPCR,
D_FOLDBLANKS, and D_IGNOREBLANKS flags.

Reported by:	GCC -Wimplicit-fallthrough
Reviewed by:	bapt
Fixes:	 	3cbf98e2be diff: read whole files to determine if they are ASCII text
Differential Revision:	https://reviews.freebsd.org/D36813
2022-11-15 19:16:50 -08:00
Richard Scheffenegger
1a70101a87 tcp: account sent/received IP ECN markings independently
Have tcpstats (netstat -s) differentiate between received and sent
ECN-marked packets. Also account for IP ECN bits (on TCP packets)
even when the tcp session has not negotiated ECN support.

Event:			IETF 115 Hackathon
Reviewed By:		glebius, tuexen, #transport
Sponsored by:		NetApp, Inc.
Differential Revision:	https://reviews.freebsd.org/D37314
2022-11-10 11:35:35 +01:00
Kyle Evans
d22f03636b mktemp: skip later TMPDIR check if -p is specified
We already did the necessary $TMPDIR fallback, if it's going to be used.
Skip the later check so that we don't accidentally override our -p
argument.

Fixes:		ac6f924e1c ("mktemp: add -p/--tmpdir argument")
Sponsored by:	Klara, Inc.
2022-11-09 00:04:04 -06:00
Gordon Bergling
9bdb5158d6 Update HISTORY and AUTHORS sections for cut(1) and paste(1)
In an e-mail Brian Walden wrote that:

"GWRL stands for Gottfried W. R. Luderer, the author of cut(1) and
paste(1), probably around 1978. Those came either from PWB or USG,
as he worked with, or for, Berkley Tague. Thus they made their way
into AT&T commercial UNIX, first into System III and the into System
V, and that's why they are missing from early BSD releases as they
didn't get into Research UNIX until the 8th Edition."

So update the HISTORY and AUTHORS sections for cut(1) and paste(1).

[1] https://minnie.tuhs.org/pipermail/tuhs/2020-January/019955.html

Reviewed by:	pauamma, imp
Obtained from:	OpenBSD (in partial)
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D36048
2022-11-07 11:23:33 +01:00
Kyle Evans
a28989483e wg: drop -Wno-cast-qual from CFLAGS
The latest update fixes the warning by applying const to the correct
part of the pointer.
2022-11-04 22:46:55 -05:00
Dag-Erling Smørgrav
f9349d4274 gzip: Add support for decompressing zstd files.
Sponsored by:	Klara, Inc.
Differential Revision: https://reviews.freebsd.org/D37236
2022-11-04 13:42:09 +01:00
Kyle Evans
a6346c02f6 mktemp: don't double up on trailing slashes for -t paths
This is a minor cosmetic change; re-organize slightly to set tmpdir to
_PATH_TMP if we didn't otherwise have a tmpdir candidate, then check the
trailing char before appending another slash.

While we're here, remove some bogus whitespace and add a test case for
this change.

Obtained from:	https://github.com/apple-oss-distributions/shell_cmds
Sponsored by:	Klara, Inc.
2022-11-02 21:42:57 -05:00
Elvin Aslanov
085a42d0cf grep: correct argument name in man page
MFC after:	1 week
Fixes:		4dc88ebedf ("Add BSD grep to the base system...")
Pull Request:	https://github.com/freebsd/freebsd-src/pull/622
2022-11-01 14:36:59 -04:00
Kyle Evans
ac6f924e1c mktemp: add -p/--tmpdir argument
This matches other mktemp implementations, including OpenBSD and GNU.
The -p option can be used to provide a tmpdir prefix for specified
templates.  Precedence works out like so:

-t flag:
- $TMPDIR
- -p directory
- /tmp

Implied -t flag (no arguments or only -d flag):
- -p directory
- $TMPDIR
- /tmp

Some tests have been added for mktemp(1) in the process.

Reviewed by:	imp (earlier version), wosch
Sponsored by:	Klara, Inc.
Differential Revision:	https://reviews.freebsd.org/D37121
2022-10-30 22:55:46 -05:00
Kyle Evans
cfc57d7dbe mktemp: add some GNU-compatible long options
GNU maketemp has long options for -d, -q, and -u, so let's add these
now for compatibility.

Reviewed by:	emaste, imp, wosch
Sponsored by:	Klara, Inc.
Differential Revision:	https://reviews.freebsd.org/D37120
2022-10-30 22:55:46 -05:00
Gordon Bergling
514df63539 tee.1: Add a HISTORY section
The most accurate information I have found is that
tee(1) first appeared in Version 7 AT&T UNIX.

Reviewed by:	pauamma
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D37206
2022-10-30 11:29:59 +01:00
Kyle Evans
0283826706 usr.bin: hook wg(8) up to the build
wg(8) is used to manage WireGuard interfaces; see wg(4) and wg(8) both
for more details and usage examples.
2022-10-28 22:05:39 -05:00
Dag-Erling Smørgrav
473e9fcab4 script: Handle a missing 's' stamp gracefully.
Sponsored by:	Klara, Inc.
Differential Revision: https://reviews.freebsd.org/D37182
2022-10-27 20:11:36 +00:00
Dag-Erling Smørgrav
6ac087cf8f script: Further usage string nits.
Sponsored by:	Klara, Inc.
Differential Revision:	https://reviews.freebsd.org/D37177
2022-10-27 19:49:18 +00:00
Dag-Erling Smørgrav
3276866f40 script: Use size_t / ssize_t where needed.
Sponsored by:	Klara, Inc.
Differential Revision:	https://reviews.freebsd.org/D37177
2022-10-27 19:49:18 +00:00
Math Ieu
172be8642d split: reset errno prior to getline()
Something else may have set errno, breaking the post-getline() logic
that tries to detect the getline() error.  This was initially noted in
a jail on a system that has HPET, in a jail that does not expose
/dev/hpet0 -- we see an earlier error in libc's vdso bits.

Fixes:	5c053aa3c5 ("split: switch to getline() [...]")
2022-10-27 12:17:59 -05:00
Dag-Erling Smørgrav
e7c13cf438 script: Add usage string for playback mode.
Sponsored by:	Klara, Inc.
Differential Revision:	https://reviews.freebsd.org/D37138
2022-10-27 14:46:15 +00:00
Dag-Erling Smørgrav
8e096e24d4 script: Correct -F in man page and usage string.
Sponsored by:	Klara, Inc.
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D37138
2022-10-27 14:46:09 +00:00
Emmanuel Vadot
069ebe6fba pkgbase: Put less in FreeBSD-runtime
Useful to have a pager in it.

Differential Revision:	https://reviews.freebsd.org/D36231
2022-10-26 19:46:43 +02:00
Emmanuel Vadot
feec04b355 pkgbase: Create a FreeBSD-games package
And put :
- pom
- caesar
- grdc

Differential Revision:	https://reviews.freebsd.org/D36230
2022-10-26 19:46:40 +02:00
Dag-Erling Smørgrav
deb2f1b616 w: Fix premature rounding.
If the system has been up more longer than a minute, we add 30 seconds to
the uptime so that subsequent calculations will round to the nearest minute
rather than truncate.  However, since the introduction of libxo, we output
the raw value after performing the adjustment.  Rewrite so that we output
the raw value first, then perform the adjustment and recalculate before
outputting the humanized value.

While there, reduce stack usage and avoid needless allocations.

Sponsored by:	Klara, Inc.
Differential Revision: https://reviews.freebsd.org/D37128
2022-10-26 15:56:40 +00:00
Kyle Evans
7aaa50c6b5 split: add word order fix
This was meant to note that both pattern and line matching were
previously restricted, but words are difficult.  +line and rearrange.

Sponsored by:	Klara, Inc.
2022-10-25 16:52:14 -05:00
Kyle Evans
75c3ca1ebf split: add some tests
This should cover all of the basic functionality, as well as the recent
enhancement to use a dynamic buffer size rather than limiting patterns
and lines to MAXBSIZE.

Reviewed by:	bapt
Sponsored by:	Klara, Inc.
Differential Revision:	https://reviews.freebsd.org/D36324
2022-10-25 10:05:24 -05:00
Kyle Evans
5c053aa3c5 split: switch to getline() for line/pattern matching
Get rid of split's home-grown logic for growing the buffer; arbitrarily
breaking at LONG_MAX bytes instead of 65536 bytes gives us much more
wiggle room.  Additionally, we'll actually fail out entirely if we can't
fit a line, which makes noticing this class of problem much easier.

Reviewed by:	bapt, emaste, pauamma
Sponsored by:	Klara, Inc.
Differential Revision:	https://reviews.freebsd.org/D36323
2022-10-25 10:05:23 -05:00
Dag-Erling Smørgrav
04f6b9cb18 w: cosmetic fixes.
Sponsored by:	Klara, Inc.
2022-10-21 16:37:44 +00:00
Mariusz Zaborski
af32978987 logger: fix builds without casper
We can enter capability mode only when Casper is available in
the system.

Reported by:	mjg@
MFC after:	1 week
2022-10-19 16:02:30 +02:00
Ed Maste
9a86a3cd9b truss: remove now-unused special case for MIPS
Reviewed by:	mhorne, imp
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D37022
2022-10-17 14:02:49 -04:00
liu-du
0ca740d9a6 xargs: fix exit code when using -P
currently when xargs runs in parallel mode (e.g. -P2), it somtimes
incorrectly returns zero exit code.  this commit fix it and also adds
tests.

Reviewed by:	mjg
PR:	267110
2022-10-17 10:39:04 +00:00
Olivier Cochard
07b1ea961a renice: Force /bin/sh usage on su calls for the regression tests.
If the root account is configured to use a different shell than sh,
it fails to retreive the pid of the background process.

Approved by:	des
Obtained from:	chs
Sponsored by:	Netflix
Differential Revision:	https://reviews.freebsd.org/D36930
2022-10-13 17:32:47 +02:00
Baptiste Daroussin
226e41467e sort: deindent file_reader_free and cleanup its usage 2022-10-13 10:51:17 +02:00
Baptiste Daroussin
ffd41d39c6 sort: simplify file_reader_clean
Deindent the function, remove useless tests:
 - free already test if argument is NULL
 - closefile already test if the input is stdin or null
2022-10-13 10:42:23 +02:00
Baptiste Daroussin
f9d9a7cc4f sort: deindent closefile 2022-10-13 10:38:12 +02:00
Baptiste Daroussin
48a53cc484 sort: use asprintf(3) instead of malloc + snprintf(3) 2022-10-13 10:34:57 +02:00
Baptiste Daroussin
958b0d4642 sort: deindent openfile 2022-10-13 10:31:34 +02:00
Baptiste Daroussin
f079ef8aa4 sort: simplify the code to handle -z flag 2022-10-13 10:24:11 +02:00
Baptiste Daroussin
4d4fcf619e sort: cleanup now unused structutre and prototypes 2022-10-13 10:24:11 +02:00
Baptiste Daroussin
8b9071360a sort: unify the code to read from FILE *
Previously the code to read from a local file or stdin was sperarated
After the change to remove the home made line reader used for stdin
(replaced by getdelim) it apprears that the rest of the code which is
used to read from any FILE * but stdin can benefit from the exact same
change.
2022-10-13 10:24:11 +02:00
Baptiste Daroussin
e8815fb30b sort: remove unused function 2022-10-13 10:24:11 +02:00
Baptiste Daroussin
f02c783757 sort: use memset to initialize structure when possible 2022-10-13 10:24:11 +02:00
Baptiste Daroussin
3f9e5e59bd sort: use mkstemp(3) instead of reinventing it
MFC After:	1 week
2022-10-12 18:01:57 +02:00
Baptiste Daroussin
b58094c0d9 sort: replace home made line reader by getdelim(3)
The previous code had bug when reading lines with an unexpected
encoding, returning without the full line being captured.
This result in sort complaining with "sort: Illegal byte sequence"

Using getdelim(3) instead of the home made code, fixes the situation.

PR:		241679
Reported by:	Ronald F. Guilmette <rfg-freebsd@tristatelogic.com>
MFC After:	1 week
Reviewed by:	markj, imp
Differential Revision:	https://reviews.freebsd.org/D36948
2022-10-12 17:37:33 +02:00
Baptiste Daroussin
ed990a7a2f sort: remove NLS support
NLS support for sort(1) is:
1/ incomplete: many error string are not using nls
2/ only covers hu_HU.ISO8859-2
2022-10-12 16:24:29 +02:00
Baptiste Daroussin
ecc3c29167 sort: replace malloc+memset with calloc 2022-10-12 16:12:04 +02:00
Baptiste Daroussin
a312f3e742 sort: add wrapper around calloc 2022-10-12 16:12:04 +02:00
Pau Amma
36bb350e37 Update tip for adding a user to wheel:
Use "pw groupmod" instead of hand-editing /etc/group

Reviewed by:	bcr, gjb

Approved by:	gjb (mentor)
2022-10-09 02:15:15 +02:00
Kristof Provost
307625842b w: don't truncate if we're writing libxo json/xml
If we're writing structured output (i.e. json or xml) we shouldn't worry
about terminal width, and instead always output full width information.

This means that, for example, if we're called from crontab with 'w
--libxo json' we'll provide full the command field rather than
pointlessly truncating it.

Suggested by:	Phil Shafer
Event:		Aberdeen Hackathon 2022
Differential Revision:	https://reviews.freebsd.org/D25013
2022-10-07 18:21:27 +02:00
Gleb Smirnoff
51c0184297 systat: remove INP_TIMEWAIT 2022-10-06 19:24:37 -07:00
Simon J. Gerraty
f48114b653 ldd: ignore unverified files
When mac_veriexec is enforcing, we won't run unverified binaries,
don't let ldd examine them either.

Reviewed by:	stevek emaste
MFC after:	1 week
Sponsored by:	Juniper Networks, Inc.
Differential Revision:	https://reviews.freebsd.org/D36897
2022-10-06 17:51:28 -07:00
Konstantin Belousov
9cabef3d14 ldd: use direct exec mode unconditionally
Trying to exec malformed or unusual binary, for instance, a non-FreeBSD
ABI, or using a non-standard interpreter, might give unexpected outcome.

Reported by:	The UK's National Cyber Security Centre (NCSC)
Reviewed by:	emaste, markj, philip
Discussed with:	jhb
Sponsored by:	The FreeBSD Foundation
admbug:	991
PR:	127276, 175339, 231926
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D36650
2022-10-06 18:50:26 +03:00
John Baldwin
ba86cffb28 rs: Fix some pointer arith UB.
If the next column was blank, then the length of the following entry
was computed as the end of the following entry minus a global variable
"blank" which is not in the same string or allocation.  Instead, save
the start value of 'p' explicitly instead of abusing '*ep'.  Possibly
we should just increment p before saving it in sp in the 'blank' case,
but at worst that would just mean maxlen might be one char too large
which should be harmless.

Reviewed by:	brooks
Differential Revision:	https://reviews.freebsd.org/D36832
2022-10-05 16:48:05 -07:00
John Baldwin
e5f2d5b35e rs: Fix a use after free.
Using a pointer passed to realloc() after realloc() even for pointer
arithmetic is UB.  It also breaks in practice on CHERI systems as
the updated value of 'sp' in this case would have had the bounds from
the old allocation.

This would be much cleaner if elem were a std::vector<char *>.

Reviewed by:	brooks, emaste
Reported by:	GCC -Wuse-after-free
Differential Revision:	https://reviews.freebsd.org/D36831
2022-10-05 16:47:40 -07:00
John Baldwin
bb31e1bbf2 rs: Fix various harmless warnings.
- Add /* FALLTHROUGH */ comments for intentional fall throughs in
  getargs().

- Remove id strings to quiet -Wunused-const-variable warnings from
  GCC.

- While here, remove __FBSDID.

Reviewed by:	brooks
Differential Revision:	https://reviews.freebsd.org/D36830
2022-10-05 16:47:21 -07:00
Daniel Engberg
070e8d36d9 grep: Add quotes in manpage when using wildcards with --include
Examples uses --include=*.h which doesn't work as intended

Approved by:	kevans
Differential Revision:	https://reviews.freebsd.org/D36883
2022-10-05 19:05:52 +02:00
John Baldwin
3736b2dd32 diff: Fix a use after free as well as a memory leak in change().
When -B or -I are used, change() evaluates the lines in a hunk to
determine if it is a hunk that should be ignored.  It does this by
reading each candidate line into a mallocated buffer via preadline()
and then calling ignoreline().  Previously the buffer was freed as a
side effect of ignoreline_pattern() called from ignoreline().
However, if only -B was specified, then ignoreline_pattern() was not
called and the lines were leaked.  If both options were specified,
then ignoreline_pattern() was called before checking for a blank line
so that the second check was a use after free.

To fix, pull the free() out of ignoreline_pattern() and instead do it
up in change() so that is paired with preadline().

While here, simplify ignoreline() by checking for the -B and -I cases
individually without a separate clause for when both are set.  Also,
do the cheaper check (-B) first, and remove a false comment (this
function is only called if at least one of -I or -B are specified).

Reviewed by:	emaste
Reported by:	GCC 12 -Wuse-after-free
Differential Revision:	https://reviews.freebsd.org/D36822
2022-10-03 16:10:43 -07:00
John Baldwin
db695788fc fortune: Unindent a debug printf in get_fort().
The debug printf is intended to execute after the loop has ended to
log the selected file.

Reviewed by:	imp, emaste
Reported by:	GCC
Differential Revision:	https://reviews.freebsd.org/D36815
2022-10-03 16:10:42 -07:00
John Baldwin
c2e561a38f tail: Fix misleading indentation in ARG() macro.
Reviewed by:	imp, emaste
Reported by:	GCC
Differential Revision:	https://reviews.freebsd.org/D36810
2022-10-03 16:10:42 -07:00
Dag-Erling Smørgrav
0aa2700123 Put OPIE to rest.
Differential Revision: https://reviews.freebsd.org/D36592
2022-10-02 03:37:29 +02:00
Mariusz Zaborski
6da5e5d649 seq: fix style nits
MFC after:	2 weeks
2022-10-01 12:05:07 +02:00
Mariusz Zaborski
94c4f663ba seq: fix potential NULL ptr reference
asprintf(3) allocates memory, and there isn't any guarantee of success.

MFC after:	2 weeks
Obtained from:  OpenBSD
2022-10-01 12:05:03 +02:00
Elliott Mitchell
42dc8696df vmstat: remove processor counting from getcpuinfo()
As `ncpus` was otherwise unused, keeping track was pointless.  Gets rid
of a warning from an unused variable.

Reviewed by:	kib
MFC after:	1 week
Differential Revision: https://reviews.freebsd.org/D36628
2022-09-30 06:10:27 +03:00
Olivier Cochard
c8b6939dfa renice: Prevent running regression tests in parallel
renice_abs_user and renice_rel_user tests modify global state, so they
are not compatible with parallel execution.

Reviewed by:	asomers
Sponsored by:	Netflix
Differential Revision:	https://reviews.freebsd.org/D36720
2022-09-30 00:28:19 +02:00
Brooks Davis
b4cfdbfed2 manpages: Remove telnetd references
Mostly remove from the SEE ALSO section, adding a mention of the port
where not removed. Elsewhere, remove as appropriate and change from .Xr
to .Nm where a mention of telnetd continues to make sense (or removing
it would require significant reworking of the surrounding text).

Reviewed by:	imp, delphij, emaste
Differential Revision:	https://reviews.freebsd.org/D36785
2022-09-29 17:56:41 +01:00
John Baldwin
536f7d84cd newkey: Fix mismatch in array bounds in for adjust().
Reviewed by:	emaste
Reported by:	GCC -Warray-parameter
Differential Revision:	https://reviews.freebsd.org/D36762
2022-09-28 14:06:16 -07:00
John Baldwin
157436dcbf mail: Fix mismatch in array bounds for isign().
Reviewed by:	imp, emaste
Reported by:	GCC -Warray-parameter
Differential Revision:	https://reviews.freebsd.org/D36761
2022-09-28 14:05:42 -07:00
Randall Stewart
08af8aac2a Tcp progress timeout
Rack has had the ability to timeout connections that just sit idle automatically. This
feature of course is off by default and requires the user set it on (though the socket option
has been missing in tcp_usrreq.c). Lets get the progress timeout fully supported in
the base stack as well as rack.

Reviewed by: tuexen
Sponsored by: Netflix Inc
Differential Revision: https://reviews.freebsd.org/D36716
2022-09-27 13:38:20 -04:00
Ed Maste
61957f3a6f clang: remove as(1) cross-reference from man page
PR:		265232
Reviewed by:	dim
MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
Differntial Revision:	https://reviews.freebsd.org/D36634
2022-09-25 15:21:25 -04:00
Alfonso S. Siciliano
84823cc708
contrib/bsddialog: Import version 0.4
Improvements and changes to integrate bsddialog(1) with scripts in BASE.
Overview:

 * New options. --and-widget, --keep-tite, --calendar.
 * Change output format. Menus and --print-maxsize.
 * Redefine sizing. Fixed rows, cols and menurows became at the most.
 * Add DIAGNOSTICS. Error messages for bad arguments and options.
 * Add keys. Space for --menu, fast keys for --msgbox and --yesno.
 * Text. Change default text modification, add --cr-wrap.

See /usr/src/contrib/bsddialog/CHANGELOG '2022-09-24 Version 0.4'
for more detailed information.

Merge commit '9f24fda5a8e7ab8243e71473c7e2dc98b4877e64'
2022-09-25 15:09:16 +02:00
Brooks Davis
bb23932803 ktrace: make ktr_tid a long not intptr_t (NFC)
Long ago, ktr_tid was ktr_buffer which pointed to the buffer following
the header and was used internally in the kernel.  Use was removed in
efbbbf570d and it was repurposed as ktr_kid in c6854c347f.  For
ABI reasons, it stayed an intptr_t rather than becoming an lwpid_t at
the time.  Since it doesn't hold a pointer any more (unless you have
a ktrace.out from 2005), change the type to long which is alwasy the
same size on all supported architectures.  Add a suggestion to change
the type to lwpid_t (__int32_t) on a future ABI break.

Remove most remaining references to ktr_buffer, retaing a comment in
kdump.c explaining why negative values are treated as 0.  While here,
accept that pid_t and lwpid_t are of type int and simplify casts in
printf.

This changed was motivated by CheriBSD where intptr_t is 16-bytes
in the pure-capability ABI.

Reviewed by:	kib, markj
Sponsored by:	DARPA, AFRL
Differential Revision:	https://reviews.freebsd.org/D36599
2022-09-17 09:21:59 +01:00
Konstantin Belousov
1d280f2142 procstat(1): print AT_USRSTACKBASE and AT_USRSTACKLIM
Reviewed by:	brooks, imp (previous version)
Discussed with:	markj
Sponsored by:	The FreeBSD Foundation
MFC after:	2 weeks
Differential revision:	https://reviews.freebsd.org/D36540
2022-09-16 23:23:38 +03:00
Gordon Bergling
8f98a937ed uname.1: Clarify the -r option
It is some times hard to understand the difference between
kernel version and userland version. So clarify the -r option
of uname(1) in terms of a printed kernel version.

While here, add some cross references:

- cross reference freebsd-version(1) in uname(1)
- cross reference freebsd-version(1) and uname(1) in freebsd-update(8)

PR:		265594
Reported by:	rwatson
Reviewed by:	gbe, imp
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D36516
2022-09-16 13:27:54 +02:00
Kirk McKusick
927f8d8bbb Handle NULL return from localtime(3) in ls(1) and find(1)
The ls(1) (with -l option) and find(1) (with -ls option) utilties
segment fault when operating on files with very large modification
times. A recent disk corruption set a spurious bit in the mtime
field of one of my files to 0x8000000630b0167 (576460753965089127)
which is in year 18,266,940,962. I discovered the problem when
running fsck_ffs(8) which uses ctime(3) to convert it to a readable
format. Ctime cannot fit the year into its four character field, so
returns ??? ??? ?? ??:??:?? ???? (typically Thu Nov 24 18:22:48 2021).

With the filesystem mounted, I used `ls -l' to see how it would
report the modification time and it segment faulted. The find(1)
program also segment faulted (see script below). Both these utilities
call the localtime(3) function to decode the modification time.
Localtime(3) returns a pointer to a struct tm (which breaks things
out into its component pieces: year, month, day, hour, minute,
second). The ls(1) and find(1) utilities then print out the date
based on the appropriate fields in the returned tm structure.

Although not documented in the localtime(3) manual page, localtime(3)
returns a NULL pointer if the passed in time translates to a year
that will not fit in an "int" (which if "int" is 32-bits cannot
hold the year 18,266,940,962). Since ls(1) and find(1) do not check
for a NULL struct tm * return from localtime(3), they segment fault
when they try to dereference it.

When localtime(3) returns NULL, the attached patches produce a date
string of "bad date val". This string is chosen because it has the
same number of characters (12) and white spaces (2) as the usual
date string, for example "Sep 3 22:06" or "May 15 2017".

The most recent ANSI standard for localtime(3) does say that localtime(3)
can return NULL (see https://pubs.opengroup.org/onlinepubs/9699919799/
and enter localtime in the search box). Our localtime(3) man page should
be updated to indicate that NULL is a possible return. More importantly,
there are over 100 uses of localtime(3) in the FreeBSD source tree (see
Differential Revision D36474 for the list). Most do not check for a NULL
return from localtime(3).

Reported by:  Peter Holm
Reviewed by:  kib, Chuck Silvers, Warner Losh
MFC after:    2 weeks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D36474
2022-09-09 14:30:42 -07:00
Mark Johnston
e599810ded tail: Initialize the stat buffer used when input is stdin
PR:		266284
Reported by:	Jenkins via delphij
Fixes:		7e11889959 ("tail: Fix -f with stdin")
MFC after:	3 days
2022-09-08 16:21:39 -04:00
Xin LI
95270f73ba MFV: less v608
Relnotes:	yes
MFC after:	2 weeks
2022-09-05 22:52:39 -07:00
Alfonso S. Siciliano
ad052eb076
bsddialog(1): Fix Makefile typo
Fix build fault caused by a typo in the Makefile.
2022-09-03 17:46:26 +02:00
Alfonso S. Siciliano
b319d93437
contrib/bsddialog: Import version 0.3
New features overview:
 * Unicode. User interface handles multi-column characters. API can
   handle char* like a multibyte character string. Internally wide
   characters are used for keyboard input, to adapt word wrapping and
   dynamic text auto-sizing for multi-column characters.
 * Forms refactoring. Complete rewrite deleting libformw dependency.
 * Theme. New utility options to save and load custom theme at run-time.
 * TUI navigation. Added keys to navigate input components. Changed
   default focus behavior of input dialogs to be LGPL-dialog-like; a new
   option can set the previous whiptail-like behavior.

See /usr/src/contrib/bsddialog/CHANGELOG '2022-08-29 Version 0.3'
for more detailed information.

Merge commit '2c9fd7655ba54e7239f528e1af9fe09662de9b03'
2022-09-03 16:41:44 +02:00
Gordon Bergling
fa4eca789e tip(1): Fix a typo in a source code comment
- s/overriden/overridden/

MFC after:	3 days
2022-09-03 14:59:03 +02:00
Gleb Smirnoff
1f3d8c09be procstat: fix printing divert(4) sockets 2022-08-30 16:26:21 -07:00
Gleb Smirnoff
2b1c72171e divert(4): provide statistics
Instead of incrementing pretty random counters in the IP statistics,
create divert socket statistics structure.  Export via netstat(1).

Differential revision:	https://reviews.freebsd.org/D36381
2022-08-30 15:09:21 -07:00
Gleb Smirnoff
8624f4347e divert: declare PF_DIVERT domain and stop abusing PF_INET
The divert(4) is not a protocol of IPv4.  It is a socket to
intercept packets from ipfw(4) to userland and re-inject them
back.  It can divert and re-inject IPv4 and IPv6 packets today,
but potentially it is not limited to these two protocols.  The
IPPROTO_DIVERT does not belong to known IP protocols, it
doesn't even fit into u_char.  I guess, the implementation of
divert(4) was done the way it is done basically because it was
easier to do it this way, back when protocols for sockets were
intertwined with IP protocols and domains were statically
compiled in.

Moving divert(4) out of inetsw accomplished two important things:

1) IPDIVERT is getting much closer to be not dependent on INET.
   This will be finalized in following changes.
2) Now divert socket no longer aliases with raw IPv4 socket.
   Domain/proto selection code won't need a hack for SOCK_RAW and
   multiple entries in inetsw implementing different flavors of
   raw socket can merge into one without requirement of raw IPv4
   being the last member of dom_protosw.

Differential revision:	https://reviews.freebsd.org/D36379
2022-08-30 15:09:21 -07:00
Dag-Erling Smørgrav
7ccdad905f renice: add unit tests.
Sponsored by:	Klara, Inc.
2022-08-25 20:06:20 +00:00
Dag-Erling Smørgrav
65ee0a8495 renice: fix argument order.
The target modifiers (-g, -p, -u) may occur in any position except
between -n and its argument; furthermore, we support both the old
absolute form (without -n) and the modern relative form (with -n).

Sponsored by: Klara, Inc.
2022-08-25 19:50:55 +00:00
Baptiste Daroussin
83e8c23178 bintrans: replace the quoted printable encoder/decoder
Replace the quoted printable code with one that respects RFC2045
Add tests about this parsers and encoders, using examples from the
wikipedia page.

Reviewed by:	pstef
Differential Revision: https://reviews.freebsd.org/D36314
2022-08-25 09:29:18 +02:00
Jens Schweikhardt
f7473c7e77 Indicate which port gpg.1 comes from. 2022-08-17 19:23:57 +02:00
Jens Schweikhardt
3c405c7e83 Indicate which port gdb.1 and kgdb.1 come from. 2022-08-17 19:13:22 +02:00
Emmanuel Vadot
0c6b2a9179 pkgbase: Put accounting utilities in the acct package 2022-08-16 21:15:19 +02:00
Jens Schweikhardt
e1ae2a285a Indicate the port where the referenced man pages come from. 2022-08-16 20:57:30 +02:00
Jens Schweikhardt
20f68c5f2d Indicate that xrefs to *roff,tbl,eqn et al are found in ports/textproc/groff. 2022-08-15 22:15:18 +02:00
Jens Schweikhardt
825225e52f For man page references found in ports, indicate the respective port. 2022-08-14 15:02:06 +02:00
Xin LI
278d080bad Remove minigzip from the base system.
The minigzip(1) was initially introduced as a minimal replacement
of GNU gzip(1). We have replaced the GNU gzip(1) with the zlib
based, GPL-free implementation, and minigzip(1) is not being used
anywhere in the base system, so just remove it.

Relnotes:	yes
Reviewed by:	emaste
Differential Revision: https://reviews.freebsd.org/D35979
2022-08-13 21:11:50 -07:00
Kyle Evans
ea0f37dec6 iconv: only conditionally use ICONV_SET_DISCARD_ILSEQ
If the -c flag is used, then we can set it with ICONV_SET_DISCARD_ILSEQ;
otherwise, leave it alone.  The user may have specified //IGNORE in the
'to' codeset specification, there's no reason we can't allow that but
we'll currently turn it off.

Reviewed by:	thj
Sponsored by: Klara, Inc.
Differential Revision:	https://reviews.freebsd.org/D34342
2022-08-11 11:33:28 -05:00
Dag-Erling Smørgrav
441202c00b apply: clean up error handling.
Sponsored by:	Klara, Inc.
2022-08-08 19:06:35 +00:00
Dag-Erling Smørgrav
e24c5c60d7 renice: support -- as per POSIX.
Sponsored by:	Klara, Inc.
MFC after:	1 week
2022-08-05 01:52:02 +02:00
Dag-Erling Smørgrav
f44e257712 xinstall: alphabetize: upper case precedes lower.
Sponsored by:	Klara, Inc.
2022-08-04 02:10:16 +02:00
Dag-Erling Smørgrav
54d8d0fe12 xinstall: use dynamic bufsize as in cat(1) / cp(1).
Sponsored by:	Klara, Inc.
2022-08-03 23:01:13 +02:00
Dag-Erling Smørgrav
c7a8e8d372 xinstall: make md5 and ripemd160 conditional
Sponsored by:	Klara, Inc.
2022-08-03 21:24:07 +02:00
Dag-Erling Smørgrav
36d67475f5 xinstall: fix dounpriv logic, add tests
Sponsored by:	Klara, Inc.
MFC after:	1 week
2022-08-03 21:03:49 +02:00
Tom Jones
190c4c2499 diff3: Use ranges for new and old diffedits in ed scripts
This should make the output logic easier to read. No functional change
intended.

Sponsored by:	Klara, Inc.
2022-08-02 14:38:11 +01:00
Tom Jones
c0e6ccb12a diff3: Use ranges for the old and new diffedits in A scripts
This makes the output logic easier to read. No functional change
intended.

Sponsored by:	Klara, Inc.
2022-08-02 14:37:05 +01:00
Tom Jones
264a559ac8 diff3: Simplify startmark calculation in Ascript
Remove redundant calculation for startmark.

Sponsored by:	Klara, Inc.
2022-08-02 14:36:05 +01:00
Gordon Bergling
93b8510c36 find.1: Correct the markup
- ASCII is an acronym and there is no ascii(8) manual page
- Reference ascii(7) in the SEE ALSO section

Reported by:	karels
X-MFC with:	321dc6ee7e
2022-08-02 08:33:20 +02:00
Tom Jones
2c4276aaa2 diff3: Use variables for old and new in A scripts
This makes the code easier to follow, no functional changes intended

Sponsored by:	Klara, Inc.
2022-08-01 14:54:20 +01:00
Tom Jones
ca53a8445a diff3: Replace literal marker with variable
Sponsored by:	Klara, Inc.
2022-08-01 14:53:53 +01:00
Tom Jones
85d92faf43 diff3: Fix indentation
Sponsored by:	Klara, Inc.
2022-08-01 14:14:25 +01:00
Xin LI
0404b8c88f Deprecate minigzip(1) in preparation of removing it from base system.
Reviewed by:	emaste, pauamma
MFC after:	2 weeks
Differential Revision: https://reviews.freebsd.org/D36000
2022-07-31 15:16:22 -07:00
Gordon Bergling
321dc6ee7e find.1: Fix mandoc warnings and mention a useful manpage
- new sentence, new line
- unknown AT&T UNIX version: At v7
- no blank before trailing delimiter
- reference the ASCII(8) manual page

MFC after:	5 days
2022-07-31 16:38:10 +02:00
Stefan Eßer
dc9e68ad01 calendar: clarify comment syntax in man page
The single line comment indicator '//' is only detected at the
beginning of a line or when following white space to allow URLs
in calendar entries.

MFC after:	3 days
2022-07-31 07:37:05 +02:00
Doug Rabson
0c19c4db74 Move sort to runtime
Allows pkg bootstrap without having to install FreeBSD-utilities
2022-07-29 11:27:25 +01:00
Warner Losh
6feb6b4ffc ncal: LT is the country code for Lithuania
PR: 265479
MFC After: 3 days
2022-07-28 11:35:50 -06:00
Simon J. Gerraty
532d4fbfa0 Update to bmake-20220726
Merge commit '31a96ca5f0b6e5f8f7fa8cecf3a5c4354b3b096f'
2022-07-27 09:00:30 -07:00
Simon J. Gerraty
08604a023d Auto-create bmake/unit-tests objdir if appropriate
Given the way bmake/unit-tests is visited, when doing 'test'
MK_AUTO_OBJ=yes will not be effective.
So create the objdir before running the sub-make.

Also ensure MAKEOBJDIR is passed to opt-m-include-dir

Reviewed by: deo
2022-07-26 13:24:34 -07:00
Simon J. Gerraty
58cd36950c Finish update to bmake-20220724 2022-07-26 11:06:27 -07:00
Warner Losh
8a02ea1dbc nl: Correct history
nl actually first was available with System III, not System Vr2. Updated
based on discussion on TUHS mailing list (archive recently moved so this
message isn't get available in the archive).

Suggested by: segalogo (Matt G)
2022-07-24 15:01:52 -06:00