Hi,

Petter Reinholdtsen wrote:
> [Guillem Jover]

>> I've not checked those bug reports, but I'm assuming that the
>> package might also fail in case apache2 is not installed at all? Or
>> how do you handle that case? And the subsequent missing
>> configuration when apache2 gets installed later on?
>
> For sitesummary, the package do not fail if apache2 is not installed
> at all.  The postinst fragment look like this:
>
>   case "$1" in
>     configure)
>         # Enable it on fresh installations as before Apache 2.4.
>         if [ -z "$2" ] && \
>             [ -e /usr/share/apache2/apache2-maintscript-helper ] ; then
>             . /usr/share/apache2/apache2-maintscript-helper
>             apache2_invoke enmod cgi.load
>             apache2_invoke enconf sitesummary.conf
>         fi

Yes, consider the following sequence of events:

 1. Install sitesummary.  Apache is not installed, so the configuration
    doesn't get enabled.

 2. Install Apache.

The Apache postinst should notice and enable the configuration, but it
doesn't.  This is a bug in the apache2 packaging.

I reported this to the Apache maintainers and received the following
reply[1]:

| >      In particular, the conditional enconf and disconf invocations
| >      seem to make it easy to get into a non-working state and never
| >      get out of it.
| 
| Well, we need to deal with that. This is not different than before. If
| Apache2 wasn't installed, you putting a conf to conf.d is not going to
| work out either. If you meant to address situations when you install
| your conf to conf-available and install Apache at a later stage, it is
| our business (i.e. Apache maintainer's) to ensure those get enabled
| then. That's a good point actually, and I need to think if we can and
| should do something in that case.

I guess it's worth filing an actual bug for it, though. ;-)

As a side effect, if Apache's packaging knew how to do the enconf in
postinst automatically, then getting triggers working so webapps would
not have to do anything more than install the file would be a minor
change on top of that.

That is how e.g. mime-support works.

Thanks,
Jonathan

[1] https://lists.debian.org/debian-apache/2014/07/msg00028.html


-- 
To UNSUBSCRIBE, email to debian-dpkg-bugs-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to