[opensuse-packaging] installing / updating / erasing apache2 modules
![](https://seccdn.libravatar.org/avatar/541f0424df99fb299635f2b0c46454b0.jpg?s=120&d=mm&r=g)
Hi, php5 in server:php currently has %preun -n apache2-mod_php5 if [ "$1" = "0" ] then if [ -x /usr/sbin/a2enmod ] then if a2enmod -q php5; then a2dismod php5 fi fi fi %postun -n apache2-mod_php5 %restart_on_update apache2 Is there some policy about this? I looked at other apache2 modules in the distro and these don't automatically restart apache and with the exception of mod_apparmor also don't enable the module, instead a README or the package description tells the user to do so. Also the security advisories for the modules say "Please close and restart all running instances of Apache after the update.". Is it time to handle this automatically, or should we revert the change in php? Michal --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
![](https://seccdn.libravatar.org/avatar/a98f4fcfba592494dddc221040727b31.jpg?s=120&d=mm&r=g)
On 2007-05-21 14:51:15 +0200, Michal Marek wrote:
php5 in server:php currently has
%preun -n apache2-mod_php5
if [ "$1" = "0" ] then if [ -x /usr/sbin/a2enmod ] then if a2enmod -q php5; then a2dismod php5 fi fi fi
%postun -n apache2-mod_php5 %restart_on_update apache2
Is there some policy about this? I looked at other apache2 modules in the distro and these don't automatically restart apache and with the exception of mod_apparmor also don't enable the module, instead a README or the package description tells the user to do so. Also the security advisories for the modules say "Please close and restart all running instances of Apache after the update.".
Is it time to handle this automatically, or should we revert the change in php?
imho the problem is more general. lets say i upgrade apache + modules: %postun in the apache package does: %restart_on_update apache2 now the other modules will be installed. that can already take your server offline. if the apache mmn changes the old modules that are still installed wont be loaded in the newer apache. on the other hand we dont want to restart apache after each module. we already discussed some kind of trigger file for this problem a few weeks ago. so %restart_on_update would e.g. create /var/run/suseconfig/restart-<servicename> which can be picked up by some SuSEconfig script in the end. [1] that way we could restart services after all modules have been upgraded. of course this applies to e.g. postfix, jabberd2 and many other packages aswell. darix [1] i dont want to discuss the usefulness of suseconfig here. atm it looks like a reasonable way to me. unlike the already discussed triggerd. -- openSUSE - SUSE Linux is my linux openSUSE is good for you www.opensuse.org --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
![](https://seccdn.libravatar.org/avatar/6eea583e770659063bf623f7d6bbe85f.jpg?s=120&d=mm&r=g)
Marcus Rueckert escribió:
imho the problem is more general.
Yes, and I was unableto figure a better solution, that's the reason why I used that. ;)
lets say i upgrade apache + modules:
%postun in the apache package does: %restart_on_update apache2
now the other modules will be installed. that can already take your server offline. if the apache mmn changes the old modules that are still installed wont be loaded in the newer apache.
there is yet another issue with this approach, the "restart" must be done when the transaction finishes, if I install apache2-mod_php5 it may pull other PHP modules that really needs to be updated **before** restarting.
which can be picked up by some SuSEconfig script in the end. [1]
wasnt it deprecated ? ;)
![](https://seccdn.libravatar.org/avatar/a98f4fcfba592494dddc221040727b31.jpg?s=120&d=mm&r=g)
On 2007-05-21 18:16:00 -0400, Cristian Rodriguez R. wrote:
Marcus Rueckert escribió:
imho the problem is more general.
Yes, and I was unableto figure a better solution, that's the reason why I used that. ;)
lets say i upgrade apache + modules:
%postun in the apache package does: %restart_on_update apache2
now the other modules will be installed. that can already take your server offline. if the apache mmn changes the old modules that are still installed wont be loaded in the newer apache.
there is yet another issue with this approach, the "restart" must be done when the transaction finishes, if I install apache2-mod_php5 it may pull other PHP modules that really needs to be updated **before** restarting.
as we cant use rpm transactions (many installer install one rpm per rpm call) we have to use some external script here. and each php module just does %restart_on_update apache2 e.g. aswell. so they "trigger" a restart of it aswell. [1]
which can be picked up by some SuSEconfig script in the end. [1]
wasnt it deprecated ? ;)
i know we try to minimize the usage of it. you can always bring up a better idea for the problem.;) darix [1] Although this gets a bit tricky. who will restart my php fastcgi init script?;) do we want to have it in the distro at all? -- openSUSE - SUSE Linux is my linux openSUSE is good for you www.opensuse.org --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
![](https://seccdn.libravatar.org/avatar/6eea583e770659063bf623f7d6bbe85f.jpg?s=120&d=mm&r=g)
Marcus Rueckert escribió:
and each php module just does %restart_on_update apache2 e.g. aswell. so they "trigger" a restart of it as well.
hrmm.. looks ugly :-P
[1] Although this gets a bit tricky. who will restart my php fastcgi init script?;) do we want to have it in the distro at all?
I think we need such init script for external spawning too, maybe adding it to php-suse-addons tarball is a good idea.
![](https://seccdn.libravatar.org/avatar/a98f4fcfba592494dddc221040727b31.jpg?s=120&d=mm&r=g)
On 2007-05-22 02:31:02 -0400, Cristian Rodriguez R. wrote:
Marcus Rueckert escribió:
and each php module just does %restart_on_update apache2 e.g. aswell. so they "trigger" a restart of it as well.
hrmm.. looks ugly :-P
thats the only possible solution, imho
[1] Although this gets a bit tricky. who will restart my php fastcgi init script?;) do we want to have it in the distro at all?
I think we need such init script for external spawning too, maybe adding it to php-suse-addons tarball is a good idea.
it is tricky as it relies on 3rd party tools. either /usr/bin/cgi-fcgi from FastCGI or /usr/sbin/spawn-fcgi from lighttpd. and i dont think we want to add either of them as dependency in php5-fastcgi. maybe we should error out in the init script if the tools are not found. *ponders* darix -- openSUSE - SUSE Linux is my linux openSUSE is good for you www.opensuse.org --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
participants (3)
-
Cristian Rodriguez R.
-
Marcus Rueckert
-
Michal Marek