Commit graph

14946 commits

Author SHA1 Message Date
Konstantin Belousov
29887e602b truss(1): detach more carefully
(cherry picked from commit 12f747e6ff)
2022-01-19 02:46:08 +02:00
Konstantin Belousov
7545bb2ba7 truss: remove write-only variable
(cherry picked from commit ba33c28848)
2022-01-19 02:46:08 +02:00
Kirk McKusick
18870c75bf systat -vm: Humanize output for ease of reading.
Using 8 width is too wide for large numbers like 1379991K;
1330M is easier to read.

Submitted by: ota_j.email.ne.jp
Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D33495

(cherry picked from commit a115a4aa51)
2022-01-18 15:09:19 -08:00
Konstantin Belousov
6c12b39228 script(1): work around slow reading child
PR:	260938

(cherry picked from commit c0ba4c2ee2)
2022-01-15 14:55:32 +02:00
Stefan Eßer
379bfb2aa9 sys/bitset.h: reduce visibility of BIT_* macros
(cherry picked from commit 5e04571cf3)
2022-01-14 18:17:30 +02:00
Gleb Smirnoff
1e2a0cef6b tcptw: count how many times a tcptw was actually useful
This will allow a sysadmin to lower net.inet.tcp.msl and
see how long tcptw are actually useful.

(cherry picked from commit 71d2d5adfe)
2022-01-13 13:19:40 -08:00
Emmanuel Vadot
ac36d4f03a pkgbase: Create a FreeBSD-fetch package
It's useful for small image to fetch some data but we don't want to
install utilities nor bloat runtime.

MFC after:	2 weeks
Sponsored by:	Beckhoff Automation GmbH & Co. KG
Differential Revision:	https://reviews.freebsd.org/D33463

(cherry picked from commit 13ef8134ef)
2022-01-05 18:23:53 +01:00
Emmanuel Vadot
b2d245a0b0 pkgbase: Put more binaries/lib in runtime
Move some needed binaries/libs from FreeBSD-utilities to FreeBSD_runtime.
This is everything needed to boot to multiuser with FreeBSD-rc installed.

MFC after:	2 weeks
Sponsored by:	Beckhoff Automation GmbH & Co. KG
Differential Revision:	https://reviews.freebsd.org/D33435

(cherry picked from commit 93c4369096)
2022-01-05 18:23:51 +01:00
Emmanuel Vadot
26c7445164 pkgbase: Put yellow pages programs to its own package
YP is less and less used, split them to users have the choice to not
install them.

MFC after:	2 weeks
Sponsored by:	Beckhoff Automation GmbH & Co. KG
Differential Revision:	https://reviews.freebsd.org/D33441

(cherry picked from commit 5abb10faa1)
2022-01-05 18:23:51 +01:00
Emmanuel Vadot
880b9a8af6 pkgbase: Create a FreeBSD-ftp package
ftp tools aren't that useful nowadays but some might want them.
Create a FreeBSD-ftp package so users have a choice to have
them or not.

Differential Revision:	https://reviews.freebsd.org/D31794

(cherry picked from commit b5be5c35db)
2022-01-05 18:23:51 +01:00
Emmanuel Vadot
f5ab36c2e1 pkgbase: Create a FreeBSD-kerberos package
This allows users to install or not kerberos related utilities
and libs.

Differential Revision:	https://reviews.freebsd.org/D31801

(cherry picked from commit a30235a4c3)
2022-01-05 18:23:50 +01:00
Emmanuel Vadot
8d7e0c5a45 pkgbase: Create a FreeBSD-rdma package
Put all the rdma related tools into this package.

Differential Revision:	 https://reviews.freebsd.org/D31799

(cherry picked from commit cab6a39d7b)
2022-01-05 18:23:50 +01:00
Emmanuel Vadot
872aa9c8a6 pkgbase: Create a FreeBSD-telnet package
both telnet and telnetd aren't that useful nowadays but some
might want them.
Create a FreeBSD-telnet package so users have a choice to have
them or not.

Differential Revision:	https://reviews.freebsd.org/D31791
Reviewed by: emaste

(cherry picked from commit c7fd29f0f2)
2022-01-05 18:23:49 +01:00
Ed Maste
2076973231 ar: deprecate -T option
Other ar implementations (GNU, LLVM) use -T to mean thin archive
rather than use only the first fifteen characters of the archive member
name.  We support both -T and -f for this, with -f documented as an
alias of -T.

An exp-run showed that the ports invoking `ar -T` expect thin archives,
not truncated names.  Switch -f to be the documented flag for this
behaviour, and emit a warning when -T is used.

The warning will be changed to an error in the future (in main), once
ports no longer use -T.

PR:		260523 [exp-run]
MFC after:	1 week
Sponsored by:	The FreeBSD Foundation

(cherry picked from commit edadbb4606)
2022-01-04 20:53:27 -05:00
Ed Maste
b498248f7a lorder: add note that it is no longer required
Use of lorder(1) is not required by contemporary linkers.

The GNU coreutils manual[1] has a good description of the use of lorder
and tsort:

    This whole procedure has been obsolete since about 1980, because
    Unix archives now contain a symbol table (traditionally built by
    ranlib, now generally built by ar itself), and the Unix linker uses
    the symbol table to effectively make multiple passes over an archive
    file.

See 0e1e341b48 for some more details.

[1] https://www.gnu.org/software/coreutils/manual/html_node/tsort-background.html

PR:		259254 [exp-run]
MFC after:	2 weeks
Sponsored by:	The FreeBSD Foundation

(cherry picked from commit 3e01ee76f2)
2022-01-02 20:17:00 -05:00
Konstantin Belousov
d00ebd9b9c Pass vdso address to userspace
(cherry picked from commit 01c77a436e)
2022-01-02 18:43:01 +02:00
Bryan Drewery
5815ac31d9 Fix 'make bmake' top-level bootstrapping.
Fixes:	ee10666327
(cherry picked from commit eb8bf6bb42)
2021-12-21 14:44:51 +01:00
Simon J. Gerraty
886e5802c4 bsd.links.mk wants full paths
The values in LINKS need to be full paths.

(cherry picked from commit 85d6747a69)
2021-12-21 14:44:49 +01:00
Simon J. Gerraty
fffeae4102 Links for bmake and bmake.1
Some folk forget that make is bmake, and want the links...

MFC after: 1 week

(cherry picked from commit ee10666327)
2021-12-21 14:44:48 +01:00
Marcin Wojtas
7572ddd167 usr.bin/elfctl: Allow for cross-endian operations.
Detect if host endian is different than target endian and swap
byte order of ELF note fields instead of failing.

Submitted by: Dawid Gorecki <dgr@semihalf.com>
Reviewed by: imp
Obtained from: Semihalf
Sponsored by: Stormshield
Differential Revision: https://reviews.freebsd.org/D29550

(cherry picked from commit 4a27bf128b)
2021-12-12 13:59:30 -05:00
Mike Karels
c7444d9cb3 systat: clean up code assuming network classes
Similar to netstat, clean up code that uses inet_lnaof() to check for
binding to "host 0" (lowest host on network) as a "network" bind.
Such things don't happen, and current networks are seldom if ever
found in /etc/networks.

(cherry picked from commit a2e7dfca86)
2021-12-10 10:27:44 -06:00
Mike Karels
5abf4c8aa7 sockstat: change check for wildcard sockets to avoid historical classes
sockstat was checking whether a bound address was "host 0", the lowest
host on a network, using inet_lnaof().  This only works for class A/B/C.
However, it isn't useful to bind such an address unless it is really
the unspecified address INADDR_ANY.  Change the check to to use that.

(cherry picked from commit 64acb29b7d)
2021-12-10 10:27:24 -06:00
Mike Karels
2cd55edbb2 netstat: reduce use of historical Internet classes
When attempting to characterize bound addresses, netstat was checking
for host 0 on a (historical) net using inet_lnaof().  Such addresses
are not normally bound, as they would not work, with the exception
of the unspecified address, INADDR_ANY.  Check for that explicitly.
Similarly, don't check bound addresses for a match to a network name.

(cherry picked from commit bd27c71c45)
2021-12-10 10:27:02 -06:00
Dimitry Andric
7224d4125a Merge llvm-project 13.0.0 release
This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvmorg-13.0.0-0-gd7b669b3a303, aka 13.0.0 release.

PR:		258209

(cherry picked from commit 28a41182c0)
2021-12-06 17:30:07 +01:00
Alex Richardson
47bd07c981 Fix a syntax error in 1b85b68da0
Reported by:	Michael Butler, jenkins

(cherry picked from commit 367ec75323)
2021-12-06 17:30:06 +01:00
Cameron Katri
e52de8a915 llvm-readobj: Attach to buildsystem
Also install it as readelf when MK_LLVM_BINUTILS is set.

Reviewed By:	dim, arichardson
Differential Revision: https://reviews.freebsd.org/D32058

(cherry picked from commit 1b85b68da0)
2021-12-06 17:30:05 +01:00
Dimitry Andric
5f7ddb1456 Merge llvm-project main llvmorg-13-init-16847-g88e66fa60ae5
This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvmorg-13-init-16847-g88e66fa60ae5, the last commit before
the upstream release/13.x branch was created.

PR:		258209

(cherry picked from commit fe6060f10f)
2021-12-06 17:30:02 +01:00
Alex Richardson
5814e2ba97 Don't build and install {llvm,clang,lldb}-tblgen for the target
The tablegen binaries are only needed to build software that uses
LLVM's infrastructure for command line options,
disassembler tables, etc. They are not user-facing binaries and
should therefore not be installed by default.

Reviewed By:	emaste
Differential Revision: https://reviews.freebsd.org/D31058

(cherry picked from commit 8e1c989abb)
2021-12-05 21:56:22 +01:00
Alex Richardson
a5186406ac Add WITH_LLVM_BINUTILS to install LLVM binutils instead of Elftoolchain
When WITH_LLVM_BINUTILS is set, we will install the LLVM binutils as
ar/ranlib/nm/objcopy/etc. instead of the elftoolchain ones.
Having the LLVM binutils instead of the elftoolchain ones allows us to use
features such as LTO that depend on binutils that understand LLVM IR.
Another benefit will be an improved user-experience when compiling with
AddressSanitizer, since ASAN does not symbolize backtraces correctly if
addr2line is elftoolchain addr2line instead of llvm-symbolizer.
See https://lists.freebsd.org/archives/freebsd-toolchain/2021-July/000062.html
for more details.

This is currently off by default but will be turned on by default at some
point in the near future.

Reviewed By:	emaste

Differential Revision: https://reviews.freebsd.org/D31060

(cherry picked from commit 021385aba5)
2021-12-05 21:42:14 +01:00
Gordon Bergling
fcece3a9f5 elf(3): Fix a typo in a sysctl description
- s/segement/segment/

(cherry picked from commit c8ca80e223)
2021-12-03 16:52:02 +01:00
Rick Macklem
b61ed46880 nfsstat: Add output for counts of new RPCs to the "-E" option
Add output to the "-E" option for new RPCs related
to NFSv4.1/4.2. Also, add output of the counts for
allocated layouts and the title for the "Client"
section (which was lost during a previous commit).

(cherry picked from commit 75c666197c)
2021-11-28 15:58:03 -08:00
Ed Maste
2104a80649 mkimg: zero entry in vhdx_write_metadata
Otherwise _reserved might contain uninitialized data.

MFC after:	1 week
Sponsored by:	The FreeBSD Foundation

(cherry picked from commit 036af1053a)
2021-11-27 19:29:30 -05:00
Mateusz Piotrowski
51f4d6a6bc top.1: Use the Dq macros instead of \*lq and \*rq
MFC after:	3 days

(cherry picked from commit 01e3140571)
2021-11-24 17:10:31 +01:00
Mateusz Piotrowski
745ffe0ee8 top.1: Improve description of -m
Describe -m argument as "mode" instead of "display".

MFC after:	3 days

(cherry picked from commit c947fc5fae)
2021-11-24 17:10:04 +01:00
Mateusz Piotrowski
5f3b6ce64f top.1: Fix a typo in description of H interactive command
B is listed as an interactive command to toggle the display of threads.
This is a typo introduced during the conversion of the manual page to
mdoc.

Fixes:		9d6cce02a7
MFC after:	3 days

(cherry picked from commit b8135ed67c)
2021-11-24 17:09:31 +01:00
Mateusz Piotrowski
cd66a1b1c8 top.1: Sort options alphabetically
While here, add a short sentence introducing the options.

MFC after:	3 days

(cherry picked from commit 1125390415)
2021-11-24 17:07:02 +01:00
Mateusz Piotrowski
615b3385c9 top: Sort flags in usage message
While here, fix the indentation of the second line in the message.

MFC after:	3 days

(cherry picked from commit 82d0f865ee)
2021-11-24 17:03:37 +01:00
Konstantin Belousov
e8b954f136 ldd: also use exec mode for -a
PR:	259069

(cherry picked from commit 7d20a08076)
2021-11-19 06:25:28 +02:00
Konstantin Belousov
e631f3e04e procstat auxv: print out FXRNG
(cherry picked from commit 0864ab3d32)
2021-11-19 06:25:27 +02:00
Felix Johnson
de5334c8c9 sockstat(1): Update Synopsis section
Update sockstat(1) manpage so the Synopsis section includes q (silent
mode) and the -j argument name is consistent.

PR:		256795
Reported by:	Nick Reilly <nreilly@blackberry.com>

(cherry picked from commit 5504d83942)
2021-11-13 01:14:51 -05:00
Hans Petter Selasky
af21e0057a beep(1): Initial version of utility to create terminal beep via soundcard.
Reviewed by:	imp@, emaste@ and pstef@
Differential Revision:	https://reviews.freebsd.org/D32672
Sponsored by:	NVIDIA Networking

(cherry picked from commit 8abfbe5a79)
2021-11-12 15:33:10 +01:00
Felix Johnson
c702a2897e find(1): Update date format reference and remove cvs(1) references
cvs(1) is not installed by default. Change the date format reference to
note that find(1) understands ISO8601 and RFC822 date formats. Also
remove references to cvs(1).

PR:		254894
Reported by:	danielsh@apache.org

(cherry picked from commit 52dbe1a0f4)
2021-11-10 19:34:15 -05:00
Andriy Gapon
df838c5406 fuser: restore functionality by fixing fsid type
Use types from sys/stat.h for the filesystem and inode numbers for extra
safety.

PR:		259504
Reported by:	Markus Wild <freebsd-bugs@virtualtec.ch>
MFC after:	1 week

(cherry picked from commit e18fbe6f19)
2021-11-08 07:55:30 +02:00
Mateusz Piotrowski
e41e2d5866 dpv: Fix synopsis formatting & sort options
MFC after:	3 days

(cherry picked from commit a85aa7f9d3)
2021-11-07 18:50:23 +01:00
Mateusz Piotrowski
69a40537eb dpv.1: Do not use mdoc macros for Bl width
Macros do not expand there.

MFC after:	3 days

(cherry picked from commit 3693250e8a)
2021-11-07 18:50:13 +01:00
Mateusz Piotrowski
01144e8cef dpv.1: Fix an example
dpv(1) requires a label to be specified.

MFC after:	3 days

(cherry picked from commit f7c7a6ac00)
2021-11-07 18:49:10 +01:00
Mark Johnston
946a297fbd sort: Fix random sort
bwsrawdata() is supposed to return the string buffer.

PR:		259451
Reported by:	sigsys@gmail.com
Fixes:		d053fb22f6 ("usr.bin/sort: Avoid UBSan errors")
Sponsored by:	The FreeBSD Foundation

(cherry picked from commit e9bfb50d5e)
2021-11-01 09:10:54 -04:00
Michael Reifenberger
59821002f7 systat: Handle SIGWINCH to properly window resizing and adjust -swap disk stat based on new size.
(cherry picked from commit 6648383803)
2021-11-01 03:26:53 +02:00
Konstantin Belousov
f33a9999e2 Augment systat(1) -swap to display large swap space processes
(cherry picked from commit 57e5da2c98)
2021-11-01 02:44:51 +02:00
Konstantin Belousov
7a3d7b9efc ldd: do not use dlopen(RTLD_TRACE) for dso when format is specified
PR:	259069

(cherry picked from commit 2c7a6dad4d)
2021-10-28 03:35:54 +03:00