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

Re: dotdee: a proposal for improving conffile management in Debian



On Fri, Apr 29, 2011 at 3:04 PM, Jonathan Nieder <jrnieder@gmail.com> wrote:
> Dustin Kirkland wrote:
>
>> DPKG INTEGRATION
>>
>> This approach would require some integration with dpkg itself.  On
>> package upgrade/installation, dpkg would need to need to detect when
>> the target path of a file it wants to create/update is in fact a
>> symbolic link referencing an /etc/dotdee path.  It would need to drill
>> down into that path and place the file it wants to write on top of the
>> 50-dpkg-original file instead.
>
> It sounds like this needs a hook to rename (divert) conffiles, plus a
> hook to regenerate the combined conffile after "dpkg --configure"
> finishes and before the package is considered configured.

Right.  That's more or less my thinking ;-)  A couple of triggers that
are called by dpkg at the right time (or perhaps even happen
automagically via inotify).

> (Of course, when I say "divert" this of course has nothing to do with
> dpkg-divert.  I am imagining something like
>
>        --conffile-name-filter=command
>                Set a command to be run via “sh -c” that maps
>                standard names of conffiles to the names of conffiles
>                dpkg should manage on the filesystem.  This command
>                would receive a newline-separated [or NUL-separated?
>                -jn] list of filenames on its standard input and
>                should write a list of modified names to standard
>                input.
>
>                The intended use is by tools that want the pristine
>                conffiles managed by dpkg to be diverted to some other
>                place and used to write the actual conffiles in place.
>                Goes nicely with the --post-deferred-configure hook.
>
>        --post-deferred-configure=command
>                Set a command to be run via “sh -c” after conffiles
>                have been committed to disk but before the package
>                has entered the half-configured state.  The intended
>                use is by tools that want to make some modifications
>                to changed conffiles before “postinst configure” runs.
>
> Please do not take the details too seriously, of course.)
>
> What do you think?  Would you be interested in working on those
> things?  I imagine the result could be useful for other tools layered
> on top of dpkg --- for example, it could be used to provide a nicer
> interface for merging changes when /etc is kept in a VCS.

Hi Jonathan,

As you said the details aren't entirely flushed out, but yes, these
are definitely along the lines of what I'm thinking -- a conffile map,
and a trigger that "builds" conffiles by intelligently combining the
original packaged conffile, and inserting (via cat, patch, VCS, or
something else) both local user changes, and allowable changes by
other packages that require this package to be configured in a
particular way for proper operation.

Would you be willing to join us via IRC and/or live internet audio
stream for 1 hour next week, as we discuss this at the Ubuntu
Developer Summit in Budapest?  If you let me know what times (UTC) and
days are good for you, I can try to get this session schedule
appropriately.

I am absolutely, keenly interested in seeing this solved for both
Debian and Ubuntu.  I'm willing and able to work on this myself, and
I'm willing and able to delegate the work to capable members on my
team.  I'd like to hold off on both of those until we have an agreed
upon design, but I'm very much hoping to see this work through in the
coming months, if in any way possible.

Cheers,
-- 
:-Dustin

Dustin Kirkland
Ubuntu Core Developer


Reply to: