[php-maint] Reboot Apache2 2.4 transition

Arno Töll arno at debian.org
Tue May 7 09:08:08 UTC 2013


Hi Ondřej,

On 07.05.2013 10:05, Ondřej Surý wrote:
> Will that get somemodule reenabled?

No (unless our invoke code behaves buggy). We remember the state of a
module in an internal state database so that we do not enable modules
ever again, when it was disabled by the user (and not by a maintainer
script, which is why maintainer scripts must not use a2enmod directly,
or at least not without corresponding flags)

> for conf in <modulelist>; do
>   if [ -z "$2" ]; then
>     apache2_invoke enmod $conf  || exit $?
>   else if a2query -q -m $conf; then
>     apache2_reload restart || exit $?
>   fi
> done

at least the reload is not required, as apache2_invoke will do the right
thing. Keep in mind we have to differentiate three cases:

a) a web-server restart
b) a web-server reload
c) the user does not want to have the web-server restarted at all by
local policy (this is not implemented entirely yet on our side)

And that's what we want to have as uniform behavior, i.e. for all
modules the same, so that not every maintainer script invents their own
solution based on taste or knowledge, but based on what the user
eventually wants.

Regarding your remaining suggestions I'll have to investigate further.

> 
> (And why there's the "&& true" part?)

This comes from the --conditional switch in dh_apache2. dh_apache2 can
also be used by web applications and some of them may want to support
various flavors of web servers, including those not being Apache.

They are most likely doing some debconf prompting for which web server
one would like to install a configuration that, is the maintainer script
would do something like


case "$WEBSERVER" in

HAVE_APACHE=""

apache2)
   HAVE_APACHE="true"
   more_mess
   ;;
whatever)
   ;;
esac

#DEBHELPER#

with #DEBHELPER# extrapolating to:

if [ "$1" = "configure" ] && [ -z $HAVE_APACHE ] ; then
...

when called as dh_apache2 --coditional='[ -z $HAVE_APACHE ]'


That said, there are various more or less severe problems with
dh_apache2 known. But that's something which can be fixed anytime with a
binNMU at worst so that it has not a high priority for now. But if you'd
like to help me with maintainer scripts and dh_apache2 invokation, I'll
be happy to introduce you to our vision with it.

-- 
with kind regards,
Arno Töll
IRC: daemonkeeper on Freenode/OFTC
GnuPG Key-ID: 0x9D80F36D

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 900 bytes
Desc: OpenPGP digital signature
URL: <http://lists.alioth.debian.org/pipermail/pkg-php-maint/attachments/20130507/a1c41633/attachment.pgp>


More information about the pkg-php-maint mailing list