On Thu, 10 Aug 2023 03:15:43 -0700 (PDT)
"Jeffrey Bouquet" <jbt...@iherebuywisely.com> wrote:

> On Thu, 10 Aug 2023 06:32:14 +0900, Tomoaki AOKI <junch...@dec.sakura.ne.jp> 
> wrote:
> 
> > On Wed, 9 Aug 2023 05:50:05 -0700
> > David Wolfskill <da...@catwhisker.org> wrote:
> > 
> > > On Wed, Aug 09, 2023 at 09:38:22PM +0900, Tomoaki AOKI wrote:
> > > > ...
> > > > 
> > > > 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.
> > > > ....
> > > 
> > > TL;DR: Please see the "Bootstrapping" section of etcupdate(8).
> > 
> > I know. ;-) I'm using etcupdate when it first MFC'ed to latest stable
> > branch ATM, and bitten at the first time.
> > 
> > Anyone not familiar with etcupdate would bitten by forgotton
> > bootstrapping. :-(
> > 
> > 
> > > Details: I have been doing source-based updates of FreeBSD since around
> > > 1999.  As such, I used mergemaster for a long time, and got used to it.
> > > 
> > > With the switch to git, the $FreeBSD$ lines in config files became ...
> > > well, misleading noise.  And since mergemaster tried to use them, that
> > > didn't work very well.  This provided the incentive I needed to switch
> > > to etcupdate.
> > > 
> > > And... yeah; there was a "learning curve."  And the "bootstrapping" bit
> > > is necessary.  But it has worked well for me since.
> > 
> > Yes. But if bsdinstall and freebsd-update automatically bootstrap
> > etcupdate if not yet done, newbies and casual users wouldn't be bitten.
> > 
> > For source-based update users like us,
> > 
> >  *Bootstrapping section of man page should be near the top,
> >   for example, betweem DESCRIPTION and MODES section, not inside
> >   EXAMPLES section.
> > 
> >  *Also documented in UPDATING (or new document for common instructions)
> >   and handbook.
> > 
> > should be needed.
> > etcupdate cannot extract old tree from already-updated src.
> > So anyone forgotton bootstrapping is forced to roll back src for
> > bootstrapping and roll forward again BEFORE installworld, once
> > mergemaster dissapears.
> > 
> > > 
> > > Peace,
> > > david
> > > -- 
> > > David H. Wolfskill                              da...@catwhisker.org
> > > Given Trump's claims about fairness in elections, his notion of a
> > > "fair trial" is almost certainly at variance with objective reality.
> > > 
> > > See https://www.catwhisker.org/~david/publickey.gpg for my public key.
> > 
> > 
> > -- 
> > Tomoaki AOKI    <junch...@dec.sakura.ne.jp>
> 
> 
> Say 3/5 of FreeBSD installs have not used etcupdate yet, and for those they 
> are 
> less likely to encounter problems [ at least in my experience ] because 
> mergemaster
> has always be intuitive, an either-or choice at each menu, near zero chance of
> PBKAC, would it not make sense to keep mergemaster around slightly modified,
> for instance, with a new section of code that would prepare the result for 
> "now the next time /etc is updated, use only etcupdate THIS WAY".   
> alternately,
> upgrade etcupdate to be VERY verbose in its threeway merge so that 
> 1... version A of file is in /etc, version B of file is in /var/???, desired 
> version
>      of file is in /var/??? or /usr/src/??? user's and legacy items in the 
> /etc
>     version are ... ;  ... ; ... ' 
>    menu a) leave this file alone, please edit it manually to >>>> 
>              b) install ... file, you will edit it before reboot. 
>              c).... 
>   more of an intuitive mergemaster - menu alike.
> .....
> My uses of etcupdate have left files clobbered, which I had to replace from 
> backup, and then continue to use mergemaster.  I intend thus to keep a
> copy of  it seperate from the src tree for use forever, I'm old...

des@ told me that newbies should not be bitten by etcupdate in another
post. It's what I've missed when landed.

But upgrading from old installation with freebsd-update is still unclear
and so does source updating. For these, letting mergemaster warn for
etcupdate seems to be a good idea. But asking "Do you want to use
etcupdate next time? (y/N)" after successful merge (or resolved
conflicts), and if answerd yes, running `etcupdate extract -B`
would be better.

And making etcupdate more verbose looks good to me, especially showing
where the file was read from.
Maybe it would be rare cases, but if former admin changed workdir from
the default /var/db/etcupdate without noting, the next admin should
surely suffers from it. Making etcupdate verbose should help them.

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

Reply via email to