Adhere to 80-column width.


git-svn-id: svn+ssh://svn.freebsd.org/base/head@252817 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Oops, r252810 forgot to hook the new example file (browse_packages.sh) into
the Makefile.


git-svn-id: svn+ssh://svn.freebsd.org/base/head@252822 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Remove ancient code for FreeBSD 2.x compatibility.

Reviewed by: brian, freebsd-net


git-svn-id: svn+ssh://svn.freebsd.org/base/head@252826 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Don't calculate the tag until we know that we're going to make a new menu
item entry. Also join simple NULL assignments into a single line.


git-svn-id: svn+ssh://svn.freebsd.org/base/head@252833 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Oops, r252833 was not supposed to touch this file. Back-out and recommit
this file with the rest of the files it was supposed to go with.


git-svn-id: svn+ssh://svn.freebsd.org/base/head@252834 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Add support for processing add-on modules from /usr/local/libexec/bsdconfig
(this is designed to allow new modules to be installed via ports/packages).

To prevent conflict with itself (sysutils/bsdconfig) as a port (which
installs its base modules to the above directory, it was long-ago decided
that so-called `base' modules would look different than now-defined `add-on'
modules. The structure of the contents for each is the same, but the naming
convention for the module directory must be different.

Base modules are named `[0-9][0-9][0-9].*' to allow SysV-style organization
while add-on modules must avoid this naming style and are simply listed in
alphabetical order by their module directory.

For example, a hypothetical port named `bsdconfig-jails' could install
/usr/local/libexec/bsdconfig/jails and provide `bsdconfig jails' as well as
a new menu entry in the main-menu.

Add-on modules are listed in the main-menu (when bsdconfig is executed with-
out arguments) below a separator after the last base-module.

In `bsdconfig -h' output, add-on modules are listed right alongside base
modules (sorted alphabetically in columnar fashion; left-to-right).

If a base module declares a keyword used by an add-on module, the base
module will always win when given `bsdconfig keyword' syntax.

Add-on modules should avoid declaring any keyword found in `script.subr' as
a reserved-word (`Resword') since bsdconfig also supports `bsdconfig resword'
as a fall-back if no keyword is found to be declared by any module.


git-svn-id: svn+ssh://svn.freebsd.org/base/head@252836 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Fix the build with gcc.

Gcc outputs pre-UAL asm and expects the ldcl instruction with a condition
in the form ldc<c>l, where the code produces the instruction in the UAL
form ldcl<c>. Work around this by checking if we are using clang or gcc and
adjusting the instruction.

While here correct the cmp instruction's value to include the # before the
immediate value.


git-svn-id: svn+ssh://svn.freebsd.org/base/head@252837 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
mktemp(3): Add standards section. Prefer standard header.

mktemp(), mkstemp() and mkdtemp() are available in standard <stdlib.h> and
also in <unistd.h>. Encourage use of the former by listing it in the
synopsis.


git-svn-id: svn+ssh://svn.freebsd.org/base/head@252838 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFV r252839:

Quoting illumos issue #3836:
  Currently zio_free() always puts the zio on a list for subsequent
  processing by zio_free_sync().  This is only necessary for frees that
  might need to issue reads (gang and dedup blocks).

  By processing the majority of the frees as we encounter them, we reduce
  the amount of time that the spa_sync() thread spends burning CPU and
  not doing any i/o, thus increasing the overall write throughput of the
  system.

Illumos ZFS issues:
  3836 zio_free() can be processed immediately in the common case

MFC after:	1 week


git-svn-id: svn+ssh://svn.freebsd.org/base/head@252840 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Add new privileges, PRIV_KMEM_READ and PRIV_KMEM_WRITE, used in opening
/dev/kmem and /dev/mem (in addition to traditional file permission checks).
PRIV_KMEM_READ is different from other PRIV_* checks in that it's allowed
by default.

Reviewed by:	kib, mckusick


git-svn-id: svn+ssh://svn.freebsd.org/base/head@252841 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Remove superfluous continue at end of loop. (pointy-hat)


git-svn-id: svn+ssh://svn.freebsd.org/base/head@252842 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Add the necessary code to reinstall packages. Both scripted access
(packageReinstall) and UI access have been tested successfully with a
variation of different situations including:
+ Reinstall a package for which no other packages depend
+ Purposefully do thinks like reinstall a package that is not installed
+ Try to reinstall a package which other installed packages still depend

NOTE: There is no "force" used; if a package is required by other packages,
it will not be uninstalled (and therefore no reinstall is done).


git-svn-id: svn+ssh://svn.freebsd.org/base/head@252844 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Bump up _PRIV_HIGHEST to account for PRIV_KMEM_READ/WRITE.

Submitted by:	mdf


git-svn-id: svn+ssh://svn.freebsd.org/base/head@252845 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
- Add SRC_FORCE_CHECKOUT configuration option to force svn to checkout
  the src/ tree into a directory that contains files/directories, such
  as a case where a custom kernel configuration file is specified.

- Allow specification of multiple KERNCONFs to pass to 'make release'.

- Move evaluation of NODOCS/NOPORTS earlier, and set based on how the
  release process expects these options to be evaluated.

- Wrap KERNCONF specification in double quotes, and use 'eval' so multiple
  kernel configurations do not cause the build to fail in strange ways.

- Set WITHOUT_X11 for the port build flags for the documentation toolchain
  build.  Also run 'clean distclean' targets during port build.

PR:		180192
Submitted by:	Anes Mukhametov
MFC after:	3 days
Approved by:	kib (mentor, implicit)


git-svn-id: svn+ssh://svn.freebsd.org/base/head@252846 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Add a missing unlock.


git-svn-id: svn+ssh://svn.freebsd.org/base/head@252847 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Check menuitem before calculating tag.


git-svn-id: svn+ssh://svn.freebsd.org/base/head@252848 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Check for INDEX file first before anything else when processing modules.


git-svn-id: svn+ssh://svn.freebsd.org/base/head@252849 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Hide references to mod_lock. In FreeBSD it is always acquired with the
provider lock held, so its use has no effect.


git-svn-id: svn+ssh://svn.freebsd.org/base/head@252850 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Add PCI IDs for HighPoint RocketRAID 4521, 3620, 3622 and 3640
controllers.  Update the hptiop(4) manual page to reflect this
as well as mentioning that some cards are already end-of-life.

Many thanks to Highpoint for providing this driver update.

MFC after:	1 day


git-svn-id: svn+ssh://svn.freebsd.org/base/head@252851 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Update hpt27xx(4) driver to address a problem reported by FreeNAS
user, where when more than one hpt27xx adapters are being used,
the "unit number" stays at 0.

Many thanks to HighPoint for providing this driver update.

MFC after:	1 day


git-svn-id: svn+ssh://svn.freebsd.org/base/head@252852 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f