From 56bd759df1d0c750a065b8c845e93d5dfa6b549d Mon Sep 17 00:00:00 2001 From: "Robin H. Johnson" Date: Sat, 8 Aug 2015 13:49:04 -0700 Subject: proj/gentoo: Initial commit MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This commit represents a new era for Gentoo: Storing the gentoo-x86 tree in Git, as converted from CVS. This commit is the start of the NEW history. Any historical data is intended to be grafted onto this point. Creation process: 1. Take final CVS checkout snapshot 2. Remove ALL ChangeLog* files 3. Transform all Manifests to thin 4. Remove empty Manifests 5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$ 5.1. Do not touch files with -kb/-ko keyword flags. Signed-off-by: Robin H. Johnson X-Thanks: Alec Warner - did the GSoC 2006 migration tests X-Thanks: Robin H. Johnson - infra guy, herding this project X-Thanks: Nguyen Thai Ngoc Duy - Former Gentoo developer, wrote Git features for the migration X-Thanks: Brian Harring - wrote much python to improve cvs2svn X-Thanks: Rich Freeman - validation scripts X-Thanks: Patrick Lauer - Gentoo dev, running new 2014 work in migration X-Thanks: Michał Górny - scripts, QA, nagging X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed --- net-analyzer/ndsad/Manifest | 1 + .../ndsad/files/ndsad-1.33-conf_path.patch | 11 ++++++ net-analyzer/ndsad/files/ndsad-1.33-gentoo.patch | 23 +++++++++++ net-analyzer/ndsad/files/ndsad-1.33-getpid.patch | 10 +++++ net-analyzer/ndsad/files/ndsad-1.33-log-path.patch | 11 ++++++ .../ndsad/files/ndsad-1.33-strncpy-overflow.patch | 12 ++++++ net-analyzer/ndsad/files/ndsad.conf.d | 9 +++++ net-analyzer/ndsad/files/ndsad.init | 33 ++++++++++++++++ net-analyzer/ndsad/metadata.xml | 22 +++++++++++ net-analyzer/ndsad/ndsad-1.33-r1.ebuild | 46 ++++++++++++++++++++++ 10 files changed, 178 insertions(+) create mode 100644 net-analyzer/ndsad/Manifest create mode 100644 net-analyzer/ndsad/files/ndsad-1.33-conf_path.patch create mode 100644 net-analyzer/ndsad/files/ndsad-1.33-gentoo.patch create mode 100644 net-analyzer/ndsad/files/ndsad-1.33-getpid.patch create mode 100644 net-analyzer/ndsad/files/ndsad-1.33-log-path.patch create mode 100644 net-analyzer/ndsad/files/ndsad-1.33-strncpy-overflow.patch create mode 100644 net-analyzer/ndsad/files/ndsad.conf.d create mode 100644 net-analyzer/ndsad/files/ndsad.init create mode 100644 net-analyzer/ndsad/metadata.xml create mode 100644 net-analyzer/ndsad/ndsad-1.33-r1.ebuild (limited to 'net-analyzer/ndsad') diff --git a/net-analyzer/ndsad/Manifest b/net-analyzer/ndsad/Manifest new file mode 100644 index 000000000000..23e397dfa101 --- /dev/null +++ b/net-analyzer/ndsad/Manifest @@ -0,0 +1 @@ +DIST ndsad-1.33.tgz 214614 SHA256 a46403ff15c03b45b479832f5e6d861ec4d6474ef953f7965ae0239c90b9026b SHA512 38ebca91f28d763ce334d92361779f100ee6b98d6d17485bf096f913f777e8525add63bd73aeea43321cee622e10cb88020aca7af492fbafdd50cf740510bd51 WHIRLPOOL e5e202eab7fc16120f1a56d7691fbdb36c4a9af65cc4ec5fd9d39f0d515937ef29fccd6c08d948ddfaf30552dc0b7af63a395f731704c3fa79d7bbf935b81ba8 diff --git a/net-analyzer/ndsad/files/ndsad-1.33-conf_path.patch b/net-analyzer/ndsad/files/ndsad-1.33-conf_path.patch new file mode 100644 index 000000000000..cf3c827cdde7 --- /dev/null +++ b/net-analyzer/ndsad/files/ndsad-1.33-conf_path.patch @@ -0,0 +1,11 @@ +--- a/ndsad.cc ++++ b/ndsad.cc +@@ -12,7 +12,7 @@ + */ + + +-#define conf_path "/netup/utm5/ndsad.cfg" ++#define conf_path "/etc/ndsad.conf" + + #include "pcap.local.h" + diff --git a/net-analyzer/ndsad/files/ndsad-1.33-gentoo.patch b/net-analyzer/ndsad/files/ndsad-1.33-gentoo.patch new file mode 100644 index 000000000000..3ccbe3432932 --- /dev/null +++ b/net-analyzer/ndsad/files/ndsad-1.33-gentoo.patch @@ -0,0 +1,23 @@ +--- a/configure.in ++++ b/configure.in +@@ -24,9 +24,6 @@ + AC_DEFINE(OS_BSD, 2,[BSD OS code]) + AC_DEFINE(OS_SOLARIS, 3,[SOLARIS on SPARC code]) + +-CFLAGS=-g +-CXXFLAGS=-g +- + AC_CHECK_LIB(pcap, pcap_loop, [LIBS="$LIBS -lpcap"; __ac_have_libpcap=1;], [ break ]) + + case "$host_os" in +--- a/Makefile.am ++++ b/Makefile.am +@@ -1,6 +1,6 @@ +-bin_PROGRAMS = ndsad ++sbin_PROGRAMS = ndsad + + ndsad_SOURCES = linux_ulog.cc linux_ulog.h debug.h eth-hndl.h handlers.h iflist.h iptonf.h ldefs.h logger.h mempool.h nethdr.h nfc.h nf.h ppp-hndl.h thr.h config.cc debug.cc eth-hndl.cc handlers.cc iflist.cc iptonf.cc logger.cc mempool.cc ndsad.cc nf.cc nfc.cc ppp-hndl.cc thr.cc bsd_divert.cc bsd_divert.h + +-ndsad_CXXFLAGS = $(AM_CXXFLAGS) -O0 -fno-inline -g -ftemplate-depth-32 ++ndsad_CXXFLAGS = $(AM_CXXFLAGS) -fno-inline -ftemplate-depth-32 + ndsad_LDFLAGS = $(AM_LDFLAGS) diff --git a/net-analyzer/ndsad/files/ndsad-1.33-getpid.patch b/net-analyzer/ndsad/files/ndsad-1.33-getpid.patch new file mode 100644 index 000000000000..c0e6d94a301c --- /dev/null +++ b/net-analyzer/ndsad/files/ndsad-1.33-getpid.patch @@ -0,0 +1,10 @@ +--- a/linux_ulog.h ++++ b/linux_ulog.h +@@ -8,6 +8,7 @@ + #include + #include + #include ++#include /* getpid() */ + #include + + /// linux specific headers! diff --git a/net-analyzer/ndsad/files/ndsad-1.33-log-path.patch b/net-analyzer/ndsad/files/ndsad-1.33-log-path.patch new file mode 100644 index 000000000000..fbeab07fb7a0 --- /dev/null +++ b/net-analyzer/ndsad/files/ndsad-1.33-log-path.patch @@ -0,0 +1,11 @@ +--- a/ndsad.conf ++++ b/ndsad.conf +@@ -75,7 +75,7 @@ + # Default: + #log (null) + # Example: +-log /tmp/ndsad.log ++log /var/log/ndsad.log + + # Jump to another configuration file + # Current file is closed after this line! Beware of loops! diff --git a/net-analyzer/ndsad/files/ndsad-1.33-strncpy-overflow.patch b/net-analyzer/ndsad/files/ndsad-1.33-strncpy-overflow.patch new file mode 100644 index 000000000000..5078f1555ec6 --- /dev/null +++ b/net-analyzer/ndsad/files/ndsad-1.33-strncpy-overflow.patch @@ -0,0 +1,12 @@ +--- a/handlers.h ++++ b/handlers.h +@@ -30,7 +30,8 @@ + #ifdef WIN32 + #define IFN_SIZE 512 // on windows iface names are VEERY long + #else +-#define IFN_SIZE 32 // iface name size. As in linux/sockios.h ++#include ++#define IFN_SIZE IFNAMSIZ // iface name size. As in linux/sockios.h + #endif + + #define MPH_IFLIST 0x2 // iface type - for mempool diff --git a/net-analyzer/ndsad/files/ndsad.conf.d b/net-analyzer/ndsad/files/ndsad.conf.d new file mode 100644 index 000000000000..2f843f84ed3d --- /dev/null +++ b/net-analyzer/ndsad/files/ndsad.conf.d @@ -0,0 +1,9 @@ +# Copyright 1999-2006 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +# See config file /etc/ndsad.conf for configuration options. + +# If you want to add any extra command line options to be used by ndsad on +# start-up put them here. +NDSAD_OPTS="" diff --git a/net-analyzer/ndsad/files/ndsad.init b/net-analyzer/ndsad/files/ndsad.init new file mode 100644 index 000000000000..8221abdda9a7 --- /dev/null +++ b/net-analyzer/ndsad/files/ndsad.init @@ -0,0 +1,33 @@ +#!/sbin/runscript +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +depend() { + need net +} + +checkconfig() { + if [ ! -f /etc/ndsad.conf ] ; then + eerror "/etc/ndsad.conf does not file exists!" + return 1 + fi + + return 0 +} + +start() { + # Comment out the following line to get faster startups + checkconfig || return 1 + + ebegin "Starting ndsad" + # On success ndsad returns 1. + start-stop-daemon --start --quiet --exec /usr/sbin/ndsad -- -d ${NDSAD_OPTS} >/dev/null 2>&1 + eend $(( $? - 1 )) +} + +stop () { + ebegin "Stopping ndsad" + start-stop-daemon --stop --quiet --pidfile=/run/ndsad.pid --retry 20 >/dev/null + eend $? +} diff --git a/net-analyzer/ndsad/metadata.xml b/net-analyzer/ndsad/metadata.xml new file mode 100644 index 000000000000..251ca58e234d --- /dev/null +++ b/net-analyzer/ndsad/metadata.xml @@ -0,0 +1,22 @@ + + + + netmon + + The NetUP ndsad (NetUp Data Stream Accounting Daemon) utility captures + IP-traffic from network interfaces and export NetFlow v.5. Data is + gathered from libpcap library on Unix and from winpcap on Windows. Also + you are able to use tee/divert sockets on FreeBSD and ULOG on Linux for + data source. + + + Демон ndsad (NetUp Data Stream Accounting Daemon) компании Нетап + захватывает сетевой трафик с сетевых интерфейсов и экспортирует его в + NetFlow v.5. Трафик собирается при помощи библиотеки libpcap в Unix или + winpcap в Windows. В качестве источника данных вы также можете + использовать tee/divert сокеты в FreeBSD и ULOG в Linux. + + + ndsad + + diff --git a/net-analyzer/ndsad/ndsad-1.33-r1.ebuild b/net-analyzer/ndsad/ndsad-1.33-r1.ebuild new file mode 100644 index 000000000000..3b8e21aeb43c --- /dev/null +++ b/net-analyzer/ndsad/ndsad-1.33-r1.ebuild @@ -0,0 +1,46 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 +inherit autotools eutils + +DESCRIPTION="Cisco netflow probe from libpcap, ULOG, tee/divert sources" +HOMEPAGE="http://sourceforge.net/projects/ndsad" +SRC_URI="mirror://sourceforge/ndsad/ndsad-${PV}.tgz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="x86" + +DEPEND=">=net-libs/libpcap-0.8" +RDEPEND="${DEPEND}" + +src_prepare() { + epatch \ + "${FILESDIR}"/${P}-conf_path.patch \ + "${FILESDIR}"/${P}-gentoo.patch \ + "${FILESDIR}"/${P}-getpid.patch \ + "${FILESDIR}"/${P}-log-path.patch \ + "${FILESDIR}"/${P}-strncpy-overflow.patch + + eautoreconf +} + +src_configure() { + econf --with-ulog=yes +} + +DOCS=( ChangeLog AUTHORS README ) + +src_install() { + default + + doman ndsad.conf.5 + + insinto /etc + newins ndsad.conf ndsad.conf + + newinitd "${FILESDIR}"/ndsad.init ndsad + newconfd "${FILESDIR}"/ndsad.conf.d ndsad +} -- cgit v1.2.3-65-gdbad