pghmcfc pushed to GeoIP (f20). "Package clean-up, dropping data (..more)"
notifications at fedoraproject.org
notifications at fedoraproject.org
Tue Apr 14 07:21:50 UTC 2015
>From 71909f469674a3525d0b29d885957b1893f25c76 Mon Sep 17 00:00:00 2001
From: Paul Howarth <paul at city-fan.org>
Date: Mon, 2 Mar 2015 11:03:35 +0000
Subject: Package clean-up, dropping data
- Databases now unbundled to the GeoIP-GeoLite-data package
- Drop long-unused perl helper scripts
- Add explicit pkgconfig dependency for EL-5 build
- Drop timestamp hack for configure, no longer needed
diff --git a/GeoIP.spec b/GeoIP.spec
index 65a7851..9e2ac81 100644
--- a/GeoIP.spec
+++ b/GeoIP.spec
@@ -6,21 +6,12 @@
Name: GeoIP
Version: 1.6.4
-Release: 3%{?dist}
+Release: 4%{?dist}
Summary: Library for country/city/organization to IP address or hostname mapping
Group: Development/Libraries
License: LGPLv2+
URL: http://www.maxmind.com/app/c
Source0: https://github.com/maxmind/geoip-api-c/releases/download/v%{version}/GeoIP-%{version}.tar.gz
-Source2: fetch-geoipdata-city.pl
-Source3: fetch-geoipdata.pl
-# Data sources indexed at http://dev.maxmind.com/geoip/legacy/geolite
-Source10: http://geolite.maxmind.com/download/geoip/database/GeoLiteCountry/GeoIP.dat.gz
-Source11: http://geolite.maxmind.com/download/geoip/database/GeoIPv6.dat.gz
-Source12: http://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz
-Source13: http://geolite.maxmind.com/download/geoip/database/GeoLiteCityv6-beta/GeoLiteCityv6.dat.gz
-Source14: http://download.maxmind.com/download/geoip/database/asnum/GeoIPASNum.dat.gz
-Source15: http://download.maxmind.com/download/geoip/database/asnum/GeoIPASNumv6.dat.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(id -nu)
BuildRequires: zlib-devel
Requires: GeoIP-data
@@ -30,11 +21,9 @@ Requires: GeoIP-data
Requires: geoipupdate
%endif
-# Old names of GeoIP library and data packages
+# Old name of GeoIP library package
Obsoletes: geoip < %{version}-%{release}
Provides: geoip = %{version}-%{release}
-Obsoletes: geoip-geolite < 2013.04-2
-Provides: geoip-geolite = 2013.04-2
%description
GeoIP is a C library that enables the user to find the country that any IP
@@ -44,22 +33,13 @@ It uses file based databases that can optionally be updated on a weekly basis
by installing the geoipupdate-cron (IPv4) and/or geoipupdate-cron6 (IPv6)
packages.
-%package data
-Summary: Free GeoLite data for GeoIP
-Group: Development/Libraries
-License: CC-BY-SA
-%if %{noarch_subpkgs}
-BuildArch: noarch
-%endif
-
-%description data
-This package includes GeoLite data created by MaxMind, available from
-http://www.maxmind.com/
-
%package devel
Summary: Development headers and libraries for GeoIP
Group: Development/Libraries
Requires: %{name} = %{version}-%{release}
+%if 0%{?fedora} < 11 || 0%{?rhel} < 6
+Requires: pkgconfig
+%endif
Provides: geoip-devel = %{version}-%{release}
Obsoletes: geoip-devel < %{version}-%{release}
@@ -69,27 +49,7 @@ Development headers and static libraries for building GeoIP-based applications.
%prep
%setup -q
-# Scripts and license files
-install -p -m 644 %{SOURCE2} fetch-geoipdata-city.pl
-install -p -m 644 %{SOURCE3} fetch-geoipdata.pl
-
-# Data
-install -p -m 644 %{SOURCE10} data/GeoLiteCountry.dat.gz; gunzip data/GeoLiteCountry.dat
-install -p -m 644 %{SOURCE11} data/GeoIPv6.dat.gz; gunzip data/GeoIPv6.dat
-install -p -m 644 %{SOURCE12} data/GeoLiteCity.dat.gz; gunzip data/GeoLiteCity.dat
-install -p -m 644 %{SOURCE13} data/GeoLiteCityv6.dat.gz; gunzip data/GeoLiteCityv6.dat
-install -p -m 644 %{SOURCE14} data/GeoLiteASNum.dat.gz; gunzip data/GeoLiteASNum.dat
-install -p -m 644 %{SOURCE15} data/GeoIPASNumv6.dat.gz; gunzip data/GeoIPASNumv6.dat
-
%build
-# Fix timestamp order to avoid trying to re-run autotools and configure,
-# thus clobbering our hacked libtool later on
-touch aclocal.m4
-touch configure
-touch config.h.in
-touch config.status
-find . -name Makefile.in -exec touch {} \;
-
%configure --disable-static --disable-dependency-tracking
# Kill bogus rpaths
@@ -105,27 +65,6 @@ make DESTDIR=%{buildroot} INSTALL="install -p" install
# nix the stuff we don't need like .la files.
rm -f %{buildroot}%{_libdir}/*.la
-# install GeoLite databases
-mkdir %{buildroot}%{_datadir}/GeoIP/
-for db in \
- GeoLiteCountry.dat \
- GeoIPv6.dat \
- GeoLiteCity.dat \
- GeoLiteCityv6.dat \
- GeoLiteASNum.dat \
- GeoIPASNumv6.dat
-do
- install -p -m 644 data/$db %{buildroot}%{_datadir}/GeoIP/
-done
-
-# make the default GeoIP.dat a symlink to GeoLiteCountry.dat,
-# since it's actually an old snapshot of that database
-ln -sf GeoLiteCountry.dat %{buildroot}%{_datadir}/GeoIP/GeoIP.dat
-
-# add compat symlinks for GeoIPASNum.dat and GeoLiteASNumv6.dat
-ln -sf GeoLiteASNum.dat %{buildroot}%{_datadir}/GeoIP/GeoIPASNum.dat
-ln -sf GeoIPASNumv6.dat %{buildroot}%{_datadir}/GeoIP/GeoLiteASNumv6.dat
-
%check
# Tests require network access so fail in koji; build using --with tests to run them yourself
%{?with_tests:LD_LIBRARY_PATH=%{buildroot}%{_libdir} make check}
@@ -143,7 +82,7 @@ rm -rf %{buildroot}
%else
%doc COPYING
%endif
-%doc AUTHORS ChangeLog NEWS.md README.md fetch-*
+%doc AUTHORS ChangeLog NEWS.md README.md
%{_bindir}/geoiplookup
%{_bindir}/geoiplookup6
%{_libdir}/libGeoIP.so.1
@@ -151,22 +90,6 @@ rm -rf %{buildroot}
%{_mandir}/man1/geoiplookup.1*
%{_mandir}/man1/geoiplookup6.1*
-%files data
-%dir %{_datadir}/GeoIP/
-# This is %%config(noreplace) so that it can be replaced by a commercial database if desired by the end user
-%config(noreplace) %{_datadir}/GeoIP/GeoIP.dat
-# The other databases are %%verify(not md5 size mtime) so that they can be updated via the cron scripts
-# and rpm will not moan about the files having changed
-%verify(not md5 size mtime) %{_datadir}/GeoIP/GeoLiteCountry.dat
-%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
-
%files devel
%{_includedir}/GeoIP.h
%{_includedir}/GeoIPCity.h
@@ -174,6 +97,12 @@ rm -rf %{buildroot}
%{_libdir}/pkgconfig/geoip.pc
%changelog
+* Fri Feb 20 2015 Paul Howarth <paul at city-fan.org> - 1.6.4-4
+- Databases now unbundled to the GeoIP-GeoLite-data package
+- Drop long-unused perl helper scripts
+- Add explicit pkgconfig dependency for EL-5 build
+- Drop timestamp hack for configure, no longer needed
+
* Tue Feb 10 2015 Paul Howarth <paul at city-fan.org> - 1.6.4-3
- Sub-package the data; going forward, this would be better as a separate
package, since it has separate upstream releases than the library
diff --git a/fetch-geoipdata-city.pl b/fetch-geoipdata-city.pl
deleted file mode 100644
index cb28f74..0000000
--- a/fetch-geoipdata-city.pl
+++ /dev/null
@@ -1,36 +0,0 @@
-#!/usr/bin/perl
-
-use strict;
-use warnings;
-use POSIX;
-use LWP::Simple;
-use File::Copy;
-use Carp;
-
-my $ipdb = "GeoLiteCity.dat";
-my $datadir = "/usr/share/GeoIP/";
-my $fullpath = $datadir . $ipdb;
-my $url = "http://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz";
-my $date = strftime "%Y%m%d", localtime;
-
-# Do we have an existing IP database?
-if ( -e $fullpath ) {
- print "Fetching " . $ipdb . " from " . $url . "\r\n";
- if ( is_success( getstore( $url, $datadir . "GeoLiteCity.dat.gz" ) ) ) {
- move( $fullpath, $datadir . $ipdb . "." . $date )
- || croak "Can't move the old database aside\r\n";
- system( 'gzip', '-d', $datadir . 'GeoLiteCity.dat.gz' );
- if ( $? ne 0 ) {
- croak "Could not uncompress database - exited $?\r\n";
- }
- print "GeoIP database updated. Old copy is at " . $ipdb . "." . $date
- . "\r\n";
- }
- else {
- croak "Fetch failed - try again later?\r\n";
- }
-}
-else {
- croak "You don't appear to have a valid GeoIP database installed..\r\n";
-}
-
diff --git a/fetch-geoipdata.pl b/fetch-geoipdata.pl
deleted file mode 100644
index 770bbc2..0000000
--- a/fetch-geoipdata.pl
+++ /dev/null
@@ -1,36 +0,0 @@
-#!/usr/bin/perl
-
-use strict;
-use warnings;
-use POSIX;
-use LWP::Simple;
-use File::Copy;
-use Carp;
-
-my $ipdb = 'GeoIP.dat';
-my $datadir = '/usr/share/GeoIP/';
-my $fullpath = $datadir . $ipdb;
-my $url = 'http://geolite.maxmind.com/download/geoip/database/GeoLiteCountry/GeoIP.dat.gz';
-my $date = strftime '%Y%m%d', localtime;
-
-# Do we have an existing IP database?
-if ( -e $fullpath ) {
- print "Fetching " . $ipdb . " from " . $url . "\r\n";
- if ( is_success( getstore( $url, $datadir . 'GeoIP.dat.gz' ) ) ) {
- move( $fullpath, $datadir . $ipdb . '.' . $date )
- || croak "Can't move the old database aside\r\n";
- system 'gzip', '-d', $datadir . 'GeoIP.dat.gz';
- if ( $? ne 0 ) {
- croak "Could not uncompress database - exited $?\r\n";
- }
- print "GeoIP database updated. Old copy is at " . $ipdb . "." . $date
- . "\r\n";
- }
- else {
- croak "Fetch failed - try again later?\r\n";
- }
-}
-else {
- croak "You don't appear to have a valid GeoIP database installed..\r\n";
-}
-
--
cgit v0.10.2
http://pkgs.fedoraproject.org/cgit/GeoIP.git/commit/?h=f20&id=71909f469674a3525d0b29d885957b1893f25c76
More information about the scm-commits
mailing list