From nobody Mon Nov 03 22:43:51 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 4d0mpx6Yfrz6FwfP for ; Mon, 03 Nov 2025 22:44:09 +0000 (UTC) (envelope-from tschweikle@gmail.com) Received: from mail-qt1-x832.google.com (mail-qt1-x832.google.com [IPv6:2607:f8b0:4864:20::832]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4d0mpx1S4tz3dbn for ; Mon, 03 Nov 2025 22:44:09 +0000 (UTC) (envelope-from tschweikle@gmail.com) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20230601 header.b="YV4/05Y7"; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of tschweikle@gmail.com designates 2607:f8b0:4864:20::832 as permitted sender) smtp.mailfrom=tschweikle@gmail.com Received: by mail-qt1-x832.google.com with SMTP id d75a77b69052e-4ed411e8a29so35188861cf.3 for ; Mon, 03 Nov 2025 14:44:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1762209843; x=1762814643; darn=freebsd.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=23ksd7NIVe8aVLjyh+mKMCXzv8UzBFN4ROg3u/tO6/I=; b=YV4/05Y7lterIthMHKPoJvF+RvQdzCideEs8ukSlNAtAeTM6cfiwapicLgkQVulvBc uBcTtlHJaLdQ9KVpsQHLOhT+C9VUz4D0cBiVQyM7t/BoJcVVx1Y9jOiCcGAkW41Vf4zN DDVLbbJaqIL2o+xrCgR1wXtS1k3+Ar296yx9G1yU4zwub3n4WEM1GjzDuEJT4ythShZY 2w9mzGuka3HZazpt3wp56Suwjh22Vlx8fiud3Bm8699m53phcAcqR9bhtqQwoiPWMGdU ne87ScyIlD9m8BXtsxqAydYM9VZUaDOJOO9iHFqpGKeZ8dFTd18gV50FcocpoSd1uDrv Jmiw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1762209843; x=1762814643; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=23ksd7NIVe8aVLjyh+mKMCXzv8UzBFN4ROg3u/tO6/I=; b=SdzLLEzPYkweovfWlfHuFXEPyArvJwX7TfWnQT3/4jpGK/ZolrxFsBtWGW5jnlxQCx +TtJVP45TcfOLU3MAxq23488VhB6I8Mkwwoi7YUCEKLxUkxYbEviPVSD6inzxOOSFtfO xj1XKFXtMZ748XhlVumAnadlJ6ONql60eLzn5yBC2/JAfVZV/cYB+oI9LcbLjH0ywDtx gT7yXf3XaZXr+qSwGTzTOSCO1lJhGpziVZSE5cfbKTR8fDS8/y6CTfGBwz/frhXmGA2g QiKIVUhndhyTHYGTZ6qLuUxzSpjiFHaiDhVzcrXY37GmjLSsBKMhmUWPmroRApFRZNpW Ofnw== X-Gm-Message-State: AOJu0YyYTufnxPpp+LEk5IpLdSuTnhLeI77qtlHWbBT5iNaFFW8azcz9 ytSbMZ/9Bq7mMZ6hyNXUpWZL/SA7rqAUM68xNeXoH8cFZSVuVL9votEWFMfD+DJAodsBnJ8E+RW 8psXtP4LARfLwigD5EE97RFHn9H7b6hQPJeAp X-Gm-Gg: ASbGncunXErvvi63Ud3LgFoeYTKpss1F3Od3hJSFAZdpR4h+x0P32CfU+g3AUpvUdXo nwmLcOgjAc32OxE8sF3jUVg5Fk56JIA0DePhll/BoyW2NhIc4vqMiHizXidiITWX7RwT85cC/4N NWREfDxbW/jdivDnTBlr5L6h1M5Bafdj9GIJ62iuwCwwnOrIRyXrMmOzDlgKUDcPRBxhxLnx71a 4AWDRS0JWGJPRHgbgw0dvGUdHn3BX1qS+zG+C8N9OrVFzEZnhjjCPd39y6RS3RasWuWIT8gCxKB yuBVZpwQb6CMS0GfIkNK46MAewHuW0RCFMMlooV2ou64KAOnBJZNBxeHB67zoepJWowLQmRzVHL k+SNjTxK+DwpwrA== X-Google-Smtp-Source: AGHT+IFqNT/H9vBSEIdFjcpaSETR7H0SjgP4fB5SclNeCAmvPVjeoYz0Ql8rO8+XqXiWd7UaCJ9YnEAv7gqppPb9aYQ= X-Received: by 2002:ac8:574b:0:b0:4ed:8ab:e7aa with SMTP id d75a77b69052e-4ed30d9288fmr173639301cf.11.1762209842940; Mon, 03 Nov 2025 14:44:02 -0800 (PST) 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 References: <86qzuo1ab1.fsf@ltc.des.dev> <868qgw14xj.fsf@ltc.des.dev> <864irj1ett.fsf@ltc.des.dev> <86jz0fyzjj.fsf@ltc.des.dev> <31a80d2d-65b3-4604-ac5f-1440d23fb85a@plan-b.pwste.edu.pl> In-Reply-To: <31a80d2d-65b3-4604-ac5f-1440d23fb85a@plan-b.pwste.edu.pl> From: Thomas Schweikle Date: Mon, 3 Nov 2025 23:43:51 +0100 X-Gm-Features: AWmQ_bkT6i2V1gZbpxL8MpU0AEaYN9mLm2WBr3RKb8Q-QwvDVK8du0hH3NoGvj0 Message-ID: Subject: Re: "etcupdate extract" -- Failed to build new tree. To: Marek Zarychta Cc: freebsd-current@freebsd.org Content-Type: multipart/alternative; boundary="000000000000b552110642b87302" X-Spamd-Bar: --- X-Spamd-Result: default: False [-3.99 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.99)[-0.993]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20230601]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36:c]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; RCPT_COUNT_TWO(0.00)[2]; ARC_NA(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim]; RCVD_TLS_LAST(0.00)[]; FREEMAIL_FROM(0.00)[gmail.com]; TO_DN_SOME(0.00)[]; FROM_HAS_DN(0.00)[]; RCVD_COUNT_ONE(0.00)[1]; MISSING_XM_UA(0.00)[]; PREVIOUSLY_DELIVERED(0.00)[freebsd-current@freebsd.org]; TO_MATCH_ENVRCPT_SOME(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; DKIM_TRACE(0.00)[gmail.com:+]; MID_RHS_MATCH_FROMTLD(0.00)[]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; MLMMJ_DEST(0.00)[freebsd-current@freebsd.org]; FREEMAIL_ENVFROM(0.00)[gmail.com]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::832:from] X-Rspamd-Queue-Id: 4d0mpx1S4tz3dbn --000000000000b552110642b87302 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Followed your idea: # make buildworld # make buildkernel # mergemaster # etcupdate extract Failed to build new tree. It is broken. It only works if you unpack installation from CD, DVD or file. In all other cases it breaks. etcupdate has a "henn and egg" problem. If you build from sources it wont work. Regardless at which position you'll try to "etcupdate extract". It only works if you unpacked "/etc" from CD, DVD, or file. If it was cloned by "git clone https://github.com/freebsd/freebsd-src.git /usr/src" followed by "git checkout" or not it will break. It will even break if you first build world and or not kernel. It goes haywire if you just wipe sources, and start from scratch. etcupdate needs something not there, if you build "/usr/src" by "git clone https://github.com/freebsd/freebsd-src.git /usr/src", then building world, and kernel but it is there if you unpack sources from tarball. On Tue, Oct 28, 2025 at 3:30=E2=80=AFPM Marek Zarychta < zarychtam@plan-b.pwste.edu.pl> wrote: > W dniu 28.10.2025 o 14:37, Thomas Schweikle pisze: > > > > On Tue, Oct 28, 2025 at 1:35=E2=80=AFPM Dag-Erling Sm=C3=B8rgrav > wrote: > >> Thomas Schweikle writes: >> > Dag-Erling Sm=C3=B8rgrav writes: >> > > Thomas Schweikle writes: >> > > > Dag-Erling Sm=C3=B8rgrav 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 =E2=80=9Cinstall=E2= =80=9D and >> =E2=80=9Cupgrade=E2=80=9D? >> >> 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 et= c > 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." jus= t > because there is no tree to compare against, or better: "etcupdate extrac= t" > 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 a= ll > 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=E2=80=99s splendid - it=E2=80=99s impressive that you=E2=80=99ve man= aged to upgrade FreeBSD > from version 5.0! FreeBSD truly is an amazing operating system; being abl= e > to upgrade continuously for 25+ years without ever needing to reinstall i= s > a real achievement. Well done; my oldest installations that are still bei= ng > upgraded date back only to the FreeBSD 6.x era. > > Anyway, it=E2=80=99s time to say goodbye to mergemaster - you won=E2=80= =99t 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=E2=80=99ll also need to run etcupda= te(8) too. > > Here=E2=80=99s 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=E2=80=99s a bit risky and not entirely in line with the Handbook to sk= ip the > first reboot, but if you=E2=80=99re 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 int= o > 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=E2=80=99ve used etcupdate in the past and weren=E2=80=99t satisfie= d 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-qui= ck-start > > Cheers > Marek > --=20 Thomas --000000000000b552110642b87302 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Followed your idea:

# make buildworld# make buildkernel
# mergemaster
# etcupdate extract
Fail= ed to build new tree.

It is broken. It only works if you unpa= ck installation=C2=A0from CD, DVD or file. In all other cases it breaks. et= cupdate has a "henn and egg" problem. If you build from sources i= t wont work. Regardless at which position you'll try to "etcupdate= extract". It only works if you unpacked "/etc" from CD, DVD= , or file. If it was cloned by "git clone=C2=A0https://github.com/freebsd/freebsd-src.git=C2=A0/usr/= src" followed by "git checkout" or not = it will break. It will even break if you first build world and or not kerne= l. It goes haywire if you just wipe sources, and start from scratch.=
etcupdate needs something not there, if you build = "/usr/src" by "git clone=C2=A0https://github.com/freebsd/freebsd-src.git=C2=A0/usr/= src", then building world, and kernel but it is t= here if you unpack sources from tarball.

<= br>
On Tue, Oct 28, 2025 at 3:30=E2=80=AFPM Marek Zarychta <= zarychtam@plan-b.pwste.edu= .pl> wrote:
=20 =20 =20
W dniu 28.10.2025 o=C2=A014:37, Thomas Schweikle pisze:


On Tue, Oct 28, 2025 at 1:35=E2=80=AFPM Dag-Erling Sm=C3=B8rgrav <des@freebsd.org> wrote:
Thomas Schweikle <tschweikle@gmail.com>= ; writes:
> Dag-Erling Sm=C3=B8rgrav <des@freebsd.org> writes:
> > Thomas Schweikle <tschweikle@gmail.com> writes:
> > > Dag-Erling Sm=C3=B8rgrav <des@freebsd.org> writes:
> > > > How was this system installed?
> > > By compiling 15-STABLE from latest available 14.3 getting sources via=C2=A0 =C2=A0
> > 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 =E2=80=9Cins= tall=E2=80=9D and
=E2=80=9Cupgrade=E2=80=9D?

What did you use prior to etcupdate?=C2=A0 When was /etc last updated?
=C2=A0
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=C2=A0diff

without this "Failed to build new tree.", but it t= hen fails run

etcupdate -p

right after building world, kernel and installkernel, exhausting: "No previous tree to compare against, a sane comparison is not possible." jus= t because there is no tree to compare against, or better: "etcupdate extract" created an empty tree without a= ny 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=C2=A0way:

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 anythin= g 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" -- removin= g anything from /usr/src what was created after the last "gi= t pull" simulating "git clone" as far as possible)= .

--
Thomas

Hello Thomas,

that=E2=80=99s splendid - it=E2=80=99s impressive that you=E2=80=99ve m= anaged 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=E2=80=99s time to say goodbye to mergemaster=C2=A0 - you won= =E2=80=99t 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=E2=80=99ll also n= eed to run etcupdate(8) too.

Here=E2=80=99s 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=E2=80=99s a bit risky and not entirely in line with the Handbook = to skip the first reboot, but if you=E2=80=99re upgrading from a relativ= ely 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.=C2=A0
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=E2=80=99ve used etcupdate in the past and weren=E2=80=99t sat= isfied 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/hand= book/cutting-edge/#updating-src-quick-start

Cheers
Marek



--
Thomas
--000000000000b552110642b87302--