[opensuse-factory] apache2 2.4 / mod_python
Hi everybody! As I took on a little bit of 'looking what can be done to fix modules for Apache 2.4', I think it's fair to inform you a bit (and give you tips on how you can fix your own modules too). A 'typical' error I've come across so far is a very simple one: apxs2 moved from /usr/sbin to /usr/bin, which obviously result in the .spec file no longer finding it. A possible fix (done in apache2-mod_fcgid) is: %define apache_branch %(rpm -q --qf %%{version} apache2 | grep -E -o "2\\.[0-9]+") %if "%{apache_branch}" == "2.4" %define apxs %{_bindir}/apxs2 %else %define apxs %{_sbindir}/apxs2 %endif => then %{apxs} is the right thing in any case... This is by far the 'most common' issue I have seen yet, directly followed by $obj->remote_ip being renamed to $obj->client_ip (sed is sufficient to fix that... or a patch..). a third category of issues is 'dead upstream' modules... once we move to Apache 2.4 (will be for 13.1 I guess), we should probably drop those. A first candidate encountered is apache2-mod_python: as weird as it sounds: this was abandoned in 2007. In 2010, it was announced to move to the 'Attic', already stating that once Apache 2.4 hits distros, this will be a great candidate to be dropped.. or if python 3 becomes the default.. in both cases, it seems not to be a simple patching. so my proposal is to follow that and 'retire' mod_python when we roll in Apache 2.4. And with this: up to fix the next module :) Dominique -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
On 01/30/2013 11:53 AM, Dominique Leuenberger a.k.a. Dimstar wrote:
Hi everybody!
As I took on a little bit of 'looking what can be done to fix modules for Apache 2.4', I think it's fair to inform you a bit (and give you tips on how you can fix your own modules too).
A 'typical' error I've come across so far is a very simple one: apxs2 moved from /usr/sbin to /usr/bin, which obviously result in the .spec file no longer finding it.
A possible fix (done in apache2-mod_fcgid) is: %define apache_branch %(rpm -q --qf %%{version} apache2 | grep -E -o "2\\.[0-9]+") %if "%{apache_branch}" == "2.4" %define apxs %{_bindir}/apxs2 %else %define apxs %{_sbindir}/apxs2 %endif
That really a bug .. for some reason a set of rpm macros for apache2 did not land in the package even though I did wrote them... -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
Quoting Cristian Rodríguez <crrodriguez@opensuse.org>:
On 01/30/2013 11:53 AM, Dominique Leuenberger a.k.a. Dimstar wrote:
A possible fix (done in apache2-mod_fcgid) is: %define apache_branch %(rpm -q --qf %%{version} apache2 | grep -E -o "2\\.[0-9]+") %if "%{apache_branch}" == "2.4" %define apxs %{_bindir}/apxs2 %else %define apxs %{_sbindir}/apxs2 %endif
That really a bug .. for some reason a set of rpm macros for apache2 did not land in the package even though I did wrote them...
Well, I see what's happening and why this 'general approach' helped in all cases: /usr/sbin/apxs2 is a symlink to /usr/bin/apxs2, so for packages making use of this and using %{apxs} in the 'pure' sense, no change is needed. apache2-mod_fcgid though still failed, due to: %define apxs /usr/sbin/apxs2 APXS="%{apxs}-prefork" ./configure.apxs => so, even though apxs2 is symlinked, apxs2-prefork is not.. thus this error which the above snippet correctly fixes as well. Reality is so simple :) Dominique -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
El 30/01/13 13:33, Dominique Leuenberger a.k.a. Dimstar escribió:
Quoting Cristian Rodríguez <crrodriguez@opensuse.org>:
On 01/30/2013 11:53 AM, Dominique Leuenberger a.k.a. Dimstar wrote:
A possible fix (done in apache2-mod_fcgid) is: %define apache_branch %(rpm -q --qf %%{version} apache2 | grep -E -o "2\\.[0-9]+") %if "%{apache_branch}" == "2.4" %define apxs %{_bindir}/apxs2 %else %define apxs %{_sbindir}/apxs2 %endif
That really a bug .. for some reason a set of rpm macros for apache2 did not land in the package even though I did wrote them...
Well, I see what's happening and why this 'general approach' helped in all cases:
/usr/sbin/apxs2 is a symlink to /usr/bin/apxs2, so for packages making use of this and using %{apxs} in the 'pure' sense, no change is needed.
apache2-mod_fcgid though still failed, due to: %define apxs /usr/sbin/apxs2 APXS="%{apxs}-prefork" ./configure.apxs
=> so, even though apxs2 is symlinked, apxs2-prefork is not.
Yes, this is correct, in apache 2.4 the different "MPMs" are to be loaded as any other DSOs. (except that you cannot have two different mpm loaded) I did all this integration work and it was not "that easy" so there might be bugs to be addressed. -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
On 01/30/2013 03:53 PM, Dominique Leuenberger a.k.a. Dimstar wrote:
Hi everybody!
As I took on a little bit of 'looking what can be done to fix modules for Apache 2.4', I think it's fair to inform you a bit (and give you tips on how you can fix your own modules too).
A 'typical' error I've come across so far is a very simple one: apxs2 moved from /usr/sbin to /usr/bin, which obviously result in the .spec file no longer finding it.
A possible fix (done in apache2-mod_fcgid) is: %define apache_branch %(rpm -q --qf %%{version} apache2 | grep -E -o "2\\.[0-9]+") %if "%{apache_branch}" == "2.4" %define apxs %{_bindir}/apxs2 %else %define apxs %{_sbindir}/apxs2 %endif
=> then %{apxs} is the right thing in any case...
This is by far the 'most common' issue I have seen yet, directly followed by $obj->remote_ip being renamed to $obj->client_ip (sed is sufficient to fix that... or a patch..).
a third category of issues is 'dead upstream' modules... once we move to Apache 2.4 (will be for 13.1 I guess), we should probably drop those.
A first candidate encountered is apache2-mod_python: as weird as it sounds: this was abandoned in 2007. In 2010, it was announced to move to the 'Attic', already stating that once Apache 2.4 hits distros, this will be a great candidate to be dropped.. or if python 3 becomes the default.. in both cases, it seems not to be a simple patching.
This is not surprising, mod_wsgi is the preferred mechanism for Python-based web-apps since ages.
so my proposal is to follow that and 'retire' mod_python when we roll in Apache 2.4.
IMO it's safe to drop mod_python by then, it is not dead technically but (as far as I know) not in wide use anymore.
And with this: up to fix the next module :)
Dominique
Thanks for doing this! -- With kind regards, Sascha Peilicke SUSE Linux GmbH, Maxfeldstr. 5, D-90409 Nuernberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer HRB 16746 (AG Nürnberg)
participants (3)
-
Cristian Rodríguez
-
Dominique Leuenberger a.k.a. Dimstar
-
Sascha Peilicke