Commit Graph

15187 Commits

Author SHA1 Message Date
Ed Maste
f0cf9b602d elfctl: error if -e is specified multiple times
Reported by:	jrm
MFC after:	3 days
Sponsored by:	The FreeBSD Foundation
2022-02-14 22:08:47 -05:00
Wolfram Schneider
047eec4966 improve c style
- BSD KNF: return is a native statement and we use
  a space before the parenthesis
- remove superfluous empty lines

Reported by:    jrtc27
2022-02-14 19:30:09 +00:00
Wolfram Schneider
a9a43945d3 grammar
Reported by:	jrtc27
2022-02-14 18:16:43 +00:00
Wolfram Schneider
93885bb041 Better help message if locate database does not exists
PR:		211501
Reported by:	Oliver Peter
Reviewed by:	Pau Amma
Differential Revision:	https://reviews.freebsd.org/D34243
2022-02-13 17:00:22 +00:00
Wolfram Schneider
98839c40c7 better unique file names
Our mktemp(1) implementation uses 8-X for a temp file by default.
That's ok, but we should increase the value from 8 to 10 as
many other OS already did.

PR:		261438
2022-02-12 11:35:51 +00:00
Kyle Evans
4bcc7a5f6b lsvfs: one last style nit missed in 946585179d
Space after `for`.

Sponsored by:	Klara, Inc.
2022-02-10 16:14:17 -06:00
Kyle Evans
946585179d lsvfs: restyle, no functional change
Namely:
- main was using two-space indentation
- re-sort local variables
- explicit braces for loop scope
- make flag bit comparison explicit

The first line of this commit message is unfortunately a lie, as it
introduces a minor functional change on non-FreeBSD systems.  Namely,
the first branch is now explicitly compared against `0` and the choice
was made to compare it as greater than 0 to avoid issues on other
systems where `argc != 0` on entry isn't guaranteed (negative when
checked there).

Sponsored by:	Klara, Inc.
2022-02-10 11:34:52 -06:00
Richard Scheffenegger
3f169c54ab tcp: Add/update AccECN related statistics and numbers
Reserve couters in the tcps struct in preparation
for AccECN, extend the debugging output for TF2
flags, optimize the syncache flags from individual
bits to a codepoint for the specifc ECN handshake.

This is in preparation of AccECN.

No functional chance except for extended debug
output capabilities.

Reviewed By: #transport, rrs
Sponsored by:        NetApp, Inc.
Differential Revision: https://reviews.freebsd.org/D34161
2022-02-10 00:21:31 +01:00
Martin Matuska
833a452e9f libarchive: import changes from upstream
Libarchive 3.6.0

New features:
PR #1614: tar: new option "--no-read-sparse"
PR #1503: RAR reader: filter support
PR #1585: RAR5 reader: self-extracting archive support

New features (not used in FreeBSD base):
PR #1567: tar: threads support for zstd (#1567)
PR #1518: ZIP reader: zstd decompression support

Security Fixes:
PR #1491, #1492, #1493, CVE-2021-36976:
   fix invalid memory access and out of bounds read in RAR5 reader
PR #1566, #1618, CVE-2021-31566:
   extended fix for following symlinks when processing the fixup list

Other notable bugfixes and improvements:
PR #1620: tar: respect "--ignore-zeros" in c, r and u modes
PR #1625: reduced size of application binaries

MFC after:	2 weeks
Relnotes:	yes
2022-02-10 00:35:42 +01:00
Simon J. Gerraty
a6f0e10b24 Merge bmake-20220208
* unit-tests/Makefile: disable opt-debug-x-trace on Linux if there
        is any chance we have dash as .SHELL

        * meta.c: use a variable to hold command line to be filtered
        to avoid any side effects from content of command line.

Merge commit '535c59a6a9214436f5d6643775d29808e4b3408d'
2022-02-09 09:31:30 -08:00
Warner Losh
5e8e302087 systat: Eliminate write-only unit variable
Sponsored by:		Netflix
2022-02-07 14:51:45 -07:00
Warner Losh
d167318506 systat/iostat: Use bools for numbers and kbpt
These are really bools, declare them as such.

Sponsored by:		Netflix
2022-02-07 14:51:45 -07:00
Gordon Bergling
ecc467ebad ipsec(4): Fix a few typos in error messages
- s/receieve/receive/

MFC after:	1 week
2022-02-06 13:43:42 +01:00
Simon J. Gerraty
6598559fdf Update to bmake-20220204 2022-02-05 12:29:10 -08:00
Wolfram Schneider
610b97ebaa update external URL 2022-02-05 09:13:07 +00:00
Wolfram Schneider
153dd4ba03 fix URL typo 2022-02-05 09:08:45 +00:00
Wolfram Schneider
1c7a40d268 update external URL 2022-02-05 09:00:35 +00:00
Wolfram Schneider
c126924c8c update external URL 2022-02-05 08:58:30 +00:00
Wolfram Schneider
a6c20ddd4a switch from short to int for lookup table
This simplifies the code, less casting is needed.
2022-02-05 08:44:35 +00:00
Ed Maste
dbc7364b18 elfctl: update man page example for 'no' prefix
Reported by:	Mark Millard on freebsd-current@
Fixes:		c763f99d11 ("elfctl: prefix disable flags with "no"")
MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
2022-02-04 21:05:10 -05:00
Stefan Eßer
c454c57163 whereis: fix fetching of user.cs_path sysctl variable
The current implementation of sysctlbyname() does not support the user
sub-tree. This function exits with a return value of 0, but sets the
passed string buffer to an empty string.

As a result, the whereis program did not use the value of the sysctl
variable "user.cs_path", but only the value of the environment
variable "PATH".

This update makes whereis use the sysctl function with a fixed OID,
which already supports the user sub-tree.

MFC after:	3 days
2022-02-04 23:44:34 +01:00
Wolfram Schneider
d43255b50c remove dead code
A lookup array is faster than a function with linear search.
The old function was not used for years - spring cleaning.
2022-02-03 17:02:37 +00:00
Wolfram Schneider
39a30a8097 better printf(3) format usage
Reported by: jhb
2022-02-03 16:57:25 +00:00
Michael Tuexen
6ad26abca5 sockstat: fix usage string
MFC after:	1 week
Sponsored by:	Netflix, Inc.
2022-02-01 15:44:57 +01:00
Michael Tuexen
5f64777a4f sockstat: add -i to display inp_gencnt
The inp_gencnt will be used to identify a TCP endpoint by an upcoming
command line tool to set TCP socket options.

Reviewed by:		rscheff
MFC after: 		1 week
Sponsored by:		Netflix, Inc.
Differential Revision:	https://reviews.freebsd.org/D34137
2022-02-01 15:37:03 +01:00
Wolfram Schneider
792df7ced2 improve casting for pointer diffs 2022-02-01 17:26:20 +00:00
Wolfram Schneider
1536d37b20 fix casting issue in error message for 32bit CPUs (e.g. armv7) 2022-01-31 18:30:07 +00:00
Wolfram Schneider
d7e8005bfa cleanup documentation 2022-01-31 18:11:14 +00:00
Wolfram Schneider
00ad40d70a throw an error if reading from stdin failed 2022-01-31 18:04:45 +00:00
Wolfram Schneider
834a8fa169 enable to configure the locate path length at compile time
The length has not changed and is 1024 chars (equals PATH_MAX).

PR: 201243
Submitted by: Willem Jan Withagen <wjw@digiware.nl>
2022-01-31 17:32:46 +00:00
Wolfram Schneider
8d35ca86c5 Fix statistics for empty databases
An empty database is a database which does not contain any filenames.
It should not occur in practice but maybe in the case of an error.

echo | /usr/libexec/locate.mklocatedb > empty.db; locate -d empty.db -S
2022-01-31 17:03:08 +00:00
Wolfram Schneider
69ae5b9667 remove register
There are no measurable performance differences if registers are used or not.
2022-01-31 10:59:07 +00:00
Wolfram Schneider
33ee87fa0a improve error handling for corrupt database 2022-01-30 18:04:52 +00:00
Wolfram Schneider
5260fbcebd fix check for integer
For historical reasons, the integer is stored with an offset of plus 14.
That means, for a given max path length of 1024 the valid values
are -1009 .. 1037 and not -1023 .. 1023

PR: 201243
2022-01-30 16:27:27 +00:00
Wolfram Schneider
e7d6783f4a enable to set locate command 2022-01-30 16:24:49 +00:00
Wolfram Schneider
8e7c0a6d32 fix fgets error handling (from last commit) 2022-01-30 13:08:42 +00:00
Wolfram Schneider
72a0982cd5 improve error handling 2022-01-30 09:27:21 +00:00
Mateusz Piotrowski
1578c22e92 apply.1: Use Ar for arguments 2022-01-29 13:12:31 +01:00
Peter Jeremy
c9d1fa7003
systat: Display seconds in vmstat mode
Providing a timestamp with seconds granularity helps make it obvious
that the display is updating.

Reviewed by:    mckusick
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D29181
2022-01-29 20:41:19 +11:00
Wolfram Schneider
9146546eae locate statistics: show number of longest path in database 2022-01-29 07:13:28 +00:00
Wolfram Schneider
21cc4bee69 sync improvements from concatdb.sh
- stop on first error
- improve awk script: print the last two characters for bigram -  not the second word
- remove unnecessary checks
- use mktemp
- refactor
2022-01-29 07:12:09 +00:00
Mark Johnston
8d8b9b560a sort: Fix message catalogue usage
- Check that catopen() succeeded before calling catclose().  musl will
  crash in the latter if the catalogue descriptor is -1.
- Keep the message catalogue open for most of sort(1)'s actual
  operation.
- Don't use catgets(3) to print error messages if catopen(3) had failed.

Reviewed by:	arichardson, emaste
MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D34081
2022-01-28 16:52:29 -05:00
Mark Johnston
41e6398f9b ar: Avoid overwriting the stdout file stream pointer
This doesn't work with musl, which defines stdout as FILE * const.
Instead, explicitly pass the desired output stream to ar_read_archive().

No functional change intended.

Reviewed by:	emaste
MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D34064
2022-01-27 17:10:17 -05:00
Tom Jones
4669f23ef7 Remove SMALL conditionals from gzip
gzip has SMALL conditionals which enable building a reduced size version
of the binary. These exist as part of the introduction of BSD licensed
gzip in 2004 in NetBSD and appear to have been required to reach a size
for inclusion in their install media. For more information see commits
to gzip in the NetBSD tree on the 28th of March 2004.

SMALL doesn't appear to be hooked up to our build system and
complicates gzip quite a bit.

Reviewed by:	kevans,	imp
Sponsored by:	Klara Inc.
Differential Revision:	https://reviews.freebsd.org/D34047
2022-01-27 17:27:21 +00:00
Tom Jones
21c966a6b9 Fix test output when gzip is run with -tlv
When run with test, verbose and list we need to parse the file otherwise
the test output is "NOT OK" even for the file is valid.

Reviewed by:	kevans, allanjude, imp
Sponsored by:	Klara Inc.
Differential Revision:	https://reviews.freebsd.org/D34046
2022-01-27 17:20:23 +00:00
Wolfram Schneider
5cf0049653 limit sort(1) memory usage to 20% of available main memory
By default BSD sort(1) uses 90% (or at least 50%?) of the available
main memory. That is good for performance for a single job, but not
for a shared OS. For a long running script the performance is less
important than the stability of the server.  Also, if a server
with 64GB RAM starts swapping, the performance goes south and
hurts other running applications.

Note: this change does not affect the weekly cron job to
rebuild the locate database. The FreeBSD locate.updatedb
use the -presort option (find -s)
2022-01-26 19:30:11 +00:00
Wolfram Schneider
0c178a2a64 support more than 2 billion file names for counting (-c) or limits (-l limit)
- this fix (harmless) integer overflows for very large partitions (>1PB)
- code cleanup
2022-01-26 16:15:23 +00:00
Wolfram Schneider
e48156828f switch to 64 bit integers for counting bigrams
This fixes an integer overflow for very large partitions around 35 billion
filenames (>2PB). However, in an artificially worst case it may occurs
by only 17 mio filenames on a partition.
2022-01-26 16:11:51 +00:00
Fernando Apesteguía
1594084f3f man(1): Add full search (-K) flag
This flag allows a full text search on man pages. Although this is a last resort
option, it can be useful to pin point a certain man page.

It can be used with -S to narrow the search.

Unlike the Linux version, the search takes place in the rendered text so it
avoids false-positives when the text is found in comments in the source files.

It relies on `grep(1)` and `mandoc(1)` to do its job.

Add flag documentation and EXAMPLES to the manual page (bump .Dd).

Usage example:

man -w -K '\<arm\>' -S 1:8

Reviewed By: ceri, emaste, pauamma_gundo.com
Approved by: manpages (bcr@), debdrup@
Differential Revision: https://reviews.freebsd.org/D30984
2022-01-26 12:24:20 +01:00
Wolfram Schneider
ccf50c1df9 locate statistics: non zero exit on corrupt database 2022-01-25 16:55:58 +00:00
Wolfram Schneider
b7a74bbc41 stop on error and display the statstics anyway
PR:		32686
2022-01-25 15:59:41 +00:00
Baptiste Daroussin
389844c058 locate: change from BSD-4-clause to BSD-3-clause
We have the authorization from the University of California to remove
the advertising clause for a while, wosch@ who also hold a copyright
on this code also approved the relicensing

Approved by:	wosch@
MFC after:	3 days
2022-01-25 09:20:17 +01:00
Eugene Grosbein
85f15576b4 fetch(1): more fixes for soft failure handling
Fix logic error introduced in my commit
bf599c03f0

Also, authorization errors should not be considered as soft failures.
2022-01-25 12:48:28 +07:00
Wolfram Schneider
829afcb5d3 refactor script
- simpler usage of mktemp(1)
- remove unnecessary checks
- documentation
2022-01-24 18:28:30 +00:00
Wolfram Schneider
0a88bd81b7 awk: print the last two characters for bigram - not the second word
A bigram may contain a space character, and we always need two characters.
2022-01-24 18:27:43 +00:00
Wolfram Schneider
41c539bdd1 stop on first error 2022-01-24 18:27:34 +00:00
Eugene Grosbein
08a2504a20 fetch(1): fix error in previous commit
strncmp() compares terminating zero and sizeof() includes it.
Un-obsfuscate the code and show what it is indended to do.
2022-01-24 15:07:18 +07:00
Eugene Grosbein
bf599c03f0 fetch(1): do not consider HTTP 5XX errors as soft failures
This change fixes "fetch -a" looping forever on "502 Bad gateway"
error and similar.

MFC after:	1 month
2022-01-24 14:38:26 +07:00
Eugene Grosbein
a4efbe0d6d fetch(1): correct progress accounting after previous commit
MFC after:	1 month
2022-01-24 11:17:24 +07:00
Eugene Grosbein
e3bad5f7aa fetch(1): process truncated transfer as soft failure
Let "fetch -a" resume truncated transfer automatically
perform another attempt if it obtained some new data in previous one
making progress.

This makes it more robust against frequent but transient network failures.
For example:

=> sqlite-src-3370200.zip doesn't seem to exist in /usr/ports/distfiles/.
=> Attempting to fetch https://www.sqlite.org/2022/sqlite-src-3370200.zip
sqlite-src-3370200.zip                          3% of   12 MB   45 kBps 04m24s
fetch: sqlite-src-3370200.zip appears to be truncated: 524288/13145234 bytes
sqlite-src-3370200.zip                         10% of   12 MB   67 kBps 02m56s
fetch: sqlite-src-3370200.zip appears to be truncated: 1327104/13145234 bytes
sqlite-src-3370200.zip                         28% of   12 MB  123 kBps 01m14s
fetch: sqlite-src-3370200.zip appears to be truncated: 3735552/13145234 bytes
sqlite-src-3370200.zip                         54% of   12 MB  253 kBps    24s
fetch: sqlite-src-3370200.zip appears to be truncated: 7176192/13145234 bytes
sqlite-src-3370200.zip                         62% of   12 MB   90 kBps    55s
fetch: sqlite-src-3370200.zip appears to be truncated: 8241152/13145234 bytes
sqlite-src-3370200.zip                         82% of   12 MB  113 kBps    20s
fetch: sqlite-src-3370200.zip appears to be truncated: 10862592/13145234 bytes
sqlite-src-3370200.zip                                  12 MB  185 kBps    12s
===> Fetching all distfiles required by sqlite3-3.37.2,1 for building

MFC after:	1 month
2022-01-24 11:09:37 +07:00
Ed Maste
6f6fbfa3a8 Remove quotes around Makefile .error/.warn/.info strings
The text after .error et al is emitted verbatim.

Reviewed by:	sjg
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D33904
2022-01-22 14:03:07 -05:00
Wolfram Schneider
e0282802a6 remove debug code for cpu usage
I guess nobody used this in the last decade, and you can get
similar results with the time(1) command.
2022-01-20 06:43:54 +00:00
Wolfram Schneider
cfa3856452 Use 64-bit integers for database statistics
This fix (harmless) integer overflows for larger partitions (>2TB)

PR: 223023
2022-01-20 06:27:08 +00:00
Wolfram Schneider
a97ce14abc correct type of mmap len parameter
Using locate -m on a database > 2GB should work now.

PR: 261277
2022-01-19 19:32:16 +00:00
Cy Schubert
64e33c5cb1 Revert "wpa: Import wpa 2.10."
This reverts commit 5eb81a4b40, reversing
changes made to c6806434e7 and
this reverts commit 679ff61123.

What happend is git rebase --rebase-merges doesn't do what is expected.
2022-01-18 08:10:33 -08:00
Cy Schubert
5eb81a4b40 wpa: Import wpa 2.10.
The long awaited hostapd 2.10 is finally here.

MFC after:	3 weeks
2022-01-18 07:45:39 -08:00
Mark Johnston
758d98debe exec: Remove the stack gap implementation
ASLR stack randomization will reappear in a forthcoming commit.  Rather
than inserting a random gap into the stack mapping, the entire stack
mapping itself will be randomized in the same way that other mappings
are when ASLR is enabled.

No functional change intended, as the stack gap implementation is
currently disabled by default.

Reviewed by:	kib
MFC after:	2 weeks
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D33704
2022-01-17 16:11:54 -05:00
Jessica Clarke
340cebe990 etdump: Fix the file name included in the could not open error message
If only one file is passed, this reads the terminating NULL and so
prints (null). If multiple files are passed then this always prints the
second file, which may or may not exist (and will be particularly
confusing if it does exist since the output will include the dump of the
second file).

MFC after:	1 week
2022-01-16 06:55:39 +00:00
Brooks Davis
0910a41ef3 Revert "syscallarg_t: Add a type for system call arguments"
Missed issues in truss on at least armv7 and powerpcspe need to be
resolved before recommit.

This reverts commit 3889fb8af0.
This reverts commit 1544e0f5d1.
2022-01-12 23:29:20 +00:00
Brooks Davis
1544e0f5d1 syscallarg_t: Add a type for system call arguments
This more clearly differentiates system call arguments from integer
registers and return values. On current architectures it has no effect,
but on architectures where pointers are not integers (CHERI) and may
not even share registers (CHERI-MIPS) it is necessiary to differentiate
between system call arguments (syscallarg_t) and integer register values
(register_t).

Obtained from:	CheriBSD

Reviewed by:	imp, kib
Differential Revision:	https://reviews.freebsd.org/D33780
2022-01-12 22:51:25 +00:00
Konstantin Belousov
12f747e6ff truss(1): detach more carefully
When detaching, truss(1) sends SIGSTOP to the traced process to ensure
that it is detaching in the steady state.  But it is possible, for
multithreaded process, that wait() call returns event other than our
SIGSTOP notification.  As result, SIGSTOP might sit in some thread'
sigqueue, which makes SIGCONT a nop.  Then, the process is stopped when
the queued SIGSTOP is acted upon.

To handle this, loop until we drain everything before SIGSTOP,
and see that the process is stopped.

Note that the earlier fix makes it safe to have some more debugging
events longering after SIGSTOP is acted upon.  They will be ignored
after PT_DETACH.

Reviewed by:	markj
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D33861
2022-01-12 20:04:41 +02:00
Konstantin Belousov
ba33c28848 truss: remove write-only variable
Reviewed by:	markj
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D33861
2022-01-12 20:04:41 +02:00
Konstantin Belousov
c0ba4c2ee2 script(1): work around slow reading child
If child is slow reading from its input, or even completely stops doing
the read, script(1) hangs in write(2) to the pts master waiting until
there is a space in the terminal discipline buffer.  This also stops
handling any outer io, as well as child output.

Work around the problem by making pts master fd non-blocking, and be
prepared for short writes to it.  The data to be written to master is
buffered in the tailq which is processed when select(2) detects that
master is ready for write.

PR:	260938
Reported by:	наб <nabijaczleweli@nabijaczleweli.xyz>
See also:	https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1003095
Reviewed by:	markj
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D33789
2022-01-10 17:34:51 +02:00
Ed Maste
1a0a41b105 ar: accept but ignore 'T' option
In previous versions of BSD ar -T was an alias for -f -- use only the
first 15 characters of archive member names.  In GNU ar and LLVM ar -T
creates a thin archive.

The -f / old BSD ar -T functionality is not particularly useful, and
ignoring -T still results in a usable and compatible (but not thin)
archive.

An exp-run found a few ports invoking ar -T but they all expect thin
archives.  In addition, -T will be used to specify thin archives after
a migration to LLVM-ar.

PR:             260523 [exp-run]
Reviewed by:	markj
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D33553
2022-01-03 11:42:59 -05:00
Robert Watson
7776d3ccd1 Add a -q flag to ministat to suppress headers in output, for use with -n.
Reviewed by:	jrtc27
Differential Revision: https://reviews.freebsd.org/D33724
MFC after:	2 weeks
2021-12-18 22:53:03 +00:00
Kirk McKusick
a115a4aa51 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
Reviewed by:  mckusick
MFC after:    2 weeks
Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D33495
2022-01-01 19:48:06 -08:00
Gleb Smirnoff
dcb724b5a7 ktrdump: properly parse %% in the format string
Discovered by:	27ca37acb7
2021-12-29 23:08:15 -08:00
Ed Maste
edadbb4606 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
2021-12-29 15:14:06 -05:00
Alexander V. Chernikov
731bfa9f18 netstat: fix nhop prepend printing.
If present, print nexthop L2 prepend data in hex.

MFC after:	1 week
2021-12-26 15:05:10 +00:00
Baptiste Daroussin
d93b4d3203 bsddialog: import version 0.0.2 2021-12-21 16:13:00 +01:00
Emmanuel Vadot
13ef8134ef 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
2021-12-21 10:17:46 +01:00
Emmanuel Vadot
93c4369096 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
2021-12-21 10:17:27 +01:00
Emmanuel Vadot
5abb10faa1 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
2021-12-21 10:17:22 +01:00
Ed Maste
3e01ee76f2 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
2021-12-20 12:59:01 -05:00
Gleb Smirnoff
71d2d5adfe 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.
2021-12-19 08:22:12 -08:00
Simon J. Gerraty
1c04cf7d54 After-import bmake-20211212 2021-12-18 10:14:39 -08:00
Konstantin Belousov
01c77a436e Pass vdso address to userspace
Reviewed by:	emaste
Discussed with:	jrtc27
Tested by:	pho
Sponsored by:	The FreeBSD Foundation
MFC after:	1 month
Differential revision:	https://reviews.freebsd.org/D32960
2021-12-06 20:46:49 +02:00
Stefan Eßer
5e04571cf3 sys/bitset.h: reduce visibility of BIT_* macros
Add two underscore characters "__" to names of BIT_* and BITSET_*
macros to move them to the implementation name space and to prevent
a name space pollution due to BIT_* macros in 3rd party programs with
conflicting parameter signatures.

These prefixed macro names are used in kernel header files to define
macros in e.g. sched.h, sys/cpuset.h and sys/domainset.h.

If C programs are built with either -D_KERNEL (automatically passed
when building a kernel or kernel modules) or -D_WANT_FREENBSD_BITSET
(or this macros is defined in the source code before including the
bitset macros), then all macros are made visible with their previous
names, too. E.g., both __BIT_SET() and BIT_SET() are visible with
either of _KERNEL or _WANT_FREEBSD_BITSET defined.

The main reason for this change is that some 3rd party sources
including sched.h have been found to contain conflicting BIT_*
macros.

As a work-around, parts of shed.h have been made conditional and
depend on _WITH_CPU_SET_T being set when sched.h is included.
Ports that expect the full functionality provided by sched.h need
to be built with -D_WITH_CPU_SET_T. But this leads to conflicts if
BIT_* macros are defined in that program, too.

This patch set makes all of sched.h visible again without this
parameter being passed and without any name space pollution due
to BIT_* macros becoming visible when sched.h is included.

This patch set will be backported to the STABLE branches, but ports
will need to use -D_WITH_CPU_SET_T as long as there are supported
releases that do not contain these patches.

Reviewed by:	kib, markj
MFC after:	1 month
Relnotes:	yes
Differential Revision:	https://reviews.freebsd.org/D33235
2021-12-05 23:00:25 +01:00
Gordon Bergling
c8ca80e223 elf(3): Fix a typo in a sysctl description
- s/segement/segment/

MFC after:	3 days
2021-11-30 10:38:34 +01:00
Danilo G. Baio
ec80eab8a1 motd: Fix Questions List address
Following mailing lists migration from Mailman to Mlmmj.

https://lists.FreeBSD.org/mailman/listinfo/freebsd-questions/
-->
https://lists.freebsd.org/subscription/freebsd-questions

Adding a short link (as we already have for Faq and Handbook), so all
links can be indented the same way.

Reviewed by:	imp (earlier version)
Approved by:	lwhsu
Differential Revision: https://reviews.freebsd.org/D33101
2021-11-28 18:15:04 -03:00
Baptiste Daroussin
848ee2a3a8 bsddialog: actually add directories 2021-11-24 12:13:45 +01:00
Ed Maste
036af1053a mkimg: zero entry in vhdx_write_metadata
Otherwise _reserved might contain uninitialized data.

MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
2021-11-20 19:37:25 -05:00
Mateusz Piotrowski
01e3140571 top.1: Use the Dq macros instead of \*lq and \*rq
MFC after:	3 days
2021-11-18 15:56:49 +01:00
Mateusz Piotrowski
c947fc5fae top.1: Improve description of -m
Describe -m argument as "mode" instead of "display".

MFC after:	3 days
2021-11-18 15:56:48 +01:00
Mateusz Piotrowski
82d0f865ee top: Sort flags in usage message
While here, fix the indentation of the second line in the message.

MFC after:	3 days
2021-11-18 15:56:47 +01:00
Mateusz Piotrowski
1125390415 top.1: Sort options alphabetically
While here, add a short sentence introducing the options.

MFC after:	3 days
2021-11-18 15:56:47 +01:00
Mateusz Piotrowski
b8135ed67c 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
2021-11-18 15:56:46 +01:00
Warner Losh
d677d4be0c Skip -flto for all MIPS ports
There likely should be a macro for the ports that support lto, but I'm
making sure that all the mips things build before decommissioning it and
this is the only thing that's broken...

Sponsored by:		Netflix
2021-11-16 16:23:02 -07:00
Konstantin Belousov
7d20a08076 ldd: also use exec mode for -a
The -a option also requires passing specific environment variables to
instance of rtld doing tracing.

PR:	259069
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2021-11-15 22:49:33 +02:00
Brooks Davis
8e4a3add99 struct kevent_freebsd11 -> struct freebsd11_kevent
Rename to match the naming of syscalls and allow 32 to be appended
without making an ugly name like kevent_freebsd1132.

While here, make the kevent changelist argument const.

Reviewed by:	kib
2021-11-15 18:34:27 +00:00