From nobody Tue Oct 28 14:29:57 2025 X-Original-To: freebsd-current@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cwt7l0Yztz6Dy4H for ; Tue, 28 Oct 2025 14:30:11 +0000 (UTC) (envelope-from zarychtam@plan-b.pwste.edu.pl) Received: from plan-b.pwste.edu.pl (plan-b.pwste.edu.pl [IPv6:2001:678:618::40]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature ECDSA (prime256v1) client-digest SHA256) (Client CN "plan-b.pwste.edu.pl", Issuer "GEANT TLS ECC 1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cwt7k4MV9z3s3j for ; Tue, 28 Oct 2025 14:30:10 +0000 (UTC) (envelope-from zarychtam@plan-b.pwste.edu.pl) Authentication-Results: mx1.freebsd.org; none Received: from [192.168.7.70] (dom.potoki.eu [62.133.140.50]) (authenticated bits=0) by plan-b.pwste.edu.pl (8.18.1/8.17.2) with ESMTPSA id 59SETv35005604 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NO); Tue, 28 Oct 2025 15:29:57 +0100 (CET) (envelope-from zarychtam@plan-b.pwste.edu.pl) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=plan-b.pwste.edu.pl; s=plan-b-mailer; t=1761661798; bh=h0V57kcDgRl9dF2kn7Xf7tpdyMhQrw7bEFQiZPtXwHk=; h=Date:Subject:To:Cc:References:From:In-Reply-To; b=klmE9jkbEXE1noXtg24O1xy/Zh1Z0J1+6CyF3ElLNabuFftuUMMtuYdZrHVyExceQ IbkYH2UmbBRTTzfC+oQQf5fA7+xQwLE6ehlCA1YklcLs/fRn+y5dabHcxVPGZDNg+j EZjjWFBaNeF0r5V57QHfQDYcReXEAZA+TcK/8tYdALnO4erKJlTGiM00/IxnpictGM IEFcStThrRpdD82p9EGovYkhkShjnZ75fHM8yHRfazvX07UhGrBfGG2gSqvUH5OpWK m2KIYNDyrMyT1kXjvo8kbR15Chfdp7Bg3DiXvA+wdmvCvtB3aj51bektlT8b3WUkWm D0hpJ8x321yyA== X-Authentication-Warning: plan-b.pwste.edu.pl: Host dom.potoki.eu [62.133.140.50] claimed to be [192.168.7.70] Content-Type: multipart/alternative; boundary="------------IStU7fI4yOfb0SjWxROEZlMd" Message-ID: <31a80d2d-65b3-4604-ac5f-1440d23fb85a@plan-b.pwste.edu.pl> Date: Tue, 28 Oct 2025 15:29:57 +0100 List-Id: Discussions about the use of FreeBSD-current List-Archive: https://lists.freebsd.org/archives/freebsd-current List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-current@FreeBSD.org MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: "etcupdate extract" -- Failed to build new tree. To: Thomas Schweikle Cc: freebsd-current@freebsd.org References: <86qzuo1ab1.fsf@ltc.des.dev> <868qgw14xj.fsf@ltc.des.dev> <864irj1ett.fsf@ltc.des.dev> <86jz0fyzjj.fsf@ltc.des.dev> Content-Language: en-US From: Marek Zarychta Autocrypt: addr=zarychtam@plan-b.pwste.edu.pl; keydata= xsBNBFfi3cMBCADLecMTFXad4uDXqv3eRuB4qJJ8G9tzzFezeRnnwxOsPdytW5ES2z1ibSrR IsiImx6+PTqrAmXpTInxAi7yiZGdSiONRI4CCxKY9d1YFiNYT/2WyNXCekm9x29YeIU7x0JB Llbz0f/9HC+styBIu2H+PY/X98Clzm110CS+n/b9l1AtiGxTiVFj7/uavYAKxH6LNWnbkuc5 v8EVNc7NkEcl5h7Z9X5NEtzDxTOiBIFQ/kOT7LAtkYUPo1lqLeOM2DtWSXTXQgXl0zJI4iP1 OAu4qQYm2nXwq4b2AH9peknelvnt1mpfgDCGSKnhc26q6ibTfMwydp+tvUtQIQYpA6b9ABEB AAHNN01hcmVrIFphcnljaHR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/s0VRBkw3xoKBZfZza6fTQ4gTpAipjyk7ldOGBV+PvkKATdhK2yLwuWXhKbg/GRlD 1r5P0gxzSqfV4My+KJuc2EDcrqp1y0wOpE1m9iZqCcd0fup5f7HDsYlLWshr7NQl28f6+fQb sylq/j672BHXsdeqf/Ip9V4= In-Reply-To: X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:206006, ipnet:2001:678:618::/48, country:PL] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Rspamd-Queue-Id: 4cwt7k4MV9z3s3j This is a multi-part message in MIME format. --------------IStU7fI4yOfb0SjWxROEZlMd Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit W dniu 28.10.2025 o 14:37, Thomas Schweikle pisze: > > > On Tue, Oct 28, 2025 at 1:35 PM Dag-Erling Smørgrav > wrote: > > Thomas Schweikle writes: > > Dag-Erling Smørgrav writes: > > > Thomas Schweikle writes: > > > > Dag-Erling Smørgrav writes: > > > > > How was this system installed? > > > > By compiling 15-STABLE from latest available 14.3 getting > sources via > > > How did you install 14.3? > > Same way. It was Upgraded from 13-STABLE. And this was upgraded from > > 12-STABLE. If I remember it right, the system installed from > > disquettes was 5.0-RELEASE some way back in time ... > > Do you understand the difference between the words “install” and > “upgrade”? > > What did you use prior to etcupdate?  When was /etc last updated? > > The last time mergemaster was available. Later on it was done > manually, since etcupdate did not work. > > My findings: etcupdate just does not work, because right after cloning > etc is not in a working state. It is, after running > > make _legacy > > in "/usr/src". Then it runs > > etcupdate extract > etcupdate diff > > without this "Failed to build new tree.", but it then fails run > > etcupdate -p > > right after building world, kernel and installkernel, exhausting: "No > previous tree to compare against, a sane comparison is not possible." > just because there is no tree to compare against, or better: > "etcupdate extract" created an empty tree without any files within.It > is just "make _legacy" creates all the folders, etcupdate expects, but > not the files. It seems all those advices given within the handbook or > at various places within the internet all give it the wrong way: > > clone > ettupdate extract > etcupdate diff > make buildworld > make buildkernel > make installkernel > etcupdate -p > reboot > make installworld > etcupdate -B > reboot > > But > > clone > make buildworld > make buildkernel > etcupdate extract > etcupdate diff > make installkernel > etcupdate -p > make installworld > etcupdate -B > reboot > > because you will never have a working etc before building world and > kernel. And in tune you'd never will have anything you could extract. > You are assuming something to extract, but there isn't anything before > building. mergemaster did get this right (comparing the fresh build > /usr/src etc against /etc). etcupdate does not -- at least if it is > used the way the handbook advises. It would only work this way, if you > did not clone the working tree right fresh into an empty directory (or > after "git reset hard" -- removing anything from /usr/src what was > created after the last "git pull" simulating "git clone" as far as > possible). > > -- > Thomas Hello Thomas, that’s splendid - it’s impressive that you’ve managed to upgrade FreeBSD from version 5.0! FreeBSD truly is an amazing operating system; being able to upgrade continuously for 25+ years without ever needing to reinstall is a real achievement. Well done; my oldest installations that are still being upgraded date back only to the FreeBSD 6.x era. Anyway, it’s time to say goodbye to mergemaster  - you won’t regret it. The FreeBSD Handbook covers this transition in detail [1]. To perform the upgrade correctly, you should run mergemaster(8) for the last time under FreeBSD 14, and before rebooting, you’ll also need to run etcupdate(8) too. Here’s the sequence that worked for me many times in recent weeks: # make buildworld # make buildkernel # mergemaster # etcupdate extract # etcupdate diff # etcupdate -B # make installkernel # make installworld # reboot # pkg upgrade # make delete-old # make delete-old-libs bootloader upgrade # zpool upgrade # reboot It’s a bit risky and not entirely in line with the Handbook to skip the first reboot, but if you’re upgrading from a relatively recent 14.3-STABLE and your root filesystem is on ZFS, you can create a backup Boot Environment (BE) as a safeguard in case something goes wrong. Even better, you can create a testing BE and perform the installation into that BE after mounting it by using DESTDIR. Just remember that both mergemaster and etcupdate must also be executed with respect to this DESTDIR path. If you’ve used etcupdate in the past and weren’t satisfied with its behavior, and therefore continued using mergemaster, I recommend cleaning the cruft by running the following command before starting the final transition to etcupdate: # rm -rf /var/db/etcupdate/ 1. https://docs.freebsd.org/en/books/handbook/cutting-edge/#updating-src-quick-start Cheers Marek --------------IStU7fI4yOfb0SjWxROEZlMd Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit
W dniu 28.10.2025 o 14:37, Thomas Schweikle pisze:


On Tue, Oct 28, 2025 at 1:35 PM Dag-Erling Smørgrav <des@freebsd.org> wrote:
Thomas Schweikle <tschweikle@gmail.com> writes:
> Dag-Erling Smørgrav <des@freebsd.org> writes:
> > Thomas Schweikle <tschweikle@gmail.com> writes:
> > > Dag-Erling Smørgrav <des@freebsd.org> writes:
> > > > How was this system installed?
> > > By compiling 15-STABLE from latest available 14.3 getting sources via   
> > How did you install 14.3?
> Same way. It was Upgraded from 13-STABLE. And this was upgraded from
> 12-STABLE. If I remember it right, the system installed from
> disquettes was 5.0-RELEASE some way back in time ...

Do you understand the difference between the words “install” and
“upgrade”?

What did you use prior to etcupdate?  When was /etc last updated?
 
The last time mergemaster was available. Later on it was done manually, since etcupdate did not work.

My findings: etcupdate just does not work, because right after cloning etc is not in a working state. It is, after running

make _legacy

in "/usr/src". Then it runs

etcupdate extract
etcupdate diff

without this "Failed to build new tree.", but it then fails run

etcupdate -p

right after building world, kernel and installkernel, exhausting: "No previous tree to compare against, a sane comparison is not possible." just because there is no tree to compare against, or better: "etcupdate extract" created an empty tree without any files within.It is just "make _legacy" creates all the folders, etcupdate expects, but not the files. It seems all those advices given within the handbook or at various places within the internet all give it the wrong way:

clone
ettupdate extract
etcupdate diff
make buildworld
make buildkernel
make installkernel
etcupdate -p
reboot
make installworld
etcupdate -B
reboot

But

clone
make buildworld
make buildkernel
etcupdate extract
etcupdate diff
make installkernel
etcupdate -p
make installworld
etcupdate -B
reboot

because you will never have a working etc before building world and kernel. And in tune you'd never will have anything you could extract. You are assuming something to extract, but there isn't anything before building. mergemaster did get this right (comparing the fresh build /usr/src etc against /etc). etcupdate does not -- at least if it is used the way the handbook advises. It would only work this way, if you did not clone the working tree right fresh into an empty directory (or after "git reset hard" -- removing anything from /usr/src what was created after the last "git pull" simulating "git clone" as far as possible).

--
Thomas

Hello Thomas,

that’s splendid - it’s impressive that you’ve managed to upgrade FreeBSD from version 5.0! FreeBSD truly is an amazing operating system; being able to upgrade continuously for 25+ years without ever needing to reinstall is a real achievement. Well done; my oldest installations that are still being upgraded date back only to the FreeBSD 6.x era.

Anyway, it’s time to say goodbye to mergemaster  - you won’t regret it. The FreeBSD Handbook covers this transition in detail [1]. To perform the upgrade correctly, you should run mergemaster(8) for the last time under FreeBSD 14, and before rebooting, you’ll also need to run etcupdate(8) too.

Here’s the sequence that worked for me many times in recent weeks:

# make buildworld
# make buildkernel
# mergemaster
# etcupdate extract
# etcupdate diff
# etcupdate -B
# make installkernel
# make installworld
# reboot
# pkg upgrade
# make delete-old
# make delete-old-libs
bootloader upgrade
# zpool upgrade
# reboot

It’s a bit risky and not entirely in line with the Handbook to skip the first reboot, but if you’re upgrading from a relatively recent 14.3-STABLE and your root filesystem is on ZFS, you can create a backup Boot Environment (BE) as a safeguard in case something goes wrong. 
Even better, you can create a testing BE and perform the installation into that BE after mounting it by using DESTDIR. Just remember that both mergemaster and etcupdate must also be executed with respect to this DESTDIR path.

If you’ve used etcupdate in the past and weren’t satisfied with its behavior, and therefore continued using mergemaster, I recommend cleaning the cruft by running the following command before starting the final transition to etcupdate:

# rm -rf /var/db/etcupdate/


1. https://docs.freebsd.org/en/books/handbook/cutting-edge/#updating-src-quick-start

Cheers
Marek

--------------IStU7fI4yOfb0SjWxROEZlMd--