Commit Graph

14550 Commits

Author SHA1 Message Date
Fernando Apesteguía
69ad6e739b join(1): Add EXAMPLES section
Add EXAMPLES covering options -e, -o, -t, -v, -1

Approved by:	0mp@
Differential Revision: https://reviews.freebsd.org/D25186
2020-06-20 11:27:59 +00:00
Fernando Apesteguía
f3ec6af0e4 seq(1): complete EXAMPLES section
* Add a small description before the EXAMPLES that are already in the man page
  to explicitely state what we are trying to show instead of having the user
  guess what the example is doing.

* Add two more examples to show usage of -s, -t and -f

* mandoc -Tlint reports irrelevant use of .Tn so remove them since according to
  mdoc(7) it is there only for compatibility and should not be used in new
  manuals.

Approved by:	0mp@
2020-06-20 11:24:29 +00:00
Fernando Apesteguía
1831993577 cmp(1): Add EXAMPLES section
Add a small number of examples depicting the use of -l, -z and byte offsets

Approved by:	0mp@
2020-06-20 11:20:16 +00:00
Fernando Apesteguía
204fa3b066 diff(1): Add EXAMPLES section
Add examples for -r, -u, -N, -x, -q and -I

Approved by:	0mp@
Differential Revision:	https://reviews.freebsd.org/D25345
2020-06-19 06:48:16 +00:00
Jung-uk Kim
7e38239042 MFV: r362286
Merge flex 2.6.4.
2020-06-18 18:09:16 +00:00
Fernando Apesteguía
e48cafb55d split(1): Add EXAMPLES section
Add EXAMPLES covering -d, -n and -p
Include small explanation about the size of the chunks for the -n option

Approved by:	0mp
Differential Revision:	https://reviews.freebsd.org/D25198
2020-06-18 15:14:10 +00:00
Gordon Bergling
1d733bbc0d Add HISTORY sections to banner(6), basename(1), limits(1) and vmstat(8)
Reviewed by:	bcr (mentor)
Approved by:	bcr (mentor)
MFC after:	7 days
Differential Revision:	https://reviews.freebsd.org/D25019
2020-06-18 13:19:56 +00:00
Mateusz Piotrowski
cf0b74eee6 Clean up and improve manual page for fuser(1)
- Mention option's arguments in the list of options (so that now we mention
  "-N system" instead of just "-N").
- Stylize signals and other constants like O_APPEND with Dv.
- Sort options.
- Change indentation width for readability.
- Fix a couple of typos.
- Sort symbols list.
- Use Sy instead of Cm for symbols. They are not command modifiers.
- Use Ex -std in the EXIT STATUS section for consistency with other manual
  pages.
- Use Ql instead of Dq Li for inline code examples as Li has recently been
  deprecated by mdoc.

Reviewed by:	bcr
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D25332
2020-06-18 11:18:26 +00:00
Fernando Apesteguía
d70bfedd08 tee(1): Add EXAMPLES section
Probably the simplest one ever.

Approved by:	gbe@, 0mp@
Differential Revision:	https://reviews.freebsd.org/D25206
2020-06-18 10:48:37 +00:00
Fernando Apesteguía
15597d5df2 lockf(1): Add EXAMPLES section
* Add pretty small EXAMPLES section
 * While here, fix a warning in line 98 (new sentence in new line)

Approved by:	bcr@
Differential Revision:	https://reviews.freebsd.org/D25205
2020-06-18 08:31:04 +00:00
Fernando Apesteguía
43ad0e153d nl(1): Add EXAMPLES section
Add EXAMPLES section covering flags -b[ap] -n -i -s -v

Approved by:	bcr@
Differential Revision:	Add EXAMPLES section covering flags -b[ap] -n -i -s -v
2020-06-18 08:26:26 +00:00
Mateusz Piotrowski
78ef79139e Clean up fstat.1
- Sort options in the list & indent for readability.
- Pet linters
  - Use "\(em" instead of "--"
  - Remove Tn macros
- Use Ql instead of Dq Li
- Add arguments to the -M, -N, -p, and -u options in their descriptions.
- Use Sy instead of Li for field names. Li is deprecated, and Ql makes no
  sense here.
- Replace a literal block with a list for the table of special names
  related to FD.
- Use Ql instead of ``X''.
- Add a dot after etc.
- Reference fuser(1).

MFC after:	1 week
2020-06-17 21:21:57 +00:00
Fernando Apesteguía
022ebaf543 cmp(1): Add EXAMPLES section
Add simple examples showing the use of -l, -z, stdin and offsets

Approved by:	bcr@
Differential Revision: https://reviews.freebsd.org/D25280
2020-06-16 15:54:59 +00:00
Toomas Soome
e7fd9688ea Move font related data structured to sys/font.c and update vtfontcvt
Prepare support to be able to handle font data in loader, consolidate
data structures to sys/font.h and update vtfontcvt.

vtfontcvt update is about to output set of glyphs in form of C source,
the implementation does allow to output compressed or uncompressed font
bitmaps.

Reviewed by:	bcr
Differential Revision:	https://reviews.freebsd.org/D24189
2020-06-14 06:58:58 +00:00
Konstantin Belousov
2b5d88fdcf Fix ldd for PIE binaries after rtld stopped accepting binaries for dlopen.
ldd proclaims ET_DYN objects as shared libraries and tries to
dlopen(RTLD_TRACE) them to get dependencies. Since PIE binaries are
ET_DYN | DF_1_PIE, refusal to dlopen such binaries breaks ldd.

Fix it by reading and parsing dynamic segment looking for DF_FLAG_1
and taking DF_1_PIE into account when deciding between binary and
library.

Reported by:	Dewayne Geraghty <dewayne@heuristicsystems.com.au>
Reviewed by:	markj
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D25257
2020-06-13 18:21:31 +00:00
Fernando Apesteguía
f893fe7a1d sockstat(1): Add EXAMPLES to man page
Add three examples showing the use of -4, -6, -l, -L, -p and -P

Reviewed by:	gbe@
Approved by:	bcr@
2020-06-13 17:36:08 +00:00
Yuri Pankov
7d93dd0f34 awk(1): use -version instead of -V
-V is OpenBSD specific, use -version instead.

While here, fix issue reported by mandoc lint and drop nonexistent
script(7) reference.

PR:		247004
Reviewed by:	0mp, markj
Differential Revision:	https://reviews.freebsd.org/D25164
2020-06-13 09:16:07 +00:00
Yuri Pankov
6419bb529b locale: exit 1 if unknown keyword was specified
PR:		241906
Submitted by:	Akos Somfai <akos.somfai@gmail.com>
2020-06-13 08:37:24 +00:00
Gordon Bergling
7974b0046d Add myself (gbe) to committers-doc.dot and calendar.freebsd
Reviewed by:	bcr (mentor)
Approved by:	bcr (mentor)
Differential Revision:	https://reviews.freebsd.org/D25241
2020-06-12 09:34:10 +00:00
Mateusz Piotrowski
c6f7593c1d Remove some more duplicate test cases I accidentally committed
Reported by:	markj, yuripv
MFC after:	2 weeks
X-MFC-With:	362017
2020-06-11 18:14:34 +00:00
Fernando Apesteguía
20994eafc4 xargs(1): Add EXAMPLES to man page
Add EXAMPLES covering options I, J, L, n, P.

While here, fix warning (STYLE: no blank before trailing delimiter: Fl P,)
Bumping .Dd

Approved by:	bcr@
Differential Revision:	https://reviews.freebsd.org/D25214
2020-06-11 15:14:39 +00:00
Mateusz Piotrowski
df471ef449 Remove duplicate lines from sed tests
Reported by:	yuripv
Approved by:	pfg (src)
MFC after:	2 weeks
X-MFC-With:	362017
2020-06-11 03:03:52 +00:00
Mateusz Piotrowski
f9ab72bb47 Read commands from stdin when -f - is passed to sed(1)
This patch teaches sed to interpret a "-" in a special way when given
as an argument to the -f flag.

This behavior is also present in GNU sed.

PR:		244872
Tested by:	antoine (exp-run)
Reviewed by:	pfg, tobik (older version)
Approved by:	pfg (src)
Relnotes:	yes
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D24079
2020-06-10 19:23:58 +00:00
Simon J. Gerraty
ef0b253881 Merge bmake-20200606
Relevant items from ChangeLog:

	o dir.c: cached_stats - don't confuse stat and lstat results.
	o var.c: add :Or for reverse sort.
2020-06-09 20:52:35 +00:00
Mateusz Piotrowski
19870105e1 Use Fl instead of Ar for long flags
Also, bump date after r361935.

MFC after:	1 week
2020-06-08 21:11:34 +00:00
Oleksandr Tymoshenko
c78cd98b8a Add VHDX support to mkimg(1)
VHDX is the successor of Microsoft's VHD file format. It increases
maximum capacity of the virtual drive to 64TB and introduces features
to better handle power/system failures.

VHDX is the required format for 2nd generation Hyper-V VMs.

Reviewed by:	marcel
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D25184
2020-06-08 20:28:32 +00:00
Benedict Reuschling
e6e3cf55d3 Add EXAMPLES to cover all flags except -f since it is analogous to -s.
An EXAMPLE section was adding with some basic examples that show the use of
uniq(1) with various flags.

Submitted by:	fernape@
Approved by:	bcr@
MFC after:	4 days
Relnotes:	yes (EXAMPLE section for uniq(1))
Differential Revision:	https://reviews.freebsd.org/D25149
2020-06-07 13:21:47 +00:00
Kyle Evans
3a4d70c588 sed: attempt to learn about hex escapes (e.g. \x27)
Somewhat predictably, software often wants to use \x27/\x24 among others so
that they can decline worrying about ugly escaping, if said escaping is even
possible. Right now, this software is using these and getting the wrong
results, as we'll interpret those as x27 and x24 respectively. Some examples
of this, when an exp-run was ran, were science/octopus and misc/vifm.

Go ahead and process these at all times.  We allow either one or two digits,
and the tests account for both.  If extra digits are specified, e.g. \x2727,
then the third and fourth digits are interpreted literally as one might
expect.

PR:		229925
MFC after:	2 weeks
2020-06-07 04:32:38 +00:00
Benjamin Kaduk
5ff9cf9f06 Belatedly bump .Dd for r361783
Reported by:	lwhsu
Pointy hat to:	bjk
2020-06-05 16:59:14 +00:00
John Baldwin
00a4311adc Refer to AES-CBC as "aes-cbc" rather than "rijndael-cbc" for IPsec.
At this point, AES is the more common name for Rijndael128.  setkey(8)
will still accept the old name, and old constants remain for
compatiblity.

Reviewed by:	cem, bcr (manpages)
MFC after:	2 weeks
Sponsored by:	Chelsio Communications
Differential Revision:	https://reviews.freebsd.org/D24964
2020-06-04 22:58:37 +00:00
Benjamin Kaduk
a201343073 Add EXAMPLES to killall(1)
Submitted by:	fernape
Differential Revision:	https://reviews.freebsd.org/D25002
2020-06-04 04:29:43 +00:00
Dimitry Andric
b7ec5dea64 Update Subversion to 1.14.0 LTS. See contrib/subversion/CHANGES for a
summary of changes, or for a more thorough overview:

https://subversion.apache.org/docs/release-notes/1.14

NOTE: there is no need to dump and reload repositories, and the working
copy format is still the same as Subversion 1.8 through 1.13.

Relnotes:	yes
MFC after:	2 weeks
X-MFC-With:	r361677
2020-06-01 10:27:05 +00:00
Dimitry Andric
674baa3c4f Update apr-util to 1.6.1. See contrib/apr-util/CHANGES for a summary of
changes.

MFC after:	2 weeks
X-MFC-With:	r361677
2020-06-01 10:14:45 +00:00
Dimitry Andric
d21a42232f Follow-up r361678 (update apr to 1.7.0) by also regenerating the apr
internal headers through the upstream configure script, with some minor
custom tweaks.

MFC after:	2 weeks
X-MFC-With:	r361677
2020-06-01 10:08:18 +00:00
Baptiste Daroussin
8ccef19395 Document long version of -b option
PR:		234195
Submitted by:	Fehmi Noyan Isi <fnoyanisi@yahoo.com>
Reported by:	Andras Farkas <deepbluemistake@gmail.com>
MFC after:	3 days
2020-06-01 09:15:15 +00:00
Baptiste Daroussin
2816b9998c diff: restore compatibility with GNU diff regarding -N option
When -N is used the missing files are treated as empty.

PR:		233402
Submitted by:	Fehmi Noyan Isi <fnoyanisi@yahoo.com>
Reported by:	Roman Neuhauser <roman@sigpipe.cz>
MFC after:	3 days
Differential Revision:	D25081
2020-06-01 09:09:36 +00:00
Baptiste Daroussin
f096ed981f Restore compatibility with GNU diff regarding --label
Various options to "diff(1)" show filenames, and traditionally make use of the
"--label" parameter, if set.

Restore this behaviour in BSD diff.

While here add a regression test

PR:		244533
Submitted by:	Jamie Landeg-Jones <jamie@catflap.org>
MFC after:	3 days
2020-06-01 09:01:13 +00:00
Kyle Evans
176d12b518 apr: build some needed emulated 64-bit atomic bits after r361678
This should fix the build on armv{6,7}, mips, and mips64, which all need
emulated 64-bit atomics for apr.

X-MFC-With:	r361678
2020-06-01 02:54:10 +00:00
Dimitry Andric
1f404a4a8e Change more Makefiles under usr.bin/svn to make them easier to
incrementally update. No functional change intended.

MFC after:	2 weeks
X-MFC-With:	r361677
2020-05-31 22:40:39 +00:00
Dimitry Andric
b081c245fd Update apr to 1.7.0. See contrib/apr/CHANGES for a summary of changes.
MFC after:	2 weeks
X-MFC-With:	r361677
2020-05-31 22:12:56 +00:00
Dimitry Andric
6fff577580 Change Makefiles under usr.bin/svn to make them easier to incrementally
update. No functional change intended.

MFC after:	2 weeks
2020-05-31 22:04:51 +00:00
Ed Maste
465fbce433 fortune: remove warning about potentially offensive fortunes
They were removed long ago.

PR:		246736
Submitted by:	Ruby Lazuli Lord
MFC after:	3 days
2020-05-28 20:39:27 +00:00
Piotr Pawel Stefaniak
5088a2d18c indent(1): add fallthrough markers
This silences -Wimplicit-fallthrough warnings.

Submitted by:	Michael Paquier
Obtained from:	postgresql.org
MFC after:	3 days
2020-05-21 17:34:31 +00:00
Christian S.J. Peron
7be2c6f3bf Decode the file descriptor argument to closefrom(2) as an Integer.
This is consistent with what we are doing for close(2) and it makes
it a bit easier to follow when debugging file descriptor operations.
i.e. many other syscalls are decoding fds as integers rather than
base 16 numbers.

MFC after:	1 week
2020-05-21 02:10:45 +00:00
Simon J. Gerraty
49caa483b3 Merge bmake-20200517
Changes since 20181221 are mostly portability related
hence the large gap in versions imported.

There are however some bug fixes, and a rework of filemon handling.
In NetBSD make/filemon/filemon_ktrace.c allows use of fktrace
and elimination of filemon(4) which has not had the TLC it needs.

FreeBSD filemon(4) is in much better shape, so bmake/filemon/filemon_dev.c
allows use of that, with a bit less overhead than the ktrace model.

Summary of changes from ChangeLog

	o str.c: empty string does not match % pattern
	  plus unit-test changes
	o var.c: import handling of old sysV style modifier using '%'
	o str.c: refactor brk_string
	o meta.c: meta_oodate, CHECK_VALID_META is too aggressive for CMD
	  a blank command is perfectly valid.
	o meta.c: meta_oodate, check for corrupted meta file
	  earlier and more often.
	* meta.c: meta_compat_parent check for USE_FILEMON
	  patch from Soeren Tempel
	o meta.c: fix compat mode, need to call meta_job_output()
	o job.c: extra fds for meta mode not needed if using filemon_dev
	o meta.c: avoid passing NULL to filemon_*() when meta_needed()
	  returns FALSE.
	o filemon/filemon_{dev,ktrace}.c: allow selection of
	  filemon implementation.  filemon_dev.c uses the kernel module
	  while filemon_ktrace.c leverages the fktrace api available in
	  NetBSD.  filemon_ktrace.c can hopefully form the basis for
	  adding support for other tracing mechanisms such as strace on
	  Linux.
	o meta.c: when target is out-of-date per normal make rules
	  record value of .OODATE in meta file.
	o parse.c: don't pass NULL to realpath(3)
	  some versions cannot handle it.
	o parse.c: ParseDoDependency: free paths rather than assert

plus more unit-tests
2020-05-20 22:25:46 +00:00
Martin Matuska
de6fa6b43b MFV r361280:
Update libarchive to 3.4.3

Relevant vendor changes:
  PR #1352: support negative zstd compression levels
  PR #1359: improve zstd version checking
  PR #1348: support RHT.security.selinux from GNU tar
  PR #1357: support for archives compressed with pzstd
  PR #1367: fix issues in acl tests
  PR #1372: child handling cleanup
  PR #1378: fix memory leak from passphrase callback
2020-05-20 20:58:48 +00:00
Benedict Reuschling
8655a965fd Update SYNOPSIS section to be consistent regarding -u, -i, and -I.
Apparently, when the -u, -i and -I options where added to sed(1), it was
forgotten to add them to both lines in the SYNOPSIS section. They were only
added to the second line, although they apply to both.

With the updated SYNOPSIS, it is now allowed (and consistent) to run:

sed -i BAK s/foo/bar/g some_file

PR:		240556
Submitted by:	Oliver Fromme
MFC after:	5 days
2020-05-19 09:17:20 +00:00
Michael Reifenberger
9a8fc6bba3 Introduce sysputpage() to display large page size with human readable format.
Using UI units allows to fit larger numbers in columns.
Stop calling v_page_size - this is a value that doesn't change at runtime.
Renamed WINDOW *wnd to *wd to avoid conflict with global *wnd variable.
Use bit-shift to convert page size to byte.

PR:             246458
Submitted by:   ota@j.email.ne.jp
MFC after: 2 weeks
Differential Revision:  D24834
2020-05-15 17:37:08 +00:00
Warner Losh
473cb30cd1 Refine the history of uname. It appeared in 4.4BSD. It was not in v7 unix. It
was one of the additions in PWB, and appeared in System III and later commercial
versions of Unix. The different args to uname weren't aded until System III. Add
a quick note to note the late entry into the BSD fork of Unix since PWB
otherwise implies a pre-fork date.
2020-05-12 22:44:51 +00:00
Michael Reifenberger
b4532d408d Add missing sysput.c
PR:		237664
Submitted by:	ota@j.email.ne.jp
Reported by:	imb, cy
2020-05-11 21:22:16 +00:00
Michael Reifenberger
4bde63536c Patch systat -zarc to display cumulative rate and round down large numbers by SI units
PR:		237664
Submitted by:	ota@j.email.ne.jp
MFC after:	2 weeks
2020-05-11 20:34:52 +00:00
Ed Maste
4ac4a7f80b elfctl: update earliest FreeBSD revision to 12.2
elfctl has been merged to stable/12, and so will appear in FreeBSD 12.2

Reported by:	Dewayne Geraghty
MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
2020-05-05 21:50:52 +00:00
John Baldwin
16aabb761c Remove support for IPsec algorithms deprecated in r348205 and r360202.
Examples of depecrated algorithms in manual pages and sample configs
are updated where relevant.  I removed the one example of combining
ESP and AH (vs using a cipher and auth in ESP) as RFC 8221 says this
combination is NOT RECOMMENDED.

Specifically, this removes support for the following ciphers:
- des-cbc
- 3des-cbc
- blowfish-cbc
- cast128-cbc
- des-deriv
- des-32iv
- camellia-cbc

This also removes support for the following authentication algorithms:
- hmac-md5
- keyed-md5
- keyed-sha1
- hmac-ripemd160

Reviewed by:	cem, gnn (older verisons)
Relnotes:	yes
Sponsored by:	Chelsio Communications
Differential Revision:	https://reviews.freebsd.org/D24342
2020-05-02 00:06:58 +00:00
Kyle Evans
67c907653e diff(1): don't reject specifying the same format multiple times
This may happen, for instance, if one happens to have an alias of diff to
diff -up and attempts to specify the amount of context on top of that.

Aliases like this may cause other problems, but if they're really not ever
generating non-unified diffs then we should at least not break that
use-case.

In addition, we'll now pick up a format mismatch if -p is specified with
!contextual && !unified && !unset.

Fix up a small trailing whitespace nit in the tests while we're here, and
add tests to make sure that we can double up all the formatting options.

Reported by:	jbeich
MFC after:	3 days
2020-04-28 14:33:33 +00:00
Ryan Moeller
f1cd4902bf sockstat: Attach to jail if in new vnet
Attach sockstat -j to the specified jail if the jail is in a new vnet.
Otherwise we do not see all sockets belonging to the jail.

Reviewed by:	jamie
Approved by:	mmacy (mentor)
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D24413
2020-04-26 20:55:11 +00:00
Mateusz Piotrowski
beb71006e7 Fix invalid use of macros and two typos
It turns out that currently mandoc(1) is not handling Fl in Ss
correctly (maybe it never was). Let's just replace "Fl S \&Ss ..."
with "-S ...". After all, this subsection title is stylized anyway, so Fl
is not that helpful.

MFC after:	2 weeks
2020-04-24 22:02:22 +00:00
Kyle Evans
db9cccfbb1 diff(1): reject conflicting formatting options
This matches GNU diff(1) behavior and, more importantly, eliminates any
source of confusion if multiple formatting options are specified.

Note that the committed diff differs slightly from the submitted: I've
modified it so that we initialize diff_format to something that isn't an
accepted format option so that we can also reject --normal -c and -c
--normal, which would've otherwise been accepted because the default was
--normal. After option parsing we default it to D_NORMAL if it's still
unset.

PR:		243975
Submitted by:	fehmi noyan isi
MFC after:	1 week
2020-04-20 16:14:44 +00:00
Mateusz Piotrowski
93e0e298b9 Use the Ic macro for find(1) primaries consistently
MFC after:	3 days
2020-04-18 13:29:54 +00:00
Greg Lehey
96273f2488 Tidy up syntax and punctuation of some entries. 2020-04-17 23:14:51 +00:00
Brooks Davis
3780fcd950 Add procstat support for AT_ flags added in r359988.
This includes argc, argv, envc, envv, and ps_strings.

Reviewed by:	kib
Obtained from:	CheriBSD
Sponsored by:	DARPA
Differential Revision:	https://reviews.freebsd.org/D24407
2020-04-15 20:25:38 +00:00
Hiroki Tagato
4afeb43d98 Add my birthday
Approved by:	ehaupt (mentor)
2020-04-15 10:20:18 +00:00
Li-Wen Hsu
1c04eb2853 Install expected output file of test missed in r359585
Sponsored by:	The FreeBSD Foundation
2020-04-13 14:35:07 +00:00
Alexander V. Chernikov
d303324bad Fix string format error missed in r359823. 2020-04-12 15:16:34 +00:00
Alexander V. Chernikov
a666325282 Introduce nexthop objects and new routing KPI.
This is the foundational change for the routing subsytem rearchitecture.
 More details and goals are available in https://reviews.freebsd.org/D24141 .

This patch introduces concept of nexthop objects and new nexthop-based
 routing KPI.

Nexthops are objects, containing all necessary information for performing
 the packet output decision. Output interface, mtu, flags, gw address goes
 there. For most of the cases, these objects will serve the same role as
 the struct rtentry is currently serving.
Typically there will be low tens of such objects for the router even with
 multiple BGP full-views, as these objects will be shared between routing
 entries. This allows to store more information in the nexthop.

New KPI:

struct nhop_object *fib4_lookup(uint32_t fibnum, struct in_addr dst,
  uint32_t scopeid, uint32_t flags, uint32_t flowid);
struct nhop_object *fib6_lookup(uint32_t fibnum, const struct in6_addr *dst6,
  uint32_t scopeid, uint32_t flags, uint32_t flowid);

These 2 function are intended to replace all all flavours of
 <in_|in6_>rtalloc[1]<_ign><_fib>, mpath functions  and the previous
 fib[46]-generation functions.

Upon successful lookup, they return nexthop object which is guaranteed to
 exist within current NET_EPOCH. If longer lifetime is desired, one can
 specify NHR_REF as a flag and get a referenced version of the nexthop.
 Reference semantic closely resembles rtentry one, allowing sed-style conversion.

Additionally, another 2 functions are introduced to support uRPF functionality
 inside variety of our firewalls. Their primary goal is to hide the multipath
 implementation details inside the routing subsystem, greatly simplifying
 firewalls implementation:

int fib4_lookup_urpf(uint32_t fibnum, struct in_addr dst, uint32_t scopeid,
  uint32_t flags, const struct ifnet *src_if);
int fib6_lookup_urpf(uint32_t fibnum, const struct in6_addr *dst6, uint32_t scopeid,
  uint32_t flags, const struct ifnet *src_if);

All functions have a separate scopeid argument, paving way to eliminating IPv6 scope
 embedding and allowing to support IPv4 link-locals in the future.

Structure changes:
 * rtentry gets new 'rt_nhop' pointer, slightly growing the overall size.
 * rib_head gets new 'rnh_preadd' callback pointer, slightly growing overall sz.

Old KPI:
During the transition state old and new KPI will coexists. As there are another 4-5
 decent-sized conversion patches, it will probably take a couple of weeks.
To support both KPIs, fields not required by the new KPI (most of rtentry) has to be
 kept, resulting in the temporary size increase.
Once conversion is finished, rtentry will notably shrink.

More details:
* architectural overview: https://reviews.freebsd.org/D24141
* list of the next changes: https://reviews.freebsd.org/D24232

Reviewed by:	ae,glebius(initial version)
Differential Revision:	https://reviews.freebsd.org/D24232
2020-04-12 14:30:00 +00:00
Eugene Grosbein
75acbb2226 wc(1): document SIGINFO handling in the manual page.
MFC after:	3 days
2020-04-11 08:16:35 +00:00
Mariusz Zaborski
d86cc38525 logger: temporarily disable Capsicum when a host is provided
We don't have a way to send a UDP package.

PR:		245314
Reported by:	dch
Discussed with:	emaste
2020-04-08 18:43:00 +00:00
Maxim Sobolev
a8b8edb25e Normalize deployment tools usage and definitions by putting into one place
instead of sprinkling them out over many disjoint files. This is a follow-up
to achieve the same goal in an incomplete rev.348521.

Approved by:	imp
MFC after:	1 month
Differential Revision:	https://reviews.freebsd.org/D20520
2020-04-07 02:46:22 +00:00
Kyle Evans
a86ddfe8c7 mail/gprof/tip: tap with the ugly stick
The ugly stick here is this bit in the respective headers:

#ifndef EXTERN
#define EXTERN extern
#endif

with a follow-up #define EXTERN in a single .c file to push all of their
definitions into one spot. A pass should be made over these three later to
push these definitions into the correct files instead, but this will suffice
for now and at a more leisurely pace.

MFC after:	3 days
2020-04-06 23:28:24 +00:00
Kyle Evans
02bde5cf13 indent: fix the -fno-common build
Spread the globals far and wide, hopefully to the files that make the most
sense.

-fno-common will become the default in GCC10/LLVM11.

MFC after:	3 days
2020-04-06 23:20:20 +00:00
Yoshihiro Takahashi
ba2c1f62af Remove extra spaces for the load average of machines that are down.
PR:		245296
Submitted by:	martin _at_ lispworks.com
MFC after:	1 week
2020-04-04 12:07:36 +00:00
Ed Maste
652a974885 lldb: build and enable lua script bindings
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D24266
2020-04-03 16:54:13 +00:00
Brooks Davis
317111316d Install a kyua.conf based on the one in devel/kyua.
The kyua.conf from examples doesn't match the expected config and
contains a lot of undesirable entries such as setting the architecture
to amd64 explicitly.

Reported by:	arichardson (missing config)
Reviewed by:	emaste
Obtained from:	CheriBSD
Differential Revision:	https://reviews.freebsd.org/D24267
2020-04-03 15:47:15 +00:00
Mark Johnston
fb979f0db2 Fix up r359594: -m takes an argument.
PR:		244153
Reported by:	0mp
MFC with:	r359594
2020-04-03 14:47:40 +00:00
Mark Johnston
ab82560638 xargs: Fix exit status expression when a child process fails to exec.
PR:		244327
Submitted by:	thomas.duffy.99@alumni.brown.edu
MFC after:	1 week
2020-04-03 14:03:58 +00:00
Mark Johnston
3035d538a4 Fix the description of the -m flag in top.1.
PR:		244153
Submitted by:	fehmi noyan isi <fnoyanisi@yahoo.com>
MFC after:	3 days
2020-04-03 13:35:44 +00:00
Oleksandr Tymoshenko
838f5ac1f9 Remove hardcoded US Election Day from calendar.usholiday
calendar(1) syntax is not capable of representing the rules for the
US Election Day. The hardcoded date was set in r15066 in 1996 and
hasn't changed since then.

PR:		173389
Reported by:	Steve Ames <steve@energistic.com>
MFC after:	1 week
2020-04-03 02:39:46 +00:00
Oleksandr Tymoshenko
c01c8cccf5 Fix calculation of the recurring weekdays
Both the result of the first_dayofweek_of_year and the target
weekday are zero-based (0 fo sunday) while the target month-day
or year-day is 1-based. Adjust logic accordingly.

Also add testcase for this PR to the kyua test suite

PR:		201062
Submitted by:	Richard Narron <comet.berkeley@gmail.com>
MFC after:	1 week
2020-04-03 01:17:43 +00:00
Edward Tomasz Napierala
4945a2641f Stop hardcoding WARNS in iscsictl(8).
MFC after:	2 weeks
Sponsored by:	DARPA
2020-04-01 15:08:53 +00:00
Brooks Davis
9fd4b8ffab Fix build with src on a noexec filesystem.
${SH} expands to nothing on src builds so this worked by accident.  Use
a bare "sh" instead.

PR:		245086
Reported by:	pkubaj
Sponsored by:	DARPA
2020-03-29 19:48:28 +00:00
Kyle Evans
8dddde9ebb locate: fix -fno-common build
Just a single variable declaration to extern and define elsewhere here,
myctype.

-fno-common will become a default in GCC10/LLVM11.

MFC after:	3 days
2020-03-29 19:16:14 +00:00
Greg Lehey
9a9b973561 Remove spurious transition from Julian to Gregorian for country
"Latin".

Arguably the entire -p option should be removed.  It shows only a few
countries, and it doesn't have any relationship with the rest of the
program.

PR:		244801
Submitted by:	grog@
Reported by:	Hamid Ali
2020-03-29 04:18:27 +00:00
Greg Lehey
358952cac0 Add STANDARDS section
PR:		239723
Submitted by:	Gordon Bergling
Reported by:	Gordon Bergling
2020-03-29 04:14:57 +00:00
Enji Cooper
09ae09a9eb Revert r359385-r359387
As noted by brooks/emaste, this is the wrong approach to take.
Revert the changes so brooks can apply a more proper change.

Requested by:	brooks, emaste
2020-03-29 02:40:03 +00:00
Kyle Evans
9a9f88cc11 systat: remove redundant definition of kd
kd is already properly declared in extern.h and defined in main.c, rendering
this definition useless. This fixes the -fno-common build.

MFC after:	3 days
2020-03-29 02:30:23 +00:00
Greg Lehey
4014b4a7a4 Add year to Boganda's death. 2020-03-28 22:44:08 +00:00
Enji Cooper
d7f6e63df9 The .PATH throbbing I added in r359385 is no longer required
MFC with:	r359385
2020-03-28 01:16:06 +00:00
Enji Cooper
07ca59522d Check in the generated copies of the manpages
These manpages were meant to be templated once per `configure` run.

Given that we're not bound by as many constants, e.g., `--prefix` isn't
generally changing for kyua in the base system, having to generate the
manpages each build seems slightly less than optimal.

In the event that one's build environment doesn't define `$SH`, the build
will also fail until this change is introduced.

Instead of jumping through hoops dealing with shells or permissions, let's
just cut to the chase and check the generated copies into the sourcebase
under usr.bin/kyua .

MFC with:	r359260
Reported by:	Julian Stacey <jhs@berklix.com>
2020-03-28 01:08:20 +00:00
Mateusz Piotrowski
68fbe6f0b3 Do not use macros in -width
They do not expand.

MFC after:	1 day
2020-03-26 17:58:52 +00:00
Brooks Davis
daa006f84b Install expected kyua docs.
The "kyua about" command assumes these files exist causing tests
supplied devel/kyua to fail.

Fix a bug defining the default KYUA_DOCDIR so the installed files can be
found.

Reported by:	jenkins tests
Reviewed by:	lwhsu
Sponsored by:	DARPA
Differential Revision:	https://reviews.freebsd.org/D24187
2020-03-26 17:34:17 +00:00
Brooks Davis
b0d29bc47d Import the kyua test framework.
Having kyua in the base system will simplify automated testing in CI and
eliminates bootstrapping issues on new platforms.

The build of kyua is controlled by WITH(OUT)_TESTS_SUPPORT.

Reviewed by:	emaste
Obtained from:	CheriBSD
Sponsored by:	DARPA
Differential Revision:	https://reviews.freebsd.org/D24103
2020-03-23 19:01:23 +00:00
Mateusz Piotrowski
c0f2b64a89 Use -F instead of -f in tail(1) examples
There is an example in tail(1) manual page explaining how to use tail(1) to
track the contents of /var/log/messages. The example uses the -f flag to
follow the file. The problem with the -f flag is that it cannot handle the
situation where /var/log/messages is rotated. Hence, use -F instead in the
example.

Reviewed by:	asomers
MFC after:	3 days
Differential Revision:	https://reviews.freebsd.org/D24157
2020-03-22 21:51:50 +00:00
Mateusz Piotrowski
6ac25cd4ac Document that posixshmcontrol first appeared in 12.1
Also while here, I am addressing some linting issues.

PR:	243132
Submitted by:	Noah Altunian <nbaltunian gmail com>
Approved by:	bcr (mentor)
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D24112
2020-03-18 15:02:09 +00:00
Ed Maste
5a2c0ab18b ldd: add aout deprecation notice
Reported by:	kib
2020-03-17 16:42:25 +00:00
Mateusz Piotrowski
3431172fa8 Tell the world how to convert gigabytes to bytes with units(1) easily
It turns out that units(1) is not as horrible to use in scripts
as I initially thought. When the --terse flag is combined
with an appropriate output format (set via --output-format),
units(1) is actually capable of producing very nice results.
For example:

    units -o %0.f -t '4 gigabytes' bytes

is is just going to print out the expected value of 4294967296.

There is no time to waste. People have to know about it.

I am adding an example for this at the top of the examples section
because this is what users are most likely looking for.

Approved by:	bcr (mentor)
Differential Revision:	https://reviews.freebsd.org/D24096
2020-03-17 10:02:59 +00:00
Pedro F. Giffuni
83735685d3 calendar(1): Updates and corrections for some calendar files.
These have an educational value and are, no doubt, an integral part of the fun
behind running the BSDs.

PR:		242909, 242918
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D23581
2020-03-15 00:49:06 +00:00
Xin LI
a0eb385c2e Remove unneeded checks for prelen.
In order to determine the type of a compressed file, we have to read
in the first four bytes which may also be important for decompression
purposes, to do that we would pass the buffer that we have already
read in, along with the size of it.

Rename header1 to fourbytes to make that explicit, and remove all
checks for prelen.

Reported by:	cem
Reviewed by:	cem
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D24034
2020-03-14 05:57:22 +00:00
Mariusz Zaborski
8838296e56 logger: capsicumize
Submitted by:	Tiger Gao <tig@freebsdfoundation.org>
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D23744
2020-03-12 19:55:51 +00:00
Ed Maste
b7a9e9d6b2 elfctl: remove memory leak
CID:		1420356
Reported by:	Coverity Scan
Sponsored by:	The FreeBSD Foundation
2020-03-11 13:51:01 +00:00
Dimitry Andric
16b9056593 Merge ^/head r358731 through r358831. 2020-03-10 07:04:05 +00:00
Dimitry Andric
da759cfa32 Remove -mlong-calls vhen building arm libraries and llvm.
Clang from 9.0.0 onwards already has the necessary relocation range
extenders, so this workaround is no longer needed (it produces longer
and slower code). Tested on real hardware, and in cross-compile
environment.

Submitted by:	mmel
2020-03-10 06:49:43 +00:00