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

init.d script need not be a conffile



I am getting these lintian errors on one of my packages:
   
   E: adjtimex: init.d-script-not-marked-as-conffile /etc/init.d/adjtimex
   N:
   N:   /etc/init.d scripts should be marked as conffiles.
   N:
   N:   Have a look at Policy Manual, section 3.4.5 for details.
   N:
   E: adjtimex: init.d-script-not-included-in-package /etc/init.d/adjtimex
   N:
   N:   The /etc/init.d script is registered in the postinst script, but is
   N:   not included in the package.
   N:

The paragraph mentioned does indeed require that /etc/init.d scripts
be marked as conffiles:  

     *Do not* include the `/etc/rc<n>.d/*' symbolic links in dpkg's
     conffiles list! *This will cause problems!* *Do*, however,
     include the `/etc/init.d' scripts in conffiles. (This is
     important since we want to give the local system administrator
     the chance to adapt the scripts to the local system--e.g., to
     disable a service without deinstalling the package, or to specify
     some special command line options when starting a service--while
     making sure her changes aren't lost during the next package
     upgrade.)

However, the packaging manual describes two ways of handling
configuration files.  One of these is with dpkg's "conffile"
mechanism.  The other way is to create the file in postinst (and of
course to remove it when "postrm purge" is run).  I believe the second
method is the right one for the adjtimex package.

In previous versions, adjtimex had been started using a script (a
conffile) in /etc/root.d, which is now deprecated.  In the new
version, postinst will parse the old script and create a new one in
/etc/init.d.  I believe the new configuration file should not be
marked as a conffile.  The packaging manual explicitly warns

     Note that a package should _not_ modify a `dpkg'-handled conffile
     in its maintainer scripts. Doing this will lead to `dpkg' giving
     the user confusing and possibly dangerous options for conffile
     update when the package is upgraded.

I was tempted to file a bug against lintian.  However, it does reflect
the current policy.  I believe that policy should change.  I propose
that this passage:

     *Do*, however, include the `/etc/init.d' scripts in conffiles.

should be rewritten as follows:

     If the `/etc/init.d' script is included in the .deb file, then it
     should be included in conffiles.  If it is not included in the
     .deb file, but is instead created in postinst, then it should be
     deleted by "postrm purge" (but not by "postrm remove").


			- Jim Van Zandt


Reply to: