Re: Has the update procedure changed?

From: Tomoaki AOKI <junchoon_at_dec.sakura.ne.jp>
Date: Wed, 09 Aug 2023 12:38:22 UTC
On Tue, 8 Aug 2023 23:22:32 -0700
Kevin Oberman <rkoberman@gmail.com> wrote:

> On Mon, Aug 7, 2023 at 9:12 AM Matthias Apitz <guru@unixarea.de> wrote:
> 
> > El día lunes, agosto 07, 2023 a las 08:51:55a. m. -0700, Kevin Oberman
> > escribió:
> >
> > > On Sun, Aug 6, 2023 at 9:51 AM Tim Kellers <smsdtv@gmail.com> wrote:
> > >
> > > >
> > > >
> > > > On Aug 6, 2023, at 11:05 AM, Kevin Oberman <rkoberman@gmail.com>
> > wrote:
> > > >
> > > > 
> > > > On Sat, Aug 5, 2023 at 10:51 PM Matthias Apitz <guru@unixarea.de>
> > wrote:
> > > >
> > > >> In the past I was used to use the following procedure to install a new
> > > >> kernel and world:
> > > >>
> > > >>     # cd /usr/src
> > > >>     # make installkernel
> > > >>     # shutdown -r now
> > > >>
> > > >>     boot -s from the loader prompt
> > > >>
> > > >>     # adjkerntz -i
> > > >>     # mount -a -t ufs
> > > >>     # mergemaster -p
> > > >>     # cd /usr/src
> > > >>     # make installworld
> > > >>     # mergemaster
> > > >>     # yes | make delete-old
> > > >>     # yes | make delete-old-libs
> > > >>
> > > >>     # reboot
> > > >>
> > > ...
> >
> > > I am more confused about  "etcupdate -p". Both files put it after the
> > > kernel installation and reboot but before the installworld. The man page
> > > for etcupdate says that '-p' it should be run before "make buildworld"
> > and
> > > I have always followed the man pages.
> >
> > The man page of mergemaster says:
> >
> >      -p          Pre-buildworld mode.
> >
> "
> 
> >
> > i.e. it must be run after installkernel and before installworld to
> > adjust the new /etc/group and /etc/master.passwd. After installworld
> > mergemaster
> > should be run (or etcupdate) without -p to adjust all the scripts below
> > /etc, /etc/rc.d/ ... I've used this procedure above for many years and
> > it always let me decide it I want the new or the old or deal later with
> > the diff of all these files. And so I did it yesterday and it worked fine
> > again.
> >
> > Will check the next time what etcupdate wants to do, because it seems
> > the sucsessor of mergemaster.
> >
> >         matthias
> >
> > --
> > Matthias Apitz, ✉ guru@unixarea.de, http://www.unixarea.de/
> > +49-176-38902045
> > Public GnuPG key: http://www.unixarea.de/key.pub
> >
> 
> etcupdate is the successor to mergemaster.  It is vastly better, but does
> have a learning curve when you first start using it. Also, it has quite a
> few commands that are seldom needed and I think that intimidates people a
> bit. Unless you understand a three-way merge, it is confusing. It's not
> complicated, but different from mergemster. (freebsd-update always has done
> a three-way merge.)
> 
> I don't see how you get this from the man page.
> "Compares only files known to be
>                  essential to the success of {build|install}world, i.e.,
>                  /etc/group and /etc/master.passwd.
> 
> If it is potentially updating files that MIGHT be essential to a successful
> buildworld, running it after buildkernel seems quite wrong. At least I read
> {build|install}world as buildworld or installworld.
> 
> -- 
> Kevin Oberman, Part time kid herder and retired Network Engineer
> E-mail: rkoberman@gmail.com
> PGP Fingerprint: D03FB98AFA78E3B78C1694B318AB39EF1B055683

Please correct me if I'm missing something.
I use source update for years and not using bsdinstall nor
freebsd-update.

Does bsdinstall (and/or freebsd-update) create the first current tree
for etcupdate, if not yet exists?

This would be most confusing and harmful point of etcupdate.
When I first tried etcupdate, I didn't noticed that I needed
`etcupdate extract -B` BEFORE UPDATING src tree.
Without this, etcupdate cannot detect what should be updated, even if a
plenty of updates are required.

At the moment, I must use mergemaster, and after that, `etcupdate
extract -B` for next run.

I think bsdinstall can create current tree, which is turned over to old
tree on actual run, for etcupdate.
So do freebsd-update. It would be able to create current tree JUST
BEFORE INSTALLING UPDATE.

I was helped by mergemaster, but after it completely retires, features
above should be mandatory.

-- 
Tomoaki AOKI    <junchoon@dec.sakura.ne.jp>