Skip to content

Commit 0714e19

Browse files
pkgdemonclaude
andcommitted
Rename configd + IPConfiguration plans to nextbsd-*; reconcile them with the WLAN plan
Both docs are the Mach-IPC track (MIG over mach_msg, com.apple.SystemConfiguration), not the superseded AF_UNIX/DO sockets track — they were never FreeBSD-only work, so the freebsd-* prefix was wrong: freebsd-configd-plan.html -> nextbsd-configd-plan.html freebsd-ipconfiguration-plan.html -> nextbsd-ipconfiguration-plan.html Both are now listed in nextbsd-research.html. All ~38 inbound links repointed, and link text updated to match. Content drift fixed. Both plans predate the WLAN plan and contradicted it: configd - claimed configd would read wpa_supplicant's control socket and populate State:/Network/Interface/<iface>/WiFi. Wrong key AND wrong owner: the key is .../AirPort and *wland* publishes it, like any other SCDynamicStore client. No configd change is required for WLAN at all. - argued security/wpa_supplicant from ports should supersede base. Rejected: it's the same 2.11, installs to /usr/local/sbin, and shadows base for no benefit. We keep wpa_supplicant stock from base — not vendored, not taught Mach. - "WiFi declarative config" in Phase 8+ reassigned to wland (it owns known networks in SCPreferences and is sole author of wpa_supplicant's network blocks). - the WiFi-credentials open question moved to WLAN plan Q2, where it belongs. IPConfiguration - claimed WLAN association state would arrive "via a wpa_supplicant hook". No such hook exists here — that was dhcpcd's, and NextBSD replaced dhcpcd with ipconfigd. State arrives as wland's AirPort key; ipconfigd grows the ~70-LOC sc_link_watch.c gate requiring Link{Active} AND AirPort{Authenticated}, key-absent meaning ready so wired NICs are untouched. - now records that "one interface, Ethernet only" is not merely unbuilt but two real bugs — dead re-arm after lease expiry (#37) and a global single-flight capping the daemon at one bound interface for its lifetime (#38) — both hard blockers. Redirect stubs at the four old paths (incl. the two wifi docs from c6d390a) so existing bookmarks and shared links keep working. Also fixes a dangling href to freebsd-hwregd-plan.html, a doc that never existed; the real target is freebsd-hardware-registry-iokit-plan.html. Every internal link on the site now resolves. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 6ef4273 commit 0714e19

20 files changed

Lines changed: 1449 additions & 1345 deletions

‎freebsd-configd-plan.html‎

Lines changed: 13 additions & 699 deletions
Large diffs are not rendered by default.

‎freebsd-disk-arbitration-plan.html‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@
8585
</nav>
8686

8787
<h1>FreeBSD DiskArbitration — porting plan <span class="pill info">freebsd-launchd-mach (v2) effort</span></h1>
88-
<p class="subtitle">A port of Apple's DiskArbitration framework + <code>diskarbitrationd</code> to FreeBSD: disk attach/detach events, mount/unmount/eject coordination, mount-policy approval prompts, and the same <code>DiskArbitration.framework</code> C API that Apple-derived applications already use. Replaces ad-hoc <code>kqueue(EVFILT_FS)</code> polling with a clean event API. Companion to <a href="freebsd-launchd-plan.html">launchd</a>, <a href="freebsd-configd-plan.html">configd</a>, <a href="freebsd-hardware-registry-iokit-plan.html">hwregd</a>, <a href="freebsd-kmodloader-plan.html">kmodloader</a>, <a href="freebsd-asl-plan.html">asl</a>, <a href="freebsd-notifyd-plan.html">notifyd</a>, <a href="freebsd-mdnsresponder-plan.html">mDNSResponder</a>, <a href="freebsd-ipconfiguration-plan.html">IPConfiguration</a>.</p>
88+
<p class="subtitle">A port of Apple's DiskArbitration framework + <code>diskarbitrationd</code> to FreeBSD: disk attach/detach events, mount/unmount/eject coordination, mount-policy approval prompts, and the same <code>DiskArbitration.framework</code> C API that Apple-derived applications already use. Replaces ad-hoc <code>kqueue(EVFILT_FS)</code> polling with a clean event API. Companion to <a href="freebsd-launchd-plan.html">launchd</a>, <a href="nextbsd-configd-plan.html">configd</a>, <a href="freebsd-hardware-registry-iokit-plan.html">hwregd</a>, <a href="freebsd-kmodloader-plan.html">kmodloader</a>, <a href="freebsd-asl-plan.html">asl</a>, <a href="freebsd-notifyd-plan.html">notifyd</a>, <a href="freebsd-mdnsresponder-plan.html">mDNSResponder</a>, <a href="nextbsd-ipconfiguration-plan.html">IPConfiguration</a>.</p>
8989

9090
<div class="resolved">
9191
<strong>Revision 2026-05-23.</strong> This plan originally targeted the sibling <a href="https://github.com/pkgdemon/freebsd-launchd"><code>freebsd-launchd</code></a> (AF_UNIX / GNUstep Distributed Objects) repo where <code>libgeom</code> replaces IOKit and DO replaces Mach IPC. <strong>Refactored 2026-05-23 to target <a href="https://github.com/pkgdemon/freebsd-launchd-mach"><code>freebsd-launchd-mach</code></a> (v2)</strong>: this repo has <strong><code>hwregd</code></strong> &mdash; a MIG-served IORegistry-shape daemon at <code>org.freebsd.hwregd</code> that aggregates <code>devctl(4)</code> events + GEOM data &mdash; so DiskArbitration consumes <code>hwregd</code>'s storage-device-class notifications instead of walking GEOM directly for hot-plug. Mach IPC is <strong>retained</strong> for the daemon's <code>DiskArbitration.framework</code> client API (MIG IDL <code>da.defs</code>, Mach service <code>com.apple.DiskArbitration</code>, <code>DISPATCH_SOURCE_TYPE_MACH_RECV</code> event loop). <code>libgeom</code> is used only for partition / UUID / label / FS-type <strong>enrichment</strong>, in-process, not as the event source.
@@ -484,7 +484,7 @@ <h2 id="refs">13. References</h2>
484484
<ul>
485485
<li>Apple source: <a href="https://github.com/apple-oss-distributions/DiskArbitration">github.com/apple-oss-distributions/DiskArbitration</a> (latest tag <code>DiskArbitration-79.3</code>).</li>
486486
<li>Target repo: <a href="https://github.com/pkgdemon/freebsd-launchd-mach">github.com/pkgdemon/freebsd-launchd-mach</a> (v2 / Mach-IPC track).</li>
487-
<li>Companion plans: <a href="freebsd-launchd-mach-plan.html">launchd (Mach track)</a>, <a href="freebsd-configd-plan.html">configd</a>, <a href="freebsd-hardware-registry-iokit-plan.html">hwregd (hardware registry)</a>, <a href="freebsd-ipconfiguration-plan.html">IPConfiguration</a>, <a href="freebsd-asl-plan.html">asl</a>, <a href="freebsd-notifyd-plan.html">notifyd</a>, <a href="freebsd-mdnsresponder-plan.html">mDNSResponder</a>.</li>
487+
<li>Companion plans: <a href="freebsd-launchd-mach-plan.html">launchd (Mach track)</a>, <a href="nextbsd-configd-plan.html">configd</a>, <a href="freebsd-hardware-registry-iokit-plan.html">hwregd (hardware registry)</a>, <a href="nextbsd-ipconfiguration-plan.html">IPConfiguration</a>, <a href="freebsd-asl-plan.html">asl</a>, <a href="freebsd-notifyd-plan.html">notifyd</a>, <a href="freebsd-mdnsresponder-plan.html">mDNSResponder</a>.</li>
488488
<li>FreeBSD <code>geom(8)</code>, <code>libgeom(3)</code>, <code>devctl(4)</code> manpages.</li>
489489
<li>Apple's DiskArbitration framework: <code>man 3 DiskArbitration</code> on macOS.</li>
490490
<li>Apple Public Source License 2.0: <a href="https://opensource.apple.com/apsl/">opensource.apple.com/apsl/</a>.</li>

‎freebsd-hostnamed-plan.html‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,14 +84,14 @@
8484
</nav>
8585

8686
<h1>FreeBSD hostnamed &mdash; porting plan <span class="pill info">freebsd-launchd-mach (v2) effort</span></h1>
87-
<p class="subtitle">A clean-room daemon that picks a sensible default hostname from hardware identity at first boot, sets <code>kern.hostname</code>, and publishes Apple's three-name shape (<code>ComputerName</code> / <code>LocalHostName</code> / <code>HostName</code>) to <a href="freebsd-configd-plan.html">configd</a>'s <code>SCDynamicStore</code> so <a href="freebsd-mdnsresponder-plan.html">mDNSResponder</a> and other consumers can subscribe. Closest port we can do today of Apple's configd <code>SetHostname</code> plugin, kept as a standalone daemon because this repo's <code>configd</code> has no plugin loader (see <a href="freebsd-configd-plan.html">configd plan</a>'s "deferred" list). Companion to <a href="freebsd-launchd-plan.html">launchd</a>, <a href="freebsd-configd-plan.html">configd</a>, <a href="freebsd-hardware-registry-iokit-plan.html">hwregd</a>, <a href="freebsd-mdnsresponder-plan.html">mDNSResponder</a>, <a href="freebsd-ipconfiguration-plan.html">IPConfiguration</a>.</p>
87+
<p class="subtitle">A clean-room daemon that picks a sensible default hostname from hardware identity at first boot, sets <code>kern.hostname</code>, and publishes Apple's three-name shape (<code>ComputerName</code> / <code>LocalHostName</code> / <code>HostName</code>) to <a href="nextbsd-configd-plan.html">configd</a>'s <code>SCDynamicStore</code> so <a href="freebsd-mdnsresponder-plan.html">mDNSResponder</a> and other consumers can subscribe. Closest port we can do today of Apple's configd <code>SetHostname</code> plugin, kept as a standalone daemon because this repo's <code>configd</code> has no plugin loader (see <a href="nextbsd-configd-plan.html">configd plan</a>'s "deferred" list). Companion to <a href="freebsd-launchd-plan.html">launchd</a>, <a href="nextbsd-configd-plan.html">configd</a>, <a href="freebsd-hardware-registry-iokit-plan.html">hwregd</a>, <a href="freebsd-mdnsresponder-plan.html">mDNSResponder</a>, <a href="nextbsd-ipconfiguration-plan.html">IPConfiguration</a>.</p>
8888

8989
<section id="tldr" class="tldr">
9090
<h3>Status: planning <span class="pill info">v0</span> &mdash; ready for review, no code yet</h3>
9191
<ul>
9292
<li><strong>Repo:</strong> <a href="https://github.com/pkgdemon/freebsd-launchd-mach">github.com/pkgdemon/freebsd-launchd-mach</a> (v2 / Mach-IPC track) &mdash; <strong>monorepo</strong>. New source dir <code>src/hostnamed/</code>.</li>
9393
<li><strong>Mission:</strong> stop shipping <code>FreeBSD/amd64 (Amnesiac)</code>. Synthesize a hardware-derived default name (<code>ThinkPad-T420-8AB123</code>, <code>Mac-mini-F12345</code>, &hellip;), publish via SCDynamicStore so mDNSResponder has a real <code>.local</code> name to announce, and respect user overrides via SCPreferences once that surface exists.</li>
94-
<li><strong>Why standalone, not a configd plugin:</strong> same trade <code>hwregd</code> / <code>ipconfigd</code> / <code>diskarbitrationd</code> took &mdash; this repo's <code>configd</code> doesn't load <code>.bundle</code> plugins yet (deferred per the <a href="freebsd-configd-plan.html">configd plan</a>). Standalone daemon is the consistent shape; if a plugin loader lands later, <code>hostnamed</code>'s body lifts into a plugin in &lt;200 LOC of glue.</li>
94+
<li><strong>Why standalone, not a configd plugin:</strong> same trade <code>hwregd</code> / <code>ipconfigd</code> / <code>diskarbitrationd</code> took &mdash; this repo's <code>configd</code> doesn't load <code>.bundle</code> plugins yet (deferred per the <a href="nextbsd-configd-plan.html">configd plan</a>). Standalone daemon is the consistent shape; if a plugin loader lands later, <code>hostnamed</code>'s body lifts into a plugin in &lt;200 LOC of glue.</li>
9595
<li><strong>Source: hybrid &mdash; vendor where Apple has open source, clean-room where it doesn't.</strong> Apple's modern hostname pipeline lives in <strong><code>Plugins/IPMonitor/set-hostname.c</code></strong> (rolled into IPMonitor in recent configd; there is no standalone <code>SetHostname</code> plugin anymore). That file is APSL 2.0, ~500 LOC, and implements <strong>precedence-based decision + DHCP option 12 + reverse-DNS PTR fallback + the notify_post broadcast</strong>. What it does <em>not</em> do: synthesize a default name from hardware identity &mdash; that lives in Setup Assistant (closed source) on real Macs. So our daemon ports the open-source piece verbatim and clean-rooms the synthesis fallback that fills Setup Assistant's role.</li>
9696
<li><strong>Wire shape:</strong> launchd job at boot &rarr; reads <code>kenv</code> + SMBIOS for synthesis fallback &rarr; (iter 1) writes synthesized name to SCDynamicStore <code>Setup:/System</code> + <code>Setup:/Network/HostNames</code> via <code>libSystemConfiguration</code> &rarr; calls <code>sethostname(2)</code> &rarr; <code>notify_post("com.apple.system.hostname")</code> &rarr; exits. Later iters add SCPreferences awareness, the vendored <code>set-hostname.c</code> precedence/DHCP integration, and Bonjour-conflict feedback.</li>
9797
<li><strong>Licensing:</strong> mixed. Vendored Apple files (iter 3+ <code>set-hostname.c</code>, possibly bits of <code>SCDHostName.c</code>'s validation helpers) stay APSL 2.0 with their original headers, exactly like configd / IPConfiguration. New clean-room synthesis + glue stays BSD-2-Clause. Same per-file pattern the rest of <code>freebsd-launchd-mach</code> uses.</li>

0 commit comments

Comments
 (0)