Re: etcupdate -- is there a way to get it to delete $FreeBSD$ strings from my files?
Date: Sat, 29 Nov 2025 06:24:51 UTC
> On Nov 24, 2025, at 6:46 PM, Dag-Erling Smørgrav <des@FreeBSD.org> wrote: > > "Dan Mahoney (ports)" <freebsd@gushi.org> writes: >> Dag-Erling Smørgrav <des@FreeBSD.org> writes: >>> `etcupdate extract` does not touch /etc, it populates /var/db/etcupdate. >>> You should only run it if /var/db/etcupdate is empty or does not match >>> your installed system. If you ran it with a source tree that does not >>> match your installed system, you have now lost the ability to correctly >>> track changes to /etc. >> Dag, > > That's not my name, Bob. First, let me apologize for this. It clearly set our communications off on the wrong foot. >> It sounds like when you say /var/db/etcupdate, you're describing what >> the man page describes as the "work dir" [...] If that's the case, >> that's a manpage failure. > > No, it's a reader failure. The manual page is perfectly clear, you > just chose not to read it. > >> The only thing the manpage says about "extract mode" is: >> >> Extract Mode >> The extract mode generates a new “current” tree. Unlike the default >> mode, it does not save any existing “current” tree and does not modify >> any existing “previous” tree. The new “current” tree can either be built >> from a source tree or extracted from a tarball. >> >> It's easy to read that as either of "extract updates the workdir" or >> "extract generates a real, current tree in actual /etc", > I still don't know how -D plays into the extract command, but in the end, it didn't seem to matter. What I really missed was that elsewhere in the manpage, the author directly says, in effect, "sure, copy things out of the current directory" until you get to a reasonable point. Because there's mention *of* the $FreeBSD$ stuff in the manpage, I really thought it was a special case somehow. It's become clear that over the years this system was updated -- first from freebsd-update, then from pkgbase, and later, from source, when pkgbase started breaking things earlier this year, that the steps required to update /etc weren't always properly followed all the way along. At this point, my `etcupdate diff` is down to only the files you'd expect (passwd, group, and the like), and I feel way better moving forward. Thanks for the help and the patience. -Dan