Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 443628 - www-apache/mod_geoip2-1.2.7 : api incompatibility with apache 2.4
Summary: www-apache/mod_geoip2-1.2.7 : api incompatibility with apache 2.4
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Server (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: No maintainer - Look at https://wiki.gentoo.org/wiki/Project:Proxy_Maintainers if you want to take care of it
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-11-17 13:36 UTC by LA GLOBULE
Modified: 2013-01-03 19:16 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description LA GLOBULE 2012-11-17 13:36:58 UTC
Since the api change of apache 2.4, we can't compile this module.

To handle that, patrick@gentoo.org updated mod_geoip2-1.2.7 with a "need_apache2_2" (http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/www-apache/mod_geoip2/mod_geoip2-1.2.7.ebuild?r1=1.1&r2=1.2&)

But if we read the API changes in apache HTTP Server 2.4 since 2.2 (http://httpd.apache.org/docs/trunk/developer/new_api_2_4.html), we have :

conn_rec->remote_ip and conn_rec->remote_addr

These fields have been renamed in order to distinguish between the client IP address of the connection and the useragent IP address of the request (potentially overridden by a load balancer or proxy). References to either of these fields must be updated with one of the following options, as appropriate for the module:
When you require the IP address of the user agent, which might be connected directly to the server, or might optionally be separated from the server by a transparent load balancer or proxy, use request_rec->useragent_ip and request_rec->useragent_addr.
When you require the IP address of the client that is connected directly to the server, which might be the useragent or might be the load balancer or proxy itself, use conn_rec->client_ip and conn_rec->client_addr.

And on github, we have a fix to handle that : https://github.com/maxmind/geoip-api-mod_geoip2/blob/master/mod_geoip.c, and this work great.

Is it possible to use this source code instead the source code provided on the maxmind website (http://www.maxmind.com/download/geoip/api/mod_geoip2/) ?

Thank you.

Reproducible: Always
Comment 1 Tom Wijsman (TomWij) (RETIRED) gentoo-dev 2012-11-18 22:27:05 UTC
> Since the api change of apache 2.4, we can't compile this module.

Can you provide the output of `emerge --info` in a comment and attach the full build log?
Comment 2 LA GLOBULE 2012-11-19 14:00:37 UTC
In fact, when I say "we can't", I mean "we don't have the possibility", because the ebuild contain a "need_apache2_2" flag.

So this module cannot be install on a 2.4 apache version.

But with this source code : https://github.com/maxmind/geoip-api-mod_geoip2/blob/master/mod_geoip.c, the compilation works fine.
Comment 3 Pacho Ramos gentoo-dev 2013-01-03 19:16:23 UTC
+*mod_geoip2-1.2.7-r1 (03 Jan 2013)
+
+  03 Jan 2013; Pacho Ramos <pacho@gentoo.org>
+  +files/mod_geoip2-1.2.7-httpd24.patch, +mod_geoip2-1.2.7-r1.ebuild:
+  Apply fedora patch to fix apache 2.4 compat
+