summaryrefslogtreecommitdiff
path: root/static/openbsd/man1
diff options
context:
space:
mode:
authorJacob McDonnell <jacob@jacobmcdonnell.com>2026-04-25 14:02:27 -0400
committerJacob McDonnell <jacob@jacobmcdonnell.com>2026-04-25 14:02:27 -0400
commit6d8bdc65446a704d0750217efd05532fc641ea7d (patch)
tree8ae6d698b3c9801750a8b117b3842fb369872a3a /static/openbsd/man1
parent2f467bd7ff8f8db0dafa40426166491d7f57f368 (diff)
docs: OpenBSD Man Pages Added
Diffstat (limited to 'static/openbsd/man1')
-rw-r--r--static/openbsd/man1/Makefile31
-rw-r--r--static/openbsd/man1/build-debug-info.181
-rw-r--r--static/openbsd/man1/check-lib-depends.1141
-rw-r--r--static/openbsd/man1/clang-local.1151
-rw-r--r--static/openbsd/man1/clean-old-distfiles.1120
-rw-r--r--static/openbsd/man1/dpb-replay.160
-rw-r--r--static/openbsd/man1/dpb.11808
-rw-r--r--static/openbsd/man1/gcc-local.1408
-rw-r--r--static/openbsd/man1/help.1197
-rw-r--r--static/openbsd/man1/intro.173
-rw-r--r--static/openbsd/man1/outdated-perl-ports.145
-rw-r--r--static/openbsd/man1/pkg_check-manpages.160
-rw-r--r--static/openbsd/man1/pkg_check-problems.1191
-rw-r--r--static/openbsd/man1/pkg_check-version.167
-rw-r--r--static/openbsd/man1/pkg_outdated.148
-rw-r--r--static/openbsd/man1/pkg_subst.1101
-rw-r--r--static/openbsd/man1/port-getpkgpath-helper.136
-rw-r--r--static/openbsd/man1/port-resolve-lib-helper.174
-rw-r--r--static/openbsd/man1/port-search-helper.149
-rw-r--r--static/openbsd/man1/portbump.1155
-rw-r--r--static/openbsd/man1/portcheck.1152
-rw-r--r--static/openbsd/man1/portgen.1113
-rw-r--r--static/openbsd/man1/portimport.179
-rw-r--r--static/openbsd/man1/portlock.151
-rw-r--r--static/openbsd/man1/portslogger.161
-rw-r--r--static/openbsd/man1/proot.1302
-rw-r--r--static/openbsd/man1/register-plist.1143
-rw-r--r--static/openbsd/man1/update-patches.1100
-rw-r--r--static/openbsd/man1/update-plist.1323
29 files changed, 5220 insertions, 0 deletions
diff --git a/static/openbsd/man1/Makefile b/static/openbsd/man1/Makefile
new file mode 100644
index 00000000..7b5e472e
--- /dev/null
+++ b/static/openbsd/man1/Makefile
@@ -0,0 +1,31 @@
+MAN = build-debug-info.1 \
+ check-lib-depends.1 \
+ clang-local.1 \
+ clean-old-distfiles.1 \
+ dpb-replay.1 \
+ dpb.1 \
+ gcc-local.1 \
+ help.1 \
+ intro.1 \
+ outdated-perl-ports.1 \
+ pkg_check-manpages.1 \
+ pkg_check-problems.1 \
+ pkg_check-version.1 \
+ pkg_outdated.1 \
+ pkg_subst.1 \
+ port-getpkgpath-helper.1 \
+ port-resolve-lib-helper.1 \
+ port-search-helper.1 \
+ portbump.1 \
+ portcheck.1 \
+ portgen.1 \
+ portimport.1 \
+ portlock.1 \
+ portslogger.1 \
+ proot.1 \
+ register-plist.1 \
+ update-patches.1 \
+ update-plist.1
+
+include ../../mandoc.mk
+
diff --git a/static/openbsd/man1/build-debug-info.1 b/static/openbsd/man1/build-debug-info.1
new file mode 100644
index 00000000..884ec81b
--- /dev/null
+++ b/static/openbsd/man1/build-debug-info.1
@@ -0,0 +1,81 @@
+.\" $OpenBSD: build-debug-info.1,v 1.3 2021/03/01 17:56:16 jmc Exp $
+.\"
+.\" Copyright (c) 2019 Marc Espie <espie@openbsd.org>
+.\"
+.\" Permission to use, copy, modify, and distribute this software for any
+.\" purpose with or without fee is hereby granted, provided that the above
+.\" copyright notice and this permission notice appear in all copies.
+.\"
+.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+.\"
+.Dd $Mdocdate: March 1 2021 $
+.Dt BUILD-DEBUG-INFO 1
+.Os
+.Sh NAME
+.Nm build-debug-info
+.Nd generate packing-lists and Makefiles for debug packages
+.Sh SYNOPSIS
+.Ev PORTSDIR Ns = Ns Ar path
+.Nm
+.Op Fl mnqvx
+.Fl P Ar pkgdir
+.Fl -
+.Ar pkg_create_args ...
+.Sh DESCRIPTION
+.Nm
+is a helper script for generating debug package information in
+.Xr bsd.port.mk 5 ,
+with similar calling conventions to
+.Xr update-plist 1 .
+.Pp
+Along with options and environment variables,
+.Nm
+uses the exact same options and arguments that would be passed to
+.Xr pkg_create 1 .
+Since
+.Xr pkg_create 1
+normally takes one single actual
+.Ar pkgname ,
+there is no ambiguity in
+.Ev MULTI_PACKAGES
+situations.
+.Pp
+The first set of arguments correspond to the
+.Sq default package .
+.Pp
+The options are as follows:
+.Bl -tag -width Ds
+.It Fl P Ar pkgdir
+directory used for generating output (mandatory).
+.It Fl q
+Quiet mode.
+Do not display status progress messages.
+Note that this is not the opposite of verbose mode.
+.It Fl v
+Verbose mode.
+Explain about directories stripped from dependencies.
+Note that this is not the opposite of quiet mode.
+.El
+.Pp
+.Nm
+will read each packing-list
+.Ar list
+and generate a corresponding
+.Ar debug-list
+under
+.Ar pkgdir .
+.Pp
+The full list of Makefile rules needed to generate those files and
+directories will be written as
+.Ar pkgdir/Makefile .
+.Sh SEE ALSO
+.Xr pkg_add 1 ,
+.Xr pkg_create 1 ,
+.Xr update-plist 1 ,
+.Xr bsd.port.mk 5
diff --git a/static/openbsd/man1/check-lib-depends.1 b/static/openbsd/man1/check-lib-depends.1
new file mode 100644
index 00000000..0a8c41e3
--- /dev/null
+++ b/static/openbsd/man1/check-lib-depends.1
@@ -0,0 +1,141 @@
+.\" $OpenBSD: check-lib-depends.1,v 1.6 2024/05/24 11:52:45 op Exp $
+.\"
+.\" Copyright (c) 2010 Marc Espie <espie@openbsd.org>
+.\"
+.\" Permission to use, copy, modify, and distribute this software for any
+.\" purpose with or without fee is hereby granted, provided that the above
+.\" copyright notice and this permission notice appear in all copies.
+.\"
+.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+.\"
+.Dd $Mdocdate: May 24 2024 $
+.Dt CHECK-LIB-DEPENDS 1
+.Os
+.Sh NAME
+.Nm check-lib-depends
+.Nd scan port for shared libraries
+.Sh SYNOPSIS
+.Nm check-lib-depends
+.Op Fl fimqx
+.Op Fl B Ar destdir
+.Op Fl d Ar pkgrepo
+.Op Fl D Ar directory
+.Op Fl F Ar missing
+.Op Fl O Ar dest
+.Op Fl S Ar VAR Ns = Ns Ar value
+.Op Fl s Ar source
+.Op Ar package ...
+.Sh DESCRIPTION
+.Nm
+scans a port or package for shared libraries, and verify that all of them
+are properly recorded.
+.Pp
+.Nm
+can either scan files from a built port after the
+.Ar fake stage
+from the
+.Ev WRKINST
+directory, or look directly inside a
+.Ar package .
+.Pp
+Likewise, it can also verify dependencies of installed packages,
+or figure them out directly from the port directory.
+.Pp
+.Nm
+actually consists of two distinct stages:
+.Bl -bullet
+.It
+scan all binaries inside a package to extract libraries and rpaths,
+using
+.Xr objdump 1 .
+.It
+compare those libraries against the port's registered dependencies
+and report problems.
+.El
+.Pp
+The options are as follows:
+.Bl -tag -width keyword
+.It Fl B Ar destdir
+Scan files under
+.Ar destdir .
+.It Fl d Ar pkgrepo
+Look for all needed packages under directory
+.Ar pkgrepo .
+.It Fl D Ar directory
+Create debug log files under
+.Ar directory
+that show in more details the run of
+.Xr objdump 1 .
+.It Fl f
+Give full reports of every file that requires a missing library.
+.It Fl F Ar missing
+Works in tandem with
+.Fl S .
+Allow backsubstituting even if the
+.Ar missing
+library
+is actually not part of the actual
+.Ev WANTLIB
+of the package.
+Mostly used to waive the presence of
+.Ar pthread ,
+a mandatory dependency of C++ libraries on some architectures.
+.It Fl i
+Read packing-list from standard input.
+.It Fl m
+Always show progress-meter, even if not run from terminal.
+.It Fl O Ar dest
+Save result of first stage in file
+.Ar dest .
+.It Fl q
+Be quiet, do not emit
+.Sq Extra:
+wantlibs unless there's also an actual problem.
+.It Fl S Ar var Ns = Ns Ar value
+Recognize list of libraries listed in a variable, and replace said list
+with variable value.
+For instance,
+.Fl S Ar COMPILER_LIBCXX Ns = Ns Ar stdc++
+will replace
+.Sq stdc++
+with
+.Sq ${COMPILER_LIBCXX}
+in
+.Ev WANTLIB
+lists for compatibility with both clang and gcc.
+Order matters.
+The first
+.Fl S
+option will be handled first.
+.It Fl s Ar src
+Don't scan, directly read result of first stage from file
+.Ar src .
+.It Fl x
+Don't show progress-meter, even if run from terminal.
+.El
+.Pp
+If no
+.Ar package
+is given, and the
+.Fl i
+option is used,
+.Nm
+will retrieve the packing-list from stdin, and scan the package according
+to other options.
+.Sh SEE ALSO
+.Xr ldd 1 ,
+.Xr objdump 1 ,
+.Xr bsd.port.mk 5 ,
+.Xr elf 5
+.Sh BUGS
+Currently,
+.Nm
+doesn't handle libraries living in subdirectories of
+.Sq ${LOCALBASE}
+correctly.
diff --git a/static/openbsd/man1/clang-local.1 b/static/openbsd/man1/clang-local.1
new file mode 100644
index 00000000..6cc7e0d6
--- /dev/null
+++ b/static/openbsd/man1/clang-local.1
@@ -0,0 +1,151 @@
+.\" $OpenBSD: clang-local.1,v 1.24 2024/06/02 15:40:43 deraadt Exp $
+.\"
+.\" Copyright (c) 2016 Pascal Stumpf <pascal@stumpf.co>
+.\"
+.\" Permission to use, copy, modify, and distribute this software for any
+.\" purpose with or without fee is hereby granted, provided that the above
+.\" copyright notice and this permission notice appear in all copies.
+.\"
+.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+.\"
+.\"
+.Dd $Mdocdate: June 2 2024 $
+.Dt CLANG-LOCAL 1
+.Os
+.Sh NAME
+.Nm clang-local
+.Nd OpenBSD-specific behavior of LLVM/clang
+.Sh DESCRIPTION
+On
+.Ox ,
+the LLVM/clang compiler exhibits the following characteristics:
+.Bl -dash
+.It
+.Nm clang
+does not search under
+.Pa /usr/local
+for include files or libraries:
+as a system compiler, it only searches the system paths by default.
+.It
+.Nm clang
+comes with stack protection enabled by default, equivalent to the
+.Fl fstack-protector-strong
+option on other systems.
+The system will report any violation of the stack protector cookie along
+with the function name via
+.Xr syslog 3
+at
+.Dv LOG_CRIT
+priority.
+.It
+.Nm clang
+will generate PIE code by default, allowing the system to load the resulting
+binary at a random location.
+This behavior can be turned off by passing
+.Fl fno-pie
+to the compiler and
+.Fl nopie
+to the linker.
+It is also turned off when the
+.Fl pg
+flag is used.
+.It
+The
+.Fl fstrict-aliasing
+option is turned off by default unless
+.Fl Ofast
+has been selected.
+.It
+.Nm clang
+does not store its version string in objects.
+There is no option to control this.
+.It
+The
+.Fl p
+flag is an alias of
+.Fl pg .
+.It
+.Nm clang
+does not warn for passing pointer arguments or assignment with
+different signedness outside of
+.Fl pedantic .
+This can be
+re-enabled with the
+.Fl Wpointer-sign
+flag.
+.It
+The warning option
+.Fl Waddress-of-packed-member
+is disabled by default.
+.It
+Color diagnostic messages are disabled by default and can be re-enabled with
+.Fl fdiagnostics-color .
+.It
+The
+.Fl fwrapv
+option to treat signed integer overflows as defined is enabled by default to
+prevent dangerous optimizations which could remove security critical overflow
+checks.
+.It
+The base system includes the ubsan_minimal sanitizer runtime
+but not the fully-featured ubsan runtime.
+See the documentation for the
+.Fl fsanitize-minimal-runtime
+flag.
+.It
+The
+.Xr malloc 3 ,
+.Xr calloc 3 ,
+.Xr realloc 3 ,
+.Xr strdup 3 ,
+.Xr strndup 3 ,
+.Xr valloc 3
+and
+.Xr free 3
+builtins are disabled to prevent undesirable optimizations of calls to
+these functions.
+.It
+.Nm clang
+includes a security pass that exchanges some ROP-friendly instructions
+with safer alternatives on i386 and amd64.
+This can be disabled with the
+.Fl fno-fixup-gadgets
+option.
+.It
+.Nm clang
+includes a security pass that can clear the return address on the
+stack upon return from calling a function, on i386 and amd64.
+This can be enabled with the
+.Fl fret-clean
+option.
+.It
+.Nm clang
+includes the retguard security feature on amd64, arm64, mips64, powerpc
+and powerpc64.
+This feature can be disabled with the
+.Fl fno-ret-protector
+or
+.Fl fno-stack-protector
+options.
+.It
+.Nm clang
+has
+.Fl mretpoline
+enabled by default on amd64 to protect against branch target injection attacks.
+It can be disabled with
+.Fl mno-retpoline .
+.It
+A new warning for
+.Cm %n
+format specifier usage in
+.Xr printf 3
+family functions has been added.
+.El
+.Sh SEE ALSO
+.Xr clang 1
diff --git a/static/openbsd/man1/clean-old-distfiles.1 b/static/openbsd/man1/clean-old-distfiles.1
new file mode 100644
index 00000000..041e451e
--- /dev/null
+++ b/static/openbsd/man1/clean-old-distfiles.1
@@ -0,0 +1,120 @@
+.\" $OpenBSD: clean-old-distfiles.1,v 1.5 2023/07/06 10:43:37 espie Exp $
+.\"
+.\" Copyright (c) 2012 Marc Espie <espie@openbsd.org>
+.\"
+.\" Permission to use, copy, modify, and distribute this software for any
+.\" purpose with or without fee is hereby granted, provided that the above
+.\" copyright notice and this permission notice appear in all copies.
+.\"
+.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+.\"
+.Dd $Mdocdate: July 6 2023 $
+.Dt CLEAN-OLD-DISTFILES 1
+.Os
+.Sh NAME
+.Nm clean-old-distfiles
+.Nd remove obsolete ports distfiles
+.Sh SYNOPSIS
+.Nm clean-old-distfiles
+.Op Fl mnvx
+.Op Fl e Ar except
+.Op Fl h Ar history
+.Op Ar timestamp
+.Sh DESCRIPTION
+Each time
+.Xr dpb 1
+is run for a full scan of the
+.Xr ports 7
+tree, it appends to the
+.Pa history
+log, listing files in the
+.Pa distfiles
+directory that are not, or no longer,
+needed for building the complete tree.
+It can also be run solely for that purpose, by using:
+.Pp
+.D1 $ Sy dpb Fl D Cm HISTORY_ONLY
+.Pp
+When
+.Nm
+is run later, it uses the information from the history log
+to delete unneeded files.
+When a file is deleted, the corresponding entry is also deleted
+from the history log.
+.Pp
+By default,
+.Nm
+deletes all files listed in the history log.
+.Pp
+If a
+.Ar timestamp
+is given, it is interpreted as a number of seconds since the Epoch,
+similar to the
+.Xr date 1
+.Fl r
+argument, and only those files are deleted that were recorded as
+obsolete at that time or earlier.
+It can also be set to a date in ISO8601 format, like
+.Sq 2023-07-01
+or
+.Sq 2023-07-02T12:00:00Z .
+.Pp
+For normal files,
+.Nm
+verifies
+.Xr sha256 1
+checksums prior to removal.
+It also removes links under
+.Pa by_cipher/sha256 ,
+but it trusts that the checksums for these are accurate.
+.Pp
+Options are as follows:
+.Bl -tag -width nnnn
+.It Fl e Ar except
+Read exception list from file
+.Ar except .
+Each line is the name of a file that shouldn't be removed.
+.It Fl h Ar history
+Read log from history file
+.Ar history
+instead of the default
+.Pa /usr/ports/distfiles/history .
+Turns on
+.Fl nv ,
+as this is a testing option.
+.It Fl m
+Causes
+.Nm
+to display the progress meter even if not on a terminal.
+.It Fl n
+Don't really remove files.
+.It Fl v
+Display what will be removed, as
+.Ql rm file
+lines.
+.It Fl x
+Causes
+.Nm
+to not display the progress meter.
+.El
+.Sh FILES
+.Bl -tag -width /usr/ports
+.It Pa /usr/ports
+base of the ports tree, can be overridden with env variable
+.Ev PORTSDIR .
+.It Pa /usr/ports/distfiles
+location of the distfiles repository, can be overridden with env variable
+.Ev DISTDIR .
+.It Pa /usr/ports/distfiles/history
+log of obsolete distfiles.
+.El
+.Sh SEE ALSO
+.Xr dpb 1 ,
+.Xr sha256 1 ,
+.Xr mirroring-ports 7
diff --git a/static/openbsd/man1/dpb-replay.1 b/static/openbsd/man1/dpb-replay.1
new file mode 100644
index 00000000..bb05f3ee
--- /dev/null
+++ b/static/openbsd/man1/dpb-replay.1
@@ -0,0 +1,60 @@
+.\" $OpenBSD: dpb-replay.1,v 1.5 2024/10/12 15:40:36 jmc Exp $
+.\"
+.\" Copyright (c) 2013 Marc Espie <espie@openbsd.org>
+.\"
+.\" Permission to use, copy, modify, and distribute this software for any
+.\" purpose with or without fee is hereby granted, provided that the above
+.\" copyright notice and this permission notice appear in all copies.
+.\"
+.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+.\"
+.Dd $Mdocdate: October 12 2024 $
+.Dt DPB-REPLAY 1
+.Os
+.Sh NAME
+.Nm dpb-replay
+.Nd replays dpb terminal output
+.Sh SYNOPSIS
+.Nm
+.Op Fl cC
+.Op Fl e Ar regexp
+.Op Fl s Ar speedup
+.Op Fl t Ar timestamp
+.Ar file
+.Sh DESCRIPTION
+.Nm
+is used to replay
+.Xr dpb 1
+terminal logs
+.Po
+.Pa %L/term-report.log
+.Pc
+later, usually at a much higher speed than the first run,
+for demonstration and optimization purposes.
+The options are as follows
+.Bl -tag -width keywordaaaa
+.It Fl c|C
+Color display.
+.It Fl e Ar regexp
+Start display only when information matches the
+.Xr perl 1
+regular expression
+.Ar regexp .
+.It Fl s Ar speedup
+Sets the time acceleration to
+.Ar speedup
+(defaults to 10).
+.It Fl t Ar timestamp
+Starts display when the time matches timestamp, as either
+seconds from the epoch, or a reasonable subset of ISO8601,
+like
+.Sq 2023-07-05T12:00 .
+.El
+.Sh SEE ALSO
+.Xr dpb 1
diff --git a/static/openbsd/man1/dpb.1 b/static/openbsd/man1/dpb.1
new file mode 100644
index 00000000..2e5d3494
--- /dev/null
+++ b/static/openbsd/man1/dpb.1
@@ -0,0 +1,1808 @@
+.\" $OpenBSD: dpb.1,v 1.37 2026/04/09 01:29:59 kmos Exp $
+.\"
+.\" Copyright (c) 2010-2013 Marc Espie <espie@openbsd.org>
+.\"
+.\" Permission to use, copy, modify, and distribute this software for any
+.\" purpose with or without fee is hereby granted, provided that the above
+.\" copyright notice and this permission notice appear in all copies.
+.\"
+.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+.\"
+.Dd $Mdocdate: April 9 2026 $
+.Dt DPB 1
+.Os
+.Sh NAME
+.Nm dpb
+.Nd distributed ports builder
+.Sh SYNOPSIS
+.Nm dpb
+.Op Fl acemqRrsUuvx
+.Op Fl A Ar arch
+.Op Fl B Ar chroot
+.Op Fl b Ar logfile
+.Op Fl C Ar pathlist
+.Op Fl D Ar PARAM Ns = Ns Ar value
+.Op Fl F Ar m
+.Op Fl f Ar m
+.Op Fl h Ar hosts
+.Op Fl I Ar pathlist
+.Op Fl J Ar p
+.Op Fl j Ar n
+.Op Fl L Ar logdir
+.Op Fl l Ar lockdir
+.Op Fl M Ar threshold
+.Op Fl P Ar pathlist
+.Op Fl p Ar parallel
+.Op Fl S Ar logfile
+.Op Fl X Ar pathlist
+.Op Ar pathlist ...
+.Sh DESCRIPTION
+.Nm
+is used to build ports on a cluster of machines, or on a single machine
+with several cores.
+.Nm
+walks the ports tree to figure out dependencies, and starts building ports
+as soon as it can.
+.Pp
+.Nm
+will run with sensible defaults if used without options.
+Note, however, that it will produce logs, lock files, packages, and package
+installations.
+.Pp
+If run as non-root,
+.Nm
+will warn.
+The preferred way is to run it as root (and preferably under a chroot, see
+.Xr bulk 8
+and
+.Xr proot 1
+for example setups).
+.Nm
+will then change its identity to different users as needed.
+See
+.Sx THE SECURITY MODEL OF DPB
+for details.
+.Pp
+.Nm
+can be restricted to a subset of the tree by giving it
+.Ar pathlist ...
+to build as parameters.
+.Pp
+A
+.Ar pathlist
+is either a
+.Xr pkgpath 7
+to build, or a filename that contains pkgpaths (one per line).
+.Ar pathlist
+parameters can also take the form
+.Li filename*scale
+in order to multiply the weights of all
+.Xr pkgpath 7
+in a file by a given
+.Ar scale ,
+or
+.Li pkgpath=value ,
+in order to set the weight of a given
+.Xr pkgpath 7
+to a specific value.
+.Pp
+.Nm
+supports
+.Sq hot-fixes :
+if a particular port errors out, it is possible to fix the problem, remove
+the corresponding lockfile, and
+.Nm
+will pick it up without needing to be stopped and restarted.
+.Pp
+In order to build on a cluster, the ports tree itself should be identical
+on each machine (shared through NFS or copied at start).
+.Pp
+Some directories must be shared:
+.Ev PACKAGE_REPOSITORY ,
+.Ev DISTDIR ,
+and
+.Ev PLIST_REPOSITORY .
+The
+.Ev WRKOBJDIR
+and
+.Ev LOCKDIR
+should be local to each machine, and on a high-speed partition.
+.Pp
+Also note that
+.Nm Ns 's
+logs and locks are managed by the main
+.Nm
+process, which runs locally, and hence those directories do not need to
+be shared on the cluster.
+.Pp
+Some log files ("rolling logs") are kept from one run to the run and
+stored under
+.Pa ${DISTDIR}/build-stats .
+On each run, the most recent entries for each pkgpath
+.Po
+see
+.Ar STATS_USED
+.Pc
+are used to figure out in which order things should be built.
+Meanwhile, some more entries are kept around
+.Po
+see
+.Ar STATS_BACKLOG
+.Pc
+for potential data analysis over longer periods.
+.Pp
+Option
+.Fl h Ar file
+is used to specify hosts to use, where
+.Ar file
+may contain lots of information,
+but can be as simple as a list of hosts to use, one host per line
+(however, it is recommended to also include a
+.Ar STARTUP
+script).
+.Pp
+Most filenames will go through some control sequence expansions.
+For instance, the default logdir location can be specified as
+.Pa %p/logs/%a .
+The following sequences are recognized:
+.Bl -tag -offset aaaa -width %aa
+.It Cm %a
+architecture being used.
+.It Cm %d
+date at start of
+.Nm ,
+GMtime, formatted as yyyy-mm-dd@hh:mm:ss.
+.It Cm %f
+fetch distfiles location (DISTDIR).
+.It Cm %h
+short hostname running
+.Nm .
+.It Cm %L
+logdir location.
+.It Cm %p
+portsdir location.
+.It Cm %t
+timestamp (number of seconds since January 1 1970) at start of
+.Nm .
+.It Cm %$
+Pid of the main
+.Nm
+process .
+.El
+.Pp
+Options are as follows:
+.Bl -tag -width pkgpathlong
+.It Fl A Ar arch
+Build packages for given architecture, selecting relevant hosts from the
+cluster.
+By default, the current host's architecture will be used.
+.It Fl a
+Walk the whole tree and builds all packages (default if no
+.Ar pathlist
+is given).
+.It Fl B Ar chroot
+chroot to
+.Ar chroot
+before building.
+See
+.Xr proot 1
+for preparing such an environment.
+.It Fl b Ar logfile
+Explicitly prime the heuristics module with a previous build log,
+so that packages that take a long time to build will happen earlier.
+The rolling log file under
+.Pa %f/build-stats/%a
+is automatically used.
+.It Fl C Ar pathlist
+Don't clean port working directories after build.
+Only use simple
+.Xr pkgpath 7
+in the list,
+as this does not take subpackages and flavors into account.
+.It Fl c
+Clean port working directory and log before each build.
+.It Fl D Ar PARAM Ns = Ns Ar value
+Set defined parameter to value.
+Known parameters are as follows:
+.Bl -tag -width DISP
+.It Ar ALWAYS_CLEAN
+Set to 1 if
+.Nm
+should clean work directories even if the port errored out.
+.It Ar BUILD_USER
+Default value for
+.Ar build_user
+if you want to specify it on the command line, and want to ensure even
+the small "discover PORTSDIR" activity at the beginning of
+.Nm
+is not run as root.
+.It Ar COLOR
+Set to 1 to have the normal display in color.
+.It Ar CONNECTION_TIMEOUT
+Connection timeout for ssh.
+Defaults to 10 seconds (but ssh will retry 3 times).
+.It Ar CONTROL
+Let
+.Nm
+create a unix socket of the given name for external control.
+Defaults to
+.Sq %L/control-%h-%$ .
+If no socket is wanted, explicitly set
+.Ar CONTROL
+to empty.
+.It Ar DISPLAY_TIMEOUT
+Display timeout (in seconds) while waiting for jobs to finish, so that the
+display is updated even if jobs didn't finish.
+Defaults to 10 seconds.
+.It Ar DONT_BUILD_ONCE
+By default,
+.Nm
+will use the
+.Ev BUILD_ONCE
+optimization
+.Po
+see
+.Xr bsd.port.mk 5
+.Pc
+if run with
+.Fl a :
+pseudo-flavors that disable subpackages and are not necessary for bootstrap
+will be disabled, so that the same port is built once, as far as possible.
+This flag disables that optimization, which might be desirable if you want
+to build a small subset of packages which would pull in the kitchen sink
+otherwise.
+.It Ar DONT_CLEAN_LOCKS
+By default,
+.Nm
+will clean old locks from dpb running on the same host that no longer exist,
+provided they didn't end in error.
+This is usually the right thing to do after a crash, or after killing dpb
+abruptly.
+Sometimes, one may want manual control over which locks to remove.
+.It Ar FETCH_JOBS
+Alternate way to specify the number of fetch jobs.
+.It Ar FETCH_TIMEOUT
+Timeout (in seconds) after which fetches that don't show
+any progress will be killed.
+This can be instead set in
+.Ar DEFAULT
+or
+.Ar localhost
+as the
+.Sq fetch_timeout
+property.
+.It Ar FETCH_CMD
+Override for the default
+.Ar FETCH_CMD
+coming from ports.
+This might be useful because fetching isn't chroot'd
+and is run as ${FETCH_USER}.
+.It Ar FETCH_USER
+User for all fetch activities if possible
+.Po defaults to
+.Ar _pfetch
+.Pc .
+.It Ar FTP_ONLY
+Don't fetch distfiles/don't build packages that are not allowed for ftp.
+.It Ar HISTORY_ONLY
+Don't fetch or build anything.
+Only run
+.Nm
+to figure out old distfiles and update
+.Pa %f/history .
+.It Ar LISTING_EXTRA
+Alternate way to specify
+.Fl e .
+.It Ar LOCKDIR
+Alternate way to specify the locking directory.
+.It Ar LOGDIR
+Alternate way to specify the logging directory.
+.It Ar LOG_USER
+User
+for all log files if possible
+.Po defaults to
+.Ar build_user
+.Pc .
+.It Ar MIRROR
+Applicable to fetch modes.
+If 0, will only fetch normal
+.Ev DISTFILES
+.Po
+default for
+.Nm Fl f
+.Pc .
+If 1, will also fetch extra
+.Ev SUPDISTFILES
+.Po
+default for
+.Nm Fl F
+.Pc .
+.It Ar NEVER_CLEAN
+If 1,
+.Nm
+will never clean any work directory after build.
+.It Ar NO_BUILD_STATS
+Disable reading/saving of default build stats under
+.Pa ${DISTDIR}/build-stats/${ARCH} .
+.It Ar NO_CHECKSUM
+Do not run
+.Ar checksum
+again for files already fetched.
+.It Ar NO_CURSOR
+Make the terminal cursor invisible if possible.
+Avoids flickering on slow graphics cards.
+.It Ar NO_HISTORY
+Do not update the distfiles history.
+For instance, if
+.Nm
+is run a second time after a problem during the first run.
+.It Ar NO_QUICK_SCAN
+Disable the quick scan default heuristic,
+where full bulks will start by scanning the most prominent ports
+in former builds.
+.It Ar PORT_USER
+User that can write to the ports tree.
+Not really used for anything yet.
+.It Ar RECORD
+Define a file which will save all terminal output.
+Mostly useful for presentations, as a way to save
+.Nm dpb
+output and replay it later at a faster rate.
+Defaults to
+.Pa %L/term-report.log ,
+can be set to nothing to disable.
+.It Ar STARTUP
+Define a start-up script on the command-line, override any host file contents.
+.It Ar STATS_BACKLOG
+Max number of stats (per individual pkgpath) to save in the rolling log file
+.Po
+defaults to 25
+.Pc .
+.It Ar STATS_USED
+Clamp number of stats (per individual pkgpath) used for computing build
+order
+.Po
+defaults to 10
+.Pc .
+.It Ar STUCK_TIMEOUT
+Timeout (in seconds * speed factor) after which tasks that don't show
+any progress will be killed.
+This can be instead set on a per-core basis as the
+.Sq stuck
+property.
+Note that this will always be divided by the core's speed factor.
+.It Ar SYSLOG
+Make
+.Nm
+call
+.Xr syslog 3
+on every task start/end while creating packages.
+This does produce lots of messages, it is intended to route the logging
+on another machine, while tracking down panics and other hangs.
+.It Ar WANTSIZE
+Alternate way to specify
+.Fl s .
+.El
+.It Fl e
+The listing job is extra and won't be given back to the pool when it's
+finished.
+.It Fl F Ar m
+Fetch-only mode, for mirroring hosts.
+Do not build any package but fetch everything, disregarding
+.Ev BROKEN
+and
+.Ev ONLY_FOR_ARCHS
+information.
+Create
+.Ar m
+localhost jobs for fetching files.
+.It Fl f Ar m
+Create
+.Ar m
+jobs for fetching files.
+Those are separate from the build jobs, since they don't consume cpu, and they
+run on the localhost.
+Defaults to 2.
+Can be set to 0 to bypass fetching jobs entirely,
+and reduce
+.Nm
+memory footprint by a lot.
+.It Fl h Ar hosts
+File with hosts to use for building.
+One host per line, plus properties, such as:
+.Bd -literal -offset indent
+espie@aeryn jobs=4 arch=i386
+.Ed
+.Pp
+Lines starting with a known variable name such as
+.Bd -literal -offset indent
+STARTUP=path
+.Ed
+or
+.Bd -literal -offset indent
+FETCH_JOBS=5
+.Ed
+can also be set inside a configuration file, to reduce the number of
+options you must pass on the command line.
+.Pp
+The special hostname
+.Ar DEFAULT
+can be used to preset defaults.
+It should be used at the start of the file.
+.Pp
+Use
+.Ar localhost
+to specify the local machine.
+.Nm
+will special-case it and not use
+.Xr ssh 1
+to connect.
+.Pp
+Properties are as follows:
+.Bl -tag -width memory=150
+.It always_clean=n
+Set to 0 or 1 on per-host basis.
+See
+.Ar ALWAYS_CLEAN
+parameter.
+.It arch=value
+Architecture of the concerned host.
+(there should be a startup task to check consistency, but
+currently this has to be set manually on heterogeneous networks.)
+.It build_user=user
+Use
+.Ar user
+for non root jobs if possible (defaults to
+.Xr whoami 1
+value).
+.It chroot=dir
+Chroot to
+.Ar dir
+before building.
+.It fetch_timeout=s
+Timeout (in seconds) after which fetches that don't show
+any progress will be killed.
+Only makes sense for
+.Ar DEFAULT
+or
+.Ar localhost .
+.It jobs=n
+Number of jobs to run on that host, defaults to hw.ncpuonline.
+.It junk=n
+Junk unused packages each n steps.
+See
+.Fl J
+option.
+.It memory=thr
+Build everything below that wrkdir threshold with
+.Ev USE_MFS Ns = Ns Sq Yes ,
+assuming the ports tree has been configured so that
+.Ev WRKOBJDIR_MFS
+points to a memory filesystem.
+.Ar thr
+is the sum, in KBytes, of ports that will be allowed to build in memory.
+.Nm
+understands suffixes, such as
+.Fl M Ar 2G
+or
+.Fl M Ar 500M .
+.Pp
+Note that you should always allow for some margin, as
+.Nm
+makes its decision based on the size information collected during previous
+builds, so in cases of significant updates, the work directory size will
+usually grow.
+.It nochecksum=0/1
+Defaults to 1.
+During the junk stage, run
+.Xr pkg_delete 1
+with the
+.Fl q
+(no checksum) option.
+.It parallel=p
+Run big ports on several cores.
+See
+.Fl p
+option.
+.It parallel2=p
+Run largest ports on many cores.
+Defaults to the same value as the parallel option, but can be increased for,
+say, chromium.
+.It repair=0/1
+Defaults to 1.
+Run
+.Xr pkg_add 1
+with the repair option.
+This is useful on some bulk machines which tend to crash a lot, leaving
+.Pa /var/db/pkg
+in a weird state.
+.It sf=n
+Speed factor.
+An estimate of that machine's speed with that number of jobs
+compared to other machines in the same network.
+Works better with small values, in the range of 1..50.
+The machine (or machines) with the highest speed factor will
+get access to all jobs, whereas other machines will be clamped
+to stuff which does not take too long.
+Requires previous build information to be effective.
+Defaults to 1.
+.It small=s
+Small threshold (in seconds * sf):
+ports known to build under that duration are deemed to be small, so
+.Nm
+won't bother calling fine-grained steps for patch/configure/fake.
+It will go straight to build and package instead.
+Defaults to 120 seconds.
+.It squiggles=n
+Number of squiggles on this host (see
+.Sx THE SQUIGGLE HEURISTICS
+below).
+Defaults to 1 squiggle for hosts with 4 jobs or more, 0.7 for hosts with more than 1 job,
+0 for single job hosts.
+.It stuck=s
+Stuck timeout (in seconds * sf) after which tasks which show no progress
+will get killed.
+.It timeout=s
+Defines a specific connection timeout for ssh to that host.
+.El
+.Pp
+There are no fine-grained options to control
+.Xr ssh 1
+options, as those can be specified through virtual host declarations in
+.Xr ssh_config 5 .
+.It Fl I Ar pathlist
+List of
+.Xr pkgpath 7
+to install, on the local box.
+This will also add them to the list of things to build.
+.It Fl J Ar p
+Override value for the
+.Dq junk
+property.
+Delete unneeded installed packages during the build.
+Each
+.Ar prepare
+stage is followed by a
+.Ar show-prepare-results
+stage.
+After every
+.Ar p
+new dependencies, it will be followed by a
+.Ar junk
+stage which uses
+.Xr pkg_delete 1
+with the
+.Fl aXI
+options to delete automatically installed packages that are currently
+not needed.
+.Pp
+.Nm
+keeps track of list of dependencies on a given host, by storing each
+dependency list in the lockfile corresponding to the package being built.
+.Pp
+To avoid a race condition between the
+.Ar depends
+and
+.Ar junk
+stages,
+.Nm
+allows only one job on a given host to be in the
+.Ar depends
+\&...
+.Ar junk
+stages at one time, by using a per-host lock.
+.Pp
+Defaults to
+.Ar 150 .
+Can be disabled by setting to
+.Ar 0 .
+.Pp
+Some ports, most notably cmake-based, have an annoying dependency handling
+bug: they compute their makefile dependencies based on all include files
+present, not just the ones that are actually enabled.
+Those ports' build may be broken by a
+.Ar junk
+phase that removes some unused includes that were added as makefile
+prerequisites.
+Those ports should be annotated with
+DPB_PROPERTIES = nojunk
+until that bug is fixed:
+while a port with the
+.Sq nojunk
+property is building,
+.Ar junk
+will be postponed.
+.Pp
+Those ports will be marked with a
+.Sq \&!
+in the display, to make it more obvious why junk seems to be ineffective.
+.Pp
+Note that the
+.Sq nojunk
+property is still active for ports in error, in the belief that trivial fixes
+can be made that will allow the port build to finish.
+.It Fl j Ar n
+Number of jobs to run on a single host (defaults to hw.ncpuonline).
+.It Fl L Ar logdir
+Choose a log directory.
+.Po
+Defaults to
+.Pa %p/logs/%a
+.Pc .
+.It Fl l Ar lockdir
+Choose a lock directory.
+.Po
+Defaults to
+.Pa %L/locks
+.Pc .
+Override to keep local, as locks don't really like NFS.
+.It Fl M Ar threshold
+Build ports below the memory threshold under a memory
+filesystem, as configured through
+.Ev WRKOBJDIR_MFS
+.Po
+see
+.Xr bsd.port.mk 5
+.Pc .
+.Ar threshold
+is the sum, in KBytes, of ports allowed to build there.
+.It Fl m
+Force tty-style reporting.
+.It Fl P Ar pathlist
+Read list of
+.Xr pkgpath 7
+from file.
+.It Fl p Ar parallel
+Override value for the
+.Dq parallel
+property.
+.Pp
+Run big jobs on several cores on the same host, by using
+MAKE_JOBS=k.
+.Pp
+Once such a job has started,
+.Nm
+will not start new jobs on the same host until the big job has
+stolen enough cores from other finishing jobs.
+.Pp
+Only big ports which are safe for parallel building (annotated with
+DPB_PROPERTIES = parallel in their Makefile) will be affected.
+.Pp
+It is advisable to set k to an integral fraction of the
+number of cores available on a given host.
+.Ar parameter
+can be an integer, or of the form
+.Sq /n ,
+in which case,
+.Nm
+will set k to a fraction of the total number of jobs
+on the machine, but never below 2.
+.Pp
+Defaults to
+.Sq /2 .
+.It Fl q
+Don't quit while errors/locks are around.
+.It Fl R
+Rebuild existing packages based on discrepancies between the package
+signature and what the port says it should be.
+Concretely, use to run a partial bulk build after some library change.
+.Pp
+Note that
+.Fl R
+won't always work, as rebuilding a package when another version is already
+installed is not supported.
+Building in a chroot is strongly recommended.
+.It Fl r
+Random build order.
+Disregard any kind of smart heuristics.
+Useful to try to find missing build dependencies.
+.It Fl S Ar logfile
+Read
+.Ar logfile
+as an initial workdir size log.
+.It Fl s
+Compute workdir sizes before cleaning up, and stash them in log file
+.Pa %L/size.log .
+This will also maintain a rolling log of build sizes under
+.Pa %f/build-stats/%a-size .
+In order to save time,
+.Nm
+will actually not always compute new sizes for known directories, but mostly
+for new ones, or when the package name changes.
+.It Fl U
+Insist on updating existing packages during dependency solving,
+even if the new package apparently didn't change.
+.It Fl u
+Update existing packages during dependency solving.
+Can be used to run a bulk-build on a machine with installed packages,
+but might break a bit, since some packages only build on a clean machine
+right now.
+.It Fl X Ar pathlist
+Read a list of
+.Xr pkgpath 7
+from file, and pass them along in the junk phase:
+those are packages that should stay on the machine if they've been
+installed by a dependency.
+Can be used to avoid endlessly removing/reinstalling the most common
+packages, e.g.,
+.Pa devel/gmake .
+.It Fl x
+No tty report, only report really important things, like hosts going down
+and coming back up, build errors, or builds not progressing.
+.El
+.Pp
+.Nm
+figures out in which order to build things on the fly, and constantly
+displays information relative to what's currently building.
+There's a list of what is currently running, one line per job.
+Those jobs are ordered in strict chronological order, which means that
+long running builds will tend to percolate to the top of the list.
+Normal jobs look like this:
+.Bd -literal -offset indent
+www/mozilla-firefox(build) [9452] 41% unchanged for 92 seconds
+.Ed
+.Pp
+This contains:
+.Bl -dash
+.It
+an optional
+.Sq ~
+squiggle marker (see below),
+.It
+the pkgpath being built,
+.It
+the step currently being run,
+.It
+an optional
+.Sq \&!
+for ports with the
+.Sq nojunk
+property.
+.It
+an optional
+.Sq +
+for ports built in memory.
+.It
+the pid running that task (note that this is always a pid on the host
+running dpb: for distributed builds, it will be an
+.Xr ssh 1
+to another machine),
+.It
+the current size of the log file (displayed as a percentage if previous
+build statistics are available).
+.It
+and a possible notice that things might be stuck when
+the log file doesn't change for long periods.
+.El
+.Pp
+And fetch jobs look like this:
+.Bd -literal -offset indent
+<dist-3.0.tgz(#1) [4321] 25%
+.Ed
+.Pp
+This contains:
+.Bl -dash
+.It
+the file being fetched
+.It
+the number of the
+.Ev MASTER_SITE
+being tried
+.It
+the pid of the
+.Xr ftp 1
+process (note that fetch jobs are always local).
+.It
+a progress percentage.
+.El
+.Pp
+This is followed by a host line, containing the name
+of each host used by dpb.
+They are followed by a
+.Sq `-'
+for unresponsive hosts, and the pid of the ssh master
+for distant hosts.
+.Pp
+This ends with a summary display:
+.Bl -tag -width BB=
+.It I=
+number of built packages that can be installed.
+.It B=
+number of built packages, not yet known to be installable,
+because of run depends that still need to be built.
+.It Q=
+number of packages in the queue, e.g., stuff that can be built now, assuming
+we have a free slot.
+.It T=
+number of packages to build, where dependencies are not yet resolved.
+.It F=
+number of distfiles to fetch, when
+.Fl f
+is used.
+.It !=
+number of ignored packages.
+Details in
+.Pa engine.log .
+.It L=
+list of packages that cannot currently be built because of locks.
+.It E=
+list of packages in error, that cannot currently be built.
+.It H=
+list of packages that haven't shown up yet, usually due to nfs, but
+watch out for revision bumps.
+.El
+.Pp
+If those three lists are empty, they won't even show up.
+Packages in errors may be followed by a
+.Sq \&!
+if they prevent junk from happening.
+.Pp
+Note that those numbers refer to pkgpaths known to
+.Nm .
+In general, those numbers will be slightly higher than the actual number
+of packages being built, since several paths may lead to the same package.
+.Pp
+.Nm
+uses some heuristics to try to maximise the queue as soon as possible.
+There are also provisions for a feedback-directed build, where information from
+previous builds can be used to try to build long-running jobs first.
+.Pp
+Similarly, fetches will use the continue option of
+.Xr ftp 1 ,
+since distfiles are checksummed after the fetch anyways.
+.Ss THE SQUIGGLE HEURISTICS
+However, on machines with lots of cores, the basic scheduling heuristics
+yields a tail of very small jobs, where
+.Nm
+will mostly wait on
+.Xr pkg_add 1
+to solve dependencies.
+Starting with
+.Ox 5.5 ,
+a new mechanism (squiggles) was introduced to counter-balance this effect:
+big machines devote some of their cores to
+.Sq squiggles ,
+jobs that walk the queue in reverse, thus building smallest ports first.
+As a result, small ports are built as a trickle alongside the largest ports,
+thus offsetting the negative effect of the exponential queue for a large part.
+.Pp
+Note that
+.Sq squiggles
+can be a non-integral value, usually lower than 1, in which case they
+represent the fraction of cores that should be affected to squiggles,
+as decided randomly at the start of each build.
+0.7 or 0.8 might be a good choice for dual core machines.
+.Ss DPB PROPERTIES
+The
+.Xr bsd.port.mk 5
+variable
+.Ev DPB_PROPERTIES
+may hold several annotations that only
+.Nm
+will look at.
+These properties are as follows:
+.Bl -tag -width pkgpathlong
+.It Ar lonesome
+Large port that stresses the memory limits of the machine, should be built
+alone.
+Prevents
+.Nm
+from scheduling anything else on the same host after it starts building.
+.\".It Ar memoryhog
+.It Ar noconfigurejunk
+Port that looks for unneeded dependencies during its configure phase
+(typically, optional tools like doxygen to rebuild documentation).
+Similar to
+.Ar nojunk
+but less expensive, since the configure phase is most often limited in scope.
+.It Ar nojunk
+Port that hardcodes includes in its Makefile mechanisms.
+Prevents
+.Ar junk
+from running while port is building.
+.It Ar parallel
+Port that can be built in parallel, uses
+.Ev MAKE_JOBS
+and several build slots.
+.It Ar parallel2
+Very large port that should be built in parallel, uses
+.Ev MAKE_JOBS
+and lots of build slots.
+.El
+.Sh THE SECURITY MODEL OF DPB
+When
+.Nm
+is run as root, it uses a privilege drop model instead of the
+dangerous privilege elevation model of
+.Xr doas 1 .
+When run as root, by default,
+.Ar _pbuild
+is used as the build and log user, and
+.Ar _pfetch
+is used as the fetch user.
+.Bl -bullet
+.It
+Start
+.Nm
+as root.
+.It
+.Nm
+will drop privileges for every operation except
+.Xr pkg_add 1 ,
+.Xr pkg_delete 1
+and the
+.Ar STARTUP
+script.
+.It
+For cluster builds,
+provide an
+.Xr ssh 1
+connection to distant hosts from root as root.
+.It
+.Ar build_user
+is used to build stuff locally or distantly (can be per-host), using:
+.Li chroot -u build_user /build_root
+(with
+.Pa /build_root
+=
+.Pa /
+if there is no actual chroot needed).
+It must have read access to ${DISTDIR} and ${PORTSDIR}, and write
+access to ${WRKOBJDIR}, ${PACKAGE_REPOSITORY}, and ${PLIST_REPOSITORY}.
+It does not require network access.
+.It
+.Ar LOG_USER
+is used to open all log files.
+.Ar LOG_USER
+only needs to exist locally.
+It needs write access to the log directories, including
+${DISTDIR}/build-stats.
+It does not need network access.
+.It
+.Ar FETCH_USER
+is used to fetch distfiles and handle corresponding log info.
+It needs write access to ${DISTDIR}, and network access.
+Thus,
+.Xr ftp 1
+does not happen as root.
+.It
+.Ar _dpb
+is used as a fail-safe for any other activities that do not require any rights.
+.It
+.Nm
+creates local directories as root, then gives them to the appropriate user.
+.El
+.Sh LOCKS AND ERRORS
+.Nm
+still uses the normal ports tree mechanism while building, which includes
+.Ev LOCKDIR .
+When starting up
+.Nm
+will normally detect stale locks from old dpb runs, and remove them.
+If this does not happen, builds will stay stuck in their initial stage,
+that is:
+.Ar show-prepare-results , patch , build
+depending on the port.
+A telltale message
+.Sq Awaiting lock ...
+can be found in the corresponding logfile
+.Pa paths/pkgpath.log
+.Pp
+In addition, when building a package,
+.Nm
+produces a lockfile in the locks directory, whose name is deduced from
+the basic pkgpath with slashes replaced by dots.
+This lockfile is filled with such info as the build start time or the host,
+or the needed dependencies for this pkgpath.
+.Pp
+The lockfile will also contain the name of a parent pkgpath, for paths that
+were discovered as dependencies.
+This is particularly useful for bogus paths, where it would be hard to
+know where the path came from otherwise.
+.Pp
+At the end of a successful build, these lockfiles are removed.
+The lock will stay around in case of errors.
+.Po
+raw
+value from
+.Xr wait 2
+.Pc ,
+and the name of the next task in the build pipeline (with todo=<nothing>
+in case of failure during clean-up).
+Normal list of tasks is:
+.Ar depends prepare fetch patch configure build fake package clean .
+.Pp
+At the end of each job,
+.Nm
+rechecks the locks directory for existing lockfiles.
+If some locks have vanished,
+it will put the corresponding paths back in the queue and attempt
+another build.
+.Pp
+This eases manual repairs: if a package does not build, the user can look
+at the log, go to the port directory, fix the problem, and then remove the lock.
+.Nm
+will pick up the ball and keep building without interruption.
+.Pp
+It is perfectly safe to run several
+.Nm
+in parallel on the same machine.
+This is not optimal, since each
+.Nm
+ignores the others, and only uses the lock info to avoid the other's
+current work, but it can be handy: in an emergency, one can start a second
+.Nm
+to obtain a specific package right now, in parallel with the original
+.Nm .
+.Pp
+Note that
+.Nm
+is very careful not to run two builds from the same pkgpath at the
+same time, even on different machines:
+in some cases, MULTI_PACKAGES and FLAVOR combinations may lead to the
+same package being built simultaneously, and since the package repository
+is shared, this can easily lead to trouble.
+.Pp
+Handling of shared log files and history is also done very carefully by
+systematically appending to files or using atomic mv operations.
+.Pp
+For obvious reasons, this won't work as well with masters running on distinct
+machines sharing their logs through NFS.
+.Ss BUILD CYCLES
+There are some various interdependencies in package builds that can be hard
+to trace in case something goes wrong.
+Refer to
+.Pa summary.log
+to fix those specific issues.
+.Sh AFFINITY
+.Nm
+now maintains a list of pkgpath-per-host that are currently building in the
+.Pa affinity
+directory of its log directory, along with building-in-memory status.
+.Pp
+That information is only wiped out when a given build finishes successfully.
+.Pp
+Otherwise
+.Nm
+will try to restart that build on the same host, which can be handy if you
+interrupt
+.Nm
+while it is building a large port, or if you remove a lock after fixing a
+problem.
+.Sh TAGS FOR EXCLUSIVE BUILDS
+Back when we had kde3 and kde4, they couldn't be built simultaneously,
+and a single host had to be exclusively building kde3 or kde4 ports at
+a given moment.
+.Pp
+Conflicting ports had been annotated with
+.Ev DPB_PROPERTIES Ns = Ns Ar tag:kde3 ,
+.Ev DPB_PROPERTIES Ns = Ns Ar tag:kde4
+respectively.
+.Pp
+More generally, with
+.Ev DPB_PROPERTIES Ns = Ns Ar tag:A ,
+.Ev DPB_PROPERTIES Ns = Ns Ar tag:B ,
+.Nm
+will keep track of tags.
+For instance, if host
+.Ar X
+is building ports tagged with
+.Ar A ,
+then any port with tag
+.Ar B
+will be prevented from building on
+.Ar X
+until the next
+.Ar junk
+phase.
+.Pp
+This heavily relies on the
+.Ar junk
+stage to clean-up hosts periodically,
+and it can even forcibly provoke a
+.Ar junk
+stage even if junk=0.
+.Pp
+This
+.Sq force-junk
+stage is actually implemented as a pseudo path called
+.Ar junk-proxy ,
+which does only junk.
+.Pp
+In order for builds to proceed gracefully, machines should start
+in a clean slate, without any of the problematic ports installed.
+.Pp
+As a special-case, failing ports with a tag will not
+interfere with clean-up, so that hosts do not get locked down to
+a specific tag.
+This also means that their dependencies
+may vanish before human intervention addresses the problem.
+.Pp
+This is supposed to be an exceptional hack, helpful while porters
+figure out how to remove the deadlock.
+.Sh EXTERNAL CONTROL
+By default
+.Po
+see
+.Ar CONTROL
+.Pc ,
+.Nm
+will create a Unix socket at
+.Pa %L/control-%h-%$ ,
+only accessible by
+.Ar LOG_USER ,
+that can accept a few commands, e.g.,
+usable as
+.Li nc -U path
+.Pp
+Current commands are as follows:
+.Bl -tag -offset aaaa -width addhost
+.It Cm addhost Ar hostline
+Add a new host
+.It Cm addpath Ar fullpkgpath ...
+Add fullpkgpath to scan
+.It Cm bye
+close the socket connection.
+.It Cm dontclean Ar pkgpath ...
+Add new pkgpath to list of paths that should not be cleaned after build
+.It Cm help
+Self explanatory
+.It Cm info Ar cores
+Debug info for cores (to be extended to other data)
+.It Cm rescan
+Force
+.Nm
+to rescan all ignored paths (for various errors, including bogus dependencies)
+.It Cm stats
+Show the current stats line
+.It Cm status Ar fullpkgpath ...
+Show the current status of fullpkgpath, whether it's built, installable,
+ready to build, to build later, along with current dependencies if
+applicable.
+.It Cm stub Ar fullpkgpath ...
+Stub out
+.Ar fullpkgpath
+and unlock it if needed.
+.It Cm wipe Ar fullpkgpath ...
+Wipe out an existing lock: clean up the corresponding
+.Ar fullpkgpath
+on the appropriate host, then remove all lock and affinity info pertaining
+to the port.
+.It Cm wipe-all
+Wipe out all existing packages with an error state.
+This operates like the wipe control.
+.It Cm wipehost Ar hostname ...
+Remove all information relevant to a given host from
+.Nm ,
+including running jobs, locks, and affinity information.
+.El
+.Sh SHUTTING DOWN GRACEFULLY
+.Nm
+periodically checks for a file named
+.Pa stop
+in its log directory.
+If this file exists, then it won't start new jobs, and shutdown when
+the current jobs are finished unless
+.Fl q .
+.Pp
+.Nm
+also checks for files named
+.Pa stop-<hostname>
+in its log directory.
+If such a file exists, then it won't start new jobs on
+the corresponding machine.
+.Sh FILES
+Apart from producing packages,
+.Nm
+may create temporary files as
+.Pa ${FULLDISTDIR}/${DISTFILE}.part .
+.Pp
+In fetch mode
+.Po
+.Fl f
+and
+.Fl F
+.Pc ,
+.Nm
+populates
+.Pa ${DISTDIR}/by_cipher/sha256
+with links.
+It also uses
+.Pa ${DISTDIR}/distinfo
+and
+.Pa ${DISTDIR}/history
+as a
+.Sq permanent log :
+.Bl -tag -width distinfo
+.It distinfo
+cache of distfiles checksum.
+Contains all
+.Xr sha256 1
+checksums of known files under
+.Pa ${DISTDIR} .
+Fetching uses this to avoid re-checksumming known files.
+.It history
+Log of old files under distinfo.
+After successfully scanning a full ports tree
+.Po
+.Nm Fl a
+.Pc ,
+the fetch engine knows precisely which files are needed by the build
+(and their checksums).
+Anything that is
+.Bl -bullet
+.It
+recorded in distinfo but unneeded
+.It
+recorded in distinfo but with the wrong checksum
+.It
+not recorded in distinfo, but not needed
+.El
+will be entered at the end of history as a line:
+.Pp
+.Li ts SHA256 (file) = value
+.Pp
+with
+.Ar ts
+a timestamp from Unix epoch.
+.Pp
+When cleaning up old files, with a tool such as
+.Xr clean-old-distfiles 1 ,
+it is vital to check both the checksum and
+the file name: since mirroring stores permanent links under
+.Pa by_cipher ,
+files which are still needed will appear in history under their old
+checksums, as an indication the link should be removed, but possibly not
+the file itself.
+.El
+.Pp
+If
+.Pa ${DISTDIR}
+ever becomes corrupted,
+removing
+.Pa ${DISTDIR}/distinfo
+will force
+.Nm
+into checking all files again.
+.Pp
+All those files belong to the
+.Ar FETCH_USER
+if it is defined.
+They should be readable for the
+.Ar build_user .
+.Pp
+.Nm
+also records rolling build statistics under
+.Pa ${DISTDIR}/build-stats/${ARCH} ,
+and uses them automatically
+.Po
+see
+.Ar STATS_BACKLOG
+and
+.Ar STATS_USED
+.Pc
+in the absence of
+.Fl b Ar logfile .
+That file belongs to the
+.Ar LOG_USER
+if it is defined.
+.Pp
+If
+.Fl s
+is used, size information for successful builds will be recorded under
+.Pa ${DISTDIR}/build-stats/${ARCH}-size
+.Po
+by default, location adjustable with
+.Fl S Ar sizelog
+.Pc .
+This is then reused for the mfs threshold option.
+That file also belongs to the
+.Ar LOG_USER
+if it is defined.
+.Pp
+.Nm
+also maintains a list of pkgpath frequencies
+.Pa ${DISTDIR}/build-stats/${ARCH}-dependencies ,
+filled at end of LISTING if
+.Fl a .
+This list will be automatically reused when restarting a build:
+a quick LISTING of the most important dependencies will happen
+before the general LISTING,
+in order to prime further LISTING steps with most common ports first.
+.Pp
+.Nm
+will also create a large number of log files under
+.Pa ${PORTSDIR}/logs/${ARCH} ,
+which will belong
+to
+.Ar LOG_USER
+if it is defined:
+.Bl -tag -width engine.log
+.It Pa affinity/
+Affinity information.
+One file per full pkgpath, with slash replaced by dots
+like so:
+.Pa affinity/lang.ghc,-main .
+.It Pa affinity.log
+On startup
+.Nm
+reads existing affinity information, and records it in that log,
+together with its pid.
+This log just exists to verify, along with
+.Pa engine.log ,
+whether correct affinity was heeded.
+.It Pa awaiting-locks.log
+This is purely for gathering performance statistics, about how much
+lock contention happened around
+.Xr pkg_add 1
+and
+.Xr pkg_delete 1
+usage.
+Plotting cumulated time may help in fine-tuning squiggles parameters.
+.It Pa build.log
+Actual build log.
+Each line summarizes build of a single pkgpath, as:
+.Sq pkgpath host time logsize (detailed timing)[!]
+where time is the actual build time in seconds, host is the machine name
+where this occurred, logsize is the corresponding log file size,
+and a ! is appended in case the build didn't succeed.
+.Pp
+The detailed timing info gives a run-down of the build, with clean, fetch,
+prepare, patch (actually extract+patch), configure, build, fake, package, clean
+detailed timing info.
+Note that the actual build time starts at
+.Sq extract
+and finishes at
+.Sq package .
+.It Pa built-packages.log
+The actual list of fullpkgname.tgz as they get built.
+.It Pa cpu-concurrency.log
+Shows the actual concurrency achieved as a result of job starvation /
+parallel handling.
+Only gets a new line when the value changes: pid timestamp jobs
+.It Pa debug.log
+contains various information related to the main engine spinning (RTFS, haven't
+figured that one yet) along with the more useful warning and die traces that
+happen when something wrong occurs.
+Especially useful for the warning messages that tend to be overwritten by
+subsequent displays.
+Will also contain error messages pertaining to failure at parsing existing
+lock files.
+.It Pa dist/<distfile>.log
+Log of the
+.Xr ftp 1
+process(es) that attempted to fetch the distfile.
+.It Pa control-%h-%$
+Default name for the external control socket.
+.It Pa dump.log
+A long log file generated at the end of build that yields any information
+pertinent to ports still in the
+.Sq to build
+and the
+.Sq built
+queues.
+See also
+.Pa summary.log
+for an expurged version of same.
+.It Pa engine.log
+Build engine log.
+Each line corresponds to a state change for a pkgpath and starts with the pid
+of
+.Nm ,
+plus a timestamp of the log entry.
+.Bl -tag -width BB:
+.It ^
+pkgpath temporarily put aside, because a job is running in the same directory.
+.It !
+pkgpath ignored, either directly, or indirectly because a dependency was
+ignored.
+End of the line states reason why ignored.
+.It A
+affinity mismatch: path considered for build, but not the right host,
+followed by the affinity information.
+.It B
+pkgpath built / distfile found.
+.It C
+forcible clean-up before building a port with a kde tag.
+.It E
+error in build or fetch.
+.It F
+distfile queued for download.
+.It H
+package still not found due to nfs on this run.
+.It I
+pkgpath can be installed.
+.It J
+job to build pkgpath started.
+Also records the host used for the build.
+.It K
+kde mismatch, no build until host has been cleaned up.
+.It L
+job did not start, existing lock detected.
+.It N
+job did not finish.
+The host may have gone down.
+.It P
+built package is no longer required for anything.
+.It Q
+pkgpath queued as buildable whenever a slot is free.
+.It T
+pkgpath to build / distfile to download.
+.It V
+pkgpath put back in the buildable queue, after job that was running in
+the same directory returned.
+.It W
+only happens when the external control
+.Cm wipe
+command is used: pkgpath will be cleaned up, next log entry will be
+.Sq N
+since the job did not finish and is ready to restart.
+.It X
+only happens when rescanning after an error.
+The engine temporarily locks paths that are incomplete (detained).
+These will be kept in a separate list for later examination until the
+end of the new scan.
+.It x
+only happens when rescanning after an error.
+Releases a path for building after the new scan is finished.
+.It Y
+affinity mismatch, but job will start on the wrong host anyways, as the queue
+contains no other buildable path.
+.El
+.Pp
+The engine is no longer run after each package build event
+because of performance considerations, so the
+.Sq Q
+and
+.Sq I
+changes may be delayed by a few
+.Sq B .
+.It Pa equiv.log
+Lists of equivalent pkgpaths for the build, when default flavors and default subpackages have been resolved.
+.It Pa fetch/bad.log
+List of URLs that did not lead to a correct distfile, either because
+they were not responding, or because of incorrect checksums.
+.It Pa fetch/good.log
+List of URLs that fetched correctly, along with timing statistics.
+.It Pa fetch/manually.log
+List of pkgpaths that require manual intervention, in human-readable form.
+.It Pa <hostname>.sig.log
+Complete library signature of the host.
+.It Pa init.<hostname>.log
+Captured output of the initialization job for each host.
+.It Pa junk.log
+Option
+.Fl J
+counts the number of dependencies directly added to decide when to run
+.Nm pkg_delete Fl a .
+This file sums up how many ports were built, and how many ports had
+dependencies each time
+.Nm
+decides to junk.
+.It Pa locks/
+Directory where locks are created.
+There are three types of locks:
+.Bl -bullet
+.It
+pkgpath locks for building, where the slash in a pkgpath is replaced
+with a dot like so:
+.Pa locks/devel.make
+to flatten the structure.
+.It
+distfile locks for fetching, using the distfile name without the path like so:
+.Pa locks/distfile.dist .
+.It
+host locks for dependency handling and junking, like so:
+.Pa locks/host:hostname .
+.El
+.It Pa packages/pkgname.log
+one file or symlink per pkgname.
+.It Pa paths/some/path.log
+one file or symlink per pkgpath.
+.It Pa performance.log
+Some parts of
+.Nm
+are computationally intensive, such as the engine runs to determine
+new stuff that can be built, and the actual display reports.
+.Pp
+Both those activities are rate-limited, so that
+.Nm
+doesn't run its engine at each new package build,
+and doesn't update its display every time there is a phase change.
+.Pp
+Lines tagged with
+.Sq ENG
+correspond to the engine;
+lines tagged with
+.Sq REP
+correspond to the display reports.
+.Pp
+Lines ending with a dash
+.Sq -
+correspond to new activity that didn't trigger
+a computation.
+.Pp
+Other lines will feature a plus
+.Sq +
+for normal runs, or an exclamation point
+.Sq !
+for forced runs, followed by two numbers:
+the next timestamp at which we'll be allowed to run, and
+a measure of how much time it took to run this pass.
+.Pp
+That information is mostly relevant while
+.Nm
+is building lots of small packages very quickly.
+.It Pa signature.log
+Discrepancies between hosts that prevent them from starting up.
+.It Pa size.log
+Size of work directory at the end of each build, built only with
+.Fl s .
+.It Pa stats.log
+Simple log of the B=... line summaries.
+Mostly useful for making plots and tweaking performance.
+.It Pa stop
+Not a logfile at all, but a file created by the user to stop
+.Nm
+creating new jobs.
+.It Pa stop-<hostname>
+Not a logfile at all, but created by the user to stop hostname creating
+new jobs.
+.It Pa summary.log
+A summary file generated at end of build that lists packages not built
+or not installable, along with a reason for it.
+This summarizes packages not built because of existing locks, because of
+errors, but also because they depend on something that was not built.
+.Pp
+In that last case,
+.Pa summary.log
+contains a chain of dependencies leading to the problematic package, or
+in case of build cycles, stopping at the first loop.
+.It Pa term-report.log
+Saves all terminal output, so that it can be replayed at hi speed with
+.Xr dpb-replay 1 .
+.It Pa vars.log
+Logs the directories that were walked in the ports tree for dependency
+information, including the path to a dependency that triggered this
+particular step.
+.El
+.Sh DIAGNOSTICS
+.Bl -tag -offset aaaa -width truc
+.It Waiting for hosts to finish STARTUP...
+Displayed on the console while
+.Nm
+is setting up hosts, getting essential data from the ports tree,
+running a
+.Ar STARTUP
+script, collecting base library signatures.
+.It stuck on <lockfilename>
+Display on the console when
+.Nm
+detects a "frozen" port has happened outside of
+.Nm Ns 's
+purview, namely because the ports tree itself has that specific
+port locked without
+.Nm Ns 's
+knowledge.
+See
+.Xr bsd.port.mk 5 ,
+.Xr portlock 1 .
+.It (Junk lock obtained for <host> at <time>)
+.It (Junk lock released for <host> at <time>)
+Printed in a
+.Pa paths/pkgpath.log
+file when attempting to get a
+.Sq junk lock .
+On a given host, all dependency operations are serialized.
+The dependency computation itself is handled by the main
+.Nm
+process, which needs to know exactly which dependencies are used
+at a given point, so that
+.Ar junk
+can clean up the host correctly.
+In particular,
+.Ar junk
+will not clean up dependencies already scheduled for installation.
+Ports that do not obtain the lock on first try are put to sleep.
+.It Received IO
+Printed in a
+.Pa paths/pkgpath.log
+file when woken up before trying attempting to obtain a
+.Ar junk
+lock again...
+.It Woken up <fullpkgpath>
+Printed in a
+.Pa paths/pkgpath.log
+when waking another task by sending it SIGIO,
+so that it may attempt to obtain the junk lock again.
+.It (Junk lock failure for <host> at <time>)
+All ports sleeping for a
+.Ar junk
+lock are woken at the same time, so only one of them will obtain the lock,
+and the others will fail and be put to sleep again.
+.It Short-cut: depends already handled by <fullpkgpath>
+Printed in a
+.Pa paths/pkgpath.log
+when a port wakes up after others that ran
+.Xr pkg_add 1 .
+As
+.Nm
+maintains dependencies for a given host globally, it coalesces depends lists
+together.
+.It Don't run junk because nojunk in <fullpkgpath>
+Printed in a
+.Pa paths/pkgpath.log
+while evaluating whether to run
+.Ar junk .
+Normally,
+.Ar junk
+happens at regular intervals, but ports marked
+.Sq nojunk
+will delay that.
+.Nm
+still keeps track of attempted junks.
+.It Still tainted: <bool>
+A host may have a tag that prevents building differently tagged ports.
+This will be cleansed by
+.Ar junk
+eventually.
+This prints in
+.Ar path/pkgpath.log
+to indicate whether this particular
+.Ar junk
+will keep the host tainted with a tag or not.
+.It Forced junk, retainting: <tag>
+Printed at end of
+.Ar prepare-results ,
+when an eventual junk was run even though some ports still hold a tag.
+.It Can't run junk because of lock on <fullpkgpath>
+.Ar junk
+can't happen because
+.Ar fullpkgpath
+is locked and is marked
+.Sq nojunk .
+.It Avoided depends for <dependencies>
+As dependencies are handled globally per-host, some ports can avoid
+.Xr pkg_add 1
+altogether because another port already installed the correct dependencies.
+.It SPINNING ON MAIN
+Printed in
+.Ar debug.log ,
+this is an actual bug: the engine said it can build, there are cores available,
+but
+.Nm
+can't start a new build job.
+.It SPINNING ON FETCH
+Printed in
+.Ar debug.log ,
+this is an actual bug: the engine said it can fetch, there are fetching
+cores available, but
+.Nm
+can't start a new fetch job.
+.It KILLED: <job> stuck at <somewhere>
+Printed in
+.Ar path/pkgpath.log
+when a port exceeds its timeout.
+.It !: <path> tried and didn't get it
+Printed in
+.Ar engine.log
+Scanning the port didn't give us useful information.
+See
+.Ar vars.log
+for gory details.
+.El
+.Sh BUGS AND LIMITATIONS
+.Nm
+performs best with lots of paths to build.
+When just used to build a few ports, there's a high risk of starvation
+as there are bottlenecks in parts of the tree.
+.Pp
+Fetch jobs don't deal with checksum changes yet:
+if a fetch fails because of a wrong checksum, if you update the distinfo
+file and remove the lock,
+.Nm
+won't pick it up.
+.Pp
+Note that
+.Nm
+does not manage installed packages in any intelligent way, it will just
+call
+.Xr pkg_add 1
+during its depend stage to install its dependencies.
+With
+.Fl u ,
+it will call pkg_add -r.
+With
+.Fl U ,
+it will call pkg_add -r -D installed,
+but there is nothing else going on.
+This is especially true when using
+.Fl R ,
+ensure the machine is clean of possibly older packages first, or run
+.Nm
+with
+.Fl U .
+.Pp
+In particular
+.Fl R
+and
+.Fl J
+together may lead to strange issues.
+.Pp
+On heterogeneous networks, calibration of build info and choice of speed
+factors is not perfect, and somewhat a dark art.
+Using distinct speed factors on a build log that comes from a single
+machine works fine, but using the build info coming from several machines
+does not work all that well.
+.Pp
+.Nm
+should check
+.Pa /usr/include
+and
+.Pa /usr/X11R6/include
+for consistency, but it doesn't.
+.Pp
+When a host fails consistency check, there is not yet a way to re-add it
+after fixing the problem.
+You have to stop
+.Nm ,
+cleanup and restart.
+.Pp
+The default limits in
+.Pa login.conf
+are too small for bulk builds on any kind of parallel machines.
+Bump number of processes, file descriptors, and memory.
+.Pp
+Even though
+.Nm
+tries really hard to check heterogeneous networks for sanity (checking
+shared libraries and .la files), it is still dependent on the user to
+make sure all the hosts build ports the same way.
+.Pp
+Make sure your NFS setup is consistent.
+The ports dir itself should be exported or synchronized.
+Distfiles, the package repository, and the plist repository should be exported,
+but WRKOBJDIR should not be on NFS unless you have absolutely no choice,
+or if you exhibit deep masochistic tendencies.
+Pay particular attention to discrepancies in
+.Pa /etc/mk.conf .
+.Pp
+Also,
+.Nm
+connects to external hosts through
+.Xr ssh 1 ,
+relying on
+.Xr ssh_config 5
+for any special cases.
+.Pp
+When fetching distfiles,
+.Nm
+may freeze and spin in a tight loop while the last distfiles are being fetched.
+This is definitely a bug, which has been around for quite some time, which
+is a bit difficult to reproduce, and hasn't been fixed yet.
+So if
+.Nm
+stops updating its display right around the end of fetch, you've hit the bug.
+Just kill
+.Nm
+and restart it.
+.Sh SEE ALSO
+.Xr clean-old-distfiles 1 ,
+.Xr dpb-replay 1 ,
+.Xr proot 1 ,
+.Xr pkgpath 7 ,
+.Xr bulk 8
+.Sh HISTORY
+The original
+.Nm dpb
+command was written by Nikolay Sturm.
+This version is a complete rewrite from scratch using all the stuff
+we learnt over the years to make it better.
+.Sh AUTHORS
+.An Marc Espie Aq Mt espie@openbsd.org
diff --git a/static/openbsd/man1/gcc-local.1 b/static/openbsd/man1/gcc-local.1
new file mode 100644
index 00000000..e9fad577
--- /dev/null
+++ b/static/openbsd/man1/gcc-local.1
@@ -0,0 +1,408 @@
+.\" $OpenBSD: gcc-local.1,v 1.59 2025/11/18 11:13:22 miod Exp $
+.\"
+.\" Copyright (c) 2002 Marc Espie
+.\" Copyright (c) 2003 Anil Madhavapeddy
+.\"
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY EXPRESS OR
+.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+.\" IN NO EVENT SHALL THE DEVELOPERS BE LIABLE FOR ANY DIRECT, INDIRECT,
+.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+.\"
+.Dd $Mdocdate: November 18 2025 $
+.Dt GCC-LOCAL 1
+.Os
+.Sh NAME
+.Nm gcc-local
+.Nd local modifications to gcc
+.Sh DESCRIPTION
+.Ox
+uses derivatives of
+.Xr gcc 1
+version 4.2.1.
+The software comes with specific modifications for
+.Ox :
+.Bl -dash
+.It
+For the C programming language,
+.Nm gcc
+defaults to the
+.Em gnu99
+standard,
+not
+.Em gnu89 .
+The
+.Fl std
+option can be used to select a different language standard.
+.It
+.Nm gcc
+does not search under
+.Pa /usr/local
+for include files nor for libraries:
+as a system compiler, it only searches the system paths by default.
+.It
+On all architectures where the stack is non-executable,
+trampoline code marks the smallest possible area around the trampoline stub
+executable using
+.Xr mprotect 2 .
+.It
+Trampoline code generation is disabled by default.
+Code requiring trampolines will not compile without
+.Fl ftrampolines .
+The warning flag
+.Fl Wtrampolines
+can be used to locate trampoline instances if trampoline generation
+is re-enabled.
+.It
+The
+.Fl O2
+option does not include
+.Fl fstrict-aliasing ,
+as this option causes issues on some legacy code.
+.Fl fstrict-aliasing
+is very unsafe with code that plays tricks with casts, bypassing the
+already weak type system of C.
+.It
+The
+.Fl O2
+option does not include
+.Fl fstrict-overflow ,
+as this option causes issues on some legacy code.
+.Fl fstrict-overflow
+can cause surprising optimizations to occur, possibly deleting security
+critical overflow checks.
+.It
+The
+.Fl O2
+option does not include the
+.Fl ftree-vrp
+optimization as it is known to be broken.
+.It
+.Nm gcc
+recognizes the extra format attribute syslog, to better match
+the definition of
+.Xr syslog 3 ,
+and silence erroneous warnings when used with
+.Fl pedantic .
+.It
+.Nm gcc
+recognizes the attribute
+.Cm __nonnull__ ,
+which can be used to mark arguments that can't be
+.Dv NULL .
+The printf format attribute does not imply
+.Cm __nonnull__
+for the format.
+This allows for correct format checking on the
+.Xr err 3
+function family.
+.It
+.Nm gcc
+recognizes the extra attribute
+.Cm __sentinel__ ,
+which can be used to mark varargs function that need a
+.Dv NULL
+pointer to mark argument termination, like
+.Xr execl 3 .
+This exposes latent bugs for 64-bit architectures,
+where a terminating 0 will expand to a 32-bit int, and not a full-fledged
+64-bits pointer.
+.It
+On alpha,
+.Fl mieee
+is enabled by default to enable full compliance with
+the IEEE floating point standard,
+although the
+.Dq inexact
+flag is not maintained.
+Additionally, rounding mode is dynamic.
+.It
+.Nm gcc
+comes with the
+.Dq ProPolice
+stack protection extension, which is enabled by default.
+This extension reorders local variable declarations and adds stack consistency
+checks at runtime, in order to detect stack overflows, and will attempt to
+report the problem in the system logs by calling
+.Xr syslog 3
+with a
+.Dv LOG_CRIT
+priority message:
+.Dq stack overflow in function XXX ,
+and abort the faulting process.
+It can be turned off using the
+.Fl fno-stack-protector
+command line option.
+Note that the stack protector relies on some support code in libc.
+Stand-alone programs not linked against libc must either provide their own
+support bits or use the
+.Fl fno-stack-protector
+option.
+.Pp
+There is a
+.Fl fstack-protector-all
+option that turns stack protection code on for all functions
+and disables any heuristic that flags some functions as safe.
+This extended checking has a moderate runtime cost though.
+There is a
+.Fl fstack-protector-strong
+option, similar to
+.Fl fstack-protector ,
+which includes additional functions to be protected \(em those that
+have local array definitions
+or have references to local frame addresses.
+.It
+On amd64,
+.Fl msave-args
+can be passed to the compiler to have functions save their register
+arguments on the stack, while maintaining compatibility with the
+System 5 AMD64 ABI.
+This enables tools and debuggers that understand this semantic to
+trivially generate stack traces that include function arguments.
+.It
+On all architectures,
+.Nm gcc
+generates position-independent executables
+.Pq PIEs
+by default, allowing the system to load the resulting binary
+at a random location.
+This behavior can be turned off by passing
+.Fl fno-pie
+to the compiler and
+.Fl nopie
+to the linker.
+.It
+.Nm gcc
+recognizes a new flag which is enabled by default,
+.Fl Wbounded ,
+to perform basic checks on functions which accept buffers and sizes.
+An extra attribute,
+.Cm __bounded__ ,
+has been added to mark functions that can be
+checked this way.
+.It
+.Nm gcc
+recognizes a new format attribute, kprintf, to deal with the extra format
+arguments
+.Ql %b ,
+.Ql %r ,
+and
+.Ql %z
+used in the
+.Ox
+kernel.
+.It
+.Nm gcc
+does not store its version string in objects.
+This behavior can be restored with
+.Fl fident .
+.It
+The option
+.Fl fstack-shuffle
+will randomize the order of stack variables at compile time,
+which can be helpful to find bugs.
+.It
+.Nm gcc
+will not move variables initialized with the value zero
+from the data section to the bss section.
+The default behaviour of
+.Nm gcc
+on other systems is to perform this action, which can be restored for
+.Ox
+with
+.Fl fzero-initialized-in-bss .
+.It
+.Nm gcc
+does not warn for cast expressions used as lvalues outside of
+.Fl pedantic .
+.It
+.Nm gcc
+does not warn for passing pointer arguments or assignment with
+different signedness outside of
+.Fl pedantic .
+This can be
+re-enabled with the
+.Fl Wpointer-sign
+flag.
+.It
+.Nm gcc
+recognizes the preprocessor flag
+.Fl CC
+that lets comments in macros pass through to the output (except in
+.Fl traditional
+mode).
+.It
+The warning option
+.Fl Wsystem-headers ,
+which makes
+.Nm gcc
+report warnings in systems headers,
+is enabled by default.
+.It
+.Nm gcc
+supports two extra warning options:
+.Bl -item
+.It
+.Fl Wframe-larger-than= Ns Va N
+.Po
+and its non-portable alias
+.Fl Wstack-larger-than- Ns Va N
+.Pc
+will report functions using more than
+.Va N
+bytes of stack space for their local variables.
+Stack space used for other purposes (such as register window saving,
+callee-saved registers, or outbound arguments storage)
+is not taken into account for this check.
+.It
+.Fl Wvariable-decl
+will report automatic variable declarations whose size cannot be
+determined at compile-time.
+.El
+.It
+.Nm gcc
+has backported support for the GCC binary integer constants extension,
+which was first introduced in
+.Nm gcc 4.3 .
+.It
+The behavior of
+.Fl Wshadow
+in
+.Nm gcc
+has been altered to behave similarly to
+.Nm gcc 4.8
+and not warn about variables or parameters that shadow a global
+function unless the variable or parameter is of type pointer-to-function.
+.El
+.Sh ATTRIBUTES
+The
+.Cm __bounded__
+attribute is used to type-check functions whose parameters pass fixed-length
+buffers and their sizes.
+The syntax for normal buffers is:
+.Pp
+.Ic __attribute__ Ns Po Po
+.Cm __bounded__ Ns Pq Cm __buffer__ , Va buffer , length
+.Pc Pc
+.Pp
+where
+.Fa buffer
+contains the parameter number (starting from 1) of the pointer to the buffer,
+and
+.Fa length
+contains the parameter number of the buffer length argument.
+.Pp
+.Nm gcc
+will emit a warning if the length argument is a constant larger than the
+actual size of the buffer.
+If the buffer is not a statically declared array of fixed length, no warnings
+will be generated.
+Refer to
+.Xr memcpy 3
+for an example of a function with this check.
+.Pp
+For checking strings, just use
+.Cm __string__
+instead of
+.Cm __buffer__ :
+.Pp
+.Ic __attribute__ Ns Po Po
+.Cm __bounded__ Ns Pq Cm __string__ , Va buffer , length
+.Pc Pc
+.Pp
+In addition to the checks described above, this also tests if the
+.Va length
+argument was wrongly derived from a
+.Fn sizeof "void *"
+operation.
+.Xr strlcpy 3
+is a good example of a string function with this check.
+.Pp
+If a function needs string checking like
+.Cm __string__
+but operates on element counts rather than buffer sizes, use
+.Cm __wcstring__ :
+.Pp
+.Ic __attribute__ Ns Po Po
+.Cm __bounded__ Ns Pq Cm __wcstring__ , Va buffer , count
+.Pc Pc
+.Pp
+An example of a string function with this check is
+.Xr wcslcpy 3 .
+.Pp
+Some functions specify the length as two arguments:
+the number of elements and the size of each element.
+In this case, use the
+.Cm __size__
+attribute:
+.Pp
+.Ic __attribute__ Ns Po Po
+.Cm __bounded__ Ns Pq Cm __size__ , Va buffer , nmemb , size
+.Pc Pc
+.Pp
+where
+.Va buffer
+contains the parameter number of the pointer to the buffer,
+.Va nmemb
+contains the parameter number of the number of members, and
+.Va size
+has the parameter number of the size of each element.
+The type checks performed by
+.Cm __size__
+are the same as the
+.Cm __buffer__
+attribute.
+See
+.Xr fread 3
+for an example of this type of function.
+.Pp
+If a function accepts a buffer parameter and specifies that it has to be of a
+minimum length, the __minbytes__ attribute can be used:
+.Pp
+.Ic __attribute__ Ns Po Po
+.Cm __bounded__ Ns Pq Cm __minbytes__ , Va buffer , minsize
+.Pc Pc
+.Pp
+where
+.Va buffer
+contains the parameter number of the pointer to the buffer, and
+.Va minsize
+specifies the minimum number of bytes that the buffer should be.
+.Xr ctime_r 3
+is an example of this type of function.
+.Pp
+If
+.Fl Wbounded
+is specified with
+.Fl Wformat ,
+additional checks are performed on
+.Xr sscanf 3
+format strings.
+The
+.Ql %s
+fields are checked for incorrect bound lengths by checking the size of the
+buffer associated with the format argument.
+.Sh SEE ALSO
+.Xr gcc 1
+.Sh CAVEATS
+The
+.Fl Wbounded
+flag only works with statically allocated fixed-size buffers.
+Since it is applied at compile-time, dynamically allocated memory buffers
+and non-constant arguments are ignored.
diff --git a/static/openbsd/man1/help.1 b/static/openbsd/man1/help.1
new file mode 100644
index 00000000..c04ad7d3
--- /dev/null
+++ b/static/openbsd/man1/help.1
@@ -0,0 +1,197 @@
+.\" $OpenBSD: help.1,v 1.4 2017/07/13 08:29:36 jca Exp $
+.\"
+.\" Copyright (c) 1999 Aaron Campbell
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\"
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+.\"
+.Dd $Mdocdate: July 13 2017 $
+.Dt HELP 1
+.Os
+.Sh NAME
+.Nm help
+.Nd help for new users and administrators
+.Sh DESCRIPTION
+This document is meant to familiarize new users and system administrators with
+.Ox
+and, if necessary,
+.Ux
+in general.
+.Pp
+Firstly, a wealth of information is contained within the system manual pages.
+In
+.Ux ,
+the
+.Xr man 1
+command is used to view them.
+Type
+.Ic man man
+for instructions on how to use it properly.
+Pay especially close attention to the
+.Fl k
+option.
+.Pp
+Other
+.Ox
+references include the FAQ (Frequently Asked Questions) located at
+.Lk https://www.openbsd.org/faq/ ,
+which is mostly intended for administrators and assumes the reader possesses
+a working knowledge of
+.Ux .
+There are also mailing lists in place where questions are fielded by
+.Ox
+developers and other users; see
+.Lk https://www.openbsd.org/mail.html .
+.Pp
+System administrators should have already read the
+.Xr afterboot 8
+man page which explains a variety of tasks that are typically performed
+after the first system boot.
+When configuring any aspect of the system, first consider any possible security
+implications your changes may have.
+.Ss The Unix shell
+After logging in, some system messages are typically displayed, and then the
+user is able to enter commands to be processed by the shell program.
+The shell is a command-line interpreter that reads user input (normally from
+a terminal) and executes commands.
+There are many different shells available;
+.Ox
+ships with
+.Xr csh 1 ,
+.Xr ksh 1 ,
+and
+.Xr sh 1 .
+Each user's shell is indicated by the last field of their corresponding entry
+in the system password file
+.Pf ( Pa /etc/passwd ) .
+.Ss Basic Unix commands
+.Bl -tag -width "chmodXXX"
+.It Cm man
+Interface to the system manual pages.
+For any of the commands listed below, type
+.Ic man Ar command
+for detailed information on what it does and how to use it.
+.It Cm pwd
+Print working directory.
+Files are organized in a hierarchy (see
+.Xr hier 7 )
+called a tree.
+This command will indicate in which directory you are currently located.
+.It Cm cd
+Change working directory.
+Use this command to navigate throughout the file hierarchy.
+For example, type
+.Ic cd /
+to change the working directory to the root.
+.It Cm ls
+List directory contents.
+Type
+.Ic ls -l
+for a detailed listing.
+.It Cm cat
+Although it has many more uses,
+.Ic cat Ar filename
+will print the contents of a plain-text file to the screen.
+.It Cm vi
+Edit text files.
+For example,
+.Ic vi Ar filename .
+See also
+.Xr mg 1 .
+.It Cm mkdir
+Make a directory.
+For example,
+.Ic mkdir Ar dirname .
+.It Cm rmdir
+Remove a directory.
+.It Cm rm
+Remove files.
+Files are generally only removable by their owners.
+See the
+.Xr chmod 1
+command for information on file permissions.
+.It Cm chmod
+Change file modes, including permissions.
+It is not immediately obvious how to use this command; please read its manual
+page carefully, as proper file permissions, especially on system files, are
+vital in maintaining security and integrity.
+.It Cm cp
+Copy files.
+.It Cm mv
+Move and rename files.
+.It Cm ps
+List active processes.
+Most
+.Ux Ns -based
+operating systems, including
+.Ox ,
+are multitasking, meaning many programs share system resources at the same
+time.
+A common usage is
+.Ic ps -auxw ,
+which will display information about all active processes.
+.It Cm kill
+Kill processes.
+Used mostly for terminating run-away/unresponsive programs, but also used to
+signal programs for requesting certain operations (e.g., re-read their
+configuration).
+.It Cm date
+Print the current system date and time.
+.It Cm mail
+Access mailbox.
+.It Cm exit
+Log out of the system.
+.El
+.Pp
+When a command is entered, it is first checked to see if it is built-in to the
+shell.
+If not, the shell looks for the command in any directories contained within the
+.Ev PATH
+environment variable (see
+.Xr environ 7 ) .
+If the command is not found, an error message is printed.
+Otherwise, the shell runs the command, passing it any arguments specified on
+the command line.
+.Pp
+Shell built-in commands do not have their own manual page,
+so it's necessary to read the manual page for the user's shell.
+Tools such as
+.Xr which 1
+and
+.Dq whence ,
+a
+.Xr ksh 1
+built-in command,
+can be used to see what commands are being executed.
+.Sh SEE ALSO
+.Xr csh 1 ,
+.Xr ksh 1 ,
+.Xr man 1 ,
+.Xr whatis 1 ,
+.Xr whereis 1 ,
+.Xr which 1 ,
+.Xr afterboot 8
+.Sh HISTORY
+This manual page was written by
+.An Aaron Campbell Aq Mt aaron@openbsd.org
+and first appeared in
+.Ox 2.6 .
diff --git a/static/openbsd/man1/intro.1 b/static/openbsd/man1/intro.1
new file mode 100644
index 00000000..2bc553cc
--- /dev/null
+++ b/static/openbsd/man1/intro.1
@@ -0,0 +1,73 @@
+.\" $OpenBSD: intro.1,v 1.15 2020/02/08 01:09:57 jsg Exp $
+.\" $NetBSD: intro.1,v 1.4 1994/11/30 08:35:00 jtc Exp $
+.\"
+.\" Copyright (c) 1991, 1993
+.\" The Regents of the University of California. All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\" 3. Neither the name of the University nor the names of its contributors
+.\" may be used to endorse or promote products derived from this software
+.\" without specific prior written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" @(#)intro.1 8.2 (Berkeley) 12/30/93
+.\"
+.Dd $Mdocdate: February 8 2020 $
+.Dt INTRO 1
+.Os
+.Sh NAME
+.Nm intro
+.Nd introduction to general commands (tools and utilities)
+.Sh DESCRIPTION
+The manual pages in section 1 contain most of the commands which comprise the
+.Bx
+user environment.
+Some of the commands included in section 1 are
+text editors,
+command shell interpreters,
+searching and sorting tools,
+file manipulation commands,
+system status commands,
+remote file copy commands,
+mail commands,
+compilers and compiler tools,
+formatted output tools,
+and line printer commands.
+.Pp
+All commands set a status value upon exit which may be tested
+to see if the command completed normally.
+The exit values and their meanings are explained in the individual manuals.
+Traditionally, the value 0 signifies successful completion of the command.
+.Sh SEE ALSO
+.Xr man 1 ,
+.Xr intro 2 ,
+.Xr intro 3 ,
+.Xr intro 4 ,
+.Xr intro 5 ,
+.Xr intro 6 ,
+.Xr intro 7 ,
+.Xr intro 8 ,
+.Xr intro 9
+.Sh HISTORY
+An
+.Nm
+manual for section 1 first appeared in
+.At v7 .
diff --git a/static/openbsd/man1/outdated-perl-ports.1 b/static/openbsd/man1/outdated-perl-ports.1
new file mode 100644
index 00000000..a9d3edc2
--- /dev/null
+++ b/static/openbsd/man1/outdated-perl-ports.1
@@ -0,0 +1,45 @@
+.\" $OpenBSD: outdated-perl-ports.1,v 1.4 2018/11/30 15:06:47 danj Exp $
+.\"
+.\" Copyright (c) 2011 Jasper Lievisse Adriaanse <jasper@openbsd.org>
+.\"
+.\" Permission to use, copy, modify, and distribute this software for any
+.\" purpose with or without fee is hereby granted, provided that the above
+.\" copyright notice and this permission notice appear in all copies.
+.\"
+.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+.\"
+.Dd $Mdocdate: November 30 2018 $
+.Dt OUTDATED-PERL-PORTS 1
+.Os
+.Sh NAME
+.Nm outdated-perl-ports
+.Nd compare CPAN releases and the ports tree
+.Sh SYNOPSIS
+.Nm outdated-perl-ports
+.Op Fl d
+.Op Fl m Ar maintainer
+.Sh DESCRIPTION
+.Nm
+retrieves and compares the packages list provided by CPAN with the ports
+recorded in
+.Pa ${LOCALBASE}/share/ports-INDEX
+and reports which ports have a newer version available upstream.
+Note that the portslist package must be installed.
+.Pp
+Options are as follows:
+.Bl -tag -width maintainer
+.It Fl d
+Causes
+.Nm
+to show the path (relative to ${PORTSDIR}) for the outdated port.
+.It Fl m Ar maintainer
+Only display ports that are being maintained by
+.Ar maintainer .
+This can be specified as name or e-mail address.
+.El
diff --git a/static/openbsd/man1/pkg_check-manpages.1 b/static/openbsd/man1/pkg_check-manpages.1
new file mode 100644
index 00000000..b5c05c7c
--- /dev/null
+++ b/static/openbsd/man1/pkg_check-manpages.1
@@ -0,0 +1,60 @@
+.\" $OpenBSD: pkg_check-manpages.1,v 1.1 2018/07/10 09:05:47 espie Exp $
+.\"
+.\" Copyright (c) 2010 Marc Espie <espie@openbsd.org>
+.\"
+.\" Permission to use, copy, modify, and distribute this software for any
+.\" purpose with or without fee is hereby granted, provided that the above
+.\" copyright notice and this permission notice appear in all copies.
+.\"
+.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+.\"
+.Dd $Mdocdate: July 10 2018 $
+.Dt PKG_CHECK-MANPAGES 1
+.Os
+.Sh NAME
+.Nm pkg_check-manpages
+.Nd verify manpage subjects in packages
+.Sh SYNOPSIS
+.Nm
+.Op Fl p
+.Op Ar pkgname ...
+.Sh DESCRIPTION
+.Nm
+is used to check manpages in a collection of packages.
+It will extract all manpages from the
+.Ar pkgname
+arguments into a directory named
+.Pa manpages.XXXXXXXXXXXX
+.Po
+see
+.Xr mktemp 1
+.Pc
+and run them through
+.Xr makewhatis 8 .
+.Pp
+Note that this directory is not cleared on exit, so that the problematic
+manpages can be examined more precisely.
+.Pp
+If no
+.Ar pkgname
+argument is passed, it will process all
+.Pa *.tgz
+files in the current directory.
+.Pp
+Options are as follows:
+.Bl -tag -width packing-list
+.It Fl p
+Run
+.Xr makewhatis 8
+in picky mode.
+.El
+.Pp
+Errors reported in picky mode should usually be fixed, as it means the
+subject line stored in the whatis database will be useless to find out
+the corresponding manpage.
diff --git a/static/openbsd/man1/pkg_check-problems.1 b/static/openbsd/man1/pkg_check-problems.1
new file mode 100644
index 00000000..3f891c9c
--- /dev/null
+++ b/static/openbsd/man1/pkg_check-problems.1
@@ -0,0 +1,191 @@
+.\" $OpenBSD: pkg_check-problems.1,v 1.1 2018/07/10 09:05:47 espie Exp $
+.\"
+.\" Copyright (c) 2010-2015 Marc Espie <espie@openbsd.org>
+.\"
+.\" Permission to use, copy, modify, and distribute this software for any
+.\" purpose with or without fee is hereby granted, provided that the above
+.\" copyright notice and this permission notice appear in all copies.
+.\"
+.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+.\"
+.Dd $Mdocdate: July 10 2018 $
+.Dt PKG_CHECK-PROBLEMS 1
+.Os
+.Sh NAME
+.Nm pkg_check-problems
+.Nd verify problems in package collections
+.Sh SYNOPSIS
+.Nm
+.Op Fl CDesv
+.Op Fl d Ar plist_dir
+.Op Fl o Ar output
+.Op Fl p Ar ports_dir
+.Op Ar pkgname ...
+.Sh DESCRIPTION
+.Nm
+is used to check a collection of packages for problems that cannot be
+noticed in individual packages, such as conflict and directory registration
+issues.
+.Pp
+A conflict is a file that belongs to two distinct packages.
+.Pp
+By default, packages with the same stem
+.Po
+see
+.Xr packages-specs 7
+.Pc
+are registered to conflict.
+This can be changed to add or remove extra conflict registration with
+.Cm @option no-default-conflict
+or
+.Cm @conflict
+.Po
+see
+.Xr pkg_create 1
+.Pc .
+.Pp
+Conflicts between packages mean that a user can't have both packages installed
+at the same time.
+In some cases (same software, different version), this is expected, but
+the packages should be marked as conflicting, so that
+.Xr pkg_add 1
+knows how to deal with it.
+In other cases, this is an oversight from the ports maintainer, and action
+should be taken to make sure both packages can be installed simultaneously.
+Conflicts also interact with dependencies, and sometimes a missing dependency
+will show up as an unregistered conflict.
+.Pp
+Directories can belong to distinct packages, as long as they are registered
+somewhere.
+Every directory that is not part of the standard
+.Xr mtree 8
+set should appear in a packing-list somewhere.
+.Pp
+Contrary to files, directories can be shared between several packages.
+.Pp
+.Nm
+knows enough about packages to trace directories back to a common dependency,
+or to not flag two packages as conflicting when they depend on already
+conflicting packages.
+.Pp
+.Nm
+requires a set of packing-lists to operate, which it can obtain from
+several sources.
+The preferred source is the packing-list databases
+.Po
+see
+.Ar PACKAGE_REPOSITORY
+in
+.Xr bsd.port.mk 5
+and
+.Xr register-plist 1
+.Pc ,
+as it persists over time and can be used to fix update information as well
+as current version information.
+.Pp
+It should be supplemented with the ports tree itself in order to figure
+out current versions.
+.Pp
+Options are as follows:
+.Bl -tag -width packing-list
+.It Fl C
+Do not compute conflict information.
+.It Fl D
+Do not compute common dir information.
+.It Fl e
+Check for extra logical conflicts, by adding supplementary
+formatted/unformatted manpages, as same name manpages under the
+same base directory will shadow one another.
+.It Fl o Ar output
+Save results to output file as well as writing it on the screen.
+.It Fl s
+Be silent.
+.It Fl v
+Be verbose.
+.It Fl d Ar plist-dir
+Scan directory
+.Ar plist-dir
+for packing-lists.
+.It Fl p Ar portsdir
+Traverse the ports directory for packing-lists, using
+.Ar print-plist-all .
+More than one directory could be specified by delimiting them by colon,
+e.g.:
+.Pa /usr/ports/x11/kde:/usr/ports/x11/kde4 .
+.Pp
+If
+.Fl d Ar plist-dir
+is also used, traverse only the directories corresponding to the packages
+under
+.Ar plist-dir
+to figure out current pkgnames, and annotate those with a
+.Sq \&!
+in the report.
+.El
+.Sh SAMPLE OUTPUT
+.Bd -literal
+Dependency not found zarafa-webaccess-7.1.11p2
+Dependency not found kwebkitpart-1.2p3
+[...]
+Common dirs:
+!claws-mail-gdata-3.11.1p1-ldap(mail/claws-mail,-gdata,ldap): /usr/local/lib/claws-mail
+!claws-mail-pdfviewer-3.11.1p1-ldap(mail/claws-mail,-pdfviewer,ldap): /usr/local/lib/claws-mail
+[...]
+Conflicts:
+!arm-none-eabi-gdb-7.9.1(devel/arm-none-eabi/gdb),!gdb-7.9.1(devel/gdb)
+ /usr/local/include/gdb/jit-reader.h
+ /usr/local/share/gdb/system-gdbinit/elinos.py
+ /usr/local/share/gdb/system-gdbinit/wrs-linux.py
+!libnet-1.0.2ap0v0(net/libnet/1.0),libnet-1.0.2ap2(net/libnet/1.0),libnet-1.0.2av0(net/libnet/1.0)
+ /usr/local/bin/libnet-config-1.0
+ /usr/local/include/libnet-1.0/libnet.h
+ /usr/local/include/libnet-1.0/libnet/libnet-asn1.h
+ /usr/local/include/libnet-1.0/libnet/libnet-functions.h
+ /usr/local/include/libnet-1.0/libnet/libnet-headers.h
+ /usr/local/include/libnet-1.0/libnet/libnet-macros.h
+ /usr/local/include/libnet-1.0/libnet/libnet-ospf.h
+ /usr/local/include/libnet-1.0/libnet/libnet-structures.h
+ /usr/local/lib/libnet-1.0/libnet.a
+ /usr/local/lib/libnet-1.0/libnet.so.0.0
+ /usr/local/lib/libnet-1.0/libpwrite.a
+ /usr/local/lib/libnet.so.0.0
+ /usr/local/man/cat3/libnet.0
+[...]
+zathura-pdf-mupdf-0.2.7(textproc/zathura/plugins/mupdf),zathura-pdf-poppler-0.2.5(textproc/zathura/plugins/poppler)
+ /usr/local/lib/zathura/pdf.so
+.Ed
+.Bl -bullet
+.It
+Dependency not found: means some package names could not be found.
+Most often happens because of panic issues, and fsck not recovering some
+dependency files.
+.It
+claws-mail directory: missing directory registration.
+.Nm
+could not find a common ancestor to claws-mail-gdata and claws-mail-pdfviewer,
+so it should be added to both.
+.It
+Conflict between arm-non-eabi-gdb and gdb:
+note that both packages are current.
+Two choices: either remove the offending files from one package (might break
+the other), or mark an explicit conflict between the packages (will prevent
+people from installing both at the same time).
+.It
+Conflict between libnet-...v0 and libnet:
+Note that only the v0 version is current.
+People forgot to augment the
+.Cm @option no-default-conflict
+with conflicts against the old version when bumping the
+.Ar EPOCH .
+.El
+.Sh SEE ALSO
+.Xr pkg_add 1 ,
+.Xr pkg_create 1 ,
+.Xr bsd.port.mk 5 ,
+.Xr packages-specs 7
diff --git a/static/openbsd/man1/pkg_check-version.1 b/static/openbsd/man1/pkg_check-version.1
new file mode 100644
index 00000000..8ded578b
--- /dev/null
+++ b/static/openbsd/man1/pkg_check-version.1
@@ -0,0 +1,67 @@
+.\" $OpenBSD: pkg_check-version.1,v 1.3 2022/04/19 15:03:12 espie Exp $
+.\"
+.\" Copyright (c) 2021 Marc Espie <espie@openbsd.org>
+.\"
+.\" Permission to use, copy, modify, and distribute this software for any
+.\" purpose with or without fee is hereby granted, provided that the above
+.\" copyright notice and this permission notice appear in all copies.
+.\"
+.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+.\"
+.Dd $Mdocdate: April 19 2022 $
+.Dt PKG_CHECK-VERSION 1
+.Os
+.Sh NAME
+.Nm pkg_check-version
+.Nd verify parsing and ordering of package names
+.Sh SYNOPSIS
+.Nm
+.Op Fl Hv
+.Ar pkgname ...
+.Sh DESCRIPTION
+.Nm
+takes a list of
+.Ar pkgname
+and processes them.
+.Bl -bullet -compact
+.It
+each name is parsed and checked for issues.
+.It
+in addition, comparable names (same stem and same flavor) are sorted
+from older to newer version.
+.El
+.Pp
+Options are as follows:
+.Bl -tag -width Hv
+.It Fl H
+displays a human-readable version of each
+.Ar pkgname
+(full version parsing, including known suffixes, dewey numbers parsing,
+REVISION, EPOCH, flavor markers).
+.It Fl v
+verbose mode, which will explicitly state
+.Ar pkgname
+with no issues and sort one element lists.
+.El
+.Sh EXIT STATUS
+The
+.Nm
+utility exits with 0, unless one of the
+.Ar pkgname
+was malformed, or two names are actually non comparable
+.Po
+such as
+.Sq moo-1.23pre1
+and
+.Sq moo-1.23rc1
+.Pc .
+.Sh SEE ALSO
+.Xr packages-specs 7
+.Sh AUTHORS
+.An Marc Espie Aq Mt espie@openbsd.org
diff --git a/static/openbsd/man1/pkg_outdated.1 b/static/openbsd/man1/pkg_outdated.1
new file mode 100644
index 00000000..17b3fdc6
--- /dev/null
+++ b/static/openbsd/man1/pkg_outdated.1
@@ -0,0 +1,48 @@
+.\" $OpenBSD: pkg_outdated.1,v 1.2 2018/07/09 18:27:58 jmc Exp $
+.\"
+.\" Copyright (c) 2011 Marc Espie <espie@openbsd.org>
+.\"
+.\" Permission to use, copy, modify, and distribute this software for any
+.\" purpose with or without fee is hereby granted, provided that the above
+.\" copyright notice and this permission notice appear in all copies.
+.\"
+.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+.\"
+.Dd $Mdocdate: July 9 2018 $
+.Dt PKG_OUTDATED 1
+.Os
+.Sh NAME
+.Nm pkg_outdated
+.Nd compare installed packages and the ports tree
+.Sh SYNOPSIS
+.Nm
+.Op Fl mqvx
+.Sh DESCRIPTION
+.Nm
+checks installed packages and compares them to the ports tree.
+It displays packages that may need updating.
+Typical output is a subdirlist with comments, suitable for bulk building.
+.Pp
+Options are as follows:
+.Bl -tag -width pkgpathlonger
+.It Fl m
+Causes
+.Nm
+to always display the progress meter in cases it would not do so by default.
+.It Fl q
+Quick check, only verifies the names and not full update signatures.
+Use is discouraged.
+.It Fl v
+Verbose mode.
+Does not do anything yet.
+.It Fl x
+Disable progress meter.
+.El
+.Sh AUTHORS
+.An Bernd Ahlers
diff --git a/static/openbsd/man1/pkg_subst.1 b/static/openbsd/man1/pkg_subst.1
new file mode 100644
index 00000000..ae641b89
--- /dev/null
+++ b/static/openbsd/man1/pkg_subst.1
@@ -0,0 +1,101 @@
+.\" $OpenBSD: pkg_subst.1,v 1.1 2018/06/26 05:38:49 espie Exp $
+.\"
+.\" Copyright (c) 2010 Marc Espie <espie@openbsd.org>
+.\"
+.\" Permission to use, copy, modify, and distribute this software for any
+.\" purpose with or without fee is hereby granted, provided that the above
+.\" copyright notice and this permission notice appear in all copies.
+.\"
+.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+.\"
+.Dd $Mdocdate: June 26 2018 $
+.Dt PKG_SUBST 1
+.Os
+.Sh NAME
+.Nm pkg_subst
+.Nd substitute variables' values in files
+.Sh SYNOPSIS
+.Nm pkg_subst
+.Op Fl ci
+.Op Fl B Ar basedir
+.Op Fl D Ar name Ns Op = Ns Ar value
+.Op Fl g Ar group
+.Op Fl m Ar mode
+.Op Fl o Ar owner
+.Op Ar file ...
+.Sh DESCRIPTION
+.Nm
+is used within the ports tree to substitute variable values, using
+the exact same conventions used by
+.Xr pkg_create 1 .
+Constructs like
+.Li ${VAR}
+will be replaced with the variable value, according to
+.Fl D Ar name Ns Op = Ns Ar value
+options.
+.Pp
+The options are as follows
+.Bl -tag -width Dname[=value]xxx
+.It Fl B Ar basedir
+Specify a basedir in which we know file properties.
+It is forbidden to copy files from elsewhere without
+.Fl m Ar mode .
+.It Fl c
+Copy and substitute.
+Number of
+.Ar file
+arguments must be even.
+They are paired as
+.Ar src1
+.Ar dest1 ,
+.Ar src2
+.Ar dest2 ...
+and each
+.Ar src
+file is substituted and copied into the corresponding
+.Ar dest
+file.
+.It Xo
+.Fl D
+.Ar name Ns Op = Ns Ar value
+.Xc
+Define
+.Ar name
+to
+.Ar value ,
+or to 1 if no value is given.
+.It Fl g Ar group
+Change group of destination file to
+.Ar group .
+.It Fl i
+Ignore changes to group or owner that failed.
+.It Fl m Ar mode
+Change mode of destination file to
+.Ar mode .
+.It Fl o Ar owner
+Change owner of destination file to
+.Ar owner .
+.El
+.Pp
+If no
+.Ar file
+arguments is given,
+.Nm
+acts as a filter from stdin to stdout.
+.Pp
+Without
+.Fl c ,
+each
+.Ar file
+is backed up as
+.Ar file.beforesubst
+before the substitution occurs.
+.Sh SEE ALSO
+.Xr install 1 ,
+.Xr pkg_create 1
diff --git a/static/openbsd/man1/port-getpkgpath-helper.1 b/static/openbsd/man1/port-getpkgpath-helper.1
new file mode 100644
index 00000000..f493e906
--- /dev/null
+++ b/static/openbsd/man1/port-getpkgpath-helper.1
@@ -0,0 +1,36 @@
+.\" $OpenBSD: port-getpkgpath-helper.1,v 1.1 2018/07/09 13:57:13 espie Exp $
+.\"
+.\" Copyright (c) 2010 Marc Espie <espie@openbsd.org>
+.\"
+.\" Permission to use, copy, modify, and distribute this software for any
+.\" purpose with or without fee is hereby granted, provided that the above
+.\" copyright notice and this permission notice appear in all copies.
+.\"
+.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+.\"
+.Dd $Mdocdate: July 9 2018 $
+.Dt PORT-GETPKGPATH-HELPER 1
+.Os
+.Sh NAME
+.Nm port-getpkgpath-helper
+.Nd deduces PKGPATH from current directory
+.Sh SYNOPSIS
+.Nm
+.Ar dir
+.Sh DESCRIPTION
+.Nm
+deduces the
+.Ev PKGPATH
+corresponding to a given directory
+.Ar dir ,
+by trying to strip directories from the environment variable
+.Ev PORTSDIR_PATH .
+.Pp
+This is a helper script for
+.Pa bsd.port.subdir.mk .
diff --git a/static/openbsd/man1/port-resolve-lib-helper.1 b/static/openbsd/man1/port-resolve-lib-helper.1
new file mode 100644
index 00000000..c7d6da17
--- /dev/null
+++ b/static/openbsd/man1/port-resolve-lib-helper.1
@@ -0,0 +1,74 @@
+.\" $OpenBSD: port-resolve-lib-helper.1,v 1.1 2018/07/09 14:53:30 espie Exp $
+.\"
+.\" Copyright (c) 2010 Marc Espie <espie@openbsd.org>
+.\"
+.\" Permission to use, copy, modify, and distribute this software for any
+.\" purpose with or without fee is hereby granted, provided that the above
+.\" copyright notice and this permission notice appear in all copies.
+.\"
+.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+.\"
+.Dd $Mdocdate: July 9 2018 $
+.Dt PORT-RESOLVE-LIB-HELPER 1
+.Os
+.Sh NAME
+.Nm port-resolve-lib-helper
+.Nd resolve library specs during ports build
+.Sh SYNOPSIS
+.Nm
+.Op Fl needed
+.Op Fl silent
+.Ar spec ...
+.Sh DESCRIPTION
+.Nm
+resolve library specs against a list of installed libraries.
+.Nm
+takes a list of file names with full path on stdin,
+and matches each library
+.Ar spec
+against those libraries,
+using
+.Xr library-specs 7
+conventions.
+.Pp
+In particular,
+.Ev X11BASE
+and
+.Ev LOCALBASE
+are used to locate X11 libraries and port libraries.
+.Pp
+.Nm
+will print the best libraries found in a format suitable for
+.Cm @wantlib
+.Po
+see
+.Xr pkg_create 1
+.Pc .
+.Pp
+Each
+.Ar spec
+not found will result in an error message and exit code.
+.Pp
+If the option
+.Fl silent
+is used, nothing will be displayed.
+.Pp
+The option
+.Fl needed
+is used to sort out
+.Ev LIB_DEPENDS :
+.Nm
+will succeed if at least one of the libraries matches against a shared
+library passed on the command line.
+.Pp
+This is a helper script used by
+.Xr bsd.port.mk 5
+to complete all wantlib information for
+.Xr pkg_create 1
+and other tools.
diff --git a/static/openbsd/man1/port-search-helper.1 b/static/openbsd/man1/port-search-helper.1
new file mode 100644
index 00000000..b5b7677a
--- /dev/null
+++ b/static/openbsd/man1/port-search-helper.1
@@ -0,0 +1,49 @@
+.\" $OpenBSD: port-search-helper.1,v 1.3 2018/11/30 18:40:57 danj Exp $
+.\"
+.\" Copyright (c) 2010 Marc Espie <espie@openbsd.org>
+.\"
+.\" Permission to use, copy, modify, and distribute this software for any
+.\" purpose with or without fee is hereby granted, provided that the above
+.\" copyright notice and this permission notice appear in all copies.
+.\"
+.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+.\"
+.Dd $Mdocdate: November 30 2018 $
+.Dt PORT-SEARCH-HELPER 1
+.Os
+.Sh NAME
+.Nm port-search-helper
+.Nd find index entry in ports index according to selected criteria
+.Sh SYNOPSIS
+.Nm
+.Cm index Ns = Ns Ar file
+.Op Cm category Ns = Ns Ar cat
+.Op Cm maintainer Ns = Ns Ar person
+.Op Cm key Ns = Ns Ar value
+.Sh DESCRIPTION
+.Nm
+scans index file
+.Ar file
+for index entry (or entries) according to selected criteria,
+such as category, maintainer name or actual name.
+.Pp
+Matching is done using perl regular expressions, and corresponding entries
+get printed as a list on a single line on standard output.
+.Nm
+is a helper script used by
+.Pa ${PORTSDIR}/Makefile
+for searches.
+.Pp
+It relies on
+.Pa ${LOCALBASE}/share/ports-INDEX
+being accurate.
+Note the portslist package must be installed.
+.Sh SEE ALSO
+.Xr perlre 1 ,
+.Xr ports 7
diff --git a/static/openbsd/man1/portbump.1 b/static/openbsd/man1/portbump.1
new file mode 100644
index 00000000..eebd3af3
--- /dev/null
+++ b/static/openbsd/man1/portbump.1
@@ -0,0 +1,155 @@
+.\" $OpenBSD: portbump.1,v 1.1 2018/06/26 05:38:49 espie Exp $
+.\"
+.\" Copyright (c) 2014 Vadim Zhukov
+.\"
+.\" Permission to use, copy, modify, and distribute this software for any
+.\" purpose with or without fee is hereby granted, provided that the above
+.\" copyright notice and this permission notice appear in all copies.
+.\"
+.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+.\"
+.Dd $Mdocdate: June 26 2018 $
+.Dt PORTBUMP 1
+.Os
+.Sh NAME
+.Nm portbump
+.Nd tweaks port revisions and library versions
+.Sh SYNOPSIS
+.Nm
+.Op Fl lMmnrv
+.Op Fl W Ar wlib
+.Op Fl w Ar wlib
+.Op Ar portref ...
+.Pp
+.Nm
+.Fl o Ar file
+.Op Fl lMmnrv
+.Op Fl W Ar addlib
+.Op Fl w Ar rmlib
+.Op Ar portref ...
+.Sh DESCRIPTION
+.Nm
+is used to increase ('bump')
+.Ev REVISION
+and
+.Ev SHARED_LIBS
+values in
+.Ox
+ports.
+It also can remove
+.Ev REVISION
+marks and add, update or remove
+.Ev WANTLIB
+items.
+.Pp
+.Ar portref
+has the same syntax as
+.Ev FULLPKGPATH
+port variable, see
+.Xr bsd.port.mk 5 .
+Actually, you can feed a list of pkgpaths as parameters; flavor
+information will be ignored.
+.Nm
+doesn't care about actual subdirectory portion of
+.Ar portref ,
+so you can freely pass
+.Pa \&. ,
+.Pa ../foo
+or anything else like this.
+.Pp
+If subpackage is not specified in port reference, then all subpackages
+of a port will be processed.
+If no port references are given, the port in current directory will
+be processed.
+.Pp
+Default mode of operation is increasing
+.Ev REVISION
+mark values (
+.Fl r ) .
+Operations on
+.Ev REVISION
+marks and on
+.Ev SHARED_LIBS
+could be combined by explicit specifying corresponding flags, see below.
+.Pp
+The following options are available:
+.Bl -tag -width Ds
+.It Fl d
+Delete all
+.Ev REVISION
+marks in
+.Pa Makefile .
+Mutually exclusive with
+.Fl r .
+.It Fl l
+Recreate all
+.Ev WANTLIB
+items based on output of
+.Sq make port-lib-depends-check .
+If used twice or more, the
+.Sq make lib-depends-check
+will be used instead.
+The
+.Fl l
+mode is incompatible with
+.Fl W
+and
+.Fl w .
+.It Fl M
+Increment by one major component of all
+.Ev SHARED_LIBS ,
+resetting minor one to zero if needed.
+Mutually exclusive with
+.Fl m .
+.It Fl m
+Increment by one minor component of all
+.Ev SHARED_LIBS .
+Mutually exclusive with
+.Fl M .
+.It Fl n
+Do not replace
+.Pa Makefile
+but save modified version in the
+.Pa Makefile.bump
+instead.
+.It Fl o Ar file
+Send modified Makefile contents to a given file instead of creating
+.Pa Makefile.bump
+in port's directory.
+This could be only used if not more than one port is specified;
+multiple subpackages of a single port could be specified, though.
+.It Fl r
+Increment
+.Ev REVISION
+values for all subpackages, or only for given ones.
+Mutually exclusive with
+.Fl d .
+.It Fl W Ar wlib
+.It Fl w Ar wlib
+Adds or updates (the
+.Fl W
+flag) or removes (the
+.Fl w
+flag)
+.Ev WANTLIB
+items in whole port, or in particular subpackages, if given.
+Both options could be specified multiple times, accumulating
+corresponding lists.
+The
+.Ev WANTLIB
+entries will be fully re-generated based on previous contents.
+Those modes are incompatible with
+.Fl l .
+.It Fl v
+Enable printing of diagnostic messages to standard error output.
+.El
+.Sh HISTORY
+.Nm
+first appeared in
+.Ox 5.6 .
diff --git a/static/openbsd/man1/portcheck.1 b/static/openbsd/man1/portcheck.1
new file mode 100644
index 00000000..c5b9b7b3
--- /dev/null
+++ b/static/openbsd/man1/portcheck.1
@@ -0,0 +1,152 @@
+.\" $OpenBSD: portcheck.1,v 1.2 2019/05/29 19:37:06 fcambus Exp $
+.\"
+.\" Copyright (c) 2013 Vadim Zhukov
+.\"
+.\" Permission to use, copy, modify, and distribute this software for any
+.\" purpose with or without fee is hereby granted, provided that the above
+.\" copyright notice and this permission notice appear in all copies.
+.\"
+.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+.\"
+.Dd $Mdocdate: May 29 2019 $
+.Dt PORTCHECK 1
+.Os
+.Sh NAME
+.Nm portcheck
+.Nd validate a port before submitting
+.Sh SYNOPSIS
+.Nm
+.Op Fl dNP
+.Op Fl p Ar portsdir
+.Op Fl x Ar pattern
+.Pp
+.Nm
+.Fl A
+.Op Fl dP
+.Op Fl p Ar portsdir
+.Op Fl x Ar pattern
+.Op Ar subdir ...
+.Sh DESCRIPTION
+.Nm
+is used to validate the
+.Ox
+port or port hierarchy in current directory.
+It should be used before submitting ports for review to avoid making
+common mistakes.
+.Nm
+verifies that directory and file structure for a port is in place and
+that no bogus files exist.
+.Pp
+When it's done,
+.Nm
+will print detected value of port's
+.Ev PKGPATH
+to standard output, unless it fails in detection.
+In the latter case, the
+.Fl p
+option should be provided.
+All other (error) messages from
+.Nm
+end up on standard error output.
+.Pp
+By default,
+.Nm
+automatically picks up nearest parent directory named
+.Dq ports ,
+with an optional
+.Dq mystuff
+or
+.Dq openbsd-wip
+subdirectory component, as the ports root directory.
+For example: if the port being imported is located in
+.Pa /home/joe/cvs/ports/openbsd-wip/devel/p5-Foo ,
+then the root ports directory will be detected as being
+.Pa /home/joe/cvs/ports/openbsd-wip .
+To override this behaviour, see the
+.Fl p
+option.
+.Pp
+The following options are available:
+.Bl -tag -width Ds
+.It Fl A
+Intended for running
+.Nm
+on the whole ports tree, i.e., the one lying in
+.Ev PORTSDIR .
+This option adds several ignore patterns (see
+.Fl x
+option description) and disables some other checks (e.g., for missing
+distinfo).
+.Ev PKGPATH
+determining and printing won't be done.
+Implicit change of working directory to the ports tree root is done
+before starting any checks.
+Also, in this mode one or more
+.Ar subdir
+arguments could be specified, to narrow the check only for given
+subdirectories of ports tree root.
+.It Fl d
+Show debugging information such as calling of check routines.
+.It Fl P
+Disable expensive checks that use
+.Dq print-plist-with-depends
+target, e.g., proper usage of
+.Xr gtk-update-icon-cache 1 ,
+.Xr update-desktop-database 1
+and
+.Xr update-mime-database 1 .
+.It Fl p Ar portsdir
+Forces the given directory to be treated as ports root directory.
+Cancels autodetection of the root ports directory made by default.
+This option is useful, e.g., when you have a temporary ports tree in
+a non-standard location.
+.It Fl N
+Intended to be used when working on new ports.
+Enables the checks like the presence of REVISION markers and non-0.0
+.Ev SHARED_LIBS .
+It also enables checks for the presence of CVS directories that could
+be left by mistake when creating a new port based on another one.
+.It Fl x
+Excludes files and subdirectories matching given shell globbing pattern
+from any checks.
+Note that matching is done against relative path, and not against
+absolute path or base name either.
+I.e., to exclude the
+.Dq x11/kde4/libs/logs
+from checks, you must pass the whole line as argument, not just
+.Dq logs .
+Multiple -x options may be specified.
+.El
+.Sh EXAMPLES
+To validate a new port you've just prepared, go to port's directory and
+run:
+.Bd -literal -offset indent
+$ portcheck -N
+.Ed
+.Pp
+If you were working on updating of an existing port in CVS tree:
+.Bd -literal -offset indent
+$ portcheck
+.Ed
+.Pp
+To run a global check of the whole
+.Dq devel
+category in ports tree, use the
+.Fl A
+option instead:
+.Bd -literal -offset indent
+$ portcheck -Ap /usr/ports devel
+.Ed
+.Sh SEE ALSO
+.Xr portimport 1
+.Sh HISTORY
+This utility was split from
+.Xr portimport 1
+in 2013 and first appeared in
+.Ox 5.5 .
diff --git a/static/openbsd/man1/portgen.1 b/static/openbsd/man1/portgen.1
new file mode 100644
index 00000000..dfe5d4de
--- /dev/null
+++ b/static/openbsd/man1/portgen.1
@@ -0,0 +1,113 @@
+.\" $OpenBSD: portgen.1,v 1.9 2022/08/13 07:14:07 kmos Exp $
+.\"
+.\" Copyright (c) 2015 Giannis Tsaraias <tsg@openbsd.org>
+.\" Copyright (c) 2015 Vadim Zhukov <zhuk@openbsd.org>
+.\"
+.\" Permission to use, copy, modify, and distribute this software for any
+.\" purpose with or without fee is hereby granted, provided that the above
+.\" copyright notice and this permission notice appear in all copies.
+.\"
+.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+.\"
+.Dd $Mdocdate: August 13 2022 $
+.Dt PORTGEN 1
+.Os
+.Sh NAME
+.Nm portgen
+.Nd port modules on the fly
+.Sh SYNOPSIS
+.Nm portgen
+.Op Fl m Ar makeopt
+.Ar type
+.Ar module-name
+.Sh DESCRIPTION
+The
+.Nm
+utility creates ports for the given
+.Ar module-name
+from
+.Ar type
+module framework.
+The module is downloaded, analyzed and translated into a port.
+Any missing dependencies are handled recursively.
+New ports will land under ${PORTSDIR}/mystuff.
+The
+.Ev PORTSDIR
+value will be taken from current user environment, and defaults to
+.Pa /usr/ports .
+.Pp
+The options are as follows:
+.Bl -tag -width Ds
+.It Fl m Ar makeopt
+Pass
+.Ar makeopt
+to
+.Xr make 1
+invocations while resolving missing dependencies, mostly useful with
+.Sq FETCH_PACKAGES=
+to avoid building everything from scratch.
+.El
+.Pp
+The
+.Nm
+utility currently supports the following
+.Ar type
+values:
+.Pp
+.Bl -inset -offset indent -compact
+.It Cm p5
+for Perl modules on CPAN.
+.It Cm ruby
+for Ruby gems.
+.It Cm go
+for Go modules.
+.El
+.Pp
+A
+.Cm go
+module may be used with an
+.Ar @version
+suffix to specify a tag or branch to port.
+The default suffix is
+.Ar @latest ,
+which is interpreted as the latest release.
+.Pp
+The following packages must be installed prior to the invocation of
+.Nm :
+.Pp
+.Bl -item -offset indent -compact
+.It
+.Cm sqlports
+.It
+.Cm p5-DBI
+.It
+.Cm p5-DBD-SQLite
+.El
+.Sh EXIT STATUS
+.Ex -std
+.Sh EXAMPLES
+The following command will download the latest version of Config::AutoConf
+from CPAN, parse it and create a port for it:
+.Bd -ragged -offset indent
+.Nm
+p5 Config::AutoConf
+.Ed
+.Sh SEE ALSO
+.Xr port-modules 5 ,
+.Xr ports 7
+.Sh HISTORY
+The
+.Nm
+utility first appeared in
+.Ox 5.9
+as a result of Google Summer of Code 2015.
+.Sh AUTHORS
+.An Giannis Tsaraias Aq Mt tsg@openbsd.org
+.Sh CAVEATS
+Not every module could be converted to a port.
diff --git a/static/openbsd/man1/portimport.1 b/static/openbsd/man1/portimport.1
new file mode 100644
index 00000000..24cef5e1
--- /dev/null
+++ b/static/openbsd/man1/portimport.1
@@ -0,0 +1,79 @@
+.\" $OpenBSD: portimport.1,v 1.1 2018/06/26 05:38:49 espie Exp $
+.\"
+.\" Copyright (c) 2013 Robert Peichaer
+.\"
+.\" Permission to use, copy, modify, and distribute this software for any
+.\" purpose with or without fee is hereby granted, provided that the above
+.\" copyright notice and this permission notice appear in all copies.
+.\"
+.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+.\"
+.Dd $Mdocdate: June 26 2018 $
+.Dt PORTIMPORT 1
+.Os
+.Sh NAME
+.Nm portimport
+.Nd import a new port to the ports cvs repository
+.Sh SYNOPSIS
+.Nm
+.Op Fl p Ar portsdir
+.Op Fl u Ar username
+.Sh DESCRIPTION
+.Nm
+is used to import the directories and files of a new port to the
+.Ox
+ports
+.Xr cvs 1
+repository, avoiding common mistakes.
+It has to be executed from within the new port's directory.
+.Pp
+.Nm
+calls the
+.Xr portcheck 1
+internally to verify that directory and file structure for a port is in
+place and that no bogus files exist, and also to detect the
+.Ev PKGPATH
+for a port.
+.Pp
+The import is done in two steps.
+In the first step, the
+.Fl n
+option of the cvs command is used to only check for possible problems
+without changing anything and shows the cvs path where the new port will
+be imported.
+In the second step, the current ports directory is imported to the
+.Ox
+ports cvs repository.
+After the import, the new port is checked out in the respective directory
+of the local ports tree.
+.Pp
+The following options are available:
+.Bl -tag -width Ds
+.It Fl p Ar portsdir
+Forces the given directory to be treated as ports root directory.
+Passed through to
+.Xr portcheck 1 .
+.It Fl u Ar username
+Set the username used for
+.Xr ssh 1 ,
+and to compose vendor and release tags.
+Defaults to the local username.
+.El
+.Sh SEE ALSO
+.Xr cvs 1 ,
+.Xr portcheck 1
+.Sh HISTORY
+This command is based on the portimport script of Marc Espie, lightly
+modified by Stuart Henderson and rewritten by Robert Peichaer.
+Later, actual checks were moved to a separate utility,
+.Xr portcheck 1 .
+.Sh CAVEATS
+The
+.Ev CVSROOT
+environment variable is not used.
diff --git a/static/openbsd/man1/portlock.1 b/static/openbsd/man1/portlock.1
new file mode 100644
index 00000000..aa94c3aa
--- /dev/null
+++ b/static/openbsd/man1/portlock.1
@@ -0,0 +1,51 @@
+.\" $OpenBSD: portlock.1,v 1.1 2018/07/09 11:36:57 espie Exp $
+.\"
+.\" Copyright (c) 2010 Marc Espie <espie@openbsd.org>
+.\"
+.\" Permission to use, copy, modify, and distribute this software for any
+.\" purpose with or without fee is hereby granted, provided that the above
+.\" copyright notice and this permission notice appear in all copies.
+.\"
+.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+.\"
+.Dd $Mdocdate: July 9 2018 $
+.Dt PORTLOCK 1
+.Os
+.Sh NAME
+.Nm portlock
+.Nd lock port for concurrent builds
+.Sh SYNOPSIS
+.Nm
+.Op Fl g Ar group
+.Op Fl m Ar mode
+.Ar lockname Op comment ...
+.Sh DESCRIPTION
+.Nm
+creates a lock named
+.Ar lockname
+using
+.Xr open 2 .
+If the lock is already held, it will display one single wait message on
+stderr, sleep and retry until satisfaction.
+.Pp
+If necessary, creates the lock directory, using
+.Fl m Ar mode
+as a mode argument or the default if that option is not specified,
+and
+.Fl g Ar group
+as the group owner if that option is specified.
+.Pp
+This implements a locking mechanism for ports building, see
+.Sq LOCK INFRASTRUCTURE
+in
+.Xr ports 7
+for details.
+See also
+.Xr dpb 1
+for a complementary lock infrastructure when using dpb.
diff --git a/static/openbsd/man1/portslogger.1 b/static/openbsd/man1/portslogger.1
new file mode 100644
index 00000000..1a48b41f
--- /dev/null
+++ b/static/openbsd/man1/portslogger.1
@@ -0,0 +1,61 @@
+.\" $OpenBSD: portslogger.1,v 1.1 2018/06/26 05:38:49 espie Exp $
+.\"
+.\" Copyright (c) 2010 Marc Espie <espie@openbsd.org>
+.\"
+.\" Permission to use, copy, modify, and distribute this software for any
+.\" purpose with or without fee is hereby granted, provided that the above
+.\" copyright notice and this permission notice appear in all copies.
+.\"
+.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+.\"
+.Dd $Mdocdate: June 26 2018 $
+.Dt PORTSLOGGER 1
+.Os
+.Sh NAME
+.Nm portslogger
+.Nd logs ports builds selectively
+.Sh SYNOPSIS
+.Nm portslogger
+.Op Fl s
+.Ar directory
+.Sh DESCRIPTION
+.Nm
+saves logs from ports build in separate files.
+.Pp
+.Nm
+handles directory change messages from the ports tree infrastructure and
+switches to a corresponding log file situated in
+.Ar directory
+accordingly, e.g., it will log the build from screen in
+.Pa directory/screen-4.0.3p1.log .
+.Nm
+will filter progress-bar noise from
+.Xr ftp 1 ,
+.Xr pkg_add 1 ,
+and
+.Xr pkg_create 1 .
+.Pp
+By default,
+.Nm
+acts as a filter and still passes its input to stdout, unless
+run with
+.Fl s .
+.Pp
+It is most often used as
+.Pp
+.Dl $ make package 2>&1 | portslogger logdir
+.Pp
+or in conjunction with
+.Xr tmux 1 ,
+such as
+.Pp
+.Dl $ tmux pipe-pane 'portslogger -s logdir'
+.Sh SEE ALSO
+.Xr dpb 1 ,
+.Xr tmux 1
diff --git a/static/openbsd/man1/proot.1 b/static/openbsd/man1/proot.1
new file mode 100644
index 00000000..3e68e41a
--- /dev/null
+++ b/static/openbsd/man1/proot.1
@@ -0,0 +1,302 @@
+.\" $OpenBSD: proot.1,v 1.11 2023/04/11 11:23:09 espie Exp $
+.\"
+.\" Copyright (c) 2016 Marc Espie <espie@openbsd.org>
+.\"
+.\" Permission to use, copy, modify, and distribute this software for any
+.\" purpose with or without fee is hereby granted, provided that the above
+.\" copyright notice and this permission notice appear in all copies.
+.\"
+.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+.\"
+.Dd $Mdocdate: April 11 2023 $
+.Dt PROOT 1
+.Os
+.Sh NAME
+.Nm proot
+.Nd ports chroot builder
+.Sh SYNOPSIS
+.Nm proot
+.Op Fl B Ar chroot
+.Op Fl c Ar configfile
+.Op Fl S Ar srcroot
+.Op Ar attribute Ns = Ns Ar value ...
+.Sh DESCRIPTION
+.Nm
+can fill up a chroot directory for ports building usage.
+It will perform a set of
+.Cm actions
+that should fill up a destination
+.Ar chroot
+directory from the base system (or an optional
+.Ar srcroot ) .
+.Pp
+As far as possible,
+.Nm
+will create hardlinks instead of copying files, so that cloning an existing
+chroot will often only consume i-nodes.
+.Pp
+Some attributes can take multiple values.
+As a shorthand, several values can be specified in a row without having
+to repeat the
+.Ar attribute
+name, for instance:
+.Pp
+.Dl proot -B /build actions=unpopulate_light check_symlinks
+.Pp
+A
+.Ar configfile
+mostly contains one
+.Ar attribute Ns = Ns Ar value
+assignment per line, with comments starting with a
+.Sq #
+character.
+.Pp
+Possible
+.Cm actions
+(in the order of execution) are as follows:
+.Pp
+.Bl -tag -width unpopulate_light -compact -offset indent
+.It Cm check_mount
+Verify the state of mount points in the system, specifically whether
+the chroot area is not nodev.
+.It Cm unpopulate
+Remove everything from the chroot apart from selected data.
+See
+.Sx Preserved areas and unpopulate
+for details.
+.It Cm snapshot
+Copy things from a snapshot,
+to be retrieved from a URL or from the local filesystem.
+.It Cm trusted_snapshot
+Like
+.Cm snapshot ,
+but without signature checking.
+Use with caution, usually with snapshots you've built yourself.
+.It Cm locate
+Copy things from the base system, perusing the system
+.Xr locate 1
+databases.
+.Bf Sy
+Note that this might erase data, in case it doesn't match the base system
+and is in the way.
+.Ef
+.It Cm resolv
+Copy the system
+.Xr resolv.conf 5
+and
+.Xr hosts 5
+files.
+.It Cm copy_ports
+Copy the ports tree.
+.It Cm copy_sys
+Copy system include files (deprecated).
+.It Cm unpopulate_light
+Remove everything from the chroot apart from selected data.
+See
+.Sx Preserved areas and unpopulate
+for details.
+.It Cm ldconfig
+Rerun
+.Xr ldconfig 8 .
+.It Cm devs
+Regenerate devices using
+.Xr MAKEDEV 8
+and
+.Xr dev_mkdb 8 .
+.It Cm checkout_ports
+Check out a ports tree from cvs using a provided
+.Cm portscvs
+location.
+.It Cm ports_subdirs
+Create ports infrastructure subdirs, according to users required for
+.Xr dpb 1 .
+If
+.Cm chown_all
+is set to 1,
+.Xr chown 2
+any content within to the appropriate users.
+.It Cm stragglers
+Double-check filled up chroot for files we don't know about.
+.It Cm write_mk
+If some values are different from the default,
+write a skeleton
+.Xr mk.conf 5
+file.
+.It Cm check_symlinks
+Report absolute symlinks that exist under the
+.Ar chroot ,
+white-listing known base system links.
+.El
+.Pp
+By default,
+.Nm
+will run
+.Cm check_mount , unpopulate_light , devs , ldconfig , ports_subdirs ,
+.Cm resolv , write_mk .
+If
+.Cm unpopulate
+is used,
+.Cm unpopulate_light
+won't be run.
+It will also run
+.Cm snapshot
+if a snapshot location is provided,
+or
+.Cm locate
+otherwise.
+.Pp
+Add actions with
+.Cm actions Ns = Ns Ar value ,
+remove them with
+.Cm actions Ns =- Ns Ar value .
+.Pp
+Other attributes are:
+.Pp
+.Bl -tag -width mkconf_lines -offset indent -compact
+.It Cm chroot
+same as
+.Fl B Ar chroot
+.It Cm srcroot
+same as
+.Fl S Ar srcroot
+.It Cm PORT_USER
+Who the ports tree should belong to
+.It Cm BUILD_USER
+Who to build as (defaults to _pbuild)
+.It Cm FETCH_USER
+Who to fetch as (defaults to _pfetch)
+.It Cm LOG_USER
+Who to write log as (defaults to
+.Cm BUILD_USER )
+.It Cm LOGDIR
+Where to write logs (defaults to
+.Pa ${PORTSDIR}/logs )
+.It Cm PORTSDIR
+.It Cm DISTDIR
+.It Cm PACKAGE_REPOSITORY
+.It Cm PLIST_REPOSITORY
+.It Cm LOCKDIR
+.It Cm WRKOBJDIR
+same as in
+.Xr bsd.port.mk 5
+.Pp
+.It Cm chown_all
+set to 1 to have the action
+.Cm ports_subdirs
+change owners of every content.
+.It Cm extra
+extra file to copy into the
+.Ar chroot .
+.It Cm mkconf_lines
+Add lines to the generated
+.Pa /etc/mk.conf .
+.It Cm mkconf_tail
+Add file to the generated
+.Pa /etc/mk.conf .
+.It Cm preserve
+Supplemental directory to preserve during
+.Cm unpopulate .
+.It Cm sets
+Add or remove sets compared to the default list required to build ports
+(defaults to all sets).
+.It Cm snapshot
+Location of snapshot for the
+.Cm snapshot
+action.
+.It Cm portscvs
+Where to get a ports snapshot for the
+.Cm checkout_ports
+action.
+.El
+.Ss Preserved areas and unpopulate
+The following entries won't be erased during a
+.Cm locate
+or
+.Cm unpopulate*
+action:
+.Pp
+.Bl -dash -compact -offset indent
+.It
+Items explicitly marked with the
+.Cm preserve
+attribute.
+.It
+A
+.Cm snapshot
+directory containing the base sets.
+.It
+All the ports specific sub directories if they are defined,
+namely
+.Cm DISTDIR , WRKOBJDIR , LOGDIR , PACKAGE_REPOSITORY , PLIST_REPOSITORY ,
+.Cm LOCKDIR .
+.It
+The
+.Cm PORTSDIR
+itself, unless
+.Cm copy_ports
+is used.
+.It
+Any mount point.
+.It
+Data explicitly copied through other actions, e.g.,
+.Cm extra
+files, key files...
+.El
+.Sh EXAMPLES
+The following
+.Ar configfile
+sets things up for an initial build on a
+.Xr dpb 1
+cluster
+.Po
+refer to
+.Xr bulk 8
+for typical setups of such build clusters
+.Pc .
+.Bd -literal -offset index
+chroot=/build
+PORT_USER=espie
+extra=/home/espie/startup
+WRKOBJDIR=/tmp/pobj
+LOCKDIR=/tmp/locks
+PLIST_REPOSITORY=/data/plist
+DISTDIR=/data/distfiles
+PACKAGE_REPOSITORY=/data/packages
+actions=unpopulate_light
+ copy_ports
+.Ed
+.Pp
+It assumes
+.Pa /build/data
+is a separate partition that won't be cleaned up by
+.Cm unpopulate_light ,
+and that can be mounted on slaves.
+Note also that
+.Pa /tmp
+should be a fast local directory on every machine of the cluster.
+.Pp
+.Pa /home/espie/startup
+is a startup script for
+.Xr dpb 1 .
+.Pp
+Initial invocation on the master could be
+.Pp
+.D1 Nm Fl c Ar configfile Cm chown_all Ns =1
+.Pp
+to ensure correct permissions for existing data under various
+ports directories.
+.Pp
+Slaves should not need the extra arguments, as the directories will
+already have correct owners.
+.Sh SEE ALSO
+.Xr dpb 1 ,
+.Xr bulk 8 ,
+.Xr chroot 8
+.Sh AUTHORS
+.An Marc Espie Aq Mt espie@openbsd.org
diff --git a/static/openbsd/man1/register-plist.1 b/static/openbsd/man1/register-plist.1
new file mode 100644
index 00000000..2049d117
--- /dev/null
+++ b/static/openbsd/man1/register-plist.1
@@ -0,0 +1,143 @@
+.\" $OpenBSD: register-plist.1,v 1.7 2023/10/06 12:45:45 espie Exp $
+.\"
+.\" Copyright (c) 2010 Marc Espie <espie@openbsd.org>
+.\"
+.\" Permission to use, copy, modify, and distribute this software for any
+.\" purpose with or without fee is hereby granted, provided that the above
+.\" copyright notice and this permission notice appear in all copies.
+.\"
+.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+.\"
+.Dd $Mdocdate: October 6 2023 $
+.Dt REGISTER-PLIST 1
+.Os
+.Sh NAME
+.Nm register-plist
+.Nd smart diff and registration of packing-lists
+.Sh SYNOPSIS
+.Nm register-plist
+.Op Fl n
+.Op Fl s Ar snapdir
+.Ar dir
+.Op Ar pkgname ...
+.Nm
+.Fl p
+.Ar dir
+.Nm
+.Fl t
+.Ar p1
+.Ar p2
+.Sh DESCRIPTION
+.Nm
+is used to check that a packing-list for a given package name doesn't change.
+By default, it is invoked at the end of
+.Li make package ,
+and compares a temporary package with the
+.Pa ${PLIST_REPOSITORY}
+before moving it to
+.Pa ${PACKAGE_REPOSITORY}/${MACHINE_ARCH}/all
+.Po
+see
+.Ev PACKAGE_REPOSITORY
+and
+.Ev PLIST_REPOSITORY
+in
+.Xr bsd.port.mk 5
+.Pc .
+Package names (package stem plus version) are used to uniquely identify
+packages.
+When something in the package changes, the package name should change,
+usually by increasing
+.Ev REVISION .
+.Pp
+.Nm
+checks for a lot of details, including DESCR contents.
+Thus changes in MAINTAINER, hard and symlinks existence and values,
+comments, and other things, will trigger
+.Ev REVISION
+bumps).
+.Pp
+Dependencies receive special treatment.
+Addition or deletion of dependencies should warrant a bump, but
+.Nm
+will also verify that dependencies go
+.Sq forward :
+namely it's okay for a
+.Cm @wantlib
+to go from
+.Pa liba.so.2.0
+to
+.Pa liba.so.3.0
+but not the other way around.
+.Pp
+Starting with
+.Ox 6.6 ,
+.Cm @version
+bumps allow system-wide change to affect plists without triggering an
+error.
+.Pp
+.Nm
+records a packing-list for each
+.Ar pkgname
+into the given directory
+.Ar dir .
+If no previous packing-list for the given pkgname exists, the packing-list
+is recorded.
+If a previous packing-list exists,
+.Nm
+compares both packing-list for discrepancies.
+Whenever something significant changes,
+.Nm
+will display a diff of the differences, and exit with an error.
+.Pp
+Some items in the packing-list may change without actual problems.
+For instance, dependencies are allowed to go forward.
+On the other hand, some items like the package DESCR can't change at all.
+Since this is a generated file, porters often overlook that items such as
+the HOMEPAGE or the MAINTAINER's email address are embedded into that file,
+and thus that changing these requires a REVISION bump.
+.Pp
+If option
+.Fl n
+is specified,
+.Nm
+will do the exact same checks, but will not write any new packing-list.
+.Pp
+If option
+.Fl s Ar snapdir
+is specified,
+.Nm
+will write the packing-list into a separate
+.Ar snapdir
+directory if there have been no errors
+(snapshot directory, to record all packing-lists from the current snapshot).
+.Pp
+.Nm
+can also be invoked with
+.Fl p
+and a
+.Ar dir .
+This will read the packing-list from standard input and check
+that it would register correctly into
+.Ar dir ,
+as used by
+target
+.Cm check-register
+in
+.Xr bsd.port.mk 5 .
+.Pp
+.Nm
+can also be invoked with
+.Fl t
+and two packing-lists
+.Ar p1
+.Ar p2
+to directly compare those packing-lists.
+.Sh SEE ALSO
+.Xr bsd.port.mk 5
diff --git a/static/openbsd/man1/update-patches.1 b/static/openbsd/man1/update-patches.1
new file mode 100644
index 00000000..b6d2f7e9
--- /dev/null
+++ b/static/openbsd/man1/update-patches.1
@@ -0,0 +1,100 @@
+.\" $OpenBSD: update-patches.1,v 1.2 2018/06/26 06:56:07 jmc Exp $
+.\"
+.\" Copyright (c) 2010 Marc Espie <espie@openbsd.org>
+.\"
+.\" Permission to use, copy, modify, and distribute this software for any
+.\" purpose with or without fee is hereby granted, provided that the above
+.\" copyright notice and this permission notice appear in all copies.
+.\"
+.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+.\"
+.Dd $Mdocdate: June 26 2018 $
+.Dt UPDATE-PATCHES 1
+.Os
+.Sh NAME
+.Nm update-patches
+.Nd create or update patches for a given port
+.Sh SYNOPSIS
+.Nm update-patches
+.Sh DESCRIPTION
+.Nm
+is a helper script for the target
+.Ar update-patches
+in
+.Xr bsd.port.mk 5 .
+It takes no argument, but uses quite a few environment variables as
+implicit parameters.
+.Pp
+.Nm
+looks under
+.Ev WRKDIST
+for patched files.
+Those are files with extension
+.Ev PATCHORIG ,
+except for those matching also
+.Ev DISTORIG .
+.Pp
+Once those files are found, they are matched against the contents of
+directory
+.Ev PATCHDIR ,
+most specifically files matching wildcard
+.Ev PATCH_LIST .
+Matching files are regenerated on the basis of
+.Pp
+.Dl $ diff -u -p -a ${DIFF_ARGS} $file$PATCHORIG $file
+.Pp
+and compared.
+Modified patches are updated and reported, new patches are generated,
+and old patches that no longer seem to exist are also reported.
+.Pp
+As an exception, if a
+.Pa $file.beforesubst
+original file is found, it is used instead of $file in the diff line:
+.Pp
+.Dl $ diff -u -p -a ${DIFF_ARGS} $file$PATCHORIG $file.beforesubst
+.Pp
+The patch header is normalized to always be:
+.Bd -literal -offset indent
+Index: $file
+--- $file.orig
++++ $file
+.Ed
+.Pp
+Patches with problematic
+.Xr cvs 1
+keywords may be fixed if possible, and reported if not.
+.Pp
+.Nm
+prints the list of changed patches for further study.
+.Sh ENVIRONMENT
+.Bl -tag -width FORCE_REGEN
+.It Ev DIFF_ARGS
+Extra parameters to insert into
+.Xr diff 1 .
+.It Ev DISTORIG
+Extension to original files to ignore entirely.
+.It Ev FORCE_REGEN
+Force patches to be regenerated even if they didn't change.
+.It Ev PATCHDIR
+Path to existing and generated patches.
+.It Ev PATCHORIG
+Extension to match for finding original files.
+.It Ev PATCH_LIST
+Only compare new patches to existing patches matching that pattern.
+.It Ev PATCH_VERBOSE
+Force
+.Nm
+to tell about everything it does.
+.It Ev WRKDIST
+Directory to scan for files to compare.
+.El
+.Sh SEE ALSO
+.Xr cvs 1 ,
+.Xr diff 1 ,
+.Xr patch 1
diff --git a/static/openbsd/man1/update-plist.1 b/static/openbsd/man1/update-plist.1
new file mode 100644
index 00000000..21d8f9a7
--- /dev/null
+++ b/static/openbsd/man1/update-plist.1
@@ -0,0 +1,323 @@
+.\" $OpenBSD: update-plist.1,v 1.10 2024/04/14 17:24:15 phessler Exp $
+.\"
+.\" Copyright (c) 2018 Marc Espie <espie@openbsd.org>
+.\"
+.\" Permission to use, copy, modify, and distribute this software for any
+.\" purpose with or without fee is hereby granted, provided that the above
+.\" copyright notice and this permission notice appear in all copies.
+.\"
+.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+.\"
+.Dd $Mdocdate: April 14 2024 $
+.Dt UPDATE-PLIST 1
+.Os
+.Sh NAME
+.Nm update-plist
+.Nd create or update packing-list(s) for a given port
+.Sh SYNOPSIS
+.Ev PORTSDIR Ns = Ns Ar path
+.Op Ev FAKE_TREE_OWNER Ns = Ns Ar user Ev PORTS_TREE_OWNER Ns = Ns Ar user Nm doas
+.Nm
+.Op Fl Ffmnqrvx
+.Op Fl C Ar dir
+.Op Fl c Ar var
+.Op Fl E Ar ext
+.Op Fl e Ar ext
+.Op Fl I Ar var
+.Op Fl i Ar var
+.Op Fl j Ar jobs
+.Op Fl S Ar var
+.Op Fl s Ar var
+.Op Fl X Ar path
+.Op Fl w Ar suffix
+.Fl -
+.Ar pkg_create_args ...
+.Sh DESCRIPTION
+.Nm
+is a helper script for the target
+.Ar update-plist
+in
+.Xr bsd.port.mk 5 .
+.Pp
+Along with options and environment variables,
+.Nm
+uses the exact same options and arguments that would be passed to
+.Xr pkg_create 1 .
+Since
+.Xr pkg_create 1
+normally takes one single actual
+.Ar pkgname ,
+there is no ambiguity in
+.Ev MULTI_PACKAGES
+situations.
+.Pp
+The first set of arguments correspond to the
+.Sq default package .
+.Pp
+If
+.Ev PORTS_PRIVSEP
+is in effect,
+.Nm
+is run as root, but will switch back to
+.Ev FAKE_TREE_OWNER
+for scanning the installation directory and to
+.Ev PORTS_TREE_OWNER
+for writing packing-lists.
+.Pp
+.Nm
+may need to know the
+.Ev PORTSDIR
+location in order to scan dependencies to trim common directories.
+.Pp
+The options are as follows:
+.Bl -tag -width Ds
+.It Fl C Ar dir
+Use a cache directory
+.Ar dir
+for scanning dependencies.
+Beware that this directory should then be cleaned manually if the
+dependencies's packing-lists change.
+But this will speed up packing-list regeneration for ports with
+lots of dependencies significantly.
+.It Fl c Ar var
+Variable
+.Ar var
+may be used as a way to insert
+.Cm @ Ns comment
+when other variables vanish.
+.It Fl E Ar ext
+Write new files with
+.Ar ext
+extension instead of the default
+.Pa .new .
+.It Fl e Ar ext
+Preserve old files as
+.Ar ext
+extension instead of the default
+.Pa .orig .
+.It Fl F
+Do not try to run
+.Xr pkg_locate 1 .
+.It Fl f
+Force
+.Xr pkg_locate 1
+to look up every file for conflicts instead of just the new ones.
+.It Fl I Ar var
+Variable
+.Ar var
+may expand to nothing, in which case the variable from
+.Fl c Ar var
+can be used to prevent duplicate entries.
+.It Fl i Ar var
+Ignore variable
+.Ar var
+for new substitutions.
+Only existing substitutions will be considered for the new lists.
+.It Fl j Ar jobs
+Use
+.Ar jobs
+concurrent
+.Xr pkg_locate 1
+pipes.
+Default is
+.Sq hw.ncpuonline .
+.It Fl n
+Do not move the final packing-lists in position.
+Instead, leave the
+.Pa <file>.new
+files for comparison.
+.It Fl q
+Quiet mode.
+Do not display status progress messages.
+Note that this is not the opposite of verbose mode.
+.It Fl r
+Run the
+.Pa fake
+directory scan as root.
+.It Fl S Ar var
+Consider variable for substitution only at the end of paths,
+e.g., for suffixes like
+.Pa .pyc
+or
+.Pa .pyo .
+.It Fl s Ar var
+Consider variable for substitution only at start of paths,
+e.g., for directories like
+.Pa /etc/rc.d
+or
+.Pa /usr/local .
+.It Fl v
+Verbose mode.
+Explain about directories stripped from dependencies.
+Note that this is not the opposite of quiet mode.
+.It Fl w Ar suffix
+Warn about suffixes such as
+.Ar .orig
+that (usually) should not end into packing-lists.
+.It Fl X Ar path
+Exclude file at absolute
+.Ar path
+from the information recorded in the packing-list.
+.El
+.Pp
+.Nm
+assumes all multi-packages live under the same installation directory
+.Po
+.Xr pkg_create 1 Ns 's
+.Fl B
+option
+.Pc ,
+and it will scan all paths under that directory and dispatch
+them into corresponding subpackages, using the following heuristics:
+.Bl -bullet
+.It
+files that were in existing packing-list(s) will be kept in the same
+packing-list.
+.It
+new files and directories will be put in the packing-list that owns
+the corresponding directory.
+.It
+barring that, new files will be put into the first packing-list whose PREFIX
+fits.
+.El
+.Pp
+As far as possible, everything that looks like actual files will be sorted
+in alphabetical order, after variable substitutions.
+.Pp
+.Nm
+will warn for a lot of conditions, such as pre-formatted manpages, or files
+ending in pre-patch suffixes.
+Adding a
+.Cm @comment Ar intentional<reason>
+will silence the warning.
+For instance:
+.Bd -literal -offset indent
+@man man/ja_JP.EUC/cat1/kakasi.0
+@comment intentional: mandoc doesn't handle this locale
+.Ed
+.Pp
+.Nm
+will also scan dependencies, in order to strip common directories.
+.Pp
+If the
+.Ar pkglocatedb
+package is installed,
+.Nm
+will make use of it and report unregistered conflicts.
+This can be disabled with
+.Fl F
+as it is time-consuming.
+.Pp
+Most
+.Ev SUBST_VARS
+variables will be back-substituted into the regenerated packing-lists,
+starting from the longest variable values.
+.Nm
+tries to keep existing substitutions.
+It does not add new substitutions on
+.Ev BASE_PKGPATH
+and
+.Ev BUILD_PKGPATH ,
+it does only substitute
+.Ev FULLPKGNAME
+in
+.Pa share/doc/pkg-readmes
+and it currently does not add new substitutions for
+.Ev ARCH
+nor
+.Ev MACHINE_ARCH .
+.Pp
+Some packages (notoriously Python packages) create some directories optionally
+based on flavors.
+Options
+.Fl c
+and
+.Fl I
+can be used to avoid duplicate directory definitions.
+.Pp
+Specifically, a generated packing-list would contain
+.Bd -literal -offset indent -compact
+lib/python${MODPY_VERSION}/site-packages/bpdb/
+lib/python${MODPY_VERSION}/site-packages/bpdb/${MODPY_PYCACHE}/
+.Ed
+which expands to
+.Bd -literal -offset indent -compact
+lib/python3.7/site-packages/bpdb/
+lib/python3.7/site-packages/bpdb/__pycache__/
+.Ed
+for python3, which is fine.
+.Pp
+But for python2, variable
+.Sq MODPY_PYCACHE
+will be empty, resulting in
+.Bd -literal -offset indent -compact
+lib/python2.7/site-packages/bpdb/
+lib/python2.7/site-packages/bpdb/
+.Ed
+thus a duplicate directory,
+.Xr pkg_create 1
+won't be happy.
+.Pp
+Using
+.Ev UPDATE_PLIST_ARGS = Fl c Ar MODPY_COMMENT Fl I Ar MODPY_PYCACHE
+will result in injecting
+.Sq ${MODPY_COMMENT}
+wherever
+.Nm
+finds a duplicate directory by replacing
+.Sq ${MODPY_PYCACHE}
+with nothing.
+.Pp
+This yields
+.Bd -literal -offset indent -compact
+lib/python${MODPY_VERSION}/site-packages/bpdb/
+${MODPY_COMMENT}lib/python${MODPY_VERSION}/site-packages/bpdb/MODPY_PYCACHE}/
+.Ed
+and for python2 this expands to
+.Bd -literal -offset indent -compact
+lib/python2.7/site-packages/bpdb/
+@comment lib/python2.7/site-packages/bpdb/
+.Ed
+which is exactly what we want.
+.Pp
+Specific items such as shared libraries or binaries will gain annotations
+and special handling, for instance
+.Ev LIBlibname_VERSION .
+.Pp
+Existing packing-lists are scanned for non-file entries, such as
+.Cm newuser ,
+.Cm mode ,
+or
+.Cm exec
+markers.
+Those will be inserted into the updated packing-lists at the most likely
+position.
+.Pp
+.Nm
+will first write files as
+.Pa <file>.new ,
+then it will display which files are new and which files have changed.
+If old packing-lists already exist, it will move old packing lists into
+.Pa <file>.orig ,
+then move the new files into position.
+.Sh SEE ALSO
+.Xr pkg_add 1 ,
+.Xr pkg_create 1 ,
+.Xr bsd.port.mk 5
+.Sh BUGS AND LIMITATIONS
+.Nm
+might be the most complicated piece of the ports infrastructure.
+There will always be cases that require manual intervention.
+.
+Since
+.Ar fake
+is now run as non-root,
+.Nm
+can't figure out users and groups for new files, so these should be
+considered carefully.