pghmcfc pushed to GeoIP (el5). "Version bump to 1.6.4 per bz #1158667. Decouple geoipupdate."

notifications at fedoraproject.org notifications at fedoraproject.org
Tue Apr 14 07:40:16 UTC 2015


>From 98cd83fa9ae10b56581f0b8675b0c61f0886e290 Mon Sep 17 00:00:00 2001
From: "Philip A. Prindeville" <philipp at redfish-solutions.com>
Date: Tue, 20 Jan 2015 17:56:33 -0700
Subject: Version bump to 1.6.4 per bz #1158667. Decouple geoipupdate.


diff --git a/GeoIP.spec b/GeoIP.spec
index 80488c5..ac9aee0 100644
--- a/GeoIP.spec
+++ b/GeoIP.spec
@@ -5,18 +5,15 @@
 %global noarch_subpkgs 0%{?fedora} > 9 || 0%{?rhel} > 5
 
 Name:		GeoIP
-Version:	1.5.1
-Release:	6%{?dist}
+Version:	1.6.4
+Release:	0%{?dist}
 Summary:	Library for country/city/organization to IP address or hostname mapping
 Group:		Development/Libraries
-License:	LGPLv2+ and GPLv2+ and CC-BY-SA
+License:	LGPLv2+ and CC-BY-SA
 URL:		http://www.maxmind.com/app/c
-Source0:	http://www.maxmind.com/download/geoip/api/c/GeoIP-%{version}.tar.gz
+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
-Source5:	geoipupdate.cron
-Source6:	geoipupdate6.cron
-Source7:	lastmod.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
@@ -24,8 +21,6 @@ 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
-Patch1:		GeoIP-1.5.0-exitcode.patch
-Patch10:	GeoIP-1.5.1-UTF8.patch
 BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(id -nu)
 BuildRequires:	zlib-devel
 Obsoletes:	geoip < %{version}-%{release}
@@ -43,31 +38,6 @@ by installing the GeoIP-update (IPv4) and/or GeoIP-update6 (IPv6) packages.
 This package includes GeoLite data created by MaxMind, available from
 http://www.maxmind.com/
 
-%package update
-Summary:	Crontab entry to facilitate automatic updates of IPv4 GeoIP databases
-Group:		Applications/Databases
-Requires:	crontabs
-Requires:	%{name} = %{version}-%{release}
-%if %{noarch_subpkgs}
-BuildArch:	noarch
-%endif
-
-%description update
-Crontab entry to provide weekly updates of the GeoIP free IPv4 databases.
-
-%package update6
-Summary:	Crontab entry to facilitate automatic updates of IPv6 GeoIP databases
-Group:		Applications/Databases
-Requires:	crontabs
-Requires:	wget
-Requires:	%{name} = %{version}-%{release}
-%if %{noarch_subpkgs}
-BuildArch:	noarch
-%endif
-
-%description update6
-Crontab entry to provide weekly updates of the GeoIP free IPv6 databases.
-
 %package devel
 Summary:	Development headers and libraries for GeoIP
 Group:		Development/Libraries
@@ -84,9 +54,6 @@ Development headers and static libraries for building GeoIP-based applications.
 # Scripts and license files
 install -p -m 644 %{SOURCE2} fetch-geoipdata-city.pl
 install -p -m 644 %{SOURCE3} fetch-geoipdata.pl
-install -p -m 755 %{SOURCE5} geoipupdate.cron
-install -p -m 755 %{SOURCE6} geoipupdate6.cron
-install -p -m 755 %{SOURCE7} lastmod.pl
 
 # Data
 install -p -m 644 %{SOURCE10} data/GeoLiteCountry.dat.gz;	gunzip data/GeoLiteCountry.dat
@@ -96,12 +63,6 @@ install -p -m 644 %{SOURCE13} data/GeoLiteCityv6.dat.gz;	gunzip data/GeoLiteCity
 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
 
-# Fix exit codes for various cases (MaxMind support #129155)
-%patch1 -p1 -b .exitcode
-
-# Recode docs as UTF-8
-%patch10 -p1 -b .utf8
-
 %build
 # Fix timestamp order to avoid trying to re-run autotools and configure,
 # thus clobbering our hacked libtool later on
@@ -121,17 +82,12 @@ make %{?_smp_mflags}
 
 %install
 rm -rf %{buildroot}
-make DESTDIR=%{buildroot} INSTALL="install -p" install
+make DESTDIR=%{buildroot} INSTALL="install -p" install install-am
 
 # nix the stuff we don't need like .la files.
 rm -f %{buildroot}%{_libdir}/*.la
 
-# fix up the config file to have geoipupdate fetch the free products by default
-sed -i \
-	-e 's/YOUR_LICENSE_KEY_HERE$/000000000000/' \
-	-e 's/YOUR_USER_ID_HERE$/999999/' \
-	-e 's/106$/506 533 517/' \
-	%{buildroot}%{_sysconfdir}/GeoIP.conf
+mkdir %{buildroot}%{_datadir}/GeoIP/
 
 # install GeoLite databases
 for db in \
@@ -147,8 +103,6 @@ done
 
 %{__mkdir_p} %{buildroot}%{_libexecdir}
 
-install -p -m 755 lastmod.pl %{buildroot}%{_libexecdir}/
-
 # 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
@@ -157,10 +111,6 @@ ln -sf GeoLiteCountry.dat %{buildroot}%{_datadir}/GeoIP/GeoIP.dat
 ln -sf GeoLiteASNum.dat %{buildroot}%{_datadir}/GeoIP/GeoIPASNum.dat
 ln -sf GeoIPASNumv6.dat %{buildroot}%{_datadir}/GeoIP/GeoLiteASNumv6.dat
 
-# fetch database updates weekly
-install -D -m 755 geoipupdate.cron %{buildroot}%{_sysconfdir}/cron.weekly/geoipupdate
-install -D -m 755 geoipupdate6.cron %{buildroot}%{_sysconfdir}/cron.weekly/geoipupdate6
-
 %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}
@@ -174,20 +124,13 @@ rm -rf %{buildroot}
 
 %files
 # LGPLv2+
-%doc AUTHORS COPYING ChangeLog README TODO fetch-*
-%config(noreplace) %{_sysconfdir}/GeoIP.conf
-%config(noreplace) %{_sysconfdir}/GeoIP.conf.default
+%doc AUTHORS COPYING ChangeLog fetch-*
 %{_bindir}/geoiplookup
 %{_bindir}/geoiplookup6
 %{_libdir}/libGeoIP.so.1
 %{_libdir}/libGeoIP.so.1.*
 %{_mandir}/man1/geoiplookup.1*
 %{_mandir}/man1/geoiplookup6.1*
-# GPLv2+
-%{_bindir}/geoipupdate
-%{_libdir}/libGeoIPUpdate.so.0
-%{_libdir}/libGeoIPUpdate.so.0.*
-%{_mandir}/man1/geoipupdate.1*
 # CC-BY-SA
 %dir %{_datadir}/GeoIP/
 # This is %%config(noreplace) so that it can be replaced by a commercial database if desired by the end user
@@ -204,24 +147,18 @@ rm -rf %{buildroot}
 %{_datadir}/GeoIP/GeoIPASNum.dat
 %{_datadir}/GeoIP/GeoLiteASNumv6.dat
 
-%files update
-%{_sysconfdir}/cron.weekly/geoipupdate
-
-%files update6
-%{_sysconfdir}/cron.weekly/geoipupdate6
-%{_libexecdir}/lastmod.pl
-
 %files devel
 # LGPLv2+
 %{_includedir}/GeoIP.h
 %{_includedir}/GeoIPCity.h
-%{_includedir}/GeoIPUpdate.h
 %{_libdir}/libGeoIP.so
 %{_libdir}/pkgconfig/geoip.pc
-# GPLv2+
-%{_libdir}/libGeoIPUpdate.so
 
 %changelog
+* Tue Jan 20 2015 Philip Prindeville <philipp at fedorproject.org> - 1.6.4-0
+- Version bump to 1.6.4 per bz #1158667 (okay, that bug was for 1.6.3)
+- Remove geoipupdate as it will be moving into its own package
+
 * Fri Aug 15 2014 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 1.5.1-6
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
 
diff --git a/geoipupdate.cron b/geoipupdate.cron
deleted file mode 100644
index 0f92e43..0000000
--- a/geoipupdate.cron
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/bin/sh
-
-# This updates the IPv4 databases based on product numbers in /etc/GeoIP.conf
-geoipupdate > /dev/null
diff --git a/geoipupdate6.cron b/geoipupdate6.cron
deleted file mode 100644
index c464c83..0000000
--- a/geoipupdate6.cron
+++ /dev/null
@@ -1,45 +0,0 @@
-#!/bin/sh
-
-# Update IPv6 free databases
-
-# It would be much better if we could use geoipupdate for this as it only
-# downloads the data if it has changed and checks it after download
-
-PATH=/usr/libexec:$PATH
-
-DB_LOC=http://geolite.maxmind.com/download/geoip/database
-ASDB_LOC=http://download.maxmind.com/download/geoip/database/asnum
-
-GEOIP_DIR=/usr/share/GeoIP
-
-DATABASES="$DB_LOC/GeoIPv6.dat.gz $DB_LOC/GeoLiteCityv6-beta/GeoLiteCityv6.dat.gz $ASDB_LOC/GeoIPASNumv6.dat.gz"
-
-cd $GEOIP_DIR
-
-status=0
-
-for URL in $DATABASES; do
-    RENEW=
-
-    BASENAME=$(basename $URL .gz)
-    ONLINE=$(lastmod.pl $URL)
-
-    if [ ! -f $BASENAME || ! -f .$BASENAME.timestamp ]; then
-	RENEW=1
-    else
-	TIMESTAMP=$(cat .$BASENAME.timestamp)
-	if [ $ONLINE -gt $TIMESTAMP ]; then
-	    RENEW=1
-	fi
-    fi
-
-    if [ -n "$RENEW" ]; then
-	( wget -q -N $URL \
-	  && mv -f $BASENAME $BASENAME.old \
-	  && gunzip $BASENAME.gz \
-	  && echo $ONLINE > .$BASENAME.timestamp ) \
-	|| { status=1 ; echo "Failed to update $BASENAME" >&2 }
-    fi
-done
-
-exit $status
diff --git a/lastmod.pl b/lastmod.pl
deleted file mode 100755
index 735762a..0000000
--- a/lastmod.pl
+++ /dev/null
@@ -1,56 +0,0 @@
-#!/usr/bin/perl -w
-#===============================================================================
-#
-#         FILE: lastmod.pl
-#
-#        USAGE: lastmod.pl url
-#
-#  DESCRIPTION: Fetch an HTTP URL's HEAD and dump its Last-Modified field in
-#               local time format (e.g. seconds since the epoch).
-#
-#      OPTIONS: none
-# REQUIREMENTS: File::Basename, Net::HTTP, URI, HTTP::Headers
-#         BUGS: unknown
-#        NOTES: none
-#       AUTHOR: Philip Prindeville <philipp at fedoraproject.org>
-# ORGANIZATION: Fedora Project
-#      VERSION: 1.0
-#      CREATED: 08/06/2013 12:52:32 PM
-#     REVISION: 0
-#===============================================================================
-
-use strict;
-use warnings;
-
-use File::Basename;
-use Net::HTTP;
-use URI;
-use HTTP::Headers;
-
-if (@ARGV != 1) {
-    die "usage: " . basename($0) . " url\n";
-}
-
-my $uri = URI->new($ARGV[0]) || die "Couldn't parse URL\n";
-
-die "Not an HTTP URL\n" unless ($uri->scheme eq 'http');
-
-my $host = $uri->host() || die "No host in URL\n";
-
-my $s = Net::HTTP->new(Host => $host) || die "Can't construct Net::HTTP object\n";
-
-$s->write_request(HEAD => $uri->as_string()) || die "Can't send HEAD request\n";
-
-my ($code, $mess, %h) = $s->read_response_headers;
-
-if ($code ne '200') {
-    die "Response: " . $code . ": " . $mess . "\n";
-}
-
-my $h = HTTP::Headers->new(%h) || die "Couldn't parse headers\n";
-
-print $h->last_modified(), "\n";
-
-exit 0;
-
-# vim:ts=4
-- 
cgit v0.10.2


	http://pkgs.fedoraproject.org/cgit/GeoIP.git/commit/?h=el5&id=98cd83fa9ae10b56581f0b8675b0c61f0886e290


More information about the scm-commits mailing list