robert pushed to mod_geoip (el6). "Upgrade to 1.2.10 (#1214493)"

notifications at fedoraproject.org notifications at fedoraproject.org
Thu Apr 23 11:19:37 UTC 2015


>From e06f5d7cb5eb215d8cbc05341a5973ad5a6bb120 Mon Sep 17 00:00:00 2001
From: Robert Scheck <robert at fedoraproject.org>
Date: Thu, 23 Apr 2015 13:02:22 +0200
Subject: Upgrade to 1.2.10 (#1214493)


diff --git a/.gitignore b/.gitignore
index 4f1c4ba..768a150 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,2 @@
-mod_geoip2_1.2.?.tar.gz
+/mod_geoip2_1.2.*.tar.gz
+/1.2.*.tar.gz
diff --git a/10-geoip.conf b/10-geoip.conf
new file mode 100644
index 0000000..1b70122
--- /dev/null
+++ b/10-geoip.conf
@@ -0,0 +1 @@
+LoadModule geoip_module modules/mod_geoip.so
diff --git a/geoip.conf b/geoip.conf
new file mode 100644
index 0000000..5bcf9a0
--- /dev/null
+++ b/geoip.conf
@@ -0,0 +1,4 @@
+<IfModule mod_geoip.c>
+  GeoIPEnable On
+  GeoIPDBFile /usr/share/GeoIP/GeoIP.dat
+</IfModule>
diff --git a/mod_geoip-1.2.5-httpd24.patch b/mod_geoip-1.2.5-httpd24.patch
deleted file mode 100644
index 563e35b..0000000
--- a/mod_geoip-1.2.5-httpd24.patch
+++ /dev/null
@@ -1,35 +0,0 @@
---- mod_geoip.c.geoip
-+++ mod_geoip.c
-@@ -66,6 +66,7 @@
- #include "http_config.h"
- #include "http_protocol.h"
- #include "http_log.h"
-+#include "util_script.h"
- #include "ap_config.h"
- #include "apr_strings.h"
- #include <GeoIP.h>
-@@ -320,7 +321,11 @@
- 		return DECLINED;
- 
- 	if (!cfg->scanProxyHeaders) {
-+#if AP_MODULE_MAGIC_AT_LEAST(20111130,0)
-+		ipaddr = r->useragent_ip;
-+#else
- 		ipaddr = r->connection->remote_ip;
-+#endif
- 	}
- 	else {
- 		ap_add_common_vars(r);
-@@ -338,7 +343,11 @@
- 		}
- 		if (!ipaddr_ptr) {
- 			ap_log_error(APLOG_MARK, APLOG_DEBUG | APLOG_NOERRNO, 0, r->server, "[mod_geoip]: Error while getting ipaddr from proxy headers. Using REMOTE_ADDR.");
--			ipaddr = r->connection->remote_ip;
-+#if AP_MODULE_MAGIC_AT_LEAST(20111130,0)
-+			ipaddr = r->useragent_ip;
-+#else
-+	                ipaddr = r->connection->remote_ip;
-+#endif
- 		}
- 		else {
- 			ap_log_error(APLOG_MARK, APLOG_DEBUG | APLOG_NOERRNO, 0, r->server, "[mod_geoip]: IPADDR_PTR: %s", ipaddr_ptr);
diff --git a/mod_geoip.spec b/mod_geoip.spec
index 9544bf3..f8029c3 100644
--- a/mod_geoip.spec
+++ b/mod_geoip.spec
@@ -7,13 +7,14 @@
 
 Summary:	GeoIP module for the Apache HTTP Server
 Name:		mod_geoip
-Version:	1.2.7
-Release:	6%{?dist}
+Version:	1.2.10
+Release:	1%{?dist}
 Group:		System Environment/Daemons
 License:	ASL 1.1
-URL:		http://www.maxmind.com/app/mod_geoip
-Source:		http://www.maxmind.com/download/geoip/api/mod_geoip2/mod_geoip2_%{version}.tar.gz
-Patch0:		mod_geoip-1.2.5-httpd24.patch
+URL:		http://dev.maxmind.com/geoip/legacy/mod_geoip2/
+Source0:	https://github.com/maxmind/geoip-api-mod_geoip2/archive/%{version}.tar.gz
+Source1:	10-geoip.conf
+Source2:	geoip.conf
 BuildRequires:	httpd-devel, GeoIP-devel >= 1.4.3
 Requires:	GeoIP%{?_isa}, httpd-mmn = %{_httpd_mmn}
 BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@@ -25,8 +26,7 @@ and database to perform the lookup. It is free software, licensed under
 the Apache license.
 
 %prep
-%setup -q -n mod_geoip2_%{version}
-%patch0 -p0 -b .geoip
+%setup -q -n geoip-api-mod_geoip2-%{version}
 
 %build
 %{_httpd_apxs} -Wc,-Wall -Wl,"-lGeoIP" -c %{name}.c
@@ -35,27 +35,17 @@ the Apache license.
 rm -rf $RPM_BUILD_ROOT
 install -D -p -m 755 .libs/%{name}.so $RPM_BUILD_ROOT%{_httpd_moddir}/%{name}.so
 
-cat << EOF > 10-geoip.conf
-LoadModule geoip_module modules/mod_geoip.so
-EOF
-
-cat << EOF > geoip.conf
-<IfModule mod_geoip.c>
-  GeoIPEnable On
-  GeoIPDBFile /usr/share/GeoIP/GeoIP.dat
-</IfModule>
-EOF
-
 %if "%{_httpd_modconfdir}" == "%{_httpd_confdir}"
 # httpd <= 2.2.x
-cat 10-geoip.conf > unified.conf
+cat %{SOURCE1} > unified.conf
 echo >> unified.conf
-cat geoip.conf >> unified.conf
+cat %{SOURCE2} >> unified.conf
+touch -c -r %{SOURCE1} unified.conf
 install -D -p -m 644 unified.conf $RPM_BUILD_ROOT%{_httpd_confdir}/geoip.conf
 %else
 # httpd >= 2.4.x
-install -D -p -m 644 10-geoip.conf $RPM_BUILD_ROOT%{_httpd_modconfdir}/10-geoip.conf
-install -D -p -m 644 geoip.conf $RPM_BUILD_ROOT%{_httpd_confdir}/geoip.conf
+install -D -p -m 644 %{SOURCE1} $RPM_BUILD_ROOT%{_httpd_modconfdir}/10-geoip.conf
+install -D -p -m 644 %{SOURCE2} $RPM_BUILD_ROOT%{_httpd_confdir}/geoip.conf
 %endif
 
 %clean
@@ -63,7 +53,9 @@ rm -rf $RPM_BUILD_ROOT
 
 %files
 %defattr(-,root,root,-)
-%doc INSTALL README* Changes
+%{!?_licensedir:%global license %%doc}
+%license LICENSE
+%doc Changes INSTALL.md README.*
 %{_httpd_moddir}/%{name}.so
 %config(noreplace) %{_httpd_confdir}/geoip.conf
 %if "%{_httpd_modconfdir}" != "%{_httpd_confdir}"
@@ -71,6 +63,9 @@ rm -rf $RPM_BUILD_ROOT
 %endif
 
 %changelog
+* Thu Apr 23 2015 Robert Scheck <robert at fedoraproject.org> 1.2.10-1
+- Upgrade to 1.2.10 (#1214493)
+
 * Sun Aug 17 2014 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 1.2.7-6
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
 
diff --git a/sources b/sources
index 7508eb3..82fa6a9 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-76514ad0e8adb8cd8231c5e3646d03fd  mod_geoip2_1.2.7.tar.gz
+c2b564cfd2bcb8527304f20818f29443  1.2.10.tar.gz
-- 
cgit v0.10.2


	http://pkgs.fedoraproject.org/cgit/mod_geoip.git/commit/?h=el6&id=e06f5d7cb5eb215d8cbc05341a5973ad5a6bb120


More information about the scm-commits mailing list