tech-userlevel archive

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

Re: sysupgrade in src?

> 15. apr. 2022 kl. 11:20 skrev Greg Troxel <>:
> nia < <>> writes:
>> On Fri, Apr 15, 2022 at 08:05:54AM -0400, Greg Troxel wrote:
>>> To me, the right behavior is to know if each file in etc has been put
>>> there as a copy of a file that appeared in etc.tgz, and to change it to
>>> the new version without prompting if so, and if not, to note to the user
>>> that it might need attention. Perhaps sysupgrade/etcupdate does this,
>>> and if so great.
>> -a etcupdate can automatically update files which have not
>> been modified locally. The -a flag instructs etcupdate to
>> store MD5 checksums in /var/etcupdate and use these
>> checksums to determine if there have been any local
>> modifications.
> Seems like that should be the default.
>> -l Automatically skip files with unchanged RCS IDs. This has
>> the effect of leaving alone files that have been altered
>> locally but which have not been changed in the reference
>> files. Since this works using RCS IDs, files without RCS
>> IDs will not be skipped even if only modified locally.
>> This flag may be used together with the -a flag described
>> above.
> 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.)


> Perhaps I might figure out to improve etcupdate so it can do what I
> want. It seems like it is reasonably close.

Perhaps use checksums instead of RCS IDs.  If the user chooses ignore a new file, save the checksums of both existing user file and new update and if both checksums are unchanged the next time etcupdate is run ignore the update automatically.

However, the RCS IDs might still be useful. It allows arbitrary local changes to the default config files, without going through the extra check-and-approve steps described above. I would suggest including the checksum changes under the -a flag and keeping the -l flag as is.

Home | Main Index | Thread Index | Old Index