[geoipupdate] Update to 2.2.1

Paul Howarth pghmcfc at fedoraproject.org
Thu Mar 5 10:44:14 UTC 2015


commit 462fcb2c0e291c5b2b99664edfa1f14a7e2becf2
Author: Paul Howarth <paul at city-fan.org>
Date:   Thu Mar 5 10:42:22 2015 +0000

    Update to 2.2.1
    
    - New upstream release 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
    - Add buildroot and clean, BR: curl-devel rather than libcurl-devel for
      EL-5 compatibility
    - Drop requirements for automake, autotools, libtool; patch updated so
      they're not needed

 geoipupdate-2.1.0-docdir.patch |  20 ---
 geoipupdate-2.2.1-docdir.patch | 353 +++++++++++++++++++++++++++++++++++++++++
 geoipupdate.spec               |  46 ++++--
 3 files changed, 384 insertions(+), 35 deletions(-)
---
diff --git a/geoipupdate-2.2.1-docdir.patch b/geoipupdate-2.2.1-docdir.patch
new file mode 100644
index 0000000..a4359e0
--- /dev/null
+++ b/geoipupdate-2.2.1-docdir.patch
@@ -0,0 +1,353 @@
+--- configure.ac
++++ configure.ac
+@@ -10,6 +10,7 @@ AC_PREREQ
+ 
+ AC_PROG_CC_C99
+ AC_PROG_LIBTOOL
++AC_PROG_MKDIR_P
+ 
+ AC_CHECK_TYPE(byte,[AC_DEFINE(HAVE_BYTE_TYPEDEF)],[])
+ AC_CHECK_TYPE(ushort,[AC_DEFINE(HAVE_USHORT_TYPEDEF)],[])
+--- conf/Makefile.am
++++ conf/Makefile.am
+@@ -1,8 +1,10 @@
+-dist_sysconf_DATA = GeoIP.conf.default
+-
+ DEFAULT_CONFIG_FILE = $(sysconfdir)/GeoIP.conf
+ 
+ install-exec-hook:
++	@if test ! -d "$(DESTDIR)$(sysconfdir)" ; then \
++		echo "$(MKDIR_P) $(DESTDIR)$(sysconfdir)" ; \
++		$(MKDIR_P) "$(DESTDIR)$(sysconfdir)" ; \
++	fi
+ 	@if test -f "$(DESTDIR)$(DEFAULT_CONFIG_FILE)" ; then \
+ 	        echo "$@ will not overwrite existing $(DESTDIR)$(DEFAULT_CONFIG_FILE)" ; \
+ 	else \
+--- Makefile.am
++++ Makefile.am
+@@ -8,3 +8,5 @@ SUBDIRS =   \
+     man
+ 
+ EXTRA_DIST = ChangeLog.md LICENSE README.md bootstrap
++
++doc_DATA = ChangeLog.md README.md conf/GeoIP.conf.default
+--- aclocal.m4
++++ aclocal.m4
+@@ -1,4 +1,5 @@
+ # generated automatically by aclocal 1.14.1 -*- Autoconf -*-
++# and touched to get build order right
+ 
+ # Copyright (C) 1996-2013 Free Software Foundation, Inc.
+ 
+--- configure
++++ configure
+@@ -11796,6 +11796,7 @@ CC="$lt_save_CC"
+ 
+ 
+ 
++
+ ac_fn_c_check_type "$LINENO" "byte" "ac_cv_type_byte" "$ac_includes_default"
+ if test "x$ac_cv_type_byte" = xyes; then :
+   $as_echo "#define HAVE_BYTE_TYPEDEF 1" >>confdefs.h
+--- conf/Makefile.in
++++ conf/Makefile.in
+@@ -13,7 +13,6 @@
+ # PARTICULAR PURPOSE.
+ 
+ @SET_MAKE@
+-
+ VPATH = @srcdir@
+ am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+ am__make_running_with_option = \
+@@ -79,8 +78,7 @@ POST_UNINSTALL = :
+ build_triplet = @build@
+ host_triplet = @host@
+ subdir = conf
+-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
+-	$(dist_sysconf_DATA)
++DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am
+ ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+ am__aclocal_m4_deps = $(top_srcdir)/configure.ac
+ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+@@ -107,35 +105,6 @@ am__can_run_installinfo = \
+     n|no|NO) false;; \
+     *) (install-info --version) >/dev/null 2>&1;; \
+   esac
+-am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+-am__vpath_adj = case $$p in \
+-    $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+-    *) f=$$p;; \
+-  esac;
+-am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+-am__install_max = 40
+-am__nobase_strip_setup = \
+-  srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+-am__nobase_strip = \
+-  for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+-am__nobase_list = $(am__nobase_strip_setup); \
+-  for p in $$list; do echo "$$p $$p"; done | \
+-  sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+-  $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+-    if (++n[$$2] == $(am__install_max)) \
+-      { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+-    END { for (dir in files) print dir, files[dir] }'
+-am__base_list = \
+-  sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+-  sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+-am__uninstall_files_from_dir = { \
+-  test -z "$$files" \
+-    || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
+-    || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
+-         $(am__cd) "$$dir" && rm -f $$files; }; \
+-  }
+-am__installdirs = "$(DESTDIR)$(sysconfdir)"
+-DATA = $(dist_sysconf_DATA)
+ am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
+ DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ ACLOCAL = @ACLOCAL@
+@@ -253,7 +222,6 @@ target_alias = @target_alias@
+ top_build_prefix = @top_build_prefix@
+ top_builddir = @top_builddir@
+ top_srcdir = @top_srcdir@
+-dist_sysconf_DATA = GeoIP.conf.default
+ DEFAULT_CONFIG_FILE = $(sysconfdir)/GeoIP.conf
+ all: all-am
+ 
+@@ -294,27 +262,6 @@ mostlyclean-libtool:
+ 
+ clean-libtool:
+ 	-rm -rf .libs _libs
+-install-dist_sysconfDATA: $(dist_sysconf_DATA)
+-	@$(NORMAL_INSTALL)
+-	@list='$(dist_sysconf_DATA)'; test -n "$(sysconfdir)" || list=; \
+-	if test -n "$$list"; then \
+-	  echo " $(MKDIR_P) '$(DESTDIR)$(sysconfdir)'"; \
+-	  $(MKDIR_P) "$(DESTDIR)$(sysconfdir)" || exit 1; \
+-	fi; \
+-	for p in $$list; do \
+-	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+-	  echo "$$d$$p"; \
+-	done | $(am__base_list) | \
+-	while read files; do \
+-	  echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(sysconfdir)'"; \
+-	  $(INSTALL_DATA) $$files "$(DESTDIR)$(sysconfdir)" || exit $$?; \
+-	done
+-
+-uninstall-dist_sysconfDATA:
+-	@$(NORMAL_UNINSTALL)
+-	@list='$(dist_sysconf_DATA)'; test -n "$(sysconfdir)" || list=; \
+-	files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+-	dir='$(DESTDIR)$(sysconfdir)'; $(am__uninstall_files_from_dir)
+ tags TAGS:
+ 
+ ctags CTAGS:
+@@ -354,11 +301,8 @@ distdir: $(DISTFILES)
+ 	done
+ check-am: all-am
+ check: check-am
+-all-am: Makefile $(DATA)
++all-am: Makefile
+ installdirs:
+-	for dir in "$(DESTDIR)$(sysconfdir)"; do \
+-	  test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+-	done
+ install: install-am
+ install-exec: install-exec-am
+ install-data: install-data-am
+@@ -415,7 +359,7 @@ install-dvi: install-dvi-am
+ 
+ install-dvi-am:
+ 
+-install-exec-am: install-dist_sysconfDATA
++install-exec-am:
+ 	@$(NORMAL_INSTALL)
+ 	$(MAKE) $(AM_MAKEFLAGS) install-exec-hook
+ install-html: install-html-am
+@@ -454,7 +398,7 @@ ps: ps-am
+ 
+ ps-am:
+ 
+-uninstall-am: uninstall-dist_sysconfDATA
++uninstall-am:
+ 	@$(NORMAL_INSTALL)
+ 	$(MAKE) $(AM_MAKEFLAGS) uninstall-hook
+ .MAKE: install-am install-exec-am install-strip uninstall-am
+@@ -462,19 +406,21 @@ uninstall-am: uninstall-dist_sysconfDATA
+ .PHONY: all all-am check check-am clean clean-generic clean-libtool \
+ 	cscopelist-am ctags-am distclean distclean-generic \
+ 	distclean-libtool distdir dvi dvi-am html html-am info info-am \
+-	install install-am install-data install-data-am \
+-	install-dist_sysconfDATA install-dvi install-dvi-am \
+-	install-exec install-exec-am install-exec-hook install-html \
+-	install-html-am install-info install-info-am install-man \
+-	install-pdf install-pdf-am install-ps install-ps-am \
+-	install-strip installcheck installcheck-am installdirs \
+-	maintainer-clean maintainer-clean-generic mostlyclean \
+-	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
+-	tags-am uninstall uninstall-am uninstall-dist_sysconfDATA \
+-	uninstall-hook
++	install install-am install-data install-data-am install-dvi \
++	install-dvi-am install-exec install-exec-am install-exec-hook \
++	install-html install-html-am install-info install-info-am \
++	install-man install-pdf install-pdf-am install-ps \
++	install-ps-am install-strip installcheck installcheck-am \
++	installdirs maintainer-clean maintainer-clean-generic \
++	mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \
++	ps ps-am tags-am uninstall uninstall-am uninstall-hook
+ 
+ 
+ install-exec-hook:
++	@if test ! -d "$(DESTDIR)$(sysconfdir)" ; then \
++		echo "$(MKDIR_P) $(DESTDIR)$(sysconfdir)" ; \
++		$(MKDIR_P) "$(DESTDIR)$(sysconfdir)" ; \
++	fi
+ 	@if test -f "$(DESTDIR)$(DEFAULT_CONFIG_FILE)" ; then \
+ 	        echo "$@ will not overwrite existing $(DESTDIR)$(DEFAULT_CONFIG_FILE)" ; \
+ 	else \
+--- Makefile.in
++++ Makefile.in
+@@ -13,6 +13,7 @@
+ # PARTICULAR PURPOSE.
+ 
+ @SET_MAKE@
++
+ VPATH = @srcdir@
+ am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+ am__make_running_with_option = \
+@@ -80,7 +81,7 @@ host_triplet = @host@
+ subdir = .
+ DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
+ 	$(top_srcdir)/configure $(am__configure_deps) compile \
+-	config.guess config.sub install-sh missing ltmain.sh
++	config.guess config.sub depcomp install-sh missing ltmain.sh
+ ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+ am__aclocal_m4_deps = $(top_srcdir)/configure.ac
+ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+@@ -117,6 +118,35 @@ am__can_run_installinfo = \
+     n|no|NO) false;; \
+     *) (install-info --version) >/dev/null 2>&1;; \
+   esac
++am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
++am__vpath_adj = case $$p in \
++    $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
++    *) f=$$p;; \
++  esac;
++am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
++am__install_max = 40
++am__nobase_strip_setup = \
++  srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
++am__nobase_strip = \
++  for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
++am__nobase_list = $(am__nobase_strip_setup); \
++  for p in $$list; do echo "$$p $$p"; done | \
++  sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
++  $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
++    if (++n[$$2] == $(am__install_max)) \
++      { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
++    END { for (dir in files) print dir, files[dir] }'
++am__base_list = \
++  sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
++  sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
++am__uninstall_files_from_dir = { \
++  test -z "$$files" \
++    || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
++    || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
++         $(am__cd) "$$dir" && rm -f $$files; }; \
++  }
++am__installdirs = "$(DESTDIR)$(docdir)"
++DATA = $(doc_DATA)
+ RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive	\
+   distclean-recursive maintainer-clean-recursive
+ am__recursive_targets = \
+@@ -311,6 +341,7 @@ SUBDIRS = \
+     man
+ 
+ EXTRA_DIST = ChangeLog.md LICENSE README.md bootstrap
++doc_DATA = ChangeLog.md README.md conf/GeoIP.conf.default
+ all: all-recursive
+ 
+ .SUFFIXES:
+@@ -357,6 +388,27 @@ clean-libtool:
+ 
+ distclean-libtool:
+ 	-rm -f libtool config.lt
++install-docDATA: $(doc_DATA)
++	@$(NORMAL_INSTALL)
++	@list='$(doc_DATA)'; test -n "$(docdir)" || list=; \
++	if test -n "$$list"; then \
++	  echo " $(MKDIR_P) '$(DESTDIR)$(docdir)'"; \
++	  $(MKDIR_P) "$(DESTDIR)$(docdir)" || exit 1; \
++	fi; \
++	for p in $$list; do \
++	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
++	  echo "$$d$$p"; \
++	done | $(am__base_list) | \
++	while read files; do \
++	  echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(docdir)'"; \
++	  $(INSTALL_DATA) $$files "$(DESTDIR)$(docdir)" || exit $$?; \
++	done
++
++uninstall-docDATA:
++	@$(NORMAL_UNINSTALL)
++	@list='$(doc_DATA)'; test -n "$(docdir)" || list=; \
++	files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
++	dir='$(DESTDIR)$(docdir)'; $(am__uninstall_files_from_dir)
+ 
+ # This directory's subdirectories are mostly independent; you can cd
+ # into them and run 'make' without going through this Makefile.
+@@ -654,9 +706,12 @@ distcleancheck: distclean
+ 	       exit 1; } >&2
+ check-am: all-am
+ check: check-recursive
+-all-am: Makefile
++all-am: Makefile $(DATA)
+ installdirs: installdirs-recursive
+ installdirs-am:
++	for dir in "$(DESTDIR)$(docdir)"; do \
++	  test -z "$$dir" || $(MKDIR_P) "$$dir"; \
++	done
+ install: install-recursive
+ install-exec: install-exec-recursive
+ install-data: install-data-recursive
+@@ -709,7 +764,7 @@ info: info-recursive
+ 
+ info-am:
+ 
+-install-data-am:
++install-data-am: install-docDATA
+ 
+ install-dvi: install-dvi-recursive
+ 
+@@ -755,7 +810,7 @@ ps: ps-recursive
+ 
+ ps-am:
+ 
+-uninstall-am:
++uninstall-am: uninstall-docDATA
+ 
+ .MAKE: $(am__recursive_targets) install-am install-strip
+ 
+@@ -766,14 +821,15 @@ uninstall-am:
+ 	dist-xz dist-zip distcheck distclean distclean-generic \
+ 	distclean-libtool distclean-tags distcleancheck distdir \
+ 	distuninstallcheck dvi dvi-am html html-am info info-am \
+-	install install-am install-data install-data-am install-dvi \
+-	install-dvi-am install-exec install-exec-am install-html \
+-	install-html-am install-info install-info-am install-man \
+-	install-pdf install-pdf-am install-ps install-ps-am \
+-	install-strip installcheck installcheck-am installdirs \
+-	installdirs-am maintainer-clean maintainer-clean-generic \
+-	mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \
+-	ps ps-am tags tags-am uninstall uninstall-am
++	install install-am install-data install-data-am \
++	install-docDATA install-dvi install-dvi-am install-exec \
++	install-exec-am install-html install-html-am install-info \
++	install-info-am install-man install-pdf install-pdf-am \
++	install-ps install-ps-am install-strip installcheck \
++	installcheck-am installdirs installdirs-am maintainer-clean \
++	maintainer-clean-generic mostlyclean mostlyclean-generic \
++	mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \
++	uninstall-am uninstall-docDATA
+ 
+ 
+ # Tell versions [3.59,3.63) of GNU make to not export all variables.
diff --git a/geoipupdate.spec b/geoipupdate.spec
index 33e07e6..cace5e0 100644
--- a/geoipupdate.spec
+++ b/geoipupdate.spec
@@ -13,8 +13,9 @@ 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
-Patch1:		geoipupdate-2.1.0-docdir.patch
-BuildRequires:	libcurl-devel
+Patch0:		geoipupdate-2.2.1-docdir.patch
+BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(id -nu)
+BuildRequires:	curl-devel
 BuildRequires:	zlib-devel
 # Perl modules used by IPv6 cron script
 BuildRequires:	perl(File::Copy)
@@ -22,7 +23,6 @@ BuildRequires:	perl(File::Spec)
 BuildRequires:	perl(LWP::Simple)
 BuildRequires:	perl(PerlIO::gzip)
 BuildRequires:	perl(strict)
-BuildRequires:	automake, autoconf, libtool
 
 %description
 The GeoIP Update program performs automatic updates of GeoIP2 and GeoIP
@@ -59,18 +59,23 @@ Cron job for weekly updates to GeoIP IPv6 Legacy database from MaxMind.
 
 %prep
 %setup -q
-%patch1 -p1 -b .docdir
+
+# GeoIP.conf.default should install into $(docdir) and not $(sysconfdir)
+# https://github.com/maxmind/geoipupdate/issues/26
+%patch0
 
 %build
 %configure --disable-static --disable-dependency-tracking
 make %{?_smp_mflags}
 
 %install
-mkdir -p %{buildroot}%{_docdir}/%{name} %{buildroot}%{_sysconfdir}
-
+rm -rf %{buildroot}
 make install DESTDIR=%{buildroot}
 
-# fix up the config file to have geoipupdate fetch the free products by default
+# We'll package the documentation ourselves
+rm -rf %{buildroot}%{_datadir}/doc/geoipupdate
+
+# Fix up the config file to have geoipupdate fetch the free products by default
 sed -i \
 	-e 's/YOUR_USER_ID_HERE$/999999/' \
 	-e 's/YOUR_LICENSE_KEY_HERE$/000000000000/' \
@@ -86,14 +91,16 @@ mkdir -p %{buildroot}%{_datadir}/GeoIP/download/
 : > %{buildroot}%{_datadir}/GeoIP/download/GeoLiteCityv6.dat.gz
 : > %{buildroot}%{_datadir}/GeoIP/download/GeoIPASNumv6.dat.gz
 
-# LICENSE file is being omitted from release tarball. As soon as this issue:
-#   https://github.com/maxmind/geoipupdate/issues/25
-# is resolved we'll amend the spec file to include it in the packaging.
-
-# For now, see the LICENSE section in the README.md file below.
+%clean
+rm -rf %{buildroot}
 
 %files
-%doc conf/GeoIP.conf.default README.md ChangeLog.md LICENSE
+%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*
@@ -112,9 +119,18 @@ mkdir -p %{buildroot}%{_datadir}/GeoIP/download/
 
 %changelog
 * Wed Mar  4 2015 Philip A. Prindeville <philipp at fedoraproject.org> - 2.2.1-1
-- Call out requirements for automake, autotools, libtool
+- 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
+  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 at city-fan.org> - 2.1.0-4
 - New geoipupdate6 cron script written in Perl that doesn't download the data


More information about the scm-commits mailing list