tech-userlevel archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: sysupgrade in src?



nia <nia%NetBSD.org@localhost> writes:

> On Fri, Apr 15, 2022 at 01:20:04PM -0400, Greg Troxel wrote:
>> Use of RCS IDs seems fragile/unsound in that you can't conclude from
>> matching IDs that the files match, or really the other way around, given
>> people storing sources in !cvs with local modes, local builds, etc.
>> (Not saying doing local things in !cvs is bad, just that the RCS ID
>> match assumption assumes more than is true.)
>> 
>> Seems like this should be based on a database of hashes of the old
>> upstream and the new upstream, as well as the previous version in /etc,
>> and perhaps have a way to record that the admin has agreed to the
>> current contents of a file in /etc.
>
> Unfortunately this is the 'state of the art' for the past 20 years,
> etcupdate is what NetBSD provides as stock (I'm not proposing to add
> it here because it's already been added). There is a lot of ways
> it can be improved, agreed, it's by far the most irritable part
> of the update process.

I agree that what you are proposing and improving etcupdate are
separable, and do not object at all to adding sysupgrade before fixing
everything about etcupdate.

I would suggest that those interested in etcupdate behavior try out
etcmanage so they can understand what they do and don't like about how
etcmanage does it.   I think etcmanage does well, except it needs:

  a way to produce a comprehensive diff of stock to installed, somehow
  avoiding generated files and things a human admin would say don't count

  three-way merge when old-stock/installed differs and
  old-stock/new-stock differs as well, in a way that is somehow aware of
  which files are safe to merge if there aren't untouched context lines
  and which aren't

  some way to list/show things that need a merge but for which the merge
  algorithm didn't do it.  (Arguably this should precede implementing
  merge, effectively using a 3-way merge algorithm that always says it
  can't merge safely.)


And etcupdate may well be close to right, and need a slightly different
set of improvments; this is a complicated lattice space.

Attachment: signature.asc
Description: PGP signature



Home | Main Index | Thread Index | Old Index