tech-pkg archive

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

Re: Structuring configuration file versioning support in pkgsrc



On Fri, May 18, 2018 at 01:51:07AM +0200, Keivan Motavalli wrote:
> Should the pkginstall scripts parse themselves a new vcs-related
> configuration file?

I would start by just worrying about RCS with a fixed storage prefix,
i.e. ${VARBASE}/db/pkgconfig/${PATH},v is used to version the (absolute)
path ${PATH}. 

> Which one should it be, and would this mean the configuration file path
> would get hardcoded at build time, even when mass building packages for
> use by third parties? Are there ways around this?
> How should the script obtain authentication parameters?

I think you have a long way to go before you should start worrying about
that. Really, start with just RCS. It works very well for the purpose at
hand. In many ways, better than any other option. It is also already
used in NetBSD for a very similar purpose by the daily jobs to backup
some core configuration files.

I.e. a good first milestone would be to extend the current CONF_FILES_*
logic to checkout the last version from above RCS database, compare it
to the newly installed reference file and if they don't match, add the
new reference file. Next, look at the target file. If it doesn't exist,
copy the reference file like the current code. If it does exist and a
new reference file was seen, try to merge the changes.

Joerg


Home | Main Index | Thread Index | Old Index