Created attachment 259520 [details] failed etcupdate(8) log The entire log from running etcupdate(8) post installkernel, and installworld.
Mailing list thread: https://lists.freebsd.org/archives/freebsd-current/2025-April/007399.html
So we're supposed to be staging nsswitch.conf in the object, but instead we're copying it elsewhere in the src tree: "cp -f /usr/src/lib/libc/net/nsswitch.conf /usr/src/lib/libc/nsswitch.conf". From the build log there's an object under /var/db/etcupdate/etcupdate-JN3IPm7, so that seems surprising.
Oh, this is because the buildetc target builds all with SUBDIR_OVERRIDE=etc... which was fine back when etc files lived in /usr/src/etc, but now doesn't really work now that they're scattered all over the tree. :(
Created attachment 259552 [details] proposed patch If it's possible to test a patch, I'd appreciate you trying this one.
Created attachment 259553 [details] proposed patch The previous patch was wrong, thanks to Kyle for pointing that out.
Created attachment 259580 [details] successful etcupdate(8) log successful etcupdate(8) log
(In reply to Mark Johnston from comment #5) > If it's possible to test a patch, I'd appreciate you trying this one. Yes! I updated one host so far, from 1016b3c344350fa5968f16852e5e4e388c51d817[1], to 168d873ae41fd8bd40555322a79c9f215cb4cb9c[2], and the etcupdate(8) process completed successfully. Thanks so much. 1: https://cgit.freebsd.org./src/commit/?id=1016b3c344350fa5968f16852e5e4e388c51d817 2: https://cgit.freebsd.org./src/commit/?id=168d873ae41fd8bd40555322a79c9f215cb4cb9c
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=f83ec40fca52e1e2319b5d4f770f8263378265d6 commit f83ec40fca52e1e2319b5d4f770f8263378265d6 Author: Mark Johnston <markj@FreeBSD.org> AuthorDate: 2025-04-24 14:32:41 +0000 Commit: Mark Johnston <markj@FreeBSD.org> CommitDate: 2025-04-24 14:32:41 +0000 Makefile.inc1: Let the buildetc target run outside of etc Commit 49bc071f4088 ("nsswitch.conf: Avoid modification after installation") changes handling of nsswitch.conf such that we make a copy in the objdir during a build. Historically, the in-tree nsswitch.conf lived under etc. The buildetc target and its copy set SUBDIR_OVERRIDE=etc when building the object tree, but I think this isn't right when conf files are scattered around the src tree. If any of them require non-trivial processing, they'll get skipped during buildetc, and then some build-time commands may run during installetc. In the linked PR, this fails because the src tree is mounted read-only and no objdir was created during buildetc. Remove the SUBDIR_OVERRIDE for the _obj target, and build the buildconfig target across the tree. PR: 286072 Fixes: 49bc071f4088 ("nsswitch.conf: Avoid modification after installation") Reviewed by: brooks, dim Tested by: dim, Alastair Hogge <agh@riseup.net> Differential Revision: https://reviews.freebsd.org/D49960 Makefile.inc1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
Legends, thanks so much.