From 6eb253a6470708bfb53a982bd14c26a9aa18bd07fd5b28fb549a243e494486c2 Mon Sep 17 00:00:00 2001 From: Paolo Stivanin Date: Thu, 26 Mar 2020 11:03:21 +0000 Subject: [PATCH] Accepting request 788497 from home:vitezslav_cizek:branches:Application:Geo - Make /etc/GeoIP.conf readable only by root as it contains MaxMind account information now - Add README.SUSE with description how to get the latest data OBS-URL: https://build.opensuse.org/request/show/788497 OBS-URL: https://build.opensuse.org/package/show/Application:Geo/geoipupdate?expand=0&rev=24 --- README.SUSE | 75 +++++++++++++++++++++++++++++++++++++++++++++ geoipupdate.changes | 7 +++++ geoipupdate.spec | 6 ++-- 3 files changed, 86 insertions(+), 2 deletions(-) create mode 100644 README.SUSE diff --git a/README.SUSE b/README.SUSE new file mode 100644 index 0000000..5a15f33 --- /dev/null +++ b/README.SUSE @@ -0,0 +1,75 @@ +Automatically fetching GeoIP "free" databases +============================================== + +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/) + +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. + +The following packages are introduced to work with the new database format +and distribution: + +libmaxminddb is the library for working with the geolite2 format. It doesn't +download any data, just works with a local .mmdb database. + +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. + +geolite2legacy is a script for converting geolite2 data to the old +geoip format. Accepts only the CSV format as input. + +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). + +How to get the latest GeoIP data +================================ + +(1) Register a MaxMind account at https://www.maxmind.com/en/geolite2/signup + +(2) Fill in the account information in /etc/GeoIP.conf + +(3) Install geoipupdate package + +# zypper in geoipupdate + +(4) Download the latest GeoIP data + +# geoipupdate + +Local libmaxminddb is up-to-date and packages are to work with the geo data. + +Optional: + +(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. diff --git a/geoipupdate.changes b/geoipupdate.changes index 98a16bc..8cbf7ac 100644 --- a/geoipupdate.changes +++ b/geoipupdate.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Thu Mar 26 10:21:28 UTC 2020 - Vítězslav Čížek + +- Make /etc/GeoIP.conf readable only by root as it contains MaxMind + account information now +- Add README.SUSE with description how to get the latest data + ------------------------------------------------------------------- Fri Mar 13 10:40:08 UTC 2020 - pgajdos@suse.com diff --git a/geoipupdate.spec b/geoipupdate.spec index 817fd64..79d601e 100644 --- a/geoipupdate.spec +++ b/geoipupdate.spec @@ -29,6 +29,7 @@ Source1: vendor.tar.gz Source2: geoipupdate.timer Source3: geoipupdate.service Source4: geoipupdate-legacy +Source5: README.SUSE Patch0: disable-pandoc.patch %if 0%{?suse_version} >= 1500 # Build-time parameters @@ -74,6 +75,7 @@ install -D -m0644 %{SOURCE3} %{buildroot}%{_unitdir}/geoipupdate.se install -D -m0755 build/geoipupdate %{buildroot}%{_bindir}/geoipupdate %endif install -D -m0755 %{SOURCE4} %{buildroot}%{_bindir}/geoipupdate-legacy +install -D -m0644 %{SOURCE5} %{buildroot}%{_docdir}/geoipupdate/README.SUSE install -D -m0644 conf/GeoIP.conf.default %{buildroot}%{_sysconfdir}/GeoIP.conf install -d -m0755 %{buildroot}%{_localstatedir}/lib/GeoIP sed -ri \ @@ -98,10 +100,10 @@ sed -ri \ %files %license LICENSE-* -%config(noreplace) %{_sysconfdir}/GeoIP.conf +%attr(0600,root,root) %config(noreplace) %{_sysconfdir}/GeoIP.conf %dir %{_localstatedir}/lib/GeoIP %if 0%{?suse_version} >= 1500 -%doc README.md build/geoipupdate.md build/GeoIP.conf.md +%doc README.md README.SUSE build/geoipupdate.md build/GeoIP.conf.md %{_bindir}/geoipupdate %{_unitdir}/%{name}.service %{_unitdir}/%{name}.timer