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

Bug#2051: etc/ntp.conf is an auto-handled conffile



Andrew Howell writes ("Re: Bug#2051: /etc/ntp.conf is an auto-handled conffile"):
> [Ian Jackson wrote:]
...
> > The ntp.conf file is modified (correctly) by the postinst after
> > installation.  This causes a conffiles conflict when the package is
> > upgraded.
> >
> > I suggest that the package not use dpkg to install the file, but
> > instead create it itself if it doesn't exist; any changes which need
> > to be made during upgrades would have to be done manually.
...
>
> I don't believe this is true. My understand of conffiles is that
> you are only prompted if the conffile that was distributed with the
> previous package has a different md5sum to the conffile distributed
> with the current version of the package.

Yes, this is true.

> This is what I've seen as well, as when I made my new version of the
> package I had edited ntp.conf and it didn't prompt me for ntp.conf
> when I installed my new package.

However, it *will* prompt every time the package maintainer edits the
`source' file from which the file is made - and then the user will get
prompted about a file they've never heard of.

> What I believe you saw was when you upgrade from 3.4x-1 to 3.4x-2
> I had changed the ntp.conf file myself and that's why it prompted you.
> If you look at the Changelog file you'll notice I moved the driftfile
> from /etc/ntp.drift to /var/lib/ntp in that revision.

Indeed.  One could expect such changes to occur in the future too,
surely ?

A package should *either* edit the file in the postinst *or* use the
dpkg conffiles mechanism, but not both.  In this case, since local
customisation is always necessary and can be done automatically (it's
good that you've written the script to do this, of course!), you
should arrange for the postinst to figure out any necessary changes
and make them (possibly prompting the user).

> If you have no further objections I'll close this bug report.

I'd prefer it if you didn't close the report just yet ...

Ian.



Reply to: