summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlin Năstac <mrness@gentoo.org>2009-02-18 21:44:38 +0000
committerAlin Năstac <mrness@gentoo.org>2009-02-18 21:44:38 +0000
commitda15ca368a6ce64489f5d5c7f143b04306f43c15 (patch)
treebc9f1c557f7afae4b7981e0f7c6546a6f8425bf3 /net-analyzer
parentSparc stable, Bug #259360 --- looks fine. (diff)
downloadhistorical-da15ca368a6ce64489f5d5c7f143b04306f43c15.tar.gz
historical-da15ca368a6ce64489f5d5c7f143b04306f43c15.tar.bz2
historical-da15ca368a6ce64489f5d5c7f143b04306f43c15.zip
Update GeoIP databases through a cron job (#259394).
Package-Manager: portage-2.1.6.4/cvs/Linux 2.6.25-gentoo-r6 x86_64
Diffstat (limited to 'net-analyzer')
-rw-r--r--net-analyzer/ntop/ChangeLog9
-rw-r--r--net-analyzer/ntop/Manifest13
-rw-r--r--net-analyzer/ntop/files/ntop-3.3.9-external-geoip.patch47
-rw-r--r--net-analyzer/ntop/files/ntop-update-geoip-db21
-rw-r--r--net-analyzer/ntop/ntop-3.3.9-r1.ebuild (renamed from net-analyzer/ntop/ntop-3.3.9.ebuild)21
5 files changed, 82 insertions, 29 deletions
diff --git a/net-analyzer/ntop/ChangeLog b/net-analyzer/ntop/ChangeLog
index 6b63894b5a33..49cddb905838 100644
--- a/net-analyzer/ntop/ChangeLog
+++ b/net-analyzer/ntop/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for net-analyzer/ntop
# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-analyzer/ntop/ChangeLog,v 1.67 2009/02/16 22:17:28 mrness Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-analyzer/ntop/ChangeLog,v 1.68 2009/02/18 21:44:38 mrness Exp $
+
+*ntop-3.3.9-r1 (18 Feb 2009)
+
+ 18 Feb 2009; Alin Năstac <mrness@gentoo.org>
+ files/ntop-3.3.9-external-geoip.patch, +files/ntop-update-geoip-db,
+ -ntop-3.3.9.ebuild, +ntop-3.3.9-r1.ebuild:
+ Update GeoIP databases through a cron job (#259394).
*ntop-3.3.9 (16 Feb 2009)
diff --git a/net-analyzer/ntop/Manifest b/net-analyzer/ntop/Manifest
index ca9f48b95985..af926de4e895 100644
--- a/net-analyzer/ntop/Manifest
+++ b/net-analyzer/ntop/Manifest
@@ -6,10 +6,11 @@ AUX ntop-3.2-build.patch 9369 RMD160 396ab052d11c21f5f33ea246c57aae8f1e4b2e35 SH
AUX ntop-3.2-snmp.patch 776 RMD160 22b4e288b88beaff7a855f18b9b9a1bec09d92da SHA1 a197e0887ea05bc223951d65c349382592bc3b4a SHA256 c2cb51b8adb0909f29580846ee58d07c105998b5675cebf97f1cfda36e20abef
AUX ntop-3.3.6-gentoo.patch 1602 RMD160 c2c328b3d00bfe59f82477c4f5c52875629731b8 SHA1 0878bba98e6e9d31dc2f56e66435e29a2f96f3d9 SHA256 8fdd082b6162221977c2fa5fd478109a7d222ea2174d60dbf06eb3596fe25f4e
AUX ntop-3.3.8-gentoo.patch 1671 RMD160 a07f271b511227f633e972199b9667889f68fa18 SHA1 c9ec1e99ffef9288f73e0e3ad2021972b078388b SHA256 3f9561fb8e7ee657d68d44840897fda1cc05b0dff884a3ae8358e1b7bfc89bc7
-AUX ntop-3.3.9-external-geoip.patch 2816 RMD160 a62b21b8e0a07e9655006368f0f50ade588d78fb SHA1 1f7515a30572996907636afdf0b1943c4af2095d SHA256 88d2c3705ba8f9e061f17a74200f875270c1dabff5f969903e64921b64483292
+AUX ntop-3.3.9-external-geoip.patch 3427 RMD160 58487133eafa4c8990eb5960c1f363cdafc34e38 SHA1 f4b77eb17fed29df005a4fcd9b9111ea71c00bba SHA256 462a1f4c4d4260b47f23e63ab008bc7e9ba1c030847fe5f021d27cd51490809a
AUX ntop-3.3.9-gentoo.patch 1742 RMD160 560fca4b581215cb288178bf7b6e6d3b5822c754 SHA1 734f7392b38fe243800bfb6887b673543f14387d SHA256 2013f7124c5bd9c3f13202ef46eb7b49f3f01257ad62e91239796ae2b6f37a75
AUX ntop-confd 341 RMD160 40eb09215a1f50f86ae82ecd527198c2e7be17a3 SHA1 474aeb45826d71c28c5404add651f31be89b14d7 SHA256 b582253490df4cde55dda97585d45d16b2968296da7e9bc996dde932cf42584d
AUX ntop-initd 747 RMD160 cc62a0f68e7c27e63acaf55283784ab581a79ab9 SHA1 bf1ea42aeab524edcbe37cfc708919aed965f7d8 SHA256 f583d6625690ee60744d407d149845db178f618f1239d962bfac14f39076dc7d
+AUX ntop-update-geoip-db 490 RMD160 d56f574c01820c137ea12ca14aebc6257d405649 SHA1 f679f00928dca20c20a606602ca89f4f8bc7d5b3 SHA256 d3d0a5ee2265301af049975130e2339ad0f408b001e8d83a68b8b98704ed0114
DIST ntop-3.2.tgz 3910593 RMD160 18ea4b535826e6d7bdf56c071c271869653cba8d SHA1 ab17e871890bc490746fe03f171523073b54e1e8 SHA256 5b639dbcb3c8bf77824cf8aaed168864f69730b2ef41dc68d2db22b205c586d8
DIST ntop-3.3.6.tar.gz 3635457 RMD160 50f8c7743d36effdfe07037453fa24c8bb42062a SHA1 320ab9ccc0d71dedf0e200e283834eb684163ee3 SHA256 6a190d868805110336afabe078ab9cf0bc2b26e14810a5160fc9689d554df57d
DIST ntop-3.3.8.tar.gz 5626313 RMD160 cd1b3e08f74d9231d56fc8b619ce5e85d3fabbd0 SHA1 6ef20a1c43ce560b81e6439dc7ad0f7b29edc2c0 SHA256 8e25f3c527493e1495030b1b8cfb09158c75829a740f55c6339674efcc504238
@@ -17,13 +18,13 @@ DIST ntop-3.3.9.tar.gz 4955257 RMD160 3d7b14bff99a6652ae83fb86a2cda3206cc3392c S
EBUILD ntop-3.2-r3.ebuild 3026 RMD160 1e6be221d06e34363204b46b66ef0e78d67084ea SHA1 7bb27f08e1e1cfa71adadc93eae6b40b4963726c SHA256 8213b04e0f8950fb1f096a3c1c5ff4523020d441b161618fa4a54d3389c3f4d3
EBUILD ntop-3.3.6.ebuild 3228 RMD160 91bf24321e591c99c1654c58e39b5db3b69cb6f1 SHA1 e757d1b4b07b5359daca77fc17f04d206097f88c SHA256 0a72f39b32658374f315e8ef5ccd642aed43aee801ee1a36760cfcd7a0263b03
EBUILD ntop-3.3.8.ebuild 3141 RMD160 03c722452d5af5ac49693430725ea03f00eb2226 SHA1 80b7347d8c1af69699ddd22c91d9055a607b6672 SHA256 31e79951ae18125012ff49f371f8f2e02bbc8dac00269b738fbfbec260fc729a
-EBUILD ntop-3.3.9.ebuild 3343 RMD160 7a0396bf5df48dedad3447777066529cc93aaaa5 SHA1 0188f37f80013f9914ec00a7f81b4f41ba4658f6 SHA256 2e4b9f8a37ac3f8cad92855b7415afb28baed59eb45c5187263142db4a94df6a
-MISC ChangeLog 9339 RMD160 7ad9c3ed08501fdb1af8cf1849fed035bb4bd9f3 SHA1 69ef7b900984a72df3d641fca0d801c7d84c583b SHA256 4cb110cad47569d3d5bf48a14d51bd8a4091d7038d1b3635bbc6b06d5d264652
+EBUILD ntop-3.3.9-r1.ebuild 3468 RMD160 56cdf536309d306373e89749f119559aba78b4b6 SHA1 3fd6c3bbe3317a06dbe28673c5cdf7f2c45c12ad SHA256 2c0a8e228d2b7ac2dfd8426fe969f18379a78ffd2bdbe1ccb58239bd3b71aa47
+MISC ChangeLog 9588 RMD160 7111e929b2807e7eef5cbd5a5c361791d4b48537 SHA1 8c7d7f773fb29999bbabe9a5c560db2c842bc690 SHA256 04375b714cb6d1a54095bb4ce227c44722dfc5a4789c48552698449e066f1b55
MISC metadata.xml 322 RMD160 b7f7af3a210902c2b2496ec63b09a3ba372b695b SHA1 b1066ca022ba3396c1964d517c366686339e3c82 SHA256 7ed574b22255d4bbc246459407865f6b9405e7ec7de95c08e16bbf3d2ba2134b
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.9 (GNU/Linux)
-iEYEARECAAYFAkmZ5gkACgkQts85UDFmaOVZVgCbB2Akvk6SaLYXvGG56kkxyQW9
-aDMAni87VJ6XDW9PM1oXbBgkK8EUOPMN
-=O6gE
+iEYEARECAAYFAkmcgVcACgkQts85UDFmaOXsGwCfaxxntIi54VfGWEhKxjlv/P4M
+bNcAn0GpEK0r51G5fO0nzG2JM1jqkFg/
+=Z1Fd
-----END PGP SIGNATURE-----
diff --git a/net-analyzer/ntop/files/ntop-3.3.9-external-geoip.patch b/net-analyzer/ntop/files/ntop-3.3.9-external-geoip.patch
index 99efd615c171..8291b557b87a 100644
--- a/net-analyzer/ntop/files/ntop-3.3.9-external-geoip.patch
+++ b/net-analyzer/ntop/files/ntop-3.3.9-external-geoip.patch
@@ -1,7 +1,7 @@
diff -Nru ntop-3.3.9.orig/configure.in ntop-3.3.9/configure.in
---- ntop-3.3.9.orig/configure.in 2009-02-16 19:43:57.000000000 +0000
-+++ ntop-3.3.9/configure.in 2009-02-16 19:47:10.000000000 +0000
-@@ -1882,20 +1882,6 @@
+--- ntop-3.3.9.orig/configure.in 2009-02-18 21:04:10.000000000 +0000
++++ ntop-3.3.9/configure.in 2009-02-18 21:05:58.000000000 +0000
+@@ -1883,39 +1883,7 @@
fi
dnl> GeoIP (http://www.maxmind.com/)
@@ -19,13 +19,21 @@ diff -Nru ntop-3.3.9.orig/configure.in ntop-3.3.9/configure.in
- fi
-fi
-
- if test -f "GeoLiteCity.dat"; then
- echo "GeoLiteCity.dat already present"
- else
-@@ -1911,10 +1897,7 @@
- fi
-
-
+-if test -f "GeoLiteCity.dat"; then
+- echo "GeoLiteCity.dat already present"
+-else
+- wget http://www.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz
+- gunzip GeoLiteCity.dat.gz
+-fi
+-
+-if test -f "GeoIPASNum.dat"; then
+- echo "GeoIPASNum.dat already present"
+-else
+- wget http://www.maxmind.com/download/geoip/database/asnum/GeoIPASNum.dat.gz
+- gunzip GeoIPASNum.dat.gz
+-fi
+-
+-
-GEO_DIR=`find $PWD -type d -name "GeoIP-*"`
-GEO_IP="$GEO_DIR/libGeoIP/"
-CFLAGS="$CFLAGS -I$GEO_IP"
@@ -34,7 +42,7 @@ diff -Nru ntop-3.3.9.orig/configure.in ntop-3.3.9/configure.in
dnl> NTOPCONFIGDEBUG_SETTINGS([precet])
-@@ -2079,7 +2062,6 @@
+@@ -2080,7 +2048,6 @@
AC_SUBST(SO_VERSION_PATCH)
AC_SUBST(RRD_LIB)
AC_SUBST(RRD_INC)
@@ -44,7 +52,7 @@ diff -Nru ntop-3.3.9.orig/configure.in ntop-3.3.9/configure.in
diff -Nru ntop-3.3.9.orig/initialize.c ntop-3.3.9/initialize.c
--- ntop-3.3.9.orig/initialize.c 2008-12-03 22:00:22.000000000 +0000
-+++ ntop-3.3.9/initialize.c 2009-02-16 22:04:34.000000000 +0000
++++ ntop-3.3.9/initialize.c 2009-02-18 21:04:44.000000000 +0000
@@ -467,16 +467,15 @@
#endif
@@ -85,8 +93,19 @@ diff -Nru ntop-3.3.9.orig/initialize.c ntop-3.3.9/initialize.c
diff -Nru ntop-3.3.9.orig/Makefile.am ntop-3.3.9/Makefile.am
--- ntop-3.3.9.orig/Makefile.am 2008-12-03 22:00:22.000000000 +0000
-+++ ntop-3.3.9/Makefile.am 2009-02-16 19:47:25.000000000 +0000
-@@ -270,8 +270,6 @@
++++ ntop-3.3.9/Makefile.am 2009-02-18 21:05:33.000000000 +0000
+@@ -76,9 +76,7 @@
+ NTOPDATA = ntop-cert.pem \
+ $(ETTER_PASSIVE) \
+ oui.txt.gz \
+- specialMAC.txt.gz \
+- GeoIPASNum.dat \
+- GeoLiteCity.dat
++ specialMAC.txt.gz
+
+ NTOPHTML = html html/*.js html/*.html html/*.gif html/*.jpg html/*.ico html/*.png \
+ html/*.css html/*.dtd \
+@@ -270,8 +268,6 @@
install: install-recursive
diff --git a/net-analyzer/ntop/files/ntop-update-geoip-db b/net-analyzer/ntop/files/ntop-update-geoip-db
new file mode 100644
index 000000000000..40d08189fe13
--- /dev/null
+++ b/net-analyzer/ntop/files/ntop-update-geoip-db
@@ -0,0 +1,21 @@
+#!/bin/sh
+
+BASE_URL=http://geolite.maxmind.com/download/geoip/database
+
+echo "Updating NTOP GeoIP databases..."
+
+cd /var/lib/ntop || exit
+
+for u in asnum/GeoIPASNum.dat.gz GeoLiteCity.dat.gz ; do
+ FILE_GZ=${u#*/}
+ FILE=${FILE_GZ%.gz}
+ wget -O ${FILE_GZ} ${BASE_URL}/${u} &&
+ gunzip < ${FILE_GZ} > .${FILE} &&
+ mv -f .${FILE} ${FILE} &&
+ rm -f ${FILE_GZ} ||
+ exit
+done
+
+/etc/init.d/ntop --quiet status && /etc/init.d/ntop restart
+
+echo "NTOP GeoIP databases were successfully updated"
diff --git a/net-analyzer/ntop/ntop-3.3.9.ebuild b/net-analyzer/ntop/ntop-3.3.9-r1.ebuild
index e82a9412890d..cdcc14e8beb9 100644
--- a/net-analyzer/ntop/ntop-3.3.9.ebuild
+++ b/net-analyzer/ntop/ntop-3.3.9-r1.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-analyzer/ntop/ntop-3.3.9.ebuild,v 1.1 2009/02/16 22:17:28 mrness Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-analyzer/ntop/ntop-3.3.9-r1.ebuild,v 1.1 2009/02/18 21:44:38 mrness Exp $
inherit eutils autotools
@@ -27,15 +27,16 @@ COMMON_DEPEND="sys-apps/gawk
sys-libs/zlib
dev-libs/geoip"
DEPEND="${COMMON_DEPEND}
- >=sys-devel/libtool-1.4
- net-misc/wget" # needed for downloading GeoIP data
+ >=sys-devel/libtool-1.4"
# Needed by xmldumpPlugin - couldn't get it to work
# dev-libs/gdome2
# >=dev-libs/glib-2"
RDEPEND="${COMMON_DEPEND}
media-fonts/corefonts
- media-gfx/graphviz"
+ media-gfx/graphviz
+ net-misc/wget
+ app-arch/gzip"
pkg_setup() {
# snmp doesn't compile in this release, disabled for now
@@ -102,8 +103,7 @@ src_install() {
keepdir /var/lib/ntop &&
fowners ntop:ntop /var/lib/ntop &&
- fperms 750 /var/lib/ntop &&
- mv "${D}"/etc/ntop/Geo*.dat "${D}"/var/lib/ntop ||
+ fperms 750 /var/lib/ntop ||
die "failed to prepare /var/lib/ntop dir"
dodoc AUTHORS CONTENTS ChangeLog MANIFESTO NEWS
@@ -111,9 +111,14 @@ src_install() {
newinitd "${FILESDIR}"/ntop-initd ntop
newconfd "${FILESDIR}"/ntop-confd ntop
+
+ exeinto /etc/cron.monthly
+ doexe "${FILESDIR}"/ntop-update-geoip-db
}
pkg_postinst() {
- elog "You need to set a password first by running"
- elog "ntop --set-admin-password"
+ elog "If this is the first time you install ntop, you need to run"
+ elog "following commands before starting ntop service:"
+ elog " ntop --set-admin-password"
+ elog " /etc/cron.monthly/ntop-update-geoip-db"
}