Hello community, here is the log from the commit of package GeoIP for openSUSE:Leap:15.2 checked in at 2020-04-14 14:20:13 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Leap:15.2/GeoIP (Old) and /work/SRC/openSUSE:Leap:15.2/.GeoIP.new.3248 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "GeoIP" Tue Apr 14 14:20:13 2020 rev:15 rq:792445 version:1.6.12 Changes: -------- --- /work/SRC/openSUSE:Leap:15.2/GeoIP/GeoIP.changes 2020-01-15 14:45:11.149197089 +0100 +++ /work/SRC/openSUSE:Leap:15.2/.GeoIP.new.3248/GeoIP.changes 2020-04-14 14:20:19.629245203 +0200 @@ -1,0 +2,8 @@ +Thu Mar 26 11:09:24 UTC 2020 - Vítězslav Čížek <[email protected]> + +- Update README.SUSE with a description how to get the latest Geo IP + data after the distribution changes + (jsc#SLE-11184, bsc#1156194, jsc#ECO-1405) +- geoip-fetch is now obsolete and just points to the README + +------------------------------------------------------------------- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ README.SUSE ++++++ --- /var/tmp/diff_new_pack.MTpebD/_old 2020-04-14 14:20:20.049245517 +0200 +++ /var/tmp/diff_new_pack.MTpebD/_new 2020-04-14 14:20:20.053245520 +0200 @@ -1,48 +1,83 @@ Automatically fetching GeoIP "free" databases ============================================== -As provided by Maxmind, LLC, the GeoIP library packages possess tools to -fetch the licensed country/city/organization etc. databases they -provide, but no such tool to fetch the free Country/City equivalents. +On January 2, 2019, Maxmind, the company behind the geoip database, +discontinued the GeoLite Legacy databases, which are no longer +available for download. +(https://support.maxmind.com/geolite-legacy-discontinuation-notice/) -Additionally, the database version shipped with the base package will be -the current one at the time a new library release ships. Therefore, the -shipped database gets less accurate and obsolescent if the library has -not been updated in some time. +Free geolocation data is still available through the GeoLite2 databases. +However, due to some legal changes +(https://blog.maxmind.com/2019/12/18/significant-changes-to-accessing-and-using-geolite2-databases/) +starting December 30, 2019, the Geolite2 database users are required to +register for a MaxMind account and obtain a license key in +order to download GeoLite2 databases. -Therefore these databases can become out-of-date quite quickly unless -the user manually fetches and replaces them regularly; Maxmind generally -release updates once a month (on the 1st/2nd day of the month). +The following packages are introduced to work with the new database format +and distribution: -Script -====== +libmaxminddb is the library for working with the geolite2 format. It doesn't +download any data, just works with a local .mmdb database. -* geoip-fetch [-a] +geoipupdate is the official Maxmind's tool for downloading the +geo database. Users need to fill in its configuration file with their +Maxmind account details. It's possible to generate the entire config +from the Maxmind web page, once one has an account. -When called without parameters it will fetch GeoIP, GeoIPv6 and GeoIPASNum -data (around 2 MB download, 4 MB on drive). If -a parameter is provided -then the script will also fetch GeoIPCity data (around 25 MB download, 45 MB -on drive). +geolite2legacy is a script for converting geolite2 data to the old +geoip format. Accepts only the CSV format as input. -Requirements -============ +We also ship a geoipupdate-legacy subpackage, which is a wrapper around +geoipupdate. It downloads the data and converts them to the old format +using geolite2legacy. The data will be stored at the usual place +(/var/lib/GeoIP), so this should be transparent to existing applications. +It's basically a re-implementation of geoip-fetch which was shipped +within GeoIP package (but no longer works). -* shell, curl to fetch and gzip to decompress the archives +Q: Do I need to migrate? Can I stick to GeoIP? -Usage -===== +GeoIP keeps working, just the process for getting up-to-date data is +different. We ship the helper tools to access the latest data even +with GeoIP. +New applications should definitely switch to libmaxminddb, which is the +supported format and provides more detailed data. -Script can be called manually (as root), but the best solution is to add -a crontab entry similar to this one: +How to get the latest GeoIP data +================================ + +(1) Register a MaxMind account at https://www.maxmind.com/en/geolite2/signup + +(2) Install geoipupdate package + +# zypper in geoipupdate + +(3) Fill in the account information in /etc/GeoIP.conf + +(4) Download the latest GeoIP data + +# geoipupdate + +Local libmaxminddb is up-to-date and packages are to work with the geo data. -# Fetch all GeoIP databases at 6am on the 2nd of the month -00 06 2 * * /usr/sbin/geoip-fetch -a +Optional: -Author -====== -Pavol Rusnak <[email protected]>, Ludwig Nussel <[email protected]> -heavily inspired by fetch from Michael Fleming <[email protected]> - -License -======= -MIT License +(5) Install geoipupdate-legacy package + +# zypper in geoipupdate-legacy + +(6) Download and export the data to the old format + +# geoipupdate-legacy + +Local GeoIP database is up-to-date and packages are ready to work with +the new geo data using the old GeoIP library. + +Tips +==== + +These databases can become out-of-date quite quickly unless +the user manually fetches and replaces them regularly. +Maxmind generally release updates every couple of weeks. + +Script can be called manually (as root), but the best solution is to add +a crontab entry or a systemd timer such as the one shipped with the package. ++++++ geoip-fetch ++++++ --- /var/tmp/diff_new_pack.MTpebD/_old 2020-04-14 14:20:20.093245549 +0200 +++ /var/tmp/diff_new_pack.MTpebD/_new 2020-04-14 14:20:20.093245549 +0200 @@ -1,39 +1,13 @@ #!/bin/bash -set -e +echo "" +echo "+-----------------+" +echo "| !!! WARNING !!! |" +echo "+-----------------+" +echo "" +echo "GeoLite Legacy database is discontinued, this script no longer works." +echo "" +echo "See /usr/share/doc/packages/GeoIP/README.SUSE to learn how to get the latest GeoIP data." +echo "" -baseurl="http://geolite.maxmind.com/download/geoip/database" -geoipdir='/var/lib/GeoIP' - -tempdir=`mktemp -d` -cd "$tempdir" -trap "/bin/rm -rf $tempdir" EXIT - -sources=(GeoLiteCountry/GeoIP.dat.gz GeoIPv6.dat.gz asnum/GeoIPASNum.dat.gz -- GeoLiteCity.dat.gz) -targets=(GeoIP.dat GeoIPv6.dat GeoIPASNum.dat -- GeoIPCity.dat) - -verbose= -if [ -t 0 ]; then - verbose="-#" -fi -skiplarge=1 -if [ "$1" = "-a" ]; then - skiplarge= - shift -fi - -i=0 -while [ $i -lt ${#sources[@]} ]; do - if [ ${sources[$i]} = '--' ]; then - i=$((i+1)) - [ -z "$skiplarge" ] || break - continue - fi - [ -z "$verbose" ] || echo "${targets[$i]} ..." - if curl ${verbose:--s} -f -o "$tempdir/${targets[$i]}.gz" "$baseurl/${sources[$i]}"; then - if gzip -d ${targets[$i]}.gz; then - mv ${targets[$i]} "$geoipdir/${targets[$i]}" - fi - fi - i=$((i+1)) -done +exit 1
