[config-package-dev] Can't transform sshd_config because it's not shipped by any package

Jonathan Reed jdreed at MIT.EDU
Mon Nov 4 16:01:45 EST 2013


Hi Lukas,

> first of all, I want to thank you for your great debhelper
> integration. It makes using config-package-dev a breeze.

Glad to hear it!  We're quite pleased whenever we hear that the package is 
being used outside the Debathena project.

> However, I've stumbled upon some sort of shortcoming when I wanted to
> transform /etc/ssh/sshd_config. This file is generated by
> openssh-server in its postinst script and thus not marked as a
> conffile in terms of dpkg.

config-package-dev requires a packaged file to use as the source for the 
transformation.  This can be the "real" file itself, or a different file 
(using the '<' operator as noted in the man page).  The reason for this 
check is to ensure you don't end up accidentally packaging, say, the 
sshd_config from your build server.  Unfortunately, this does mean that 
generated files can't be transformed.

Debathena deals with this by diverting sshd_config, and doing a 
pseudo-transform operation in the Makefile using perl (but not actually 
doing a transformation as far as config-package-dev is concerned).

You can take a look at our rules file (still in CDBS, but the relevant 
parts should convert to dh7 just fine):
https://github.com/mit-athena/ssh-server-config/blob/master/debian/rules

There's no good way around this.  For cases like this, the best option may 
be to convince the upstream project to support .d configuration 
directories, or ask them to ship a sample config file in /usr/share/doc or 
something like that.

Jonathan Reed
for the Debathena Project


More information about the config-package-dev mailing list