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

Re: Conffile



On Wed, 6 Dec 2000, stramiello wrote:
> 
> I'm having some problems getting a package finished because I can't figure
> out conffiles... I tried posting to debian-mentors, but it seems to be
> non-responsive, so I figured it was topical here as well.
> 
> For the package I'm building (VFTPD), I've got one key configuration file:
> /etc/ftppasswd.
> 
> I've got a template that I install using the standard -f test, so it only
> gets placed there if one doesn't exist. I also added /etc/ftppasswd to the
> conffile line in debian/conffile
> 
> However, now I get this error whenever I try to test my source using
> debian/rules binary:
> 
> <SNIP>
> dh_builddeb
> dpkg-deb: building package `virtualftpd' in
> `../virtualftpd_6.5.1-2_i386.deb'.
> dpkg-deb: conffile `/etc/ftppasswd' does not appear in package
> dh_builddeb: command returned error code
> make: *** [binary-arch] Error 1
> 
i believe the error is arising because your conffile doesn't exist in your
.deb package, but is a template that is held elsewhere.

according to the packaging manual, conffiles are handled in the
configuration phase of `dpkg -i', which happens before the postinst. so it
definitely wouldn't work if you copy it in the package's postinst.

other than that... i don't know. it's an interesting situation, because
your maintainer scripts aren't supposed to modify conffiles at all. from
the packaging manual:

-- snip --
     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.
-- snip --


> So what am I doing wrong? I've tried looking in the wu-ftpd source package
> to see if they did something differently, but apparently I'm missing what
> I should be doing...
> 
i think that you need to make /etc/ftppasswd have the best defaults you
can, and have the sysadmin edit the file after package installation if
necessary.



Reply to: