--- nfdump-1.6.1.orig/bin/version.h +++ nfdump-1.6.1/bin/version.h @@ -35,7 +35,7 @@ * * */ - + #ifndef _VERSION_H #define _VERSION_H 1 --- nfdump-1.6.1.orig/debian/compat +++ nfdump-1.6.1/debian/compat @@ -0,0 +1 @@ +5 --- nfdump-1.6.1.orig/debian/copyright +++ nfdump-1.6.1/debian/copyright @@ -0,0 +1,60 @@ +This package was debianized by Erik Wenzel erik@debian.org on +Wed Oct 25 17:55:38 UTC 2006 + +It was downloaded from: +http://sf.net/nfdump/ + +Upstream Author: +Peter Haag + + Copyright (c) 2004-2006, SWITCH - Teleinformatikdienste fuer Lehre und + Forschung + +COPYRIGHT : + +ipconv.h, ipconv.c: Copyright (c) 1996 by Internet Software Consortium +Licence. ISC Licence is BSD like licence. + Copyright (c) 1996 by Internet Software Consortium. + + Permission to use, copy, modify, and distribute this software for any + purpose with or without fee is hereby granted, provided that the above + copyright notice and this permission notice appear in all copies. + + THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS + ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES + OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE + CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL + DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR + PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS + ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS + SOFTWARE. + +Every other file not mentioned explicity has BSD Licence: + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of SWITCH nor the names of its contributors may be + used to endorse or promote products derived from this software without + specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE + LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +Public License can be found in `/usr/share/common-licenses/BSD'. + + --- nfdump-1.6.1.orig/debian/README.Debian +++ nfdump-1.6.1/debian/README.Debian @@ -0,0 +1,17 @@ +Script nfclean.pl is installed in examples/ directory and can be used to clean +up files nfcapd created. For a detailed description read nfclean.pl. + +New option nfcapd_start is disabled in /etc/default/nfdump by default. This +prevents nfdump to start a nfcapd daemon on installation. This is default, +because most people install nfdump as a dependency from nfsen. And nfsen is +controlling nfcapd on its own. + +HOWTO enable optional sflow and/or flow-tools support: +$ apt-get source nfdump + +sflow: create sflow-tools and sflow-tools-dev debian packages. Install these packages enable configure argument in debian/rules and rebuild nfdump. + +flow-tools: install flow-tools-dev and enable configure parameter in debian/rules and rebuild nfdump. + +The package currently contains patches that are not in upstream release: +05_division-by-zero.patch --- nfdump-1.6.1.orig/debian/watch +++ nfdump-1.6.1/debian/watch @@ -0,0 +1,2 @@ +version=3 +http://sf.net/nfdump/nfdump-([\d.]+)\.tar\.gz debian uupdate --- nfdump-1.6.1.orig/debian/dirs +++ nfdump-1.6.1/debian/dirs @@ -0,0 +1 @@ +var/cache/nfdump --- nfdump-1.6.1.orig/debian/rules +++ nfdump-1.6.1/debian/rules @@ -0,0 +1,68 @@ +#!/usr/bin/make -f + +#DEB_BUILD_OPTIONS=nostrip + +include /usr/share/cdbs/1/rules/debhelper.mk +#include /usr/share/cdbs/1/rules/dpatch.mk +include /usr/share/cdbs/1/rules/simple-patchsys.mk +include /usr/share/cdbs/1/class/autotools.mk +include /usr/share/cdbs/1/class/makefile.mk + +# Enable extra configure flags + +# Enable compatability mode +DEB_CONFIGURE_EXTRA_FLAGS +=--enable-compat15 --enable-nfprofile + +# Build nfdump with nfprofile for nfsen +# --enable-nfprofile + +# Build ft2nfdump converter. The flow-tools +# sources are required to build ft2nfdump. +# --enable-ftconv +# --with-ftpath[=flow-tools sources] + +# When using SUNWspro CC on Solaris, you may +# compile 64 bit code. +# --enable-64 +# +# Build sflow collector daemon. +# --enable-sflow + +# define clean taget +DEB_MAKE_CLEAN_TARGET = distclean + +# That will avoid passing CFLAGS +DEB_MAKE_INVOKE = $(DEB_MAKE_ENVVARS) make -C $(DEB_BUILDDIR) + +DEB_MAKE_INSTALL_TARGET = install DESTDIR=$(CURDIR)/debian/nfdump/ + +# this is temporarily needed because of a cdbs issue +#unpatch: deapply-dpatches + +# I store every patch in a seperate branch and use refresh-patches to generate +# patches used by debian package. THIS IS JUST A TEMPLATE STOLEN from +# tokyocabinet package. +refresh-patches: + @dh_testdir + @echo 'refreshing debian/patches:' + @rm -rf '$(CURDIR)'/debian/patches + @mkdir -p '$(CURDIR)'/debian/patches + cd '$(CURDIR)'/debian/patches && \ + for each in `cat ../git-active-patches | egrep -v '^#|^ *$$' | sort` ; do \ + git diff upstream..upstream-patches/`echo $$each | cut -d_ -f2-` > $$each.patch; \ + done + @echo . +# +#patch: patch-stamp +#patch-stamp: +# dh_testdir +# set -e; test -e patch-stamp || \ +# for i in `ls -1 debian/patches/*.patch || :`; do patch -p1 <$$i > /dev/null; done +# touch $@ +# +#unpatch: +# dh_testdir +# set -e; ! test -e patch-stamp || \ +# for i in `ls -1r debian/patches/*.patch || :`; do patch -p1 -R <$$i > /dev/null; done +# rm -f patch-stamp + --- nfdump-1.6.1.orig/debian/nfdump.default +++ nfdump-1.6.1/debian/nfdump.default @@ -0,0 +1,2 @@ +# nfcapd is controlled by nfsen +nfcapd_start=no --- nfdump-1.6.1.orig/debian/init.d +++ nfdump-1.6.1/debian/init.d @@ -0,0 +1,158 @@ +#! /bin/sh +### BEGIN INIT INFO +# Provides: nfcapd +# Required-Start: $remote_fs $network +# Required-Stop: $remote_fs +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# Short-Description: netflow capture daemon +# Description: nfcapd is the netflow capture daemon of the nfdump tools. +### END INIT INFO + +# Author: Erik Wenzel + +# Do NOT "set -e" + +# PATH should only include /usr/* if it runs after the mountnfs.sh script +PATH=/sbin:/usr/sbin:/bin:/usr/bin +DESC="netflow capture daemon" +NAME=nfcapd +DAEMON=/usr/bin/$NAME +DATA_BASE_DIR="/var/cache/nfdump" +PIDFILE=/var/run/$NAME.pid +DAEMON_ARGS="-D -l $DATA_BASE_DIR -P $PIDFILE" +SCRIPTNAME=/etc/init.d/nfdump + +# Exit if the package is not installed +[ -x "$DAEMON" ] || exit 0 + +# Read configuration variable file if it is present +[ -r /etc/default/nfdump ] && . /etc/default/nfdump + +# Load the VERBOSE setting and other rcS variables +. /lib/init/vars.sh + +# Define LSB log_* functions. +# Depend on lsb-base (>= 3.0-6) to ensure that this file is present. +. /lib/lsb/init-functions + +# +# Function that starts the daemon/service +# +do_start() +{ + # Don't start daemon in this mode. Defined in /etc/default/nfdump + if [ x"$nfcapd_start" = xno ] + then + [ "$VERBOSE" != no ] && log_warning_msg "nfdump daemon not enabled in /etc/default/nfdump, not starting..." + return 0 + fi + # Return + # 0 if daemon has been started + # 1 if daemon was already running + # 2 if daemon could not be started + start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON --test > /dev/null \ + || return 1 + start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON -- \ + $DAEMON_ARGS \ + || return 2 + # Add code here, if necessary, that waits for the process to be ready + # to handle requests from services started subsequently which depend + # on this one. As a last resort, sleep for some time. +} + +# +# Function that stops the daemon/service +# +do_stop() +{ + # Return + # 0 if daemon has been stopped + # 1 if daemon was already stopped + # 2 if daemon could not be stopped + # other if a failure occurred + start-stop-daemon --stop --quiet --retry=TERM/30/KILL/5 --pidfile $PIDFILE --name $NAME + RETVAL="$?" + [ "$RETVAL" = 2 ] && return 2 + # Wait for children to finish too if this is a daemon that forks + # and if the daemon is only ever run from this initscript. + # If the above conditions are not satisfied then add some other code + # that waits for the process to drop all resources that could be + # needed by services started subsequently. A last resort is to + # sleep for some time. + # + # Disabled second call, because is kills nfsen controlled nfcapd + #start-stop-daemon --stop --quiet --oknodo --retry=0/30/KILL/5 --exec $DAEMON + #[ "$?" = 2 ] && return 2 + # Many daemons don't delete their pidfiles when they exit. + rm -f $PIDFILE + return "$RETVAL" +} + +# +# Function that sends a SIGHUP to the daemon/service +# +do_reload() { + # + # If the daemon can reload its configuration without + # restarting (for example, when it is sent a SIGHUP), + # then implement that here. + # + start-stop-daemon --stop --signal 1 --quiet --pidfile $PIDFILE --name $NAME + return 0 +} + +case "$1" in + start) + [ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC" "$NAME" + do_start + case "$?" in + 0|1) [ q"$VERBOSE" != qno ] && log_end_msg 0 ;; + 2) [ p"$VERBOSE" != pno ] && log_end_msg 1 ;; + esac + ;; + stop) + [ "$VERBOSE" != no ] && log_daemon_msg "Stopping $DESC" "$NAME" + do_stop + case "$?" in + 0|1) [ "r$VERBOSE" != rno ] && log_end_msg 0 ;; + 2) [ "s$VERBOSE" != sno ] && log_end_msg 1 ;; + esac + ;; + #reload|force-reload) + # + # If do_reload() is not implemented then leave this commented out + # and leave 'force-reload' as an alias for 'restart'. + # + #log_daemon_msg "Reloading $DESC" "$NAME" + #do_reload + #log_end_msg $? + #;; + restart|force-reload) + # + # If the "reload" option is implemented then remove the + # 'force-reload' alias + # + log_daemon_msg "Restarting $DESC" "$NAME" + do_stop + case "$?" in + 0|1) + do_start + case "$?" in + 0|1) log_end_msg 0 ;; + *) log_end_msg 1 ;; # Failed to start + esac + ;; + *) + # Failed to stop + log_end_msg 1 + ;; + esac + ;; + *) + #echo "Usage: $SCRIPTNAME {start|stop|restart|reload|force-reload}" >&2 + echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload}" >&2 + exit 3 + ;; +esac +exit 0 --- nfdump-1.6.1.orig/debian/README.source +++ nfdump-1.6.1/debian/README.source @@ -0,0 +1,9 @@ +Patches under debian/patches are generated by: +$ debian/rules refresh-patches +$ git commit + +Patches are handled by simple-patchsys.mk. 'refresh-patches' checks for +git topic branches under 'upstream-patches/' and a 4 digits number in +debian/git-active-patches and creates patch files under debian/patches. + +The package is build using git, git-buildpackage, debhelper and cdbs. --- nfdump-1.6.1.orig/debian/git-active-patches +++ nfdump-1.6.1/debian/git-active-patches @@ -0,0 +1 @@ +# comment --- nfdump-1.6.1.orig/debian/changelog +++ nfdump-1.6.1/debian/changelog @@ -0,0 +1,171 @@ +nfdump (1.6.1-1~karmic~ppa1) karmic; urgency=low + + * Backport to Karmic -- No Source Changes + + -- Micah Gersten Thu, 08 Jul 2010 18:37:49 -0500 + +nfdump (1.6.1-1) unstable; urgency=low + + * [d3a4ca64] Imported Upstream version 1.6.1 + * [f71782c6] [init.d] add remote_fs + * [15199559] [control] bumped standards version. nothing changed + + -- Erik Wenzel Sun, 14 Mar 2010 01:17:52 +0100 + +nfdump (1.6-1) unstable; urgency=low + + * [85b1631d] Import from tar version 1.6 because of upstream merge + conflicts + * [804a4fab] [rules] added compatibility mode for 1.5 + * [491342e6] [rules] added non-default nfprofile option + + -- Erik Wenzel Sat, 16 Jan 2010 01:19:34 +0100 + +nfdump (1.5.8-2) unstable; urgency=low + + * [c2ee06bf] [init.d] changed exit code handling (Closes: 534559) + * [15396d53] [control] changed section for dbg package to debug + * [5c087d4d] [control] bumped standards version + + -- Erik Wenzel Mon, 26 Oct 2009 00:03:16 +0100 + +nfdump (1.5.8-1) unstable; urgency=low + + * [cd191141] [control] added build-depends to librrd-dev + * [6a54fb1c] [init.d] fixed exit code handling in restart case + * [fc53c30b] [watch] tighten rule to exclude snapshot releases + * [4e5cfe3e] Imported Upstream version 1.5.8 + * [77382372] [control] bumped standard versions (nothing changed) + + -- Erik Wenzel Mon, 27 Jul 2009 23:17:16 +0200 + +nfdump (1.5.7+20081221-3) unstable; urgency=low + + * [7f7122f1] [init.d] fixed typo which led to a unusable script + + -- Erik Wenzel Mon, 02 Feb 2009 21:36:52 +0100 + +nfdump (1.5.7+20081221-2) unstable; urgency=low + + * [a2d2c942] added pidfile option to daemon args (Closes: 484526) - + thanks to Jorik Jonker Remco Post + + * [68397ec4] added nfcapd control mode and is enabled by default + + -- Erik Wenzel Mon, 02 Feb 2009 14:49:15 +0100 + +nfdump (1.5.7+20081221-1) unstable; urgency=low + + * [3776e2b4] disabled nostrip build option + * [ef42d53e] Imported Upstream version snapshot-1.5.7-20081221 + * [153e86f2] [patch] removed 0005_division-zero-generic2 + * [bd492712] renamed debian.source to README.source + * [e1b7ad5c] [control] added misc depends + * [016d4774] updated README.source + * [e25b8eb2] [changelog] removed latest revision entry + + -- Erik Wenzel Tue, 27 Jan 2009 04:29:01 +0100 + +nfdump (1.5.7-5) unstable; urgency=low + + * start daemon with DATA_BASE_DIR set to /var/cache/nfdump Closes: #497452 + * git-active-patches: added 0005_division-zero-generic2 + * git-active-patches: removed 0005_division-zero-generic + * git-active-patches: removed -05_division-by-zero + + -- Erik Wenzel Mon, 08 Sep 2008 00:55:36 +0000 + +nfdump (1.5.7-4) unstable; urgency=low + + * added feature "refresh patches" which creates patches from git + feature branches actived in debian/git-active-patches + * README.Debian: documented installed patches in packet + * debian.source: added. As documentation on building the packages + + -- Erik Wenzel Fri, 18 Jul 2008 12:24:53 +0000 + +nfdump (1.5.7-3) unstable; urgency=low + + * bumped Standards-Version + * debian/{init.d,README.Debian} accidenly removed from + package (Closes: #484519) + + -- Erik Wenzel Sat, 28 Jun 2008 22:12:29 +0000 + +nfdump (1.5.7-2) unstable; urgency=low + + * added compat + * added DebTags + * added watch file + * fixed build-dependencies + + -- Erik Wenzel Thu, 27 Mar 2008 21:52:06 +0000 + +nfdump (1.5.7-1) unstable; urgency=low + + * New upstream release + + -- Erik Wenzel Tue, 18 Mar 2008 12:45:17 +0000 + +nfdump (1.5.6-1) unstable; urgency=low + + * Updated to new upstream version + * [control] removed dep to dpatch + * [rules] added nfprofile + * [control] added dependency for librrd2-dev + * [control] Standards-Version bumped to 3.7.3 (nothing changed) + + -- Erik Wenzel Thu, 17 Jan 2008 06:26:37 +0000 + +nfdump (1.5.5-1) unstable; urgency=low + + * New Upstream Version + * removed unused patches + * removed debian/examples + * this version was not released + + -- Erik Wenzel Fri, 21 Dec 2007 11:15:05 +0000 + +nfdump (1.5.2-6) unstable; urgency=low + + * included ISC Licence text in debian/copyright + + -- Erik Wenzel Fri, 12 Jan 2007 09:16:27 +0000 + +nfdump (1.5.2-5) unstable; urgency=low + + * removed dpatch version from debian/control + + -- Erik Wenzel Tue, 9 Jan 2007 21:39:12 +0000 + +nfdump (1.5.2-4) unstable; urgency=low + + * updated debian/copyright + + -- Erik Wenzel Sat, 30 Dec 2006 19:47:29 +0000 + +nfdump (1.5.2-3) unstable; urgency=low + + * Added my self to maintainer in debian/control [Erik Wenzel] + + -- Erik Wenzel Sat, 2 Dec 2006 16:46:53 +0100 + +nfdump (1.5.2-2) unstable; urgency=low + + * added init script using lsb-base functions + * updated description in control file + * using dpatch + * [10_remove_nfclean_from_usr-bin]: install nfclean.pl into doc/examples + using. Added a note in README.Debian + * enabled compat14 mode in debian/rules + * [20_flow_tools_dev_path] changes path lib and include directories. This is + only needed when you use DEB_CONFIGURE_EXTRA_FLAGS += --enable-ftconv and + is currently disabled. + + -- Erik Wenzel Sat, 2 Dec 2006 16:20:29 +0100 + +nfdump (1.5.2-1) unstable; urgency=low + + * Initial release. (Closes: #322870) + + -- Erik Wenzel Fri, 27 Oct 2006 14:32:11 +0200 --- nfdump-1.6.1.orig/debian/control +++ nfdump-1.6.1/debian/control @@ -0,0 +1,34 @@ +Source: nfdump +Section: net +Priority: optional +Maintainer: Erik Wenzel +Homepage: http://nfdump.sourceforge.net/ +Vcs-Git: git://gpl.code.de/git/nfdump.git +Vcs-Browser: http://gpl.code.de/gitweb?p=nfdump.git;a=summary +Standards-Version: 3.8.4 +Build-Depends: cdbs (>= 0.4.25), bison, flex, debhelper (>= 5.0), librrd-dev + +Package: nfdump +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends}, lsb-base (>= 3.0-6) +Description: netflow capture daemon + Collects and processes netflow data with command line tools. Collected netflow + data is stored in filesystem and is limited by available storage space only. + Tools are optimized for speed and filtering. nfcapd reads netflow v5, v7 and + v9 flows transparently. You need one nfcapd process for each netflow stream. + Optional support for sFlow and flow-tools to nfdump conversion utilities are + available but needs re-compiliation. +Tag: admin::accounting, implemented-in::c, interface::commandline, interface::daemon, network::routing, network::scanner, network::server, protocol::TODO, protocol::ip, protocol::ipv6, protocol::tcp, protocol::udp, role::program, use::analysing, use::checking, use::filtering, use::monitor, use::viewing + +Package: nfdump-dbg +Section: debug +Priority: extra +Architecture: any +Depends: nfdump (= ${binary:Version}), ${misc:Depends}, lsb-base (>= 3.0-6) +Description: netflow capture daemon tools compiled with debugging symbols + Collects and processes netflow data with command line tools. Collected netflow + data is stored in filesystem and is limited by available storage space only. + Tools are optimized for speed and filtering. nfcapd reads netflow v5, v7 and + v9 flows transparently. You need one nfcapd process for each netflow stream. + Optional support for sFlow and flow-tools to nfdump conversion utilities are + available but needs re-compiliation.