Re: etcupdate -- is there a way to get it to delete $FreeBSD$ strings from my files?
Date: Mon, 24 Nov 2025 10:22:48 UTC
On Mon, 24 Nov 2025 01:43:21 -0800
"Dan Mahoney (Ports)" <freebsd@gushi.org> wrote:
> "etcupdate extract" still leaves me with an /etc with the old $FreeBSD tags in it. I'm not sure to where it's extracting, but it doesn't seem to be to my /etc tree.
>
> -Dan
This is how I've been running updates for jails, etc.
# Root mount point at which update should happen
UPDATE_ROOT="/data/vdom/test/system"
# Extract new updates from base.txz
for i in ${UPDATE_PATHS:?}
do
tar -C ${UPDATE_ROOT:?} --clear-nochange-fflags -xpf base.txz ./${i:?}
done
# Extract kernel updates (not required for jails)
tar -C ${UPDATE_ROOT:?} --clear-nochange-fflags -xpf kernel.txz
# View etc changes prior to update
etcupdate diff -D ${UPDATE_ROOT:?} -d ${UPDATE_ROOT:?}/var/db/etcupdate | less
# Update etc files
# 1) Extract etcupdate current tree from the base archive
tar -xpf base.txz ./var/db/etcupdate/current
# 2) Create etcupdate.tar.bz2 archive
tar -C ./var/db/etcupdate/current -jcf etcupdate.tar.bz2 ./ && rm -rf ./var
# 3) Run etcupdate merging new changes in etcupdate.tar.bz2 into /etc
etcupdate -D ${UPDATE_ROOT:?} -d ${UPDATE_ROOT:?}/var/db/etcupdate -F -t etcupdate.tar.bz2
Whether this still leaves those tags or not, I don't know, as I never
bothered to check.