Commit graph

540 commits

Author SHA1 Message Date
Bjoern A. Zeeb 4cb9d58026 bsdinstall: update comment related to pkg
pkg_add has been gone since 2013(?).  Refer to pkg(8) instead.

Sponsored by:	The FreeBSD Foundation
Reviewed by:	jrtc27
Differential Revision: https://reviews.freebsd.org/D44946

(cherry picked from commit ad31d47642)
2024-06-12 16:56:20 +00:00
John Baldwin 57238e6d03 bsdinstall.8: Clarify the description of ZFSBOOT_FORCE_4K_SECTORS
This variable does not set the exact sector size of the pool, but
controls the minimum sector size.  The sector size of the underlying
disks can always be larger than the minium controlled by this knob.

PR:		274513
Reported by:	Albin "a12l" Otterhäll <bugs.freebsd.org@a12l.xyz>

(cherry picked from commit 84f773037e)
2024-01-04 16:22:09 -08:00
John Baldwin a463db46a1 bsdinstall zfsboot: Don't override ZFSBOOT_FORCE_4K_SECTORS if it is null.
Only set a default value of 1 if the shell variable is unset.  This allows
installer scripts to disable the variable.

PR:		274513
Reported by:	Albin "a12l" Otterhäll <bugs.freebsd.org@a12l.xyz>
Differential Revision:	https://reviews.freebsd.org/D42319

(cherry picked from commit de82aed119)
2024-01-04 16:21:59 -08:00
Brad Davis e0f29ad461 bsdinstall: add missing init of fd variable
Missed breaking this commit into smaller pieces

Approved by:		kp

(cherry picked from commit 2c4499dcd7)
2024-01-04 16:20:33 -08:00
Brad Davis 2f47321e3f bsdinstall: Filter out devices that cannot be opened
Devices that cannot be opened are most likely the install media and
should not be listed as destinations.

Reviewed by:		allanjude
Approved by:		allanjude
Differential Revision:	https://reviews.freebsd.org/D34879
Sponsored by:		Rubicon Communications, LLC ("Netgate")

(cherry picked from commit 964ad27f1e)
2024-01-04 16:18:53 -08:00
John Baldwin 91a736d701 bsdinstall partedit: Use snprintf instead of sprintf for error messages
When generating a message for a dialog box into a static buffer, use
snprintf instead of sprintf to avoid buffer overflows.

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

(cherry picked from commit 6e8bf24073)
2024-01-04 16:16:24 -08:00
John Baldwin a403492f96 bsdinstall partedit: Use asprintf to build wrapper command for newfs
Don't abuse the message[] static buffer used elsewhere for error
messages to generate the command that actually newfs's each
filesystem.  Use asprintf to a more aptly-named 'char *command'
variable to construct the string instead.  This avoids potential bugs
from truncation of the command string.

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

(cherry picked from commit a8676bf367)
2024-01-04 16:11:11 -08:00
John Baldwin 653e8fb20e bsdinstall partedit: Replace malloc + sprintf with asprintf
This avoids potential bugs with the length passed to malloc not
matching the string written via sprintf.

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

(cherry picked from commit 51749e05e9)
2024-01-04 16:08:25 -08:00
John Baldwin a78807a2fa bsdinstall partedit: Avoid potential buffer overflow in newfs_command
Allocate the buffer holding the newfs command string dynamically
(building the string via open_memstream) rather than storing the
command into a caller-supplied buffer of unknown length.

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

(cherry picked from commit ae2fc74fe7)
2024-01-04 15:51:34 -08:00
John Baldwin c81bdb4998 bsdinstall partedit: Apply changes from scripted installs
I got a check inverted in a previous cleanup commit and as a result
partedit was only applying GEOM changes (and generating an /etc/fstab)
if it got an error reading the current GEOM mesh.  Instead, it needed
to do those actions if it succeeded in reading the mesh.

The lack of /etc/fstab meant that bsdinstall mount didn't mount
anything in a scripted install.

PR:		273723
Reported by:	Andrey Fesenko <andrey@bsdnir.info>
Reported by:	Michal Nowak <mnowak@startmail.com>
Reviewed by:	cognet, brooks
Fixes:		2309909919 bsdinstall: Handle errors from geom_gettree.
MFC after:	3 days
Differential Revision:	https://reviews.freebsd.org/D42236

(cherry picked from commit 5307bbcc03)
2024-01-04 15:43:33 -08:00
John Baldwin 70f7bf34e3 bsdinstall: Handle errors from geom_gettree.
geom_gettree probably never fails, and if it does there isn't much of
a fallback other than aborting partitioning.  However, a few places
were checking the return value and not doing anything with it
triggering a unused-but-set-variable warning.  Checking the errors
resolves the warning.

While here, check for errors in other places that weren't checking for
them at all, remove a spurious double call (the second call overwrote
the mesh structure leaking all the pointers from the first), and close
a few resource leaks on error paths.

Reviewed by:	imp, emaste
Differential Revision:	https://reviews.freebsd.org/D40779

(cherry picked from commit 2309909919)
2024-01-04 15:42:26 -08:00
John Baldwin 3c94050525 bsdinstall: Replace correct, but fragile, string builder with open_memstream.
The old one triggered a false positive -Warray-bounds from GCC (the
compiler assumed len was always 0), but it was also fragile with
manually computed lengths paired with strcat vs using a string
builder.

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

(cherry picked from commit f66a8328c3)
2024-01-04 15:16:48 -08:00
Jessica Clarke 7c9a6ac58c bsdinstall: Encode dists to valid variable names in checksum script
Currently we just strip the .txz of the dist name (and add a status_
prefix) to get the shell variable name for its status, but this doesn't
give a valid result for dists like base-dbg, kernel-dbg and lib32-dbg,
or even kernel.KERNCONF (or, combining the two, kernel.KERNCONF-dbg). As
a result, four things go wrong for such dists:

1. If there is a dot and/or a dash in the name, writing to the variable
   fails and spits an error out on stderr to the log
3. If there is a dot in the name before any dash, the syntax is always
   invalid, reading the variable fails, spits an error out on stderr to
   the log, the result is the empty string and that is interpreted as
   being 0%
2. If there is a dash in the name before any dot, and there is a dist
   whose name is the substring up to that first dash, and it has already
   had its status written to, reading the variable instead reads that
   dist's variable and so the status of that dist is displayed instead
3. If there is a dash in the name before any dot, and either there is
   not a dist whose name is the substring up to that first dash or there
   is such a dist but it has not already had its status written to,
   reading the varaible instead results in the substring after the first
   dash, including any additional string expansion syntax that follows
   (i.e. ${status_kernel-dbg:--11}, the expression used to read the
   variable, is interpreted as reading status_kernel with a default
   value of "dbg:--11")

For example, in a default install with base, kernel, kernel-dbg and
lib32, the following sequence of displays happens:

1. base is In Progress, kernel is Pending, kernel-dbg is 0% (what shows
   for the garbage input "dbg:--11") and lib32 is Pending
2. base is Passed, kernel is In Progress, kernel-dbg is In Progress
   (since kernel has now had its status written to) and lib32 is
   Pending
3. base is Passed, kernel is Passed, kernel-dbg is Passed (again, since
   that is the status of kernel, despite that kernel-dbg is being
   verified at this point) and lib32 is Pending
4. base is Passed, kernel is Passed, kernel-dbg is Passed and lib32 is
   In Progress

Fix this with a crude encoding scheme. More special characters can
easily be added if needed in future.

Note that, prior to bsddialog being used (and thus for branches this is
MFC'ed to where dialog is still used), the same problem existed but
displayed slightly differently due to a combination of different default
values and different behaviour for unintended inputs.

Fixes:		b70047d413 ("Add generation of an installation manifest containing SHA256 checksums as ...")
MFC after:	1 week

(cherry picked from commit 47d669f10e)
2023-12-13 21:52:48 +00:00
Mateusz Piotrowski 24a3cb7501 bsdinstall.8: Document BSDINSTALL_SKIP_* variables
Fixes:	17f4ded551 bsdinstall: add variables to allow skipping
MFC after:	3 days

(cherry picked from commit fea2cffb86)
2023-09-22 17:07:28 +02:00
Mateusz Piotrowski e43a460322 bsdinstall.8: Set Bl's -width correctly
MFC after:		3 days

(cherry picked from commit a8f5c9d330)
2023-09-22 17:07:28 +02:00
Warner Losh b144e70a33 Remove $FreeBSD$: two-line nroff pattern
Remove /^\.\\"\n\.\\"\s*\$FreeBSD\$$\n/

Similar commit in main:
(cherry picked from commit fa9896e082)
2023-08-23 11:43:31 -06:00
Warner Losh 023fc80ee3 Remove $FreeBSD$: one-line sh pattern
Remove /^\s*#[#!]?\s*\$FreeBSD\$.*$\n/

Similar commit in main:
(cherry picked from commit d0b2dbfa0e)
2023-08-23 11:43:30 -06:00
Warner Losh 3d497e17eb Remove $FreeBSD$: one-line .c pattern
Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/

Similar commit in main:
(cherry picked from commit 1d386b48a5)
2023-08-23 11:43:26 -06:00
Warner Losh 17da660ad5 Remove $FreeBSD$: two-line .h pattern
Remove /^\s*\*\n \*\s+\$FreeBSD\$$\n/

Similar commit in main:
(cherry picked from commit b3e7694832)
2023-08-23 11:43:21 -06:00
Warner Losh caa41f6417 spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD
The SPDX folks have obsoleted the BSD-2-Clause-FreeBSD identifier. Catch
up to that fact and revert to their recommended match of BSD-2-Clause.

Discussed with:		pfg
MFC After:		3 days
Sponsored by:		Netflix

(cherry picked from commit 4d846d260e)
2023-07-25 09:13:49 -06:00
Kyle Evans a7766860e0 bsdinstall: use the correct DISTDIR for fetching local distfiles
fetchmissingdists naturally sets BSDINSTALL_DISTDIR to a directory in
the new filesystem that it can write fetched distfiles to.  As a result,
BSDINSTALL_DISTSITE was incorrectly set to the scratch space on /mnt for
the call to distfetch when grabbing local distfiles, and it would
subsequently fail.

Switch to using the copy of BSDINSTALL_DISTDIR that we stashed off
coming into fetchmissingdists; this one is in-fact set to the path where
the local distfiles are stored.

Patch suggested by jrtc27.

Reported and tested by: Daniel O'Connor <darius dons net au>

(cherry picked from commit 12b92f3ed8)
2022-10-24 11:01:01 -05:00
Mateusz Piotrowski 55c4cfd67d beinstall.8: Update example distsites for BSDINSTALL_DISTSITE
MFC after:	1 week

(cherry picked from commit aa35037ba5)
2022-07-25 21:53:11 +02:00
Alan Somers 504ac101ba bsdinstall: allow an install script to access packages on the DVD
If installing from the DVD, mount its packages in the chroot at
/dist/packages.  That way they'll be accessible to an install script.

MFC after:	2 weeks
Sponsored by:	Axcient
Reviewed by:	gjb
Differential Revision: https://reviews.freebsd.org/D35330

(cherry picked from commit 6a02539959)
2022-07-24 09:39:58 -06:00
Alan Somers 7b9dcf5263 bsdinstall: fix prepopulating the ZFS disk menu with ZFSBOOT_DISKS
If the ZFSBOOT_DISKS variable is set to one or more disk names, then
those disks should be preselected in the disk menu.  However, the code
wasn't correctly setting the variable, leaving all disks unselected.

MFC after:	2 weeks
Sponsored by:	Axcient
Reviewed by:	dteske
Differential Revision: https://reviews.freebsd.org/D35331

(cherry picked from commit caf73e5857)

Fix a memory leak from caf73e5857

Don't shadow an already-local variable with another local declaration.

Reported by:	dteske
MFC after:	13 days
MFC with:	caf73e5857
Sponsored by:	Axcient
Differential Revision:	https://reviews.freebsd.org/D35331

(cherry picked from commit 77d678b7a4)
2022-07-24 09:39:44 -06:00
Alan Somers 9e4047d9d9 bsdinstall: use gpt/efiboot0 label in /etc/fstab
Otherwise, boot will hang if the numbering of disks has changed since
initial install.

MFC after:	2 weeks
Sponsored by:	Axcient
Reviewed by:	brd
Differential Revision: https://reviews.freebsd.org/D35309

(cherry picked from commit 7919c76dbd)
2022-07-24 09:39:26 -06:00
Marcin Wojtas fec5791f98 Revert "bsdinstall: add knob to set ASLR sysctls"
This reverts commit 020f411255.

Because now ASLR is enabled by default for 64-bit architectures
and the purpose of the installation menu is to allow choosing
additional 'mitigation'/'hardening' options that are originally
disabled, remove the ASLR knob from bsdinstall.

Discussed with: emaste
Obtained from: Semihalf
Sponsored by: Stormshield

(cherry picked from commit bf410c6eda)
2022-07-19 11:37:31 +02:00
Marc Fonvieille 3a0fcdb37d bsdinstall/scripts/docsinstall: Add Indonesian Documentation
Add Indonesian Documentation to docinstall menu.

Approved by:	doceng (implicit) re (gjb, implicit)
MFC after:	1 week

(cherry picked from commit 45ef6b4b5d)
2022-06-17 16:31:01 +02:00
Corvin Köhne 95c6bc5a03 bsdinstall/script: umount before zpool export
When running zpool export first, boot/efi and dev is still mounted so
zpool export fails. By running bsdinstall umount first the pool can be
cleanly exported.

Reviewed by:		emaste
Differential Revision:	https://reviews.freebsd.org/D35114
Sponsored by:		Beckhoff Automation GmbH & Co. KG
MFC After:		3 days

(cherry picked from commit 450b4ac23c)
2022-05-16 17:24:56 +02:00
Corvin Köhne 45eb93a964 bsdinstall: stop messing with file descriptors
Throughout the bsdinstall script fd 3 is used by f_dprintf (set through
$TERMINAL_STDOUT_PASSTHRU). By closing file descriptor 3 here, the
final f_dprintf "Installation Completed ... does not work anymore.

By putting the code into a subshell, file descriptors can be edited
without interference with the calling script.

Reviewed by:		emaste
Differential Revision:	https://reviews.freebsd.org/D35113
Sponsored by:		Beckhoff Automation GmbH & Co. KG
MFC after:		3 days

(cherry picked from commit 1f7746d81f)
2022-05-16 17:24:56 +02:00
Alexander Motin 4340533721 GEOM: Introduce gctl_add_param() API.
Make gctl_add_param() API public, allowing more precise control over
parameter flags.  Previously it was impossible to properly declare
write-only ASCII parameters, used for result reporting, they were
declared as read-write binary instead, that was not nice.

MFC after:	1 month

(cherry picked from commit 2117cdd4b4)
2022-04-05 22:07:40 -04:00
Navdeep Parhar 73936ae305 bsdinstall: Fix typo (Instalation -> Installation).
(cherry picked from commit 5104dfbeff)
2022-03-04 13:10:59 -08:00
Ed Maste eaeff15960 bsdinstall: Remove unused sysctl.h header #include
(cherry picked from commit 3e5bff102b)
2022-02-08 15:50:32 -05:00
Emmanuel Vadot 52ce808aba bsdinstall: zfsboot: Prompt user for zpool name if the pool already exists
If one install FreeBSD on multiple disks (say 13 and CURRENT) the first created
pool will always be used.
Prompt the user for a new pool name if we detect that the default or supplied one
already exists.

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

(cherry picked from commit 9935b0e8ea)
2021-12-30 10:10:05 +01:00
Emmanuel Vadot 477fbe6732 bsdinstall: bootconfig: Try to clean old efi boot entries
If one install FreeBSD on the same machine multiple times in a row or
on different harddrive they have a lot of 'FreeBSD' efi boot entries added.
With this patch we now do :
- If there is no 'FreeBSD' entry we add one like before
- If there is one or more entries we ask the user if they want to delete
  them all and add a new one
  - If they say yes we do that
  - If they say no we prompt them an inputbox so they can enter a different
    entry name if they want, it defaults to 'FreeBSD'

Reviewed by:	bapt, imp
MFC after:	2 weeks
Sponsored by:	Beckhoff Automation GmbH & Co. KG
Differential Revision:	https://reviews.freebsd.org/D33330

(cherry picked from commit 40c928e7b8)
2021-12-30 10:09:57 +01:00
Alfredo Dal'Ava Junior 060c97abb0 powerpc64: make autoboot possible on powernv machines
It's required to specify a default boot option in order to make
petitboot's autoboot feature work.

Tested on Raptor Blackbird

Reviewed by:	imp, luporl
MFC after:	2 days
Sponsored by:	Instituto de Pesquisas Eldorado (eldorado.org.br)
Differential Revision:	https://reviews.freebsd.org/D32838

(cherry picked from commit b6644f529c)
2021-12-01 19:41:49 -03:00
Mateusz Piotrowski 05514f6668 bsdinstall: Fix mirror selection
This is a follow-up to 2697622687,
which fixed 2 out of 3 broken uses of the mirrorselect script.

Reviewed by:	emaste
Approved by:	emaste (src)
MFC after:	7 days
Differential Revision:	https://reviews.freebsd.org/D32927

(cherry picked from commit 4042b356a0)
2021-11-18 07:46:25 +01:00
Renato Botelho c3c458ce3c bsdinstall: Only show menu if there are more items to be installed
Obtained from:	Rubicon Communications, LLC ("Netgate")
Sponsored by:	Rubicon Communications, LLC ("Netgate")

(cherry picked from commit 95f0da5be1)
2021-07-27 16:05:41 -04:00
Ryan Moeller 4b74458ddd bsdinstall: Avoid double-mounting /dev
After 34766aa8cb we are mounting and
unmounting devfs elsewhere already.

Reviewed by:	nwhitehorn
MFC after:	1 week
Sponsored by:	iXsystems, Inc.
Differential Revision:	https://reviews.freebsd.org/D30877

(cherry picked from commit b50db44f02)
2021-07-06 17:04:28 +00:00
Nathan Whitehorn 5a4dffac60 Fix scripted installation from media without local distfiles.
The bsdinstall script target did not have the infrastructure to fetch
distfiles from a remote server the way the interactive installer does
on e.g. bootonly media. Solve this by factoring out the parts of the
installer that deal with fetching missing distributions into a new
install stage called 'fetchmissingdists', which is called by both the
interactive and scripted installer frontends.

In the course of these changes, cleaned up a few other issues with
the fetching of missing distribution files and added a warning if
fetching the MANIFEST file, which is used to verify the integrity of
the distribution files. We should at some point add cryptographic
signatures to MANIFEST so that it can be fetched safely if not present
on the install media (which it is for bootonly media).

Initial patch by: Vinícius Zavam
PR:		255659, 250928
Reviewed by:	dteske
MFC after:	4 weeks
Differential Revision:	https://reviews.freebsd.org/D27121

(cherry picked from commit 40923b0c81)
2021-06-25 20:35:04 -04:00
Philip Paeps f36e15feb0 bsdinstall: add a new mirror in Bulgaria
Provided by Telepoint Mirror Service.

Reported by:	Valentin Nikolov <mirror@telepoint.bg>

(cherry picked from commit 7daa45becf)
2021-06-20 11:21:39 +08:00
Nathan Whitehorn 4aaf6dd0a6 Fix scripted installs on EFI systems using ZFS root with zfsboot.
Unlike attended installations, scripted installs did not mount non-ZFS
partitions when ZFS root (via zfsboot) was selected. Since this included
the ESP, the EFI loader was not installed. Copy logic from the
attended-install path to make this work.

PR:		255824, 255081
MFC after:	1 week
Obtained from:	Mark Huizer

(cherry picked from commit 34766aa8cb)
2021-05-28 09:43:35 -04:00
Nathan Whitehorn 5ec4eb443e Add a new mode to the scripted partition editor for variant disk names.
If the disk parameter "DEFAULT" is set in place of an actual device name,
or no disk is specified for the PARTITIONS parameter, the installer will
follow the logic used in the automatic-partitioning mode, in which it
will either provide a selection dialog for one of several disks if
several are present or automatically select it if there is only one. This
simplifies the creation of fully-automatic installation media for
hardware or VMs with varying disk names.

Suggested by:	Egoitz Aurrekoetxea <egoitz@sarenet.es>
MFC after:	3 weeks
Relnotes:	yes

(cherry picked from commit 5140034cc0)
2021-04-15 23:18:02 -04:00
Nathan Whitehorn d6dfcb6b27 Tweak language involving ZFS installation; no content changes.
(cherry picked from commit b8639a1098)
2021-04-12 10:00:10 -04:00
Nathan Whitehorn 7bcb10d210 Add some general notes about scripted installations.
(cherry picked from commit 3b20b988e0)
2021-04-12 10:00:09 -04:00
Nathan Whitehorn 63a9b1641a Include examples of how to build script-install media.
(cherry picked from commit c8923d191d)
(cherry picked from commit 9f88bee146)
2021-04-12 10:00:02 -04:00
Nathan Whitehorn c87050f027 Improve example install scripts, making them simpler and more robust.
In particular:
- There is no need to do anything with gpart (the installer does that
  for you).
- There is no need to specify the network interface, since we have
  an option for defaults.

(cherry picked from commit f91026bf46)
2021-04-12 09:58:49 -04:00
Nathan Whitehorn e37df024e0 Clarify that scripted installations don't require specification of boot
partitions, as there seems to be widespread confusion on this point.

MFC after:	1 day

(cherry picked from commit e8b4c5a622)
2021-04-12 09:58:43 -04:00
Ryan Moeller 16443ffd41 bsdinstall: Drop vestigial bsdinstall-esps cleanup
This is not needed after 0b7472b3d8.

MFC after:	3 days
Sponsored by:	iXsystems, Inc.
Reviewed by:	imp
Differential Revision:	https://reviews.freebsd.org/D29325

(cherry picked from commit b07b7aec65)
2021-03-29 09:34:12 -04:00
Nathan Whitehorn 4601382e13 Fix scripted installs on EFI systems after default mounting of the ESP.
Because the ESP mount point (/boot/efi) is in mtree, tar will attempt to
extract a directory at that point post-mount when the system is installed.
Normally, this is fine, since tar can happily set whatever properties it
wants. For FAT32 file systems, however, like the ESP, tar will attempt to
set mtime on the root directory, which FAT does not support, and tar will
interpret this as a fatal error, breaking the install (see
https://github.com/libarchive/libarchive/issues/1516). This issue would
also break scripted installs on bare-metal POWER8, POWER9, and PS3
systems, as well as some ARM systems.

This patch solves the problem in two ways:
- If stdout is a TTY, use the distextract stage instead of tar, as in
  interactive installs. distextract solves this problem internally and
  provides a nicer UI to boot, but requires a TTY.
- If stdout is not a TTY, use tar but, as a stopgap for 13.0, exclude
  boot/efi from tarball extraction and then add it by hand. This is a
  hack, and better solutions (as in the libarchive ticket above) will
  obsolete it, but it solves the most common case, leaving only
  unattended TTY-less installs on a few tier-2 platforms broken.

In addition, fix a bug with fstab generation uncovered once the tar issue
is fixed that umount(8) can depend on the ordering of lines in fstab in a
way that mount(8) does not. The partition editor now writes out fstab in
mount order, making sure umount (run at the end of scripted, but not
interactive, installs) succeeds.

PR:		254395
Approved by:	re (gjb)
Reviewed by:	gjb, imp
MFC after:	3 days
Differential Revision:	https://reviews.freebsd.org/D29380

(cherry picked from commit c2f16c595e)
2021-03-23 15:21:33 -04:00
Nathan Whitehorn 611d83116a Mount the EFI system partition (ESP) on newly-installed systems and VM
images.

Per hier(7), the ESP will be mounted at /boot/efi. On UFS systems,
any existing ESP will be reused and mounted there; otherwise, a new one
will be made. On ZFS systems, space for an ESP is allocated on all disks
in the root pool, but only the partition actually used to boot is set up
and mounted.

This makes future upgrades of the EFI loader easier (upgrade scripts can
just change /boot/efi) and also greatly simplifies the parts of the
installer involved in initialization of the ESP. It also makes the
installer's behavior correspond to the documentation in hier(7).

Reviewed by:		imp, tsoome, bdragon
Approved by:		re (gjb)
Relnotes:		yes
Differential Revision:	https://reviews.freebsd.org/D28897

(cherry picked from commit 0b7472b3d8)
(cherry picked from commit 2c26d77d98)
(cherry picked from commit e77cf2a4ab)
(cherry picked from commit e70eb40271)
2021-03-09 09:22:58 -05:00