Blame SPECS/geoipupdate.spec

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