pghmcfc pushed to GeoIP (master). "Merge branch 'master' into el5 (..more)"

notifications at fedoraproject.org notifications at fedoraproject.org
Tue Apr 14 06:56:45 UTC 2015


>From 4f4fff7ffe167568b84ffd9403dd0c29d560093b Mon Sep 17 00:00:00 2001
From: Michael Fleming <mfleming at fedoraproject.org>
Date: Mon, 27 Nov 2006 09:32:30 +0000
Subject: - Fix %install scripts to satisfy newer mock builds


diff --git a/GeoIP.spec b/GeoIP.spec
index 02b0627..22906a0 100644
--- a/GeoIP.spec
+++ b/GeoIP.spec
@@ -1,6 +1,6 @@
 Name: GeoIP           
 Version: 1.4.0
-Release: 3%{?dist}
+Release: 4%{?dist}
 Summary: C library for country/city/organization to IP address or hostname mapping     
 Group: Development/Libraries         
 License: GPL
@@ -39,7 +39,7 @@ make %{?_smp_mflags}
 
 %install
 rm -rf %{buildroot}
-%makeinstall
+make DESTDIR=%{buildroot} install
 
 # nix the stuff we don't need like .la files.
 rm -f %{buildroot}/%{_libdir}/*.la
@@ -73,6 +73,9 @@ rm -rf %{buildroot}
 %{_libdir}/libGeoIPUpdate.so
 
 %changelog
+* Mon Nov 27 2006 Michael Fleming <mfleming+rpm at enlartenment.com> 1.4.0-4
+- Fix %%install scripts to satisfy newer mock builds
+
 * Sun Sep 3 2006 Michael Fleming <mfleming+rpm at enlartenment.com> 1.4.0-3
 - Upstream upgrade
 - Added LICENSE.txt file to %%doc, covering GeoIP country/city data license
-- 
cgit v0.10.2


>From 6b59fda88a8bd23a744c822724cf7de63f2c6e1d Mon Sep 17 00:00:00 2001
From: Michael Fleming <mfleming at fedoraproject.org>
Date: Sun, 7 Jan 2007 02:07:26 +0000
Subject: - New upstream release - Add fetch-geoipdata* scripts to pull free
 databases automatically if     desired (bz #198137) - README.fedora added to
 briefly explain above.


diff --git a/.cvsignore b/.cvsignore
index 231f852..93d3b5e 100644
--- a/.cvsignore
+++ b/.cvsignore
@@ -1,2 +1,5 @@
+GeoIP-1.4.1.tar.gz
 LICENSE.txt
-GeoIP-1.4.0.tar.gz
+fetch-geoipdata.pl
+fetch-geoipdata-city.pl
+README.Fedora
diff --git a/GeoIP.spec b/GeoIP.spec
index 22906a0..d584133 100644
--- a/GeoIP.spec
+++ b/GeoIP.spec
@@ -1,12 +1,15 @@
 Name: GeoIP           
-Version: 1.4.0
-Release: 4%{?dist}
+Version: 1.4.1
+Release: 1%{?dist}
 Summary: C library for country/city/organization to IP address or hostname mapping     
 Group: Development/Libraries         
 License: GPL
 URL: http://www.maxmind.com/app/c            
 Source0: http://www.maxmind.com/download/geoip/api/c/GeoIP-%{version}.tar.gz 
 Source1: http://www.maxmind.com/download/geoip/database/LICENSE.txt
+Source2: fetch-geoipdata-city.pl
+Source3: fetch-geoipdata.pl
+Source4: README.Fedora
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 Obsoletes: geoip < %{version}-%{release}
 Provides: geoip = %{version}-%{release}
@@ -32,6 +35,9 @@ Development headers and static libraries for building GeoIP-based applications
 %prep
 %setup -q 
 install -D -m644 %{SOURCE1} LICENSE.txt
+install -D -m644 %{SOURCE2} fetch-geoipdata-city.pl
+install -D -m644 %{SOURCE3} fetch-geoipdata.pl
+install -D -m644 %{SOURCE4} README.fedora
 
 %build
 %configure --disable-static --disable-dependency-tracking
@@ -53,7 +59,7 @@ rm -rf %{buildroot}
 
 %files
 %defattr(-,root,root,-)
-%doc AUTHORS COPYING ChangeLog README TODO INSTALL LICENSE*
+%doc AUTHORS COPYING ChangeLog README TODO INSTALL LICENSE* fetch-*
 %{_libdir}/libGeoIP.so.*
 %{_libdir}/libGeoIPUpdate.so.*
 %{_bindir}/geoiplookup
@@ -73,6 +79,12 @@ rm -rf %{buildroot}
 %{_libdir}/libGeoIPUpdate.so
 
 %changelog
+* Sun Jan 7 2007 Michael Fleming <mfleming+rpm at enlartenment.com> 1.4.1-1
+- New upstream release
+- Add fetch-geoipdata* scripts to pull free databases automatically if
+  desired (bz #198137)
+- README.fedora added to briefly explain above.
+
 * Mon Nov 27 2006 Michael Fleming <mfleming+rpm at enlartenment.com> 1.4.0-4
 - Fix %%install scripts to satisfy newer mock builds
 
diff --git a/sources b/sources
index 8e6a16b..62cf241 100644
--- a/sources
+++ b/sources
@@ -1,2 +1,5 @@
-7a976ca11d0f2c6b1fa230b6d57c34d7  LICENSE.txt
-da09a3d9a1a91e3d16c0a29e6b056c15  GeoIP-1.4.0.tar.gz
+3a8f841b2a113b80ba2ed3b988826d00  GeoIP-1.4.1.tar.gz
+8c0bc6e8ebe6ec3bc1580021edb4bba1  LICENSE.txt
+c7c0ff588272cc686515d4c66b076cba  fetch-geoipdata.pl
+48a9f71cc61aae720a473309d39db98b  fetch-geoipdata-city.pl
+38e97c6ac82ac7b44f6d1f40c30580a5  README.Fedora
-- 
cgit v0.10.2


>From 4acd9fe61576f7c77f1f8871eb675cd67e29e60f Mon Sep 17 00:00:00 2001
From: Michael Fleming <mfleming at fedoraproject.org>
Date: Mon, 8 Jan 2007 05:45:40 +0000
Subject: - License is actually LGPL now.


diff --git a/GeoIP.spec b/GeoIP.spec
index d584133..de0844f 100644
--- a/GeoIP.spec
+++ b/GeoIP.spec
@@ -3,7 +3,7 @@ Version: 1.4.1
 Release: 1%{?dist}
 Summary: C library for country/city/organization to IP address or hostname mapping     
 Group: Development/Libraries         
-License: GPL
+License: LGPL
 URL: http://www.maxmind.com/app/c            
 Source0: http://www.maxmind.com/download/geoip/api/c/GeoIP-%{version}.tar.gz 
 Source1: http://www.maxmind.com/download/geoip/database/LICENSE.txt
@@ -79,6 +79,9 @@ rm -rf %{buildroot}
 %{_libdir}/libGeoIPUpdate.so
 
 %changelog
+* Mon Jan 8 2007 Michael Fleming <mfleming+rpm at enlartenment.com> 1.4.1-2
+- License is actually LGPL now.
+
 * Sun Jan 7 2007 Michael Fleming <mfleming+rpm at enlartenment.com> 1.4.1-1
 - New upstream release
 - Add fetch-geoipdata* scripts to pull free databases automatically if
-- 
cgit v0.10.2


>From 51fad5e90c17765c91e358390a1737b46b2bc192 Mon Sep 17 00:00:00 2001
From: Michael Fleming <mfleming at fedoraproject.org>
Date: Mon, 8 Jan 2007 05:48:05 +0000
Subject: Actually bump the release version this time


diff --git a/GeoIP.spec b/GeoIP.spec
index de0844f..82058a9 100644
--- a/GeoIP.spec
+++ b/GeoIP.spec
@@ -1,6 +1,6 @@
 Name: GeoIP           
 Version: 1.4.1
-Release: 1%{?dist}
+Release: 2%{?dist}
 Summary: C library for country/city/organization to IP address or hostname mapping     
 Group: Development/Libraries         
 License: LGPL
-- 
cgit v0.10.2


>From 1e7aab322785f634dc2bc318c2b74ea29a651ad4 Mon Sep 17 00:00:00 2001
From: Michael Fleming <mfleming at fedoraproject.org>
Date: Mon, 12 Feb 2007 11:57:50 +0000
Subject: - New upstream release.


diff --git a/.cvsignore b/.cvsignore
index 93d3b5e..7cc09af 100644
--- a/.cvsignore
+++ b/.cvsignore
@@ -1,5 +1,5 @@
-GeoIP-1.4.1.tar.gz
-LICENSE.txt
-fetch-geoipdata.pl
+GeoIP-1.4.2.tar.gz
 fetch-geoipdata-city.pl
+fetch-geoipdata.pl
+LICENSE.txt
 README.Fedora
diff --git a/GeoIP.spec b/GeoIP.spec
index 82058a9..ef95238 100644
--- a/GeoIP.spec
+++ b/GeoIP.spec
@@ -1,6 +1,6 @@
 Name: GeoIP           
-Version: 1.4.1
-Release: 2%{?dist}
+Version: 1.4.2
+Release: 1%{?dist}
 Summary: C library for country/city/organization to IP address or hostname mapping     
 Group: Development/Libraries         
 License: LGPL
@@ -79,6 +79,9 @@ rm -rf %{buildroot}
 %{_libdir}/libGeoIPUpdate.so
 
 %changelog
+* Mon Feb 12 2007 Michael Fleming <mfleming+rpm at enlartenment.com> 1.4.2-1
+- New upstream release.
+
 * Mon Jan 8 2007 Michael Fleming <mfleming+rpm at enlartenment.com> 1.4.1-2
 - License is actually LGPL now.
 
diff --git a/sources b/sources
index 62cf241..597551b 100644
--- a/sources
+++ b/sources
@@ -1,5 +1,5 @@
-3a8f841b2a113b80ba2ed3b988826d00  GeoIP-1.4.1.tar.gz
-8c0bc6e8ebe6ec3bc1580021edb4bba1  LICENSE.txt
-c7c0ff588272cc686515d4c66b076cba  fetch-geoipdata.pl
+d310da791d1d760edad25d33f2166fcd  GeoIP-1.4.2.tar.gz
 48a9f71cc61aae720a473309d39db98b  fetch-geoipdata-city.pl
+c7c0ff588272cc686515d4c66b076cba  fetch-geoipdata.pl
+8c0bc6e8ebe6ec3bc1580021edb4bba1  LICENSE.txt
 38e97c6ac82ac7b44f6d1f40c30580a5  README.Fedora
-- 
cgit v0.10.2


>From 1632a27cb4cfe1a523e642cb7658ab2fe7914924 Mon Sep 17 00:00:00 2001
From: Michael Fleming <mfleming at fedoraproject.org>
Date: Wed, 5 Sep 2007 10:37:12 +0000
Subject: - New upstream release. - Fix GeoIPCity fetcher script - Update
 License tag


diff --git a/.cvsignore b/.cvsignore
index 7cc09af..581402e 100644
--- a/.cvsignore
+++ b/.cvsignore
@@ -1,5 +1,5 @@
-GeoIP-1.4.2.tar.gz
 fetch-geoipdata-city.pl
 fetch-geoipdata.pl
+GeoIP-1.4.3.tar.gz
 LICENSE.txt
 README.Fedora
diff --git a/GeoIP.spec b/GeoIP.spec
index ef95238..715e3c9 100644
--- a/GeoIP.spec
+++ b/GeoIP.spec
@@ -1,9 +1,9 @@
 Name: GeoIP           
-Version: 1.4.2
+Version: 1.4.3
 Release: 1%{?dist}
 Summary: C library for country/city/organization to IP address or hostname mapping     
 Group: Development/Libraries         
-License: LGPL
+License: LGPLv2+
 URL: http://www.maxmind.com/app/c            
 Source0: http://www.maxmind.com/download/geoip/api/c/GeoIP-%{version}.tar.gz 
 Source1: http://www.maxmind.com/download/geoip/database/LICENSE.txt
@@ -79,6 +79,11 @@ rm -rf %{buildroot}
 %{_libdir}/libGeoIPUpdate.so
 
 %changelog
+* Wed Sep 5 2007 Michael Fleming <mfleming+rpm at enlartenment.com> 1.4.3-1
+- New upstream release.
+- Fix GeoIPCity fetcher script
+- Update License tag
+
 * Mon Feb 12 2007 Michael Fleming <mfleming+rpm at enlartenment.com> 1.4.2-1
 - New upstream release.
 
diff --git a/sources b/sources
index 597551b..c4f8ed6 100644
--- a/sources
+++ b/sources
@@ -1,5 +1,5 @@
-d310da791d1d760edad25d33f2166fcd  GeoIP-1.4.2.tar.gz
-48a9f71cc61aae720a473309d39db98b  fetch-geoipdata-city.pl
+76628bd54dca89ba21fcbb6f54f3c668  fetch-geoipdata-city.pl
 c7c0ff588272cc686515d4c66b076cba  fetch-geoipdata.pl
+d364ec127a1092749d589a79001f2d8c  GeoIP-1.4.3.tar.gz
 8c0bc6e8ebe6ec3bc1580021edb4bba1  LICENSE.txt
 38e97c6ac82ac7b44f6d1f40c30580a5  README.Fedora
-- 
cgit v0.10.2


>From 2d93bea292b661a9f523a0032eb5ae59d0fb05d6 Mon Sep 17 00:00:00 2001
From: Michael Fleming <mfleming at fedoraproject.org>
Date: Mon, 28 Jan 2008 10:09:31 +0000
Subject: - New upstream release.


diff --git a/GeoIP.spec b/GeoIP.spec
index 715e3c9..fa696b4 100644
--- a/GeoIP.spec
+++ b/GeoIP.spec
@@ -1,5 +1,5 @@
 Name: GeoIP           
-Version: 1.4.3
+Version: 1.4.4
 Release: 1%{?dist}
 Summary: C library for country/city/organization to IP address or hostname mapping     
 Group: Development/Libraries         
@@ -79,6 +79,9 @@ rm -rf %{buildroot}
 %{_libdir}/libGeoIPUpdate.so
 
 %changelog
+* Mon Jan 28 2008 Michael Fleming <mfleming+rpm at enlartenment.com> 1.4.4-1
+- New upstream release.
+
 * Wed Sep 5 2007 Michael Fleming <mfleming+rpm at enlartenment.com> 1.4.3-1
 - New upstream release.
 - Fix GeoIPCity fetcher script
diff --git a/LICENSE.txt b/LICENSE.txt
new file mode 100644
index 0000000..2380c54
--- /dev/null
+++ b/LICENSE.txt
@@ -0,0 +1,74 @@
+There are two licenses, one for the C library software, and one for
+the database.
+
+SOFTWARE LICENSE (C library)
+
+The GeoIP C Library is licensed under the LGPL.  For details see
+the COPYING file.
+
+OPEN DATA LICENSE (GeoLite Country and GeoLite City databases)
+
+Copyright (c) 2005 MaxMind LLC.  All Rights Reserved.
+
+All advertising materials and documentation mentioning features or use of
+this database must display the following acknowledgment:
+"This product includes GeoLite data created by MaxMind, available from
+http://maxmind.com/"
+
+Redistribution and use with or without modification, are permitted provided
+that the following conditions are met:
+1. Redistributions must retain the above copyright notice, this list of
+conditions and the following disclaimer in the documentation and/or other
+materials provided with the distribution. 
+2. All advertising materials and documentation mentioning features or use of
+this database must display the following acknowledgement:
+"This product includes GeoLite data created by MaxMind, available from
+http://maxmind.com/"
+3. "MaxMind" may not be used to endorse or promote products derived from this
+database without specific prior written permission.
+
+THIS DATABASE IS PROVIDED BY MAXMIND.COM ``AS IS'' AND ANY 
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 
+DISCLAIMED. IN NO EVENT SHALL MAXMIND.COM BE LIABLE FOR ANY 
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
+DATABASE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Some parts of this software distribution are derived from the APNIC, ARIN and
+RIPE databases (copyright details below). The author of this module makes no
+claims of ownership on those parts.
+
+APNIC conditions of use:
+
+The files are freely available for download and use on the condition that APNIC
+will not be held responsible for any loss or damage arising from the application
+of the information contained in these reports.
+
+APNIC endeavours to the best of its ability to ensure the accuracy of these
+reports; however, APNIC makes no guarantee in this regard.
+
+In particular, it should be noted that these reports seek to indicate the
+country where resources were first allocated or assigned. It is not intended
+that these reports be considered as an authoritative statement of the location
+in which any specific resource may currently be in use.
+
+ARIN database copyright:
+
+Copyright (c) American Registry for Internet Numbers. All rights reserved.
+
+RIPE database copyright:
+
+The information in the RIPE Database is available to the public for agreed
+Internet operation purposes, but is under copyright. The copyright statement is:
+
+"Except for agreed Internet operational purposes, no part of this publication
+may be reproduced, stored in a retrieval system, or transmitted, in any form or
+by any means, electronic, mechanical, recording, or otherwise, without prior
+permission of the RIPE NCC on behalf of the copyright holders. Any use of this
+material to target advertising or similar activities is explicitly forbidden and
+may be prosecuted. The RIPE NCC requests to be notified of any such activities
+or suspicions thereof."
diff --git a/README.Fedora b/README.Fedora
new file mode 100644
index 0000000..d1d3fa7
--- /dev/null
+++ b/README.Fedora
@@ -0,0 +1,73 @@
+Automatically fetching GeoIP "free" databases
+==============================================
+
+As provided by Maxmind, LLC, the GeoIP library packages possess tools to
+fetch the licensed country/city/organization etc. databases they
+provide, but no such tool to fetch the free Country/City equivalents.
+
+Additionally, the database version shipped with the base package will be
+the current one at the time a new library release ships. Therefore, the
+shipped database gets less accurate and obsolescent if the library has
+not been updated in some time.
+
+Therefore these databases can become out-of-date quite quickly unless
+the user manually fetches and replaces them regularly; Maxmind generally
+release updates once a month (on the 1st/2nd day of the month).
+
+To assist users/administrators in automating retrieval/updating of the
+available free databases, I've provided the following Perl scripts:
+
+THE SCRIPTS:
+===========
+
+* fetch-geoipdata.pl - This fetches the base GeoIP.dat.gz file from
+Maxmind's site, replacing the existing /usr/share/GeoIP/GeoIP.dat file
+appropriately, keeping a dated backup (YYYYMMDD) of the old database file.
+
+* fetch-geoipdata-city.pl - This works the same way as the above script,
+but on the free City database. It should be noted that a) the City database
+is not part of the standard library package and b) it's fairly large
+(~20mb) and not friendly to users on slow connections.
+
+File location and URL to fetch from are in the script itself, feel free
+to change these to suit your system and local requirements.
+
+REQUIREMENTS:
+============
+* A basic Perl installation will do. As long as Carp, File::Copy and the
+  LWP modules are available the scripts will be satisfied
+* gzip to decompress the fetched archives. Almost all systems will have
+  this as part of the base installation.
+
+USAGE:
+============
+* Simply put the scripts in your PATH and set them to executable.  
+
+* These are best run from a crontab entry, ideally on the 1st/2nd of the
+  month (depending on your timezone. I'm at +1000  - Queensland,
+  Australia so that works for me)
+
+  eg
+
+  # Fetch GeoIP databases at 6am on the 2nd of the month
+  00 06 2 * * /usr/local/bin/fetch-geoipdata.pl
+
+  You should not need to reload apps using the databases under normal
+  circumstances.
+
+BUGS:
+============
+* Hopefully few if any. More verbose error checking is planned.
+* Please do not send bug reports or issues relating to these scripts to
+  Maxmind, LLC - I am in no way employed by or personally/professionally
+  related to the company, I'm just a user like you :-)
+* Feel free to send any improvements / bugfixes / ideas to me directly.
+
+AUTHOR
+============
+Michael Fleming <mfleming at enlartenment.com>
+
+LICENSE
+============
+This code is licensed under the GPL version 2
+
diff --git a/fetch-geoipdata-city.pl b/fetch-geoipdata-city.pl
new file mode 100644
index 0000000..eef67e5
--- /dev/null
+++ b/fetch-geoipdata-city.pl
@@ -0,0 +1,36 @@
+#!/usr/bin/perl
+
+use strict;
+use warnings;
+use POSIX;
+use LWP::Simple;
+use File::Copy;
+use Carp;
+
+my $ipdb     = "GeoLiteCity.dat";
+my $datadir  = "/usr/share/GeoIP/";
+my $fullpath = $datadir . $ipdb;
+my $url = "http://www.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz";
+my $date = strftime "%Y%m%d", localtime;
+
+# Do we have an existing IP database?
+if ( -e $fullpath ) {
+    print "Fetching " . $ipdb . " from " . $url . "\r\n";
+    if ( is_success( getstore( $url, $datadir . "GeoLiteCity.dat.gz" ) ) ) {
+        move( $fullpath, $datadir . $ipdb . "." . $date )
+          || croak "Can't move the old database aside\r\n";
+        system( 'gzip', '-d', $datadir . 'GeoLiteCity.dat.gz' );
+        if ( $? ne 0 ) {
+            croak "Could not uncompress database - exited $?\r\n";
+        }
+        print "GeoIP database updated. Old copy is at " . $ipdb . "." . $date
+          . "\r\n";
+    }
+    else {
+        croak "Fetch failed - try again later?\r\n";
+    }
+}
+else {
+    croak "You don't appear to have a valid GeoIP database installed..\r\n";
+}
+
diff --git a/fetch-geoipdata.pl b/fetch-geoipdata.pl
new file mode 100644
index 0000000..0c0c36c
--- /dev/null
+++ b/fetch-geoipdata.pl
@@ -0,0 +1,36 @@
+#!/usr/bin/perl
+
+use strict;
+use warnings;
+use POSIX;
+use LWP::Simple;
+use File::Copy;
+use Carp;
+
+my $ipdb     = 'GeoIP.dat';
+my $datadir  = '/usr/share/GeoIP/';
+my $fullpath = $datadir . $ipdb;
+my $url      = 'http://www.maxmind.com/download/geoip/database/GeoIP.dat.gz';
+my $date     = strftime '%Y%m%d', localtime;
+
+# Do we have an existing IP database?
+if ( -e $fullpath ) {
+    print "Fetching " . $ipdb . " from " . $url . "\r\n";
+    if ( is_success( getstore( $url, $datadir . 'GeoIP.dat.gz' ) ) ) {
+        move( $fullpath, $datadir . $ipdb . '.' . $date )
+          || croak "Can't move the old database aside\r\n";
+        system 'gzip', '-d', $datadir . 'GeoIP.dat.gz';
+        if ( $? ne 0 ) {
+            croak "Could not uncompress database - exited $?\r\n";
+        }
+        print "GeoIP database updated. Old copy is at " . $ipdb . "." . $date
+          . "\r\n";
+    }
+    else {
+        croak "Fetch failed - try again later?\r\n";
+    }
+}
+else {
+    croak "You don't appear to have a valid GeoIP database installed..\r\n";
+}
+
-- 
cgit v0.10.2


>From b9db5e2041572a23eace1d0804064e8ed243c242 Mon Sep 17 00:00:00 2001
From: Michael Fleming <mfleming at fedoraproject.org>
Date: Mon, 28 Jan 2008 10:11:54 +0000
Subject: New sources file


diff --git a/.cvsignore b/.cvsignore
index 581402e..8722994 100644
--- a/.cvsignore
+++ b/.cvsignore
@@ -1,5 +1 @@
-fetch-geoipdata-city.pl
-fetch-geoipdata.pl
-GeoIP-1.4.3.tar.gz
-LICENSE.txt
-README.Fedora
+GeoIP-1.4.4.tar.gz
diff --git a/sources b/sources
index c4f8ed6..ae8e3c6 100644
--- a/sources
+++ b/sources
@@ -1,5 +1 @@
-76628bd54dca89ba21fcbb6f54f3c668  fetch-geoipdata-city.pl
-c7c0ff588272cc686515d4c66b076cba  fetch-geoipdata.pl
-d364ec127a1092749d589a79001f2d8c  GeoIP-1.4.3.tar.gz
-8c0bc6e8ebe6ec3bc1580021edb4bba1  LICENSE.txt
-38e97c6ac82ac7b44f6d1f40c30580a5  README.Fedora
+27c1320e41e67b9ddcf4118e4eaccd1d  GeoIP-1.4.4.tar.gz
-- 
cgit v0.10.2


>From 35a05e3bf3abeedeccd4baa9af58a3f017b663a5 Mon Sep 17 00:00:00 2001
From: Jesse Keating <jkeating at fedoraproject.org>
Date: Tue, 19 Feb 2008 13:24:17 +0000
Subject: - Autorebuild for GCC 4.3


diff --git a/GeoIP.spec b/GeoIP.spec
index fa696b4..2ceef7f 100644
--- a/GeoIP.spec
+++ b/GeoIP.spec
@@ -1,6 +1,6 @@
 Name: GeoIP           
 Version: 1.4.4
-Release: 1%{?dist}
+Release: 2%{?dist}
 Summary: C library for country/city/organization to IP address or hostname mapping     
 Group: Development/Libraries         
 License: LGPLv2+
@@ -79,6 +79,9 @@ rm -rf %{buildroot}
 %{_libdir}/libGeoIPUpdate.so
 
 %changelog
+* Tue Feb 19 2008 Fedora Release Engineering <rel-eng at fedoraproject.org> - 1.4.4-2
+- Autorebuild for GCC 4.3
+
 * Mon Jan 28 2008 Michael Fleming <mfleming+rpm at enlartenment.com> 1.4.4-1
 - New upstream release.
 
-- 
cgit v0.10.2


>From 01eefafe42acaa2e0a9d347ca82a23ccf84a5992 Mon Sep 17 00:00:00 2001
From: Michael Fleming <mfleming at fedoraproject.org>
Date: Fri, 28 Nov 2008 23:55:43 +0000
Subject: - Update to 1.4.5 - Fix database URL locations in Perl helper scripts


diff --git a/.cvsignore b/.cvsignore
index 8722994..2411988 100644
--- a/.cvsignore
+++ b/.cvsignore
@@ -1 +1 @@
-GeoIP-1.4.4.tar.gz
+GeoIP-1.4.5.tar.gz
diff --git a/GeoIP.spec b/GeoIP.spec
index 2ceef7f..3c65974 100644
--- a/GeoIP.spec
+++ b/GeoIP.spec
@@ -1,12 +1,12 @@
 Name: GeoIP           
-Version: 1.4.4
-Release: 2%{?dist}
+Version: 1.4.5
+Release: 1%{?dist}
 Summary: C library for country/city/organization to IP address or hostname mapping     
 Group: Development/Libraries         
 License: LGPLv2+
 URL: http://www.maxmind.com/app/c            
 Source0: http://www.maxmind.com/download/geoip/api/c/GeoIP-%{version}.tar.gz 
-Source1: http://www.maxmind.com/download/geoip/database/LICENSE.txt
+Source1: LICENSE.txt
 Source2: fetch-geoipdata-city.pl
 Source3: fetch-geoipdata.pl
 Source4: README.Fedora
@@ -79,6 +79,10 @@ rm -rf %{buildroot}
 %{_libdir}/libGeoIPUpdate.so
 
 %changelog
+* Sat Nov 29 2008 Michael Fleming <mfleming+rpm at enlartenment.com> 1.4.5-1
+- Update to 1.4.5
+- Fix database URL locations in Perl helper scripts
+
 * Tue Feb 19 2008 Fedora Release Engineering <rel-eng at fedoraproject.org> - 1.4.4-2
 - Autorebuild for GCC 4.3
 
diff --git a/LICENSE.txt b/LICENSE.txt
index 2380c54..01c2910 100644
--- a/LICENSE.txt
+++ b/LICENSE.txt
@@ -8,7 +8,7 @@ the COPYING file.
 
 OPEN DATA LICENSE (GeoLite Country and GeoLite City databases)
 
-Copyright (c) 2005 MaxMind LLC.  All Rights Reserved.
+Copyright (c) 2008 MaxMind, Inc.  All Rights Reserved.
 
 All advertising materials and documentation mentioning features or use of
 this database must display the following acknowledgment:
@@ -27,48 +27,13 @@ http://maxmind.com/"
 3. "MaxMind" may not be used to endorse or promote products derived from this
 database without specific prior written permission.
 
-THIS DATABASE IS PROVIDED BY MAXMIND.COM ``AS IS'' AND ANY 
+THIS DATABASE IS PROVIDED BY MAXMIND, INC ``AS IS'' AND ANY 
 EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 
-DISCLAIMED. IN NO EVENT SHALL MAXMIND.COM BE LIABLE FOR ANY 
+DISCLAIMED. IN NO EVENT SHALL MAXMIND BE LIABLE FOR ANY 
 DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 
 (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
 LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
 ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 
 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
 DATABASE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-Some parts of this software distribution are derived from the APNIC, ARIN and
-RIPE databases (copyright details below). The author of this module makes no
-claims of ownership on those parts.
-
-APNIC conditions of use:
-
-The files are freely available for download and use on the condition that APNIC
-will not be held responsible for any loss or damage arising from the application
-of the information contained in these reports.
-
-APNIC endeavours to the best of its ability to ensure the accuracy of these
-reports; however, APNIC makes no guarantee in this regard.
-
-In particular, it should be noted that these reports seek to indicate the
-country where resources were first allocated or assigned. It is not intended
-that these reports be considered as an authoritative statement of the location
-in which any specific resource may currently be in use.
-
-ARIN database copyright:
-
-Copyright (c) American Registry for Internet Numbers. All rights reserved.
-
-RIPE database copyright:
-
-The information in the RIPE Database is available to the public for agreed
-Internet operation purposes, but is under copyright. The copyright statement is:
-
-"Except for agreed Internet operational purposes, no part of this publication
-may be reproduced, stored in a retrieval system, or transmitted, in any form or
-by any means, electronic, mechanical, recording, or otherwise, without prior
-permission of the RIPE NCC on behalf of the copyright holders. Any use of this
-material to target advertising or similar activities is explicitly forbidden and
-may be prosecuted. The RIPE NCC requests to be notified of any such activities
-or suspicions thereof."
diff --git a/fetch-geoipdata-city.pl b/fetch-geoipdata-city.pl
index eef67e5..cb28f74 100644
--- a/fetch-geoipdata-city.pl
+++ b/fetch-geoipdata-city.pl
@@ -10,7 +10,7 @@ use Carp;
 my $ipdb     = "GeoLiteCity.dat";
 my $datadir  = "/usr/share/GeoIP/";
 my $fullpath = $datadir . $ipdb;
-my $url = "http://www.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz";
+my $url = "http://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz";
 my $date = strftime "%Y%m%d", localtime;
 
 # Do we have an existing IP database?
diff --git a/fetch-geoipdata.pl b/fetch-geoipdata.pl
index 0c0c36c..770bbc2 100644
--- a/fetch-geoipdata.pl
+++ b/fetch-geoipdata.pl
@@ -10,7 +10,7 @@ use Carp;
 my $ipdb     = 'GeoIP.dat';
 my $datadir  = '/usr/share/GeoIP/';
 my $fullpath = $datadir . $ipdb;
-my $url      = 'http://www.maxmind.com/download/geoip/database/GeoIP.dat.gz';
+my $url      = 'http://geolite.maxmind.com/download/geoip/database/GeoLiteCountry/GeoIP.dat.gz';
 my $date     = strftime '%Y%m%d', localtime;
 
 # Do we have an existing IP database?
diff --git a/sources b/sources
index ae8e3c6..1a884e0 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-27c1320e41e67b9ddcf4118e4eaccd1d  GeoIP-1.4.4.tar.gz
+d95c34cf8ebd48e357b1812db5d75cf1  GeoIP-1.4.5.tar.gz
-- 
cgit v0.10.2


>From 3474ed463d88ab0f49d43721854c24fd8135d127 Mon Sep 17 00:00:00 2001
From: Michael Fleming <mfleming at fedoraproject.org>
Date: Sat, 29 Nov 2008 00:06:42 +0000
Subject: Add geoiplookup6


diff --git a/GeoIP.spec b/GeoIP.spec
index 3c65974..2b0be56 100644
--- a/GeoIP.spec
+++ b/GeoIP.spec
@@ -1,6 +1,6 @@
 Name: GeoIP           
 Version: 1.4.5
-Release: 1%{?dist}
+Release: 2%{?dist}
 Summary: C library for country/city/organization to IP address or hostname mapping     
 Group: Development/Libraries         
 License: LGPLv2+
@@ -62,6 +62,7 @@ rm -rf %{buildroot}
 %doc AUTHORS COPYING ChangeLog README TODO INSTALL LICENSE* fetch-*
 %{_libdir}/libGeoIP.so.*
 %{_libdir}/libGeoIPUpdate.so.*
+%{_bindir}/geoiplookup6
 %{_bindir}/geoiplookup
 %{_bindir}/geoipupdate
 %config(noreplace) %{_sysconfdir}/GeoIP.conf.default
@@ -79,7 +80,7 @@ rm -rf %{buildroot}
 %{_libdir}/libGeoIPUpdate.so
 
 %changelog
-* Sat Nov 29 2008 Michael Fleming <mfleming+rpm at enlartenment.com> 1.4.5-1
+* Sat Nov 29 2008 Michael Fleming <mfleming+rpm at enlartenment.com> 1.4.5-2
 - Update to 1.4.5
 - Fix database URL locations in Perl helper scripts
 
-- 
cgit v0.10.2


>From b5defa8db8b149d9da4813ac9bb1c12c25b756d0 Mon Sep 17 00:00:00 2001
From: Jesse Keating <jkeating at fedoraproject.org>
Date: Mon, 23 Feb 2009 21:18:49 +0000
Subject: - Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild


diff --git a/GeoIP.spec b/GeoIP.spec
index 2b0be56..028ca8c 100644
--- a/GeoIP.spec
+++ b/GeoIP.spec
@@ -1,6 +1,6 @@
 Name: GeoIP           
 Version: 1.4.5
-Release: 2%{?dist}
+Release: 3%{?dist}
 Summary: C library for country/city/organization to IP address or hostname mapping     
 Group: Development/Libraries         
 License: LGPLv2+
@@ -80,6 +80,9 @@ rm -rf %{buildroot}
 %{_libdir}/libGeoIPUpdate.so
 
 %changelog
+* Mon Feb 23 2009 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 1.4.5-3
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
+
 * Sat Nov 29 2008 Michael Fleming <mfleming+rpm at enlartenment.com> 1.4.5-2
 - Update to 1.4.5
 - Fix database URL locations in Perl helper scripts
-- 
cgit v0.10.2


>From d64525edcd530e81f88a815417918117ff6a7e05 Mon Sep 17 00:00:00 2001
From: Michael Fleming <mfleming at fedoraproject.org>
Date: Sun, 8 Mar 2009 11:26:02 +0000
Subject: - Add geoiplookup6 man page - Update to 1.4.6


diff --git a/.cvsignore b/.cvsignore
index 2411988..485a189 100644
--- a/.cvsignore
+++ b/.cvsignore
@@ -1 +1 @@
-GeoIP-1.4.5.tar.gz
+GeoIP-1.4.6.tar.gz
diff --git a/GeoIP.spec b/GeoIP.spec
index 028ca8c..66ba6e0 100644
--- a/GeoIP.spec
+++ b/GeoIP.spec
@@ -1,6 +1,6 @@
 Name: GeoIP           
-Version: 1.4.5
-Release: 3%{?dist}
+Version: 1.4.6
+Release: 1%{?dist}
 Summary: C library for country/city/organization to IP address or hostname mapping     
 Group: Development/Libraries         
 License: LGPLv2+
@@ -69,6 +69,7 @@ rm -rf %{buildroot}
 %config(noreplace) %{_sysconfdir}/GeoIP.conf
 %{_datadir}/GeoIP
 %{_mandir}/man1/geoiplookup.1*
+%{_mandir}/man1/geoiplookup6.1*
 %{_mandir}/man1/geoipupdate.1*
 
 %files devel
@@ -80,6 +81,10 @@ rm -rf %{buildroot}
 %{_libdir}/libGeoIPUpdate.so
 
 %changelog
+* Sun Mar 08 2009 Michael Fleming <mfleming+rpm at enlartenment.com> - 1.4.6-1
+- Add geoiplookup6 man page
+- Update to 1.4.6
+
 * Mon Feb 23 2009 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 1.4.5-3
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
 
diff --git a/sources b/sources
index 1a884e0..7432cbe 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-d95c34cf8ebd48e357b1812db5d75cf1  GeoIP-1.4.5.tar.gz
+cb14b1beeb40631a12676b11ca0c309a  GeoIP-1.4.6.tar.gz
-- 
cgit v0.10.2


>From 024888e15256e338bf98d3b147be663ea910f8d5 Mon Sep 17 00:00:00 2001
From: Jesse Keating <jkeating at fedoraproject.org>
Date: Fri, 24 Jul 2009 15:30:21 +0000
Subject: - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild


diff --git a/GeoIP.spec b/GeoIP.spec
index 66ba6e0..ced2452 100644
--- a/GeoIP.spec
+++ b/GeoIP.spec
@@ -1,6 +1,6 @@
 Name: GeoIP           
 Version: 1.4.6
-Release: 1%{?dist}
+Release: 2%{?dist}
 Summary: C library for country/city/organization to IP address or hostname mapping     
 Group: Development/Libraries         
 License: LGPLv2+
@@ -81,6 +81,9 @@ rm -rf %{buildroot}
 %{_libdir}/libGeoIPUpdate.so
 
 %changelog
+* Fri Jul 24 2009 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 1.4.6-2
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
+
 * Sun Mar 08 2009 Michael Fleming <mfleming+rpm at enlartenment.com> - 1.4.6-1
 - Add geoiplookup6 man page
 - Update to 1.4.6
-- 
cgit v0.10.2


>From 5967398294ce2e3c485b03b1b345d2c86528bd6d Mon Sep 17 00:00:00 2001
From: Matt Domsch <mdomsch at fedoraproject.org>
Date: Tue, 1 Sep 2009 13:04:09 +0000
Subject: add IPv6 functions from CVS HEAD, do prerelease


diff --git a/GeoIP.spec b/GeoIP.spec
index ced2452..08ac6ec 100644
--- a/GeoIP.spec
+++ b/GeoIP.spec
@@ -1,15 +1,17 @@
+%define tarballversion 1.4.6
 Name: GeoIP           
-Version: 1.4.6
-Release: 2%{?dist}
+Version: 1.4.7
+Release: 0.1.20090931cvs%{?dist}
 Summary: C library for country/city/organization to IP address or hostname mapping     
 Group: Development/Libraries         
 License: LGPLv2+
 URL: http://www.maxmind.com/app/c            
-Source0: http://www.maxmind.com/download/geoip/api/c/GeoIP-%{version}.tar.gz 
+Source0: http://www.maxmind.com/download/geoip/api/c/GeoIP-%{tarballversion}.tar.gz 
 Source1: LICENSE.txt
 Source2: fetch-geoipdata-city.pl
 Source3: fetch-geoipdata.pl
 Source4: README.Fedora
+Patch0: geoip-1.4.6-ipv6.patch
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 Obsoletes: geoip < %{version}-%{release}
 Provides: geoip = %{version}-%{release}
@@ -33,7 +35,8 @@ Obsoletes: geoip-devel < %{version}-%{release}
 Development headers and static libraries for building GeoIP-based applications
 
 %prep
-%setup -q 
+%setup -q -n %{name}-%{tarballversion}
+%patch0 -p1
 install -D -m644 %{SOURCE1} LICENSE.txt
 install -D -m644 %{SOURCE2} fetch-geoipdata-city.pl
 install -D -m644 %{SOURCE3} fetch-geoipdata.pl
@@ -81,6 +84,9 @@ rm -rf %{buildroot}
 %{_libdir}/libGeoIPUpdate.so
 
 %changelog
+* Mon Aug 31 2009 Matt Domsch <mdomsch at fedoraproject.org> - 1.4.7.0.1.20090931
+- apply CVS HEAD 20090931 which includes IPv6 functions
+
 * Fri Jul 24 2009 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 1.4.6-2
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
 
diff --git a/geoip-1.4.6-ipv6.patch b/geoip-1.4.6-ipv6.patch
new file mode 100644
index 0000000..091b575
--- /dev/null
+++ b/geoip-1.4.6-ipv6.patch
@@ -0,0 +1,811 @@
+Only in /home/mdomsch/cvs/fedora-extras/GeoIP/devel/GeoIP-1.4.6/: aclocal.m4
+Only in c/apps: CVS
+diff -urp --exclude=from=/home/mdomsch/excludes --minimal /home/mdomsch/cvs/fedora-extras/GeoIP/devel/GeoIP-1.4.6/apps/geoiplookup.c c/apps/geoiplookup.c
+--- /home/mdomsch/cvs/fedora-extras/GeoIP/devel/GeoIP-1.4.6/apps/geoiplookup.c	2009-02-24 10:03:23.000000000 -0600
++++ c/apps/geoiplookup.c	2009-05-08 12:01:21.000000000 -0500
+@@ -31,9 +31,12 @@ typedef unsigned int uint32_t; 
+ void geoiplookup(GeoIP* gi,char *hostname,int i);
+ 
+ void usage() {
+-	fprintf(stderr,"Usage: geoiplookup [-d custom_dir] [-f custom_file] [-v] <ipaddress|hostname>\n");
++	fprintf(stderr,"Usage: geoiplookup [-d custom_dir] [-f custom_file] [-v] [-i] <ipaddress|hostname>\n");
+ }
+ 
++/* extra info used in _say_range_ip */
++int info_flag = 0;
++
+ int main (int argc, char *argv[]) {
+ 	char * hostname = NULL;
+ 	char * db_info;
+@@ -51,7 +54,9 @@ int main (int argc, char *argv[]) {
+ 	while (i < argc) {
+ 		if (strcmp(argv[i],"-v") == 0) {
+ 			version_flag = 1;
+-		} else if (strcmp(argv[i],"-f") == 0) {
++		} else if (strcmp(argv[i],"-i") == 0) {
++			info_flag = 1;
++                } else if (strcmp(argv[i],"-f") == 0) {
+ 			if ((i+1) < argc){
+ 				i++;
+ 				custom_file = argv[i];
+@@ -119,12 +124,106 @@ static const char * _mk_NA( const char *
+  return p ? p : "N/A";
+ }
+ 
++static unsigned long
++__addr_to_num(const char *addr)
++{
++	unsigned int    c, octet, t;
++	unsigned long   ipnum;
++	int             i = 3;
++
++	octet = ipnum = 0;
++	while ((c = *addr++)) {
++		if (c == '.') {
++			if (octet > 255)
++				return 0;
++			ipnum <<= 8;
++			ipnum += octet;
++			i--;
++			octet = 0;
++		} else {
++			t = octet;
++			octet <<= 3;
++			octet += t;
++			octet += t;
++			c -= '0';
++			if (c > 9)
++				return 0;
++			octet += c;
++		}
++	}
++	if ((octet > 255) || (i != 0))
++		return 0;
++	ipnum <<= 8;
++	return ipnum + octet;
++}
++
++
++
++/* ptr must be a memory area with at least 16 bytes */
++static char *__num_to_addr_r (unsigned long ipnum, char * ptr) {
++	char *cur_str;
++	int octet[4];
++	int num_chars_written, i;
++
++	cur_str = ptr;
++
++	for (i = 0; i<4; i++) {
++		octet[3 - i] = ipnum % 256;
++		ipnum >>= 8;
++	}
++
++	for (i = 0; i<4; i++) {
++		num_chars_written = sprintf(cur_str, "%d", octet[i]);
++		cur_str += num_chars_written;
++
++		if (i < 3) {
++			cur_str[0] = '.';
++			cur_str++;
++		}
++	}
++
++	return ptr;
++}
++
++void _say_range_by_ip(GeoIP * gi, uint32_t ipnum ) {
++  unsigned long last_nm, mask, low, hi;
++  char ipaddr[16];
++  char tmp[16];
++  char ** range;
++
++  if ( info_flag == 0 )
++    return; /* noop unless extra information is requested */
++
++  range = GeoIP_range_by_ip( gi, __num_to_addr_r( ipnum, ipaddr ) );
++  if ( range == NULL )
++    return;
++
++  printf ( "  ipaddr: %s\n", ipaddr );
++
++  printf( "  range_by_ip:  %s - %s\n", range[0], range[1] );
++  last_nm = GeoIP_last_netmask(gi);
++  mask    = 0xffffffff << ( 32 - last_nm );
++  low     = ipnum & mask;
++  hi      = low + ( 0xffffffff & ~mask );
++  printf( "  network:      %s - %s ::%ld\n",
++    __num_to_addr_r( low, ipaddr ),
++    __num_to_addr_r( hi,  tmp ),
++    last_nm
++  );
++  printf( "  ipnum: %u\n", ipnum );
++  printf( "  range_by_num: %lu - %lu\n", __addr_to_num(range[0]), __addr_to_num(range[1]) );
++  printf( "  network num:  %lu - %lu ::%lu\n", low, hi, last_nm );
++
++  GeoIP_range_by_ip_delete(range);
++}
++
+ void
+ geoiplookup(GeoIP * gi, char *hostname, int i)
+ {
+ 	const char     *country_code;
+ 	const char     *country_name;
+ 	const char     *domain_name;
++        const char     *asnum_name;
+ 	int             netspeed;
+ 	int             country_id;
+ 	GeoIPRegion    *region;
+@@ -146,6 +245,17 @@ geoiplookup(GeoIP * gi, char *hostname, 
+ 			}
+ 			else {
+ 				printf("%s: %s\n", GeoIPDBDescription[i], domain_name);
++                                _say_range_by_ip(gi, ipnum);
++			}
++		}
++		else if (GEOIP_ASNUM_EDITION == i) {
++			asnum_name = GeoIP_name_by_ipnum(gi, ipnum);
++			if (asnum_name == NULL) {
++				printf("%s: IP Address not found\n", GeoIPDBDescription[i]);
++			}
++			else {
++				printf("%s: %s\n", GeoIPDBDescription[i], asnum_name);
++                                _say_range_by_ip(gi, ipnum);
+ 			}
+ 		}
+ 		else if (GEOIP_COUNTRY_EDITION == i) {
+@@ -157,6 +267,7 @@ geoiplookup(GeoIP * gi, char *hostname, 
+ 			}
+ 			else {
+ 				printf("%s: %s, %s\n", GeoIPDBDescription[i], country_code, country_name);
++                                _say_range_by_ip(gi, ipnum);
+ 			}
+ 		}
+ 		else if (GEOIP_REGION_EDITION_REV0 == i || GEOIP_REGION_EDITION_REV1 == i) {
+@@ -166,6 +277,7 @@ geoiplookup(GeoIP * gi, char *hostname, 
+ 			}
+ 			else {
+ 				printf("%s: %s, %s\n", GeoIPDBDescription[i], region->country_code, region->region);
++                                _say_range_by_ip(gi, ipnum);
+ 				GeoIPRegion_delete(region);
+ 			}
+ 		}
+@@ -177,6 +289,7 @@ geoiplookup(GeoIP * gi, char *hostname, 
+ 			else {
+ 				printf("%s: %s, %s, %s, %s, %f, %f\n", GeoIPDBDescription[i], gir->country_code, _mk_NA(gir->region),
+ 				       _mk_NA(gir->city), _mk_NA(gir->postal_code), gir->latitude, gir->longitude);
++                                _say_range_by_ip(gi, ipnum);
+ 			}
+ 		}
+ 		else if (GEOIP_CITY_EDITION_REV1 == i) {
+@@ -187,6 +300,7 @@ geoiplookup(GeoIP * gi, char *hostname, 
+ 			else {
+ 				printf("%s: %s, %s, %s, %s, %f, %f, %d, %d\n", GeoIPDBDescription[i], gir->country_code, _mk_NA(gir->region), _mk_NA(gir->city), _mk_NA(gir->postal_code),
+ 				       gir->latitude, gir->longitude, gir->metro_code, gir->area_code);
++                                _say_range_by_ip(gi, ipnum);
+ 			}
+ 		}
+ 		else if (GEOIP_ORG_EDITION == i || GEOIP_ISP_EDITION == i) {
+@@ -196,6 +310,7 @@ geoiplookup(GeoIP * gi, char *hostname, 
+ 			}
+ 			else {
+ 				printf("%s: %s\n", GeoIPDBDescription[i], org);
++                                _say_range_by_ip(gi, ipnum);
+ 			}
+ 		}
+ 		else if (GEOIP_NETSPEED_EDITION == i) {
+@@ -212,6 +327,7 @@ geoiplookup(GeoIP * gi, char *hostname, 
+ 			else if (netspeed == GEOIP_CORPORATE_SPEED) {
+ 				printf("%s: Corporate\n", GeoIPDBDescription[i]);
+ 			}
++                        _say_range_by_ip(gi, ipnum);
+ 		}
+ 		else {
+ 
+diff -urp --exclude=from=/home/mdomsch/excludes --minimal /home/mdomsch/cvs/fedora-extras/GeoIP/devel/GeoIP-1.4.6/apps/geoipupdate.c c/apps/geoipupdate.c
+--- /home/mdomsch/cvs/fedora-extras/GeoIP/devel/GeoIP-1.4.6/apps/geoipupdate.c	2009-02-24 14:01:41.000000000 -0600
++++ c/apps/geoipupdate.c	2009-05-29 03:55:00.000000000 -0500
+@@ -97,6 +97,7 @@ int main (int argc, char *argv[]) {
+ 			exit(0);
+ 		case 'v':
+ 			verbose = 1;
++                        break;
+ 		case 'f':
+ 			license_file = optarg;
+ 			break;
+@@ -279,5 +280,5 @@ int main (int argc, char *argv[]) {
+ 	if (client_ipaddr) {
+ 		free(client_ipaddr);
+ 	}
+-	exit(0);
++	exit(err);
+ }
+diff -urp --exclude=from=/home/mdomsch/excludes --minimal /home/mdomsch/cvs/fedora-extras/GeoIP/devel/GeoIP-1.4.6/apps/geoipupdate-pureperl.pl c/apps/geoipupdate-pureperl.pl
+--- /home/mdomsch/cvs/fedora-extras/GeoIP/devel/GeoIP-1.4.6/apps/geoipupdate-pureperl.pl	2009-02-24 10:04:39.000000000 -0600
++++ c/apps/geoipupdate-pureperl.pl	2009-03-22 09:40:33.000000000 -0500
+@@ -40,7 +40,7 @@ https
+ use strict;
+ use warnings;
+ 
+-our $VERSION = '0.03';
++our $VERSION = '0.04';
+ 
+ use 5.008;
+ use Data::Dumper;
+@@ -220,7 +220,7 @@ sub _gunzip_and_replace {
+   {
+     local $_;
+     open my $gin, '<:gzip', \$content or die $!;
+-    open my $gout, '>', $geoip_filename . '.test' or die $!;
++    open my $gout, '>:raw', $geoip_filename . '.test' or die $!;
+     print {$gout} $_ while (<$gin>);
+   }
+ 
+Only in /home/mdomsch/cvs/fedora-extras/GeoIP/devel/GeoIP-1.4.6/apps: Makefile.in
+diff -urp --exclude=from=/home/mdomsch/excludes --minimal /home/mdomsch/cvs/fedora-extras/GeoIP/devel/GeoIP-1.4.6/ChangeLog c/ChangeLog
+--- /home/mdomsch/cvs/fedora-extras/GeoIP/devel/GeoIP-1.4.6/ChangeLog	2009-02-24 19:44:38.000000000 -0600
++++ c/ChangeLog	2009-08-30 21:15:04.000000000 -0500
+@@ -1,3 +1,20 @@
++	* Add more IPv6 functions ( Boris Zentner )
++	    const char *GeoIP_country_code_by_addr_v6 (GeoIP* gi, const char *addr);
++	    const char *GeoIP_country_code_by_name_v6 (GeoIP* gi, const char *host);
++	    const char *GeoIP_country_code3_by_addr_v6 (GeoIP* gi, const char *addr);
++	    const char *GeoIP_country_code3_by_name_v6 (GeoIP* gi, const char *host);
++	    const char *GeoIP_country_name_by_addr_v6 (GeoIP* gi, const char *addr);
++	    const char *GeoIP_country_name_by_name_v6 (GeoIP* gi, const char *host);
++	* Make sure that GeoIP_*_v6 functions refuse GEOIP_PROXY_EDITION and
++	    GEOIP_NETSPEED_EDITION databases ( Boris Zentner ) 
++	* Update libGeoIP/regionName.c with FIPS codes from 20090723 ( Boris Zentner )
++	* Fix geoipupdate's -v option to not change the license filename ( Thom May )
++	* Fix geoipupdate's exit code ( Thom May )
++	* Add support for ASNUM_EDITION ( Boris Zentner )
++	* Fix -i output for larger values, sign issue ( Boris Zentner )
++	* Add -i flag for more information on netmask, range_by_ip and the current network range ( Boris Zentner )
++	* Add support for DOMAIN_EDITION database type ( Boris Zentner )
++	* Fix apps/geoipupdate-pureperl.pl output layer on W32 ( Boris Zentner )
+ 1.4.6	2009-02-25
+ 	* Fix geoipupdate's my_printf function ( Boris Zentner )
+ 	* Fix typo in apps/geoipupdate-pureperl.pl replace PerlIO::Gzip with PerlIO::gzip ( Boris Zentner ) 
+Only in c/conf: CVS
+Only in /home/mdomsch/cvs/fedora-extras/GeoIP/devel/GeoIP-1.4.6/conf: Makefile.in
+Only in /home/mdomsch/cvs/fedora-extras/GeoIP/devel/GeoIP-1.4.6/: config.guess
+Only in /home/mdomsch/cvs/fedora-extras/GeoIP/devel/GeoIP-1.4.6/: config.sub
+Only in /home/mdomsch/cvs/fedora-extras/GeoIP/devel/GeoIP-1.4.6/: configure
+diff -urp --exclude=from=/home/mdomsch/excludes --minimal /home/mdomsch/cvs/fedora-extras/GeoIP/devel/GeoIP-1.4.6/configure.in c/configure.in
+--- /home/mdomsch/cvs/fedora-extras/GeoIP/devel/GeoIP-1.4.6/configure.in	2009-02-24 10:03:23.000000000 -0600
++++ c/configure.in	2009-08-30 21:15:04.000000000 -0500
+@@ -1,6 +1,6 @@
+ dnl AM_CONFIG_HEADER(config.h)
+ 
+-AC_INIT([GeoIP], [1.4.6],[support at maxmind.com],[GeoIP])
++AC_INIT([GeoIP], [1.4.7],[support at maxmind.com],[GeoIP])
+ AC_GNU_SOURCE
+ AM_INIT_AUTOMAKE
+ AC_CONFIG_SRCDIR([libGeoIP/GeoIP.c])
+Only in c/: CVS
+Only in c/data: CVS
+Only in /home/mdomsch/cvs/fedora-extras/GeoIP/devel/GeoIP-1.4.6/data: GeoIP.dat
+Only in /home/mdomsch/cvs/fedora-extras/GeoIP/devel/GeoIP-1.4.6/data: Makefile.in
+Only in /home/mdomsch/cvs/fedora-extras/GeoIP/devel/GeoIP-1.4.6/: fetch-geoipdata-city.pl
+Only in /home/mdomsch/cvs/fedora-extras/GeoIP/devel/GeoIP-1.4.6/: fetch-geoipdata.pl
+Only in /home/mdomsch/cvs/fedora-extras/GeoIP/devel/GeoIP-1.4.6/: GeoIP.spec
+Only in /home/mdomsch/cvs/fedora-extras/GeoIP/devel/GeoIP-1.4.6/: install-sh
+Only in c/libGeoIP: CVS
+diff -urp --exclude=from=/home/mdomsch/excludes --minimal /home/mdomsch/cvs/fedora-extras/GeoIP/devel/GeoIP-1.4.6/libGeoIP/GeoIP.c c/libGeoIP/GeoIP.c
+--- /home/mdomsch/cvs/fedora-extras/GeoIP/devel/GeoIP-1.4.6/libGeoIP/GeoIP.c	2009-02-24 10:03:23.000000000 -0600
++++ c/libGeoIP/GeoIP.c	2009-08-30 21:15:04.000000000 -0500
+@@ -366,10 +366,11 @@ void _setup_segments(GeoIP * gi) {
+ 				gi->databaseSegments = malloc(sizeof(int));
+ 				gi->databaseSegments[0] = STATE_BEGIN_REV1;
+ 			} else if (gi->databaseType == GEOIP_CITY_EDITION_REV0 ||
+-								 gi->databaseType == GEOIP_CITY_EDITION_REV1 ||
+-								 gi->databaseType == GEOIP_ORG_EDITION ||
+-								 gi->databaseType == GEOIP_ISP_EDITION ||
+-								 gi->databaseType == GEOIP_ASNUM_EDITION) {
++				   gi->databaseType == GEOIP_CITY_EDITION_REV1 ||
++		                   gi->databaseType == GEOIP_ORG_EDITION ||
++		                   gi->databaseType == GEOIP_DOMAIN_EDITION ||
++		 		   gi->databaseType == GEOIP_ISP_EDITION ||
++			  	   gi->databaseType == GEOIP_ASNUM_EDITION) {
+ 				/* City/Org Editions have two segments, read offset of second segment */
+ 				gi->databaseSegments = malloc(sizeof(int));
+ 				gi->databaseSegments[0] = 0;
+@@ -377,8 +378,9 @@ void _setup_segments(GeoIP * gi) {
+ 				for (j = 0; j < SEGMENT_RECORD_LENGTH; j++) {
+ 					gi->databaseSegments[0] += (buf[j] << (j * 8));
+ 				}
+-				if (gi->databaseType == GEOIP_ORG_EDITION ||
+-						gi->databaseType == GEOIP_ISP_EDITION)
++				if (gi->databaseType == GEOIP_ORG_EDITION    ||
++		                    gi->databaseType == GEOIP_DOMAIN_EDITION ||                                  
++			 	    gi->databaseType == GEOIP_ISP_EDITION)
+ 					gi->record_length = ORG_RECORD_LENGTH;
+ 			}
+ 			break;
+@@ -831,18 +833,36 @@ void GeoIP_delete (GeoIP *gi) {
+ 	free(gi);
+ }
+ 
++const char *GeoIP_country_code_by_name_v6 (GeoIP* gi, const char *name) {
++	int country_id;
++	country_id = GeoIP_id_by_name_v6(gi, name);
++	return (country_id > 0) ? GeoIP_country_code[country_id] : NULL;
++}
++
+ const char *GeoIP_country_code_by_name (GeoIP* gi, const char *name) {
+ 	int country_id;
+ 	country_id = GeoIP_id_by_name(gi, name);
+ 	return (country_id > 0) ? GeoIP_country_code[country_id] : NULL;
+ }
+ 
++const char *GeoIP_country_code3_by_name_v6 (GeoIP* gi, const char *name) {
++	int country_id;
++	country_id = GeoIP_id_by_name_v6(gi, name);
++	return (country_id > 0) ? GeoIP_country_code3[country_id] : NULL;
++}
++
+ const char *GeoIP_country_code3_by_name (GeoIP* gi, const char *name) {
+ 	int country_id;
+ 	country_id = GeoIP_id_by_name(gi, name);
+ 	return (country_id > 0) ? GeoIP_country_code3[country_id] : NULL;
+ }
+ 
++const char *GeoIP_country_name_by_name_v6 (GeoIP* gi, const char *name) {
++	int country_id;
++	country_id = GeoIP_id_by_name_v6(gi, name);
++	return (country_id > 0) ? GeoIP_country_name[country_id] : NULL;
++}
++
+ const char *GeoIP_country_name_by_name (GeoIP* gi, const char *name) {
+ 	int country_id;
+ 	country_id = GeoIP_id_by_name(gi, name);
+@@ -945,7 +965,7 @@ int GeoIP_id_by_name_v6 (GeoIP* gi, cons
+        if (name == NULL) {
+                return 0;
+        }
+-       if (gi->databaseType != GEOIP_COUNTRY_EDITION_V6 && gi->databaseType != GEOIP_PROXY_EDITION && gi->databaseType != GEOIP_NETSPEED_EDITION) {
++       if (gi->databaseType != GEOIP_COUNTRY_EDITION_V6) {
+                printf("Invalid database type %s, expected %s\n", GeoIPDBDescription[(int)gi->databaseType], GeoIPDBDescription[GEOIP_COUNTRY_EDITION_V6]);
+                return 0;
+        }
+@@ -956,18 +976,36 @@ int GeoIP_id_by_name_v6 (GeoIP* gi, cons
+        return ret;
+ }
+ 
++const char *GeoIP_country_code_by_addr_v6 (GeoIP* gi, const char *addr) {
++	int country_id;
++	country_id = GeoIP_id_by_addr_v6(gi, addr);
++	return (country_id > 0) ? GeoIP_country_code[country_id] : NULL;
++}
++
+ const char *GeoIP_country_code_by_addr (GeoIP* gi, const char *addr) {
+ 	int country_id;
+ 	country_id = GeoIP_id_by_addr(gi, addr);
+ 	return (country_id > 0) ? GeoIP_country_code[country_id] : NULL;
+ }
+ 
++const char *GeoIP_country_code3_by_addr_v6 (GeoIP* gi, const char *addr) {
++	int country_id;
++	country_id = GeoIP_id_by_addr_v6(gi, addr);
++	return (country_id > 0) ? GeoIP_country_code3[country_id] : NULL;
++}
++
+ const char *GeoIP_country_code3_by_addr (GeoIP* gi, const char *addr) {
+ 	int country_id;
+ 	country_id = GeoIP_id_by_addr(gi, addr);
+ 	return (country_id > 0) ? GeoIP_country_code3[country_id] : NULL;
+ }
+ 
++const char *GeoIP_country_name_by_addr_v6 (GeoIP* gi, const char *addr) {
++	int country_id;
++	country_id = GeoIP_id_by_addr_v6(gi, addr);
++	return (country_id > 0) ? GeoIP_country_name[country_id] : NULL;
++}
++
+ const char *GeoIP_country_name_by_addr (GeoIP* gi, const char *addr) {
+ 	int country_id;
+ 	country_id = GeoIP_id_by_addr(gi, addr);
+@@ -1010,10 +1048,18 @@ const char *GeoIP_country_code3_by_ipnum
+        return (country_id > 0) ? GeoIP_country_code3[country_id] : NULL;
+ }
+ 
++int GeoIP_country_id_by_addr_v6 (GeoIP* gi, const char *addr) {
++	return GeoIP_id_by_addr_v6(gi, addr);
++}
++
+ int GeoIP_country_id_by_addr (GeoIP* gi, const char *addr) {
+ 	return GeoIP_id_by_addr(gi, addr);
+ }
+ 
++int GeoIP_country_id_by_name_v6 (GeoIP* gi, const char *host) {
++	return GeoIP_id_by_name_v6(gi, host);
++}
++
+ int GeoIP_country_id_by_name (GeoIP* gi, const char *host) {
+ 	return GeoIP_id_by_name(gi, host);
+ }
+@@ -1024,9 +1070,7 @@ int GeoIP_id_by_addr_v6 (GeoIP* gi, cons
+        if (addr == NULL) {
+                return 0;
+        }
+-       if (gi->databaseType != GEOIP_COUNTRY_EDITION_V6 &&
+-                       gi->databaseType != GEOIP_PROXY_EDITION &&
+-                       gi->databaseType != GEOIP_NETSPEED_EDITION) {
++       if (gi->databaseType != GEOIP_COUNTRY_EDITION_V6) {
+                printf("Invalid database type %s, expected %s\n",
+                                         GeoIPDBDescription[(int)gi->databaseType],
+                                         GeoIPDBDescription[GEOIP_COUNTRY_EDITION_V6]);
+@@ -1062,9 +1106,7 @@ int GeoIP_id_by_ipnum_v6 (GeoIP* gi, geo
+                return 0;
+        }
+ */     
+-       if (gi->databaseType != GEOIP_COUNTRY_EDITION_V6 && 
+-                       gi->databaseType != GEOIP_PROXY_EDITION &&
+-                       gi->databaseType != GEOIP_NETSPEED_EDITION) {
++       if (gi->databaseType != GEOIP_COUNTRY_EDITION_V6) {
+                printf("Invalid database type %s, expected %s\n",
+                                         GeoIPDBDescription[(int)gi->databaseType],
+                                         GeoIPDBDescription[GEOIP_COUNTRY_EDITION_V6]);
+@@ -1346,6 +1388,7 @@ char *_get_name (GeoIP* gi, unsigned lon
+ 
+ 	if (gi->databaseType != GEOIP_ORG_EDITION &&
+ 			gi->databaseType != GEOIP_ISP_EDITION &&
++			gi->databaseType != GEOIP_DOMAIN_EDITION &&
+ 			gi->databaseType != GEOIP_ASNUM_EDITION) {
+ 		printf("Invalid database type %s, expected %s\n", GeoIPDBDescription[(int)gi->databaseType], GeoIPDBDescription[GEOIP_ORG_EDITION]);
+ 		return NULL;
+@@ -1382,6 +1425,7 @@ char *_get_name_v6 (GeoIP* gi, geoipv6_t
+ 
+   if (gi->databaseType != GEOIP_ORG_EDITION &&
+       gi->databaseType != GEOIP_ISP_EDITION &&
++      gi->databaseType != GEOIP_DOMAIN_EDITION &&
+       gi->databaseType != GEOIP_ASNUM_EDITION) {
+     printf("Invalid database type %s, expected %s\n", GeoIPDBDescription[(int)gi->databaseType], GeoIPDBDescription[GEOIP_ORG_EDITION]);
+     return NULL;
+diff -urp --exclude=from=/home/mdomsch/excludes --minimal /home/mdomsch/cvs/fedora-extras/GeoIP/devel/GeoIP-1.4.6/libGeoIP/GeoIP.h c/libGeoIP/GeoIP.h
+--- /home/mdomsch/cvs/fedora-extras/GeoIP/devel/GeoIP-1.4.6/libGeoIP/GeoIP.h	2009-02-24 10:03:23.000000000 -0600
++++ c/libGeoIP/GeoIP.h	2009-08-30 21:15:04.000000000 -0500
+@@ -162,6 +162,13 @@ GEOIP_API const char *GeoIP_country_name
+ GEOIP_API const char *GeoIP_country_code_by_ipnum_v6 (GeoIP* gi, geoipv6_t ipnum);
+ GEOIP_API const char *GeoIP_country_code3_by_ipnum_v6 (GeoIP* gi, geoipv6_t ipnum);
+ 
++GEOIP_API const char *GeoIP_country_code_by_addr_v6 (GeoIP* gi, const char *addr);
++GEOIP_API const char *GeoIP_country_code_by_name_v6 (GeoIP* gi, const char *host);
++GEOIP_API const char *GeoIP_country_code3_by_addr_v6 (GeoIP* gi, const char *addr);
++GEOIP_API const char *GeoIP_country_code3_by_name_v6 (GeoIP* gi, const char *host);
++GEOIP_API const char *GeoIP_country_name_by_addr_v6 (GeoIP* gi, const char *addr);
++GEOIP_API const char *GeoIP_country_name_by_name_v6 (GeoIP* gi, const char *host);
++
+ /* Deprecated - for backwards compatibility only */
+ GEOIP_API int GeoIP_country_id_by_addr (GeoIP* gi, const char *addr);
+ GEOIP_API int GeoIP_country_id_by_name (GeoIP* gi, const char *host);
+Only in /home/mdomsch/cvs/fedora-extras/GeoIP/devel/GeoIP-1.4.6/libGeoIP: Makefile.in
+diff -urp --exclude=from=/home/mdomsch/excludes --minimal /home/mdomsch/cvs/fedora-extras/GeoIP/devel/GeoIP-1.4.6/libGeoIP/regionName.c c/libGeoIP/regionName.c
+--- /home/mdomsch/cvs/fedora-extras/GeoIP/devel/GeoIP-1.4.6/libGeoIP/regionName.c	2009-02-24 10:03:23.000000000 -0600
++++ c/libGeoIP/regionName.c	2009-07-23 15:48:20.000000000 -0500
+@@ -2249,6 +2249,12 @@ const char * GeoIP_region_name_by_code(c
+   }
+   if (strcmp(country_code,"CI") == 0) {
+     switch (region_code2) {
++      case 5:
++      name = "Atacama";
++      break;
++      case 6:
++      name = "Biobio";
++      break;
+       case 51:
+       name = "Sassandra";
+       break;
+@@ -6102,6 +6108,9 @@ const char * GeoIP_region_name_by_code(c
+       case 29:
+       name = "Snafellsnes- og Hnappadalssysla";
+       break;
++      case 30:
++      name = "Strandasysla";
++      break;
+       case 31:
+       name = "Sudur-Mulasysla";
+       break;
+@@ -6875,6 +6884,9 @@ const char * GeoIP_region_name_by_code(c
+       case 1:
+       name = "Beqaa";
+       break;
++      case 2:
++      name = "Al Janub";
++      break;
+       case 3:
+       name = "Liban-Nord";
+       break;
+@@ -7092,6 +7104,9 @@ const char * GeoIP_region_name_by_code(c
+       case 4:
+       name = "Grand Cape Mount";
+       break;
++      case 5:
++      name = "Lofa";
++      break;
+       case 6:
+       name = "Maryland";
+       break;
+@@ -7107,15 +7122,33 @@ const char * GeoIP_region_name_by_code(c
+       case 11:
+       name = "Grand Bassa";
+       break;
++      case 12:
++      name = "Grand Cape Mount";
++      break;
++      case 13:
++      name = "Maryland";
++      break;
+       case 14:
+       name = "Montserrado";
+       break;
++      case 17:
++      name = "Margibi";
++      break;
++      case 18:
++      name = "River Cess";
++      break;
+       case 19:
+       name = "Grand Gedeh";
+       break;
+       case 20:
+       name = "Lofa";
+       break;
++      case 21:
++      name = "Gbarpolu";
++      break;
++      case 22:
++      name = "River Gee";
++      break;
+     }
+   }
+   if (strcmp(country_code,"LS") == 0) {
+@@ -8848,12 +8881,18 @@ const char * GeoIP_region_name_by_code(c
+       case 11:
+       name = "Federal Capital Territory";
+       break;
++      case 12:
++      name = "Gongola";
++      break;
+       case 16:
+       name = "Ogun";
+       break;
+       case 17:
+       name = "Ondo";
+       break;
++      case 18:
++      name = "Oyo";
++      break;
+       case 21:
+       name = "Akwa Ibom";
+       break;
+@@ -9271,6 +9310,9 @@ const char * GeoIP_region_name_by_code(c
+       case 1092:
+       name = "West Coast";
+       break;
++      case 85:
++      name = "Waikato";
++      break;
+     }
+   }
+   if (strcmp(country_code,"OM") == 0) {
+@@ -9612,6 +9654,9 @@ const char * GeoIP_region_name_by_code(c
+       case 44:
+       name = "Mountain";
+       break;
++      case 45:
++      name = "Negros Occidental";
++      break;
+       case 46:
+       name = "Negros Oriental";
+       break;
+@@ -10711,6 +10756,9 @@ const char * GeoIP_region_name_by_code(c
+       case 6:
+       name = "Gitarama";
+       break;
++      case 7:
++      name = "Kibungo";
++      break;
+       case 9:
+       name = "Kigali";
+       break;
+@@ -11532,6 +11580,9 @@ const char * GeoIP_region_name_by_code(c
+       case 7:
+       name = "Thies";
+       break;
++      case 8:
++      name = "Louga";
++      break;
+       case 9:
+       name = "Fatick";
+       break;
+@@ -12075,6 +12126,12 @@ const char * GeoIP_region_name_by_code(c
+       case 78:
+       name = "Mukdahan";
+       break;
++      case 79:
++      name = "Nong Bua Lamphu";
++      break;
++      case 80:
++      name = "Sa Kaeo";
++      break;
+     }
+   }
+   if (strcmp(country_code,"TJ") == 0) {
+@@ -12112,22 +12169,19 @@ const char * GeoIP_region_name_by_code(c
+   if (strcmp(country_code,"TN") == 0) {
+     switch (region_code2) {
+       case 2:
+-      name = "Al Qasrayn";
++      name = "Kasserine";
+       break;
+       case 3:
+-      name = "Al Qayrawan";
++      name = "Kairouan";
+       break;
+       case 6:
+-      name = "Jundubah";
+-      break;
+-      case 10:
+-      name = "Qafsah";
++      name = "Jendouba";
+       break;
+       case 14:
+-      name = "Kef";
++      name = "El Kef";
+       break;
+       case 15:
+-      name = "Al Mahdiyah";
++      name = "Al Mahdia";
+       break;
+       case 16:
+       name = "Al Munastir";
+@@ -12136,58 +12190,52 @@ const char * GeoIP_region_name_by_code(c
+       name = "Bajah";
+       break;
+       case 18:
+-      name = "Banzart";
++      name = "Bizerte";
+       break;
+       case 19:
+-      name = "Nabul";
++      name = "Nabeul";
+       break;
+       case 22:
+-      name = "Silyanah";
++      name = "Siliana";
+       break;
+       case 23:
+-      name = "Susah";
++      name = "Sousse";
+       break;
+       case 26:
+-      name = "Chaiyaphum Province";
++      name = "Ariana";
+       break;
+       case 27:
+-      name = "Bin";
++      name = "Ben Arous";
+       break;
+       case 28:
+       name = "Madanin";
+       break;
+       case 29:
+-      name = "Qabis";
++      name = "Gabes";
+       break;
+       case 30:
+-      name = "Qafsah";
++      name = "Gafsa";
+       break;
+       case 31:
+-      name = "Qibili";
++      name = "Kebili";
+       break;
+       case 32:
+-      name = "Safaqis";
++      name = "Sfax";
+       break;
+       case 33:
+-      name = "Sidi Bu Zayd";
++      name = "Sidi Bou Zid";
+       break;
+       case 34:
+-      name = "Tatawin";
++      name = "Tataouine";
+       break;
+       case 35:
+-      name = "Tawzar";
++      name = "Tozeur";
+       break;
+       case 36:
+       name = "Tunis";
+       break;
+       case 37:
+-      name = "Zaghwan";
+-      break;
+-      case 38:
+-      name = "Ariana";
+-      break;
+-      case 39:
+-      name = "Manouba";
++      name = "Zaghouan";
+       break;
+     }
+   }
+@@ -13035,6 +13083,9 @@ const char * GeoIP_region_name_by_code(c
+       case 5:
+       name = "Cao Bang";
+       break;
++      case 6:
++      name = "Cuu Long";
++      break;
+       case 7:
+       name = "Dac Lac";
+       break;
+@@ -13053,6 +13104,9 @@ const char * GeoIP_region_name_by_code(c
+       case 14:
+       name = "Ha Nam Ninh";
+       break;
++      case 15:
++      name = "Ha Noi";
++      break;
+       case 16:
+       name = "Ha Son Binh";
+       break;
+@@ -13377,6 +13431,9 @@ const char * GeoIP_region_name_by_code(c
+       case 5:
+       name = "Shabwah";
+       break;
++      case 6:
++      name = "Al Ghaydah";
++      break;
+       case 8:
+       name = "Al Hudaydah";
+       break;
+Only in c/: LICENSE
+Only in /home/mdomsch/cvs/fedora-extras/GeoIP/devel/GeoIP-1.4.6/: LICENSE.txt
+Only in /home/mdomsch/cvs/fedora-extras/GeoIP/devel/GeoIP-1.4.6/: Makefile.in
+Only in c/man: CVS
+Only in c/man: geoiplookup.1
+Only in c/man: geoiplookup6.1
+Only in c/man: geoipupdate.1
+Only in /home/mdomsch/cvs/fedora-extras/GeoIP/devel/GeoIP-1.4.6/man: Makefile.in
+Only in /home/mdomsch/cvs/fedora-extras/GeoIP/devel/GeoIP-1.4.6/: missing
+diff -urp --exclude=from=/home/mdomsch/excludes --minimal /home/mdomsch/cvs/fedora-extras/GeoIP/devel/GeoIP-1.4.6/README c/README
+--- /home/mdomsch/cvs/fedora-extras/GeoIP/devel/GeoIP-1.4.6/README	2009-02-24 10:03:24.000000000 -0600
++++ c/README	2009-06-10 07:35:19.000000000 -0500
+@@ -182,4 +182,27 @@ from XORG X-Server). It happens at least
+ If GEOIP_MMAP_CACHE doesn't work on a 64bit machine, try adding
+ the flag "MAP_32BIT" to the mmap call.
+ 
++If you get a "passing argument 3 of 'gethostbyname_r' from incompatible pointer type"
++error on AIX, download and/or untar a fresh copy of GeoIP.  ( To avoid cached
++results from a previous ./configure run )
++
++cd ./GeoIP-1.4.6
++then edit the file ./configure
++
++and delete these two lines:
++
++#define HAVE_GETHOSTBYNAME_R 1
++
++#define GETHOSTBYNAME_R_RETURNS_INT 1
++
++then save the configure script
++
++and build it as usual
++
++./configure
++make
++sudo make install
++
++
++
+ To submit a patch, please contact support at maxmind.com 
+Only in /home/mdomsch/cvs/fedora-extras/GeoIP/devel/GeoIP-1.4.6/: README.fedora
+Only in c/: regioncode
+Only in c/test: CVS
+Only in c/test: fail_test.txt
+Only in /home/mdomsch/cvs/fedora-extras/GeoIP/devel/GeoIP-1.4.6/test: Makefile.in
+Only in c/test: proxy_test.txt
+Only in c/: timezone
-- 
cgit v0.10.2


>From dec56cac8dc3c09bc1d5fdcca6c1cf28a1536d78 Mon Sep 17 00:00:00 2001
From: Bill Nottingham <notting at fedoraproject.org>
Date: Wed, 25 Nov 2009 23:02:31 +0000
Subject: Fix typo that causes a failure to update the common directory.
 (releng     #2781)


diff --git a/Makefile b/Makefile
index bea7b5b..9283980 100644
--- a/Makefile
+++ b/Makefile
@@ -4,7 +4,7 @@ NAME := GeoIP
 SPECFILE = $(firstword $(wildcard *.spec))
 
 define find-makefile-common
-for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done
+for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$d/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done
 endef
 
 MAKEFILE_COMMON := $(shell $(find-makefile-common))
-- 
cgit v0.10.2


>From cbbba51e6d8934e9d98d73e0ef2de94487e490e5 Mon Sep 17 00:00:00 2001
From: Bill Nottingham <notting at fedoraproject.org>
Date: Thu, 26 Nov 2009 00:17:44 +0000
Subject: Fix typo that causes a failure to update the common directory.
 (releng     #2781)


diff --git a/Makefile b/Makefile
index bea7b5b..9283980 100644
--- a/Makefile
+++ b/Makefile
@@ -4,7 +4,7 @@ NAME := GeoIP
 SPECFILE = $(firstword $(wildcard *.spec))
 
 define find-makefile-common
-for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done
+for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$d/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done
 endef
 
 MAKEFILE_COMMON := $(shell $(find-makefile-common))
-- 
cgit v0.10.2


>From 38543aa855ce73a312765426d689672045722680 Mon Sep 17 00:00:00 2001
From: Dennis Gilmore <ausil at fedoraproject.org>
Date: Sat, 8 May 2010 01:41:23 +0000
Subject: Initialize branch EL-6 for GeoIP


diff --git a/branch b/branch
new file mode 100644
index 0000000..46381b9
--- /dev/null
+++ b/branch
@@ -0,0 +1 @@
+EL-6
-- 
cgit v0.10.2


>From e3bc00d8da728bed35b329d0b003c9c3893e72e8 Mon Sep 17 00:00:00 2001
From: Fedora Release Engineering <rel-eng at lists.fedoraproject.org>
Date: Wed, 28 Jul 2010 08:54:52 +0000
Subject: dist-git conversion


diff --git a/.cvsignore b/.cvsignore
deleted file mode 100644
index 485a189..0000000
--- a/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-GeoIP-1.4.6.tar.gz
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..485a189
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1 @@
+GeoIP-1.4.6.tar.gz
diff --git a/Makefile b/Makefile
deleted file mode 100644
index 9283980..0000000
--- a/Makefile
+++ /dev/null
@@ -1,21 +0,0 @@
-# Makefile for source rpm: GeoIP
-# $Id$
-NAME := GeoIP
-SPECFILE = $(firstword $(wildcard *.spec))
-
-define find-makefile-common
-for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$d/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done
-endef
-
-MAKEFILE_COMMON := $(shell $(find-makefile-common))
-
-ifeq ($(MAKEFILE_COMMON),)
-# attept a checkout
-define checkout-makefile-common
-test -f CVS/Root && { cvs -Q -d $$(cat CVS/Root) checkout common && echo "common/Makefile.common" ; } || { echo "ERROR: I can't figure out how to checkout the 'common' module." ; exit -1 ; } >&2
-endef
-
-MAKEFILE_COMMON := $(shell $(checkout-makefile-common))
-endif
-
-include $(MAKEFILE_COMMON)
-- 
cgit v0.10.2


>From c1ef6cbfaf7e0e137cd72263c72a0fd892aba05d Mon Sep 17 00:00:00 2001
From: Fedora Release Engineering <rel-eng at lists.fedoraproject.org>
Date: Wed, 28 Jul 2010 08:54:57 +0000
Subject: dist-git conversion


diff --git a/.cvsignore b/.cvsignore
deleted file mode 100644
index 485a189..0000000
--- a/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-GeoIP-1.4.6.tar.gz
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..485a189
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1 @@
+GeoIP-1.4.6.tar.gz
diff --git a/Makefile b/Makefile
deleted file mode 100644
index 9283980..0000000
--- a/Makefile
+++ /dev/null
@@ -1,21 +0,0 @@
-# Makefile for source rpm: GeoIP
-# $Id$
-NAME := GeoIP
-SPECFILE = $(firstword $(wildcard *.spec))
-
-define find-makefile-common
-for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$d/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done
-endef
-
-MAKEFILE_COMMON := $(shell $(find-makefile-common))
-
-ifeq ($(MAKEFILE_COMMON),)
-# attept a checkout
-define checkout-makefile-common
-test -f CVS/Root && { cvs -Q -d $$(cat CVS/Root) checkout common && echo "common/Makefile.common" ; } || { echo "ERROR: I can't figure out how to checkout the 'common' module." ; exit -1 ; } >&2
-endef
-
-MAKEFILE_COMMON := $(shell $(checkout-makefile-common))
-endif
-
-include $(MAKEFILE_COMMON)
diff --git a/branch b/branch
deleted file mode 100644
index 46381b9..0000000
--- a/branch
+++ /dev/null
@@ -1 +0,0 @@
-EL-6
-- 
cgit v0.10.2


>From 34063aac3764b21e80833ef24da266e45b9b0a6d Mon Sep 17 00:00:00 2001
From: Dennis Gilmore <dennis at ausil.us>
Date: Wed, 9 Feb 2011 12:04:52 -0600
Subject: - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild


diff --git a/GeoIP.spec b/GeoIP.spec
index 08ac6ec..84e9290 100644
--- a/GeoIP.spec
+++ b/GeoIP.spec
@@ -1,7 +1,7 @@
 %define tarballversion 1.4.6
 Name: GeoIP           
 Version: 1.4.7
-Release: 0.1.20090931cvs%{?dist}
+Release: 0.2.20090931cvs%{?dist}
 Summary: C library for country/city/organization to IP address or hostname mapping     
 Group: Development/Libraries         
 License: LGPLv2+
@@ -84,6 +84,9 @@ rm -rf %{buildroot}
 %{_libdir}/libGeoIPUpdate.so
 
 %changelog
+* Wed Feb 09 2011 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 1.4.7-0.2.20090931cvs
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
+
 * Mon Aug 31 2009 Matt Domsch <mdomsch at fedoraproject.org> - 1.4.7.0.1.20090931
 - apply CVS HEAD 20090931 which includes IPv6 functions
 
-- 
cgit v0.10.2


>From 2951879e0c43c988bb9b4be38fe418d5483495e6 Mon Sep 17 00:00:00 2001
From: Michael Fleming <mfleming at thatfleminggent.com>
Date: Tue, 6 Sep 2011 13:20:04 +1000
Subject: Update to 1.4.8


diff --git a/GeoIP.spec b/GeoIP.spec
index 84e9290..edc9a17 100644
--- a/GeoIP.spec
+++ b/GeoIP.spec
@@ -1,17 +1,16 @@
-%define tarballversion 1.4.6
 Name: GeoIP           
-Version: 1.4.7
-Release: 0.2.20090931cvs%{?dist}
+Version: 1.4.8
+Release: 1%{?dist}
 Summary: C library for country/city/organization to IP address or hostname mapping     
 Group: Development/Libraries         
 License: LGPLv2+
 URL: http://www.maxmind.com/app/c            
-Source0: http://www.maxmind.com/download/geoip/api/c/GeoIP-%{tarballversion}.tar.gz 
+Source0: http://www.maxmind.com/download/geoip/api/c/GeoIP-%{version}.tar.gz 
 Source1: LICENSE.txt
 Source2: fetch-geoipdata-city.pl
 Source3: fetch-geoipdata.pl
 Source4: README.Fedora
-Patch0: geoip-1.4.6-ipv6.patch
+#Patch0: geoip-1.4.6-ipv6.patch
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 Obsoletes: geoip < %{version}-%{release}
 Provides: geoip = %{version}-%{release}
@@ -84,6 +83,10 @@ rm -rf %{buildroot}
 %{_libdir}/libGeoIPUpdate.so
 
 %changelog
+* Tue Sep 5 2011 Michael Fleming <mfleming+rpm at thatfleminggent.com> - 1.4.8
+- Remove -ipv6 path
+- Bump to 1.4.8 release
+
 * Wed Feb 09 2011 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 1.4.7-0.2.20090931cvs
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
 
-- 
cgit v0.10.2


>From 28c3a6d267a97de5a8a598e0cc0a55af1686be19 Mon Sep 17 00:00:00 2001
From: Michael Fleming <mfleming at thatfleminggent.com>
Date: Tue, 6 Sep 2011 13:21:52 +1000
Subject: Update sources for 1.4.8


diff --git a/.gitignore b/.gitignore
index 485a189..d85cd3f 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,2 @@
 GeoIP-1.4.6.tar.gz
+/GeoIP-1.4.8.tar.gz
diff --git a/sources b/sources
index 7432cbe..97304e4 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-cb14b1beeb40631a12676b11ca0c309a  GeoIP-1.4.6.tar.gz
+05b7300435336231b556df5ab36f326d  GeoIP-1.4.8.tar.gz
-- 
cgit v0.10.2


>From 5ed54e3e09ff5ad73d3ce5c495f008078b92b092 Mon Sep 17 00:00:00 2001
From: Michael Fleming <mfleming at thatfleminggent.com>
Date: Tue, 6 Sep 2011 13:25:35 +1000
Subject: Fix dud patch invocation :-P


diff --git a/GeoIP.spec b/GeoIP.spec
index edc9a17..9c843b3 100644
--- a/GeoIP.spec
+++ b/GeoIP.spec
@@ -35,7 +35,7 @@ Development headers and static libraries for building GeoIP-based applications
 
 %prep
 %setup -q -n %{name}-%{tarballversion}
-%patch0 -p1
+#%patch0 -p1
 install -D -m644 %{SOURCE1} LICENSE.txt
 install -D -m644 %{SOURCE2} fetch-geoipdata-city.pl
 install -D -m644 %{SOURCE3} fetch-geoipdata.pl
-- 
cgit v0.10.2


>From 5c33eb4a14f1a62d1b08361db5e4c7249ee73088 Mon Sep 17 00:00:00 2001
From: Michael Fleming <mfleming at thatfleminggent.com>
Date: Tue, 6 Sep 2011 13:54:27 +1000
Subject: Fix spec :-)


diff --git a/GeoIP.spec b/GeoIP.spec
index 9c843b3..d512452 100644
--- a/GeoIP.spec
+++ b/GeoIP.spec
@@ -1,6 +1,6 @@
 Name: GeoIP           
 Version: 1.4.8
-Release: 1%{?dist}
+Release: 1.1%{?dist}
 Summary: C library for country/city/organization to IP address or hostname mapping     
 Group: Development/Libraries         
 License: LGPLv2+
@@ -10,7 +10,6 @@ Source1: LICENSE.txt
 Source2: fetch-geoipdata-city.pl
 Source3: fetch-geoipdata.pl
 Source4: README.Fedora
-#Patch0: geoip-1.4.6-ipv6.patch
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 Obsoletes: geoip < %{version}-%{release}
 Provides: geoip = %{version}-%{release}
@@ -34,8 +33,7 @@ Obsoletes: geoip-devel < %{version}-%{release}
 Development headers and static libraries for building GeoIP-based applications
 
 %prep
-%setup -q -n %{name}-%{tarballversion}
-#%patch0 -p1
+%setup -q
 install -D -m644 %{SOURCE1} LICENSE.txt
 install -D -m644 %{SOURCE2} fetch-geoipdata-city.pl
 install -D -m644 %{SOURCE3} fetch-geoipdata.pl
@@ -83,7 +81,7 @@ rm -rf %{buildroot}
 %{_libdir}/libGeoIPUpdate.so
 
 %changelog
-* Tue Sep 5 2011 Michael Fleming <mfleming+rpm at thatfleminggent.com> - 1.4.8
+* Tue Sep 6 2011 Michael Fleming <mfleming+rpm at thatfleminggent.com> - 1.4.8-1.1
 - Remove -ipv6 path
 - Bump to 1.4.8 release
 
-- 
cgit v0.10.2


>From cc42570ee1d2b34f7094d6c9d6b2ea91dc644e0e Mon Sep 17 00:00:00 2001
From: Michael Fleming <mfleming at thatfleminggent.com>
Date: Tue, 6 Sep 2011 15:00:22 +1000
Subject: Update to 1.4.8


diff --git a/.gitignore b/.gitignore
index 485a189..d85cd3f 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,2 @@
 GeoIP-1.4.6.tar.gz
+/GeoIP-1.4.8.tar.gz
diff --git a/GeoIP.spec b/GeoIP.spec
index 08ac6ec..5ffe186 100644
--- a/GeoIP.spec
+++ b/GeoIP.spec
@@ -1,17 +1,15 @@
-%define tarballversion 1.4.6
 Name: GeoIP           
-Version: 1.4.7
-Release: 0.1.20090931cvs%{?dist}
+Version: 1.4.8
+Release: 1%{?dist}
 Summary: C library for country/city/organization to IP address or hostname mapping     
 Group: Development/Libraries         
 License: LGPLv2+
 URL: http://www.maxmind.com/app/c            
-Source0: http://www.maxmind.com/download/geoip/api/c/GeoIP-%{tarballversion}.tar.gz 
+Source0: http://www.maxmind.com/download/geoip/api/c/GeoIP-%{version}.tar.gz 
 Source1: LICENSE.txt
 Source2: fetch-geoipdata-city.pl
 Source3: fetch-geoipdata.pl
 Source4: README.Fedora
-Patch0: geoip-1.4.6-ipv6.patch
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 Obsoletes: geoip < %{version}-%{release}
 Provides: geoip = %{version}-%{release}
@@ -35,8 +33,7 @@ Obsoletes: geoip-devel < %{version}-%{release}
 Development headers and static libraries for building GeoIP-based applications
 
 %prep
-%setup -q -n %{name}-%{tarballversion}
-%patch0 -p1
+%setup -q
 install -D -m644 %{SOURCE1} LICENSE.txt
 install -D -m644 %{SOURCE2} fetch-geoipdata-city.pl
 install -D -m644 %{SOURCE3} fetch-geoipdata.pl
@@ -84,6 +81,9 @@ rm -rf %{buildroot}
 %{_libdir}/libGeoIPUpdate.so
 
 %changelog
+* Tue Sep 06 2011 Michael Fleming <mfleming+rpm at thatfleminggent.com> - 1.4.8-1
+- Update to 1.4.8
+
 * Mon Aug 31 2009 Matt Domsch <mdomsch at fedoraproject.org> - 1.4.7.0.1.20090931
 - apply CVS HEAD 20090931 which includes IPv6 functions
 
diff --git a/sources b/sources
index 7432cbe..97304e4 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-cb14b1beeb40631a12676b11ca0c309a  GeoIP-1.4.6.tar.gz
+05b7300435336231b556df5ab36f326d  GeoIP-1.4.8.tar.gz
-- 
cgit v0.10.2


>From b3d19503f9d802f16e6cae80c273e50ee9d90dfa Mon Sep 17 00:00:00 2001
From: Dennis Gilmore <dennis at ausil.us>
Date: Thu, 12 Jan 2012 14:20:05 -0600
Subject: - Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild


diff --git a/GeoIP.spec b/GeoIP.spec
index d512452..b3e2467 100644
--- a/GeoIP.spec
+++ b/GeoIP.spec
@@ -1,6 +1,6 @@
 Name: GeoIP           
 Version: 1.4.8
-Release: 1.1%{?dist}
+Release: 2.1%{?dist}
 Summary: C library for country/city/organization to IP address or hostname mapping     
 Group: Development/Libraries         
 License: LGPLv2+
@@ -81,6 +81,9 @@ rm -rf %{buildroot}
 %{_libdir}/libGeoIPUpdate.so
 
 %changelog
+* Thu Jan 12 2012 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 1.4.8-2.1
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
+
 * Tue Sep 6 2011 Michael Fleming <mfleming+rpm at thatfleminggent.com> - 1.4.8-1.1
 - Remove -ipv6 path
 - Bump to 1.4.8 release
-- 
cgit v0.10.2


>From f0cbb0a2afd4ea30f3eb0c351da10b35e16f4111 Mon Sep 17 00:00:00 2001
From: Dennis Gilmore <dennis at ausil.us>
Date: Wed, 18 Jul 2012 08:23:34 -0500
Subject: - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild


diff --git a/GeoIP.spec b/GeoIP.spec
index b3e2467..ef24f5f 100644
--- a/GeoIP.spec
+++ b/GeoIP.spec
@@ -1,6 +1,6 @@
 Name: GeoIP           
 Version: 1.4.8
-Release: 2.1%{?dist}
+Release: 3.1%{?dist}
 Summary: C library for country/city/organization to IP address or hostname mapping     
 Group: Development/Libraries         
 License: LGPLv2+
@@ -81,6 +81,9 @@ rm -rf %{buildroot}
 %{_libdir}/libGeoIPUpdate.so
 
 %changelog
+* Wed Jul 18 2012 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 1.4.8-3.1
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
+
 * Thu Jan 12 2012 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 1.4.8-2.1
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
 
-- 
cgit v0.10.2


>From 3998295cf4639f19d20b3e905e5b76c8ee18f170 Mon Sep 17 00:00:00 2001
From: Paul Howarth <paul at city-fan.org>
Date: Mon, 22 Oct 2012 21:10:44 +0100
Subject: General clean-up

- libGeoIPUpdate and geoipupdate (which is linked against it) are GPL-licensed
  rather than LGPL-licensed (#840896)
- Don't package generic INSTALL file (#661625)
- Kill bogus rpaths on x86_64
- Hardcode library sonames in %files list to avoid nasty surprises in the
  future
- Drop %defattr, redundant since rpm 4.4
- Recode docs as UTF-8
- Don't use macros for commands
- Use tabs

diff --git a/GeoIP-1.4.8-UTF8.patch b/GeoIP-1.4.8-UTF8.patch
new file mode 100644
index 0000000..93e67a7
--- /dev/null
+++ b/GeoIP-1.4.8-UTF8.patch
@@ -0,0 +1,93 @@
+diff -U0 GeoIP-1.4.8/ChangeLog.orig GeoIP-1.4.8/ChangeLog
+--- GeoIP-1.4.8/ChangeLog.orig	2011-06-24 14:44:56.000000000 +0100
++++ GeoIP-1.4.8/ChangeLog	2011-06-27 09:06:16.190029375 +0100
+@@ -137,2 +137,2 @@
+-	* Fixed a typo in the geoipupdate(1) manpage and also an non-existent path on Debian (Patrick Matth�i)
+-	* Fixes two little format errors (hyphen used as minus sign) in both manpages (Patrick Matth�i)
++	* Fixed a typo in the geoipupdate(1) manpage and also an non-existent path on Debian (Patrick Matthäi)
++	* Fixes two little format errors (hyphen used as minus sign) in both manpages (Patrick Matthäi)
+@@ -249 +249 @@
+-	* Fixed build issue when using --as-needed flag (Diego 'Flameeyes' Petten�)
++	* Fixed build issue when using --as-needed flag (Diego 'Flameeyes' Pettenò)
+@@ -395,7 +395,7 @@
+-		�1) Use a single buf ptr inside the loops.
+-		��� Set to the stack buffer or the cached memory the start of the function.
+-		�2) Unroll the i=0,1 loop to allow constant folding.
+-		�3) Unroll the j loop for the common case of j = STANDARD_RECORD_LENGTH
+-		��� (I've already done the above changes see attached function.)
+-		��� With gcc -O2 calculating x[0] and x[1] for STANDARD_RECORD_LENGTH now
+-		��� only takes 15 (was > 100) i80x86 instructions with 6 byte accesses of RAM.                 4) only calculate x[0], x[1] when needed, may be a bigger win
++		 1) Use a single buf ptr inside the loops.
++		    Set to the stack buffer or the cached memory the start of the function.
++		 2) Unroll the i=0,1 loop to allow constant folding.
++		 3) Unroll the j loop for the common case of j = STANDARD_RECORD_LENGTH
++		    (I've already done the above changes see attached function.)
++		    With gcc -O2 calculating x[0] and x[1] for STANDARD_RECORD_LENGTH now
++		    only takes 15 (was > 100) i80x86 instructions with 6 byte accesses of RAM.                 4) only calculate x[0], x[1] when needed, may be a bigger win
+diff -up GeoIP-1.4.8/man/geoiplookup.1.in.orig GeoIP-1.4.8/man/geoiplookup.1.in
+--- GeoIP-1.4.8/man/geoiplookup.1.in.orig	2011-03-27 22:00:36.000000000 +0100
++++ GeoIP-1.4.8/man/geoiplookup.1.in	2011-06-27 09:06:16.212029324 +0100
+@@ -28,7 +28,7 @@ Written by T.J. Mather
+ .SH "REPORTING BUGS"
+ Report bugs to <support at maxmind.com>
+ .SH COPYRIGHT
+-Copyright � 2006 MaxMind LLC
++Copyright © 2006 MaxMind LLC
+ 
+ This is free software; see the source for copying conditions.
+ There is NO warranty; not even for MERCHANTABILITY
+diff -up GeoIP-1.4.8/man/geoiplookup6.1.in.orig GeoIP-1.4.8/man/geoiplookup6.1.in
+--- GeoIP-1.4.8/man/geoiplookup6.1.in.orig	2011-03-27 22:00:36.000000000 +0100
++++ GeoIP-1.4.8/man/geoiplookup6.1.in	2011-06-27 09:06:16.212029324 +0100
+@@ -33,7 +33,7 @@ Written by T.J. Mather
+ .SH "REPORTING BUGS"
+ Report bugs to <support at maxmind.com>
+ .SH COPYRIGHT
+-Copyright � 2008 MaxMind LLC
++Copyright © 2008 MaxMind LLC
+ 
+ This is free software; see the source for copying conditions.
+ There is NO warranty; not even for MERCHANTABILITY
+diff -up GeoIP-1.4.8/man/geoipupdate.1.in.orig GeoIP-1.4.8/man/geoipupdate.1.in
+--- GeoIP-1.4.8/man/geoipupdate.1.in.orig	2011-06-23 21:31:22.000000000 +0100
++++ GeoIP-1.4.8/man/geoipupdate.1.in	2011-06-27 09:07:07.312910591 +0100
+@@ -56,7 +56,7 @@ Written by T.J. Mather
+ .SH "REPORTING BUGS"
+ Report bugs to <support at maxmind.com>
+ .SH COPYRIGHT
+-Copyright � 2011 MaxMind LLC
++Copyright © 2011 MaxMind LLC
+ 
+ This is free software; see the source for copying conditions.
+ There is NO warranty; not even for MERCHANTABILITY
+diff -up GeoIP-1.4.8/README.orig GeoIP-1.4.8/README
+--- GeoIP-1.4.8/README.orig	2011-06-24 14:45:00.000000000 +0100
++++ GeoIP-1.4.8/README	2011-06-27 09:06:16.213029322 +0100
+@@ -177,7 +177,7 @@ It seems that some
+ versions of gcc have a bug and consume 1 GB of memory when optimizing
+ certain source files (the other source file where this was reported is
+ from XORG X-Server). It happens at least with gcc 3.3.1 and with gcc
+-4.2(.0).  Thanks to Kai Sch�tzl for the report.
++4.2(.0).  Thanks to Kai Schätzl for the report.
+ 
+ If GEOIP_MMAP_CACHE doesn't work on a 64bit machine, try adding
+ the flag "MAP_32BIT" to the mmap call.
+diff -up GeoIP-1.4.8/TODO.orig GeoIP-1.4.8/TODO
+--- GeoIP-1.4.8/TODO.orig	2011-03-27 22:00:37.000000000 +0100
++++ GeoIP-1.4.8/TODO	2011-06-27 09:06:16.214029320 +0100
+@@ -9,12 +9,12 @@ Maurice Cinquini
+ 
+ *** ifndef WIN32 on netdb.h ? ***
+ In GeoIPCity.c you don't "#ifndef WIN32" the netdb.h include,
+-but in GeoIP.c you do.� Which one is right?
++but in GeoIP.c you do.  Which one is right?
+ 
+ *** Warnings in GeoIP-1.2.1 before I made changes ***
+ GeoIPUpdate.c:73: warning: implicit declaration of function `_setup_dbfilename'
+-��� I suggest a GeoIP_private.h file to include prototypes for
+-��� _setup_dbfilename and other private functions also used by GeoIPCity.c
++    I suggest a GeoIP_private.h file to include prototypes for
++    _setup_dbfilename and other private functions also used by GeoIPCity.c
+ 
+ *** Drop the GeoIP_*_by_addr API calls ***
+ And now that I think of it, why do you need a seperate
diff --git a/GeoIP.spec b/GeoIP.spec
index ef24f5f..3800735 100644
--- a/GeoIP.spec
+++ b/GeoIP.spec
@@ -1,46 +1,64 @@
-Name: GeoIP           
-Version: 1.4.8
-Release: 3.1%{?dist}
-Summary: C library for country/city/organization to IP address or hostname mapping     
-Group: Development/Libraries         
-License: LGPLv2+
-URL: http://www.maxmind.com/app/c            
-Source0: http://www.maxmind.com/download/geoip/api/c/GeoIP-%{version}.tar.gz 
-Source1: LICENSE.txt
-Source2: fetch-geoipdata-city.pl
-Source3: fetch-geoipdata.pl
-Source4: README.Fedora
-BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
-Obsoletes: geoip < %{version}-%{release}
-Provides: geoip = %{version}-%{release}
-BuildRequires: zlib-devel
+Name:		GeoIP
+Version:	1.4.8
+Release:	4%{?dist}
+Summary:	Library for country/city/organization to IP address or hostname mapping
+Group:		Development/Libraries
+License:	LGPLv2+ and GPLv2+
+URL:		http://www.maxmind.com/app/c
+Source0:	http://www.maxmind.com/download/geoip/api/c/GeoIP-%{version}.tar.gz
+Source1:	LICENSE.txt
+Source2:	fetch-geoipdata-city.pl
+Source3:	fetch-geoipdata.pl
+Source4:	README.Fedora
+Patch10:	GeoIP-1.4.8-UTF8.patch
+BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(id -nu)
+BuildRequires:	zlib-devel
+Obsoletes:	geoip < %{version}-%{release}
+Provides:	geoip = %{version}-%{release}
 
 %description
 GeoIP is a C library that enables the user to find the country that any IP
 address or hostname originates from. It uses a file based database that is
-accurate as of March 2003. This database simply contains IP blocks as keys, and
-countries as values. This database should be more complete and accurate than
-using reverse DNS lookups.
+accurate as of February 2009. This database simply contains IP blocks as keys,
+and countries as values. This database should be more complete and accurate
+than using reverse DNS lookups.
 
 %package devel
-Summary: Development headers and libraries for GeoIP     
-Group: Development/Libraries         
-Requires: %{name} = %{version}-%{release}
-Provides: geoip-devel = %{version}-%{release}
-Obsoletes: geoip-devel < %{version}-%{release}
+Summary:	Development headers and libraries for GeoIP
+Group:		Development/Libraries
+Requires:	%{name} = %{version}-%{release}
+Provides:	geoip-devel = %{version}-%{release}
+Obsoletes:	geoip-devel < %{version}-%{release}
 
 %description devel
-Development headers and static libraries for building GeoIP-based applications
+Development headers and static libraries for building GeoIP-based applications.
 
 %prep
 %setup -q
+
+# Recode docs as UTF-8
+%patch10 -p1
+
 install -D -m644 %{SOURCE1} LICENSE.txt
 install -D -m644 %{SOURCE2} fetch-geoipdata-city.pl
 install -D -m644 %{SOURCE3} fetch-geoipdata.pl
 install -D -m644 %{SOURCE4} README.fedora
 
 %build
+# Fix timestamp order to avoid trying to re-run autotools and configure,
+# thus clobbering our hacked libtool later on
+touch aclocal.m4
+touch configure
+touch config.h.in
+touch config.status
+find . -name Makefile.in -exec touch {} \;
+
 %configure --disable-static --disable-dependency-tracking
+
+# Kill bogus rpaths
+sed -i -e 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' \
+	-e 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
+
 make %{?_smp_mflags}
 
 %install
@@ -48,7 +66,7 @@ rm -rf %{buildroot}
 make DESTDIR=%{buildroot} install
 
 # nix the stuff we don't need like .la files.
-rm -f %{buildroot}/%{_libdir}/*.la
+rm -f %{buildroot}%{_libdir}/*.la
 
 %clean
 rm -rf %{buildroot}
@@ -58,29 +76,45 @@ rm -rf %{buildroot}
 %postun -p /sbin/ldconfig
 
 %files
-%defattr(-,root,root,-)
-%doc AUTHORS COPYING ChangeLog README TODO INSTALL LICENSE* fetch-*
-%{_libdir}/libGeoIP.so.*
-%{_libdir}/libGeoIPUpdate.so.*
-%{_bindir}/geoiplookup6
-%{_bindir}/geoiplookup
-%{_bindir}/geoipupdate
+# LGPLv2+
+%doc AUTHORS COPYING ChangeLog README TODO LICENSE* fetch-*
 %config(noreplace) %{_sysconfdir}/GeoIP.conf.default
 %config(noreplace) %{_sysconfdir}/GeoIP.conf
-%{_datadir}/GeoIP
+%{_bindir}/geoiplookup6
+%{_bindir}/geoiplookup
+%{_datadir}/GeoIP/
+%{_libdir}/libGeoIP.so.1
+%{_libdir}/libGeoIP.so.1.*
 %{_mandir}/man1/geoiplookup.1*
 %{_mandir}/man1/geoiplookup6.1*
+# GPLv2+
+%{_bindir}/geoipupdate
+%{_libdir}/libGeoIPUpdate.so.0
+%{_libdir}/libGeoIPUpdate.so.0.*
 %{_mandir}/man1/geoipupdate.1*
 
 %files devel
-%defattr(-,root,root,-)
+# LGPLv2+
 %{_includedir}/GeoIP.h
 %{_includedir}/GeoIPCity.h
 %{_includedir}/GeoIPUpdate.h
 %{_libdir}/libGeoIP.so
+# GPLv2+
 %{_libdir}/libGeoIPUpdate.so
 
 %changelog
+* Mon Oct 22 2012 Paul Howarth <paul at city-fan.org> - 1.4.8-4
+- libGeoIPUpdate and geoipupdate (which is linked against it) are GPL-licensed
+  rather than LGPL-licensed (#840896)
+- Don't package generic INSTALL file (#661625)
+- Kill bogus rpaths on x86_64
+- Hardcode library sonames in %%files list to avoid nasty surprises in the
+  future
+- Drop %%defattr, redundant since rpm 4.4
+- Recode docs as UTF-8
+- Don't use macros for commands
+- Use tabs
+
 * Wed Jul 18 2012 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 1.4.8-3.1
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
 
@@ -88,7 +122,7 @@ rm -rf %{buildroot}
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
 
 * Tue Sep 6 2011 Michael Fleming <mfleming+rpm at thatfleminggent.com> - 1.4.8-1.1
-- Remove -ipv6 path
+- Remove -ipv6 patch
 - Bump to 1.4.8 release
 
 * Wed Feb 09 2011 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 1.4.7-0.2.20090931cvs
diff --git a/geoip-1.4.6-ipv6.patch b/geoip-1.4.6-ipv6.patch
deleted file mode 100644
index 091b575..0000000
--- a/geoip-1.4.6-ipv6.patch
+++ /dev/null
@@ -1,811 +0,0 @@
-Only in /home/mdomsch/cvs/fedora-extras/GeoIP/devel/GeoIP-1.4.6/: aclocal.m4
-Only in c/apps: CVS
-diff -urp --exclude=from=/home/mdomsch/excludes --minimal /home/mdomsch/cvs/fedora-extras/GeoIP/devel/GeoIP-1.4.6/apps/geoiplookup.c c/apps/geoiplookup.c
---- /home/mdomsch/cvs/fedora-extras/GeoIP/devel/GeoIP-1.4.6/apps/geoiplookup.c	2009-02-24 10:03:23.000000000 -0600
-+++ c/apps/geoiplookup.c	2009-05-08 12:01:21.000000000 -0500
-@@ -31,9 +31,12 @@ typedef unsigned int uint32_t; 
- void geoiplookup(GeoIP* gi,char *hostname,int i);
- 
- void usage() {
--	fprintf(stderr,"Usage: geoiplookup [-d custom_dir] [-f custom_file] [-v] <ipaddress|hostname>\n");
-+	fprintf(stderr,"Usage: geoiplookup [-d custom_dir] [-f custom_file] [-v] [-i] <ipaddress|hostname>\n");
- }
- 
-+/* extra info used in _say_range_ip */
-+int info_flag = 0;
-+
- int main (int argc, char *argv[]) {
- 	char * hostname = NULL;
- 	char * db_info;
-@@ -51,7 +54,9 @@ int main (int argc, char *argv[]) {
- 	while (i < argc) {
- 		if (strcmp(argv[i],"-v") == 0) {
- 			version_flag = 1;
--		} else if (strcmp(argv[i],"-f") == 0) {
-+		} else if (strcmp(argv[i],"-i") == 0) {
-+			info_flag = 1;
-+                } else if (strcmp(argv[i],"-f") == 0) {
- 			if ((i+1) < argc){
- 				i++;
- 				custom_file = argv[i];
-@@ -119,12 +124,106 @@ static const char * _mk_NA( const char *
-  return p ? p : "N/A";
- }
- 
-+static unsigned long
-+__addr_to_num(const char *addr)
-+{
-+	unsigned int    c, octet, t;
-+	unsigned long   ipnum;
-+	int             i = 3;
-+
-+	octet = ipnum = 0;
-+	while ((c = *addr++)) {
-+		if (c == '.') {
-+			if (octet > 255)
-+				return 0;
-+			ipnum <<= 8;
-+			ipnum += octet;
-+			i--;
-+			octet = 0;
-+		} else {
-+			t = octet;
-+			octet <<= 3;
-+			octet += t;
-+			octet += t;
-+			c -= '0';
-+			if (c > 9)
-+				return 0;
-+			octet += c;
-+		}
-+	}
-+	if ((octet > 255) || (i != 0))
-+		return 0;
-+	ipnum <<= 8;
-+	return ipnum + octet;
-+}
-+
-+
-+
-+/* ptr must be a memory area with at least 16 bytes */
-+static char *__num_to_addr_r (unsigned long ipnum, char * ptr) {
-+	char *cur_str;
-+	int octet[4];
-+	int num_chars_written, i;
-+
-+	cur_str = ptr;
-+
-+	for (i = 0; i<4; i++) {
-+		octet[3 - i] = ipnum % 256;
-+		ipnum >>= 8;
-+	}
-+
-+	for (i = 0; i<4; i++) {
-+		num_chars_written = sprintf(cur_str, "%d", octet[i]);
-+		cur_str += num_chars_written;
-+
-+		if (i < 3) {
-+			cur_str[0] = '.';
-+			cur_str++;
-+		}
-+	}
-+
-+	return ptr;
-+}
-+
-+void _say_range_by_ip(GeoIP * gi, uint32_t ipnum ) {
-+  unsigned long last_nm, mask, low, hi;
-+  char ipaddr[16];
-+  char tmp[16];
-+  char ** range;
-+
-+  if ( info_flag == 0 )
-+    return; /* noop unless extra information is requested */
-+
-+  range = GeoIP_range_by_ip( gi, __num_to_addr_r( ipnum, ipaddr ) );
-+  if ( range == NULL )
-+    return;
-+
-+  printf ( "  ipaddr: %s\n", ipaddr );
-+
-+  printf( "  range_by_ip:  %s - %s\n", range[0], range[1] );
-+  last_nm = GeoIP_last_netmask(gi);
-+  mask    = 0xffffffff << ( 32 - last_nm );
-+  low     = ipnum & mask;
-+  hi      = low + ( 0xffffffff & ~mask );
-+  printf( "  network:      %s - %s ::%ld\n",
-+    __num_to_addr_r( low, ipaddr ),
-+    __num_to_addr_r( hi,  tmp ),
-+    last_nm
-+  );
-+  printf( "  ipnum: %u\n", ipnum );
-+  printf( "  range_by_num: %lu - %lu\n", __addr_to_num(range[0]), __addr_to_num(range[1]) );
-+  printf( "  network num:  %lu - %lu ::%lu\n", low, hi, last_nm );
-+
-+  GeoIP_range_by_ip_delete(range);
-+}
-+
- void
- geoiplookup(GeoIP * gi, char *hostname, int i)
- {
- 	const char     *country_code;
- 	const char     *country_name;
- 	const char     *domain_name;
-+        const char     *asnum_name;
- 	int             netspeed;
- 	int             country_id;
- 	GeoIPRegion    *region;
-@@ -146,6 +245,17 @@ geoiplookup(GeoIP * gi, char *hostname, 
- 			}
- 			else {
- 				printf("%s: %s\n", GeoIPDBDescription[i], domain_name);
-+                                _say_range_by_ip(gi, ipnum);
-+			}
-+		}
-+		else if (GEOIP_ASNUM_EDITION == i) {
-+			asnum_name = GeoIP_name_by_ipnum(gi, ipnum);
-+			if (asnum_name == NULL) {
-+				printf("%s: IP Address not found\n", GeoIPDBDescription[i]);
-+			}
-+			else {
-+				printf("%s: %s\n", GeoIPDBDescription[i], asnum_name);
-+                                _say_range_by_ip(gi, ipnum);
- 			}
- 		}
- 		else if (GEOIP_COUNTRY_EDITION == i) {
-@@ -157,6 +267,7 @@ geoiplookup(GeoIP * gi, char *hostname, 
- 			}
- 			else {
- 				printf("%s: %s, %s\n", GeoIPDBDescription[i], country_code, country_name);
-+                                _say_range_by_ip(gi, ipnum);
- 			}
- 		}
- 		else if (GEOIP_REGION_EDITION_REV0 == i || GEOIP_REGION_EDITION_REV1 == i) {
-@@ -166,6 +277,7 @@ geoiplookup(GeoIP * gi, char *hostname, 
- 			}
- 			else {
- 				printf("%s: %s, %s\n", GeoIPDBDescription[i], region->country_code, region->region);
-+                                _say_range_by_ip(gi, ipnum);
- 				GeoIPRegion_delete(region);
- 			}
- 		}
-@@ -177,6 +289,7 @@ geoiplookup(GeoIP * gi, char *hostname, 
- 			else {
- 				printf("%s: %s, %s, %s, %s, %f, %f\n", GeoIPDBDescription[i], gir->country_code, _mk_NA(gir->region),
- 				       _mk_NA(gir->city), _mk_NA(gir->postal_code), gir->latitude, gir->longitude);
-+                                _say_range_by_ip(gi, ipnum);
- 			}
- 		}
- 		else if (GEOIP_CITY_EDITION_REV1 == i) {
-@@ -187,6 +300,7 @@ geoiplookup(GeoIP * gi, char *hostname, 
- 			else {
- 				printf("%s: %s, %s, %s, %s, %f, %f, %d, %d\n", GeoIPDBDescription[i], gir->country_code, _mk_NA(gir->region), _mk_NA(gir->city), _mk_NA(gir->postal_code),
- 				       gir->latitude, gir->longitude, gir->metro_code, gir->area_code);
-+                                _say_range_by_ip(gi, ipnum);
- 			}
- 		}
- 		else if (GEOIP_ORG_EDITION == i || GEOIP_ISP_EDITION == i) {
-@@ -196,6 +310,7 @@ geoiplookup(GeoIP * gi, char *hostname, 
- 			}
- 			else {
- 				printf("%s: %s\n", GeoIPDBDescription[i], org);
-+                                _say_range_by_ip(gi, ipnum);
- 			}
- 		}
- 		else if (GEOIP_NETSPEED_EDITION == i) {
-@@ -212,6 +327,7 @@ geoiplookup(GeoIP * gi, char *hostname, 
- 			else if (netspeed == GEOIP_CORPORATE_SPEED) {
- 				printf("%s: Corporate\n", GeoIPDBDescription[i]);
- 			}
-+                        _say_range_by_ip(gi, ipnum);
- 		}
- 		else {
- 
-diff -urp --exclude=from=/home/mdomsch/excludes --minimal /home/mdomsch/cvs/fedora-extras/GeoIP/devel/GeoIP-1.4.6/apps/geoipupdate.c c/apps/geoipupdate.c
---- /home/mdomsch/cvs/fedora-extras/GeoIP/devel/GeoIP-1.4.6/apps/geoipupdate.c	2009-02-24 14:01:41.000000000 -0600
-+++ c/apps/geoipupdate.c	2009-05-29 03:55:00.000000000 -0500
-@@ -97,6 +97,7 @@ int main (int argc, char *argv[]) {
- 			exit(0);
- 		case 'v':
- 			verbose = 1;
-+                        break;
- 		case 'f':
- 			license_file = optarg;
- 			break;
-@@ -279,5 +280,5 @@ int main (int argc, char *argv[]) {
- 	if (client_ipaddr) {
- 		free(client_ipaddr);
- 	}
--	exit(0);
-+	exit(err);
- }
-diff -urp --exclude=from=/home/mdomsch/excludes --minimal /home/mdomsch/cvs/fedora-extras/GeoIP/devel/GeoIP-1.4.6/apps/geoipupdate-pureperl.pl c/apps/geoipupdate-pureperl.pl
---- /home/mdomsch/cvs/fedora-extras/GeoIP/devel/GeoIP-1.4.6/apps/geoipupdate-pureperl.pl	2009-02-24 10:04:39.000000000 -0600
-+++ c/apps/geoipupdate-pureperl.pl	2009-03-22 09:40:33.000000000 -0500
-@@ -40,7 +40,7 @@ https
- use strict;
- use warnings;
- 
--our $VERSION = '0.03';
-+our $VERSION = '0.04';
- 
- use 5.008;
- use Data::Dumper;
-@@ -220,7 +220,7 @@ sub _gunzip_and_replace {
-   {
-     local $_;
-     open my $gin, '<:gzip', \$content or die $!;
--    open my $gout, '>', $geoip_filename . '.test' or die $!;
-+    open my $gout, '>:raw', $geoip_filename . '.test' or die $!;
-     print {$gout} $_ while (<$gin>);
-   }
- 
-Only in /home/mdomsch/cvs/fedora-extras/GeoIP/devel/GeoIP-1.4.6/apps: Makefile.in
-diff -urp --exclude=from=/home/mdomsch/excludes --minimal /home/mdomsch/cvs/fedora-extras/GeoIP/devel/GeoIP-1.4.6/ChangeLog c/ChangeLog
---- /home/mdomsch/cvs/fedora-extras/GeoIP/devel/GeoIP-1.4.6/ChangeLog	2009-02-24 19:44:38.000000000 -0600
-+++ c/ChangeLog	2009-08-30 21:15:04.000000000 -0500
-@@ -1,3 +1,20 @@
-+	* Add more IPv6 functions ( Boris Zentner )
-+	    const char *GeoIP_country_code_by_addr_v6 (GeoIP* gi, const char *addr);
-+	    const char *GeoIP_country_code_by_name_v6 (GeoIP* gi, const char *host);
-+	    const char *GeoIP_country_code3_by_addr_v6 (GeoIP* gi, const char *addr);
-+	    const char *GeoIP_country_code3_by_name_v6 (GeoIP* gi, const char *host);
-+	    const char *GeoIP_country_name_by_addr_v6 (GeoIP* gi, const char *addr);
-+	    const char *GeoIP_country_name_by_name_v6 (GeoIP* gi, const char *host);
-+	* Make sure that GeoIP_*_v6 functions refuse GEOIP_PROXY_EDITION and
-+	    GEOIP_NETSPEED_EDITION databases ( Boris Zentner ) 
-+	* Update libGeoIP/regionName.c with FIPS codes from 20090723 ( Boris Zentner )
-+	* Fix geoipupdate's -v option to not change the license filename ( Thom May )
-+	* Fix geoipupdate's exit code ( Thom May )
-+	* Add support for ASNUM_EDITION ( Boris Zentner )
-+	* Fix -i output for larger values, sign issue ( Boris Zentner )
-+	* Add -i flag for more information on netmask, range_by_ip and the current network range ( Boris Zentner )
-+	* Add support for DOMAIN_EDITION database type ( Boris Zentner )
-+	* Fix apps/geoipupdate-pureperl.pl output layer on W32 ( Boris Zentner )
- 1.4.6	2009-02-25
- 	* Fix geoipupdate's my_printf function ( Boris Zentner )
- 	* Fix typo in apps/geoipupdate-pureperl.pl replace PerlIO::Gzip with PerlIO::gzip ( Boris Zentner ) 
-Only in c/conf: CVS
-Only in /home/mdomsch/cvs/fedora-extras/GeoIP/devel/GeoIP-1.4.6/conf: Makefile.in
-Only in /home/mdomsch/cvs/fedora-extras/GeoIP/devel/GeoIP-1.4.6/: config.guess
-Only in /home/mdomsch/cvs/fedora-extras/GeoIP/devel/GeoIP-1.4.6/: config.sub
-Only in /home/mdomsch/cvs/fedora-extras/GeoIP/devel/GeoIP-1.4.6/: configure
-diff -urp --exclude=from=/home/mdomsch/excludes --minimal /home/mdomsch/cvs/fedora-extras/GeoIP/devel/GeoIP-1.4.6/configure.in c/configure.in
---- /home/mdomsch/cvs/fedora-extras/GeoIP/devel/GeoIP-1.4.6/configure.in	2009-02-24 10:03:23.000000000 -0600
-+++ c/configure.in	2009-08-30 21:15:04.000000000 -0500
-@@ -1,6 +1,6 @@
- dnl AM_CONFIG_HEADER(config.h)
- 
--AC_INIT([GeoIP], [1.4.6],[support at maxmind.com],[GeoIP])
-+AC_INIT([GeoIP], [1.4.7],[support at maxmind.com],[GeoIP])
- AC_GNU_SOURCE
- AM_INIT_AUTOMAKE
- AC_CONFIG_SRCDIR([libGeoIP/GeoIP.c])
-Only in c/: CVS
-Only in c/data: CVS
-Only in /home/mdomsch/cvs/fedora-extras/GeoIP/devel/GeoIP-1.4.6/data: GeoIP.dat
-Only in /home/mdomsch/cvs/fedora-extras/GeoIP/devel/GeoIP-1.4.6/data: Makefile.in
-Only in /home/mdomsch/cvs/fedora-extras/GeoIP/devel/GeoIP-1.4.6/: fetch-geoipdata-city.pl
-Only in /home/mdomsch/cvs/fedora-extras/GeoIP/devel/GeoIP-1.4.6/: fetch-geoipdata.pl
-Only in /home/mdomsch/cvs/fedora-extras/GeoIP/devel/GeoIP-1.4.6/: GeoIP.spec
-Only in /home/mdomsch/cvs/fedora-extras/GeoIP/devel/GeoIP-1.4.6/: install-sh
-Only in c/libGeoIP: CVS
-diff -urp --exclude=from=/home/mdomsch/excludes --minimal /home/mdomsch/cvs/fedora-extras/GeoIP/devel/GeoIP-1.4.6/libGeoIP/GeoIP.c c/libGeoIP/GeoIP.c
---- /home/mdomsch/cvs/fedora-extras/GeoIP/devel/GeoIP-1.4.6/libGeoIP/GeoIP.c	2009-02-24 10:03:23.000000000 -0600
-+++ c/libGeoIP/GeoIP.c	2009-08-30 21:15:04.000000000 -0500
-@@ -366,10 +366,11 @@ void _setup_segments(GeoIP * gi) {
- 				gi->databaseSegments = malloc(sizeof(int));
- 				gi->databaseSegments[0] = STATE_BEGIN_REV1;
- 			} else if (gi->databaseType == GEOIP_CITY_EDITION_REV0 ||
--								 gi->databaseType == GEOIP_CITY_EDITION_REV1 ||
--								 gi->databaseType == GEOIP_ORG_EDITION ||
--								 gi->databaseType == GEOIP_ISP_EDITION ||
--								 gi->databaseType == GEOIP_ASNUM_EDITION) {
-+				   gi->databaseType == GEOIP_CITY_EDITION_REV1 ||
-+		                   gi->databaseType == GEOIP_ORG_EDITION ||
-+		                   gi->databaseType == GEOIP_DOMAIN_EDITION ||
-+		 		   gi->databaseType == GEOIP_ISP_EDITION ||
-+			  	   gi->databaseType == GEOIP_ASNUM_EDITION) {
- 				/* City/Org Editions have two segments, read offset of second segment */
- 				gi->databaseSegments = malloc(sizeof(int));
- 				gi->databaseSegments[0] = 0;
-@@ -377,8 +378,9 @@ void _setup_segments(GeoIP * gi) {
- 				for (j = 0; j < SEGMENT_RECORD_LENGTH; j++) {
- 					gi->databaseSegments[0] += (buf[j] << (j * 8));
- 				}
--				if (gi->databaseType == GEOIP_ORG_EDITION ||
--						gi->databaseType == GEOIP_ISP_EDITION)
-+				if (gi->databaseType == GEOIP_ORG_EDITION    ||
-+		                    gi->databaseType == GEOIP_DOMAIN_EDITION ||                                  
-+			 	    gi->databaseType == GEOIP_ISP_EDITION)
- 					gi->record_length = ORG_RECORD_LENGTH;
- 			}
- 			break;
-@@ -831,18 +833,36 @@ void GeoIP_delete (GeoIP *gi) {
- 	free(gi);
- }
- 
-+const char *GeoIP_country_code_by_name_v6 (GeoIP* gi, const char *name) {
-+	int country_id;
-+	country_id = GeoIP_id_by_name_v6(gi, name);
-+	return (country_id > 0) ? GeoIP_country_code[country_id] : NULL;
-+}
-+
- const char *GeoIP_country_code_by_name (GeoIP* gi, const char *name) {
- 	int country_id;
- 	country_id = GeoIP_id_by_name(gi, name);
- 	return (country_id > 0) ? GeoIP_country_code[country_id] : NULL;
- }
- 
-+const char *GeoIP_country_code3_by_name_v6 (GeoIP* gi, const char *name) {
-+	int country_id;
-+	country_id = GeoIP_id_by_name_v6(gi, name);
-+	return (country_id > 0) ? GeoIP_country_code3[country_id] : NULL;
-+}
-+
- const char *GeoIP_country_code3_by_name (GeoIP* gi, const char *name) {
- 	int country_id;
- 	country_id = GeoIP_id_by_name(gi, name);
- 	return (country_id > 0) ? GeoIP_country_code3[country_id] : NULL;
- }
- 
-+const char *GeoIP_country_name_by_name_v6 (GeoIP* gi, const char *name) {
-+	int country_id;
-+	country_id = GeoIP_id_by_name_v6(gi, name);
-+	return (country_id > 0) ? GeoIP_country_name[country_id] : NULL;
-+}
-+
- const char *GeoIP_country_name_by_name (GeoIP* gi, const char *name) {
- 	int country_id;
- 	country_id = GeoIP_id_by_name(gi, name);
-@@ -945,7 +965,7 @@ int GeoIP_id_by_name_v6 (GeoIP* gi, cons
-        if (name == NULL) {
-                return 0;
-        }
--       if (gi->databaseType != GEOIP_COUNTRY_EDITION_V6 && gi->databaseType != GEOIP_PROXY_EDITION && gi->databaseType != GEOIP_NETSPEED_EDITION) {
-+       if (gi->databaseType != GEOIP_COUNTRY_EDITION_V6) {
-                printf("Invalid database type %s, expected %s\n", GeoIPDBDescription[(int)gi->databaseType], GeoIPDBDescription[GEOIP_COUNTRY_EDITION_V6]);
-                return 0;
-        }
-@@ -956,18 +976,36 @@ int GeoIP_id_by_name_v6 (GeoIP* gi, cons
-        return ret;
- }
- 
-+const char *GeoIP_country_code_by_addr_v6 (GeoIP* gi, const char *addr) {
-+	int country_id;
-+	country_id = GeoIP_id_by_addr_v6(gi, addr);
-+	return (country_id > 0) ? GeoIP_country_code[country_id] : NULL;
-+}
-+
- const char *GeoIP_country_code_by_addr (GeoIP* gi, const char *addr) {
- 	int country_id;
- 	country_id = GeoIP_id_by_addr(gi, addr);
- 	return (country_id > 0) ? GeoIP_country_code[country_id] : NULL;
- }
- 
-+const char *GeoIP_country_code3_by_addr_v6 (GeoIP* gi, const char *addr) {
-+	int country_id;
-+	country_id = GeoIP_id_by_addr_v6(gi, addr);
-+	return (country_id > 0) ? GeoIP_country_code3[country_id] : NULL;
-+}
-+
- const char *GeoIP_country_code3_by_addr (GeoIP* gi, const char *addr) {
- 	int country_id;
- 	country_id = GeoIP_id_by_addr(gi, addr);
- 	return (country_id > 0) ? GeoIP_country_code3[country_id] : NULL;
- }
- 
-+const char *GeoIP_country_name_by_addr_v6 (GeoIP* gi, const char *addr) {
-+	int country_id;
-+	country_id = GeoIP_id_by_addr_v6(gi, addr);
-+	return (country_id > 0) ? GeoIP_country_name[country_id] : NULL;
-+}
-+
- const char *GeoIP_country_name_by_addr (GeoIP* gi, const char *addr) {
- 	int country_id;
- 	country_id = GeoIP_id_by_addr(gi, addr);
-@@ -1010,10 +1048,18 @@ const char *GeoIP_country_code3_by_ipnum
-        return (country_id > 0) ? GeoIP_country_code3[country_id] : NULL;
- }
- 
-+int GeoIP_country_id_by_addr_v6 (GeoIP* gi, const char *addr) {
-+	return GeoIP_id_by_addr_v6(gi, addr);
-+}
-+
- int GeoIP_country_id_by_addr (GeoIP* gi, const char *addr) {
- 	return GeoIP_id_by_addr(gi, addr);
- }
- 
-+int GeoIP_country_id_by_name_v6 (GeoIP* gi, const char *host) {
-+	return GeoIP_id_by_name_v6(gi, host);
-+}
-+
- int GeoIP_country_id_by_name (GeoIP* gi, const char *host) {
- 	return GeoIP_id_by_name(gi, host);
- }
-@@ -1024,9 +1070,7 @@ int GeoIP_id_by_addr_v6 (GeoIP* gi, cons
-        if (addr == NULL) {
-                return 0;
-        }
--       if (gi->databaseType != GEOIP_COUNTRY_EDITION_V6 &&
--                       gi->databaseType != GEOIP_PROXY_EDITION &&
--                       gi->databaseType != GEOIP_NETSPEED_EDITION) {
-+       if (gi->databaseType != GEOIP_COUNTRY_EDITION_V6) {
-                printf("Invalid database type %s, expected %s\n",
-                                         GeoIPDBDescription[(int)gi->databaseType],
-                                         GeoIPDBDescription[GEOIP_COUNTRY_EDITION_V6]);
-@@ -1062,9 +1106,7 @@ int GeoIP_id_by_ipnum_v6 (GeoIP* gi, geo
-                return 0;
-        }
- */     
--       if (gi->databaseType != GEOIP_COUNTRY_EDITION_V6 && 
--                       gi->databaseType != GEOIP_PROXY_EDITION &&
--                       gi->databaseType != GEOIP_NETSPEED_EDITION) {
-+       if (gi->databaseType != GEOIP_COUNTRY_EDITION_V6) {
-                printf("Invalid database type %s, expected %s\n",
-                                         GeoIPDBDescription[(int)gi->databaseType],
-                                         GeoIPDBDescription[GEOIP_COUNTRY_EDITION_V6]);
-@@ -1346,6 +1388,7 @@ char *_get_name (GeoIP* gi, unsigned lon
- 
- 	if (gi->databaseType != GEOIP_ORG_EDITION &&
- 			gi->databaseType != GEOIP_ISP_EDITION &&
-+			gi->databaseType != GEOIP_DOMAIN_EDITION &&
- 			gi->databaseType != GEOIP_ASNUM_EDITION) {
- 		printf("Invalid database type %s, expected %s\n", GeoIPDBDescription[(int)gi->databaseType], GeoIPDBDescription[GEOIP_ORG_EDITION]);
- 		return NULL;
-@@ -1382,6 +1425,7 @@ char *_get_name_v6 (GeoIP* gi, geoipv6_t
- 
-   if (gi->databaseType != GEOIP_ORG_EDITION &&
-       gi->databaseType != GEOIP_ISP_EDITION &&
-+      gi->databaseType != GEOIP_DOMAIN_EDITION &&
-       gi->databaseType != GEOIP_ASNUM_EDITION) {
-     printf("Invalid database type %s, expected %s\n", GeoIPDBDescription[(int)gi->databaseType], GeoIPDBDescription[GEOIP_ORG_EDITION]);
-     return NULL;
-diff -urp --exclude=from=/home/mdomsch/excludes --minimal /home/mdomsch/cvs/fedora-extras/GeoIP/devel/GeoIP-1.4.6/libGeoIP/GeoIP.h c/libGeoIP/GeoIP.h
---- /home/mdomsch/cvs/fedora-extras/GeoIP/devel/GeoIP-1.4.6/libGeoIP/GeoIP.h	2009-02-24 10:03:23.000000000 -0600
-+++ c/libGeoIP/GeoIP.h	2009-08-30 21:15:04.000000000 -0500
-@@ -162,6 +162,13 @@ GEOIP_API const char *GeoIP_country_name
- GEOIP_API const char *GeoIP_country_code_by_ipnum_v6 (GeoIP* gi, geoipv6_t ipnum);
- GEOIP_API const char *GeoIP_country_code3_by_ipnum_v6 (GeoIP* gi, geoipv6_t ipnum);
- 
-+GEOIP_API const char *GeoIP_country_code_by_addr_v6 (GeoIP* gi, const char *addr);
-+GEOIP_API const char *GeoIP_country_code_by_name_v6 (GeoIP* gi, const char *host);
-+GEOIP_API const char *GeoIP_country_code3_by_addr_v6 (GeoIP* gi, const char *addr);
-+GEOIP_API const char *GeoIP_country_code3_by_name_v6 (GeoIP* gi, const char *host);
-+GEOIP_API const char *GeoIP_country_name_by_addr_v6 (GeoIP* gi, const char *addr);
-+GEOIP_API const char *GeoIP_country_name_by_name_v6 (GeoIP* gi, const char *host);
-+
- /* Deprecated - for backwards compatibility only */
- GEOIP_API int GeoIP_country_id_by_addr (GeoIP* gi, const char *addr);
- GEOIP_API int GeoIP_country_id_by_name (GeoIP* gi, const char *host);
-Only in /home/mdomsch/cvs/fedora-extras/GeoIP/devel/GeoIP-1.4.6/libGeoIP: Makefile.in
-diff -urp --exclude=from=/home/mdomsch/excludes --minimal /home/mdomsch/cvs/fedora-extras/GeoIP/devel/GeoIP-1.4.6/libGeoIP/regionName.c c/libGeoIP/regionName.c
---- /home/mdomsch/cvs/fedora-extras/GeoIP/devel/GeoIP-1.4.6/libGeoIP/regionName.c	2009-02-24 10:03:23.000000000 -0600
-+++ c/libGeoIP/regionName.c	2009-07-23 15:48:20.000000000 -0500
-@@ -2249,6 +2249,12 @@ const char * GeoIP_region_name_by_code(c
-   }
-   if (strcmp(country_code,"CI") == 0) {
-     switch (region_code2) {
-+      case 5:
-+      name = "Atacama";
-+      break;
-+      case 6:
-+      name = "Biobio";
-+      break;
-       case 51:
-       name = "Sassandra";
-       break;
-@@ -6102,6 +6108,9 @@ const char * GeoIP_region_name_by_code(c
-       case 29:
-       name = "Snafellsnes- og Hnappadalssysla";
-       break;
-+      case 30:
-+      name = "Strandasysla";
-+      break;
-       case 31:
-       name = "Sudur-Mulasysla";
-       break;
-@@ -6875,6 +6884,9 @@ const char * GeoIP_region_name_by_code(c
-       case 1:
-       name = "Beqaa";
-       break;
-+      case 2:
-+      name = "Al Janub";
-+      break;
-       case 3:
-       name = "Liban-Nord";
-       break;
-@@ -7092,6 +7104,9 @@ const char * GeoIP_region_name_by_code(c
-       case 4:
-       name = "Grand Cape Mount";
-       break;
-+      case 5:
-+      name = "Lofa";
-+      break;
-       case 6:
-       name = "Maryland";
-       break;
-@@ -7107,15 +7122,33 @@ const char * GeoIP_region_name_by_code(c
-       case 11:
-       name = "Grand Bassa";
-       break;
-+      case 12:
-+      name = "Grand Cape Mount";
-+      break;
-+      case 13:
-+      name = "Maryland";
-+      break;
-       case 14:
-       name = "Montserrado";
-       break;
-+      case 17:
-+      name = "Margibi";
-+      break;
-+      case 18:
-+      name = "River Cess";
-+      break;
-       case 19:
-       name = "Grand Gedeh";
-       break;
-       case 20:
-       name = "Lofa";
-       break;
-+      case 21:
-+      name = "Gbarpolu";
-+      break;
-+      case 22:
-+      name = "River Gee";
-+      break;
-     }
-   }
-   if (strcmp(country_code,"LS") == 0) {
-@@ -8848,12 +8881,18 @@ const char * GeoIP_region_name_by_code(c
-       case 11:
-       name = "Federal Capital Territory";
-       break;
-+      case 12:
-+      name = "Gongola";
-+      break;
-       case 16:
-       name = "Ogun";
-       break;
-       case 17:
-       name = "Ondo";
-       break;
-+      case 18:
-+      name = "Oyo";
-+      break;
-       case 21:
-       name = "Akwa Ibom";
-       break;
-@@ -9271,6 +9310,9 @@ const char * GeoIP_region_name_by_code(c
-       case 1092:
-       name = "West Coast";
-       break;
-+      case 85:
-+      name = "Waikato";
-+      break;
-     }
-   }
-   if (strcmp(country_code,"OM") == 0) {
-@@ -9612,6 +9654,9 @@ const char * GeoIP_region_name_by_code(c
-       case 44:
-       name = "Mountain";
-       break;
-+      case 45:
-+      name = "Negros Occidental";
-+      break;
-       case 46:
-       name = "Negros Oriental";
-       break;
-@@ -10711,6 +10756,9 @@ const char * GeoIP_region_name_by_code(c
-       case 6:
-       name = "Gitarama";
-       break;
-+      case 7:
-+      name = "Kibungo";
-+      break;
-       case 9:
-       name = "Kigali";
-       break;
-@@ -11532,6 +11580,9 @@ const char * GeoIP_region_name_by_code(c
-       case 7:
-       name = "Thies";
-       break;
-+      case 8:
-+      name = "Louga";
-+      break;
-       case 9:
-       name = "Fatick";
-       break;
-@@ -12075,6 +12126,12 @@ const char * GeoIP_region_name_by_code(c
-       case 78:
-       name = "Mukdahan";
-       break;
-+      case 79:
-+      name = "Nong Bua Lamphu";
-+      break;
-+      case 80:
-+      name = "Sa Kaeo";
-+      break;
-     }
-   }
-   if (strcmp(country_code,"TJ") == 0) {
-@@ -12112,22 +12169,19 @@ const char * GeoIP_region_name_by_code(c
-   if (strcmp(country_code,"TN") == 0) {
-     switch (region_code2) {
-       case 2:
--      name = "Al Qasrayn";
-+      name = "Kasserine";
-       break;
-       case 3:
--      name = "Al Qayrawan";
-+      name = "Kairouan";
-       break;
-       case 6:
--      name = "Jundubah";
--      break;
--      case 10:
--      name = "Qafsah";
-+      name = "Jendouba";
-       break;
-       case 14:
--      name = "Kef";
-+      name = "El Kef";
-       break;
-       case 15:
--      name = "Al Mahdiyah";
-+      name = "Al Mahdia";
-       break;
-       case 16:
-       name = "Al Munastir";
-@@ -12136,58 +12190,52 @@ const char * GeoIP_region_name_by_code(c
-       name = "Bajah";
-       break;
-       case 18:
--      name = "Banzart";
-+      name = "Bizerte";
-       break;
-       case 19:
--      name = "Nabul";
-+      name = "Nabeul";
-       break;
-       case 22:
--      name = "Silyanah";
-+      name = "Siliana";
-       break;
-       case 23:
--      name = "Susah";
-+      name = "Sousse";
-       break;
-       case 26:
--      name = "Chaiyaphum Province";
-+      name = "Ariana";
-       break;
-       case 27:
--      name = "Bin";
-+      name = "Ben Arous";
-       break;
-       case 28:
-       name = "Madanin";
-       break;
-       case 29:
--      name = "Qabis";
-+      name = "Gabes";
-       break;
-       case 30:
--      name = "Qafsah";
-+      name = "Gafsa";
-       break;
-       case 31:
--      name = "Qibili";
-+      name = "Kebili";
-       break;
-       case 32:
--      name = "Safaqis";
-+      name = "Sfax";
-       break;
-       case 33:
--      name = "Sidi Bu Zayd";
-+      name = "Sidi Bou Zid";
-       break;
-       case 34:
--      name = "Tatawin";
-+      name = "Tataouine";
-       break;
-       case 35:
--      name = "Tawzar";
-+      name = "Tozeur";
-       break;
-       case 36:
-       name = "Tunis";
-       break;
-       case 37:
--      name = "Zaghwan";
--      break;
--      case 38:
--      name = "Ariana";
--      break;
--      case 39:
--      name = "Manouba";
-+      name = "Zaghouan";
-       break;
-     }
-   }
-@@ -13035,6 +13083,9 @@ const char * GeoIP_region_name_by_code(c
-       case 5:
-       name = "Cao Bang";
-       break;
-+      case 6:
-+      name = "Cuu Long";
-+      break;
-       case 7:
-       name = "Dac Lac";
-       break;
-@@ -13053,6 +13104,9 @@ const char * GeoIP_region_name_by_code(c
-       case 14:
-       name = "Ha Nam Ninh";
-       break;
-+      case 15:
-+      name = "Ha Noi";
-+      break;
-       case 16:
-       name = "Ha Son Binh";
-       break;
-@@ -13377,6 +13431,9 @@ const char * GeoIP_region_name_by_code(c
-       case 5:
-       name = "Shabwah";
-       break;
-+      case 6:
-+      name = "Al Ghaydah";
-+      break;
-       case 8:
-       name = "Al Hudaydah";
-       break;
-Only in c/: LICENSE
-Only in /home/mdomsch/cvs/fedora-extras/GeoIP/devel/GeoIP-1.4.6/: LICENSE.txt
-Only in /home/mdomsch/cvs/fedora-extras/GeoIP/devel/GeoIP-1.4.6/: Makefile.in
-Only in c/man: CVS
-Only in c/man: geoiplookup.1
-Only in c/man: geoiplookup6.1
-Only in c/man: geoipupdate.1
-Only in /home/mdomsch/cvs/fedora-extras/GeoIP/devel/GeoIP-1.4.6/man: Makefile.in
-Only in /home/mdomsch/cvs/fedora-extras/GeoIP/devel/GeoIP-1.4.6/: missing
-diff -urp --exclude=from=/home/mdomsch/excludes --minimal /home/mdomsch/cvs/fedora-extras/GeoIP/devel/GeoIP-1.4.6/README c/README
---- /home/mdomsch/cvs/fedora-extras/GeoIP/devel/GeoIP-1.4.6/README	2009-02-24 10:03:24.000000000 -0600
-+++ c/README	2009-06-10 07:35:19.000000000 -0500
-@@ -182,4 +182,27 @@ from XORG X-Server). It happens at least
- If GEOIP_MMAP_CACHE doesn't work on a 64bit machine, try adding
- the flag "MAP_32BIT" to the mmap call.
- 
-+If you get a "passing argument 3 of 'gethostbyname_r' from incompatible pointer type"
-+error on AIX, download and/or untar a fresh copy of GeoIP.  ( To avoid cached
-+results from a previous ./configure run )
-+
-+cd ./GeoIP-1.4.6
-+then edit the file ./configure
-+
-+and delete these two lines:
-+
-+#define HAVE_GETHOSTBYNAME_R 1
-+
-+#define GETHOSTBYNAME_R_RETURNS_INT 1
-+
-+then save the configure script
-+
-+and build it as usual
-+
-+./configure
-+make
-+sudo make install
-+
-+
-+
- To submit a patch, please contact support at maxmind.com 
-Only in /home/mdomsch/cvs/fedora-extras/GeoIP/devel/GeoIP-1.4.6/: README.fedora
-Only in c/: regioncode
-Only in c/test: CVS
-Only in c/test: fail_test.txt
-Only in /home/mdomsch/cvs/fedora-extras/GeoIP/devel/GeoIP-1.4.6/test: Makefile.in
-Only in c/test: proxy_test.txt
-Only in c/: timezone
-- 
cgit v0.10.2


>From 397b4b3992842ece78cd3cef198d7b1ba2b37e58 Mon Sep 17 00:00:00 2001
From: Dennis Gilmore <dennis at ausil.us>
Date: Wed, 13 Feb 2013 09:15:53 -0600
Subject: - Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild


diff --git a/GeoIP.spec b/GeoIP.spec
index 3800735..799b7b3 100644
--- a/GeoIP.spec
+++ b/GeoIP.spec
@@ -1,6 +1,6 @@
 Name:		GeoIP
 Version:	1.4.8
-Release:	4%{?dist}
+Release:	5%{?dist}
 Summary:	Library for country/city/organization to IP address or hostname mapping
 Group:		Development/Libraries
 License:	LGPLv2+ and GPLv2+
@@ -103,6 +103,9 @@ rm -rf %{buildroot}
 %{_libdir}/libGeoIPUpdate.so
 
 %changelog
+* Wed Feb 13 2013 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 1.4.8-5
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
+
 * Mon Oct 22 2012 Paul Howarth <paul at city-fan.org> - 1.4.8-4
 - libGeoIPUpdate and geoipupdate (which is linked against it) are GPL-licensed
   rather than LGPL-licensed (#840896)
-- 
cgit v0.10.2


>From 32b72e62e5808ae35429f7e5e001d1edc152883f Mon Sep 17 00:00:00 2001
From: Paul Howarth <paul at city-fan.org>
Date: Sun, 24 Mar 2013 13:27:59 +0000
Subject: Fix config.guess and config.sub to add aarch64 support (#925403)


diff --git a/GeoIP-aarch64.patch b/GeoIP-aarch64.patch
new file mode 100644
index 0000000..8114fb0
--- /dev/null
+++ b/GeoIP-aarch64.patch
@@ -0,0 +1,1348 @@
+diff -urN GeoIP-1.4.8/config.guess GeoIP-1.4.8-aarch64/config.guess
+--- GeoIP-1.4.8/config.guess	2011-03-27 16:26:02.000000000 -0500
++++ GeoIP-1.4.8-aarch64/config.guess	2013-03-03 04:58:29.382153170 -0600
+@@ -1,10 +1,10 @@
+ #! /bin/sh
+ # Attempt to guess a canonical system name.
+ #   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+-#   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
+-#   Free Software Foundation, Inc.
++#   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
++#   2011, 2012 Free Software Foundation, Inc.
+ 
+-timestamp='2009-06-10'
++timestamp='2012-09-25'
+ 
+ # This file is free software; you can redistribute it and/or modify it
+ # under the terms of the GNU General Public License as published by
+@@ -17,9 +17,7 @@
+ # General Public License for more details.
+ #
+ # You should have received a copy of the GNU General Public License
+-# along with this program; if not, write to the Free Software
+-# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
+-# 02110-1301, USA.
++# along with this program; if not, see <http://www.gnu.org/licenses/>.
+ #
+ # As a special exception to the GNU General Public License, if you
+ # distribute this file as part of a program that contains a
+@@ -27,16 +25,16 @@
+ # the same distribution terms that you use for the rest of that program.
+ 
+ 
+-# Originally written by Per Bothner <per at bothner.com>.
+-# Please send patches to <config-patches at gnu.org>.  Submit a context
+-# diff and a properly formatted ChangeLog entry.
++# Originally written by Per Bothner.  Please send patches (context
++# diff format) to <config-patches at gnu.org> and include a ChangeLog
++# entry.
+ #
+ # This script attempts to guess a canonical system name similar to
+ # config.sub.  If it succeeds, it prints the system name on stdout, and
+ # exits with 0.  Otherwise, it exits with 1.
+ #
+-# The plan is that this can be called by configure scripts if you
+-# don't specify an explicit build system type.
++# You can get the latest version of this script from:
++# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
+ 
+ me=`echo "$0" | sed -e 's,.*/,,'`
+ 
+@@ -56,8 +54,9 @@
+ GNU config.guess ($timestamp)
+ 
+ Originally written by Per Bothner.
+-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
+-2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
++Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
++2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
++Free Software Foundation, Inc.
+ 
+ This is free software; see the source for copying conditions.  There is NO
+ warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
+@@ -144,7 +143,7 @@
+ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
+     *:NetBSD:*:*)
+ 	# NetBSD (nbsd) targets should (where applicable) match one or
+-	# more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*,
++	# more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*,
+ 	# *-*-netbsdecoff* and *-*-netbsd*.  For targets that recently
+ 	# switched to ELF, *-*-netbsd* would select the old
+ 	# object file format.  This provides both forward
+@@ -180,7 +179,7 @@
+ 		fi
+ 		;;
+ 	    *)
+-	        os=netbsd
++		os=netbsd
+ 		;;
+ 	esac
+ 	# The OS release
+@@ -201,6 +200,10 @@
+ 	# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
+ 	echo "${machine}-${os}${release}"
+ 	exit ;;
++    *:Bitrig:*:*)
++	UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'`
++	echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE}
++	exit ;;
+     *:OpenBSD:*:*)
+ 	UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
+ 	echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
+@@ -223,7 +226,7 @@
+ 		UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
+ 		;;
+ 	*5.*)
+-	        UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
++		UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
+ 		;;
+ 	esac
+ 	# According to Compaq, /usr/sbin/psrinfo has been available on
+@@ -269,7 +272,10 @@
+ 	# A Xn.n version is an unreleased experimental baselevel.
+ 	# 1.2 uses "1.2" for uname -r.
+ 	echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+-	exit ;;
++	# Reset EXIT trap before exiting to avoid spurious non-zero exit code.
++	exitcode=$?
++	trap '' 0
++	exit $exitcode ;;
+     Alpha\ *:Windows_NT*:*)
+ 	# How do we know it's Interix rather than the generic POSIX subsystem?
+ 	# Should we change UNAME_MACHINE based on the output of uname instead
+@@ -295,12 +301,12 @@
+ 	echo s390-ibm-zvmoe
+ 	exit ;;
+     *:OS400:*:*)
+-        echo powerpc-ibm-os400
++	echo powerpc-ibm-os400
+ 	exit ;;
+     arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
+ 	echo arm-acorn-riscix${UNAME_RELEASE}
+ 	exit ;;
+-    arm:riscos:*:*|arm:RISCOS:*:*)
++    arm*:riscos:*:*|arm*:RISCOS:*:*)
+ 	echo arm-unknown-riscos
+ 	exit ;;
+     SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
+@@ -333,6 +339,9 @@
+     sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
+ 	echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ 	exit ;;
++    i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*)
++	echo i386-pc-auroraux${UNAME_RELEASE}
++	exit ;;
+     i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
+ 	eval $set_cc_for_build
+ 	SUN_ARCH="i386"
+@@ -391,23 +400,23 @@
+     # MiNT.  But MiNT is downward compatible to TOS, so this should
+     # be no problem.
+     atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
+-        echo m68k-atari-mint${UNAME_RELEASE}
++	echo m68k-atari-mint${UNAME_RELEASE}
+ 	exit ;;
+     atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
+ 	echo m68k-atari-mint${UNAME_RELEASE}
+-        exit ;;
++	exit ;;
+     *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
+-        echo m68k-atari-mint${UNAME_RELEASE}
++	echo m68k-atari-mint${UNAME_RELEASE}
+ 	exit ;;
+     milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
+-        echo m68k-milan-mint${UNAME_RELEASE}
+-        exit ;;
++	echo m68k-milan-mint${UNAME_RELEASE}
++	exit ;;
+     hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
+-        echo m68k-hades-mint${UNAME_RELEASE}
+-        exit ;;
++	echo m68k-hades-mint${UNAME_RELEASE}
++	exit ;;
+     *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
+-        echo m68k-unknown-mint${UNAME_RELEASE}
+-        exit ;;
++	echo m68k-unknown-mint${UNAME_RELEASE}
++	exit ;;
+     m68k:machten:*:*)
+ 	echo m68k-apple-machten${UNAME_RELEASE}
+ 	exit ;;
+@@ -477,8 +486,8 @@
+ 	echo m88k-motorola-sysv3
+ 	exit ;;
+     AViiON:dgux:*:*)
+-        # DG/UX returns AViiON for all architectures
+-        UNAME_PROCESSOR=`/usr/bin/uname -p`
++	# DG/UX returns AViiON for all architectures
++	UNAME_PROCESSOR=`/usr/bin/uname -p`
+ 	if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
+ 	then
+ 	    if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
+@@ -491,7 +500,7 @@
+ 	else
+ 	    echo i586-dg-dgux${UNAME_RELEASE}
+ 	fi
+- 	exit ;;
++	exit ;;
+     M88*:DolphinOS:*:*)	# DolphinOS (SVR3)
+ 	echo m88k-dolphin-sysv3
+ 	exit ;;
+@@ -548,7 +557,7 @@
+ 		echo rs6000-ibm-aix3.2
+ 	fi
+ 	exit ;;
+-    *:AIX:*:[456])
++    *:AIX:*:[4567])
+ 	IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
+ 	if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
+ 		IBM_ARCH=rs6000
+@@ -591,52 +600,52 @@
+ 	    9000/[678][0-9][0-9])
+ 		if [ -x /usr/bin/getconf ]; then
+ 		    sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
+-                    sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
+-                    case "${sc_cpu_version}" in
+-                      523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
+-                      528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
+-                      532)                      # CPU_PA_RISC2_0
+-                        case "${sc_kernel_bits}" in
+-                          32) HP_ARCH="hppa2.0n" ;;
+-                          64) HP_ARCH="hppa2.0w" ;;
++		    sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
++		    case "${sc_cpu_version}" in
++		      523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
++		      528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
++		      532)                      # CPU_PA_RISC2_0
++			case "${sc_kernel_bits}" in
++			  32) HP_ARCH="hppa2.0n" ;;
++			  64) HP_ARCH="hppa2.0w" ;;
+ 			  '') HP_ARCH="hppa2.0" ;;   # HP-UX 10.20
+-                        esac ;;
+-                    esac
++			esac ;;
++		    esac
+ 		fi
+ 		if [ "${HP_ARCH}" = "" ]; then
+ 		    eval $set_cc_for_build
+-		    sed 's/^              //' << EOF >$dummy.c
++		    sed 's/^		//' << EOF >$dummy.c
++
++		#define _HPUX_SOURCE
++		#include <stdlib.h>
++		#include <unistd.h>
++
++		int main ()
++		{
++		#if defined(_SC_KERNEL_BITS)
++		    long bits = sysconf(_SC_KERNEL_BITS);
++		#endif
++		    long cpu  = sysconf (_SC_CPU_VERSION);
+ 
+-              #define _HPUX_SOURCE
+-              #include <stdlib.h>
+-              #include <unistd.h>
+-
+-              int main ()
+-              {
+-              #if defined(_SC_KERNEL_BITS)
+-                  long bits = sysconf(_SC_KERNEL_BITS);
+-              #endif
+-                  long cpu  = sysconf (_SC_CPU_VERSION);
+-
+-                  switch (cpu)
+-              	{
+-              	case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
+-              	case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
+-              	case CPU_PA_RISC2_0:
+-              #if defined(_SC_KERNEL_BITS)
+-              	    switch (bits)
+-              		{
+-              		case 64: puts ("hppa2.0w"); break;
+-              		case 32: puts ("hppa2.0n"); break;
+-              		default: puts ("hppa2.0"); break;
+-              		} break;
+-              #else  /* !defined(_SC_KERNEL_BITS) */
+-              	    puts ("hppa2.0"); break;
+-              #endif
+-              	default: puts ("hppa1.0"); break;
+-              	}
+-                  exit (0);
+-              }
++		    switch (cpu)
++			{
++			case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
++			case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
++			case CPU_PA_RISC2_0:
++		#if defined(_SC_KERNEL_BITS)
++			    switch (bits)
++				{
++				case 64: puts ("hppa2.0w"); break;
++				case 32: puts ("hppa2.0n"); break;
++				default: puts ("hppa2.0"); break;
++				} break;
++		#else  /* !defined(_SC_KERNEL_BITS) */
++			    puts ("hppa2.0"); break;
++		#endif
++			default: puts ("hppa1.0"); break;
++			}
++		    exit (0);
++		}
+ EOF
+ 		    (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
+ 		    test -z "$HP_ARCH" && HP_ARCH=hppa
+@@ -727,22 +736,22 @@
+ 	exit ;;
+     C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
+ 	echo c1-convex-bsd
+-        exit ;;
++	exit ;;
+     C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
+ 	if getsysinfo -f scalar_acc
+ 	then echo c32-convex-bsd
+ 	else echo c2-convex-bsd
+ 	fi
+-        exit ;;
++	exit ;;
+     C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
+ 	echo c34-convex-bsd
+-        exit ;;
++	exit ;;
+     C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
+ 	echo c38-convex-bsd
+-        exit ;;
++	exit ;;
+     C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
+ 	echo c4-convex-bsd
+-        exit ;;
++	exit ;;
+     CRAY*Y-MP:*:*:*)
+ 	echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ 	exit ;;
+@@ -766,14 +775,14 @@
+ 	exit ;;
+     F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
+ 	FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+-        FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
+-        FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
+-        echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
+-        exit ;;
++	FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
++	FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
++	echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
++	exit ;;
+     5000:UNIX_System_V:4.*:*)
+-        FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
+-        FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
+-        echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
++	FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
++	FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
++	echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
+ 	exit ;;
+     i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
+ 	echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
+@@ -785,34 +794,39 @@
+ 	echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
+ 	exit ;;
+     *:FreeBSD:*:*)
+-	case ${UNAME_MACHINE} in
+-	    pc98)
+-		echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
++	UNAME_PROCESSOR=`/usr/bin/uname -p`
++	case ${UNAME_PROCESSOR} in
+ 	    amd64)
+ 		echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+ 	    *)
+-		echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
++		echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+ 	esac
+ 	exit ;;
+     i*:CYGWIN*:*)
+ 	echo ${UNAME_MACHINE}-pc-cygwin
+ 	exit ;;
++    *:MINGW64*:*)
++	echo ${UNAME_MACHINE}-pc-mingw64
++	exit ;;
+     *:MINGW*:*)
+ 	echo ${UNAME_MACHINE}-pc-mingw32
+ 	exit ;;
++    i*:MSYS*:*)
++	echo ${UNAME_MACHINE}-pc-msys
++	exit ;;
+     i*:windows32*:*)
+-    	# uname -m includes "-pc" on this system.
+-    	echo ${UNAME_MACHINE}-mingw32
++	# uname -m includes "-pc" on this system.
++	echo ${UNAME_MACHINE}-mingw32
+ 	exit ;;
+     i*:PW*:*)
+ 	echo ${UNAME_MACHINE}-pc-pw32
+ 	exit ;;
+-    *:Interix*:[3456]*)
+-    	case ${UNAME_MACHINE} in
++    *:Interix*:*)
++	case ${UNAME_MACHINE} in
+ 	    x86)
+ 		echo i586-pc-interix${UNAME_RELEASE}
+ 		exit ;;
+-	    EM64T | authenticamd | genuineintel)
++	    authenticamd | genuineintel | EM64T)
+ 		echo x86_64-unknown-interix${UNAME_RELEASE}
+ 		exit ;;
+ 	    IA64)
+@@ -854,6 +868,27 @@
+     i*86:Minix:*:*)
+ 	echo ${UNAME_MACHINE}-pc-minix
+ 	exit ;;
++    aarch64:Linux:*:*)
++	echo ${UNAME_MACHINE}-unknown-linux-gnu
++	exit ;;
++    aarch64_be:Linux:*:*)
++	UNAME_MACHINE=aarch64_be
++	echo ${UNAME_MACHINE}-unknown-linux-gnu
++	exit ;;
++    alpha:Linux:*:*)
++	case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
++	  EV5)   UNAME_MACHINE=alphaev5 ;;
++	  EV56)  UNAME_MACHINE=alphaev56 ;;
++	  PCA56) UNAME_MACHINE=alphapca56 ;;
++	  PCA57) UNAME_MACHINE=alphapca56 ;;
++	  EV6)   UNAME_MACHINE=alphaev6 ;;
++	  EV67)  UNAME_MACHINE=alphaev67 ;;
++	  EV68*) UNAME_MACHINE=alphaev68 ;;
++	esac
++	objdump --private-headers /bin/sh | grep -q ld.so.1
++	if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
++	echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
++	exit ;;
+     arm*:Linux:*:*)
+ 	eval $set_cc_for_build
+ 	if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
+@@ -861,20 +896,40 @@
+ 	then
+ 	    echo ${UNAME_MACHINE}-unknown-linux-gnu
+ 	else
+-	    echo ${UNAME_MACHINE}-unknown-linux-gnueabi
++	    if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
++		| grep -q __ARM_PCS_VFP
++	    then
++		echo ${UNAME_MACHINE}-unknown-linux-gnueabi
++	    else
++		echo ${UNAME_MACHINE}-unknown-linux-gnueabihf
++	    fi
+ 	fi
+ 	exit ;;
+     avr32*:Linux:*:*)
+ 	echo ${UNAME_MACHINE}-unknown-linux-gnu
+ 	exit ;;
+     cris:Linux:*:*)
+-	echo cris-axis-linux-gnu
++	echo ${UNAME_MACHINE}-axis-linux-gnu
+ 	exit ;;
+     crisv32:Linux:*:*)
+-	echo crisv32-axis-linux-gnu
++	echo ${UNAME_MACHINE}-axis-linux-gnu
+ 	exit ;;
+     frv:Linux:*:*)
+-    	echo frv-unknown-linux-gnu
++	echo ${UNAME_MACHINE}-unknown-linux-gnu
++	exit ;;
++    hexagon:Linux:*:*)
++	echo ${UNAME_MACHINE}-unknown-linux-gnu
++	exit ;;
++    i*86:Linux:*:*)
++	LIBC=gnu
++	eval $set_cc_for_build
++	sed 's/^	//' << EOF >$dummy.c
++	#ifdef __dietlibc__
++	LIBC=dietlibc
++	#endif
++EOF
++	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'`
++	echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
+ 	exit ;;
+     ia64:Linux:*:*)
+ 	echo ${UNAME_MACHINE}-unknown-linux-gnu
+@@ -901,39 +956,18 @@
+ 	#endif
+ 	#endif
+ EOF
+-	eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
+-	    /^CPU/{
+-		s: ::g
+-		p
+-	    }'`"
++	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
+ 	test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
+ 	;;
+     or32:Linux:*:*)
+-	echo or32-unknown-linux-gnu
+-	exit ;;
+-    ppc:Linux:*:*)
+-	echo powerpc-unknown-linux-gnu
+-	exit ;;
+-    ppc64:Linux:*:*)
+-	echo powerpc64-unknown-linux-gnu
+-	exit ;;
+-    alpha:Linux:*:*)
+-	case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
+-	  EV5)   UNAME_MACHINE=alphaev5 ;;
+-	  EV56)  UNAME_MACHINE=alphaev56 ;;
+-	  PCA56) UNAME_MACHINE=alphapca56 ;;
+-	  PCA57) UNAME_MACHINE=alphapca56 ;;
+-	  EV6)   UNAME_MACHINE=alphaev6 ;;
+-	  EV67)  UNAME_MACHINE=alphaev67 ;;
+-	  EV68*) UNAME_MACHINE=alphaev68 ;;
+-        esac
+-	objdump --private-headers /bin/sh | grep -q ld.so.1
+-	if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
+-	echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
++	echo ${UNAME_MACHINE}-unknown-linux-gnu
+ 	exit ;;
+     padre:Linux:*:*)
+ 	echo sparc-unknown-linux-gnu
+ 	exit ;;
++    parisc64:Linux:*:* | hppa64:Linux:*:*)
++	echo hppa64-unknown-linux-gnu
++	exit ;;
+     parisc:Linux:*:* | hppa:Linux:*:*)
+ 	# Look for CPU level
+ 	case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
+@@ -942,14 +976,17 @@
+ 	  *)    echo hppa-unknown-linux-gnu ;;
+ 	esac
+ 	exit ;;
+-    parisc64:Linux:*:* | hppa64:Linux:*:*)
+-	echo hppa64-unknown-linux-gnu
++    ppc64:Linux:*:*)
++	echo powerpc64-unknown-linux-gnu
++	exit ;;
++    ppc:Linux:*:*)
++	echo powerpc-unknown-linux-gnu
+ 	exit ;;
+     s390:Linux:*:* | s390x:Linux:*:*)
+ 	echo ${UNAME_MACHINE}-ibm-linux
+ 	exit ;;
+     sh64*:Linux:*:*)
+-    	echo ${UNAME_MACHINE}-unknown-linux-gnu
++	echo ${UNAME_MACHINE}-unknown-linux-gnu
+ 	exit ;;
+     sh*:Linux:*:*)
+ 	echo ${UNAME_MACHINE}-unknown-linux-gnu
+@@ -957,67 +994,18 @@
+     sparc:Linux:*:* | sparc64:Linux:*:*)
+ 	echo ${UNAME_MACHINE}-unknown-linux-gnu
+ 	exit ;;
++    tile*:Linux:*:*)
++	echo ${UNAME_MACHINE}-unknown-linux-gnu
++	exit ;;
+     vax:Linux:*:*)
+ 	echo ${UNAME_MACHINE}-dec-linux-gnu
+ 	exit ;;
+     x86_64:Linux:*:*)
+-	echo x86_64-unknown-linux-gnu
++	echo ${UNAME_MACHINE}-unknown-linux-gnu
+ 	exit ;;
+     xtensa*:Linux:*:*)
+-    	echo ${UNAME_MACHINE}-unknown-linux-gnu
++	echo ${UNAME_MACHINE}-unknown-linux-gnu
+ 	exit ;;
+-    i*86:Linux:*:*)
+-	# The BFD linker knows what the default object file format is, so
+-	# first see if it will tell us. cd to the root directory to prevent
+-	# problems with other programs or directories called `ld' in the path.
+-	# Set LC_ALL=C to ensure ld outputs messages in English.
+-	ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \
+-			 | sed -ne '/supported targets:/!d
+-				    s/[ 	][ 	]*/ /g
+-				    s/.*supported targets: *//
+-				    s/ .*//
+-				    p'`
+-        case "$ld_supported_targets" in
+-	  elf32-i386)
+-		TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu"
+-		;;
+-	esac
+-	# Determine whether the default compiler is a.out or elf
+-	eval $set_cc_for_build
+-	sed 's/^	//' << EOF >$dummy.c
+-	#include <features.h>
+-	#ifdef __ELF__
+-	# ifdef __GLIBC__
+-	#  if __GLIBC__ >= 2
+-	LIBC=gnu
+-	#  else
+-	LIBC=gnulibc1
+-	#  endif
+-	# else
+-	LIBC=gnulibc1
+-	# endif
+-	#else
+-	#if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC)
+-	LIBC=gnu
+-	#else
+-	LIBC=gnuaout
+-	#endif
+-	#endif
+-	#ifdef __dietlibc__
+-	LIBC=dietlibc
+-	#endif
+-EOF
+-	eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
+-	    /^LIBC/{
+-		s: ::g
+-		p
+-	    }'`"
+-	test x"${LIBC}" != x && {
+-		echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
+-		exit
+-	}
+-	test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; }
+-	;;
+     i*86:DYNIX/ptx:4*:*)
+ 	# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
+ 	# earlier versions are messed up and put the nodename in both
+@@ -1025,11 +1013,11 @@
+ 	echo i386-sequent-sysv4
+ 	exit ;;
+     i*86:UNIX_SV:4.2MP:2.*)
+-        # Unixware is an offshoot of SVR4, but it has its own version
+-        # number series starting with 2...
+-        # I am not positive that other SVR4 systems won't match this,
++	# Unixware is an offshoot of SVR4, but it has its own version
++	# number series starting with 2...
++	# I am not positive that other SVR4 systems won't match this,
+ 	# I just have to hope.  -- rms.
+-        # Use sysv4.2uw... so that sysv4* matches it.
++	# Use sysv4.2uw... so that sysv4* matches it.
+ 	echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
+ 	exit ;;
+     i*86:OS/2:*:*)
+@@ -1061,7 +1049,7 @@
+ 	fi
+ 	exit ;;
+     i*86:*:5:[678]*)
+-    	# UnixWare 7.x, OpenUNIX and OpenServer 6.
++	# UnixWare 7.x, OpenUNIX and OpenServer 6.
+ 	case `/bin/uname -X | grep "^Machine"` in
+ 	    *486*)	     UNAME_MACHINE=i486 ;;
+ 	    *Pentium)	     UNAME_MACHINE=i586 ;;
+@@ -1089,13 +1077,13 @@
+ 	exit ;;
+     pc:*:*:*)
+ 	# Left here for compatibility:
+-        # uname -m prints for DJGPP always 'pc', but it prints nothing about
+-        # the processor, so we play safe by assuming i586.
++	# uname -m prints for DJGPP always 'pc', but it prints nothing about
++	# the processor, so we play safe by assuming i586.
+ 	# Note: whatever this is, it MUST be the same as what config.sub
+ 	# prints for the "djgpp" host, or else GDB configury will decide that
+ 	# this is a cross-build.
+ 	echo i586-pc-msdosdjgpp
+-        exit ;;
++	exit ;;
+     Intel:Mach:3*:*)
+ 	echo i386-pc-mach3
+ 	exit ;;
+@@ -1130,8 +1118,8 @@
+ 	/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
+ 	  && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
+     3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
+-        /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+-          && { echo i486-ncr-sysv4; exit; } ;;
++	/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
++	  && { echo i486-ncr-sysv4; exit; } ;;
+     NCR*:*:4.2:* | MPRAS*:*:4.2:*)
+ 	OS_REL='.3'
+ 	test -r /etc/.relid \
+@@ -1174,10 +1162,10 @@
+ 		echo ns32k-sni-sysv
+ 	fi
+ 	exit ;;
+-    PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
+-                      # says <Richard.M.Bartel at ccMail.Census.GOV>
+-        echo i586-unisys-sysv4
+-        exit ;;
++    PENTIUM:*:4.0*:*)	# Unisys `ClearPath HMP IX 4000' SVR4/MP effort
++			# says <Richard.M.Bartel at ccMail.Census.GOV>
++	echo i586-unisys-sysv4
++	exit ;;
+     *:UNIX_System_V:4*:FTX*)
+ 	# From Gerald Hewes <hewes at openmarket.com>.
+ 	# How about differentiating between stratus architectures? -djm
+@@ -1203,11 +1191,11 @@
+ 	exit ;;
+     R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
+ 	if [ -d /usr/nec ]; then
+-	        echo mips-nec-sysv${UNAME_RELEASE}
++		echo mips-nec-sysv${UNAME_RELEASE}
+ 	else
+-	        echo mips-unknown-sysv${UNAME_RELEASE}
++		echo mips-unknown-sysv${UNAME_RELEASE}
+ 	fi
+-        exit ;;
++	exit ;;
+     BeBox:BeOS:*:*)	# BeOS running on hardware made by Be, PPC only.
+ 	echo powerpc-be-beos
+ 	exit ;;
+@@ -1220,6 +1208,9 @@
+     BePC:Haiku:*:*)	# Haiku running on Intel PC compatible.
+ 	echo i586-pc-haiku
+ 	exit ;;
++    x86_64:Haiku:*:*)
++	echo x86_64-unknown-haiku
++	exit ;;
+     SX-4:SUPER-UX:*:*)
+ 	echo sx4-nec-superux${UNAME_RELEASE}
+ 	exit ;;
+@@ -1247,6 +1238,16 @@
+     *:Darwin:*:*)
+ 	UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
+ 	case $UNAME_PROCESSOR in
++	    i386)
++		eval $set_cc_for_build
++		if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
++		  if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
++		      (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
++		      grep IS_64BIT_ARCH >/dev/null
++		  then
++		      UNAME_PROCESSOR="x86_64"
++		  fi
++		fi ;;
+ 	    unknown) UNAME_PROCESSOR=powerpc ;;
+ 	esac
+ 	echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
+@@ -1262,7 +1263,10 @@
+     *:QNX:*:4*)
+ 	echo i386-pc-qnx
+ 	exit ;;
+-    NSE-?:NONSTOP_KERNEL:*:*)
++    NEO-?:NONSTOP_KERNEL:*:*)
++	echo neo-tandem-nsk${UNAME_RELEASE}
++	exit ;;
++    NSE-*:NONSTOP_KERNEL:*:*)
+ 	echo nse-tandem-nsk${UNAME_RELEASE}
+ 	exit ;;
+     NSR-?:NONSTOP_KERNEL:*:*)
+@@ -1307,13 +1311,13 @@
+ 	echo pdp10-unknown-its
+ 	exit ;;
+     SEI:*:*:SEIUX)
+-        echo mips-sei-seiux${UNAME_RELEASE}
++	echo mips-sei-seiux${UNAME_RELEASE}
+ 	exit ;;
+     *:DragonFly:*:*)
+ 	echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
+ 	exit ;;
+     *:*VMS:*:*)
+-    	UNAME_MACHINE=`(uname -p) 2>/dev/null`
++	UNAME_MACHINE=`(uname -p) 2>/dev/null`
+ 	case "${UNAME_MACHINE}" in
+ 	    A*) echo alpha-dec-vms ; exit ;;
+ 	    I*) echo ia64-dec-vms ; exit ;;
+@@ -1331,11 +1335,11 @@
+     i*86:AROS:*:*)
+ 	echo ${UNAME_MACHINE}-pc-aros
+ 	exit ;;
++    x86_64:VMkernel:*:*)
++	echo ${UNAME_MACHINE}-unknown-esx
++	exit ;;
+ esac
+ 
+-#echo '(No uname command or uname output not recognized.)' 1>&2
+-#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
+-
+ eval $set_cc_for_build
+ cat >$dummy.c <<EOF
+ #ifdef _SEQUENT_
+@@ -1353,11 +1357,11 @@
+ #include <sys/param.h>
+   printf ("m68k-sony-newsos%s\n",
+ #ifdef NEWSOS4
+-          "4"
++	"4"
+ #else
+-	  ""
++	""
+ #endif
+-         ); exit (0);
++	); exit (0);
+ #endif
+ #endif
+ 
+diff -urN GeoIP-1.4.8/config.sub GeoIP-1.4.8-aarch64/config.sub
+--- GeoIP-1.4.8/config.sub	2011-03-27 16:26:02.000000000 -0500
++++ GeoIP-1.4.8-aarch64/config.sub	2013-03-03 04:58:29.429147735 -0600
+@@ -1,10 +1,10 @@
+ #! /bin/sh
+ # Configuration validation subroutine script.
+ #   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+-#   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
+-#   Free Software Foundation, Inc.
++#   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
++#   2011, 2012 Free Software Foundation, Inc.
+ 
+-timestamp='2009-06-11'
++timestamp='2012-10-10'
+ 
+ # This file is (in principle) common to ALL GNU software.
+ # The presence of a machine in this file suggests that SOME GNU software
+@@ -21,9 +21,7 @@
+ # GNU General Public License for more details.
+ #
+ # You should have received a copy of the GNU General Public License
+-# along with this program; if not, write to the Free Software
+-# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
+-# 02110-1301, USA.
++# along with this program; if not, see <http://www.gnu.org/licenses/>.
+ #
+ # As a special exception to the GNU General Public License, if you
+ # distribute this file as part of a program that contains a
+@@ -32,13 +30,16 @@
+ 
+ 
+ # Please send patches to <config-patches at gnu.org>.  Submit a context
+-# diff and a properly formatted ChangeLog entry.
++# diff and a properly formatted GNU ChangeLog entry.
+ #
+ # Configuration subroutine to validate and canonicalize a configuration type.
+ # Supply the specified configuration type as an argument.
+ # If it is invalid, we print an error message on stderr and exit with code 1.
+ # Otherwise, we print the canonical config type on stdout and succeed.
+ 
++# You can get the latest version of this script from:
++# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
++
+ # This file is supposed to be the same for all GNU packages
+ # and recognize all the CPU types, system types and aliases
+ # that are meaningful with *any* GNU software.
+@@ -72,8 +73,9 @@
+ version="\
+ GNU config.sub ($timestamp)
+ 
+-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
+-2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
++Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
++2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
++Free Software Foundation, Inc.
+ 
+ This is free software; see the source for copying conditions.  There is NO
+ warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
+@@ -120,13 +122,18 @@
+ # Here we must recognize all the valid KERNEL-OS combinations.
+ maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
+ case $maybe_os in
+-  nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \
+-  uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \
++  nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
++  linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
++  knetbsd*-gnu* | netbsd*-gnu* | \
+   kopensolaris*-gnu* | \
+   storm-chaos* | os2-emx* | rtmk-nova*)
+     os=-$maybe_os
+     basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
+     ;;
++  android-linux)
++    os=-linux-android
++    basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown
++    ;;
+   *)
+     basic_machine=`echo $1 | sed 's/-[^-]*$//'`
+     if [ $basic_machine != $1 ]
+@@ -149,12 +156,12 @@
+ 	-convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
+ 	-c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
+ 	-harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
+-	-apple | -axis | -knuth | -cray)
++	-apple | -axis | -knuth | -cray | -microblaze*)
+ 		os=
+ 		basic_machine=$1
+ 		;;
+-        -bluegene*)
+-	        os=-cnk
++	-bluegene*)
++		os=-cnk
+ 		;;
+ 	-sim | -cisco | -oki | -wec | -winbond)
+ 		os=
+@@ -170,10 +177,10 @@
+ 		os=-chorusos
+ 		basic_machine=$1
+ 		;;
+- 	-chorusrdb)
+- 		os=-chorusrdb
++	-chorusrdb)
++		os=-chorusrdb
+ 		basic_machine=$1
+- 		;;
++		;;
+ 	-hiux*)
+ 		os=-hiuxwe2
+ 		;;
+@@ -218,6 +225,12 @@
+ 	-isc*)
+ 		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ 		;;
++	-lynx*178)
++		os=-lynxos178
++		;;
++	-lynx*5)
++		os=-lynxos5
++		;;
+ 	-lynx*)
+ 		os=-lynxos
+ 		;;
+@@ -242,20 +255,25 @@
+ 	# Some are omitted here because they have special meanings below.
+ 	1750a | 580 \
+ 	| a29k \
++	| aarch64 | aarch64_be \
+ 	| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
+ 	| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
+ 	| am33_2.0 \
+ 	| arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \
++        | be32 | be64 \
+ 	| bfin \
+ 	| c4x | clipper \
+ 	| d10v | d30v | dlx | dsp16xx \
++	| epiphany \
+ 	| fido | fr30 | frv \
+ 	| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
++	| hexagon \
+ 	| i370 | i860 | i960 | ia64 \
+ 	| ip2k | iq2000 \
++	| le32 | le64 \
+ 	| lm32 \
+ 	| m32c | m32r | m32rle | m68000 | m68k | m88k \
+-	| maxq | mb | microblaze | mcore | mep | metag \
++	| maxq | mb | microblaze | microblazeel | mcore | mep | metag \
+ 	| mips | mipsbe | mipseb | mipsel | mipsle \
+ 	| mips16 \
+ 	| mips64 | mips64el \
+@@ -278,27 +296,39 @@
+ 	| moxie \
+ 	| mt \
+ 	| msp430 \
++	| nds32 | nds32le | nds32be \
+ 	| nios | nios2 \
+ 	| ns16k | ns32k \
++	| open8 \
+ 	| or32 \
+ 	| pdp10 | pdp11 | pj | pjl \
+-	| powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
++	| powerpc | powerpc64 | powerpc64le | powerpcle \
+ 	| pyramid \
++	| rl78 | rx \
+ 	| score \
+ 	| sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
+ 	| sh64 | sh64le \
+ 	| sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
+ 	| sparcv8 | sparcv9 | sparcv9b | sparcv9v \
+-	| spu | strongarm \
+-	| tahoe | thumb | tic4x | tic80 | tron \
+-	| v850 | v850e \
++	| spu \
++	| tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \
++	| ubicom32 \
++	| v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \
+ 	| we32k \
+-	| x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \
++	| x86 | xc16x | xstormy16 | xtensa \
+ 	| z8k | z80)
+ 		basic_machine=$basic_machine-unknown
+ 		;;
+-	m6811 | m68hc11 | m6812 | m68hc12)
+-		# Motorola 68HC11/12.
++	c54x)
++		basic_machine=tic54x-unknown
++		;;
++	c55x)
++		basic_machine=tic55x-unknown
++		;;
++	c6x)
++		basic_machine=tic6x-unknown
++		;;
++	m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | picochip)
+ 		basic_machine=$basic_machine-unknown
+ 		os=-none
+ 		;;
+@@ -308,6 +338,21 @@
+ 		basic_machine=mt-unknown
+ 		;;
+ 
++	strongarm | thumb | xscale)
++		basic_machine=arm-unknown
++		;;
++	xgate)
++		basic_machine=$basic_machine-unknown
++		os=-none
++		;;
++	xscaleeb)
++		basic_machine=armeb-unknown
++		;;
++
++	xscaleel)
++		basic_machine=armel-unknown
++		;;
++
+ 	# We use `pc' rather than `unknown'
+ 	# because (1) that's what they normally are, and
+ 	# (2) the word "unknown" tends to confuse beginning users.
+@@ -322,25 +367,30 @@
+ 	# Recognize the basic CPU types with company name.
+ 	580-* \
+ 	| a29k-* \
++	| aarch64-* | aarch64_be-* \
+ 	| alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
+ 	| alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
+ 	| alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
+ 	| arm-*  | armbe-* | armle-* | armeb-* | armv*-* \
+ 	| avr-* | avr32-* \
++	| be32-* | be64-* \
+ 	| bfin-* | bs2000-* \
+-	| c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
++	| c[123]* | c30-* | [cjt]90-* | c4x-* \
+ 	| clipper-* | craynv-* | cydra-* \
+ 	| d10v-* | d30v-* | dlx-* \
+ 	| elxsi-* \
+ 	| f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
+ 	| h8300-* | h8500-* \
+ 	| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
++	| hexagon-* \
+ 	| i*86-* | i860-* | i960-* | ia64-* \
+ 	| ip2k-* | iq2000-* \
++	| le32-* | le64-* \
+ 	| lm32-* \
+ 	| m32c-* | m32r-* | m32rle-* \
+ 	| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
+ 	| m88110-* | m88k-* | maxq-* | mcore-* | metag-* \
++	| microblaze-* | microblazeel-* \
+ 	| mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
+ 	| mips16-* \
+ 	| mips64-* | mips64el-* \
+@@ -362,24 +412,29 @@
+ 	| mmix-* \
+ 	| mt-* \
+ 	| msp430-* \
++	| nds32-* | nds32le-* | nds32be-* \
+ 	| nios-* | nios2-* \
+ 	| none-* | np1-* | ns16k-* | ns32k-* \
++	| open8-* \
+ 	| orion-* \
+ 	| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
+-	| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
++	| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \
+ 	| pyramid-* \
+-	| romp-* | rs6000-* \
++	| rl78-* | romp-* | rs6000-* | rx-* \
+ 	| sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
+ 	| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
+ 	| sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
+ 	| sparclite-* \
+-	| sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \
+-	| tahoe-* | thumb-* \
+-	| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* | tile-* \
++	| sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \
++	| tahoe-* \
++	| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
++	| tile*-* \
+ 	| tron-* \
+-	| v850-* | v850e-* | vax-* \
++	| ubicom32-* \
++	| v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \
++	| vax-* \
+ 	| we32k-* \
+-	| x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \
++	| x86-* | x86_64-* | xc16x-* | xps100-* \
+ 	| xstormy16-* | xtensa*-* \
+ 	| ymp-* \
+ 	| z8k-* | z80-*)
+@@ -404,7 +459,7 @@
+ 		basic_machine=a29k-amd
+ 		os=-udi
+ 		;;
+-    	abacus)
++	abacus)
+ 		basic_machine=abacus-unknown
+ 		;;
+ 	adobe68k)
+@@ -474,11 +529,20 @@
+ 		basic_machine=powerpc-ibm
+ 		os=-cnk
+ 		;;
++	c54x-*)
++		basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'`
++		;;
++	c55x-*)
++		basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'`
++		;;
++	c6x-*)
++		basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'`
++		;;
+ 	c90)
+ 		basic_machine=c90-cray
+ 		os=-unicos
+ 		;;
+-        cegcc)
++	cegcc)
+ 		basic_machine=arm-unknown
+ 		os=-cegcc
+ 		;;
+@@ -510,7 +574,7 @@
+ 		basic_machine=craynv-cray
+ 		os=-unicosmp
+ 		;;
+-	cr16)
++	cr16 | cr16-*)
+ 		basic_machine=cr16-unknown
+ 		os=-elf
+ 		;;
+@@ -668,7 +732,6 @@
+ 	i370-ibm* | ibm*)
+ 		basic_machine=i370-ibm
+ 		;;
+-# I'm not sure what "Sysv32" means.  Should this be sysv3.2?
+ 	i*86v32)
+ 		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+ 		os=-sysv32
+@@ -726,6 +789,13 @@
+ 		basic_machine=ns32k-utek
+ 		os=-sysv
+ 		;;
++	microblaze*)
++		basic_machine=microblaze-xilinx
++		;;
++	mingw64)
++		basic_machine=x86_64-pc
++		os=-mingw64
++		;;
+ 	mingw32)
+ 		basic_machine=i386-pc
+ 		os=-mingw32
+@@ -762,10 +832,18 @@
+ 	ms1-*)
+ 		basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
+ 		;;
++	msys)
++		basic_machine=i386-pc
++		os=-msys
++		;;
+ 	mvs)
+ 		basic_machine=i370-ibm
+ 		os=-mvs
+ 		;;
++	nacl)
++		basic_machine=le32-unknown
++		os=-nacl
++		;;
+ 	ncr3000)
+ 		basic_machine=i486-ncr
+ 		os=-sysv4
+@@ -830,6 +908,12 @@
+ 	np1)
+ 		basic_machine=np1-gould
+ 		;;
++	neo-tandem)
++		basic_machine=neo-tandem
++		;;
++	nse-tandem)
++		basic_machine=nse-tandem
++		;;
+ 	nsr-tandem)
+ 		basic_machine=nsr-tandem
+ 		;;
+@@ -912,9 +996,10 @@
+ 		;;
+ 	power)	basic_machine=power-ibm
+ 		;;
+-	ppc)	basic_machine=powerpc-unknown
++	ppc | ppcbe)	basic_machine=powerpc-unknown
+ 		;;
+-	ppc-*)	basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
++	ppc-* | ppcbe-*)
++		basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
+ 		;;
+ 	ppcle | powerpclittle | ppc-le | powerpc-little)
+ 		basic_machine=powerpcle-unknown
+@@ -1008,6 +1093,9 @@
+ 		basic_machine=i860-stratus
+ 		os=-sysv4
+ 		;;
++	strongarm-* | thumb-*)
++		basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'`
++		;;
+ 	sun2)
+ 		basic_machine=m68000-sun
+ 		;;
+@@ -1064,20 +1152,8 @@
+ 		basic_machine=t90-cray
+ 		os=-unicos
+ 		;;
+-	tic54x | c54x*)
+-		basic_machine=tic54x-unknown
+-		os=-coff
+-		;;
+-	tic55x | c55x*)
+-		basic_machine=tic55x-unknown
+-		os=-coff
+-		;;
+-	tic6x | c6x*)
+-		basic_machine=tic6x-unknown
+-		os=-coff
+-		;;
+ 	tile*)
+-		basic_machine=tile-unknown
++		basic_machine=$basic_machine-unknown
+ 		os=-linux-gnu
+ 		;;
+ 	tx39)
+@@ -1147,6 +1223,9 @@
+ 	xps | xps100)
+ 		basic_machine=xps100-honeywell
+ 		;;
++	xscale-* | xscalee[bl]-*)
++		basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'`
++		;;
+ 	ymp)
+ 		basic_machine=ymp-cray
+ 		os=-unicos
+@@ -1244,9 +1323,12 @@
+ if [ x"$os" != x"" ]
+ then
+ case $os in
+-        # First match some system type aliases
+-        # that might get confused with valid system types.
++	# First match some system type aliases
++	# that might get confused with valid system types.
+ 	# -solaris* is a basic system type, with this one exception.
++	-auroraux)
++		os=-auroraux
++		;;
+ 	-solaris1 | -solaris1.*)
+ 		os=`echo $os | sed -e 's|solaris1|sunos4|'`
+ 		;;
+@@ -1268,21 +1350,22 @@
+ 	# -sysv* is not here because it comes later, after sysvr4.
+ 	-gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
+ 	      | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
+-	      | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
+-	      | -kopensolaris* \
++	      | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
++	      | -sym* | -kopensolaris* \
+ 	      | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
+ 	      | -aos* | -aros* \
+ 	      | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
+ 	      | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
+ 	      | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
+-	      | -openbsd* | -solidbsd* \
++	      | -bitrig* | -openbsd* | -solidbsd* \
+ 	      | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
+ 	      | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
+ 	      | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
+ 	      | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
+ 	      | -chorusos* | -chorusrdb* | -cegcc* \
+-	      | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
+-	      | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \
++	      | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
++	      | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \
++	      | -linux-newlib* | -linux-musl* | -linux-uclibc* \
+ 	      | -uxpv* | -beos* | -mpeix* | -udk* \
+ 	      | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
+ 	      | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
+@@ -1290,7 +1373,7 @@
+ 	      | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
+ 	      | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
+ 	      | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
+-	      | -skyos* | -haiku* | -rdos* | -toppers* | -drops*)
++	      | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*)
+ 	# Remember, each alternative MUST END IN *, to match a version number.
+ 		;;
+ 	-qnx*)
+@@ -1329,7 +1412,7 @@
+ 	-opened*)
+ 		os=-openedition
+ 		;;
+-        -os400*)
++	-os400*)
+ 		os=-os400
+ 		;;
+ 	-wince*)
+@@ -1378,7 +1461,7 @@
+ 	-sinix*)
+ 		os=-sysv4
+ 		;;
+-        -tpf*)
++	-tpf*)
+ 		os=-tpf
+ 		;;
+ 	-triton*)
+@@ -1423,6 +1506,8 @@
+ 	-dicos*)
+ 		os=-dicos
+ 		;;
++	-nacl*)
++		;;
+ 	-none)
+ 		;;
+ 	*)
+@@ -1445,10 +1530,10 @@
+ # system, and we'll never get to this point.
+ 
+ case $basic_machine in
+-        score-*)
++	score-*)
+ 		os=-elf
+ 		;;
+-        spu-*)
++	spu-*)
+ 		os=-elf
+ 		;;
+ 	*-acorn)
+@@ -1460,8 +1545,20 @@
+ 	arm*-semi)
+ 		os=-aout
+ 		;;
+-        c4x-* | tic4x-*)
+-        	os=-coff
++	c4x-* | tic4x-*)
++		os=-coff
++		;;
++	hexagon-*)
++		os=-elf
++		;;
++	tic54x-*)
++		os=-coff
++		;;
++	tic55x-*)
++		os=-coff
++		;;
++	tic6x-*)
++		os=-coff
+ 		;;
+ 	# This must come before the *-dec entry.
+ 	pdp10-*)
+@@ -1481,14 +1578,11 @@
+ 		;;
+ 	m68000-sun)
+ 		os=-sunos3
+-		# This also exists in the configure program, but was not the
+-		# default.
+-		# os=-sunos4
+ 		;;
+ 	m68*-cisco)
+ 		os=-aout
+ 		;;
+-        mep-*)
++	mep-*)
+ 		os=-elf
+ 		;;
+ 	mips*-cisco)
+@@ -1515,7 +1609,7 @@
+ 	*-ibm)
+ 		os=-aix
+ 		;;
+-    	*-knuth)
++	*-knuth)
+ 		os=-mmixware
+ 		;;
+ 	*-wec)
diff --git a/GeoIP.spec b/GeoIP.spec
index 799b7b3..442d665 100644
--- a/GeoIP.spec
+++ b/GeoIP.spec
@@ -1,6 +1,6 @@
 Name:		GeoIP
 Version:	1.4.8
-Release:	5%{?dist}
+Release:	6%{?dist}
 Summary:	Library for country/city/organization to IP address or hostname mapping
 Group:		Development/Libraries
 License:	LGPLv2+ and GPLv2+
@@ -10,6 +10,7 @@ Source1:	LICENSE.txt
 Source2:	fetch-geoipdata-city.pl
 Source3:	fetch-geoipdata.pl
 Source4:	README.Fedora
+Patch0:		GeoIP-aarch64.patch
 Patch10:	GeoIP-1.4.8-UTF8.patch
 BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(id -nu)
 BuildRequires:	zlib-devel
@@ -36,6 +37,9 @@ Development headers and static libraries for building GeoIP-based applications.
 %prep
 %setup -q
 
+# Fix config.guess and config.sub to add aarch64 support (#925403)
+%patch0 -p1
+
 # Recode docs as UTF-8
 %patch10 -p1
 
@@ -103,6 +107,9 @@ rm -rf %{buildroot}
 %{_libdir}/libGeoIPUpdate.so
 
 %changelog
+* Sun Mar 24 2013 Paul Howarth <paul at city-fan.org> - 1.4.8-6
+- Fix config.guess and config.sub to add aarch64 support (#925403)
+
 * Wed Feb 13 2013 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 1.4.8-5
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
 
-- 
cgit v0.10.2


>From 8816bfc6769586d0aad1faaaf015aeeae0e4585f Mon Sep 17 00:00:00 2001
From: Philip Prindeville <philipp at redfish-solutions.com>
Date: Tue, 2 Apr 2013 14:29:55 -0600
Subject: Fix for bz#947606


diff --git a/GeoIP-1.4.8-UTF8.patch b/GeoIP-1.4.8-UTF8.patch
deleted file mode 100644
index 93e67a7..0000000
--- a/GeoIP-1.4.8-UTF8.patch
+++ /dev/null
@@ -1,93 +0,0 @@
-diff -U0 GeoIP-1.4.8/ChangeLog.orig GeoIP-1.4.8/ChangeLog
---- GeoIP-1.4.8/ChangeLog.orig	2011-06-24 14:44:56.000000000 +0100
-+++ GeoIP-1.4.8/ChangeLog	2011-06-27 09:06:16.190029375 +0100
-@@ -137,2 +137,2 @@
--	* Fixed a typo in the geoipupdate(1) manpage and also an non-existent path on Debian (Patrick Matth�i)
--	* Fixes two little format errors (hyphen used as minus sign) in both manpages (Patrick Matth�i)
-+	* Fixed a typo in the geoipupdate(1) manpage and also an non-existent path on Debian (Patrick Matthäi)
-+	* Fixes two little format errors (hyphen used as minus sign) in both manpages (Patrick Matthäi)
-@@ -249 +249 @@
--	* Fixed build issue when using --as-needed flag (Diego 'Flameeyes' Petten�)
-+	* Fixed build issue when using --as-needed flag (Diego 'Flameeyes' Pettenò)
-@@ -395,7 +395,7 @@
--		�1) Use a single buf ptr inside the loops.
--		��� Set to the stack buffer or the cached memory the start of the function.
--		�2) Unroll the i=0,1 loop to allow constant folding.
--		�3) Unroll the j loop for the common case of j = STANDARD_RECORD_LENGTH
--		��� (I've already done the above changes see attached function.)
--		��� With gcc -O2 calculating x[0] and x[1] for STANDARD_RECORD_LENGTH now
--		��� only takes 15 (was > 100) i80x86 instructions with 6 byte accesses of RAM.                 4) only calculate x[0], x[1] when needed, may be a bigger win
-+		 1) Use a single buf ptr inside the loops.
-+		    Set to the stack buffer or the cached memory the start of the function.
-+		 2) Unroll the i=0,1 loop to allow constant folding.
-+		 3) Unroll the j loop for the common case of j = STANDARD_RECORD_LENGTH
-+		    (I've already done the above changes see attached function.)
-+		    With gcc -O2 calculating x[0] and x[1] for STANDARD_RECORD_LENGTH now
-+		    only takes 15 (was > 100) i80x86 instructions with 6 byte accesses of RAM.                 4) only calculate x[0], x[1] when needed, may be a bigger win
-diff -up GeoIP-1.4.8/man/geoiplookup.1.in.orig GeoIP-1.4.8/man/geoiplookup.1.in
---- GeoIP-1.4.8/man/geoiplookup.1.in.orig	2011-03-27 22:00:36.000000000 +0100
-+++ GeoIP-1.4.8/man/geoiplookup.1.in	2011-06-27 09:06:16.212029324 +0100
-@@ -28,7 +28,7 @@ Written by T.J. Mather
- .SH "REPORTING BUGS"
- Report bugs to <support at maxmind.com>
- .SH COPYRIGHT
--Copyright � 2006 MaxMind LLC
-+Copyright © 2006 MaxMind LLC
- 
- This is free software; see the source for copying conditions.
- There is NO warranty; not even for MERCHANTABILITY
-diff -up GeoIP-1.4.8/man/geoiplookup6.1.in.orig GeoIP-1.4.8/man/geoiplookup6.1.in
---- GeoIP-1.4.8/man/geoiplookup6.1.in.orig	2011-03-27 22:00:36.000000000 +0100
-+++ GeoIP-1.4.8/man/geoiplookup6.1.in	2011-06-27 09:06:16.212029324 +0100
-@@ -33,7 +33,7 @@ Written by T.J. Mather
- .SH "REPORTING BUGS"
- Report bugs to <support at maxmind.com>
- .SH COPYRIGHT
--Copyright � 2008 MaxMind LLC
-+Copyright © 2008 MaxMind LLC
- 
- This is free software; see the source for copying conditions.
- There is NO warranty; not even for MERCHANTABILITY
-diff -up GeoIP-1.4.8/man/geoipupdate.1.in.orig GeoIP-1.4.8/man/geoipupdate.1.in
---- GeoIP-1.4.8/man/geoipupdate.1.in.orig	2011-06-23 21:31:22.000000000 +0100
-+++ GeoIP-1.4.8/man/geoipupdate.1.in	2011-06-27 09:07:07.312910591 +0100
-@@ -56,7 +56,7 @@ Written by T.J. Mather
- .SH "REPORTING BUGS"
- Report bugs to <support at maxmind.com>
- .SH COPYRIGHT
--Copyright � 2011 MaxMind LLC
-+Copyright © 2011 MaxMind LLC
- 
- This is free software; see the source for copying conditions.
- There is NO warranty; not even for MERCHANTABILITY
-diff -up GeoIP-1.4.8/README.orig GeoIP-1.4.8/README
---- GeoIP-1.4.8/README.orig	2011-06-24 14:45:00.000000000 +0100
-+++ GeoIP-1.4.8/README	2011-06-27 09:06:16.213029322 +0100
-@@ -177,7 +177,7 @@ It seems that some
- versions of gcc have a bug and consume 1 GB of memory when optimizing
- certain source files (the other source file where this was reported is
- from XORG X-Server). It happens at least with gcc 3.3.1 and with gcc
--4.2(.0).  Thanks to Kai Sch�tzl for the report.
-+4.2(.0).  Thanks to Kai Schätzl for the report.
- 
- If GEOIP_MMAP_CACHE doesn't work on a 64bit machine, try adding
- the flag "MAP_32BIT" to the mmap call.
-diff -up GeoIP-1.4.8/TODO.orig GeoIP-1.4.8/TODO
---- GeoIP-1.4.8/TODO.orig	2011-03-27 22:00:37.000000000 +0100
-+++ GeoIP-1.4.8/TODO	2011-06-27 09:06:16.214029320 +0100
-@@ -9,12 +9,12 @@ Maurice Cinquini
- 
- *** ifndef WIN32 on netdb.h ? ***
- In GeoIPCity.c you don't "#ifndef WIN32" the netdb.h include,
--but in GeoIP.c you do.� Which one is right?
-+but in GeoIP.c you do.  Which one is right?
- 
- *** Warnings in GeoIP-1.2.1 before I made changes ***
- GeoIPUpdate.c:73: warning: implicit declaration of function `_setup_dbfilename'
--��� I suggest a GeoIP_private.h file to include prototypes for
--��� _setup_dbfilename and other private functions also used by GeoIPCity.c
-+    I suggest a GeoIP_private.h file to include prototypes for
-+    _setup_dbfilename and other private functions also used by GeoIPCity.c
- 
- *** Drop the GeoIP_*_by_addr API calls ***
- And now that I think of it, why do you need a seperate
diff --git a/GeoIP-1.5.0-UTF8.patch b/GeoIP-1.5.0-UTF8.patch
new file mode 100644
index 0000000..4403fb3
--- /dev/null
+++ b/GeoIP-1.5.0-UTF8.patch
@@ -0,0 +1,69 @@
+diff -U0 GeoIP-1.5.0/ChangeLog.orig GeoIP-1.5.0/ChangeLog
+--- GeoIP-1.5.0/ChangeLog.orig	2011-06-24 14:44:56.000000000 +0100
++++ GeoIP-1.5.0/ChangeLog	2011-06-27 09:06:16.190029375 +0100
+@@ -137,2 +137,2 @@
+-	* Fixed a typo in the geoipupdate(1) manpage and also an non-existent path on Debian (Patrick Matth�i)
+-	* Fixes two little format errors (hyphen used as minus sign) in both manpages (Patrick Matth�i)
++	* Fixed a typo in the geoipupdate(1) manpage and also an non-existent path on Debian (Patrick Matthäi)
++	* Fixes two little format errors (hyphen used as minus sign) in both manpages (Patrick Matthäi)
+@@ -249 +249 @@
+-	* Fixed build issue when using --as-needed flag (Diego 'Flameeyes' Petten�)
++	* Fixed build issue when using --as-needed flag (Diego 'Flameeyes' Pettenò)
+@@ -395,7 +395,7 @@
+-		�1) Use a single buf ptr inside the loops.
+-		��� Set to the stack buffer or the cached memory the start of the function.
+-		�2) Unroll the i=0,1 loop to allow constant folding.
+-		�3) Unroll the j loop for the common case of j = STANDARD_RECORD_LENGTH
+-		��� (I've already done the above changes see attached function.)
+-		��� With gcc -O2 calculating x[0] and x[1] for STANDARD_RECORD_LENGTH now
+-		��� only takes 15 (was > 100) i80x86 instructions with 6 byte accesses of RAM.                 4) only calculate x[0], x[1] when needed, may be a bigger win
++		 1) Use a single buf ptr inside the loops.
++		    Set to the stack buffer or the cached memory the start of the function.
++		 2) Unroll the i=0,1 loop to allow constant folding.
++		 3) Unroll the j loop for the common case of j = STANDARD_RECORD_LENGTH
++		    (I've already done the above changes see attached function.)
++		    With gcc -O2 calculating x[0] and x[1] for STANDARD_RECORD_LENGTH now
++		    only takes 15 (was > 100) i80x86 instructions with 6 byte accesses of RAM.                 4) only calculate x[0], x[1] when needed, may be a bigger win
+diff -U0 GeoIP-1.5.0/man/geoiplookup.1.in.orig GeoIP-1.5.0/man/geoiplookup.1.in
+--- GeoIP-1.5.0/man/geoiplookup.1.in.orig	2013-02-27 14:13:11.000000000 -0700
++++ GeoIP-1.5.0/man/geoiplookup.1.in	2013-04-02 12:01:22.500882994 -0600
+@@ -31,1 +31,1 @@
+-Copyright � 2006 MaxMind, Inc.
++Copyright \[co] 2006 MaxMind, Inc.
+diff -U0 GeoIP-1.5.0/man/geoiplookup6.1.in.orig GeoIP-1.5.0/man/geoiplookup6.1.in
+--- GeoIP-1.5.0/man/geoiplookup6.1.in.orig	2013-02-27 14:13:11.000000000 -0700
++++ GeoIP-1.5.0/man/geoiplookup6.1.in	2013-04-02 12:02:11.595886598 -0600
+@@ -36,1 +36,1 @@
+-Copyright � 2008 MaxMind, Inc.
++Copyright \[co] 2008 MaxMind, Inc.
+diff -U0 GeoIP-1.5.0/man/geoipupdate.1.in.orig GeoIP-1.5.0/man/geoipupdate.1.in
+--- GeoIP-1.5.0/man/geoipupdate.1.in.orig	2013-02-27 14:13:11.000000000 -0700
++++ GeoIP-1.5.0/man/geoipupdate.1.in	2013-04-02 12:02:36.402889004 -0600
+@@ -59,1 +59,1 @@
+-Copyright � 2011 MaxMind, Inc.
++Copyright \[co] 2011 MaxMind, Inc.
+diff -U0 GeoIP-1.5.0/README.orig GeoIP-1.5.0/README
+--- GeoIP-1.5.0/README.orig	2013-02-27 14:27:51.000000000 -0700
++++ GeoIP-1.5.0/README	2013-04-02 12:04:45.400883174 -0600
+@@ -209,1 +209,1 @@
+-4.2(.0). Thanks to Kai Sch�tzl for the report.
++4.2(.0). Thanks to Kai Schätzl for the report.
+diff -up GeoIP-1.4.8/TODO.orig GeoIP-1.4.8/TODO
+--- GeoIP-1.4.8/TODO.orig	2011-03-27 22:00:37.000000000 +0100
++++ GeoIP-1.4.8/TODO	2011-06-27 09:06:16.214029320 +0100
+@@ -9,12 +9,12 @@ Maurice Cinquini
+ 
+ *** ifndef WIN32 on netdb.h ? ***
+ In GeoIPCity.c you don't "#ifndef WIN32" the netdb.h include,
+-but in GeoIP.c you do.� Which one is right?
++but in GeoIP.c you do.  Which one is right?
+ 
+ *** Warnings in GeoIP-1.2.1 before I made changes ***
+ GeoIPUpdate.c:73: warning: implicit declaration of function `_setup_dbfilename'
+-��� I suggest a GeoIP_private.h file to include prototypes for
+-��� _setup_dbfilename and other private functions also used by GeoIPCity.c
++    I suggest a GeoIP_private.h file to include prototypes for
++    _setup_dbfilename and other private functions also used by GeoIPCity.c
+ 
+ *** Drop the GeoIP_*_by_addr API calls ***
+ And now that I think of it, why do you need a seperate
diff --git a/GeoIP-aarch64.patch b/GeoIP-aarch64.patch
deleted file mode 100644
index 8114fb0..0000000
--- a/GeoIP-aarch64.patch
+++ /dev/null
@@ -1,1348 +0,0 @@
-diff -urN GeoIP-1.4.8/config.guess GeoIP-1.4.8-aarch64/config.guess
---- GeoIP-1.4.8/config.guess	2011-03-27 16:26:02.000000000 -0500
-+++ GeoIP-1.4.8-aarch64/config.guess	2013-03-03 04:58:29.382153170 -0600
-@@ -1,10 +1,10 @@
- #! /bin/sh
- # Attempt to guess a canonical system name.
- #   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
--#   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
--#   Free Software Foundation, Inc.
-+#   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
-+#   2011, 2012 Free Software Foundation, Inc.
- 
--timestamp='2009-06-10'
-+timestamp='2012-09-25'
- 
- # This file is free software; you can redistribute it and/or modify it
- # under the terms of the GNU General Public License as published by
-@@ -17,9 +17,7 @@
- # General Public License for more details.
- #
- # You should have received a copy of the GNU General Public License
--# along with this program; if not, write to the Free Software
--# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
--# 02110-1301, USA.
-+# along with this program; if not, see <http://www.gnu.org/licenses/>.
- #
- # As a special exception to the GNU General Public License, if you
- # distribute this file as part of a program that contains a
-@@ -27,16 +25,16 @@
- # the same distribution terms that you use for the rest of that program.
- 
- 
--# Originally written by Per Bothner <per at bothner.com>.
--# Please send patches to <config-patches at gnu.org>.  Submit a context
--# diff and a properly formatted ChangeLog entry.
-+# Originally written by Per Bothner.  Please send patches (context
-+# diff format) to <config-patches at gnu.org> and include a ChangeLog
-+# entry.
- #
- # This script attempts to guess a canonical system name similar to
- # config.sub.  If it succeeds, it prints the system name on stdout, and
- # exits with 0.  Otherwise, it exits with 1.
- #
--# The plan is that this can be called by configure scripts if you
--# don't specify an explicit build system type.
-+# You can get the latest version of this script from:
-+# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
- 
- me=`echo "$0" | sed -e 's,.*/,,'`
- 
-@@ -56,8 +54,9 @@
- GNU config.guess ($timestamp)
- 
- Originally written by Per Bothner.
--Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
--2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
-+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
-+2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
-+Free Software Foundation, Inc.
- 
- This is free software; see the source for copying conditions.  There is NO
- warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
-@@ -144,7 +143,7 @@
- case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
-     *:NetBSD:*:*)
- 	# NetBSD (nbsd) targets should (where applicable) match one or
--	# more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*,
-+	# more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*,
- 	# *-*-netbsdecoff* and *-*-netbsd*.  For targets that recently
- 	# switched to ELF, *-*-netbsd* would select the old
- 	# object file format.  This provides both forward
-@@ -180,7 +179,7 @@
- 		fi
- 		;;
- 	    *)
--	        os=netbsd
-+		os=netbsd
- 		;;
- 	esac
- 	# The OS release
-@@ -201,6 +200,10 @@
- 	# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
- 	echo "${machine}-${os}${release}"
- 	exit ;;
-+    *:Bitrig:*:*)
-+	UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'`
-+	echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE}
-+	exit ;;
-     *:OpenBSD:*:*)
- 	UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
- 	echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
-@@ -223,7 +226,7 @@
- 		UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
- 		;;
- 	*5.*)
--	        UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
-+		UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
- 		;;
- 	esac
- 	# According to Compaq, /usr/sbin/psrinfo has been available on
-@@ -269,7 +272,10 @@
- 	# A Xn.n version is an unreleased experimental baselevel.
- 	# 1.2 uses "1.2" for uname -r.
- 	echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
--	exit ;;
-+	# Reset EXIT trap before exiting to avoid spurious non-zero exit code.
-+	exitcode=$?
-+	trap '' 0
-+	exit $exitcode ;;
-     Alpha\ *:Windows_NT*:*)
- 	# How do we know it's Interix rather than the generic POSIX subsystem?
- 	# Should we change UNAME_MACHINE based on the output of uname instead
-@@ -295,12 +301,12 @@
- 	echo s390-ibm-zvmoe
- 	exit ;;
-     *:OS400:*:*)
--        echo powerpc-ibm-os400
-+	echo powerpc-ibm-os400
- 	exit ;;
-     arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
- 	echo arm-acorn-riscix${UNAME_RELEASE}
- 	exit ;;
--    arm:riscos:*:*|arm:RISCOS:*:*)
-+    arm*:riscos:*:*|arm*:RISCOS:*:*)
- 	echo arm-unknown-riscos
- 	exit ;;
-     SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
-@@ -333,6 +339,9 @@
-     sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
- 	echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
- 	exit ;;
-+    i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*)
-+	echo i386-pc-auroraux${UNAME_RELEASE}
-+	exit ;;
-     i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
- 	eval $set_cc_for_build
- 	SUN_ARCH="i386"
-@@ -391,23 +400,23 @@
-     # MiNT.  But MiNT is downward compatible to TOS, so this should
-     # be no problem.
-     atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
--        echo m68k-atari-mint${UNAME_RELEASE}
-+	echo m68k-atari-mint${UNAME_RELEASE}
- 	exit ;;
-     atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
- 	echo m68k-atari-mint${UNAME_RELEASE}
--        exit ;;
-+	exit ;;
-     *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
--        echo m68k-atari-mint${UNAME_RELEASE}
-+	echo m68k-atari-mint${UNAME_RELEASE}
- 	exit ;;
-     milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
--        echo m68k-milan-mint${UNAME_RELEASE}
--        exit ;;
-+	echo m68k-milan-mint${UNAME_RELEASE}
-+	exit ;;
-     hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
--        echo m68k-hades-mint${UNAME_RELEASE}
--        exit ;;
-+	echo m68k-hades-mint${UNAME_RELEASE}
-+	exit ;;
-     *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
--        echo m68k-unknown-mint${UNAME_RELEASE}
--        exit ;;
-+	echo m68k-unknown-mint${UNAME_RELEASE}
-+	exit ;;
-     m68k:machten:*:*)
- 	echo m68k-apple-machten${UNAME_RELEASE}
- 	exit ;;
-@@ -477,8 +486,8 @@
- 	echo m88k-motorola-sysv3
- 	exit ;;
-     AViiON:dgux:*:*)
--        # DG/UX returns AViiON for all architectures
--        UNAME_PROCESSOR=`/usr/bin/uname -p`
-+	# DG/UX returns AViiON for all architectures
-+	UNAME_PROCESSOR=`/usr/bin/uname -p`
- 	if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
- 	then
- 	    if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
-@@ -491,7 +500,7 @@
- 	else
- 	    echo i586-dg-dgux${UNAME_RELEASE}
- 	fi
-- 	exit ;;
-+	exit ;;
-     M88*:DolphinOS:*:*)	# DolphinOS (SVR3)
- 	echo m88k-dolphin-sysv3
- 	exit ;;
-@@ -548,7 +557,7 @@
- 		echo rs6000-ibm-aix3.2
- 	fi
- 	exit ;;
--    *:AIX:*:[456])
-+    *:AIX:*:[4567])
- 	IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
- 	if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
- 		IBM_ARCH=rs6000
-@@ -591,52 +600,52 @@
- 	    9000/[678][0-9][0-9])
- 		if [ -x /usr/bin/getconf ]; then
- 		    sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
--                    sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
--                    case "${sc_cpu_version}" in
--                      523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
--                      528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
--                      532)                      # CPU_PA_RISC2_0
--                        case "${sc_kernel_bits}" in
--                          32) HP_ARCH="hppa2.0n" ;;
--                          64) HP_ARCH="hppa2.0w" ;;
-+		    sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
-+		    case "${sc_cpu_version}" in
-+		      523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
-+		      528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
-+		      532)                      # CPU_PA_RISC2_0
-+			case "${sc_kernel_bits}" in
-+			  32) HP_ARCH="hppa2.0n" ;;
-+			  64) HP_ARCH="hppa2.0w" ;;
- 			  '') HP_ARCH="hppa2.0" ;;   # HP-UX 10.20
--                        esac ;;
--                    esac
-+			esac ;;
-+		    esac
- 		fi
- 		if [ "${HP_ARCH}" = "" ]; then
- 		    eval $set_cc_for_build
--		    sed 's/^              //' << EOF >$dummy.c
-+		    sed 's/^		//' << EOF >$dummy.c
-+
-+		#define _HPUX_SOURCE
-+		#include <stdlib.h>
-+		#include <unistd.h>
-+
-+		int main ()
-+		{
-+		#if defined(_SC_KERNEL_BITS)
-+		    long bits = sysconf(_SC_KERNEL_BITS);
-+		#endif
-+		    long cpu  = sysconf (_SC_CPU_VERSION);
- 
--              #define _HPUX_SOURCE
--              #include <stdlib.h>
--              #include <unistd.h>
--
--              int main ()
--              {
--              #if defined(_SC_KERNEL_BITS)
--                  long bits = sysconf(_SC_KERNEL_BITS);
--              #endif
--                  long cpu  = sysconf (_SC_CPU_VERSION);
--
--                  switch (cpu)
--              	{
--              	case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
--              	case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
--              	case CPU_PA_RISC2_0:
--              #if defined(_SC_KERNEL_BITS)
--              	    switch (bits)
--              		{
--              		case 64: puts ("hppa2.0w"); break;
--              		case 32: puts ("hppa2.0n"); break;
--              		default: puts ("hppa2.0"); break;
--              		} break;
--              #else  /* !defined(_SC_KERNEL_BITS) */
--              	    puts ("hppa2.0"); break;
--              #endif
--              	default: puts ("hppa1.0"); break;
--              	}
--                  exit (0);
--              }
-+		    switch (cpu)
-+			{
-+			case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
-+			case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
-+			case CPU_PA_RISC2_0:
-+		#if defined(_SC_KERNEL_BITS)
-+			    switch (bits)
-+				{
-+				case 64: puts ("hppa2.0w"); break;
-+				case 32: puts ("hppa2.0n"); break;
-+				default: puts ("hppa2.0"); break;
-+				} break;
-+		#else  /* !defined(_SC_KERNEL_BITS) */
-+			    puts ("hppa2.0"); break;
-+		#endif
-+			default: puts ("hppa1.0"); break;
-+			}
-+		    exit (0);
-+		}
- EOF
- 		    (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
- 		    test -z "$HP_ARCH" && HP_ARCH=hppa
-@@ -727,22 +736,22 @@
- 	exit ;;
-     C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
- 	echo c1-convex-bsd
--        exit ;;
-+	exit ;;
-     C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
- 	if getsysinfo -f scalar_acc
- 	then echo c32-convex-bsd
- 	else echo c2-convex-bsd
- 	fi
--        exit ;;
-+	exit ;;
-     C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
- 	echo c34-convex-bsd
--        exit ;;
-+	exit ;;
-     C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
- 	echo c38-convex-bsd
--        exit ;;
-+	exit ;;
-     C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
- 	echo c4-convex-bsd
--        exit ;;
-+	exit ;;
-     CRAY*Y-MP:*:*:*)
- 	echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
- 	exit ;;
-@@ -766,14 +775,14 @@
- 	exit ;;
-     F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
- 	FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
--        FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
--        FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
--        echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
--        exit ;;
-+	FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
-+	FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
-+	echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
-+	exit ;;
-     5000:UNIX_System_V:4.*:*)
--        FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
--        FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
--        echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
-+	FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
-+	FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
-+	echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
- 	exit ;;
-     i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
- 	echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
-@@ -785,34 +794,39 @@
- 	echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
- 	exit ;;
-     *:FreeBSD:*:*)
--	case ${UNAME_MACHINE} in
--	    pc98)
--		echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
-+	UNAME_PROCESSOR=`/usr/bin/uname -p`
-+	case ${UNAME_PROCESSOR} in
- 	    amd64)
- 		echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
- 	    *)
--		echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
-+		echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
- 	esac
- 	exit ;;
-     i*:CYGWIN*:*)
- 	echo ${UNAME_MACHINE}-pc-cygwin
- 	exit ;;
-+    *:MINGW64*:*)
-+	echo ${UNAME_MACHINE}-pc-mingw64
-+	exit ;;
-     *:MINGW*:*)
- 	echo ${UNAME_MACHINE}-pc-mingw32
- 	exit ;;
-+    i*:MSYS*:*)
-+	echo ${UNAME_MACHINE}-pc-msys
-+	exit ;;
-     i*:windows32*:*)
--    	# uname -m includes "-pc" on this system.
--    	echo ${UNAME_MACHINE}-mingw32
-+	# uname -m includes "-pc" on this system.
-+	echo ${UNAME_MACHINE}-mingw32
- 	exit ;;
-     i*:PW*:*)
- 	echo ${UNAME_MACHINE}-pc-pw32
- 	exit ;;
--    *:Interix*:[3456]*)
--    	case ${UNAME_MACHINE} in
-+    *:Interix*:*)
-+	case ${UNAME_MACHINE} in
- 	    x86)
- 		echo i586-pc-interix${UNAME_RELEASE}
- 		exit ;;
--	    EM64T | authenticamd | genuineintel)
-+	    authenticamd | genuineintel | EM64T)
- 		echo x86_64-unknown-interix${UNAME_RELEASE}
- 		exit ;;
- 	    IA64)
-@@ -854,6 +868,27 @@
-     i*86:Minix:*:*)
- 	echo ${UNAME_MACHINE}-pc-minix
- 	exit ;;
-+    aarch64:Linux:*:*)
-+	echo ${UNAME_MACHINE}-unknown-linux-gnu
-+	exit ;;
-+    aarch64_be:Linux:*:*)
-+	UNAME_MACHINE=aarch64_be
-+	echo ${UNAME_MACHINE}-unknown-linux-gnu
-+	exit ;;
-+    alpha:Linux:*:*)
-+	case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
-+	  EV5)   UNAME_MACHINE=alphaev5 ;;
-+	  EV56)  UNAME_MACHINE=alphaev56 ;;
-+	  PCA56) UNAME_MACHINE=alphapca56 ;;
-+	  PCA57) UNAME_MACHINE=alphapca56 ;;
-+	  EV6)   UNAME_MACHINE=alphaev6 ;;
-+	  EV67)  UNAME_MACHINE=alphaev67 ;;
-+	  EV68*) UNAME_MACHINE=alphaev68 ;;
-+	esac
-+	objdump --private-headers /bin/sh | grep -q ld.so.1
-+	if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
-+	echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
-+	exit ;;
-     arm*:Linux:*:*)
- 	eval $set_cc_for_build
- 	if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
-@@ -861,20 +896,40 @@
- 	then
- 	    echo ${UNAME_MACHINE}-unknown-linux-gnu
- 	else
--	    echo ${UNAME_MACHINE}-unknown-linux-gnueabi
-+	    if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
-+		| grep -q __ARM_PCS_VFP
-+	    then
-+		echo ${UNAME_MACHINE}-unknown-linux-gnueabi
-+	    else
-+		echo ${UNAME_MACHINE}-unknown-linux-gnueabihf
-+	    fi
- 	fi
- 	exit ;;
-     avr32*:Linux:*:*)
- 	echo ${UNAME_MACHINE}-unknown-linux-gnu
- 	exit ;;
-     cris:Linux:*:*)
--	echo cris-axis-linux-gnu
-+	echo ${UNAME_MACHINE}-axis-linux-gnu
- 	exit ;;
-     crisv32:Linux:*:*)
--	echo crisv32-axis-linux-gnu
-+	echo ${UNAME_MACHINE}-axis-linux-gnu
- 	exit ;;
-     frv:Linux:*:*)
--    	echo frv-unknown-linux-gnu
-+	echo ${UNAME_MACHINE}-unknown-linux-gnu
-+	exit ;;
-+    hexagon:Linux:*:*)
-+	echo ${UNAME_MACHINE}-unknown-linux-gnu
-+	exit ;;
-+    i*86:Linux:*:*)
-+	LIBC=gnu
-+	eval $set_cc_for_build
-+	sed 's/^	//' << EOF >$dummy.c
-+	#ifdef __dietlibc__
-+	LIBC=dietlibc
-+	#endif
-+EOF
-+	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'`
-+	echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
- 	exit ;;
-     ia64:Linux:*:*)
- 	echo ${UNAME_MACHINE}-unknown-linux-gnu
-@@ -901,39 +956,18 @@
- 	#endif
- 	#endif
- EOF
--	eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
--	    /^CPU/{
--		s: ::g
--		p
--	    }'`"
-+	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
- 	test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
- 	;;
-     or32:Linux:*:*)
--	echo or32-unknown-linux-gnu
--	exit ;;
--    ppc:Linux:*:*)
--	echo powerpc-unknown-linux-gnu
--	exit ;;
--    ppc64:Linux:*:*)
--	echo powerpc64-unknown-linux-gnu
--	exit ;;
--    alpha:Linux:*:*)
--	case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
--	  EV5)   UNAME_MACHINE=alphaev5 ;;
--	  EV56)  UNAME_MACHINE=alphaev56 ;;
--	  PCA56) UNAME_MACHINE=alphapca56 ;;
--	  PCA57) UNAME_MACHINE=alphapca56 ;;
--	  EV6)   UNAME_MACHINE=alphaev6 ;;
--	  EV67)  UNAME_MACHINE=alphaev67 ;;
--	  EV68*) UNAME_MACHINE=alphaev68 ;;
--        esac
--	objdump --private-headers /bin/sh | grep -q ld.so.1
--	if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
--	echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
-+	echo ${UNAME_MACHINE}-unknown-linux-gnu
- 	exit ;;
-     padre:Linux:*:*)
- 	echo sparc-unknown-linux-gnu
- 	exit ;;
-+    parisc64:Linux:*:* | hppa64:Linux:*:*)
-+	echo hppa64-unknown-linux-gnu
-+	exit ;;
-     parisc:Linux:*:* | hppa:Linux:*:*)
- 	# Look for CPU level
- 	case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
-@@ -942,14 +976,17 @@
- 	  *)    echo hppa-unknown-linux-gnu ;;
- 	esac
- 	exit ;;
--    parisc64:Linux:*:* | hppa64:Linux:*:*)
--	echo hppa64-unknown-linux-gnu
-+    ppc64:Linux:*:*)
-+	echo powerpc64-unknown-linux-gnu
-+	exit ;;
-+    ppc:Linux:*:*)
-+	echo powerpc-unknown-linux-gnu
- 	exit ;;
-     s390:Linux:*:* | s390x:Linux:*:*)
- 	echo ${UNAME_MACHINE}-ibm-linux
- 	exit ;;
-     sh64*:Linux:*:*)
--    	echo ${UNAME_MACHINE}-unknown-linux-gnu
-+	echo ${UNAME_MACHINE}-unknown-linux-gnu
- 	exit ;;
-     sh*:Linux:*:*)
- 	echo ${UNAME_MACHINE}-unknown-linux-gnu
-@@ -957,67 +994,18 @@
-     sparc:Linux:*:* | sparc64:Linux:*:*)
- 	echo ${UNAME_MACHINE}-unknown-linux-gnu
- 	exit ;;
-+    tile*:Linux:*:*)
-+	echo ${UNAME_MACHINE}-unknown-linux-gnu
-+	exit ;;
-     vax:Linux:*:*)
- 	echo ${UNAME_MACHINE}-dec-linux-gnu
- 	exit ;;
-     x86_64:Linux:*:*)
--	echo x86_64-unknown-linux-gnu
-+	echo ${UNAME_MACHINE}-unknown-linux-gnu
- 	exit ;;
-     xtensa*:Linux:*:*)
--    	echo ${UNAME_MACHINE}-unknown-linux-gnu
-+	echo ${UNAME_MACHINE}-unknown-linux-gnu
- 	exit ;;
--    i*86:Linux:*:*)
--	# The BFD linker knows what the default object file format is, so
--	# first see if it will tell us. cd to the root directory to prevent
--	# problems with other programs or directories called `ld' in the path.
--	# Set LC_ALL=C to ensure ld outputs messages in English.
--	ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \
--			 | sed -ne '/supported targets:/!d
--				    s/[ 	][ 	]*/ /g
--				    s/.*supported targets: *//
--				    s/ .*//
--				    p'`
--        case "$ld_supported_targets" in
--	  elf32-i386)
--		TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu"
--		;;
--	esac
--	# Determine whether the default compiler is a.out or elf
--	eval $set_cc_for_build
--	sed 's/^	//' << EOF >$dummy.c
--	#include <features.h>
--	#ifdef __ELF__
--	# ifdef __GLIBC__
--	#  if __GLIBC__ >= 2
--	LIBC=gnu
--	#  else
--	LIBC=gnulibc1
--	#  endif
--	# else
--	LIBC=gnulibc1
--	# endif
--	#else
--	#if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC)
--	LIBC=gnu
--	#else
--	LIBC=gnuaout
--	#endif
--	#endif
--	#ifdef __dietlibc__
--	LIBC=dietlibc
--	#endif
--EOF
--	eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
--	    /^LIBC/{
--		s: ::g
--		p
--	    }'`"
--	test x"${LIBC}" != x && {
--		echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
--		exit
--	}
--	test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; }
--	;;
-     i*86:DYNIX/ptx:4*:*)
- 	# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
- 	# earlier versions are messed up and put the nodename in both
-@@ -1025,11 +1013,11 @@
- 	echo i386-sequent-sysv4
- 	exit ;;
-     i*86:UNIX_SV:4.2MP:2.*)
--        # Unixware is an offshoot of SVR4, but it has its own version
--        # number series starting with 2...
--        # I am not positive that other SVR4 systems won't match this,
-+	# Unixware is an offshoot of SVR4, but it has its own version
-+	# number series starting with 2...
-+	# I am not positive that other SVR4 systems won't match this,
- 	# I just have to hope.  -- rms.
--        # Use sysv4.2uw... so that sysv4* matches it.
-+	# Use sysv4.2uw... so that sysv4* matches it.
- 	echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
- 	exit ;;
-     i*86:OS/2:*:*)
-@@ -1061,7 +1049,7 @@
- 	fi
- 	exit ;;
-     i*86:*:5:[678]*)
--    	# UnixWare 7.x, OpenUNIX and OpenServer 6.
-+	# UnixWare 7.x, OpenUNIX and OpenServer 6.
- 	case `/bin/uname -X | grep "^Machine"` in
- 	    *486*)	     UNAME_MACHINE=i486 ;;
- 	    *Pentium)	     UNAME_MACHINE=i586 ;;
-@@ -1089,13 +1077,13 @@
- 	exit ;;
-     pc:*:*:*)
- 	# Left here for compatibility:
--        # uname -m prints for DJGPP always 'pc', but it prints nothing about
--        # the processor, so we play safe by assuming i586.
-+	# uname -m prints for DJGPP always 'pc', but it prints nothing about
-+	# the processor, so we play safe by assuming i586.
- 	# Note: whatever this is, it MUST be the same as what config.sub
- 	# prints for the "djgpp" host, or else GDB configury will decide that
- 	# this is a cross-build.
- 	echo i586-pc-msdosdjgpp
--        exit ;;
-+	exit ;;
-     Intel:Mach:3*:*)
- 	echo i386-pc-mach3
- 	exit ;;
-@@ -1130,8 +1118,8 @@
- 	/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
- 	  && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
-     3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
--        /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
--          && { echo i486-ncr-sysv4; exit; } ;;
-+	/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
-+	  && { echo i486-ncr-sysv4; exit; } ;;
-     NCR*:*:4.2:* | MPRAS*:*:4.2:*)
- 	OS_REL='.3'
- 	test -r /etc/.relid \
-@@ -1174,10 +1162,10 @@
- 		echo ns32k-sni-sysv
- 	fi
- 	exit ;;
--    PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
--                      # says <Richard.M.Bartel at ccMail.Census.GOV>
--        echo i586-unisys-sysv4
--        exit ;;
-+    PENTIUM:*:4.0*:*)	# Unisys `ClearPath HMP IX 4000' SVR4/MP effort
-+			# says <Richard.M.Bartel at ccMail.Census.GOV>
-+	echo i586-unisys-sysv4
-+	exit ;;
-     *:UNIX_System_V:4*:FTX*)
- 	# From Gerald Hewes <hewes at openmarket.com>.
- 	# How about differentiating between stratus architectures? -djm
-@@ -1203,11 +1191,11 @@
- 	exit ;;
-     R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
- 	if [ -d /usr/nec ]; then
--	        echo mips-nec-sysv${UNAME_RELEASE}
-+		echo mips-nec-sysv${UNAME_RELEASE}
- 	else
--	        echo mips-unknown-sysv${UNAME_RELEASE}
-+		echo mips-unknown-sysv${UNAME_RELEASE}
- 	fi
--        exit ;;
-+	exit ;;
-     BeBox:BeOS:*:*)	# BeOS running on hardware made by Be, PPC only.
- 	echo powerpc-be-beos
- 	exit ;;
-@@ -1220,6 +1208,9 @@
-     BePC:Haiku:*:*)	# Haiku running on Intel PC compatible.
- 	echo i586-pc-haiku
- 	exit ;;
-+    x86_64:Haiku:*:*)
-+	echo x86_64-unknown-haiku
-+	exit ;;
-     SX-4:SUPER-UX:*:*)
- 	echo sx4-nec-superux${UNAME_RELEASE}
- 	exit ;;
-@@ -1247,6 +1238,16 @@
-     *:Darwin:*:*)
- 	UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
- 	case $UNAME_PROCESSOR in
-+	    i386)
-+		eval $set_cc_for_build
-+		if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
-+		  if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
-+		      (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
-+		      grep IS_64BIT_ARCH >/dev/null
-+		  then
-+		      UNAME_PROCESSOR="x86_64"
-+		  fi
-+		fi ;;
- 	    unknown) UNAME_PROCESSOR=powerpc ;;
- 	esac
- 	echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
-@@ -1262,7 +1263,10 @@
-     *:QNX:*:4*)
- 	echo i386-pc-qnx
- 	exit ;;
--    NSE-?:NONSTOP_KERNEL:*:*)
-+    NEO-?:NONSTOP_KERNEL:*:*)
-+	echo neo-tandem-nsk${UNAME_RELEASE}
-+	exit ;;
-+    NSE-*:NONSTOP_KERNEL:*:*)
- 	echo nse-tandem-nsk${UNAME_RELEASE}
- 	exit ;;
-     NSR-?:NONSTOP_KERNEL:*:*)
-@@ -1307,13 +1311,13 @@
- 	echo pdp10-unknown-its
- 	exit ;;
-     SEI:*:*:SEIUX)
--        echo mips-sei-seiux${UNAME_RELEASE}
-+	echo mips-sei-seiux${UNAME_RELEASE}
- 	exit ;;
-     *:DragonFly:*:*)
- 	echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
- 	exit ;;
-     *:*VMS:*:*)
--    	UNAME_MACHINE=`(uname -p) 2>/dev/null`
-+	UNAME_MACHINE=`(uname -p) 2>/dev/null`
- 	case "${UNAME_MACHINE}" in
- 	    A*) echo alpha-dec-vms ; exit ;;
- 	    I*) echo ia64-dec-vms ; exit ;;
-@@ -1331,11 +1335,11 @@
-     i*86:AROS:*:*)
- 	echo ${UNAME_MACHINE}-pc-aros
- 	exit ;;
-+    x86_64:VMkernel:*:*)
-+	echo ${UNAME_MACHINE}-unknown-esx
-+	exit ;;
- esac
- 
--#echo '(No uname command or uname output not recognized.)' 1>&2
--#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
--
- eval $set_cc_for_build
- cat >$dummy.c <<EOF
- #ifdef _SEQUENT_
-@@ -1353,11 +1357,11 @@
- #include <sys/param.h>
-   printf ("m68k-sony-newsos%s\n",
- #ifdef NEWSOS4
--          "4"
-+	"4"
- #else
--	  ""
-+	""
- #endif
--         ); exit (0);
-+	); exit (0);
- #endif
- #endif
- 
-diff -urN GeoIP-1.4.8/config.sub GeoIP-1.4.8-aarch64/config.sub
---- GeoIP-1.4.8/config.sub	2011-03-27 16:26:02.000000000 -0500
-+++ GeoIP-1.4.8-aarch64/config.sub	2013-03-03 04:58:29.429147735 -0600
-@@ -1,10 +1,10 @@
- #! /bin/sh
- # Configuration validation subroutine script.
- #   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
--#   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
--#   Free Software Foundation, Inc.
-+#   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
-+#   2011, 2012 Free Software Foundation, Inc.
- 
--timestamp='2009-06-11'
-+timestamp='2012-10-10'
- 
- # This file is (in principle) common to ALL GNU software.
- # The presence of a machine in this file suggests that SOME GNU software
-@@ -21,9 +21,7 @@
- # GNU General Public License for more details.
- #
- # You should have received a copy of the GNU General Public License
--# along with this program; if not, write to the Free Software
--# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
--# 02110-1301, USA.
-+# along with this program; if not, see <http://www.gnu.org/licenses/>.
- #
- # As a special exception to the GNU General Public License, if you
- # distribute this file as part of a program that contains a
-@@ -32,13 +30,16 @@
- 
- 
- # Please send patches to <config-patches at gnu.org>.  Submit a context
--# diff and a properly formatted ChangeLog entry.
-+# diff and a properly formatted GNU ChangeLog entry.
- #
- # Configuration subroutine to validate and canonicalize a configuration type.
- # Supply the specified configuration type as an argument.
- # If it is invalid, we print an error message on stderr and exit with code 1.
- # Otherwise, we print the canonical config type on stdout and succeed.
- 
-+# You can get the latest version of this script from:
-+# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
-+
- # This file is supposed to be the same for all GNU packages
- # and recognize all the CPU types, system types and aliases
- # that are meaningful with *any* GNU software.
-@@ -72,8 +73,9 @@
- version="\
- GNU config.sub ($timestamp)
- 
--Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
--2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
-+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
-+2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
-+Free Software Foundation, Inc.
- 
- This is free software; see the source for copying conditions.  There is NO
- warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
-@@ -120,13 +122,18 @@
- # Here we must recognize all the valid KERNEL-OS combinations.
- maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
- case $maybe_os in
--  nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \
--  uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \
-+  nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
-+  linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
-+  knetbsd*-gnu* | netbsd*-gnu* | \
-   kopensolaris*-gnu* | \
-   storm-chaos* | os2-emx* | rtmk-nova*)
-     os=-$maybe_os
-     basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
-     ;;
-+  android-linux)
-+    os=-linux-android
-+    basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown
-+    ;;
-   *)
-     basic_machine=`echo $1 | sed 's/-[^-]*$//'`
-     if [ $basic_machine != $1 ]
-@@ -149,12 +156,12 @@
- 	-convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
- 	-c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
- 	-harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
--	-apple | -axis | -knuth | -cray)
-+	-apple | -axis | -knuth | -cray | -microblaze*)
- 		os=
- 		basic_machine=$1
- 		;;
--        -bluegene*)
--	        os=-cnk
-+	-bluegene*)
-+		os=-cnk
- 		;;
- 	-sim | -cisco | -oki | -wec | -winbond)
- 		os=
-@@ -170,10 +177,10 @@
- 		os=-chorusos
- 		basic_machine=$1
- 		;;
-- 	-chorusrdb)
-- 		os=-chorusrdb
-+	-chorusrdb)
-+		os=-chorusrdb
- 		basic_machine=$1
-- 		;;
-+		;;
- 	-hiux*)
- 		os=-hiuxwe2
- 		;;
-@@ -218,6 +225,12 @@
- 	-isc*)
- 		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
- 		;;
-+	-lynx*178)
-+		os=-lynxos178
-+		;;
-+	-lynx*5)
-+		os=-lynxos5
-+		;;
- 	-lynx*)
- 		os=-lynxos
- 		;;
-@@ -242,20 +255,25 @@
- 	# Some are omitted here because they have special meanings below.
- 	1750a | 580 \
- 	| a29k \
-+	| aarch64 | aarch64_be \
- 	| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
- 	| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
- 	| am33_2.0 \
- 	| arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \
-+        | be32 | be64 \
- 	| bfin \
- 	| c4x | clipper \
- 	| d10v | d30v | dlx | dsp16xx \
-+	| epiphany \
- 	| fido | fr30 | frv \
- 	| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
-+	| hexagon \
- 	| i370 | i860 | i960 | ia64 \
- 	| ip2k | iq2000 \
-+	| le32 | le64 \
- 	| lm32 \
- 	| m32c | m32r | m32rle | m68000 | m68k | m88k \
--	| maxq | mb | microblaze | mcore | mep | metag \
-+	| maxq | mb | microblaze | microblazeel | mcore | mep | metag \
- 	| mips | mipsbe | mipseb | mipsel | mipsle \
- 	| mips16 \
- 	| mips64 | mips64el \
-@@ -278,27 +296,39 @@
- 	| moxie \
- 	| mt \
- 	| msp430 \
-+	| nds32 | nds32le | nds32be \
- 	| nios | nios2 \
- 	| ns16k | ns32k \
-+	| open8 \
- 	| or32 \
- 	| pdp10 | pdp11 | pj | pjl \
--	| powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
-+	| powerpc | powerpc64 | powerpc64le | powerpcle \
- 	| pyramid \
-+	| rl78 | rx \
- 	| score \
- 	| sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
- 	| sh64 | sh64le \
- 	| sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
- 	| sparcv8 | sparcv9 | sparcv9b | sparcv9v \
--	| spu | strongarm \
--	| tahoe | thumb | tic4x | tic80 | tron \
--	| v850 | v850e \
-+	| spu \
-+	| tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \
-+	| ubicom32 \
-+	| v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \
- 	| we32k \
--	| x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \
-+	| x86 | xc16x | xstormy16 | xtensa \
- 	| z8k | z80)
- 		basic_machine=$basic_machine-unknown
- 		;;
--	m6811 | m68hc11 | m6812 | m68hc12)
--		# Motorola 68HC11/12.
-+	c54x)
-+		basic_machine=tic54x-unknown
-+		;;
-+	c55x)
-+		basic_machine=tic55x-unknown
-+		;;
-+	c6x)
-+		basic_machine=tic6x-unknown
-+		;;
-+	m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | picochip)
- 		basic_machine=$basic_machine-unknown
- 		os=-none
- 		;;
-@@ -308,6 +338,21 @@
- 		basic_machine=mt-unknown
- 		;;
- 
-+	strongarm | thumb | xscale)
-+		basic_machine=arm-unknown
-+		;;
-+	xgate)
-+		basic_machine=$basic_machine-unknown
-+		os=-none
-+		;;
-+	xscaleeb)
-+		basic_machine=armeb-unknown
-+		;;
-+
-+	xscaleel)
-+		basic_machine=armel-unknown
-+		;;
-+
- 	# We use `pc' rather than `unknown'
- 	# because (1) that's what they normally are, and
- 	# (2) the word "unknown" tends to confuse beginning users.
-@@ -322,25 +367,30 @@
- 	# Recognize the basic CPU types with company name.
- 	580-* \
- 	| a29k-* \
-+	| aarch64-* | aarch64_be-* \
- 	| alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
- 	| alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
- 	| alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
- 	| arm-*  | armbe-* | armle-* | armeb-* | armv*-* \
- 	| avr-* | avr32-* \
-+	| be32-* | be64-* \
- 	| bfin-* | bs2000-* \
--	| c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
-+	| c[123]* | c30-* | [cjt]90-* | c4x-* \
- 	| clipper-* | craynv-* | cydra-* \
- 	| d10v-* | d30v-* | dlx-* \
- 	| elxsi-* \
- 	| f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
- 	| h8300-* | h8500-* \
- 	| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
-+	| hexagon-* \
- 	| i*86-* | i860-* | i960-* | ia64-* \
- 	| ip2k-* | iq2000-* \
-+	| le32-* | le64-* \
- 	| lm32-* \
- 	| m32c-* | m32r-* | m32rle-* \
- 	| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
- 	| m88110-* | m88k-* | maxq-* | mcore-* | metag-* \
-+	| microblaze-* | microblazeel-* \
- 	| mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
- 	| mips16-* \
- 	| mips64-* | mips64el-* \
-@@ -362,24 +412,29 @@
- 	| mmix-* \
- 	| mt-* \
- 	| msp430-* \
-+	| nds32-* | nds32le-* | nds32be-* \
- 	| nios-* | nios2-* \
- 	| none-* | np1-* | ns16k-* | ns32k-* \
-+	| open8-* \
- 	| orion-* \
- 	| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
--	| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
-+	| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \
- 	| pyramid-* \
--	| romp-* | rs6000-* \
-+	| rl78-* | romp-* | rs6000-* | rx-* \
- 	| sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
- 	| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
- 	| sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
- 	| sparclite-* \
--	| sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \
--	| tahoe-* | thumb-* \
--	| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* | tile-* \
-+	| sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \
-+	| tahoe-* \
-+	| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
-+	| tile*-* \
- 	| tron-* \
--	| v850-* | v850e-* | vax-* \
-+	| ubicom32-* \
-+	| v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \
-+	| vax-* \
- 	| we32k-* \
--	| x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \
-+	| x86-* | x86_64-* | xc16x-* | xps100-* \
- 	| xstormy16-* | xtensa*-* \
- 	| ymp-* \
- 	| z8k-* | z80-*)
-@@ -404,7 +459,7 @@
- 		basic_machine=a29k-amd
- 		os=-udi
- 		;;
--    	abacus)
-+	abacus)
- 		basic_machine=abacus-unknown
- 		;;
- 	adobe68k)
-@@ -474,11 +529,20 @@
- 		basic_machine=powerpc-ibm
- 		os=-cnk
- 		;;
-+	c54x-*)
-+		basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'`
-+		;;
-+	c55x-*)
-+		basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'`
-+		;;
-+	c6x-*)
-+		basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'`
-+		;;
- 	c90)
- 		basic_machine=c90-cray
- 		os=-unicos
- 		;;
--        cegcc)
-+	cegcc)
- 		basic_machine=arm-unknown
- 		os=-cegcc
- 		;;
-@@ -510,7 +574,7 @@
- 		basic_machine=craynv-cray
- 		os=-unicosmp
- 		;;
--	cr16)
-+	cr16 | cr16-*)
- 		basic_machine=cr16-unknown
- 		os=-elf
- 		;;
-@@ -668,7 +732,6 @@
- 	i370-ibm* | ibm*)
- 		basic_machine=i370-ibm
- 		;;
--# I'm not sure what "Sysv32" means.  Should this be sysv3.2?
- 	i*86v32)
- 		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
- 		os=-sysv32
-@@ -726,6 +789,13 @@
- 		basic_machine=ns32k-utek
- 		os=-sysv
- 		;;
-+	microblaze*)
-+		basic_machine=microblaze-xilinx
-+		;;
-+	mingw64)
-+		basic_machine=x86_64-pc
-+		os=-mingw64
-+		;;
- 	mingw32)
- 		basic_machine=i386-pc
- 		os=-mingw32
-@@ -762,10 +832,18 @@
- 	ms1-*)
- 		basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
- 		;;
-+	msys)
-+		basic_machine=i386-pc
-+		os=-msys
-+		;;
- 	mvs)
- 		basic_machine=i370-ibm
- 		os=-mvs
- 		;;
-+	nacl)
-+		basic_machine=le32-unknown
-+		os=-nacl
-+		;;
- 	ncr3000)
- 		basic_machine=i486-ncr
- 		os=-sysv4
-@@ -830,6 +908,12 @@
- 	np1)
- 		basic_machine=np1-gould
- 		;;
-+	neo-tandem)
-+		basic_machine=neo-tandem
-+		;;
-+	nse-tandem)
-+		basic_machine=nse-tandem
-+		;;
- 	nsr-tandem)
- 		basic_machine=nsr-tandem
- 		;;
-@@ -912,9 +996,10 @@
- 		;;
- 	power)	basic_machine=power-ibm
- 		;;
--	ppc)	basic_machine=powerpc-unknown
-+	ppc | ppcbe)	basic_machine=powerpc-unknown
- 		;;
--	ppc-*)	basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
-+	ppc-* | ppcbe-*)
-+		basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
- 		;;
- 	ppcle | powerpclittle | ppc-le | powerpc-little)
- 		basic_machine=powerpcle-unknown
-@@ -1008,6 +1093,9 @@
- 		basic_machine=i860-stratus
- 		os=-sysv4
- 		;;
-+	strongarm-* | thumb-*)
-+		basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'`
-+		;;
- 	sun2)
- 		basic_machine=m68000-sun
- 		;;
-@@ -1064,20 +1152,8 @@
- 		basic_machine=t90-cray
- 		os=-unicos
- 		;;
--	tic54x | c54x*)
--		basic_machine=tic54x-unknown
--		os=-coff
--		;;
--	tic55x | c55x*)
--		basic_machine=tic55x-unknown
--		os=-coff
--		;;
--	tic6x | c6x*)
--		basic_machine=tic6x-unknown
--		os=-coff
--		;;
- 	tile*)
--		basic_machine=tile-unknown
-+		basic_machine=$basic_machine-unknown
- 		os=-linux-gnu
- 		;;
- 	tx39)
-@@ -1147,6 +1223,9 @@
- 	xps | xps100)
- 		basic_machine=xps100-honeywell
- 		;;
-+	xscale-* | xscalee[bl]-*)
-+		basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'`
-+		;;
- 	ymp)
- 		basic_machine=ymp-cray
- 		os=-unicos
-@@ -1244,9 +1323,12 @@
- if [ x"$os" != x"" ]
- then
- case $os in
--        # First match some system type aliases
--        # that might get confused with valid system types.
-+	# First match some system type aliases
-+	# that might get confused with valid system types.
- 	# -solaris* is a basic system type, with this one exception.
-+	-auroraux)
-+		os=-auroraux
-+		;;
- 	-solaris1 | -solaris1.*)
- 		os=`echo $os | sed -e 's|solaris1|sunos4|'`
- 		;;
-@@ -1268,21 +1350,22 @@
- 	# -sysv* is not here because it comes later, after sysvr4.
- 	-gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
- 	      | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
--	      | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
--	      | -kopensolaris* \
-+	      | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
-+	      | -sym* | -kopensolaris* \
- 	      | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
- 	      | -aos* | -aros* \
- 	      | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
- 	      | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
- 	      | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
--	      | -openbsd* | -solidbsd* \
-+	      | -bitrig* | -openbsd* | -solidbsd* \
- 	      | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
- 	      | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
- 	      | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
- 	      | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
- 	      | -chorusos* | -chorusrdb* | -cegcc* \
--	      | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
--	      | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \
-+	      | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
-+	      | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \
-+	      | -linux-newlib* | -linux-musl* | -linux-uclibc* \
- 	      | -uxpv* | -beos* | -mpeix* | -udk* \
- 	      | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
- 	      | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
-@@ -1290,7 +1373,7 @@
- 	      | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
- 	      | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
- 	      | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
--	      | -skyos* | -haiku* | -rdos* | -toppers* | -drops*)
-+	      | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*)
- 	# Remember, each alternative MUST END IN *, to match a version number.
- 		;;
- 	-qnx*)
-@@ -1329,7 +1412,7 @@
- 	-opened*)
- 		os=-openedition
- 		;;
--        -os400*)
-+	-os400*)
- 		os=-os400
- 		;;
- 	-wince*)
-@@ -1378,7 +1461,7 @@
- 	-sinix*)
- 		os=-sysv4
- 		;;
--        -tpf*)
-+	-tpf*)
- 		os=-tpf
- 		;;
- 	-triton*)
-@@ -1423,6 +1506,8 @@
- 	-dicos*)
- 		os=-dicos
- 		;;
-+	-nacl*)
-+		;;
- 	-none)
- 		;;
- 	*)
-@@ -1445,10 +1530,10 @@
- # system, and we'll never get to this point.
- 
- case $basic_machine in
--        score-*)
-+	score-*)
- 		os=-elf
- 		;;
--        spu-*)
-+	spu-*)
- 		os=-elf
- 		;;
- 	*-acorn)
-@@ -1460,8 +1545,20 @@
- 	arm*-semi)
- 		os=-aout
- 		;;
--        c4x-* | tic4x-*)
--        	os=-coff
-+	c4x-* | tic4x-*)
-+		os=-coff
-+		;;
-+	hexagon-*)
-+		os=-elf
-+		;;
-+	tic54x-*)
-+		os=-coff
-+		;;
-+	tic55x-*)
-+		os=-coff
-+		;;
-+	tic6x-*)
-+		os=-coff
- 		;;
- 	# This must come before the *-dec entry.
- 	pdp10-*)
-@@ -1481,14 +1578,11 @@
- 		;;
- 	m68000-sun)
- 		os=-sunos3
--		# This also exists in the configure program, but was not the
--		# default.
--		# os=-sunos4
- 		;;
- 	m68*-cisco)
- 		os=-aout
- 		;;
--        mep-*)
-+	mep-*)
- 		os=-elf
- 		;;
- 	mips*-cisco)
-@@ -1515,7 +1609,7 @@
- 	*-ibm)
- 		os=-aix
- 		;;
--    	*-knuth)
-+	*-knuth)
- 		os=-mmixware
- 		;;
- 	*-wec)
diff --git a/GeoIP.spec b/GeoIP.spec
index 442d665..25fe7ac 100644
--- a/GeoIP.spec
+++ b/GeoIP.spec
@@ -1,6 +1,6 @@
 Name:		GeoIP
-Version:	1.4.8
-Release:	6%{?dist}
+Version:	1.5.0
+Release:	1%{?dist}
 Summary:	Library for country/city/organization to IP address or hostname mapping
 Group:		Development/Libraries
 License:	LGPLv2+ and GPLv2+
@@ -10,8 +10,7 @@ Source1:	LICENSE.txt
 Source2:	fetch-geoipdata-city.pl
 Source3:	fetch-geoipdata.pl
 Source4:	README.Fedora
-Patch0:		GeoIP-aarch64.patch
-Patch10:	GeoIP-1.4.8-UTF8.patch
+Patch10:	GeoIP-1.5.0-UTF8.patch
 BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(id -nu)
 BuildRequires:	zlib-devel
 Obsoletes:	geoip < %{version}-%{release}
@@ -37,9 +36,6 @@ Development headers and static libraries for building GeoIP-based applications.
 %prep
 %setup -q
 
-# Fix config.guess and config.sub to add aarch64 support (#925403)
-%patch0 -p1
-
 # Recode docs as UTF-8
 %patch10 -p1
 
@@ -72,10 +68,19 @@ make DESTDIR=%{buildroot} install
 # nix the stuff we don't need like .la files.
 rm -f %{buildroot}%{_libdir}/*.la
 
+# fix up the config file to use the free products by default
+sed -i \
+	-e 's/YOUR_LICENSE_KEY_HERE$/000000000000/' \
+	-e 's/YOUR_USER_ID_HERE$/999999/' \
+	-e 's/106$/506 533 517/' \
+	%{buildroot}%{_sysconfdir}/GeoIP.conf
+ln -sf GeoLiteCountry.dat %{buildroot}%{_datadir}/GeoIP/GeoIP.dat
+
 %clean
 rm -rf %{buildroot}
 
 %post -p /sbin/ldconfig
+geoipupdate 
 
 %postun -p /sbin/ldconfig
 
@@ -105,8 +110,12 @@ rm -rf %{buildroot}
 %{_libdir}/libGeoIP.so
 # GPLv2+
 %{_libdir}/libGeoIPUpdate.so
+%{_libdir}/pkgconfig/geoip.pc
 
 %changelog
+* Mon Apr 02 2013 Philip Prindeville <philipp at fedoraproject.org> - 1.5.0-1
+- Version bump to 1.5.0
+
 * Sun Mar 24 2013 Paul Howarth <paul at city-fan.org> - 1.4.8-6
 - Fix config.guess and config.sub to add aarch64 support (#925403)
 
-- 
cgit v0.10.2


>From 8f39ec3b4ad939885f3ca2dd63a4bdcbcf08750b Mon Sep 17 00:00:00 2001
From: Philip Prindeville <philipp at redfish-solutions.com>
Date: Tue, 2 Apr 2013 16:01:01 -0600
Subject: Add tarball for 1.5.0.


diff --git a/.gitignore b/.gitignore
index d85cd3f..79983ef 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,2 +1,3 @@
 GeoIP-1.4.6.tar.gz
 /GeoIP-1.4.8.tar.gz
+/GeoIP-1.5.0.tar.gz
diff --git a/sources b/sources
index 97304e4..112fd0d 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-05b7300435336231b556df5ab36f326d  GeoIP-1.4.8.tar.gz
+57bc400b5c11057a4cab00e1c5cf3f00  GeoIP-1.5.0.tar.gz
-- 
cgit v0.10.2


>From 4a22bd9797a82417e2443b7dbbd9a7c8a91e9d70 Mon Sep 17 00:00:00 2001
From: Philip Prindeville <philipp at fedoraproject.org>
Date: Tue, 2 Apr 2013 16:34:25 -0600
Subject: Fix %post steps; add cron.weekly support.


diff --git a/GeoIP.spec b/GeoIP.spec
index 25fe7ac..6f7f407 100644
--- a/GeoIP.spec
+++ b/GeoIP.spec
@@ -10,6 +10,7 @@ Source1:	LICENSE.txt
 Source2:	fetch-geoipdata-city.pl
 Source3:	fetch-geoipdata.pl
 Source4:	README.Fedora
+Source5:	geoipupdate.cron
 Patch10:	GeoIP-1.5.0-UTF8.patch
 BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(id -nu)
 BuildRequires:	zlib-devel
@@ -65,6 +66,9 @@ make %{?_smp_mflags}
 rm -rf %{buildroot}
 make DESTDIR=%{buildroot} install
 
+# fetch database updates weekly
+install -D -m755 %{SOURCE5} %{buildroot}%{_sysconfdir}/cron.weekly/geoipupdate
+
 # nix the stuff we don't need like .la files.
 rm -f %{buildroot}%{_libdir}/*.la
 
@@ -79,7 +83,8 @@ ln -sf GeoLiteCountry.dat %{buildroot}%{_datadir}/GeoIP/GeoIP.dat
 %clean
 rm -rf %{buildroot}
 
-%post -p /sbin/ldconfig
+%post
+/sbin/ldconfig
 geoipupdate 
 
 %postun -p /sbin/ldconfig
@@ -89,6 +94,7 @@ geoipupdate
 %doc AUTHORS COPYING ChangeLog README TODO LICENSE* fetch-*
 %config(noreplace) %{_sysconfdir}/GeoIP.conf.default
 %config(noreplace) %{_sysconfdir}/GeoIP.conf
+%{_sysconfdir}/cron.weekly/geoipupdate
 %{_bindir}/geoiplookup6
 %{_bindir}/geoiplookup
 %{_datadir}/GeoIP/
@@ -108,9 +114,9 @@ geoipupdate
 %{_includedir}/GeoIPCity.h
 %{_includedir}/GeoIPUpdate.h
 %{_libdir}/libGeoIP.so
+%{_libdir}/pkgconfig/geoip.pc
 # GPLv2+
 %{_libdir}/libGeoIPUpdate.so
-%{_libdir}/pkgconfig/geoip.pc
 
 %changelog
 * Mon Apr 02 2013 Philip Prindeville <philipp at fedoraproject.org> - 1.5.0-1
diff --git a/geoipupdate.cron b/geoipupdate.cron
new file mode 100644
index 0000000..383d82f
--- /dev/null
+++ b/geoipupdate.cron
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+geoipupdate
-- 
cgit v0.10.2


>From 60c47c451ffde56630cf0e1900ae006873bf82d6 Mon Sep 17 00:00:00 2001
From: Philip Prindeville <philipp at redfish-solutions.com>
Date: Wed, 10 Apr 2013 16:43:24 -0600
Subject: Move crontab to its own subpackage.


diff --git a/GeoIP.spec b/GeoIP.spec
index 6f7f407..4b40f27 100644
--- a/GeoIP.spec
+++ b/GeoIP.spec
@@ -24,6 +24,16 @@ accurate as of February 2009. This database simply contains IP blocks as keys,
 and countries as values. This database should be more complete and accurate
 than using reverse DNS lookups.
 
+%package cron
+Summary:	Crontab entry to facilitate automatic updates of databases
+Group:		Applications/Databases
+Requires:	crontabs
+Provides:	geoip-cron = %{version}-%{release}
+Obsoletes:	geoip-cron < %{version}-%{release}
+
+%description cron
+Crontab entry to provide weekly updates of the GeoIP free databases.
+
 %package devel
 Summary:	Development headers and libraries for GeoIP
 Group:		Development/Libraries
@@ -94,7 +104,6 @@ geoipupdate
 %doc AUTHORS COPYING ChangeLog README TODO LICENSE* fetch-*
 %config(noreplace) %{_sysconfdir}/GeoIP.conf.default
 %config(noreplace) %{_sysconfdir}/GeoIP.conf
-%{_sysconfdir}/cron.weekly/geoipupdate
 %{_bindir}/geoiplookup6
 %{_bindir}/geoiplookup
 %{_datadir}/GeoIP/
@@ -108,6 +117,9 @@ geoipupdate
 %{_libdir}/libGeoIPUpdate.so.0.*
 %{_mandir}/man1/geoipupdate.1*
 
+%files cron
+%{_sysconfdir}/cron.weekly/geoipupdate
+
 %files devel
 # LGPLv2+
 %{_includedir}/GeoIP.h
@@ -119,8 +131,13 @@ geoipupdate
 %{_libdir}/libGeoIPUpdate.so
 
 %changelog
-* Mon Apr 02 2013 Philip Prindeville <philipp at fedoraproject.org> - 1.5.0-1
+* Wed Apr 10 2013 Philip Prindeville <philipp at fedoraproject.org> - 1.5.0-1
 - Version bump to 1.5.0
+- Change config as per Boris' instructions to use 'lite' databases which are
+  regularly updated.
+- Add pkgconfig (.pc) file into devel subpackage
+- Add cron support for refreshing the lite databases and make a separate
+  subpackage.
 
 * Sun Mar 24 2013 Paul Howarth <paul at city-fan.org> - 1.4.8-6
 - Fix config.guess and config.sub to add aarch64 support (#925403)
-- 
cgit v0.10.2


>From 21cdd46345074b0cafe65bd27d750f324a9a627d Mon Sep 17 00:00:00 2001
From: "Philip A. Prindeville" <philipp at redfish-solutions.com>
Date: Fri, 7 Jun 2013 18:13:44 -0600
Subject: Version bump to 1.5.0. Add rename -cron subpackage to -update (as per
 clamav). Add symlinks and %ghost annotations to simplify things.


diff --git a/GeoIP.spec b/GeoIP.spec
index 4b40f27..78e402a 100644
--- a/GeoIP.spec
+++ b/GeoIP.spec
@@ -24,22 +24,22 @@ accurate as of February 2009. This database simply contains IP blocks as keys,
 and countries as values. This database should be more complete and accurate
 than using reverse DNS lookups.
 
-%package cron
+%package update
 Summary:	Crontab entry to facilitate automatic updates of databases
 Group:		Applications/Databases
 Requires:	crontabs
-Provides:	geoip-cron = %{version}-%{release}
-Obsoletes:	geoip-cron < %{version}-%{release}
+Provides:	GeoIP-update = %{version}-%{release}
+Obsoletes:	GeoIP-update < %{version}-%{release}
 
-%description cron
+%description update
 Crontab entry to provide weekly updates of the GeoIP free databases.
 
 %package devel
 Summary:	Development headers and libraries for GeoIP
 Group:		Development/Libraries
 Requires:	%{name} = %{version}-%{release}
-Provides:	geoip-devel = %{version}-%{release}
-Obsoletes:	geoip-devel < %{version}-%{release}
+Provides:	GeoIP-devel = %{version}-%{release}
+Obsoletes:	GeoIP-devel < %{version}-%{release}
 
 %description devel
 Development headers and static libraries for building GeoIP-based applications.
@@ -74,7 +74,7 @@ make %{?_smp_mflags}
 
 %install
 rm -rf %{buildroot}
-make DESTDIR=%{buildroot} install
+make DESTDIR=%{buildroot} DEFAULT_DB_FILE="%{_datadir}/GeoIP/GeoIP-initial.dat" install
 
 # fetch database updates weekly
 install -D -m755 %{SOURCE5} %{buildroot}%{_sysconfdir}/cron.weekly/geoipupdate
@@ -88,25 +88,31 @@ sed -i \
 	-e 's/YOUR_USER_ID_HERE$/999999/' \
 	-e 's/106$/506 533 517/' \
 	%{buildroot}%{_sysconfdir}/GeoIP.conf
-ln -sf GeoLiteCountry.dat %{buildroot}%{_datadir}/GeoIP/GeoIP.dat
 
 %clean
 rm -rf %{buildroot}
 
 %post
 /sbin/ldconfig
-geoipupdate 
+ln -sf GeoIP-initial.dat %{_datadir}/GeoIP/GeoIP.dat
+geoipupdate && \
+	ln -sf GeoLiteCountry.dat %{_datadir}/GeoIP/GeoIP.dat
 
 %postun -p /sbin/ldconfig
 
 %files
 # LGPLv2+
-%doc AUTHORS COPYING ChangeLog README TODO LICENSE* fetch-*
+%doc AUTHORS COPYING ChangeLog README README.fedora TODO LICENSE* fetch-*
 %config(noreplace) %{_sysconfdir}/GeoIP.conf.default
 %config(noreplace) %{_sysconfdir}/GeoIP.conf
 %{_bindir}/geoiplookup6
 %{_bindir}/geoiplookup
 %{_datadir}/GeoIP/
+%{_datadir}/GeoIP/GeoIP-initial.dat
+%ghost %{_datadir}/GeoIP/GeoIP.dat
+%ghost %{_datadir}/GeoIP/GeoLiteCountry.dat
+%ghost %{_datadir}/GeoIP/GeoLiteCity.dat
+%ghost %{_datadir}/GeoIP/GeoLiteASNum.dat
 %{_libdir}/libGeoIP.so.1
 %{_libdir}/libGeoIP.so.1.*
 %{_mandir}/man1/geoiplookup.1*
@@ -117,7 +123,7 @@ geoipupdate
 %{_libdir}/libGeoIPUpdate.so.0.*
 %{_mandir}/man1/geoipupdate.1*
 
-%files cron
+%files update
 %{_sysconfdir}/cron.weekly/geoipupdate
 
 %files devel
@@ -131,8 +137,10 @@ geoipupdate
 %{_libdir}/libGeoIPUpdate.so
 
 %changelog
-* Wed Apr 10 2013 Philip Prindeville <philipp at fedoraproject.org> - 1.5.0-1
+* Fri Jun 07 2013 Philip Prindeville <philipp at fedoraproject.org> - 1.5.0-1
 - Version bump to 1.5.0
+- Have GeoIP.dat be a symlink to the real data, and install the canned
+  GeoIP.dat as GeoIP-initial.dat
 - Change config as per Boris' instructions to use 'lite' databases which are
   regularly updated.
 - Add pkgconfig (.pc) file into devel subpackage
diff --git a/geoipupdate.cron b/geoipupdate.cron
index 383d82f..e536bf3 100644
--- a/geoipupdate.cron
+++ b/geoipupdate.cron
@@ -1,3 +1,4 @@
 #!/bin/sh
 
-geoipupdate
+geoipupdate && \
+	ln -sf GeoLiteCountry.dat /usr/share/GeoIP/GeoIP.dat
-- 
cgit v0.10.2


>From de8e6555d3c7207f691d55aa36c785bc3db8e588 Mon Sep 17 00:00:00 2001
From: "Philip A. Prindeville" <philipp at redfish-solutions.com>
Date: Fri, 7 Jun 2013 21:38:46 -0600
Subject: update subpackage has no architecture.


diff --git a/GeoIP.spec b/GeoIP.spec
index 78e402a..fa1b603 100644
--- a/GeoIP.spec
+++ b/GeoIP.spec
@@ -30,6 +30,7 @@ Group:		Applications/Databases
 Requires:	crontabs
 Provides:	GeoIP-update = %{version}-%{release}
 Obsoletes:	GeoIP-update < %{version}-%{release}
+BuildArch:	noarch
 
 %description update
 Crontab entry to provide weekly updates of the GeoIP free databases.
-- 
cgit v0.10.2


>From 1c81a74099c76bfe8b5015feca523bc22c69e6d9 Mon Sep 17 00:00:00 2001
From: "Philip A. Prindeville" <philipp at redfish-solutions.com>
Date: Fri, 7 Jun 2013 21:51:34 -0600
Subject: Bump version for noarch change.


diff --git a/GeoIP.spec b/GeoIP.spec
index fa1b603..94c28b9 100644
--- a/GeoIP.spec
+++ b/GeoIP.spec
@@ -1,6 +1,6 @@
 Name:		GeoIP
 Version:	1.5.0
-Release:	1%{?dist}
+Release:	2%{?dist}
 Summary:	Library for country/city/organization to IP address or hostname mapping
 Group:		Development/Libraries
 License:	LGPLv2+ and GPLv2+
@@ -138,6 +138,9 @@ geoipupdate && \
 %{_libdir}/libGeoIPUpdate.so
 
 %changelog
+* Fri Jun 07 2013 Philip Prindeville <philipp at fedoraproject.org> - 1.5.0-2
+- Make update subpackage be noarch.
+
 * Fri Jun 07 2013 Philip Prindeville <philipp at fedoraproject.org> - 1.5.0-1
 - Version bump to 1.5.0
 - Have GeoIP.dat be a symlink to the real data, and install the canned
-- 
cgit v0.10.2


>From aa9907d0869fbf2e7b3cfd1987405cf537b04f99 Mon Sep 17 00:00:00 2001
From: "Philip A. Prindeville" <philipp at redfish-solutions.com>
Date: Fri, 7 Jun 2013 23:26:21 -0600
Subject: Apparently even %ghost's require attributes.


diff --git a/GeoIP.spec b/GeoIP.spec
index 94c28b9..c39a42d 100644
--- a/GeoIP.spec
+++ b/GeoIP.spec
@@ -110,10 +110,10 @@ geoipupdate && \
 %{_bindir}/geoiplookup
 %{_datadir}/GeoIP/
 %{_datadir}/GeoIP/GeoIP-initial.dat
-%ghost %{_datadir}/GeoIP/GeoIP.dat
-%ghost %{_datadir}/GeoIP/GeoLiteCountry.dat
-%ghost %{_datadir}/GeoIP/GeoLiteCity.dat
-%ghost %{_datadir}/GeoIP/GeoLiteASNum.dat
+%ghost %attr(0644,root,root) %{_datadir}/GeoIP/GeoIP.dat
+%ghost %attr(0644,root,root) %{_datadir}/GeoIP/GeoLiteCountry.dat
+%ghost %attr(0644,root,root) %{_datadir}/GeoIP/GeoLiteCity.dat
+%ghost %attr(0644,root,root) %{_datadir}/GeoIP/GeoLiteASNum.dat
 %{_libdir}/libGeoIP.so.1
 %{_libdir}/libGeoIP.so.1.*
 %{_mandir}/man1/geoiplookup.1*
-- 
cgit v0.10.2


>From 13e54c843113273b6eb1a1cfa88ee6cffa0f99f7 Mon Sep 17 00:00:00 2001
From: "Philip A. Prindeville" <philipp at redfish-solutions.com>
Date: Fri, 7 Jun 2013 23:29:16 -0600
Subject: And another version bump.


diff --git a/GeoIP.spec b/GeoIP.spec
index c39a42d..d582665 100644
--- a/GeoIP.spec
+++ b/GeoIP.spec
@@ -1,6 +1,6 @@
 Name:		GeoIP
 Version:	1.5.0
-Release:	2%{?dist}
+Release:	3%{?dist}
 Summary:	Library for country/city/organization to IP address or hostname mapping
 Group:		Development/Libraries
 License:	LGPLv2+ and GPLv2+
-- 
cgit v0.10.2


>From 65ad6a1e48bc66417c1ab6ecc2329e6d7eb35370 Mon Sep 17 00:00:00 2001
From: "Philip A. Prindeville" <philipp at redfish-solutions.com>
Date: Sat, 8 Jun 2013 08:38:22 -0600
Subject: As per Paul, replace previous interchangeability with 3rd-party
 package.


diff --git a/GeoIP.spec b/GeoIP.spec
index d582665..7f3ff1c 100644
--- a/GeoIP.spec
+++ b/GeoIP.spec
@@ -1,6 +1,6 @@
 Name:		GeoIP
 Version:	1.5.0
-Release:	3%{?dist}
+Release:	4%{?dist}
 Summary:	Library for country/city/organization to IP address or hostname mapping
 Group:		Development/Libraries
 License:	LGPLv2+ and GPLv2+
@@ -28,8 +28,6 @@ than using reverse DNS lookups.
 Summary:	Crontab entry to facilitate automatic updates of databases
 Group:		Applications/Databases
 Requires:	crontabs
-Provides:	GeoIP-update = %{version}-%{release}
-Obsoletes:	GeoIP-update < %{version}-%{release}
 BuildArch:	noarch
 
 %description update
@@ -39,8 +37,8 @@ Crontab entry to provide weekly updates of the GeoIP free databases.
 Summary:	Development headers and libraries for GeoIP
 Group:		Development/Libraries
 Requires:	%{name} = %{version}-%{release}
-Provides:	GeoIP-devel = %{version}-%{release}
-Obsoletes:	GeoIP-devel < %{version}-%{release}
+Provides:	geoip-devel = %{version}-%{release}
+Obsoletes:	geoip-devel < %{version}-%{release}
 
 %description devel
 Development headers and static libraries for building GeoIP-based applications.
@@ -138,6 +136,9 @@ geoipupdate && \
 %{_libdir}/libGeoIPUpdate.so
 
 %changelog
+* Sat Jun 08 2013 Philip Prindeville <philipp at fedoraproject.org> - 1.5.0-4
+- Revert ability to replace 3rd-party package.
+
 * Fri Jun 07 2013 Philip Prindeville <philipp at fedoraproject.org> - 1.5.0-2
 - Make update subpackage be noarch.
 
-- 
cgit v0.10.2


>From d24a137e473a872de2daf7dde8da19cd0321bb53 Mon Sep 17 00:00:00 2001
From: Paul Howarth <paul at city-fan.org>
Date: Mon, 10 Jun 2013 11:23:26 +0100
Subject: Fix noisy geoipupdate runs, restore EL-5 compatibility

- Make GeoIP.dat -> GeoIP-initial.dat symlink in %install, not %post,
  and don't %ghost it
- Run geoipupdate silently in %post and cron job
- Create empty database files for %ghost to work with old rpm versions
- Don't try to use noarch subpackages on old rpm versions
- Update %description to mention database updates

diff --git a/GeoIP.spec b/GeoIP.spec
index 7f3ff1c..cad553f 100644
--- a/GeoIP.spec
+++ b/GeoIP.spec
@@ -1,6 +1,9 @@
+# Noarch subpackages available from Fedora 10, RHEL 6
+%global noarch_subpkgs 0%{?fedora} > 9 || 0%{?rhel} > 5
+
 Name:		GeoIP
 Version:	1.5.0
-Release:	4%{?dist}
+Release:	5%{?dist}
 Summary:	Library for country/city/organization to IP address or hostname mapping
 Group:		Development/Libraries
 License:	LGPLv2+ and GPLv2+
@@ -20,15 +23,18 @@ Provides:	geoip = %{version}-%{release}
 %description
 GeoIP is a C library that enables the user to find the country that any IP
 address or hostname originates from. It uses a file based database that is
-accurate as of February 2009. This database simply contains IP blocks as keys,
-and countries as values. This database should be more complete and accurate
-than using reverse DNS lookups.
+updated at install time if possible, and can optionally be updated on a weekly
+basis by installing the GeoIP-update package. This database simply contains IP
+blocks as keys, and countries as values. This database should be more complete
+and accurate than using reverse DNS lookups.
 
 %package update
 Summary:	Crontab entry to facilitate automatic updates of databases
 Group:		Applications/Databases
 Requires:	crontabs
+%if %{noarch_subpkgs}
 BuildArch:	noarch
+%endif
 
 %description update
 Crontab entry to provide weekly updates of the GeoIP free databases.
@@ -53,6 +59,7 @@ install -D -m644 %{SOURCE1} LICENSE.txt
 install -D -m644 %{SOURCE2} fetch-geoipdata-city.pl
 install -D -m644 %{SOURCE3} fetch-geoipdata.pl
 install -D -m644 %{SOURCE4} README.fedora
+install -D -m644 %{SOURCE5} geoipupdate.cron
 
 %build
 # Fix timestamp order to avoid trying to re-run autotools and configure,
@@ -76,7 +83,7 @@ rm -rf %{buildroot}
 make DESTDIR=%{buildroot} DEFAULT_DB_FILE="%{_datadir}/GeoIP/GeoIP-initial.dat" install
 
 # fetch database updates weekly
-install -D -m755 %{SOURCE5} %{buildroot}%{_sysconfdir}/cron.weekly/geoipupdate
+install -D -m755 geoipupdate.cron %{buildroot}%{_sysconfdir}/cron.weekly/geoipupdate
 
 # nix the stuff we don't need like .la files.
 rm -f %{buildroot}%{_libdir}/*.la
@@ -88,13 +95,20 @@ sed -i \
 	-e 's/106$/506 533 517/' \
 	%{buildroot}%{_sysconfdir}/GeoIP.conf
 
+# make the default GeoIP.dat a symlink to GeoIP-initial.dat,
+# at least until %%post has run
+ln -sf GeoIP-initial.dat %{buildroot}%{_datadir}/GeoIP/GeoIP.dat
+
+# create empty files for initial %%ghost databases
+touch %{buildroot}%{_datadir}/GeoIP/GeoLite{ASNum,City,Country}.dat
+chmod 644 %{buildroot}%{_datadir}/GeoIP/GeoLite{ASNum,City,Country}.dat
+
 %clean
 rm -rf %{buildroot}
 
 %post
 /sbin/ldconfig
-ln -sf GeoIP-initial.dat %{_datadir}/GeoIP/GeoIP.dat
-geoipupdate && \
+geoipupdate > /dev/null && \
 	ln -sf GeoLiteCountry.dat %{_datadir}/GeoIP/GeoIP.dat
 
 %postun -p /sbin/ldconfig
@@ -102,16 +116,16 @@ geoipupdate && \
 %files
 # LGPLv2+
 %doc AUTHORS COPYING ChangeLog README README.fedora TODO LICENSE* fetch-*
-%config(noreplace) %{_sysconfdir}/GeoIP.conf.default
 %config(noreplace) %{_sysconfdir}/GeoIP.conf
-%{_bindir}/geoiplookup6
+%config(noreplace) %{_sysconfdir}/GeoIP.conf.default
 %{_bindir}/geoiplookup
-%{_datadir}/GeoIP/
+%{_bindir}/geoiplookup6
+%dir %{_datadir}/GeoIP/
 %{_datadir}/GeoIP/GeoIP-initial.dat
-%ghost %attr(0644,root,root) %{_datadir}/GeoIP/GeoIP.dat
-%ghost %attr(0644,root,root) %{_datadir}/GeoIP/GeoLiteCountry.dat
-%ghost %attr(0644,root,root) %{_datadir}/GeoIP/GeoLiteCity.dat
-%ghost %attr(0644,root,root) %{_datadir}/GeoIP/GeoLiteASNum.dat
+%verify(not md5 size link mtime) %{_datadir}/GeoIP/GeoIP.dat
+%ghost %{_datadir}/GeoIP/GeoLiteASNum.dat
+%ghost %{_datadir}/GeoIP/GeoLiteCity.dat
+%ghost %{_datadir}/GeoIP/GeoLiteCountry.dat
 %{_libdir}/libGeoIP.so.1
 %{_libdir}/libGeoIP.so.1.*
 %{_mandir}/man1/geoiplookup.1*
@@ -136,8 +150,19 @@ geoipupdate && \
 %{_libdir}/libGeoIPUpdate.so
 
 %changelog
+* Sat Jun  8 2013 Paul Howarth <paul at city-fan.org> - 1.5.0-5
+- Make GeoIP.dat -> GeoIP-initial.dat symlink in %%install, not %%post,
+  and don't %%ghost it
+- Run geoipupdate silently in %%post and cron job
+- Create empty database files for %%ghost to work with old rpm versions
+- Don't try to use noarch subpackages on old rpm versions
+- Update %%description to mention database updates
+
 * Sat Jun 08 2013 Philip Prindeville <philipp at fedoraproject.org> - 1.5.0-4
-- Revert ability to replace 3rd-party package.
+- Revert ability to replace 3rd-party package
+
+* Fri Jun 07 2013 Philip Prindeville <philipp at fedoraproject.org> - 1.5.0-3
+- Add attributes for %%ghost files
 
 * Fri Jun 07 2013 Philip Prindeville <philipp at fedoraproject.org> - 1.5.0-2
 - Make update subpackage be noarch.
diff --git a/geoipupdate.cron b/geoipupdate.cron
index e536bf3..892b974 100644
--- a/geoipupdate.cron
+++ b/geoipupdate.cron
@@ -1,4 +1,4 @@
 #!/bin/sh
 
-geoipupdate && \
+geoipupdate > /dev/null && \
 	ln -sf GeoLiteCountry.dat /usr/share/GeoIP/GeoIP.dat
-- 
cgit v0.10.2


>From 71987c1dfabbfb50ecc0fbd5f704c5815befc7a9 Mon Sep 17 00:00:00 2001
From: Paul Howarth <paul at city-fan.org>
Date: Mon, 10 Jun 2013 13:06:49 +0100
Subject: Drop outdated README.Fedora


diff --git a/GeoIP.spec b/GeoIP.spec
index cad553f..43947ad 100644
--- a/GeoIP.spec
+++ b/GeoIP.spec
@@ -12,7 +12,6 @@ Source0:	http://www.maxmind.com/download/geoip/api/c/GeoIP-%{version}.tar.gz
 Source1:	LICENSE.txt
 Source2:	fetch-geoipdata-city.pl
 Source3:	fetch-geoipdata.pl
-Source4:	README.Fedora
 Source5:	geoipupdate.cron
 Patch10:	GeoIP-1.5.0-UTF8.patch
 BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(id -nu)
@@ -58,7 +57,6 @@ Development headers and static libraries for building GeoIP-based applications.
 install -D -m644 %{SOURCE1} LICENSE.txt
 install -D -m644 %{SOURCE2} fetch-geoipdata-city.pl
 install -D -m644 %{SOURCE3} fetch-geoipdata.pl
-install -D -m644 %{SOURCE4} README.fedora
 install -D -m644 %{SOURCE5} geoipupdate.cron
 
 %build
@@ -115,7 +113,7 @@ geoipupdate > /dev/null && \
 
 %files
 # LGPLv2+
-%doc AUTHORS COPYING ChangeLog README README.fedora TODO LICENSE* fetch-*
+%doc AUTHORS COPYING ChangeLog README TODO LICENSE* fetch-*
 %config(noreplace) %{_sysconfdir}/GeoIP.conf
 %config(noreplace) %{_sysconfdir}/GeoIP.conf.default
 %{_bindir}/geoiplookup
@@ -157,6 +155,7 @@ geoipupdate > /dev/null && \
 - Create empty database files for %%ghost to work with old rpm versions
 - Don't try to use noarch subpackages on old rpm versions
 - Update %%description to mention database updates
+- Drop outdated README.Fedora
 
 * Sat Jun 08 2013 Philip Prindeville <philipp at fedoraproject.org> - 1.5.0-4
 - Revert ability to replace 3rd-party package
diff --git a/README.Fedora b/README.Fedora
deleted file mode 100644
index d1d3fa7..0000000
--- a/README.Fedora
+++ /dev/null
@@ -1,73 +0,0 @@
-Automatically fetching GeoIP "free" databases
-==============================================
-
-As provided by Maxmind, LLC, the GeoIP library packages possess tools to
-fetch the licensed country/city/organization etc. databases they
-provide, but no such tool to fetch the free Country/City equivalents.
-
-Additionally, the database version shipped with the base package will be
-the current one at the time a new library release ships. Therefore, the
-shipped database gets less accurate and obsolescent if the library has
-not been updated in some time.
-
-Therefore these databases can become out-of-date quite quickly unless
-the user manually fetches and replaces them regularly; Maxmind generally
-release updates once a month (on the 1st/2nd day of the month).
-
-To assist users/administrators in automating retrieval/updating of the
-available free databases, I've provided the following Perl scripts:
-
-THE SCRIPTS:
-===========
-
-* fetch-geoipdata.pl - This fetches the base GeoIP.dat.gz file from
-Maxmind's site, replacing the existing /usr/share/GeoIP/GeoIP.dat file
-appropriately, keeping a dated backup (YYYYMMDD) of the old database file.
-
-* fetch-geoipdata-city.pl - This works the same way as the above script,
-but on the free City database. It should be noted that a) the City database
-is not part of the standard library package and b) it's fairly large
-(~20mb) and not friendly to users on slow connections.
-
-File location and URL to fetch from are in the script itself, feel free
-to change these to suit your system and local requirements.
-
-REQUIREMENTS:
-============
-* A basic Perl installation will do. As long as Carp, File::Copy and the
-  LWP modules are available the scripts will be satisfied
-* gzip to decompress the fetched archives. Almost all systems will have
-  this as part of the base installation.
-
-USAGE:
-============
-* Simply put the scripts in your PATH and set them to executable.  
-
-* These are best run from a crontab entry, ideally on the 1st/2nd of the
-  month (depending on your timezone. I'm at +1000  - Queensland,
-  Australia so that works for me)
-
-  eg
-
-  # Fetch GeoIP databases at 6am on the 2nd of the month
-  00 06 2 * * /usr/local/bin/fetch-geoipdata.pl
-
-  You should not need to reload apps using the databases under normal
-  circumstances.
-
-BUGS:
-============
-* Hopefully few if any. More verbose error checking is planned.
-* Please do not send bug reports or issues relating to these scripts to
-  Maxmind, LLC - I am in no way employed by or personally/professionally
-  related to the company, I'm just a user like you :-)
-* Feel free to send any improvements / bugfixes / ideas to me directly.
-
-AUTHOR
-============
-Michael Fleming <mfleming at enlartenment.com>
-
-LICENSE
-============
-This code is licensed under the GPL version 2
-
-- 
cgit v0.10.2


>From b60901656247703edfe51e22bfdefd3de26bbe3f Mon Sep 17 00:00:00 2001
From: Paul Howarth <paul at city-fan.org>
Date: Mon, 10 Jun 2013 14:03:29 +0100
Subject: Update sub-package requires main package for geoipupdate script


diff --git a/GeoIP.spec b/GeoIP.spec
index 43947ad..914e66b 100644
--- a/GeoIP.spec
+++ b/GeoIP.spec
@@ -3,7 +3,7 @@
 
 Name:		GeoIP
 Version:	1.5.0
-Release:	5%{?dist}
+Release:	6%{?dist}
 Summary:	Library for country/city/organization to IP address or hostname mapping
 Group:		Development/Libraries
 License:	LGPLv2+ and GPLv2+
@@ -31,6 +31,7 @@ and accurate than using reverse DNS lookups.
 Summary:	Crontab entry to facilitate automatic updates of databases
 Group:		Applications/Databases
 Requires:	crontabs
+Requires:	%{name} = %{version}-%{release}
 %if %{noarch_subpkgs}
 BuildArch:	noarch
 %endif
@@ -148,6 +149,9 @@ geoipupdate > /dev/null && \
 %{_libdir}/libGeoIPUpdate.so
 
 %changelog
+* Mon Jun 10 2013 Paul Howarth <paul at city-fan.org> - 1.5.0-6
+- Update sub-package requires main package for geoipupdate script
+
 * Sat Jun  8 2013 Paul Howarth <paul at city-fan.org> - 1.5.0-5
 - Make GeoIP.dat -> GeoIP-initial.dat symlink in %%install, not %%post,
   and don't %%ghost it
-- 
cgit v0.10.2


>From df2039ecf8b2e4fcc07f795fba594e2e027b1e2b Mon Sep 17 00:00:00 2001
From: "Philip A. Prindeville" <philipp at redfish-solutions.com>
Date: Wed, 12 Jun 2013 23:48:37 -0600
Subject: Bump to version 1.5.1.


diff --git a/.gitignore b/.gitignore
index 79983ef..db8103b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,4 @@
 GeoIP-1.4.6.tar.gz
 /GeoIP-1.4.8.tar.gz
 /GeoIP-1.5.0.tar.gz
+/GeoIP-1.5.1.tar.gz
diff --git a/GeoIP-1.5.0-UTF8.patch b/GeoIP-1.5.0-UTF8.patch
index 4403fb3..dcc9c38 100644
--- a/GeoIP-1.5.0-UTF8.patch
+++ b/GeoIP-1.5.0-UTF8.patch
@@ -24,46 +24,3 @@ diff -U0 GeoIP-1.5.0/ChangeLog.orig GeoIP-1.5.0/ChangeLog
 +		    (I've already done the above changes see attached function.)
 +		    With gcc -O2 calculating x[0] and x[1] for STANDARD_RECORD_LENGTH now
 +		    only takes 15 (was > 100) i80x86 instructions with 6 byte accesses of RAM.                 4) only calculate x[0], x[1] when needed, may be a bigger win
-diff -U0 GeoIP-1.5.0/man/geoiplookup.1.in.orig GeoIP-1.5.0/man/geoiplookup.1.in
---- GeoIP-1.5.0/man/geoiplookup.1.in.orig	2013-02-27 14:13:11.000000000 -0700
-+++ GeoIP-1.5.0/man/geoiplookup.1.in	2013-04-02 12:01:22.500882994 -0600
-@@ -31,1 +31,1 @@
--Copyright � 2006 MaxMind, Inc.
-+Copyright \[co] 2006 MaxMind, Inc.
-diff -U0 GeoIP-1.5.0/man/geoiplookup6.1.in.orig GeoIP-1.5.0/man/geoiplookup6.1.in
---- GeoIP-1.5.0/man/geoiplookup6.1.in.orig	2013-02-27 14:13:11.000000000 -0700
-+++ GeoIP-1.5.0/man/geoiplookup6.1.in	2013-04-02 12:02:11.595886598 -0600
-@@ -36,1 +36,1 @@
--Copyright � 2008 MaxMind, Inc.
-+Copyright \[co] 2008 MaxMind, Inc.
-diff -U0 GeoIP-1.5.0/man/geoipupdate.1.in.orig GeoIP-1.5.0/man/geoipupdate.1.in
---- GeoIP-1.5.0/man/geoipupdate.1.in.orig	2013-02-27 14:13:11.000000000 -0700
-+++ GeoIP-1.5.0/man/geoipupdate.1.in	2013-04-02 12:02:36.402889004 -0600
-@@ -59,1 +59,1 @@
--Copyright � 2011 MaxMind, Inc.
-+Copyright \[co] 2011 MaxMind, Inc.
-diff -U0 GeoIP-1.5.0/README.orig GeoIP-1.5.0/README
---- GeoIP-1.5.0/README.orig	2013-02-27 14:27:51.000000000 -0700
-+++ GeoIP-1.5.0/README	2013-04-02 12:04:45.400883174 -0600
-@@ -209,1 +209,1 @@
--4.2(.0). Thanks to Kai Sch�tzl for the report.
-+4.2(.0). Thanks to Kai Schätzl for the report.
-diff -up GeoIP-1.4.8/TODO.orig GeoIP-1.4.8/TODO
---- GeoIP-1.4.8/TODO.orig	2011-03-27 22:00:37.000000000 +0100
-+++ GeoIP-1.4.8/TODO	2011-06-27 09:06:16.214029320 +0100
-@@ -9,12 +9,12 @@ Maurice Cinquini
- 
- *** ifndef WIN32 on netdb.h ? ***
- In GeoIPCity.c you don't "#ifndef WIN32" the netdb.h include,
--but in GeoIP.c you do.� Which one is right?
-+but in GeoIP.c you do.  Which one is right?
- 
- *** Warnings in GeoIP-1.2.1 before I made changes ***
- GeoIPUpdate.c:73: warning: implicit declaration of function `_setup_dbfilename'
--��� I suggest a GeoIP_private.h file to include prototypes for
--��� _setup_dbfilename and other private functions also used by GeoIPCity.c
-+    I suggest a GeoIP_private.h file to include prototypes for
-+    _setup_dbfilename and other private functions also used by GeoIPCity.c
- 
- *** Drop the GeoIP_*_by_addr API calls ***
- And now that I think of it, why do you need a seperate
diff --git a/GeoIP-1.5.0-exitcode.patch b/GeoIP-1.5.0-exitcode.patch
new file mode 100644
index 0000000..315e06e
--- /dev/null
+++ b/GeoIP-1.5.0-exitcode.patch
@@ -0,0 +1,38 @@
+--- GeoIP-1.5.0/apps/geoipupdate.c.orig	2013-02-27 14:13:11.000000000 -0700
++++ GeoIP-1.5.0/apps/geoipupdate.c	2013-06-10 10:37:08.542133407 -0600
+@@ -40,7 +40,7 @@ static void * realloc_or_die( void * ptr
+     if ( !new ) {
+         free(ptr);
+         fprintf(stderr, "Out of memory\n");
+-        exit(1);
++        exit(-GEOIP_OUT_OF_MEMORY_ERR);
+     }
+     return new;
+ }
+@@ -121,7 +121,7 @@ int main (int argc, char *argv[]) {
+ 								 "Unknown option character `\\x%x'.\n",
+ 								 optopt);
+ 			usage();
+-			exit(1);
++			exit(1);		// need unambiguous exit code
+ 		default:
+ 			abort();
+ 		}
+@@ -140,7 +140,7 @@ int main (int argc, char *argv[]) {
+   license_fh = fopen(license_file,"r");
+ 	if (license_fh == NULL) {
+ 		fprintf(stderr,"Error opening GeoIP Configuration file %s\n",license_file);
+-		exit(1);
++		exit(1);			// need unambiguous exit code
+ 	}
+ 
+ 	if (verbose == 1)
+@@ -292,5 +292,7 @@ int main (int argc, char *argv[]) {
+ 	if (client_ipaddr) {
+ 		free(client_ipaddr);
+ 	}
+-	exit(err);
++	exit((err >= 0) ? 0 : -err);		// use GeoIPUpdateCode as exit code
+ }
++
++// vim:ts=2
diff --git a/GeoIP.spec b/GeoIP.spec
index 914e66b..658aa99 100644
--- a/GeoIP.spec
+++ b/GeoIP.spec
@@ -2,8 +2,8 @@
 %global noarch_subpkgs 0%{?fedora} > 9 || 0%{?rhel} > 5
 
 Name:		GeoIP
-Version:	1.5.0
-Release:	6%{?dist}
+Version:	1.5.1
+Release:	1%{?dist}
 Summary:	Library for country/city/organization to IP address or hostname mapping
 Group:		Development/Libraries
 License:	LGPLv2+ and GPLv2+
@@ -13,11 +13,13 @@ Source1:	LICENSE.txt
 Source2:	fetch-geoipdata-city.pl
 Source3:	fetch-geoipdata.pl
 Source5:	geoipupdate.cron
+Patch1:		GeoIP-1.5.0-exitcode.patch
 Patch10:	GeoIP-1.5.0-UTF8.patch
 BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(id -nu)
 BuildRequires:	zlib-devel
 Obsoletes:	geoip < %{version}-%{release}
 Provides:	geoip = %{version}-%{release}
+Obsoletes:	geoip-geolite
 
 %description
 GeoIP is a C library that enables the user to find the country that any IP
@@ -52,8 +54,9 @@ Development headers and static libraries for building GeoIP-based applications.
 %prep
 %setup -q
 
+%patch1 -p1 -b .exitcode
 # Recode docs as UTF-8
-%patch10 -p1
+%patch10 -p1 -b .utf8
 
 install -D -m644 %{SOURCE1} LICENSE.txt
 install -D -m644 %{SOURCE2} fetch-geoipdata-city.pl
@@ -149,6 +152,12 @@ geoipupdate > /dev/null && \
 %{_libdir}/libGeoIPUpdate.so
 
 %changelog
+* Wed Jun 12 2013 Philip Prindeville <philipp at fedoraproject.org> - 1.5.1-1
+- Bump to version 1.5.1.
+
+* Mon Jun 10 2013 Philip Prindeville <philipp at fedoraproject.org> - 1.5.0-7
+- Annotate conflict with geoip-lite package.
+
 * Mon Jun 10 2013 Paul Howarth <paul at city-fan.org> - 1.5.0-6
 - Update sub-package requires main package for geoipupdate script
 
diff --git a/sources b/sources
index 112fd0d..df83d77 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-57bc400b5c11057a4cab00e1c5cf3f00  GeoIP-1.5.0.tar.gz
+36b82f3558e6e2ebdd11a56c5db21dbc  GeoIP-1.5.1.tar.gz
-- 
cgit v0.10.2


>From e8df18e375696c157b96bf4cf83874254c1b70ce Mon Sep 17 00:00:00 2001
From: Paul Howarth <paul at city-fan.org>
Date: Thu, 13 Jun 2013 10:31:50 +0100
Subject: Update UTF8 patch


diff --git a/GeoIP-1.5.0-UTF8.patch b/GeoIP-1.5.0-UTF8.patch
deleted file mode 100644
index dcc9c38..0000000
--- a/GeoIP-1.5.0-UTF8.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-diff -U0 GeoIP-1.5.0/ChangeLog.orig GeoIP-1.5.0/ChangeLog
---- GeoIP-1.5.0/ChangeLog.orig	2011-06-24 14:44:56.000000000 +0100
-+++ GeoIP-1.5.0/ChangeLog	2011-06-27 09:06:16.190029375 +0100
-@@ -137,2 +137,2 @@
--	* Fixed a typo in the geoipupdate(1) manpage and also an non-existent path on Debian (Patrick Matth�i)
--	* Fixes two little format errors (hyphen used as minus sign) in both manpages (Patrick Matth�i)
-+	* Fixed a typo in the geoipupdate(1) manpage and also an non-existent path on Debian (Patrick Matthäi)
-+	* Fixes two little format errors (hyphen used as minus sign) in both manpages (Patrick Matthäi)
-@@ -249 +249 @@
--	* Fixed build issue when using --as-needed flag (Diego 'Flameeyes' Petten�)
-+	* Fixed build issue when using --as-needed flag (Diego 'Flameeyes' Pettenò)
-@@ -395,7 +395,7 @@
--		�1) Use a single buf ptr inside the loops.
--		��� Set to the stack buffer or the cached memory the start of the function.
--		�2) Unroll the i=0,1 loop to allow constant folding.
--		�3) Unroll the j loop for the common case of j = STANDARD_RECORD_LENGTH
--		��� (I've already done the above changes see attached function.)
--		��� With gcc -O2 calculating x[0] and x[1] for STANDARD_RECORD_LENGTH now
--		��� only takes 15 (was > 100) i80x86 instructions with 6 byte accesses of RAM.                 4) only calculate x[0], x[1] when needed, may be a bigger win
-+		 1) Use a single buf ptr inside the loops.
-+		    Set to the stack buffer or the cached memory the start of the function.
-+		 2) Unroll the i=0,1 loop to allow constant folding.
-+		 3) Unroll the j loop for the common case of j = STANDARD_RECORD_LENGTH
-+		    (I've already done the above changes see attached function.)
-+		    With gcc -O2 calculating x[0] and x[1] for STANDARD_RECORD_LENGTH now
-+		    only takes 15 (was > 100) i80x86 instructions with 6 byte accesses of RAM.                 4) only calculate x[0], x[1] when needed, may be a bigger win
diff --git a/GeoIP-1.5.1-UTF8.patch b/GeoIP-1.5.1-UTF8.patch
new file mode 100644
index 0000000..e72f48d
--- /dev/null
+++ b/GeoIP-1.5.1-UTF8.patch
@@ -0,0 +1,45 @@
+diff -U0 ./ChangeLog.utf8 ./ChangeLog
+--- ./ChangeLog.utf8	2013-03-23 02:26:09.000000000 +0000
++++ ./ChangeLog	2013-06-13 09:11:18.640720014 +0100
+@@ -185,2 +185,2 @@
+-	* Fixed a typo in the geoipupdate(1) manpage and also an non-existent path on Debian (Patrick Matth�i)
+-	* Fixes two little format errors (hyphen used as minus sign) in both manpages (Patrick Matth�i)
++	* Fixed a typo in the geoipupdate(1) manpage and also an non-existent path on Debian (Patrick Matthäi)
++	* Fixes two little format errors (hyphen used as minus sign) in both manpages (Patrick Matthäi)
+@@ -297 +297 @@
+-	* Fixed build issue when using --as-needed flag (Diego 'Flameeyes' Petten�)
++	* Fixed build issue when using --as-needed flag (Diego 'Flameeyes' Pettenò)
+@@ -443,7 +443,7 @@
+-		�1) Use a single buf ptr inside the loops.
+-		��� Set to the stack buffer or the cached memory the start of the function.
+-		�2) Unroll the i=0,1 loop to allow constant folding.
+-		�3) Unroll the j loop for the common case of j = STANDARD_RECORD_LENGTH
+-		��� (I've already done the above changes see attached function.)
+-		��� With gcc -O2 calculating x[0] and x[1] for STANDARD_RECORD_LENGTH now
+-		��� only takes 15 (was > 100) i80x86 instructions with 6 byte accesses of RAM.                 4) only calculate x[0], x[1] when needed, may be a bigger win
++		 1) Use a single buf ptr inside the loops.
++		    Set to the stack buffer or the cached memory the start of the function.
++		 2) Unroll the i=0,1 loop to allow constant folding.
++		 3) Unroll the j loop for the common case of j = STANDARD_RECORD_LENGTH
++		    (I've already done the above changes see attached function.)
++		    With gcc -O2 calculating x[0] and x[1] for STANDARD_RECORD_LENGTH now
++		    only takes 15 (was > 100) i80x86 instructions with 6 byte accesses of RAM.                 4) only calculate x[0], x[1] when needed, may be a bigger win
+diff -up ./TODO.utf8 ./TODO
+--- ./TODO.utf8	2013-03-23 02:26:09.000000000 +0000
++++ ./TODO	2013-06-13 09:16:19.274926385 +0100
+@@ -9,12 +9,12 @@ Maurice Cinquini
+ 
+ *** ifndef WIN32 on netdb.h ? ***
+ In GeoIPCity.c you don't "#ifndef WIN32" the netdb.h include,
+-but in GeoIP.c you do.� Which one is right?
++but in GeoIP.c you do.  Which one is right?
+ 
+ *** Warnings in GeoIP-1.2.1 before I made changes ***
+ GeoIPUpdate.c:73: warning: implicit declaration of function `_setup_dbfilename'
+-��� I suggest a GeoIP_private.h file to include prototypes for
+-��� _setup_dbfilename and other private functions also used by GeoIPCity.c
++    I suggest a GeoIP_private.h file to include prototypes for
++    _setup_dbfilename and other private functions also used by GeoIPCity.c
+ 
+ *** Drop the GeoIP_*_by_addr API calls ***
+ And now that I think of it, why do you need a seperate
diff --git a/GeoIP.spec b/GeoIP.spec
index 658aa99..99487be 100644
--- a/GeoIP.spec
+++ b/GeoIP.spec
@@ -14,7 +14,7 @@ Source2:	fetch-geoipdata-city.pl
 Source3:	fetch-geoipdata.pl
 Source5:	geoipupdate.cron
 Patch1:		GeoIP-1.5.0-exitcode.patch
-Patch10:	GeoIP-1.5.0-UTF8.patch
+Patch10:	GeoIP-1.5.1-UTF8.patch
 BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(id -nu)
 BuildRequires:	zlib-devel
 Obsoletes:	geoip < %{version}-%{release}
@@ -55,6 +55,7 @@ Development headers and static libraries for building GeoIP-based applications.
 %setup -q
 
 %patch1 -p1 -b .exitcode
+
 # Recode docs as UTF-8
 %patch10 -p1 -b .utf8
 
@@ -153,7 +154,8 @@ geoipupdate > /dev/null && \
 
 %changelog
 * Wed Jun 12 2013 Philip Prindeville <philipp at fedoraproject.org> - 1.5.1-1
-- Bump to version 1.5.1.
+- Bump to version 1.5.1
+- Update UTF8 patch
 
 * Mon Jun 10 2013 Philip Prindeville <philipp at fedoraproject.org> - 1.5.0-7
 - Annotate conflict with geoip-lite package.
-- 
cgit v0.10.2


>From 08e30d6a3f5078a976a07a6fa3ec0e5d2266153d Mon Sep 17 00:00:00 2001
From: Paul Howarth <paul at city-fan.org>
Date: Thu, 13 Jun 2013 10:35:05 +0100
Subject: Add upstream reference for exitcode patch


diff --git a/GeoIP.spec b/GeoIP.spec
index 99487be..992c1bb 100644
--- a/GeoIP.spec
+++ b/GeoIP.spec
@@ -54,6 +54,7 @@ Development headers and static libraries for building GeoIP-based applications.
 %prep
 %setup -q
 
+# Fix exit codes for various cases (MaxMind support #129155)
 %patch1 -p1 -b .exitcode
 
 # Recode docs as UTF-8
@@ -155,6 +156,7 @@ geoipupdate > /dev/null && \
 %changelog
 * Wed Jun 12 2013 Philip Prindeville <philipp at fedoraproject.org> - 1.5.1-1
 - Bump to version 1.5.1
+- Fix exit codes for various situations (MaxMind support #129155)
 - Update UTF8 patch
 
 * Mon Jun 10 2013 Philip Prindeville <philipp at fedoraproject.org> - 1.5.0-7
-- 
cgit v0.10.2


>From ab61f042ca58aae94e16477789a9dcc2d98280c2 Mon Sep 17 00:00:00 2001
From: Paul Howarth <paul at city-fan.org>
Date: Thu, 13 Jun 2013 10:38:03 +0100
Subject: Use versioned obsoletes/provides for geoip-geolite


diff --git a/GeoIP.spec b/GeoIP.spec
index 992c1bb..3244506 100644
--- a/GeoIP.spec
+++ b/GeoIP.spec
@@ -19,7 +19,8 @@ BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(id -nu)
 BuildRequires:	zlib-devel
 Obsoletes:	geoip < %{version}-%{release}
 Provides:	geoip = %{version}-%{release}
-Obsoletes:	geoip-geolite
+Obsoletes:	geoip-geolite < 2013.04-2
+Provides:	geoip-geolite = 2013.04-2
 
 %description
 GeoIP is a C library that enables the user to find the country that any IP
@@ -157,10 +158,11 @@ geoipupdate > /dev/null && \
 * Wed Jun 12 2013 Philip Prindeville <philipp at fedoraproject.org> - 1.5.1-1
 - Bump to version 1.5.1
 - Fix exit codes for various situations (MaxMind support #129155)
+- Use versioned obsoletes/provides for geoip-geolite
 - Update UTF8 patch
 
 * Mon Jun 10 2013 Philip Prindeville <philipp at fedoraproject.org> - 1.5.0-7
-- Annotate conflict with geoip-lite package.
+- Annotate conflict with geoip-geolite package (#968074)
 
 * Mon Jun 10 2013 Paul Howarth <paul at city-fan.org> - 1.5.0-6
 - Update sub-package requires main package for geoipupdate script
-- 
cgit v0.10.2


>From fbde5c893b684abaafa018659e6d397ec5d938b2 Mon Sep 17 00:00:00 2001
From: "Philip A. Prindeville" <philipp at redfish-solutions.com>
Date: Thu, 13 Jun 2013 18:32:39 -0600
Subject: Move link to GeoLiteCountry.dat on update only if it previously
 pointed to GeoIP-initial.dat


diff --git a/GeoIP.spec b/GeoIP.spec
index 3244506..c55976f 100644
--- a/GeoIP.spec
+++ b/GeoIP.spec
@@ -155,11 +155,13 @@ geoipupdate > /dev/null && \
 %{_libdir}/libGeoIPUpdate.so
 
 %changelog
-* Wed Jun 12 2013 Philip Prindeville <philipp at fedoraproject.org> - 1.5.1-1
+* Thu Jun 12 2013 Philip Prindeville <philipp at fedoraproject.org> - 1.5.1-1
 - Bump to version 1.5.1
 - Fix exit codes for various situations (MaxMind support #129155)
 - Use versioned obsoletes/provides for geoip-geolite
 - Update UTF8 patch
+- Change symlink from GeoIP-initial.dat to GeoLiteCountry.dat if we had a
+  successful download and now have the latter file.
 
 * Mon Jun 10 2013 Philip Prindeville <philipp at fedoraproject.org> - 1.5.0-7
 - Annotate conflict with geoip-geolite package (#968074)
diff --git a/geoipupdate.cron b/geoipupdate.cron
index 892b974..bacf508 100644
--- a/geoipupdate.cron
+++ b/geoipupdate.cron
@@ -1,4 +1,7 @@
 #!/bin/sh
 
-geoipupdate > /dev/null && \
-	ln -sf GeoLiteCountry.dat /usr/share/GeoIP/GeoIP.dat
+if geoipupdate > /dev/null; then
+	if [ $(readlink -n /usr/share/GeoIP/GeoIP.dat) == "GeoIP-initial.dat" -a -f "/usr/share/GeoIP/GeoLiteCountry.dat" ]; then
+	  	ln -sf GeoLiteCountry.dat /usr/share/GeoIP/GeoIP.dat
+	fi
+fi
-- 
cgit v0.10.2


>From 84346ccb3d89c2237232db0eaca4b8545ba312e7 Mon Sep 17 00:00:00 2001
From: Paul Howarth <paul at city-fan.org>
Date: Tue, 18 Jun 2013 16:10:51 +0100
Subject: Properly provide the data fromgeoip-geolite

- Properly provide all of the GeoLite databases and their IPv6 equivalents, as
  per the geoip-geolite package that we're obsoleting/providing
- Provide compatibility symlinks for database files that historically had
  different names in GeoIP and geoip-geolite
- Don't distribute unbundled LICENSE files, as per packaging guidelines
- Update license tag to reflect distribution of CC-BY-SA database content
- No longer try to update the databases in %post
- Maintain timestamps where possible
- Set up GeoIP.dat symlink in package and don't touch it again
- Add update6 package to update the IPv6 databases; have to use wget for this
  rather than geoipupdate as the databases are still in beta

diff --git a/.gitignore b/.gitignore
index db8103b..5f5e7a8 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,4 +1,10 @@
-GeoIP-1.4.6.tar.gz
+/GeoIP-1.4.6.tar.gz
 /GeoIP-1.4.8.tar.gz
 /GeoIP-1.5.0.tar.gz
 /GeoIP-1.5.1.tar.gz
+/GeoIP.dat.gz
+/GeoIPASNum.dat.gz
+/GeoIPASNumv6.dat.gz
+/GeoIPv6.dat.gz
+/GeoLiteCity.dat.gz
+/GeoLiteCityv6.dat.gz
diff --git a/GeoIP.spec b/GeoIP.spec
index c55976f..f4d85ee 100644
--- a/GeoIP.spec
+++ b/GeoIP.spec
@@ -3,16 +3,23 @@
 
 Name:		GeoIP
 Version:	1.5.1
-Release:	1%{?dist}
+Release:	2%{?dist}
 Summary:	Library for country/city/organization to IP address or hostname mapping
 Group:		Development/Libraries
-License:	LGPLv2+ and GPLv2+
+License:	LGPLv2+ and GPLv2+ and CC-BY-SA
 URL:		http://www.maxmind.com/app/c
 Source0:	http://www.maxmind.com/download/geoip/api/c/GeoIP-%{version}.tar.gz
-Source1:	LICENSE.txt
 Source2:	fetch-geoipdata-city.pl
 Source3:	fetch-geoipdata.pl
 Source5:	geoipupdate.cron
+Source6:	geoipupdate6.cron
+# Data sources indexed at http://dev.maxmind.com/geoip/legacy/geolite
+Source10:	http://geolite.maxmind.com/download/geoip/database/GeoLiteCountry/GeoIP.dat.gz
+Source11:	http://geolite.maxmind.com/download/geoip/database/GeoIPv6.dat.gz
+Source12:	http://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz
+Source13:	http://geolite.maxmind.com/download/geoip/database/GeoLiteCityv6-beta/GeoLiteCityv6.dat.gz
+Source14:	http://download.maxmind.com/download/geoip/database/asnum/GeoIPASNum.dat.gz
+Source15:	http://download.maxmind.com/download/geoip/database/asnum/GeoIPASNumv6.dat.gz
 Patch1:		GeoIP-1.5.0-exitcode.patch
 Patch10:	GeoIP-1.5.1-UTF8.patch
 BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(id -nu)
@@ -24,14 +31,16 @@ Provides:	geoip-geolite = 2013.04-2
 
 %description
 GeoIP is a C library that enables the user to find the country that any IP
-address or hostname originates from. It uses a file based database that is
-updated at install time if possible, and can optionally be updated on a weekly
-basis by installing the GeoIP-update package. This database simply contains IP
-blocks as keys, and countries as values. This database should be more complete
-and accurate than using reverse DNS lookups.
+address or hostname originates from.
+
+It uses file based databases that can optionally be updated on a weekly basis
+by installing the GeoIP-update (IPv4) and/or GeoIP-update6 (IPv6) packages.
+
+This package includes GeoLite data created by MaxMind, available from
+http://www.maxmind.com/
 
 %package update
-Summary:	Crontab entry to facilitate automatic updates of databases
+Summary:	Crontab entry to facilitate automatic updates of IPv4 GeoIP databases
 Group:		Applications/Databases
 Requires:	crontabs
 Requires:	%{name} = %{version}-%{release}
@@ -40,7 +49,20 @@ BuildArch:	noarch
 %endif
 
 %description update
-Crontab entry to provide weekly updates of the GeoIP free databases.
+Crontab entry to provide weekly updates of the GeoIP free IPv4 databases.
+
+%package update6
+Summary:	Crontab entry to facilitate automatic updates of IPv6 GeoIP databases
+Group:		Applications/Databases
+Requires:	crontabs
+Requires:	wget
+Requires:	%{name} = %{version}-%{release}
+%if %{noarch_subpkgs}
+BuildArch:	noarch
+%endif
+
+%description update6
+Crontab entry to provide weekly updates of the GeoIP free IPv6 databases.
 
 %package devel
 Summary:	Development headers and libraries for GeoIP
@@ -55,17 +77,26 @@ Development headers and static libraries for building GeoIP-based applications.
 %prep
 %setup -q
 
+# Scripts and license files
+install -p -m 644 %{SOURCE2} fetch-geoipdata-city.pl
+install -p -m 644 %{SOURCE3} fetch-geoipdata.pl
+install -p -m 755 %{SOURCE5} geoipupdate.cron
+install -p -m 755 %{SOURCE6} geoipupdate6.cron
+
+# Data
+install -p -m 644 %{SOURCE10} data/GeoLiteCountry.dat.gz;	gunzip data/GeoLiteCountry.dat
+install -p -m 644 %{SOURCE11} data/GeoIPv6.dat.gz;		gunzip data/GeoIPv6.dat
+install -p -m 644 %{SOURCE12} data/GeoLiteCity.dat.gz;		gunzip data/GeoLiteCity.dat
+install -p -m 644 %{SOURCE13} data/GeoLiteCityv6.dat.gz;	gunzip data/GeoLiteCityv6.dat
+install -p -m 644 %{SOURCE14} data/GeoLiteASNum.dat.gz;		gunzip data/GeoLiteASNum.dat
+install -p -m 644 %{SOURCE15} data/GeoIPASNumv6.dat.gz;		gunzip data/GeoIPASNumv6.dat
+
 # Fix exit codes for various cases (MaxMind support #129155)
 %patch1 -p1 -b .exitcode
 
 # Recode docs as UTF-8
 %patch10 -p1 -b .utf8
 
-install -D -m644 %{SOURCE1} LICENSE.txt
-install -D -m644 %{SOURCE2} fetch-geoipdata-city.pl
-install -D -m644 %{SOURCE3} fetch-geoipdata.pl
-install -D -m644 %{SOURCE5} geoipupdate.cron
-
 %build
 # Fix timestamp order to avoid trying to re-run autotools and configure,
 # thus clobbering our hacked libtool later on
@@ -85,52 +116,56 @@ make %{?_smp_mflags}
 
 %install
 rm -rf %{buildroot}
-make DESTDIR=%{buildroot} DEFAULT_DB_FILE="%{_datadir}/GeoIP/GeoIP-initial.dat" install
-
-# fetch database updates weekly
-install -D -m755 geoipupdate.cron %{buildroot}%{_sysconfdir}/cron.weekly/geoipupdate
+make DESTDIR=%{buildroot} INSTALL="install -p" install
 
 # nix the stuff we don't need like .la files.
 rm -f %{buildroot}%{_libdir}/*.la
 
-# fix up the config file to use the free products by default
+# fix up the config file to have geoipupdate fetch the free products by default
 sed -i \
 	-e 's/YOUR_LICENSE_KEY_HERE$/000000000000/' \
 	-e 's/YOUR_USER_ID_HERE$/999999/' \
 	-e 's/106$/506 533 517/' \
 	%{buildroot}%{_sysconfdir}/GeoIP.conf
 
-# make the default GeoIP.dat a symlink to GeoIP-initial.dat,
-# at least until %%post has run
-ln -sf GeoIP-initial.dat %{buildroot}%{_datadir}/GeoIP/GeoIP.dat
+# install GeoLite databases
+for db in \
+	GeoLiteCountry.dat \
+	GeoIPv6.dat \
+	GeoLiteCity.dat \
+	GeoLiteCityv6.dat \
+	GeoLiteASNum.dat \
+	GeoIPASNumv6.dat
+do
+	install -p -m 644 data/$db %{buildroot}%{_datadir}/GeoIP/
+done
+
+# make the default GeoIP.dat a symlink to GeoLiteCountry.dat,
+# since it's actually an old snapshot of that database
+ln -sf GeoLiteCountry.dat %{buildroot}%{_datadir}/GeoIP/GeoIP.dat
+
+# add compat symlinks for GeoIPASNum.dat and GeoLiteASNumv6.dat
+ln -sf GeoLiteASNum.dat %{buildroot}%{_datadir}/GeoIP/GeoIPASNum.dat
+ln -sf GeoIPASNumv6.dat %{buildroot}%{_datadir}/GeoIP/GeoLiteASNumv6.dat
 
-# create empty files for initial %%ghost databases
-touch %{buildroot}%{_datadir}/GeoIP/GeoLite{ASNum,City,Country}.dat
-chmod 644 %{buildroot}%{_datadir}/GeoIP/GeoLite{ASNum,City,Country}.dat
+# fetch database updates weekly
+install -D -m 755 geoipupdate.cron %{buildroot}%{_sysconfdir}/cron.weekly/geoipupdate
+install -D -m 755 geoipupdate6.cron %{buildroot}%{_sysconfdir}/cron.weekly/geoipupdate6
 
 %clean
 rm -rf %{buildroot}
 
-%post
-/sbin/ldconfig
-geoipupdate > /dev/null && \
-	ln -sf GeoLiteCountry.dat %{_datadir}/GeoIP/GeoIP.dat
+%post -p /sbin/ldconfig
 
 %postun -p /sbin/ldconfig
 
 %files
 # LGPLv2+
-%doc AUTHORS COPYING ChangeLog README TODO LICENSE* fetch-*
+%doc AUTHORS COPYING ChangeLog README TODO fetch-*
 %config(noreplace) %{_sysconfdir}/GeoIP.conf
 %config(noreplace) %{_sysconfdir}/GeoIP.conf.default
 %{_bindir}/geoiplookup
 %{_bindir}/geoiplookup6
-%dir %{_datadir}/GeoIP/
-%{_datadir}/GeoIP/GeoIP-initial.dat
-%verify(not md5 size link mtime) %{_datadir}/GeoIP/GeoIP.dat
-%ghost %{_datadir}/GeoIP/GeoLiteASNum.dat
-%ghost %{_datadir}/GeoIP/GeoLiteCity.dat
-%ghost %{_datadir}/GeoIP/GeoLiteCountry.dat
 %{_libdir}/libGeoIP.so.1
 %{_libdir}/libGeoIP.so.1.*
 %{_mandir}/man1/geoiplookup.1*
@@ -140,10 +175,28 @@ geoipupdate > /dev/null && \
 %{_libdir}/libGeoIPUpdate.so.0
 %{_libdir}/libGeoIPUpdate.so.0.*
 %{_mandir}/man1/geoipupdate.1*
+# CC-BY-SA
+%dir %{_datadir}/GeoIP/
+# This is %%config(noreplace) so that it can be replaced by a commercial database if desired by the end user
+%config(noreplace) %{_datadir}/GeoIP/GeoIP.dat
+# The other databases are %%verify(not md5 size mtime) so that they can be updated via the cron scripts
+# and rpm will not moan about the files having changed
+%verify(not md5 size mtime) %{_datadir}/GeoIP/GeoLiteCountry.dat
+%verify(not md5 size mtime) %{_datadir}/GeoIP/GeoIPv6.dat
+%verify(not md5 size mtime) %{_datadir}/GeoIP/GeoLiteCity.dat
+%verify(not md5 size mtime) %{_datadir}/GeoIP/GeoLiteCityv6.dat
+%verify(not md5 size mtime) %{_datadir}/GeoIP/GeoLiteASNum.dat
+%verify(not md5 size mtime) %{_datadir}/GeoIP/GeoIPASNumv6.dat
+# The compat symlinks are just regular files as they should never need to be changed
+%{_datadir}/GeoIP/GeoIPASNum.dat
+%{_datadir}/GeoIP/GeoLiteASNumv6.dat
 
 %files update
 %{_sysconfdir}/cron.weekly/geoipupdate
 
+%files update6
+%{_sysconfdir}/cron.weekly/geoipupdate6
+
 %files devel
 # LGPLv2+
 %{_includedir}/GeoIP.h
@@ -155,7 +208,20 @@ geoipupdate > /dev/null && \
 %{_libdir}/libGeoIPUpdate.so
 
 %changelog
-* Thu Jun 12 2013 Philip Prindeville <philipp at fedoraproject.org> - 1.5.1-1
+* Tue Jun 18 2013 Paul Howarth <paul at city-fan.org> - 1.5.1-2
+- Properly provide all of the GeoLite databases and their IPv6 equivalents, as
+  per the geoip-geolite package that we're obsoleting/providing
+- Provide compatibility symlinks for database files that historically had
+  different names in GeoIP and geoip-geolite
+- Don't distribute unbundled LICENSE files, as per packaging guidelines
+- Update license tag to reflect distribution of CC-BY-SA database content
+- No longer try to update the databases in %%post
+- Maintain timestamps where possible
+- Set up GeoIP.dat symlink in package and don't touch it again
+- Add update6 package to update the IPv6 databases; have to use wget for this
+  rather than geoipupdate as the databases are still in beta
+
+* Wed Jun 12 2013 Philip Prindeville <philipp at fedoraproject.org> - 1.5.1-1
 - Bump to version 1.5.1
 - Fix exit codes for various situations (MaxMind support #129155)
 - Use versioned obsoletes/provides for geoip-geolite
diff --git a/LICENSE.txt b/LICENSE.txt
deleted file mode 100644
index 01c2910..0000000
--- a/LICENSE.txt
+++ /dev/null
@@ -1,39 +0,0 @@
-There are two licenses, one for the C library software, and one for
-the database.
-
-SOFTWARE LICENSE (C library)
-
-The GeoIP C Library is licensed under the LGPL.  For details see
-the COPYING file.
-
-OPEN DATA LICENSE (GeoLite Country and GeoLite City databases)
-
-Copyright (c) 2008 MaxMind, Inc.  All Rights Reserved.
-
-All advertising materials and documentation mentioning features or use of
-this database must display the following acknowledgment:
-"This product includes GeoLite data created by MaxMind, available from
-http://maxmind.com/"
-
-Redistribution and use with or without modification, are permitted provided
-that the following conditions are met:
-1. Redistributions must retain the above copyright notice, this list of
-conditions and the following disclaimer in the documentation and/or other
-materials provided with the distribution. 
-2. All advertising materials and documentation mentioning features or use of
-this database must display the following acknowledgement:
-"This product includes GeoLite data created by MaxMind, available from
-http://maxmind.com/"
-3. "MaxMind" may not be used to endorse or promote products derived from this
-database without specific prior written permission.
-
-THIS DATABASE IS PROVIDED BY MAXMIND, INC ``AS IS'' AND ANY 
-EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
-WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 
-DISCLAIMED. IN NO EVENT SHALL MAXMIND BE LIABLE FOR ANY 
-DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 
-(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
-LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
-DATABASE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/geoipupdate.cron b/geoipupdate.cron
index bacf508..0f92e43 100644
--- a/geoipupdate.cron
+++ b/geoipupdate.cron
@@ -1,7 +1,4 @@
 #!/bin/sh
 
-if geoipupdate > /dev/null; then
-	if [ $(readlink -n /usr/share/GeoIP/GeoIP.dat) == "GeoIP-initial.dat" -a -f "/usr/share/GeoIP/GeoLiteCountry.dat" ]; then
-	  	ln -sf GeoLiteCountry.dat /usr/share/GeoIP/GeoIP.dat
-	fi
-fi
+# This updates the IPv4 databases based on product numbers in /etc/GeoIP.conf
+geoipupdate > /dev/null
diff --git a/geoipupdate6.cron b/geoipupdate6.cron
new file mode 100644
index 0000000..4273968
--- /dev/null
+++ b/geoipupdate6.cron
@@ -0,0 +1,20 @@
+#!/bin/sh
+
+# Update IPv6 free databases
+
+# It would be much better if we could use geoipupdate for this as it only
+# downloads the data if it has changed and checks it after download
+
+DB_LOC=http://geolite.maxmind.com/download/geoip/database
+ASDB_LOC=http://download.maxmind.com/download/geoip/database/asnum
+
+cd /usr/share/GeoIP
+
+# IPv6 Country database
+wget --quiet $DB_LOC/GeoIPv6.dat.gz && mv -f GeoIPv6.dat GeoIPv6.dat.old && gunzip GeoIPv6.dat
+
+# IPv6 City database
+wget --quiet $DB_LOC/GeoLiteCityv6-beta/GeoLiteCityv6.dat.gz && mv -f GeoLiteCityv6.dat GeoLiteCityv6.dat.old && gunzip GeoLiteCityv6.dat
+
+# IPv6 AS Number database
+wget --quiet $ASDB_LOC/GeoIPASNumv6.dat.gz && mv -f GeoIPASNumv6.dat GeoIPASNumv6.dat.old && gunzip GeoIPASNumv6.dat
diff --git a/sources b/sources
index df83d77..09d0af2 100644
--- a/sources
+++ b/sources
@@ -1 +1,7 @@
 36b82f3558e6e2ebdd11a56c5db21dbc  GeoIP-1.5.1.tar.gz
+36bc18ee8b6a42c1ce189a403dcac5cc  GeoIP.dat.gz
+2fa7bf79ea07cd53275d3003c32ce072  GeoIPASNum.dat.gz
+55af75660db5db2f94effcbdc1b7fed9  GeoIPASNumv6.dat.gz
+2768c932480d6c068a951f7f76fd014f  GeoIPv6.dat.gz
+d90484c4eddf964be29ce4222513b48d  GeoLiteCity.dat.gz
+94e89cb4ef255375c5ad89bc33e008a7  GeoLiteCityv6.dat.gz
-- 
cgit v0.10.2


>From d40b6da18f32396b2703a9fccd84b8f6dc71f36d Mon Sep 17 00:00:00 2001
From: Dennis Gilmore <dennis at ausil.us>
Date: Fri, 2 Aug 2013 17:45:57 -0500
Subject: - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild


diff --git a/GeoIP.spec b/GeoIP.spec
index f4d85ee..fe6b43a 100644
--- a/GeoIP.spec
+++ b/GeoIP.spec
@@ -3,7 +3,7 @@
 
 Name:		GeoIP
 Version:	1.5.1
-Release:	2%{?dist}
+Release:	3%{?dist}
 Summary:	Library for country/city/organization to IP address or hostname mapping
 Group:		Development/Libraries
 License:	LGPLv2+ and GPLv2+ and CC-BY-SA
@@ -208,6 +208,9 @@ rm -rf %{buildroot}
 %{_libdir}/libGeoIPUpdate.so
 
 %changelog
+* Fri Aug 02 2013 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 1.5.1-3
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
+
 * Tue Jun 18 2013 Paul Howarth <paul at city-fan.org> - 1.5.1-2
 - Properly provide all of the GeoLite databases and their IPv6 equivalents, as
   per the geoip-geolite package that we're obsoleting/providing
-- 
cgit v0.10.2


>From b338986e9f1caf7ca14103fce4c649b75342b0c8 Mon Sep 17 00:00:00 2001
From: "Philip A. Prindeville" <philipp at redfish-solutions.com>
Date: Wed, 6 Nov 2013 13:53:23 -0700
Subject: Use a helper script to decide when the upstream databases have
 changed (or at least their timestamps have). We need to do this because there
 is no versioning on the unsupported IPv6 databases at this time.


diff --git a/GeoIP.spec b/GeoIP.spec
index fe6b43a..9526f42 100644
--- a/GeoIP.spec
+++ b/GeoIP.spec
@@ -13,6 +13,7 @@ Source2:	fetch-geoipdata-city.pl
 Source3:	fetch-geoipdata.pl
 Source5:	geoipupdate.cron
 Source6:	geoipupdate6.cron
+Source7:	lastmod.pl
 # Data sources indexed at http://dev.maxmind.com/geoip/legacy/geolite
 Source10:	http://geolite.maxmind.com/download/geoip/database/GeoLiteCountry/GeoIP.dat.gz
 Source11:	http://geolite.maxmind.com/download/geoip/database/GeoIPv6.dat.gz
@@ -82,6 +83,7 @@ install -p -m 644 %{SOURCE2} fetch-geoipdata-city.pl
 install -p -m 644 %{SOURCE3} fetch-geoipdata.pl
 install -p -m 755 %{SOURCE5} geoipupdate.cron
 install -p -m 755 %{SOURCE6} geoipupdate6.cron
+install -p -m 755 %{SOURCE7} lastmod.pl
 
 # Data
 install -p -m 644 %{SOURCE10} data/GeoLiteCountry.dat.gz;	gunzip data/GeoLiteCountry.dat
@@ -140,6 +142,10 @@ do
 	install -p -m 644 data/$db %{buildroot}%{_datadir}/GeoIP/
 done
 
+%{__mkdir_p} %{buildroot}%{_libexecdir}
+
+install -p -m 755 lastmod.pl %{buildroot}%{_libexecdir}/
+
 # make the default GeoIP.dat a symlink to GeoLiteCountry.dat,
 # since it's actually an old snapshot of that database
 ln -sf GeoLiteCountry.dat %{buildroot}%{_datadir}/GeoIP/GeoIP.dat
@@ -196,6 +202,7 @@ rm -rf %{buildroot}
 
 %files update6
 %{_sysconfdir}/cron.weekly/geoipupdate6
+%{_libexecdir}/lastmod.pl
 
 %files devel
 # LGPLv2+
diff --git a/geoipupdate6.cron b/geoipupdate6.cron
index 4273968..c464c83 100644
--- a/geoipupdate6.cron
+++ b/geoipupdate6.cron
@@ -5,16 +5,41 @@
 # It would be much better if we could use geoipupdate for this as it only
 # downloads the data if it has changed and checks it after download
 
+PATH=/usr/libexec:$PATH
+
 DB_LOC=http://geolite.maxmind.com/download/geoip/database
 ASDB_LOC=http://download.maxmind.com/download/geoip/database/asnum
 
-cd /usr/share/GeoIP
+GEOIP_DIR=/usr/share/GeoIP
+
+DATABASES="$DB_LOC/GeoIPv6.dat.gz $DB_LOC/GeoLiteCityv6-beta/GeoLiteCityv6.dat.gz $ASDB_LOC/GeoIPASNumv6.dat.gz"
+
+cd $GEOIP_DIR
+
+status=0
+
+for URL in $DATABASES; do
+    RENEW=
+
+    BASENAME=$(basename $URL .gz)
+    ONLINE=$(lastmod.pl $URL)
 
-# IPv6 Country database
-wget --quiet $DB_LOC/GeoIPv6.dat.gz && mv -f GeoIPv6.dat GeoIPv6.dat.old && gunzip GeoIPv6.dat
+    if [ ! -f $BASENAME || ! -f .$BASENAME.timestamp ]; then
+	RENEW=1
+    else
+	TIMESTAMP=$(cat .$BASENAME.timestamp)
+	if [ $ONLINE -gt $TIMESTAMP ]; then
+	    RENEW=1
+	fi
+    fi
 
-# IPv6 City database
-wget --quiet $DB_LOC/GeoLiteCityv6-beta/GeoLiteCityv6.dat.gz && mv -f GeoLiteCityv6.dat GeoLiteCityv6.dat.old && gunzip GeoLiteCityv6.dat
+    if [ -n "$RENEW" ]; then
+	( wget -q -N $URL \
+	  && mv -f $BASENAME $BASENAME.old \
+	  && gunzip $BASENAME.gz \
+	  && echo $ONLINE > .$BASENAME.timestamp ) \
+	|| { status=1 ; echo "Failed to update $BASENAME" >&2 }
+    fi
+done
 
-# IPv6 AS Number database
-wget --quiet $ASDB_LOC/GeoIPASNumv6.dat.gz && mv -f GeoIPASNumv6.dat GeoIPASNumv6.dat.old && gunzip GeoIPASNumv6.dat
+exit $status
diff --git a/lastmod.pl b/lastmod.pl
new file mode 100755
index 0000000..735762a
--- /dev/null
+++ b/lastmod.pl
@@ -0,0 +1,56 @@
+#!/usr/bin/perl -w
+#===============================================================================
+#
+#         FILE: lastmod.pl
+#
+#        USAGE: lastmod.pl url
+#
+#  DESCRIPTION: Fetch an HTTP URL's HEAD and dump its Last-Modified field in
+#               local time format (e.g. seconds since the epoch).
+#
+#      OPTIONS: none
+# REQUIREMENTS: File::Basename, Net::HTTP, URI, HTTP::Headers
+#         BUGS: unknown
+#        NOTES: none
+#       AUTHOR: Philip Prindeville <philipp at fedoraproject.org>
+# ORGANIZATION: Fedora Project
+#      VERSION: 1.0
+#      CREATED: 08/06/2013 12:52:32 PM
+#     REVISION: 0
+#===============================================================================
+
+use strict;
+use warnings;
+
+use File::Basename;
+use Net::HTTP;
+use URI;
+use HTTP::Headers;
+
+if (@ARGV != 1) {
+    die "usage: " . basename($0) . " url\n";
+}
+
+my $uri = URI->new($ARGV[0]) || die "Couldn't parse URL\n";
+
+die "Not an HTTP URL\n" unless ($uri->scheme eq 'http');
+
+my $host = $uri->host() || die "No host in URL\n";
+
+my $s = Net::HTTP->new(Host => $host) || die "Can't construct Net::HTTP object\n";
+
+$s->write_request(HEAD => $uri->as_string()) || die "Can't send HEAD request\n";
+
+my ($code, $mess, %h) = $s->read_response_headers;
+
+if ($code ne '200') {
+    die "Response: " . $code . ": " . $mess . "\n";
+}
+
+my $h = HTTP::Headers->new(%h) || die "Couldn't parse headers\n";
+
+print $h->last_modified(), "\n";
+
+exit 0;
+
+# vim:ts=4
-- 
cgit v0.10.2


>From d70253ef2c5213a4541c6f7470287f3ed8943d1c Mon Sep 17 00:00:00 2001
From: Paul Howarth <paul at city-fan.org>
Date: Tue, 25 Feb 2014 14:03:08 +0000
Subject: Add %check, update databases

- Add %check, so we can run tests by building using --with tests
- Update databases from upstream

diff --git a/GeoIP.spec b/GeoIP.spec
index 9526f42..c994cb2 100644
--- a/GeoIP.spec
+++ b/GeoIP.spec
@@ -1,9 +1,12 @@
+# Tests require network access so fail in koji; build using --with tests to run them yourself
+%bcond_with tests
+
 # Noarch subpackages available from Fedora 10, RHEL 6
 %global noarch_subpkgs 0%{?fedora} > 9 || 0%{?rhel} > 5
 
 Name:		GeoIP
 Version:	1.5.1
-Release:	3%{?dist}
+Release:	4%{?dist}
 Summary:	Library for country/city/organization to IP address or hostname mapping
 Group:		Development/Libraries
 License:	LGPLv2+ and GPLv2+ and CC-BY-SA
@@ -158,6 +161,10 @@ ln -sf GeoIPASNumv6.dat %{buildroot}%{_datadir}/GeoIP/GeoLiteASNumv6.dat
 install -D -m 755 geoipupdate.cron %{buildroot}%{_sysconfdir}/cron.weekly/geoipupdate
 install -D -m 755 geoipupdate6.cron %{buildroot}%{_sysconfdir}/cron.weekly/geoipupdate6
 
+%check
+# Tests require network access so fail in koji; build using --with tests to run them yourself
+%{?with_tests:LD_LIBRARY_PATH=%{buildroot}%{_libdir} make check}
+
 %clean
 rm -rf %{buildroot}
 
@@ -215,6 +222,10 @@ rm -rf %{buildroot}
 %{_libdir}/libGeoIPUpdate.so
 
 %changelog
+* Tue Feb 25 2014 Paul Howarth <paul at city-fan.org> - 1.5.1-4
+- Add %%check, so we can run tests by building using --with tests
+- Update databases from upstream
+
 * Fri Aug 02 2013 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 1.5.1-3
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
 
diff --git a/sources b/sources
index 09d0af2..6c22e78 100644
--- a/sources
+++ b/sources
@@ -1,7 +1,7 @@
 36b82f3558e6e2ebdd11a56c5db21dbc  GeoIP-1.5.1.tar.gz
-36bc18ee8b6a42c1ce189a403dcac5cc  GeoIP.dat.gz
-2fa7bf79ea07cd53275d3003c32ce072  GeoIPASNum.dat.gz
+a551a8f2044c3e6e364c1aa82fe183b3  GeoIP.dat.gz
+07e7c99c305c0607cf71f68019aa5a59  GeoIPASNum.dat.gz
 55af75660db5db2f94effcbdc1b7fed9  GeoIPASNumv6.dat.gz
-2768c932480d6c068a951f7f76fd014f  GeoIPv6.dat.gz
-d90484c4eddf964be29ce4222513b48d  GeoLiteCity.dat.gz
-94e89cb4ef255375c5ad89bc33e008a7  GeoLiteCityv6.dat.gz
+c635ff5a0ec3afb83b7c291b17323174  GeoIPv6.dat.gz
+5a595f80ce459527a73a2aa61aa5221f  GeoLiteCity.dat.gz
+61dfc4c65e6433a2402b25e43347594e  GeoLiteCityv6.dat.gz
-- 
cgit v0.10.2


>From 7754546b53750c8aa5162c30c2987475653c0e02 Mon Sep 17 00:00:00 2001
From: Dennis Gilmore <dennis at ausil.us>
Date: Fri, 6 Jun 2014 17:39:43 -0500
Subject: - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild


diff --git a/GeoIP.spec b/GeoIP.spec
index c994cb2..bb551da 100644
--- a/GeoIP.spec
+++ b/GeoIP.spec
@@ -6,7 +6,7 @@
 
 Name:		GeoIP
 Version:	1.5.1
-Release:	4%{?dist}
+Release:	5%{?dist}
 Summary:	Library for country/city/organization to IP address or hostname mapping
 Group:		Development/Libraries
 License:	LGPLv2+ and GPLv2+ and CC-BY-SA
@@ -222,6 +222,9 @@ rm -rf %{buildroot}
 %{_libdir}/libGeoIPUpdate.so
 
 %changelog
+* Fri Jun 06 2014 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 1.5.1-5
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
+
 * Tue Feb 25 2014 Paul Howarth <paul at city-fan.org> - 1.5.1-4
 - Add %%check, so we can run tests by building using --with tests
 - Update databases from upstream
-- 
cgit v0.10.2


>From 566e9fc008d88ba27e591f95634682362296465a Mon Sep 17 00:00:00 2001
From: Peter Robinson <pbrobinson at fedoraproject.org>
Date: Fri, 15 Aug 2014 18:33:49 +0000
Subject: - Rebuilt for
 https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild


diff --git a/GeoIP.spec b/GeoIP.spec
index bb551da..80488c5 100644
--- a/GeoIP.spec
+++ b/GeoIP.spec
@@ -6,7 +6,7 @@
 
 Name:		GeoIP
 Version:	1.5.1
-Release:	5%{?dist}
+Release:	6%{?dist}
 Summary:	Library for country/city/organization to IP address or hostname mapping
 Group:		Development/Libraries
 License:	LGPLv2+ and GPLv2+ and CC-BY-SA
@@ -222,6 +222,9 @@ rm -rf %{buildroot}
 %{_libdir}/libGeoIPUpdate.so
 
 %changelog
+* Fri Aug 15 2014 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 1.5.1-6
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
+
 * Fri Jun 06 2014 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 1.5.1-5
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
 
-- 
cgit v0.10.2


>From 98cd83fa9ae10b56581f0b8675b0c61f0886e290 Mon Sep 17 00:00:00 2001
From: "Philip A. Prindeville" <philipp at redfish-solutions.com>
Date: Tue, 20 Jan 2015 17:56:33 -0700
Subject: Version bump to 1.6.4 per bz #1158667. Decouple geoipupdate.


diff --git a/GeoIP.spec b/GeoIP.spec
index 80488c5..ac9aee0 100644
--- a/GeoIP.spec
+++ b/GeoIP.spec
@@ -5,18 +5,15 @@
 %global noarch_subpkgs 0%{?fedora} > 9 || 0%{?rhel} > 5
 
 Name:		GeoIP
-Version:	1.5.1
-Release:	6%{?dist}
+Version:	1.6.4
+Release:	0%{?dist}
 Summary:	Library for country/city/organization to IP address or hostname mapping
 Group:		Development/Libraries
-License:	LGPLv2+ and GPLv2+ and CC-BY-SA
+License:	LGPLv2+ and CC-BY-SA
 URL:		http://www.maxmind.com/app/c
-Source0:	http://www.maxmind.com/download/geoip/api/c/GeoIP-%{version}.tar.gz
+Source0:	https://github.com/maxmind/geoip-api-c/releases/download/v%{version}/GeoIP-%{version}.tar.gz
 Source2:	fetch-geoipdata-city.pl
 Source3:	fetch-geoipdata.pl
-Source5:	geoipupdate.cron
-Source6:	geoipupdate6.cron
-Source7:	lastmod.pl
 # Data sources indexed at http://dev.maxmind.com/geoip/legacy/geolite
 Source10:	http://geolite.maxmind.com/download/geoip/database/GeoLiteCountry/GeoIP.dat.gz
 Source11:	http://geolite.maxmind.com/download/geoip/database/GeoIPv6.dat.gz
@@ -24,8 +21,6 @@ Source12:	http://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz
 Source13:	http://geolite.maxmind.com/download/geoip/database/GeoLiteCityv6-beta/GeoLiteCityv6.dat.gz
 Source14:	http://download.maxmind.com/download/geoip/database/asnum/GeoIPASNum.dat.gz
 Source15:	http://download.maxmind.com/download/geoip/database/asnum/GeoIPASNumv6.dat.gz
-Patch1:		GeoIP-1.5.0-exitcode.patch
-Patch10:	GeoIP-1.5.1-UTF8.patch
 BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(id -nu)
 BuildRequires:	zlib-devel
 Obsoletes:	geoip < %{version}-%{release}
@@ -43,31 +38,6 @@ by installing the GeoIP-update (IPv4) and/or GeoIP-update6 (IPv6) packages.
 This package includes GeoLite data created by MaxMind, available from
 http://www.maxmind.com/
 
-%package update
-Summary:	Crontab entry to facilitate automatic updates of IPv4 GeoIP databases
-Group:		Applications/Databases
-Requires:	crontabs
-Requires:	%{name} = %{version}-%{release}
-%if %{noarch_subpkgs}
-BuildArch:	noarch
-%endif
-
-%description update
-Crontab entry to provide weekly updates of the GeoIP free IPv4 databases.
-
-%package update6
-Summary:	Crontab entry to facilitate automatic updates of IPv6 GeoIP databases
-Group:		Applications/Databases
-Requires:	crontabs
-Requires:	wget
-Requires:	%{name} = %{version}-%{release}
-%if %{noarch_subpkgs}
-BuildArch:	noarch
-%endif
-
-%description update6
-Crontab entry to provide weekly updates of the GeoIP free IPv6 databases.
-
 %package devel
 Summary:	Development headers and libraries for GeoIP
 Group:		Development/Libraries
@@ -84,9 +54,6 @@ Development headers and static libraries for building GeoIP-based applications.
 # Scripts and license files
 install -p -m 644 %{SOURCE2} fetch-geoipdata-city.pl
 install -p -m 644 %{SOURCE3} fetch-geoipdata.pl
-install -p -m 755 %{SOURCE5} geoipupdate.cron
-install -p -m 755 %{SOURCE6} geoipupdate6.cron
-install -p -m 755 %{SOURCE7} lastmod.pl
 
 # Data
 install -p -m 644 %{SOURCE10} data/GeoLiteCountry.dat.gz;	gunzip data/GeoLiteCountry.dat
@@ -96,12 +63,6 @@ install -p -m 644 %{SOURCE13} data/GeoLiteCityv6.dat.gz;	gunzip data/GeoLiteCity
 install -p -m 644 %{SOURCE14} data/GeoLiteASNum.dat.gz;		gunzip data/GeoLiteASNum.dat
 install -p -m 644 %{SOURCE15} data/GeoIPASNumv6.dat.gz;		gunzip data/GeoIPASNumv6.dat
 
-# Fix exit codes for various cases (MaxMind support #129155)
-%patch1 -p1 -b .exitcode
-
-# Recode docs as UTF-8
-%patch10 -p1 -b .utf8
-
 %build
 # Fix timestamp order to avoid trying to re-run autotools and configure,
 # thus clobbering our hacked libtool later on
@@ -121,17 +82,12 @@ make %{?_smp_mflags}
 
 %install
 rm -rf %{buildroot}
-make DESTDIR=%{buildroot} INSTALL="install -p" install
+make DESTDIR=%{buildroot} INSTALL="install -p" install install-am
 
 # nix the stuff we don't need like .la files.
 rm -f %{buildroot}%{_libdir}/*.la
 
-# fix up the config file to have geoipupdate fetch the free products by default
-sed -i \
-	-e 's/YOUR_LICENSE_KEY_HERE$/000000000000/' \
-	-e 's/YOUR_USER_ID_HERE$/999999/' \
-	-e 's/106$/506 533 517/' \
-	%{buildroot}%{_sysconfdir}/GeoIP.conf
+mkdir %{buildroot}%{_datadir}/GeoIP/
 
 # install GeoLite databases
 for db in \
@@ -147,8 +103,6 @@ done
 
 %{__mkdir_p} %{buildroot}%{_libexecdir}
 
-install -p -m 755 lastmod.pl %{buildroot}%{_libexecdir}/
-
 # make the default GeoIP.dat a symlink to GeoLiteCountry.dat,
 # since it's actually an old snapshot of that database
 ln -sf GeoLiteCountry.dat %{buildroot}%{_datadir}/GeoIP/GeoIP.dat
@@ -157,10 +111,6 @@ ln -sf GeoLiteCountry.dat %{buildroot}%{_datadir}/GeoIP/GeoIP.dat
 ln -sf GeoLiteASNum.dat %{buildroot}%{_datadir}/GeoIP/GeoIPASNum.dat
 ln -sf GeoIPASNumv6.dat %{buildroot}%{_datadir}/GeoIP/GeoLiteASNumv6.dat
 
-# fetch database updates weekly
-install -D -m 755 geoipupdate.cron %{buildroot}%{_sysconfdir}/cron.weekly/geoipupdate
-install -D -m 755 geoipupdate6.cron %{buildroot}%{_sysconfdir}/cron.weekly/geoipupdate6
-
 %check
 # Tests require network access so fail in koji; build using --with tests to run them yourself
 %{?with_tests:LD_LIBRARY_PATH=%{buildroot}%{_libdir} make check}
@@ -174,20 +124,13 @@ rm -rf %{buildroot}
 
 %files
 # LGPLv2+
-%doc AUTHORS COPYING ChangeLog README TODO fetch-*
-%config(noreplace) %{_sysconfdir}/GeoIP.conf
-%config(noreplace) %{_sysconfdir}/GeoIP.conf.default
+%doc AUTHORS COPYING ChangeLog fetch-*
 %{_bindir}/geoiplookup
 %{_bindir}/geoiplookup6
 %{_libdir}/libGeoIP.so.1
 %{_libdir}/libGeoIP.so.1.*
 %{_mandir}/man1/geoiplookup.1*
 %{_mandir}/man1/geoiplookup6.1*
-# GPLv2+
-%{_bindir}/geoipupdate
-%{_libdir}/libGeoIPUpdate.so.0
-%{_libdir}/libGeoIPUpdate.so.0.*
-%{_mandir}/man1/geoipupdate.1*
 # CC-BY-SA
 %dir %{_datadir}/GeoIP/
 # This is %%config(noreplace) so that it can be replaced by a commercial database if desired by the end user
@@ -204,24 +147,18 @@ rm -rf %{buildroot}
 %{_datadir}/GeoIP/GeoIPASNum.dat
 %{_datadir}/GeoIP/GeoLiteASNumv6.dat
 
-%files update
-%{_sysconfdir}/cron.weekly/geoipupdate
-
-%files update6
-%{_sysconfdir}/cron.weekly/geoipupdate6
-%{_libexecdir}/lastmod.pl
-
 %files devel
 # LGPLv2+
 %{_includedir}/GeoIP.h
 %{_includedir}/GeoIPCity.h
-%{_includedir}/GeoIPUpdate.h
 %{_libdir}/libGeoIP.so
 %{_libdir}/pkgconfig/geoip.pc
-# GPLv2+
-%{_libdir}/libGeoIPUpdate.so
 
 %changelog
+* Tue Jan 20 2015 Philip Prindeville <philipp at fedorproject.org> - 1.6.4-0
+- Version bump to 1.6.4 per bz #1158667 (okay, that bug was for 1.6.3)
+- Remove geoipupdate as it will be moving into its own package
+
 * Fri Aug 15 2014 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 1.5.1-6
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
 
diff --git a/geoipupdate.cron b/geoipupdate.cron
deleted file mode 100644
index 0f92e43..0000000
--- a/geoipupdate.cron
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/bin/sh
-
-# This updates the IPv4 databases based on product numbers in /etc/GeoIP.conf
-geoipupdate > /dev/null
diff --git a/geoipupdate6.cron b/geoipupdate6.cron
deleted file mode 100644
index c464c83..0000000
--- a/geoipupdate6.cron
+++ /dev/null
@@ -1,45 +0,0 @@
-#!/bin/sh
-
-# Update IPv6 free databases
-
-# It would be much better if we could use geoipupdate for this as it only
-# downloads the data if it has changed and checks it after download
-
-PATH=/usr/libexec:$PATH
-
-DB_LOC=http://geolite.maxmind.com/download/geoip/database
-ASDB_LOC=http://download.maxmind.com/download/geoip/database/asnum
-
-GEOIP_DIR=/usr/share/GeoIP
-
-DATABASES="$DB_LOC/GeoIPv6.dat.gz $DB_LOC/GeoLiteCityv6-beta/GeoLiteCityv6.dat.gz $ASDB_LOC/GeoIPASNumv6.dat.gz"
-
-cd $GEOIP_DIR
-
-status=0
-
-for URL in $DATABASES; do
-    RENEW=
-
-    BASENAME=$(basename $URL .gz)
-    ONLINE=$(lastmod.pl $URL)
-
-    if [ ! -f $BASENAME || ! -f .$BASENAME.timestamp ]; then
-	RENEW=1
-    else
-	TIMESTAMP=$(cat .$BASENAME.timestamp)
-	if [ $ONLINE -gt $TIMESTAMP ]; then
-	    RENEW=1
-	fi
-    fi
-
-    if [ -n "$RENEW" ]; then
-	( wget -q -N $URL \
-	  && mv -f $BASENAME $BASENAME.old \
-	  && gunzip $BASENAME.gz \
-	  && echo $ONLINE > .$BASENAME.timestamp ) \
-	|| { status=1 ; echo "Failed to update $BASENAME" >&2 }
-    fi
-done
-
-exit $status
diff --git a/lastmod.pl b/lastmod.pl
deleted file mode 100755
index 735762a..0000000
--- a/lastmod.pl
+++ /dev/null
@@ -1,56 +0,0 @@
-#!/usr/bin/perl -w
-#===============================================================================
-#
-#         FILE: lastmod.pl
-#
-#        USAGE: lastmod.pl url
-#
-#  DESCRIPTION: Fetch an HTTP URL's HEAD and dump its Last-Modified field in
-#               local time format (e.g. seconds since the epoch).
-#
-#      OPTIONS: none
-# REQUIREMENTS: File::Basename, Net::HTTP, URI, HTTP::Headers
-#         BUGS: unknown
-#        NOTES: none
-#       AUTHOR: Philip Prindeville <philipp at fedoraproject.org>
-# ORGANIZATION: Fedora Project
-#      VERSION: 1.0
-#      CREATED: 08/06/2013 12:52:32 PM
-#     REVISION: 0
-#===============================================================================
-
-use strict;
-use warnings;
-
-use File::Basename;
-use Net::HTTP;
-use URI;
-use HTTP::Headers;
-
-if (@ARGV != 1) {
-    die "usage: " . basename($0) . " url\n";
-}
-
-my $uri = URI->new($ARGV[0]) || die "Couldn't parse URL\n";
-
-die "Not an HTTP URL\n" unless ($uri->scheme eq 'http');
-
-my $host = $uri->host() || die "No host in URL\n";
-
-my $s = Net::HTTP->new(Host => $host) || die "Can't construct Net::HTTP object\n";
-
-$s->write_request(HEAD => $uri->as_string()) || die "Can't send HEAD request\n";
-
-my ($code, $mess, %h) = $s->read_response_headers;
-
-if ($code ne '200') {
-    die "Response: " . $code . ": " . $mess . "\n";
-}
-
-my $h = HTTP::Headers->new(%h) || die "Couldn't parse headers\n";
-
-print $h->last_modified(), "\n";
-
-exit 0;
-
-# vim:ts=4
-- 
cgit v0.10.2


>From 8524901ce9342706e314d9a885c017f9dc9de4b8 Mon Sep 17 00:00:00 2001
From: "Philip A. Prindeville" <philipp at redfish-solutions.com>
Date: Tue, 20 Jan 2015 17:59:47 -0700
Subject: Also remove deprecated patches.


diff --git a/GeoIP-1.5.0-exitcode.patch b/GeoIP-1.5.0-exitcode.patch
deleted file mode 100644
index 315e06e..0000000
--- a/GeoIP-1.5.0-exitcode.patch
+++ /dev/null
@@ -1,38 +0,0 @@
---- GeoIP-1.5.0/apps/geoipupdate.c.orig	2013-02-27 14:13:11.000000000 -0700
-+++ GeoIP-1.5.0/apps/geoipupdate.c	2013-06-10 10:37:08.542133407 -0600
-@@ -40,7 +40,7 @@ static void * realloc_or_die( void * ptr
-     if ( !new ) {
-         free(ptr);
-         fprintf(stderr, "Out of memory\n");
--        exit(1);
-+        exit(-GEOIP_OUT_OF_MEMORY_ERR);
-     }
-     return new;
- }
-@@ -121,7 +121,7 @@ int main (int argc, char *argv[]) {
- 								 "Unknown option character `\\x%x'.\n",
- 								 optopt);
- 			usage();
--			exit(1);
-+			exit(1);		// need unambiguous exit code
- 		default:
- 			abort();
- 		}
-@@ -140,7 +140,7 @@ int main (int argc, char *argv[]) {
-   license_fh = fopen(license_file,"r");
- 	if (license_fh == NULL) {
- 		fprintf(stderr,"Error opening GeoIP Configuration file %s\n",license_file);
--		exit(1);
-+		exit(1);			// need unambiguous exit code
- 	}
- 
- 	if (verbose == 1)
-@@ -292,5 +292,7 @@ int main (int argc, char *argv[]) {
- 	if (client_ipaddr) {
- 		free(client_ipaddr);
- 	}
--	exit(err);
-+	exit((err >= 0) ? 0 : -err);		// use GeoIPUpdateCode as exit code
- }
-+
-+// vim:ts=2
diff --git a/GeoIP-1.5.1-UTF8.patch b/GeoIP-1.5.1-UTF8.patch
deleted file mode 100644
index e72f48d..0000000
--- a/GeoIP-1.5.1-UTF8.patch
+++ /dev/null
@@ -1,45 +0,0 @@
-diff -U0 ./ChangeLog.utf8 ./ChangeLog
---- ./ChangeLog.utf8	2013-03-23 02:26:09.000000000 +0000
-+++ ./ChangeLog	2013-06-13 09:11:18.640720014 +0100
-@@ -185,2 +185,2 @@
--	* Fixed a typo in the geoipupdate(1) manpage and also an non-existent path on Debian (Patrick Matth�i)
--	* Fixes two little format errors (hyphen used as minus sign) in both manpages (Patrick Matth�i)
-+	* Fixed a typo in the geoipupdate(1) manpage and also an non-existent path on Debian (Patrick Matthäi)
-+	* Fixes two little format errors (hyphen used as minus sign) in both manpages (Patrick Matthäi)
-@@ -297 +297 @@
--	* Fixed build issue when using --as-needed flag (Diego 'Flameeyes' Petten�)
-+	* Fixed build issue when using --as-needed flag (Diego 'Flameeyes' Pettenò)
-@@ -443,7 +443,7 @@
--		�1) Use a single buf ptr inside the loops.
--		��� Set to the stack buffer or the cached memory the start of the function.
--		�2) Unroll the i=0,1 loop to allow constant folding.
--		�3) Unroll the j loop for the common case of j = STANDARD_RECORD_LENGTH
--		��� (I've already done the above changes see attached function.)
--		��� With gcc -O2 calculating x[0] and x[1] for STANDARD_RECORD_LENGTH now
--		��� only takes 15 (was > 100) i80x86 instructions with 6 byte accesses of RAM.                 4) only calculate x[0], x[1] when needed, may be a bigger win
-+		 1) Use a single buf ptr inside the loops.
-+		    Set to the stack buffer or the cached memory the start of the function.
-+		 2) Unroll the i=0,1 loop to allow constant folding.
-+		 3) Unroll the j loop for the common case of j = STANDARD_RECORD_LENGTH
-+		    (I've already done the above changes see attached function.)
-+		    With gcc -O2 calculating x[0] and x[1] for STANDARD_RECORD_LENGTH now
-+		    only takes 15 (was > 100) i80x86 instructions with 6 byte accesses of RAM.                 4) only calculate x[0], x[1] when needed, may be a bigger win
-diff -up ./TODO.utf8 ./TODO
---- ./TODO.utf8	2013-03-23 02:26:09.000000000 +0000
-+++ ./TODO	2013-06-13 09:16:19.274926385 +0100
-@@ -9,12 +9,12 @@ Maurice Cinquini
- 
- *** ifndef WIN32 on netdb.h ? ***
- In GeoIPCity.c you don't "#ifndef WIN32" the netdb.h include,
--but in GeoIP.c you do.� Which one is right?
-+but in GeoIP.c you do.  Which one is right?
- 
- *** Warnings in GeoIP-1.2.1 before I made changes ***
- GeoIPUpdate.c:73: warning: implicit declaration of function `_setup_dbfilename'
--��� I suggest a GeoIP_private.h file to include prototypes for
--��� _setup_dbfilename and other private functions also used by GeoIPCity.c
-+    I suggest a GeoIP_private.h file to include prototypes for
-+    _setup_dbfilename and other private functions also used by GeoIPCity.c
- 
- *** Drop the GeoIP_*_by_addr API calls ***
- And now that I think of it, why do you need a seperate
-- 
cgit v0.10.2


>From f90536cc927db4a2297aa943a717c7db23bf5101 Mon Sep 17 00:00:00 2001
From: "Philip A. Prindeville" <philipp at redfish-solutions.com>
Date: Tue, 20 Jan 2015 18:00:54 -0700
Subject: Update tarball to 1.6.4.


diff --git a/.gitignore b/.gitignore
index 5f5e7a8..78efd8d 100644
--- a/.gitignore
+++ b/.gitignore
@@ -8,3 +8,4 @@
 /GeoIPv6.dat.gz
 /GeoLiteCity.dat.gz
 /GeoLiteCityv6.dat.gz
+/GeoIP-1.6.4.tar.gz
diff --git a/sources b/sources
index 6c22e78..e323d18 100644
--- a/sources
+++ b/sources
@@ -1,7 +1 @@
-36b82f3558e6e2ebdd11a56c5db21dbc  GeoIP-1.5.1.tar.gz
-a551a8f2044c3e6e364c1aa82fe183b3  GeoIP.dat.gz
-07e7c99c305c0607cf71f68019aa5a59  GeoIPASNum.dat.gz
-55af75660db5db2f94effcbdc1b7fed9  GeoIPASNumv6.dat.gz
-c635ff5a0ec3afb83b7c291b17323174  GeoIPv6.dat.gz
-5a595f80ce459527a73a2aa61aa5221f  GeoLiteCity.dat.gz
-61dfc4c65e6433a2402b25e43347594e  GeoLiteCityv6.dat.gz
+c9f4f97fcf310b40faa0f900fac14630  GeoIP-1.6.4.tar.gz
-- 
cgit v0.10.2


>From 82adfe59f3f5c8cc0634845640f4fee16678dba1 Mon Sep 17 00:00:00 2001
From: "Philip A. Prindeville" <philipp at redfish-solutions.com>
Date: Mon, 26 Jan 2015 13:40:42 -0700
Subject: Add the *.dat.gz files for the packaged databases.


diff --git a/sources b/sources
index e323d18..bfd12c3 100644
--- a/sources
+++ b/sources
@@ -1 +1,7 @@
 c9f4f97fcf310b40faa0f900fac14630  GeoIP-1.6.4.tar.gz
+07e7c99c305c0607cf71f68019aa5a59  GeoIPASNum.dat.gz
+55af75660db5db2f94effcbdc1b7fed9  GeoIPASNumv6.dat.gz
+a551a8f2044c3e6e364c1aa82fe183b3  GeoIP.dat.gz
+c635ff5a0ec3afb83b7c291b17323174  GeoIPv6.dat.gz
+5a595f80ce459527a73a2aa61aa5221f  GeoLiteCity.dat.gz
+61dfc4c65e6433a2402b25e43347594e  GeoLiteCityv6.dat.gz
-- 
cgit v0.10.2


>From 5104a55f00b04b4a0bc691a3578b9483de155840 Mon Sep 17 00:00:00 2001
From: "Philip A. Prindeville" <philipp at redfish-solutions.com>
Date: Thu, 29 Jan 2015 12:46:31 -0700
Subject: Add requirement on geoipupdate.


diff --git a/GeoIP.spec b/GeoIP.spec
index ac9aee0..f4f747e 100644
--- a/GeoIP.spec
+++ b/GeoIP.spec
@@ -23,6 +23,7 @@ Source14:	http://download.maxmind.com/download/geoip/database/asnum/GeoIPASNum.d
 Source15:	http://download.maxmind.com/download/geoip/database/asnum/GeoIPASNumv6.dat.gz
 BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(id -nu)
 BuildRequires:	zlib-devel
+Requires:	geoipupdate
 Obsoletes:	geoip < %{version}-%{release}
 Provides:	geoip = %{version}-%{release}
 Obsoletes:	geoip-geolite < 2013.04-2
@@ -42,7 +43,6 @@ http://www.maxmind.com/
 Summary:	Development headers and libraries for GeoIP
 Group:		Development/Libraries
 Requires:	%{name} = %{version}-%{release}
-Provides:	geoip-devel = %{version}-%{release}
 Obsoletes:	geoip-devel < %{version}-%{release}
 
 %description devel
@@ -155,7 +155,10 @@ rm -rf %{buildroot}
 %{_libdir}/pkgconfig/geoip.pc
 
 %changelog
-* Tue Jan 20 2015 Philip Prindeville <philipp at fedorproject.org> - 1.6.4-0
+* Thu Jan 29 2015 Philip Prindeville <philipp at fedoraproject.org> - 1.6.4-1
+- Require geoipupdate per Paul
+
+* Tue Jan 20 2015 Philip Prindeville <philipp at fedoraproject.org> - 1.6.4-0
 - Version bump to 1.6.4 per bz #1158667 (okay, that bug was for 1.6.3)
 - Remove geoipupdate as it will be moving into its own package
 
-- 
cgit v0.10.2


>From cfd0706ad7b1f4397ad9164126302302492bf747 Mon Sep 17 00:00:00 2001
From: "Philip A. Prindeville" <philipp at redfish-solutions.com>
Date: Thu, 29 Jan 2015 12:48:22 -0700
Subject: Don't forget to bump release.


diff --git a/GeoIP.spec b/GeoIP.spec
index f4f747e..626f9f8 100644
--- a/GeoIP.spec
+++ b/GeoIP.spec
@@ -6,7 +6,7 @@
 
 Name:		GeoIP
 Version:	1.6.4
-Release:	0%{?dist}
+Release:	1%{?dist}
 Summary:	Library for country/city/organization to IP address or hostname mapping
 Group:		Development/Libraries
 License:	LGPLv2+ and CC-BY-SA
-- 
cgit v0.10.2


>From 21ed6a0ec8997475da1e5ad31143871ec926670e Mon Sep 17 00:00:00 2001
From: Paul Howarth <paul at city-fan.org>
Date: Fri, 6 Feb 2015 19:40:59 +0000
Subject: Only require geoipupdate prior to F-22, for back-compatibility

- Only require geoipupdate prior to F-22, for back-compatibility
- Use %license where possible
- GeoIP-devel provides geoip-devel as well as obsoleting it
- Update bundled databases

diff --git a/.gitignore b/.gitignore
index 78efd8d..466552b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,10 +2,10 @@
 /GeoIP-1.4.8.tar.gz
 /GeoIP-1.5.0.tar.gz
 /GeoIP-1.5.1.tar.gz
+/GeoIP-1.6.4.tar.gz
 /GeoIP.dat.gz
 /GeoIPASNum.dat.gz
 /GeoIPASNumv6.dat.gz
 /GeoIPv6.dat.gz
 /GeoLiteCity.dat.gz
 /GeoLiteCityv6.dat.gz
-/GeoIP-1.6.4.tar.gz
diff --git a/GeoIP.spec b/GeoIP.spec
index 626f9f8..eda0dd4 100644
--- a/GeoIP.spec
+++ b/GeoIP.spec
@@ -6,7 +6,7 @@
 
 Name:		GeoIP
 Version:	1.6.4
-Release:	1%{?dist}
+Release:	2%{?dist}
 Summary:	Library for country/city/organization to IP address or hostname mapping
 Group:		Development/Libraries
 License:	LGPLv2+ and CC-BY-SA
@@ -23,7 +23,13 @@ Source14:	http://download.maxmind.com/download/geoip/database/asnum/GeoIPASNum.d
 Source15:	http://download.maxmind.com/download/geoip/database/asnum/GeoIPASNumv6.dat.gz
 BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(id -nu)
 BuildRequires:	zlib-devel
+
+# For compatibility with original release of GeoIP in old distributions
+%if 0%{?fedora} < 22 && 0%{?rhel} < 8
 Requires:	geoipupdate
+%endif
+
+# Old names of GeoIP library and data packages
 Obsoletes:	geoip < %{version}-%{release}
 Provides:	geoip = %{version}-%{release}
 Obsoletes:	geoip-geolite < 2013.04-2
@@ -43,6 +49,7 @@ http://www.maxmind.com/
 Summary:	Development headers and libraries for GeoIP
 Group:		Development/Libraries
 Requires:	%{name} = %{version}-%{release}
+Provides:	geoip-devel = %{version}-%{release}
 Obsoletes:	geoip-devel < %{version}-%{release}
 
 %description devel
@@ -82,14 +89,13 @@ make %{?_smp_mflags}
 
 %install
 rm -rf %{buildroot}
-make DESTDIR=%{buildroot} INSTALL="install -p" install install-am
+make DESTDIR=%{buildroot} INSTALL="install -p" install
 
 # nix the stuff we don't need like .la files.
 rm -f %{buildroot}%{_libdir}/*.la
 
-mkdir %{buildroot}%{_datadir}/GeoIP/
-
 # install GeoLite databases
+mkdir %{buildroot}%{_datadir}/GeoIP/
 for db in \
 	GeoLiteCountry.dat \
 	GeoIPv6.dat \
@@ -101,8 +107,6 @@ do
 	install -p -m 644 data/$db %{buildroot}%{_datadir}/GeoIP/
 done
 
-%{__mkdir_p} %{buildroot}%{_libexecdir}
-
 # make the default GeoIP.dat a symlink to GeoLiteCountry.dat,
 # since it's actually an old snapshot of that database
 ln -sf GeoLiteCountry.dat %{buildroot}%{_datadir}/GeoIP/GeoIP.dat
@@ -124,7 +128,12 @@ rm -rf %{buildroot}
 
 %files
 # LGPLv2+
-%doc AUTHORS COPYING ChangeLog fetch-*
+%if 0%{?_licensedir:1}
+%license COPYING
+%else
+%doc COPYING
+%endif
+%doc AUTHORS ChangeLog NEWS.md README.md fetch-*
 %{_bindir}/geoiplookup
 %{_bindir}/geoiplookup6
 %{_libdir}/libGeoIP.so.1
@@ -155,6 +164,12 @@ rm -rf %{buildroot}
 %{_libdir}/pkgconfig/geoip.pc
 
 %changelog
+* Fri Feb  6 2015 Paul Howarth <paul at city-fan.org> - 1.6.4-2
+- Only require geoipupdate prior to F-22, for back-compatibility
+- Use %%license where possible
+- GeoIP-devel provides geoip-devel as well as obsoleting it
+- Update bundled databases
+
 * Thu Jan 29 2015 Philip Prindeville <philipp at fedoraproject.org> - 1.6.4-1
 - Require geoipupdate per Paul
 
diff --git a/sources b/sources
index bfd12c3..cc654b9 100644
--- a/sources
+++ b/sources
@@ -1,7 +1,7 @@
 c9f4f97fcf310b40faa0f900fac14630  GeoIP-1.6.4.tar.gz
-07e7c99c305c0607cf71f68019aa5a59  GeoIPASNum.dat.gz
-55af75660db5db2f94effcbdc1b7fed9  GeoIPASNumv6.dat.gz
-a551a8f2044c3e6e364c1aa82fe183b3  GeoIP.dat.gz
-c635ff5a0ec3afb83b7c291b17323174  GeoIPv6.dat.gz
-5a595f80ce459527a73a2aa61aa5221f  GeoLiteCity.dat.gz
-61dfc4c65e6433a2402b25e43347594e  GeoLiteCityv6.dat.gz
+f8ed8b468ecee0f7a98cb05c33af7b14  GeoIPASNum.dat.gz
+621a358853e0cb550a27e8c25d948d6d  GeoIPASNumv6.dat.gz
+4bc1e8280fe2db0adc3fe48663b8926e  GeoIP.dat.gz
+aac7e6e9b141de80934ecee52daf7f56  GeoIPv6.dat.gz
+15a42c684c53d2309e6632a6d6e02531  GeoLiteCity.dat.gz
+49d6ec946fa0a2575b5112a68d71f933  GeoLiteCityv6.dat.gz
-- 
cgit v0.10.2


>From bc29cf717c1c9bfb1158cffc54ebbfb72cec24d1 Mon Sep 17 00:00:00 2001
From: Paul Howarth <paul at city-fan.org>
Date: Tue, 10 Feb 2015 12:30:13 +0000
Subject: Sub-package the data

Sub-package the data; going forward, this would be better as a separate
package, since it has separate upstream releases than the library

diff --git a/GeoIP.spec b/GeoIP.spec
index eda0dd4..65a7851 100644
--- a/GeoIP.spec
+++ b/GeoIP.spec
@@ -6,10 +6,10 @@
 
 Name:		GeoIP
 Version:	1.6.4
-Release:	2%{?dist}
+Release:	3%{?dist}
 Summary:	Library for country/city/organization to IP address or hostname mapping
 Group:		Development/Libraries
-License:	LGPLv2+ and CC-BY-SA
+License:	LGPLv2+
 URL:		http://www.maxmind.com/app/c
 Source0:	https://github.com/maxmind/geoip-api-c/releases/download/v%{version}/GeoIP-%{version}.tar.gz
 Source2:	fetch-geoipdata-city.pl
@@ -23,6 +23,7 @@ Source14:	http://download.maxmind.com/download/geoip/database/asnum/GeoIPASNum.d
 Source15:	http://download.maxmind.com/download/geoip/database/asnum/GeoIPASNumv6.dat.gz
 BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(id -nu)
 BuildRequires:	zlib-devel
+Requires:	GeoIP-data
 
 # For compatibility with original release of GeoIP in old distributions
 %if 0%{?fedora} < 22 && 0%{?rhel} < 8
@@ -40,8 +41,18 @@ GeoIP is a C library that enables the user to find the country that any IP
 address or hostname originates from.
 
 It uses file based databases that can optionally be updated on a weekly basis
-by installing the GeoIP-update (IPv4) and/or GeoIP-update6 (IPv6) packages.
+by installing the geoipupdate-cron (IPv4) and/or geoipupdate-cron6 (IPv6)
+packages.
 
+%package data
+Summary:	Free GeoLite data for GeoIP
+Group:		Development/Libraries
+License:	CC-BY-SA
+%if %{noarch_subpkgs}
+BuildArch:	noarch
+%endif
+
+%description data
 This package includes GeoLite data created by MaxMind, available from
 http://www.maxmind.com/
 
@@ -127,7 +138,6 @@ rm -rf %{buildroot}
 %postun -p /sbin/ldconfig
 
 %files
-# LGPLv2+
 %if 0%{?_licensedir:1}
 %license COPYING
 %else
@@ -140,7 +150,8 @@ rm -rf %{buildroot}
 %{_libdir}/libGeoIP.so.1.*
 %{_mandir}/man1/geoiplookup.1*
 %{_mandir}/man1/geoiplookup6.1*
-# CC-BY-SA
+
+%files data
 %dir %{_datadir}/GeoIP/
 # This is %%config(noreplace) so that it can be replaced by a commercial database if desired by the end user
 %config(noreplace) %{_datadir}/GeoIP/GeoIP.dat
@@ -157,13 +168,16 @@ rm -rf %{buildroot}
 %{_datadir}/GeoIP/GeoLiteASNumv6.dat
 
 %files devel
-# LGPLv2+
 %{_includedir}/GeoIP.h
 %{_includedir}/GeoIPCity.h
 %{_libdir}/libGeoIP.so
 %{_libdir}/pkgconfig/geoip.pc
 
 %changelog
+* Tue Feb 10 2015 Paul Howarth <paul at city-fan.org> - 1.6.4-3
+- Sub-package the data; going forward, this would be better as a separate
+  package, since it has separate upstream releases than the library
+
 * Fri Feb  6 2015 Paul Howarth <paul at city-fan.org> - 1.6.4-2
 - Only require geoipupdate prior to F-22, for back-compatibility
 - Use %%license where possible
diff --git a/sources b/sources
index cc654b9..7923adc 100644
--- a/sources
+++ b/sources
@@ -1,7 +1,7 @@
 c9f4f97fcf310b40faa0f900fac14630  GeoIP-1.6.4.tar.gz
 f8ed8b468ecee0f7a98cb05c33af7b14  GeoIPASNum.dat.gz
 621a358853e0cb550a27e8c25d948d6d  GeoIPASNumv6.dat.gz
-4bc1e8280fe2db0adc3fe48663b8926e  GeoIP.dat.gz
-aac7e6e9b141de80934ecee52daf7f56  GeoIPv6.dat.gz
-15a42c684c53d2309e6632a6d6e02531  GeoLiteCity.dat.gz
-49d6ec946fa0a2575b5112a68d71f933  GeoLiteCityv6.dat.gz
+508e3c10da15f2722774cf4014863976  GeoIP.dat.gz
+3dde07e1b2f5d21c2362ee92b9f103c1  GeoIPv6.dat.gz
+2ec4a73cd879adddf916df479f3581c7  GeoLiteCity.dat.gz
+ca64d35383892b3e7f52888d9e73ee50  GeoLiteCityv6.dat.gz
-- 
cgit v0.10.2


>From 71909f469674a3525d0b29d885957b1893f25c76 Mon Sep 17 00:00:00 2001
From: Paul Howarth <paul at city-fan.org>
Date: Mon, 2 Mar 2015 11:03:35 +0000
Subject: Package clean-up, dropping data

- Databases now unbundled to the GeoIP-GeoLite-data package
- Drop long-unused perl helper scripts
- Add explicit pkgconfig dependency for EL-5 build
- Drop timestamp hack for configure, no longer needed

diff --git a/GeoIP.spec b/GeoIP.spec
index 65a7851..9e2ac81 100644
--- a/GeoIP.spec
+++ b/GeoIP.spec
@@ -6,21 +6,12 @@
 
 Name:		GeoIP
 Version:	1.6.4
-Release:	3%{?dist}
+Release:	4%{?dist}
 Summary:	Library for country/city/organization to IP address or hostname mapping
 Group:		Development/Libraries
 License:	LGPLv2+
 URL:		http://www.maxmind.com/app/c
 Source0:	https://github.com/maxmind/geoip-api-c/releases/download/v%{version}/GeoIP-%{version}.tar.gz
-Source2:	fetch-geoipdata-city.pl
-Source3:	fetch-geoipdata.pl
-# Data sources indexed at http://dev.maxmind.com/geoip/legacy/geolite
-Source10:	http://geolite.maxmind.com/download/geoip/database/GeoLiteCountry/GeoIP.dat.gz
-Source11:	http://geolite.maxmind.com/download/geoip/database/GeoIPv6.dat.gz
-Source12:	http://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz
-Source13:	http://geolite.maxmind.com/download/geoip/database/GeoLiteCityv6-beta/GeoLiteCityv6.dat.gz
-Source14:	http://download.maxmind.com/download/geoip/database/asnum/GeoIPASNum.dat.gz
-Source15:	http://download.maxmind.com/download/geoip/database/asnum/GeoIPASNumv6.dat.gz
 BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(id -nu)
 BuildRequires:	zlib-devel
 Requires:	GeoIP-data
@@ -30,11 +21,9 @@ Requires:	GeoIP-data
 Requires:	geoipupdate
 %endif
 
-# Old names of GeoIP library and data packages
+# Old name of GeoIP library package
 Obsoletes:	geoip < %{version}-%{release}
 Provides:	geoip = %{version}-%{release}
-Obsoletes:	geoip-geolite < 2013.04-2
-Provides:	geoip-geolite = 2013.04-2
 
 %description
 GeoIP is a C library that enables the user to find the country that any IP
@@ -44,22 +33,13 @@ It uses file based databases that can optionally be updated on a weekly basis
 by installing the geoipupdate-cron (IPv4) and/or geoipupdate-cron6 (IPv6)
 packages.
 
-%package data
-Summary:	Free GeoLite data for GeoIP
-Group:		Development/Libraries
-License:	CC-BY-SA
-%if %{noarch_subpkgs}
-BuildArch:	noarch
-%endif
-
-%description data
-This package includes GeoLite data created by MaxMind, available from
-http://www.maxmind.com/
-
 %package devel
 Summary:	Development headers and libraries for GeoIP
 Group:		Development/Libraries
 Requires:	%{name} = %{version}-%{release}
+%if 0%{?fedora} < 11 || 0%{?rhel} < 6
+Requires:	pkgconfig
+%endif
 Provides:	geoip-devel = %{version}-%{release}
 Obsoletes:	geoip-devel < %{version}-%{release}
 
@@ -69,27 +49,7 @@ Development headers and static libraries for building GeoIP-based applications.
 %prep
 %setup -q
 
-# Scripts and license files
-install -p -m 644 %{SOURCE2} fetch-geoipdata-city.pl
-install -p -m 644 %{SOURCE3} fetch-geoipdata.pl
-
-# Data
-install -p -m 644 %{SOURCE10} data/GeoLiteCountry.dat.gz;	gunzip data/GeoLiteCountry.dat
-install -p -m 644 %{SOURCE11} data/GeoIPv6.dat.gz;		gunzip data/GeoIPv6.dat
-install -p -m 644 %{SOURCE12} data/GeoLiteCity.dat.gz;		gunzip data/GeoLiteCity.dat
-install -p -m 644 %{SOURCE13} data/GeoLiteCityv6.dat.gz;	gunzip data/GeoLiteCityv6.dat
-install -p -m 644 %{SOURCE14} data/GeoLiteASNum.dat.gz;		gunzip data/GeoLiteASNum.dat
-install -p -m 644 %{SOURCE15} data/GeoIPASNumv6.dat.gz;		gunzip data/GeoIPASNumv6.dat
-
 %build
-# Fix timestamp order to avoid trying to re-run autotools and configure,
-# thus clobbering our hacked libtool later on
-touch aclocal.m4
-touch configure
-touch config.h.in
-touch config.status
-find . -name Makefile.in -exec touch {} \;
-
 %configure --disable-static --disable-dependency-tracking
 
 # Kill bogus rpaths
@@ -105,27 +65,6 @@ make DESTDIR=%{buildroot} INSTALL="install -p" install
 # nix the stuff we don't need like .la files.
 rm -f %{buildroot}%{_libdir}/*.la
 
-# install GeoLite databases
-mkdir %{buildroot}%{_datadir}/GeoIP/
-for db in \
-	GeoLiteCountry.dat \
-	GeoIPv6.dat \
-	GeoLiteCity.dat \
-	GeoLiteCityv6.dat \
-	GeoLiteASNum.dat \
-	GeoIPASNumv6.dat
-do
-	install -p -m 644 data/$db %{buildroot}%{_datadir}/GeoIP/
-done
-
-# make the default GeoIP.dat a symlink to GeoLiteCountry.dat,
-# since it's actually an old snapshot of that database
-ln -sf GeoLiteCountry.dat %{buildroot}%{_datadir}/GeoIP/GeoIP.dat
-
-# add compat symlinks for GeoIPASNum.dat and GeoLiteASNumv6.dat
-ln -sf GeoLiteASNum.dat %{buildroot}%{_datadir}/GeoIP/GeoIPASNum.dat
-ln -sf GeoIPASNumv6.dat %{buildroot}%{_datadir}/GeoIP/GeoLiteASNumv6.dat
-
 %check
 # Tests require network access so fail in koji; build using --with tests to run them yourself
 %{?with_tests:LD_LIBRARY_PATH=%{buildroot}%{_libdir} make check}
@@ -143,7 +82,7 @@ rm -rf %{buildroot}
 %else
 %doc COPYING
 %endif
-%doc AUTHORS ChangeLog NEWS.md README.md fetch-*
+%doc AUTHORS ChangeLog NEWS.md README.md
 %{_bindir}/geoiplookup
 %{_bindir}/geoiplookup6
 %{_libdir}/libGeoIP.so.1
@@ -151,22 +90,6 @@ rm -rf %{buildroot}
 %{_mandir}/man1/geoiplookup.1*
 %{_mandir}/man1/geoiplookup6.1*
 
-%files data
-%dir %{_datadir}/GeoIP/
-# This is %%config(noreplace) so that it can be replaced by a commercial database if desired by the end user
-%config(noreplace) %{_datadir}/GeoIP/GeoIP.dat
-# The other databases are %%verify(not md5 size mtime) so that they can be updated via the cron scripts
-# and rpm will not moan about the files having changed
-%verify(not md5 size mtime) %{_datadir}/GeoIP/GeoLiteCountry.dat
-%verify(not md5 size mtime) %{_datadir}/GeoIP/GeoIPv6.dat
-%verify(not md5 size mtime) %{_datadir}/GeoIP/GeoLiteCity.dat
-%verify(not md5 size mtime) %{_datadir}/GeoIP/GeoLiteCityv6.dat
-%verify(not md5 size mtime) %{_datadir}/GeoIP/GeoLiteASNum.dat
-%verify(not md5 size mtime) %{_datadir}/GeoIP/GeoIPASNumv6.dat
-# The compat symlinks are just regular files as they should never need to be changed
-%{_datadir}/GeoIP/GeoIPASNum.dat
-%{_datadir}/GeoIP/GeoLiteASNumv6.dat
-
 %files devel
 %{_includedir}/GeoIP.h
 %{_includedir}/GeoIPCity.h
@@ -174,6 +97,12 @@ rm -rf %{buildroot}
 %{_libdir}/pkgconfig/geoip.pc
 
 %changelog
+* Fri Feb 20 2015 Paul Howarth <paul at city-fan.org> - 1.6.4-4
+- Databases now unbundled to the GeoIP-GeoLite-data package
+- Drop long-unused perl helper scripts
+- Add explicit pkgconfig dependency for EL-5 build
+- Drop timestamp hack for configure, no longer needed
+
 * Tue Feb 10 2015 Paul Howarth <paul at city-fan.org> - 1.6.4-3
 - Sub-package the data; going forward, this would be better as a separate
   package, since it has separate upstream releases than the library
diff --git a/fetch-geoipdata-city.pl b/fetch-geoipdata-city.pl
deleted file mode 100644
index cb28f74..0000000
--- a/fetch-geoipdata-city.pl
+++ /dev/null
@@ -1,36 +0,0 @@
-#!/usr/bin/perl
-
-use strict;
-use warnings;
-use POSIX;
-use LWP::Simple;
-use File::Copy;
-use Carp;
-
-my $ipdb     = "GeoLiteCity.dat";
-my $datadir  = "/usr/share/GeoIP/";
-my $fullpath = $datadir . $ipdb;
-my $url = "http://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz";
-my $date = strftime "%Y%m%d", localtime;
-
-# Do we have an existing IP database?
-if ( -e $fullpath ) {
-    print "Fetching " . $ipdb . " from " . $url . "\r\n";
-    if ( is_success( getstore( $url, $datadir . "GeoLiteCity.dat.gz" ) ) ) {
-        move( $fullpath, $datadir . $ipdb . "." . $date )
-          || croak "Can't move the old database aside\r\n";
-        system( 'gzip', '-d', $datadir . 'GeoLiteCity.dat.gz' );
-        if ( $? ne 0 ) {
-            croak "Could not uncompress database - exited $?\r\n";
-        }
-        print "GeoIP database updated. Old copy is at " . $ipdb . "." . $date
-          . "\r\n";
-    }
-    else {
-        croak "Fetch failed - try again later?\r\n";
-    }
-}
-else {
-    croak "You don't appear to have a valid GeoIP database installed..\r\n";
-}
-
diff --git a/fetch-geoipdata.pl b/fetch-geoipdata.pl
deleted file mode 100644
index 770bbc2..0000000
--- a/fetch-geoipdata.pl
+++ /dev/null
@@ -1,36 +0,0 @@
-#!/usr/bin/perl
-
-use strict;
-use warnings;
-use POSIX;
-use LWP::Simple;
-use File::Copy;
-use Carp;
-
-my $ipdb     = 'GeoIP.dat';
-my $datadir  = '/usr/share/GeoIP/';
-my $fullpath = $datadir . $ipdb;
-my $url      = 'http://geolite.maxmind.com/download/geoip/database/GeoLiteCountry/GeoIP.dat.gz';
-my $date     = strftime '%Y%m%d', localtime;
-
-# Do we have an existing IP database?
-if ( -e $fullpath ) {
-    print "Fetching " . $ipdb . " from " . $url . "\r\n";
-    if ( is_success( getstore( $url, $datadir . 'GeoIP.dat.gz' ) ) ) {
-        move( $fullpath, $datadir . $ipdb . '.' . $date )
-          || croak "Can't move the old database aside\r\n";
-        system 'gzip', '-d', $datadir . 'GeoIP.dat.gz';
-        if ( $? ne 0 ) {
-            croak "Could not uncompress database - exited $?\r\n";
-        }
-        print "GeoIP database updated. Old copy is at " . $ipdb . "." . $date
-          . "\r\n";
-    }
-    else {
-        croak "Fetch failed - try again later?\r\n";
-    }
-}
-else {
-    croak "You don't appear to have a valid GeoIP database installed..\r\n";
-}
-
-- 
cgit v0.10.2


>From 0fc74a85407c886df35d13943d6214e1c943c234 Mon Sep 17 00:00:00 2001
From: Paul Howarth <paul at city-fan.org>
Date: Mon, 2 Mar 2015 11:18:22 +0000
Subject: Update to 1.6.5

- New upstream release 1.6.5
  - Fixed a segmentation fault in geoiplookup when the utility was passed an
    invalid database (#1180874)
  - Additional validation was added for the size used in the creation of the
    index cache (#832913)
  - Changed the code to only look up country codes by using functions that
    ensure that we do not try to look past the end of an array (GitHub #53)

diff --git a/.gitignore b/.gitignore
index 466552b..07d9e22 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,11 +1,7 @@
+/Geo*.dat.gz
 /GeoIP-1.4.6.tar.gz
 /GeoIP-1.4.8.tar.gz
 /GeoIP-1.5.0.tar.gz
 /GeoIP-1.5.1.tar.gz
 /GeoIP-1.6.4.tar.gz
-/GeoIP.dat.gz
-/GeoIPASNum.dat.gz
-/GeoIPASNumv6.dat.gz
-/GeoIPv6.dat.gz
-/GeoLiteCity.dat.gz
-/GeoLiteCityv6.dat.gz
+/GeoIP-1.6.5.tar.gz
diff --git a/GeoIP.spec b/GeoIP.spec
index 9e2ac81..74dd269 100644
--- a/GeoIP.spec
+++ b/GeoIP.spec
@@ -5,8 +5,8 @@
 %global noarch_subpkgs 0%{?fedora} > 9 || 0%{?rhel} > 5
 
 Name:		GeoIP
-Version:	1.6.4
-Release:	4%{?dist}
+Version:	1.6.5
+Release:	1%{?dist}
 Summary:	Library for country/city/organization to IP address or hostname mapping
 Group:		Development/Libraries
 License:	LGPLv2+
@@ -97,6 +97,15 @@ rm -rf %{buildroot}
 %{_libdir}/pkgconfig/geoip.pc
 
 %changelog
+* Mon Mar  2 2015 Paul Howarth <paul at city-fan.org> - 1.6.5-1
+- Update to 1.6.5
+  - Fixed a segmentation fault in geoiplookup when the utility was passed an
+    invalid database (#1180874)
+  - Additional validation was added for the size used in the creation of the
+    index cache (#832913)
+  - Changed the code to only look up country codes by using functions that
+    ensure that we do not try to look past the end of an array (GitHub #53)
+
 * Fri Feb 20 2015 Paul Howarth <paul at city-fan.org> - 1.6.4-4
 - Databases now unbundled to the GeoIP-GeoLite-data package
 - Drop long-unused perl helper scripts
diff --git a/sources b/sources
index 7923adc..049b40d 100644
--- a/sources
+++ b/sources
@@ -1,7 +1 @@
-c9f4f97fcf310b40faa0f900fac14630  GeoIP-1.6.4.tar.gz
-f8ed8b468ecee0f7a98cb05c33af7b14  GeoIPASNum.dat.gz
-621a358853e0cb550a27e8c25d948d6d  GeoIPASNumv6.dat.gz
-508e3c10da15f2722774cf4014863976  GeoIP.dat.gz
-3dde07e1b2f5d21c2362ee92b9f103c1  GeoIPv6.dat.gz
-2ec4a73cd879adddf916df479f3581c7  GeoLiteCity.dat.gz
-ca64d35383892b3e7f52888d9e73ee50  GeoLiteCityv6.dat.gz
+be57b27082d81543611fcfab2f7d9c7a  GeoIP-1.6.5.tar.gz
-- 
cgit v0.10.2


	http://pkgs.fedoraproject.org/cgit/GeoIP.git/commit/?h=master&id=107bf6d0d6bb08be6423ba19f9151db91452101f


More information about the scm-commits mailing list