rpms/GeoIP/F-8 LICENSE.txt, NONE, 1.1 README.Fedora, NONE, 1.1 fetch-geoipdata-city.pl, NONE, 1.1 fetch-geoipdata.pl, NONE, 1.1 .cvsignore, 1.10, 1.11 GeoIP.spec, 1.12, 1.13 sources, 1.10, 1.11

Michael Fleming (mfleming) fedora-extras-commits at redhat.com
Sun Apr 13 11:50:29 UTC 2008


Author: mfleming

Update of /cvs/extras/rpms/GeoIP/F-8
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv9097

Modified Files:
	.cvsignore GeoIP.spec sources 
Added Files:
	LICENSE.txt README.Fedora fetch-geoipdata-city.pl 
	fetch-geoipdata.pl 
Log Message:
* Sun Apr 13 2008 Michael Fleming <mfleming+rpm at enlartenment.com> 1.4.4-1
- New upstream release.



--- NEW FILE LICENSE.txt ---
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."


--- NEW FILE README.Fedora ---
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



--- NEW FILE fetch-geoipdata-city.pl ---
#!/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";
}



--- NEW FILE fetch-geoipdata.pl ---
#!/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";
}



Index: .cvsignore
===================================================================
RCS file: /cvs/extras/rpms/GeoIP/F-8/.cvsignore,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- .cvsignore	5 Sep 2007 10:37:12 -0000	1.10
+++ .cvsignore	13 Apr 2008 11:49:44 -0000	1.11
@@ -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


Index: GeoIP.spec
===================================================================
RCS file: /cvs/extras/rpms/GeoIP/F-8/GeoIP.spec,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- GeoIP.spec	5 Sep 2007 10:37:12 -0000	1.12
+++ GeoIP.spec	13 Apr 2008 11:49:45 -0000	1.13
@@ -1,6 +1,6 @@
 Name: GeoIP           
-Version: 1.4.3
-Release: 1%{?dist}
+Version: 1.4.4
+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 @@
 %{_libdir}/libGeoIPUpdate.so
 
 %changelog
+* Sun Apr 13 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


Index: sources
===================================================================
RCS file: /cvs/extras/rpms/GeoIP/F-8/sources,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- sources	5 Sep 2007 10:37:12 -0000	1.10
+++ sources	13 Apr 2008 11:49:45 -0000	1.11
@@ -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




More information about the fedora-extras-commits mailing list