svn commit: r490220 - in branches/2019Q1/net/GeoIP: . files
Adam Weinberger
adamw at FreeBSD.org
Mon Jan 14 00:07:43 UTC 2019
Author: adamw
Date: Mon Jan 14 00:07:41 2019
New Revision: 490220
URL: https://svnweb.freebsd.org/changeset/ports/490220
Log:
MFH: r489642 r489971 r489992 r490212
Deprecate net/GeoIP, and expire it at the end of the month
Note that only the legacy format is deprecated. The GeoIP2 databases
are alive and well.
I completely missed that GeoIP has been deprecated for the last year,
and it expired upstream last week. Maxmind no longer provides the
legacy database, rendering this port useless.
Users must switch to GeoIP2 immediately. OPTIONS changes and
instructions will be coming in the next few days.
See https://support.maxmind.com/geolite-legacy-discontinuation-notice/
Although it won't be purged from the quarterly branch, it probably
makes sense to MFH this deprecation notice.
PR: 234715
Reported by: rigoletto
Replace the geoipupdate.sh script (which just produced 404 errors) with
a message explaining why, and what to do about it.
Report failure to the caller in geoipupdate.sh
The script was returning an error due to the service not being offered anymore.
The update attempt was replaced with an information message, but it's better to
still return 1 as it did before to allow users detecting they have a problem.
Reported by: aramw (maintainer)
Extend the GeoIP expiration to a month from now to give
users a bit more time to find a new solution.
Approved by: portmgr (with hat)
Modified:
branches/2019Q1/net/GeoIP/Makefile
branches/2019Q1/net/GeoIP/files/geoipupdate.sh.in
Directory Properties:
branches/2019Q1/ (props changed)
Modified: branches/2019Q1/net/GeoIP/Makefile
==============================================================================
--- branches/2019Q1/net/GeoIP/Makefile Sun Jan 13 23:34:15 2019 (r490219)
+++ branches/2019Q1/net/GeoIP/Makefile Mon Jan 14 00:07:41 2019 (r490220)
@@ -3,7 +3,7 @@
PORTNAME= GeoIP
PORTVERSION= 1.6.12
-PORTREVISION= 1
+PORTREVISION= 3
CATEGORIES= net geography
MASTER_SITES= https://github.com/maxmind/geoip-api-c/releases/download/v${PORTVERSION}/
@@ -13,6 +13,9 @@ COMMENT= Find the country that any IP address or hostn
LICENSE= GPLv2
USES= libtool pathfix
+
+DEPRECATED= Legacy databases no longer available. Switch to net/libmaxminddb instead
+EXPIRATION_DATE=2019-02-15
USE_LDCONFIG= yes
GNU_CONFIGURE= yes
Modified: branches/2019Q1/net/GeoIP/files/geoipupdate.sh.in
==============================================================================
--- branches/2019Q1/net/GeoIP/files/geoipupdate.sh.in Sun Jan 13 23:34:15 2019 (r490219)
+++ branches/2019Q1/net/GeoIP/files/geoipupdate.sh.in Mon Jan 14 00:07:41 2019 (r490220)
@@ -1,50 +1,13 @@
#!/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
+exit 1
More information about the svn-ports-all
mailing list