Re: RFC Debian package upgrade with Config::Model
-----BEGIN PGP SIGNED MESSAGE-----
On Mon, May 04, 2009 at 05:45:03PM +0200, Dominique Dumont wrote:
>Jonas Smedegaard <email@example.com> writes:
>>>I can either:
>>>- tweak config-edit so that temp files for upgrades are stored in
>>> /var/lib/config-model, something like:
>>> config-edit -save_for_upgrade # creates temp file
>>> config-edit -upgrade # use previous temp file
>>>- arrange for the dh-upgrader script to store temp files in
>>>First option is probably the best as it would be valid across distros.
>> Is it sane to use /var/lib/config-model across distros?
>I'd say yes. OS havings config files in /etc are mostly Unix. Almost
>all unixes follow FHS .
I am not sure I understand your logic.
Do you consider it ok _always_ use /var/lib/config-model and _not_ offer
the alternative of using an extension, and that the reason it is ok is
that we only want the tool to support Unix-like systems?
As I see it, there are multiple tools here:
* config-* invoked when config files are manipulated
* dh_config invoked at package build time
I believe it makes sense for config-* scripts to be flexible, and work
even for DOS or other odd systems if possible.
I consider dh_config a Debian-specific tool, which we need not care to
ensure working outside Debian (but we can off course do so if
As I see it, the question is if config-* should lookup a chain of config
places that might instruct the tool to switch behaviour, or only use
commandline options. And if dh_config should produce packaging script
snippets with hardcoded options or leave it out to allow overriding on
the system level.
Or more concretely I imagine...:
* "libconfig-model-perl" extended with binary package "config-utils":
+ contains /usr/bin/config-*
+ asks (priority medium) how to store (default: below /var/lib)
* "config-utils-dev" created with binary package "config-utils-dev":
+ contains /usr/bin/dh_config
+ contains /usr/share/cdbs/1/rules/config-common.mk
>> Hey - is it even sane to assume that the tool is (only) a distro tool?
>On Debian, config-model could also be used to upgrade user config files
>(in ~/.foo directories). The only hitch is that the
>custom-data-saved-with-old-model part cannot be done.
See ikiwiki package for an example of how to support automated
user-level configfile updates during package update (it can't be default
- - local admin must enable this feature, I believe, as it breaks the
assumption of packaging scripts never manipulating user data).
>> I imagine providing the distro routines completely separate from the
>> Config::Model libraries, to encourage alternative uses of the tool.
>> Even as a separate source package. As such, it makes better sense to
>> me to provide a debhelper script. How about calling it dh_config?
>Why not ? The actual name may depend on what we want to achieve, like
>upgrading config or installing a new config file ?
Ah, I realize now that it is not either or, but both - see above :-)
* Jonas Smedegaard - idealist og Internet-arkitekt
* Tlf.: +45 40843136 Website: http://dr.jones.dk/
[x] quote me freely [ ] ask before reusing [ ] keep private
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
-----END PGP SIGNATURE-----