pghmcfc pushed to GeoIP (el5). "Version bump to 1.5.0. Add rename -cron subpackage to -update (as per clamav). Add symlinks and %ghost annotations to simplify things."

notifications at fedoraproject.org notifications at fedoraproject.org
Tue Apr 14 07:38:33 UTC 2015


>From 21cdd46345074b0cafe65bd27d750f324a9a627d Mon Sep 17 00:00:00 2001
From: "Philip A. Prindeville" <philipp at redfish-solutions.com>
Date: Fri, 7 Jun 2013 18:13:44 -0600
Subject: Version bump to 1.5.0. Add rename -cron subpackage to -update (as per
 clamav). Add symlinks and %ghost annotations to simplify things.


diff --git a/GeoIP.spec b/GeoIP.spec
index 4b40f27..78e402a 100644
--- a/GeoIP.spec
+++ b/GeoIP.spec
@@ -24,22 +24,22 @@ accurate as of February 2009. This database simply contains IP blocks as keys,
 and countries as values. This database should be more complete and accurate
 than using reverse DNS lookups.
 
-%package cron
+%package update
 Summary:	Crontab entry to facilitate automatic updates of databases
 Group:		Applications/Databases
 Requires:	crontabs
-Provides:	geoip-cron = %{version}-%{release}
-Obsoletes:	geoip-cron < %{version}-%{release}
+Provides:	GeoIP-update = %{version}-%{release}
+Obsoletes:	GeoIP-update < %{version}-%{release}
 
-%description cron
+%description update
 Crontab entry to provide weekly updates of the GeoIP free databases.
 
 %package devel
 Summary:	Development headers and libraries for GeoIP
 Group:		Development/Libraries
 Requires:	%{name} = %{version}-%{release}
-Provides:	geoip-devel = %{version}-%{release}
-Obsoletes:	geoip-devel < %{version}-%{release}
+Provides:	GeoIP-devel = %{version}-%{release}
+Obsoletes:	GeoIP-devel < %{version}-%{release}
 
 %description devel
 Development headers and static libraries for building GeoIP-based applications.
@@ -74,7 +74,7 @@ make %{?_smp_mflags}
 
 %install
 rm -rf %{buildroot}
-make DESTDIR=%{buildroot} install
+make DESTDIR=%{buildroot} DEFAULT_DB_FILE="%{_datadir}/GeoIP/GeoIP-initial.dat" install
 
 # fetch database updates weekly
 install -D -m755 %{SOURCE5} %{buildroot}%{_sysconfdir}/cron.weekly/geoipupdate
@@ -88,25 +88,31 @@ sed -i \
 	-e 's/YOUR_USER_ID_HERE$/999999/' \
 	-e 's/106$/506 533 517/' \
 	%{buildroot}%{_sysconfdir}/GeoIP.conf
-ln -sf GeoLiteCountry.dat %{buildroot}%{_datadir}/GeoIP/GeoIP.dat
 
 %clean
 rm -rf %{buildroot}
 
 %post
 /sbin/ldconfig
-geoipupdate 
+ln -sf GeoIP-initial.dat %{_datadir}/GeoIP/GeoIP.dat
+geoipupdate && \
+	ln -sf GeoLiteCountry.dat %{_datadir}/GeoIP/GeoIP.dat
 
 %postun -p /sbin/ldconfig
 
 %files
 # LGPLv2+
-%doc AUTHORS COPYING ChangeLog README TODO LICENSE* fetch-*
+%doc AUTHORS COPYING ChangeLog README README.fedora TODO LICENSE* fetch-*
 %config(noreplace) %{_sysconfdir}/GeoIP.conf.default
 %config(noreplace) %{_sysconfdir}/GeoIP.conf
 %{_bindir}/geoiplookup6
 %{_bindir}/geoiplookup
 %{_datadir}/GeoIP/
+%{_datadir}/GeoIP/GeoIP-initial.dat
+%ghost %{_datadir}/GeoIP/GeoIP.dat
+%ghost %{_datadir}/GeoIP/GeoLiteCountry.dat
+%ghost %{_datadir}/GeoIP/GeoLiteCity.dat
+%ghost %{_datadir}/GeoIP/GeoLiteASNum.dat
 %{_libdir}/libGeoIP.so.1
 %{_libdir}/libGeoIP.so.1.*
 %{_mandir}/man1/geoiplookup.1*
@@ -117,7 +123,7 @@ geoipupdate
 %{_libdir}/libGeoIPUpdate.so.0.*
 %{_mandir}/man1/geoipupdate.1*
 
-%files cron
+%files update
 %{_sysconfdir}/cron.weekly/geoipupdate
 
 %files devel
@@ -131,8 +137,10 @@ geoipupdate
 %{_libdir}/libGeoIPUpdate.so
 
 %changelog
-* Wed Apr 10 2013 Philip Prindeville <philipp at fedoraproject.org> - 1.5.0-1
+* Fri Jun 07 2013 Philip Prindeville <philipp at 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
diff --git a/geoipupdate.cron b/geoipupdate.cron
index 383d82f..e536bf3 100644
--- a/geoipupdate.cron
+++ b/geoipupdate.cron
@@ -1,3 +1,4 @@
 #!/bin/sh
 
-geoipupdate
+geoipupdate && \
+	ln -sf GeoLiteCountry.dat /usr/share/GeoIP/GeoIP.dat
-- 
cgit v0.10.2


	http://pkgs.fedoraproject.org/cgit/GeoIP.git/commit/?h=el5&id=21cdd46345074b0cafe65bd27d750f324a9a627d


More information about the scm-commits mailing list