jvandal / modwsgi

Automatically exported from code.google.com/p/modwsgi
0 stars 0 forks source link

Remove httpd binary dependency #147

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
mod-wsgi build process depends on httpd apache binary to get required API
version to compile for. The same version can be extracted from httpd.h as
made in attached patch.

The original idea comes from Debian mod-wsgi package. In Debian dev headers
for Apache required to compile modules are distributed separately from
binaries, so binary package builders won't have to install httpd binaries.

Original issue reported on code.google.com by techtonik@gmail.com on 19 May 2009 at 7:58

Attachments:

GoogleCodeExporter commented 8 years ago
The location of include directory as specified by apxs isn't as reliable as the 
location of the httpd binary. What I 
will do is check for httpd existence and if it exists do things the current 
way. If it doesn't exist, then fall back to 
trying to get it from the httpd.h header file.

Original comment by Graham.Dumpleton@gmail.com on 20 May 2009 at 12:12

GoogleCodeExporter commented 8 years ago
I thought that if apxs is used to compile module and can not detect header files
correctly then build will fail. In addition location of httpd is also specified 
by
apxs, so if module build tool can not find it's developer's files then how can 
we be
sure it can find it's binaries?

Original comment by techtonik@gmail.com on 20 May 2009 at 9:02

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
I checked with Apache2.2 and its version info migrated to ap_release.h
Updated patch in attach.

Original comment by techtonik@gmail.com on 20 May 2009 at 1:23

Attachments:

GoogleCodeExporter commented 8 years ago
The ap_release.h header file is in some versions of Apache 2.0 as well.

As to why to give precedence to httpd binary, that is because some binary 
distributions on Solaris are screwed up 
and include location isn't actually where the header files are. In some cases 
build still works as they have made it 
into standard include location, other times they aren't found and have to tell 
people to go fix their installation.

Anyway, I still see no harm in checking in order:

1. httpd -v
2. ap_release.h if exists
3. httpd.d if exists
4. assume 2.X

Still achieves what you need and first check is the one that has always been 
done in the past and have greatest 
confidence in since it has been working fine.

Original comment by Graham.Dumpleton@gmail.com on 20 May 2009 at 11:30

GoogleCodeExporter commented 8 years ago
Seems good to me.

Original comment by techtonik@gmail.com on 21 May 2009 at 12:14

GoogleCodeExporter commented 8 years ago
Change committed in revision 1330 of trunk for 3.0 and 1331 of 2.x branch for 
2.6.

Original comment by Graham.Dumpleton@gmail.com on 22 May 2009 at 5:27

GoogleCodeExporter commented 8 years ago
That was fast. Thanks! =)

Original comment by techtonik@gmail.com on 22 May 2009 at 6:14

GoogleCodeExporter commented 8 years ago
Version 3.0 of mod_wsgi now released with this change. Version 2.6 of mod_wsgi 
had been released previously.

Original comment by Graham.Dumpleton@gmail.com on 22 Nov 2009 at 3:01