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

Packaging webapps to work with both Apache 2.2 and 2.4


I'm trying to follow the directions at


(late, I know) and ran into some questions about edge cases.

1. Suppose someone installs my webapp and then deconfigures (for
   example using "dpkg -B -i" on a package with Breaks) but does not
   remove it.  In this case, policy tells me that prerm is called with
   deconfigure and postrm is not called.

   If the system uses apache 2.2, what happens?  What stops the
   configuration in /etc/apache2/conf.d from taking effect in this

   If the system uses apache 2.4, what happens?  Should I call
   "apache2_invoke disconf mywebapp" in prerm when $1 != upgrade to
   avoid trouble?

2. Suppose someone installs my webapp while apache2.2 is installed.
   It works (yay!).  Then they upgrade to apache2.4

   Is the webapp broken until they "dpkg-reconfigure mywebapp"?

   Will the now unneeded symlink in /etc/apache2/conf.d/ stay
   around forever?  Why is the postrm snippet to remove the symlink
   guarded by [ "$COMMON_STATE" = installed ] || [ "$COMMON_STATE =
   unpacked ]?

The package in question is often used on old Debian releases (both
through backports.debian.org and people's private backports), which
is why I want to get it working with both apache versions.  But it's
tempting to include a Breaks to force the apache upgrade, in which
case there would only be need for an answer to (1) and not (2).


Reply to: