diff options
| author | Devin Teske <dteske@FreeBSD.org> | 2026-09-16 04:29:32 +0000 |
|---|---|---|
| committer | Devin Teske <dteske@FreeBSD.org> | 2026-09-16 21:28:14 +0000 |
| commit | 3fe5961a0b708da599d42cbb6b5e4f030c28ea45 (patch) | |
| tree | cd8a7a4c28aacde38d99eed5a9bb2a94970bc161 /contrib | |
| parent | f308d6d4846a51c2d0839840d6eabbbe70309515 (diff) | |
Add sysconf(8) and libbsdconf(3)
Complete the native configuration trinity: sysctl(8) for live kernel
state, sysrc(8) for rc.conf(5), and sysconf(8) for the remaining base
configuration -- loader.conf(5), sysctl.conf(5), and the make.conf(5)
family -- atop libbsdconf(3).
libbsdconf resurrects figpar as a unified reader/writer. Callbacks own
semantics; statements may span multiple lines via backslash continuation;
non-seekable input is spooled; writes are atomic (mkstemp, fsync, rename)
with mode/owner preservation. Format descriptors name each target, its
files, and quoting rules without private parsers. Multi-file targets
follow boot sourcing order; loader chases loader_conf_files as the boot
loader does.
sysconf(8) is the operator-facing tool: name / name=value on a required
target, sysrc-style list edits, make append and list-strike where they
belong, jail/altroot, and a capsicum sandbox for read-only use.
Sysctl writes validate against the running kernel first -- unknown and
read-only OIDs, CTLFLAG_TUN (pointing at the loader target), and CTLTYPE
range checks -- so a typo or overflow does not land in sysctl.conf.
Make and src treat WITH_/WITHOUT_ as presence knobs (as bsd.mkopt.mk /
src.conf(5) do) and warn on the WITH_*=no form that does not disable the
option, so a bad assignment is caught before an /usr/src build surfaces
it.
The rc target passes through to sysrc(8).
Defaults querying (-d/-D/-A) mirrors sysrc for dumps and descriptions on
targets that have a defaults file; named reads already see defaults, and
-A only widens dump scope.
Manuals are split pkg(8)-style (bsdconf/put/format; sysconf plus
per-target pages). ATF coverage exercises the frontend.
Co-authored-by: Faraz Vahedi <kfv@FreeBSD.org>
Reviewed by: fuz, kfv
Differential Revision: https://reviews.freebsd.org/D58066
Diffstat (limited to 'contrib')
| -rw-r--r-- | contrib/mandoc/lib.in | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/contrib/mandoc/lib.in b/contrib/mandoc/lib.in index 04d86f9add1e..da343264c6d4 100644 --- a/contrib/mandoc/lib.in +++ b/contrib/mandoc/lib.in @@ -31,6 +31,7 @@ LINE("libarm", "ARM Architecture Library (libarm, \\-larm)") LINE("libarm32", "ARM32 Architecture Library (libarm32, \\-larm32)") LINE("libbe", "Boot Environment Library (libbe, \\-lbe)") LINE("libbluetooth", "Bluetooth Library (libbluetooth, \\-lbluetooth)") +LINE("libbsdconf", "Configuration File Library (libbsdconf, \\-lbsdconf)") LINE("libbsdxml", "eXpat XML parser library (libbsdxml, \\-lbsdxml)") LINE("libbsm", "Basic Security Module Library (libbsm, \\-lbsm)") LINE("libc", "Standard C\\~Library (libc, \\-lc)") |
