SF.net SVN: gar:[22593] csw/mgar/pkg/mod_asn/trunk

dmichelsen at users.sourceforge.net dmichelsen at users.sourceforge.net
Wed Nov 27 22:06:34 CET 2013


Revision: 22593
          http://gar.svn.sourceforge.net/gar/?rev=22593&view=rev
Author:   dmichelsen
Date:     2013-11-27 21:06:33 +0000 (Wed, 27 Nov 2013)
Log Message:
-----------
mod_asn/trunk: Correct pathes, split package

Modified Paths:
--------------
    csw/mgar/pkg/mod_asn/trunk/Makefile

Added Paths:
-----------
    csw/mgar/pkg/mod_asn/trunk/files/0001-Do-not-download-routeviews.patch

Modified: csw/mgar/pkg/mod_asn/trunk/Makefile
===================================================================
--- csw/mgar/pkg/mod_asn/trunk/Makefile	2013-11-27 16:53:47 UTC (rev 22592)
+++ csw/mgar/pkg/mod_asn/trunk/Makefile	2013-11-27 21:06:33 UTC (rev 22593)
@@ -10,13 +10,29 @@
 DISTFILES += CSWap2-mod-asn.preremove
 DISTFILES += asn_import.conf
 
+PATCHFILES += 0001-Do-not-download-routeviews.patch
+
 VENDOR_URL = http://mirrorbrain.org/mod_asn/
 
 LICENSE = debian/copyright
 
 PACKAGES = CSWap2-mod-asn
+SPKG_DESC_CSWap2-mod-asn = An Apache module to look up routing data
 RUNTIME_DEP_PKGS_CSWap2-mod-asn += CSWapache2
 
+PACKAGES += CSWmod-asn-utils
+SPKG_DESC_CSWmod-asn-utils = Utilities to maintain the database for mod_asn
+PKGFILES_CSWmod-asn-utils += $(sysconfdir)/.*
+PKGFILES_CSWmod-asn-utils += $(bindir)/.*
+PKGFILES_CSWmod-asn-utils += .*/asn\.sql
+ARCHALL_CSWmod-asn-utils = 1
+# The data, checkpkg cannot detect that
+RUNTIME_DEP_PKGS_CSWmod-asn-utils += CSWroute-views-data
+CHECKPKG_OVERRIDES_CSWmod-asn-utils += surplus-dependency|CSWroute-views-data
+# For asn_import
+RUNTIME_DEP_PKGS_CSWmod-asn-utils += CSWpy-psycopg2
+CHECKPKG_OVERRIDES_CSWmod-asn-utils += surplus-dependency|CSWpy-psycopg2
+
 REINPLACEMENTS += cswpython
 REINPLACE_MATCH_cswpython = \#!/usr/bin/env\ python
 REINPLACE_WITH_cswpython = \#!/opt/csw/bin/python
@@ -24,7 +40,7 @@
 REINPLACE_FILES_cswpython += asn_import.py
 
 REINPLACEMENTS += importconf
-REINPLACE_MATCH_importconf = /etc/etc/asn_import.conf
+REINPLACE_MATCH_importconf = /etc/asn_import.conf
 REINPLACE_WITH_importconf = $(sysconfdir)/asn_import.conf
 REINPLACE_FILES_importconf += asn_import.py
 

Added: csw/mgar/pkg/mod_asn/trunk/files/0001-Do-not-download-routeviews.patch
===================================================================
--- csw/mgar/pkg/mod_asn/trunk/files/0001-Do-not-download-routeviews.patch	                        (rev 0)
+++ csw/mgar/pkg/mod_asn/trunk/files/0001-Do-not-download-routeviews.patch	2013-11-27 21:06:33 UTC (rev 22593)
@@ -0,0 +1,45 @@
+From f13c5d16afeb23c23aeff4c8bd042d0adb3d0ffe Mon Sep 17 00:00:00 2001
+From: Dagobert Michelsen <dam at opencsw.org>
+Date: Tue, 26 Nov 2013 17:01:42 +0100
+Subject: [PATCH] Do not download routeviews
+
+---
+ asn_get_routeviews.py | 16 ++++++++--------
+ 1 file changed, 8 insertions(+), 8 deletions(-)
+
+diff --git a/asn_get_routeviews.py b/asn_get_routeviews.py
+index ada1cc4..8ebda83 100755
+--- a/asn_get_routeviews.py
++++ b/asn_get_routeviews.py
+@@ -8,20 +8,20 @@ import urllib
+ # the data snapshot that we need is put into monthly directories, like this:
+ # example url: 'http://archive.routeviews.org/oix-route-views/2008.11/oix-full-snapshot-latest.dat.bz2'
+ 
+-filename = 'oix-full-snapshot-latest.dat.bz2'
++filename = '/opt/csw/share/routeviews/oix-full-snapshot-latest.dat.bz2'
+ #url = 'http://archive.routeviews.org/oix-route-views/%s/%s' \
+ #        % (time.strftime("%Y.%m", time.gmtime()), filename)
+ 
+ # mirrored daily from archive.routeviews.org, to save routeviews.org the traffic
+ url = 'http://mirrorbrain.org/routeviews/%s' % filename
+ 
+-if os.path.exists(filename) \
+-   and (time.time() - os.path.getmtime(filename)) < (60 * 60 * 8):
+-    print >>sys.stderr, 'Using existing file, because it is less than 8h old.'
+-    print >>sys.stderr, 'Remove it to have it downloaded again.'
+-else:
+-    print >>sys.stderr, 'Downloading', url
+-    urllib.urlretrieve(url, filename=filename)
++#if os.path.exists(filename) \
++#   and (time.time() - os.path.getmtime(filename)) < (60 * 60 * 8):
++#    print >>sys.stderr, 'Using existing file, because it is less than 8h old.'
++#    print >>sys.stderr, 'Remove it to have it downloaded again.'
++#else:
++#    print >>sys.stderr, 'Downloading', url
++#    urllib.urlretrieve(url, filename=filename)
+ 
+ 
+ 
+-- 
+1.8.4.1
+

This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.



More information about the devel mailing list