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

Bug#745834: dh-apache2 causes a postinst failure when a package depends on an apache2-bin provided module



Package: apache2
Version: 2.4.9-1
User: ubuntu-devel@lists.ubuntu.com
Usertags: origin-ubuntu utopic

If I install apache2 at the same time as libapache2-mod-svn, then it is
possible that both packages are unpacked, but
libapache2-mod-svn is configured first.

In this case, /usr/share/apache2/apache2-maintscript-helper exists, so
the dh-apache2 -inserted snippet in libapache2-mod-svn tries to enable
the dav_svn module. This depends on the dav module, and the call to
"a2enmod -m -q dav_svn" subsequently fails, causing libapache2-mod-svn
to fail silently.

During debugging I found that the error message was:

ERROR: Module dav does not exist!
ERROR: Could not enable dependency dav for dav_svn, aborting

At this point, I see that /etc/apache2/mods-available/dav.load does not
exist (but /etc/apache2/mods-available/dav.load.dpkg-new does exist). It
seems that this is provided by the apache2 binary package, which has yet
to be configured. I presume that this causes a2enmod to fail to see it.

Steps to reproduce. As root on a fresh amd64 sid machine:

apt-get clean
apt-get install -y --download-only libapache2-mod-svn apache2
mkdir 1 2
mv /var/cache/apt/archives/*.deb 1/
mv 1/apache2_2.4.9-1_amd64.deb 1/libapache2-mod-svn_1.8.8-2_amd64.deb 2/
dpkg -i 1/*
dpkg --unpack 2/*
dpkg --configure libapache2-mod-svn

This fails with:

Setting up libapache2-mod-svn (1.8.8-2) ...
dpkg: error processing package libapache2-mod-svn (--configure):
 subprocess installed post-installation script returned error exit
status 1
Errors were encountered while processing:
 libapache2-mod-svn

I'm not sure how best to approach this problem. Given that I am
installing the packages together, I do expect dav_svn to be enabled
when it is done, so simply not doing so in this case wouldn't really
work. Having a2enmod special-case .dpkg-new files seems bad to me too.
We can't depend on apache2 since the module providing package should be
able to be installed independently. The only thing I can think of is to
notice that apache2 isn't configured, and note what needs to be done
later somehow, but this wouldn't be as trivial as I would like it.

In Ubuntu, this is causing our subversion dep8 test to fail, since it
installs libapache2-mod-svn and apache2 together. I presume this will
affect Debian also. I suppose a workaround for now is to have the test
install apache2 first.

Attachment: signature.asc
Description: Digital signature


Reply to: