[74] in athena10
Re: debathena-replace-conffiles idea
daemon@ATHENA.MIT.EDU (Tim Abbott)
Wed Jan 30 21:17:24 2008
Date: Wed, 30 Jan 2008 21:16:41 -0500 (EST)
From: Tim Abbott <tabbott@MIT.EDU>
To: Greg Hudson <ghudson@MIT.EDU>
cc: athena10@MIT.EDU
In-Reply-To: <Pine.LNX.4.64L.0801301608190.3999@coset.mit.edu>
Message-ID: <Pine.LNX.4.64L.0801302110090.9897@yaz-pistachio.mit.edu>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed
I've checked in an implementation of this (along with code to implement
the automatic generation of Provides: and Conflicts: lines for each
diverted file), and also packages for afs-config, nsswitch-config, and
ldap-config that make use of it, as examples.
I'm going to avoid changing anything else to use this system for a few
days, in case we decide we want to change any of the interfaces.
Comments are welcome.
-Tim Abbott
On Wed, 30 Jan 2008, Tim Abbott wrote:
> On Wed, 30 Jan 2008, Greg Hudson wrote:
>
>> On Wed, 2008-01-30 at 02:57 -0500, Tim Abbott wrote:
>>> Notice that this interface would not support a single package diverting
>>> two configuration files by the same name in different directories. I
>>> think this is unlikely to be relevant for any real configuration package.
>>
>> I'm fine with this, but I'll suggest the workaround of substituting _
>> for / in the config file name, so that the source and destination files
>> look like:
>>
>> debian/conffile-copies/etc_ldap_ldap.conf
>> debian/etc_ldap_ldap.conf.debathena
>>
>> Of course, that's not 100% clean either; two config files
>> named /etc/ssh_config and /etc/ssh/config would conflict this way.
>
> Because we use dh_install (which has the annoying property of not letting you
> change the basename of a file when installing it), it's desirable for the
> basename we generate to be the final basename.
>
> Of course, I could make debathena-replace-conffiles do the install step as
> well, so that we wouldn't need to manually add "ldap.conf.debathena" to
> debathena-ldap-config.install -- this is probably a good idea regardless. So
> we could deal with a different naming scheme.
>
> Changing the naming scheme would also force a change in the name of the
> generation script. I'd feel a bit cruel making people write scripts in the
> debian directory called "transform_etc_ldap_ldap.conf.debathena" (I think
> transform is more accurate than generate). Admitedly,
> "transform_ldap.conf.debathena" is pretty bad too, but it's comparable to
> "debathena-ldap-config.install". I guess I could check if
> "transform_etc_ldap_ldap.conf.debathena" exists, and if it does, use it; if
> it doesn't, fall back to "transform_ldap.conf.debathena". This has the
> generality of one approach with the short filenames of the other, but has
> extra complexity.
>
>> I assume debian/conffile-copies is hand-updated in the sources right
>> now?
>
> No, it's currently automatically generated by debathena-check-conffiles,
> copied in from the running machine at build time and verified to be
> unmodified from the upstream Debian/Ubuntu by checking the md5sums. This
> ensures that on each build platform we're always starting from an unmodified
> configuration file from that platform.
>
> -Tim Abbott
>
>
>