Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 525924 - =dev-libs/geoip-1.6.2 - GeoIPCity databases incorrectly named
Summary: =dev-libs/geoip-1.6.2 - GeoIPCity databases incorrectly named
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Library (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Netmon project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-10-20 01:34 UTC by rypervenche
Modified: 2014-10-21 09:09 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
geoipupdate.sh-525924.patch (geoipupdate.sh-525924.patch,443 bytes, patch)
2014-10-20 08:16 UTC, Jeroen Roovers (RETIRED)
Details | Diff
files/geoipupdate-r5.sh (geoipupdate-r5.sh,1.07 KB, text/plain)
2014-10-21 08:26 UTC, Jeroen Roovers (RETIRED)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description rypervenche 2014-10-20 01:34:16 UTC
It looks as though after version 1.6.0-r1, the ebuilds for this package no longer included the renaming of the GeoLiteCity.dat and GeoLiteCityv6.dat files to GeoIPCity.dat and GeoIPCityv6.dat, respectively. When running the geoiplookup command on an IP address, the City information is no longer shown. When I rename the files, it works correctly:

========================================================================
vitesse GeoIP # pwd
/usr/share/GeoIP

vitesse GeoIP # ls

vitesse GeoIP # geoipupdate.sh -f
Updating GeoIP databases...
2014-10-19 20:23:45 URL:https://geolite.maxmind.com/download/geoip/database/GeoIPv6.dat.gz [679060/679060] -> "geoipupdate.oih3Ly7LbN/GeoIPv6.dat.gz" [1]
2014-10-19 20:25:24 URL:https://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz [11860823/11860823] -> "geoipupdate.oih3Ly7LbN/GeoLiteCity.dat.gz" [1]
2014-10-19 20:27:16 URL:https://geolite.maxmind.com/download/geoip/database/GeoLiteCityv6-beta/GeoLiteCityv6.dat.gz [12111257/12111257] -> "geoipupdate.oih3Ly7LbN/GeoLiteCityv6.dat.gz" [1]
2014-10-19 20:27:20 URL:https://geolite.maxmind.com/download/geoip/database/GeoLiteCountry/GeoIP.dat.gz [438450/438450] -> "geoipupdate.oih3Ly7LbN/GeoIP.dat.gz" [1]
2014-10-19 20:27:38 URL:https://geolite.maxmind.com/download/geoip/database/asnum/GeoIPASNum.dat.gz [2018118/2018118] -> "geoipupdate.oih3Ly7LbN/GeoIPASNum.dat.gz" [1]
2014-10-19 20:27:50 URL:https://geolite.maxmind.com/download/geoip/database/asnum/GeoIPASNumv6.dat.gz [2290672/2290672] -> "geoipupdate.oih3Ly7LbN/GeoIPASNumv6.dat.gz" [1]

vitesse GeoIP # ls
GeoIPASNum.dat  GeoIPASNumv6.dat  GeoIP.dat  GeoIPv6.dat  GeoLiteCity.dat  GeoLiteCityv6.dat

vitesse GeoIP # geoiplookup 74.125.227.105
GeoIP Country Edition: US, United States
GeoIP ASNum Edition: AS15169 Google Inc.

vitesse GeoIP # perl-rename 's/Lite/IP/' *Lite*

vitesse GeoIP # ls
GeoIPASNum.dat  GeoIPASNumv6.dat  GeoIPCity.dat  GeoIPCityv6.dat  GeoIP.dat  GeoIPv6.dat

vitesse GeoIP # geoiplookup 74.125.227.105
GeoIP Country Edition: US, United States
GeoIP City Edition, Rev 1: US, CA, California, Mountain View, 94043, 37.419201, -122.057404, 807, 650
GeoIP ASNum Edition: AS15169 Google Inc.
========================================================================

I believe that version 1.6.0-r3 may also be affected by this, but I haven't looked tried it.

Thanks^^
Comment 1 Jeroen Roovers (RETIRED) gentoo-dev 2014-10-20 07:42:45 UTC
Yes, README.md seems to note:

Free users should create symlinks for the GeoIP databases.
For example:

```
cd /usr/local/share/GeoIP
ln -s GeoLiteCity.dat GeoIPCity.dat
ln -s GeoLiteCountry.dat GeoIPCountry.dat
ln -s GeoLiteASNum.dat GeoIPASNum.dat

```

which seems a bit odd. We could create those symlinks in geoipupdate.sh
Comment 2 Jeroen Roovers (RETIRED) gentoo-dev 2014-10-20 08:16:16 UTC
Created attachment 387026 [details, diff]
geoipupdate.sh-525924.patch

Would this do?
Comment 3 Jeroen Roovers (RETIRED) gentoo-dev 2014-10-20 09:12:29 UTC
It's difficult for me to test now since I once again hit the limit for my IP address.
Comment 4 Jeroen Roovers (RETIRED) gentoo-dev 2014-10-20 09:45:07 UTC
Also, I see now that the extra cd call shouldn't be needed. It doesn't harm in testing though.
Comment 5 Christian Ruppert (idl0r) gentoo-dev 2014-10-20 11:55:46 UTC
Hm, they were always named that way. I'm not sure if they're indented to be renamed.
Comment 6 Christian Ruppert (idl0r) gentoo-dev 2014-10-20 11:57:14 UTC
(In reply to Christian Ruppert (idl0r) from comment #5)
> Hm, they were always named that way. I'm not sure if they're indented to be
> renamed.

Oh, I haven't seen Jer's comment so ignore mine.
Comment 7 Jeroen Roovers (RETIRED) gentoo-dev 2014-10-21 08:26:57 UTC
Created attachment 387118 [details]
files/geoipupdate-r5.sh

Or you could replace the whole file instead of patching...
Comment 8 Christian Ruppert (idl0r) gentoo-dev 2014-10-21 08:32:05 UTC
Jer,

there's a missing / on that sed call:
"sed: -e expression #1, char 15: unterminated `s' command
sed: -e expression #1, char 15: unterminated `s' command"

Otherwise it seems to work as expected. (Just tested the patch).
Comment 9 Jeroen Roovers (RETIRED) gentoo-dev 2014-10-21 09:09:43 UTC
Fixed in 1.6.2 and 1.6.2-r1.