Re: Policy wrt conf files
On Mon, 24 Jun 2002, Gordon Russell wrote:
> Looking at the Policy, specifically 11.7, suggests a strict idea of what
[...]
> (a) the policy states that the conf file can be overwritten by the postinst
> file of a package if the user is asked if this is ok. Can I ask the
> question once, and remember the answer every time the package is
> updated, or must I ask the question every time (which seems onerous
> to me and defeats the idea behing debconf).
You cannot overwrite, change or otherwise screw up a conffile in ANY
maintainer script other than preinst and prerm, and even then just for
moving it around (you cannot change its contents ever).
Conffiles are files marked as such, as well as any file in /etc that is
shipped inside the .deb archive [and not marking such a file as a conffile
is a serious violation of policy].
Now, configuration files (i.e. anything in /etc) are another matter. You can
have a question asking for permission to modify it. But that means the file
must not be marked as a conffile in the deb, which in turn means it must not
be in /etc. You can even modify it with no questions at all, as long as you
preserve any changes made by the user by direct editing that file.
There are no ways around this. There are no exceptions. You must not modify
conffiles, and that's final. You will get LARTed to death by me and many
other developers and QA managers if you as much as try (and we notice it
:-P ).
> (a) modutils is in charge of maintaining user changes to modules.conf,
> and thus setserial should not try to control this file for modutils
> even though it uses update-modules.
That is correct. Don't touch modules.conf. Interact with it through the
published interface, which is update-modules and the /etc/modutils/* tree.
If something needs to be done to modules.conf, update-modules is the one who
must do (or refuse to do) it.
> (b) provided I have a scheme for allowing user changes to override
> automatic when-required configuration of the serial.conf file, and
> that when the user makes changes to serial.conf in the proper way
> the changes are preserved, then I satisfy policy.
As long as serial.conf is not a conffile. This means you cannot ship
/etc/serial.conf inside the deb at all. You will have to "generate it" at
postinst time, if you want it to be just a configuration file and not a
conffile.
> (c) I am allowed to make changes to my own configuration file provided
> that I satisfy the packages own rules of supporting user changes to
> the file.
That's correct. But do remember: conffiles are configuration files.
Configuration files *might* be conffiles. They are not interchangeable terms
:-)
--
"One disk to rule them all, One disk to find them. One disk to bring
them all and in the darkness grind them. In the Land of Redmond
where the shadows lie." -- The Silicon Valley Tarot
Henrique Holschuh
--
To UNSUBSCRIBE, email to debian-devel-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Reply to: