Browse Source

GeoIP packages update

Signed-off-by: webbuilder_pel7ppc64bebuilder0 <webbuilder@powerel.org>
master
webbuilder_pel7ppc64bebuilder0 6 years ago
parent
commit
7a53dee33b
  1. 4
      SOURCES/geoipupdate.cron
  2. 37
      SOURCES/geoipupdate6.cron
  3. 289
      SPECS/GeoIP-GeoLite-data.spec
  4. 378
      SPECS/GeoIP.spec
  5. 253
      SPECS/geoipupdate.spec

4
SOURCES/geoipupdate.cron

@ -0,0 +1,4 @@ @@ -0,0 +1,4 @@
#!/bin/sh

# This updates the IPv4 databases based on product numbers in /etc/GeoIP.conf
geoipupdate > /dev/null

37
SOURCES/geoipupdate6.cron

@ -0,0 +1,37 @@ @@ -0,0 +1,37 @@
#!/usr/bin/perl

# This script is based on geolite-mirror-simple.pl from Maxmind's Geo::IP perl module

use strict;
our $VERSION = '0.01';
use LWP::Simple qw/ mirror RC_NOT_MODIFIED RC_OK $ua /;
use File::Copy qw/ mv /;
use File::Spec;
use PerlIO::gzip;

# Make sure the directories exist
-d ( my $download_dir = '/usr/share/GeoIP/download' ) or die $!;
-d ( my $dest_dir = '/usr/share/GeoIP' ) or die $!;

my %mirror = ( # local-filename geolite-name
'GeoIPv6.dat.gz' => 'http://geolite.maxmind.com/download/geoip/database/GeoIPv6.dat.gz',
'GeoLiteCityv6.dat.gz' => 'http://geolite.maxmind.com/download/geoip/database/GeoLiteCityv6-beta/GeoLiteCityv6.dat.gz',
'GeoIPASNumv6.dat.gz' => 'http://download.maxmind.com/download/geoip/database/asnum/GeoIPASNumv6.dat.gz'
);

$ua->agent("geoipupdate6.cron/$VERSION");

chdir $download_dir or die $!;
for my $f ( keys %mirror ) {
my $rc = mirror( $mirror{$f}, $f );
next if $rc == RC_NOT_MODIFIED;
if ( $rc == RC_OK ) {
( my $outfile = $f ) =~ s/\.gz$//;
open my $in, '<:gzip', $f or die $!;
open my $out, '>', $outfile or die $!;
print $out $_ or die $! while <$in>;
mv( $outfile, File::Spec->catfile( $dest_dir, $outfile ) ) or die $!;
}
}
exit 0;

289
SPECS/GeoIP-GeoLite-data.spec

@ -0,0 +1,289 @@ @@ -0,0 +1,289 @@
Name: GeoIP-GeoLite-data
# The geolite databases were traditionally updated on the first Tuesday of each month,
# hence we use a versioning scheme of YYYY.MM for the Fedora package.
#
# No further releases of IPv4 GeoLite Legacy databases will be made from April 2018.
Version: 2018.06
Release: 2%{?dist}
Summary: Free GeoLite IP geolocation country database
# License specified at http://dev.maxmind.com/geoip/legacy/geolite/#License
License: CC-BY-SA
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
# 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
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
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

# Symlinks for City databases to be where upstream expects them
# (geoiplookup -v ...)
ln -sf GeoLiteCity.dat %{buildroot}%{_datadir}/GeoIP/GeoIPCity.dat
ln -sf GeoLiteCityv6.dat %{buildroot}%{_datadir}/GeoIP/GeoIPCityv6.dat

%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/GeoIPCity.dat
%{_datadir}/GeoIP/GeoIPCityv6.dat
%{_datadir}/GeoIP/GeoLiteASNumv6.dat

%changelog
* Thu Jul 12 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2018.06-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild

* Tue Jun 19 2018 Paul Howarth <paul@city-fan.org> - 2018.06-1
- IPv6 databases are still seeing updates in June 2018
- IPv4 databases are unchanged from previous release

* Wed Apr 4 2018 Paul Howarth <paul@city-fan.org> - 2018.04-1
- Final update of GeoLite Legacy databases from Maxmind

* Wed Mar 21 2018 Paul Howarth <paul@city-fan.org> - 2018.03-1
- Update to March 2018 databases

* Fri Feb 2 2018 Paul Howarth <paul@city-fan.org> - 2018.02-1
- Update to February 2018 databases

* Mon Jan 8 2018 Paul Howarth <paul@city-fan.org> - 2018.01-1
- Update to January 2018 databases

* Thu Dec 21 2017 Paul Howarth <paul@city-fan.org> - 2017.12-1
- Update to December 2017 databases

* Mon Oct 9 2017 Paul Howarth <paul@city-fan.org> - 2017.10-1
- Update to October 2017 databases

* Mon Sep 11 2017 Paul Howarth <paul@city-fan.org> - 2017.09-1
- Update to September 2017 databases

* Wed Aug 9 2017 Paul Howarth <paul@city-fan.org> - 2017.08-1
- Update to August 2017 databases

* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2017.07-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild

* Sun Jul 23 2017 Paul Howarth <paul@city-fan.org> - 2017.07-1
- Update to July 2017 databases

* Tue Jun 13 2017 Paul Howarth <paul@city-fan.org> - 2017.06-1
- Update to June 2017 databases

* Tue May 9 2017 Paul Howarth <paul@city-fan.org> - 2017.05-1
- Update to May 2017 databases

* Wed Apr 5 2017 Paul Howarth <paul@city-fan.org> - 2017.04-1
- Update to April 2017 databases
- Drop EL-5 support as it's now EOL

* Fri Mar 10 2017 Paul Howarth <paul@city-fan.org> - 2017.03-1
- Update to March 2017 databases

* Thu Feb 9 2017 Paul Howarth <paul@city-fan.org> - 2017.02-1
- Update to February 2017 databases

* Tue Jan 17 2017 Paul Howarth <paul@city-fan.org> - 2017.01-1
- Update to January 2017 databases

* Tue Dec 6 2016 Paul Howarth <paul@city-fan.org> - 2016.12-1
- Update to December 2016 databases

* Fri Nov 25 2016 Paul Howarth <paul@city-fan.org> - 2016.11-1
- Update to November 2016 databases

* Thu Oct 13 2016 Paul Howarth <paul@city-fan.org> - 2016.10-1
- Update to October 2016 databases

* Tue Sep 6 2016 Paul Howarth <paul@city-fan.org> - 2016.09-1
- Update to September 2016 databases

* Fri Aug 5 2016 Paul Howarth <paul@city-fan.org> - 2016.08-1
- Update to August 2016 databases

* Mon Jul 11 2016 Paul Howarth <paul@city-fan.org> - 2016.07-1
- Update to July 2016 databases

* Tue Jun 21 2016 Paul Howarth <paul@city-fan.org> - 2016.06-1
- Update to June 2016 databases

* Mon May 9 2016 Paul Howarth <paul@city-fan.org> - 2016.05-1
- Update to May 2016 databases

* Wed Apr 6 2016 Paul Howarth <paul@city-fan.org> - 2016.04-1
- Update to April 2016 databases

* Tue Mar 8 2016 Paul Howarth <paul@city-fan.org> - 2016.03-1
- Update to March 2016 databases

* Tue Feb 23 2016 Paul Howarth <paul@city-fan.org> - 2016.02-1
- Update to February 2016 databases

* Wed Feb 03 2016 Fedora Release Engineering <releng@fedoraproject.org> - 2016.01-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild

* Fri Jan 22 2016 Paul Howarth <paul@city-fan.org> - 2016.01-1
- Update to January 2016 databases

* Fri Dec 11 2015 Paul Howarth <paul@city-fan.org> - 2015.12-1
- Update to December 2015 databases

* Mon Nov 9 2015 Paul Howarth <paul@city-fan.org> - 2015.11-1
- Update to November 2015 databases

* Wed Sep 9 2015 Paul Howarth <paul@city-fan.org> - 2015.09-1
- Update to September 2015 databases

* Tue Aug 18 2015 Paul Howarth <paul@city-fan.org> - 2015.08-1
- Update to August 2015 databases

* Wed Jul 8 2015 Paul Howarth <paul@city-fan.org> - 2015.07-1
- Update to July 2015 databases

* Tue Jun 16 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2015.06-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild

* Sun Jun 14 2015 Paul Howarth <paul@city-fan.org> - 2015.06-1
- Update to June 2015 databases

* Tue May 12 2015 Paul Howarth <paul@city-fan.org> - 2015.05-1
- Update to May 2015 databases

* Mon Apr 27 2015 Paul Howarth <paul@city-fan.org> - 2015.04-2
- Add symlinks for City databases to be where upstream expects them
(thanks to nucleo for the suggestion in #1194798)

* Sun Apr 12 2015 Paul Howarth <paul@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@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@city-fan.org> - 2015.03-1
- Update to March 2015 databases

* Fri Feb 20 2015 Paul Howarth <paul@city-fan.org> - 2015.02-1
- Databases unbundled from GeoIP, like the old geoip-geolite package

378
SPECS/GeoIP.spec

@ -0,0 +1,378 @@ @@ -0,0 +1,378 @@
# Tests require network access so fail in koji; build using --with tests to run them yourself
%bcond_with tests

Name: GeoIP
Version: 1.6.12
Release: 4%{?dist}
Summary: Library for country/city/organization to IP address or hostname mapping
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
BuildRequires: coreutils
BuildRequires: gcc
BuildRequires: make
BuildRequires: sed
BuildRequires: zlib-devel
Requires: GeoIP-data

# For compatibility with original release of GeoIP in old distributions
%if 0%{?fedora} < 22 && 0%{?rhel} < 8
Requires: geoipupdate
%endif

# Old name of GeoIP library package
Obsoletes: geoip < %{version}-%{release}
Provides: geoip = %{version}-%{release}

%description
GeoIP is a C library that enables the user to find the country that any IP
address or hostname originates from.

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 devel
Summary: Development headers and libraries for GeoIP
Requires: %{name} = %{version}-%{release}
Provides: geoip-devel = %{version}-%{release}
Obsoletes: geoip-devel < %{version}-%{release}

%description devel
Development headers and static libraries for building GeoIP-based applications.

%prep
%setup -q

%build
%configure --disable-static --disable-dependency-tracking

# Kill bogus rpaths
sed -i -e 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' \
-e 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool

make %{?_smp_mflags}

%install
make DESTDIR=%{buildroot} INSTALL="install -p" install

# nix the stuff we don't need like .la files.
rm -f %{buildroot}%{_libdir}/*.la

%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}

%ldconfig_scriptlets

%files
%if 0%{?_licensedir:1}
%license COPYING
%else
%doc COPYING
%endif
%doc AUTHORS ChangeLog NEWS.md README.md
%{_bindir}/geoiplookup
%{_bindir}/geoiplookup6
%{_libdir}/libGeoIP.so.1
%{_libdir}/libGeoIP.so.1.*
%{_mandir}/man1/geoiplookup.1*
%{_mandir}/man1/geoiplookup6.1*

%files devel
%{_includedir}/GeoIP.h
%{_includedir}/GeoIPCity.h
%{_libdir}/libGeoIP.so
%{_libdir}/pkgconfig/geoip.pc

%changelog
* Thu Jul 12 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.6.12-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild

* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.6.12-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild

* Sat Feb 03 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 1.6.12-2
- Switch to %%ldconfig_scriptlets

* Thu Jan 18 2018 Paul Howarth <paul@city-fan.org> - 1.6.12-1
- Update to 1.6.12
- Populate metro and area code when performing lookups in IPv6 City
databases; previously this was only done when using IPv4 City
databases

* Wed Aug 02 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.6.11-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild

* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.6.11-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild

* Tue May 16 2017 Paul Howarth <paul@city-fan.org> - 1.6.11-1
- Update to 1.6.11
- Fix use of a NULL pointer when opening a corrupt database with 'GeoIP_open'
(GH#87)
- Drop EL-5 support
- Drop redundant BuildRoot: and Group: tags
- Drop EL5-only dependency on GeoIP-GeoLite-data
- Drop explicit pkgconfig dependency in devel package
- Drop buildroot cleaning in %%install section
- Drop explicit %%clean section

* Thu Mar 30 2017 Paul Howarth <paul@city-fan.org> - 1.6.10-1
- Update to 1.6.10
- GeoIP_database_info now returns the full version string rather than
incorrectly truncating it (GH#79)
- This API is now distributed with a small test copy of GeoIP.dat rather than
a full copy
- Fix issue where Visual Studio 2015 was optimizing out initialization code
(GH#81)
- Fix test/benchmark on Windows (GH#75)

* Sun Feb 26 2017 Paul Howarth <paul@city-fan.org> - 1.6.9-4
- Fix GeoIP_database_info truncation issue (#1426853, GH#79, GH#80)

* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.6.9-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild

* Wed Feb 03 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1.6.9-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild

* Tue Jan 12 2016 Paul Howarth <paul@city-fan.org> - 1.6.9-1
- Update to 1.6.9
- Allow compilation on older systems by relaxing the autoconf and automake
minimum versions
- Avoid potential problems in multi-threaded environments by consistently
using pread() rather than read()
- Fix various small issues reported by clang's static analyser
- Fix a regression introduced in version 1.6.8, which caused
GeoIP_database_info to erroneously return NULL

* Sun Nov 1 2015 Paul Howarth <paul@city-fan.org> - 1.6.7-1
- Update to 1.6.7
- Fixed a MSVC parser stack overflow when parsing 'regionName.c' and
'timeZone.c' (GH#54)
- Updated region codes and timezones
- When using 'GEOIP_MEMORY_CACHE' with an invalid database file, the search
tree traversal could attempt to read memory outside of the memory allocated
for the memory cache, resulting in a segmentation fault; a check was added
to ensure that the traversal code does not try to read beyond the end of
the file, whether in memory, memory mapped, or on disk
- Previously the return values from file reads were ignored; we now check
these values to ensure that there were no errors

* Thu Jul 30 2015 Paul Howarth <paul@city-fan.org> - 1.6.6-1
- Update to 1.6.6
- Replaced usage of deprecated fileno, read, and lseek on Visual Studio 2005+
with their ISO C++ conformant replacements (GH#55)
- A warning about using a double as a float was fixed (GH#56)
- Fixed segfault when doing a lookup on an empty database (GH#62)
- Fixed a memcheck error from valgrind in the '_check_mtime' function (GH#60)
- Fixed '_check_mtime' to check the return value of 'gettimeofday' rather
than just assuming it worked

* Tue Jun 16 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.6.5-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild

* Thu Apr 23 2015 Paul Howarth <paul@city-fan.org> - 1.6.5-2
- Work around problems with old GeoIP-data package in CentOS 5 Extras
repo (http://bugs.centos.org/view.php?id=8488) by requiring
GeoIP-GeoLite-data rather than the virtual GeoIP-data for EL-5 builds only

* Mon Mar 2 2015 Paul Howarth <paul@city-fan.org> - 1.6.5-1
- Update to 1.6.5
- Fixed a segmentation fault in geoiplookup when the utility was passed an
invalid database (#1180874)
- Additional validation was added for the size used in the creation of the
index cache (#832913)
- Changed the code to only look up country codes by using functions that
ensure that we do not try to look past the end of an array (GitHub #53)

* Fri Feb 20 2015 Paul Howarth <paul@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@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

* Fri Feb 6 2015 Paul Howarth <paul@city-fan.org> - 1.6.4-2
- Only require geoipupdate prior to F-22, for back-compatibility
- Use %%license where possible
- GeoIP-devel provides geoip-devel as well as obsoleting it
- Update bundled databases

* Thu Jan 29 2015 Philip Prindeville <philipp@fedoraproject.org> - 1.6.4-1
- Require geoipupdate per Paul

* Tue Jan 20 2015 Philip Prindeville <philipp@fedoraproject.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@lists.fedoraproject.org> - 1.5.1-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild

* Fri Jun 06 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.5.1-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild

* Tue Feb 25 2014 Paul Howarth <paul@city-fan.org> - 1.5.1-4
- Add %%check, so we can run tests by building using --with tests
- Update databases from upstream

* Fri Aug 02 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.5.1-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild

* Tue Jun 18 2013 Paul Howarth <paul@city-fan.org> - 1.5.1-2
- Properly provide all of the GeoLite databases and their IPv6 equivalents, as
per the geoip-geolite package that we're obsoleting/providing
- Provide compatibility symlinks for database files that historically had
different names in GeoIP and geoip-geolite
- Don't distribute unbundled LICENSE files, as per packaging guidelines
- Update license tag to reflect distribution of CC-BY-SA database content
- No longer try to update the databases in %%post
- Maintain timestamps where possible
- Set up GeoIP.dat symlink in package and don't touch it again
- Add update6 package to update the IPv6 databases; have to use wget for this
rather than geoipupdate as the databases are still in beta

* Wed Jun 12 2013 Philip Prindeville <philipp@fedoraproject.org> - 1.5.1-1
- Bump to version 1.5.1
- Fix exit codes for various situations (MaxMind support #129155)
- Use versioned obsoletes/provides for geoip-geolite
- Update UTF8 patch
- Change symlink from GeoIP-initial.dat to GeoLiteCountry.dat if we had a
successful download and now have the latter file.

* Mon Jun 10 2013 Philip Prindeville <philipp@fedoraproject.org> - 1.5.0-7
- Annotate conflict with geoip-geolite package (#968074)

* Mon Jun 10 2013 Paul Howarth <paul@city-fan.org> - 1.5.0-6
- Update sub-package requires main package for geoipupdate script

* Sat Jun 8 2013 Paul Howarth <paul@city-fan.org> - 1.5.0-5
- Make GeoIP.dat -> GeoIP-initial.dat symlink in %%install, not %%post,
and don't %%ghost it
- Run geoipupdate silently in %%post and cron job
- Create empty database files for %%ghost to work with old rpm versions
- Don't try to use noarch subpackages on old rpm versions
- Update %%description to mention database updates
- Drop outdated README.Fedora

* Sat Jun 08 2013 Philip Prindeville <philipp@fedoraproject.org> - 1.5.0-4
- Revert ability to replace 3rd-party package

* Fri Jun 07 2013 Philip Prindeville <philipp@fedoraproject.org> - 1.5.0-3
- Add attributes for %%ghost files

* Fri Jun 07 2013 Philip Prindeville <philipp@fedoraproject.org> - 1.5.0-2
- Make update subpackage be noarch.

* Fri Jun 07 2013 Philip Prindeville <philipp@fedoraproject.org> - 1.5.0-1
- Version bump to 1.5.0
- Have GeoIP.dat be a symlink to the real data, and install the canned
GeoIP.dat as GeoIP-initial.dat
- Change config as per Boris' instructions to use 'lite' databases which are
regularly updated.
- Add pkgconfig (.pc) file into devel subpackage
- Add cron support for refreshing the lite databases and make a separate
subpackage.

* Sun Mar 24 2013 Paul Howarth <paul@city-fan.org> - 1.4.8-6
- Fix config.guess and config.sub to add aarch64 support (#925403)

* Wed Feb 13 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.4.8-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild

* Mon Oct 22 2012 Paul Howarth <paul@city-fan.org> - 1.4.8-4
- libGeoIPUpdate and geoipupdate (which is linked against it) are GPL-licensed
rather than LGPL-licensed (#840896)
- Don't package generic INSTALL file (#661625)
- Kill bogus rpaths on x86_64
- Hardcode library sonames in %%files list to avoid nasty surprises in the
future
- Drop %%defattr, redundant since rpm 4.4
- Recode docs as UTF-8
- Don't use macros for commands
- Use tabs

* Wed Jul 18 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.4.8-3.1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild

* Thu Jan 12 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.4.8-2.1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild

* Tue Sep 6 2011 Michael Fleming <mfleming+rpm@thatfleminggent.com> - 1.4.8-1.1
- Remove -ipv6 patch
- Bump to 1.4.8 release

* Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.4.7-0.2.20090931cvs
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild

* Mon Aug 31 2009 Matt Domsch <mdomsch@fedoraproject.org> - 1.4.7.0.1.20090931
- apply CVS HEAD 20090931 which includes IPv6 functions

* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.4.6-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild

* Sun Mar 08 2009 Michael Fleming <mfleming+rpm@enlartenment.com> - 1.4.6-1
- Add geoiplookup6 man page
- Update to 1.4.6

* Mon Feb 23 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.4.5-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild

* Sat Nov 29 2008 Michael Fleming <mfleming+rpm@enlartenment.com> 1.4.5-2
- Update to 1.4.5
- Fix database URL locations in Perl helper scripts

* Tue Feb 19 2008 Fedora Release Engineering <rel-eng@fedoraproject.org> - 1.4.4-2
- Autorebuild for GCC 4.3

* Mon Jan 28 2008 Michael Fleming <mfleming+rpm@enlartenment.com> 1.4.4-1
- New upstream release.

* Wed Sep 5 2007 Michael Fleming <mfleming+rpm@enlartenment.com> 1.4.3-1
- New upstream release.
- Fix GeoIPCity fetcher script
- Update License tag

* Mon Feb 12 2007 Michael Fleming <mfleming+rpm@enlartenment.com> 1.4.2-1
- New upstream release.

* Mon Jan 8 2007 Michael Fleming <mfleming+rpm@enlartenment.com> 1.4.1-2
- License is actually LGPL now.

* Sun Jan 7 2007 Michael Fleming <mfleming+rpm@enlartenment.com> 1.4.1-1
- New upstream release
- Add fetch-geoipdata* scripts to pull free databases automatically if
desired (bz #198137)
- README.fedora added to briefly explain above.

* Mon Nov 27 2006 Michael Fleming <mfleming+rpm@enlartenment.com> 1.4.0-4
- Fix %%install scripts to satisfy newer mock builds

* Sun Sep 3 2006 Michael Fleming <mfleming+rpm@enlartenment.com> 1.4.0-3
- Upstream upgrade
- Added LICENSE.txt file to %%doc, covering GeoIP country/city data license
(bz #198137)

* Mon May 15 2006 Michael Fleming <mfleming+rpm@enlartenment.com> 1.3.17-1
- New upstream release (minor fixes)

* Mon May 1 2006 Michael Fleming <mfleming+rpm@enlartenment.com> 1.3.16-1
- New upstream release
- Add INSTALL document to package.

* Sat Feb 18 2006 Michael Fleming <mfleming+rpm@enlartenment.com> 1.3.14-3
- Fix Obsoletes/Provides for old "geoip"-convention packages
- Move .so symlinks to -devel where they should be

* Fri Feb 10 2006 Michael Fleming <mfleming+rpm@enlartenment.com> 1.3.14-2
- Remamed to match upstream tarball name
- Removed static libraries
- Added symlinks to packages
- Mark config file noreplace

* Sun Feb 5 2006 Michael Fleming <mfleming+rpm@enlartenment.com> 1.3.14-1
- Initial review package for Extras

253
SPECS/geoipupdate.spec

@ -0,0 +1,253 @@ @@ -0,0 +1,253 @@
%global _hardened_build 1

Name: geoipupdate
Version: 3.1.0
Release: 1%{?dist}
Summary: Update GeoIP2 and GeoIP Legacy binary databases from MaxMind
License: GPLv2
URL: http://dev.maxmind.com/geoip/geoipupdate/
Source0: http://github.com/maxmind/geoipupdate/releases/download/v%{version}/geoipupdate-%{version}.tar.gz
Source1: geoipupdate.cron
Source2: geoipupdate6.cron
BuildRequires: coreutils
BuildRequires: gcc
BuildRequires: libcurl-devel
BuildRequires: make
BuildRequires: zlib-devel
# Perl modules used by IPv6 cron script
BuildRequires: perl-generators
BuildRequires: perl(File::Copy)
BuildRequires: perl(File::Spec)
BuildRequires: perl(LWP::Simple)
BuildRequires: perl(PerlIO::gzip)
BuildRequires: perl(strict)

%description
The GeoIP Update program performs automatic updates of GeoIP2 and GeoIP
Legacy binary databases.

%package cron
Summary: Cron job to do weekly updates of GeoIP databases
BuildArch: noarch
Requires: %{name} = %{version}-%{release}
Requires: crontabs
Obsoletes: GeoIP-update < 1.6.0
Provides: GeoIP-update = 1.6.0

%description cron
Cron job for weekly updates to GeoIP Legacy database from MaxMind.

%package cron6
Summary: Cron job to do weekly updates of GeoIP IPv6 databases
BuildArch: noarch
Requires: %{name} = %{version}-%{release}
Requires: crontabs
Requires: wget
Obsoletes: GeoIP-update6 < 1.6.0
Provides: GeoIP-update6 = 1.6.0

%description cron6
Cron job for weekly updates to GeoIP IPv6 Legacy database from MaxMind.

%prep
%setup -q

%build
%configure --disable-static --disable-dependency-tracking
make %{?_smp_mflags}

%install
make install DESTDIR=%{buildroot}

# We'll package the documentation ourselves
rm -rf %{buildroot}%{_datadir}/doc/geoipupdate

# Fix up the config file to have geoipupdate fetch the free legacy databases by default
sed -i -e 's/^\(ProductIds\) .*$/\1 506 517 533/' \
%{buildroot}%{_sysconfdir}/GeoIP.conf

install -D -m 755 %{SOURCE1} %{buildroot}%{_sysconfdir}/cron.weekly/geoipupdate
install -D -m 755 %{SOURCE2} %{buildroot}%{_sysconfdir}/cron.weekly/geoipupdate6

# Make the download directory for the IPv6 data cron job and some ghost files
mkdir -p %{buildroot}%{_datadir}/GeoIP/download/
: > %{buildroot}%{_datadir}/GeoIP/download/GeoIPv6.dat.gz
: > %{buildroot}%{_datadir}/GeoIP/download/GeoLiteCityv6.dat.gz
: > %{buildroot}%{_datadir}/GeoIP/download/GeoIPASNumv6.dat.gz

%files
%if 0%{?_licensedir:1}
%license LICENSE
%else
%doc LICENSE
%endif
%doc conf/GeoIP.conf.default README.md ChangeLog.md
%config(noreplace) %{_sysconfdir}/GeoIP.conf
%{_bindir}/geoipupdate
%{_mandir}/man1/geoipupdate.1*
%{_mandir}/man5/GeoIP.conf.5*

%files cron
%config(noreplace) %{_sysconfdir}/cron.weekly/geoipupdate

%files cron6
%config(noreplace) %{_sysconfdir}/cron.weekly/geoipupdate6
%dir %{_datadir}/GeoIP/
%dir %{_datadir}/GeoIP/download/
%ghost %{_datadir}/GeoIP/download/GeoIPv6.dat.gz
%ghost %{_datadir}/GeoIP/download/GeoLiteCityv6.dat.gz
%ghost %{_datadir}/GeoIP/download/GeoIPASNumv6.dat.gz

%changelog
* Fri Aug 17 2018 Paul Howarth <paul@city-fan.org> - 3.1.0-1
- Update to 3.1.0
Changes in version 3.0.0:
- BREAKING CHANGE: When downloading the free databases without a MaxMind
account, you must either not have 'AccountID', 'UserId', or 'LicenseKey'
set in your configuration file or they must be set to the zero values
previously recommended in our documentation; any other value will cause an
authorization error
- BREAKING CHANGE: The configuration options 'Protocol',
'SkipPeerVerification', and `SkipHostnameVerification` are no longer
supported; if they are present in the configuration file, they will be
ignored - HTTPS with peer and hostname verification will be used on all
requests
- BREAKING CHANGE: The configuration file must have the 'AccountID' or the
deprecated 'UserId' when downloading a paid database; previously, when
downloading the GeoIP Legacy Country database, you were able to only
provide the 'LicenseKey'
- IMPORTANT: 'geoipupdate-pureperl.pl' has been removed and will no longer be
distributed with 'geoipupdate'; this Perl script had known issues and did
not have feature parity with the C implementation
- This program no longer uses the following endpoints:
'/app/update_getipaddr', '/app/update', and '/app/update_secure';
'/geoip/databases/{edition_id}/update' is now used instead
- Fixed issue in 'gu_strnlen()' dereferencing a pointer before checking that
it was in array bounds
- We now update the default GeoIP.conf during installation so that directory
paths match build parameters; previously this config always said the data
directory was under /usr/local/share which was not always accurate
- Improve the error checking and display the underlying reason for the error
when possible (GH#82)
- Document that the 'LockFile' is not removed from the filesystem after a
successful exit from the program (GH#79)
- Make default configuration directory agree with default installation
directory
Changes in version 3.0.1:
- When there were no updates available, 3.0.0 incorrectly returned an exit
code of 1 instead of 0; this release reverts to the pre-3.0.0 behavior,
returning an exit code of 0 in this case
Changes in version 3.1.0:
- This version restores the ability to use the 'AccountID'/'UserId' 999999
along with an all-zero license key when downloading free databases;
however, the use of this combination is not recommended and may break in
future versions
- When printing verbose output, only the first four characters of the
'LicenseKey' will now be displayed

* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.5.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild

* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.5.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild

* Tue Oct 31 2017 Paul Howarth <paul@city-fan.org> - 2.5.0-1
- Update to 2.5.0
- Replace use of strnlen() due to lack of universal availability (GH#71)
- Document the 'LockFile' option in the 'GeoIP.conf' man page (GH#64)
- Remove unused base64 library (GH#68)
- Add the new configuration option 'PreserveFileTimes'; if set, the
downloaded files will get the same modification times as their original on
the server (default is '0') (GH#63)
- Use the correct types when calling 'curl_easy_setopt()'; this fixes
warnings generated by libcurl's 'typecheck-gcc.h' (GH#61)
- In 'GeoIP.conf', the 'UserId' option was renamed to 'AccountID' and the
'ProductIds' option was renamed to 'EditionIDs'; the old options will
continue to work, but upgrading to the new names is recommended for
forward compatibility

* Wed Aug 02 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.4.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild

* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.4.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild

* Fri May 26 2017 Paul Howarth <paul@city-fan.org> - 2.4.0-1
- Update to 2.4.0
- geoipupdate now checks that the database directory is writable: if it is
not, it reports the problem and aborts
- geoipupdate now acquires a lock when starting up to ensure only one
instance may run at a time: a new option, 'LockFile', exists to set the
file to use as a lock ('.geoipupdate.lock' in the database directory by
default)
- geoipupdate now prints out additional information from the server when a
download request results in something other than HTTP status 2xx; this
provides more information when the API does not respond with a database
file
- ${datarootdir}/GeoIP is now created on 'make install' (GH#29)
- Previously, a variable named 'ERROR' was used, which caused issues building
on Windows (GH#36)
- Drop EL-5 support
- Drop BuildRoot: and Group: tags
- Drop explicit buildroot cleaning in %%install section
- Drop explicit %%clean section
- noarch subpackages always available now
- libcurl-devel always available now

* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.3.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild

* Thu Jan 5 2017 Paul Howarth <paul@city-fan.org> - 2.3.1-1
- Update to 2.3.1
- geoipupdate now uses TCP keep-alive when compiled with cURL 7.25 or
greater
- Previously, on an invalid gzip file, geoipupdate would output binary data
to stderr; it now displays an appropriate error message
- Install README, ChangeLog, GeoIP.conf.default etc. into docdir (GH#33)
- $(sysconfdir) is now created if it doesn't exist (GH#33)
- The sample config file is now usable (GH#33)

* Wed Feb 03 2016 Fedora Release Engineering <releng@fedoraproject.org> - 2.2.2-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild

* Fri Jan 22 2016 Paul Howarth <paul@city-fan.org> - 2.2.2-1
- Update to 2.2.2
- geoipupdate now calls fsync on the database directory after a rename to
make it durable in the event of a crash
- Update autotools patch

* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.2.1-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild

* Mon Apr 13 2015 Paul Howarth <paul@city-fan.org> - 2.2.1-2
- Split patch for upstream issue #26 into separate patches for upstream changes
and effect of running autotools

* Wed Mar 4 2015 Philip A. Prindeville <philipp@fedoraproject.org> - 2.2.1-1
- Update to 2.2.1
- geoipupdate now verifies the MD5 of the new database before deploying it;
if the database MD5 does not match the expected MD5, geoipupdate will exit
with an error
- The copy of 'base64.c' and 'base64.h' was switched to a version under
GPLv2+ to prevent a license conflict
- The 'LICENSE' file was added to the distribution
- Several issues in the documentation were fixed
- Use interim fix for upstream issue #26 until it's accepted:
https://github.com/maxmind/geoipupdate/issues/26
- Add buildroot and clean, BR: curl-devel rather than libcurl-devel for
EL-5 compatibility

* Tue Feb 10 2015 Paul Howarth <paul@city-fan.org> - 2.1.0-4
- New geoipupdate6 cron script written in Perl that doesn't download the data
if it hasn't changed

* Fri Feb 6 2015 Paul Howarth <paul@city-fan.org> - 2.1.0-3
- Add cron6 subpackage, equivalent to old GeoIP-update6 package
- Revise obsoletes/provides

* Sun Feb 1 2015 Philip A. Prindeville <philipp@fedoraproject.org> - 2.1.0-2
- Remove architecture-specific dependency in noarch subpackage

* Mon Jan 26 2015 Philip A. Prindeville <philipp@fedoraproject.org> - 2.1.0-1
- Initial review package (generated by rpmdev-newspec)

Loading…
Cancel
Save