Hello community, here is the log from the commit of package GeoIP for openSUSE:Factory checked in at 2015-09-30 05:53:16 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/GeoIP (Old) and /work/SRC/openSUSE:Factory/.GeoIP.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "GeoIP" Changes: -------- --- /work/SRC/openSUSE:Factory/GeoIP/GeoIP.changes 2015-03-30 19:32:29.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.GeoIP.new/GeoIP.changes 2015-09-30 05:53:18.000000000 +0200 @@ -1,0 +2,13 @@ +Mon Sep 28 15:05:10 UTC 2015 - mplus...@suse.com + +- Update to 1.6.6 + * Replaced usage of deprecated fileno, read, and lseek on Visual + Studio 2005+ with their ISO C++ conformant replacements. + * A warning about using a double as a float was fixed. + * Fixed segfault when doing a lookup on an empty database. + * Fixed a memcheck error from valgrind in the _check_mtime + function. + * Fixed _check_mtime to check the return value of gettimeofday + rather than just assuming it worked. + +------------------------------------------------------------------- Old: ---- GeoIP-1.6.5.tar.gz New: ---- GeoIP-1.6.6.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ GeoIP.spec ++++++ --- /var/tmp/diff_new_pack.THJkAr/_old 2015-09-30 05:53:19.000000000 +0200 +++ /var/tmp/diff_new_pack.THJkAr/_new 2015-09-30 05:53:19.000000000 +0200 @@ -17,7 +17,7 @@ Name: GeoIP -Version: 1.6.5 +Version: 1.6.6 Release: 0 Summary: Library to find the country that any IP address originates from License: LGPL-2.1+ ++++++ GeoIP-1.6.5.tar.gz -> GeoIP-1.6.6.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/GeoIP-1.6.5/COPYING new/GeoIP-1.6.6/COPYING --- old/GeoIP-1.6.5/COPYING 2012-10-08 23:32:25.000000000 +0200 +++ new/GeoIP-1.6.6/COPYING 2015-03-10 17:01:38.000000000 +0100 @@ -1,8 +1,3 @@ -[ Note that while the core GeoIP library is licensed under the -LGPL, the libGeoIPUpdate library depends on md5.c and types.h -which are licensed under the GPL. ] - - GNU LESSER GENERAL PUBLIC LICENSE Version 2.1, February 1999 @@ -151,7 +146,7 @@ on the Library (independent of the use of the Library in a tool for writing it). Whether that is true depends on what the Library does and what the program that uses the Library does. - + 1. You may copy and distribute verbatim copies of the Library's complete source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/GeoIP-1.6.5/ChangeLog new/GeoIP-1.6.6/ChangeLog --- old/GeoIP-1.6.5/ChangeLog 2015-02-25 23:29:48.000000000 +0100 +++ new/GeoIP-1.6.6/ChangeLog 2015-07-28 21:48:54.000000000 +0200 @@ -1,3 +1,17 @@ +1.6.6 2015-07-28 + +* Replaced usage of deprecated fileno, read, and lseek on Visual Studio 2005+ + with their ISO C++ conformant replacements. (Fix by ClaudiuHKS. GitHub #55.) +* A warning about using a double as a float was fixed. (Fix by ClaudiuHKS. + GitHub #56.) +* Fixed segfault when doing a lookup on an empty database. (Fix by NesoK. + GitHub #62.) +* Fixed a memcheck error from valgrind in the `_check_mtime` + function. (Reported by yurivct. GitHub #60.) +* Fixed `_check_mtime` to check the return value of `gettimeofday` rather than + just assuming it worked. + + 1.6.5 2015-02-25 * A segmentation fault in `geoiplookup` was fixed when the utility was passed diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/GeoIP-1.6.5/GeoIP.spec new/GeoIP-1.6.6/GeoIP.spec --- old/GeoIP-1.6.5/GeoIP.spec 2015-02-25 23:31:31.000000000 +0100 +++ new/GeoIP-1.6.6/GeoIP.spec 2015-07-28 21:51:00.000000000 +0200 @@ -1,5 +1,5 @@ Name: GeoIP -Version: 1.6.5 +Version: 1.6.6 Summary: GeoIP is a C library finds the location of an IP address. Release: 1 Group: System Environment/Libraries diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/GeoIP-1.6.5/LICENSE new/GeoIP-1.6.6/LICENSE --- old/GeoIP-1.6.5/LICENSE 1970-01-01 01:00:00.000000000 +0100 +++ new/GeoIP-1.6.6/LICENSE 2015-03-10 16:24:33.000000000 +0100 @@ -0,0 +1,28 @@ +There are two licenses, one for the C library software, and one for +the GeoLite Country database. + +SOFTWARE LICENSE + +Copyright (C) 2015 MaxMind, Inc. + +This library is free software; you can redistribute it and/or +modify it under the terms of the GNU Lesser General Public +License as published by the Free Software Foundation; either +version 2.1 of the License, or (at your option) any later version. + +This library is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Lesser General Public License for more details. + +For a copy of the LGPL License, see the COPYING file. + +DATA LICENSE (GeoLite Country and City Databases) + +The GeoLite databases are distributed under the Creative Commons +Attribution-ShareAlike 3.0 Unported License. The attribution +requirement may be met by including the following in all advertising +and documentation mentioning features of or use of this database: + + This product includes GeoLite data created by MaxMind, available from + <a href="http://www.maxmind.com">http://www.maxmind.com</a>. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/GeoIP-1.6.5/Makefile.am new/GeoIP-1.6.6/Makefile.am --- old/GeoIP-1.6.5/Makefile.am 2015-01-27 19:42:09.000000000 +0100 +++ new/GeoIP-1.6.6/Makefile.am 2015-03-10 17:13:03.000000000 +0100 @@ -12,4 +12,4 @@ pkgconfigdir = $(libdir)/pkgconfig/ nodist_pkgconfig_DATA = geoip.pc -EXTRA_DIST = NEWS.md README.md README.OSX bootstrap GeoIP.spec GeoIP.spec.in Makefile.vc get_ver.awk geoip.ico geoip.pc.in data/GeoIP.dat +EXTRA_DIST = LICENSE NEWS.md README.md README.OSX bootstrap GeoIP.spec GeoIP.spec.in Makefile.vc get_ver.awk geoip.ico geoip.pc.in data/GeoIP.dat diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/GeoIP-1.6.5/Makefile.in new/GeoIP-1.6.6/Makefile.in --- old/GeoIP-1.6.5/Makefile.in 2015-02-25 23:31:06.000000000 +0100 +++ new/GeoIP-1.6.6/Makefile.in 2015-07-28 21:50:45.000000000 +0200 @@ -350,7 +350,7 @@ pkgconfigdir = $(libdir)/pkgconfig/ nodist_pkgconfig_DATA = geoip.pc -EXTRA_DIST = NEWS.md README.md README.OSX bootstrap GeoIP.spec GeoIP.spec.in Makefile.vc get_ver.awk geoip.ico geoip.pc.in data/GeoIP.dat +EXTRA_DIST = LICENSE NEWS.md README.md README.OSX bootstrap GeoIP.spec GeoIP.spec.in Makefile.vc get_ver.awk geoip.ico geoip.pc.in data/GeoIP.dat all: all-recursive .SUFFIXES: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/GeoIP-1.6.5/apps/geoiplookup.c new/GeoIP-1.6.6/apps/geoiplookup.c --- old/GeoIP-1.6.5/apps/geoiplookup.c 2015-02-25 23:28:41.000000000 +0100 +++ new/GeoIP-1.6.6/apps/geoiplookup.c 2015-07-28 21:47:39.000000000 +0200 @@ -290,7 +290,7 @@ } }else if (GEOIP_COUNTRY_EDITION == i) { country_id = GeoIP_id_by_ipnum(gi, ipnum); - if (country_id < 0 || country_id >= (int) GeoIP_num_countries()) { + if (country_id < 0 || country_id >= (int)GeoIP_num_countries()) { printf("%s: Invalid database\n", GeoIPDBDescription[i]); return; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/GeoIP-1.6.5/apps/geoiplookup6.c new/GeoIP-1.6.6/apps/geoiplookup6.c --- old/GeoIP-1.6.5/apps/geoiplookup6.c 2015-02-25 23:28:41.000000000 +0100 +++ new/GeoIP-1.6.6/apps/geoiplookup6.c 2015-07-28 21:47:39.000000000 +0200 @@ -177,7 +177,7 @@ } }else if (GEOIP_COUNTRY_EDITION_V6 == i) { country_id = GeoIP_id_by_ipnum_v6(gi, ipnum); - if (country_id < 0 || country_id >= (int) GeoIP_num_countries()) { + if (country_id < 0 || country_id >= (int)GeoIP_num_countries()) { printf("%s: Invalid database\n", GeoIPDBDescription[i]); return; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/GeoIP-1.6.5/configure new/GeoIP-1.6.6/configure --- old/GeoIP-1.6.5/configure 2015-02-25 23:31:06.000000000 +0100 +++ new/GeoIP-1.6.6/configure 2015-07-28 21:50:45.000000000 +0200 @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for GeoIP 1.6.5. +# Generated by GNU Autoconf 2.69 for GeoIP 1.6.6. # # Report bugs to <supp...@maxmind.com>. # @@ -590,8 +590,8 @@ # Identity of this package. PACKAGE_NAME='GeoIP' PACKAGE_TARNAME='GeoIP' -PACKAGE_VERSION='1.6.5' -PACKAGE_STRING='GeoIP 1.6.5' +PACKAGE_VERSION='1.6.6' +PACKAGE_STRING='GeoIP 1.6.6' PACKAGE_BUGREPORT='supp...@maxmind.com' PACKAGE_URL='' @@ -1314,7 +1314,7 @@ # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures GeoIP 1.6.5 to adapt to many kinds of systems. +\`configure' configures GeoIP 1.6.6 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1384,7 +1384,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of GeoIP 1.6.5:";; + short | recursive ) echo "Configuration of GeoIP 1.6.6:";; esac cat <<\_ACEOF @@ -1490,7 +1490,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -GeoIP configure 1.6.5 +GeoIP configure 1.6.6 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -1967,7 +1967,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by GeoIP $as_me 1.6.5, which was +It was created by GeoIP $as_me 1.6.6, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2835,7 +2835,7 @@ # Define the identity of the package. PACKAGE='GeoIP' - VERSION='1.6.5' + VERSION='1.6.6' cat >>confdefs.h <<_ACEOF @@ -13726,7 +13726,7 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by GeoIP $as_me 1.6.5, which was +This file was extended by GeoIP $as_me 1.6.6, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -13783,7 +13783,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -GeoIP config.status 1.6.5 +GeoIP config.status 1.6.6 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/GeoIP-1.6.5/configure.ac new/GeoIP-1.6.6/configure.ac --- old/GeoIP-1.6.5/configure.ac 2015-02-25 23:30:14.000000000 +0100 +++ new/GeoIP-1.6.6/configure.ac 2015-07-28 21:50:30.000000000 +0200 @@ -1,7 +1,7 @@ dnl AM_CONFIG_HEADER(config.h) AC_PREREQ([2.65]) -AC_INIT([GeoIP], [1.6.5],[supp...@maxmind.com],[GeoIP]) +AC_INIT([GeoIP], [1.6.6],[supp...@maxmind.com],[GeoIP]) AC_CONFIG_AUX_DIR([.]) AC_CONFIG_SRCDIR([libGeoIP/GeoIP.c]) AC_CONFIG_MACRO_DIR([m4]) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/GeoIP-1.6.5/libGeoIP/GeoIP.c new/GeoIP-1.6.6/libGeoIP/GeoIP.c --- old/GeoIP-1.6.5/libGeoIP/GeoIP.c 2015-02-25 23:28:41.000000000 +0100 +++ new/GeoIP-1.6.6/libGeoIP/GeoIP.c 2015-07-28 21:47:40.000000000 +0200 @@ -25,6 +25,17 @@ #if defined(_WIN32) #include <io.h> + +#ifdef _MSC_VER +# if _MSC_VER < 1900 // VS 2015 supports snprintf +# define snprintf _snprintf +# endif +# if _MSC_VER >= 1400 // VS 2005+ deprecates fileno, lseek and read +# define fileno _fileno +# define read _read +# define lseek _lseek +# endif +#endif #else #include <unistd.h> #include <netdb.h> @@ -1060,7 +1071,7 @@ } static -int _check_mtime(GeoIP *gi) +void _check_mtime(GeoIP *gi) { struct stat buf; ssize_t idx_size; @@ -1077,9 +1088,15 @@ #if !defined(_WIN32) /* stat only has second granularity, so don't * call it more than once a second */ - gettimeofday(&t, NULL); + if (0 != gettimeofday(&t, NULL)) { + DEBUG_MSGF(gi->flags, + "Error calling gettimeofday: %s\n", + strerror(errno)); + return; + } + if (t.tv_sec == gi->last_mtime_check) { - return 0; + return; } gi->last_mtime_check = t.tv_sec; @@ -1090,7 +1107,7 @@ GetSystemTimeAsFileTime(&ft); t = FILETIME_TO_USEC(ft) / 1000 / 1000; if (t == gi->last_mtime_check) { - return 0; + return; } gi->last_mtime_check = t; @@ -1120,7 +1137,7 @@ DEBUG_MSGF(gi->flags, "Out of memory when reloading %s\n", gi->file_path); - return -1; + return; } } } @@ -1131,7 +1148,7 @@ DEBUG_MSGF(gi->flags, "Error Opening file %s when reloading\n", gi->file_path); - return -1; + return; } gi->mtime = buf.st_mtime; gi->size = buf.st_size; @@ -1141,7 +1158,7 @@ DEBUG_MSGF(gi->flags, "GEOIP_MMAP_CACHE is not supported on WIN32\n"); gi->cache = 0; - return -1; + return; #else gi->cache = mmap(NULL, buf.st_size, PROT_READ, MAP_PRIVATE, fileno( @@ -1153,7 +1170,7 @@ gi->file_path); gi->cache = NULL; - return -1; + return; } #endif } else if (gi->flags & GEOIP_MEMORY_CACHE) { @@ -1162,7 +1179,7 @@ DEBUG_MSGF(gi->flags, "Error reading file %s when reloading\n", gi->file_path); - return -1; + return; } } @@ -1174,14 +1191,14 @@ if (gi->databaseSegments == NULL) { DEBUG_MSGF(gi->flags, "Error reading file %s -- corrupt\n", gi->file_path); - return -1; + return; } idx_size = get_index_size(gi, &buf); if (idx_size < 0) { DEBUG_MSGF(gi->flags, "Error file %s -- corrupt\n", gi->file_path); - return -1; + return; } if (gi->flags & GEOIP_INDEX_CACHE) { @@ -1194,14 +1211,14 @@ gi->flags, "Error reading file %s where reloading\n", gi->file_path); - return -1; + return; } } } } } } - return 0; + return; } #define ADDR_STR_LEN (8 * 4 + 7 + 1) @@ -1575,6 +1592,9 @@ } else { gi->index_cache = NULL; } + + gi->last_mtime_check = 0; + return gi; } @@ -2678,4 +2698,3 @@ return result; } - diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/GeoIP-1.6.5/libGeoIP/GeoIP.h new/GeoIP-1.6.6/libGeoIP/GeoIP.h --- old/GeoIP-1.6.5/libGeoIP/GeoIP.h 2015-02-25 23:28:41.000000000 +0100 +++ new/GeoIP-1.6.6/libGeoIP/GeoIP.h 2015-03-04 17:51:09.000000000 +0100 @@ -33,7 +33,6 @@ #else /* !defined(_WIN32) */ #include <winsock2.h> #include <ws2tcpip.h> -#define snprintf _snprintf #define FILETIME_TO_USEC(ft) \ (((unsigned __int64)ft.dwHighDateTime << 32 | \ ft.dwLowDateTime) / 10) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/GeoIP-1.6.5/libGeoIP/GeoIPCity.c new/GeoIP-1.6.6/libGeoIP/GeoIPCity.c --- old/GeoIP-1.6.5/libGeoIP/GeoIPCity.c 2015-01-27 19:42:09.000000000 +0100 +++ new/GeoIP-1.6.6/libGeoIP/GeoIPCity.c 2015-07-13 16:30:10.000000000 +0200 @@ -29,6 +29,12 @@ #else #include <windows.h> #include <winsock.h> + +#if defined(_MSC_VER) && _MSC_VER >= 1400 // VS 2005+ deprecates fileno, lseek and read +# define fileno _fileno +# define read _read +# define lseek _lseek +#endif #endif #include <sys/types.h> /* For uint32_t */ #ifdef HAVE_STDINT_H @@ -90,6 +96,10 @@ return NULL; } }else { + if (gi->size <= record_pointer) { + /* such record does not exists in the cache */ + return NULL; + } record_buf = gi->cache + (long)record_pointer; } @@ -140,14 +150,14 @@ for (j = 0; j < 3; ++j) { latitude += (record_buf[j] << (j * 8)); } - record->latitude = latitude / 10000 - 180; + record->latitude = (float)(latitude / 10000 - 180); record_buf += 3; /* get longitude */ for (j = 0; j < 3; ++j) { longitude += (record_buf[j] << (j * 8)); } - record->longitude = longitude / 10000 - 180; + record->longitude = (float)(longitude / 10000 - 180); /* * get area code and metro code for post April 2002 databases and for US diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/GeoIP-1.6.5/ltmain.sh new/GeoIP-1.6.6/ltmain.sh --- old/GeoIP-1.6.5/ltmain.sh 2015-02-25 23:31:03.000000000 +0100 +++ new/GeoIP-1.6.6/ltmain.sh 2015-07-28 21:50:42.000000000 +0200 @@ -70,7 +70,7 @@ # compiler: $LTCC # compiler flags: $LTCFLAGS # linker: $LD (gnu? $with_gnu_ld) -# $progname: (GNU libtool) 2.4.2 Debian-2.4.2-1.10ubuntu1 +# $progname: (GNU libtool) 2.4.2 Debian-2.4.2-1.11 # automake: $automake_version # autoconf: $autoconf_version # @@ -80,7 +80,7 @@ PROGRAM=libtool PACKAGE=libtool -VERSION="2.4.2 Debian-2.4.2-1.10ubuntu1" +VERSION="2.4.2 Debian-2.4.2-1.11" TIMESTAMP="" package_revision=1.3337