Discussion:
Packaging webapps to work with both Apache 2.2 and 2.4
Jonathan Nieder
2013-12-30 23:58:07 UTC
Permalink
Hi,

I'm trying to follow the directions at

https://lists.debian.org/debian-webapps/2012/03/msg00007.html
https://wiki.debian.org/Apache/PackagingFor24#Making_web_applications_compatible_to_both.2C_Apache_2.2_and_2.4

(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
case?

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).

Thanks,
Jonathan
--
To UNSUBSCRIBE, email to debian-webapps-***@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact ***@lists.debian.org
Archive: http://lists.debian.org/***@google.com
Loading...