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

Bug#741350: a2enconf confusion - .conf extension?

On 11/03/14 18:17, Jean-Michel Vourgère wrote:
> Hello Daniel
> Please read apache2 debian news ( /usr/share/doc/apache2/NEWS.Debian.gz )
>> Moreover, the configuration mechanism in Debian has changed. All
>> configurations in sites-enabled and conf-enabled need a ".conf" suffix now.
> This mechanism enable packages to deploy their configuration directly in
> conf-available without symlinks, while NOT enabling .dpkg-new and similar
> files by default. :)

A common pattern in my own installations involves using Include to
access the conf files from a virtualhost

For example, when packages (pre-Apache2.4) offer me the option to
symlink into conf.d I often decline and then I manually edit the
virtualhost to Include the conf

I realize this can be done just as easily with conf-available though

If a package is intended for wheezy-backports, should it be creating

> Regarding the wiki, assuming you do not want to use dh_apache2,
> I can read:
>> Install the configuration file to /etc/apache2/conf-available/yourapplication.conf.
> You do need a .conf extension.

Ok, thanks for confirming - the wiki examples do show the extension but
I didn't see anything emphasizing it is a mandatory extension now

> Also, the wiki is quite explicit about the fact that you should use
> "apache2_invoke enconf" and *not* a2enconf directly.

Yes, I have been updating my packages slowly and hadn't fully tried all
of this yet but loganalyzer, as a new package, will be the first one
where I do this properly

I ran into other problems too:

a) if my postinst or postrm calls apache2_invoke from inside a function,
then it fails badly

b) some of my postinst and postrm code is based on examples I saw in
other packages, they test -x /usr/sbin/apache2 and it turns out this is
not a great idea as if somebody does

   dpkg --remove apache2 loganalyzer
   dpkg --purge loganalyzer

then at the moment the loganalyzer postrm runs with the "purge"
argument, there is no /usr/sbin/apache2 and so it does not remove the

Also, the check for /usr/share/apache2/apache2-maintscript-helper would
also fail if apache2 had been removed - it is OK for the postrm to just
proceed without calling apache2_invoke at all if it is no longer there
or should the postm complain?

Reply to: