The script will download the file GeoLiteCity.dat.gz and extract it as GeoLiteCity.dat, however the geoiplookup command is expecting the filename to be GeoIPCity.dat. As such, this file is never actually used by the command. https://github.com/freebsd/freebsd-ports/blob/master/net/GeoIP/files/geoipupdate.sh.in#L44 NOTE: I've not investigated the proper name for the IPv6 version, but it probably follows the same renaming pattern, so most likely needs renamed too.
Hi Vincent, You are absolutely right. However, that is as intended. geoiplookup looks for the paid filenames, while geoipupdate.sh (and net/geoipupdate if so configured) will download the free databases. You'll need to create symlinks for those databases as described in https://github.com/maxmind/geoip-api-c/blob/master/NEWS.md I'm closing this PR as it is working as intended, though I'm going to amend the pkg-message with instructions to create those symlinks.
A commit references this bug: Author: adamw Date: Wed Dec 12 00:28:53 UTC 2018 New revision: 487269 URL: https://svnweb.freebsd.org/changeset/ports/487269 Log: Add pkg-message instructions to fix geoiplookup with the free databases GeoIP has free and paid databases with differing granularity. The geoiplookup and geoiplookup6 tools look only for the paid databases. Users with the free databases (as would be obtained through the included geoipupdate.sh script, or though specification of free data files in net/geoipupdate) will need to create symlinks to enable those tools to work with the free database files. The upstream NEWS.md enumerates those symlinks, so this patch includes a link to that file in the upstream repo. PORTREVISION bump for the pkg-message change. PR: 233947 Reported by: Vincent Milum MFH: 2018Q4 Changes: head/net/GeoIP/Makefile head/net/GeoIP/files/pkg-message.in
A commit references this bug: Author: adamw Date: Wed Dec 12 00:31:47 UTC 2018 New revision: 487270 URL: https://svnweb.freebsd.org/changeset/ports/487270 Log: MFH: r487269 Add pkg-message instructions to fix geoiplookup with the free databases GeoIP has free and paid databases with differing granularity. The geoiplookup and geoiplookup6 tools look only for the paid databases. Users with the free databases (as would be obtained through the included geoipupdate.sh script, or though specification of free data files in net/geoipupdate) will need to create symlinks to enable those tools to work with the free database files. The upstream NEWS.md enumerates those symlinks, so this patch includes a link to that file in the upstream repo. PORTREVISION bump for the pkg-message change. PR: 233947 Reported by: Vincent Milum Approved by: portmgr (with hat) Changes: _U branches/2018Q4/ branches/2018Q4/net/GeoIP/Makefile branches/2018Q4/net/GeoIP/files/pkg-message.in
This seems highly counter-intuitive to the entire ideals of what a computer is even supposed to be though, as the entire point of computers is to automate otherwise human performed tasks. Instead of solving the problem at hand, you're just adding a note telling the user "just do it yourself" - If anything, it should at least be an optional flag in the script to do this automatically. The other thing with this is that on Debian, installing their versions of the GeoIP packages handles this as expected, just install the packages and they just "WORK" - so by NOT having this on FreeBSD, it is creating another barrier to entry to someone trying to use this system that may be new to it.