pghmcfc pushed to GeoIP-GeoLite-data (el5). "Initial import (GeoIP-GeoLite-data-2015.04-1) (..more)"

notifications at fedoraproject.org notifications at fedoraproject.org
Mon Apr 13 20:36:52 UTC 2015


>From 6a3fe5581b7cb3e19fa7a376a79d76bf28bcc5ba Mon Sep 17 00:00:00 2001
From: Paul Howarth <paul at city-fan.org>
Date: Mon, 13 Apr 2015 20:55:09 +0100
Subject: Initial import (GeoIP-GeoLite-data-2015.04-1)

The GeoLite databases are free IP geolocation databases. The main package
contains a database that maps IPv4 addresses to countries. The -extra
sub-package contains databases that map IPv6 addresses to countries, plus IPv4
and IPv6 addresses to cities and autonomous system numbers.

This product includes GeoLite data created by MaxMind, available from
http://www.maxmind.com/

diff --git a/.gitignore b/.gitignore
index e69de29..5de8487 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1,6 @@
+/GeoIP.dat.gz
+/GeoIPv6.dat.gz
+/GeoIPASNum.dat.gz
+/GeoIPASNumv6.dat.gz
+/GeoLiteCity.dat.gz
+/GeoLiteCityv6.dat.gz
diff --git a/GeoIP-GeoLite-data.spec b/GeoIP-GeoLite-data.spec
new file mode 100644
index 0000000..f1daaf9
--- /dev/null
+++ b/GeoIP-GeoLite-data.spec
@@ -0,0 +1,171 @@
+# EPEL-5 Compatibility
+# ====================
+# The following spec elements are needed for EL-5 support:
+#  * BuildRoot: and Group: tags
+#  * Cleaning of %%{buildroot} in %%install and %%clean
+# Ref: https://fedoraproject.org/wiki/EPEL:Packaging#EPEL_5_and_earlier
+
+Name:		GeoIP-GeoLite-data
+# The geolite databases are updated on the first Tuesday of each month,
+# hence we use a versioning scheme of YYYY.MM for the Fedora package
+Version:	2015.04
+Release:	1%{?dist}
+Summary:	Free GeoLite IP geolocation country database
+# License specified at http://dev.maxmind.com/geoip/legacy/geolite/#License
+License:	CC-BY-SA
+Group:		Development/Libraries
+URL:		http://dev.maxmind.com/geoip/legacy/geolite/
+Source0:	http://geolite.maxmind.com/download/geoip/database/GeoLiteCountry/GeoIP.dat.gz
+Source1:	http://geolite.maxmind.com/download/geoip/database/GeoIPv6.dat.gz
+Source2:	http://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz
+Source3:	http://geolite.maxmind.com/download/geoip/database/GeoLiteCityv6-beta/GeoLiteCityv6.dat.gz
+Source4:	http://download.maxmind.com/download/geoip/database/asnum/GeoIPASNum.dat.gz
+Source5:	http://download.maxmind.com/download/geoip/database/asnum/GeoIPASNumv6.dat.gz
+BuildArch:	noarch
+BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(id -nu)
+# For compatibility with monolithic GeoIP packages in Fedora 21 and older
+# releases, we ensure that all databases are installed together; going
+# forward, only the IPv4 country database is installed by default and the user
+# can choose whether or not to install the databases from the extra package
+%if 0%{?fedora} < 22 && 0%{?rhel} < 8
+Requires:	GeoIP-GeoLite-data-extra = %{version}-%{release}
+%endif
+# This data has previously been available in differently-named packages
+Obsoletes:	GeoIP-data < 1.6.4-10
+Provides:	GeoIP-data = %{version}
+Obsoletes:	geoip-geolite < %{version}
+Provides:	geoip-geolite = %{version}
+# The data was unbundled from GeoIP at 1.6.4-3
+Conflicts:	GeoIP < 1.6.4-3
+
+%description
+The GeoLite databases are free IP geolocation databases. This package contains
+a database that maps IPv4 addresses to countries.
+
+This product includes GeoLite data created by MaxMind, available from
+http://www.maxmind.com/
+
+%package extra
+Summary:	Free GeoLite IP geolocation databases
+Group:		Development/Libraries
+License:	CC-BY-SA
+Requires:	%{name} = %{version}-%{release}
+
+%description extra
+The GeoLite databases are free IP geolocation databases. This package contains
+databases that map IPv6 addresses to countries, plus IPv4 and IPv6 addresses
+to cities and autonomous system numbers.
+
+This product includes GeoLite data created by MaxMind, available from
+http://www.maxmind.com/
+
+%prep
+%setup -q -T -c
+
+install -p -m 644 %{SOURCE0} GeoLiteCountry.dat.gz;	gunzip GeoLiteCountry.dat
+install -p -m 644 %{SOURCE1} GeoIPv6.dat.gz;		gunzip GeoIPv6.dat
+install -p -m 644 %{SOURCE2} GeoLiteCity.dat.gz;	gunzip GeoLiteCity.dat
+install -p -m 644 %{SOURCE3} GeoLiteCityv6.dat.gz;	gunzip GeoLiteCityv6.dat
+install -p -m 644 %{SOURCE4} GeoLiteASNum.dat.gz;	gunzip GeoLiteASNum.dat
+install -p -m 644 %{SOURCE5} GeoIPASNumv6.dat.gz;	gunzip GeoIPASNumv6.dat
+
+%build
+# This section intentionally left empty
+
+%install
+rm -rf %{buildroot}
+mkdir -p %{buildroot}%{_datadir}/GeoIP/
+for db in \
+	GeoLiteCountry.dat \
+	GeoIPv6.dat \
+	GeoLiteCity.dat \
+	GeoLiteCityv6.dat \
+	GeoLiteASNum.dat \
+	GeoIPASNumv6.dat
+do
+	install -p -m 644 $db %{buildroot}%{_datadir}/GeoIP/
+done
+
+# Add compat symlinks for GeoIPASNum.dat and GeoLiteASNumv6.dat
+# ([upstream] database names used in the old geoip-geolite package)
+ln -sf GeoLiteASNum.dat %{buildroot}%{_datadir}/GeoIP/GeoIPASNum.dat
+ln -sf GeoIPASNumv6.dat %{buildroot}%{_datadir}/GeoIP/GeoLiteASNumv6.dat
+
+%clean
+rm -rf %{buildroot}
+
+%preun
+# If the package is being uninstalled (rather than upgraded), we remove
+# the GeoIP.dat symlink, provided that it points to GeoLiteCountry.dat;
+# rpm will then be able to remove the %%{_datadir}/GeoIP directory
+if [ $1 = 0 ]; then
+	if [ -h %{_datadir}/GeoIP/GeoIP.dat ]; then
+		geoipdat=`readlink %{_datadir}/GeoIP/GeoIP.dat`
+		if [ "$geoipdat" = "GeoLiteCountry.dat" ]; then
+			rm -f %{_datadir}/GeoIP/GeoIP.dat
+		fi
+	fi
+fi
+exit 0
+
+%posttrans
+# Create the default GeoIP.dat as a symlink to GeoLiteCountry.dat
+#
+# This has to be done in %%posttrans rather than %%post because an old
+# package's GeoIP.dat may still be present during %%post in an upgrade
+#
+# Don't do this if there is any existing GeoIP.dat, as we don't want to
+# override what the user has put there
+#
+# Also, if there's an existing GeoIP.dat.rpmsave, we're probably doing
+# an upgrade from an old version of GeoIP that packaged GeoIP.dat as
+# %%config(noreplace), so rename GeoIP.dat.rpmsave back to GeoIP.dat
+# instead of creating a new symlink
+if [ ! -e %{_datadir}/GeoIP/GeoIP.dat ]; then
+	if [ -e %{_datadir}/GeoIP/GeoIP.dat.rpmsave ]; then
+		mv %{_datadir}/GeoIP/GeoIP.dat.rpmsave \
+			%{_datadir}/GeoIP/GeoIP.dat
+	else
+		ln -sf GeoLiteCountry.dat %{_datadir}/GeoIP/GeoIP.dat
+	fi
+fi
+exit 0
+
+%files
+%dir %{_datadir}/GeoIP/
+# The databases are %%verify(not md5 size mtime) so that they can be updated
+# via cron scripts and rpm will not moan about the files having changed
+%verify(not md5 size mtime) %{_datadir}/GeoIP/GeoLiteCountry.dat
+
+%files extra
+# The databases are %%verify(not md5 size mtime) so that they can be updated
+# via cron scripts and rpm will not moan about the files having changed
+%verify(not md5 size mtime) %{_datadir}/GeoIP/GeoIPv6.dat
+%verify(not md5 size mtime) %{_datadir}/GeoIP/GeoLiteCity.dat
+%verify(not md5 size mtime) %{_datadir}/GeoIP/GeoLiteCityv6.dat
+%verify(not md5 size mtime) %{_datadir}/GeoIP/GeoLiteASNum.dat
+%verify(not md5 size mtime) %{_datadir}/GeoIP/GeoIPASNumv6.dat
+# The compat symlinks are just regular files as they should never need to be
+# changed
+%{_datadir}/GeoIP/GeoIPASNum.dat
+%{_datadir}/GeoIP/GeoLiteASNumv6.dat
+
+%changelog
+* Sun Apr 12 2015 Paul Howarth <paul at city-fan.org> - 2015.04-1
+- Update to April 2015 databases
+- Add %%preun script to remove GeoIP.dat symlink if package is uninstalled
+
+* Wed Apr  1 2015 Paul Howarth <paul at city-fan.org> - 2015.03-3
+- Incorporate review feedback (#1194798)
+  - Don't package GeoIP.dat symlink; create it in %%posttrans if it doesn't
+    exist
+  - Update IPASNum databases to current upstream
+  - Wrap comments at 80 characters
+  - Comment use of EPEL-5 idioms
+  - Comment where upstream declares licensing
+
+* Thu Mar  5 2015 Paul Howarth <paul at city-fan.org> - 2015.03-1
+- Update to March 2015 databases
+
+* Fri Feb 20 2015 Paul Howarth <paul at city-fan.org> - 2015.02-1
+- Databases unbundled from GeoIP, like the old geoip-geolite package
diff --git a/sources b/sources
index e69de29..cc9ab9c 100644
--- a/sources
+++ b/sources
@@ -0,0 +1,6 @@
+bacb886b7137eef3b033528e091a59fa  GeoIP.dat.gz
+c52c6539271e0ad7dd3a9727ba48f584  GeoIPv6.dat.gz
+88c4c5b02203b3dd644025a3be6c7b17  GeoIPASNum.dat.gz
+d3ab71ed7bfe90493bb71b2c57865ffa  GeoIPASNumv6.dat.gz
+19b91e185d7538808b17cb966417bc88  GeoLiteCity.dat.gz
+3035205183d4eaffbcd73f2dc049c1c9  GeoLiteCityv6.dat.gz
-- 
cgit v0.10.2


	http://pkgs.fedoraproject.org/cgit/GeoIP-GeoLite-data.git/commit/?h=el5&id=6a3fe5581b7cb3e19fa7a376a79d76bf28bcc5ba


More information about the scm-commits mailing list