pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/net/GeoIP Updated to version 1.4.4.



details:   https://anonhg.NetBSD.org/pkgsrc/rev/5e953fb34f02
branches:  trunk
changeset: 538375:5e953fb34f02
user:      heinz <heinz%pkgsrc.org@localhost>
date:      Wed Feb 06 23:27:02 2008 +0000

description:
Updated to version 1.4.4.

Pkgsrc changes:
  - Added support for installation to DESTDIR.
  - More fixes for the man page geoiplookup.1 (patch-ab)
  - Two additional patches patch-ac and patch-ad to make geoiplookup not
    crash with segmentation fault if the data file either does not exist
    or has the wrong format.
  - Patches -ab, -ac, and -ad submitted to the bugtracker at sourceforge.net.
  - Updated DESCR with date of data file.
  - Added license information.

Changes since version 1.4.0:
============================
1.4.4   2008-1-21
        * Updated original geoipupdate to return "Invalid product ID or
          subscription expired"
        * Added BL/Saint Barthelemy, MF/Saint Martin (ISO-3166-1 additions)
        * Check for illegal IP strings, return 0 if IP is not well formed
          IPv4 e.g. 1.2.3.4.5 and 1.2.3
        * Clarified that while core GeoIP library is LGPL, libGeoIPUpdate
          depends on md5.c and types.h which are GPL.
        * speedup the conversion from ipstring to ipnum in _GeoIP_addr_to_num.
          Doubles the speed of GEOIP_MEMORY_CACHE and GEOIP_MMAP_CACHE
        * Added new mmap shared memory caching option, GEOIP_MMAP_CACHE
          (Peter Shipley, LookSmart)
                - mmaps: our maps are shared, but we need only private
                  readonly pages

1.4.3   2007-8-30
        ! CHANGE with geoiplookup facility: -v flag now returns database info
          for all databases, not just GeoIP Country
        * Added ability to get netmask of network block from last lookup using
          GeoIP_last_netmask
        * Fixed GeoIP_database_info bug with GeoLite City
        * Replaced 4 with sizeof(char*) to fix issues with geoipupdate on
          64 Bit machines
        * Added GeoIP_set_charset function - enables UTF8 output of city name
          if GEOIP_CHARSET_UTF8 flag is passed to GeoIP_set_charset
        * Fixed segfault issue if calling GeoIP_db_avail before opening a
          database
        * Added continent_code to GeoIP City's record struct (Frank Mather)

1.4.2   2007-2-8
        * Added -d flag to enable custom path for geoipupdate utility program
          (Frank Mather)
        * Replaced _WIN32 with WIN32 since WIN32 is already set by compilers
        * Moved var definitions to top of code, defined size_t (Guenter Knauf)
        * Added Makefile.win32, Makefile.netware, get_ver.awk, geoip.ico to
          EXTRA_DIST in Makefile.am (Guenter Knauf)

1.4.1   2007-1-2
        * Replaced CS/Serbia and Montenegro with RS/Serbia, removed ZR/Zaire,
          added ME/Montenegro
        * Added AX/Aland Islands, GG/Guernsey, IM/Isle of Man, JE/Jersey
          (ISO-3166-1 changes)
        * Added GeoIP_time_zone_by_country_and_region, to lookup zoneinfo
          timezone by country and region (Frank Mather)
        * Added GeoIP_region_name_by_code, to lookup region name from region
          code (Frank Mather)
        * added -f and -d flags to enable custom paths for geoiplookup utility
          program (Frank Mather)
        * Added benchmarks for GeoIP Region and City in test/benchmark.c
          (Frank Mather)
        * Fixed build issue when using --as-needed flag (Diego 'Flameeyes'
          Pettenò)
        * Add sanity checking for filename returned by MaxMind.com server for
          geoipupdate filename (Dean Gaudet, arctic.org)
        * Fixed memory leaks under error conditions, buffer overflow using
          sprintf, and issue where a corrupted cache file could core dump the
          file (Nick Galbreath, Right Media Inc)

diffstat:

 net/GeoIP/DESCR            |   2 +-
 net/GeoIP/Makefile         |   8 ++++-
 net/GeoIP/distinfo         |  14 ++++++----
 net/GeoIP/patches/patch-aa |  10 ++++++-
 net/GeoIP/patches/patch-ab |  21 ++++++++++-----
 net/GeoIP/patches/patch-ac |  59 ++++++++++++++++++++++++++++++++++++++++++++++
 net/GeoIP/patches/patch-ad |  18 ++++++++++++++
 7 files changed, 114 insertions(+), 18 deletions(-)

diffs (204 lines):

diff -r a16c3c9a88ec -r 5e953fb34f02 net/GeoIP/DESCR
--- a/net/GeoIP/DESCR   Wed Feb 06 22:39:43 2008 +0000
+++ b/net/GeoIP/DESCR   Wed Feb 06 23:27:02 2008 +0000
@@ -1,6 +1,6 @@
 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 September 2005. This database simply contains IP blocks as keys,
+accurate as of January 2008. This database simply contains IP blocks as keys,
 and countries as values. It should be more complete and accurate than using
 reverse DNS lookups.
 
diff -r a16c3c9a88ec -r 5e953fb34f02 net/GeoIP/Makefile
--- a/net/GeoIP/Makefile        Wed Feb 06 22:39:43 2008 +0000
+++ b/net/GeoIP/Makefile        Wed Feb 06 23:27:02 2008 +0000
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.18 2007/04/04 15:03:06 tv Exp $
+# $NetBSD: Makefile,v 1.19 2008/02/06 23:27:02 heinz Exp $
 #
 
-DISTNAME=      GeoIP-1.4.0
+DISTNAME=      GeoIP-1.4.4
 CATEGORIES=    net
 MASTER_SITES=  http://www.maxmind.com/download/geoip/api/c/
 
@@ -9,6 +9,10 @@
 HOMEPAGE=      http://www.maxmind.com/download/geoip/api/c/
 COMMENT=       Find the country from any IP address
 
+#LICENSE=      gnu-lgpl-v2.1
+#LICENSE+=     gnu-gpl-v2      #  md5.c and types.h, from GNUPG
+
+PKG_DESTDIR_SUPPORT=   user-destdir
 PKG_INSTALLATION_TYPES=        overwrite pkgviews
 
 GNU_CONFIGURE=         yes
diff -r a16c3c9a88ec -r 5e953fb34f02 net/GeoIP/distinfo
--- a/net/GeoIP/distinfo        Wed Feb 06 22:39:43 2008 +0000
+++ b/net/GeoIP/distinfo        Wed Feb 06 23:27:02 2008 +0000
@@ -1,7 +1,9 @@
-$NetBSD: distinfo,v 1.9 2006/09/05 21:03:58 tv Exp $
+$NetBSD: distinfo,v 1.10 2008/02/06 23:27:02 heinz Exp $
 
-SHA1 (GeoIP-1.4.0.tar.gz) = a108e33661db98a43a9c7334816c1dce6d759c46
-RMD160 (GeoIP-1.4.0.tar.gz) = 54779bae497d6032a35c1c1de8c97461db9b7075
-Size (GeoIP-1.4.0.tar.gz) = 808314 bytes
-SHA1 (patch-aa) = 5a1c82ce58945a645354fffbe598e4d1c853e519
-SHA1 (patch-ab) = b25dec12477c7b198b3a57764abdc8ac1deb52fb
+SHA1 (GeoIP-1.4.4.tar.gz) = 4a2937e7a8fc7c26aa88c0678791246b58d81d02
+RMD160 (GeoIP-1.4.4.tar.gz) = 4aa31840ec6496647551c6e12c9c5e32dceed426
+Size (GeoIP-1.4.4.tar.gz) = 944698 bytes
+SHA1 (patch-aa) = 0b40dd16471e6e94d04493dfb61bc1270161d2b1
+SHA1 (patch-ab) = 5b229ed08c66580d50965cbfa6b7af76154a6a60
+SHA1 (patch-ac) = 4705cdce7f4dc1eb5d814f0d2101dc95d948522c
+SHA1 (patch-ad) = 3d9235f7978d3bfff2d37fcb6c97c467998ba37e
diff -r a16c3c9a88ec -r 5e953fb34f02 net/GeoIP/patches/patch-aa
--- a/net/GeoIP/patches/patch-aa        Wed Feb 06 22:39:43 2008 +0000
+++ b/net/GeoIP/patches/patch-aa        Wed Feb 06 23:27:02 2008 +0000
@@ -1,6 +1,12 @@
-$NetBSD: patch-aa,v 1.3 2006/06/05 16:38:40 tv Exp $
+$NetBSD: patch-aa,v 1.4 2008/02/06 23:27:02 heinz Exp $
+
+  - pkgsrc patch: put configuration file into examples directory so CONF_FILES
+    can use it as a reference.
 
---- conf/Makefile.in.orig      2006-05-14 15:04:19.000000000 -0400
+  - pkgsrc patch: do not install the configuration file (in target
+    install-data-hook), let CONF_FILES handle it.
+
+--- conf/Makefile.in.orig      2008-01-22 04:14:24.000000000 +0100
 +++ conf/Makefile.in
 @@ -23,7 +23,7 @@ bindir = @bindir@
  sbindir = @sbindir@
diff -r a16c3c9a88ec -r 5e953fb34f02 net/GeoIP/patches/patch-ab
--- a/net/GeoIP/patches/patch-ab        Wed Feb 06 22:39:43 2008 +0000
+++ b/net/GeoIP/patches/patch-ab        Wed Feb 06 23:27:02 2008 +0000
@@ -1,13 +1,16 @@
-$NetBSD: patch-ab,v 1.1 2005/10/22 21:50:59 heinz Exp $
+$NetBSD: patch-ab,v 1.2 2008/02/06 23:27:02 heinz Exp $
 
---- man/geoiplookup.1.orig     Thu Nov 21 07:12:38 2002
+  - synchronize man page with the code
+    http://sourceforge.net/tracker/index.php?func=detail&aid=1888355&group_id=66844&atid=515957
+
+--- man/geoiplookup.1.orig     2007-08-16 01:09:29.000000000 +0200
 +++ man/geoiplookup.1
-@@ -3,23 +3,19 @@
+@@ -3,27 +3,24 @@
  .SH NAME
  geoiplookup - look up country using IP Address or hostname
  .SH SYNOPSIS
 -geoiplookup [-lv] <ipaddress|hostname>
-+geoiplookup [-v] <ipaddress|hostname>
++geoiplookup [-d directory] [-f filename] [-v] <ipaddress|hostname>
  .SH DESCRIPTION
  geoiplookup uses the GeoIP library and database to find the Country
  that an IP address or hostname originates from.
@@ -18,15 +21,19 @@
 +.I geoiplookup 80.60.233.195
  .PP
 -will find the Country that 80.60.233.195 originates from, in long format:
--.PP
--.I Netherlands
 +will find the Country that 80.60.233.195 originates from, in the following format:
  .PP
+-.I Netherlands
 +.I NL, Netherlands
+ .PP
  .SH OPTIONS
+ .IP "-f"
+ Specify a custom path to a single GeoIP datafile.
+ .IP "-d"
+ Specify a custom directory containing GeoIP datafile(s).  By default geoiplookup looks in DATADIR
 -.IP "-l"
 -By default, geoiplookup returns the ISO 3166 country code.  By specifying this
 -option, geoiplookup prints the long format, namely the full country name.
  .IP "-v"
- Lists the GeoIP database date and build number.
+ Lists the date and build number for the GeoIP datafile(s).
  .SH AUTHOR
diff -r a16c3c9a88ec -r 5e953fb34f02 net/GeoIP/patches/patch-ac
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/net/GeoIP/patches/patch-ac        Wed Feb 06 23:27:02 2008 +0000
@@ -0,0 +1,59 @@
+$NetBSD: patch-ac,v 1.1 2008/02/06 23:27:02 heinz Exp $
+
+  - probably a typo
+    http://sourceforge.net/tracker/index.php?func=detail&aid=1888390&group_id=66844&atid=515957
+
+  - move call of GeoIP_database_edition() to where it is actually needed.
+    Otherwise a segmentation fault may occur because gi may be NULL (see
+    GeoIP_open()).
+    http://sourceforge.net/tracker/index.php?func=detail&aid=1888390&group_id=66844&atid=515957
+
+  - GeoIP_country_code[] does not contain NULL, so the test for NULL can
+    never succeed. In order to change this we steal the assignment to
+    country_code from GeoIP_country_code_by_name(); while here move the
+    assignment to country_name where it is actually needed.
+    http://sourceforge.net/tracker/index.php?func=detail&aid=1888390&group_id=66844&atid=515957
+    
+
+--- apps/geoiplookup.c.orig    2007-08-16 01:06:28.000000000 +0200
++++ apps/geoiplookup.c
+@@ -64,22 +64,22 @@ int main (int argc, char *argv[]) {
+               exit(1);
+       }
+ 
+-      if (custom_file != NULL) {
++      if (custom_directory != NULL) {
+               GeoIP_setup_custom_directory(custom_directory);
+       }
+       _GeoIP_setup_dbfilename();
+ 
+       if (custom_file != NULL) {
+               gi = GeoIP_open(custom_file, GEOIP_STANDARD);
+-              i = GeoIP_database_edition(gi);
+               if (NULL == gi) {
+-                      printf("%s not available, skipping...\n", GeoIPDBDescription[i]);
++                      printf("%s not available, skipping...\n", custom_file);
+               } else {
+                       if (version_flag == 1) {
+                               db_info = GeoIP_database_info(gi);
+                               printf("%s: %s\n",GeoIPDBDescription[i],db_info);
+                               free(db_info);
+                       } else {
++                              i = GeoIP_database_edition(gi);
+                               geoiplookup(gi,hostname,i);
+                       }
+               }
+@@ -126,11 +126,11 @@ void geoiplookup(GeoIP* gi,char *hostnam
+       }
+       if (GEOIP_COUNTRY_EDITION == i) {
+               country_id = GeoIP_id_by_name(gi, hostname);
+-              country_code = GeoIP_country_code[country_id];
+-              country_name = GeoIP_country_name[country_id];
++              country_code = (country_id > 0) ?  GeoIP_country_code[country_id] : NULL;
+               if (country_code == NULL) {
+                       printf("%s: IP Address not found\n", GeoIPDBDescription[i]);
+               } else {
++                      country_name = GeoIP_country_name[country_id];
+                       printf("%s: %s, %s\n", GeoIPDBDescription[i], country_code, country_name);
+               }
+       } else if (GEOIP_REGION_EDITION_REV0 == i || GEOIP_REGION_EDITION_REV1 == i) {
diff -r a16c3c9a88ec -r 5e953fb34f02 net/GeoIP/patches/patch-ad
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/net/GeoIP/patches/patch-ad        Wed Feb 06 23:27:02 2008 +0000
@@ -0,0 +1,18 @@
+$NetBSD: patch-ad,v 1.1 2008/02/06 23:27:03 heinz Exp $
+
+  - test for success of _GeoIP_seek_record(). 0 is a valid return value.
+    http://sourceforge.net/tracker/index.php?func=detail&aid=1888390&group_id=66844&atid=515957
+
+--- libGeoIP/GeoIP.c.orig      2007-11-25 04:27:25.000000000 +0100
++++ libGeoIP/GeoIP.c
+@@ -707,8 +707,8 @@ int GeoIP_id_by_name (GeoIP* gi, const c
+       }
+       if (!(ipnum = _GeoIP_lookupaddress(name)))
+               return 0;
+-      ret = _GeoIP_seek_record(gi, ipnum) - COUNTRY_BEGIN;
+-      return ret;
++      ret = _GeoIP_seek_record(gi, ipnum);
++      return (ret != 0) ? ret - COUNTRY_BEGIN : 0 ;
+ 
+ }
+ 



Home | Main Index | Thread Index | Old Index