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

Re: Processed: Re: Bug#221133: php4: unstable - Configuration hangs after restarting apache



On Sun, 16 Nov 2003, Steve Langasek wrote:

> The last lines in the current php4 postinst are:
>
> for i in apache apache-ssl apache-perl; do
> 	if [ -d /etc/$i ]; then
> 		modules-config $i enable mod_php4
> 	fi
> done
>
> exit 0
>
> It is my understanding that this is the documented interface for
> enabling Apache modules at install time.  If it is not, then I submit
> that the interface is insufficiently documented.

I told you sometime ago on irc to change it to:

for i in apache apache-ssl apache-perl; do
	if [ -e /etc/$i/httpd.conf ]; then
		modules-config $i enable mod_php4
	fi
done

how you handle the exit from the script is not my decision since you can
make more things after. So the exit 0 stands up to you.

man modules-config for documentation. The 5 lines above are the simplest
way to handle the 3 flavour of apache. Noone can force you to write it in
that way.

> If it is, then I submit that this interface is broken, because it's
> incompatible with packages which need to use debconf for their own
> purposes.

apache uses debconf itself + modules-config. The only known problem
between debconf and daemons (in general) is that in order to make the
restart working debconf has to complete all it's operation before the
restart.

>  Now, maybe this is actually a debconf bug -- that wouldn't
> really surprise me -- but that doesn't remove the need for an interface
> that's compatible with debconf-using packages.  It appears that, at
> present, php4 is the only package in unstable that depends on both
> apache-common and debconf, which would explain why this bug only
> surfaces when installing php4.

It could be. I didn't check all the 40 and more external packages but i
use some of them on a regular base so i can see things happening across
updates.

>  If you insist that this makes it a php4
> bug and not a modules-config bug, I see no choice but to remove the
> modules-config call from the php4 postinst.

modules-config has not been forced to anyone. It is an option.

>  I'd *like* to comply with
> the long-standing wishlist request for auto-enabling of php4 on install,
> but we *need* a package that can be installed reliably.  Currently,
> modules-config is preventing that.

we all agree on this.

>
> As for whether this bug really exists, I can at least tell you that yes,
> php4 fails to install correctly when more than one apache flavor is
> installed, but works fine for me when only one apache flavor is
> installed.  It also works if I comment out the use of debconf in the
> postinst.

Ok this is reproducible, i managed to fix the multiinstallation problem
with a simple change in php4.postinst:

--- php4.postinst.orig  2003-11-17 06:33:30.000000000 +0100
+++ php4.postinst       2003-11-17 06:34:02.000000000 +0100
@@ -2,11 +2,6 @@

 set -e

-. /usr/share/debconf/confmodule
-
-
-
-
 if [ "$1" != "configure" ]; then
     exit 0
 fi
@@ -20,6 +15,7 @@
 if [ -f /etc/php4/apache/php.ini ] \
    && grep -q "^[[:space:]]*extension_dir" /etc/php4/apache/php.ini
 then
+       . /usr/share/debconf/confmodule
        db_get php4/update_apache_php_ini
        if [ "$RET" = "true" ] ; then
                sed -e "s/^[[:space:]]*extension_dir/;extension_dir/" < /etc/php4/apache/php.ini > /etc/php4/apache/php.ini-extdir
@@ -35,7 +31,7 @@
 fi

 for i in apache apache-ssl apache-perl; do
-        if [ -d /etc/$i ]; then
+        if [ -e /etc/$i/httpd.conf ]; then
                 modules-config $i enable mod_php4
         fi
 done

would you be so kind to check if it still works in case the extension_dir
is matched and debconf is used??? Perhaps that would be the case in which
db_stop needs to be used (just out of the blue but it might be a
possibility)

Fabio

-- 
Our mission: make IPv6 the default IP protocol
"We are on a mission from God" - Elwood Blues

http://www.itojun.org/paper/itojun-nanog-200210-ipv6isp/mgp00004.html



Reply to: