Blame SPECS/geoipupdate.spec

1f59a1
%global _hardened_build 1
1f59a1
1f59a1
Name:		geoipupdate
1f59a1
Version:	2.5.0
1f59a1
Release:	2%{?dist}
1f59a1
Summary:	Update GeoIP2 and GeoIP Legacy binary databases from MaxMind
1f59a1
License:	GPLv2
1f59a1
URL:		http://dev.maxmind.com/geoip/geoipupdate/
1f59a1
Source0:	http://github.com/maxmind/geoipupdate/releases/download/v%{version}/geoipupdate-%{version}.tar.gz
1f59a1
Source1:	geoipupdate.cron
1f59a1
Source2:	geoipupdate6.cron
1f59a1
BuildRequires:	coreutils
1f59a1
BuildRequires:	gcc
1f59a1
BuildRequires:	libcurl-devel
1f59a1
BuildRequires:	make
1f59a1
BuildRequires:	zlib-devel
1f59a1
# Perl modules used by IPv6 cron script
1f59a1
BuildRequires:	perl-generators
1f59a1
BuildRequires:	perl(File::Copy)
1f59a1
BuildRequires:	perl(File::Spec)
1f59a1
BuildRequires:	perl(LWP::Simple)
1f59a1
BuildRequires:	perl(PerlIO::gzip)
1f59a1
BuildRequires:	perl(strict)
1f59a1
1f59a1
%description
1f59a1
The GeoIP Update program performs automatic updates of GeoIP2 and GeoIP
1f59a1
Legacy binary databases.
1f59a1
1f59a1
%package cron
1f59a1
Summary:	Cron job to do weekly updates of GeoIP databases
1f59a1
BuildArch:	noarch
1f59a1
Requires:	%{name} = %{version}-%{release}
1f59a1
Requires:	crontabs
1f59a1
Obsoletes:	GeoIP-update < 1.6.0
1f59a1
Provides:	GeoIP-update = 1.6.0
1f59a1
1f59a1
%description cron
1f59a1
Cron job for weekly updates to GeoIP Legacy database from MaxMind.
1f59a1
1f59a1
%package cron6
1f59a1
Summary:	Cron job to do weekly updates of GeoIP IPv6 databases
1f59a1
BuildArch:	noarch
1f59a1
Requires:	%{name} = %{version}-%{release}
1f59a1
Requires:	crontabs
1f59a1
Requires:	wget
1f59a1
Obsoletes:	GeoIP-update6 < 1.6.0
1f59a1
Provides:	GeoIP-update6 = 1.6.0
1f59a1
1f59a1
%description cron6
1f59a1
Cron job for weekly updates to GeoIP IPv6 Legacy database from MaxMind.
1f59a1
1f59a1
%prep
1f59a1
%setup -q
1f59a1
1f59a1
%build
1f59a1
%configure --disable-static --disable-dependency-tracking
1f59a1
make %{?_smp_mflags}
1f59a1
1f59a1
%install
1f59a1
make install DESTDIR=%{buildroot}
1f59a1
1f59a1
# We'll package the documentation ourselves
1f59a1
rm -rf %{buildroot}%{_datadir}/doc/geoipupdate
1f59a1
1f59a1
# Fix up the config file to have geoipupdate fetch the free legacy databases by default
1f59a1
sed -i -e 's/^\(ProductIds\) .*$/\1 506 517 533/' \
1f59a1
	%{buildroot}%{_sysconfdir}/GeoIP.conf
1f59a1
1f59a1
install -D -m 755 %{SOURCE1} %{buildroot}%{_sysconfdir}/cron.weekly/geoipupdate
1f59a1
install -D -m 755 %{SOURCE2} %{buildroot}%{_sysconfdir}/cron.weekly/geoipupdate6
1f59a1
1f59a1
# Make the download directory for the IPv6 data cron job and some ghost files
1f59a1
mkdir -p %{buildroot}%{_datadir}/GeoIP/download/
1f59a1
: > %{buildroot}%{_datadir}/GeoIP/download/GeoIPv6.dat.gz
1f59a1
: > %{buildroot}%{_datadir}/GeoIP/download/GeoLiteCityv6.dat.gz
1f59a1
: > %{buildroot}%{_datadir}/GeoIP/download/GeoIPASNumv6.dat.gz
1f59a1
1f59a1
%files
1f59a1
%if 0%{?_licensedir:1}
1f59a1
%license LICENSE
1f59a1
%else
1f59a1
%doc LICENSE
1f59a1
%endif
1f59a1
%doc conf/GeoIP.conf.default README.md ChangeLog.md
1f59a1
%config(noreplace) %{_sysconfdir}/GeoIP.conf
1f59a1
%{_bindir}/geoipupdate
1f59a1
%{_mandir}/man1/geoipupdate.1*
1f59a1
%{_mandir}/man5/GeoIP.conf.5*
1f59a1
1f59a1
%files cron
1f59a1
%config(noreplace) %{_sysconfdir}/cron.weekly/geoipupdate
1f59a1
1f59a1
%files cron6
1f59a1
%config(noreplace) %{_sysconfdir}/cron.weekly/geoipupdate6
1f59a1
%dir %{_datadir}/GeoIP/
1f59a1
%dir %{_datadir}/GeoIP/download/
1f59a1
%ghost %{_datadir}/GeoIP/download/GeoIPv6.dat.gz
1f59a1
%ghost %{_datadir}/GeoIP/download/GeoLiteCityv6.dat.gz
1f59a1
%ghost %{_datadir}/GeoIP/download/GeoIPASNumv6.dat.gz
1f59a1
1f59a1
%changelog
1f59a1
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.5.0-2
1f59a1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
1f59a1
1f59a1
* Tue Oct 31 2017 Paul Howarth <paul@city-fan.org> - 2.5.0-1
1f59a1
- Update to 2.5.0
1f59a1
  - Replace use of strnlen() due to lack of universal availability (GH#71)
1f59a1
  - Document the 'LockFile' option in the 'GeoIP.conf' man page (GH#64)
1f59a1
  - Remove unused base64 library (GH#68)
1f59a1
  - Add the new configuration option 'PreserveFileTimes'; if set, the
1f59a1
    downloaded files will get the same modification times as their original on
1f59a1
    the server (default is '0') (GH#63)
1f59a1
  - Use the correct types when calling 'curl_easy_setopt()'; this fixes
1f59a1
    warnings generated by libcurl's 'typecheck-gcc.h' (GH#61)
1f59a1
  - In 'GeoIP.conf', the 'UserId' option was renamed to 'AccountID' and the
1f59a1
    'ProductIds' option was renamed to 'EditionIDs'; the old options will
1f59a1
    continue to work, but upgrading to the new names is recommended for
1f59a1
    forward compatibility
1f59a1
1f59a1
* Wed Aug 02 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.4.0-3
1f59a1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
1f59a1
1f59a1
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.4.0-2
1f59a1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
1f59a1
1f59a1
* Fri May 26 2017 Paul Howarth <paul@city-fan.org> - 2.4.0-1
1f59a1
- Update to 2.4.0
1f59a1
  - geoipupdate now checks that the database directory is writable: if it is
1f59a1
    not, it reports the problem and aborts
1f59a1
  - geoipupdate now acquires a lock when starting up to ensure only one
1f59a1
    instance may run at a time: a new option, 'LockFile', exists to set the
1f59a1
    file to use as a lock ('.geoipupdate.lock' in the database directory by
1f59a1
    default)
1f59a1
  - geoipupdate now prints out additional information from the server when a
1f59a1
    download request results in something other than HTTP status 2xx; this
1f59a1
    provides more information when the API does not respond with a database
1f59a1
    file
1f59a1
  - ${datarootdir}/GeoIP is now created on 'make install' (GH#29)
1f59a1
  - Previously, a variable named 'ERROR' was used, which caused issues building
1f59a1
    on Windows (GH#36)
1f59a1
- Drop EL-5 support
1f59a1
  - Drop BuildRoot: and Group: tags
1f59a1
  - Drop explicit buildroot cleaning in %%install section
1f59a1
  - Drop explicit %%clean section
1f59a1
  - noarch subpackages always available now
1f59a1
  - libcurl-devel always available now
1f59a1
1f59a1
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.3.1-2
1f59a1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
1f59a1
1f59a1
* Thu Jan  5 2017 Paul Howarth <paul@city-fan.org> - 2.3.1-1
1f59a1
- Update to 2.3.1
1f59a1
  - geoipupdate now uses TCP keep-alive when compiled with cURL 7.25 or
1f59a1
    greater
1f59a1
  - Previously, on an invalid gzip file, geoipupdate would output binary data
1f59a1
    to stderr; it now displays an appropriate error message
1f59a1
  - Install README, ChangeLog, GeoIP.conf.default etc. into docdir (GH#33)
1f59a1
  - $(sysconfdir) is now created if it doesn't exist (GH#33)
1f59a1
  - The sample config file is now usable (GH#33)
1f59a1
1f59a1
* Wed Feb 03 2016 Fedora Release Engineering <releng@fedoraproject.org> - 2.2.2-2
1f59a1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
1f59a1
1f59a1
* Fri Jan 22 2016 Paul Howarth <paul@city-fan.org> - 2.2.2-1
1f59a1
- Update to 2.2.2
1f59a1
  - geoipupdate now calls fsync on the database directory after a rename to
1f59a1
    make it durable in the event of a crash
1f59a1
- Update autotools patch
1f59a1
1f59a1
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.2.1-3
1f59a1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
1f59a1
1f59a1
* Mon Apr 13 2015 Paul Howarth <paul@city-fan.org> - 2.2.1-2
1f59a1
- Split patch for upstream issue #26 into separate patches for upstream changes
1f59a1
  and effect of running autotools
1f59a1
1f59a1
* Wed Mar  4 2015 Philip A. Prindeville <philipp@fedoraproject.org> - 2.2.1-1
1f59a1
- Update to 2.2.1
1f59a1
  - geoipupdate now verifies the MD5 of the new database before deploying it;
1f59a1
    if the database MD5 does not match the expected MD5, geoipupdate will exit
1f59a1
    with an error
1f59a1
  - The copy of 'base64.c' and 'base64.h' was switched to a version under
1f59a1
    GPLv2+ to prevent a license conflict
1f59a1
  - The 'LICENSE' file was added to the distribution
1f59a1
  - Several issues in the documentation were fixed
1f59a1
- Use interim fix for upstream issue #26 until it's accepted:
1f59a1
  https://github.com/maxmind/geoipupdate/issues/26
1f59a1
- Add buildroot and clean, BR: curl-devel rather than libcurl-devel for
1f59a1
  EL-5 compatibility
1f59a1
1f59a1
* Tue Feb 10 2015 Paul Howarth <paul@city-fan.org> - 2.1.0-4
1f59a1
- New geoipupdate6 cron script written in Perl that doesn't download the data
1f59a1
  if it hasn't changed
1f59a1
1f59a1
* Fri Feb  6 2015 Paul Howarth <paul@city-fan.org> - 2.1.0-3
1f59a1
- Add cron6 subpackage, equivalent to old GeoIP-update6 package
1f59a1
- Revise obsoletes/provides
1f59a1
1f59a1
* Sun Feb  1 2015 Philip A. Prindeville <philipp@fedoraproject.org> - 2.1.0-2
1f59a1
- Remove architecture-specific dependency in noarch subpackage
1f59a1
1f59a1
* Mon Jan 26 2015 Philip A. Prindeville <philipp@fedoraproject.org> - 2.1.0-1
1f59a1
- Initial review package (generated by rpmdev-newspec)
1f59a1