svn commit: r489971 - in head/net/GeoIP: . files
Adam Weinberger
adamw at FreeBSD.org
Fri Jan 11 13:38:44 UTC 2019
Author: adamw
Date: Fri Jan 11 13:38:43 2019
New Revision: 489971
URL: https://svnweb.freebsd.org/changeset/ports/489971
Log:
Replace the geoipupdate.sh script (which just produced 404 errors) with
a message explaining why, and what to do about it.
Modified:
head/net/GeoIP/Makefile
head/net/GeoIP/files/geoipupdate.sh.in
Modified: head/net/GeoIP/Makefile
==============================================================================
--- head/net/GeoIP/Makefile Fri Jan 11 13:19:43 2019 (r489970)
+++ head/net/GeoIP/Makefile Fri Jan 11 13:38:43 2019 (r489971)
@@ -3,7 +3,7 @@
PORTNAME= GeoIP
PORTVERSION= 1.6.12
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= net geography
MASTER_SITES= https://github.com/maxmind/geoip-api-c/releases/download/v${PORTVERSION}/
Modified: head/net/GeoIP/files/geoipupdate.sh.in
==============================================================================
--- head/net/GeoIP/files/geoipupdate.sh.in Fri Jan 11 13:19:43 2019 (r489970)
+++ head/net/GeoIP/files/geoipupdate.sh.in Fri Jan 11 13:38:43 2019 (r489971)
@@ -1,50 +1,12 @@
#!/bin/sh
-# You can set the following environment variables:
-#
-# GEOIP_DB_SERVER: The default download server is geolite.maxmind.com
-# GEOIP_FETCH_CITY: If set (to anything), download the GeoLite City DB
-# GEOIP_FETCH_ASN: If set, download the GeoIP ASN DB
+cat <<MSG
+===============================================================
+Maxmind no longer provides the legacy GeoIP databases, and have
+removed the databases from their servers entirely.
-GEOIP_DB_SERVER=${GEOIP_DB_SERVER:=geolite.maxmind.com}
-GEOIP_FETCH_CITY=${GEOIP_FETCH_CITY:=}
-GEOIP_FETCH_ASN=${GEOIP_FETCH_ASN:=}
-
-set -eu
-echo Fetching GeoIP.dat and GeoIPv6.dat...
-
-# arguments:
-# $1 URL
-# $2 output file name
-_fetch() {
- url="$1"
- out="$2"
- TEMPDIR="$(mktemp -d '%%DATADIR%%/GeoIPupdate.XXXXXX')"
- trap 'rc=$? ; set +e ; rm -rf "'"$TEMPDIR"'" ; exit $rc' 0
- if fetch -o "$TEMPDIR/$out.gz" "$url"; then
- gunzip "$TEMPDIR/$out.gz"
- chmod 444 "$TEMPDIR/$out"
- if ! mv -f "$TEMPDIR/$out" "%%DATADIR%%"/"$2"; then
- echo "Unable to replace %%DATADIR%%/$2"
- return 2
- fi
- else
- echo "$2 download failed"
- return 1
- fi
- rmdir "$TEMPDIR"
- trap - 0
- return 0
-}
-
-_fetch "http://${GEOIP_DB_SERVER}/download/geoip/database/GeoLiteCountry/GeoIP.dat.gz" GeoIP.dat
-_fetch "http://${GEOIP_DB_SERVER}/download/geoip/database/GeoIPv6.dat.gz" GeoIPv6.dat
-
-if [ -n "$GEOIP_FETCH_CITY" ]; then
- _fetch "http://${GEOIP_DB_SERVER}/download/geoip/database/GeoLiteCity.dat.gz" GeoLiteCity.dat
- _fetch "http://${GEOIP_DB_SERVER}/download/geoip/database/GeoLiteCityv6-beta/GeoLiteCityv6.dat.gz" GeoLiteCityv6.dat
-fi
-if [ -n "$GEOIP_FETCH_ASN" ]; then
- _fetch "http://${GEOIP_DB_SERVER}/download/geoip/database/asnum/GeoIPASNum.dat.gz" GeoIPASNum.dat
- _fetch "http://${GEOIP_DB_SERVER}/download/geoip/database/asnum/GeoIPASNumv6.dat.gz" GeoIPASNumv6.dat
-fi
+If a port has an OPTION that supports GeoIP 2 (via
+net/libmaxminddb), please switch to that and use geoipupdate
+(net/geoipupdate) to fetch the GeoIP 2 databases.
+===============================================================
+MSG
More information about the svn-ports-head
mailing list