Hello community,
here is the log from the commit of package GeoIP for openSUSE:Factory
checked in at Sat Jun 20 03:39:29 CEST 2009.
--------
--- GeoIP/GeoIP.changes 2009-05-28 11:01:51.000000000 +0200
+++ GeoIP/GeoIP.changes 2009-06-18 11:50:08.000000000 +0200
@@ -1,0 +2,10 @@
+Thu Jun 18 09:49:54 UTC 2009 - lnussel@novell.com
+
+- move database files to /var/lib/GeoIP
+
+-------------------------------------------------------------------
+Wed Jun 17 18:02:31 CEST 2009 - prusnak@suse.cz
+
+- added tool which fetches the current GeoIP data (geoip-fetch)
+
+-------------------------------------------------------------------
calling whatdependson for head-i586
New:
----
geoip-fetch
README.SUSE
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ GeoIP.spec ++++++
--- /var/tmp/diff_new_pack.M29663/_old 2009-06-20 03:31:13.000000000 +0200
+++ /var/tmp/diff_new_pack.M29663/_new 2009-06-20 03:31:13.000000000 +0200
@@ -20,20 +20,24 @@
Name: GeoIP
Version: 1.4.6
-Release: 2
+Release: 3
#
-License: GPL v2 or later; LGPL v2.1 or later; libGeoIPUpdate is GPLv2 or later and GeoIP is LGPLv2.1 or later
+License: GPL v2 or later ; LGPL v2.1 or later ; libGeoIPUpdate is GPLv2 or later and GeoIP is LGPLv2.1 or later
+Summary: Library to find the country that any IP address originates from
Group: Development/Libraries/C and C++
#
-BuildRoot: %{_tmppath}/%{name}-%{version}-build
-BuildRequires: zlib-devel
-#
Url: http://www.maxmind.com/
Source: http://www.maxmind.com/download/geoip/api/c/%{name}-%{version}.tar.bz2
Source1: LICENSE.txt
Source2: GPL-2.0.txt
+Source3: README.SUSE
+Source4: geoip-fetch
#
-Summary: Library to find the country that any IP address originates from
+BuildRoot: %{_tmppath}/%{name}-%{version}-build
+BuildRequires: zlib-devel
+%if 0%{?suse_version}
+Recommends: curl
+%endif
%description
GeoIP is a C library that enables the user to find the country that any
@@ -53,9 +57,8 @@
%package -n libGeoIP1
License: LGPL v2.1 or later
-Group: Development/Libraries/C and C++
-#
Summary: Shared libraries of the GeoIP C API
+Group: Development/Libraries/C and C++
# for the data file
%if 0%{?suse_version}
Recommends: GeoIP
@@ -81,12 +84,12 @@
%package -n libGeoIP-devel
License: LGPL v2.1 or later
+Summary: Development Files for GeoIP
Group: Development/Libraries/C and C++
+#
Requires: libGeoIP1 = %{version}
Provides: %{name}-devel = %{version}-%{release}
Obsoletes: %{name}-devel < %{version}
-#
-Summary: Development Files for GeoIP
%description -n libGeoIP-devel
GeoIP is a C library that enables the user to find the country that any
@@ -107,21 +110,30 @@
T.J. Mather
%prep
-%setup
-#patch0 -p1
+%setup -q
+cp %{SOURCE1} .
cp %{SOURCE2} .
+cp %{SOURCE3} .
%build
%configure --disable-static --with-pic
+sed -i -e '/-DGEOIPDATADIR/s,\$(pkgdatadir),/var/lib/GeoIP,' libGeoIP/Makefile{.am,.in,}
+sed -i -e 's,\$(pkgdatadir),/var/lib/GeoIP,' man/Makefile{.am,.in,}
%{__make} %{?jobs:-j%jobs}
%install
%makeinstall
+install -d %{buildroot}/var/lib
+mv %{buildroot}%{_datadir}/GeoIP %{buildroot}/var/lib
+for i in GeoIPASNum.dat GeoIPCity.dat GeoIPv6.dat; do
+ touch %buildroot/var/lib/GeoIP/$i
+done
# we don't need that, we use %config(noreplace) instead
%{__rm} %{buildroot}%{_sysconfdir}/GeoIP.conf.default
-%{__cp} %{SOURCE1} .
# no need for that
%{__rm} %{buildroot}%{_libdir}/*.la
+# install fetcher
+install -D -m 0755 %{SOURCE4} %{buildroot}%{_sbindir}/geoip-fetch
%clean
%{__rm} -rf %{buildroot}
@@ -132,17 +144,20 @@
%files
%defattr(-, root, root, -)
-%doc AUTHORS ChangeLog COPYING README TODO LICENSE.txt
-%doc GPL-2.0.txt
+%doc AUTHORS ChangeLog COPYING README TODO LICENSE.txt GPL-2.0.txt README.SUSE
%config(noreplace) %{_sysconfdir}/GeoIP.conf
%{_bindir}/geoiplookup
%{_bindir}/geoiplookup6
%{_bindir}/geoipupdate
-%dir %{_datadir}/GeoIP
-%{_datadir}/GeoIP/GeoIP.dat
%{_mandir}/man1/geoiplookup6.1*
%{_mandir}/man1/geoiplookup.1*
%{_mandir}/man1/geoipupdate.1*
+%{_sbindir}/geoip-fetch
+%dir /var/lib/GeoIP
+%verify(not md5 size mtime) /var/lib/GeoIP/GeoIP.dat
+%ghost %verify(not md5 size mtime) /var/lib/GeoIP/GeoIPASNum.dat
+%ghost %verify(not md5 size mtime) /var/lib/GeoIP/GeoIPCity.dat
+%ghost %verify(not md5 size mtime) /var/lib/GeoIP/GeoIPv6.dat
%files -n libGeoIP1
%defattr(-, root, root, -)
@@ -160,6 +175,10 @@
%{_libdir}/libGeoIPUpdate.so
%changelog
+* Thu Jun 18 2009 lnussel@novell.com
+- move database files to /var/lib/GeoIP
+* Wed Jun 17 2009 prusnak@suse.cz
+- added tool which fetches the current GeoIP data (geoip-fetch)
* Thu May 28 2009 lnussel@suse.de
- new version 1.4.6 (bugfix release)
* Thu Dec 04 2008 lnussel@suse.de
@@ -206,7 +225,7 @@
- changes to the package layout:
- splitted out library package (libGeoIP1)
- renamed devel package GeoIP-devel to libGeoIP-devel
-* Thu Aug 30 2007 mrueckert@suse.de
+* Wed Aug 29 2007 mrueckert@suse.de
- we dont need zlib-devel to link against libGeoIP
* Wed Aug 29 2007 mrueckert@suse.de
- spec file cleanup
@@ -248,7 +267,7 @@
* Fixed memory leaks under error conditions, buffer overflow
using sprintf, and issue where a corrupted cache file could
core dump the file (Nick Galbreath, Right Media Inc)
-* Sat Dec 09 2006 mrueckert@suse.de
+* Fri Dec 08 2006 mrueckert@suse.de
- spec file clean up
- split out the devel files
* Sat Oct 28 2006 lnussel@suse.de
++++++ geoip-fetch ++++++
#!/bin/bash
set -e
baseurl="http://geolite.maxmind.com/download/geoip/database"
geoipdir='/var/lib/GeoIP'
tempdir=`mktemp -d`
cd "$tempdir"
trap "/bin/rm -rf $tempdir" EXIT
sources=(GeoLiteCountry/GeoIP.dat.gz GeoIPv6.dat.gz asnum/GeoIPASNum.dat.gz -- GeoLiteCity.dat.gz)
targets=(GeoIP.dat GeoIPv6.dat GeoIPASNum.dat -- GeoIPCity.dat)
verbose=
if [ -t 0 ]; then
verbose="-#"
fi
skiplarge=1
if [ "$1" = "-a" ]; then
skiplarge=
shift
fi
i=0
while [ $i -lt ${#sources[@]} ]; do
if [ ${sources[$i]} = '--' ]; then
i=$((i+1))
[ -z "$skiplarge" ] || break
continue
fi
[ -z "$verbose" ] || echo "${targets[$i]} ..."
if curl ${verbose:--s} -f -o "$tempdir/${targets[$i]}.gz" "$baseurl/${sources[$i]}"; then
if gzip -d ${targets[$i]}.gz; then
mv ${targets[$i]} "$geoipdir/${targets[$i]}"
fi
fi
i=$((i+1))
done
++++++ README.SUSE ++++++
Automatically fetching GeoIP "free" databases
==============================================
As provided by Maxmind, LLC, the GeoIP library packages possess tools to
fetch the licensed country/city/organization etc. databases they
provide, but no such tool to fetch the free Country/City equivalents.
Additionally, the database version shipped with the base package will be
the current one at the time a new library release ships. Therefore, the
shipped database gets less accurate and obsolescent if the library has
not been updated in some time.
Therefore these databases can become out-of-date quite quickly unless
the user manually fetches and replaces them regularly; Maxmind generally
release updates once a month (on the 1st/2nd day of the month).
Script
======
* geoip-fetch [-a]
When called without parameters it will fetch GeoIP, GeoIPv6 and GeoIPASNum
data (around 2 MB download, 4 MB on drive). If -a parameter is provided
then the script will also fetch GeoIPCity data (around 25 MB download, 45 MB
on drive).
Requirements
============
* shell, curl to fetch and gzip to decompress the archives
Usage
=====
Script can be called manually (as root), but the best solution is to add
a crontab entry similar to this one:
# Fetch all GeoIP databases at 6am on the 2nd of the month
00 06 2 * * /usr/sbin/geoip-fetch -a
Author
======
Pavol Rusnak , Ludwig Nussel
heavily inspired by fetch from Michael Fleming
License
=======
MIT License
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org