diff options
| author | Palica <palica+gitlab@liguros.net> | 2020-06-23 22:35:08 +0200 |
|---|---|---|
| committer | Palica <palica+gitlab@liguros.net> | 2020-06-23 22:35:08 +0200 |
| commit | ecdac123787b96ce6649f0f91da12ea6458cc2b1 (patch) | |
| tree | b89c74d9e6fe6e8aebc4c77bcbeb4ab73214127d /net-analyzer | |
| parent | 1be72aa41cf41dedadeecf59dca9f01de6381f5e (diff) | |
| download | baldeagleos-repo-ecdac123787b96ce6649f0f91da12ea6458cc2b1.tar.gz baldeagleos-repo-ecdac123787b96ce6649f0f91da12ea6458cc2b1.tar.xz baldeagleos-repo-ecdac123787b96ce6649f0f91da12ea6458cc2b1.zip | |
Updating liguros repo
Diffstat (limited to 'net-analyzer')
1720 files changed, 62384 insertions, 0 deletions
diff --git a/net-analyzer/2ping/2ping-4.4.1.ebuild b/net-analyzer/2ping/2ping-4.4.1.ebuild new file mode 100644 index 000000000000..9d31cd1228f9 --- /dev/null +++ b/net-analyzer/2ping/2ping-4.4.1.ebuild @@ -0,0 +1,27 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI="7" + +PYTHON_COMPAT=( python3_{7,8} ) + +inherit distutils-r1 + +DESCRIPTION="A bi-directional ping utility" +HOMEPAGE="https://www.finnie.org/software/2ping/" +SRC_URI="https://www.finnie.org/software/2ping/${P}.tar.gz" + +LICENSE="GPL-2+" +SLOT="0" +KEYWORDS="~amd64 ~arm ~mips ~ppc ~ppc64 ~x86" +IUSE="server" + +src_install() { + distutils-r1_src_install + doman doc/2ping.1 + dodoc doc/{2ping-protocol-examples.py,2ping-protocol.md} + use server && { + doinitd "${FILESDIR}"/2pingd + newconfd "${FILESDIR}"/2pingd.conf 2pingd + } +} diff --git a/net-analyzer/2ping/2ping-4.5.ebuild b/net-analyzer/2ping/2ping-4.5.ebuild new file mode 100644 index 000000000000..9d31cd1228f9 --- /dev/null +++ b/net-analyzer/2ping/2ping-4.5.ebuild @@ -0,0 +1,27 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI="7" + +PYTHON_COMPAT=( python3_{7,8} ) + +inherit distutils-r1 + +DESCRIPTION="A bi-directional ping utility" +HOMEPAGE="https://www.finnie.org/software/2ping/" +SRC_URI="https://www.finnie.org/software/2ping/${P}.tar.gz" + +LICENSE="GPL-2+" +SLOT="0" +KEYWORDS="~amd64 ~arm ~mips ~ppc ~ppc64 ~x86" +IUSE="server" + +src_install() { + distutils-r1_src_install + doman doc/2ping.1 + dodoc doc/{2ping-protocol-examples.py,2ping-protocol.md} + use server && { + doinitd "${FILESDIR}"/2pingd + newconfd "${FILESDIR}"/2pingd.conf 2pingd + } +} diff --git a/net-analyzer/2ping/Manifest b/net-analyzer/2ping/Manifest new file mode 100644 index 000000000000..a9c91c99119c --- /dev/null +++ b/net-analyzer/2ping/Manifest @@ -0,0 +1,2 @@ +DIST 2ping-4.4.1.tar.gz 75284 BLAKE2B 29240c9710417f735acbeb61e948634c7dd3b608084f4499cae97172f25a0951eab81db92743d452ce679d171107925cf35b9fa9fea82fb5551b11d83a23fcb1 SHA512 b40698488bd067a50be171566a0920920edb6bd0baea65999f2226fe66771770a1ebb3c1078bf8d633c555af3297e8f9925f5c42a3e9aa7cd48b59d6cb59e10b +DIST 2ping-4.5.tar.gz 77771 BLAKE2B 6471d06dede592e3161755d18fb08ae1d593dec0017cf7757ef1bcfcf9df7d4d7993edc14d44aaad7d7d683584906869ba957ef8096e38f362f8fd060c4f4e36 SHA512 0b1ac1c882becf1dda7207004b186d8052b21be4f842ac2b3a252c32a5610867761feadc12e237e4ed3e1da59b3cdebd8b8f8025ec3d0375193b2594f17215f0 diff --git a/net-analyzer/2ping/files/2pingd b/net-analyzer/2ping/files/2pingd new file mode 100644 index 000000000000..b558de2d18f6 --- /dev/null +++ b/net-analyzer/2ping/files/2pingd @@ -0,0 +1,35 @@ +#!/sbin/openrc-run +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +DAEMON="/usr/bin/2ping" +PIDFILE="/run/2ping.pid" + +depend() { + need net +} + +start() { + ebegin "Starting 2ping server" + start-stop-daemon --start \ + --background --make-pidfile \ + --pidfile "${PIDFILE}" \ + --exec "${DAEMON}" -- \ + --listen -q ${OPTS} \ + >/dev/null + eend $? +} + +stop() { + ebegin "Stopping 2ping server" + start-stop-daemon --stop --pidfile "${PIDFILE}" + eend $? +} + +restart() { + ebegin "Restarting 2ping server" + start-stop-daemon --stop --pidfile "${PIDFILE}" + sleep 1 + start-stop-daemon --start --exec "${DAEMON}" --pidfile "${PIDFILE}" + eend $? +} diff --git a/net-analyzer/2ping/files/2pingd.conf b/net-analyzer/2ping/files/2pingd.conf new file mode 100644 index 000000000000..12c263d3d054 --- /dev/null +++ b/net-analyzer/2ping/files/2pingd.conf @@ -0,0 +1,2 @@ +#Pass any extra 2ping server options here +#OPTS="--ipv6" diff --git a/net-analyzer/2ping/metadata.xml b/net-analyzer/2ping/metadata.xml new file mode 100644 index 000000000000..9e782849269e --- /dev/null +++ b/net-analyzer/2ping/metadata.xml @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>blueness@gentoo.org</email> + <name>Anthony G. Basile</name> + </maintainer> + <longdescription> + A bi-directional ping utility + </longdescription> + <use> + <flag name="server">Install the server init scripts.</flag> + </use> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/alive/Manifest b/net-analyzer/alive/Manifest new file mode 100644 index 000000000000..f4bb81d3f630 --- /dev/null +++ b/net-analyzer/alive/Manifest @@ -0,0 +1 @@ +DIST alive-2.0.2.tar.xz 174936 BLAKE2B f3998d1cbf81d77be449cf1157bc570837b87fd15a860041273059de69536ff9cab8d00b8cb1191b2d6d692b41fb3fa5863248267a86ad542326f48c8ab43730 SHA512 7e9c88f62ab5c0248d1e42b81e2106f43fc9587543782623e8a564ab99fd1d4a55058a175dc46d25520454c07f732101c7e62248ce992d1a8a615f531b1c090e diff --git a/net-analyzer/alive/alive-2.0.2-r1.ebuild b/net-analyzer/alive/alive-2.0.2-r1.ebuild new file mode 100644 index 000000000000..9ee866d5fd4c --- /dev/null +++ b/net-analyzer/alive/alive-2.0.2-r1.ebuild @@ -0,0 +1,33 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +inherit autotools + +DESCRIPTION="a periodic ping program" +HOMEPAGE="https://www.gnu.org/software/alive/" +SRC_URI="mirror://gnu/${PN}/${P}.tar.xz" + +LICENSE="GPL-3" +SLOT="0" +KEYWORDS="~amd64 ~hppa ~x86" + +COMMON_DEPEND=" + net-misc/iputils +" +DEPEND=" + app-arch/xz-utils + ${COMMON_DEPEND} +" +RDEPEND=" + dev-scheme/guile + ${COMMON_DEPEND} +" +PATCHES=( + "${FILESDIR}"/${P}-ping-test.patch +) + +src_prepare() { + default + eautoreconf +} diff --git a/net-analyzer/alive/files/alive-2.0.2-ping-test.patch b/net-analyzer/alive/files/alive-2.0.2-ping-test.patch new file mode 100644 index 000000000000..3b1b1257c9b3 --- /dev/null +++ b/net-analyzer/alive/files/alive-2.0.2-ping-test.patch @@ -0,0 +1,14 @@ +--- a/configure.ac ++++ b/configure.ac +@@ -35,11 +35,6 @@ + [alive_cv_nice_ping=yes], + [alive_cv_nice_ping=no])]) + +-dnl Luckily both inetutils-ping and iputils-ping are nice. +-AS_IF([test xno = x$alive_cv_nice_ping], +-[AC_MSG_ERROR([$PING does not support ‘-n -c 1’. +-Please install a ping program that does, and retry.])]) +- + AC_CONFIG_FILES([ + Makefile + src/Makefile diff --git a/net-analyzer/alive/metadata.xml b/net-analyzer/alive/metadata.xml new file mode 100644 index 000000000000..bd13a914477c --- /dev/null +++ b/net-analyzer/alive/metadata.xml @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<maintainer type="project"> + <email>netmon@gentoo.org</email> + <name>Gentoo network monitoring and analysis project</name> +</maintainer> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/amap/Manifest b/net-analyzer/amap/Manifest new file mode 100644 index 000000000000..df01ea68a292 --- /dev/null +++ b/net-analyzer/amap/Manifest @@ -0,0 +1 @@ +DIST amap-5.4.tar.gz 263331 BLAKE2B 683bcdd1ebb22dcd74c2ac20147ec5e5fe2bafb2452abda22a9a95c4d8fe1955394067b9a3765344674b48979cd56a99251d6359cd0247ac623da756a017a220 SHA512 e1a9f03940eded3eedad0028786f4ea6c18077072d52eb2f843ef0b4ff736bf1766c4bdb4eff52d3a8f6038d8f795e39be1c15bcae8283ddae8f40a7fff8647d diff --git a/net-analyzer/amap/amap-5.4-r1.ebuild b/net-analyzer/amap/amap-5.4-r1.ebuild new file mode 100644 index 000000000000..9848a4c18f2d --- /dev/null +++ b/net-analyzer/amap/amap-5.4-r1.ebuild @@ -0,0 +1,75 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +inherit eutils toolchain-funcs + +DESCRIPTION="A network scanning tool for pentesters" +HOMEPAGE="https://www.thc.org/thc-amap/" +SRC_URI="https://www.thc.org/releases/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~ppc ~ppc64 ~x86" +IUSE="libressl ssl" + +DEPEND=" + dev-libs/libpcre + ssl? ( + !libressl? ( dev-libs/openssl:0= ) + libressl? ( dev-libs/libressl:0= ) + ) +" +RDEPEND=" + ${DEPEND} + !sci-biology/amap +" + +src_prepare() { + rm -r pcre-3.9 || die + sed -i -e "s:etc/:share/amap/:g" amap-lib.c || die + # Above change requires below change. See sources... + sed -i '/strlen(AMAP_PREFIX/s: 5 : 12 :' amap-lib.c || die + sed -i 's:/usr/local:/usr:' amap.h || die + # Files to be updated are at different location, bug 207839. + sed -i '/AMAP_RESOURCE/s:www:freeworld:' amap.h || die + + sed -i '/DATADIR/s:/etc:/share/amap:' Makefile.am || die + + epatch "${FILESDIR}"/4.8-system-pcre.patch +} + +src_configure() { + # non-autotools configure script + ./configure || die + sed -i \ + -e '/^XDEFINES=/s:=.*:=:' \ + -e '/^XLIBS=/s:=.*:=:' \ + -e '/^XLIBPATHS/s:=.*:=:' \ + -e '/^XIPATHS=/s:=.*:=:' \ + -e "/^CC=/d" \ + Makefile || die + if use ssl ; then + sed -i \ + -e '/^XDEFINES=/s:=:=-DOPENSSL:' \ + -e '/^XLIBS=/s:=:=-lcrypto -lssl:' \ + Makefile || die + fi + sed -i Makefile \ + -e '/-o amap/{s|(OPT) |(OPT) $(LDFLAGS) |g}' \ + || die +} + +src_compile() { + emake CC=$(tc-getCC) OPT="${CFLAGS}" +} + +src_install() { + dobin amap amapcrap + insinto /usr/share/amap + doins appdefs.* + + doman ${PN}.1 + dodoc README TODO CHANGES +} diff --git a/net-analyzer/amap/amap-5.4.ebuild b/net-analyzer/amap/amap-5.4.ebuild new file mode 100644 index 000000000000..ef97cd2aec15 --- /dev/null +++ b/net-analyzer/amap/amap-5.4.ebuild @@ -0,0 +1,72 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +inherit eutils toolchain-funcs + +DESCRIPTION="A network scanning tool for pentesters" +HOMEPAGE="https://www.thc.org/thc-amap/" +SRC_URI="https://www.thc.org/releases/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="amd64 ppc ppc64 x86" +IUSE="ssl" + +DEPEND=" + dev-libs/libpcre + ssl? ( >=dev-libs/openssl-0.9.6j ) +" +RDEPEND=" + ${DEPEND} + !sci-biology/amap +" + +src_prepare() { + rm -r pcre-3.9 || die + sed -i -e "s:etc/:share/amap/:g" amap-lib.c || die + # Above change requires below change. See sources... + sed -i '/strlen(AMAP_PREFIX/s: 5 : 12 :' amap-lib.c || die + sed -i 's:/usr/local:/usr:' amap.h || die + # Files to be updated are at different location, bug 207839. + sed -i '/AMAP_RESOURCE/s:www:freeworld:' amap.h || die + + sed -i '/DATADIR/s:/etc:/share/amap:' Makefile.am || die + + epatch "${FILESDIR}"/4.8-system-pcre.patch +} + +src_configure() { + # non-autotools configure script + ./configure || die + sed -i \ + -e '/^XDEFINES=/s:=.*:=:' \ + -e '/^XLIBS=/s:=.*:=:' \ + -e '/^XLIBPATHS/s:=.*:=:' \ + -e '/^XIPATHS=/s:=.*:=:' \ + -e "/^CC=/d" \ + Makefile || die + if use ssl ; then + sed -i \ + -e '/^XDEFINES=/s:=:=-DOPENSSL:' \ + -e '/^XLIBS=/s:=:=-lcrypto -lssl:' \ + Makefile || die + fi + sed -i Makefile \ + -e '/-o amap/{s|(OPT) |(OPT) $(LDFLAGS) |g}' \ + || die +} + +src_compile() { + emake CC=$(tc-getCC) OPT="${CFLAGS}" +} + +src_install() { + dobin amap amapcrap + insinto /usr/share/amap + doins appdefs.* + + doman ${PN}.1 + dodoc README TODO CHANGES +} diff --git a/net-analyzer/amap/files/4.8-system-pcre.patch b/net-analyzer/amap/files/4.8-system-pcre.patch new file mode 100644 index 000000000000..097bfbf45eb5 --- /dev/null +++ b/net-analyzer/amap/files/4.8-system-pcre.patch @@ -0,0 +1,45 @@ +diff --exclude='*~' -urN amap-4.8.orig/amap-inc.h amap-4.8/amap-inc.h +--- amap-4.8.orig/amap-inc.h 2005-02-21 21:47:47.251638320 -0500 ++++ amap-4.8/amap-inc.h 2005-02-21 21:48:27.774477912 -0500 +@@ -20,7 +20,7 @@ + #include <errno.h> + #include <sys/resource.h> + #include <sys/wait.h> +-#include "pcre-3.9/pcre.h" ++#include <pcre.h> + #ifdef OPENSSL + #include <openssl/ssl.h> + #include <openssl/err.h> +diff --exclude='*~' -urN amap-4.8.orig/configure amap-4.8/configure +--- amap-4.8.orig/configure 2005-02-21 21:47:47.240639992 -0500 ++++ amap-4.8/configure 2005-02-21 21:48:41.379409648 -0500 +@@ -13,10 +13,6 @@ + exit 0 + fi + +-cd pcre-3.9 || exit 1 +-./configure || exit 1 +-cd .. +- + echo + echo + echo "Starting amap auto configuration ..." +diff --exclude='*~' -urN amap-4.8.orig/Makefile.am amap-4.8/Makefile.am +--- amap-4.8.orig/Makefile.am 2005-02-21 21:47:47.242639688 -0500 ++++ amap-4.8/Makefile.am 2005-02-21 21:49:16.070135856 -0500 +@@ -1,5 +1,5 @@ + CC=gcc +-LIB=-lpcre -L./pcre-3.9/ -I./pcre-3.9/ ++LIB=-lpcre + OPT=-O2 + OPT_DEBUG=-ggdb -Wall -lefence + BINDIR=/bin +@@ -7,7 +7,7 @@ + MANDIR=/man/man1 + SCRIPTS=appdefs.trig appdefs.resp appdefs.rpc + MANPAGE=amap.1 +-all: pcre strip ++all: amap amapcrap + + pcre: + cd pcre-3.9 && make diff --git a/net-analyzer/amap/metadata.xml b/net-analyzer/amap/metadata.xml new file mode 100644 index 000000000000..bd13a914477c --- /dev/null +++ b/net-analyzer/amap/metadata.xml @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<maintainer type="project"> + <email>netmon@gentoo.org</email> + <name>Gentoo network monitoring and analysis project</name> +</maintainer> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/angst/Manifest b/net-analyzer/angst/Manifest new file mode 100644 index 000000000000..7b9db686f0fe --- /dev/null +++ b/net-analyzer/angst/Manifest @@ -0,0 +1 @@ +DIST angst-0.4b.tar.gz 13909 BLAKE2B f08b9e489eaec5e2006ad8d84dc7586c6fb57c3d8585fb5cd769591ed56f4e5a4c2e0bdaf0ba02b40370ea99146ebfa02611d64b043949b27f6dfcbbdd2b16e5 SHA512 5584b1dd01d781cd34b594fcc8970764874599a1f15b1185066ee21c11cde23af148270c178d6a0b3436d71955aaf1cd904703f9dfb0c75d0b70c04d394fb449 diff --git a/net-analyzer/angst/angst-0.4b-r2.ebuild b/net-analyzer/angst/angst-0.4b-r2.ebuild new file mode 100644 index 000000000000..f06986f35421 --- /dev/null +++ b/net-analyzer/angst/angst-0.4b-r2.ebuild @@ -0,0 +1,41 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +inherit eutils toolchain-funcs + +DESCRIPTION="an active sniffer that provides methods for aggressive sniffing on switched LANs" +HOMEPAGE="http://angst.sourceforge.net/" +SRC_URI="http://angst.sourceforge.net/${P}.tar.gz" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~amd64 ~ppc x86" + +DEPEND="net-libs/libpcap + net-libs/libnet:1.0" +RDEPEND="${DEPEND}" + +src_prepare() { + cp -av Makefile.linux{,.orig} + epatch "${FILESDIR}"/${PV}-libnet-1.0.patch + sed -i Makefile.linux \ + -e 's|^CC =|CC ?=|g' \ + -e '/ -o angst /s|$(OBJS)|$(LDFLAGS) &|g' \ + || die +} + +src_compile() { + emake \ + CFLAGS="${CFLAGS}" \ + LDFLAGS="${LDFLAGS}" \ + CC="$(tc-getCC)" \ + -f Makefile.linux +} + +src_install() { + dosbin angst + doman angst.8 + dodoc README TODO ChangeLog +} diff --git a/net-analyzer/angst/angst-0.4b-r3.ebuild b/net-analyzer/angst/angst-0.4b-r3.ebuild new file mode 100644 index 000000000000..8054d460f586 --- /dev/null +++ b/net-analyzer/angst/angst-0.4b-r3.ebuild @@ -0,0 +1,45 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +inherit flag-o-matic toolchain-funcs + +DESCRIPTION="an active sniffer that provides methods for aggressive sniffing on switched LANs" +HOMEPAGE="http://angst.sourceforge.net/" +SRC_URI="http://angst.sourceforge.net/${P}.tar.gz" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~amd64 ~ppc ~x86" +IUSE="debug" + +DEPEND=" + net-libs/libpcap + net-libs/libnet:1.0 +" +RDEPEND=" + ${DEPEND} +" +PATCHES=( + "${FILESDIR}"/${PV}-flags.patch + "${FILESDIR}"/${PV}-libnet-1.0.patch +) + +src_configure() { + append-cflags -fcommon + use debug && append-cppflags -DDEBUG +} + +src_compile() { + emake \ + CFLAGS="${CFLAGS}" \ + LDFLAGS="${LDFLAGS}" \ + CC="$(tc-getCC)" \ + -f Makefile.linux +} + +src_install() { + dosbin angst + doman angst.8 + dodoc README TODO ChangeLog +} diff --git a/net-analyzer/angst/files/0.4b-flags.patch b/net-analyzer/angst/files/0.4b-flags.patch new file mode 100644 index 000000000000..1021faa5b539 --- /dev/null +++ b/net-analyzer/angst/files/0.4b-flags.patch @@ -0,0 +1,20 @@ +--- a/Makefile.linux ++++ b/Makefile.linux +@@ -5,7 +5,7 @@ + # + # $Id: Makefile.linux,v 1.6 2001/02/08 13:44:12 argp Exp $ + +-CC = gcc ++CC ?= gcc + INSTALL_DIR = /usr/bin/install -c -o root -g bin + INSTALL_SBIN = /usr/bin/install -c -s -o root -g bin -m 555 + INSTALL_MAN = /usr/bin/install -c -o root -g bin -m 444 +@@ -21,7 +21,7 @@ + all: angst + + angst: $(OBJS) +- $(CC) $(CFLAGS) -o angst $(DEFINE) $(OBJS) $(INCLUDE) $(LIBS) ++ $(CC) $(CFLAGS) -o angst $(DEFINE) $(LDFLAGS) $(OBJS) $(INCLUDE) $(LIBS) + + clean: + rm -f angst *.o missing/*.o *.core core diff --git a/net-analyzer/angst/files/0.4b-libnet-1.0.patch b/net-analyzer/angst/files/0.4b-libnet-1.0.patch new file mode 100644 index 000000000000..a2bcf1a18696 --- /dev/null +++ b/net-analyzer/angst/files/0.4b-libnet-1.0.patch @@ -0,0 +1,12 @@ +--- a/Makefile.linux ++++ b/Makefile.linux +@@ -14,2 +14,2 @@ +-LIBS = -L/usr/local/lib `libnet-config --libs` -lpcap +-DEFINE = `libnet-config --defines` -DLINUX #-DDEBUG ++LIBS = -L/usr/local/lib `libnet-1.0-config --libs` -lpcap ++DEFINE = `libnet-1.0-config --defines` -DLINUX #-DDEBUG +--- a/angst.h ++++ b/angst.h +@@ -12 +12 @@ +-#include <libnet.h> ++#include <libnet-1.0.h> diff --git a/net-analyzer/angst/metadata.xml b/net-analyzer/angst/metadata.xml new file mode 100644 index 000000000000..8280d86b5a0a --- /dev/null +++ b/net-analyzer/angst/metadata.xml @@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>netmon@gentoo.org</email> + <name>Gentoo network monitoring and analysis project</name> + </maintainer> + <longdescription>an active sniffer that provides methods for aggressive sniffing on switched LAN</longdescription> + <upstream> + <remote-id type="sourceforge">angst</remote-id> + </upstream> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/apinger/Manifest b/net-analyzer/apinger/Manifest new file mode 100644 index 000000000000..adcaf6163bc0 --- /dev/null +++ b/net-analyzer/apinger/Manifest @@ -0,0 +1 @@ +DIST apinger-0.4.1.tar.gz 26328 BLAKE2B 72eb19c043642dc00e02f24bfd8f3f9f704cc8a2fb5b5937756706db561dd7dc5173706c7ede73dde778964a516b7b138fe664c243db5351ac440fc80244c843 SHA512 b8a67149f43da5b6e240dee97315c31a3e6257f1de70da81a6aa63d1e1d7d5bff0b54abe5085a57e90eb7789b7fa8b83c09a51411a6247a81b6f99de3d83120f diff --git a/net-analyzer/apinger/apinger-0.4.1-r1.ebuild b/net-analyzer/apinger/apinger-0.4.1-r1.ebuild new file mode 100644 index 000000000000..9126a208502a --- /dev/null +++ b/net-analyzer/apinger/apinger-0.4.1-r1.ebuild @@ -0,0 +1,40 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +inherit autotools + +DESCRIPTION="Alarm Pinger" +HOMEPAGE="https://github.com/Jajcus/apinger/" +SRC_URI="https://github.com/Jajcus/apinger/archive/${PN^^}_${PV//./_}.tar.gz -> ${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64" + +DEPEND=" + sys-devel/flex + virtual/yacc +" +DOCS=( AUTHORS ChangeLog NEWS README TODO ) +PATCHES=( + "${FILESDIR}"/${PN}-0.4.1-fno-common.patch + "${FILESDIR}"/${PN}-0.4.1-stray-backslash.patch +) +S="${WORKDIR}/${PN}-${PN^^}_${PV//./_}" + +src_prepare() { + default + eautoreconf +} + +src_compile() { + emake -C src/ cfgparser1.h + default +} + +src_install() { + default + insinto /etc + doins src/${PN}.conf +} diff --git a/net-analyzer/apinger/apinger-0.4.1.ebuild b/net-analyzer/apinger/apinger-0.4.1.ebuild new file mode 100644 index 000000000000..2d71fd4dccf5 --- /dev/null +++ b/net-analyzer/apinger/apinger-0.4.1.ebuild @@ -0,0 +1,43 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 +inherit autotools + +# Switch to ^^ when we switch to EAPI=6. +#MY_PN="${PN^^}" +MY_PN="APINGER" +MY_P="${MY_PN}_${PV//./_}" + +DESCRIPTION="Alarm Pinger" +HOMEPAGE="https://github.com/Jajcus/apinger/" +SRC_URI="https://github.com/Jajcus/apinger/archive/${MY_P}.tar.gz -> ${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64" + +DEPEND=" + sys-devel/flex + virtual/yacc +" + +S="${WORKDIR}/${PN}-${MY_P}" + +DOCS=( AUTHORS ChangeLog NEWS README TODO ) + +src_prepare() { + sed -i -e 's|\\$||g' acinclude.m4 || die + eautoreconf +} + +src_compile() { + emake -C src/ cfgparser1.h + default +} + +src_install() { + default + insinto /etc + doins src/${PN}.conf +} diff --git a/net-analyzer/apinger/files/apinger-0.4.1-fno-common.patch b/net-analyzer/apinger/files/apinger-0.4.1-fno-common.patch new file mode 100644 index 000000000000..d74dc1c66f27 --- /dev/null +++ b/net-analyzer/apinger/files/apinger-0.4.1-fno-common.patch @@ -0,0 +1,11 @@ +--- a/src/apinger.h ++++ b/src/apinger.h +@@ -99,7 +99,7 @@ + void *target_id; + }; + +-struct target *targets; ++extern struct target *targets; + + extern int foreground; + extern char *config_file; diff --git a/net-analyzer/apinger/files/apinger-0.4.1-stray-backslash.patch b/net-analyzer/apinger/files/apinger-0.4.1-stray-backslash.patch new file mode 100644 index 000000000000..61db76fb9232 --- /dev/null +++ b/net-analyzer/apinger/files/apinger-0.4.1-stray-backslash.patch @@ -0,0 +1,13 @@ +--- acinclude.m4 ++++ b/acinclude.m4 +@@ -39,8 +39,8 @@ + [$jk_inet_includes + $jk_icmp_includes]) + +-AC_CHECK_MEMBERS([struct icmp.icmp_type, struct icmp.icmp_code,\ +-struct icmp.icmp_cksum, struct icmp.icmp_seq,\ ++AC_CHECK_MEMBERS([struct icmp.icmp_type, struct icmp.icmp_code, ++struct icmp.icmp_cksum, struct icmp.icmp_seq, + struct icmp.icmp_id],[], + AC_MSG_ERROR(struct icmp not defined or not compatible), + [$jk_inet_includes diff --git a/net-analyzer/apinger/metadata.xml b/net-analyzer/apinger/metadata.xml new file mode 100644 index 000000000000..d96ed7a08227 --- /dev/null +++ b/net-analyzer/apinger/metadata.xml @@ -0,0 +1,12 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>netmon@gentoo.org</email> + <name>Gentoo network monitoring and analysis project</name> + </maintainer> + <upstream> + <remote-id type="github">Jajcus/apinger</remote-id> + </upstream> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/argus-clients/Manifest b/net-analyzer/argus-clients/Manifest new file mode 100644 index 000000000000..e7263143904e --- /dev/null +++ b/net-analyzer/argus-clients/Manifest @@ -0,0 +1,2 @@ +DIST argus-clients-3.0.8.2.tar.gz 2776072 BLAKE2B 429a12d63f38ce1c5dae343be28543f3c8b6dd746661a893a0108db100762d60dec619cdccfff525b84c0843f0bb61c7e5d96df561a369e6df0d1e6a821d938a SHA512 20aac16bd6474b8f98c8fc86b21ad0b43aca62264c6de2f7f26eea876a90f7276cdaf2241a510a19ae445f40f5d0d05ec6a5869980b6889e6eb5937dbff0f855 +DIST argus-clients-3.0.8.tar.gz 2627515 BLAKE2B e7753ce1a65f24639c0c36d694033b038abb7cf835b89a1020edf72829f9196cad2a1be5958a28a51884c169ff7b4e295381501e61cf1e1eb1ee1557fccb6d8f SHA512 79022b3c3e472ebc526b27c20c25ae97abdb9a363a91ebbe3baf405f2aba9bdd80fbc0250b444d3d7ab4488e3c1325389a4719e92d9aded7598a91c3309369c2 diff --git a/net-analyzer/argus-clients/argus-clients-3.0.8.2-r2.ebuild b/net-analyzer/argus-clients/argus-clients-3.0.8.2-r2.ebuild new file mode 100644 index 000000000000..d87060d87bec --- /dev/null +++ b/net-analyzer/argus-clients/argus-clients-3.0.8.2-r2.ebuild @@ -0,0 +1,74 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 +inherit autotools toolchain-funcs + +DESCRIPTION="Clients for net-analyzer/argus" +HOMEPAGE="https://www.qosient.com/argus/" +SRC_URI="https://qosient.com/argus/dev/${P}.tar.gz" + +LICENSE="GPL-3" +SLOT="0" +KEYWORDS="~amd64 ~ppc ~x86" +IUSE="debug ft geoip mysql sasl tcpd" + +ARGUS_CDEPEND=" + net-analyzer/rrdtool[perl] + net-libs/libpcap + net-libs/libtirpc:= + sys-libs/ncurses:= + sys-libs/readline:= + sys-libs/zlib + ft? ( net-analyzer/flow-tools ) + geoip? ( dev-libs/geoip ) + mysql? ( dev-db/mysql-connector-c:0= ) + sasl? ( dev-libs/cyrus-sasl ) +" +RDEPEND=" + ${ARGUS_CDEPEND} +" +DEPEND=" + ${ARGUS_CDEPEND} + sys-devel/bison + sys-devel/flex + virtual/pkgconfig +" +PATCHES=( + "${FILESDIR}"/${PN}-3.0.4.1-disable-tcp-wrappers-automagic.patch + "${FILESDIR}"/${PN}-3.0.7.21-curses-readline.patch + "${FILESDIR}"/${PN}-3.0.8.2-rpc.patch + "${FILESDIR}"/${PN}-3.0.8.2-ar.patch + "${FILESDIR}"/${PN}-3.0.8.2-curses-readline.patch +) + +src_prepare() { + default + + eautoreconf +} + +src_configure() { + tc-export AR RANLIB + + use debug && touch .debug + econf \ + $(use_with ft libft) \ + $(use_with geoip GeoIP /usr/) \ + $(use_with sasl) \ + $(use_with tcpd wrappers) \ + $(use_with mysql mysql /usr) +} + +src_compile() { + emake \ + CCOPT="${CFLAGS} ${LDFLAGS}" \ + RANLIB=$(tc-getRANLIB) \ + CURSESLIB="$( $(tc-getPKG_CONFIG) --libs ncurses)" +} + +src_install() { + dobin bin/ra* + dodoc ChangeLog CREDITS README CHANGES + doman man/man{1,5}/* +} diff --git a/net-analyzer/argus-clients/argus-clients-3.0.8.2-r3.ebuild b/net-analyzer/argus-clients/argus-clients-3.0.8.2-r3.ebuild new file mode 100644 index 000000000000..637ef50ad05a --- /dev/null +++ b/net-analyzer/argus-clients/argus-clients-3.0.8.2-r3.ebuild @@ -0,0 +1,75 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +inherit autotools toolchain-funcs + +DESCRIPTION="Clients for net-analyzer/argus" +HOMEPAGE="https://www.qosient.com/argus/" +SRC_URI="https://qosient.com/argus/dev/${P}.tar.gz" + +LICENSE="GPL-3" +SLOT="0" +KEYWORDS="~amd64 ~ppc ~x86" +IUSE="debug ft geoip mysql sasl tcpd" + +ARGUS_CDEPEND=" + net-analyzer/rrdtool[perl] + net-libs/libpcap + net-libs/libtirpc:= + sys-libs/ncurses:= + sys-libs/readline:= + sys-libs/zlib + ft? ( net-analyzer/flow-tools ) + geoip? ( dev-libs/geoip ) + mysql? ( dev-db/mysql-connector-c:0= ) + sasl? ( dev-libs/cyrus-sasl ) +" +RDEPEND=" + ${ARGUS_CDEPEND} +" +DEPEND=" + ${ARGUS_CDEPEND} + sys-devel/bison + sys-devel/flex + virtual/pkgconfig +" +PATCHES=( + "${FILESDIR}"/${PN}-3.0.4.1-disable-tcp-wrappers-automagic.patch + "${FILESDIR}"/${PN}-3.0.7.21-curses-readline.patch + "${FILESDIR}"/${PN}-3.0.8.2-ar.patch + "${FILESDIR}"/${PN}-3.0.8.2-curses-readline.patch + "${FILESDIR}"/${PN}-3.0.8.2-my_bool.patch + "${FILESDIR}"/${PN}-3.0.8.2-rpc.patch +) + +src_prepare() { + default + + eautoreconf +} + +src_configure() { + tc-export AR RANLIB + + use debug && touch .debug + econf \ + $(use_with ft libft) \ + $(use_with geoip GeoIP /usr/) \ + $(use_with sasl) \ + $(use_with tcpd wrappers) \ + $(use_with mysql mysql /usr) +} + +src_compile() { + emake \ + CCOPT="${CFLAGS} ${LDFLAGS}" \ + RANLIB=$(tc-getRANLIB) \ + CURSESLIB="$( $(tc-getPKG_CONFIG) --libs ncurses)" +} + +src_install() { + dobin bin/ra* + dodoc ChangeLog CREDITS README CHANGES + doman man/man{1,5}/* +} diff --git a/net-analyzer/argus-clients/argus-clients-3.0.8.2.ebuild b/net-analyzer/argus-clients/argus-clients-3.0.8.2.ebuild new file mode 100644 index 000000000000..d16c7f6422a6 --- /dev/null +++ b/net-analyzer/argus-clients/argus-clients-3.0.8.2.ebuild @@ -0,0 +1,72 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 +inherit autotools eutils toolchain-funcs + +DESCRIPTION="Clients for net-analyzer/argus" +HOMEPAGE="https://www.qosient.com/argus/" +SRC_URI="https://qosient.com/argus/dev/${P}.tar.gz" + +LICENSE="GPL-3" +SLOT="0" +KEYWORDS="~amd64 ~ppc ~x86" +IUSE="debug ft geoip mysql sasl tcpd" + +MY_CDEPEND=" + net-analyzer/rrdtool[perl] + net-libs/libpcap + sys-libs/ncurses:= + sys-libs/readline:= + sys-libs/zlib + ft? ( net-analyzer/flow-tools ) + geoip? ( dev-libs/geoip ) + mysql? ( virtual/mysql ) + sasl? ( dev-libs/cyrus-sasl ) +" + +RDEPEND=" + ${MY_CDEPEND} +" + +DEPEND=" + ${MY_CDEPEND} + sys-devel/bison + sys-devel/flex + virtual/pkgconfig +" + +src_prepare() { + epatch \ + "${FILESDIR}"/${PN}-3.0.4.1-disable-tcp-wrappers-automagic.patch \ + "${FILESDIR}"/${PN}-3.0.7.21-curses-readline.patch + + sed -i -e 's| ar | $(AR) |g' common/Makefile.in || die + tc-export AR RANLIB + + eautoreconf +} + +src_configure() { + use debug && touch .debug + econf \ + $(use_with ft libft) \ + $(use_with geoip GeoIP /usr/) \ + $(use_with sasl) \ + $(use_with tcpd wrappers) \ + $(use_with mysql) +} + +src_compile() { + # racurses uses both libncurses and libtinfo, if present + emake \ + CCOPT="${CFLAGS} ${LDFLAGS}" \ + RANLIB=$(tc-getRANLIB) \ + CURSESLIB="$( $(tc-getPKG_CONFIG) --libs ncurses)" +} + +src_install() { + dobin bin/ra* + dodoc ChangeLog CREDITS README CHANGES + doman man/man{1,5}/* +} diff --git a/net-analyzer/argus-clients/argus-clients-3.0.8.ebuild b/net-analyzer/argus-clients/argus-clients-3.0.8.ebuild new file mode 100644 index 000000000000..742c6cbebee7 --- /dev/null +++ b/net-analyzer/argus-clients/argus-clients-3.0.8.ebuild @@ -0,0 +1,72 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 +inherit autotools eutils toolchain-funcs + +DESCRIPTION="Clients for net-analyzer/argus" +HOMEPAGE="https://www.qosient.com/argus/" +SRC_URI="https://qosient.com/argus/dev/${P}.tar.gz" + +LICENSE="GPL-3" +SLOT="0" +KEYWORDS="amd64 ppc x86" +IUSE="debug ft geoip mysql sasl tcpd" + +MY_CDEPEND=" + net-analyzer/rrdtool[perl] + net-libs/libpcap + sys-libs/ncurses + sys-libs/readline + sys-libs/zlib + ft? ( net-analyzer/flow-tools ) + geoip? ( dev-libs/geoip ) + mysql? ( virtual/mysql ) + sasl? ( dev-libs/cyrus-sasl ) +" + +RDEPEND=" + ${MY_CDEPEND} +" + +DEPEND=" + ${MY_CDEPEND} + sys-devel/bison + sys-devel/flex + virtual/pkgconfig +" + +src_prepare() { + epatch \ + "${FILESDIR}"/${PN}-3.0.4.1-disable-tcp-wrappers-automagic.patch \ + "${FILESDIR}"/${PN}-3.0.7.21-curses-readline.patch + + sed -i -e 's| ar | $(AR) |g' common/Makefile.in || die + tc-export AR RANLIB + + eautoreconf +} + +src_configure() { + use debug && touch .debug + econf \ + $(use_with ft libft) \ + $(use_with geoip GeoIP /usr/) \ + $(use_with sasl) \ + $(use_with tcpd wrappers) \ + $(use_with mysql) +} + +src_compile() { + # racurses uses both libncurses and libtinfo, if present + emake \ + CCOPT="${CFLAGS} ${LDFLAGS}" \ + RANLIB=$(tc-getRANLIB) \ + CURSESLIB="$( $(tc-getPKG_CONFIG) --libs ncurses)" +} + +src_install() { + dobin bin/ra* + dodoc ChangeLog CREDITS README CHANGES + doman man/man{1,5}/* +} diff --git a/net-analyzer/argus-clients/files/argus-clients-3.0.4.1-disable-tcp-wrappers-automagic.patch b/net-analyzer/argus-clients/files/argus-clients-3.0.4.1-disable-tcp-wrappers-automagic.patch new file mode 100644 index 000000000000..8e240043625d --- /dev/null +++ b/net-analyzer/argus-clients/files/argus-clients-3.0.4.1-disable-tcp-wrappers-automagic.patch @@ -0,0 +1,23 @@ +--- a/configure.ac ++++ b/configure.ac +@@ -121,6 +121,12 @@ + esac + + AC_QOSIENT_THREADS(V_THREADS) ++ ++AC_ARG_WITH(wrappers, ++ [ --with-wrappers build with libwrappers suuport], ++ with_wrappers="$withval", ++ with_wrappers="yes") ++if test "x$with_wrappers" != "xno"; then + AC_QOSIENT_TCPWRAP(V_WRAPDEP, V_INCLS) + if test ! -z "$V_WRAPDEP"; then + if test -f $V_WRAPDEP; then +@@ -144,6 +150,7 @@ + AC_DEFINE([HAVE_TCP_WRAPPER], [], [Using Tcp wrappers]) + WRAPLIBS="$V_WRAPDEP" + fi ++fi + + CURSESLIB="" + diff --git a/net-analyzer/argus-clients/files/argus-clients-3.0.7.21-curses-readline.patch b/net-analyzer/argus-clients/files/argus-clients-3.0.7.21-curses-readline.patch new file mode 100644 index 000000000000..787ff5ac9118 --- /dev/null +++ b/net-analyzer/argus-clients/files/argus-clients-3.0.7.21-curses-readline.patch @@ -0,0 +1,21 @@ +--- a/examples/ratop/Makefile.in ++++ b/examples/ratop/Makefile.in +@@ -54,7 +54,8 @@ + DEFS = @DEFS@ + COMPATLIB = @COMPATLIB@ @LIB_SASL@ @LIBS@ @V_THREADS@ @V_GEOIPDEP@ @V_PCRE@ @V_FTDEP@ @ZLIB@ + +-CURSESLIB = @CURSESLIB@ @V_READLINE@ ++CURSESLIB = @CURSESLIB@ ++V_READLINE = @V_READLINE@ + + # Standard CFLAGS + CFLAGS = $(CCOPT) $(INCLS) $(DEFS) +@@ -93,7 +94,7 @@ + all: $(PROGS) + + $(INSTALLBIN)/ratop: $(OBJ) $(LIB) +- $(CC) $(CFLAGS) -o $@ $(OBJ) $(LDFLAGS) $(LIB) $(COMPATLIB) $(CURSESLIB) ++ $(CC) $(CFLAGS) -o $@ $(OBJ) $(LDFLAGS) $(LIB) $(COMPATLIB) $(CURSESLIB) $(V_READLINE) + + CLEANFILES = $(OBJ) $(PROGS) + diff --git a/net-analyzer/argus-clients/files/argus-clients-3.0.8.2-ar.patch b/net-analyzer/argus-clients/files/argus-clients-3.0.8.2-ar.patch new file mode 100644 index 000000000000..e5df5378ab17 --- /dev/null +++ b/net-analyzer/argus-clients/files/argus-clients-3.0.8.2-ar.patch @@ -0,0 +1,31 @@ +--- a/common/Makefile.in ++++ b/common/Makefile.in +@@ -113,23 +113,23 @@ + all: $(LIBS) + + @INSTALL_LIB@/argus_common.a: $(COMMONOBJ) +- rm -f $@; ar qc $@ $(COMMONOBJ) ++ rm -f $@; $(AR) qc $@ $(COMMONOBJ) + -$(RANLIB) $@ + + @INSTALL_LIB@/argus_parse.a: $(PARSEOBJ) +- rm -f $@; ar qc $@ $(PARSEOBJ) ++ rm -f $@; $(AR) qc $@ $(PARSEOBJ) + -$(RANLIB) $@ + + @INSTALL_LIB@/argus_client.a: $(CLIENTOBJ) +- rm -f $@; ar qc $@ $(CLIENTOBJ) ++ rm -f $@; $(AR) qc $@ $(CLIENTOBJ) + -$(RANLIB) $@ + + @INSTALL_LIB@/argus_output.a: $(OUTPUTOBJ) +- rm -f $@; ar qc $@ $(OUTPUTOBJ) ++ rm -f $@; $(AR) qc $@ $(OUTPUTOBJ) + -$(RANLIB) $@ + + @INSTALL_LIB@/argus_event.a: $(EVENTOBJ) +- rm -f $@; ar qc $@ $(EVENTOBJ) ++ rm -f $@; $(AR) qc $@ $(EVENTOBJ) + -$(RANLIB) $@ + + scanner.c: scanner.l diff --git a/net-analyzer/argus-clients/files/argus-clients-3.0.8.2-curses-readline.patch b/net-analyzer/argus-clients/files/argus-clients-3.0.8.2-curses-readline.patch new file mode 100644 index 000000000000..fc8d3d0ed6e2 --- /dev/null +++ b/net-analyzer/argus-clients/files/argus-clients-3.0.8.2-curses-readline.patch @@ -0,0 +1,21 @@ +--- a/examples/ramysql/Makefile.in ++++ b/examples/ramysql/Makefile.in +@@ -56,7 +56,8 @@ + + + MYSQLLIB = @MYSQL_LDFLAGS@ +-CURSESLIB = @CURSESLIB@ @V_READLINE@ ++CURSESLIB = @CURSESLIB@ ++V_READLINE = @V_READLINE@ + + + # Standard CFLAGS +@@ -94,7 +95,7 @@ + $(CC) $(CCOPT) -o $@ rasql.o $(LDFLAGS) $(MYSQLLIB) $(LIB) $(COMPATLIB) + + $(INSTALLBIN)/rasqlinsert: rasqlinsert.o raclient.o $(LIB) +- $(CC) $(CCOPT) -o $@ raclient.o rasqlinsert.o @V_PCRE@ $(LDFLAGS) $(MYSQLLIB) $(LIB) $(COMPATLIB) $(CURSESLIB) ++ $(CC) $(CCOPT) -o $@ raclient.o rasqlinsert.o @V_PCRE@ $(LDFLAGS) $(MYSQLLIB) $(LIB) $(COMPATLIB) $(CURSESLIB) $(V_READLINE) + + $(INSTALLBIN)/rasqltimeindex: rasqltimeindex.o $(LIB) + $(CC) $(CCOPT) -o $@ rasqltimeindex.o @V_PCRE@ $(LDFLAGS) $(MYSQLLIB) $(LIB) $(COMPATLIB) diff --git a/net-analyzer/argus-clients/files/argus-clients-3.0.8.2-my_bool.patch b/net-analyzer/argus-clients/files/argus-clients-3.0.8.2-my_bool.patch new file mode 100644 index 000000000000..99cd6b255ae7 --- /dev/null +++ b/net-analyzer/argus-clients/files/argus-clients-3.0.8.2-my_bool.patch @@ -0,0 +1,42 @@ +--- a/examples/ramysql/rasql.c ++++ b/examples/ramysql/rasql.c +@@ -414,7 +414,7 @@ + void + RaMySQLInit () + { +- my_bool reconnectbuf = 1, *reconnect = &reconnectbuf; ++ int reconnectbuf = 1, *reconnect = &reconnectbuf; + char userbuf[1024], sbuf[1024], db[1024], *dbptr = NULL; + char *sptr = NULL, *ptr; + MYSQL_RES *mysqlRes; +--- a/examples/ramysql/rasqlinsert.c ++++ b/examples/ramysql/rasqlinsert.c +@@ -7026,7 +7026,7 @@ + void + RaMySQLInit () + { +- my_bool reconnectbuf = 1, *reconnect = &reconnectbuf; ++ int reconnectbuf = 1, *reconnect = &reconnectbuf; + char *sptr = NULL, *ptr; + char userbuf[1024], sbuf[1024], db[1024], *dbptr = NULL; + MYSQL_RES *mysqlRes; +--- a/examples/ramysql/rasqltimeindex.c ++++ b/examples/ramysql/rasqltimeindex.c +@@ -539,7 +539,7 @@ + void + RaMySQLInit () + { +- my_bool reconnectbuf = 1, *reconnect = &reconnectbuf; ++ int reconnectbuf = 1, *reconnect = &reconnectbuf; + char *sptr = NULL, *ptr; + char userbuf[1024], sbuf[1024], db[1024], *dbptr = NULL; + MYSQL_RES *mysqlRes; +@@ -797,7 +797,7 @@ + void + RaMySQLInit () + { +- my_bool reconnectbuf = 1, *reconnect = &reconnectbuf; ++ int reconnectbuf = 1, *reconnect = &reconnectbuf; + unsigned int RaTableFlags = 0; + int retn = 0, x; + char *sptr = NULL, *ptr; diff --git a/net-analyzer/argus-clients/files/argus-clients-3.0.8.2-rpc.patch b/net-analyzer/argus-clients/files/argus-clients-3.0.8.2-rpc.patch new file mode 100644 index 000000000000..e140fa96b2a3 --- /dev/null +++ b/net-analyzer/argus-clients/files/argus-clients-3.0.8.2-rpc.patch @@ -0,0 +1,34 @@ +--- a/configure.ac ++++ b/configure.ac +@@ -40,6 +40,7 @@ + AC_PROG_INSTALL + AC_PROG_RANLIB + AC_PROG_YACC ++PKG_PROG_PKG_CONFIG + + AC_CHECK_PROGS(V_RANLIB, ranlib, @true) + AC_QOSIENT_LEX_AND_YACC(V_LEX, V_YACC, argus_) +@@ -82,6 +83,12 @@ + AC_CHECK_HEADERS([stdlib.h stddef.h string.h strings.h sys/file.h sys/ioctl.h sys/param.h sys/socket.h]) + AC_CHECK_HEADERS([sys/mount.h sys/time.h sys/vfs.h syslog.h termios.h unistd.h values.h ifaddrs.h]) + ++PKG_CHECK_MODULES(libtirpc, libtirpc, ++ [LIBS="${LIBS} ${libtirpc_LIBS}"], ++[AC_CHECK_HEADER([rpc/types.h],, ++ [AC_MSG_ERROR([Cannot find <rpc/types.h>])])] ++) ++ + # Checks for typedefs, structures, and compiler characteristics. + AC_C_CONST + AC_C_INLINE +--- a/common/Makefile.in ++++ b/common/Makefile.in +@@ -48,7 +48,7 @@ + + CC = @CC@ + CCOPT = @V_CCOPT@ +-INCLS = -I. -I../include @V_INCLS@ @MYSQL_INCLS@ ++INCLS = -I. -I../include @V_INCLS@ @MYSQL_INCLS@ @libtirpc_CFLAGS@ + DEFS = @DEFS@ -DARGUS_SYSLOG + + # Standard CFLAGS diff --git a/net-analyzer/argus-clients/metadata.xml b/net-analyzer/argus-clients/metadata.xml new file mode 100644 index 000000000000..e49482a253f8 --- /dev/null +++ b/net-analyzer/argus-clients/metadata.xml @@ -0,0 +1,11 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<maintainer type="project"> +<email>netmon@gentoo.org</email> +<name>Gentoo network monitoring and analysis project</name> +</maintainer> +<use><flag name="ft">Enable support for flow packets through +<pkg>net-analyzer/flow-tools</pkg></flag></use> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/argus/Manifest b/net-analyzer/argus/Manifest new file mode 100644 index 000000000000..17d6ac24042c --- /dev/null +++ b/net-analyzer/argus/Manifest @@ -0,0 +1 @@ +DIST argus-3.0.8.2.tar.gz 524749 BLAKE2B 4d93fd8acd71b198da712961d75f0e813f5ed3fde841e77b8a10c3a9b89571902b7597969a4be12437c97ffc69ba5ebefaee8b684c5d2d4ce4f1309c1cfd1199 SHA512 146795880d8697e065ed23d2fbab226846d55db0b71945c5a4cab2896e48ceb6e1671ccb4e00dc3b0f984525bac4ced3773f3b9e70c3ea5f7c6972fe9bd94313 diff --git a/net-analyzer/argus/argus-3.0.8.2-r1.ebuild b/net-analyzer/argus/argus-3.0.8.2-r1.ebuild new file mode 100644 index 000000000000..2e662864e3e6 --- /dev/null +++ b/net-analyzer/argus/argus-3.0.8.2-r1.ebuild @@ -0,0 +1,87 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 +inherit autotools eutils user + +DESCRIPTION="network Audit Record Generation and Utilization System" +HOMEPAGE="https://www.qosient.com/argus/" +SRC_URI="https://www.qosient.com/argus/dev/${P/_rc/.rc.}.tar.gz" + +LICENSE="GPL-3" +SLOT="0" +KEYWORDS="amd64 ppc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos" +IUSE="debug +libtirpc sasl tcpd" + +RDEPEND=" + net-libs/libnsl:= + net-libs/libpcap + sys-libs/zlib + !libtirpc? ( sys-libs/glibc[rpc(-)] ) + libtirpc? ( net-libs/libtirpc ) + sasl? ( dev-libs/cyrus-sasl ) + tcpd? ( >=sys-apps/tcp-wrappers-7.6 ) +" + +DEPEND=" + ${RDEPEND} + >=sys-devel/bison-1.28 + >=sys-devel/flex-2.4.6 +" + +S=${WORKDIR}/${P/_rc/.rc.} + +src_prepare() { + find . -type f -execdir chmod +w {} \; #561360 + sed -e 's:/etc/argus.conf:/etc/argus/argus.conf:' \ + -i argus/argus.c \ + -i support/Config/argus.conf \ + -i man/man8/argus.8 \ + -i man/man5/argus.conf.5 || die + + sed -e 's:#\(ARGUS_SETUSER_ID=\).*:\1argus:' \ + -e 's:#\(ARGUS_SETGROUP_ID=\).*:\1argus:' \ + -e 's:\(#ARGUS_CHROOT_DIR=\).*:\1/var/lib/argus:' \ + -i support/Config/argus.conf || die + epatch \ + "${FILESDIR}"/${PN}-3.0.8.1-disable-tcp-wrappers-automagic.patch \ + "${FILESDIR}"/${PN}-3.0.5-Makefile.patch \ + "${FILESDIR}"/${PN}-3.0.7.3-DLT_IPNET.patch \ + "${FILESDIR}"/${PN}-3.0.8.2-rpc.patch + + epatch_user + eautoreconf +} + +src_configure() { + use debug && touch .debug # enable debugging + econf $(use_with libtirpc) $(use_with tcpd wrappers) $(use_with sasl) +} + +src_compile() { + emake CCOPT="${CFLAGS} ${LDFLAGS}" +} + +src_install() { + doman man/man5/*.5 man/man8/*.8 + + dosbin bin/argus{,bug} + + dodoc ChangeLog CREDITS README + + insinto /etc/argus + doins support/Config/argus.conf + + newinitd "${FILESDIR}/argus.initd" argus + keepdir /var/lib/argus +} + +pkg_preinst() { + enewgroup argus + enewuser argus -1 -1 /var/lib/argus argus +} + +pkg_postinst() { + elog "Note, if you modify ARGUS_DAEMON value in argus.conf it's quite" + elog "possible that the init script will fail to work." +} diff --git a/net-analyzer/argus/argus-3.0.8.2-r2.ebuild b/net-analyzer/argus/argus-3.0.8.2-r2.ebuild new file mode 100644 index 000000000000..807aab798e06 --- /dev/null +++ b/net-analyzer/argus/argus-3.0.8.2-r2.ebuild @@ -0,0 +1,93 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +inherit autotools user + +DESCRIPTION="network Audit Record Generation and Utilization System" +HOMEPAGE="https://openargus.org/" +SRC_URI="https://www.qosient.com/argus/dev/${P/_rc/.rc.}.tar.gz" + +LICENSE="GPL-3" +SLOT="0" +KEYWORDS="~amd64 ~ppc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos" +IUSE="debug +libtirpc sasl tcpd" + +RDEPEND=" + net-libs/libnsl:= + net-libs/libpcap + sys-libs/zlib + !libtirpc? ( sys-libs/glibc[rpc(-)] ) + libtirpc? ( net-libs/libtirpc ) + sasl? ( dev-libs/cyrus-sasl ) + tcpd? ( >=sys-apps/tcp-wrappers-7.6 ) +" + +DEPEND=" + ${RDEPEND} + >=sys-devel/bison-1.28 + >=sys-devel/flex-2.4.6 +" +PATCHES=( + "${FILESDIR}"/${PN}-3.0.8.1-disable-tcp-wrappers-automagic.patch + "${FILESDIR}"/${PN}-3.0.5-Makefile.patch + "${FILESDIR}"/${PN}-3.0.7.3-DLT_IPNET.patch + "${FILESDIR}"/${PN}-3.0.8.2-rpc.patch + "${FILESDIR}"/${PN}-3.0.8.2-fno-common.patch +) +S=${WORKDIR}/${P/_rc/.rc.} + +pkg_setup() { + enewgroup argus + enewuser argus -1 -1 /var/lib/argus argus +} + +src_prepare() { + find . -type f -execdir chmod +w {} \; #561360 + sed -e 's:/etc/argus.conf:/etc/argus/argus.conf:' \ + -i argus/argus.c \ + -i support/Config/argus.conf \ + -i man/man8/argus.8 \ + -i man/man5/argus.conf.5 || die + + sed -e 's:#\(ARGUS_SETUSER_ID=\).*:\1argus:' \ + -e 's:#\(ARGUS_SETGROUP_ID=\).*:\1argus:' \ + -e 's:\(#ARGUS_CHROOT_DIR=\).*:\1/var/lib/argus:' \ + -i support/Config/argus.conf || die + + default + eautoreconf +} + +src_configure() { + use debug && touch .debug # enable debugging + econf $(use_with libtirpc) $(use_with tcpd wrappers) $(use_with sasl) +} + +src_compile() { + emake CCOPT="${CFLAGS} ${LDFLAGS}" +} + +src_install() { + doman man/man5/*.5 man/man8/*.8 + + dosbin bin/argus{,bug} + + dodoc ChangeLog CREDITS README + + insinto /etc/argus + doins support/Config/argus.conf + + newinitd "${FILESDIR}/argus.initd" argus + keepdir /var/lib/argus +} + +pkg_preinst() { + enewgroup argus + enewuser argus -1 -1 /var/lib/argus argus +} + +pkg_postinst() { + elog "Note, if you modify ARGUS_DAEMON value in argus.conf it's quite" + elog "possible that the init script will fail to work." +} diff --git a/net-analyzer/argus/files/argus-3.0.5-Makefile.patch b/net-analyzer/argus/files/argus-3.0.5-Makefile.patch new file mode 100644 index 000000000000..87b1c155caf8 --- /dev/null +++ b/net-analyzer/argus/files/argus-3.0.5-Makefile.patch @@ -0,0 +1,20 @@ +Do not continue when a sub-make errors (bug #380953). + +--- a/Makefile.in ++++ b/Makefile.in +@@ -55,11 +55,11 @@ + .PHONY: install installdirs all + + all: force +- @-for d in $(DIRS);\ ++ @for d in $(DIRS);\ + do \ +- (cd $$d; echo "### Making in" `pwd`;\ +- $(MAKE) $(MFLAGS) ;\ +- echo "### Done with" `pwd`);\ ++ echo "### Making in" $$d;\ ++ $(MAKE) -C $$d $(MFLAGS) || exit 1;\ ++ echo "### Done with" $$d;\ + done + + install: force diff --git a/net-analyzer/argus/files/argus-3.0.7.3-DLT_IPNET.patch b/net-analyzer/argus/files/argus-3.0.7.3-DLT_IPNET.patch new file mode 100644 index 000000000000..f7b4bfa4cc6c --- /dev/null +++ b/net-analyzer/argus/files/argus-3.0.7.3-DLT_IPNET.patch @@ -0,0 +1,17 @@ +In file included from ./ArgusModeler.h:330:0, + from ./argus.h:40, + from ArgusSource.c:67: +./ArgusSource.h:893:6: error: ‘ArgusIpNetPacket’ undeclared here (not in a function) + +--- a/argus/ArgusSource.h ++++ b/argus/ArgusSource.h +@@ -889,9 +889,6 @@ + #ifdef DLT_JUNIPER_ETHER + { ArgusJuniperPacket, DLT_JUNIPER_ETHER, "ArgusJuniperPacket()" }, + #endif +-#ifdef DLT_IPNET +- { ArgusIpNetPacket, DLT_IPNET, "ArgusIpNetPacket()" }, +-#endif + { NULL, DLT_NULL, "" }, + #endif + { NULL, 0, NULL}, diff --git a/net-analyzer/argus/files/argus-3.0.8.1-disable-tcp-wrappers-automagic.patch b/net-analyzer/argus/files/argus-3.0.8.1-disable-tcp-wrappers-automagic.patch new file mode 100644 index 000000000000..917f864cf065 --- /dev/null +++ b/net-analyzer/argus/files/argus-3.0.8.1-disable-tcp-wrappers-automagic.patch @@ -0,0 +1,22 @@ +--- a/configure.ac ++++ b/configure.ac +@@ -251,6 +251,11 @@ + AC_QOSIENT_MEMORY + + AC_QOSIENT_THREADS(V_THREADS) ++AC_ARG_WITH(wrappers, ++ [ --with-wrappers build with libwrappers support], ++ with_wrappers="$withval", ++ with_wrappers="yes") ++if test "x$with_wrappers" != "xno"; then + AC_QOSIENT_TCPWRAP(V_WRAPDEP, V_INCLS) + if test ! -z "$V_WRAPDEP"; then + if test -f "$V_WRAPDEP"; then +@@ -274,6 +279,7 @@ + AC_DEFINE([HAVE_TCP_WRAPPER], [], [Using Tcp wrappers]) + WRAPLIBS="$V_WRAPDEP" + fi ++fi + + AC_QOSIENT_LIBPCAP(V_PCAPDEP, V_INCLS) + if test ! -z "$V_PCAPDEP"; then diff --git a/net-analyzer/argus/files/argus-3.0.8.2-fno-common.patch b/net-analyzer/argus/files/argus-3.0.8.2-fno-common.patch new file mode 100644 index 000000000000..66f950d0c04d --- /dev/null +++ b/net-analyzer/argus/files/argus-3.0.8.2-fno-common.patch @@ -0,0 +1,45 @@ +--- a/include/argus/bootp.h ++++ b/include/argus/bootp.h +@@ -45,6 +45,8 @@ + unsigned char bp_vend[64]; /* vendor-specific area */ + }; + ++extern struct bootp *bp; ++ + /* + * UDP port numbers, server and client. + */ +--- a/argus/ArgusUdp.c ++++ b/argus/ArgusUdp.c +@@ -40,9 +40,6 @@ + #include <argus_compat.h> + #include <ArgusModeler.h> + +-#include <argus/bootp.h> +-struct bootp *bp; +- + void ArgusUpdateUDPState (struct ArgusModelerStruct *, struct ArgusFlowStruct *, unsigned char *); + + void +--- a/argus/ArgusUdt.c ++++ b/argus/ArgusUdt.c +@@ -40,9 +40,6 @@ + #include <argus_compat.h> + #include <ArgusModeler.h> + +-#include <argus/bootp.h> +-struct bootp *bp; +- + struct ArgusSystemFlow * + ArgusCreateUDTFlow (struct ArgusModelerStruct *model, struct udt_header *udt) + { +--- a/argus/ArgusModeler.c ++++ b/argus/ArgusModeler.c +@@ -43,7 +43,6 @@ + + #include <argus.h> + +-#include <argus/bootp.h> + #include <signal.h> + + #include <sched.h> diff --git a/net-analyzer/argus/files/argus-3.0.8.2-rpc.patch b/net-analyzer/argus/files/argus-3.0.8.2-rpc.patch new file mode 100644 index 000000000000..96af0caf140e --- /dev/null +++ b/net-analyzer/argus/files/argus-3.0.8.2-rpc.patch @@ -0,0 +1,45 @@ +--- a/common/Makefile.in ++++ b/common/Makefile.in +@@ -35,12 +35,12 @@ + + CC = @CC@ + CCOPT = @V_CCOPT@ +-INCLS = -I$(srcdir) @V_INCLS@ -I$(srcdir)/../include -I$(srcdir)/../argus ++INCLS = -I$(srcdir) @V_INCLS@ @RPC_CFLAGS@ -I$(srcdir)/../include -I$(srcdir)/../argus + DEFS = @DEFS@ + + # Standard CFLAGS + CFLAGS = $(CCOPT) $(INCLS) $(DEFS) +-LDFLAGS = @LDFLAGS@ ++LDFLAGS = @LDFLAGS@ @RPC_LIBS@ + + INSTALL = @INSTALL@ + RANLIB = @V_RANLIB@ +--- a/configure.ac ++++ b/configure.ac +@@ -120,6 +120,25 @@ + AC_CHECK_FUNCS(floorf remainderf) + AC_CHECK_FUNCS(timegm) + ++AC_ARG_WITH([libtirpc], ++ AS_HELP_STRING([--with-libtirpc], [Use libtirpc as RPC implementation (instead of sunrpc)]), ++ [], [ with_libtirpc=no ]) ++ ++AS_IF([test "x$with_libtirpc" != xno], ++ [PKG_CHECK_MODULES([TIRPC], ++ [libtirpc], ++ [RPC_CFLAGS=$TIRPC_CFLAGS; RPC_LIBS=$TIRPC_LIBS;], ++ [AC_MSG_ERROR([libtirpc requested, but library not found.])] ++ )], ++ [AC_CHECK_HEADER(rpc/rpc.h, ++ [RPC_CFLAGS=""; RPC_LIBS="";], ++ [AC_MSG_ERROR([sunrpc requested, but headers are not present.])] ++ )] ++) ++ ++AC_SUBST(RPC_CFLAGS) ++AC_SUBST(RPC_LIBS) ++ + AC_CHECK_FUNCS(xdrmem_create) + if test "$ac_cv_func_xdrmem_create" = yes ; then + AC_DEFINE([HAVE_XDR], [], [Using system XDR library]) diff --git a/net-analyzer/argus/files/argus.initd b/net-analyzer/argus/files/argus.initd new file mode 100644 index 000000000000..2b02852fdf5c --- /dev/null +++ b/net-analyzer/argus/files/argus.initd @@ -0,0 +1,19 @@ +#!/sbin/openrc-run +# Copyright 1999-2006 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +depend() { + need net +} + +start() { + ebegin "Starting argus" + start-stop-daemon --start --quiet --exec /usr/sbin/argus -- -d + eend $? +} + +stop() { + ebegin "Stopping argus" + start-stop-daemon --stop --quiet --exec /usr/sbin/argus + eend $? +} diff --git a/net-analyzer/argus/metadata.xml b/net-analyzer/argus/metadata.xml new file mode 100644 index 000000000000..6bc01ea5f9d3 --- /dev/null +++ b/net-analyzer/argus/metadata.xml @@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<maintainer type="project"> + <email>netmon@gentoo.org</email> + <name>Gentoo network monitoring and analysis project</name> +</maintainer> +<longdescription>network Audit Record Generation and Utilization System</longdescription> +<use> + <flag name="libtirpc">Build against <pkg>net-libs/libtirpc</pkg> for RPC support</flag> +</use> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/arp-scan/Manifest b/net-analyzer/arp-scan/Manifest new file mode 100644 index 000000000000..54ac63d77097 --- /dev/null +++ b/net-analyzer/arp-scan/Manifest @@ -0,0 +1,2 @@ +DIST arp-scan-1.9.6.tar.gz 462479 BLAKE2B 21383167d83ba1cd9792f0a8d569c51ff196186fb59a2161c00d6963bcedecb706a419b08aeef2956bad72563f56a9a58b4231715b472a8ab083229b333d2e8f SHA512 c2d56ab8c6e1a046919892f6c2750593d6fbb3a539c3e1736184bd37ff7ae6033f84b62a3d2b4f56c0f2cdc1752002cb010ce77f701ee2f87b6f14b2e1753fe6 +DIST arp-scan-1.9.7.tar.gz 459544 BLAKE2B bd70b2dd9e005096ce80fca07b8f2d8482b1073d25a2a9f82e8f5c1206148dbeab095046292cb46b5823aa18b56c208a5e86d0b7252d8566ddee5cd714b78cc6 SHA512 2aa808521a64cd3e2a6a270c6725f2cffa4cfce5c251e5483053c8ea9f56fb1368dd9aae2afcf8fffe1030fe2fc37723f0701c9eafa7cd1d52df459c07a80870 diff --git a/net-analyzer/arp-scan/arp-scan-1.9.6.ebuild b/net-analyzer/arp-scan/arp-scan-1.9.6.ebuild new file mode 100644 index 000000000000..96432c7a989f --- /dev/null +++ b/net-analyzer/arp-scan/arp-scan-1.9.6.ebuild @@ -0,0 +1,26 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +inherit autotools + +DESCRIPTION="ARP scanning and fingerprinting tool" +HOMEPAGE="https://github.com/royhills/arp-scan" +SRC_URI="https://github.com/royhills/arp-scan/archive/${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="GPL-3" +SLOT="0" +KEYWORDS="~amd64" + +DEPEND=" + net-libs/libpcap +" +RDEPEND=" + ${DEPEND} + dev-lang/perl +" + +src_prepare() { + default + eautoreconf +} diff --git a/net-analyzer/arp-scan/arp-scan-1.9.7.ebuild b/net-analyzer/arp-scan/arp-scan-1.9.7.ebuild new file mode 100644 index 000000000000..96432c7a989f --- /dev/null +++ b/net-analyzer/arp-scan/arp-scan-1.9.7.ebuild @@ -0,0 +1,26 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +inherit autotools + +DESCRIPTION="ARP scanning and fingerprinting tool" +HOMEPAGE="https://github.com/royhills/arp-scan" +SRC_URI="https://github.com/royhills/arp-scan/archive/${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="GPL-3" +SLOT="0" +KEYWORDS="~amd64" + +DEPEND=" + net-libs/libpcap +" +RDEPEND=" + ${DEPEND} + dev-lang/perl +" + +src_prepare() { + default + eautoreconf +} diff --git a/net-analyzer/arp-scan/arp-scan-99999.ebuild b/net-analyzer/arp-scan/arp-scan-99999.ebuild new file mode 100644 index 000000000000..c0d127582510 --- /dev/null +++ b/net-analyzer/arp-scan/arp-scan-99999.ebuild @@ -0,0 +1,26 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +inherit autotools git-r3 + +DESCRIPTION="ARP scanning and fingerprinting tool" +HOMEPAGE="https://github.com/royhills/arp-scan" +EGIT_REPO_URI="https://github.com/royhills/arp-scan" + +LICENSE="GPL-3" +SLOT="0" +KEYWORDS="" + +DEPEND=" + net-libs/libpcap +" +RDEPEND=" + ${DEPEND} + dev-lang/perl +" + +src_prepare() { + default + eautoreconf +} diff --git a/net-analyzer/arp-scan/metadata.xml b/net-analyzer/arp-scan/metadata.xml new file mode 100644 index 000000000000..97029420a6c3 --- /dev/null +++ b/net-analyzer/arp-scan/metadata.xml @@ -0,0 +1,12 @@ +<?xml version='1.0' encoding='UTF-8'?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>netmon@gentoo.org</email> + <name>Gentoo network monitoring and analysis project</name> + </maintainer> + <upstream> + <remote-id type="github">royhills/arp-scan</remote-id> + </upstream> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/arp-sk/Manifest b/net-analyzer/arp-sk/Manifest new file mode 100644 index 000000000000..8521af80c76d --- /dev/null +++ b/net-analyzer/arp-sk/Manifest @@ -0,0 +1 @@ +DIST arp-sk-0.0.16.tgz 211636 BLAKE2B 9ba786829061161c0c38950a7c374968126d4cfb269b10b67b5a1dce2a7cb1016833a4a2adc9fef0f8fb61dbbdc8d959a7cf63379e69bff3fc4dc9a9201348af SHA512 d827ab5c701e1e3a6444dbe7e1e7c0a73ee2bfb2339a55fc7d3591ee8e9e9aadef4dfd4aaf331251fbe22d83c9b1135068e5afa6303eae934b3fd149ca0819a6 diff --git a/net-analyzer/arp-sk/arp-sk-0.0.16-r2.ebuild b/net-analyzer/arp-sk/arp-sk-0.0.16-r2.ebuild new file mode 100644 index 000000000000..773e349fc87b --- /dev/null +++ b/net-analyzer/arp-sk/arp-sk-0.0.16-r2.ebuild @@ -0,0 +1,33 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 +inherit autotools eutils multilib + +DESCRIPTION="A swiss knife tool for ARP" +HOMEPAGE="http://sid.rstack.org/arp-sk/" +SRC_URI="http://sid.rstack.org/arp-sk/files/${P}.tgz" +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="amd64 ppc x86" + +DEPEND=">=net-libs/libnet-1.1" +RDEPEND="${DEPEND}" + +DOCS=( ARP AUTHORS CONTRIB ChangeLog README TODO ) + +src_prepare() { + epatch "${FILESDIR}"/${P}-libnet1_2.patch + sed -i configure.in -e 's|AM_CONFIG_HEADER|AC_CONFIG_HEADERS|g' || die + rm missing || die + epatch_user + + eautoreconf +} + +src_install() { + default + + # We don't need libcompat as it has a potential to clash with other packages. + rm -fr "${D}"/usr/$(get_libdir) +} diff --git a/net-analyzer/arp-sk/files/arp-sk-0.0.16-libnet1_2.patch b/net-analyzer/arp-sk/files/arp-sk-0.0.16-libnet1_2.patch new file mode 100644 index 000000000000..1fac654c0d86 --- /dev/null +++ b/net-analyzer/arp-sk/files/arp-sk-0.0.16-libnet1_2.patch @@ -0,0 +1,50 @@ +--- a/configure.in ++++ b/configure.in +@@ -114,47 +114,6 @@ + AC_MSG_RESULT(yes) ] + ) + +-dnl Now let's checck the version of libnet (1.1.x requirerd) +-AC_MSG_CHECKING(for version 1.1.x of libnet) +-AC_TRY_RUN([ +-#include "$NETINC/libnet.h" +-#include <string.h> +-int main() +-{ +- return (strncmp(LIBNET_VERSION, "1.1.", 4)); +-} +-], +-[ AC_MSG_RESULT(yes)], +-[ AC_MSG_RESULT(no) +- AC_MSG_ERROR(Bad libnet version found in $NETINC/libnet.h: +-download libnet-1.1.x from http://www.packetfactory.net/projects/libnet/. +-If you think this version of libnet is already installed on your system +-tell arp-sk where it is using --with-libnet=DIR) +-] +-dnl , +-dnl [ v=(`sed -n /LIBNET_VERSION/p /usr/local/include/libnet.h | sed s/\"//g |awk '{print $3}'`) +-dnl echo "v=$v" +-dnl save_IFS="${IFS}" +-dnl IFS=. +-dnl vatb=(${v[0]}) +-dnl IFS=$save_IFS +-dnl LIBNET_MAJOR=${vtab[0]} +-dnl LIBNET_MINOR=${vtab[1]} +- +-dnl if [ $LIBNET_MAJOR==1 -a $LIBNET_MINOR==1 ]; then +-dnl AC_MSG_RESULT(yes); +-dnl else +-dnl AC_MSG_RESULT(no) +-dnl AC_MSG_ERROR(Bad libnet version: +- +-dnl $NETINC/libnet.h +- +-dnl download libnet-1.1.x from http://www.packetfactory.net/projects/libnet/. +-dnl If you think this version of libnet id already installed on your system, +-dnl tell arp-sk where it is using --with-libnet=DIR) +-dnl fi +-dnl ] +-) + + + NETINC="-I$NETINC" diff --git a/net-analyzer/arp-sk/metadata.xml b/net-analyzer/arp-sk/metadata.xml new file mode 100644 index 000000000000..bd13a914477c --- /dev/null +++ b/net-analyzer/arp-sk/metadata.xml @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<maintainer type="project"> + <email>netmon@gentoo.org</email> + <name>Gentoo network monitoring and analysis project</name> +</maintainer> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/arping/Manifest b/net-analyzer/arping/Manifest new file mode 100644 index 000000000000..a1a7c2923a68 --- /dev/null +++ b/net-analyzer/arping/Manifest @@ -0,0 +1,3 @@ +DIST arping-2.17.tar.gz 174346 BLAKE2B b0a095ff4e39e8f08b25a10db828e4ab9f60299043fbefc353b9df14e5bae839a93be20724ab9758b5bfc830c211e5f9bdfd606e321db508dbce9886b5903b09 SHA512 062026f522ab3d3b96c05c97aa3133995bce808a25a470207359a1236886da0300368ddac7d76568201510c0bcc2ac4ef6b34b2284c8d367c1be41972f0ee1c2 +DIST arping-2.20.tar.gz 48102 BLAKE2B ce08c68e5d76db89f4f9ecb31bcee3316064cfd8ffd9615964677db33f214b856300de0dd2619430ce934b19f260cd38c8fa892636787ae4de82022301274a06 SHA512 c5fac3b43a9be8c63ee7707a7df1cef2d75c6f7944cc6e580450a6558fb7e72b0d97d09b5c9b4a3aa86a59f49faba94b39bd634c93917c11ae20ac59e8635282 +DIST arping-2.21.tar.gz 50067 BLAKE2B 67b76cc48e9717117dbf43702df7f422634ed40196ec44d273a773610618922ddf7de47ffdf32cb7296db1dbce0a696c57b7992e6ad11f6fddf52a16212154fc SHA512 e976ce1a3ec0e4f57bbded09c6a07934e21df66ce7931422c420f5335dafcd88968f03ba6987d192dcdf51cca89180c86337aff50806713c7b04cb13e3e83504 diff --git a/net-analyzer/arping/arping-2.17.ebuild b/net-analyzer/arping/arping-2.17.ebuild new file mode 100644 index 000000000000..795d562c6a29 --- /dev/null +++ b/net-analyzer/arping/arping-2.17.ebuild @@ -0,0 +1,30 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 +inherit fcaps + +DESCRIPTION="A utility to see if a specific IP address is taken and what MAC address owns it" +HOMEPAGE="http://www.habets.pp.se/synscan/programs.php?prog=arping" +SRC_URI="http://www.habets.pp.se/synscan/files/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="2" +KEYWORDS="~alpha amd64 arm hppa ~ia64 ~mips ppc ppc64 ~s390 sparc x86 ~amd64-linux ~x86-linux ~x86-macos" +IUSE="test" +RESTRICT="!test? ( test )" + +CDEPEND=" + net-libs/libpcap + net-libs/libnet:1.1 +" +DEPEND=" + ${CDEPEND} + test? ( dev-libs/check ) +" +RDEPEND=" + ${CDEPEND} + !net-misc/iputils[arping(+)] +" + +FILECAPS=( cap_net_raw /usr/sbin/arping ) diff --git a/net-analyzer/arping/arping-2.20.ebuild b/net-analyzer/arping/arping-2.20.ebuild new file mode 100644 index 000000000000..7c39a6fb1a52 --- /dev/null +++ b/net-analyzer/arping/arping-2.20.ebuild @@ -0,0 +1,35 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +inherit autotools fcaps + +DESCRIPTION="A utility to see if a specific IP address is taken and what MAC address owns it" +HOMEPAGE="http://www.habets.pp.se/synscan/programs.php?prog=arping" +SRC_URI="https://github.com/ThomasHabets/${PN}/archive/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="2" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x86-macos" +IUSE="test" +RESTRICT="!test? ( test )" + +CDEPEND=" + net-libs/libpcap + net-libs/libnet:1.1 +" +DEPEND=" + ${CDEPEND} + test? ( dev-libs/check ) +" +RDEPEND=" + ${CDEPEND} + !net-misc/iputils[arping(+)] +" +FILECAPS=( cap_net_raw /usr/sbin/arping ) +S=${WORKDIR}/${PN}-${P} + +src_prepare() { + default + eautoreconf +} diff --git a/net-analyzer/arping/arping-2.21.ebuild b/net-analyzer/arping/arping-2.21.ebuild new file mode 100644 index 000000000000..7c39a6fb1a52 --- /dev/null +++ b/net-analyzer/arping/arping-2.21.ebuild @@ -0,0 +1,35 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +inherit autotools fcaps + +DESCRIPTION="A utility to see if a specific IP address is taken and what MAC address owns it" +HOMEPAGE="http://www.habets.pp.se/synscan/programs.php?prog=arping" +SRC_URI="https://github.com/ThomasHabets/${PN}/archive/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="2" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x86-macos" +IUSE="test" +RESTRICT="!test? ( test )" + +CDEPEND=" + net-libs/libpcap + net-libs/libnet:1.1 +" +DEPEND=" + ${CDEPEND} + test? ( dev-libs/check ) +" +RDEPEND=" + ${CDEPEND} + !net-misc/iputils[arping(+)] +" +FILECAPS=( cap_net_raw /usr/sbin/arping ) +S=${WORKDIR}/${PN}-${P} + +src_prepare() { + default + eautoreconf +} diff --git a/net-analyzer/arping/arping-9999.ebuild b/net-analyzer/arping/arping-9999.ebuild new file mode 100644 index 000000000000..20b7fc882067 --- /dev/null +++ b/net-analyzer/arping/arping-9999.ebuild @@ -0,0 +1,33 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +inherit autotools fcaps git-r3 + +DESCRIPTION="A utility to see if a specific IP address is taken and what MAC address owns it" +HOMEPAGE="http://www.habets.pp.se/synscan/programs.php?prog=arping" +EGIT_REPO_URI="https://github.com/ThomasHabets/arping" + +LICENSE="GPL-2" +SLOT="2" +KEYWORDS="" + +CDEPEND=" + net-libs/libpcap + net-libs/libnet:1.1 +" +DEPEND=" + ${CDEPEND} + dev-libs/check +" +RDEPEND=" + ${CDEPEND} + !net-misc/iputils[arping(+)] +" + +FILECAPS=( cap_net_raw /usr/sbin/arping ) + +src_prepare() { + default + eautoreconf +} diff --git a/net-analyzer/arping/metadata.xml b/net-analyzer/arping/metadata.xml new file mode 100644 index 000000000000..bd13a914477c --- /dev/null +++ b/net-analyzer/arping/metadata.xml @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<maintainer type="project"> + <email>netmon@gentoo.org</email> + <name>Gentoo network monitoring and analysis project</name> +</maintainer> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/arpoison/Manifest b/net-analyzer/arpoison/Manifest new file mode 100644 index 000000000000..2520f6df2d53 --- /dev/null +++ b/net-analyzer/arpoison/Manifest @@ -0,0 +1,2 @@ +DIST arpoison-0.6.tar.gz 8646 BLAKE2B 7e9a7aaf9fb184ffed4e69d1d709f3ec242423dd699014e89ce7eaf99cb225299110b3a6fed4059db89c3bbd05b30262d56dec4bf60bed367f01700f40fde883 SHA512 7c14a15b9b85f777e5151fae82dfbdb44dbfc85ce8f632b7d76727bce79ed7f958f725f39348489bc4659cb5e3b7ab5370e88e33c03277e16ab2f9ff00bb4038 +DIST arpoison-0.7.tar.gz 8458 BLAKE2B b0050aa6f3246fec9fb4db8bbb3f9f5f1d52b5b6c37851f0c6bec8b6c89fabd7f1811ae40a4c81af6eae16761f38fb749d0f2a58311645ef360d798b6ccbbb50 SHA512 d5af078c8e2c64eb721da75b5d6659ca017267f146d0dca7e0f1ba77bfd93a0f56363428c198e9c46537768d3568d813c150bfbc091430fc355a269f9327108f diff --git a/net-analyzer/arpoison/arpoison-0.6-r2.ebuild b/net-analyzer/arpoison/arpoison-0.6-r2.ebuild new file mode 100644 index 000000000000..628bef5fd8bf --- /dev/null +++ b/net-analyzer/arpoison/arpoison-0.6-r2.ebuild @@ -0,0 +1,38 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +inherit toolchain-funcs + +DESCRIPTION="A utility to poison ARP caches" +HOMEPAGE="http://arpoison.sourceforge.net/" +SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="amd64 ~arm ppc x86" + +RDEPEND="net-libs/libnet:1.1" +DEPEND="${RDEPEND}" + +S="${WORKDIR}/${PN}" + +src_prepare() { + # respect CFLAGS, LDFLAGS and compiler, bug #337896 + # fix for crosscompilation, bug #375655 + sed -i Makefile \ + -e 's|gcc \(-Wall\)|$(CC) \1 $(CFLAGS) $(LDFLAGS)|' \ + -e "s|libnet-config|${ROOT}usr/bin/libnet-config|g" \ + || die +} + +src_compile() { + emake CC="$(tc-getCC)" +} + +src_install() { + dosbin arpoison + doman arpoison.8 + dodoc README TODO +} diff --git a/net-analyzer/arpoison/arpoison-0.7.ebuild b/net-analyzer/arpoison/arpoison-0.7.ebuild new file mode 100644 index 000000000000..49817cdd9dc7 --- /dev/null +++ b/net-analyzer/arpoison/arpoison-0.7.ebuild @@ -0,0 +1,35 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +inherit toolchain-funcs + +DESCRIPTION="A utility to poison ARP caches" +HOMEPAGE="http://arpoison.sourceforge.net/ http://www.arpoison.net/" +SRC_URI="https://dev.gentoo.org/~jer/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~arm ~ppc ~x86" + +RDEPEND=" + net-libs/libnet:1.1 +" +DEPEND=" + ${RDEPEND} +" +BDEPEND=" + ${RDEPEND} +" + +src_compile() { + local compile="$(tc-getCC) ${PN}.c -o ${PN} ${CFLAGS} ${LDFLAGS} $("${BROOT}/usr/bin/libnet-config" --cflags --libs)" + echo "${compile}" + ${compile} || die +} + +src_install() { + dosbin arpoison + doman arpoison.8 + dodoc README +} diff --git a/net-analyzer/arpoison/metadata.xml b/net-analyzer/arpoison/metadata.xml new file mode 100644 index 000000000000..01abe36e5121 --- /dev/null +++ b/net-analyzer/arpoison/metadata.xml @@ -0,0 +1,12 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>netmon@gentoo.org</email> + <name>Gentoo network monitoring and analysis project</name> + </maintainer> + <upstream> + <remote-id type="sourceforge">arpoison</remote-id> + </upstream> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/arpon/Manifest b/net-analyzer/arpon/Manifest new file mode 100644 index 000000000000..1ff3b41863a5 --- /dev/null +++ b/net-analyzer/arpon/Manifest @@ -0,0 +1 @@ +DIST ArpON-2.7.2.tar.gz 2780607 BLAKE2B 58d7a0db475658d90112441508d4c4d9babd601533a6ab9a22b24f07e037b6f3debcbe0f3c1f09a87b7e0cdf9217a38f52b85431db023d12b0f1ee58765e0bfb SHA512 7518f8f8920817725c9b3e0a6420190dcc101b1c0c7cd9eec50870b3f893fe2322eddc90cb71e9c3c35326b4e1730aa02797ca51775caa9401807da3978628b4 diff --git a/net-analyzer/arpon/arpon-2.7.2-r1.ebuild b/net-analyzer/arpon/arpon-2.7.2-r1.ebuild new file mode 100644 index 000000000000..f2bc485b6fd2 --- /dev/null +++ b/net-analyzer/arpon/arpon-2.7.2-r1.ebuild @@ -0,0 +1,37 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +inherit cmake + +DESCRIPTION="ArpON (Arp handler inspectiON) is a portable Arp handler" + +MY_PN="ArpON" +MY_P="${MY_PN}-${PV}" +HOMEPAGE="http://arpon.sourceforge.net/" +SRC_URI="mirror://sourceforge/${PN}/${MY_P}.tar.gz" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~amd64 ~x86" + +DEPEND=" + dev-libs/libdnet + net-libs/libnet:1.1 + net-libs/libpcap +" +RDEPEND=" + ${DEPEND} +" +PATCHES=( + "${FILESDIR}"/${PN}-2.7.2-CFLAGS.patch + "${FILESDIR}"/${PN}-2.7.2-etc.patch +) +DOCS=( AUTHOR CHANGELOG ) +S="${WORKDIR}"/${MY_P} + +src_install() { + cmake_src_install + newinitd "${FILESDIR}"/${PN}.initd ${PN} + newconfd "${FILESDIR}"/${PN}.confd ${PN} +} diff --git a/net-analyzer/arpon/arpon-2.7.2.ebuild b/net-analyzer/arpon/arpon-2.7.2.ebuild new file mode 100644 index 000000000000..a79e9de5e0fa --- /dev/null +++ b/net-analyzer/arpon/arpon-2.7.2.ebuild @@ -0,0 +1,41 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 +inherit cmake-utils readme.gentoo-r1 + +DESCRIPTION="ArpON (Arp handler inspectiON) is a portable Arp handler" + +MY_PN="ArpON" +MY_P="${MY_PN}-${PV}" +HOMEPAGE="http://arpon.sourceforge.net/" +SRC_URI="mirror://sourceforge/${PN}/${MY_P}.tar.gz" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="amd64 x86" +IUSE="" + +DEPEND="dev-libs/libdnet + net-libs/libnet:1.1 + net-libs/libpcap" + +RDEPEND=${DEPEND} + +S="${WORKDIR}"/${MY_P} + +src_prepare() { + sed -i -e "/set(CMAKE_C_FLAGS/d" CMakeLists.txt || die + + DOC_CONTENTS="${PN} now installs an init script. Please edit + the /etc/conf.d/arpon file to match your needs" + + cmake-utils_src_prepare +} + +src_install() { + cmake-utils_src_install + newinitd "${FILESDIR}"/${PN}.initd ${PN} + newconfd "${FILESDIR}"/${PN}.confd ${PN} + readme.gentoo_create_doc +} diff --git a/net-analyzer/arpon/files/arpon-2.7.2-CFLAGS.patch b/net-analyzer/arpon/files/arpon-2.7.2-CFLAGS.patch new file mode 100644 index 000000000000..525f03740dd9 --- /dev/null +++ b/net-analyzer/arpon/files/arpon-2.7.2-CFLAGS.patch @@ -0,0 +1,14 @@ +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -51,11 +51,9 @@ + if(cmake_build_type_tolower STREQUAL "debug") + message(STATUS "Build Type: Debug") + set(CMAKE_BUILD_TYPE "Debug") +- set(CMAKE_C_FLAGS "-Wall -Werror -pedantic -O0 -g") + else() + message(STATUS "Build Type: Release") + set(CMAKE_BUILD_TYPE "Release") +- set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Werror") + endif() + + include_directories( diff --git a/net-analyzer/arpon/files/arpon-2.7.2-etc.patch b/net-analyzer/arpon/files/arpon-2.7.2-etc.patch new file mode 100644 index 000000000000..03e80f9d5955 --- /dev/null +++ b/net-analyzer/arpon/files/arpon-2.7.2-etc.patch @@ -0,0 +1,11 @@ +--- a/etc/CMakeLists.txt ++++ b/etc/CMakeLists.txt +@@ -14,7 +14,7 @@ + COMPONENT Etcfile) + else(${CMAKE_INSTALL_PREFIX} STREQUAL "/") + install(FILES ${arpon_etc_src} +- DESTINATION ${CMAKE_INSTALL_PREFIX}/etc ++ DESTINATION /etc + PERMISSIONS OWNER_READ GROUP_READ WORLD_READ + COMPONENT Etcfile) + endif(${CMAKE_INSTALL_PREFIX} STREQUAL "/") diff --git a/net-analyzer/arpon/files/arpon.confd b/net-analyzer/arpon/files/arpon.confd new file mode 100644 index 000000000000..d1ce050fa4cb --- /dev/null +++ b/net-analyzer/arpon/files/arpon.confd @@ -0,0 +1,5 @@ +METHOD="--darpi" +IFACE="eth0" +LOGFILE="/var/log/arpon.log" + +ARPON_OPTS="${METHOD} --iface ${IFACE} --log-file ${LOGFILE} --log" diff --git a/net-analyzer/arpon/files/arpon.initd b/net-analyzer/arpon/files/arpon.initd new file mode 100644 index 000000000000..dc69135c26e3 --- /dev/null +++ b/net-analyzer/arpon/files/arpon.initd @@ -0,0 +1,19 @@ +#!/sbin/openrc-run +# Distributed under the terms of the GNU General Public License v2 + +depend() { + need net +} + +start() { + ebegin "Starting arpon" + start-stop-daemon --start --background --make-pidfile --pidfile "/var/run/arpon.pid" \ + --exec /usr/sbin/arpon -- ${ARPON_OPTS} >/dev/null 2>&1 + eend $? +} + +stop() { + ebegin "Stopping arpon" + start-stop-daemon --stop --pidfile "/var/run/arpon.pid" + eend $? +} diff --git a/net-analyzer/arpon/metadata.xml b/net-analyzer/arpon/metadata.xml new file mode 100644 index 000000000000..6e78be6e8827 --- /dev/null +++ b/net-analyzer/arpon/metadata.xml @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <!-- maintainer-needed --> + <upstream> + <remote-id type="sourceforge">arpon</remote-id> + </upstream> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/arptools/Manifest b/net-analyzer/arptools/Manifest new file mode 100644 index 000000000000..d0d6a29a041c --- /dev/null +++ b/net-analyzer/arptools/Manifest @@ -0,0 +1 @@ +DIST arptools-1.0.2.tar.gz 87475 BLAKE2B 1bbfa8082db28abaa78a3f9f363ed255909e6c6dc2a9fabc1668f66228977b9ecc5b70d4cf3514affb324daf31b906b40b1ec7d88ecc9568504362789ece42fb SHA512 c976a5a7778a9330ebda6ed69ef045ede3747b98d27a7e575f985646a52bf57e4a6584da280a0a13520a43b5d765b2ddbec2239d7c3ac865ffdf1ae23f5ff347 diff --git a/net-analyzer/arptools/arptools-1.0.2.ebuild b/net-analyzer/arptools/arptools-1.0.2.ebuild new file mode 100644 index 000000000000..44c7fa89a834 --- /dev/null +++ b/net-analyzer/arptools/arptools-1.0.2.ebuild @@ -0,0 +1,20 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +DESCRIPTION="a collection of libnet and libpcap based ARP utilities" +HOMEPAGE="https://github.com/burghardt/arptools" +SRC_URI="http://www.burghardt.pl/files/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~ppc ~x86" + +DEPEND=" + net-libs/libnet:1.1 + net-libs/libpcap +" +RDEPEND="${DEPEND}" + +DOCS=( AUTHORS ChangeLog NEWS README TODO ) diff --git a/net-analyzer/arptools/metadata.xml b/net-analyzer/arptools/metadata.xml new file mode 100644 index 000000000000..12b8be5878e9 --- /dev/null +++ b/net-analyzer/arptools/metadata.xml @@ -0,0 +1,12 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<maintainer type="person"> + <email>robbat2@gentoo.org</email> +</maintainer> +<maintainer type="project"> + <email>netmon@gentoo.org</email> + <name>Gentoo network monitoring and analysis project</name> +</maintainer> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/arpwatch/Manifest b/net-analyzer/arpwatch/Manifest new file mode 100644 index 000000000000..360ecca15b0c --- /dev/null +++ b/net-analyzer/arpwatch/Manifest @@ -0,0 +1,2 @@ +DIST arpwatch-2.1a15.tar.gz 202729 BLAKE2B b583dea83c57a55b8705f0265c1324de270571468dc9f2e1d5351fd53340f7636f1d00e3de24caa9747384697721e6227e5e6de4b3827e5ac7adef4ce524fffd SHA512 f770b5b7954afe910dafb016e6e886a4e785564bcdc0ea0de9d7b1ca6a9a0b219a9d1b50b6f42a67afc2f836e782e8ff85ba5780583015d62c9694ac53f0bf90 +DIST arpwatch-patchset-0.8.tar.xz 131692 BLAKE2B 8db242f7c74c8fee0700e12e8ff028fcaa336e5feb61514b44a892a132779c11d1ca3ce2fabee3cbcbbdcb0dae0ed470daa786a91619c18e24066f11da126bc4 SHA512 3e8f1c043f09fbeacadb40c1db47fb907314ed18bb3fb506c6c510977fd0e6dd9950becc830cf7c10911a7eec97e56e0af8c8c3d7df811e8ab820290973ea0b0 diff --git a/net-analyzer/arpwatch/arpwatch-2.1.15-r11.ebuild b/net-analyzer/arpwatch/arpwatch-2.1.15-r11.ebuild new file mode 100644 index 000000000000..fbefe68bec99 --- /dev/null +++ b/net-analyzer/arpwatch/arpwatch-2.1.15-r11.ebuild @@ -0,0 +1,86 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 +inherit user versionator + +PATCH_VER="0.8" +MY_P="${PN}-$(replace_version_separator 2 'a')" + +DESCRIPTION="An ethernet monitor program that keeps track of ethernet/IP address pairings" +HOMEPAGE="https://ee.lbl.gov/" +SRC_URI=" + ftp://ftp.ee.lbl.gov/${MY_P}.tar.gz + https://dev.gentoo.org/~jer/arpwatch-patchset-${PATCH_VER}.tar.xz +" + +LICENSE="BSD GPL-2" +SLOT="0" +KEYWORDS="amd64 hppa ppc sparc x86" +IUSE="selinux" + +DEPEND=" + net-libs/libpcap + sys-libs/ncurses:* +" +RDEPEND=" + ${DEPEND} + selinux? ( sec-policy/selinux-arpwatch ) +" + +S="${WORKDIR}/${MY_P}" + +pkg_setup() { + # We need to create /var/lib/arpwatch with this group, so it must + # exist during src_install. + enewgroup arpwatch +} + +pkg_postinst() { + # The user, however, is not needed until runtime. + enewuser arpwatch -1 -1 -1 arpwatch +} + +src_prepare() { + local patchdir="${WORKDIR}/arpwatch-patchset" + + eapply "${patchdir}"/*.patch + eapply_user + + cp "${patchdir}"/*.8 ./ || die "failed to copy man pages from ${patchdir}" +} + +src_install() { + dosbin arpwatch arpsnmp arp2ethers massagevendor arpfetch bihourly.sh + doman arpwatch.8 arpsnmp.8 arp2ethers.8 massagevendor.8 arpfetch.8 bihourly.8 + + insinto /usr/share/arpwatch + doins ethercodes.dat + + insinto /usr/share/arpwatch/awk + doins duplicates.awk euppertolower.awk p.awk e.awk d.awk + + diropts --group=arpwatch --mode=770 + keepdir /var/lib/arpwatch + dodoc README CHANGES + + newinitd "${FILESDIR}"/arpwatch.initd-r1 arpwatch + newconfd "${FILESDIR}"/arpwatch.confd-r1 arpwatch +} + +pkg_postinst() { + # Previous revisions installed /var/lib/arpwatch with the wrong + # ownership. Instead of the intended arpwatch:root, it was left as + # root:root. If we find any such mis-owned directories, we fix them, + # and then set the permission bits how we want them in *this* + # revision. + # + # The "--from" flag ensures that we only fix directories that need + # fixing, and the "&& chmod" ensures that we only adjust the + # permissions if the owner also needed fixing. + chown --from=root:root \ + --no-dereference \ + :arpwatch \ + "${ROOT}"/var/lib/arpwatch && \ + chmod 770 "${ROOT}"/var/lib/arpwatch +} diff --git a/net-analyzer/arpwatch/files/arpwatch.confd b/net-analyzer/arpwatch/files/arpwatch.confd new file mode 100644 index 000000000000..98abe0417740 --- /dev/null +++ b/net-analyzer/arpwatch/files/arpwatch.confd @@ -0,0 +1,11 @@ +# Config file for /etc/init.d/arpwatch +# see arpwatch.8 for more information + +#IFACES="eth0 eth1" +IFACES="eth0" + +# Additional options to pass to arpwatch. +OPTIONS="-N -p" + +# Comment this line if you wish arpwatch to run as root user (not recommended) +ARPUSER="arpwatch" diff --git a/net-analyzer/arpwatch/files/arpwatch.confd-r1 b/net-analyzer/arpwatch/files/arpwatch.confd-r1 new file mode 100644 index 000000000000..a4da503406a2 --- /dev/null +++ b/net-analyzer/arpwatch/files/arpwatch.confd-r1 @@ -0,0 +1,17 @@ +# See arpwatch.8 for more information + +# Specify the interface for arpwatch to listen on here (default: lo). +# If you need to listen on more than one interface, you should +# run multiple arpwatch services; for example "arpwatch" and +# "arpwatch.eth1". These additional services can be configured by +# symlinking to the "arpwatch" service script, and by creating a new +# conf.d file whose name matches the new service (symlink) name. +# +# Example: +# +# ARPWATCH_IFACE="eth0" +# +ARPWATCH_IFACE="lo" + +# Additional options to pass to arpwatch. +ARPWATCH_OPTS="-N -p" diff --git a/net-analyzer/arpwatch/files/arpwatch.initd b/net-analyzer/arpwatch/files/arpwatch.initd new file mode 100644 index 000000000000..5569dcee2527 --- /dev/null +++ b/net-analyzer/arpwatch/files/arpwatch.initd @@ -0,0 +1,36 @@ +#!/sbin/openrc-run +# Copyright 1999-2006 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +depend() { + need net +} + +start() { + for IFACE in ${IFACES} + do + ebegin "Starting arpwatch on ${IFACE}" + DATAFILE=/var/lib/arpwatch/${IFACE}.dat + [ ! -f ${DATAFILE} ] && touch ${DATAFILE} + + if [ -z ${ARPUSER} ]; then + start-stop-daemon --start --quiet --pidfile=/var/run/arpwatch.${IFACE}.pid --exec \ + /usr/sbin/arpwatch -- -i ${IFACE} -f ${DATAFILE} -P /var/run/arpwatch.${IFACE}.pid ${OPTIONS} + else + chown ${ARPUSER} ${DATAFILE} + start-stop-daemon --start --quiet --pidfile=/var/run/arpwatch.${IFACE}.pid --exec \ + /usr/sbin/arpwatch -- -i $IFACE -u ${ARPUSER} -f ${DATAFILE} -P /var/run/arpwatch.${IFACE}.pid ${OPTIONS} + fi + eend $? + done +} + +stop() { + for IFACE in ${IFACES} + do + ebegin "Stopping arpwatch on ${IFACE}" + start-stop-daemon --stop --quiet --pidfile=/var/run/arpwatch.${IFACE}.pid --exec \ + /usr/sbin/arpwatch + eend $? + done +} diff --git a/net-analyzer/arpwatch/files/arpwatch.initd-r1 b/net-analyzer/arpwatch/files/arpwatch.initd-r1 new file mode 100644 index 000000000000..ffe165205c6a --- /dev/null +++ b/net-analyzer/arpwatch/files/arpwatch.initd-r1 @@ -0,0 +1,27 @@ +#!/sbin/openrc-run +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +# Default to "lo" for the interface, so that the init script will work +# out-of-the-box. +: ${ARPWATCH_IFACE:=lo} + +ARPWATCH_DATAFILE="/var/lib/arpwatch/${RC_SVCNAME}.dat" + +command="/usr/sbin/arpwatch" +pidfile="/run/${RC_SVCNAME}.pid" +command_args="-i ${ARPWATCH_IFACE} + -u arpwatch + -f ${ARPWATCH_DATAFILE} + -P ${pidfile} + ${ARPWATCH_OPTS}" + +depend() { + need "net.${ARPWATCH_IFACE}" +} + +start_pre() { + # The "arpwatch" user must be a member of the "arpwatch" group for + # this to work. + checkpath --file --owner root:arpwatch --mode 0660 "${ARPWATCH_DATAFILE}" +} diff --git a/net-analyzer/arpwatch/metadata.xml b/net-analyzer/arpwatch/metadata.xml new file mode 100644 index 000000000000..fa960ccb1182 --- /dev/null +++ b/net-analyzer/arpwatch/metadata.xml @@ -0,0 +1,17 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<maintainer type="project"> + <email>netmon@gentoo.org</email> + <name>Gentoo network monitoring and analysis project</name> + </maintainer> + <longdescription lang="en"> + The arpwatch package contains arpwatch and arpsnmp. Arpwatch and arpsnmp + are both network monitoring tools. Both utilities monitor Ethernet or + FDDI network traffic and build databases of Ethernet/IP address pairs, + and can report certain changes via email. Install the arpwatch package + if you need networking monitoring devices which will automatically keep + track of the IP addresses on your network. + </longdescription> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/authforce/Manifest b/net-analyzer/authforce/Manifest new file mode 100644 index 000000000000..41ebfaa169c6 --- /dev/null +++ b/net-analyzer/authforce/Manifest @@ -0,0 +1 @@ +DIST authforce-0.9.9.tar.gz 424557 BLAKE2B 3b962f7c3d445525364b8e40e3b47d0c951e04b7b5d40077540b1dc34721aca5163f9328451f23b7f1891d3a5440d003568ca6eb5104a523bdccb33ade61546d SHA512 fd94c6ac5f98f480af4acba2de7c0ad81dbc4c759cce8f3f722dcf8870b0c16a9e7d462f4542784737e021f9c8d480b26895dddb4d5953f730ff8a181ad474b3 diff --git a/net-analyzer/authforce/authforce-0.9.9-r2.ebuild b/net-analyzer/authforce/authforce-0.9.9-r2.ebuild new file mode 100644 index 000000000000..09d3520a5b40 --- /dev/null +++ b/net-analyzer/authforce/authforce-0.9.9-r2.ebuild @@ -0,0 +1,44 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +DESCRIPTION="An HTTP authentication brute forcer" +HOMEPAGE="http://www.divineinvasion.net/authforce/" +SRC_URI="http://www.divineinvasion.net/${PN}/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="amd64 ~ppc x86" +IUSE="curl nls" + +RDEPEND="sys-libs/readline:0= + curl? ( net-misc/curl )" +DEPEND="${RDEPEND}" +BDEPEND="nls? ( sys-devel/gettext )" + +DOCS=( AUTHORS BUGS NEWS README THANKS TODO ) + +PATCHES=( + "${FILESDIR}"/${P}-curl.patch + "${FILESDIR}"/${P}-locale.patch +) + +src_prepare() { + default + gunzip doc/${PN}.1.gz + sed -i -e "s/${PN}.1.gz/${PN}.1/g" \ + -e "s/\/mang/\/man1/g" doc/Makefile* || die +} + +src_configure() { + econf \ + $(use_with curl) \ + $(use_enable nls) \ + --with-path=/usr/share/${PN}/data:. +} + +src_install() { + default + doman doc/${PN}.1 +} diff --git a/net-analyzer/authforce/authforce-0.9.9-r3.ebuild b/net-analyzer/authforce/authforce-0.9.9-r3.ebuild new file mode 100644 index 000000000000..183912b43cae --- /dev/null +++ b/net-analyzer/authforce/authforce-0.9.9-r3.ebuild @@ -0,0 +1,47 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +DESCRIPTION="An HTTP authentication brute forcer" +HOMEPAGE="http://www.divineinvasion.net/authforce/" +SRC_URI="http://www.divineinvasion.net/${PN}/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~ppc ~x86" +IUSE="curl nls" + +RDEPEND="sys-libs/readline:0= + curl? ( net-misc/curl )" +DEPEND="${RDEPEND}" +BDEPEND="nls? ( sys-devel/gettext )" + +DOCS=( AUTHORS BUGS NEWS README THANKS TODO ) + +PATCHES=( + "${FILESDIR}"/${P}-curl.patch + "${FILESDIR}"/${P}-locale.patch + "${FILESDIR}"/${P}-fixes-for-Wall-warnings.patch + "${FILESDIR}"/${P}-fix-parsing-of-sample-config-file.patch + "${FILESDIR}"/${P}-fix-submit_dummy_list-re-declaration.patch +) + +src_prepare() { + default + gunzip doc/${PN}.1.gz + sed -i -e "s/${PN}.1.gz/${PN}.1/g" \ + -e "s/\/mang/\/man1/g" doc/Makefile* || die +} + +src_configure() { + econf \ + $(use_with curl) \ + $(use_enable nls) \ + --with-path=/usr/share/${PN}/data:. +} + +src_install() { + default + doman doc/${PN}.1 +} diff --git a/net-analyzer/authforce/files/authforce-0.9.9-curl.patch b/net-analyzer/authforce/files/authforce-0.9.9-curl.patch new file mode 100644 index 000000000000..22552f8aafd4 --- /dev/null +++ b/net-analyzer/authforce/files/authforce-0.9.9-curl.patch @@ -0,0 +1,10 @@ +--- authforce-0.9.9/src/http.c ++++ authforce-0.9.9/src/http.c +@@ -7,7 +7,6 @@ + #include <time.h> + #ifdef USE_CURL + #include <curl/curl.h> +-#include <curl/types.h> + #include <curl/easy.h> + #endif /* USE_CURL */ + #ifdef MEMWATCH diff --git a/net-analyzer/authforce/files/authforce-0.9.9-fix-parsing-of-sample-config-file.patch b/net-analyzer/authforce/files/authforce-0.9.9-fix-parsing-of-sample-config-file.patch new file mode 100644 index 000000000000..902b2a086e0d --- /dev/null +++ b/net-analyzer/authforce/files/authforce-0.9.9-fix-parsing-of-sample-config-file.patch @@ -0,0 +1,54 @@ +From 294ef3529016c29769d10dee9e5f639c2ce02b91 Mon Sep 17 00:00:00 2001 +From: "Zachary P. Landau" <zlandau@jellofund.net> +Date: Wed, 5 Feb 2020 23:18:31 -0800 +Subject: [PATCH 3/4] Fix parsing of sample config file + +This code is horribly broken, but we should at least be able to parse +the authforcerc.sample file, and report the right line number when +failing. +--- + src/config.c | 7 +++---- + 1 file changed, 3 insertions(+), 4 deletions(-) + +diff --git a/src/config.c b/src/config.c +index 4462fcc..66313d9 100644 +--- a/src/config.c ++++ b/src/config.c +@@ -11,7 +11,7 @@ + #endif /* MEMWATCH */ + #include "extern.h" + +-#define BUFFER_LEN 82 ++#define BUFFER_LEN 100 + #define IS_BIT(x) (!strcmp(x, "0") || !strcmp(x, "1")) + + static void process_boolean(char *option, char *value, int *variable) { +@@ -30,7 +30,7 @@ void parse_config(char *config) { + char *option; /* config file option */ + char *value; /* value for option */ + +- int line_number = 1; ++ int line_number = 0; + char *chop; + + /* MEMWATCH: reports this isnt freed, why? */ +@@ -45,6 +45,7 @@ void parse_config(char *config) { + } + + while (fgets(buffer, sizeof(buffer), fp)) { ++ line_number++; + if (buffer[0] == '#' || buffer[0] == ';' || buffer[0] == '\n') + continue; + remove_crud(buffer); +@@ -123,8 +124,6 @@ void parse_config(char *config) { + else + if (!quiet) + printf("parse_config: option %s is not valid\n", option); +- +- line_number++; + } + + debug(3, "parse_config: read %s [%i]\n", config, line_number-1); +-- +2.25.0 + diff --git a/net-analyzer/authforce/files/authforce-0.9.9-fix-submit_dummy_list-re-declaration.patch b/net-analyzer/authforce/files/authforce-0.9.9-fix-submit_dummy_list-re-declaration.patch new file mode 100644 index 000000000000..e6ca243fcad7 --- /dev/null +++ b/net-analyzer/authforce/files/authforce-0.9.9-fix-submit_dummy_list-re-declaration.patch @@ -0,0 +1,25 @@ +From d7f718e78444acef635acdd19e34dc4783e741fa Mon Sep 17 00:00:00 2001 +From: "Zachary P. Landau" <zlandau@jellofund.net> +Date: Wed, 5 Feb 2020 23:00:06 -0800 +Subject: [PATCH 1/4] Fix submit_dummy_list re-declaration + +--- + src/extern.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/extern.h b/src/extern.h +index 6798bd7..cc08e0a 100644 +--- a/src/extern.h ++++ b/src/extern.h +@@ -61,7 +61,7 @@ extern void initialize_submit(void); + extern int submit(char *username, char *password); + extern void shutdown_submit(void); + #ifdef USE_DUMMY +-char **submit_dummy_list; ++extern char **submit_dummy_list; + #endif /* USE_DUMMY */ + + /* files.c */ +-- +2.25.0 + diff --git a/net-analyzer/authforce/files/authforce-0.9.9-fixes-for-Wall-warnings.patch b/net-analyzer/authforce/files/authforce-0.9.9-fixes-for-Wall-warnings.patch new file mode 100644 index 000000000000..083bb93d1296 --- /dev/null +++ b/net-analyzer/authforce/files/authforce-0.9.9-fixes-for-Wall-warnings.patch @@ -0,0 +1,111 @@ +From ef74da31208f1390bbc17d4c455c821f141ec78b Mon Sep 17 00:00:00 2001 +From: "Zachary P. Landau" <zlandau@jellofund.net> +Date: Wed, 5 Feb 2020 23:17:50 -0800 +Subject: [PATCH 2/4] Fixes for -Wall warnings + +--- + src/files.c | 10 +++++----- + src/http.c | 4 ---- + src/methods.c | 4 ++-- + 3 files changed, 7 insertions(+), 11 deletions(-) + +diff --git a/src/files.c b/src/files.c +index 1068616..92d45ac 100644 +--- a/src/files.c ++++ b/src/files.c +@@ -70,7 +70,7 @@ char **textlist(char *textfile) { + + /* MEMWATCH: this isnt freed, why? */ + wordlist[count] = malloc_w(sizeof(NULL)); +- wordlist[count] = (char)NULL; ++ wordlist[count] = NULL; + + fclose(fp); + +@@ -83,7 +83,7 @@ char **copy_list(char **list) { + char **n_list; /* new list */ + + /* find num of elements */ +- while (list[i] != (char)NULL) ++ while (list[i] != NULL) + i++; + /* plus one for NULL */ + i++; +@@ -91,12 +91,12 @@ char **copy_list(char **list) { + n_list = malloc_w(i*sizeof(char*)); + + i=0; +- while (list[i] != (char)NULL) { ++ while (list[i] != NULL) { + n_list[i] = (char*)strdup_w(list[i]); + i++; + } + +- n_list[i] = (char)NULL; ++ n_list[i] = NULL; + + return (n_list); + } +@@ -104,7 +104,7 @@ char **copy_list(char **list) { + void free_list(char **list) { + int i=0; + +- while (list[i] != (char)NULL) { ++ while (list[i] != NULL) { + free(list[i]); + i++; + } +diff --git a/src/http.c b/src/http.c +index 88acdfc..397ac1f 100644 +--- a/src/http.c ++++ b/src/http.c +@@ -40,7 +40,6 @@ int submit(char *username, char *password) { + CURLcode result; + char error[CURL_ERROR_SIZE] = ""; + char authstring[92]; +- time_t before, after; + + + num_connects++; +@@ -59,8 +58,6 @@ int submit(char *username, char *password) { + } else + printf("trying %s->%s\n", username, password); + +- before = time(0); +- + if (curl) { + curl_easy_setopt(curl, CURLOPT_URL, url); + curl_easy_setopt(curl, CURLOPT_ERRORBUFFER, error); +@@ -79,7 +76,6 @@ int submit(char *username, char *password) { + result = curl_easy_perform(curl); + } + +- after = time(0); + /* num_connects jumps the gun earlier on */ + // acs = stats(acs, after-before, num_connects-1); + +diff --git a/src/methods.c b/src/methods.c +index 3c74c65..bdb6efc 100644 +--- a/src/methods.c ++++ b/src/methods.c +@@ -76,7 +76,7 @@ char *transform(char *username, char *password) { + + strncpy(old_password, password, sizeof(char)*41); + +- while ((cur_element = elements[i]) != (char)NULL) { ++ while ((cur_element = elements[i]) != NULL) { + if (!strcmp(password, "{username}")) + strncpy(insertion, username, sizeof(insertion)); + else if (!strcmp(password, "{emanresu}")) +@@ -120,7 +120,7 @@ void common_pairs(void) { + } + + while (1) { +- if (common_pairs_list[i] == (char)NULL) ++ if (common_pairs_list[i] == NULL) + break; + strncpy(username, common_pairs_list[i], sizeof(char)*81); + password = extract(username, ':'); +-- +2.25.0 + diff --git a/net-analyzer/authforce/files/authforce-0.9.9-locale.patch b/net-analyzer/authforce/files/authforce-0.9.9-locale.patch new file mode 100644 index 000000000000..89792db3ea12 --- /dev/null +++ b/net-analyzer/authforce/files/authforce-0.9.9-locale.patch @@ -0,0 +1,15 @@ + src/main.c | 1 + + 1 files changed, 1 insertions(+), 0 deletions(-) + +diff --git a/src/main.c b/src/main.c +index 0fd275a..296e181 100644 +--- a/src/main.c ++++ b/src/main.c +@@ -14,6 +14,7 @@ + #include "extern.h" + #ifdef ENABLE_NLS + #define _(x) dgettext(PACKAGE_NAME, x) ++#include <locale.h> + #else + #define _(x) (x) + #endif diff --git a/net-analyzer/authforce/metadata.xml b/net-analyzer/authforce/metadata.xml new file mode 100644 index 000000000000..1003331dc731 --- /dev/null +++ b/net-analyzer/authforce/metadata.xml @@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>m.mairkeimberger@gmail.com</email> + <name>Michael Mair-Keimberger</name> + </maintainer> + <maintainer type="project"> + <email>proxy-maint@gentoo.org</email> + <name>Proxy Maintainers</name> + </maintainer> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/barnyard/Manifest b/net-analyzer/barnyard/Manifest new file mode 100644 index 000000000000..c81bf30f726e --- /dev/null +++ b/net-analyzer/barnyard/Manifest @@ -0,0 +1,2 @@ +DIST barnyard-0.2.0-patches.tar.bz2 12911 BLAKE2B 06215ec8cc8c2fb7ff8e57cfd2f02456180263778722001442faf8f32445fc7fa7fc0da5d00644dbf239949d5e02dd76025428c14c6c1bae8b6565ddf6edf08a SHA512 e8e5243d49b71dd76e3274e27116f99ea6c674983cb18499889c9d27a83740a6b17aa6d30c8a9acdb46103da8314679f4eba8bf1cd252d7fb6b8a34afac46b21 +DIST barnyard-0.2.0.tar.gz 161543 BLAKE2B 07f5fa6b2e01e1b421ea772b8ea0c72b6c8f66569caf176a57d3f4fce438c2dd4b2a8a61dddc4faf27c85b15d002205f1cc3627fe88d523fd25d716cc78747e7 SHA512 73424acf2e0c620b2f8f2f407d74812f7740234ce523e37557273998108c131311fffb16cfc2cea0f652d6b21072431081bad35b045f5654e2245786d27568e6 diff --git a/net-analyzer/barnyard/barnyard-0.2.0-r5.ebuild b/net-analyzer/barnyard/barnyard-0.2.0-r5.ebuild new file mode 100644 index 000000000000..3bdf7cdd9cb9 --- /dev/null +++ b/net-analyzer/barnyard/barnyard-0.2.0-r5.ebuild @@ -0,0 +1,92 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit autotools + +DESCRIPTION="Fast output system for Snort" +HOMEPAGE="https://sourceforge.net/projects/barnyard" +SRC_URI=" + mirror://sourceforge/barnyard/barnyard-${PV/_/-}.tar.gz + mirror://gentoo/${P}-patches.tar.bz2" + +SLOT="0" +LICENSE="QPL GPL-2" +KEYWORDS="~amd64 -sparc ~x86" +IUSE="mysql postgres sguil" + +DEPEND=" + net-libs/libpcap + mysql? ( dev-db/mysql-connector-c:0= ) + postgres? ( dev-db/postgresql:*[server] ) + sguil? ( dev-lang/tcl:0 )" +RDEPEND="${DEPEND} + net-analyzer/snort" + +S="${WORKDIR}/${P/_/-}" + +DOCS="AUTHORS README docs/*" + +src_prepare() { + default + eapply "${FILESDIR}/barnyard.64bit.diff" + if use sguil ; then + eapply "${WORKDIR}/${PV}-sguil_files.patch" + eapply "${WORKDIR}/${PV}-configure-in.patch" + cd "${S}/src/output-plugins" || die + eapply "${WORKDIR}/${PV}-op_plugbase.c.patch" + cd "${S}" || die + fi + eautoreconf +} + +src_configure() { + local myconf + if use sguil ; then + myconf="--enable-tcl" + fi + + econf \ + ${myconf} \ + --sysconfdir=/etc/snort \ + $(use_enable postgres) \ + $(use_enable mysql) +} + +src_install() { + default + + keepdir /var/log/snort + keepdir /var/log/snort/archive + + insinto /etc/snort + newins etc/barnyard.conf barnyard.conf + newconfd "${FILESDIR}"/barnyard.confd barnyard + newinitd "${FILESDIR}"/barnyard.rc6 barnyard + + if use sguil ; then + sed -i -e "/config hostname:/s%snorthost%$(hostname)%" \ + -e "/config interface/s:fxp0:eth0:" \ + -e "s:output alert_fast:#output alert_fast:" \ + -e "s:output log_dump:#output log_dump:" \ + "${D}/etc/snort/barnyard.conf" || die "sed failed" + + sed -i -e s:/var/log/snort:/var/lib/sguil/$(hostname): \ + -e s:/var/run/barnyard.pid:/var/run/sguil/barnyard.pid: \ + "${D}/etc/conf.d/barnyard" || die "sed failed" + + sed -i -e "/start-stop-daemon --start/s:--exec:-c sguil --exec:" \ + "${D}/etc/init.d/barnyard" || die "sed failed" + fi +} + +pkg_postinst() { + if use sguil ; then + elog + elog "Make sure to edit /etc/snort/barnyard.conf and uncomment the" + elog "sguil section along with supplying the appropriate database" + elog "information." + elog + fi +} diff --git a/net-analyzer/barnyard/files/barnyard.64bit.diff b/net-analyzer/barnyard/files/barnyard.64bit.diff new file mode 100644 index 000000000000..f338d291ff1c --- /dev/null +++ b/net-analyzer/barnyard/files/barnyard.64bit.diff @@ -0,0 +1,81 @@ +diff -ur barnyard-0.2.0/src/barnyard.h barnyard-0.2.0.64bit/src/barnyard.h +--- barnyard-0.2.0/src/barnyard.h 2004-05-01 12:43:29.000000000 -0400 ++++ barnyard-0.2.0.64bit/src/barnyard.h 2007-08-11 23:22:53.000000000 -0400 +@@ -34,7 +34,8 @@ + + typedef struct _SnortPktHeader + { +- struct timeval ts; /* packet timestamp */ ++ // struct timeval ts; /* packet timestamp */ ++ struct pcap_timeval ts; /* packet timestamp */ + u_int32_t caplen; /* packet capture length */ + u_int32_t pktlen; /* packet "real" length */ + } SnortPktHeader; +Only in barnyard-0.2.0.64bit/src: barnyard.h~ +diff -ur barnyard-0.2.0/src/event.h barnyard-0.2.0.64bit/src/event.h +--- barnyard-0.2.0/src/event.h 2003-05-02 22:44:12.000000000 -0400 ++++ barnyard-0.2.0.64bit/src/event.h 2007-08-12 00:13:44.000000000 -0400 +@@ -19,6 +19,11 @@ + #include <sys/types.h> + #include <sys/time.h> + ++struct pcap_timeval { ++ u_int32_t tv_sec; /* seconds */ ++ u_int32_t tv_usec; /* microseconds */ ++}; ++ + typedef struct _Event + { + u_int32_t sig_generator; /* which part of snort generated the alert? */ +@@ -30,6 +35,7 @@ + u_int32_t event_reference; /* reference to other events that have gone off, + * such as in the case of tagged packets... + */ +- struct timeval ref_time; /* reference time for the event reference */ ++ // struct timeval ref_time; /* reference time for the event reference */ ++ struct pcap_timeval ref_time; /* reference time for the event reference */ + } Event; + #endif /* __EVENT_H__ */ +Only in barnyard-0.2.0.64bit/src: event.h~ +diff -ur barnyard-0.2.0/src/input-plugins/dp_alert.h barnyard-0.2.0.64bit/src/input-plugins/dp_alert.h +--- barnyard-0.2.0/src/input-plugins/dp_alert.h 2004-02-19 20:59:48.000000000 -0500 ++++ barnyard-0.2.0.64bit/src/input-plugins/dp_alert.h 2007-08-11 23:24:25.000000000 -0400 +@@ -34,7 +34,8 @@ + typedef struct _UnifiedAlertRecord + { + Event event; +- struct timeval ts; /* event timestamp */ ++ // struct timeval ts; /* event timestamp */ ++ struct pcap_timeval ts; /* event timestamp */ + u_int32_t sip; /* src ip */ + u_int32_t dip; /* dest ip */ + u_int16_t sp; /* src port */ +Only in barnyard-0.2.0.64bit/src/input-plugins: dp_alert.h~ +diff -ur barnyard-0.2.0/src/util.c barnyard-0.2.0.64bit/src/util.c +--- barnyard-0.2.0/src/util.c 2004-03-06 17:30:15.000000000 -0500 ++++ barnyard-0.2.0.64bit/src/util.c 2007-08-12 00:14:52.000000000 -0400 +@@ -514,7 +514,8 @@ + + static char tmpbuf[256]; + +-int RenderTimeval(struct timeval *tv, char *timebuf, size_t len) ++// int RenderTimeval(struct timeval *tv, char *timebuf, size_t len) ++int RenderTimeval(struct pcap_timeval *tv, char *timebuf, size_t len) + { + struct tm *lt; + time_t timet; +Only in barnyard-0.2.0.64bit/src: util.c~ +diff -ur barnyard-0.2.0/src/util.h barnyard-0.2.0.64bit/src/util.h +--- barnyard-0.2.0/src/util.h 2004-03-06 19:23:50.000000000 -0500 ++++ barnyard-0.2.0.64bit/src/util.h 2007-08-11 23:23:46.000000000 -0400 +@@ -39,7 +39,8 @@ + void ClearDumpBuf(); + void GoDaemon(); + size_t RenderTimestamp(time_t timet, char *timebuf, size_t len); +-int RenderTimeval(struct timeval *tv, char *timebuf, size_t len); ++// int RenderTimeval(struct timeval *tv, char *timebuf, size_t len); ++int RenderTimeval(struct pcap_timeval *tv, char *timebuf, size_t len); + int CreatePidFile(char *filename); + int String2Long(char *string, long *result); + int String2ULong(char *string, unsigned long *result); +Only in barnyard-0.2.0.64bit/src: util.h~ diff --git a/net-analyzer/barnyard/files/barnyard.confd b/net-analyzer/barnyard/files/barnyard.confd new file mode 100644 index 000000000000..be0013cb1fe9 --- /dev/null +++ b/net-analyzer/barnyard/files/barnyard.confd @@ -0,0 +1,19 @@ +# Config file for /etc/init.d/barnyard +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +PIDFILE="/var/run/barnyard.pid" +LOG_FILE="snort_unified.log" + +# You probably don't want to change this, but in case you do +LOGDIR="/var/log/snort" +ARCHIVEDIR="$LOGDIR/archive" +GENMSG_FILE="/etc/snort/gen-msg.map" +SIDMSG_FILE="/etc/snort/sid-msg.map" +WALDO_FILE="$LOGDIR/barnyard.waldo" + +# Probably not this either +CONF=/etc/snort/barnyard.conf + +# This pulls in the options above +BARNYARD_OPTS="-D -c $CONF -d $LOGDIR -g $GENMSG_FILE -s $SIDMSG_FILE -w $WALDO_FILE -L $LOGDIR -a $ARCHIVEDIR -f $LOG_FILE -X $PIDFILE" diff --git a/net-analyzer/barnyard/files/barnyard.rc6 b/net-analyzer/barnyard/files/barnyard.rc6 new file mode 100644 index 000000000000..abe42a194a60 --- /dev/null +++ b/net-analyzer/barnyard/files/barnyard.rc6 @@ -0,0 +1,29 @@ +#!/sbin/openrc-run +# Copyright 1999-2004 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +depend() { + need net +} + +checkconfig() { + if [ ! -e $CONF ] ; then + eerror "You need a configuration file to run barnyard" + eerror "There is an example config in /etc/snort/barnyard.conf.distrib" + return 1 + fi +} + +start() { + checkconfig || return 1 + ebegin "Starting barnyard" + start-stop-daemon --start --quiet --exec /usr/bin/barnyard \ + -- ${BARNYARD_OPTS} >/dev/null 2>&1 + eend $? +} + +stop() { + ebegin "Stopping barnyard" + start-stop-daemon --stop --quiet --pidfile ${PIDFILE} + eend $? +} diff --git a/net-analyzer/barnyard/metadata.xml b/net-analyzer/barnyard/metadata.xml new file mode 100644 index 000000000000..ad3ec94b7f96 --- /dev/null +++ b/net-analyzer/barnyard/metadata.xml @@ -0,0 +1,17 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>netmon@gentoo.org</email> + <name>Gentoo network monitoring and analysis project</name> + </maintainer> + <longdescription>Fast output system for Snort</longdescription> + <use> + <flag name="sguil">Enable sguil (The Analyst Console for Network Security +Monitoring) support</flag> + </use> + <upstream> + <remote-id type="sourceforge">barnyard</remote-id> + </upstream> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/barnyard2/Manifest b/net-analyzer/barnyard2/Manifest new file mode 100644 index 000000000000..32132ade52b6 --- /dev/null +++ b/net-analyzer/barnyard2/Manifest @@ -0,0 +1,2 @@ +DIST barnyard2-1.13-github.tar.gz 435017 BLAKE2B 2bfd6b038f4691cd9b40128c48db89cdb0cdefd9c779cbae4f6a86246507849f8faf73e10c986d9a48d45d608b02cbb8486bd731ebe1c78be115fe65c5a97704 SHA512 b9cf42ff3cb066493a3a6e8d095f6af1c59815ebb19725374a75977294620fe825cdbc6650d3600d3f8525860c39d3580aa1d6ef773cd31fbc28d500d6c75246 +DIST barnyard2-1.9-github.tar.gz 344672 BLAKE2B 720d55170eaf66d2fac7a73990f00dab6faf27c5fcfbcd2f3fa5bad8fa028880fc257a78b60660eaaa5cea3cd8ab04aea2ad173d2135757d7a1f93a80e049d06 SHA512 eb10e4333e862ba6d708e7956b86f9da5da8c52b2756724e821ac5f5ba064791cf84125942bf76e7c563f62c83558aff90219ccc694884e213f6571428849666 diff --git a/net-analyzer/barnyard2/barnyard2-1.13.ebuild b/net-analyzer/barnyard2/barnyard2-1.13.ebuild new file mode 100644 index 000000000000..377952066866 --- /dev/null +++ b/net-analyzer/barnyard2/barnyard2-1.13.ebuild @@ -0,0 +1,82 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +inherit autotools + +DESCRIPTION="Parser for Snort unified/unified2 files" +HOMEPAGE="https://github.com/firnsy/barnyard2 https://firnsy.com/projects" +SRC_URI="https://github.com/firnsy/barnyard2/archive/v2-${PV}.tar.gz -> ${P}-github.tar.gz" + +SLOT="0" +LICENSE="GPL-2" +KEYWORDS="~amd64 ~x86" +IUSE="debug gre mpls mysql odbc postgres sguil" + +DEPEND=" + net-libs/libpcap + mysql? ( dev-db/mysql-connector-c:0= ) + odbc? ( dev-db/unixODBC ) + postgres? ( dev-db/postgresql:* ) + sguil? ( dev-lang/tcl:* ) +" +RDEPEND=" + ${DEPEND} +" +DOCS="RELEASE.NOTES etc/barnyard2.conf doc/README* schemas/create_*" +S="${WORKDIR}/${PN}-2-${PV}" +PATCHES=( + "${FILESDIR}"/${PN}-1.13-free.patch + "${FILESDIR}"/${PN}-1.13-libdir.patch + "${FILESDIR}"/${PN}-1.13-my_bool.patch + "${FILESDIR}"/${PN}-1.13-odbc.patch + "${FILESDIR}"/${PN}-1.13-Werror.patch + "${FILESDIR}"/${PN}-1.13-pcap-1.9.0.patch +) + +src_prepare() { + default + + sed -i -e "s:^#config interface:config interface:" \ + "etc/barnyard2.conf" || die + sed -i -e "s:^output alert_fast:#output alert_fast:" \ + "etc/barnyard2.conf" || die + + AT_M4DIR="m4" eautoreconf +} + +src_configure() { + econf \ + $(use_enable debug) \ + $(use_enable gre) \ + $(use_enable mpls) \ + $(use_with mysql) \ + $(use_with odbc) \ + $(use_with postgres postgresql) \ + $(use_with sguil tcl) \ + --disable-aruba \ + --disable-ipv6 \ + --disable-mysql-ssl-support \ + --disable-prelude \ + --disable-static \ + --without-oracle +} + +src_install() { + default + + newconfd "${FILESDIR}/barnyard2.confd" barnyard2 + newinitd "${FILESDIR}/barnyard2.initd" barnyard2 + + dodir /etc/barnyard2 + keepdir /var/log/barnyard2 + keepdir /var/log/snort/archive + + rm "${D}"/etc/barnyard2.conf || die +} + +pkg_postinst() { + elog "Configuration options can be set in /etc/conf.d/barnyard2." + elog + elog "An example configuration file can be found in /usr/share/doc/${PF}." +} diff --git a/net-analyzer/barnyard2/barnyard2-1.9-r2.ebuild b/net-analyzer/barnyard2/barnyard2-1.9-r2.ebuild new file mode 100644 index 000000000000..7a9d865754c7 --- /dev/null +++ b/net-analyzer/barnyard2/barnyard2-1.9-r2.ebuild @@ -0,0 +1,72 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit autotools + +DESCRIPTION="Parser for Snort unified/unified2 files" +HOMEPAGE="https://github.com/firnsy/barnyard2 https://firnsy.com/projects" +SRC_URI="https://github.com/firnsy/barnyard2/archive/v2-${PV}.tar.gz -> ${P}-github.tar.gz" + +SLOT="0" +LICENSE="GPL-2" +KEYWORDS="~amd64 ~x86" +IUSE="debug gre mpls mysql odbc postgres static" + +DEPEND="net-libs/libpcap + mysql? ( dev-db/mysql-connector-c:0= ) + odbc? ( dev-db/unixODBC ) + postgres? ( dev-db/postgresql:*[server] )" +RDEPEND="${DEPEND}" + +DOCS="RELEASE.NOTES etc/barnyard2.conf doc/README* schemas/create_*" + +S="${WORKDIR}/${PN}-2-${PV}" + +src_prepare() { + default + sed -i -e "s:^#config interface:config interface:" \ + "etc/barnyard2.conf" || die + sed -i -e "s:^output alert_fast:#output alert_fast:" \ + "etc/barnyard2.conf" || die + + AT_M4DIR="m4" eautoreconf +} + +src_configure() { + econf \ + $(use_enable !static shared) \ + $(use_enable static) \ + $(use_enable debug) \ + $(use_enable gre) \ + $(use_enable mpls) \ + $(use_with mysql) \ + $(use_with odbc) \ + $(use_with postgres postgresql) \ + --disable-ipv6 \ + --disable-prelude \ + --disable-mysql-ssl-support \ + --disable-aruba \ + --without-tcl \ + --without-oracle +} + +src_install() { + default + + newconfd "${FILESDIR}/barnyard2.confd" barnyard2 + newinitd "${FILESDIR}/barnyard2.initd" barnyard2 + + dodir /etc/barnyard2 + keepdir /var/log/barnyard2 + keepdir /var/log/snort/archive + + rm "${D}"/etc/barnyard2.conf || die +} + +pkg_postinst() { + elog "Configuration options can be set in /etc/conf.d/barnyard2." + elog + elog "An example configuration file can be found in /usr/share/doc/${PF}." +} diff --git a/net-analyzer/barnyard2/files/barnyard2-1.13-Werror.patch b/net-analyzer/barnyard2/files/barnyard2-1.13-Werror.patch new file mode 100644 index 000000000000..e3b8b9c9ae2a --- /dev/null +++ b/net-analyzer/barnyard2/files/barnyard2-1.13-Werror.patch @@ -0,0 +1,17 @@ +--- a/configure.in ++++ b/configure.in +@@ -12,14 +12,6 @@ + NO_OPTIMIZE="no" + ADD_WERROR="no" + +-# Test for -Werror and sed it out for now since some of the auto tests, +-# for example AC_CHECK_LIB, will fail because of +-# warning: conflicting types for built-in function <func> +-if eval "echo $CFLAGS | grep -e -Werror"; then +- CFLAGS=`echo $CFLAGS | sed -e "s/-Werror//g"` +- ADD_WERROR="yes" +-fi +- + # Disable annoying practice of recursively re-running the autotools + AM_MAINTAINER_MODE + AC_PROG_CC_STDC diff --git a/net-analyzer/barnyard2/files/barnyard2-1.13-free.patch b/net-analyzer/barnyard2/files/barnyard2-1.13-free.patch new file mode 100644 index 000000000000..216fe480de7a --- /dev/null +++ b/net-analyzer/barnyard2/files/barnyard2-1.13-free.patch @@ -0,0 +1,11 @@ +--- a/src/output-plugins/spo_alert_unixsock.c ++++ b/src/output-plugins/spo_alert_unixsock.c +@@ -56,6 +56,8 @@ + #include "spo_alert_unixsock.h" + #include "barnyard2.h" + ++#include <stdlib.h> ++ + #define UNSOCK_FILE "barnyard2_alert" + + diff --git a/net-analyzer/barnyard2/files/barnyard2-1.13-libdir.patch b/net-analyzer/barnyard2/files/barnyard2-1.13-libdir.patch new file mode 100644 index 000000000000..5d3c7e37aa38 --- /dev/null +++ b/net-analyzer/barnyard2/files/barnyard2-1.13-libdir.patch @@ -0,0 +1,112 @@ +--- a/configure.in ++++ b/configure.in +@@ -570,53 +570,7 @@ + fi + done + +- for i in $mysql_lib_directory; do +- if test -z "$MYSQL_LIB_DIR"; then +- str="$i/libmysqlclient.*" +- for j in `echo $str`; do +- if test -r $j; then +- MYSQL_LIB_DIR=$i +- break 2 +- fi +- done +- fi +- if test -z "$MYSQL_LIB_DIR"; then +- str="$i/lib/libmysqlclient.*" +- for j in `echo $str`; do +- if test -r "$j"; then +- MYSQL_LIB_DIR="$i/lib" +- break 2 +- fi +- done +- fi +- if test -z "$MYSQL_LIB_DIR"; then +- str="$i/mysql/libmysqlclient.*" +- for j in `echo $str`; do +- if test -r "$j"; then +- MYSQL_LIB_DIR="$i/mysql" +- break 2 +- fi +- done +- fi +- if test -z "$MYSQL_LIB_DIR"; then +- str="$i/mysql/lib/libmysqlclient.*" +- for j in `echo $str`; do +- if test -r "$j"; then +- MYSQL_LIB_DIR="$i/mysql/lib" +- break 2 +- fi +- done +- fi +- if test -z "$MYSQL_LIB_DIR"; then +- str="$i/lib/mysql/libmysqlclient.*" +- for j in `echo $str`; do +- if test -r "$j"; then +- MYSQL_LIB_DIR="$i/lib/mysql" +- break 2 +- fi +- done +- fi +- done ++ AC_CHECK_LIB([mysqlclient],[mysql_query],[MYSQL_LIB_DIR="$libdir"]) + + if test -z "$MYSQL_INC_DIR"; then + if test "x$mysql_fail" != "xno"; then +@@ -760,13 +714,7 @@ + fi + else + +- str="$ODBC_DIR/lib/libodbc.*" +- for j in `echo $str`; do +- if test -r "$j"; then +- ODBC_LIB_DIR="$ODBC_DIR/lib" +- ODBC_LIB="odbc" +- fi +- done ++ AC_CHECK_LIB([odbc],[SQLAllocHandle],[ODBC_LIB_DIR="$libdir";ODBC_LIB="odbc"]) + + dnl if test -z "$ODBC_LIB_DIR"; then + dnl str="$ODBC_DIR/lib/libiodbc.*" +@@ -786,7 +734,6 @@ + fi + else + AC_MSG_RESULT(yes) +- LDFLAGS="${LDFLAGS} -L${ODBC_LIB_DIR}" + CPPFLAGS="${CPPFLAGS} -I${ODBC_INC_DIR} -DENABLE_ODBC" + LIBS="${LIBS} -l$ODBC_LIB" + fi +@@ -863,21 +810,7 @@ + fi + + +- if test -z "$POSTGRESQL_DIR"; then +- for dir in $postgresql_directory; do +- for i in "lib" "lib/pgsql"; do +- str="$dir/$i/libpq.*" +- for j in `echo $str`; do +- if test -r $j; then +- POSTGRESQL_LIB_DIR="$dir/$i" +- break 2 +- fi +- done +- done +- done +- else +- POSTGRESQL_LIB_DIR="$POSTGRESQL_DIR/lib" +- fi ++ AC_CHECK_LIB([pq],[PQexec],[POSTGRESQL_LIB_DIR="$libdir"]) + + if test -z "$POSTGRESQL_LIB_DIR"; then + if test "$postgresql_fail" != "no"; then +@@ -892,7 +825,7 @@ + CPPFLAGS="${CPPFLAGS} -I${POSTGRESQL_INC_DIR} -DENABLE_POSTGRESQL" + AC_CHECK_LIB(pq, PQexec,, PQLIB="no") + if test "x$PQLIB" != "xno"; then +- LIBS="${LIBS} -lpq" ++ : + else + echo + echo " ERROR! libpq (postgresql) not found!" diff --git a/net-analyzer/barnyard2/files/barnyard2-1.13-my_bool.patch b/net-analyzer/barnyard2/files/barnyard2-1.13-my_bool.patch new file mode 100644 index 000000000000..9cd93220662e --- /dev/null +++ b/net-analyzer/barnyard2/files/barnyard2-1.13-my_bool.patch @@ -0,0 +1,11 @@ +--- a/src/output-plugins/spo_database.h ++++ b/src/output-plugins/spo_database.h +@@ -357,7 +357,7 @@ + /* Herited from shared data globals */ + + unsigned long pThreadID; /* Used to store thread information and know if we "reconnected automaticaly" */ +- my_bool mysql_reconnect; /* We will handle it via the api. */ ++ u_int8_t mysql_reconnect; /* We will handle it via the api. */ + #endif /* ENABLE_MYSQL */ + + #ifdef ENABLE_POSTGRESQL diff --git a/net-analyzer/barnyard2/files/barnyard2-1.13-odbc.patch b/net-analyzer/barnyard2/files/barnyard2-1.13-odbc.patch new file mode 100644 index 000000000000..a7d77ee914fa --- /dev/null +++ b/net-analyzer/barnyard2/files/barnyard2-1.13-odbc.patch @@ -0,0 +1,41 @@ +--- a/src/output-plugins/spo_database_cache.c ++++ b/src/output-plugins/spo_database_cache.c +@@ -1202,10 +1202,10 @@ + + + +-#if (defined(ENABLE_MYSQL) || defined(ENABLE_POSTGRESQL)) ++#if (defined(ENABLE_MYSQL) || defined(ENABLE_POSTGRESQL) || defined(ENABLE_ODBC)) + u_int32_t curr_row = 0; + u_int32_t queryColCount =0; +-#endif /* (defined(ENABLE_MYSQL) || defined(ENABLE_POSTGRESQL)) */ ++#endif /* (defined(ENABLE_MYSQL) || defined(ENABLE_POSTGRESQL) || defined(ENABLE_ODBC)) */ + + + #ifdef ENABLE_ODBC +--- a/src/output-plugins/spo_database.c ++++ b/src/output-plugins/spo_database.c +@@ -3443,9 +3443,9 @@ + #endif + + +-#if defined(ENABLE_MYSQL) || defined(ENABLE_POSTGRESQL) ++#if defined(ENABLE_MYSQL) || defined(ENABLE_POSTGRESQL) || defined(ENABLE_ODBC) + int result = 0; +-#endif /* defined(ENABLE_MYSQL) || defined(ENABLE_POSTGRESQL) */ ++#endif /* defined(ENABLE_MYSQL) || defined(ENABLE_POSTGRESQL) || defined(ENABLE_ODBC) */ + + + if( (query == NULL) || +@@ -3668,9 +3668,9 @@ + int Select(char * query, DatabaseData * data,u_int32_t *rval) + { + +-#if defined(ENABLE_MYSQL) || defined(ENABLE_POSTGRESQL) ++#if defined(ENABLE_MYSQL) || defined(ENABLE_POSTGRESQL) || defined(ENABLE_ODBC) + int result = 0; +-#endif /* defined(ENABLE_MYSQL) || defined(ENABLE_POSTGRESQL) */ ++#endif /* defined(ENABLE_MYSQL) || defined(ENABLE_POSTGRESQL) || defined(ENABLE_ODBC) */ + + if( (query == NULL) || + (data == NULL) || diff --git a/net-analyzer/barnyard2/files/barnyard2-1.13-pcap-1.9.0.patch b/net-analyzer/barnyard2/files/barnyard2-1.13-pcap-1.9.0.patch new file mode 100644 index 000000000000..87aec539cae1 --- /dev/null +++ b/net-analyzer/barnyard2/files/barnyard2-1.13-pcap-1.9.0.patch @@ -0,0 +1,38 @@ +--- a/src/output-plugins/spo_alert_fwsam.c ++++ b/src/output-plugins/spo_alert_fwsam.c +@@ -115,7 +115,7 @@ + #include <sys/filio.h> + #endif + +-typedef int SOCKET; ++typedef int BY2_SOCKET; + + #ifndef INVALID_SOCKET + #define INVALID_SOCKET -1 +@@ -961,7 +961,7 @@ + FWsamPacket sampacket; + FWsamStation *station=NULL; + FWsamList *fwsamlist; +- SOCKET stationsocket; ++ BY2_SOCKET stationsocket; + int i,len,deletestation,stationtry=0; + char *encbuf,*decbuf; + static unsigned long lastbsip[FWSAM_REPET_BLOCKS]; +@@ -1387,7 +1387,7 @@ + void FWsamCheckOut(FWsamStation *station) + { + FWsamPacket sampacket; +- SOCKET stationsocket; ++ BY2_SOCKET stationsocket; + int i,len; + char *encbuf,*decbuf; + +@@ -1538,7 +1538,7 @@ + int i,len,stationok=TRUE; + FWsamPacket sampacket; + char *encbuf,*decbuf; +- SOCKET stationsocket; ++ BY2_SOCKET stationsocket; + + + /* create a socket for the station */ diff --git a/net-analyzer/barnyard2/files/barnyard2.confd b/net-analyzer/barnyard2/files/barnyard2.confd new file mode 100644 index 000000000000..a924456555aa --- /dev/null +++ b/net-analyzer/barnyard2/files/barnyard2.confd @@ -0,0 +1,36 @@ +# Config file for /etc/init.d/barnyard2 + +# This file only contains variables needed by the init.d script. +# All other configuration options are located in the barnyard2.conf file + +# This should be the first part of the unified/unified2 log file name (without the time stamp) +# Ex. If you log files look like this 'snort.unified2.1239801645' then you would use 'snort.unified2' +SPOOL_FILE="snort.unified2" + +# Location of your unified/unified2 log files +SPOOL_DIR="/var/log/snort" + +# Directory to log to +LOG_DIR="/var/log/barnyard2" + +# This MUST match what you set for "config interface:" in your barnyard2.conf +# If you do not set this correctly then Barnyard2 will not stop when you do a +# "/etc/init.d/barnyard2 stop" +INTERFACE="eth0" + +# You probably don't want to change this, but in case you do +PID_FILE="barnyard2_${INTERFACE}.pid" +PID_PATH="/var/run" + +# The waldo file is located in the SPOOL_DIR to support multipule instances of barnyard2 +WALDO_FILE="${SPOOL_DIR}/barnyard2.waldo" +CONF="/etc/barnyard2/barnyard2.conf" + +# Location of the archive directory if you choose to use it. +# The ARCHIVE_DIR is located in the SPOOL_DIR to support multipule instances of barnyard2 +#ARCHIVE_DIR="${SPOOL_DIR}/archive" + +# This pulls in the options above +BARNYARD_OPTS="-D -c ${CONF} -d ${SPOOL_DIR} -w ${WALDO_FILE} -f ${SPOOL_FILE} -l ${LOG_DIR}" +# Or with an archive directory +#BARNYARD_OPTS="-D -c ${CONF} -d ${SPOOL_DIR} -w ${WALDO_FILE} -f ${SPOOL_FILE} -l ${LOG_DIR} -a ${ARCHIVE_DIR}" diff --git a/net-analyzer/barnyard2/files/barnyard2.initd b/net-analyzer/barnyard2/files/barnyard2.initd new file mode 100644 index 000000000000..d15308846f12 --- /dev/null +++ b/net-analyzer/barnyard2/files/barnyard2.initd @@ -0,0 +1,29 @@ +#!/sbin/openrc-run +# Copyright 1999-2004 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +depend() { + need net +} + +checkconfig() { + if [ ! -e ${CONF} ] ; then + eerror "You need a configuration file to run barnyard2" + eerror "There is an example config in /etc/snort/barnyard2.conf.distrib" + return 1 + fi +} + +start() { + checkconfig || return 1 + ebegin "Starting barnyard2" + start-stop-daemon --start --quiet --exec /usr/bin/barnyard2 \ + -- --pid-path ${PID_PATH} --nolock-pidfile ${BARNYARD_OPTS} >/dev/null 2>&1 + eend $? +} + +stop() { + ebegin "Stopping barnyard2" + start-stop-daemon --stop --quiet --pidfile ${PID_PATH}/${PID_FILE} + eend $? +} diff --git a/net-analyzer/barnyard2/metadata.xml b/net-analyzer/barnyard2/metadata.xml new file mode 100644 index 000000000000..132e2907dce8 --- /dev/null +++ b/net-analyzer/barnyard2/metadata.xml @@ -0,0 +1,34 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>patrick@gentoo.org</email> + <name>Patrick Lauer</name> + </maintainer> + <maintainer type="project"> + <email>netmon@gentoo.org</email> + <name>Gentoo network monitoring and analysis project</name> + </maintainer> + <longdescription> + Barnyard2 is a fork of the original barnyard project (which is no longer under development). + Barnyard2 is an open source interpreter for Snort unified2 binary output files. Its primary + use is allowing Snort to write to disk in an efficient manner and leaving the task of + parsing binary data into various formats to a separate process that will not cause Snort to + miss network traffic. Barnyard2 is under active development and continues to adapt based on + user feedback. + </longdescription> + <upstream> + <maintainer> + <email>dev@securixlive.com</email> + <name>Securixlive</name> + </maintainer> + <doc>http://www.securixlive.com/barnyard2/docs/index.php</doc> + <bugs-to>mailto:dev@securixlive.com</bugs-to> + </upstream> + <use> + <flag name="gre">Enable GRE support</flag> + <flag name="mpls">Enable support for mpls networks</flag> + <flag name="sguil">Enable sguil (The Analyst Console for Network Security Monitoring) support</flag> + </use> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/bigeye/Manifest b/net-analyzer/bigeye/Manifest new file mode 100644 index 000000000000..df77a02a0176 --- /dev/null +++ b/net-analyzer/bigeye/Manifest @@ -0,0 +1,3 @@ +DIST bigeye-0.3-gcc34.diff.bz2 2774 BLAKE2B 51b1c4702b65b3e6b484d17e500b00d26bd137c74a8eb16b8521ffa621263ef89b650f1bdc967c50a8e5200cc857d42597e1f93279ec4acd01efe8ad9802cae0 SHA512 8ed54aa7b95aac8703e2bf99fde985cbbe7e62f7a6b549e58b2b54856336c5560c450a8c6ad9cbcdcd6bf61c842797c1abca001cfca20ff82614d8c328cab4ba +DIST bigeye-0.3-gcc34.patch.xz 2564 BLAKE2B 17508c780f339aa2409616aa2bd4e37c3e9f8ba48626e9a3782ea60da2989d4a8543c8a97cecef34554265385b13019d3bc04a05c8809870e0cba20c72a76bf8 SHA512 c7005975a7b798521f0d8f7b646f168ff215c1b5a760e303f7cad8bb78e2324e8303f77a724bc6902ef7ee525d7e6dd5ccfdf366c39abcc436fc6edf503205af +DIST bigeye-0.3.tgz 32462 BLAKE2B 509e958852d958f5fbb7197e567f8ebd1d7004027e4d8f3fe868d3af6719f76e445890a241d4438609b12695bd403fa246cec03b382a2c339d23c1456aa198e0 SHA512 73a146fd2f5df86a3d16dec05cf3f278393347f341a5cc319feccf6d23e1f2fe9d29070ac154a5b2336ade146843ab163e3545e9aefad1a0fa8903928d9b1ed0 diff --git a/net-analyzer/bigeye/bigeye-0.3-r3.ebuild b/net-analyzer/bigeye/bigeye-0.3-r3.ebuild new file mode 100644 index 000000000000..597005a10170 --- /dev/null +++ b/net-analyzer/bigeye/bigeye-0.3-r3.ebuild @@ -0,0 +1,39 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +inherit eutils toolchain-funcs + +DESCRIPTION="network utility dump and simple honeypot utility" +HOMEPAGE="http://violating.us/projects/bigeye/" +SRC_URI="http://violating.us/projects/bigeye/download/${P}.tgz + mirror://gentoo/${P}-gcc34.diff.bz2" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="amd64 ~ppc x86" + +src_prepare() { + epatch \ + "${WORKDIR}"/${P}-gcc34.diff \ + "${FILESDIR}"/${P}-overflow.patch + sed -i README \ + -e "s|-- /messages/|-- /usr/share/bigeye/messages/|g" \ + || die "sed README" +} + +src_compile() { + cd src || die + $(tc-getCC) ${CFLAGS} ${LDFLAGS} bigeye.c emulate.c -o bigeye || die +} + +src_install() { + dobin src/bigeye + + insinto /usr/share/bigeye + doins sig.file + doins -r messages + + dodoc README +} diff --git a/net-analyzer/bigeye/bigeye-0.3-r4.ebuild b/net-analyzer/bigeye/bigeye-0.3-r4.ebuild new file mode 100644 index 000000000000..b349042d1ded --- /dev/null +++ b/net-analyzer/bigeye/bigeye-0.3-r4.ebuild @@ -0,0 +1,42 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +inherit flag-o-matic toolchain-funcs + +DESCRIPTION="network utility dump and simple honeypot utility" +HOMEPAGE="http://violating.us/projects/bigeye/" +SRC_URI=" + http://violating.us/projects/bigeye/download/${P}.tgz + https://dev.gentoo.org/~jer/${P}-gcc34.patch.xz +" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~ppc ~x86" +PATCHES=( + "${WORKDIR}"/${P}-gcc34.patch + "${FILESDIR}"/${P}-overflow.patch +) + +src_prepare() { + default + sed -i README \ + -e "s|-- /messages/|-- /usr/share/bigeye/messages/|g" \ + || die "sed README" +} + +src_compile() { + append-cflags -fcommon + $(tc-getCC) ${CFLAGS} ${LDFLAGS} src/bigeye.c src/emulate.c -o src/bigeye || die +} + +src_install() { + dobin src/bigeye + + insinto /usr/share/bigeye + doins sig.file + doins -r messages + + dodoc README +} diff --git a/net-analyzer/bigeye/files/bigeye-0.3-overflow.patch b/net-analyzer/bigeye/files/bigeye-0.3-overflow.patch new file mode 100644 index 000000000000..1ca159a65b79 --- /dev/null +++ b/net-analyzer/bigeye/files/bigeye-0.3-overflow.patch @@ -0,0 +1,11 @@ +--- a/src/bigeye.c ++++ b/src/bigeye.c +@@ -787,7 +787,7 @@ + local.sin_family = AF_INET; + local.sin_port = htons(porta); + local.sin_addr.s_addr = INADDR_ANY; +- bzero(&(local.sin_zero),sizeof(local)); ++ memset(&(local.sin_zero), "\0", sizeof(local.sin_zero)); + + if(setsockopt(sock_a, SOL_SOCKET, SO_REUSEADDR, &on, sizeof(on)) < 0) { + perror("setsockopt"); diff --git a/net-analyzer/bigeye/metadata.xml b/net-analyzer/bigeye/metadata.xml new file mode 100644 index 000000000000..bd13a914477c --- /dev/null +++ b/net-analyzer/bigeye/metadata.xml @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<maintainer type="project"> + <email>netmon@gentoo.org</email> + <name>Gentoo network monitoring and analysis project</name> +</maintainer> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/bing/Manifest b/net-analyzer/bing/Manifest new file mode 100644 index 000000000000..52c4ade6d53a --- /dev/null +++ b/net-analyzer/bing/Manifest @@ -0,0 +1 @@ +DIST bing_1.1.3.orig.tar.gz 38847 BLAKE2B ba01ff0e9a53fa8e9cd44ee085d78ae8d8891cc5478697a0d8fb13917c9a4104a672dcc7aba0c6c91e7f0084ac4254b6f565cf44486b6162225c5a21cb1614a7 SHA512 df56f93047454a02b305154b12898b063c340e96778db9e11114ac4598446648b3ed5fe4304e0f3e33f612069b0f0e4e231396ee878655683f923ad5418d6242 diff --git a/net-analyzer/bing/bing-1.1.3-r2.ebuild b/net-analyzer/bing/bing-1.1.3-r2.ebuild new file mode 100644 index 000000000000..565ed702e870 --- /dev/null +++ b/net-analyzer/bing/bing-1.1.3-r2.ebuild @@ -0,0 +1,29 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit toolchain-funcs + +DESCRIPTION="A point-to-point bandwidth measurement tool" +SRC_URI="mirror://debian/pool/main/b/bing/${PN}_${PV}.orig.tar.gz" +HOMEPAGE="http://fgouget.free.fr/bing/index-en.shtml" + +LICENSE="BSD-4" +SLOT="0" +KEYWORDS="amd64 ~arm ~ia64 ppc sparc x86" + +src_prepare() { + default + sed -i -e "s|#COPTIM = -g| COPTIM = ${CFLAGS}|" Makefile || die +} + +src_compile() { + emake CC="$(tc-getCC)" +} + +src_install() { + dobin bing + doman unix/bing.8 + dodoc ChangeLog Readme.{1st,txt} +} diff --git a/net-analyzer/bing/metadata.xml b/net-analyzer/bing/metadata.xml new file mode 100644 index 000000000000..3d4429370ed8 --- /dev/null +++ b/net-analyzer/bing/metadata.xml @@ -0,0 +1,6 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <!-- maintainer-needed --> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/bmon/Manifest b/net-analyzer/bmon/Manifest new file mode 100644 index 000000000000..68bde58202e1 --- /dev/null +++ b/net-analyzer/bmon/Manifest @@ -0,0 +1 @@ +DIST bmon-4.0.tar.gz 61843 BLAKE2B d376cc6ca9f64c71cd7f8aa281e36e0f8717939c2ada3d9ed6d1231e1f6bc489146fa5f88a327abd6bc63803d2ed21eafff2888427bfd11d51156380ed6d6d1c SHA512 2a5b527a78cc1084c3b96d8d621b002ee86d377776d7e25f711dc2869e59bcd6277cc5f103549fe0b635b1368228a66941d5069fd1240cff678b308d7e17218d diff --git a/net-analyzer/bmon/bmon-4.0.ebuild b/net-analyzer/bmon/bmon-4.0.ebuild new file mode 100644 index 000000000000..01d01f88612b --- /dev/null +++ b/net-analyzer/bmon/bmon-4.0.ebuild @@ -0,0 +1,46 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 +inherit autotools eutils linux-info toolchain-funcs + +DESCRIPTION="interface bandwidth monitor" +HOMEPAGE="http://www.infradead.org/~tgr/bmon/ https://github.com/tgraf/bmon/" +SRC_URI=" + https://codeload.github.com/tgraf/${PN}/tar.gz/v${PV} -> ${P}.tar.gz +" + +LICENSE="BSD-2 MIT" +SLOT="0" +KEYWORDS="amd64 ~arm hppa ~ppc ppc64 ~sparc x86" + +RDEPEND=" + >=sys-libs/ncurses-5.3-r2:0= + dev-libs/confuse:= + dev-libs/libnl:3 +" +DEPEND=" + ${RDEPEND} + virtual/pkgconfig +" + +DOCS=( ChangeLog ) + +CONFIG_CHECK="~NET_SCHED" +ERROR_NET_SCHED=" + CONFIG_NET_SCHED is not set when it should be. + Run ${PN} -i proc to use the deprecated proc interface instead. +" + +src_prepare() { + eapply \ + "${FILESDIR}"/${PN}-3.6-docdir-examples.patch + + eapply_user + + eautoreconf +} + +src_configure() { + econf CURSES_LIB="$("$(tc-getPKG_CONFIG)" --libs ncurses)" +} diff --git a/net-analyzer/bmon/bmon-999.ebuild b/net-analyzer/bmon/bmon-999.ebuild new file mode 100644 index 000000000000..1939b19057ed --- /dev/null +++ b/net-analyzer/bmon/bmon-999.ebuild @@ -0,0 +1,43 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +inherit autotools git-r3 linux-info toolchain-funcs + +DESCRIPTION="interface bandwidth monitor" +HOMEPAGE="http://www.infradead.org/~tgr/bmon/ https://github.com/tgraf/bmon/" +EGIT_REPO_URI="https://github.com/tgraf/bmon/" + +LICENSE="BSD-2 MIT" +SLOT="0" +KEYWORDS="" + +RDEPEND=" + >=sys-libs/ncurses-5.3-r2:0= + dev-libs/confuse:= + dev-libs/libnl:3 +" +DEPEND=" + ${RDEPEND} + virtual/pkgconfig +" + +DOCS=( ChangeLog ) + +CONFIG_CHECK="~NET_SCHED" +ERROR_NET_SCHED=" + CONFIG_NET_SCHED is not set when it should be. + Run ${PN} -i proc to use the deprecated proc interface instead. +" +PATCHES=( + "${FILESDIR}"/${PN}-3.6-docdir-examples.patch +) + +src_prepare() { + default + eautoreconf +} + +src_configure() { + econf CURSES_LIB="$("$(tc-getPKG_CONFIG)" --libs ncurses)" +} diff --git a/net-analyzer/bmon/files/bmon-3.6-docdir-examples.patch b/net-analyzer/bmon/files/bmon-3.6-docdir-examples.patch new file mode 100644 index 000000000000..bb7d969cedde --- /dev/null +++ b/net-analyzer/bmon/files/bmon-3.6-docdir-examples.patch @@ -0,0 +1,10 @@ +--- a/examples/Makefile.am ++++ b/examples/Makefile.am +@@ -1,6 +1,6 @@ + # -*- Makefile -*- + +-exampledir = $(datarootdir)/doc/@PACKAGE@/examples ++exampledir = $(docdir)/examples + example_DATA = bmon.conf + + EXTRA_DIST = $(example_DATA) diff --git a/net-analyzer/bmon/metadata.xml b/net-analyzer/bmon/metadata.xml new file mode 100644 index 000000000000..aaab01d1ced6 --- /dev/null +++ b/net-analyzer/bmon/metadata.xml @@ -0,0 +1,12 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>netmon@gentoo.org</email> + <name>Gentoo network monitoring and analysis project</name> + </maintainer> + <upstream> + <remote-id type="github">tgraf/bmon</remote-id> + </upstream> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/braa/Manifest b/net-analyzer/braa/Manifest new file mode 100644 index 000000000000..6a1880f582fb --- /dev/null +++ b/net-analyzer/braa/Manifest @@ -0,0 +1 @@ +DIST braa-0.82.tar.gz 39927 BLAKE2B 411a106118b2b3e135542ca507ccd07e910f19b256a12336119c3a088eca16b9a8c715840b633461523fd05881a522b083029f3c498588f7c4c38f518165840d SHA512 8c88d288287a12c19c8d49606c8d2b70531b7f2be1aa3c4ccc6b01739aead751c03c56dc3f1a346b3dd20730a8bd0d30e33167a5f7c676f629348195762e23d4 diff --git a/net-analyzer/braa/braa-0.82-r1.ebuild b/net-analyzer/braa/braa-0.82-r1.ebuild new file mode 100644 index 000000000000..c22f36d87117 --- /dev/null +++ b/net-analyzer/braa/braa-0.82-r1.ebuild @@ -0,0 +1,27 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +inherit toolchain-funcs + +DESCRIPTION="Quick and dirty mass SNMP scanner" +HOMEPAGE="http://s-tech.elsat.net.pl/braa/" +SRC_URI="http://s-tech.elsat.net.pl/braa/${P}.tar.gz" +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~ppc ~x86" + +PATCHES=( + "${FILESDIR}"/${PN}-0.8-gentoo.diff +) + +src_prepare() { + default + sed -i braa.c -e 's|0.81|0.82|g' || die + tc-export CC +} + +src_install() { + dobin braa + dodoc README +} diff --git a/net-analyzer/braa/braa-0.82.ebuild b/net-analyzer/braa/braa-0.82.ebuild new file mode 100644 index 000000000000..574816f9353c --- /dev/null +++ b/net-analyzer/braa/braa-0.82.ebuild @@ -0,0 +1,24 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +inherit toolchain-funcs eutils + +DESCRIPTION="Quick and dirty mass SNMP scanner" +HOMEPAGE="http://s-tech.elsat.net.pl/braa/" +SRC_URI="http://s-tech.elsat.net.pl/braa/${P}.tar.gz" +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~ppc x86" + +src_prepare() { + epatch "${FILESDIR}"/${PN}-0.8-gentoo.diff + sed -i braa.c -e 's|0.81|0.82|g' || die + tc-export CC +} + +src_install() { + dobin braa + dodoc README +} diff --git a/net-analyzer/braa/files/braa-0.8-gentoo.diff b/net-analyzer/braa/files/braa-0.8-gentoo.diff new file mode 100644 index 000000000000..3167269f4a68 --- /dev/null +++ b/net-analyzer/braa/files/braa-0.8-gentoo.diff @@ -0,0 +1,24 @@ +--- a/Makefile ++++ b/Makefile +@@ -4,8 +4,6 @@ + ################################################################### + + # Linux, FreeBSD, OpenBSD +-CFLAGS = +-LDFLAGS = + + # Solaris / SPARC + # CFLAGS = -DSOLARIS_SPARC +@@ -24,9 +22,8 @@ + LIBS = + + all: ${OBJECTS} +- cc $(OBJECTS) -o $(OUT) $(LDFLAGS) $(LIBS) +- strip $(OUT) ++ $(CC) $(CFLAGS) $(LDFLAGS) $(OBJECTS) -o $(OUT) $(LIBS) + + clean: + rm -rf $(OBJECTS) $(OUT) +- +\ No newline at end of file ++ diff --git a/net-analyzer/braa/metadata.xml b/net-analyzer/braa/metadata.xml new file mode 100644 index 000000000000..6d60ca626dd5 --- /dev/null +++ b/net-analyzer/braa/metadata.xml @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>netmon@gentoo.org</email> + <name>Gentoo network monitoring and analysis project</name> + </maintainer> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/bwbar/Manifest b/net-analyzer/bwbar/Manifest new file mode 100644 index 000000000000..95ac640217d9 --- /dev/null +++ b/net-analyzer/bwbar/Manifest @@ -0,0 +1 @@ +DIST bwbar-1.2.3.tar.bz2 30202 BLAKE2B b7c0ed980e5af14e5e2fa2a3fafb8b7f75d96a0bac8b3effed2a7a54098bb00741b07f2ba32e6cb81dc4accd42a0f370c6bd95a5eec1301b1090e96d2e2ce80f SHA512 cb534f50007db6e39aa134d0d9a08ec6935c8a393f8dd5ab80f3c6ef94048821e065cd6c1be80657a2d6338fd16a73dcc0f89f5b15aba9e3bd38f0737a6d43c4 diff --git a/net-analyzer/bwbar/bwbar-1.2.3.ebuild b/net-analyzer/bwbar/bwbar-1.2.3.ebuild new file mode 100644 index 000000000000..67fb9f200db9 --- /dev/null +++ b/net-analyzer/bwbar/bwbar-1.2.3.ebuild @@ -0,0 +1,25 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 +inherit eutils + +DESCRIPTION="The kernel.org \"Current bandwidth utilization\" bar" +HOMEPAGE="https://www.kernel.org/pub/software/web/bwbar/" +SRC_URI="https://www.kernel.org/pub/software/web/bwbar/${P}.tar.bz2" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="amd64 x86" + +RDEPEND=">=media-libs/libpng-1.2" +DEPEND="${RDEPEND}" + +src_prepare() { + epatch "${FILESDIR}"/${P}-libpng15.patch +} + +src_install() { + dobin bwbar + dodoc README +} diff --git a/net-analyzer/bwbar/files/bwbar-1.2.3-libpng15.patch b/net-analyzer/bwbar/files/bwbar-1.2.3-libpng15.patch new file mode 100644 index 000000000000..4d1bd67c6d34 --- /dev/null +++ b/net-analyzer/bwbar/files/bwbar-1.2.3-libpng15.patch @@ -0,0 +1,19 @@ +--- a/bwbar.c ++++ b/bwbar.c +@@ -30,6 +30,7 @@ + #include <alloca.h> + #include <getopt.h> + #include <png.h> ++#include <zlib.h> + + void skipline(FILE *f) + { +@@ -79,7 +80,7 @@ + if ( !info_ptr ) + goto barf; + +- if ( setjmp(png_ptr->jmpbuf) ) { ++ if ( setjmp(png_jmpbuf(png_ptr)) ) { + status = 1; + goto barf; /* libpng abort */ + } diff --git a/net-analyzer/bwbar/metadata.xml b/net-analyzer/bwbar/metadata.xml new file mode 100644 index 000000000000..bd13a914477c --- /dev/null +++ b/net-analyzer/bwbar/metadata.xml @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<maintainer type="project"> + <email>netmon@gentoo.org</email> + <name>Gentoo network monitoring and analysis project</name> +</maintainer> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/bwm-ng/Manifest b/net-analyzer/bwm-ng/Manifest new file mode 100644 index 000000000000..ce662ef5c6e8 --- /dev/null +++ b/net-analyzer/bwm-ng/Manifest @@ -0,0 +1 @@ +DIST bwm-ng-0.6.1.tar.gz 162620 BLAKE2B 28e201ac681fcb1d79afead8a7d2c31d52bfa9ee1ebc132d3cd1080a7edd8ddcc8c0cd6df1897d23a1c79a4a5d9157214a8f3224bd5f8f2c1a12cad96ec188bd SHA512 3f8d4a10f5cbf743d6aee9c6170f334c4274224a2f1886f04338c9a1bf0cf13af5be4aaea0445c9e5b5d361915cc3a93bbfe7c4abf69a0d24e42bc414d8056cd diff --git a/net-analyzer/bwm-ng/bwm-ng-0.6.1-r1.ebuild b/net-analyzer/bwm-ng/bwm-ng-0.6.1-r1.ebuild new file mode 100644 index 000000000000..51311ad80550 --- /dev/null +++ b/net-analyzer/bwm-ng/bwm-ng-0.6.1-r1.ebuild @@ -0,0 +1,38 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +inherit autotools + +DESCRIPTION="Bandwidth Monitor NG is a small and simple console-based bandwidth monitor" +SRC_URI="http://www.gropp.org/bwm-ng/${P}.tar.gz" +HOMEPAGE="http://www.gropp.org/" + +KEYWORDS="amd64 ~arm ppc x86" +LICENSE="GPL-2" +SLOT="0" +IUSE="csv html" + +RDEPEND="sys-libs/ncurses:0= + >=sys-apps/net-tools-1.60-r1" +DEPEND="${RDEPEND}" + +PATCHES=( + "${FILESDIR}"/${P}-fix-buildsystem.patch + "${FILESDIR}"/${P}-static-inline.patch +) + +src_prepare() { + default + mv configure.{in,ac} || die + eautoreconf +} + +src_configure() { + econf \ + $(use_enable csv) \ + $(use_enable html) \ + --enable-ncurses \ + --with-procnetdev +} diff --git a/net-analyzer/bwm-ng/files/bwm-ng-0.6.1-fix-buildsystem.patch b/net-analyzer/bwm-ng/files/bwm-ng-0.6.1-fix-buildsystem.patch new file mode 100644 index 000000000000..04c14392d66a --- /dev/null +++ b/net-analyzer/bwm-ng/files/bwm-ng-0.6.1-fix-buildsystem.patch @@ -0,0 +1,93 @@ +* Fix broken buildsystem +* Fix ncurses underlinking caused by missing "-ltinfo" in $LIBS +https://bugs.gentoo.org/show_bug.cgi?id=561718 + +--- a/configure.in ++++ b/configure.in +@@ -3,7 +3,7 @@ + + AC_INIT([bwm-ng],[0.6.1],[bwmng@gropp.org],[bwm-ng]) + AC_CONFIG_SRCDIR(src/bwm-ng.c) +-AM_INIT_AUTOMAKE([gnu]) ++AM_INIT_AUTOMAKE([gnu subdir-objects]) + AC_CONFIG_HEADERS(config.h) + AC_CONFIG_MACRO_DIR(./) + AC_LANG([C]) +@@ -28,44 +28,12 @@ + AC_CHECK_TYPES(unsigned long long) + + # Checks for libraries. +-CURSES_CHECKED="0" ++AC_ARG_ENABLE([ncurses], ++ AS_HELP_STRING([--enable-ncurses], [Enable feature ncurses])) + +-AC_ARG_WITH([curses],AS_HELP_STRING([--with-curses],[with curses (ARG=PATH)]),[ +-if [ test $withval != "no" ]; then +- OLD_CPPFLAGS=$CPPFLAGS +- if [ test $withval != "yes" ]; then +- CPPFLAGS="$CPPFLAGS -I$withval" +- fi +- AC_CHECK_LIB([curses],[newterm,timeout],,[ CPPFLAGS=$OLD_CPPFLAGS ]) +- CURSES_CHECKED="1" +-else +- CURSES_CHECKED="1" +-fi +-]) +- +- +-if [ test $CURSES_CHECKED != "1" ]; then +-AC_ARG_WITH([ncurses],AS_HELP_STRING([--with-ncurses],[prefer ncurses over curses (ARG=PATH)]),[ +-if [ test $withval != "no" ]; then +- OLD_CPPFLAGS=$CPPFLAGS +- if [ test $withval != "yes" ]; then +- CPPFLAGS="$CPPFLAGS -I$withval" +- fi +- AC_CHECK_LIB([ncurses],[newterm,timeout],,[ CPPFLAGS=$OLD_CPPFLAGS ]) +- CURSES_CHECKED="1" +-else +- CURSES_CHECKED="1" +-fi ++AS_IF([test "x$enable_ncurses" != "xno"], [ ++ PKG_CHECK_MODULES([NCURSES], [ncurses], [AC_DEFINE([HAVE_LIBNCURSES], [1], [Define to 1 if you have the `ncurses' library (-lncurses).])]) + ]) +-fi +- +- +- +-if [ test $CURSES_CHECKED != "1" ]; then +-AC_CHECK_LIB([curses],[initscr,timeout],,[ +- AC_CHECK_LIB([ncurses],[newterm,timeout]) +-]) +-fi + + AC_CHECK_FUNCS([wattron]) + AC_CHECK_FUNCS([curs_set]) +--- a/src/Makefile.am ++++ b/src/Makefile.am +@@ -2,12 +2,10 @@ + + bin_PROGRAMS = bwm-ng + +-bwm_ng_SOURCES = bwm-ng.c process.c output.c options.c help.c curses_tools.c ++bwm_ng_SOURCES = bwm-ng.c process.c output.c options.c help.c curses_tools.c input/retrieve.c input/devstat.c input/libkstat.c input/netstat.c input/proc_net_dev.c input/sysctl.c input/ioservice.c input/libstatgrab.c input/proc_diskstats.c input/win32.c input/getifaddrs.c + +-EXTRA_bwm_ng_SOURCES = input/retrieve.c input/devstat.c input/libkstat.c input/netstat.c input/proc_net_dev.c input/sysctl.c input/ioservice.c input/libstatgrab.c input/proc_diskstats.c input/win32.c input/getifaddrs.c +- +-bwm_ng_LDADD = retrieve.$(OBJEXT) $(INPUT_SYSTEM) +-bwm_ng_DEPENDENCIES = retrieve.$(OBJEXT) $(INPUT_SYSTEM) ++bwm_ng_CPPFLAGS = @NCURSES_CFLAGS@ ++bwm_ng_LDADD = @NCURSES_LIBS@ + + noinst_HEADERS = bwm-ng.h process.h output.h options.h help.h curses_tools.h types.h defines.h global_vars.h input/devstat.h input/libkstat.h input/netstat.h input/proc_net_dev.h input/sysctl.h input/ioservice.h input/libstatgrab.h input/proc_diskstats.h input/retrieve.h input/win32.h input/getifaddrs.h + +--- a/src/defines.h ++++ b/src/defines.h +@@ -48,7 +48,7 @@ + #define LIBSTATGRAB + #endif + +-#if HAVE_LIBCURSES || HAVE_LIBNCURSES ++#if defined(HAVE_LIBCURSES) || defined(HAVE_LIBNCURSES) + #define HAVE_CURSES + #endif + diff --git a/net-analyzer/bwm-ng/files/bwm-ng-0.6.1-static-inline.patch b/net-analyzer/bwm-ng/files/bwm-ng-0.6.1-static-inline.patch new file mode 100644 index 000000000000..88e15ecefe3f --- /dev/null +++ b/net-analyzer/bwm-ng/files/bwm-ng-0.6.1-static-inline.patch @@ -0,0 +1,256 @@ +Make all 'inline' functions 'static inline' such that +the compiler can emit definitions when needed. +http://www.greenend.org.uk/rjk/tech/inline.html + +--- a/src/bwm-ng.c ++++ b/src/bwm-ng.c +@@ -26,7 +26,7 @@ + + /* handle interrupt signal */ + void sigint(int sig) FUNCATTR_NORETURN; +-inline void init(void); ++static inline void init(void); + + /* clear stuff and exit */ + #ifdef __STDC__ +@@ -98,7 +98,7 @@ + deinit(0, NULL); + } + +-inline void init(void) { ++static inline void init(void) { + if_count=0; + delay=500; + #if EXTENDED_STATS +--- a/src/help.c ++++ b/src/help.c +@@ -24,9 +24,9 @@ + #include "global_vars.h" + #include "help.h" + +-inline void print_help_line(const char *short_c,const char * long_c,const char *descr); ++static inline void print_help_line(const char *short_c,const char * long_c,const char *descr); + +-inline void print_help_line(const char *short_c,const char * long_c,const char *descr) { ++static inline void print_help_line(const char *short_c,const char * long_c,const char *descr) { + #ifdef LONG_OPTIONS + printf(" %-23s",long_c); + #else +--- a/src/options.c ++++ b/src/options.c +@@ -30,12 +30,12 @@ + char *trim_whitespace(char *str); + int read_config(const char *config_file); + #endif +-inline int str2output_unit(char *optarg); ++static inline int str2output_unit(char *optarg); + #if EXTENDED_STATS +-inline int str2output_type(char *optarg); ++static inline int str2output_type(char *optarg); + #endif +-inline int str2out_method(char *optarg); +-inline int str2in_method(char *optarg); ++static inline int str2out_method(char *optarg); ++static inline int str2in_method(char *optarg); + + #ifdef CONFIG_FILE + /****************************************************************************** +@@ -65,7 +65,7 @@ + /******************************************************************************/ + #endif + +-inline int str2output_unit(char *optarg) { ++static inline int str2output_unit(char *optarg) { + if (optarg) { + if (!strcasecmp(optarg,"bytes")) return BYTES_OUT; + if (!strcasecmp(optarg,"bits")) return BITS_OUT; +@@ -76,7 +76,7 @@ + } + + #if EXTENDED_STATS +-inline int str2output_type(char *optarg) { ++static inline int str2output_type(char *optarg) { + if (optarg) { + if (!strcasecmp(optarg,"rate")) return RATE_OUT; + if (!strcasecmp(optarg,"max")) return MAX_OUT; +@@ -87,7 +87,7 @@ + } + #endif + +-inline int str2out_method(char *optarg) { ++static inline int str2out_method(char *optarg) { + if (optarg) { + if (!strcasecmp(optarg,"plain")) return PLAIN_OUT; + #ifdef HAVE_CURSES +@@ -109,7 +109,7 @@ + } + + +-inline int str2in_method(char *optarg) { ++static inline int str2in_method(char *optarg) { + if (optarg) { + #ifdef PROC_NET_DEV + if (!strcasecmp(optarg,"proc")) return PROC_IN; +--- a/src/output.c ++++ b/src/output.c +@@ -25,13 +25,13 @@ + #include "output.h" + + inline static const char *output_type2str(void); +-inline const char *input2str(void); +-inline const char *show_all_if2str(void); +-inline ullong direction2value(char mode,struct inout_long stats); ++static inline const char *input2str(void); ++static inline const char *show_all_if2str(void); ++static inline ullong direction2value(char mode,struct inout_long stats); + #if EXTENDED_STATS +-inline double direction_max2value(char mode,struct inouttotal_double stats,int items); ++static inline double direction_max2value(char mode,struct inouttotal_double stats,int items); + #endif +-inline char *dyn_byte_value2str(double value,char *str,int buf_size); ++static inline char *dyn_byte_value2str(double value,char *str,int buf_size); + char *values2str(char mode,t_iface_speed_stats stats,t_iface_stats full_stats,float multiplier,char *str,int buf_size); + + inline static const char *output_type2str(void) { +@@ -59,7 +59,7 @@ + } + + +-inline const char *input2str(void) { ++static inline const char *input2str(void) { + switch (input_method) { + #ifdef SYSCTL + case SYSCTL_IN: +@@ -121,7 +121,7 @@ + return ""; + } + +-inline const char *show_all_if2str(void) { ++static inline const char *show_all_if2str(void) { + switch (show_all_if) { + case 1: + return " (all)"; +@@ -262,7 +262,7 @@ + } + + +-inline ullong direction2value(char mode,struct inout_long stats) { ++static inline ullong direction2value(char mode,struct inout_long stats) { + switch (mode) { + case 0: + return stats.in; +@@ -275,7 +275,7 @@ + } + + #if EXTENDED_STATS +-inline double direction_max2value(char mode,struct inouttotal_double stats,int items) { ++static inline double direction_max2value(char mode,struct inouttotal_double stats,int items) { + switch (mode) { + case 0: + return (double)(stats.in/items); +@@ -288,7 +288,7 @@ + } + #endif + +-inline char *dyn_byte_value2str(double value,char *str,int buf_size) { ++static inline char *dyn_byte_value2str(double value,char *str,int buf_size) { + if (dynamic) { + if (value<1024) + snprintf(str,buf_size,"%15.2f ",value); +@@ -306,7 +306,7 @@ + return str; + } + +-inline char *dyn_bit_value2str(double value,char *str,int buf_size) { ++static inline char *dyn_bit_value2str(double value,char *str,int buf_size) { + if (dynamic) { + if (value<1000) + snprintf(str,buf_size,"%15.2f ",value); +--- a/src/process.c ++++ b/src/process.c +@@ -26,19 +26,19 @@ + + short show_iface(char *instr, char *searchstr,char iface_is_up); + #if HAVE_GETTIMEOFDAY +-inline long tvdiff(struct timeval newer, struct timeval older); ++static inline long tvdiff(struct timeval newer, struct timeval older); + float get_time_delay(int iface_num); + #endif +-inline ullong calc_new_values(ullong new, ullong old); ++static inline ullong calc_new_values(ullong new, ullong old); + t_iface_speed_stats convert2calced_values(t_iface_speed_stats new, t_iface_speed_stats old); + t_iface_speed_stats convert2calced_disk_values(t_iface_speed_stats new, t_iface_speed_stats old); + #if EXTENDED_STATS +-inline void sub_avg_values(struct inouttotal_double *values,struct inouttotal_double data); +-inline void add_avg_values(struct inouttotal_double *values,struct inouttotal_double data); +-inline void save_avg_values(struct inouttotal_double *values,struct inouttotal_double *data,struct inout_long calced_stats,float multiplier); ++static inline void sub_avg_values(struct inouttotal_double *values,struct inouttotal_double data); ++static inline void add_avg_values(struct inouttotal_double *values,struct inouttotal_double data); ++static inline void save_avg_values(struct inouttotal_double *values,struct inouttotal_double *data,struct inout_long calced_stats,float multiplier); + void save_avg(struct t_avg *avg,struct iface_speed_stats calced_stats,float multiplier); +-inline void save_sum(struct inout_long *stats,struct inout_long new_stats_values); +-inline void save_max(struct inouttotal_double *stats,struct inout_long calced_stats,float multiplier); ++static inline void save_sum(struct inout_long *stats,struct inout_long new_stats_values); ++static inline void save_max(struct inouttotal_double *stats,struct inout_long calced_stats,float multiplier); + #endif + + /* returns the whether to show the iface or not +@@ -74,7 +74,7 @@ + + #if HAVE_GETTIMEOFDAY + /* Returns: the time difference in milliseconds. */ +-inline long tvdiff(struct timeval newer, struct timeval older) { ++static inline long tvdiff(struct timeval newer, struct timeval older) { + return labs((newer.tv_sec-older.tv_sec)*1000+ + (newer.tv_usec-older.tv_usec)/1000); + } +@@ -92,7 +92,7 @@ + #endif + + /* basically new-old, but handles "overflow" of source aswell */ +-inline ullong calc_new_values(ullong new, ullong old) { ++static inline ullong calc_new_values(ullong new, ullong old) { + /* FIXME: WRAP_AROUND _might_ be wrong for libstatgrab, where the type is always long long */ + return (new>=old) ? (ullong)(new-old) : (ullong)(( + #ifdef HAVE_LIBKSTAT +@@ -133,13 +133,13 @@ + + #if EXTENDED_STATS + /* sub old values from cached for avg stats */ +-inline void sub_avg_values(struct inouttotal_double *values,struct inouttotal_double data) { ++static inline void sub_avg_values(struct inouttotal_double *values,struct inouttotal_double data) { + values->in-=data.in; + values->out-=data.out; + values->total-=data.total; + } + +-inline void add_avg_values(struct inouttotal_double *values,struct inouttotal_double data) { ++static inline void add_avg_values(struct inouttotal_double *values,struct inouttotal_double data) { + values->in+=data.in; + values->out+=data.out; + values->total+=data.total; +@@ -148,7 +148,7 @@ + + /* put new-old bytes in inout_long struct into a inouttotal_double struct + * and add values to cached .value struct */ +-inline void save_avg_values(struct inouttotal_double *values,struct inouttotal_double *data,struct inout_long calced_stats,float multiplier) { ++static inline void save_avg_values(struct inouttotal_double *values,struct inouttotal_double *data,struct inout_long calced_stats,float multiplier) { + data->in=calced_stats.in*multiplier; + data->out=calced_stats.out*multiplier; + data->total=(calced_stats.in+calced_stats.out)*multiplier; +@@ -198,13 +198,13 @@ + } + + /* add current in and out bytes to totals struct */ +-inline void save_sum(struct inout_long *stats,struct inout_long new_stats_values) { ++static inline void save_sum(struct inout_long *stats,struct inout_long new_stats_values) { + stats->in+=new_stats_values.in; + stats->out+=new_stats_values.out; + } + + /* lookup old max values and save new if higher */ +-inline void save_max(struct inouttotal_double *stats,struct inout_long calced_stats,float multiplier) { ++static inline void save_max(struct inouttotal_double *stats,struct inout_long calced_stats,float multiplier) { + if (multiplier*calced_stats.in > stats->in) + stats->in=multiplier*calced_stats.in; + if (multiplier*calced_stats.out>stats->out) diff --git a/net-analyzer/bwm-ng/metadata.xml b/net-analyzer/bwm-ng/metadata.xml new file mode 100644 index 000000000000..7c5aa9815f0a --- /dev/null +++ b/net-analyzer/bwm-ng/metadata.xml @@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<maintainer type="project"> +<email>netmon@gentoo.org</email> +<name>Gentoo network monitoring and analysis project</name> +</maintainer> +<use> +<flag name="csv">Enable csv output</flag> +<flag name="html">Enable html output</flag> +</use> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/bwmon/Manifest b/net-analyzer/bwmon/Manifest new file mode 100644 index 000000000000..62c508bb7e3c --- /dev/null +++ b/net-analyzer/bwmon/Manifest @@ -0,0 +1 @@ +DIST bwmon-1.3.tar.gz 5668 BLAKE2B b73695ad56516e6134c6b6c6012bcfdf71ad51af99fadabf3af95cc7af745b8cd7ffbfd8c9ced6a13e9d05abb9d2ceebee3e0d7e3c54694ecbcd467be75d8b60 SHA512 6552ba03f0cfe7d2adebe7ae49379cc109b4f8da56dafec1264ac39c114809c7cde161f6321a67516b22b04abbad5d1ab3b4efb313479ad131fb20638c6871e8 diff --git a/net-analyzer/bwmon/bwmon-1.3-r2.ebuild b/net-analyzer/bwmon/bwmon-1.3-r2.ebuild new file mode 100644 index 000000000000..6b247db307f2 --- /dev/null +++ b/net-analyzer/bwmon/bwmon-1.3-r2.ebuild @@ -0,0 +1,36 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 +inherit eutils toolchain-funcs + +DESCRIPTION="Simple ncurses bandwidth monitor" +HOMEPAGE="http://bwmon.sourceforge.net/" +SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz" + +RDEPEND="sys-libs/ncurses" +DEPEND=" + ${RDEPEND} + virtual/pkgconfig +" + +SLOT="0" +LICENSE="GPL-2 public-domain" +KEYWORDS="amd64 hppa ppc sparc x86" + +src_prepare() { + epatch \ + "${FILESDIR}"/${P}-build.patch \ + "${FILESDIR}"/${P}-typo-fix.patch \ + "${FILESDIR}"/${P}-overflow.patch \ + "${FILESDIR}"/${P}-tinfo.patch +} + +src_compile() { + emake -C src CC="$(tc-getCC)" PKG_CONFIG="$(tc-getPKG_CONFIG)" +} + +src_install() { + dobin ${PN} + dodoc README +} diff --git a/net-analyzer/bwmon/files/bwmon-1.3-build.patch b/net-analyzer/bwmon/files/bwmon-1.3-build.patch new file mode 100644 index 000000000000..6d4eadf15551 --- /dev/null +++ b/net-analyzer/bwmon/files/bwmon-1.3-build.patch @@ -0,0 +1,22 @@ +--- a/src/Makefile ++++ b/src/Makefile +@@ -10,8 +10,8 @@ CC = gcc + RM = /bin/rm + INSTALL = install + +-CFLAGS = -I../include -Wall -D__THREADS +-LDFLAGS = -lpthread -lncurses ++CFLAGS += -I../include -Wall -D__THREADS ++LIBS = -lpthread -lncurses + + SRC = bwmon.c + OBJS = $(SRC:.c=.o) +@@ -19,7 +19,7 @@ OBJS = $(SRC:.c=.o) + all: bwmon + + bwmon: $(OBJS) +- $(CC) $(LDFLAGS) -o ../$@ $(OBJS) ++ $(CC) $(CFLAGS) $(LDFLAGS) -o ../$@ $(OBJS) $(LIBS) + + clean: + @for i in $(OBJS) *~ core bwmon; do \ diff --git a/net-analyzer/bwmon/files/bwmon-1.3-overflow.patch b/net-analyzer/bwmon/files/bwmon-1.3-overflow.patch new file mode 100644 index 000000000000..052d1d766351 --- /dev/null +++ b/net-analyzer/bwmon/files/bwmon-1.3-overflow.patch @@ -0,0 +1,20 @@ +--- a/src/bwmon.c ++++ b/src/bwmon.c +@@ -408,7 +408,7 @@ bool_t + print_uptime(float * uptime) + { + unsigned int tmp = 0, hour = 0, min = 0, sec = 0; +- char hostname[30]; ++ char hostname[50]; + + tmp = (uint)(*uptime); + sec = tmp % 60; +@@ -418,7 +418,7 @@ print_uptime(float * uptime) + hour = tmp % 24; + tmp = (tmp - hour) / 24; + +- if (gethostname(hostname, strlen(hostname)) != 0) ++ if (gethostname(hostname, sizeof(hostname)) != 0) + strcpy(hostname, "System"); + + printw("\n%s uptime: %u day%c %u hour%c %u minutes and %u seconds\n", diff --git a/net-analyzer/bwmon/files/bwmon-1.3-tinfo.patch b/net-analyzer/bwmon/files/bwmon-1.3-tinfo.patch new file mode 100644 index 000000000000..df0bb06cb968 --- /dev/null +++ b/net-analyzer/bwmon/files/bwmon-1.3-tinfo.patch @@ -0,0 +1,11 @@ +--- a/src/Makefile ++++ b/src/Makefile +@@ -11,7 +11,7 @@ + INSTALL = install + + CFLAGS += -I../include -Wall -D__THREADS +-LIBS = -lpthread -lncurses ++LIBS = -lpthread $(shell ${PKG_CONFIG} --libs ncurses) + + SRC = bwmon.c + OBJS = $(SRC:.c=.o) diff --git a/net-analyzer/bwmon/files/bwmon-1.3-typo-fix.patch b/net-analyzer/bwmon/files/bwmon-1.3-typo-fix.patch new file mode 100644 index 000000000000..36f6af8e5ee6 --- /dev/null +++ b/net-analyzer/bwmon/files/bwmon-1.3-typo-fix.patch @@ -0,0 +1,11 @@ +--- a/src/bwmon.c ++++ b/src/bwmon.c +@@ -36,7 +36,7 @@ + "by Kimmo Nupponen (kimmoon@users.sourceforge.net)\n" + "$Date: 2014/07/10 19:51:24 $\n\n" + "usage: %s [-b] [-h] [-a] [-m] [-u seconds]\n" +- "\t-a Print bandwidth utiliasation in Kbytes rather than Kbits. The default\n" ++ "\t-b Print bandwidth utilisation in KBytes rather than Kbits. The default\n" + "\t is to use Kbits\n" + "\t-a Print also average bandwidth since last boot per interface\n" + "\t-m Print maximum bandwidth since launch of this utility\n" diff --git a/net-analyzer/bwmon/metadata.xml b/net-analyzer/bwmon/metadata.xml new file mode 100644 index 000000000000..806663e525f4 --- /dev/null +++ b/net-analyzer/bwmon/metadata.xml @@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>netmon@gentoo.org</email> + <name>Gentoo network monitoring and analysis project</name> + </maintainer> + <longdescription>Simple ncurses bandwidth monitor</longdescription> + <upstream> + <remote-id type="sourceforge">bwmon</remote-id> + </upstream> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/bwping/Manifest b/net-analyzer/bwping/Manifest new file mode 100644 index 000000000000..393312d46b3c --- /dev/null +++ b/net-analyzer/bwping/Manifest @@ -0,0 +1,3 @@ +DIST bwping-1.15.tar.gz 104234 BLAKE2B f0bc4b050760c775b5186667c2c15ce431832761d0bf00bf451d37514f93bafc1b6379ba96c30b1132f6dcb22fd4626304e4037c47794f9bf6fe28d10d5df6fb SHA512 76578571e3b3ca0f5ee61c28380d784fdcfbcee632e92b28a42c446ded9fb0fd0b682f360a51fca2df599353d5da9227762b186b5339ccfe7b9a7fa876399f8a +DIST bwping-1.16.tar.gz 103811 BLAKE2B 63880d4fe96d1272c06ca307fd0eb16fb1729ec3ddbd0de7bd484859625b3a9e8ba6d5730ac8df30795e2f7cb22ffd73dc9416eaca1ebc876f7ada83bcb46ca7 SHA512 d8f625a858e8278021ae91c5476ce18d1ecb8518a0f1d3d410a59dea4a64ec658fff527bc1f80d141a1249fe92da87afc536b86d31a30bcf316072e45cbc3998 +DIST bwping-1.17.tar.gz 104254 BLAKE2B 29db75f69c195f69df1131a0f096678e2e8c7aed603b16bedd269ac6bd8493016af27658248b40f2e551006c669d929a36dfa2cf37ddca69d4b9e9db5c3575b3 SHA512 b8337a714e3a51e6f999bc5a924bbb91498d614f858a7e532111d7cd27efbfacedfcff7d10650e84c66c74d3e7eeb5015e7491e61f44d738e941bb42769716a5 diff --git a/net-analyzer/bwping/bwping-1.15.ebuild b/net-analyzer/bwping/bwping-1.15.ebuild new file mode 100644 index 000000000000..95d107fb4f3c --- /dev/null +++ b/net-analyzer/bwping/bwping-1.15.ebuild @@ -0,0 +1,16 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +DESCRIPTION="A tool to measure bandwidth and RTT between two hosts using ICMP" +HOMEPAGE="https://bwping.sourceforge.io/" +SRC_URI="mirror://sourceforge/${PN}/${PV}/${P}.tar.gz" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="amd64 ~sparc x86" + +src_test() { + [[ ${UID} = 0 ]] && default +} diff --git a/net-analyzer/bwping/bwping-1.16.ebuild b/net-analyzer/bwping/bwping-1.16.ebuild new file mode 100644 index 000000000000..b8610ffd425f --- /dev/null +++ b/net-analyzer/bwping/bwping-1.16.ebuild @@ -0,0 +1,16 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +DESCRIPTION="A tool to measure bandwidth and RTT between two hosts using ICMP" +HOMEPAGE="https://bwping.sourceforge.io/" +SRC_URI="mirror://sourceforge/${PN}/${PV}/${P}.tar.gz" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~amd64 ~sparc ~x86" + +src_test() { + [[ ${UID} = 0 ]] && default +} diff --git a/net-analyzer/bwping/bwping-1.17.ebuild b/net-analyzer/bwping/bwping-1.17.ebuild new file mode 100644 index 000000000000..b22cf8d14539 --- /dev/null +++ b/net-analyzer/bwping/bwping-1.17.ebuild @@ -0,0 +1,16 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +DESCRIPTION="A tool to measure bandwidth and RTT between two hosts using ICMP" +HOMEPAGE="https://bwping.sourceforge.io/" +SRC_URI="mirror://sourceforge/${PN}/${PV}/${P}.tar.gz" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~amd64 ~sparc ~x86" + +src_test() { + [[ ${UID} = 0 ]] && default +} diff --git a/net-analyzer/bwping/metadata.xml b/net-analyzer/bwping/metadata.xml new file mode 100644 index 000000000000..992e20d91ab6 --- /dev/null +++ b/net-analyzer/bwping/metadata.xml @@ -0,0 +1,20 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>netmon@gentoo.org</email> + <name>Gentoo network monitoring and analysis project</name> + </maintainer> + <upstream> + <maintainer> + <email>oleg.derevenetz@gmail.com</email> + <name>Oleg Derevenetz</name> + </maintainer> + <remote-id type="sourceforge">bwping</remote-id> + </upstream> + <longdescription> + A tool to measure bandwidth and response times between two hosts using + Internet Control Message Protocol (ICMP) echo request/echo reply mechanism. + </longdescription> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/cacti-spine/Manifest b/net-analyzer/cacti-spine/Manifest new file mode 100644 index 000000000000..da2307744b93 --- /dev/null +++ b/net-analyzer/cacti-spine/Manifest @@ -0,0 +1 @@ +DIST cacti-spine-1.2.12.tar.gz 107512 BLAKE2B 1ced87c30d26d524ce9c98508cfee42dfccceac9e68662fbf31e257ebb8990bfd4935a735554ba3153f8382ada1fea86fb4712811857a09a49bec609a41aae5b SHA512 382a456bc64f4bfd56db8e6fcc2e626d66d529bbb6bfa34210053e64f9b61ae1376c9a4870402e7ccb069c20f91a85dbf5b4ec72826a1f3d70f2e6900accc0c3 diff --git a/net-analyzer/cacti-spine/cacti-spine-1.2.12.ebuild b/net-analyzer/cacti-spine/cacti-spine-1.2.12.ebuild new file mode 100644 index 000000000000..c78a19983352 --- /dev/null +++ b/net-analyzer/cacti-spine/cacti-spine-1.2.12.ebuild @@ -0,0 +1,51 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +inherit autotools + +MY_P=${PN}-${PV/_p/-} + +DESCRIPTION="Spine is a fast poller for Cacti (formerly known as Cactid)" +HOMEPAGE="https://cacti.net/spine_info.php" +SRC_URI="https://www.cacti.net/downloads/spine/${MY_P}.tar.gz" + +LICENSE="LGPL-2.1" +SLOT="0" +KEYWORDS="~alpha amd64 ~hppa ~ppc ~ppc64 sparc x86" +IUSE="libressl" + +CDEPEND=" + !libressl? ( dev-libs/openssl:0= ) + libressl? ( dev-libs/libressl:0= ) + net-analyzer/net-snmp:= + dev-db/mysql-connector-c:0= +" +DEPEND=" + ${CDEPEND} + sys-apps/help2man +" +RDEPEND=" + ${CDEPEND} + >net-analyzer/cacti-0.8.8 +" +PATCHES=( + "${FILESDIR}"/${PN}-0.8.8g-net-snmp.patch +) + +src_prepare() { + default + + eautoreconf +} + +src_install() { + dosbin spine + + insinto /etc/ + insopts -m0640 -o root + newins spine.conf{.dist,} + + doman spine.1 + dodoc CHANGELOG +} diff --git a/net-analyzer/cacti-spine/cacti-spine-99999.ebuild b/net-analyzer/cacti-spine/cacti-spine-99999.ebuild new file mode 100644 index 000000000000..34e6c184a65d --- /dev/null +++ b/net-analyzer/cacti-spine/cacti-spine-99999.ebuild @@ -0,0 +1,51 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +inherit autotools git-r3 + +MY_P=${PN}-${PV/_p/-} + +DESCRIPTION="Spine is a fast poller for Cacti (formerly known as Cactid)" +HOMEPAGE="https://cacti.net/spine_info.php" +EGIT_REPO_URI="https://github.com/Cacti/spine" + +LICENSE="LGPL-2.1" +SLOT="0" +KEYWORDS="" +IUSE="libressl" + +CDEPEND=" + !libressl? ( dev-libs/openssl:0= ) + libressl? ( dev-libs/libressl:0= ) + net-analyzer/net-snmp:= + dev-db/mysql-connector-c:0= +" +DEPEND=" + ${CDEPEND} + sys-apps/help2man +" +RDEPEND=" + ${CDEPEND} + >net-analyzer/cacti-0.8.8 +" +PATCHES=( + "${FILESDIR}"/${PN}-0.8.8g-net-snmp.patch +) + +src_prepare() { + default + + eautoreconf +} + +src_install() { + dosbin spine + + insinto /etc/ + insopts -m0640 -o root + newins spine.conf{.dist,} + + doman spine.1 + dodoc CHANGELOG +} diff --git a/net-analyzer/cacti-spine/files/cacti-spine-0.8.8g-net-snmp.patch b/net-analyzer/cacti-spine/files/cacti-spine-0.8.8g-net-snmp.patch new file mode 100644 index 000000000000..5ee62e2279a0 --- /dev/null +++ b/net-analyzer/cacti-spine/files/cacti-spine-0.8.8g-net-snmp.patch @@ -0,0 +1,19 @@ +--- a/configure.ac ++++ b/configure.ac +@@ -251,14 +251,14 @@ + + # Net-SNMP includes v3 support and insists on crypto unless compiled --without-openssl + AC_MSG_CHECKING([if Net-SNMP needs crypto support]) +-AC_TRY_COMPILE([#include <net-snmp-config.h>], [exit(NETSNMP_USE_OPENSSL != 1);], ++AC_TRY_COMPILE([#include <net-snmp/net-snmp-config.h>], [exit(NETSNMP_USE_OPENSSL != 1);], + [ AC_MSG_RESULT(yes) + SNMP_SSL=yes + ], + AC_MSG_RESULT(no) + ) + +-AC_TRY_COMPILE([ #include <net-snmp-config.h> ++AC_TRY_COMPILE([ #include <net-snmp/net-snmp-config.h> + #include <net-snmp/utilities.h> + #include <net-snmp/net-snmp-includes.h> + #include <net-snmp/config_api.h> diff --git a/net-analyzer/cacti-spine/metadata.xml b/net-analyzer/cacti-spine/metadata.xml new file mode 100644 index 000000000000..222b50900fc1 --- /dev/null +++ b/net-analyzer/cacti-spine/metadata.xml @@ -0,0 +1,17 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>netmon@gentoo.org</email> + <name>Gentoo network monitoring and analysis project</name> + </maintainer> + <longdescription lang="en"> + Spine (formerly known as Cactid) is a poller for Cacti that primarily + strives to be as fast as possible. For this reason it is written in + native C, makes use of POSIX threads, and is linked directly against the + net-snmp library for minmumal SNMP polling overhead. Spine is a + replacement for the default cmd.php poller so you must decide if using + Spine makes sense for your installation. + </longdescription> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/cacti/Manifest b/net-analyzer/cacti/Manifest new file mode 100644 index 000000000000..effe34b8df71 --- /dev/null +++ b/net-analyzer/cacti/Manifest @@ -0,0 +1 @@ +DIST cacti-1.2.12.tar.gz 25126474 BLAKE2B 12f552480bfd72ed8b73400c1d53c08eb38171c83baf63b3bdbac8bec5e9bf798824fb2c19954fda240c64f35adca601a2dbe9af6229b1f6791dc7b5f8477968 SHA512 df6a512a2e8faa70b8ee0b2ab72ea9e21db465f3978a3ecedf17cd34cb16793d3b0107f01f8cd8400fb15b162c27214680f22657f6f0d59853de88c49966087c diff --git a/net-analyzer/cacti/cacti-1.2.12.ebuild b/net-analyzer/cacti/cacti-1.2.12.ebuild new file mode 100644 index 000000000000..2ec9213257a6 --- /dev/null +++ b/net-analyzer/cacti/cacti-1.2.12.ebuild @@ -0,0 +1,48 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +inherit eutils webapp + +# Support for _p* in version. +MY_P=${P/_p*/} + +DESCRIPTION="Cacti is a complete frontend to rrdtool" +HOMEPAGE="https://www.cacti.net/" +SRC_URI="https://www.cacti.net/downloads/${MY_P}.tar.gz" + +LICENSE="GPL-2" +KEYWORDS="~alpha amd64 ~arm ~hppa ~ppc ~ppc64 sparc x86" +IUSE="snmp doc" + +need_httpd + +RDEPEND=" + dev-lang/php[cli,mysql,pdo,session,sockets,xml] + dev-php/adodb + net-analyzer/rrdtool[graph] + virtual/cron + snmp? ( >=net-analyzer/net-snmp-5.2.0 ) +" + +src_compile() { :; } + +src_install() { + dodoc CHANGELOG + dodoc -r docs + mv docs .. || die + + webapp_src_preinst + + edos2unix `find -type f -name '*.php'` + + dodir ${MY_HTDOCSDIR} + cp -r . "${D}"${MY_HTDOCSDIR} + + webapp_serverowned ${MY_HTDOCSDIR}/rra + webapp_serverowned ${MY_HTDOCSDIR}/log + webapp_configfile ${MY_HTDOCSDIR}/include/config.php + webapp_postinst_txt en "${FILESDIR}"/postinstall-en.txt + + webapp_src_install +} diff --git a/net-analyzer/cacti/files/postinstall-en.txt b/net-analyzer/cacti/files/postinstall-en.txt new file mode 100644 index 000000000000..732c718005cb --- /dev/null +++ b/net-analyzer/cacti/files/postinstall-en.txt @@ -0,0 +1,62 @@ + +New Install + +1. Create the new cacti database + shell> mysqladmin -p --user=root create cacti +2. Import the default cacti database: + shell> mysql -p --user=root cacti < ${MY_INSTALLDIR}/cacti.sql +3. Create a MySQL username and password for cacti. + shell> mysql -p --user=root mysql + mysql> GRANT ALL ON cacti.* TO cactiuser@localhost IDENTIFIED BY 'somepassword'; + mysql> flush privileges; +4. Edit ${MY_INSTALLDIR}/include/config.php and modify the MySQL user, + password and database for your cacti configuration. + + Example: + \$database_default = "cacti"; + \$database_hostname = "localhost"; + \$database_username = "cactiuser"; + \$database_password = "somepassword"; + +5. Point your web browser to: http://${VHOST_HOSTNAME}/${VHOST_APPDIR}/ + Make sure to fill in all of the path variables carefully and + correctly on the following screen. +6. After you've gone through the setup wizard, go back to the main cacti page + and login as: + Username: admin + Password: admin + +Upgrading + +1. Backup DB in the case that something goes wrong. + shell> mysqldump -l --add-drop-table cacti > mysql.cacti +2. Backup your rra/ directory and any custom scripts in your scripts/ + directory. +3. Edit ${MY_INSTALLDIR}/include/config.php, and confirm that the MySQL user, + password and database is correct for your cacti configuration. + + Example: + \$database_default = "cacti"; + \$database_hostname = "localhost"; + \$database_username = "cactiuser"; + \$database_password = "somepassword"; +4. Point your web browser to: http://${VHOST_HOSTNAME}/${VHOST_APPDIR}/ + Select "Upgrade". + Make sure to fill in all of the path variables carefully and + correctly on the following screen. + +Cronjob + +Either new or upgrading, make sure you have a cron job - Add this line to +your /etc/crontab file: + + */5 * * * * ${VHOST_SERVER_GID} /usr/bin/php ${MY_INSTALLDIR}/poller.php > /dev/null 2>&1 + +Note that you should use poller.php as the cronjob instead of cmd.php (as it was with +earlier versions) to enable you to switch between cmd.php and cactid. + +Also make sure that the user poller.php runs as ( ${VHOST_SERVER_GID} ) has +permission to create new files in Cacti's 'rra/' directory which is +${MY_INSTALLDIR}/rra + + diff --git a/net-analyzer/cacti/metadata.xml b/net-analyzer/cacti/metadata.xml new file mode 100644 index 000000000000..47fb62f7954b --- /dev/null +++ b/net-analyzer/cacti/metadata.xml @@ -0,0 +1,21 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>netmon@gentoo.org</email> + <name>Gentoo network monitoring and analysis project</name> + </maintainer> + <longdescription lang="en"> + Cacti is a complete network graphing solution designed to harness the + power of RRDTool's data storage and graphing functionality. Cacti + provides a fast poller, advanced graph templating, multiple data + acquisition methods, and user management features out of the box. All of + this is wrapped in an intuitive, easy to use interface that makes sense + for LAN-sized installations up to complex networks with hundreds of + devices. + </longdescription> + <use> + <flag name="doc">install html documentation</flag> + </use> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/calamaris/Manifest b/net-analyzer/calamaris/Manifest new file mode 100644 index 000000000000..6046aff7a263 --- /dev/null +++ b/net-analyzer/calamaris/Manifest @@ -0,0 +1,2 @@ +DIST calamaris-2.59.tar.gz 56168 BLAKE2B 1ab118066c836c2d2e9584594e31db77ed8aa50dd3f74da5f60ea41075abd5873f5d413ebf6e352f5cdf4ecefc86307669c46f88c9048194f31936470040ed82 SHA512 8c8ed820a1af6e21cfe9f03397c159b2261c8253b3395a8d6dbd21064151439406496132917d0ef087eed805c7945cf28f2d12dc1e52340991c18e6a27484ade +DIST calamaris-2.99.4.0.tar.gz 105860 BLAKE2B f87b51bab7aac10f9ef0fb50a788a0ad86a3b98171b9d4f1e1f7cc50878ff9f9ad70ed6485e4fa301c713b5551390ee4f2697c37291a540ee3b3feb6960891d4 SHA512 4127a3963fd0ea5baa1d5ce9a784f45658bb685f18e576c134fee1b4e8fdad535676974498119018e771924a8a622ed83b8aa095d3909b7bb3d009dd6024dbef diff --git a/net-analyzer/calamaris/calamaris-2.59.ebuild b/net-analyzer/calamaris/calamaris-2.59.ebuild new file mode 100644 index 000000000000..852e4b508c92 --- /dev/null +++ b/net-analyzer/calamaris/calamaris-2.59.ebuild @@ -0,0 +1,20 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +DESCRIPTION="Calamaris parses the logfiles of a wide variety of Web proxy servers and generates reports" +HOMEPAGE="http://cord.de/calamaris-home-page" +SRC_URI="http://cord.de/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="amd64 ppc x86" + +DEPEND="dev-lang/perl" + +src_install() { + dobin calamaris + doman calamaris.1 + dodoc CHANGES EXAMPLES README +} diff --git a/net-analyzer/calamaris/calamaris-2.99.4.0.ebuild b/net-analyzer/calamaris/calamaris-2.99.4.0.ebuild new file mode 100644 index 000000000000..aed1057e0f8f --- /dev/null +++ b/net-analyzer/calamaris/calamaris-2.99.4.0.ebuild @@ -0,0 +1,34 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +DESCRIPTION="Calamaris parses the logfiles of a wide variety of Web proxy servers and generates reports" +HOMEPAGE="http://cord.de/calamaris-home-page" +SRC_URI="http://cord.de/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~arm ~ppc ~x86" + +RDEPEND=" + dev-lang/perl + dev-perl/GDGraph +" + +src_prepare() { + sed -i \ + -e "s:\(use lib\).*$:\1 '/usr/share/';:" \ + calamaris || die +} + +src_install() { + dobin calamaris calamaris-cache-convert + + insinto /usr/share/${PN} + doins *.pm + + doman calamaris.1 + + dodoc BUGS CHANGES EXAMPLES EXAMPLES.v3 README TODO calamaris.conf +} diff --git a/net-analyzer/calamaris/metadata.xml b/net-analyzer/calamaris/metadata.xml new file mode 100644 index 000000000000..6ae47645c91b --- /dev/null +++ b/net-analyzer/calamaris/metadata.xml @@ -0,0 +1,10 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<maintainer type="project"> + <email>netmon@gentoo.org</email> + <name>Gentoo network monitoring and analysis project</name> +</maintainer> +<longdescription>Calamaris parses the logfiles of a wide variety of Web proxy servers and generates reports</longdescription> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/carl/Manifest b/net-analyzer/carl/Manifest new file mode 100644 index 000000000000..8a178454b643 --- /dev/null +++ b/net-analyzer/carl/Manifest @@ -0,0 +1 @@ +DIST carl-0.9.tar.gz 11096 BLAKE2B 46298873f8fff62a965a7ec7a657522dd90d1a298814f537bb5b32582ea63d0bcb1d4988cd31e6918f16514c65dd3c6517e9079c3c78f6cb0a4bc6d8ece1614a SHA512 9876e30d171bf00c4e53c6e90c98181ac25aeda004bdb8a03060c45a99c55fa087062076ff3964a222d2981ed682ae7b8f4cbade13c69154198200d35e1a577e diff --git a/net-analyzer/carl/carl-0.9-r2.ebuild b/net-analyzer/carl/carl-0.9-r2.ebuild new file mode 100644 index 000000000000..9b6e70a1512c --- /dev/null +++ b/net-analyzer/carl/carl-0.9-r2.ebuild @@ -0,0 +1,18 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 +PYTHON_COMPAT=( python3_6 pypy3) + +inherit distutils-r1 + +DESCRIPTION="An rsync logfile analyzer" +HOMEPAGE="http://www.schwarzvogel.de/software-misc.shtml" +SRC_URI="http://www.schwarzvogel.de/pkgs/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha amd64 x86" +IUSE="" + +DOCS="README" diff --git a/net-analyzer/carl/carl-0.9-r3.ebuild b/net-analyzer/carl/carl-0.9-r3.ebuild new file mode 100644 index 000000000000..8c4ba2d113c4 --- /dev/null +++ b/net-analyzer/carl/carl-0.9-r3.ebuild @@ -0,0 +1,18 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 +PYTHON_COMPAT=( python3_6 python3_7 python3_8 pypy3) + +inherit distutils-r1 + +DESCRIPTION="An rsync logfile analyzer" +HOMEPAGE="http://www.schwarzvogel.de/software-misc.shtml" +SRC_URI="http://www.schwarzvogel.de/pkgs/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha amd64 x86" +IUSE="" + +DOCS="README" diff --git a/net-analyzer/carl/metadata.xml b/net-analyzer/carl/metadata.xml new file mode 100644 index 000000000000..db6fc1f65ae9 --- /dev/null +++ b/net-analyzer/carl/metadata.xml @@ -0,0 +1,12 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<maintainer type="person"> + <email>klausman@gentoo.org</email> +</maintainer> +<maintainer type="project"> + <email>netmon@gentoo.org</email> + <name>Gentoo network monitoring and analysis project</name> +</maintainer> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/cbm/Manifest b/net-analyzer/cbm/Manifest new file mode 100644 index 000000000000..b532c14ec13a --- /dev/null +++ b/net-analyzer/cbm/Manifest @@ -0,0 +1,2 @@ +DIST cbm-0.1.tar.gz 310247 BLAKE2B 08d2b7c79795217e6f6e2c72bbf1a4e5af096ddd9ed76c9a61093cd790d7ef2429d2db3d94102c334f1433803d4b91cb297f57185b666554ce84eee5c2295322 SHA512 24bf6a4d68fed253977b965d7e5b6aff4fb9db502c47b4a2b3b36f8c2963c9648b78ae607e9753fe4792a73ddbc29b86b3a1acc3c431a9355b11ff348566add4 +DIST cbm-0.2.tar.gz 16043 BLAKE2B a5c041ac33b4694c2933bee0d71786896ec30d0735b921f34cfb6a247179709afd9fa6d90f0602869976f334391e8138830f538b18a08a7396f4049e26029b24 SHA512 ca9dbbd73e707dca3b7bf10201840de28b2b3956ce3cb2fc76e1b530caf6ff883eb437f8be0df1efe3b5d8398c4949ea00de4ba48ed26b27afa21cf445d5d076 diff --git a/net-analyzer/cbm/cbm-0.1-r1.ebuild b/net-analyzer/cbm/cbm-0.1-r1.ebuild new file mode 100644 index 000000000000..3e3c60fb9e6b --- /dev/null +++ b/net-analyzer/cbm/cbm-0.1-r1.ebuild @@ -0,0 +1,33 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +inherit autotools eutils + +DESCRIPTION="Display the current traffic on all network devices" +HOMEPAGE="http://www.isotton.com/software/unix/cbm/" +SRC_URI="http://www.isotton.com/software/unix/${PN}/download/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" + +RDEPEND=" + sys-libs/ncurses +" +DEPEND=" + ${RDEPEND} + app-text/xmlto + app-text/docbook-xml-dtd:4.4 + virtual/pkgconfig +" + +src_prepare() { + epatch \ + "${FILESDIR}"/${P}-gcc-4.3.patch \ + "${FILESDIR}"/${P}-gcc-4.7.patch \ + "${FILESDIR}"/${P}-tinfo.patch \ + "${FILESDIR}"/${P}-headers-status-line.patch + eautoreconf +} diff --git a/net-analyzer/cbm/cbm-0.2.ebuild b/net-analyzer/cbm/cbm-0.2.ebuild new file mode 100644 index 000000000000..970db519d022 --- /dev/null +++ b/net-analyzer/cbm/cbm-0.2.ebuild @@ -0,0 +1,34 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +inherit autotools + +DESCRIPTION="Color Bandwidth Meter" +HOMEPAGE=" + http://www.isotton.com/software/unix/cbm/ + https://github.com/resurrecting-open-source-projects/cbm +" +SRC_URI="https://github.com/resurrecting-open-source-projects/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" + +RDEPEND=" + sys-libs/ncurses +" +DEPEND=" + ${RDEPEND} + app-text/docbook-xml-dtd:4.4 + app-text/xmlto + virtual/pkgconfig +" +PATCHES=( + "${FILESDIR}"/${PN}-0.2-tinfo.patch +) + +src_prepare() { + default + eautoreconf +} diff --git a/net-analyzer/cbm/files/cbm-0.1-gcc-4.3.patch b/net-analyzer/cbm/files/cbm-0.1-gcc-4.3.patch new file mode 100644 index 000000000000..ae9b58f6e99b --- /dev/null +++ b/net-analyzer/cbm/files/cbm-0.1-gcc-4.3.patch @@ -0,0 +1,10 @@ +--- a/src/statistics.hpp ++++ b/src/statistics.hpp +@@ -3,6 +3,7 @@ + + #include <list> + #include <string> ++#include <sys/time.h> + + namespace statistics { + diff --git a/net-analyzer/cbm/files/cbm-0.1-gcc-4.7.patch b/net-analyzer/cbm/files/cbm-0.1-gcc-4.7.patch new file mode 100644 index 000000000000..94b50a6877f7 --- /dev/null +++ b/net-analyzer/cbm/files/cbm-0.1-gcc-4.7.patch @@ -0,0 +1,10 @@ +--- a/src/cbm.cpp ++++ b/src/cbm.cpp +@@ -18,6 +18,7 @@ + #include <sys/socket.h> + #include <arpa/inet.h> + #include <net/if.h> ++#include <unistd.h> + + // Externs + extern int optind, opterr, optopt; diff --git a/net-analyzer/cbm/files/cbm-0.1-headers-status-line.patch b/net-analyzer/cbm/files/cbm-0.1-headers-status-line.patch new file mode 100644 index 000000000000..4b09bbb69793 --- /dev/null +++ b/net-analyzer/cbm/files/cbm-0.1-headers-status-line.patch @@ -0,0 +1,55 @@ +From bdc4f02a6d7fb1416f36aef89af4592c691576d8 Mon Sep 17 00:00:00 2001 +From: Jari Aalto <jari.aalto@cante.net> +Date: Mon, 19 Sep 2011 14:27:04 +0300 +Subject: [PATCH] [fix] Headers and status line don't display by Paul Martin + <pm@debian.org> +Organization: Private +Content-Type: text/plain; charset="utf-8" +Content-Transfer-Encoding: 8bit + +Signed-off-by: Jari Aalto <jari.aalto@cante.net> +--- + src/cbm.cpp | 9 ++++++++- + src/widgets/Window.cpp | 2 +- + 2 files changed, 9 insertions(+), 2 deletions(-) + +index 74282e2..0197443 100644 +--- a/src/cbm.cpp ++++ b/src/cbm.cpp +@@ -156,13 +156,20 @@ int main(int argc, char **argv) { + interfaceTable.setColumns(4); + interfaceTable.setActiveStyle(A_BOLD); + interfaceTable.setActiveRow(1); ++ // Position the interface table ++ interfaceTable.setPosition(2, 2); ++ interfaceTable.setSize(screen.getWidth() - 4, ++ 8); // TODO + + // Create the detail table + VerticalTable detailTable(screen); + detailTable.setColumns(2); + detailTable.setRows(2); + detailTable.setActiveRow(-1); +- ++ // Position the detail table ++ detailTable.setPosition(2, 12); // TODO ++ detailTable.setSize(screen.getWidth() - 4, 10); // TODO ++ + // Populate the detail table + detailTable.setText (0, 0, "Interface"); + detailTable.setStyle(0, 0, COLOR_PAIR(COLOR_HEADING) | A_BOLD); +index 322cb9b..572eef7 100644 +--- a/src/widgets/Window.cpp ++++ b/src/widgets/Window.cpp +@@ -14,7 +14,7 @@ Window::~Window() { + } + + void Window::setPosition(unsigned x, unsigned y) { +- mvwin((WINDOW*) win_, y, x); ++ mvderwin((WINDOW*) win_, y, x); + } + + void Window::setSize(unsigned width, unsigned height) { +-- +1.7.5.4 + diff --git a/net-analyzer/cbm/files/cbm-0.1-tinfo.patch b/net-analyzer/cbm/files/cbm-0.1-tinfo.patch new file mode 100644 index 000000000000..955d762214c4 --- /dev/null +++ b/net-analyzer/cbm/files/cbm-0.1-tinfo.patch @@ -0,0 +1,19 @@ +--- a/src/Makefile.am ++++ b/src/Makefile.am +@@ -3,4 +3,4 @@ + cbm_SOURCES = cbm.cpp \ + ErrnoError.hpp \ + statistics.cpp statistics.hpp +-cbm_LDADD = -lncurses widgets/libwidgets.la ++cbm_LDADD = $(ncurses_LIBS) widgets/libwidgets.la +--- a/configure.ac ++++ b/configure.ac +@@ -18,6 +18,8 @@ + + # Checks for libraries. + ++PKG_CHECK_MODULES(ncurses,ncurses) ++ + # Checks for header files. + + # Checks for typedefs, structures, and compiler characteristics. diff --git a/net-analyzer/cbm/files/cbm-0.2-tinfo.patch b/net-analyzer/cbm/files/cbm-0.2-tinfo.patch new file mode 100644 index 000000000000..a719969eaaab --- /dev/null +++ b/net-analyzer/cbm/files/cbm-0.2-tinfo.patch @@ -0,0 +1,21 @@ +--- a/configure.ac ++++ b/configure.ac +@@ -37,6 +37,7 @@ + AC_CANONICAL_HOST + + # Checks for libraries. ++PKG_CHECK_MODULES(ncurses,ncurses) + + # Checks for header files. + AC_CHECK_HEADER(curses.h,[],[ AC_MSG_ERROR(curses.h not found or too old.) ], []) +--- a/src/Makefile.am ++++ b/src/Makefile.am +@@ -24,7 +24,7 @@ + cbm_SOURCES = cbm.cpp \ + ErrnoError.hpp \ + statistics.cpp statistics.hpp +-cbm_LDADD = -lncurses widgets/libwidgets.la ++cbm_LDADD = $(ncurses_LIBS) widgets/libwidgets.la + + distclean-local: + -rm -f *~ \ diff --git a/net-analyzer/cbm/metadata.xml b/net-analyzer/cbm/metadata.xml new file mode 100644 index 000000000000..1d6a09dadc81 --- /dev/null +++ b/net-analyzer/cbm/metadata.xml @@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>pinkbyte@gentoo.org</email> + <name>Sergey Popov</name> + </maintainer> +<maintainer type="project"> + <email>netmon@gentoo.org</email> + <name>Gentoo network monitoring and analysis project</name> + </maintainer> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/chaosreader/Manifest b/net-analyzer/chaosreader/Manifest new file mode 100644 index 000000000000..2261157cb9cf --- /dev/null +++ b/net-analyzer/chaosreader/Manifest @@ -0,0 +1 @@ +DIST chaosreader-0.96.tar.gz 99124 BLAKE2B 04e9dd45543033bb3d15264fcc9168b7e2cec6f304f10142df36c363e841afc91659d7956bbb60b05cc6ab4e8fd519adaf9a2e69be2efc129fd2f38ca0d99f1f SHA512 46ba4a66152403e150e652bf6fa08af98cd3d709ea2cb834a32411ca5dde5f94a7e972404626787e604c1449c29ab5f335673b305ab83856c0dfff7cbf2f4de4 diff --git a/net-analyzer/chaosreader/chaosreader-0.96.ebuild b/net-analyzer/chaosreader/chaosreader-0.96.ebuild new file mode 100644 index 000000000000..09f3c3382e7a --- /dev/null +++ b/net-analyzer/chaosreader/chaosreader-0.96.ebuild @@ -0,0 +1,28 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +DESCRIPTION="Trace TCP/UDP/... sessions and fetch application data." +HOMEPAGE="http://chaosreader.sourceforge.net + https://github.com/brendangregg/Chaosreader" +SRC_URI="https://github.com/brendangregg/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz" +SLOT="0" + +KEYWORDS="amd64 ~ppc x86 ~amd64-linux ~x86-linux ~x86-macos" +LICENSE="GPL-2+" + +DEPEND=">=dev-lang/perl-5.8.0" +RDEPEND="${DEPEND}" + +S="${WORKDIR}/Chaosreader-${PV}" + +PATCHES=( + "${FILESDIR}"/chaosreader-0.96-zombies.patch + "${FILESDIR}"/chaosreader-0.96-chunkcheck.patch + "${FILESDIR}"/chaosreader-0.96-divisionbyzero.patch +) + +src_install() { + dobin ${PN} +} diff --git a/net-analyzer/chaosreader/files/chaosreader-0.96-chunkcheck.patch b/net-analyzer/chaosreader/files/chaosreader-0.96-chunkcheck.patch new file mode 100644 index 000000000000..6a394d4b308e --- /dev/null +++ b/net-analyzer/chaosreader/files/chaosreader-0.96-chunkcheck.patch @@ -0,0 +1,27 @@ +--- a/chaosreader 2011-11-10 19:17:50.000000000 +0100 ++++ b/chaosreader 2012-03-09 18:15:21.096105305 +0100 +@@ -5350,6 +5353,24 @@ + next if length($http_data) < 8; + $partnum++; + $parttext = sprintf("%02d",$partnum); ++ ++ ## from https://sourceforge.net/tracker/?func=detail&aid=2019799&group_id=107384&atid=647491 ++ ### Chunk Check ++ if ( $http_header =~ /Transfer-Encoding: chunked/ ) { ++ my $new_http_data=""; ++ my $chunksize=-1; ++ my $pos=0; ++ until ($chunksize==0) { ++ my $eolpos=index($http_data,"\r\n",$pos); ++ $chunksize=hex(substr($http_data,$pos,$eolpos - $pos)); ++ $pos=($eolpos+2); ++ if ($chunksize > 0) { ++ $new_http_data.=substr($http_data,$pos,$chunksize); ++ } ++ $pos+=($chunksize+2); ++ } ++ $http_data=$new_http_data; ++ } + + ### Part - Checks + $http_type = &File_Type($http_data); diff --git a/net-analyzer/chaosreader/files/chaosreader-0.96-divisionbyzero.patch b/net-analyzer/chaosreader/files/chaosreader-0.96-divisionbyzero.patch new file mode 100644 index 000000000000..584918513062 --- /dev/null +++ b/net-analyzer/chaosreader/files/chaosreader-0.96-divisionbyzero.patch @@ -0,0 +1,18 @@ +--- a/chaosreader 2014-06-15 21:30:11.000000000 +0200 ++++ b/chaosreader 2019-02-21 18:26:00.671756895 +0100 +@@ -4275,7 +4275,14 @@ + print REPLAY "ms($timediff1);\n"; + } + $duration = 0.01 if $duration == 0; # avoid divide by 0, +- $speed = sprintf("%.2f",$bytes / (1024 * $duration)); ++ + # avoid division by zero ++ # from https://sourceforge.net/tracker/?func=detail&aid=2210488&group_id=107384&atid=647489 ++ if ( $duration > 0 ) { ++ $speed = sprintf("%.2f",$bytes / (1024 * $duration)); ++ } ++ else { ++ $speed = "unknown"; ++ } + print REPLAY "print \"\n\n" . + "Summary: $duration2 seconds, $bytes bytes, $speed Kb/sec\\n\";"; + close REPLAY; diff --git a/net-analyzer/chaosreader/files/chaosreader-0.96-zombies.patch b/net-analyzer/chaosreader/files/chaosreader-0.96-zombies.patch new file mode 100644 index 000000000000..40fa6063adf3 --- /dev/null +++ b/net-analyzer/chaosreader/files/chaosreader-0.96-zombies.patch @@ -0,0 +1,11 @@ +--- a/chaosreader 2006-12-24 15:12:23.000000000 +0100 ++++ b/chaosreader 2006-12-24 15:11:56.000000000 +0100 +@@ -396,6 +395,8 @@ if ($Arg{normal}) { + + elsif ($Arg{standalone}) { + ++ $SIG{CHLD} = "IGNORE"; ++ + ############################################################ + # --- STANDALONE - Create Packet Logs and Process them --- + # diff --git a/net-analyzer/chaosreader/metadata.xml b/net-analyzer/chaosreader/metadata.xml new file mode 100644 index 000000000000..9c7ac43aad23 --- /dev/null +++ b/net-analyzer/chaosreader/metadata.xml @@ -0,0 +1,17 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>m.mairkeimberger@gmail.com</email> + <name>Michael Mair-Keimberger</name> + </maintainer> + <maintainer type="project"> + <email>proxy-maint@gentoo.org</email> + <name>Proxy Maintainers</name> + </maintainer> + <upstream> + <remote-id type="sourceforge">chaosreader</remote-id> + <remote-id type="github">brendangregg/chaosreader</remote-id> + </upstream> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/check_mk_agent/Manifest b/net-analyzer/check_mk_agent/Manifest new file mode 100644 index 000000000000..d378a34fa03d --- /dev/null +++ b/net-analyzer/check_mk_agent/Manifest @@ -0,0 +1,2 @@ +DIST check-mk-raw-1.2.8p27.cre.tar.gz 150213236 BLAKE2B f239edee68fdfc32aba9af40dead69ecdcb699b437b3ec615a3bf84b5eaa3644203ba4afea3d24a16ae722fe05eebb2650af1846eded97e322d88f2d7f5d102d SHA512 781b3dad0e144dc23a0d6791fa90a8ee2652919f898fa275abf7760d137f18ebe037a7d5d8f17c437f99fb7d0b22e57fdb42749dd6c084c74c5e2ef404eb3c1f +DIST check-mk-raw-1.4.0p31.cre.tar.gz 314212612 BLAKE2B 07c9bda8524250f949a21204427d455ef0ac0a323fe38b66c7c4f03b50f7677099b5c24dae22f55fe1e1a2e475d541e1b643169a2368925e960ea514a03fd6b2 SHA512 b1dfe22e54a3d6f9c7f76b408adeb7ca46aa4b21d933149c1681bf87dae7af8f5bf645ba19b225f30b0057d8d075f657756019e3b908d3090e1d14451e7fcc0b diff --git a/net-analyzer/check_mk_agent/check_mk_agent-1.2.8_p27.ebuild b/net-analyzer/check_mk_agent/check_mk_agent-1.2.8_p27.ebuild new file mode 100644 index 000000000000..c41c9b1f3484 --- /dev/null +++ b/net-analyzer/check_mk_agent/check_mk_agent-1.2.8_p27.ebuild @@ -0,0 +1,74 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +inherit systemd + +DESCRIPTION="Agent to report data to Check_MK for monitoring" +HOMEPAGE="http://mathias-kettner.de/check_mk.html" + +MY_PV="${PV/_p/p}" +MY_P="check-mk-raw-${MY_PV}.cre" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="apache_status inventory logwatch mysql nfsexports oracle postgres smart +xinetd zypper" + +RDEPEND="!!net-analyzer/check_mk + app-shells/bash:* + xinetd? ( || ( sys-apps/xinetd sys-apps/systemd ) ) + " +DEPEND="${RDEPEND}" + +SRC_URI="http://mathias-kettner.de/support/${MY_PV}/${MY_P}.tar.gz" + +src_unpack() { + # check_mk is a tarball containing tarballs + unpack ${A} + unpack "${WORKDIR}"/${MY_P}/packages/check_mk/check_mk-${MY_PV}.tar.gz + mkdir -p "${S}" || die + cd "${S}" || die + unpack "${WORKDIR}"/check_mk-${MY_PV}/agents.tar.gz + mkdir -p "${S}"/doc || die + cd "${S}"/doc || die + unpack "${WORKDIR}"/check_mk-${MY_PV}/doc.tar.gz +} + +src_install() { + # Install agent related files + newbin check_mk_agent.linux check_mk_agent + + keepdir /usr/lib/check_mk_agent/local + dodir /usr/lib/check_mk_agent/plugins + dodir /etc/check_mk + + dodoc doc/{AUTHORS,COPYING,ChangeLog} + docompress + + if use xinetd; then + insinto /etc/xinetd.d + newins cfg_examples/xinetd.conf check_mk + systemd_dounit cfg_examples/systemd/check_mk{.socket,@.service} + fi + + # Install the check_mk_agent logwatch plugin + if use logwatch; then + insinto /etc/check_mk + doins cfg_examples/logwatch.cfg + exeinto /usr/lib/check_mk_agent/plugins + doexe plugins/mk_logwatch + fi + + # Install any other useflag-enabled agent plugins + exeinto /usr/lib/check_mk_agent/plugins + use inventory && newexe plugins/mk_inventory.linux mk_inventory + use smart && doexe plugins/smart + use mysql && doexe plugins/mk_mysql + use postgres && doexe plugins/mk_postgres + use apache_status && doexe plugins/apache_status + use zypper && doexe plugins/mk_zypper + use oracle && doexe plugins/mk_oracle + use nfsexports && doexe plugins/nfsexports +} diff --git a/net-analyzer/check_mk_agent/check_mk_agent-1.4.0_p31.ebuild b/net-analyzer/check_mk_agent/check_mk_agent-1.4.0_p31.ebuild new file mode 100644 index 000000000000..c41c9b1f3484 --- /dev/null +++ b/net-analyzer/check_mk_agent/check_mk_agent-1.4.0_p31.ebuild @@ -0,0 +1,74 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +inherit systemd + +DESCRIPTION="Agent to report data to Check_MK for monitoring" +HOMEPAGE="http://mathias-kettner.de/check_mk.html" + +MY_PV="${PV/_p/p}" +MY_P="check-mk-raw-${MY_PV}.cre" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="apache_status inventory logwatch mysql nfsexports oracle postgres smart +xinetd zypper" + +RDEPEND="!!net-analyzer/check_mk + app-shells/bash:* + xinetd? ( || ( sys-apps/xinetd sys-apps/systemd ) ) + " +DEPEND="${RDEPEND}" + +SRC_URI="http://mathias-kettner.de/support/${MY_PV}/${MY_P}.tar.gz" + +src_unpack() { + # check_mk is a tarball containing tarballs + unpack ${A} + unpack "${WORKDIR}"/${MY_P}/packages/check_mk/check_mk-${MY_PV}.tar.gz + mkdir -p "${S}" || die + cd "${S}" || die + unpack "${WORKDIR}"/check_mk-${MY_PV}/agents.tar.gz + mkdir -p "${S}"/doc || die + cd "${S}"/doc || die + unpack "${WORKDIR}"/check_mk-${MY_PV}/doc.tar.gz +} + +src_install() { + # Install agent related files + newbin check_mk_agent.linux check_mk_agent + + keepdir /usr/lib/check_mk_agent/local + dodir /usr/lib/check_mk_agent/plugins + dodir /etc/check_mk + + dodoc doc/{AUTHORS,COPYING,ChangeLog} + docompress + + if use xinetd; then + insinto /etc/xinetd.d + newins cfg_examples/xinetd.conf check_mk + systemd_dounit cfg_examples/systemd/check_mk{.socket,@.service} + fi + + # Install the check_mk_agent logwatch plugin + if use logwatch; then + insinto /etc/check_mk + doins cfg_examples/logwatch.cfg + exeinto /usr/lib/check_mk_agent/plugins + doexe plugins/mk_logwatch + fi + + # Install any other useflag-enabled agent plugins + exeinto /usr/lib/check_mk_agent/plugins + use inventory && newexe plugins/mk_inventory.linux mk_inventory + use smart && doexe plugins/smart + use mysql && doexe plugins/mk_mysql + use postgres && doexe plugins/mk_postgres + use apache_status && doexe plugins/apache_status + use zypper && doexe plugins/mk_zypper + use oracle && doexe plugins/mk_oracle + use nfsexports && doexe plugins/nfsexports +} diff --git a/net-analyzer/check_mk_agent/metadata.xml b/net-analyzer/check_mk_agent/metadata.xml new file mode 100644 index 000000000000..1e6bc7cf239c --- /dev/null +++ b/net-analyzer/check_mk_agent/metadata.xml @@ -0,0 +1,27 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>axs@gentoo.org</email> + <name>Ian Stakenvicius (_AxS_)</name> + </maintainer> + <longdescription lang="en"> + The agent, to gather and report system and other monitoring data to Check_MK enabled + Nagios/Icigna centralized monitoring servers. + </longdescription> + <use> + <flag name="inventory">Install check_mk-agent linux inventory plugin.</flag> + <flag name="logwatch">Install check_mk-agent logwatch plugin.</flag> + <flag name="smart">Install check_mk-agent S.M.A.R.T plugin.</flag> + <flag name="mysql">Install check_mk-agent mysql plugin.</flag> + <flag name="postgres">Install check_mk-agent postgres plugin.</flag> + <flag name="apache_status">Install check_mk-agent apache-status plugin.</flag> + <flag name="nfsexports">Install check_mk-agent nfsexports plugin.</flag> + <flag name="zypper">Install check_mk-agent zypper plugin.</flag> + </use> + <upstream> + <changelog>http://mathias-kettner.com/check_mk_download.html</changelog> + <doc>http://mathias-kettner.com/checkmk.html</doc> + </upstream> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/chronograf/Manifest b/net-analyzer/chronograf/Manifest new file mode 100644 index 000000000000..6bf2c756bf05 --- /dev/null +++ b/net-analyzer/chronograf/Manifest @@ -0,0 +1,6 @@ +DIST chronograf-1.4.3.0.tar.gz 3979946 BLAKE2B 963511250e1d49ca92e9fde23b3c0899331ef22fe071c47c8d9d6a0ab0264e2dcb1dc083559424ff0b4bb59b0d4eb3121febe6f1ce828bac24598ae8be51cb6a SHA512 49a7565dc58f4f79ad1feb25bf6f74e9267630f6dab5f8767411d11f12dd7a76e9486b8f52c961c27dae6511286192585cee67363acf558287da436c39500ef9 +DIST chronograf-1.6.2.tar.gz 4585236 BLAKE2B a9861f84c1c862512fb1a5166f063a54d6a72f0eb3d175f7314ac50fd04b4f2529e18195cffa49b11a6b13483619ae7e579bc15479f8cea0698fd13cdc594677 SHA512 c4be1deed7ce4f0006cbf123faa0577909bf821581f5f263d3d474963f2541dca0092964a38626b80b5f32c11947f130aa97d37f3d673e304cea665c42bf2a32 +DIST chronograf-1.7.3.tar.gz 16319610 BLAKE2B 3d90ad33ce78b4bd939e5c016ea14b7986d8888707a8a68cd832e0826612aa984d65615301bee4d800343ecc38964103abcf72810c6390fd9cdd65542739e9ba SHA512 dd5e4805dcbe167a399b7927b976839bb99f805abc7caf0fbf9cba479647df1a681f175d7bfc48a2267312e7f89470935623f7bc5e6bcb7cf861928f3e0b2f1a +DIST chronograf-gen-1.4.3.0.tar.gz 2488979 BLAKE2B 47738629d25dd6b5c11f942bdcea089291bfd8ad1476f448985d35fd35fa4a59274e95b863f7055c34ac0047f584fc45c83e3143aceb8b13b6c4fd28c42039ec SHA512 0346c19f80bea597c87a54f2d5409854a30dfa020bb0326791a6387d81aafe0c6e5112b6d086b21f95dc4f68a269a8fb2e0113156122636c3a6281ba58df6b49 +DIST chronograf-gen-1.6.2.tar.gz 3263429 BLAKE2B 6b6202bfd216a7777c89f2329379df03226b0b212e720987357b66bc26c3d07212a26ed2c41991c7ee3c0eea9f3a731985697b7e4752eb3be906cbc8790a8290 SHA512 55cf76b6c33134a49deb605543ff49aeffaa3baf4262787b19afe1d3d42c2a6e66e88d031f07a2f13a214556c479daa6b40f8586b529730c924ae45bf0e85213 +DIST chronograf-gen-1.7.3.tar.gz 2893752 BLAKE2B bfbc680c3237522844b406504412dd6001eef3f93fc31df18660bb74b7e7561f44c5d3af039af62e000610f40c81e78fcde8a651a5198b4bd152fa04e93c51c7 SHA512 8120f563e0c5be8a7b8179016db72a1ff5eb7447c1124ffeb87d5c928275f3b0080f1f4d01cd9c5b0eef601852b2e3701e3b4cefda9a427bbaeaf9fc46a69ab1 diff --git a/net-analyzer/chronograf/chronograf-1.4.3.0.ebuild b/net-analyzer/chronograf/chronograf-1.4.3.0.ebuild new file mode 100644 index 000000000000..2b2c7163f727 --- /dev/null +++ b/net-analyzer/chronograf/chronograf-1.4.3.0.ebuild @@ -0,0 +1,70 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 +EGO_PN=github.com/influxdata/chronograf + +inherit golang-build golang-vcs-snapshot systemd user + +DESCRIPTION="Monitoring, processing and alerting on time series data" +HOMEPAGE="https://www.influxdata.com" +SRC_URI="https://${EGO_PN}/archive/${PV}.tar.gz -> ${P}.tar.gz + https://dev.gentoo.org/~williamh/dist/${PN}-gen-${PV}.tar.gz" + +LICENSE="AGPL-3+" +SLOT="0" +KEYWORDS="~amd64" +IUSE="" + +pkg_setup() { + enewgroup chronograf + enewuser chronograf -1 -1 /var/lib/chronograf chronograf +} + +src_unpack() { + local f + golang-vcs-snapshot_src_unpack + pushd "${S}/src/${EGO_PN}" > /dev/null || die + for f in ${A}; do + case $f in + ${PN}-gen-*.tar.*) + unpack ${f} + ;; + esac + done +} + +src_compile() { + pushd "src/${EGO_PN}" > /dev/null || die + set -- env GOPATH="${S}" go build -o chronograf cmd/chronograf/main.go + echo "$@" + "$@" || die "building chronograf failed" + set -- env GOPATH="${S}" go build -o chronoctl cmd/chronoctl/main.go + echo "$@" + "$@" || die "building chronoctl failed" + popd > /dev/null || die +} + +src_install() { + pushd "src/${EGO_PN}" > /dev/null || die +dobin chronograf chronoctl + dodoc CHANGELOG.md + insinto /etc/logrotate.d + newins etc/scripts/logrotate chronograf + systemd_dounit etc/scripts/chronograf.service + insinto /usr/share/chronograf/canned +doins canned/*.json +keepdir /usr/share/chronograf/resources + keepdir /var/log/chronograf + fowners chronograf:chronograf /var/log/chronograf + newconfd "${FILESDIR}"/chronograf.confd chronograf + newinitd "${FILESDIR}"/chronograf.rc chronograf + popd > /dev/null || die +} + +pkg_postinst() { + if [[ -z "${REPLACING_VERSIONS}" ]]; then + einfo "In order to use chronograf, you will need to configure" + einfo "the appropriate options in ${EROOT}etc/conf.d/chronograf" + fi +} diff --git a/net-analyzer/chronograf/chronograf-1.6.2.ebuild b/net-analyzer/chronograf/chronograf-1.6.2.ebuild new file mode 100644 index 000000000000..ebae27747c62 --- /dev/null +++ b/net-analyzer/chronograf/chronograf-1.6.2.ebuild @@ -0,0 +1,70 @@ +# Copyright 1999-2018 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 +EGO_PN=github.com/influxdata/chronograf + +inherit golang-build golang-vcs-snapshot systemd user + +DESCRIPTION="Monitoring, processing and alerting on time series data" +HOMEPAGE="https://www.influxdata.com" +SRC_URI="https://${EGO_PN}/archive/${PV}.tar.gz -> ${P}.tar.gz + https://dev.gentoo.org/~williamh/dist/${PN}-gen-${PV}.tar.gz" + +LICENSE="AGPL-3+" +SLOT="0" +KEYWORDS="~amd64" +IUSE="" + +pkg_setup() { + enewgroup chronograf + enewuser chronograf -1 -1 /var/lib/chronograf chronograf +} + +src_unpack() { + local f + golang-vcs-snapshot_src_unpack + pushd "${S}/src/${EGO_PN}" > /dev/null || die + for f in ${A}; do + case $f in + ${PN}-gen-*.tar.*) + unpack ${f} + ;; + esac + done +} + +src_compile() { + pushd "src/${EGO_PN}" > /dev/null || die + set -- env GOPATH="${S}" go build -o chronograf cmd/chronograf/main.go + echo "$@" + "$@" || die "building chronograf failed" + set -- env GOPATH="${S}" go build -o chronoctl cmd/chronoctl/main.go + echo "$@" + "$@" || die "building chronoctl failed" + popd > /dev/null || die +} + +src_install() { + pushd "src/${EGO_PN}" > /dev/null || die +dobin chronograf chronoctl + dodoc CHANGELOG.md + insinto /etc/logrotate.d + newins etc/scripts/logrotate chronograf + systemd_dounit etc/scripts/chronograf.service + insinto /usr/share/chronograf/canned +doins canned/*.json +keepdir /usr/share/chronograf/resources + keepdir /var/log/chronograf + fowners chronograf:chronograf /var/log/chronograf + newconfd "${FILESDIR}"/chronograf.confd chronograf + newinitd "${FILESDIR}"/chronograf.rc chronograf + popd > /dev/null || die +} + +pkg_postinst() { + if [[ -z "${REPLACING_VERSIONS}" ]]; then + einfo "In order to use chronograf, you will need to configure" + einfo "the appropriate options in ${EROOT}etc/conf.d/chronograf" + fi +} diff --git a/net-analyzer/chronograf/chronograf-1.7.3.ebuild b/net-analyzer/chronograf/chronograf-1.7.3.ebuild new file mode 100644 index 000000000000..c4eb4def22b6 --- /dev/null +++ b/net-analyzer/chronograf/chronograf-1.7.3.ebuild @@ -0,0 +1,70 @@ +# Copyright 2018 Sony Interactive Entertainment Inc. +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 +EGO_PN=github.com/influxdata/chronograf + +inherit golang-build golang-vcs-snapshot systemd user + +DESCRIPTION="Monitoring, processing and alerting on time series data" +HOMEPAGE="https://www.influxdata.com" +SRC_URI="https://${EGO_PN}/archive/${PV}.tar.gz -> ${P}.tar.gz + https://dev.gentoo.org/~williamh/dist/${PN}-gen-${PV}.tar.gz" + +LICENSE="AGPL-3+" +SLOT="0" +KEYWORDS="~amd64" +IUSE="" + +pkg_setup() { + enewgroup chronograf + enewuser chronograf -1 -1 /var/lib/chronograf chronograf +} + +src_unpack() { + local f + golang-vcs-snapshot_src_unpack + pushd "${S}/src/${EGO_PN}" > /dev/null || die + for f in ${A}; do + case $f in + ${PN}-gen-*.tar.*) + unpack ${f} + ;; + esac + done +} + +src_compile() { + pushd "src/${EGO_PN}" > /dev/null || die + set -- env GOPATH="${S}" go build -o chronograf cmd/chronograf/main.go + echo "$@" + "$@" || die "building chronograf failed" + set -- env GOPATH="${S}" go build -o chronoctl cmd/chronoctl/main.go + echo "$@" + "$@" || die "building chronoctl failed" + popd > /dev/null || die +} + +src_install() { + pushd "src/${EGO_PN}" > /dev/null || die +dobin chronograf chronoctl + dodoc CHANGELOG.md + insinto /etc/logrotate.d + newins etc/scripts/logrotate chronograf + systemd_dounit etc/scripts/chronograf.service + insinto /usr/share/chronograf/canned +doins canned/*.json +keepdir /usr/share/chronograf/resources + keepdir /var/log/chronograf + fowners chronograf:chronograf /var/log/chronograf + newconfd "${FILESDIR}"/chronograf.confd chronograf + newinitd "${FILESDIR}"/chronograf.rc chronograf + popd > /dev/null || die +} + +pkg_postinst() { + if [[ -z "${REPLACING_VERSIONS}" ]]; then + einfo "In order to use chronograf, you will need to configure" + einfo "the appropriate options in ${EROOT}etc/conf.d/chronograf" + fi +} diff --git a/net-analyzer/chronograf/files/chronograf.confd b/net-analyzer/chronograf/files/chronograf.confd new file mode 100644 index 000000000000..a70c355c6fb6 --- /dev/null +++ b/net-analyzer/chronograf/files/chronograf.confd @@ -0,0 +1,16 @@ +#The convention in this file is to show the default setting commented +#out. +#To change the setting, uncomment it then change the value. + +#This is the chronograf error log: +#error_log="/var/log/chronograf/chronograf.log" + +#This is the chronograf output log: +#output_log="/dev/null" + +# If you set this to yes, chronograf will report anonymous usage stats +# to influx data. +#report_usage_stats="no" + +# Extra options to pass to chronograf: +#chronograf_opts="" diff --git a/net-analyzer/chronograf/files/chronograf.rc b/net-analyzer/chronograf/files/chronograf.rc new file mode 100644 index 000000000000..335240dbf269 --- /dev/null +++ b/net-analyzer/chronograf/files/chronograf.rc @@ -0,0 +1,22 @@ +#!/sbin/openrc-run + +command=/usr/bin/chronograf +command_args="${chronograf_opts}" +command_background=yes +command_user=chronograf:chronograf +make_pidfile=yes +pidfile=/var/run/chronografd.pid + +# Logging +error_log="${error_log:-/var/log/chronograf/chronograf.log}" +output_log="${output_log:-/dev/null}" + +start_pre() { + export HOST=127.0.0.1 + export PORT=8888 + export BOLT_PATH=/var/lib/chronograf/chronograf-v1.db + export CANNED_PATH=/usr/share/chronograf/canned + export RESOURCES_PATH=/usr/share/chronograf/RESOURCES + yesno "${report_usage_stats:-no}" || export REPORTING_DISABLED=yes + return 0 +} diff --git a/net-analyzer/chronograf/metadata.xml b/net-analyzer/chronograf/metadata.xml new file mode 100644 index 000000000000..819aad9b09d4 --- /dev/null +++ b/net-analyzer/chronograf/metadata.xml @@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>williamh@gentoo.org</email> + <name>William Hubbs</name> + </maintainer> + <longdescription lang="en"> + Open source framework for processing, monitoring and alerting on + time series data. + </longdescription> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/cloudshark/Manifest b/net-analyzer/cloudshark/Manifest new file mode 100644 index 000000000000..e92ca230a999 --- /dev/null +++ b/net-analyzer/cloudshark/Manifest @@ -0,0 +1,3 @@ +DIST cloudshark-1.0.4.tar.gz 24947 BLAKE2B e386d8cb2faf941ef97bd593c2d17566c5d97dce4d73af0d2f462d6e5c875a59e6598e5679bebf4c06be1dde8ebd37c05354dac46c6349c19b65ae0b57a1976b SHA512 5cb0e43e348d00c0ecc98f079a35f455865cbbe884e34101369b74429bb5bc14bb98acffa9749ce44a765e3653c0548e8b30cc658fb982b09dd61e2ec31b4f86 +DIST cloudshark-plugin-1.0.2-174.tgz 143067 BLAKE2B 629ce8ee1fc4f50945228f6ada55a6f4ef88c8aa52cdbccf851a97581d9a2939d4322933747c090aa9261c6bffc619d6f250fa2dfad6583f0830457165ceb8f1 SHA512 42445e67630b1bd2968f0836f625acb3792f22257de104ec0b90c59fa8d2096649eba2252cd6161ce57c8ff79095d52c5663d2fa018c650667896c9905e9dd7e +DIST cloudshark-plugin-1.0.3-180.tgz 143381 BLAKE2B ed27e2a7102f72e12da9908160a365f511fc3ea568cb9d8b5a2796d3f85bb1c73ca5be7c82ad4de9abb42267ceef4739cad66e369b06a480c85a80b411470474 SHA512 765144e6a2c7ce17eaa05f8170216e08ccac224ba6c11750893ae5caa8f40a2b6bee883fd9be91fa800ad3b45dc42d2ec81e564aa573015a91a8537be8384c73 diff --git a/net-analyzer/cloudshark/cloudshark-1.0.2.174.ebuild b/net-analyzer/cloudshark/cloudshark-1.0.2.174.ebuild new file mode 100644 index 000000000000..14e9a59b9b81 --- /dev/null +++ b/net-analyzer/cloudshark/cloudshark-1.0.2.174.ebuild @@ -0,0 +1,48 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +inherit eutils multilib + +SV="1.0.2-174" + +DESCRIPTION="Easily upload your wireshark captures to CloudShark" +HOMEPAGE="https://cloudshark.io/articles/wireshark-plugin/ https://github.com/cloudshark/wireshark-plugin" +SRC_URI="http://appliance.cloudshark.org/downloads/${PN}-plugin-${SV}.tgz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~arm ~x86" +IUSE="" + +PDEPEND="net-analyzer/wireshark:=[lua] + net-misc/curl" + +S="${WORKDIR}/${PN}-${SV}" + +get_PV() { + local pv=$(best_version $1) + pv=${pv#$1-}; pv=${pv%-r*} + pv=${pv//_}; echo ${pv} +} + +src_prepare() { + #cloudshark isn't meant to be installed systemwide, we fix that + epatch "${FILESDIR}"/cs_log_dir.patch + + sed -i "s#%s/cloudshark_init.lua#/usr/$(get_libdir)/wireshark/plugins/$(get_PV net-analyzer/wireshark)/cloudshark_init.lua#" cloudshark.lua + #causes errors, looks like it expects windows paths only + #echo "CLOUDSHARK_CABUNDLE = /usr/$(get_libdir)/wireshark/plugins/$(get_PV net-analyzer/wireshark)/curl-ca-bundle.crt" >> cloudshark_init.default + sed -i "s#%s/curl-ca-bundle.crt#/usr/$(get_libdir)/wireshark/plugins/$(get_PV net-analyzer/wireshark)/curl-ca-bundle.crt#" cloudshark.lua + + #stuff to fix cloudshark_init.default to be more sane + #sed -i 's#CLOUDSHARK_TSHARK = "n"#CLOUDSHARK_TSHARK = "y"#' cloudshark_init.default (tshark support doesn't seem to work) +} + +src_install() { + insinto /usr/$(get_libdir)/wireshark/plugins/$(get_PV net-analyzer/wireshark) + doins cloudshark.lua json.lua version.lua curl-ca-bundle.crt + newins cloudshark_init.default cloudshark_init.lua + dodoc CLOUDSHARK_README.txt +} diff --git a/net-analyzer/cloudshark/cloudshark-1.0.3.180.ebuild b/net-analyzer/cloudshark/cloudshark-1.0.3.180.ebuild new file mode 100644 index 000000000000..2925d93b8e5b --- /dev/null +++ b/net-analyzer/cloudshark/cloudshark-1.0.3.180.ebuild @@ -0,0 +1,48 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +inherit eutils multilib + +SV="1.0.3-180" + +DESCRIPTION="Easily upload your wireshark captures to CloudShark" +HOMEPAGE="https://cloudshark.io/articles/wireshark-plugin/ https://github.com/cloudshark/wireshark-plugin" +SRC_URI="http://appliance.cloudshark.org/plugin/${PN}-plugin-${SV}.tgz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~arm ~x86" +IUSE="" + +PDEPEND="net-analyzer/wireshark:=[lua] + net-misc/curl" + +S="${WORKDIR}/${PN}-${SV}" + +get_PV() { + local pv=$(best_version $1) + pv=${pv#$1-}; pv=${pv%-r*} + pv=${pv//_}; echo ${pv} +} + +src_prepare() { + #cloudshark isn't meant to be installed systemwide, we fix that + epatch "${FILESDIR}"/cs_log_dir.patch + + sed -i "s#%s/cloudshark_init.lua#/usr/$(get_libdir)/wireshark/plugins/$(get_PV net-analyzer/wireshark)/cloudshark_init.lua#" cloudshark.lua + #causes errors, looks like it expects windows paths only + #echo "CLOUDSHARK_CABUNDLE = /usr/$(get_libdir)/wireshark/plugins/$(get_PV net-analyzer/wireshark)/curl-ca-bundle.crt" >> cloudshark_init.default + sed -i "s#%s/curl-ca-bundle.crt#/usr/$(get_libdir)/wireshark/plugins/$(get_PV net-analyzer/wireshark)/curl-ca-bundle.crt#" cloudshark.lua + + #stuff to fix cloudshark_init.default to be more sane + #sed -i 's#CLOUDSHARK_TSHARK = "n"#CLOUDSHARK_TSHARK = "y"#' cloudshark_init.default (tshark support doesn't seem to work) +} + +src_install() { + insinto /usr/$(get_libdir)/wireshark/plugins/$(get_PV net-analyzer/wireshark) + doins cloudshark.lua json.lua version.lua curl-ca-bundle.crt + newins cloudshark_init.default cloudshark_init.lua + dodoc CLOUDSHARK_README.txt +} diff --git a/net-analyzer/cloudshark/cloudshark-1.0.4.ebuild b/net-analyzer/cloudshark/cloudshark-1.0.4.ebuild new file mode 100644 index 000000000000..c25a86e3f199 --- /dev/null +++ b/net-analyzer/cloudshark/cloudshark-1.0.4.ebuild @@ -0,0 +1,43 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +inherit eutils multilib + +DESCRIPTION="Easily upload your wireshark captures to CloudShark" +HOMEPAGE="https://cloudshark.io/articles/wireshark-plugin/ https://github.com/cloudshark/wireshark-plugin" +SRC_URI="https://github.com/${PN}/wireshark-plugin/archive/${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~arm ~x86" +IUSE="" + +PDEPEND="net-analyzer/wireshark:=[lua] + net-misc/curl" + +S="${WORKDIR}/wireshark-plugin-${PV}" + +get_PV() { + local pv=$(best_version $1) + pv=${pv#$1-}; pv=${pv%-r*} + pv=${pv//_}; echo ${pv} +} + +src_prepare() { + #cloudshark isn't meant to be installed systemwide, we fix that + epatch "${FILESDIR}"/cs_log_dir.patch + + sed -i "s#%s/cloudshark_init.lua#/usr/$(get_libdir)/wireshark/plugins/$(get_PV net-analyzer/wireshark)/cloudshark_init.lua#" cloudshark.lua + + #this enables cloudshark by DEFAULT on tshark, not desired + #sed -i 's#CLOUDSHARK_TSHARK = "n"#CLOUDSHARK_TSHARK = "y"#' cloudshark_init.default +} + +src_install() { + insinto /usr/$(get_libdir)/wireshark/plugins/$(get_PV net-analyzer/wireshark) + doins cloudshark.lua json.lua + newins cloudshark_init.default cloudshark_init.lua + dodoc README.md +} diff --git a/net-analyzer/cloudshark/files/cs_log_dir.patch b/net-analyzer/cloudshark/files/cs_log_dir.patch new file mode 100644 index 000000000000..9b0424e3cd44 --- /dev/null +++ b/net-analyzer/cloudshark/files/cs_log_dir.patch @@ -0,0 +1,13 @@ +diff -Naur cloudshark-1.0.2-174-orig/cloudshark.lua cloudshark-1.0.2-174/cloudshark.lua +--- cloudshark-1.0.2-174-orig/cloudshark.lua 2013-06-03 00:00:46.669223099 -0400 ++++ cloudshark-1.0.2-174/cloudshark.lua 2013-06-03 00:01:31.493224300 -0400 +@@ -180,7 +180,8 @@ + -- + + function cs_log_dir() +- return persconffile_path('plugins/cloudshark') ++ local log_dir = "/tmp" ++ return log_dir + end + + -- diff --git a/net-analyzer/cloudshark/metadata.xml b/net-analyzer/cloudshark/metadata.xml new file mode 100644 index 000000000000..5999e035f6ac --- /dev/null +++ b/net-analyzer/cloudshark/metadata.xml @@ -0,0 +1,12 @@ +<?xml version='1.0' encoding='UTF-8'?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>zerochaos@gentoo.org</email> + <name>Rick Farina</name> + </maintainer> + <upstream> + <remote-id type="github">cloudshark/wireshark-plugin</remote-id> + </upstream> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/cnet/Manifest b/net-analyzer/cnet/Manifest new file mode 100644 index 000000000000..2b178af67e87 --- /dev/null +++ b/net-analyzer/cnet/Manifest @@ -0,0 +1,2 @@ +DIST cnet-3.3.1.tgz 2684531 BLAKE2B 5cb2cf545ccf1e2adb1e50f4220b944361ed44d61857ef4bf0ce30ed9e6346e0ed709bfbcfa339751bf2abc67d930b19decdc6355803426fa1eb4d097a6eed73 SHA512 9b86a077d48086036fbcfa86ba202b49610e1e1eac55fd3076b24a7ca622a6fc9b34156477bcb25af15d06cf0813f12a7b3f4cb21f1eeb00fd2e010610797ce8 +DIST cnet-3.3.4.tgz 2687235 BLAKE2B dec8b4510cfb9a39ade046dee56955d4ab39094d07acf373b056ce1917f3bbddcf22cf5feefe864b472be4c4a47da3147a3b977cdbf8b0295e0c3a8da95a8420 SHA512 51457541d1023e49bdad4df3502c51d11ea6d62e3e6ae857becfb60229626ba777226b2b42d313d95b982b2790c6b1f80b39e344d9d4bcd4c38ccc31b055d8f9 diff --git a/net-analyzer/cnet/cnet-3.3.1.ebuild b/net-analyzer/cnet/cnet-3.3.1.ebuild new file mode 100644 index 000000000000..e5765dba0c8d --- /dev/null +++ b/net-analyzer/cnet/cnet-3.3.1.ebuild @@ -0,0 +1,51 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 +inherit eutils multilib toolchain-funcs + +DESCRIPTION="Network simulation tool" +HOMEPAGE="https://www.csse.uwa.edu.au/cnet3/" +SRC_URI="https://dev.gentoo.org/~jer/${P}.tgz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="examples" + +RDEPEND=" + >=dev-lang/tk-8.5 + dev-libs/elfutils + x11-libs/libX11 +" +DEPEND=" + ${RDEPEND} +" + +src_prepare() { + epatch \ + "${FILESDIR}"/${PN}-3.3.1-gentoo.patch \ + "${FILESDIR}"/${PN}-3.3.1-tcl.patch + + # Set libdir properly + sed -i -e "/CNETPATH/s:local/lib:$(get_libdir):" src/preferences.h || die + sed -i -e "/^LIBDIR/s:lib:$(get_libdir):" Makefile || die + + epatch_user +} + +src_compile() { + emake \ + CC="$(tc-getCC)" \ + AR="$(tc-getAR)" \ + RANLIB="$(tc-getRANLIB)" +} + +src_install() { + emake DESTDIR="${D}" install + dodoc ANNOUNCE + if use examples; then + dodoc -r examples + docompress -x /usr/share/doc/${P}/examples + fi +} diff --git a/net-analyzer/cnet/cnet-3.3.4.ebuild b/net-analyzer/cnet/cnet-3.3.4.ebuild new file mode 100644 index 000000000000..252806110764 --- /dev/null +++ b/net-analyzer/cnet/cnet-3.3.4.ebuild @@ -0,0 +1,55 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 +inherit eutils multilib toolchain-funcs + +DESCRIPTION="Network simulation tool" +HOMEPAGE="https://www.csse.uwa.edu.au/cnet3/" +SRC_URI="https://dev.gentoo.org/~jer/${P}.tgz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="examples" + +RDEPEND=" + >=dev-lang/tk-8.5 + dev-libs/elfutils + x11-libs/libX11 +" +DEPEND=" + ${RDEPEND} +" + +DOCS=( + 1st.README +) +PATCHES=( + "${FILESDIR}"/${PN}-3.3.4-gentoo.patch + "${FILESDIR}"/${PN}-3.3.1-tcl.patch +) + +src_prepare() { + # Set libdir properly + sed -i -e "/CNETPATH/s:local/lib:$(get_libdir):" src/preferences.h || die + sed -i -e "/^LIBDIR/s:lib:$(get_libdir):" Makefile || die + + default +} + +src_compile() { + emake \ + CC="$(tc-getCC)" \ + C99="$(tc-getCC) -std=c99" \ + AR="$(tc-getAR)" \ + RANLIB="$(tc-getRANLIB)" +} + +src_install() { + default + + if use examples; then + dodoc -r examples + fi +} diff --git a/net-analyzer/cnet/files/cnet-3.3.1-gentoo.patch b/net-analyzer/cnet/files/cnet-3.3.1-gentoo.patch new file mode 100644 index 000000000000..9754fb4ebf84 --- /dev/null +++ b/net-analyzer/cnet/files/cnet-3.3.1-gentoo.patch @@ -0,0 +1,163 @@ +--- a/Makefile ++++ b/Makefile +@@ -6,7 +6,7 @@ + # Comment/uncomment the following 4 constants to suit your system: + # + # PREFIX defines the directory below which cnet will be installed. +-PREFIX = /usr/local ++PREFIX = /usr + #PREFIX = $(HOME) + # + # BINDIR defines the directory where the cnet binary will be installed. +@@ -16,26 +16,24 @@ + LIBDIR = $(PREFIX)/lib64/cnet + # + # WWWDIR defines the directory to hold cnet's web-based documentation +-WWWDIR = /home/httpd/html/cnet ++#WWWDIR = /home/httpd/html/cnet + #WWWDIR = $(HOME)/WWW/cnet + # + # --------------------------------------------------------------------- + # + it: +- make -C src +- make -C support ++ $(MAKE) -C src ++ $(MAKE) -C support + @ls -l bin/$(NAME) lib/*.a + + install: +- make +- @mkdir -p $(BINDIR) $(LIBDIR) +- @chmod 755 $(BINDIR) $(LIBDIR) +- @cp bin/$(NAME) $(BINDIR)/$(NAME) +- @chmod 755 $(BINDIR)/$(NAME) +- @rm -rf $(LIBDIR)/* +- @cp lib/* $(LIBDIR) +- @chmod 644 $(LIBDIR)/* +- @ls -l $(BINDIR)/$(NAME) $(LIBDIR)/*.a ++ @mkdir -p $(DESTDIR)$(BINDIR) $(DESTDIR)$(LIBDIR) ++ @chmod 755 $(DESTDIR)$(BINDIR) $(DESTDIR)$(LIBDIR) ++ @cp bin/$(NAME) $(DESTDIR)$(BINDIR)/$(NAME) ++ @chmod 755 $(DESTDIR)$(BINDIR)/$(NAME) ++ @rm -rf $(DESTDIR)$(LIBDIR)/* ++ @cp lib/* $(DESTDIR)$(LIBDIR) ++ @chmod 644 $(DESTDIR)$(LIBDIR)/* + + AND = html/CLICK html/KEYBOARD html/STOPANDWAIT html/TICKTOCK + www: +--- a/src/Makefile.linux ++++ b/src/Makefile.linux +@@ -5,7 +5,7 @@ + # binutils 2.5.2, and + # libelf (0.6.4 onwards) + # +-WARNINGS = -Wall -Werror -Wshadow -Wpointer-arith -Wcast-qual \ ++WARNINGS = -Wall -Wshadow -Wpointer-arith -Wcast-qual \ + -Wcast-align -Wwrite-strings -Wconversion \ + -Wstrict-prototypes -Wredundant-decls -Winline \ + -Wcomments -Wtrigraphs -Wimport -Wundef +@@ -20,8 +20,8 @@ + XINCLUDES = -I/usr/include/tcl8.5 + XLIBS = -ltcl8.5 -ltk8.5 -lX11 + # +-C99 = gcc -std=c99 -Wall -Werror -pedantic +-CFLAGS = -O3 -fPIC $(INCLUDES) $(XINCLUDES) ++C99 = $(CC) -std=c99 -Wall -pedantic ++CFLAGS += -fPIC $(INCLUDES) $(XINCLUDES) + # + LD = gcc -rdynamic + LIBDIRS = $(XLIBDIRS) +--- a/support/Makefile ++++ b/support/Makefile +@@ -7,21 +7,21 @@ + + it: + @if uname -s -r | grep -q "Linux" ; then \ +- make -f Makefile.linux ; fi ++ $(MAKE) -f Makefile.linux ; fi + @if uname -s -r | grep -q "Darwin" ; then \ +- make -f Makefile.macosx ; fi ++ $(MAKE) -f Makefile.macosx ; fi + @if uname -s -r | grep -q "SunOS 4" ; then \ +- make -f Makefile.sunos ; fi ++ $(MAKE) -f Makefile.sunos ; fi + @if uname -s -r | grep -q "SunOS 5" ; then \ +- make -f Makefile.solaris ; fi ++ $(MAKE) -f Makefile.solaris ; fi + @if uname -s -r | grep -q "OSF1" ; then \ +- make -f Makefile.osf1 ; fi ++ $(MAKE) -f Makefile.osf1 ; fi + @if uname -s -r | grep -q "IRIX" ; then \ +- make -f Makefile.irix5 ; fi ++ $(MAKE) -f Makefile.irix5 ; fi + @if uname -s -r | grep -q "FreeBSD" ; then \ +- make -f Makefile.freebsd ; fi ++ $(MAKE) -f Makefile.freebsd ; fi + @if uname -s -r | grep -q "NetBSD" ; then \ +- make -f Makefile.netbsd ; fi ++ $(MAKE) -f Makefile.netbsd ; fi + @cp -p cnetsupport.h ../lib + + # --------------------------------------------------------------------- +--- a/support/Makefile.common ++++ b/support/Makefile.common +@@ -1,13 +1,13 @@ + # +-CC = gcc +-CFLAGS = -std=c99 -pedantic -Wall -Werror -O3 -fPIC ++#CC = gcc ++CFLAGS += -std=c99 -pedantic -Wall -fPIC + + DOTH = cnetsupport.h + OBJ = hashtable.o haversine.o lexical.o md5.o queue.o vector.o + + $(NAME): $(OBJ) +- ar rc $(NAME) $(OBJ) +- ranlib $(NAME) ++ $(AR) rc $(NAME) $(OBJ) ++ $(RANLIB) $(NAME) + @cp -p $(NAME) ../lib + + %.o : %.c $(DOTH) +--- a/src/Makefile ++++ b/src/Makefile +@@ -8,21 +8,21 @@ + + it: + @if uname -s -r | grep -q "Linux" ; then \ +- make -f Makefile.linux $(NAME) ; fi ++ $(MAKE) -f Makefile.linux $(NAME) ; fi + @if uname -s -r | grep -q "Darwin" ; then \ +- make -f Makefile.macosx $(NAME) ; fi ++ $(MAKE) -f Makefile.macosx $(NAME) ; fi + @if uname -s -r | grep -q "SunOS 4" ; then \ +- make -f Makefile.sunos $(NAME) ; fi ++ $(MAKE) -f Makefile.sunos $(NAME) ; fi + @if uname -s -r | grep -q "SunOS 5" ; then \ +- make -f Makefile.solaris $(NAME) ; fi ++ $(MAKE) -f Makefile.solaris $(NAME) ; fi + @if uname -s -r | grep -q "OSF1" ; then \ +- make -f Makefile.osf1 $(NAME) ; fi ++ $(MAKE) -f Makefile.osf1 $(NAME) ; fi + @if uname -s -r | grep -q "IRIX" ; then \ +- make -f Makefile.irix5 $(NAME) ; fi ++ $(MAKE) -f Makefile.irix5 $(NAME) ; fi + @if uname -s -r | grep -q "FreeBSD" ; then \ +- make -f Makefile.freebsd $(NAME) ; fi ++ $(MAKE) -f Makefile.freebsd $(NAME) ; fi + @if uname -s -r | grep -q "NetBSD" ; then \ +- make -f Makefile.netbsd $(NAME) ; fi ++ $(MAKE) -f Makefile.netbsd $(NAME) ; fi + @cp -p $(NAME) ../bin + @cp -p cnet.h ../lib + +@@ -33,7 +33,7 @@ + @rm -rf HTML GPATH GRTAGS GSYMS GTAGS + + hide: +- make clean ++ $(MAKE) clean + echo '#if HIDE_GLOBAL_NAMES' > hidenames.h + sort < HIDENAMES | \ + awk '{ if($$0 !~ /#/) printf("#define\t%-36s\t__CN%03d\n", $$0,++n);}'\ diff --git a/net-analyzer/cnet/files/cnet-3.3.1-tcl.patch b/net-analyzer/cnet/files/cnet-3.3.1-tcl.patch new file mode 100644 index 000000000000..4c30673f2e67 --- /dev/null +++ b/net-analyzer/cnet/files/cnet-3.3.1-tcl.patch @@ -0,0 +1,13 @@ +--- a/src/Makefile.linux ++++ b/src/Makefile.linux +@@ -17,8 +17,8 @@ + #XLIBS = -ltcl -ltk -lX11 + # + # or you may need something like: +-XINCLUDES = -I/usr/include/tcl8.5 +-XLIBS = -ltcl8.5 -ltk8.5 -lX11 ++#XINCLUDES = -I/usr/include/tcl8.5 ++XLIBS = -ltcl -ltk -lX11 + # + C99 = $(CC) -std=c99 -Wall -pedantic + CFLAGS += -fPIC $(INCLUDES) $(XINCLUDES) diff --git a/net-analyzer/cnet/files/cnet-3.3.4-gentoo.patch b/net-analyzer/cnet/files/cnet-3.3.4-gentoo.patch new file mode 100644 index 000000000000..b68b6d1bc51d --- /dev/null +++ b/net-analyzer/cnet/files/cnet-3.3.4-gentoo.patch @@ -0,0 +1,161 @@ +--- a/Makefile ++++ b/Makefile +@@ -6,7 +6,7 @@ + # Comment/uncomment the following 4 constants to suit your system: + # + # PREFIX defines the directory below which cnet will be installed. +-PREFIX = /usr/local ++PREFIX = /usr + #PREFIX = $(HOME) + # + # BINDIR defines the directory where the cnet binary will be installed. +@@ -16,26 +16,24 @@ + LIBDIR = $(PREFIX)/lib64/cnet + # + # WWWDIR defines the directory to hold cnet's web-based documentation +-WWWDIR = /home/httpd/html/cnet ++#WWWDIR = /home/httpd/html/cnet + #WWWDIR = $(HOME)/WWW/cnet + # + # --------------------------------------------------------------------- + # + it: +- make -C src +- make -C support ++ $(MAKE) -C src ++ $(MAKE) -C support + @ls -l bin/$(NAME) lib/*.a + + install: +- make +- @mkdir -p $(BINDIR) $(LIBDIR) +- @chmod 755 $(BINDIR) $(LIBDIR) +- @cp bin/$(NAME) $(BINDIR)/$(NAME) +- @chmod 755 $(BINDIR)/$(NAME) +- @rm -rf $(LIBDIR)/* +- @cp lib/* $(LIBDIR) +- @chmod 644 $(LIBDIR)/* +- @ls -l $(BINDIR)/$(NAME) $(LIBDIR)/*.a ++ @mkdir -p $(DESTDIR)$(BINDIR) $(DESTDIR)$(LIBDIR) ++ @chmod 755 $(DESTDIR)$(BINDIR) $(DESTDIR)$(LIBDIR) ++ @cp bin/$(NAME) $(DESTDIR)$(BINDIR)/$(NAME) ++ @chmod 755 $(DESTDIR)$(BINDIR)/$(NAME) ++ @rm -rf $(DESTDIR)$(LIBDIR)/* ++ @cp lib/* $(DESTDIR)$(LIBDIR) ++ @chmod 644 $(DESTDIR)$(LIBDIR)/* + + AND = html/CLICK html/KEYBOARD html/STOPANDWAIT html/TICKTOCK + www: +--- a/src/Makefile.linux ++++ b/src/Makefile.linux +@@ -5,7 +5,7 @@ + # binutils 2.5.2, and + # libelf (0.6.4 onwards) + # +-WARNINGS = -Wall -Werror -Wshadow -Wpointer-arith -Wcast-qual \ ++WARNINGS = -Wall -Wshadow -Wpointer-arith -Wcast-qual \ + -Wcast-align -Wwrite-strings -Wconversion \ + -Wstrict-prototypes -Wredundant-decls -Winline \ + -Wcomments -Wtrigraphs -Wimport -Wundef +@@ -20,8 +20,8 @@ + XINCLUDES = -I/usr/include/tcl8.5 + XLIBS = -ltcl8.5 -ltk8.5 -lX11 + # +-C99 = gcc -std=c99 -Wall -Werror -pedantic +-CFLAGS = -O3 -fPIC $(INCLUDES) $(XINCLUDES) ++C99 = $(CC) -std=c99 -Wall -pedantic ++CFLAGS += -fPIC $(INCLUDES) $(XINCLUDES) + # + LD = gcc -rdynamic + LIBDIRS = $(XLIBDIRS) +--- a/support/Makefile ++++ b/support/Makefile +@@ -7,21 +7,21 @@ + + it: + @if uname -s -r | grep -q "Linux" ; then \ +- make -f Makefile.linux ; fi ++ $(MAKE) -f Makefile.linux ; fi + @if uname -s -r | grep -q "Darwin" ; then \ +- make -f Makefile.macosx ; fi ++ $(MAKE) -f Makefile.macosx ; fi + @if uname -s -r | grep -q "SunOS 4" ; then \ +- make -f Makefile.sunos ; fi ++ $(MAKE) -f Makefile.sunos ; fi + @if uname -s -r | grep -q "SunOS 5" ; then \ +- make -f Makefile.solaris ; fi ++ $(MAKE) -f Makefile.solaris ; fi + @if uname -s -r | grep -q "OSF1" ; then \ +- make -f Makefile.osf1 ; fi ++ $(MAKE) -f Makefile.osf1 ; fi + @if uname -s -r | grep -q "IRIX" ; then \ +- make -f Makefile.irix5 ; fi ++ $(MAKE) -f Makefile.irix5 ; fi + @if uname -s -r | grep -q "FreeBSD" ; then \ +- make -f Makefile.freebsd ; fi ++ $(MAKE) -f Makefile.freebsd ; fi + @if uname -s -r | grep -q "NetBSD" ; then \ +- make -f Makefile.netbsd ; fi ++ $(MAKE) -f Makefile.netbsd ; fi + @cp -p cnetsupport.h ../lib + + # --------------------------------------------------------------------- +--- a/src/Makefile ++++ b/src/Makefile +@@ -8,21 +8,21 @@ + + it: + @if uname -s -r | grep -q "Linux" ; then \ +- make -f Makefile.linux $(NAME) ; fi ++ $(MAKE) -f Makefile.linux $(NAME) ; fi + @if uname -s -r | grep -q "Darwin" ; then \ +- make -f Makefile.macosx $(NAME) ; fi ++ $(MAKE) -f Makefile.macosx $(NAME) ; fi + @if uname -s -r | grep -q "SunOS 4" ; then \ +- make -f Makefile.sunos $(NAME) ; fi ++ $(MAKE) -f Makefile.sunos $(NAME) ; fi + @if uname -s -r | grep -q "SunOS 5" ; then \ +- make -f Makefile.solaris $(NAME) ; fi ++ $(MAKE) -f Makefile.solaris $(NAME) ; fi + @if uname -s -r | grep -q "OSF1" ; then \ +- make -f Makefile.osf1 $(NAME) ; fi ++ $(MAKE) -f Makefile.osf1 $(NAME) ; fi + @if uname -s -r | grep -q "IRIX" ; then \ +- make -f Makefile.irix5 $(NAME) ; fi ++ $(MAKE) -f Makefile.irix5 $(NAME) ; fi + @if uname -s -r | grep -q "FreeBSD" ; then \ +- make -f Makefile.freebsd $(NAME) ; fi ++ $(MAKE) -f Makefile.freebsd $(NAME) ; fi + @if uname -s -r | grep -q "NetBSD" ; then \ +- make -f Makefile.netbsd $(NAME) ; fi ++ $(MAKE) -f Makefile.netbsd $(NAME) ; fi + @cp -p $(NAME) ../bin + @cp -p cnet.h ../lib + +@@ -33,7 +33,7 @@ + @rm -rf HTML GPATH GRTAGS GSYMS GTAGS + + hide: +- make clean ++ $(MAKE) clean + echo '#if HIDE_GLOBAL_NAMES' > hidenames.h + sort < HIDENAMES | \ + awk '{ if($$0 !~ /#/) printf("#define\t%-36s\t__CN%03d\n", $$0,++n);}'\ +--- a/support/Makefile.common ++++ b/support/Makefile.common +@@ -1,13 +1,12 @@ + # +-C99 = gcc -std=c99 -Wall -Werror -pedantic -O3 -fPIC + + DOTH = cnetsupport.h + OBJ = hashtable.o haversine.o lexical.o md5.o queue.o vector.o + + $(NAME): $(OBJ) + @echo linking $(NAME) +- @ar rc $(NAME) $(OBJ) +- @ranlib $(NAME) ++ $(AR) rc $(NAME) $(OBJ) ++ $(RANLIB) $(NAME) + @cp -p $(NAME) ../lib + + %.o : %.c $(DOTH) diff --git a/net-analyzer/cnet/metadata.xml b/net-analyzer/cnet/metadata.xml new file mode 100644 index 000000000000..bd13a914477c --- /dev/null +++ b/net-analyzer/cnet/metadata.xml @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<maintainer type="project"> + <email>netmon@gentoo.org</email> + <name>Gentoo network monitoring and analysis project</name> +</maintainer> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/cryptcat/Manifest b/net-analyzer/cryptcat/Manifest new file mode 100644 index 000000000000..655ac6564fb3 --- /dev/null +++ b/net-analyzer/cryptcat/Manifest @@ -0,0 +1 @@ +DIST cryptcat-unix-1.2.1.tar 190464 BLAKE2B 8029962a3dca21c981a4adaa4e5f347219ac0da7d5b5997101e8c20ac88b2c6e397120018672646a38c58313ad04fad96e930c20a0e2404293679f2fab29fe6a SHA512 2de6521903e489bc6d4f242aaac7f35a3a7fb226e1812ef5f1c3554420fce4378427e94b3e90eca5476d1068f1a9b44d9c5dbd0362888ad893cf66be106deb17 diff --git a/net-analyzer/cryptcat/cryptcat-1.2.1-r2.ebuild b/net-analyzer/cryptcat/cryptcat-1.2.1-r2.ebuild new file mode 100644 index 000000000000..0c94c1940d9e --- /dev/null +++ b/net-analyzer/cryptcat/cryptcat-1.2.1-r2.ebuild @@ -0,0 +1,26 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 +inherit eutils toolchain-funcs + +DESCRIPTION="netcat clone extended with twofish encryption" +HOMEPAGE="http://cryptcat.sourceforge.net/" +SRC_URI="mirror://sourceforge/${PN}/${PN}-unix-${PV}.tar" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="amd64 ppc x86 ~amd64-linux ~x86-linux" + +S=${WORKDIR}/unix + +src_prepare() { + epatch "${FILESDIR}"/${P}-build.patch + epatch "${FILESDIR}"/${P}-misc.patch + tc-export CC CXX +} + +src_install() { + dobin cryptcat + dodoc Changelog README README.cryptcat netcat.blurb +} diff --git a/net-analyzer/cryptcat/files/cryptcat-1.2.1-build.patch b/net-analyzer/cryptcat/files/cryptcat-1.2.1-build.patch new file mode 100644 index 000000000000..17ec33489c89 --- /dev/null +++ b/net-analyzer/cryptcat/files/cryptcat-1.2.1-build.patch @@ -0,0 +1,43 @@ +--- a/unix/Makefile ++++ b/unix/Makefile +@@ -10,16 +10,14 @@ + # debugging + # DFLAGS = -DTEST -DDEBUG + DFLAGS = -DGAPING_SECURITY_HOLE +-CFLAGS = -O ++CFLAGS ?= -O + XFLAGS = # xtra cflags, set by systype targets + XLIBS = # xtra libs if necessary? + # -Bstatic for sunos, -static for gcc, etc. You want this, trust me. + STATIC = +-CC = cc $(CFLAGS) +-LD = $(CC) -s # linker; defaults to stripped executables + o = o # object extension + +-ALL = cryptcat ++all: cryptcat + + ### BOGON-CATCHERS + +@@ -28,8 +26,8 @@ + + ### HARD TARGETS + +-cryptcat: netcat.c farm9crypt.o twofish2.o +- $(LD) $(DFLAGS) $(XFLAGS) $(STATIC) -o cryptcat netcat.c farm9crypt.o twofish2.o $(XLIBS) ++cryptcat: netcat.o farm9crypt.o twofish2.o ++ $(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ $^ + + nc-dos: + @echo "DOS?! Maybe someday, but not now" +@@ -115,10 +112,8 @@ + make -e $(ALL) $(MFLAGS) XFLAGS='-DNEXT' STATIC=-Bstatic + + farm9crypt.o: farm9crypt.cc farm9crypt.h +- ${CC} -c farm9crypt.cc + + twofish2.o: twofish2.cc twofish2.h +- ${CC} -c twofish2.cc + + # start with this for a new architecture, and see what breaks. + generic: diff --git a/net-analyzer/cryptcat/files/cryptcat-1.2.1-misc.patch b/net-analyzer/cryptcat/files/cryptcat-1.2.1-misc.patch new file mode 100644 index 000000000000..8a2f9394b4a6 --- /dev/null +++ b/net-analyzer/cryptcat/files/cryptcat-1.2.1-misc.patch @@ -0,0 +1,48 @@ +--- a/netcat.c ++++ b/netcat.c +@@ -39,7 +39,7 @@ + /* conditional includes -- a very messy section which you may have to dink + for your own architecture [and please send diffs...]: */ + /* #undef _POSIX_SOURCE /* might need this for something? */ +-#define HAVE_BIND /* ASSUMPTION -- seems to work everywhere! */ ++#undef HAVE_BIND /* ASSUMPTION -- seems to work everywhere! */ + #define HAVE_HELP /* undefine if you dont want the help text */ + /* #define ANAL /* if you want case-sensitive DNS matching */ + +@@ -56,7 +56,7 @@ + #ifdef FD_SETSIZE /* should be in types.h, butcha never know. */ + #undef FD_SETSIZE /* if we ever need more than 16 active */ + #endif /* fd's, something is horribly wrong! */ +-#define FD_SETSIZE 16 /* <-- this'll give us a long anyways, wtf */ ++#define FD_SETSIZE 1024 /* <-- this'll give us a long anyways, wtf */ + #include <sys/types.h> /* *now* do it. Sigh, this is broken */ + + #ifdef HAVE_RANDOM /* aficionados of ?rand48() should realize */ +@@ -81,8 +81,10 @@ + #include <errno.h> + #include <signal.h> + #include <fcntl.h> /* O_WRONLY et al */ ++#include <unistd.h> /* alarm() close() sleep() */ ++#include <time.h> /* time() */ + +-#ifdef LINUX ++#ifdef __linux__ + #include <resolv.h> + #endif + +--- a/generic.h ++++ b/generic.h +@@ -274,7 +274,7 @@ + + /* linux, which is trying as desperately as the gnu folks can to be + POSIXLY_CORRECT. I think I'm gonna hurl... */ +-#ifdef LINUX ++#ifdef __linux__ + #undef UTMPX + #undef HAVE_SYSINFO + #undef HAVE_SELECT_H +@@ -373,3 +373,4 @@ + /* ================ */ + #endif /* GENERIC_H */ + ++#define arm arm_timer diff --git a/net-analyzer/cryptcat/metadata.xml b/net-analyzer/cryptcat/metadata.xml new file mode 100644 index 000000000000..26a38eb73b4a --- /dev/null +++ b/net-analyzer/cryptcat/metadata.xml @@ -0,0 +1,12 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>netmon@gentoo.org</email> + <name>Gentoo network monitoring and analysis project</name> + </maintainer> + <upstream> + <remote-id type="sourceforge">cryptcat</remote-id> + </upstream> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/cutter/Manifest b/net-analyzer/cutter/Manifest new file mode 100644 index 000000000000..cc59c2538cd9 --- /dev/null +++ b/net-analyzer/cutter/Manifest @@ -0,0 +1,2 @@ +DIST cutter-1.03.tgz 13176 BLAKE2B d879d849be77c34d3e1882cbe500be71e631a5047116828ab07f8ab07b5bbb853e19b6e8b7dd5c42a73ce7b5c2825228cbeae07ec875e83da7bd1bd1c6f34a7a SHA512 821e8abf496e22b86bdd855fb1c9c51648a276ebb572edd2ccb172ae7025a38794df37dfe153c1807785ecec279c34b9df5e2bcc2de582b3a88ee3776cf46eea +DIST cutter-1.04.tgz 13680 BLAKE2B 373e5e0c0fb14224974ff399c7db0a69dc5568394a881be2c285437050a1ec4cfb26acbcdd593d22519f34a32760bdbe342a96c2a4d55547f7c06bc49806e228 SHA512 79c17ec8c17e696a79aa8b11fda347f2e6929eb35f9a37da450acf6aff7ab9471e13eaef24708f90f3f0c2791fade2eb944443b98df3d3ae4eef0c408abc7b3a diff --git a/net-analyzer/cutter/cutter-1.03-r1.ebuild b/net-analyzer/cutter/cutter-1.03-r1.ebuild new file mode 100644 index 000000000000..7e3806ff08d3 --- /dev/null +++ b/net-analyzer/cutter/cutter-1.03-r1.ebuild @@ -0,0 +1,28 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 +inherit eutils toolchain-funcs + +DESCRIPTION="TCP/IP Connection cutting on Linux Firewalls and Routers" +HOMEPAGE="http://www.digitage.co.uk/digitage/software/linux-security/cutter" +SRC_URI="http://www.digitage.co.uk/digitage/files/${PN}/${P}.tgz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="amd64 ~ppc x86" + +src_prepare() { + epatch "${FILESDIR}"/${P}-debian.patch + rm -f Makefile # implicit rules are better ;x +} + +src_compile() { + emake cutter CC="$(tc-getCC)" +} + +src_install() { + dosbin cutter + dodoc README + doman debian/cutter.8 +} diff --git a/net-analyzer/cutter/cutter-1.04.ebuild b/net-analyzer/cutter/cutter-1.04.ebuild new file mode 100644 index 000000000000..f11002ca418e --- /dev/null +++ b/net-analyzer/cutter/cutter-1.04.ebuild @@ -0,0 +1,28 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 +inherit eutils toolchain-funcs + +DESCRIPTION="TCP/IP Connection cutting on Linux Firewalls and Routers" +HOMEPAGE="http://www.digitage.co.uk/digitage/software/linux-security/cutter" +SRC_URI="http://www.digitage.co.uk/digitage/files/${PN}/${P}.tgz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~ppc ~x86" + +src_prepare() { + epatch "${FILESDIR}"/${PN}-1.03-debian.patch + rm -f Makefile # implicit rules are better ;x +} + +src_compile() { + emake cutter CC="$(tc-getCC)" +} + +src_install() { + dosbin cutter + dodoc README + doman debian/cutter.8 +} diff --git a/net-analyzer/cutter/files/cutter-1.03-debian.patch b/net-analyzer/cutter/files/cutter-1.03-debian.patch new file mode 100644 index 000000000000..607e06df744f --- /dev/null +++ b/net-analyzer/cutter/files/cutter-1.03-debian.patch @@ -0,0 +1,182 @@ +--- a/Makefile ++++ b/Makefile +@@ -1,5 +1,5 @@ + cutter: cutter.c +- cc cutter.c -o cutter ++ cc $(CFLAGS) cutter.c -o cutter + + clean: + rm -f cutter.o cutter +--- a/cutter.c ++++ b/cutter.c +@@ -57,6 +57,7 @@ + #include <arpa/inet.h> + #include <net/if.h> + #include <errno.h> ++#include <time.h> + + #define ETHHDR sizeof(struct ethhdr) + #define TCPHDR sizeof(struct tcphdr) +@@ -149,7 +150,6 @@ + int getmac(in_addr_t ip, uchar *mac) + { + FILE *id = fopen( "/proc/net/arp", "r" ); +- union { uchar c[4]; in_addr_t n; } ipu; + in_addr_t ipn; + int mac0, mac1, mac2, mac3, mac4, mac5; + int hwtype, flags; +@@ -240,7 +240,7 @@ + u_short toport + ) + { +- int i_result, raw_sock, rtn; ++ int i_result, raw_sock; + in_addr_t gateway_ip; + struct sockaddr_ll myaddr, hisaddr; + struct tpack tpack; +@@ -377,7 +377,7 @@ + + for ( ; time(0) < tstart + 15; ) { // give the peer 15 seconds to respond + struct sockaddr_ll gotaddr; +- int addrlen = sizeof(gotaddr); ++ unsigned int addrlen = sizeof(gotaddr); + fd_set readfds; + struct timeval tv; + +@@ -478,8 +478,7 @@ + { + FILE *id = fopen( "/proc/net/ip_conntrack", "r" ); + char src1[32], dst1[32], src2[32], dst2[32]; +- int sport1, dport1, sport2, dport2, i; +- int packets1, packets2, bytes1, bytes2; ++ int sport1, dport1, sport2, dport2; + in_addr_t src1n, src2n, dst1n, dst2n; + char buff[1024], *p; + int found = 0; +--- a/debian/cutter.8 ++++ b/debian/cutter.8 +@@ -0,0 +1,124 @@ ++.\" Hey, EMACS: -*- nroff -*- ++.TH CUTTER 8 "April, 2005" ++.SH NAME ++cutter \- cut tcp/ip connections ++.SH SYNOPSIS ++.B cutter ++.IR ipaddress1 \ [ \ port1 \ [ \ ipaddress2 \ [ \ port2 ++\ ] \ ] \ ] ++.br ++.SH DESCRIPTION ++.B Cutter ++is an open source program that allows Linux firewall ++administrators to abort TCP/IP connections routed over the firewall or ++router on which it is run. ++.br ++.SH WARNING ++.B Cutter ++has been designed for use as a administrators tool for Linux ++firewalls. It's use (as is, or modified) for any other purpose is not ++sanctioned by the author. So - do not use this tool as a parachute, or ++to dry your cat, chill meat, answer your phone, drive you car, teach ++your kids to read or attack other people's computer systems or networks. ++.PP ++This software has been designed for ++.I legal ++and ++.I appropriate ++use ++by network security administrators and the like. It has been written as ++part of a larger Linux firewall project, targetting at controlling traffic ++from peer-to-peer software such as Kazaa, iMesh and others into and out of ++a private network. It is not designed as a tool for malicious use and the ++author in no way sanctions such use. ++.PP ++Users of the software should be aware that it's actions are easily detectable ++using a number of readily available network monitoring tools, and it makes no ++attempt to disguise it's actions. Malicious use of "cutter" could result in a ++jail sentance in a number of countries around the world. ++.PP ++The author is not responsible for the results of using this software. It ++is provided "as is" in the hope that it will be useful, but no garantees ++are made about it's use. ++.br ++.SH USAGE ++.B Cutter ++can be called using one of the following four syntaxes. ++ ++.BI cutter \ ip-address ++ ++.B Example: ++.RS ++.br ++.BI cutter \ 10.10.0.45 ++ ++Cuts all connections ++passing through the firewall ++between any ports on the specified ip-address (either a "private" or ++"public" address) and any other hosts. This can be used to close down ++all incoming connections to a particular server, all outgoing ++connections from a particular client or all outgoing connections to a ++server. ++.RE ++ ++.B cutter ++.I ip-address port ++ ++.B Example: ++.RS ++.br ++.B cutter ++.I 200.1.2.3 80 ++ ++Cuts all connections to or from the ++specified ip-address/port pair. This allows the user to be a little more ++specific than the previous example and allows targetting of specific ++services on specific hosts. ++.RE ++ ++.B cutter ++.I ip-address-1 port-1 ip-address-2 ++ ++.B Example: ++.RS ++.br ++.B cutter ++.I 200.1.2.3 22 10.10.0.45 ++ ++Cuts all connections between ++ip-address-2 and ip-address-1/port-1. This allows the user to cut ++connections between a specified "client" and a particular service on a ++specified host. Our example closes host 10.10.0.45's SSH connection to ++server 200.1.2.3. ++.RE ++ ++.B cutter ++.I ip-address-1 port-1 ip-address-2 port-2 ++ ++.B Example: ++.RS ++.br ++.B cutter ++.I 200.1.2.3 22 10.10.0.45 32451 ++ ++Cuts the specific connection between ++the two ip/port number pairs given. ++.RE ++.SH STATUS ++Cutter 1.03 should be considered ++.B EXPERIMENTAL. ++The author is releasing a ++tool that works on the systems he has access to (namely: IPCop and ++RedHat Linux), and he is seeking input on it's use on other systems, ++ideas for improvement, offers of sponsorship - etc. ++.PP ++.br ++.SH ADDITIONAL DOCUMENTATION ++This program is documented at ++.UR http://www.lowth.com/cutter/ ++.I http://www.lowth.com/cutter/ ++.UE ++.SH AUTHOR ++Blars Blarson addapted the README and web page written by Chris Lowth ++into this man page for debian package of cutter. This man page may be ++distribuated under the terms of the Gnu GPL version 2. diff --git a/net-analyzer/cutter/metadata.xml b/net-analyzer/cutter/metadata.xml new file mode 100644 index 000000000000..bd13a914477c --- /dev/null +++ b/net-analyzer/cutter/metadata.xml @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<maintainer type="project"> + <email>netmon@gentoo.org</email> + <name>Gentoo network monitoring and analysis project</name> +</maintainer> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/darkstat/Manifest b/net-analyzer/darkstat/Manifest new file mode 100644 index 000000000000..0614aa5c743d --- /dev/null +++ b/net-analyzer/darkstat/Manifest @@ -0,0 +1 @@ +DIST darkstat-3.0.719.tar.bz2 117695 BLAKE2B b2aef3073aafaa42d006fd9ade652ea3542a5f238e347b219ee30e995915fa38b005161d26dff6a9a3e01e98b426ec14c32e1390592128d5816278e5f895f178 SHA512 264f6c5f862745fbfb5d125aae5a319369f028fd7be96cfb12775147f528a36b7f5a42bcd6434f2d376933292364641f2ec9cd9bdb1fe105f5a905e331181f98 diff --git a/net-analyzer/darkstat/darkstat-3.0.719.ebuild b/net-analyzer/darkstat/darkstat-3.0.719.ebuild new file mode 100644 index 000000000000..eb3e78e31c6c --- /dev/null +++ b/net-analyzer/darkstat/darkstat-3.0.719.ebuild @@ -0,0 +1,69 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 +inherit autotools user + +DESCRIPTION="Network traffic analyzer with cute web interface" +HOMEPAGE="https://unix4lyfe.org/darkstat/" +SRC_URI="https://unix4lyfe.org/${PN}/${P}.tar.bz2" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="amd64 ppc x86" + +DEPEND=" + dev-libs/libbsd + net-libs/libpcap + sys-libs/zlib +" +RDEPEND=" + ${DEPEND} +" + +DARKSTAT_CHROOT_DIR=${DARKSTAT_CHROOT_DIR:-/var/lib/darkstat} + +DOCS=( AUTHORS ChangeLog README NEWS ) + +src_prepare() { + default + + sed -i -e 's|-flto||g' configure.ac || die + + eautoreconf +} + +src_configure() { + econf --disable-debug --with-privdrop-user=darkstat +} + +src_install() { + default + + newinitd "${FILESDIR}"/darkstat-initd darkstat + newconfd "${FILESDIR}"/darkstat-confd darkstat + + sed -i -e "s:__CHROOT__:${DARKSTAT_CHROOT_DIR}:g" "${D}"/etc/conf.d/darkstat || die + sed -i -e "s:__CHROOT__:${DARKSTAT_CHROOT_DIR}:g" "${D}"/etc/init.d/darkstat || die + + keepdir "${DARKSTAT_CHROOT_DIR}" + chown darkstat:0 "${D}${DARKSTAT_CHROOT_DIR}" +} + +pkg_preinst() { + enewuser darkstat +} + +pkg_postinst() { + # Workaround bug #141619 + DARKSTAT_CHROOT_DIR=`sed -n 's/^#CHROOT=\(.*\)/\1/p' "${ROOT}"etc/conf.d/darkstat` + chown darkstat:0 "${ROOT}${DARKSTAT_CHROOT_DIR}" + + elog "To start different darkstat instances which will listen on a different" + elog "interfaces create in /etc/init.d directory the 'darkstat.if' symlink to" + elog "darkstat script where 'if' is the name of the interface." + elog "Also in /etc/conf.d directory copy darkstat to darkstat.if" + elog "and edit it to change default values." + elog + elog "darkstat's default chroot directory is: \"${ROOT}${DARKSTAT_CHROOT_DIR}\"" +} diff --git a/net-analyzer/darkstat/files/darkstat-confd b/net-analyzer/darkstat/files/darkstat-confd new file mode 100644 index 000000000000..3d95a0461a06 --- /dev/null +++ b/net-analyzer/darkstat/files/darkstat-confd @@ -0,0 +1,27 @@ +# The interface to listen on +# Use only with /etc/init.d/darkstat init script. If you use +# /etc/init.d/darkstat.if init script, then this option should be ignored. +#INTERFACE="eth0" + +# The port for the embedded webserver +#PORT="667" + +# The address embedded webserver should bind to +#ADDRESS="0.0.0.0" + +# Set the filter. See tcpdump documenation for details. +#FILTER="" + +# Log daily traffic statistics into the named file, relative to the +# chroot directory (see, below). +#DAYLOGFILE="darkstat.log" + +# Other options: +DARKSTAT_OPTS="--no-promisc --no-dns --user darkstat" + +# The directory to which the program chroots after initialization. +# If you change this, please note the variable below and adjust +# the permissions accordingly. Note that if you want to use the +# --daylog option in EXTRAOPTS, the files are logged relative +# to the chroot-directory; see the man-page for details. +#CHROOT=__CHROOT__ diff --git a/net-analyzer/darkstat/files/darkstat-initd b/net-analyzer/darkstat/files/darkstat-initd new file mode 100644 index 000000000000..c362251dadc8 --- /dev/null +++ b/net-analyzer/darkstat/files/darkstat-initd @@ -0,0 +1,58 @@ +#!/sbin/openrc-run +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +IF=${SVCNAME##*.} + +if [ -n "${IF}" -a "${SVCNAME}" != "darkstat" ] ; then + PIDFILE=/run/darkstat.${IF}.pid +else + PIDFILE=/run/darkstat.pid +fi + +depend() { + need net +} + +chkconfig() { + if [ -n "${IF}" -a "${SVCNAME}" != "darkstat" ] ; then + if [ ! -f "/etc/conf.d/darkstat.${IF}" ] ; then + einfo "It's possible to have distinct config in /etc/conf.d/darkstat.${IF}." + fi + INTERFACE=${IF} + else + if [ ! -f "/etc/conf.d/darkstat" ] ; then + ewarn "/etc/conf.d/darkstat does not exist. Falling on defaults." + fi + fi + + if [ -z "${INTERFACE}" ]; then + ewarn "No interface specified. Trying to use eth0." + INTERFACE="eth0" + fi + + DARK_OPTS="-i ${INTERFACE}" + [ -n "${PORT}" ] && DARK_OPTS="${DARK_OPTS} -p ${PORT}" + [ -n "${ADDRESS}" ] && DARK_OPTS="${DARK_OPTS} -b ${ADDRESS}" + [ -n "${DAYLOGFILE}" ] && DARK_OPTS="${DARK_OPTS} --daylog ${DAYLOGFILE}" + + return 0 +} + +start() { + chkconfig || return 1 + + # If ${PIDFILE} exist darkstat fails to start + [ -f ${PIDFILE} ] && rm ${PIDFILE} + ebegin "Starting darkstat on ${INTERFACE}" + /sbin/start-stop-daemon --start --exec /usr/sbin/darkstat -- \ + --chroot "${CHROOT:-__CHROOT__}" --pidfile ${PIDFILE} \ + ${DARKSTAT_OPTS} ${DARK_OPTS} -f "${FILTER}" + eend $? +} + +stop() { + ebegin "Stopping darkstat on ${INTERFACE}" + /sbin/start-stop-daemon --stop --pidfile ${PIDFILE} + eend $? +} diff --git a/net-analyzer/darkstat/metadata.xml b/net-analyzer/darkstat/metadata.xml new file mode 100644 index 000000000000..2478aadf2d1a --- /dev/null +++ b/net-analyzer/darkstat/metadata.xml @@ -0,0 +1,14 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<maintainer type="project"> + <email>netmon@gentoo.org</email> + <name>Gentoo network monitoring and analysis project</name> + </maintainer> + <longdescription lang="en"> + darkstat is a network statistics gatherer. It's a packet sniffer that + runs as a background process on a cable/DSL router, gathers all sorts of + statistics about network usage, and serves them over HTTP. + </longdescription> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/dbshield/Manifest b/net-analyzer/dbshield/Manifest new file mode 100644 index 000000000000..6ab97517d55b --- /dev/null +++ b/net-analyzer/dbshield/Manifest @@ -0,0 +1,18 @@ +DIST dbshield-1.0.0_beta4.tar.gz 4566483 BLAKE2B 708b9c5068fedaee30b04125ffdea19d1ecb4282f8a07e5d1a973d911aa72ec8f2c504edce0076da54d535c95086d6341931132e86fa1b0c0181a2c02299884e SHA512 4418872b2d39b2f90f4fdf84b86c7cdf35806eca749a11c3087af15b524d92d33583def59b36df4f68954128391cf7c4d740dc573c444cec1eed0d3e64740bcb +DIST github.com-boltdb-bolt-583e893.tar.gz 80471 BLAKE2B efb7c3b36e8f58a71d1c491612d993df45f0ff67316309a647668fe79fd384a4c1673a108f8d4c900e8eb74f72c4cc7fa4e1df5919eedaf4656c0723227526bb SHA512 840c289e63d89a79b670f94aebb08188bac5b2b8f1a2a023afe6c8b031f482f64854b0136f1afd1096ca757710c1e2cd12812b94b9104693dc7dd24afdd6bbe7 +DIST github.com-fsnotify-fsnotify-629574c.tar.gz 29588 BLAKE2B 618d962d3703c8bc9f94cc11fe97e827b12222c220445797710799b230705df0a708303dcccc9e40a2d851417f29f202a5b80874325c4c69b3ae53e94ffd433b SHA512 eaadede8a6fe231ea1f66755899891e288b5a69c2f74c1f11854b5060f471591f291a5394490a80864fc8d24181ada8a454c9b91ad04988021b5029298dd411b +DIST github.com-go-yaml-yaml-a5b47d3.tar.gz 60581 BLAKE2B d4afadca44adf51ef6c72b1f15bb30f13147c8fc4800601007e3099d1d3a435b89e19a02496f75d77d47d326d4d2838107b8c48364fa39be5c1a2da1326b9a0b SHA512 488623b842daea96680d4bca9e93d62785bbb472f1a11d12ff265b61dea900e9e6d09bdb50af835016c1a97eed6a0916a4f765bdac6e23c70db53af5546a389e +DIST github.com-golang-sys-d75a526.tar.gz 669038 BLAKE2B a57f913dd28ccdef6eb040ad169b2632a18f6ce3e317bd94371a83d188cc191c49b898ae00932fc0ba4e951d8f0bdb26479848e406dbe109e3d203de46c87fb3 SHA512 11748e6b311c9bc0ea5f88953e20dd975f0ba1c8d83f2b679c4aa98107e114bedeafbfff84b481a4fd2b96b3402014a35fde29051bf7e646c26cbeb9e8fa198a +DIST github.com-golang-text-a49bea1.tar.gz 4522635 BLAKE2B 78f1f9d1eb0d93b4814f7b629261cd867a3816d1fe7908d5e0763a091b5cb8ffc138c4149029d8e6ae7e1656eae0efe75fdff4f2e9829dce4b2d7bc75117077c SHA512 87414fd0918c2287d3558372ba0f0302ae3c5e7e1b490452f8a14fea6619ff47d077b12339ccd977431edc53d9e9c9bbafe3c3ab11e6ffa0e4918f9f9d48e996 +DIST github.com-gorilla-securecookie-667fe4e.tar.gz 10266 BLAKE2B 13b3bbbe786368a8f877d7a82ae38d9abcf6f63740d0b5ed188a1eea575cf3767540a1e9577fda81e5b503d24eb8aeb2e97a976d64bbdc5fb136766863fd83a0 SHA512 3aee86d6d5f1e6253cc396f6d13b0f1c7e7b88a82465fd637a971540859f0febe8bb6a980ad31185927c795892d165c0ab562e25286b30c74ca48dadf23f527a +DIST github.com-hashicorp-hcl-80e628d.tar.gz 67712 BLAKE2B 6b4b1e16bdd2fd673178f51670323c98d32f21f9579e0c601b0a6f0a910a37e743f08417d1b523803c78b702958c26b48a893f7df8939a92911660f8f1e76aa7 SHA512 397dee8c862270f1c5745c50caf652256b4208a73b7fc8bad1bd704c599ea3c94b6afb0c6be47d27da9583418a30087fc46e87184e9a75cd476467df545de4da +DIST github.com-magiconair-properties-c265cfa.tar.gz 53513 BLAKE2B b57fc81279f4d397baeb1b2aaf1c6639be7324fa798a757d9c46a147cb3e730802ba112ff71178c6b8f5bb081ae2b424a41cf523813a1b3f6962d7fcd1bbd5e8 SHA512 64e0abe5d5c15be54fa8ba2563d0ff4c8bf157ef0baba6ba63f7945382d4e858071b9db56571d5fe569bdc33e3b6d977f993a22b89df4c1760efafa43c155eff +DIST github.com-mitchellh-mapstructure-bfdb1a8.tar.gz 14956 BLAKE2B 48ca97cbe0636ee0428116fd356b341106b73819e3585a257361c54788e78654e97ec9cc0139294f4629730b398c3408d0e00e6baaeb9e8d710bf0684ab6916d SHA512 e447f24836464c84b4fbb336f7634dcdae9a7cbb26745e0e652cc5d70944b6e98460b87aa5f130e7bc2ccdc14ad869c6576765c83047d2c5cf7abce7830fbeb4 +DIST github.com-pelletier-go-buffruneio-df1e16f.tar.gz 2899 BLAKE2B 79072535ed230d84d8de10a1de4533753a2459fb191f40a715c849c85706204e40af8f4c69ed6d81f0afd39bfec0c50e7d68358dbe74c459fab16edfb3f84920 SHA512 f11fca828fbc34d0e965ef7bd14047426eb44d65291542026a001982ca7778d6a03d3bf68e3052447c04c28b885ae3f034578e4ec19279bf58434b94dc82434c +DIST github.com-pelletier-go-toml-d464759.tar.gz 37615 BLAKE2B 12254ab60046d93bd3999cbd129fe43a3fdc7a9f03cbe3891bab9c4f63b8283f49e9951ea81713d5bebdb3062bd2a493cd42e6b9ef348019d3b2030a564887d3 SHA512 a600b11a32b9a6fd2df78c1c6b916a96ca251a754ff832d05369ede4d494e5543779688f06f7ba070985d644e19c1bd574e63c011c61711b7cd29e5cc059bd71 +DIST github.com-spf13-afero-90dd71e.tar.gz 40623 BLAKE2B 714fe61f72f7e2f8a65c86fc18f772f79deeffe6fa4da15c7d166720fc5a81f7674b67df1abe621da492d7db1299456df61b59e4566e0acbd30f1c4a5ae9d5ed SHA512 bd59ca238cc648b407d15f821e9156b6f0aeb43e7c1cd648449630f6b12cedcce4bd5b808f5f5e2ea56069fd7a48ab4900fbc4b59093dee5f7a50a390815bc33 +DIST github.com-spf13-cast-56a7ecb.tar.gz 6434 BLAKE2B 6f44a5b2810d394ebc1bc984a61e503fb503deb9a1fd4091f17872387a71faf881b88990f7b5a6a43f2711287f8294ab4f1cfbad974fbd3af2f5d4a61f2543b6 SHA512 d55c4c9f41b2889e93df981139d07f18d5c34ce856373aed9fea2b9d4c1d4b83c4b605c41749fbc79a1f10d569c85a608a3f0d1d3feb2e724fbd8657cdecadeb +DIST github.com-spf13-jWalterWeatherman-33c24e7.tar.gz 5940 BLAKE2B 92c3e6803e4825fe66f9380dafc70e3a33075775b8535b769181c6d92dd899fb519b0e89148f8f888194e6fa0e02d2134a935e2023a63077f5725a1f017192b9 SHA512 a3684355a775394f6d6184e8e7edee40699e8b2d53e2a75c16ab7d17b82f153472b063a1b2f3d75ae4b6e2a53850ff04e98bc5ef3c7ab02a59ee7ca9ab840944 +DIST github.com-spf13-pflag-25f8b5b.tar.gz 32218 BLAKE2B 8a643f80bfa5acfe1c7ebe02fa03dfab26f361fa305631d2952db0e7653e6de8c0d09af2fe986ab3dbc1307f44a4e1d7b43919aab9893fef68863c70000c31ec SHA512 11674f1ea33b07c62d4103fa2bea4b2efba1ca5a6c8c10f74d9484d4d75b702d3d440dfc9a6a682f875f92f511befdfd4cec7e335840b5e41164872391a82c3b +DIST github.com-spf13-viper-5ed0fc3.tar.gz 29820 BLAKE2B 10312d0166f42373aaa677cd77150a56a7dc220b9c829c7039de138be8ed9127119c72e273f7588a063c86099ac3c17a3c3448c2a055a039b6ffa41a717c9ca8 SHA512 4570847a0f8b0fae5f76838efa0f4e27b9128ff6b965ab89845839bdaf12ad3a701300a7cdbae8a49b44008a5831b7f76d4068022046dfae60ad9bbba7167b20 +DIST github.com-xwb1989-sqlparser-dbfc858.tar.gz 54256 BLAKE2B 6338fbfd56808344df71772d462b7dd3778aaf3d82256c145f22ae95f231cea2553ac3be1b130e16254f6e95e4c31f46a950322a43557a65482bd60f082f4830 SHA512 8d143217e9f37c243cb38cdaebecba15208aea7f5aba44d3bddbec32ac3e7c17f9d49f1e24973acc88d9a1d4a92a2853e371917ca7e54446b640808a9c94a410 diff --git a/net-analyzer/dbshield/dbshield-1.0.0_beta4.ebuild b/net-analyzer/dbshield/dbshield-1.0.0_beta4.ebuild new file mode 100644 index 000000000000..70d37060e02c --- /dev/null +++ b/net-analyzer/dbshield/dbshield-1.0.0_beta4.ebuild @@ -0,0 +1,51 @@ +# Copyright 1999-2020 Go Overlay Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +GOLANG_PKG_IMPORTPATH="github.com/nim4" +GOLANG_PKG_NAME="${PN//dbs/DBS}" +GOLANG_PKG_VERSION="${PV//_beta/-beta}" +GOLANG_PKG_HAVE_TEST=1 + +GOLANG_PKG_DEPENDENCIES=( + "github.com/boltdb/bolt:583e893" #v1.3.0 + "github.com/gorilla/securecookie:667fe4e" #v1.1 + "github.com/spf13/viper:5ed0fc3" + "github.com/xwb1989/sqlparser:dbfc858" + "github.com/fsnotify/fsnotify:629574c" #v1.4.2 + "github.com/hashicorp/hcl:80e628d" + "github.com/magiconair/properties:c265cfa" #v1.7.0 + "github.com/mitchellh/mapstructure:bfdb1a8" + "github.com/pelletier/go-toml:d464759" #v0.4.0 + "github.com/spf13/afero:90dd71e" + "github.com/spf13/cast:56a7ecb" + "github.com/spf13/jWalterWeatherman:33c24e7" + "github.com/spf13/pflag:25f8b5b" + "github.com/go-yaml/yaml:a5b47d3 -> gopkg.in/yaml.v2" + "github.com/pelletier/go-buffruneio:df1e16f" + "github.com/golang/sys:d75a526 -> golang.org/x" + "github.com/golang/text:a49bea1 -> golang.org/x" +) + +inherit golang-single + +DESCRIPTION="Protects your data by inspecting incoming queries from your application server" +HOMEPAGE="http://nim4.github.io/DBShield" + +LICENSE="MIT" +SLOT="0" +KEYWORDS="~amd64 ~arm ~x86" + +src_prepare() { + golang-single_src_prepare + + golang_fix_importpath_alias \ + "github.com/spf13/jWalterWeatherman" \ + "github.com/spf13/jwalterweatherman" +} + +src_install() { + golang-single_src_install + dodoc conf/${PN}.yml +} diff --git a/net-analyzer/dbshield/metadata.xml b/net-analyzer/dbshield/metadata.xml new file mode 100644 index 000000000000..2727c597869e --- /dev/null +++ b/net-analyzer/dbshield/metadata.xml @@ -0,0 +1,10 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>toffanin.mauro@gmail.com</email> + <name>Mauro Toffanin</name> + <description>Maintainer. Assign bugs to him</description> + </maintainer> + <origin>go-overlay</origin> +</pkgmetadata> diff --git a/net-analyzer/dhcp_probe/Manifest b/net-analyzer/dhcp_probe/Manifest new file mode 100644 index 000000000000..daa2b61e7d68 --- /dev/null +++ b/net-analyzer/dhcp_probe/Manifest @@ -0,0 +1 @@ +DIST dhcp_probe-1.3.0.tar.gz 211613 BLAKE2B cbcc43b292fe537216ef40de9e417c1f700be4ad5f34feacd9475eb31866b68957ce66c5abc47db3b7e5a0dc8751ca6e54200b79ab2f1f8c3f308f6c1c7aef4d SHA512 d643012529ee5149adbc0c1f19f8e579c55201e86de2aec9b3313be9412db4e973162f864d1baaf79fa340b7bd9a7385f0f1406d1b616e801ced3c7bb387c854 diff --git a/net-analyzer/dhcp_probe/dhcp_probe-1.3.0-r4.ebuild b/net-analyzer/dhcp_probe/dhcp_probe-1.3.0-r4.ebuild new file mode 100644 index 000000000000..3819fc35ca70 --- /dev/null +++ b/net-analyzer/dhcp_probe/dhcp_probe-1.3.0-r4.ebuild @@ -0,0 +1,50 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 +inherit flag-o-matic + +DESCRIPTION="discover DHCP and BootP servers on a directly-attached Ethernet network" +HOMEPAGE="https://www.net.princeton.edu/software/dhcp_probe/" +SRC_URI="https://www.net.princeton.edu/software/${PN}/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" + +DEPEND=" + net-libs/libpcap + >=net-libs/libnet-1.1.2.1-r2 +" +RDEPEND="${DEPEND}" +DOCS=( + "${FILESDIR}"/${PN}_mail + AUTHORS + ChangeLog + NEWS + README + TODO + extras/dhcp_probe.cf.sample +) +PATCHES=( + "${FILESDIR}"/${PV}/01_dhcp_probe.5.patch + "${FILESDIR}"/${PV}/02_dhcp_probe.8.patch + "${FILESDIR}"/${PV}/03_implicit_point_conv_bootp.c.patch + "${FILESDIR}"/${PV}/04_linux_32_or_64bits.patch + "${FILESDIR}"/${PV}/05-cleanup.patch + "${FILESDIR}"/${PV}/06-return.patch + "${FILESDIR}"/${PV}/07-comment.patch + "${FILESDIR}"/${PV}/08-man8.patch +) + +src_configure() { + use amd64 && append-flags -D__ARCH__=64 + STRIP=true econf +} + +src_install() { + default + + newinitd "${FILESDIR}/${PN}.initd" ${PN} + newconfd "${FILESDIR}/${PN}.confd" ${PN} +} diff --git a/net-analyzer/dhcp_probe/files/1.3.0/01_dhcp_probe.5.patch b/net-analyzer/dhcp_probe/files/1.3.0/01_dhcp_probe.5.patch new file mode 100644 index 000000000000..2d5599c06224 --- /dev/null +++ b/net-analyzer/dhcp_probe/files/1.3.0/01_dhcp_probe.5.patch @@ -0,0 +1,47 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 01_dhcp_probe.5.dpatch by Laurent Guignard <lguignard.debian@gmail.com> +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: Change a syntax problem in groff file for hyphenation problem +## Note: +## Submitted to upstream programmer Irwin Tillman<irwin@princeton.edu>. +## This patch will be applied in the next version of the upstream code. + + +@DPATCH@ +diff -urNad trunk~/doc/dhcp_probe.cf.5 trunk/doc/dhcp_probe.cf.5 +--- trunk~/doc/dhcp_probe.cf.5 2009-03-30 14:53:40.000000000 +0200 ++++ trunk/doc/dhcp_probe.cf.5 2009-03-30 14:57:05.000000000 +0200 +@@ -472,10 +472,10 @@ + .PP + .RS + .nf +--p the name of the calling program (e.g. dhcp_probe), +--I the name of the interface on which the unexpected response packet was received +--i the IP source address of the packet +--m Ethernet source address of the packet ++\-p the name of the calling program (e.g. dhcp_probe), ++\-I the name of the interface on which the unexpected response packet was received ++\-i the IP source address of the packet ++\-m Ethernet source address of the packet + .fi + .RE + .PP +@@ -483,7 +483,7 @@ + .PP + .RS + .nf +--y the non-zero yiaddr value from the packet, when it falls inside a "Lease Network of Concern" ++\-y the non-zero yiaddr value from the packet, when it falls inside a "Lease Network of Concern" + .fi + .RE + .PP +@@ -723,7 +723,7 @@ + # alert_program_name2 /absolute/path/name + # + # The program specified via 'alert_program_name2' will be called as follows: +-# /absolute/path/name -p name_of_calling_program -I name_of_interface_on_which_the_response_was_received -i IP_source_of_the_response -m ether_src_of_the_response [-y yiaddr_when_in_lease_networks_of_concern] ++# /absolute/path/name \-p name_of_calling_program \-I name_of_interface_on_which_the_response_was_received \-i IP_source_of_the_response \-m ether_src_of_the_response [\-y yiaddr_when_in_lease_networks_of_concern] + # The options may appear in any order. + # The program must silently ignore any options or arguments it does not recognize, + # so as to be forward-compatible with future enhancements to dhcp_probe. diff --git a/net-analyzer/dhcp_probe/files/1.3.0/02_dhcp_probe.8.patch b/net-analyzer/dhcp_probe/files/1.3.0/02_dhcp_probe.8.patch new file mode 100644 index 000000000000..d9d3d5aa898a --- /dev/null +++ b/net-analyzer/dhcp_probe/files/1.3.0/02_dhcp_probe.8.patch @@ -0,0 +1,35 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 02_dhcp_probe.8.dpatch by Laurent Guignard <lguignard.debian@gmail.com> +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: Change a syntax problem in groff file for hyphenation problem +## Note: +## Submitted to upstream programmer Irwin Tillman<irwin@princeton.edu>. +## This patch will be applied in the next version of the upstream code. + + +@DPATCH@ +diff -urNad trunk~/doc/dhcp_probe.8 trunk/doc/dhcp_probe.8 +--- trunk~/doc/dhcp_probe.8 2009-03-30 14:53:40.000000000 +0200 ++++ trunk/doc/dhcp_probe.8 2009-03-30 15:18:09.000000000 +0200 +@@ -380,15 +380,15 @@ + file, + that program is executed, with the following required options: + .nf +- -p the name of the calling program (e.g. dhcp_probe) +- -I the name of the interface on which the unexpected response packet was received +- -i the IP source address of the packet +- -m and the Ethernet source address of the packet ++ \-p the name of the calling program (e.g. dhcp_probe) ++ \-I the name of the interface on which the unexpected response packet was received ++ \-i the IP source address of the packet ++ \-m and the Ethernet source address of the packet + .fi + If the response packet's yiaddr is non-zero and falls within a "Lease Networks of Concern", + the following optional options are also passed: + .nf +- -y the non-zero yiaddr value ++ \-y the non-zero yiaddr value + .fi + (We do not wait for the + .I alert_program_name2 diff --git a/net-analyzer/dhcp_probe/files/1.3.0/03_implicit_point_conv_bootp.c.patch b/net-analyzer/dhcp_probe/files/1.3.0/03_implicit_point_conv_bootp.c.patch new file mode 100644 index 000000000000..41af750416bf --- /dev/null +++ b/net-analyzer/dhcp_probe/files/1.3.0/03_implicit_point_conv_bootp.c.patch @@ -0,0 +1,21 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 03_implicit_point_conv_bootp.c.dpatch by Laurent Guignard <lguignard.debian@gmail.com> +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: Fix implicit Pointer Converstion in bootp.c file. +## Fix bug #529635 discovered by Dann Frazier <dannf@debian.org> +## + +@DPATCH@ +diff -urNad trunk~/src/bootp.c trunk/src/bootp.c +--- trunk~/src/bootp.c 2009-03-31 14:19:06.000000000 +0200 ++++ trunk/src/bootp.c 2009-05-21 09:51:26.000000000 +0200 +@@ -11,7 +11,7 @@ + #include "bootp.h" + #include "configfile.h" + #include "report.h" +- ++#include "utils.h" + + + diff --git a/net-analyzer/dhcp_probe/files/1.3.0/04_linux_32_or_64bits.patch b/net-analyzer/dhcp_probe/files/1.3.0/04_linux_32_or_64bits.patch new file mode 100644 index 000000000000..dcd79ffc58b2 --- /dev/null +++ b/net-analyzer/dhcp_probe/files/1.3.0/04_linux_32_or_64bits.patch @@ -0,0 +1,33 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 04_linux_32_or_64bits.dpatch by Laurent Guignard <lguignard.debian@gmail.com> +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: A solution to solve the bug #535361 +## May be this will be a solution with the right method ??? + +@DPATCH@ +diff -urNad trunk~/src/get_myipaddr.c trunk/src/get_myipaddr.c +--- trunk~/src/get_myipaddr.c 2009-09-03 13:10:32.000000000 +0200 ++++ trunk/src/get_myipaddr.c 2009-09-03 13:15:39.671451172 +0200 +@@ -118,7 +118,21 @@ + #endif /* not STRUCT_SOCKADDR_HAS_SA_LEN */ + + /* increment ptr to next interface for next time through the loop */ ++#ifdef __ARCH__ /* Debian GNU/Linux behavior for packaging goal */ ++ switch(__ARCH__) { ++ case 32: /* 32 bits architectures */ ++ ptr += sizeof(ifr->ifr_name) + len; ++ break; ++ case 64: /* 64 bits architectures */ ++ ptr += sizeof(struct ifreq); ++ break; ++ default: /* Default dhcp_probe behavior */ ++ ptr += sizeof(ifr->ifr_name) + len; ++ break; ++ } ++#else /* Default dhcp_probe behavior */ + ptr += sizeof(ifr->ifr_name) + len; ++#endif + + if (strcmp(ifname, ifr->ifr_name) != 0 ) /* is this the interface we're looking for? */ + continue; diff --git a/net-analyzer/dhcp_probe/files/1.3.0/05-cleanup.patch b/net-analyzer/dhcp_probe/files/1.3.0/05-cleanup.patch new file mode 100644 index 000000000000..4151b461bbfd --- /dev/null +++ b/net-analyzer/dhcp_probe/files/1.3.0/05-cleanup.patch @@ -0,0 +1,29 @@ +--- dhcp_probe-1.3.0/src/dhcp_probe.c.orig 2009-03-09 21:17:47.000000000 +0100 ++++ dhcp_probe-1.3.0/src/dhcp_probe.c 2009-11-19 18:09:26.000000000 +0100 +@@ -84,7 +84,6 @@ + struct sigaction sa; + FILE *pid_fp; + char *cwd = CWD; +- int i; + + int write_packet_len; + int bytes_written; +@@ -98,9 +97,6 @@ + int linktype; + char pcap_errbuf[PCAP_ERRBUF_SIZE], pcap_errbuf2[PCAP_ERRBUF_SIZE]; + +- /* for libnet */ +- char libnet_errbuf[LIBNET_ERRBUF_SIZE]; +- + /* get progname = last component of argv[0] */ + prog = strrchr(argv[0], '/'); + if (prog) +@@ -987,8 +983,6 @@ + Must not be called until after initial configuration is complete. + */ + +- int i; +- + if (! read_configfile(config_file)) { + my_exit(1, 1, 1); + } diff --git a/net-analyzer/dhcp_probe/files/1.3.0/06-return.patch b/net-analyzer/dhcp_probe/files/1.3.0/06-return.patch new file mode 100644 index 000000000000..c27ad646e6c9 --- /dev/null +++ b/net-analyzer/dhcp_probe/files/1.3.0/06-return.patch @@ -0,0 +1,11 @@ +--- dhcp_probe-1.3.0/src/dhcp_probe.c.orig 2009-11-19 18:13:31.000000000 +0100 ++++ dhcp_probe-1.3.0/src/dhcp_probe.c 2009-11-19 18:13:59.000000000 +0100 +@@ -684,6 +684,8 @@ + pcap_close(pd_template); + + my_exit(0, 1, 1); ++ ++ return 0; /* will not be reached */ + } + + diff --git a/net-analyzer/dhcp_probe/files/1.3.0/07-comment.patch b/net-analyzer/dhcp_probe/files/1.3.0/07-comment.patch new file mode 100644 index 000000000000..c8184144a597 --- /dev/null +++ b/net-analyzer/dhcp_probe/files/1.3.0/07-comment.patch @@ -0,0 +1,11 @@ +--- dhcp_probe-1.3.0/src/configfile.c.orig 2009-03-09 21:17:47.000000000 +0100 ++++ dhcp_probe-1.3.0/src/configfile.c 2009-11-19 18:17:03.000000000 +0100 +@@ -55,7 +55,7 @@ + + /* parallel arrays of "lease networks of concern" (address & mask), and number of elems in arrays. + We also precompute a parallel array of 'addr & mask' to save computing these repeatedly later. +-/* If a response already identified as being from a rogue DHCP server contains a yiaddr field field ++ If a response already identified as being from a rogue DHCP server contains a yiaddr field field + that falls into one of these networks, it is reported as a matter of special concern. + */ + struct in_addr lease_networks_of_concern_addr[MAX_LEASE_NETWORKS_OF_CONCERN]; diff --git a/net-analyzer/dhcp_probe/files/1.3.0/08-man8.patch b/net-analyzer/dhcp_probe/files/1.3.0/08-man8.patch new file mode 100644 index 000000000000..56f8686eaebd --- /dev/null +++ b/net-analyzer/dhcp_probe/files/1.3.0/08-man8.patch @@ -0,0 +1,20 @@ +--- dhcp_probe-1.3.0/doc/dhcp_probe.8.orig 2009-11-19 18:27:47.000000000 +0100 ++++ dhcp_probe-1.3.0/doc/dhcp_probe.8 2009-11-19 18:28:50.000000000 +0100 +@@ -141,7 +141,7 @@ + libraries. + .SH OPTIONS + .TP +-.IB \-c \ config_file ++.BI \-c \ config_file + Specifies the configuration file. + If not specified, this defaults to + .BR /etc/dhcp_probe.cf . +@@ -253,7 +253,7 @@ + .B \-v + Display the program's version number, then exit. + .TP +-.IB \-w \ cwd ++.BI \-w \ cwd + Specifies the working directory; shortly after starting the + program changes its current working directory to this. + If not specified, this defaults to diff --git a/net-analyzer/dhcp_probe/files/dhcp_probe.confd b/net-analyzer/dhcp_probe/files/dhcp_probe.confd new file mode 100644 index 000000000000..62652eac45d3 --- /dev/null +++ b/net-analyzer/dhcp_probe/files/dhcp_probe.confd @@ -0,0 +1,9 @@ +# Copyright 1999-2009 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +# Config file for /etc/init.d/dhcp_probe + +# For more information, see dhcp_probe(8). + +DHCP_PROBE_OPTIONS="-d 1" + diff --git a/net-analyzer/dhcp_probe/files/dhcp_probe.initd b/net-analyzer/dhcp_probe/files/dhcp_probe.initd new file mode 100644 index 000000000000..24d09fbc7116 --- /dev/null +++ b/net-analyzer/dhcp_probe/files/dhcp_probe.initd @@ -0,0 +1,47 @@ +#!/sbin/openrc-run +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +extra_commands="reload" + +DHCP_PROBE_BINARY="/usr/sbin/dhcp_probe" +DHCP_PROBE_CONFIG="/etc/dhcp_probe.cf" +DHCP_PROBE_PIDFILE="/var/run/${SVCNAME}.pid" +DHCP_PROBE_INTERFACE="${SVCNAME#*.}" + +depend() { + use logger + need net +} + +checkconfig() { + if [ ! -e ${DHCP_PROBE_CONFIG} ]; then + eerror "You need an ${DHCP_PROBE_CONFIG} to run dhcp_probe." + eerror "A sample file is available in /usr/share/doc/dhcp_probe*" + return 1 + elif [ ${SVCNAME} = dhcp_probe ]; then + eerror "Do not run this script directly! Instead, create symbolic links like so:" + eerror " # cd /etc/init.d" + eerror " # ln -s dhcp_probe dhcp_probe.[INTERFACE_NAME]" + eerror "for each interface that should be monitored" + return 1 + fi +} + +start() { + checkconfig + ebegin "Starting ${SVCNAME}" + ${DHCP_PROBE_BINARY} ${DHCP_PROBE_OPTIONS} -p ${DHCP_PROBE_PIDFILE} ${DHCP_PROBE_INTERFACE} + eend ${?} +} + +stop() { + if [ "${RC_CMD}" = "restart" ] ; then + checkconfig || return 1 + fi + ebegin "Stopping ${SVCNAME}" + start-stop-daemon --stop --signal 9 \ + --pidfile ${DHCP_PROBE_PIDFILE} + eend ${?} +} + diff --git a/net-analyzer/dhcp_probe/files/dhcp_probe_mail b/net-analyzer/dhcp_probe/files/dhcp_probe_mail new file mode 100644 index 000000000000..58b07766bbb3 --- /dev/null +++ b/net-analyzer/dhcp_probe/files/dhcp_probe_mail @@ -0,0 +1,23 @@ +#!/bin/bash +# Old style alert program: +# +# Syntax: +# alert_program_name /absolute/path/name +# +# The program specified via 'alert_program_name' will be called as follows: +# /absolute/path/name name_of_calling_program name_of_interface_on_which_the +#_response_was_received IP_source_of_the_response ether_src_of_the_response + +DHCP_PROBE_DOMAIN=$(dnsdomainname) + +sendmail root <<EOF +From: root@${DHCP_PROBE_DOMAIN} +Subject: $1 ALERT - $3 is acting as a DHCP server + +Called program: $0 +Calling program: $1 +Interface on which response was received: $2 +IP source of the response: $3 +Ethernet source of the response: $4 + +EOF diff --git a/net-analyzer/dhcp_probe/metadata.xml b/net-analyzer/dhcp_probe/metadata.xml new file mode 100644 index 000000000000..28b81f047e47 --- /dev/null +++ b/net-analyzer/dhcp_probe/metadata.xml @@ -0,0 +1,17 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>jer@gentoo.org</email> + <name>Jeroen Roovers</name> + </maintainer> + <maintainer type="project"> + <email>netmon@gentoo.org</email> + <name>Gentoo network monitoring and analysis project</name> + </maintainer> + <longdescription> + dchp_probe attempts to discover DHCP and BootP servers on a + directly-attached Ethernet network + </longdescription> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/dhcpdump/Manifest b/net-analyzer/dhcpdump/Manifest new file mode 100644 index 000000000000..b52390457a84 --- /dev/null +++ b/net-analyzer/dhcpdump/Manifest @@ -0,0 +1 @@ +DIST dhcpdump-1.8.tar.gz 10740 BLAKE2B f87f1db539b06cffd68395982476bd7bfcad4e41d86aea7f3be357a07d597cdb34e8888eaf90e6dc11db0252dce418a3b1ad8a00b0d3a7c7faab48f14c6aec85 SHA512 52cd63d581a3c530c2f5baa66808d5b0241853651c720bd513b769b8301b4dff9c87243787014aea98a5b3ebed86ec317b58d262bf5031015141a4da50fb76e6 diff --git a/net-analyzer/dhcpdump/dhcpdump-1.8.ebuild b/net-analyzer/dhcpdump/dhcpdump-1.8.ebuild new file mode 100644 index 000000000000..f846b315d95e --- /dev/null +++ b/net-analyzer/dhcpdump/dhcpdump-1.8.ebuild @@ -0,0 +1,35 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 +inherit eutils toolchain-funcs + +DESCRIPTION="DHCP Packet Analyzer/tcpdump postprocessor" +HOMEPAGE="https://www.mavetju.org/unix/general.php" +SRC_URI="https://www.mavetju.org/download/${P}.tar.gz" + +LICENSE="BSD-2" +SLOT="0" +KEYWORDS="amd64 arm ~mips x86" + +RDEPEND="net-libs/libpcap" +DEPEND=" + ${RDEPEND} + dev-lang/perl +" + +src_prepare() { + epatch "${FILESDIR}"/${P}-Makefile.patch + epatch "${FILESDIR}"/${P}-debian.patch + epatch "${FILESDIR}"/${P}-endianness.patch +} + +src_compile() { + emake CC=$(tc-getCC) +} + +src_install() { + dobin ${PN} + doman ${PN}.8 + dodoc CHANGES CONTACT +} diff --git a/net-analyzer/dhcpdump/files/dhcpdump-1.8-Makefile.patch b/net-analyzer/dhcpdump/files/dhcpdump-1.8-Makefile.patch new file mode 100644 index 000000000000..690f60779b87 --- /dev/null +++ b/net-analyzer/dhcpdump/files/dhcpdump-1.8-Makefile.patch @@ -0,0 +1,22 @@ +--- a/Makefile ++++ b/Makefile +@@ -1,6 +1,6 @@ +-CFLAGS= -Wall -g +-LDFLAGS= -g +-LIBS= -lpcap ++#CFLAGS = -Wall -g ++#LDFLAGS = -g ++LIBS = -lpcap + + all: dhcpdump dhcpdump.8 + +@@ -15,7 +15,7 @@ + dhcpdump.pod dhcpdump.8 + + dhcpdump: dhcpdump.o +- ${CC} ${LDFLAGS} -o $@ dhcpdump.o ${LIBS} ++ $(CC) -DHAVE_STRSEP $(LDFLAGS) -o $@ dhcpdump.o $(LIBS) + + dhcpdump.o: dhcpdump.c dhcp_options.h Makefile +- ${CC} ${CFLAGS} -c -o $@ dhcpdump.c ++ $(CC) -DHAVE_STRSEP $(CFLAGS) -c -o $@ dhcpdump.c diff --git a/net-analyzer/dhcpdump/files/dhcpdump-1.8-debian.patch b/net-analyzer/dhcpdump/files/dhcpdump-1.8-debian.patch new file mode 100644 index 000000000000..7c5304bb0bca --- /dev/null +++ b/net-analyzer/dhcpdump/files/dhcpdump-1.8-debian.patch @@ -0,0 +1,103 @@ +--- a/dhcpdump.c ++++ b/dhcpdump.c +@@ -16,11 +16,13 @@ + #include <netinet/in.h> + #include <netinet/ip.h> + #include <netinet/udp.h> ++#include <netinet/ether.h> + #include <arpa/inet.h> + #include <stdio.h> + #include <stdlib.h> + #include <string.h> + #include <ctype.h> ++#include <time.h> + #include <pcap.h> + #include <err.h> + #include <regex.h> +@@ -38,11 +40,11 @@ + #define LARGESTRING 1024 + + // header variables +-u_char timestamp[40]; // timestamp on header +-u_char mac_origin[40]; // mac address of origin +-u_char mac_destination[40]; // mac address of destination +-u_char ip_origin[40]; // ip address of origin +-u_char ip_destination[40]; // ip address of destination ++char timestamp[40]; // timestamp on header ++char mac_origin[40]; // mac address of origin ++char mac_destination[40]; // mac address of destination ++char ip_origin[40]; // ip address of origin ++char ip_destination[40]; // ip address of destination + int max_data_len; // maximum size of a packet + + int tcpdump_style = -1; +@@ -160,13 +162,21 @@ + strcpy(mac_destination, + ether_ntoa((struct ether_addr *)eh->ether_dhost)); + +- strcpy(ip_origin, (u_char *)inet_ntoa(ip->ip_src)); +- strcpy(ip_destination, (u_char *)inet_ntoa(ip->ip_dst)); ++ strcpy(ip_origin, (char *)inet_ntoa(ip->ip_src)); ++ strcpy(ip_destination, (char *)inet_ntoa(ip->ip_dst)); + ++#ifdef __linux__ ++ if (hmask && check_ch((u_char *)(sp + offset), ntohs(udp->len))) ++ return; ++ ++ printdata((u_char *)(sp + offset), ntohs(udp->len)); ++#else + if (hmask && check_ch((u_char *)(sp + offset), ntohs(udp->uh_ulen))) + return; + + printdata((u_char *)(sp + offset), ntohs(udp->uh_ulen)); ++#endif ++ + } + + // check for matching CHADDR (Peter Apian-Bennewitz <apian@ise.fhg.de>) +@@ -301,7 +311,7 @@ + // print the header and the options. + int printdata(u_char *data, int data_len) { + int j, i; +- u_char buf[LARGESTRING]; ++ char buf[LARGESTRING]; + + if (data_len == 0) + return 0; +@@ -364,7 +374,7 @@ + case 60: // Domain name + case 86: // NDS Tree name + case 87: // NDS context +- strncpy(buf, &data[j + 2], data[j + 1]); ++ strncpy(buf, (char *)&data[j + 2], data[j + 1]); + buf[data[j + 1]] = 0; + printf("%s", buf); + break; +@@ -510,7 +520,7 @@ + printf("-"); + print8bits(data + j + 4); + printf(" "); +- strncpy(buf, &data[j + 5], data[j + 1] - 3); ++ strncpy(buf, (char *)&data[j + 5], data[j + 1] - 3); + buf[data[j + 1] - 3]=0; + printf("%s", buf); + break; +@@ -518,6 +528,9 @@ + case 82: // Relay Agent Information + printf("\n"); + for (i = j + 2; i < j + data[j + 1]; ) { ++ if (i != j+2) { ++ printf("\n"); ++ } + printf("%-17s %-13s ", " ", + data[i] > sizeof(relayagent_suboptions) ? + "*wrong value*" : +@@ -527,7 +540,7 @@ + break; + } + printHexColon(data + i + 2, data[i + 1]); +- i += data[i + 1]; ++ i += data[i + 1] + 2; + } + break; + diff --git a/net-analyzer/dhcpdump/files/dhcpdump-1.8-endianness.patch b/net-analyzer/dhcpdump/files/dhcpdump-1.8-endianness.patch new file mode 100644 index 000000000000..2a6f7822c2b3 --- /dev/null +++ b/net-analyzer/dhcpdump/files/dhcpdump-1.8-endianness.patch @@ -0,0 +1,12 @@ +--- a/dhcpdump.c ++++ b/dhcpdump.c +@@ -130,7 +130,7 @@ + offset += ETHER_HDR_LEN; + + // Check for IPv4 packets +- if (eh->ether_type != 8) { ++ if (eh->ether_type != htons(0x0800)) { + printf("Ignored non IPv4 packet: %d\n", eh->ether_type); + return; + } + diff --git a/net-analyzer/dhcpdump/metadata.xml b/net-analyzer/dhcpdump/metadata.xml new file mode 100644 index 000000000000..9408c9eacd52 --- /dev/null +++ b/net-analyzer/dhcpdump/metadata.xml @@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<maintainer type="project"> + <email>netmon@gentoo.org</email> + <name>Gentoo network monitoring and analysis project</name> +</maintainer> +<longdescription> +This command parses the output of tcpdump to display the +dhcp-packets for easier checking and debugging. +</longdescription> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/dnsenum/Manifest b/net-analyzer/dnsenum/Manifest new file mode 100644 index 000000000000..fbfcc568646e --- /dev/null +++ b/net-analyzer/dnsenum/Manifest @@ -0,0 +1 @@ +DIST dnsenum-1.2.2.tar.gz 902708 BLAKE2B 4ce8b9b4f641949f9d06f60e452b3c9cfc32819a6d3aa0bdcbb37c58ef22b2dcfd4b3805e5b9a1a264326ddf1f24e4b68b6cb8b2bc7ee4f7ac5ae11017da8aab SHA512 3915be8e3ddf1102520594fcb1a41506401c662175455414226165e473844fa94f8577e68395586bfbf7e97b7c5a29e20e1ad63bb40a214c53e141afe66eddd6 diff --git a/net-analyzer/dnsenum/dnsenum-1.2.2.ebuild b/net-analyzer/dnsenum/dnsenum-1.2.2.ebuild new file mode 100644 index 000000000000..ac19ef55f4d4 --- /dev/null +++ b/net-analyzer/dnsenum/dnsenum-1.2.2.ebuild @@ -0,0 +1,30 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +DESCRIPTION="A perl script to enumerate DNS from a server" +HOMEPAGE="https://github.com/fwaeytens/dnsenum" +SRC_URI="https://dnsenum.googlecode.com/files/${P}.tar.gz" + +LICENSE="GPL-2+" +SLOT="0" +KEYWORDS="~amd64 ~x86" + +RDEPEND=" + dev-perl/Net-DNS + dev-perl/Net-IP + dev-perl/Net-Netmask + dev-perl/Net-Whois-IP + dev-perl/HTML-Parser + dev-perl/WWW-Mechanize + dev-perl/XML-Writer" + +S="${WORKDIR}" + +PATCHES=( "${FILESDIR}"/${PN}-1.2.2-remove-extension.patch ) + +src_install() { + dodoc *.txt + newbin ${PN}.pl ${PN} +} diff --git a/net-analyzer/dnsenum/files/dnsenum-1.2.2-remove-extension.patch b/net-analyzer/dnsenum/files/dnsenum-1.2.2-remove-extension.patch new file mode 100644 index 000000000000..751d673fed2d --- /dev/null +++ b/net-analyzer/dnsenum/files/dnsenum-1.2.2-remove-extension.patch @@ -0,0 +1,62 @@ +--- a/dnsenum.pl ++++ b/dnsenum.pl +@@ -1,11 +1,11 @@ + #!/usr/bin/perl + # + # +-# dnsenum.pl VERSION 1.2.2 ++# dnsenum VERSION 1.2.2 + # This version: - Improvement of output + # - Added DNS Server Fingerprinting + # +-# dnsenum.pl: multithread script to enumerate information on ++# dnsenum: multithread script to enumerate information on + # a domain and to discover non-contiguous ip blocks. + # + # 1) Get the host's addresse. +@@ -45,7 +45,7 @@ + # + # Special thanks to all perl developers. + # +-# please see perldoc dnsenum.pl for options and arguments ++# please see perldoc dnsenum for options and arguments + + use strict; + use warnings;#it complains about uninitialized values when it doesn't find address in RR; need to fix later +@@ -71,7 +71,7 @@ + my ($timeout, $delay, $pages, $ipcount, $ipvalid) = (10, 3, 20, 0, 0); + my ($output); + my $writer; +-my $program = 'dnsenum.pl'; ++my $program = 'dnsenum'; + my $wildcards = 'pseudorandabcdefuvwxyz0123456789.'; + my $VERSION = '1.2.2'; + +@@ -1365,15 +1365,15 @@ + + =head1 NAME + +-dnsenum.pl: multithread script to enumerate information on a domain and to discover non-contiguous IP blocks. ++dnsenum: multithread script to enumerate information on a domain and to discover non-contiguous IP blocks. + + =head1 VERSION + +-dnsenum.pl version 1.2.2 ++dnsenum version 1.2.2 + + =head1 SYNOPSIS + +-dnsenum.pl [options] <domain> ++dnsenum [options] <domain> + + =head1 DESCRIPTION + +@@ -1673,7 +1673,7 @@ + + =head1 README + +-dnsenum.pl: multithread script to enumerate information on a domain ++dnsenum: multithread script to enumerate information on a domain + and to discover non-contiguous ip blocks. + + =head1 PREREQUISITES diff --git a/net-analyzer/dnsenum/metadata.xml b/net-analyzer/dnsenum/metadata.xml new file mode 100644 index 000000000000..c950ec3c21da --- /dev/null +++ b/net-analyzer/dnsenum/metadata.xml @@ -0,0 +1,12 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>zerochaos@gentoo.org</email> + <name>Rick Farina</name> + </maintainer> + <upstream> + <remote-id type="github">fwaeytens/dnsenum</remote-id> + </upstream> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/dnsmap/Manifest b/net-analyzer/dnsmap/Manifest new file mode 100644 index 000000000000..dd7b978d1f47 --- /dev/null +++ b/net-analyzer/dnsmap/Manifest @@ -0,0 +1 @@ +DIST dnsmap-0.35.tar.gz 73584 BLAKE2B 15de8771f8add66d2598996961cae06670ebf9009d575ad3eaee6e7300163fbc84abf6e9082791de155a9daf5581cf2daf568a7a85a4a55adbf0c81e92639e94 SHA512 9a1bc25500dde22f2c641cd41a83e634dffda06fdfd62d439b9b8656f5e7624ab1d4736ed0d375acc24fb3f12091f7f75190fd97c4b7fa3c237baa0ade871ca1 diff --git a/net-analyzer/dnsmap/dnsmap-0.35.ebuild b/net-analyzer/dnsmap/dnsmap-0.35.ebuild new file mode 100644 index 000000000000..d6cb5787b332 --- /dev/null +++ b/net-analyzer/dnsmap/dnsmap-0.35.ebuild @@ -0,0 +1,31 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +inherit autotools + +DESCRIPTION="Scan for subdomains using bruteforcing techniques" +HOMEPAGE="https://github.com/resurrecting-open-source-projects/dnsmap" +SRC_URI="https://github.com/resurrecting-open-source-projects/dnsmap/archive/${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="GPL-3" +SLOT="0" +KEYWORDS="~amd64 ~x86" + +DOCS=( + CONTRIBUTING.md + ChangeLog + NEWS + README.md + TODO + doc/CREDITS.old +) + +src_prepare() { + default + eautoreconf +} + +src_install() { + default +} diff --git a/net-analyzer/dnsmap/metadata.xml b/net-analyzer/dnsmap/metadata.xml new file mode 100644 index 000000000000..77ea798fdf4a --- /dev/null +++ b/net-analyzer/dnsmap/metadata.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<maintainer type="project"> +<email>netmon@gentoo.org</email> +</maintainer> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/dnstracer/Manifest b/net-analyzer/dnstracer/Manifest new file mode 100644 index 000000000000..d56ed9d51848 --- /dev/null +++ b/net-analyzer/dnstracer/Manifest @@ -0,0 +1 @@ +DIST dnstracer-1.9.tar.gz 130884 BLAKE2B cf08795eed59851c6da5d5c0ecc1a0b8445584ab10a9adf3cc526f5f831ceef9ed8deee8728ec964c35808a71e865f841f698403bcc0f16346e3abd5e13cac8b SHA512 e69fe772062ff315ff3148c26df78bd41c75d11dcfa6431f1e9374e6069182bd80826b22dc116011d975838d9527913d46edd78de049edd25e3ac9247d5f3473 diff --git a/net-analyzer/dnstracer/dnstracer-1.9-r2.ebuild b/net-analyzer/dnstracer/dnstracer-1.9-r2.ebuild new file mode 100644 index 000000000000..2e93e346523c --- /dev/null +++ b/net-analyzer/dnstracer/dnstracer-1.9-r2.ebuild @@ -0,0 +1,22 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +DESCRIPTION="Determines where a given nameserver gets its information from" +HOMEPAGE="http://www.mavetju.org/unix/general.php" +SRC_URI="http://www.mavetju.org/download/${P}.tar.gz" + +LICENSE="BSD-2" +SLOT="0" +KEYWORDS="amd64 arm hppa ~ia64 ~ppc ppc64 ~s390 ~sparc x86 ~amd64-linux" +IUSE="ipv6" + +DOCS=( CHANGES README ) +PATCHES=( + "${FILESDIR}"/${PN}-1.9-argv0.patch +) + +src_configure() { + econf $(use_enable ipv6) +} diff --git a/net-analyzer/dnstracer/files/dnstracer-1.9-argv0.patch b/net-analyzer/dnstracer/files/dnstracer-1.9-argv0.patch new file mode 100644 index 000000000000..c83c38ea7d74 --- /dev/null +++ b/net-analyzer/dnstracer/files/dnstracer-1.9-argv0.patch @@ -0,0 +1,11 @@ +--- a/dnstracer.c ++++ b/dnstracer.c +@@ -1619,7 +1619,7 @@ + if (argv[0] == NULL) usage(); + + // check for a trailing dot +- strcpy(argv0, argv[0]); ++ strncpy(argv0, argv[0], NS_MAXDNAME); + if (argv0[strlen(argv[0]) - 1] == '.') argv0[strlen(argv[0]) - 1] = 0; + + printf("Tracing to %s[%s] via %s, maximum of %d retries\n", diff --git a/net-analyzer/dnstracer/metadata.xml b/net-analyzer/dnstracer/metadata.xml new file mode 100644 index 000000000000..bd13a914477c --- /dev/null +++ b/net-analyzer/dnstracer/metadata.xml @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<maintainer type="project"> + <email>netmon@gentoo.org</email> + <name>Gentoo network monitoring and analysis project</name> +</maintainer> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/dosdetector/Manifest b/net-analyzer/dosdetector/Manifest new file mode 100644 index 000000000000..51cee04f0987 --- /dev/null +++ b/net-analyzer/dosdetector/Manifest @@ -0,0 +1 @@ +DIST dosdetector-20060621.tar.gz 164768 BLAKE2B 467b6f45fadecfc6260e90797b7bd5eba042860bdc42ef5aed7538ac70259bd2d34ccecadb46255c02488aef4e929d7eb1cc49884ef649210006aa8ef267965a SHA512 30b6980920920a05668165a1c3dcbd07a94f964367d5f48ca443e017806cfcce85a11ad57183d3cc29ac06e8a1ef122227187f6cacd237fe327db4a768b992f6 diff --git a/net-analyzer/dosdetector/dosdetector-20060621-r1.ebuild b/net-analyzer/dosdetector/dosdetector-20060621-r1.ebuild new file mode 100644 index 000000000000..81aecb194510 --- /dev/null +++ b/net-analyzer/dosdetector/dosdetector-20060621-r1.ebuild @@ -0,0 +1,22 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 +inherit eutils + +DESCRIPTION="Tool to analyze and detect suspicious traffic from IP and alert about it" +HOMEPAGE="http://dark-zone.eu/resources/unix/dosdetector/" +SRC_URI="http://dark-zone.eu/resources/unix/${PN}/${P}.tar.gz" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~amd64 ~x86" + +DEPEND="net-libs/libpcap" +RDEPEND="${DEPEND}" + +src_prepare() { + epatch \ + "${FILESDIR}"/${P}-isdigit.patch \ + "${FILESDIR}"/${P}-sizeof.patch +} diff --git a/net-analyzer/dosdetector/dosdetector-20060621.ebuild b/net-analyzer/dosdetector/dosdetector-20060621.ebuild new file mode 100644 index 000000000000..c7d8681ca3b5 --- /dev/null +++ b/net-analyzer/dosdetector/dosdetector-20060621.ebuild @@ -0,0 +1,20 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 +inherit eutils + +DESCRIPTION="Tool to analyze and detect suspicious traffic from IP and alert about it" +HOMEPAGE="http://dark-zone.eu/resources/unix/dosdetector/" +SRC_URI="http://dark-zone.eu/resources/unix/${PN}/${P}.tar.gz" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~amd64 x86" + +DEPEND="net-libs/libpcap" +RDEPEND="${DEPEND}" + +src_prepare() { + epatch "${FILESDIR}"/${P}-isdigit.patch +} diff --git a/net-analyzer/dosdetector/files/dosdetector-20060621-isdigit.patch b/net-analyzer/dosdetector/files/dosdetector-20060621-isdigit.patch new file mode 100644 index 000000000000..11cd3170ded9 --- /dev/null +++ b/net-analyzer/dosdetector/files/dosdetector-20060621-isdigit.patch @@ -0,0 +1,10 @@ +--- a/include/dos.h ++++ b/include/dos.h +@@ -26,6 +26,7 @@ + #include <net/ppp_defs.h> + #include <sys/ioctl.h> + #include <time.h> ++#include <ctype.h> /* isdigit() */ + + /* + #define DEBUG_TREE 1 diff --git a/net-analyzer/dosdetector/files/dosdetector-20060621-sizeof.patch b/net-analyzer/dosdetector/files/dosdetector-20060621-sizeof.patch new file mode 100644 index 000000000000..aea9cfba19ee --- /dev/null +++ b/net-analyzer/dosdetector/files/dosdetector-20060621-sizeof.patch @@ -0,0 +1,11 @@ +--- a/src/main.c ++++ b/src/main.c +@@ -306,8 +306,6 @@ + hosts = calloc(2, sizeof(struct host)); + rules = calloc(1, sizeof(struct rule)); + rules_num = 0; +- bzero(hosts, sizeof(hosts)); +- bzero(rules, sizeof(rules)); + + /* Init rules table */ + if (init_rules(opt.rules) != 0) { diff --git a/net-analyzer/dosdetector/metadata.xml b/net-analyzer/dosdetector/metadata.xml new file mode 100644 index 000000000000..bd13a914477c --- /dev/null +++ b/net-analyzer/dosdetector/metadata.xml @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<maintainer type="project"> + <email>netmon@gentoo.org</email> + <name>Gentoo network monitoring and analysis project</name> +</maintainer> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/driftnet/Manifest b/net-analyzer/driftnet/Manifest new file mode 100644 index 000000000000..bfbea558151d --- /dev/null +++ b/net-analyzer/driftnet/Manifest @@ -0,0 +1 @@ +DIST driftnet-0.1.6_p20090401.tar.gz 43683 BLAKE2B a3f5c57c5f57247feca37815b84630422f9fdb9ec978791eadaaf0f0b51d1f744674931ea9bb1b9291fc9e556ec9758ff44210a442d219ceeabf71e0ea3a193f SHA512 93b2f7b644603bf2fea09163c3c8cc6eed7ed61f3ad7f6770a754e1a31afde5a75e27464c399261bfdafbe37729f201e6bbcb06bb6c59bf52ac0ede4393a15fa diff --git a/net-analyzer/driftnet/driftnet-0.1.6_p20090401-r1.ebuild b/net-analyzer/driftnet/driftnet-0.1.6_p20090401-r1.ebuild new file mode 100644 index 000000000000..6e4749e79a26 --- /dev/null +++ b/net-analyzer/driftnet/driftnet-0.1.6_p20090401-r1.ebuild @@ -0,0 +1,85 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 +inherit eutils fcaps flag-o-matic toolchain-funcs + +DESCRIPTION="Listen to network traffic and pick out images from TCP streams observed" +HOMEPAGE="http://www.ex-parrot.com/~chris/driftnet/" +SRC_URI="https://github.com/downloads/rbu/${PN}/${P}.tar.gz" + +LICENSE="GPL-2" +KEYWORDS="amd64 ~arm64 ppc -sparc x86" +SLOT="0" +IUSE="gtk mp3 suid" + +CDEPEND=" + net-libs/libpcap + gtk? ( + x11-libs/gtk+:2 + virtual/jpeg:0 + media-libs/giflib:= + media-libs/libpng:= + ) +" + +DEPEND=" + ${CDEPEND} + virtual/pkgconfig +" +RDEPEND=" + ${CDEPEND} + mp3? ( media-sound/mpg123 ) +" + +src_prepare() { + epatch "${FILESDIR}"/${PN}-0.1.6-giflib-5.patch + + sed -i \ + -e 's:png_set_gray_1_2_4_to_8:png_set_expand_gray_1_2_4_to_8:' \ + png.c || die + + # With newer libpng, --cflags causes build failures. + sed -i \ + -e 's:pkg-config --cflags libpng:$(PKG_CONFIG) --libs libpng:' \ + -e 's:_BSD_SOURCE:_DEFAULT_SOURCE:g' \ + Makefile || die +} + +src_compile() { + tc-export CC PKG_CONFIG + + if use gtk; then + emake + mv driftnet driftnet-gtk || die + emake clean + fi + + # build a non-gtk version for all users + sed -i 's:^\(.*gtk.*\)$:#\1:g' Makefile || die "sed disable gtk failed" + append-flags -DNO_DISPLAY_WINDOW + emake +} + +src_install() { + dosbin driftnet + doman driftnet.1 + + use gtk && dosbin driftnet-gtk + + dodoc CHANGES CREDITS README TODO + + if use suid ; then + elog "marking the no-display driftnet as setuid root." + fowners root:wheel "/usr/sbin/driftnet" + fperms 710 "/usr/sbin/driftnet" + fperms u+s "/usr/sbin/driftnet" + fi +} + +pkg_postinst() { + fcaps cap_dac_read_search,cap_net_raw,cap_net_admin \ + "${EROOT}"/usr/sbin/driftnet + use gtk && fcaps cap_dac_read_search,cap_net_raw,cap_net_admin \ + "${EROOT}"/usr/sbin/driftnet-gtk +} diff --git a/net-analyzer/driftnet/driftnet-0.1.6_p20090401.ebuild b/net-analyzer/driftnet/driftnet-0.1.6_p20090401.ebuild new file mode 100644 index 000000000000..9de58dda9d5f --- /dev/null +++ b/net-analyzer/driftnet/driftnet-0.1.6_p20090401.ebuild @@ -0,0 +1,65 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 +inherit eutils flag-o-matic toolchain-funcs + +DESCRIPTION="A program which listens to network traffic and picks out images from TCP streams it observes" +HOMEPAGE="http://www.ex-parrot.com/~chris/driftnet/" +SRC_URI="https://github.com/downloads/rbu/${PN}/${P}.tar.gz" + +LICENSE="GPL-2" +KEYWORDS="~amd64 ppc -sparc x86" +SLOT="0" +IUSE="gtk mp3 suid" + +CDEPEND="net-libs/libpcap + gtk? ( x11-libs/gtk+:2 + virtual/jpeg + media-libs/giflib + media-libs/libpng )" + +DEPEND="${CDEPEND} + virtual/pkgconfig" +RDEPEND="${CDEPEND} + mp3? ( media-sound/mpg123 )" + +src_prepare() { + sed -i \ + -e 's:png_set_gray_1_2_4_to_8:png_set_expand_gray_1_2_4_to_8:' \ + png.c || die + # With newer libpng, --cflags causes build failures. + sed -i \ + -e 's:pkg-config --cflags libpng:pkg-config --libs libpng:' \ + Makefile || die +} + +src_compile() { + export CC=$(tc-getCC) + if use gtk; then + emake + mv driftnet driftnet-gtk || die + emake clean + fi + + # build a non-gtk version for all users + sed -i 's:^\(.*gtk.*\)$:#\1:g' Makefile || die "sed disable gtk failed" + append-flags -DNO_DISPLAY_WINDOW + emake +} + +src_install() { + dosbin driftnet + doman driftnet.1 + + use gtk && dosbin driftnet-gtk + + dodoc CHANGES CREDITS README TODO + + if use suid ; then + elog "marking the no-display driftnet as setuid root." + fowners root:wheel "/usr/sbin/driftnet" + fperms 710 "/usr/sbin/driftnet" + fperms u+s "/usr/sbin/driftnet" + fi +} diff --git a/net-analyzer/driftnet/files/driftnet-0.1.6-giflib-5.patch b/net-analyzer/driftnet/files/driftnet-0.1.6-giflib-5.patch new file mode 100644 index 000000000000..30ad62c38f47 --- /dev/null +++ b/net-analyzer/driftnet/files/driftnet-0.1.6-giflib-5.patch @@ -0,0 +1,50 @@ +--- a/gif.c ++++ b/gif.c +@@ -20,7 +20,12 @@ + */ + int gif_load_hdr(img I) { + GifFileType *g; ++#if GIFLIB_MAJOR > 4 ++ int *GifError = NULL; ++ g = I->us = DGifOpenFileHandle(fileno(I->fp), GifError); ++#else + g = I->us = DGifOpenFileHandle(fileno(I->fp)); ++#endif /* GIFLIB_MAJOR */ + if (!I->us) { + I->err = IE_HDRFORMAT; + return 0; +@@ -36,7 +41,12 @@ + * Abort loading a GIF file after the header is done. + */ + int gif_abort_load(img I) { ++#if GIFLIB_MAJOR > 4 ++ int *GifError = NULL; ++ DGifCloseFile((GifFileType*)I->us, GifError); ++#else + DGifCloseFile((GifFileType*)I->us); ++#endif /* GIFLIB_MAJOR */ + return 1; + } + +@@ -44,6 +54,9 @@ + * Load GIF image. + */ + int gif_load_img(img I) { ++#if GIFLIB_MAJOR > 4 ++ int *GifError = NULL; ++#endif /* GIFLIB_MAJOR */ + GifFileType *g = I->us; + struct SavedImage *si; + int ret = 0; +@@ -114,7 +127,11 @@ + ret = 1; + fail: + ++#if GIFLIB_MAJOR > 4 ++ DGifCloseFile(g, GifError); ++#else + DGifCloseFile(g); ++#endif /* GIFLIB_MAJOR */ + + return ret; + } diff --git a/net-analyzer/driftnet/metadata.xml b/net-analyzer/driftnet/metadata.xml new file mode 100644 index 000000000000..c004caac2f3a --- /dev/null +++ b/net-analyzer/driftnet/metadata.xml @@ -0,0 +1,10 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<maintainer type="project"> + <email>netmon@gentoo.org</email> + <name>Gentoo network monitoring and analysis project</name> +</maintainer> +<longdescription>A program which listens to network traffic and picks out images from TCP streams it observes</longdescription> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/echoping/Manifest b/net-analyzer/echoping/Manifest new file mode 100644 index 000000000000..1794db41878d --- /dev/null +++ b/net-analyzer/echoping/Manifest @@ -0,0 +1 @@ +DIST echoping-6.0.2_p434.tar.gz 74568 BLAKE2B 881cc0e3d0be0f704968cbc02e4ac6abe73fe1ccf7019bb33dc522934d2f50f2ba5f70845c81024d3f4101c0acc5837599e05ba7a44f34b1453b470ca30d4b9b SHA512 1b4f5f1ea6ba000c558cab3b8e86758d6c539d8cd237620000d837b468861a177ac733441c885eb8ec1c35b49baa33a82e34e3f8b14b05429a075b72233d5799 diff --git a/net-analyzer/echoping/echoping-6.0.2_p434-r2.ebuild b/net-analyzer/echoping/echoping-6.0.2_p434-r2.ebuild new file mode 100644 index 000000000000..3ef54165ba6e --- /dev/null +++ b/net-analyzer/echoping/echoping-6.0.2_p434-r2.ebuild @@ -0,0 +1,56 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 +inherit autotools eutils ltprune + +DESCRIPTION="Small program to test performances of remote servers" +HOMEPAGE="http://echoping.sourceforge.net/" +SRC_URI="https://dev.gentoo.org/~jer/${P}.tar.gz" +LICENSE="GPL-2" + +SLOT="0" +KEYWORDS="amd64 ~hppa x86" +IUSE="gnutls http icp idn priority smtp ssl tos postgres ldap" +RESTRICT="test" + +RDEPEND="idn? ( net-dns/libidn ) + postgres? ( dev-db/postgresql:* ) + ldap? ( net-nds/openldap ) + ssl? ( + gnutls? ( >=net-libs/gnutls-3.3:= ) + !gnutls? ( >=dev-libs/openssl-0.9.7d:= ) + )" +DEPEND="${RDEPEND} + >=sys-devel/libtool-2" + +REQUIRED_USE="gnutls? ( ssl )" + +DOCS=( README AUTHORS ChangeLog DETAILS NEWS TODO ) + +src_prepare() { + epatch "${FILESDIR}"/${PN}-6.0.2_p434-fix_implicit_declarations.patch + epatch "${FILESDIR}"/${PN}-6.0.2_p434-gnutls_certificate_type_set_priority.patch + epatch "${FILESDIR}"/${PN}-6.0.2_p434-gnutls_session.patch + + eautoreconf +} + +src_configure() { + econf \ + $(use_enable http) \ + $(use_enable icp) \ + $(use_enable priority) \ + $(use_enable smtp) \ + $(use_enable tos) \ + $(use_with idn libidn) \ + $(usex gnutls $(use_with gnutls) $(use_with ssl)) \ + --config-cache \ + --disable-static \ + --disable-ttcp +} + +src_install() { + default + prune_libtool_files +} diff --git a/net-analyzer/echoping/echoping-6.0.2_p434-r3.ebuild b/net-analyzer/echoping/echoping-6.0.2_p434-r3.ebuild new file mode 100644 index 000000000000..ea9b234861eb --- /dev/null +++ b/net-analyzer/echoping/echoping-6.0.2_p434-r3.ebuild @@ -0,0 +1,59 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 +inherit autotools eutils ltprune + +DESCRIPTION="Small program to test performances of remote servers" +HOMEPAGE="http://echoping.sourceforge.net/" +SRC_URI="https://dev.gentoo.org/~jer/${P}.tar.gz" +LICENSE="GPL-2" + +SLOT="0" +KEYWORDS="~amd64 ~hppa ~x86" +IUSE="libressl gnutls http icp idn priority smtp ssl tos postgres ldap" +RESTRICT="test" + +RDEPEND="idn? ( net-dns/libidn ) + postgres? ( dev-db/postgresql:* ) + ldap? ( net-nds/openldap ) + ssl? ( + gnutls? ( >=net-libs/gnutls-3.3:= ) + !gnutls? ( + !libressl? ( dev-libs/openssl:0= ) + libressl? ( dev-libs/libressl:0= ) + ) + )" +DEPEND="${RDEPEND} + >=sys-devel/libtool-2" + +REQUIRED_USE="gnutls? ( ssl )" + +DOCS=( README AUTHORS ChangeLog DETAILS NEWS TODO ) + +src_prepare() { + epatch "${FILESDIR}"/${PN}-6.0.2_p434-fix_implicit_declarations.patch + epatch "${FILESDIR}"/${PN}-6.0.2_p434-gnutls_certificate_type_set_priority.patch + epatch "${FILESDIR}"/${PN}-6.0.2_p434-gnutls_session.patch + + eautoreconf +} + +src_configure() { + econf \ + $(use_enable http) \ + $(use_enable icp) \ + $(use_enable priority) \ + $(use_enable smtp) \ + $(use_enable tos) \ + $(use_with idn libidn) \ + $(usex gnutls $(use_with gnutls) $(use_with ssl)) \ + --config-cache \ + --disable-static \ + --disable-ttcp +} + +src_install() { + default + prune_libtool_files +} diff --git a/net-analyzer/echoping/echoping-6.0.2_p434-r4.ebuild b/net-analyzer/echoping/echoping-6.0.2_p434-r4.ebuild new file mode 100644 index 000000000000..17e0727353a8 --- /dev/null +++ b/net-analyzer/echoping/echoping-6.0.2_p434-r4.ebuild @@ -0,0 +1,65 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +inherit autotools + +DESCRIPTION="Small program to test performances of remote servers" +HOMEPAGE="http://echoping.sourceforge.net/" +SRC_URI="https://dev.gentoo.org/~jer/${P}.tar.gz" +LICENSE="GPL-2" + +SLOT="0" +KEYWORDS="~amd64 ~hppa ~x86" +IUSE="libressl gnutls http icp idn priority smtp ssl tos postgres ldap" +RESTRICT="test" + +RDEPEND=" + idn? ( net-dns/libidn ) + ldap? ( net-nds/openldap ) + postgres? ( dev-db/postgresql:* ) + ssl? ( + gnutls? ( >=net-libs/gnutls-3.3:= ) + !gnutls? ( + !libressl? ( dev-libs/openssl:0= ) + libressl? ( dev-libs/libressl:0= ) + ) + ) +" +DEPEND=" + ${RDEPEND} + >=sys-devel/libtool-2 +" + +REQUIRED_USE="gnutls? ( ssl )" +DOCS=( AUTHORS ChangeLog DETAILS NEWS README TODO ) +PATCHES=( + "${FILESDIR}"/${PN}-6.0.2_p434-fix_implicit_declarations.patch + "${FILESDIR}"/${PN}-6.0.2_p434-gnutls_certificate_type_set_priority.patch + "${FILESDIR}"/${PN}-6.0.2_p434-gnutls_session.patch + "${FILESDIR}"/${PN}-6.0.2_p434-fno-common.patch +) + +src_prepare() { + default + eautoreconf +} + +src_configure() { + econf \ + $(use_enable http) \ + $(use_enable icp) \ + $(use_enable priority) \ + $(use_enable smtp) \ + $(use_enable tos) \ + $(use_with idn libidn) \ + $(usex gnutls $(use_with gnutls) $(use_with ssl)) \ + --config-cache \ + --disable-static \ + --disable-ttcp +} + +src_install() { + default + find "${ED}" -name '*.la' -delete || die +} diff --git a/net-analyzer/echoping/files/echoping-6.0.2_p434-fix_implicit_declarations.patch b/net-analyzer/echoping/files/echoping-6.0.2_p434-fix_implicit_declarations.patch new file mode 100644 index 000000000000..c2fd2f6886cb --- /dev/null +++ b/net-analyzer/echoping/files/echoping-6.0.2_p434-fix_implicit_declarations.patch @@ -0,0 +1,20 @@ +--- a/echoping.h ++++ b/echoping.h +@@ -194,6 +194,7 @@ + #endif + /* util.c */ + char *random_string(); ++char *to_upper(); + void tvsub(); + void tvadd(); + void tvavg(); +--- a/plugins/ldap/ldap.c ++++ b/plugins/ldap/ldap.c +@@ -9,6 +9,7 @@ + #include "../../config.h" + #include "config.h" + #endif ++#define LDAP_DEPRECATED 1 + #include <ldap.h> + + const char *request = NULL; diff --git a/net-analyzer/echoping/files/echoping-6.0.2_p434-fno-common.patch b/net-analyzer/echoping/files/echoping-6.0.2_p434-fno-common.patch new file mode 100644 index 000000000000..5eafb8a401d2 --- /dev/null +++ b/net-analyzer/echoping/files/echoping-6.0.2_p434-fno-common.patch @@ -0,0 +1,111 @@ +--- a/echoping.c ++++ b/echoping.c +@@ -38,6 +38,25 @@ + struct timeval good_results[MAX_ITERATIONS]; + extern int tvcmp(); + ++char *server; ++#ifdef LIBIDN ++char *locale_server, *ace_server, *utf8_server; ++#endif ++ ++#ifndef IN_PLUGIN ++init_f plugin_init; ++start_f plugin_start; ++start_raw_f plugin_raw_start; ++execute_f plugin_execute; ++terminate_f plugin_terminate; ++#endif ++ ++struct timeval null_timeval; ++struct timeval max_timeval; ++ ++boolean timeout_flag; ++char big_recvline[MAXTOREAD]; ++ + int + main(argc, argv) + int argc; +--- a/echoping.h ++++ b/echoping.h +@@ -118,7 +118,6 @@ + struct timeval timevalue; + }; + +-boolean timeout_flag; + struct echoping_struct { + boolean udp; /* Use the UDP protocol (TCP is the default) */ + boolean ttcp; +@@ -132,21 +131,21 @@ + /* Initializes the plugin with its arguments. Returns the port name or number or NULL if the plugin wants to use the raw interface. */ + typedef char *(*init_f) (const int argc, const char **argv, + const echoping_options global_options); +-init_f plugin_init; ++extern init_f plugin_init; + typedef void (*start_f) (struct addrinfo *); +-start_f plugin_start; ++extern start_f plugin_start; + typedef void (*start_raw_f) (); +-start_raw_f plugin_raw_start; ++extern start_raw_f plugin_raw_start; + typedef int (*execute_f) (); +-execute_f plugin_execute; ++extern execute_f plugin_execute; + typedef void (*terminate_f) (); +-terminate_f plugin_terminate; ++extern terminate_f plugin_terminate; + #endif + + #endif + +-struct timeval null_timeval; +-struct timeval max_timeval; ++extern struct timeval null_timeval; ++extern struct timeval max_timeval; + + #define ECHO_TCP_PORT "echo" + #define DISCARD_TCP_PORT "discard" +@@ -169,9 +168,9 @@ + + #define CHARGENERATED " !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefg"; + +-char *server; ++extern char *server; + #ifdef LIBIDN +-char *locale_server, *ace_server, *utf8_server; ++extern char *locale_server, *ace_server, *utf8_server; + #endif + + /* My functions */ +@@ -230,6 +229,9 @@ + + extern boolean timeout_flag; + ++extern char big_recvline[MAXTOREAD]; ++ ++ + #include "compilation.h" + + #ifndef HEADER_INCLUDED +--- a/http.c ++++ b/http.c +@@ -6,8 +6,6 @@ + #include "HTParse.h" + + +-char big_recvline[MAXTOREAD]; +- + char * + make_http_sendline(char *url, char *host, int port, int nocache) + { +--- a/smtp.c ++++ b/smtp.c +@@ -8,8 +8,6 @@ + + #ifdef SMTP + +-char big_recvline[MAXTOREAD]; +- + int + smtp_read_response_from_server(FILE * fs) + { diff --git a/net-analyzer/echoping/files/echoping-6.0.2_p434-gnutls_certificate_type_set_priority.patch b/net-analyzer/echoping/files/echoping-6.0.2_p434-gnutls_certificate_type_set_priority.patch new file mode 100644 index 000000000000..0cb219f254cb --- /dev/null +++ b/net-analyzer/echoping/files/echoping-6.0.2_p434-gnutls_certificate_type_set_priority.patch @@ -0,0 +1,11 @@ +--- a/echoping.c ++++ b/echoping.c +@@ -981,8 +981,6 @@ + if (tls_result != 0) + err_sys("Cannot create a new TLS session"); + gnutls_set_default_priority(session); +- gnutls_certificate_type_set_priority(session, +- cert_type_priority); + gnutls_credentials_set(session, GNUTLS_CRD_CERTIFICATE, xcred); + gnutls_transport_set_ptr(session, (gnutls_transport_ptr) + (long) sockfd); diff --git a/net-analyzer/echoping/files/echoping-6.0.2_p434-gnutls_session.patch b/net-analyzer/echoping/files/echoping-6.0.2_p434-gnutls_session.patch new file mode 100644 index 000000000000..8b87c47c7892 --- /dev/null +++ b/net-analyzer/echoping/files/echoping-6.0.2_p434-gnutls_session.patch @@ -0,0 +1,22 @@ +--- a/echoping.c ++++ b/echoping.c +@@ -134,7 +134,7 @@ + SSL *sslh = NULL; + #endif + #ifdef GNUTLS +- gnutls_session session; ++ gnutls_session_t session; + gnutls_certificate_credentials xcred; + int tls_result; + const int cert_type_priority[3] = { GNUTLS_CRT_X509, +--- a/echoping.h ++++ b/echoping.h +@@ -103,7 +103,7 @@ + SSL *ssl; + #endif + #ifdef GNUTLS +- gnutls_session tls; ++ gnutls_session_t tls; + #endif + } CHANNEL; + diff --git a/net-analyzer/echoping/metadata.xml b/net-analyzer/echoping/metadata.xml new file mode 100644 index 000000000000..2050f5184e24 --- /dev/null +++ b/net-analyzer/echoping/metadata.xml @@ -0,0 +1,19 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>netmon@gentoo.org</email> + <name>Gentoo network monitoring and analysis project</name> + </maintainer> + <use> + <flag name="http">enable support for http protocol.</flag> + <flag name="icp">enable support for ICP (used to monitor proxies).</flag> + <flag name="priority">enable socket priority support.</flag> + <flag name="smtp">enable support for SMTP protocol.</flag> + <flag name="tos">enable support for TOS (TYpe Of Service).</flag> + </use> + <upstream> + <remote-id type="sourceforge">echoping</remote-id> + </upstream> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/egressor/Manifest b/net-analyzer/egressor/Manifest new file mode 100644 index 000000000000..09b734e121f1 --- /dev/null +++ b/net-analyzer/egressor/Manifest @@ -0,0 +1 @@ +DIST egressor_release1.0.tar.gz 28746 BLAKE2B 224ffd1fb56d9088a66367bbd88ecaab83c2316b2614a2b5211e03c4ff07683f8584c46d6ab7f0b26cbcb87a3321d0d3789a22cfee994aca3df8c488c9a297e5 SHA512 dfb1ee553ccfb92429fe68df06db031e5cbca41fe4fda36961ba8121d79de03a7dc36febc5a58561c3de9b1412cc90811f5ddc8b156aab8282b0dc3c14cd7aec diff --git a/net-analyzer/egressor/egressor-1.0-r2.ebuild b/net-analyzer/egressor/egressor-1.0-r2.ebuild new file mode 100644 index 000000000000..528e269b5891 --- /dev/null +++ b/net-analyzer/egressor/egressor-1.0-r2.ebuild @@ -0,0 +1,37 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 +inherit eutils toolchain-funcs + +DESCRIPTION="tool for checking router configuration" +HOMEPAGE="http://packetfactory.openwall.net/projects/egressor/" +SRC_URI="http://packetfactory.openwall.net/projects/egressor/${PN}_release${PV}.tar.gz" + +LICENSE="egressor" +SLOT="0" +KEYWORDS="amd64 ppc x86" + +DEPEND="<net-libs/libnet-1.1 + >=net-libs/libnet-1.0.2a-r3" +RDEPEND="net-libs/libpcap + dev-perl/Net-RawIP + dev-lang/perl" + +S=${WORKDIR} + +src_prepare() { + epatch \ + "${FILESDIR}"/${PV}-libnet-1.0.patch \ + "${FILESDIR}"/${PV}-flags.patch +} + +src_compile() { + tc-export CC + emake -C client +} + +src_install() { + dobin client/egressor server/egressor_server.pl + dodoc README client/README-CLIENT server/README-SERVER +} diff --git a/net-analyzer/egressor/files/1.0-flags.patch b/net-analyzer/egressor/files/1.0-flags.patch new file mode 100644 index 000000000000..03368b05dbaa --- /dev/null +++ b/net-analyzer/egressor/files/1.0-flags.patch @@ -0,0 +1,22 @@ +--- a/client/Makefile ++++ b/client/Makefile +@@ -5,8 +5,8 @@ + #---------------------------------------------------------------------- + + +-CC = gcc +-CFLAGS = -O3 -funroll-loops -fomit-frame-pointer -Wall -DMD=5 ++CC ?= gcc ++CFLAGS += -Wall -DMD=5 + #CFLAGS2 = -O -DMD=5 + OBJECTS = egressor.o md5c.o \ + +@@ -21,7 +21,7 @@ + + + egressor: egressor.o md5c.o +- $(CC) egressor.o $(LIBS) -o ./egressor ++ $(CC) $(CFLAGS) $(LDFLAGS) egressor.o $(LIBS) -o ./egressor + + md5c.o: global.h md5.h + $(CC) -c $(CFLAGS) md5c.c diff --git a/net-analyzer/egressor/files/1.0-libnet-1.0.patch b/net-analyzer/egressor/files/1.0-libnet-1.0.patch new file mode 100644 index 000000000000..be7cb4f15c6f --- /dev/null +++ b/net-analyzer/egressor/files/1.0-libnet-1.0.patch @@ -0,0 +1,10 @@ +--- a/client/Makefile ++++ b/client/Makefile +@@ -15 +15 @@ +-LIBS = -L../../lib/ -lnet ++LIBS = -L../../lib/ -lnet-1.0 +--- a/client/libnet_test.h ++++ b/client/libnet_test.h +@@ -36 +36 @@ +-#include <libnet.h> ++#include <libnet-1.0.h> diff --git a/net-analyzer/egressor/metadata.xml b/net-analyzer/egressor/metadata.xml new file mode 100644 index 000000000000..503e33c4cc0b --- /dev/null +++ b/net-analyzer/egressor/metadata.xml @@ -0,0 +1,10 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<maintainer type="project"> + <email>netmon@gentoo.org</email> + <name>Gentoo network monitoring and analysis project</name> +</maintainer> +<longdescription>tool for checking router configuration</longdescription> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/etherape/Manifest b/net-analyzer/etherape/Manifest new file mode 100644 index 000000000000..de03725a103a --- /dev/null +++ b/net-analyzer/etherape/Manifest @@ -0,0 +1,3 @@ +DIST etherape-0.9.14.tar.gz 1438255 BLAKE2B a34ca77cc8862b3de50ca0405d7de083653fb984de85feb7c575b6eb0f340d386add9c851cdd54d8cf5d3d1c3cdddb1c7522673687d94b30f2ab0f91d4251613 SHA512 26e018e49bbea9baf8b4056798e2acab1ad1aba51022ab1258d31499d612a7b12567c4d671da45f79785fbe3c1eda6698b4fe201b055e71e13c9f9b0275c91e3 +DIST etherape-0.9.18.tar.gz 1436265 BLAKE2B b9f3fd625369fdf6790bef75cc97effd3e1a6eec0635472752daf420c890d4a5231bd1baff6ee58937ad27e1d96eaae5b79cc2f9a2b6eeeb7c957d08cbc8f667 SHA512 0ed19966451f9e9b5f5754018d485e7dc59005657ceddf8a75e790c4b7fbf3c8eea56354cf490ec27e18c4bc14c5b3fe648c90facc471dfb14b52ea68abc37d3 +DIST etherape-0.9.19.tar.gz 1452435 BLAKE2B d80d0d0eceeff67890d6a992551a136bfdcd3de005468d7d09eccc94ddf472209738c29d06a321116c90da1a31be0349f80dbee73d3297eae3e02588afea4e94 SHA512 3819c36a6ea5b1ec6fc675563ab0264d180824343344bf4f2da834db39547b721c1565b6edb882d55ce4e0ca93e4b34e3a544996a988584aaf7fe8b8d5ca265e diff --git a/net-analyzer/etherape/etherape-0.9.14.ebuild b/net-analyzer/etherape/etherape-0.9.14.ebuild new file mode 100644 index 000000000000..bc2c11074e7a --- /dev/null +++ b/net-analyzer/etherape/etherape-0.9.14.ebuild @@ -0,0 +1,26 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 +inherit gnome2 + +DESCRIPTION="A graphical network monitor for Unix modeled after etherman" +HOMEPAGE="http://etherape.sourceforge.net/" +SRC_URI="mirror://sourceforge/etherape/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="amd64 ppc ppc64 sparc x86" + +RDEPEND=" + >=gnome-base/libglade-2.0 + >=gnome-base/libgnomeui-2.0 + gnome-base/libgnomecanvas[glade] + net-libs/libpcap +" +DEPEND="${RDEPEND} + >=sys-devel/gettext-0.11.5 + app-text/docbook-xml-dtd:4.1.2 + app-text/gnome-doc-utils + virtual/pkgconfig +" diff --git a/net-analyzer/etherape/etherape-0.9.18.ebuild b/net-analyzer/etherape/etherape-0.9.18.ebuild new file mode 100644 index 000000000000..1cfcbd672427 --- /dev/null +++ b/net-analyzer/etherape/etherape-0.9.18.ebuild @@ -0,0 +1,26 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +DESCRIPTION="A graphical network monitor for Unix modeled after etherman" +HOMEPAGE="http://etherape.sourceforge.net/" +SRC_URI="mirror://sourceforge/etherape/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~ppc ~ppc64 ~sparc ~x86" + +RDEPEND=" + dev-libs/glib:2 + dev-libs/popt + net-libs/libpcap + x11-libs/goocanvas:2.0 +" +DEPEND=" + ${RDEPEND} + >=sys-devel/gettext-0.11.5 + app-text/docbook-xml-dtd:4.1.2 + app-text/yelp-tools + virtual/pkgconfig +" diff --git a/net-analyzer/etherape/etherape-0.9.19.ebuild b/net-analyzer/etherape/etherape-0.9.19.ebuild new file mode 100644 index 000000000000..dbe8b6a2a0f0 --- /dev/null +++ b/net-analyzer/etherape/etherape-0.9.19.ebuild @@ -0,0 +1,26 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +DESCRIPTION="A graphical network monitor for Unix modeled after etherman" +HOMEPAGE="https://etherape.sourceforge.io/" +SRC_URI="mirror://sourceforge/etherape/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="amd64 ppc ppc64 sparc ~x86" + +RDEPEND=" + dev-libs/glib:2 + dev-libs/popt + net-libs/libpcap + x11-libs/goocanvas:2.0 +" +DEPEND=" + ${RDEPEND} + >=sys-devel/gettext-0.11.5 + app-text/docbook-xml-dtd:4.1.2 + app-text/yelp-tools + virtual/pkgconfig +" diff --git a/net-analyzer/etherape/metadata.xml b/net-analyzer/etherape/metadata.xml new file mode 100644 index 000000000000..fa9fdc7668ce --- /dev/null +++ b/net-analyzer/etherape/metadata.xml @@ -0,0 +1,20 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>netmon@gentoo.org</email> + <name>Gentoo network monitoring and analysis project</name> + </maintainer> + <longdescription lang="en"> + EtherApe is a graphical network monitor for Unix modeled after etherman. + Featuring link layer, ip and TCP modes, it displays network activity + graphically. Hosts and links change in size with traffic. Color coded + protocols display. It supports Ethernet, FDDI, Token Ring, ISDN, PPP + and SLIP devices. It can filter traffic to be shown, and can read + traffic from a file as well as live from the network. + </longdescription> + <upstream> + <remote-id type="sourceforge">etherape</remote-id> + </upstream> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/ethloop/Manifest b/net-analyzer/ethloop/Manifest new file mode 100644 index 000000000000..9e1c0e8b055f --- /dev/null +++ b/net-analyzer/ethloop/Manifest @@ -0,0 +1 @@ +DIST ethloop10.tgz 3912 BLAKE2B 4cd0ad93693afb2302627b9fcbefa94eefec3d29c55e583c5126aed9cfb20aa7a2d68834fa138debaf767972e7e898245d7297567b322953e1df03b3817a5609 SHA512 82ac0114d0d539f5c057101e1e1f0e2eac32e0bd482bd62e6305f7c4863d0776dcff7bc85167dbcfb136d0b430c9008241c2c0250713beb2703cb052b9b71e63 diff --git a/net-analyzer/ethloop/ethloop-10-r3.ebuild b/net-analyzer/ethloop/ethloop-10-r3.ebuild new file mode 100644 index 000000000000..d49ae392f80f --- /dev/null +++ b/net-analyzer/ethloop/ethloop-10-r3.ebuild @@ -0,0 +1,29 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +inherit eutils toolchain-funcs + +DESCRIPTION="Local simulator for testing Linux QoS disciplines" +HOMEPAGE="http://luxik.cdi.cz/~devik/qos/ethloop/" +SRC_URI="http://luxik.cdi.cz/~devik/qos/ethloop/ethloop10.tgz" + +LICENSE="all-rights-reserved" +SLOT="0" +KEYWORDS="~amd64 ~ppc x86" +RESTRICT="mirror bindist" + +S=${WORKDIR}/${PN} + +src_prepare() { + epatch "${FILESDIR}"/${P}-gcc45.patch +} + +src_compile() { + emake CC=$(tc-getCC) CFLAGS="${CFLAGS}" +} + +src_install() { + dosbin ethloop +} diff --git a/net-analyzer/ethloop/ethloop-10-r4.ebuild b/net-analyzer/ethloop/ethloop-10-r4.ebuild new file mode 100644 index 000000000000..4067bea8c944 --- /dev/null +++ b/net-analyzer/ethloop/ethloop-10-r4.ebuild @@ -0,0 +1,27 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +inherit toolchain-funcs + +DESCRIPTION="Local simulator for testing Linux QoS disciplines" +HOMEPAGE="http://luxik.cdi.cz/~devik/qos/ethloop/" +SRC_URI="http://luxik.cdi.cz/~devik/qos/${PN}/${PN}${PV}.tgz" + +LICENSE="all-rights-reserved" +SLOT="0" +KEYWORDS="~amd64 ~ppc ~x86" +RESTRICT="mirror bindist" + +S=${WORKDIR}/${PN} +PATCHES=( + "${FILESDIR}"/${P}-misc.patch +) + +src_compile() { + emake CC=$(tc-getCC) CFLAGS="${CFLAGS}" +} + +src_install() { + dosbin ethloop +} diff --git a/net-analyzer/ethloop/files/ethloop-10-gcc45.patch b/net-analyzer/ethloop/files/ethloop-10-gcc45.patch new file mode 100644 index 000000000000..bf905cd44b2c --- /dev/null +++ b/net-analyzer/ethloop/files/ethloop-10-gcc45.patch @@ -0,0 +1,32 @@ +Fix recv call (bug #336755), add some more includes. + +--- a/ethloop.c ++++ b/ethloop.c +@@ -1,5 +1,7 @@ + /* vim: cin sw=4 ts=4 + */ ++#include <arpa/inet.h> /* htons() */ ++#include <sys/types.h> /* recv() */ + #include <sys/socket.h> + #include <sys/ioctl.h> + #include <sys/poll.h> +@@ -13,6 +15,7 @@ + #include <stdlib.h> + #include <sys/time.h> + #include <signal.h> ++#include <string.h> + + int sock; + +@@ -133,9 +136,9 @@ + int recv_raw(int tmo) + { + struct pollfd pf = {sock,POLLIN,0}; +- int r; unsigned short proto; ++ ssize_t r; unsigned short proto; + if(poll(&pf,1,tmo) <= 0) return 0; +- r = recv(sock,&buf,1550,0); ++ r = recv(sock,&buf,sizeof(buf),0); + if (r <= 0) { + printf("error recv (%d)\n",r); + return 0; diff --git a/net-analyzer/ethloop/files/ethloop-10-misc.patch b/net-analyzer/ethloop/files/ethloop-10-misc.patch new file mode 100644 index 000000000000..a866386a7006 --- /dev/null +++ b/net-analyzer/ethloop/files/ethloop-10-misc.patch @@ -0,0 +1,65 @@ +--- a/ethloop.c ++++ b/ethloop.c +@@ -1,5 +1,7 @@ + /* vim: cin sw=4 ts=4 + */ ++#include <arpa/inet.h> /* htons() */ ++#include <sys/types.h> /* recv() */ + #include <sys/socket.h> + #include <sys/ioctl.h> + #include <sys/poll.h> +@@ -13,6 +15,7 @@ + #include <stdlib.h> + #include <sys/time.h> + #include <signal.h> ++#include <string.h> + + int sock; + +@@ -133,11 +136,11 @@ + int recv_raw(int tmo) + { + struct pollfd pf = {sock,POLLIN,0}; +- int r; unsigned short proto; ++ ssize_t r; + if(poll(&pf,1,tmo) <= 0) return 0; +- r = recv(sock,&buf,1550,0); ++ r = recv(sock,&buf,sizeof(buf),0); + if (r <= 0) { +- printf("error recv (%d)\n",r); ++ printf("error recv (%ld)\n",r); + return 0; + } + if (ntohs(buf.proto) != ETH_P_CUST) { +@@ -239,10 +242,10 @@ + } + } + +-main(int c,char *av[]) ++int main(int c,char *av[]) + { +- unsigned long av_k1=0,av_k2=0,t_k1=0,t_k2=0; +- unsigned long av_k3=0,av_k4=0,t_k3=0,t_k4=0; ++ unsigned long av_k1=0,av_k2=0; ++ unsigned long av_k3=0,av_k4=0; + int x,tmo,flow,diff,lcheck = 0,lwrite = 0,i,n; + struct flowtab *fp; + sock = socket(PF_PACKET,SOCK_RAW,htons(ETH_P_ALL)); +@@ -309,7 +312,7 @@ + /* write stats every .5 second */ + if (us - ALIGN(lwrite,LOGTIME) < LOGTIME) continue; + lwrite = us; +- fprintf(stderr,"store %d at %d ms\n",slog_cnt,us/1000); ++ fprintf(stderr,"store %d at %ld ms\n",slog_cnt,us/1000); + for (fp = ftab,i=0;i<FLOWS;fp++,i++) { + stp = slog + slog_cnt; + stp->av_delay[i] = fp->av_delay/EWMAC; +@@ -338,7 +341,7 @@ + printf("%d.%d",(i+1)/2,(i&1)?0:5); + for (flow = 0; flow <= maxflow; flow++) { + fp = ftab + flow; +- printf(" %d %d %d %d",stp->av_wrate[flow], ++ printf(" %ld %ld %ld %ld",stp->av_wrate[flow], + stp->av_rate[flow], stp->av_delay[flow]/1000, + stp->av_jitter[flow]); + } diff --git a/net-analyzer/ethloop/metadata.xml b/net-analyzer/ethloop/metadata.xml new file mode 100644 index 000000000000..ea1d98ba65b8 --- /dev/null +++ b/net-analyzer/ethloop/metadata.xml @@ -0,0 +1,10 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<maintainer type="project"> + <email>netmon@gentoo.org</email> + <name>Gentoo network monitoring and analysis project</name> +</maintainer> +<longdescription>Local simulator for testing Linux QoS disciplines</longdescription> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/ettercap/Manifest b/net-analyzer/ettercap/Manifest new file mode 100644 index 000000000000..fb40201464a6 --- /dev/null +++ b/net-analyzer/ettercap/Manifest @@ -0,0 +1 @@ +DIST ettercap-0.8.3.tar.gz 8381943 BLAKE2B f49098d61f60877d3f979d7861f36dad6ec3fbfca7ed89d8f9826867145ea36daec65a1076c893f81391218688448515ef020a9cdf9a16ffddc830bacec8eb1c SHA512 1929c986d3a17ebc693ffe8531e01c66379c0ee6ea71305ea49b6a9eece84b6da1923135311db458bdb6035feb593e525786e6cf4c465ced5a7683384d4a4ae7 diff --git a/net-analyzer/ettercap/ettercap-0.8.3.ebuild b/net-analyzer/ettercap/ettercap-0.8.3.ebuild new file mode 100644 index 000000000000..f49ef8cf2e4f --- /dev/null +++ b/net-analyzer/ettercap/ettercap-0.8.3.ebuild @@ -0,0 +1,75 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit cmake-utils + +DESCRIPTION="A suite for man in the middle attacks" +HOMEPAGE="https://github.com/Ettercap/ettercap" + +LICENSE="GPL-2+" +SLOT="0" + +if [[ ${PV} == "9999" ]] ; then + inherit git-r3 + EGIT_REPO_URI="https://github.com/Ettercap/${PN}.git" +else + SRC_URI="https://github.com/Ettercap/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" + KEYWORDS="~alpha amd64 arm ppc ppc64 sparc x86" +fi + +IUSE="doc geoip gtk ipv6 libressl ncurses +plugins test" +RESTRICT="!test? ( test )" + +RDEPEND="dev-libs/libbsd + dev-libs/libpcre + !libressl? ( dev-libs/openssl:0= ) + libressl? ( dev-libs/libressl:0= ) + net-libs/libnet:1.1 + >=net-libs/libpcap-0.8.1 + sys-libs/zlib + geoip? ( dev-libs/geoip ) + gtk? ( + >=dev-libs/atk-1.2.4 + >=dev-libs/glib-2.2.2:2 + media-libs/freetype + x11-libs/cairo + x11-libs/gdk-pixbuf:2 + >=x11-libs/gtk+-2.2.2:2 + >=x11-libs/pango-1.2.3 + ) + ncurses? ( >=sys-libs/ncurses-5.3:= ) + plugins? ( >=net-misc/curl-7.26.0 )" +DEPEND="${RDEPEND} + doc? ( app-text/ghostscript-gpl + sys-apps/groff ) + test? ( dev-libs/check ) + sys-devel/flex + virtual/yacc" +PATCHES=( + "${FILESDIR}"/${PN}-0.8.3-fno-common.patch +) + +src_prepare() { + sed -i "s:Release:Release Gentoo:" CMakeLists.txt || die + cmake-utils_src_prepare +} + +src_configure() { + local mycmakeargs=( + -DENABLE_CURSES="$(usex ncurses)" + -DENABLE_GTK="$(usex gtk)" + -DENABLE_PLUGINS="$(usex plugins)" + -DENABLE_IPV6="$(usex ipv6)" + -DENABLE_TESTS="$(usex test)" + -DENABLE_PDF_DOCS="$(usex doc)" + -DENABLE_GEOIP="$(usex geoip)" + -DBUNDLED_LIBS=OFF + -DSYSTEM_LIBS=ON + -DINSTALL_SYSCONFDIR="${EPREFIX}"/etc + ) + #right now we only support gtk2, but ettercap also supports gtk3 + #do we care? do we want to support both? + cmake-utils_src_configure +} diff --git a/net-analyzer/ettercap/ettercap-9999.ebuild b/net-analyzer/ettercap/ettercap-9999.ebuild new file mode 100644 index 000000000000..047be22f8f4c --- /dev/null +++ b/net-analyzer/ettercap/ettercap-9999.ebuild @@ -0,0 +1,73 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +inherit cmake-utils + +DESCRIPTION="A suite for man in the middle attacks" +HOMEPAGE="https://github.com/Ettercap/ettercap" + +LICENSE="GPL-2+" +SLOT="0" + +if [[ ${PV} == "9999" ]] ; then + inherit git-r3 + EGIT_REPO_URI="https://github.com/Ettercap/${PN}.git" +else + SRC_URI="https://github.com/Ettercap/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" #mirror does not work + KEYWORDS="~alpha ~amd64 ~arm ~ppc ~ppc64 ~sparc ~x86" +fi + +IUSE="doc gtk ipv6 libressl ncurses +plugins test" +RESTRICT="!test? ( test )" + +RDEPEND="dev-libs/libbsd + dev-libs/libpcre + !libressl? ( dev-libs/openssl:0= ) + libressl? ( dev-libs/libressl:0= ) + net-libs/libnet:1.1 + >=net-libs/libpcap-0.8.1 + sys-libs/zlib + gtk? ( + >=dev-libs/atk-1.2.4 + >=dev-libs/glib-2.2.2:2 + media-libs/freetype + x11-libs/cairo + x11-libs/gdk-pixbuf:2 + >=x11-libs/gtk+-2.2.2:2 + >=x11-libs/pango-1.2.3 + ) + ncurses? ( >=sys-libs/ncurses-5.3:= ) + plugins? ( >=net-misc/curl-7.26.0 )" +DEPEND="${RDEPEND} + doc? ( app-text/ghostscript-gpl + sys-apps/groff ) + test? ( dev-libs/check ) + sys-devel/flex + virtual/yacc" +PATCHES=( + "${FILESDIR}"/${PN}-0.8.3-fno-common.patch +) + +src_prepare() { + sed -i "s:Release:Release Gentoo:" CMakeLists.txt || die + cmake-utils_src_prepare +} + +src_configure() { + local mycmakeargs=( + -DENABLE_CURSES="$(usex ncurses)" + -DENABLE_GTK="$(usex gtk)" + -DENABLE_PLUGINS="$(usex plugins)" + -DENABLE_IPV6="$(usex ipv6)" + -DENABLE_TESTS="$(usex test)" + -DENABLE_PDF_DOCS="$(usex doc)" + -DBUNDLED_LIBS=OFF + -DSYSTEM_LIBS=ON + -DINSTALL_SYSCONFDIR="${EROOT}"etc + ) + #right now we only support gtk2, but ettercap also supports gtk3 + #do we care? do we want to support both? + cmake-utils_src_configure +} diff --git a/net-analyzer/ettercap/files/ettercap-0.8.3-fno-common.patch b/net-analyzer/ettercap/files/ettercap-0.8.3-fno-common.patch new file mode 100644 index 000000000000..eddca836905f --- /dev/null +++ b/net-analyzer/ettercap/files/ettercap-0.8.3-fno-common.patch @@ -0,0 +1,22 @@ +--- a/include/ec_threads.h ++++ b/include/ec_threads.h +@@ -12,7 +12,7 @@ + }; + + /* a value to be used to return errors in fuctcions using pthread_t values */ +-pthread_t EC_PTHREAD_NULL; ++extern pthread_t EC_PTHREAD_NULL; + #define EC_PTHREAD_SELF EC_PTHREAD_NULL + #define PTHREAD_ID(id) (*(unsigned long*)&(id)) + +--- a/src/ec_threads.c ++++ b/src/ec_threads.c +@@ -46,6 +46,8 @@ + #define INIT_LOCK do{ DEBUG_MSG("thread_init_lock"); pthread_mutex_lock(&init_mtx); } while(0) + #define INIT_UNLOCK do{ DEBUG_MSG("thread_init_unlock"); pthread_mutex_unlock(&init_mtx); } while(0) + ++pthread_t EC_PTHREAD_NULL; ++ + /* protos... */ + + pthread_t ec_thread_detached(char *name, char *desc, void *(*function)(void *), void *args, int detached); diff --git a/net-analyzer/ettercap/metadata.xml b/net-analyzer/ettercap/metadata.xml new file mode 100644 index 000000000000..b2db7908df43 --- /dev/null +++ b/net-analyzer/ettercap/metadata.xml @@ -0,0 +1,23 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>zerochaos@gentoo.org</email> + <name>Rick Farina</name> + </maintainer> + <maintainer type="person"> + <email>ago@gentoo.org</email> + <name>Agostino Sarubbo</name> + </maintainer> + <maintainer type="project"> + <email>netmon@gentoo.org</email> + <name>Gentoo network monitoring and analysis project</name> + </maintainer> + <use> + <flag name="plugins">Install ettercap plugins (et_*.so)</flag> + </use> + <upstream> + <remote-id type="github">Ettercap/ettercap</remote-id> + </upstream> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/fail2ban/Manifest b/net-analyzer/fail2ban/Manifest new file mode 100644 index 000000000000..fc0170a8a297 --- /dev/null +++ b/net-analyzer/fail2ban/Manifest @@ -0,0 +1 @@ +DIST fail2ban-0.11.1.tar.gz 538660 BLAKE2B c88765ac3f49c19e0570248891814c647f2c3515290982de21c7b6c377508189fa53182fca84d62f61b231e250395992e8cf06cc61394dd41150f02d8a254f8b SHA512 019b088aa6375f98742ed101ef6f65adabca3324444d71d5b8597a8d1d22fa76b9f503660f0498643fe24a3b8e4368de916072a1ab77b8e2ea3eda41c3e0c8c6 diff --git a/net-analyzer/fail2ban/fail2ban-0.11.1-r2.ebuild b/net-analyzer/fail2ban/fail2ban-0.11.1-r2.ebuild new file mode 100644 index 000000000000..f71bda0473e8 --- /dev/null +++ b/net-analyzer/fail2ban/fail2ban-0.11.1-r2.ebuild @@ -0,0 +1,111 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +PYTHON_COMPAT=( python3_{6,7,8} ) +DISTUTILS_SINGLE_IMPL=1 + +inherit bash-completion-r1 distutils-r1 systemd + +DESCRIPTION="scans log files and bans IPs that show malicious signs" +HOMEPAGE="https://www.fail2ban.org/" +SRC_URI="https://github.com/${PN}/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha amd64 arm hppa ppc ppc64 sparc x86" +IUSE="selinux systemd" + +RDEPEND=" + virtual/logger + virtual/mta + selinux? ( sec-policy/selinux-fail2ban ) + systemd? ( $(python_gen_cond_dep '|| ( + dev-python/python-systemd[${PYTHON_MULTI_USEDEP}] + sys-apps/systemd[python(-),${PYTHON_MULTI_USEDEP}] + )' 'python*' ) ) +" + +RESTRICT="test" +DOCS=( ChangeLog DEVELOP README.md THANKS TODO doc/run-rootless.txt ) + +python_prepare_all() { + default + + # Replace /var/run with /run, but not in the top source directory + find . -mindepth 2 -type f -exec \ + sed -i -e 's|/var\(/run/fail2ban\)|\1|g' {} + || die + + sed -i -e 's|runscript|openrc-run|g' files/gentoo-initd || die + + distutils-r1_python_prepare_all +} + +python_compile() { + if python_is_python3; then + ./fail2ban-2to3 || die + fi + distutils-r1_python_compile +} + +python_install_all() { + distutils-r1_python_install_all + + rm -rf "${D}"/usr/share/doc/${PN} "${D}"/run || die + + # not FILESDIR + newconfd files/gentoo-confd ${PN} + newinitd files/gentoo-initd ${PN} + sed -e "s:@BINDIR@:${EPREFIX}/usr/bin:g" files/${PN}.service.in > "${T}/${PN}.service" || die + systemd_dounit "${T}/${PN}.service" + systemd_dotmpfilesd files/${PN}-tmpfiles.conf + doman man/*.{1,5} + + # Use INSTALL_MASK if you do not want to touch /etc/logrotate.d. + # See http://thread.gmane.org/gmane.linux.gentoo.devel/35675 + insinto /etc/logrotate.d + newins files/${PN}-logrotate ${PN} + + keepdir /var/lib/${PN} + + newbashcomp files/bash-completion ${PN}-client + bashcomp_alias ${PN}-client ${PN}-server ${PN}-regex +} + +pkg_preinst() { + has_version "<${CATEGORY}/${PN}-0.7" + previous_less_than_0_7=$? +} + +pkg_postinst() { + if [[ $previous_less_than_0_7 = 0 ]] ; then + elog + elog "Configuration files are now in /etc/fail2ban/" + elog "You probably have to manually update your configuration" + elog "files before restarting Fail2ban!" + elog + elog "Fail2ban is not installed under /usr/lib anymore. The" + elog "new location is under /usr/share." + elog + elog "You are upgrading from version 0.6.x, please see:" + elog "http://www.fail2ban.org/wiki/index.php/HOWTO_Upgrade_from_0.6_to_0.8" + fi + + if ! has_version dev-python/pyinotify && ! has_version app-admin/gamin; then + elog "For most jail.conf configurations, it is recommended you install either" + elog "dev-python/pyinotify or app-admin/gamin (in order of preference)" + elog "to control how log file modifications are detected" + fi + + if ! has_version dev-lang/python[sqlite]; then + elog "If you want to use ${PN}'s persistent database, then reinstall" + elog "dev-lang/python with USE=sqlite. If you do not use the" + elog "persistent database feature, then you should set" + elog "dbfile = :memory: in fail2ban.conf accordingly." + fi + + if has_version sys-apps/systemd[-python]; then + elog "If you want to track logins through sys-apps/systemd's" + elog "journal backend, then reinstall sys-apps/systemd with USE=python" + fi +} diff --git a/net-analyzer/fail2ban/fail2ban-99999999.ebuild b/net-analyzer/fail2ban/fail2ban-99999999.ebuild new file mode 100644 index 000000000000..2fe548988a01 --- /dev/null +++ b/net-analyzer/fail2ban/fail2ban-99999999.ebuild @@ -0,0 +1,111 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +PYTHON_COMPAT=( python3_{6,7} ) +DISTUTILS_SINGLE_IMPL=1 + +inherit bash-completion-r1 distutils-r1 git-r3 systemd + +DESCRIPTION="scans log files and bans IPs that show malicious signs" +HOMEPAGE="https://www.fail2ban.org/" +EGIT_REPO_URI="https://github.com/${PN}/${PN}" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="" +IUSE="selinux systemd" + +RDEPEND=" + virtual/logger + virtual/mta + selinux? ( sec-policy/selinux-fail2ban ) + systemd? ( $(python_gen_cond_dep '|| ( + dev-python/python-systemd[${PYTHON_MULTI_USEDEP}] + sys-apps/systemd[python(-),${PYTHON_MULTI_USEDEP}] + )' 'python*' ) ) +" + +RESTRICT="test" +DOCS=( ChangeLog DEVELOP README.md THANKS TODO doc/run-rootless.txt ) + +python_prepare_all() { + default + + # Replace /var/run with /run, but not in the top source directory + find . -mindepth 2 -type f -exec \ + sed -i -e 's|/var\(/run/fail2ban\)|\1|g' {} + || die + + sed -i -e 's|runscript|openrc-run|g' files/gentoo-initd || die + + distutils-r1_python_prepare_all +} + +python_compile() { + if python_is_python3; then + ./fail2ban-2to3 || die + fi + distutils-r1_python_compile +} + +python_install_all() { + distutils-r1_python_install_all + + rm -rf "${D}"/usr/share/doc/${PN} "${D}"/run || die + + # not FILESDIR + newconfd files/gentoo-confd ${PN} + newinitd files/gentoo-initd ${PN} + sed -e "s:@BINDIR@:${EPREFIX}/usr/bin:g" files/${PN}.service.in > "${T}/${PN}.service" || die + systemd_dounit "${T}/${PN}.service" + systemd_dotmpfilesd files/${PN}-tmpfiles.conf + doman man/*.{1,5} + + # Use INSTALL_MASK if you do not want to touch /etc/logrotate.d. + # See http://thread.gmane.org/gmane.linux.gentoo.devel/35675 + insinto /etc/logrotate.d + newins files/${PN}-logrotate ${PN} + + keepdir /var/lib/${PN} + + newbashcomp files/bash-completion ${PN}-client + bashcomp_alias ${PN}-client ${PN}-server ${PN}-regex +} + +pkg_preinst() { + has_version "<${CATEGORY}/${PN}-0.7" + previous_less_than_0_7=$? +} + +pkg_postinst() { + if [[ $previous_less_than_0_7 = 0 ]] ; then + elog + elog "Configuration files are now in /etc/fail2ban/" + elog "You probably have to manually update your configuration" + elog "files before restarting Fail2ban!" + elog + elog "Fail2ban is not installed under /usr/lib anymore. The" + elog "new location is under /usr/share." + elog + elog "You are upgrading from version 0.6.x, please see:" + elog "http://www.fail2ban.org/wiki/index.php/HOWTO_Upgrade_from_0.6_to_0.8" + fi + + if ! has_version dev-python/pyinotify && ! has_version app-admin/gamin; then + elog "For most jail.conf configurations, it is recommended you install either" + elog "dev-python/pyinotify or app-admin/gamin (in order of preference)" + elog "to control how log file modifications are detected" + fi + + if ! has_version dev-lang/python[sqlite]; then + elog "If you want to use ${PN}'s persistent database, then reinstall" + elog "dev-lang/python with USE=sqlite. If you do not use the" + elog "persistent database feature, then you should set" + elog "dbfile = :memory: in fail2ban.conf accordingly." + fi + + if has_version sys-apps/systemd[-python]; then + elog "If you want to track logins through sys-apps/systemd's" + elog "journal backend, then reinstall sys-apps/systemd with USE=python" + fi +} diff --git a/net-analyzer/fail2ban/metadata.xml b/net-analyzer/fail2ban/metadata.xml new file mode 100644 index 000000000000..3e8b62cdeffb --- /dev/null +++ b/net-analyzer/fail2ban/metadata.xml @@ -0,0 +1,12 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>netmon@gentoo.org</email> + <name>Gentoo network monitoring and analysis project</name> + </maintainer> + <upstream> + <remote-id type="github">fail2ban/fail2ban</remote-id> + </upstream> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/firewalk/Manifest b/net-analyzer/firewalk/Manifest new file mode 100644 index 000000000000..ecd2dcaa1cef --- /dev/null +++ b/net-analyzer/firewalk/Manifest @@ -0,0 +1 @@ +DIST firewalk-5.0.tgz 80446 BLAKE2B 22580800fb21347fda6ff6290c0fd2f177e266778c2d6ce1087839b5484dfcf8e2ffbb415d90012d71e6d345ba4c95f888fecc902adaaa2903124605c1fcf427 SHA512 919aa6e464dac72a02f8967ccf7109de7d0b3a574f0a396bcf69bacc988ab8e13e8e25932d749eadc898cae2546f8f81014d53ef51429e6c784a16d40da90ff2 diff --git a/net-analyzer/firewalk/files/firewalk-5.0-gcc3.4.diff b/net-analyzer/firewalk/files/firewalk-5.0-gcc3.4.diff new file mode 100644 index 000000000000..925bde7b75f3 --- /dev/null +++ b/net-analyzer/firewalk/files/firewalk-5.0-gcc3.4.diff @@ -0,0 +1,11 @@ +--- a/src/firewalk.c ++++ b/src/firewalk.c +@@ -188,8 +188,6 @@ + case FW_SERIOUS_ERROR: + /* err msg set in fw_packet_capture() */ + return (FW_SERIOUS_ERROR); +- default: +- /* empty */ + } + } + } diff --git a/net-analyzer/firewalk/files/firewalk-5.0-usage.diff b/net-analyzer/firewalk/files/firewalk-5.0-usage.diff new file mode 100644 index 000000000000..dac54f558135 --- /dev/null +++ b/net-analyzer/firewalk/files/firewalk-5.0-usage.diff @@ -0,0 +1,22 @@ +--- a/include/firewalk.h ++++ b/include/firewalk.h +@@ -280,7 +280,7 @@ + /* dump usage */ + void + usage( +- u_char * /* argv[0] */ ++ char * /* argv[0] */ + ); + + #endif /* _FIREWALK_H */ +--- a/src/main.c ++++ b/src/main.c +@@ -171,7 +171,7 @@ + } + + void +-usage(u_char *argv0) ++usage(char *argv0) + { + fprintf(stderr, "Usage : %s [options] target_gateway metric\n" + "\t\t [-d %d - %d] destination port to use (ramping phase)\n" diff --git a/net-analyzer/firewalk/firewalk-5.0-r1.ebuild b/net-analyzer/firewalk/firewalk-5.0-r1.ebuild new file mode 100644 index 000000000000..e43aa7500b1c --- /dev/null +++ b/net-analyzer/firewalk/firewalk-5.0-r1.ebuild @@ -0,0 +1,33 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 +inherit eutils + +DESCRIPTION="A tool for determining a firewall's rule set" +HOMEPAGE="http://packetfactory.openwall.net/projects/firewalk/" +SRC_URI="mirror://gentoo/${P}.tgz" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="amd64 ~ppc x86" + +DEPEND=" + dev-libs/libdnet + net-libs/libnet:1.1 + net-libs/libpcap +" +RDEPEND="${DEPEND}" + +S="${WORKDIR}/Firewalk" + +DOCS=( README TODO BUGS ) + +src_prepare() { + epatch "${FILESDIR}"/${P}-gcc3.4.diff +} + +src_install() { + default + doman man/firewalk.8 +} diff --git a/net-analyzer/firewalk/firewalk-5.0-r2.ebuild b/net-analyzer/firewalk/firewalk-5.0-r2.ebuild new file mode 100644 index 000000000000..40b2b60d3a86 --- /dev/null +++ b/net-analyzer/firewalk/firewalk-5.0-r2.ebuild @@ -0,0 +1,32 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +DESCRIPTION="A tool for determining a firewall's rule set" +HOMEPAGE="http://packetfactory.openwall.net/projects/firewalk/" +SRC_URI="mirror://gentoo/${P}.tgz" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~amd64 ~ppc ~x86" + +DEPEND=" + dev-libs/libdnet + net-libs/libnet:1.1 + net-libs/libpcap +" +RDEPEND=" + ${DEPEND} +" +S=${WORKDIR}/${PN^} +DOCS=( README TODO BUGS ) +PATCHES=( + "${FILESDIR}"/${P}-gcc3.4.diff + "${FILESDIR}"/${P}-usage.diff +) + +src_install() { + default + doman man/firewalk.8 +} diff --git a/net-analyzer/firewalk/metadata.xml b/net-analyzer/firewalk/metadata.xml new file mode 100644 index 000000000000..bd13a914477c --- /dev/null +++ b/net-analyzer/firewalk/metadata.xml @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<maintainer type="project"> + <email>netmon@gentoo.org</email> + <name>Gentoo network monitoring and analysis project</name> +</maintainer> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/flent/Manifest b/net-analyzer/flent/Manifest new file mode 100644 index 000000000000..9b8f56346cb2 --- /dev/null +++ b/net-analyzer/flent/Manifest @@ -0,0 +1 @@ +DIST flent-1.3.2.tar.gz 2977251 BLAKE2B 03b4f67ec5a9a83ceee40b1cda529aaaccc162012a8de702a5c0bc58e08ec62df80e60d901bd76d3bc4c2d9cde0310ad32fcfbe458fc2b2a9cb2bdc82e9ec704 SHA512 cda7e9fffffa0b6d6e723c18e175fc844d97b8cae0299c46cbbd5ca03bd09d39d9d92c7ee72e6bda5bc27d921090ba5be747eca7a64dd4ef1f889575c18973d6 diff --git a/net-analyzer/flent/flent-1.3.2.ebuild b/net-analyzer/flent/flent-1.3.2.ebuild new file mode 100644 index 000000000000..d3d134d7af8f --- /dev/null +++ b/net-analyzer/flent/flent-1.3.2.ebuild @@ -0,0 +1,24 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +PYTHON_COMPAT=( python3_{6,7,8} ) + +inherit distutils-r1 + +DESCRIPTION="The FLExible Network Tester" +HOMEPAGE="https://flent.org/" +SRC_URI="https://github.com/tohojo/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="GPL-3" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="+qt5 +plots" + +RDEPEND="qt5? ( dev-python/PyQt5[${PYTHON_USEDEP}] ) + plots? ( dev-python/matplotlib[${PYTHON_USEDEP}] ) + net-analyzer/netperf[demo] + net-misc/iperf + net-analyzer/fping" +DEPEND="dev-python/setuptools[${PYTHON_USEDEP}]" diff --git a/net-analyzer/flent/metadata.xml b/net-analyzer/flent/metadata.xml new file mode 100644 index 000000000000..a6a2600bf757 --- /dev/null +++ b/net-analyzer/flent/metadata.xml @@ -0,0 +1,15 @@ +<?xml version='1.0' encoding='UTF-8'?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>zx2c4@gentoo.org</email> + <name>Jason A. Donenfeld</name> + </maintainer> + <use> + <flag name="plots">Enable drawing plots</flag> + </use> + <upstream> + <remote-id type="github">tohojo/flent</remote-id> + </upstream> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/flow-tools/Manifest b/net-analyzer/flow-tools/Manifest new file mode 100644 index 000000000000..946ffc26dc21 --- /dev/null +++ b/net-analyzer/flow-tools/Manifest @@ -0,0 +1 @@ +DIST flow-tools-0.68.5.1.tar.bz2 914062 BLAKE2B 8a987c1aac53a1370045ab118888c51ce2de7b8db4074432e86e701153469163870cf1cf9da9e2267ed934d240de4b4bf2391b4681012b82db7e4205207b7fa4 SHA512 ae17ba39854daa8ef3deecd3a554bb6d1fa47648cb791d8225a40bec13f65bf0692871660b2c3490d133b1251875c323d066bb0c0483eceb0707cec9b7714c57 diff --git a/net-analyzer/flow-tools/files/flow-tools-0.68.5.1-fno-common.patch b/net-analyzer/flow-tools/files/flow-tools-0.68.5.1-fno-common.patch new file mode 100644 index 000000000000..14623fa93f36 --- /dev/null +++ b/net-analyzer/flow-tools/files/flow-tools-0.68.5.1-fno-common.patch @@ -0,0 +1,42 @@ +--- ./src/acl2.h ++++ ./src/acl2.h +@@ -48,7 +48,7 @@ + #define ACL_TYPE_STD 1 + #define ACL_TYPE_EXT 2 + +-struct acl_list { ++typedef struct acl_list { + int num; /* number of entries */ + int num_std; /* number of standard acl entries */ + int num_ext; /* number of extended acl entries */ +@@ -59,6 +59,8 @@ + /* num_ext of these */ + }; + ++extern struct acl_list acl_list; ++ + struct acl_names { + int num; /* index into standard or extended list */ + char *name; /* name of this acl */ +--- a/src/aclyacc.y ++++ b/src/aclyacc.y +@@ -7,8 +7,6 @@ + unsigned char fmt_buf[32]; + unsigned char fmt_buf2[32]; + +-extern struct acl_list acl_list; +- + int x; + + %} +--- a/src/flow-filter.c ++++ b/src/flow-filter.c +@@ -56,8 +56,6 @@ + int debug; + int ip_net_only; + +-struct acl_list acl_list; +- + int yyparse (void); + void usage(void); + void yyerror(const char *msg); diff --git a/net-analyzer/flow-tools/files/flow-tools-0.68.5.1-openssl11.patch b/net-analyzer/flow-tools/files/flow-tools-0.68.5.1-openssl11.patch new file mode 100644 index 000000000000..c6b17743ce91 --- /dev/null +++ b/net-analyzer/flow-tools/files/flow-tools-0.68.5.1-openssl11.patch @@ -0,0 +1,47 @@ +diff -Nuar --exclude '*~' flow-tools-0.68.5.1.orig/lib/ftxlate.c flow-tools-0.68.5.1/lib/ftxlate.c +--- flow-tools-0.68.5.1.orig/lib/ftxlate.c 2008-01-27 12:48:49.000000000 -0800 ++++ flow-tools-0.68.5.1/lib/ftxlate.c 2018-12-29 15:18:33.739062317 -0800 +@@ -34,6 +34,14 @@ + #include <openssl/ssl.h> + #include <openssl/evp.h> + #undef free_func ++ ++/* fixup LibreSSL OpenSSL version numbering */ ++#include <openssl/opensslv.h> ++#if (defined LIBRESSL_VERSION_NUMBER && OPENSSL_VERSION_NUMBER == 0x20000000L) ++#undef OPENSSL_VERSION_NUMBER ++#define OPENSSL_VERSION_NUMBER 0x1000107fL ++#endif ++ + #endif /* HAVE_OPENSSL */ + + #include <sys/time.h> +@@ -2040,11 +2048,13 @@ + + + /* init crypto */ ++#if OPENSSL_VERSION_NUMBER < 0x10100000L + if (!(cp->cipher_ctx = (EVP_CIPHER_CTX*) malloc(sizeof(EVP_CIPHER_CTX)))) { + return -1; + } + + EVP_CIPHER_CTX_init(cp->cipher_ctx); ++#endif + + /* disable padding */ + if (!(EVP_CIPHER_CTX_set_padding(cp->cipher_ctx, 0))) { +@@ -2083,10 +2093,14 @@ + { + + #ifdef HAVE_OPENSSL ++#if OPENSSL_VERSION_NUMBER < 0x10100000L + EVP_CIPHER_CTX_cleanup(cp->cipher_ctx); + + if (cp->cipher_ctx) + free (cp->cipher_ctx); ++#else ++ EVP_CIPHER_CTX_free(cp->cipher_ctx); ++#endif + #endif /* HAVE_OPENSSL */ + + return 0; diff --git a/net-analyzer/flow-tools/files/flow-tools-0.68.5.1-run.patch b/net-analyzer/flow-tools/files/flow-tools-0.68.5.1-run.patch new file mode 100644 index 000000000000..e1b06eee7e00 --- /dev/null +++ b/net-analyzer/flow-tools/files/flow-tools-0.68.5.1-run.patch @@ -0,0 +1,22 @@ +--- a/src/flow-fanout.c ++++ b/src/flow-fanout.c +@@ -57,7 +57,7 @@ + #endif + + +-#define FANOUT_PIDFILE "/var/run/flow-fanout.pid" ++#define FANOUT_PIDFILE "/run/flow-fanout.pid" + + #define SELECT_TIMEOUT 5 /* 5 seconds */ + +--- a/src/flow-capture.c ++++ b/src/flow-capture.c +@@ -61,7 +61,7 @@ + + void fterr_exit_handler(int code); + +-#define CAPTURE_PIDFILE "/var/run/flow-capture.pid" ++#define CAPTURE_PIDFILE "/run/flow-capture.pid" + + #define SELECT_TIMEOUT 1 /* 1 second */ + diff --git a/net-analyzer/flow-tools/files/flow-tools-0.68.5.1-syslog.patch b/net-analyzer/flow-tools/files/flow-tools-0.68.5.1-syslog.patch new file mode 100644 index 000000000000..cb17471072bc --- /dev/null +++ b/net-analyzer/flow-tools/files/flow-tools-0.68.5.1-syslog.patch @@ -0,0 +1,47 @@ +--- a/lib/fterr.c ++++ b/lib/fterr.c +@@ -112,7 +112,7 @@ + fprintf(((fterr_file) ? fterr_file : stderr), "%s\n", buf2); + + if (fterr_flags & FTERR_SYSLOG) +- syslog(LOG_INFO, buf); ++ syslog(LOG_INFO, "%s", buf); + + } /* fterr_info */ + +@@ -134,7 +134,7 @@ + + if (fterr_flags & FTERR_SYSLOG) { + snprintf(buf2, 1024, "%s: %s", buf, strerror(errno)); +- syslog(LOG_INFO, buf2); ++ syslog(LOG_INFO, "%s", buf2); + } + + if (fterr_exit) +@@ -159,7 +159,7 @@ + } + + if (fterr_flags & FTERR_SYSLOG) +- syslog(LOG_INFO, buf); ++ syslog(LOG_INFO, "%s", buf); + + if (fterr_exit) + fterr_exit(code); +@@ -183,7 +183,7 @@ + } + + if (fterr_flags & FTERR_SYSLOG) +- syslog(LOG_INFO, buf); ++ syslog(LOG_INFO, "%s", buf); + + } /* fterr_warnx */ + +@@ -205,7 +205,7 @@ + + if (fterr_flags & FTERR_SYSLOG) { + snprintf(buf2, 1024, "%s: %s", buf, strerror(errno)); +- syslog(LOG_INFO, buf2); ++ syslog(LOG_INFO, "%s", buf2); + } + + } /* fterr_warn */ diff --git a/net-analyzer/flow-tools/files/flowcapture.confd b/net-analyzer/flow-tools/files/flowcapture.confd new file mode 100644 index 000000000000..e926d64a8eec --- /dev/null +++ b/net-analyzer/flow-tools/files/flowcapture.confd @@ -0,0 +1,51 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# Config file for /etc/init.d/flowcap + +# This is the default and should be left unless you know what you are doing +FLOW_VER=5 + +# local ip. if configured flow-capture will only ps flows sent to this ip. +LOCALIP=0 + +# You probably don't want to change this, but in case you do - nest level +NEST=0 + +# port to listen on +PORT=2055 + +# remote ip. If this is configured only flows from this exporter will be accepted +# by default we will accept any flows sent to us +REMOTEIP=0 + +# program used to rotate +ROTATE_PROG="/var/lib/flows/bin/linkme" + +# number of rotations per day +ROTATIONS=287 + +# Retain the maximum number of files so that the total storage is less than SIZE +# The letters b,K,M,G can be used as multipliers, ie 16 Megabytes is 16M. +SIZE=1G + +# interval in mins at which flowscan will print out stats in logs +#STAT_INT=5 +# NOTE: with versions of flow-tools >=0.67 there is a bug that will cause a loop if you specify the STAT_INT +# Only use that variable if you using an older flow-tools (and consequently a custom built ebuild as this config file is not in our older ebuilds) + +# dir we will be saving flows and working in +WORKDIR=/var/lib/flows/ft + +# user to run as +USER=flows + +# Pidfile base +# The daemon takes the pidfile argument and APPENDS .$PORT itself in writing. +# It may have multiple children by original design, but this is not recommended +# for Gentoo at this time. +PIDFILE_BASE=${PIDFILE_BASE:=/run/flows/flowcapture.pid} + +# This pulls in the options above +FLOW_OPTS="-p $PIDFILE_BASE -w $WORKDIR $LOCALIP/$REMOTEIP/$PORT -V $FLOW_VER -E $SIZE -n $ROTATIONS -N $NEST -R $ROTATE_PROG" +# Use below only if you have sorted out the STAT_INT problem +#FLOW_OPTS="-p /run/flows/flowcapture.pid.$PORT -w $WORKDIR $LOCALIP/$REMOTEIP/$PORT -S $STAT_INT -V $FLOW_VER -E $SIZE -n $ROTATIONS -N $NEST -R $ROTATE_PROG" diff --git a/net-analyzer/flow-tools/files/flowcapture.initd b/net-analyzer/flow-tools/files/flowcapture.initd new file mode 100644 index 000000000000..c6fc34728799 --- /dev/null +++ b/net-analyzer/flow-tools/files/flowcapture.initd @@ -0,0 +1,30 @@ +#!/sbin/openrc-run +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +PORT=${PORT:=2055} +# The daemon takes the pidfile argument and APPENDS .$PORT itself in writing. +# It may have multiple children by original design, but this is not recommended +# for Gentoo at this time. +PIDFILE_BASE=${PIDFILE_BASE:=/run/flows/flowcapture.pid} +PIDFILE=${PIDFILE:=${PIDFILE_BASE}.${PORT}} + +depend() { + use net +} + +start() { + ebegin "Starting flow-capture" + checkpath -d -o flows /run/flows + start-stop-daemon --start --user ${USER} --exec /usr/bin/flow-capture \ + --pidfile ${PIDFILE} \ + -- ${FLOW_OPTS} >/dev/null 2>&1 + eend $? +} + +stop() { + ebegin "Stopping flow-capture" + start-stop-daemon --stop --quiet --exec /usr/bin/flow-capture \ + --pidfile ${PIDFILE} + eend $? +} diff --git a/net-analyzer/flow-tools/files/linkme b/net-analyzer/flow-tools/files/linkme new file mode 100644 index 000000000000..4f666d903d42 --- /dev/null +++ b/net-analyzer/flow-tools/files/linkme @@ -0,0 +1,15 @@ +#!/usr/bin/perl + +$base = "/var/lib/flows"; +if ($ARGV[0] =~ /.*[\/]*(ft-v05[^\/]*$)/) { +$fileName = $1; +} else { +print "Must specify file\n"; +exit 1; +} + +unless ( symlink("$base/ft/$fileName","$base/$fileName") ) { +print "Unable to create symbolic link: $base/$fileName\n"; +exit 1; +} + diff --git a/net-analyzer/flow-tools/flow-tools-0.68.5.1-r10.ebuild b/net-analyzer/flow-tools/flow-tools-0.68.5.1-r10.ebuild new file mode 100644 index 000000000000..8656ded05688 --- /dev/null +++ b/net-analyzer/flow-tools/flow-tools-0.68.5.1-r10.ebuild @@ -0,0 +1,79 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +inherit user + +DESCRIPTION="library and programs to process reports from NetFlow data" +HOMEPAGE="https://code.google.com/p/flow-tools/" +SRC_URI="https://${PN}.googlecode.com/files/${P}.tar.bz2" + +LICENSE="BSD GPL-2" +SLOT="0" +KEYWORDS="amd64 ppc x86" +IUSE="debug libressl mysql postgres ssl static-libs" + +RDEPEND="sys-apps/tcp-wrappers + sys-libs/zlib + mysql? ( dev-db/mysql-connector-c:0= ) + postgres? ( dev-db/postgresql:* ) + ssl? ( + !libressl? ( dev-libs/openssl:0= ) + libressl? ( dev-libs/libressl:0= ) + )" + +DEPEND="${RDEPEND} + sys-devel/flex + sys-devel/bison" + +DOCS=( ChangeLog README SECURITY TODO ) + +PATCHES=( + "${FILESDIR}"/${P}-run.patch + "${FILESDIR}"/${P}-syslog.patch + "${FILESDIR}"/${P}-openssl11.patch + "${FILESDIR}"/${P}-fno-common.patch +) + +pkg_setup() { + pkg_douser +} + +src_configure() { + econf \ + $(use_enable static-libs static) \ + $(usex mysql --with-mysql '') \ + $(usex postgres --with-postgresql=yes --with-postgresql=no) \ + $(usex ssl --with-openssl '') \ + --sysconfdir=/etc/flow-tools +} + +src_install() { + default + + find "${D}" -name '*.la' -delete || die + + exeinto /var/lib/flows/bin + doexe "${FILESDIR}"/linkme + + keepdir /var/lib/flows/ft + + newinitd "${FILESDIR}/flowcapture.initd" flowcapture + newconfd "${FILESDIR}/flowcapture.confd" flowcapture + + fowners flows:flows /var/lib/flows + fowners flows:flows /var/lib/flows/bin + fowners flows:flows /var/lib/flows/ft + + fperms 0755 /var/lib/flows + fperms 0755 /var/lib/flows/bin +} + +pkg_preinst() { + pkg_douser +} + +pkg_douser() { + enewgroup flows + enewuser flows -1 -1 /var/lib/flows flows +} diff --git a/net-analyzer/flow-tools/metadata.xml b/net-analyzer/flow-tools/metadata.xml new file mode 100644 index 000000000000..8408ce45c9bd --- /dev/null +++ b/net-analyzer/flow-tools/metadata.xml @@ -0,0 +1,19 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>netmon@gentoo.org</email> + <name>Gentoo network monitoring and analysis project</name> + </maintainer> + <longdescription lang="en">Flow-tools is library and a collection of programs used to collect, + send, process, and generate reports from NetFlow data. The tools can be + used together on a single server or distributed to multiple servers for + large deployments. The flow-toools library provides an API for + development of custom applications for NetFlow export versions 1,5,6 and + the 14 currently defined version 8 subversions. A Perl and Python + interface have been contributed and are included in the distribution.</longdescription> + <upstream> + <remote-id type="google-code">flow-tools</remote-id> + </upstream> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/flowgrind/Manifest b/net-analyzer/flowgrind/Manifest new file mode 100644 index 000000000000..2f29d1cc110a --- /dev/null +++ b/net-analyzer/flowgrind/Manifest @@ -0,0 +1,2 @@ +DIST flowgrind-0.7.1.tar.bz2 224678 BLAKE2B e5a6759e57950b2484879f6259f9e17ae3fb5a3b49e1e27dfb6c1c89d476dbc693f29b87bf8ab4975fdde30f57dcd9c279ad6508168136b6e2ddd335bba6fc31 SHA512 fe1bc82d8b1b5bbe37989c0d8f24ba87bca73522983b855e249a3fa5e5fc96d9a63190aa94627db2b1bfea63304e453b4bc1c5fd18260fad9bda38313ad912b8 +DIST flowgrind-0.8.0.tar.bz2 298730 BLAKE2B e924c9900d24565dc025af47d57173d828eea6a0d0bce462ab1e9cb38a14b1ac14b4148797c164212473852f5c0525161766b115b5a435fbfd673dbde8e14765 SHA512 2af250da696c4d0f613191e7a2e3084b2aa1dc995665a4164324cdb2cc56af7b000b8a2f5d5e7ac8ebbad3ae0ba4fc8eb641afe65c1a842a633c19e95ba3e65a diff --git a/net-analyzer/flowgrind/flowgrind-0.7.1.ebuild b/net-analyzer/flowgrind/flowgrind-0.7.1.ebuild new file mode 100644 index 000000000000..4acc5ca2d459 --- /dev/null +++ b/net-analyzer/flowgrind/flowgrind-0.7.1.ebuild @@ -0,0 +1,25 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +DESCRIPTION="Network performance measurement tool" +HOMEPAGE="http://flowgrind.net/ https://github.com/flowgrind/flowgrind/" +SRC_URI="https://github.com/${PN}/${PN}/releases/download/${P}/${P}.tar.bz2" + +LICENSE="GPL-3" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="debug gsl pcap" + +RDEPEND="dev-libs/xmlrpc-c[abyss,curl] + gsl? ( sci-libs/gsl ) + pcap? ( net-libs/libpcap )" +DEPEND="${RDEPEND}" + +src_configure() { + econf \ + $(use_enable debug) \ + $(use_enable gsl) \ + $(use_enable pcap) +} diff --git a/net-analyzer/flowgrind/flowgrind-0.8.0.ebuild b/net-analyzer/flowgrind/flowgrind-0.8.0.ebuild new file mode 100644 index 000000000000..22232ba540d3 --- /dev/null +++ b/net-analyzer/flowgrind/flowgrind-0.8.0.ebuild @@ -0,0 +1,44 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +DESCRIPTION="Network performance measurement tool" +HOMEPAGE="http://flowgrind.net/ https://github.com/flowgrind/flowgrind/" +SRC_URI="https://github.com/${PN}/${PN}/releases/download/${P}/${P}.tar.bz2" + +LICENSE="GPL-3" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="debug doc gsl pcap" + +RDEPEND=" + sys-apps/util-linux + dev-libs/xmlrpc-c[abyss,curl] + gsl? ( sci-libs/gsl ) + pcap? ( net-libs/libpcap ) +" +DEPEND=" + ${RDEPEND} + doc? ( app-doc/doxygen ) +" + +src_configure() { + econf \ + $(use_enable debug) \ + $(use_with doc doxygen) \ + $(use_with gsl) \ + $(use_with pcap) +} + +src_compile() { + default + + use doc && emake html +} + +src_install() { + default + + use doc && dodoc -r doc/html +} diff --git a/net-analyzer/flowgrind/metadata.xml b/net-analyzer/flowgrind/metadata.xml new file mode 100644 index 000000000000..9eac0f7cfb91 --- /dev/null +++ b/net-analyzer/flowgrind/metadata.xml @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>netmon@gentoo.org</email> + <name>Gentoo network monitoring and analysis project</name> + </maintainer> + <use> + <flag name="pcap">Enable packet capturing support using <pkg>net-libs/libpcap</pkg></flag> + </use> + <upstream> + <remote-id type="github">flowgrind/flowgrind</remote-id> + </upstream> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/fping/Manifest b/net-analyzer/fping/Manifest new file mode 100644 index 000000000000..08b6cafaf00b --- /dev/null +++ b/net-analyzer/fping/Manifest @@ -0,0 +1,6 @@ +DIST fping-3.13.tar.gz 155976 BLAKE2B 6f5b825fd215a4329c35022e326df2e9dc7454b03e9a960074aef451277d2d99af23ccf451379d44a76776fec135983c7948c8bd54bde98c7f79180e59ced616 SHA512 d6c1c5b9edb97ef59cfb6d22f74f6a055e52465d3ba0f93be35b6fc9615ee08490ee927f3cf9efd087e18279519292f353abe6152061985ee166ba5f7e95e29d +DIST fping-4.0.tar.gz 170060 BLAKE2B 1142ed700a28f28ff8710b65300754139734f89123db01fa4a3772f0a804cfa58477b30ab749426be384f7e007437a82138d319ab6a702702314e24c915db44d SHA512 5dca650e9c34dd2e1bdbb981df61cf092230f07a15c4ccef105b9f58aaaa43e0d85dc9665db89631feded503ecc6f6be86446719de18e59349adb7c2f3e9757e +DIST fping-4.1.tar.gz 170851 BLAKE2B 4cad16f05afff5d1755f58be454059d1959cce1c9f50a8af1b20c34f51b3dca9b4238fd934b46ad11cb71c539c3a1f82531b44f585c774a0c28a4786105e3c0c SHA512 cd31ea336985f8d727b0db3c70213b827f0282b0c382694e10c72a89c425f2f7383d07f8f2febdc23aa246ebbf65ac9751b2404be405088963a682945edc80ba +DIST fping-4.2.tar.gz 171409 BLAKE2B 7f61d7bb06e486c327539443bfd441e494d44cdf0f949c73272e51e0867f1b39b2c3ea7df62856b493e05d9964220e03e632df839a84a15ee92168389cc55668 SHA512 2bab34dae539d942eb5e436802e6f74d57c04aa4b782f9adbd6c27830209fdb47707131f20ed966012bcec3d253c9bb3df9033a60b55bfe560af6bb1f572ee8a +DIST fping_2.4b2-to-ipv6-16.1.diff.gz 8488 BLAKE2B fe229b5042445665403f40c5a7740e024c836176a375c77440a827463adb3ed219a9c6da73375482baa81c1134764d3cfafebc44aef7596dd380e0964ff130e0 SHA512 6af25324d159df4ddd7dd909e2e1a0d85e08c2f51c31469960c2dbc7a9eb4967fd114eb87361f8c6b1691de60e7f753d371e6c902bec706f3fed3d205fbe49f0 +DIST fping_2.4b2-to-ipv6.orig.tar.gz 63333 BLAKE2B b3495c304d1108732cf5aedbf3665ce2ce50be5ca051b724e92583197f9aa7f84e41655b9c3438e0715eb8210ec79fb17a020904fa0d1cfef43f7178f622ea87 SHA512 3d1a76680d3a7cd361481d6e6de49797fbaf01422a73c784c8b667131afd56de2bfbbeb17014047cd2dea903f87d9f19e38ed7b0a5c2e8f2faf82759bf064ff9 diff --git a/net-analyzer/fping/files/fping-2.4_beta2_p161-err.h.patch b/net-analyzer/fping/files/fping-2.4_beta2_p161-err.h.patch new file mode 100644 index 000000000000..38946ac38524 --- /dev/null +++ b/net-analyzer/fping/files/fping-2.4_beta2_p161-err.h.patch @@ -0,0 +1,10 @@ +--- a/fping.c ++++ b/fping.c +@@ -106,6 +106,7 @@ + + #include <arpa/inet.h> + #include <netdb.h> ++#include <err.h> /* err() warnx() */ + + /* RS6000 has sys/select.h */ + #ifdef HAVE_SYS_SELECT_H diff --git a/net-analyzer/fping/files/fping-2.4_beta2_p161-min-time.patch b/net-analyzer/fping/files/fping-2.4_beta2_p161-min-time.patch new file mode 100644 index 000000000000..a101fd4ae0e1 --- /dev/null +++ b/net-analyzer/fping/files/fping-2.4_beta2_p161-min-time.patch @@ -0,0 +1,47 @@ +--- a/fping.c ++++ b/fping.c +@@ -25,6 +25,7 @@ + * Original author: Roland Schemers <schemers@stanford.edu> + * IPv6 Support: Jeroen Massar <jeroen@unfix.org / jeroen@ipng.nl> + * Bugfixes, byte order & senseful seq.-numbers: Stephan Fuhrmann (stephan.fuhrmann AT 1und1.de) ++ * Fixes: min_reply_i in splits and compiler warning. Alex Ghoth (alex AT ghoth.net) + * + * + * RCS header information no longer used. It has been moved to the +@@ -743,7 +744,7 @@ + + if( ( ping_data_size > MAX_PING_DATA ) || ( ping_data_size < MIN_PING_DATA ) ) + { +- fprintf( stderr, "%s: data size %u not valid, must be between %u and %u\n", ++ fprintf( stderr, "%s: data size %u not valid, must be between %lu and %u\n", + prog, ping_data_size, MIN_PING_DATA, MAX_PING_DATA ); + usage(); + +@@ -1112,7 +1113,7 @@ + ht = timeval_diff( ¤t_time, &cursor->last_send_time ); + + if( report_interval && ( loop_flag || count_flag ) && +- ( timeval_diff ( ¤t_time, &last_report_time ) > report_interval ) ) ++ ( timeval_diff ( ¤t_time, &last_report_time ) >= report_interval ) ) + { + print_per_system_splits(); + gettimeofday( ¤t_time, &tz ); +@@ -1487,8 +1488,8 @@ + }/* IF */ + + fprintf( stderr, "\n" ); +- h->num_sent_i = h->num_recv_i = h->max_reply_i = +- h->min_reply_i = h->total_time_i = 0; ++ h->num_sent_i = h->num_recv_i = h->max_reply_i = h->total_time_i = 0; ++ h->min_reply_i = 10000000; + + }/* FOR */ + +@@ -2377,6 +2378,7 @@ + p->timeout = timeout; + p->running = 1; + p->min_reply = 10000000; ++ p->min_reply_i = 10000000; + + if( strlen( p->host ) > max_hostname_len ) + max_hostname_len = strlen( p->host ); diff --git a/net-analyzer/fping/files/fping-4.1-ipv6.patch b/net-analyzer/fping/files/fping-4.1-ipv6.patch new file mode 100644 index 000000000000..7889b568a194 --- /dev/null +++ b/net-analyzer/fping/files/fping-4.1-ipv6.patch @@ -0,0 +1,15 @@ +--- a/src/fping.c ++++ b/src/fping.c +@@ -687,7 +687,11 @@ int main(int argc, char** argv) + + /* validate various option settings */ + +- if (socket4 < 0 && socket6 < 0) { ++ if (socket4 < 0 ++#ifdef IPV6 ++ && socket6 < 0 ++#endif ++ ) { + crash_and_burn("can't create socket (must run as root?)"); + } + diff --git a/net-analyzer/fping/files/fping-4.2-fno-common.patch b/net-analyzer/fping/files/fping-4.2-fno-common.patch new file mode 100644 index 000000000000..d18af66b0637 --- /dev/null +++ b/net-analyzer/fping/files/fping-4.2-fno-common.patch @@ -0,0 +1,11 @@ +--- a/src/fping.h ++++ b/src/fping.h +@@ -11,7 +11,7 @@ + void crash_and_burn( char *message ); + void errno_crash_and_burn( char *message ); + int in_cksum( unsigned short *p, int n ); +-int random_data_flag; ++extern int random_data_flag; + + /* socket.c */ + int open_ping_socket_ipv4(); diff --git a/net-analyzer/fping/files/fping-4.2-fping6-6.patch b/net-analyzer/fping/files/fping-4.2-fping6-6.patch new file mode 100644 index 000000000000..63138d3e2d2c --- /dev/null +++ b/net-analyzer/fping/files/fping-4.2-fping6-6.patch @@ -0,0 +1,21 @@ +From 6fd4f8bd91abc43f80078bdd0084cb6d2b1de7f1 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Johan=20Str=C3=B6m?= <johan@stromnet.se> +Date: Tue, 25 Jun 2019 14:03:14 +0200 +Subject: [PATCH] Do not fail if using fping6 with -6 flag + +Mostly for backwards compatability +--- + src/fping.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/src/fping.c ++++ b/src/fping.c +@@ -435,7 +435,7 @@ + break; + case '6': + #ifdef IPV6 +- if (hints_ai_family != AF_UNSPEC) { ++ if (hints_ai_family != AF_UNSPEC && hints_ai_family != AF_INET6) { + fprintf(stderr, "%s: can't specify both -4 and -6\n", prog); + exit(1); + } diff --git a/net-analyzer/fping/fping-2.4_beta2_p161-r2.ebuild b/net-analyzer/fping/fping-2.4_beta2_p161-r2.ebuild new file mode 100644 index 000000000000..23e248eb31f2 --- /dev/null +++ b/net-analyzer/fping/fping-2.4_beta2_p161-r2.ebuild @@ -0,0 +1,60 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +inherit autotools eutils flag-o-matic + +DESCRIPTION="A utility to ping multiple hosts at once" +SRC_URI=" + mirror://debian/pool/main/f/${PN}/${PN}_2.4b2-to-ipv6.orig.tar.gz + mirror://debian/pool/main/f/${PN}/${PN}_2.4b2-to-ipv6-16.1.diff.gz + " +HOMEPAGE="http://fping.sourceforge.net/ https://packages.qa.debian.org/f/fping.html" + +SLOT="0" +LICENSE="fping" +KEYWORDS="~alpha amd64 hppa ~ia64 ppc ppc64 sparc x86 ~amd64-linux ~x86-linux ~x86-macos" +IUSE="ipv6" + +S="${WORKDIR}/fping-2.4b2_to-ipv6" + +src_prepare() { + epatch \ + "${WORKDIR}"/fping_2.4b2-to-ipv6-16.1.diff \ + "${FILESDIR}"/${P}-err.h.patch \ + "${FILESDIR}"/${P}-min-time.patch + eautoreconf + + if use ipv6; then + cp -a "${S}" "${S}-6" + fi +} + +src_configure() { + econf + if use ipv6; then + cd "${S}-6" + append-flags -DIPV6 + econf + fi +} + +src_compile() { + emake + if use ipv6; then + cd "${S}-6" + emake + fi +} + +src_install() { + dosbin "${S}"/${PN} + if use ipv6; then + newsbin "${S}"-6/fping fping6 + fperms 4555 /usr/sbin/fping6 #241930 + fi + fperms 4555 /usr/sbin/fping #241930 + doman fping.8 + dodoc ChangeLog README +} diff --git a/net-analyzer/fping/fping-3.13.ebuild b/net-analyzer/fping/fping-3.13.ebuild new file mode 100644 index 000000000000..a4c4388c06a1 --- /dev/null +++ b/net-analyzer/fping/fping-3.13.ebuild @@ -0,0 +1,26 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +DESCRIPTION="A utility to ping multiple hosts at once" +HOMEPAGE="http://fping.org/" +SRC_URI="http://fping.org/dist/${P}.tar.gz" + +LICENSE="fping" +SLOT="0" +KEYWORDS="~alpha amd64 ~arm hppa ~ia64 ppc ppc64 sparc x86 ~amd64-linux ~x86-linux ~x86-macos" +IUSE="ipv6 suid" + +src_configure() { + econf $(use_enable ipv6) +} + +src_install() { + default + + if use suid ; then + fperms u+s /usr/sbin/fping + use ipv6 && fperms u+s /usr/sbin/fping6 + fi +} diff --git a/net-analyzer/fping/fping-4.0.ebuild b/net-analyzer/fping/fping-4.0.ebuild new file mode 100644 index 000000000000..82fc433b4cc2 --- /dev/null +++ b/net-analyzer/fping/fping-4.0.ebuild @@ -0,0 +1,25 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +DESCRIPTION="A utility to ping multiple hosts at once" +HOMEPAGE="http://fping.org/" +SRC_URI="http://fping.org/dist/${P}.tar.gz" + +LICENSE="fping" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux ~x86-macos" +IUSE="ipv6 suid" + +src_configure() { + econf $(use_enable ipv6) +} + +src_install() { + default + + if use suid ; then + fperms u+s /usr/sbin/fping + fi +} diff --git a/net-analyzer/fping/fping-4.1.ebuild b/net-analyzer/fping/fping-4.1.ebuild new file mode 100644 index 000000000000..0c25ab5c1df4 --- /dev/null +++ b/net-analyzer/fping/fping-4.1.ebuild @@ -0,0 +1,29 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +DESCRIPTION="A utility to ping multiple hosts at once" +HOMEPAGE="http://fping.org/" +SRC_URI="http://fping.org/dist/${P}.tar.gz" + +LICENSE="fping" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux ~x86-macos" +IUSE="ipv6 suid" + +PATCHES=( + "${FILESDIR}"/${PN}-4.1-ipv6.patch +) + +src_configure() { + econf $(use_enable ipv6) +} + +src_install() { + default + + if use suid ; then + fperms u+s /usr/sbin/fping + fi +} diff --git a/net-analyzer/fping/fping-4.2-r1.ebuild b/net-analyzer/fping/fping-4.2-r1.ebuild new file mode 100644 index 000000000000..0e1b61dd97e7 --- /dev/null +++ b/net-analyzer/fping/fping-4.2-r1.ebuild @@ -0,0 +1,36 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +inherit fcaps + +DESCRIPTION="A utility to ping multiple hosts at once" +HOMEPAGE="https://fping.org/" +SRC_URI="https://fping.org/dist/${P}.tar.gz" + +LICENSE="fping" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux ~x86-macos" +IUSE="ipv6 suid" + +FILECAPS=( cap_net_raw+ep usr/sbin/fping ) +PATCHES=( + "${FILESDIR}"/${PN}-4.2-fno-common.patch + "${FILESDIR}"/${PN}-4.2-fping6-6.patch +) + +src_configure() { + econf $(use_enable ipv6) +} + +src_install() { + default + + if use suid; then + fperms u+s /usr/sbin/fping + fi + + if use ipv6; then + dosym fping /usr/sbin/fping6 + fi +} diff --git a/net-analyzer/fping/fping-4.2.ebuild b/net-analyzer/fping/fping-4.2.ebuild new file mode 100644 index 000000000000..fff3fa9ccd77 --- /dev/null +++ b/net-analyzer/fping/fping-4.2.ebuild @@ -0,0 +1,29 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +DESCRIPTION="A utility to ping multiple hosts at once" +HOMEPAGE="https://fping.org/" +SRC_URI="https://fping.org/dist/${P}.tar.gz" + +LICENSE="fping" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux ~x86-macos" +IUSE="ipv6 suid" + +PATCHES=( + "${FILESDIR}"/${PN}-4.2-fno-common.patch +) + +src_configure() { + econf $(use_enable ipv6) +} + +src_install() { + default + + if use suid ; then + fperms u+s /usr/sbin/fping + fi +} diff --git a/net-analyzer/fping/metadata.xml b/net-analyzer/fping/metadata.xml new file mode 100644 index 000000000000..64ccd9748119 --- /dev/null +++ b/net-analyzer/fping/metadata.xml @@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>netmon@gentoo.org</email> + <name>Gentoo network monitoring and analysis project</name> + </maintainer> + <longdescription>A utility to ping multiple hosts at once</longdescription> + <upstream> + <remote-id type="sourceforge">fping</remote-id> + </upstream> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/fprobe/Manifest b/net-analyzer/fprobe/Manifest new file mode 100644 index 000000000000..0bbcd5d5901a --- /dev/null +++ b/net-analyzer/fprobe/Manifest @@ -0,0 +1 @@ +DIST fprobe-1.1.tar.bz2 104358 BLAKE2B 960fd8941ec2a7656b9eb02a0b6ae091b6ab564b4f97aa8147ce1bc3785964008168a1ac43a3fbe2e342987ee68fff711648edb910a059222017fe1282205e8e SHA512 35fa4bedf2c615093b6637630322115e12f005bc43186b86c55c6bdc76ae5308dd31e1d05632e26e07a30fba88d76b9acc98632bee4f372edcf9df5da3e32210 diff --git a/net-analyzer/fprobe/files/conf.d-fprobe b/net-analyzer/fprobe/files/conf.d-fprobe new file mode 100644 index 000000000000..a93c5c10b207 --- /dev/null +++ b/net-analyzer/fprobe/files/conf.d-fprobe @@ -0,0 +1,71 @@ +# Config file for /etc/init.d/fprobe + +# Do we want the interface in promiscous mode [yes/no] +#PROMISC=no + +# Interface +IFACE=eth0 + +# If configured, only capture packets matching this tcpdump expression +#FILTER="" + +# Flow state timers +#TIMER_EXPIRED=5 +#TIMER_FRAGMENTED=30 +#TIMER_IDLE=60 +#TIMER_ACTIVE=300 + +# This is the default and should be left unless you know what you are doing +#FLOW_VER=5 + +# local ip. if configured fprobe will use this as the source IP for sending ALL flow data +# If you want to specify a specific source address per collecter, customize it below +#LOCALIP= + +# SNMP iface id +SNMP_IFACE="${IFACE#eth}" + +# Maximum number of concurrent flows to track +# using a specified amount of memory +#MEMBULK=10000 +#MEMLIMIT= + +# Pending queue +#PENDING=100 + +# Kernel capture buffer size (kB) +#KERNBUF=1024 + +# Realtime priority [0=disabled, 1..99] +#RTPRIO=0 + +# Delay N nanoseconds after each B bytes +#DELAY="0:0" + +# How much of the start of each packet to grab +#SNAPLEN=256 + +# chroot() to this location after startup +CHROOT="/var/empty" + +# User to run as. must have perms to the pidfile directory /var/run/fprobe/ +USER=nobody + +# logging level for syslog (0=EMERG, ..., 6=INFO, 7=DEBUG) +#LOGLEVEL=6 + +# If you want to run multiple instances of fprobe, +# You MUST set this variable to a unique INTEGER for each one! +PIDFILE_ID='' + +# remote ip. this is where we send flows +REMOTEIP=127.0.0.1 +# port to listen on +PORT=2055 +# Collector type, see the manpage for valid types +TYPE='' + +# If you want multiple collectors, just specify each one here +COLLECTORS="${REMOTEIP}:${PORT}/${LOCALIP}/${TYPE}" + +# vim:ft=gentoo-conf-d: diff --git a/net-analyzer/fprobe/files/fprobe-1.1-pidfile-sanity.patch b/net-analyzer/fprobe/files/fprobe-1.1-pidfile-sanity.patch new file mode 100644 index 000000000000..c58c2a97c002 --- /dev/null +++ b/net-analyzer/fprobe/files/fprobe-1.1-pidfile-sanity.patch @@ -0,0 +1,47 @@ +If we are using the chroot() option or the setuid options, we must create the +pidfile before doing the chroot OR the setreuid. It's actually best for +start-stop-daemon if we create the pidfile from the master side of the fork() +before it exits, since most of the startup checks happen after the chroot() +unfortunetly. + +Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> + +--- a/src/fprobe.c ++++ b/src/fprobe.c +@@ -1379,7 +1379,8 @@ + + my_log_open(ident, verbosity, log_dest); + if (!(log_dest & 2)) { +- switch (fork()) { ++ pid_t childpid = fork(); ++ switch (childpid) { + case -1: + fprintf(stderr, "fork(): %s", strerror(errno)); + exit(1); +@@ -1392,6 +1393,12 @@ + break; + + default: ++ if (!(pidfile = fopen(pidfilepath, "w"))) ++ my_log(LOG_ERR, "Can't create pid file. fopen(): %s", strerror(errno)); ++ else { ++ fprintf(pidfile, "%ld\n", (long) childpid); ++ fclose(pidfile); ++ } + exit(0); + } + } else { +@@ -1548,13 +1555,6 @@ + } + } + +- if (!(pidfile = fopen(pidfilepath, "w"))) +- my_log(LOG_ERR, "Can't create pid file. fopen(): %s", strerror(errno)); +- else { +- fprintf(pidfile, "%ld\n", (long) pid); +- fclose(pidfile); +- } +- + my_log(LOG_INFO, "pid: %d", pid); + my_log(LOG_INFO, "interface: %s, datalink: %s (%d)", + dev, dlt[link_type_idx].descr, link_type); diff --git a/net-analyzer/fprobe/files/fprobe-1.1-setgroups.patch b/net-analyzer/fprobe/files/fprobe-1.1-setgroups.patch new file mode 100644 index 000000000000..803a2a9ce43a --- /dev/null +++ b/net-analyzer/fprobe/files/fprobe-1.1-setgroups.patch @@ -0,0 +1,18 @@ +This seems to fail after the chroot(), so just squelch the exit for now. + +Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> + +--- a/src/fprobe.c ++++ b/src/fprobe.c +@@ -1541,10 +1541,10 @@ + } + + if (pw) { + if (setgroups(0, NULL) < 0) { + my_log(LOG_CRIT, "setgroups: %s", strerror(errno)); +- exit(1); ++ //exit(1); + } + if (setregid(pw->pw_gid, pw->pw_gid)) { + my_log(LOG_CRIT, "setregid(%u): %s", pw->pw_gid, strerror(errno)); + exit(1); diff --git a/net-analyzer/fprobe/files/init.d-fprobe b/net-analyzer/fprobe/files/init.d-fprobe new file mode 100644 index 000000000000..c470af432c9c --- /dev/null +++ b/net-analyzer/fprobe/files/init.d-fprobe @@ -0,0 +1,41 @@ +#!/sbin/openrc-run +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +depend() { + need net +} + +BIN=/usr/sbin/fprobe +PIDFILE_EXTRA="" +[ -n "$PIDFILE_ID" ] && PIDFILE_EXTRA="[$PIDFILE_ID]" +PIDFILE="/var/run/fprobe$PIDFILE_EXTRA.pid" + +start() { + ebegin "Starting fprobe" + local OPTS="" + [ "${PROMISC}" = "yes" ] || OPTS="${OPTS} -p" + [ -n "${FILTER}" ] && OPTS="${OPTS} -f '${FILTER}'" + for optname in i:IFACE s:TIMER_EXPIRED g:TIME_FRAGMENTED d:TIMER_IDLE \ + e:TIMER_ACTIVE n:FLOW_VER a:LOCALIP x:SNMP_IFACE b:MEMBULK \ + m:MEMLIMIT q:PENDING B:KERNBUF r:RTPRIO t:DELAY S:SNAPLEN \ + c:CHROOT u:USER v:LOGLEVEL ; do + opt="${optname%:*}" optvar="${optname#*:}" + eval optvalue='$'$optvar + [ -n "$optvalue" ] && OPTS="${OPTS} -${opt} ${optvalue}" + done + OPTS="${OPTS} -l 1:${PIDFILE_ID} ${COLLECTORS}" + start-stop-daemon --start --exec $BIN \ + --pidfile ${PIDFILE} \ + -- ${OPTS} + eend $? +} + +stop() { + ebegin "Stopping fprobe" + start-stop-daemon --stop --quiet --exec $BIN \ + --pidfile ${PIDFILE} + eend $? +} + +# vim:ft=gentoo-init-d: diff --git a/net-analyzer/fprobe/fprobe-1.1-r3.ebuild b/net-analyzer/fprobe/fprobe-1.1-r3.ebuild new file mode 100644 index 000000000000..d86d043a9c3f --- /dev/null +++ b/net-analyzer/fprobe/fprobe-1.1-r3.ebuild @@ -0,0 +1,43 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +DESCRIPTION="libpcap-based tool to collect network traffic data and emit it as NetFlow flows" +HOMEPAGE="http://fprobe.sourceforge.net" +LICENSE="GPL-2" + +SRC_URI="mirror://sourceforge/fprobe/${P}.tar.bz2" +SLOT="0" +KEYWORDS="~amd64 ~ppc x86" + +IUSE="debug messages" + +DEPEND=" + net-libs/libpcap +" +RDEPEND=" + ${DEPEND} +" +PATCHES=( + "${FILESDIR}"/fprobe-1.1-pidfile-sanity.patch + "${FILESDIR}"/fprobe-1.1-setgroups.patch +) + +src_configure() { + econf \ + $(use_enable debug) \ + $(use_enable messages) +} + +DOCS=( AUTHORS NEWS README TODO ) + +src_install() { + default + + docinto contrib + dodoc contrib/tg.sh + + newinitd "${FILESDIR}"/init.d-fprobe fprobe + newconfd "${FILESDIR}"/conf.d-fprobe fprobe +} diff --git a/net-analyzer/fprobe/metadata.xml b/net-analyzer/fprobe/metadata.xml new file mode 100644 index 000000000000..fca602de5573 --- /dev/null +++ b/net-analyzer/fprobe/metadata.xml @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>netmon@gentoo.org</email> + <name>Gentoo network monitoring and analysis project</name> + </maintainer> + <use> + <flag name="messages">enable console messages</flag> + </use> + <upstream> + <remote-id type="sourceforge">fprobe</remote-id> + </upstream> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/fragroute/Manifest b/net-analyzer/fragroute/Manifest new file mode 100644 index 000000000000..be1a526c25fe --- /dev/null +++ b/net-analyzer/fragroute/Manifest @@ -0,0 +1 @@ +DIST fragroute-1.2.6-ipv6.tar.gz 163309 BLAKE2B c1927fdb6fbe6873b62fa48c5355b0b0d2be7b2183c94f259b8e0b4b3dec8a171defc4c6fbde507e522b28dffcc86dd68ae0ffe380a9d21eb478ebe7068d4beb SHA512 76c6fbe37100a43df477f0ba455a2bed6ac53c1f369e147d220562a34eca0eb273171e4b9ff4f3fc473c3f99a8344f6d49963c20d7cfaf6879200322a491ffc3 diff --git a/net-analyzer/fragroute/files/fragroute-1.2.6-pcap_open.patch b/net-analyzer/fragroute/files/fragroute-1.2.6-pcap_open.patch new file mode 100644 index 000000000000..6dedb535d3b5 --- /dev/null +++ b/net-analyzer/fragroute/files/fragroute-1.2.6-pcap_open.patch @@ -0,0 +1,44 @@ +--- a/fragtest.c ++++ b/fragtest.c +@@ -458,7 +458,7 @@ + if ((ctx.ip = ip_open()) == NULL) + err(1, "couldn't open raw IP interface"); + +- if ((ctx.pcap = pcap_open(ifent.intf_name)) == NULL) ++ if ((ctx.pcap = fragroute_pcap_open(ifent.intf_name)) == NULL) + err(1, "couldn't open %s for sniffing", ifent.intf_name); + + if ((ctx.dloff = pcap_dloff(ctx.pcap)) < 0) +--- a/tun-loop.c ++++ b/tun-loop.c +@@ -331,7 +331,7 @@ + return (tun_close(tun)); + + /* Set up to sniff on loopback. */ +- if ((tun->pcap = pcap_open(tun->ifent->intf_name)) == NULL) ++ if ((tun->pcap = fragroute_pcap_open(tun->ifent->intf_name)) == NULL) + return (tun_close(tun)); + + if (pcap_filter(tun->pcap, "ip dst %s", addr_ntoa(dst)) < 0) +--- a/pcaputil.c ++++ b/pcaputil.c +@@ -27,7 +27,7 @@ + #include "pcaputil.h" + + pcap_t * +-pcap_open(char *device) ++fragroute_pcap_open(char *device) + { + char ebuf[PCAP_ERRBUF_SIZE]; + pcap_t *pcap; +--- a/pcaputil.h ++++ b/pcaputil.h +@@ -9,7 +9,7 @@ + #ifndef PCAPUTIL_H + #define PCAPUTIL_H + +-pcap_t *pcap_open(char *device); ++pcap_t *fragroute_pcap_open(char *device); + int pcap_dloff(pcap_t *pcap); + int pcap_filter(pcap_t *pcap, const char *fmt, ...); + diff --git a/net-analyzer/fragroute/fragroute-1.2.6-r1.ebuild b/net-analyzer/fragroute/fragroute-1.2.6-r1.ebuild new file mode 100644 index 000000000000..53aaa81ffc3d --- /dev/null +++ b/net-analyzer/fragroute/fragroute-1.2.6-r1.ebuild @@ -0,0 +1,47 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +MY_P="${P}-ipv6" + +inherit autotools + +DESCRIPTION="Testing of network intrusion detection systems, firewalls and TCP/IP stacks" +HOMEPAGE="https://github.com/stsi/fragroute-ipv6" +SRC_URI="https://fragroute-ipv6.googlecode.com/files/${MY_P}.tar.gz" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~amd64 ~ppc ~ppc64 x86" + +RDEPEND=" + dev-libs/libevent + net-libs/libpcap + >=dev-libs/libdnet-1.12[ipv6] +" +DEPEND=" + ${RDEPEND} + virtual/awk +" +DOCS=( INSTALL README TODO ) +PATCHES=( + "${FILESDIR}"/${P}-pcap_open.patch +) +S="${WORKDIR}/${MY_P}" + +src_prepare() { + default + # Remove broken and old files, autotools will regen needed files + rm *.m4 acconfig.h missing Makefile.in || die + # Add missing includes + sed -i -e "/#define IPUTIL_H/a#include <stdio.h>\n#include <stdint.h>" iputil.h || die + eautoreconf +} + +src_configure() { + econf \ + --with-libdnet="${EPREFIX}"/usr \ + --with-libevent="${EPREFIX}"/usr \ + --with-libpcap="${EPREFIX}"/usr +} diff --git a/net-analyzer/fragroute/fragroute-1.2.6-r2.ebuild b/net-analyzer/fragroute/fragroute-1.2.6-r2.ebuild new file mode 100644 index 000000000000..1043d0fd9879 --- /dev/null +++ b/net-analyzer/fragroute/fragroute-1.2.6-r2.ebuild @@ -0,0 +1,47 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +MY_P="${P}-ipv6" + +inherit autotools + +DESCRIPTION="Testing of network intrusion detection systems, firewalls and TCP/IP stacks" +HOMEPAGE="https://github.com/stsi/fragroute-ipv6" +SRC_URI="https://fragroute-ipv6.googlecode.com/files/${MY_P}.tar.gz" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~amd64 ~ppc ~ppc64 ~x86" + +RDEPEND=" + dev-libs/libevent:= + net-libs/libpcap + >=dev-libs/libdnet-1.12[ipv6] +" +DEPEND=" + ${RDEPEND} + virtual/awk +" +DOCS=( INSTALL README TODO ) +PATCHES=( + "${FILESDIR}"/${P}-pcap_open.patch +) +S="${WORKDIR}/${MY_P}" + +src_prepare() { + default + # Remove broken and old files, autotools will regen needed files + rm *.m4 acconfig.h missing Makefile.in || die + # Add missing includes + sed -i -e "/#define IPUTIL_H/a#include <stdio.h>\n#include <stdint.h>" iputil.h || die + eautoreconf +} + +src_configure() { + econf \ + --with-libdnet="${EPREFIX}"/usr \ + --with-libevent="${EPREFIX}"/usr \ + --with-libpcap="${EPREFIX}"/usr +} diff --git a/net-analyzer/fragroute/metadata.xml b/net-analyzer/fragroute/metadata.xml new file mode 100644 index 000000000000..e784ac488bd8 --- /dev/null +++ b/net-analyzer/fragroute/metadata.xml @@ -0,0 +1,12 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>netmon@gentoo.org</email> + <name>Gentoo network monitoring and analysis project</name> + </maintainer> + <upstream> + <remote-id type="github">stsi/fragroute-ipv6</remote-id> + </upstream> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/ftester/Manifest b/net-analyzer/ftester/Manifest new file mode 100644 index 000000000000..742337d334b9 --- /dev/null +++ b/net-analyzer/ftester/Manifest @@ -0,0 +1 @@ +DIST ftester-1.0.tar.gz 30821 BLAKE2B 3c0fcd7070d09ef8339fa798334cadeb36459617e8dedffde6e04cdc0b88616fc914bb9660056d5d7fce48a34c06acfd56773a06b98348a03f8f7c0dd9fe0436 SHA512 413929178489c755fb5c876a88510bea28c59f1942a279c332fcd008ecbf4b0fd47e6b15abe1068c134d14c9ab2bdb841ffa280f95f77a819779e7e9626e9cfb diff --git a/net-analyzer/ftester/ftester-1.0.ebuild b/net-analyzer/ftester/ftester-1.0.ebuild new file mode 100644 index 000000000000..aabe8017d39e --- /dev/null +++ b/net-analyzer/ftester/ftester-1.0.ebuild @@ -0,0 +1,26 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +DESCRIPTION="Firewall and Intrusion Detection System testing tool" +HOMEPAGE="http://dev.inversepath.com/trac/ftester" +SRC_URI="http://dev.inversepath.com/${PN}/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="amd64 ppc x86" + +RDEPEND=" + dev-perl/List-MoreUtils + dev-perl/Net-Pcap + dev-perl/Net-PcapUtils + dev-perl/Net-RawIP + dev-perl/NetPacket +" + +src_install() { + dodoc CREDITS Changelog ftest.conf + doman ${PN}.8 + dosbin ftestd ftest freport +} diff --git a/net-analyzer/ftester/metadata.xml b/net-analyzer/ftester/metadata.xml new file mode 100644 index 000000000000..2c2097f20f50 --- /dev/null +++ b/net-analyzer/ftester/metadata.xml @@ -0,0 +1,12 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>netmon@gentoo.org</email> + <name>Gentoo network monitoring and analysis project</name> + </maintainer> + <longdescription> + Ftester - Firewall and Intrusion Detection System testing tool + </longdescription> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/fwlogwatch/Manifest b/net-analyzer/fwlogwatch/Manifest new file mode 100644 index 000000000000..aa622d9eff42 --- /dev/null +++ b/net-analyzer/fwlogwatch/Manifest @@ -0,0 +1,2 @@ +DIST fwlogwatch-1.4.tar.bz2 92652 BLAKE2B 94c5ecd6e17c3ce07ffaa33f738109162913253b837bcc4c4fc79068edb610c046b3a178db5481c3e145482686f3f837ecd2fc579700b4a5a68bbaae47f9e537 SHA512 0a67c0ae8b096fdf7a06e279a11b0bc71f2d514790c1669f60606b17a7f3f3ec97dedc2005438ce0ec82efcd66a822b62dbb36603f4b02e010f469fb885b87e6 +DIST fwlogwatch-1.5.tar.bz2 94451 BLAKE2B c0456931dc425df4ec190f1c8bcba21e0784009dae66869a5f5c0371b68d0bdb1bf57c788468f7c9fd32abf8b676a4029bcde7d348c37e4b7f5771bc48f04297 SHA512 d4890596859929ddc6adfd7f9e735e0c414bad40eff6732120a522a8bd4fb8d1442c7d1026f0f3c6ac5c4d51b76a2bac486d04f0fbceae67395c585098afef85 diff --git a/net-analyzer/fwlogwatch/fwlogwatch-1.4.ebuild b/net-analyzer/fwlogwatch/fwlogwatch-1.4.ebuild new file mode 100644 index 000000000000..54a2095f9c3d --- /dev/null +++ b/net-analyzer/fwlogwatch/fwlogwatch-1.4.ebuild @@ -0,0 +1,86 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +inherit eutils flag-o-matic toolchain-funcs + +DESCRIPTION="A packet filter and firewall log analyzer" +HOMEPAGE="http://fwlogwatch.inside-security.de/" +SRC_URI="http://fwlogwatch.inside-security.de/sw/${P}.tar.bz2" + +KEYWORDS="amd64 ~ppc sparc x86" +LICENSE="GPL-1" +SLOT="0" +IUSE="nls zlib" + +RDEPEND=" + zlib? ( sys-libs/zlib ) +" +DEPEND=" + ${RDEPEND} + sys-devel/flex + nls? ( sys-devel/gettext ) +" + +src_prepare() { + if use nls; then + strip-linguas -i po/ + local lingua pofile + for pofile in po/*.po; do + lingua=${pofile/po\/} + lingua=${lingua/.po} + if ! has ${lingua} ${LINGUAS}; then + sed -i \ + -e "/${lingua}.[mp]o/d" \ + Makefile po/Makefile || die + fi + done + fi + + sed -i \ + -e '/^INSTALL_/s|$| -D|g' \ + -e 's|make|$(MAKE)|g ' \ + Makefile || die +} + +src_configure() { + if ! use zlib; then + sed -i Makefile -e '/^LIBS/ s|-lz||g' || die + else + append-cflags -DHAVE_ZLIB + fi + + use nls && append-cflags -DHAVE_GETTEXT +} + +src_compile() { + emake \ + CC=$(tc-getCC) \ + CFLAGS="${CFLAGS}" \ + LDFLAGS="${LDFLAGS}" + use nls && emake -C po +} + +src_install() { + emake \ + LOCALE_DIR="${D}/usr" INSTALL_DIR="${D}/usr" \ + install + use nls && emake \ + LOCALE_DIR="${D}/usr" INSTALL_DIR="${D}/usr" \ + install-i18n + + dosbin contrib/fwlw_notify + dosbin contrib/fwlw_respond + + dodoc AUTHORS ChangeLog CREDITS README + + insinto /usr/share/fwlogwatch/contrib + + doins contrib/fwlogsummary.cgi + doins contrib/fwlogsummary_small.cgi + doins contrib/fwlogwatch.php + + insinto /etc + doins fwlogwatch.config +} diff --git a/net-analyzer/fwlogwatch/fwlogwatch-1.5.ebuild b/net-analyzer/fwlogwatch/fwlogwatch-1.5.ebuild new file mode 100644 index 000000000000..93b1e6a2a352 --- /dev/null +++ b/net-analyzer/fwlogwatch/fwlogwatch-1.5.ebuild @@ -0,0 +1,92 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +inherit eutils flag-o-matic toolchain-funcs + +DESCRIPTION="A packet filter and firewall log analyzer" +HOMEPAGE="http://fwlogwatch.inside-security.de/" +SRC_URI="http://fwlogwatch.inside-security.de/sw/${P}.tar.bz2" + +KEYWORDS="~amd64 ~ppc ~sparc ~x86" +LICENSE="GPL-1" +SLOT="0" +IUSE="geoip nls zlib" + +RDEPEND=" + geoip? ( dev-libs/geoip ) + zlib? ( sys-libs/zlib ) +" +DEPEND=" + ${RDEPEND} + sys-devel/flex + nls? ( sys-devel/gettext ) +" + +src_prepare() { + if use nls; then + strip-linguas -i po/ + local lingua pofile + for pofile in po/*.po; do + lingua=${pofile/po\/} + lingua=${lingua/.po} + if ! has ${lingua} ${LINGUAS}; then + sed -i \ + -e "/${lingua}.[mp]o/d" \ + Makefile po/Makefile || die + fi + done + fi + + sed -i \ + -e '/^INSTALL_/s|$| -D|g' \ + -e 's|make|$(MAKE)|g ' \ + Makefile || die +} + +src_configure() { + if ! use zlib; then + sed -i Makefile -e '/^LIBS/ s|-lz||g' || die + else + append-cflags -DHAVE_ZLIB + fi + + if use geoip; then + append-cflags -DHAVE_GEOIP + sed -i Makefile -e '/^LIBS/ s| #| -lGeoIP #|g' || die + fi + + use nls && append-cflags -DHAVE_GETTEXT +} + +src_compile() { + emake \ + CC=$(tc-getCC) \ + CFLAGS="${CFLAGS}" \ + LDFLAGS="${LDFLAGS}" + use nls && emake -C po +} + +src_install() { + emake \ + LOCALE_DIR="${D}/usr" INSTALL_DIR="${D}/usr" \ + install + use nls && emake \ + LOCALE_DIR="${D}/usr" INSTALL_DIR="${D}/usr" \ + install-i18n + + dosbin contrib/fwlw_notify + dosbin contrib/fwlw_respond + + dodoc AUTHORS ChangeLog CREDITS README + + insinto /usr/share/fwlogwatch/contrib + + doins contrib/fwlogsummary.cgi + doins contrib/fwlogsummary_small.cgi + doins contrib/fwlogwatch.php + + insinto /etc + doins fwlogwatch.config +} diff --git a/net-analyzer/fwlogwatch/metadata.xml b/net-analyzer/fwlogwatch/metadata.xml new file mode 100644 index 000000000000..bd13a914477c --- /dev/null +++ b/net-analyzer/fwlogwatch/metadata.xml @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<maintainer type="project"> + <email>netmon@gentoo.org</email> + <name>Gentoo network monitoring and analysis project</name> +</maintainer> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/gensink/Manifest b/net-analyzer/gensink/Manifest new file mode 100644 index 000000000000..1afa17b7d79e --- /dev/null +++ b/net-analyzer/gensink/Manifest @@ -0,0 +1 @@ +DIST gensink-4.1.tar.gz 12352 BLAKE2B 024f65d0a0a5c4b23ca8e3b8d7f80b68888ff9eacbfa01028b2df8e2bafc7034837701a49aa6eeb5392a042029e6bf122c8d5c47c935e218830b902e5e36461d SHA512 5572c4df9b3c688f6a0f33c539bcdbd3c7b2a0992ba560907e0d22440176380cb6888732ab11ef4d6ced0c2d906ab494895a65c00a64db8603cbd1245d9c0d27 diff --git a/net-analyzer/gensink/files/gensink-4.1-make.patch b/net-analyzer/gensink/files/gensink-4.1-make.patch new file mode 100644 index 000000000000..103043f79ae1 --- /dev/null +++ b/net-analyzer/gensink/files/gensink-4.1-make.patch @@ -0,0 +1,10 @@ +--- a/Makefile ++++ b/Makefile +@@ -1,7 +1,4 @@ + PROGS = gen4 sink4 tub4 +-CC = gcc +-CFLAGS = -O2 -g -Wall +-LDFLAGS = -O -g + + all: $(PROGS) + diff --git a/net-analyzer/gensink/gensink-4.1-r2.ebuild b/net-analyzer/gensink/gensink-4.1-r2.ebuild new file mode 100644 index 000000000000..5a99e658ec60 --- /dev/null +++ b/net-analyzer/gensink/gensink-4.1-r2.ebuild @@ -0,0 +1,23 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +inherit base toolchain-funcs + +DESCRIPTION="A simple TCP benchmark suite" +HOMEPAGE="http://jes.home.cern.ch/jes/gensink/" +SRC_URI="http://jes.home.cern.ch/jes/gensink/${P}.tar.gz" +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~ppc x86" + +PATCHES=( "${FILESDIR}/${P}-make.patch" ) + +src_compile() { + tc-export CC + default +} +src_install() { + dobin sink4 tub4 gen4 +} diff --git a/net-analyzer/gensink/metadata.xml b/net-analyzer/gensink/metadata.xml new file mode 100644 index 000000000000..bd13a914477c --- /dev/null +++ b/net-analyzer/gensink/metadata.xml @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<maintainer type="project"> + <email>netmon@gentoo.org</email> + <name>Gentoo network monitoring and analysis project</name> +</maintainer> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/gnome-nettool/Manifest b/net-analyzer/gnome-nettool/Manifest new file mode 100644 index 000000000000..d63b7d4fc227 --- /dev/null +++ b/net-analyzer/gnome-nettool/Manifest @@ -0,0 +1 @@ +DIST gnome-nettool-3.8.1.tar.xz 589024 BLAKE2B f12c43b713ae81a2460b12c150e2c52baf98900b14ce0ff188b3fb1a55aa636391fb62d9c20b40d3a60ff322d4af9744d072c2727a77bced056ef0df042e21cf SHA512 c1c90fa727ebbf21442c4d0f5f4e98acf91fdd68a476f5f378167f92c3d7938ef33598525b62b838dc9b485abeb40171bdffb0fe3cb060fd3982db013a30bbed diff --git a/net-analyzer/gnome-nettool/gnome-nettool-3.8.1.ebuild b/net-analyzer/gnome-nettool/gnome-nettool-3.8.1.ebuild new file mode 100644 index 000000000000..9d215a641c88 --- /dev/null +++ b/net-analyzer/gnome-nettool/gnome-nettool-3.8.1.ebuild @@ -0,0 +1,44 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI="5" +GCONF_DEBUG="yes" + +inherit eutils gnome2 + +DESCRIPTION="Graphical front-ends to various networking command-line" +HOMEPAGE="https://git.gnome.org/browse/gnome-nettool/" + +LICENSE="GPL-2" +SLOT="0" +IUSE="debug" +KEYWORDS="~alpha amd64 ~arm ~ia64 ~ppc ~ppc64 ~sparc x86" + +COMMON_DEPEND=" + >=dev-libs/glib-2.25.10:2 + gnome-base/libgtop:2= + x11-libs/cairo + x11-libs/gdk-pixbuf:2 + >=x11-libs/gtk+-2.90.4:3 + x11-libs/pango +" +RDEPEND="${COMMON_DEPEND} + || ( + net-misc/iputils + net-analyzer/tcptraceroute + net-analyzer/traceroute ) + net-analyzer/nmap + net-dns/bind-tools + userland_GNU? ( net-misc/netkit-fingerd net-misc/whois ) + userland_BSD? ( net-misc/bsdwhois ) +" +DEPEND="${COMMON_DEPEND} + app-text/yelp-tools + >=dev-util/intltool-0.40 + virtual/pkgconfig + sys-devel/gettext +" + +src_configure() { + gnome2_src_configure $(use_enable debug) +} diff --git a/net-analyzer/gnome-nettool/metadata.xml b/net-analyzer/gnome-nettool/metadata.xml new file mode 100644 index 000000000000..d074988aeedd --- /dev/null +++ b/net-analyzer/gnome-nettool/metadata.xml @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<maintainer type="project"> + <email>gnome@gentoo.org</email> + <name>Gentoo GNOME Desktop</name> +</maintainer> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/goaccess/Manifest b/net-analyzer/goaccess/Manifest new file mode 100644 index 000000000000..39e756052332 --- /dev/null +++ b/net-analyzer/goaccess/Manifest @@ -0,0 +1,2 @@ +DIST goaccess-1.2.tar.gz 423103 BLAKE2B 87c527a52db9fa69d6e6a02ffbda64a6a32e6214ca6bc1f2654e1451fe5d73e7caa02cf1416c93c511bee329b7885e4914fb7dfd37562ef5347ea3912d030c14 SHA512 bc31ef1e4c92608635856fa73e69b58267c161a7e3c6f2e3ca8860b862ed1c47575b93943dd975a5f8503774ee90ee0649d380563639e30908d876416638f889 +DIST goaccess-1.3.tar.gz 541374 BLAKE2B 55942e35d06f1467df9b80a3fc42211e867b08963a7334783c0279ba7b9e0fd8d6e197277bee780547a9b8f6264ae15844374604f6d7c1b3b57f57768c2b2019 SHA512 7ab8a42670c2009459eee6979cb14e32e7e776e89912077882652631d0ce6ff801fba46d91ab5c23af1229f000e220863e9b70336fcd9fe11521d0ae1fd3bde1 diff --git a/net-analyzer/goaccess/goaccess-1.2.ebuild b/net-analyzer/goaccess/goaccess-1.2.ebuild new file mode 100644 index 000000000000..fc4075601073 --- /dev/null +++ b/net-analyzer/goaccess/goaccess-1.2.ebuild @@ -0,0 +1,52 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +DESCRIPTION="A real-time web log analyzer and interactive viewer that runs in a terminal" +HOMEPAGE="https://goaccess.io" +SRC_URI="https://tar.goaccess.io/${P}.tar.gz" + +LICENSE="MIT" +SLOT="0" +KEYWORDS="~amd64 ~x86 ~amd64-linux" +IUSE="btree bzip2 debug geoip geoipv2 getline libressl tokyocabinet ssl unicode zlib" + +RDEPEND="sys-libs/ncurses:0=[unicode?] + geoip? ( + !geoipv2? ( dev-libs/geoip ) + geoipv2? ( dev-libs/libmaxminddb:0= ) + ) + !tokyocabinet? ( dev-libs/glib:2 ) + tokyocabinet? ( + dev-db/tokyocabinet[bzip2?,zlib?] + btree? ( + bzip2? ( app-arch/bzip2 ) + zlib? ( sys-libs/zlib ) + ) + ) + ssl? ( + !libressl? ( dev-libs/openssl:0= ) + libressl? ( dev-libs/libressl:0= ) + )" +DEPEND="${RDEPEND} + virtual/pkgconfig" + +REQUIRED_USE="btree? ( tokyocabinet ) bzip2? ( btree ) geoipv2? ( geoip ) zlib? ( btree )" + +src_configure() { + econf \ + $(use_enable bzip2 bzip) \ + $(use_enable zlib) \ + $(use_enable debug) \ + $(use_enable geoip geoip $(usex geoipv2 mmdb legacy)) \ + $(use_enable tokyocabinet tcb $(usex btree btree memhash)) \ + $(use_enable unicode utf8) \ + $(use_with getline) \ + $(use_with ssl openssl) +} + +pkg_preinst() { + # Change path to GeoIP bases in config + sed -e s':/usr/local:/usr:' -i "${ED%/}"/etc/goaccess.conf || die "sed failed for goaccess.conf" +} diff --git a/net-analyzer/goaccess/goaccess-1.3.ebuild b/net-analyzer/goaccess/goaccess-1.3.ebuild new file mode 100644 index 000000000000..5d70b028d3d3 --- /dev/null +++ b/net-analyzer/goaccess/goaccess-1.3.ebuild @@ -0,0 +1,55 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +DESCRIPTION="A real-time web log analyzer and interactive viewer that runs in a terminal" +HOMEPAGE="https://goaccess.io" +SRC_URI="https://tar.goaccess.io/${P}.tar.gz" + +LICENSE="MIT" +SLOT="0" +KEYWORDS="~amd64 ~x86 ~amd64-linux" +IUSE="btree bzip2 debug geoip geoipv2 getline libressl tokyocabinet ssl unicode zlib" +REQUIRED_USE="btree? ( tokyocabinet ) bzip2? ( btree ) geoipv2? ( geoip ) zlib? ( btree )" + +BDEPEND="virtual/pkgconfig" +RDEPEND="sys-libs/ncurses:0=[unicode?] + geoip? ( + !geoipv2? ( dev-libs/geoip ) + geoipv2? ( dev-libs/libmaxminddb:0= ) + ) + !tokyocabinet? ( dev-libs/glib:2 ) + tokyocabinet? ( + dev-db/tokyocabinet[bzip2?,zlib?] + btree? ( + bzip2? ( app-arch/bzip2 ) + zlib? ( sys-libs/zlib ) + ) + ) + ssl? ( + !libressl? ( dev-libs/openssl:0= ) + libressl? ( dev-libs/libressl:0= ) + )" +DEPEND="${RDEPEND}" + +src_configure() { + econf \ + "$(use_enable bzip2 bzip)" \ + "$(use_enable zlib)" \ + "$(use_enable debug)" \ + "$(use_enable geoip geoip "$(usex geoipv2 mmdb legacy)")" \ + "$(use_enable tokyocabinet tcb "$(usex btree btree memhash)")" \ + "$(use_enable unicode utf8)" \ + "$(use_with getline)" \ + "$(use_with ssl openssl)" +} + +pkg_preinst() { + # Change path to GeoIP bases in config + sed -e s':/usr/local:/usr:' -i "${ED}"/etc/goaccess/goaccess.conf || die "sed failed for goaccess.conf" +} + +pkg_postinst() { + ewarn "Upstream moved config to /etc/goaccess/goaccess.conf" +} diff --git a/net-analyzer/goaccess/goaccess-9999.ebuild b/net-analyzer/goaccess/goaccess-9999.ebuild new file mode 100644 index 000000000000..a5512dc51d48 --- /dev/null +++ b/net-analyzer/goaccess/goaccess-9999.ebuild @@ -0,0 +1,59 @@ +# Copyright 1999-2018 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +EGIT_REPO_URI="https://github.com/allinurl/${PN}.git" + +inherit autotools git-r3 + +DESCRIPTION="A real-time web log analyzer and interactive viewer that runs in a terminal" +HOMEPAGE="https://goaccess.io" +SRC_URI="" + +LICENSE="MIT" +SLOT="0" +KEYWORDS="" +IUSE="btree bzip2 debug geoip geoipv2 getline libressl tokyocabinet ssl unicode zlib" +REQUIRED_USE="btree? ( tokyocabinet ) bzip2? ( btree ) geoipv2? ( geoip ) zlib? ( btree )" + +BDEPEND="virtual/pkgconfig" +RDEPEND="sys-libs/ncurses:0=[unicode?] + geoip? ( + !geoipv2? ( dev-libs/geoip ) + geoipv2? ( dev-libs/libmaxminddb:0= ) + ) + !tokyocabinet? ( dev-libs/glib:2 ) + tokyocabinet? ( + dev-db/tokyocabinet[bzip2?,zlib?] + btree? ( + bzip2? ( app-arch/bzip2 ) + zlib? ( sys-libs/zlib ) + ) + ) + ssl? ( + !libressl? ( dev-libs/openssl:0= ) + libressl? ( dev-libs/libressl:0= ) + )" +DEPEND="${RDEPEND}" + +src_prepare() { + default + + # Change path to GeoIP bases in config + sed -i -e s':/usr/local:/usr:' config/goaccess.conf || die "sed failed for goaccess.conf" + + eautoreconf +} + +src_configure() { + econf \ + "$(use_enable bzip2 bzip)" \ + "$(use_enable zlib)" \ + "$(use_enable debug)" \ + "$(use_enable geoip geoip "$(usex geoipv2 mmdb legacy)")" \ + "$(use_enable tokyocabinet tcb "$(usex btree btree memhash)")" \ + "$(use_enable unicode utf8)" \ + "$(use_with getline)" \ + "$(use_with ssl openssl)" +} diff --git a/net-analyzer/goaccess/metadata.xml b/net-analyzer/goaccess/metadata.xml new file mode 100644 index 000000000000..4dda44740b85 --- /dev/null +++ b/net-analyzer/goaccess/metadata.xml @@ -0,0 +1,28 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>spiderx@spiderx.dp.ua</email> + <name>Vladimir Pavljuchenkov</name> + </maintainer> + <maintainer type="project"> + <email>proxy-maint@gentoo.org</email> + <name>Proxy Maintainers</name> + </maintainer> + <longdescription lang="en"> + GoAccess is an open source real-time web log + analyzer and interactive viewer that runs in a terminal in *nix systems. + It provides fast and valuable HTTP statistics for system administrators + that require a visual server report on the fly. + </longdescription> + <use> + <flag name="btree">Enable Tokyo Cabinet's on-disk B+ Tree database backend</flag> + <flag name="geoipv2">Enable support for GeoIP2 through <pkg>dev-libs/libmaxminddb</pkg></flag> + <flag name="getline">Use GNU getline() to parse full line requests</flag> + <flag name="tokyocabinet">Enable Tokyo Cabinet's on-memory hash database backend</flag> + </use> + <upstream> + <remote-id type="github">allinurl/goaccess</remote-id> + </upstream> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/gr-fosphor/Manifest b/net-analyzer/gr-fosphor/Manifest new file mode 100644 index 000000000000..2fcba5917b5f --- /dev/null +++ b/net-analyzer/gr-fosphor/Manifest @@ -0,0 +1,2 @@ +DIST gr-fosphor-0.0_p20191202.tar.gz 254103 BLAKE2B 460b4ff2ff9f4a6faa70c541dd8ce936ba8419a89cca7715913b6f93f07a151c467a5737860a362198d609dfe0e4bfc4a476278bfc720d89c1876ff56addf226 SHA512 6bc26be4aa3116af33a214046c76e5a7623e049e27e86d866892de611ffd4bfa4bd841b66535fc40320fa7c7a46d19af2d391ee594f9a7ed997355cd2ade6fa1 +DIST gr-fosphor-0.0_p20200131.tar.gz 244685 BLAKE2B db01b9df87f377db2adaaca3d1542f99eaca9f73303c71ea9add1845307704817c8930736d44462191476b4cb935a18401b7012a1ea6465bdb5cf3624c182f2c SHA512 7bf2758f98ae7d088256060878fbf33966880ddbb7fb132da00f9c2530d84b91a6385eabbf61ff40d3002d3a42eadf5e2d78b8c797bc93501cafaf8a7bdde7ae diff --git a/net-analyzer/gr-fosphor/gr-fosphor-0.0_p20191202.ebuild b/net-analyzer/gr-fosphor/gr-fosphor-0.0_p20191202.ebuild new file mode 100644 index 000000000000..78c0f817bcf6 --- /dev/null +++ b/net-analyzer/gr-fosphor/gr-fosphor-0.0_p20191202.ebuild @@ -0,0 +1,64 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +PYTHON_COMPAT=( python2_7 ) + +inherit cmake-utils python-single-r1 + +DESCRIPTION="gnuradio fosphor block (GPU spectrum display)" +HOMEPAGE="https://sdr.osmocom.org/trac/wiki/fosphor" + +if [[ ${PV} == 9999* ]]; then + inherit git-r3 + EGIT_REPO_URI="https://github.com/osmocom/${PN}.git" +else + COMMIT="fa6761afbf8c2658782e0c7fc5d51063679b7ae4" + SRC_URI="https://github.com/osmocom/gr-fosphor/archive/${COMMIT}.tar.gz -> ${P}.tar.gz" + S="${WORKDIR}/${PN}-${COMMIT}" + KEYWORDS="~amd64 ~x86" +fi + +REQUIRED_USE="${PYTHON_REQUIRED_USE}" + +LICENSE="GPL-3+" +SLOT="0" +IUSE="glfw qt5 wxwidgets" + +RDEPEND="qt5? ( + dev-qt/qtcore:5 + dev-qt/qtgui:5 + dev-qt/qtopengl:5 + dev-qt/qtwidgets:5 + ) + =net-wireless/gnuradio-3.7*:0=[qt5,wxwidgets?,${PYTHON_SINGLE_USEDEP}] + media-libs/freetype + dev-libs/boost:= + glfw? ( >=media-libs/glfw-3 ) + virtual/opencl + virtual/opengl + ${PYTHON_DEPS} +" +DEPEND="${RDEPEND} + dev-lang/swig:0 + dev-util/cppunit +" + +src_prepare() { + cmake-utils_src_prepare + default +} + +src_configure() { + # tries to run OpenCL test program, but failing doesn't hurt + addpredict /dev/dri + + local mycmakeargs=( + -DENABLE_DEFAULT=OFF + -DENABLE_GLFW="$(usex glfw)" + -DENABLE_QT="$(usex qt5)" + -DENABLE_WX="$(usex wxwidgets)" + -DENABLE_PYTHON=ON + ) + cmake-utils_src_configure +} diff --git a/net-analyzer/gr-fosphor/gr-fosphor-0.0_p20200131.ebuild b/net-analyzer/gr-fosphor/gr-fosphor-0.0_p20200131.ebuild new file mode 100644 index 000000000000..73f6863f9df9 --- /dev/null +++ b/net-analyzer/gr-fosphor/gr-fosphor-0.0_p20200131.ebuild @@ -0,0 +1,64 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +PYTHON_COMPAT=( python3_{6,7,8} ) + +inherit cmake-utils python-single-r1 + +DESCRIPTION="gnuradio fosphor block (GPU spectrum display)" +HOMEPAGE="https://sdr.osmocom.org/trac/wiki/fosphor" + +if [[ ${PV} == 9999* ]]; then + inherit git-r3 + EGIT_REPO_URI="https://github.com/osmocom/${PN}.git" +else + COMMIT="defdd4aca6cd157ccc3b10ea16b5b4f552f34b96" + SRC_URI="https://github.com/osmocom/gr-fosphor/archive/${COMMIT}.tar.gz -> ${P}.tar.gz" + S="${WORKDIR}/${PN}-${COMMIT}" + KEYWORDS="~amd64 ~x86" +fi + +REQUIRED_USE="${PYTHON_REQUIRED_USE}" + +LICENSE="GPL-3+" +SLOT="0" +IUSE="glfw qt5" + +RDEPEND="qt5? ( + dev-qt/qtcore:5 + dev-qt/qtgui:5 + dev-qt/qtopengl:5 + dev-qt/qtwidgets:5 + ) + dev-libs/boost:= + dev-libs/log4cpp + media-libs/freetype + =net-wireless/gnuradio-3.8*:0=[qt5,${PYTHON_SINGLE_USEDEP}] + glfw? ( >=media-libs/glfw-3 ) + virtual/opencl + virtual/opengl + ${PYTHON_DEPS} +" +DEPEND="${RDEPEND} + dev-lang/swig:0 + dev-util/cppunit +" + +src_prepare() { + cmake-utils_src_prepare + default +} + +src_configure() { + # tries to run OpenCL test program, but failing doesn't hurt + addpredict /dev/dri + + local mycmakeargs=( + -DENABLE_DEFAULT=OFF + -DENABLE_GLFW="$(usex glfw)" + -DENABLE_QT="$(usex qt5)" + -DENABLE_PYTHON=ON + ) + cmake-utils_src_configure +} diff --git a/net-analyzer/gr-fosphor/gr-fosphor-9999.ebuild b/net-analyzer/gr-fosphor/gr-fosphor-9999.ebuild new file mode 100644 index 000000000000..73f6863f9df9 --- /dev/null +++ b/net-analyzer/gr-fosphor/gr-fosphor-9999.ebuild @@ -0,0 +1,64 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +PYTHON_COMPAT=( python3_{6,7,8} ) + +inherit cmake-utils python-single-r1 + +DESCRIPTION="gnuradio fosphor block (GPU spectrum display)" +HOMEPAGE="https://sdr.osmocom.org/trac/wiki/fosphor" + +if [[ ${PV} == 9999* ]]; then + inherit git-r3 + EGIT_REPO_URI="https://github.com/osmocom/${PN}.git" +else + COMMIT="defdd4aca6cd157ccc3b10ea16b5b4f552f34b96" + SRC_URI="https://github.com/osmocom/gr-fosphor/archive/${COMMIT}.tar.gz -> ${P}.tar.gz" + S="${WORKDIR}/${PN}-${COMMIT}" + KEYWORDS="~amd64 ~x86" +fi + +REQUIRED_USE="${PYTHON_REQUIRED_USE}" + +LICENSE="GPL-3+" +SLOT="0" +IUSE="glfw qt5" + +RDEPEND="qt5? ( + dev-qt/qtcore:5 + dev-qt/qtgui:5 + dev-qt/qtopengl:5 + dev-qt/qtwidgets:5 + ) + dev-libs/boost:= + dev-libs/log4cpp + media-libs/freetype + =net-wireless/gnuradio-3.8*:0=[qt5,${PYTHON_SINGLE_USEDEP}] + glfw? ( >=media-libs/glfw-3 ) + virtual/opencl + virtual/opengl + ${PYTHON_DEPS} +" +DEPEND="${RDEPEND} + dev-lang/swig:0 + dev-util/cppunit +" + +src_prepare() { + cmake-utils_src_prepare + default +} + +src_configure() { + # tries to run OpenCL test program, but failing doesn't hurt + addpredict /dev/dri + + local mycmakeargs=( + -DENABLE_DEFAULT=OFF + -DENABLE_GLFW="$(usex glfw)" + -DENABLE_QT="$(usex qt5)" + -DENABLE_PYTHON=ON + ) + cmake-utils_src_configure +} diff --git a/net-analyzer/gr-fosphor/metadata.xml b/net-analyzer/gr-fosphor/metadata.xml new file mode 100644 index 000000000000..346a1c1fe3b8 --- /dev/null +++ b/net-analyzer/gr-fosphor/metadata.xml @@ -0,0 +1,12 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>radio@gentoo.org</email> + <name>Radio</name> + </maintainer> + <use> + <flag name="glfw">enable GLFW based interface</flag> + </use> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/graphite-web/Manifest b/net-analyzer/graphite-web/Manifest new file mode 100644 index 000000000000..7a5d3aca5d0a --- /dev/null +++ b/net-analyzer/graphite-web/Manifest @@ -0,0 +1,2 @@ +DIST graphite-web-1.1.5.tar.gz 1173809 BLAKE2B 94a1b4deab3159d3bde2d3c8b6f9664f39942cb1b815ce042b196be3c0e769ee1acac4b619135e9471360849308b90e02e1df4f7d6b7d0ef31e46d38ee2425e5 SHA512 b2097609ca77a40e6e7d83a3141335e2208d69e7f4edbac8ce3505ed9dd654589836a3b3498bfb7f7585332bceeb8e367f0c10f3cf6afdb5ad6b96377338a7bb +DIST graphite-web-1.1.7.tar.gz 1173818 BLAKE2B e2373360897c1447d60cbf84e5d0dd280130730f617ba12cf0195ed2539f55bcfe8a1cb3b6b9e4f9540a6f08ecb7870072aa61447012baa5553878ebf417937f SHA512 eb0a1de35d3535bd1fdc4e6edc6fe50fd6c8789fef4807eb4cd30d6b20e91e09d21daedb80f55339a8c05325db8fe1038e7a461bf155e41555dee60160d5b241 diff --git a/net-analyzer/graphite-web/files/graphite-web-1.1.5-fhs-paths.patch b/net-analyzer/graphite-web/files/graphite-web-1.1.5-fhs-paths.patch new file mode 100644 index 000000000000..4cbbe7213b35 --- /dev/null +++ b/net-analyzer/graphite-web/files/graphite-web-1.1.5-fhs-paths.patch @@ -0,0 +1,63 @@ +Install FHS-style paths + +--- a/conf/graphite.wsgi.example ++++ b/conf/graphite.wsgi.example +@@ -1,4 +1,4 @@ + import sys +-sys.path.append('/opt/graphite/webapp') ++sys.path.append('@GENTOO_PORTAGE_EPREFIX@/usr/share/graphite-web/webapp') + + from graphite.wsgi import application +--- a/setup.py ++++ b/setup.py +@@ -107,8 +107,8 @@ + ], + package_data={'graphite' : + ['templates/*', 'local_settings.py.example']}, +- scripts=glob('bin/*'), +- data_files=list(webapp_content.items()) + storage_dirs + conf_files + examples, ++ scripts=['bin/graphite-web-build-index'], ++ data_files=list(webapp_content.items()), + install_requires=['Django>=1.8,<2.1', 'django-tagging==0.4.3', 'pytz', 'pyparsing', 'cairocffi', 'urllib3', 'scandir', 'six'], + classifiers=[ + 'Intended Audience :: Developers', +--- a/webapp/graphite/local_settings.py.example ++++ b/webapp/graphite/local_settings.py.example +@@ -101,6 +101,7 @@ + # Change only GRAPHITE_ROOT if your install is merely shifted from /opt/graphite + # to somewhere else + #GRAPHITE_ROOT = '/opt/graphite' ++GRAPHITE_ROOT = '@GENTOO_PORTAGE_EPREFIX@/usr/share/graphite-web' + + # Most installs done outside of a separate tree such as /opt/graphite will + # need to change these settings. Note that the default settings for each +@@ -110,6 +111,11 @@ + #STATIC_ROOT = '/opt/graphite/static' + #LOG_DIR = '/opt/graphite/storage/log/webapp' + #INDEX_FILE = '/opt/graphite/storage/index' # Search index file ++CONF_DIR = '@GENTOO_PORTAGE_EPREFIX@/etc/graphite-web' ++STORAGE_DIR = '@GENTOO_PORTAGE_EPREFIX@/var/lib/carbon' ++STATIC_ROOT = '@GENTOO_PORTAGE_EPREFIX@/usr/share/graphite-web/webapp/content' ++LOG_DIR = '@GENTOO_PORTAGE_EPREFIX@/var/log/graphite-web' ++INDEX_FILE = '@GENTOO_PORTAGE_EPREFIX@/var/lib/graphite-web/index' # Search index file + + # To further or fully customize the paths, modify the following. Note that the + # default settings for each of these are relative to CONF_DIR and STORAGE_DIR +@@ -127,6 +133,8 @@ + #CERES_DIR = '/opt/graphite/storage/ceres' + #WHISPER_DIR = '/opt/graphite/storage/whisper' + #RRD_DIR = '/opt/graphite/storage/rrd' ++WHISPER_DIR = '@GENTOO_PORTAGE_EPREFIX@/var/lib/carbon/whisper' ++RRD_DIR = '@GENTOO_PORTAGE_EPREFIX@/var/lib/carbon/rrd' + # + # Data directories using the "Standard" metrics finder (i.e. not Ceres) + #STANDARD_DIRS = [WHISPER_DIR, RRD_DIR] # Default: set from the above variables +@@ -244,7 +244,7 @@ + # + #DATABASES = { + # 'default': { +-# 'NAME': '/opt/graphite/storage/graphite.db', ++# 'NAME': '@GENTOO_PORTAGE_EPREFIX@/var/lib/graphite-web/graphite.db', + # 'ENGINE': 'django.db.backends.sqlite3', + # 'USER': '', + # 'PASSWORD': '', diff --git a/net-analyzer/graphite-web/files/graphite-web-1.1.7-fhs-paths.patch b/net-analyzer/graphite-web/files/graphite-web-1.1.7-fhs-paths.patch new file mode 100644 index 000000000000..6550f083039e --- /dev/null +++ b/net-analyzer/graphite-web/files/graphite-web-1.1.7-fhs-paths.patch @@ -0,0 +1,63 @@ +Install FHS-style paths + +--- a/conf/graphite.wsgi.example ++++ b/conf/graphite.wsgi.example +@@ -1,4 +1,4 @@ + import sys +-sys.path.append('/opt/graphite/webapp') ++sys.path.append('@GENTOO_PORTAGE_EPREFIX@/usr/share/graphite-web/webapp') + + from graphite.wsgi import application +--- a/setup.py ++++ b/setup.py +@@ -115,8 +115,8 @@ + ], + package_data={'graphite' : + ['templates/*', 'local_settings.py.example']}, +- scripts=glob('bin/*'), +- data_files=list(webapp_content.items()) + storage_dirs + conf_files + examples, ++ scripts=['bin/graphite-web-build-index'], ++ data_files=list(webapp_content.items()), + install_requires=['Django>=1.8,<3.1', 'django-tagging==0.4.3', 'pytz', + 'pyparsing', 'cairocffi', 'urllib3', 'scandir', 'six'], + classifiers=[ +--- a/webapp/graphite/local_settings.py.example ++++ b/webapp/graphite/local_settings.py.example +@@ -101,6 +101,7 @@ + # Change only GRAPHITE_ROOT if your install is merely shifted from /opt/graphite + # to somewhere else + #GRAPHITE_ROOT = '/opt/graphite' ++GRAPHITE_ROOT = '@GENTOO_PORTAGE_EPREFIX@/usr/share/graphite-web' + + # Most installs done outside of a separate tree such as /opt/graphite will + # need to change these settings. Note that the default settings for each +@@ -110,6 +111,11 @@ + #STATIC_ROOT = '/opt/graphite/static' + #LOG_DIR = '/opt/graphite/storage/log/webapp' + #INDEX_FILE = '/opt/graphite/storage/index' # Search index file ++CONF_DIR = '@GENTOO_PORTAGE_EPREFIX@/etc/graphite-web' ++STORAGE_DIR = '@GENTOO_PORTAGE_EPREFIX@/var/lib/carbon' ++STATIC_ROOT = '@GENTOO_PORTAGE_EPREFIX@/usr/share/graphite-web/webapp/content' ++LOG_DIR = '@GENTOO_PORTAGE_EPREFIX@/var/log/graphite-web' ++INDEX_FILE = '@GENTOO_PORTAGE_EPREFIX@/var/lib/graphite-web/index' # Search index file + + # To further or fully customize the paths, modify the following. Note that the + # default settings for each of these are relative to CONF_DIR and STORAGE_DIR +@@ -127,6 +133,8 @@ + #CERES_DIR = '/opt/graphite/storage/ceres' + #WHISPER_DIR = '/opt/graphite/storage/whisper' + #RRD_DIR = '/opt/graphite/storage/rrd' ++WHISPER_DIR = '@GENTOO_PORTAGE_EPREFIX@/var/lib/carbon/whisper' ++RRD_DIR = '@GENTOO_PORTAGE_EPREFIX@/var/lib/carbon/rrd' + # + # Data directories using the "Standard" metrics finder (i.e. not Ceres) + #STANDARD_DIRS = [WHISPER_DIR, RRD_DIR] # Default: set from the above variables +@@ -244,7 +244,7 @@ + # + #DATABASES = { + # 'default': { +-# 'NAME': '/opt/graphite/storage/graphite.db', ++# 'NAME': '@GENTOO_PORTAGE_EPREFIX@/var/lib/graphite-web/graphite.db', + # 'ENGINE': 'django.db.backends.sqlite3', + # 'USER': '', + # 'PASSWORD': '', diff --git a/net-analyzer/graphite-web/graphite-web-1.1.5-r1.ebuild b/net-analyzer/graphite-web/graphite-web-1.1.5-r1.ebuild new file mode 100644 index 000000000000..35eb0f1c76f7 --- /dev/null +++ b/net-analyzer/graphite-web/graphite-web-1.1.5-r1.ebuild @@ -0,0 +1,93 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +PYTHON_COMPAT=( python3_{6,7} ) # 3.8 dropped due to dep on python-memcached + +inherit distutils-r1 prefix + +DESCRIPTION="Enterprise scalable realtime graphing" +HOMEPAGE="https://graphiteapp.org/" +SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz" + +LICENSE="Apache-2.0" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="+carbon ldap mysql memcached postgres +sqlite" + +DEPEND="" +RDEPEND=" + carbon? ( dev-python/carbon[${PYTHON_USEDEP}] ) + ldap? ( dev-python/python-ldap[${PYTHON_USEDEP}] ) + memcached? ( dev-python/python-memcached[${PYTHON_USEDEP}] ) + mysql? ( dev-python/mysqlclient[${PYTHON_USEDEP}] ) + postgres? ( dev-python/psycopg:2[${PYTHON_USEDEP}] ) + >=dev-python/django-1.11.19[sqlite?,${PYTHON_USEDEP}] + >=dev-python/django-tagging-0.4.6[${PYTHON_USEDEP}] + dev-python/cairocffi[${PYTHON_USEDEP}] + dev-python/pyparsing[${PYTHON_USEDEP}] + dev-python/pytz[${PYTHON_USEDEP}] + dev-python/six[${PYTHON_USEDEP}] + dev-python/urllib3[${PYTHON_USEDEP}] + media-libs/fontconfig +" + +PATCHES=( + # Do not install the configuration and data files. We install them + # somewhere sensible by hand. + "${FILESDIR}"/${PN}-1.1.5-fhs-paths.patch +) + +python_prepare_all() { + # Use a less common name + mv bin/build-index bin/${PN}-build-index || die + # use FHS-style paths + export GRAPHITE_NO_PREFIX=yes + distutils-r1_python_prepare_all + eprefixify \ + conf/graphite.wsgi.example \ + webapp/graphite/local_settings.py.example +} + +python_install_all() { + distutils-r1_python_install_all + keepdir /var/{lib,log}/${PN} + docinto examples + docompress -x "/usr/share/doc/${PF}/examples" + dodoc \ + examples/example-graphite-vhost.conf \ + conf/dashboard.conf.example \ + conf/graphite.wsgi.example +} + +python_install() { + distutils-r1_python_install \ + --install-data="${EPREFIX}"/usr/share/${PN} + + insinto /etc/${PN} + newins webapp/graphite/local_settings.py.example local_settings.py + pushd "${D}/$(python_get_sitedir)"/graphite > /dev/null || die + ln -s ../../../../../etc/${PN}/local_settings.py local_settings.py || die + popd > /dev/null || die +} + +pkg_config() { + "${EROOT}"/usr/bin/django-admin.py migrate \ + --settings=graphite.settings --run-syncdb + "${EROOT}"/usr/bin/${PN}-build-index +} + +pkg_postinst() { + # Only display this for new installs + if [[ -z ${REPLACING_VERSIONS} ]]; then + elog "You need to configure ${PN} to run with a WSGI server of your choice." + elog "For example using Apache, you can use www-apache/mod_wsgi," + elog " using Nginx, you can use www-servers/uwsgi." + elog "Don't forget to edit local_settings.py in ${EPREFIX}/etc/${PN}" + elog "See https://graphite.readthedocs.org/en/latest/config-local-settings.html" + elog "Run emerge --config =${PN}-${PVR} if this is a fresh install." + elog "" + elog "If you want to update the search index regularily, you should consider running" + elog "the '${PN}-build-index' script in a crontab." + fi +} diff --git a/net-analyzer/graphite-web/graphite-web-1.1.7.ebuild b/net-analyzer/graphite-web/graphite-web-1.1.7.ebuild new file mode 100644 index 000000000000..74a4e43dac93 --- /dev/null +++ b/net-analyzer/graphite-web/graphite-web-1.1.7.ebuild @@ -0,0 +1,96 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +PYTHON_COMPAT=( python3_{6,7} ) # 3.8 dropped due to dep on python-memcached + # 1.1.7 supports up to 3.9, so it's a matter of deps + +inherit distutils-r1 prefix + +DESCRIPTION="Enterprise scalable realtime graphing" +HOMEPAGE="https://graphiteapp.org/" +SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz" + +LICENSE="Apache-2.0" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="+carbon ldap mysql memcached postgres +sqlite" + +DEPEND="" +RDEPEND=" + carbon? ( dev-python/carbon[${PYTHON_USEDEP}] ) + ldap? ( dev-python/python-ldap[${PYTHON_USEDEP}] ) + memcached? ( dev-python/python-memcached[${PYTHON_USEDEP}] ) + mysql? ( dev-python/mysqlclient[${PYTHON_USEDEP}] ) + postgres? ( dev-python/psycopg:2[${PYTHON_USEDEP}] ) + >=dev-python/django-1.11.19[sqlite?,${PYTHON_USEDEP}] + >=dev-python/django-tagging-0.4.6[${PYTHON_USEDEP}] + dev-python/cairocffi[${PYTHON_USEDEP}] + dev-python/pyparsing[${PYTHON_USEDEP}] + dev-python/pytz[${PYTHON_USEDEP}] + dev-python/six[${PYTHON_USEDEP}] + dev-python/urllib3[${PYTHON_USEDEP}] + media-libs/fontconfig +" + +PATCHES=( + # Do not install the configuration and data files. We install them + # somewhere sensible by hand. + "${FILESDIR}"/${PN}-1.1.7-fhs-paths.patch +) + +python_prepare_all() { + # Use a less common name + mv bin/build-index bin/${PN}-build-index || die + # use FHS-style paths + export GRAPHITE_NO_PREFIX=yes + distutils-r1_python_prepare_all + eprefixify \ + conf/graphite.wsgi.example \ + webapp/graphite/local_settings.py.example +} + +python_install_all() { + distutils-r1_python_install_all + keepdir /var/{lib,log}/${PN} + docinto examples + docompress -x "/usr/share/doc/${PF}/examples" + dodoc \ + examples/example-graphite-vhost.conf \ + conf/dashboard.conf.example \ + conf/graphite.wsgi.example +} + +python_install() { + distutils-r1_python_install \ + --install-data="${EPREFIX}"/usr/share/${PN} + + insinto /etc/${PN} + newins webapp/graphite/local_settings.py.example local_settings.py + pushd "${D}/$(python_get_sitedir)"/graphite > /dev/null || die + ln -s ../../../../../etc/${PN}/local_settings.py local_settings.py || die + popd > /dev/null || die + + python_optimize +} + +pkg_config() { + "${EROOT}"/usr/bin/django-admin.py migrate \ + --settings=graphite.settings --run-syncdb + "${EROOT}"/usr/bin/${PN}-build-index +} + +pkg_postinst() { + # Only display this for new installs + if [[ -z ${REPLACING_VERSIONS} ]]; then + elog "You need to configure ${PN} to run with a WSGI server of your choice." + elog "For example using Apache, you can use www-apache/mod_wsgi," + elog " using Nginx, you can use www-servers/uwsgi." + elog "Don't forget to edit local_settings.py in ${EPREFIX}/etc/${PN}" + elog "See https://graphite.readthedocs.org/en/latest/config-local-settings.html" + elog "Run emerge --config =${PN}-${PVR} if this is a fresh install." + elog "" + elog "If you want to update the search index regularily, you should consider running" + elog "the '${PN}-build-index' script in a crontab." + fi +} diff --git a/net-analyzer/graphite-web/metadata.xml b/net-analyzer/graphite-web/metadata.xml new file mode 100644 index 000000000000..8a64c0e99384 --- /dev/null +++ b/net-analyzer/graphite-web/metadata.xml @@ -0,0 +1,18 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>grobian@gentoo.org</email> + <name>Fabian Groffen</name> + </maintainer> + <use> + <flag name="memcached">Enable memcached support</flag> + <flag name="carbon">Enable carbon support</flag> + </use> + <upstream> + <remote-id type="pypi">graphite-web</remote-id> + <remote-id type="github">graphite-project/graphite-web</remote-id> + <bugs-to>https://github.com/graphite-project/graphite-web/issues</bugs-to> + </upstream> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/greenbone-security-assistant/Manifest b/net-analyzer/greenbone-security-assistant/Manifest new file mode 100644 index 000000000000..df14862f3ba3 --- /dev/null +++ b/net-analyzer/greenbone-security-assistant/Manifest @@ -0,0 +1,4 @@ +DIST greenbone-security-assistant-8.0.1-node_modules.tar.gz 34084175 BLAKE2B 17c9e24961b63b957f932e4c5970113499ad65655b42e624284fb22a495d50c12e5f8289da4e17db717885b65909a6e18213fa312052c9c06c9bdc37816204f1 SHA512 552ea55fe218ae2345fa45b43af349825f255ccd86137dd245679efe6abc805d16c4ced3599f644d9b9f2686047b486d5e0c8aa4eaa0cbbf13157b9e2dbc8cc2 +DIST greenbone-security-assistant-8.0.1.tar.gz 1558918 BLAKE2B 75287784ed215300cfb30101d39b06b134092ca2d4311bcca976be23cc289529c6a8d661b99cb28e890c68f27e93a9259681add067749a772b7e3aea28761f3b SHA512 b91c1c4b8073c3ad3d3d636abbaa7881393f1448eae7366636ff618391c199c240e6bc4c848740a4267b4142aa872fb91c0798b8034d152d16016e650fbda2b8 +DIST greenbone-security-assistant-9.0.0-node_modules.tar.gz 52811832 BLAKE2B e4d0f77722158b2fddfea55e8238abcc46de6aa821b81ca59087a0fc0a0c1383b9ce876a31d8f133cca53d9a81962a80925d5b26e036b09b3c3e7ef64edc3a29 SHA512 1bb3b338ac71c16375be6518fe371c1d8037de34067be9ecf1b423e5ac649825b2cbd36a29c43a3cc0b2b622a9b64ca356c4d073bbdf74b07c74953457f0b268 +DIST greenbone-security-assistant-9.0.0.tar.gz 1807537 BLAKE2B 00690e4f6dd1078a79c9309e19c751a6f31b856a2de762e0f1d0e8ce8601c82351b059a8995a9051a6fc1061d3ae9bf27c49fcaef6e76d3837f308eef06bf79f SHA512 5f2b955408e0231b96f4b2415df0c76e9003079acd65b9e1c771082999540121ff92a8c17d9529362be8f7fc632d91bd3f48854a5a2d9632efe10fb354361d8e diff --git a/net-analyzer/greenbone-security-assistant/files/greenbone-security-assistant-8.0.1-cmakelist.patch b/net-analyzer/greenbone-security-assistant/files/greenbone-security-assistant-8.0.1-cmakelist.patch new file mode 100644 index 000000000000..d0fc7963a501 --- /dev/null +++ b/net-analyzer/greenbone-security-assistant/files/greenbone-security-assistant-8.0.1-cmakelist.patch @@ -0,0 +1,30 @@ +--- a/gsad/config/CMakeLists.txt 2019-07-18 20:39:10.331949702 +0300 ++++ b/gsad/config/CMakeLists.txt 2019-07-18 20:40:18.946830294 +0300 +@@ -16,27 +16,3 @@ + # along with this program; if not, write to the Free Software + # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + +-if (NOT SYSTEMD_SERVICE_DIR) +- set (SYSTEMD_SERVICE_DIR "${CMAKE_INSTALL_PREFIX}/lib/systemd/system") +-endif (NOT SYSTEMD_SERVICE_DIR) +- +-if (NOT DEFAULT_CONFIG_DIR) +- set (DEFAULT_CONFIG_DIR "${CMAKE_INSTALL_PREFIX}/etc/default") +-endif (NOT DEFAULT_CONFIG_DIR) +- +-if (NOT LOGROTATE_DIR) +- set (LOGROTATE_DIR "${CMAKE_INSTALL_PREFIX}/etc/logrotate.d") +-endif (NOT LOGROTATE_DIR) +- +-configure_file (gsad.service.in gsad.service) +-configure_file (gsad.logrotate.in gsad.logrotate) +- +-install (FILES ${CMAKE_CURRENT_BINARY_DIR}/gsad.service +- DESTINATION ${SYSTEMD_SERVICE_DIR}/) +- +-install (FILES ${CMAKE_CURRENT_SOURCE_DIR}/gsad.default +- DESTINATION ${DEFAULT_CONFIG_DIR}/ RENAME gsad) +- +-install (FILES ${CMAKE_CURRENT_BINARY_DIR}/gsad.logrotate +- DESTINATION ${LOGROTATE_DIR}/ RENAME gsad) +- diff --git a/net-analyzer/greenbone-security-assistant/files/greenbone-security-assistant-8.0.1-node.patch b/net-analyzer/greenbone-security-assistant/files/greenbone-security-assistant-8.0.1-node.patch new file mode 100644 index 000000000000..116bd48264dd --- /dev/null +++ b/net-analyzer/greenbone-security-assistant/files/greenbone-security-assistant-8.0.1-node.patch @@ -0,0 +1,34 @@ +--- a/gsa/CMakeLists.txt 2019-07-17 16:45:39.000000000 +0300 ++++ b/gsa/CMakeLists.txt 2019-07-17 22:24:49.466906757 +0300 +@@ -1095,28 +1095,17 @@ + ${GSA_JS_SRC_FILES} + PARENT_SCOPE) + +- +-add_custom_command (OUTPUT node-modules.stamp +- DEPENDS ${GSA_PKG_FILES} +- COMMAND ${INSTALLER} "${INSTALLER_ARGS}" "install" +- COMMAND ${CMAKE_COMMAND} -E touch ${CMAKE_CURRENT_BINARY_DIR}/node-modules.stamp +- WORKING_DIRECTORY ${GSA_SRC_DIR} +- COMMENT "Install gsa-ng js dependencies") +- +- + add_custom_command (OUTPUT bundle.stamp +- COMMAND ${CMAKE_COMMAND} -E env REACT_APP_VERSION=${PROJECT_VERSION_STRING} ${INSTALLER} "${INSTALLER_ARGS}" run build ++ COMMAND ${CMAKE_COMMAND} -E env REACT_APP_VERSION=${PROJECT_VERSION_STRING} ${INSTALLER} --offline run build + COMMAND ${CMAKE_COMMAND} -E touch ${CMAKE_CURRENT_BINARY_DIR}/bundle.stamp + WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} +- DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/node-modules.stamp +- ${GSA_PKG_FILES} ++ DEPENDS ${GSA_PKG_FILES} + ${GSA_STATIC_SRC_FILES} + ${GSA_JS_SRC_FILES} + COMMENT "Build gsa-ng install files") + + add_custom_target (gsa-ng ALL +- DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/node-modules.stamp +- ${CMAKE_CURRENT_BINARY_DIR}/bundle.stamp) ++ DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/bundle.stamp) + + set (GSA_STATIC_BUILD_FILES + ${GSA_BUILD_DIR}/index.html) diff --git a/net-analyzer/greenbone-security-assistant/files/greenbone-security-assistant-8.0.1-pid.patch b/net-analyzer/greenbone-security-assistant/files/greenbone-security-assistant-8.0.1-pid.patch new file mode 100644 index 000000000000..a318c87225e1 --- /dev/null +++ b/net-analyzer/greenbone-security-assistant/files/greenbone-security-assistant-8.0.1-pid.patch @@ -0,0 +1,11 @@ +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -222,7 +222,7 @@ if (NOT DATADIR) + endif (NOT DATADIR) + + if (NOT GSAD_PID_DIR) +- set (GSAD_PID_DIR "${LOCALSTATEDIR}/run") ++ set (GSAD_PID_DIR "/run") + endif (NOT GSAD_PID_DIR) + + set (OPENVAS_STATE_DIR "${LOCALSTATEDIR}/lib/openvas") diff --git a/net-analyzer/greenbone-security-assistant/files/greenbone-security-assistant-8.0.1-reactjs.patch b/net-analyzer/greenbone-security-assistant/files/greenbone-security-assistant-8.0.1-reactjs.patch new file mode 100644 index 000000000000..19a4731db75b --- /dev/null +++ b/net-analyzer/greenbone-security-assistant/files/greenbone-security-assistant-8.0.1-reactjs.patch @@ -0,0 +1,20 @@ +--- a/gsa/package.json 2019-07-17 16:45:39.000000000 +0300 ++++ b/gsa/package.json 2019-07-17 22:40:31.371899489 +0300 +@@ -66,12 +66,12 @@ + "x2js": "^3.2.6" + }, + "scripts": { +- "test": "react-scripts test", +- "test:coverage": "react-scripts test --coverage --maxWorkers 2", ++ "test": "NODE_ENV=production node_modules/react-scripts/bin/react-scripts.js test", ++ "test:coverage": "NODE_ENV=production node_modules/react-scripts/bin/react-scripts.js test --coverage --maxWorkers 2", + "lint": "eslint --max-warnings 0 src", +- "start": "react-scripts start", +- "build": "react-scripts build", +- "eject": "react-scripts eject" ++ "start": "NODE_ENV=production node_modules/react-scripts/bin/react-scripts.js start", ++ "build": "NODE_ENV=production node_modules/react-scripts/bin/react-scripts.js build", ++ "eject": "NODE_ENV=production node_modules/react-scripts/bin/react-scripts.js eject" + }, + "devDependencies": { + "@types/jest": "^24.0.12", diff --git a/net-analyzer/greenbone-security-assistant/files/greenbone-security-assistant-8.0.1-sbin.patch b/net-analyzer/greenbone-security-assistant/files/greenbone-security-assistant-8.0.1-sbin.patch new file mode 100644 index 000000000000..c1825ba3f5db --- /dev/null +++ b/net-analyzer/greenbone-security-assistant/files/greenbone-security-assistant-8.0.1-sbin.patch @@ -0,0 +1,12 @@ +--- a/gsad/src/CMakeLists.txt 2019-07-21 23:07:38.375683800 +0300 ++++ a/gsad/src/CMakeLists.txt 2019-07-21 23:08:17.301651451 +0300 +@@ -175,7 +175,7 @@ + ## Install + + install (TARGETS gsad +- RUNTIME DESTINATION ${SBINDIR} ++ RUNTIME DESTINATION ${BINDIR} + LIBRARY DESTINATION ${LIBDIR} + ARCHIVE DESTINATION ${LIBDIR}/static) + + diff --git a/net-analyzer/greenbone-security-assistant/files/greenbone-security-assistant-8.0.1-uninstall-snippet.patch b/net-analyzer/greenbone-security-assistant/files/greenbone-security-assistant-8.0.1-uninstall-snippet.patch new file mode 100644 index 000000000000..3b075951aba6 --- /dev/null +++ b/net-analyzer/greenbone-security-assistant/files/greenbone-security-assistant-8.0.1-uninstall-snippet.patch @@ -0,0 +1,12 @@ +--- a/gsa/CMakeLists.txt 2019-07-18 23:14:04.639202986 +0300 ++++ b/gsa/CMakeLists.txt 2019-07-18 23:21:54.568052589 +0300 +@@ -1116,9 +1116,6 @@ + install (FILES public/robots.txt + DESTINATION ${GSA_DEST_DIR}) + +-# remove old generated files +-install (CODE "file(REMOVE_RECURSE ${GSA_DEST_DIR}/static)") +- + install (DIRECTORY + ${GSA_BUILD_DIR}/static + ${GSA_BUILD_DIR}/img diff --git a/net-analyzer/greenbone-security-assistant/files/greenbone-security-assistant-9.0.0-uninstall-snippet.patch b/net-analyzer/greenbone-security-assistant/files/greenbone-security-assistant-9.0.0-uninstall-snippet.patch new file mode 100644 index 000000000000..8622fd810674 --- /dev/null +++ b/net-analyzer/greenbone-security-assistant/files/greenbone-security-assistant-9.0.0-uninstall-snippet.patch @@ -0,0 +1,12 @@ +--- a/gsa/CMakeLists.txt 2019-07-18 23:14:04.639202986 +0300 ++++ b/gsa/CMakeLists.txt 2019-07-18 23:21:54.568052589 +0300 +@@ -1164,9 +1164,6 @@ + install (FILES public/robots.txt + DESTINATION ${GSA_DEST_DIR}) + +-# remove old generated files +-install (CODE "file(REMOVE_RECURSE ${GSA_DEST_DIR}/static)") +- + install (DIRECTORY + ${GSA_BUILD_DIR}/static + ${GSA_BUILD_DIR}/img diff --git a/net-analyzer/greenbone-security-assistant/files/gsa.nginx.reverse.proxy.example b/net-analyzer/greenbone-security-assistant/files/gsa.nginx.reverse.proxy.example new file mode 100644 index 000000000000..b233911a2f1d --- /dev/null +++ b/net-analyzer/greenbone-security-assistant/files/gsa.nginx.reverse.proxy.example @@ -0,0 +1,78 @@ +upstream backend { + server 127.0.0.1:9392; + keepalive 64; +} + +server { + listen IP:80; + server_name openvas.domain.tdl; + return 301 https://openvas.domain.tdl$request_uri; +} + +server { + listen IP:443 ssl http2; + server_name openvas.domain.tdl; + access_log /var/log/nginx/openvas.domain.tdl.access.log; + error_log /var/log/nginx/openvas.domain.tdl.error.log; + # Not sourcing directly from file + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + fastcgi_param QUERY_STRING $query_string; + fastcgi_param REQUEST_METHOD $request_method; + fastcgi_param CONTENT_TYPE $content_type; + fastcgi_param CONTENT_LENGTH $content_length; + fastcgi_param SCRIPT_NAME $fastcgi_script_name; + fastcgi_param REQUEST_URI $request_uri; + fastcgi_param DOCUMENT_URI $document_uri; + fastcgi_param SERVER_PROTOCOL $server_protocol; + fastcgi_param REQUEST_SCHEME $scheme; + fastcgi_param HTTPS $https; + fastcgi_param GATEWAY_INTERFACE CGI/1.1; + fastcgi_param SERVER_SOFTWARE nginx/$nginx_version; + fastcgi_param REMOTE_ADDR $remote_addr; + fastcgi_param REMOTE_PORT $remote_port; + fastcgi_param SERVER_ADDR $server_addr; + fastcgi_param SERVER_PORT $server_port; + fastcgi_param SERVER_NAME $server_name; + fastcgi_param REDIRECT_STATUS 200; + fastcgi_param HTTP_PROXY ""; + fastcgi_param PATH_INFO $fastcgi_path_info; + fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info; + fastcgi_param DOCUMENT_ROOT $document_root; + + location / { + proxy_set_header Host $http_host; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header REMOTE_HOST $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-FORWARDED-PROTOCOL $scheme; + proxy_pass https://backend; + proxy_http_version 1.1; + proxy_pass_request_headers on; + proxy_set_header Connection "keep-alive"; + proxy_store off; + gzip on; + gzip_proxied any; + gzip_types *; + } + + resolver 127.0.0.1; + resolver_timeout 6s; + ssl_certificate /openvas.domain.tdl/fullchain.pem; + ssl_certificate_key /openvas.domain.tdl/privkey.pem; + ssl_trusted_certificate /openvas.domain.tdl/chain.pem; + ssl_dhparam /openvas.domain.tdl/dhparam.pem; + ssl_protocols TLSv1 TLSv1.1 TLSv1.2; + ssl_prefer_server_ciphers on; + ssl_ciphers ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA:ECDHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-RSA-AES256-SHA256:DHE-RSA-AES256-SHA:ECDHE-ECDSA-DES-CBC3-SHA:ECDHE-RSA-DES-CBC3-SHA:EDH-RSA-DES-CBC3-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:DES-CBC3-SHA:!DSS; + ssl_ecdh_curve secp384r1; + ssl_stapling on; + ssl_stapling_verify on; + ssl_session_cache shared:SSL:40m; + ssl_session_timeout 21h; + ssl_session_tickets off; + ssl_buffer_size 4k; + add_header Referrer-Policy no-referrer-when-downgrade; + add_header X-Frame-Options "SAMEORIGIN"; + add_header X-Content-Type-Options "nosniff"; + add_header X-XSS-Protection "1; mode=block"; +} diff --git a/net-analyzer/greenbone-security-assistant/files/gsad-daemon.conf b/net-analyzer/greenbone-security-assistant/files/gsad-daemon.conf new file mode 100644 index 000000000000..f7c7ee514e50 --- /dev/null +++ b/net-analyzer/greenbone-security-assistant/files/gsad-daemon.conf @@ -0,0 +1,19 @@ +# Greenbone Security Assistant command args + +# e.g. --foreground | e.g. --no-redirect +GSAD_OPTIONS="--no-redirect" + +# GSAD listen adress +GSAD_LISTEN_ADDRESS="--listen=127.0.0.1" + +# GSAD listen port +GSAD_LISTEN_PORT="--port=9392" + +# GVMD listen address +GVMD_LISTEN_ADDRESS="--mlisten=127.0.0.1" + +# GVMD listen port +GVMD_LISTEN_PORT="--mport=9390" + +# TLS Settings +GSAD_GNUTLS_PRIORITIES="--gnutls-priorities=NORMAL" diff --git a/net-analyzer/greenbone-security-assistant/files/gsad.init b/net-analyzer/greenbone-security-assistant/files/gsad.init new file mode 100644 index 000000000000..7dc4b82afa78 --- /dev/null +++ b/net-analyzer/greenbone-security-assistant/files/gsad.init @@ -0,0 +1,20 @@ +#!/sbin/openrc-run +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +: ${GSAD_USER:=gvm} +: ${GSAD_GROUP:=gvm} +: ${GSAD_TIMEOUT:=30} + +name="Greenbone Security Assistant (GSA)" +command="/usr/bin/gsad" +command_args="--foreground ${GSAD_OPTIONS} ${GSAD_LISTEN_ADDRESS} ${GSAD_LISTEN_PORT} ${GVMD_LISTEN_ADDRESS} ${GVMD_LISTEN_PORT} ${GSAD_GNUTLS_PRIORITIES}" +command_background="true" +command_user="${GSAD_USER}:${GSAD_GROUP}" +pidfile="/run/gsad.pid" +retry="${GSAD_TIMEOUT}" + +depend() { + after bootmisc + need localmount net gvmd +} diff --git a/net-analyzer/greenbone-security-assistant/files/gsad.logrotate b/net-analyzer/greenbone-security-assistant/files/gsad.logrotate new file mode 100644 index 000000000000..f80bba881c7b --- /dev/null +++ b/net-analyzer/greenbone-security-assistant/files/gsad.logrotate @@ -0,0 +1,13 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 +# Daemon ignore HUP so we use 'copytruncate' instead of 'create' +# with safe file size to prevent losing log entries. + +/var/log/gvm/gsad.log { + compress + missingok + notifempty + sharedscripts + copytruncate + maxsize 10M +} diff --git a/net-analyzer/greenbone-security-assistant/files/gsad.service b/net-analyzer/greenbone-security-assistant/files/gsad.service new file mode 100644 index 000000000000..91e791878008 --- /dev/null +++ b/net-analyzer/greenbone-security-assistant/files/gsad.service @@ -0,0 +1,18 @@ +[Unit] +Description=Greenbone Security Assistant +After=network.target +After=openvassd.service +After=gvmd.service +Wants=gvmd.service + +[Service] +Type=forking +User=gvm +Group=gvm +EnvironmentFile=-/etc/gvm/sysconfig/gsad-daemon.conf +ExecStart=/usr/bin/gsad $GSAD_OPTIONS $GSAD_LISTEN_ADDRESS $GSAD_LISTEN_PORT $GVMD_LISTEN_ADDRESS $GVMD_LISTEN_PORT $GSAD_GNUTLS_PRIORITIES +Restart=always +RestartSec=10 + +[Install] +WantedBy=multi-user.target diff --git a/net-analyzer/greenbone-security-assistant/greenbone-security-assistant-8.0.1-r1.ebuild b/net-analyzer/greenbone-security-assistant/greenbone-security-assistant-8.0.1-r1.ebuild new file mode 100644 index 000000000000..d616891de50b --- /dev/null +++ b/net-analyzer/greenbone-security-assistant/greenbone-security-assistant-8.0.1-r1.ebuild @@ -0,0 +1,125 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +CMAKE_MAKEFILE_GENERATOR="emake" +inherit cmake flag-o-matic systemd toolchain-funcs + +MY_PN="gsa" +MY_DN="gsad" +MY_NODE_N="node_modules" + +DESCRIPTION="Greenbone Security Assistant" +HOMEPAGE="https://www.greenbone.net/en/" +SRC_URI="https://github.com/greenbone/${MY_PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz + https://github.com/greenbone/gsa/releases/download/v8.0.1/gsa-node-modules-8.0.1.tar.gz -> ${P}-${MY_NODE_N}.tar.gz" + +SLOT="0" +LICENSE="GPL-2+" +KEYWORDS="~amd64 ~x86" +IUSE="extras" + +DEPEND=" + dev-libs/libgcrypt:0= + dev-libs/libxslt + >=net-analyzer/gvm-libs-10.0.1 + net-libs/gnutls:= + net-libs/libmicrohttpd" + +RDEPEND=" + ${DEPEND} + ~net-analyzer/openvas-scanner-6.0.1 + >=net-analyzer/gvmd-8.0.1" + +BDEPEND=" + >=net-libs/nodejs-8.12.0 + >=sys-apps/yarn-1.15.2 + virtual/pkgconfig + extras? ( app-doc/doxygen[dot] + app-doc/xmltoman + app-text/htmldoc + dev-python/polib + sys-devel/gettext + )" + +BUILD_DIR="${WORKDIR}/${MY_PN}-${PV}_build" +S="${WORKDIR}/${MY_PN}-${PV}" +MY_NODE_DIR="${S}/${MY_PN}/" + +PATCHES=( + # QA fix for 8.0.0. + "${FILESDIR}/${P}-pid.patch" + # Disable yarn-fetch during compile. + "${FILESDIR}/${P}-node.patch" + # Fix react-env path for react.js. + "${FILESDIR}/${P}-reactjs.patch" + # Remove ugly uninstall-snippet that causes failing re-emerge. + "${FILESDIR}/${P}-uninstall-snippet.patch" + # Remove unnecessary install paths/files. + "${FILESDIR}/${P}-cmakelist.patch" + # Install exec. to /usr/bin instead of /usr/sbin + "${FILESDIR}/${P}-sbin.patch" +) + +src_prepare() { + cmake_src_prepare + # We will use pre-generated npm stuff. + mv "${WORKDIR}/${MY_NODE_N}" "${MY_NODE_DIR}" || die "couldn't move node_modules" + # Update .yarnrc accordingly. + echo "--modules-folder ${MY_NODE_DIR}" >> "${S}/${MY_PN}/.yarnrc" || die "echo failed" + # QA-Fix | Remove !CLANG doxygen warnings for 8.0.1 + if use extras; then + if ! tc-is-clang; then + local f + for f in gsad/doc/*.in + do + sed -i \ + -e "s*CLANG_ASSISTED_PARSING = NO*#CLANG_ASSISTED_PARSING = NO*g" \ + -e "s*CLANG_OPTIONS*#CLANG_OPTIONS*g" \ + "${f}" || die "couldn't disable CLANG parsing" + done + fi + fi +} + +src_configure() { + local mycmakeargs=( + "-DLOCALSTATEDIR=${EPREFIX}/var" + "-DSYSCONFDIR=${EPREFIX}/etc" + ) + # Add release hardening flags for 8.0.1 + append-cflags -D_FORTIFY_SOURCE=2 -fstack-protector + append-ldflags -Wl,-z,relro -Wl,-z,now + cmake_src_configure +} + +src_compile() { + cmake_src_compile + if use extras; then + cmake_build -C "${BUILD_DIR}" doc + cmake_build doc-full -C "${BUILD_DIR}" doc + HTML_DOCS=( "${BUILD_DIR}/${MY_DN}/doc/generated/html/." ) + fi + cmake_build rebuild_cache +} + +src_install() { + cmake_src_install + + insinto /etc/gvm/sysconfig + doins "${FILESDIR}/${MY_DN}-daemon.conf" + + dodir /etc/gvm/reverse-proxy + insinto /etc/gvm/reverse-proxy + doins "${FILESDIR}/${MY_PN}.nginx.reverse.proxy.example" + fowners -R gvm:gvm /etc/gvm + + newinitd "${FILESDIR}/${MY_DN}.init" "${MY_DN}" + newconfd "${FILESDIR}/${MY_DN}-daemon.conf" "${MY_DN}" + + insinto /etc/logrotate.d + newins "${FILESDIR}/${MY_DN}.logrotate" "${MY_DN}" + + systemd_dounit "${FILESDIR}/${MY_DN}.service" +} diff --git a/net-analyzer/greenbone-security-assistant/greenbone-security-assistant-9.0.0.ebuild b/net-analyzer/greenbone-security-assistant/greenbone-security-assistant-9.0.0.ebuild new file mode 100644 index 000000000000..d4ec6d1546fd --- /dev/null +++ b/net-analyzer/greenbone-security-assistant/greenbone-security-assistant-9.0.0.ebuild @@ -0,0 +1,122 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +CMAKE_MAKEFILE_GENERATOR="emake" +inherit cmake flag-o-matic systemd toolchain-funcs + +MY_PN="gsa" +MY_DN="gsad" +MY_NODE_N="node_modules" + +DESCRIPTION="Greenbone Security Assistant" +HOMEPAGE="https://www.greenbone.net/en/" +SRC_URI="https://github.com/greenbone/${MY_PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz +https://github.com/greenbone/${MY_PN}/releases/download/v${PV}/gsa-node-modules-${PV}.tar.gz -> ${P}-${MY_NODE_N}.tar.gz" + +SLOT="0" +LICENSE="GPL-2+" +KEYWORDS="~amd64 ~x86" +IUSE="extras" + +DEPEND=" + dev-libs/libgcrypt:0= + dev-libs/libxml2 + dev-libs/libxslt + >=net-analyzer/gvm-libs-10.0.1 + net-libs/gnutls:= + net-libs/libmicrohttpd" + +RDEPEND=" + ${DEPEND} + >=net-analyzer/gvmd-9.0.0 + net-analyzer/ospd-openvas" + +BDEPEND=" + dev-python/polib + >=net-libs/nodejs-8.12.0 + >=sys-apps/yarn-1.15.2 + virtual/pkgconfig + extras? ( + app-doc/doxygen[dot] + app-doc/xmltoman + app-text/htmldoc + sys-devel/gettext + )" + +BUILD_DIR="${WORKDIR}/${MY_PN}-${PV}_build" +S="${WORKDIR}/${MY_PN}-${PV}" +MY_NODE_DIR="${S}/${MY_PN}/" + +PATCHES=( + # Disable yarn-fetch during compile. + "${FILESDIR}/${PN}-8.0.1-node.patch" + # Remove ugly uninstall-snippet that causes failing re-emerge. + "${FILESDIR}/${P}-uninstall-snippet.patch" +) + +src_prepare() { + cmake_src_prepare + # We will use pre-generated npm stuff. + mv "${WORKDIR}/${MY_NODE_N}" "${MY_NODE_DIR}" || die "couldn't move node_modules" + # Update .yarnrc accordingly. + echo "--modules-folder ${MY_NODE_DIR}" >> "${S}/${MY_PN}/.yarnrc" || die "echo failed" + # QA-Fix | Remove !CLANG doxygen warnings for 9.0.0 + if use extras; then + if ! tc-is-clang; then + local f + for f in gsad/doc/*.in + do + sed -i \ + -e "s*CLANG_ASSISTED_PARSING = NO*#CLANG_ASSISTED_PARSING = NO*g" \ + -e "s*CLANG_OPTIONS*#CLANG_OPTIONS*g" \ + "${f}" || die "couldn't disable CLANG parsing" + done + fi + fi +} + +src_configure() { + local mycmakeargs=( + "-DLOCALSTATEDIR=${EPREFIX}/var" + "-DSYSCONFDIR=${EPREFIX}/etc" + "-DSBINDIR=${EPREFIX}/usr/bin" + "-DGSAD_PID_DIR=${EPREFIX}/run/" + "-DDEFAULT_CONFIG_DIR=${EPREFIX}/etc/default" + "-DLOGROTATE_DIR=${EPREFIX}/etc/logrotate.d" + ) + cmake_src_configure +} + +src_compile() { + # setting correct PATH for finding react-js + NODE_ENV=production PATH="$PATH:${S}/gsa/node_modules/.bin/" cmake_src_compile + if use extras; then + cmake_build -C "${BUILD_DIR}" doc + cmake_build doc-full -C "${BUILD_DIR}" doc + fi + cmake_build rebuild_cache +} + +src_install() { + if use extras; then + local HTML_DOCS=( "${BUILD_DIR}/${MY_DN}/doc/generated/html/." ) + fi + cmake_src_install + + insinto /etc/gvm/sysconfig + doins "${FILESDIR}/${MY_DN}-daemon.conf" + + insinto /etc/gvm/reverse-proxy + doins "${FILESDIR}/${MY_PN}.nginx.reverse.proxy.example" + fowners -R gvm:gvm /etc/gvm + + newinitd "${FILESDIR}/${MY_DN}.init" "${MY_DN}" + newconfd "${FILESDIR}/${MY_DN}-daemon.conf" "${MY_DN}" + + insinto /etc/logrotate.d + newins "${FILESDIR}/${MY_DN}.logrotate" "${MY_DN}" + + systemd_dounit "${FILESDIR}/${MY_DN}.service" +} diff --git a/net-analyzer/greenbone-security-assistant/metadata.xml b/net-analyzer/greenbone-security-assistant/metadata.xml new file mode 100644 index 000000000000..2469de4f0709 --- /dev/null +++ b/net-analyzer/greenbone-security-assistant/metadata.xml @@ -0,0 +1,25 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>jonas.licht@gmail.com</email> + <name>Jonas Licht</name> + </maintainer> + <maintainer type="project"> + <email>proxy-maint@gentoo.org</email> + <name>Proxy Maintainers</name> + </maintainer> + <use> + <flag name="extras">Pdf results, extra fonts, html docs support</flag> + </use> + <longdescription lang="en"> + The Greenbone Security Assistant is the web interface developed for the Greenbone Security Manager appliances. + It connects to the Greenbone Vulnerability Manager GVM to provide a full-featured user interface for vulnerability management. + Greenbone Security Assistant consists of GSA - The webpage written in React and + GSAD - The HTTP server talking to the GVM daemon. + </longdescription> + <upstream> + <remote-id type="github">greenbone/gsa</remote-id> + </upstream> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/gspoof/Manifest b/net-analyzer/gspoof/Manifest new file mode 100644 index 000000000000..e154fdd3a631 --- /dev/null +++ b/net-analyzer/gspoof/Manifest @@ -0,0 +1 @@ +DIST gspoof-3.2.tar.gz 69340 BLAKE2B c5769a242d6d388b7606594a01b6543822167505ea6210a05f6a514c47ea875efdea3e81b495b1a635fa15d9a065a35b631b20512b326304e366f692f8a73be5 SHA512 be90aeeb9ac93b5c4a190564ecfedd05ee077afed67696b773cb79949043975807dabed8f49597dcd3b08b9b0ee53c598caa9dced6f97bd9d6170f8e82b8f0f9 diff --git a/net-analyzer/gspoof/files/gspoof-3.2-icon.patch b/net-analyzer/gspoof/files/gspoof-3.2-icon.patch new file mode 100644 index 000000000000..863049e0d2c7 --- /dev/null +++ b/net-analyzer/gspoof/files/gspoof-3.2-icon.patch @@ -0,0 +1,71 @@ +Fix icon path and name. + +--- a/gtk.c ++++ b/gtk.c +@@ -24,9 +24,7 @@ + gtk_set_locale (); + gtk_init (&_argc, &_argv); + +- add_pixmap_directory ("pixmap"); +- add_pixmap_directory ("/usr/local/share/gspoof/pixmap"); +- add_pixmap_directory ("/usr/share/gspoof/pixmap"); ++ add_pixmap_directory ("/usr/share/pixmaps"); + + MainWin = create_MainWin(); + +--- a/interface.c ++++ b/interface.c +@@ -102,7 +102,7 @@ + gtk_widget_set_size_request (MainWin, 640, 480); + gtk_window_set_title (GTK_WINDOW (MainWin), BANNER); + gtk_window_set_position (GTK_WINDOW (MainWin), GTK_WIN_POS_CENTER); +- MainWin_icon_pixbuf = create_pixbuf ("icon.png"); ++ MainWin_icon_pixbuf = create_pixbuf ("gspoof.png"); + if (MainWin_icon_pixbuf) + { + gtk_window_set_icon (GTK_WINDOW (MainWin), MainWin_icon_pixbuf); +@@ -663,7 +663,7 @@ + gtk_widget_set_extension_events (DataWin, GDK_EXTENSION_EVENTS_CURSOR); + gtk_window_set_title (GTK_WINDOW (DataWin), _("Payload options")); + gtk_window_set_position (GTK_WINDOW (DataWin), GTK_WIN_POS_CENTER); +- DataWin_icon_pixbuf = create_pixbuf ("icon.png"); ++ DataWin_icon_pixbuf = create_pixbuf ("gspoof.png"); + if (DataWin_icon_pixbuf) + { + gtk_window_set_icon (GTK_WINDOW (DataWin), DataWin_icon_pixbuf); +@@ -754,7 +754,7 @@ + gtk_window_set_title (GTK_WINDOW (MultiPackets), _("Pseudo-flood options")); + gtk_window_set_position (GTK_WINDOW (MultiPackets), GTK_WIN_POS_CENTER); + gtk_window_set_resizable (GTK_WINDOW (MultiPackets), FALSE); +- MultiPackets_icon_pixbuf = create_pixbuf ("icon.png"); ++ MultiPackets_icon_pixbuf = create_pixbuf ("gspoof.png"); + if (MultiPackets_icon_pixbuf) + { + gtk_window_set_icon (GTK_WINDOW (MultiPackets), MultiPackets_icon_pixbuf); +@@ -884,7 +884,7 @@ + gtk_window_set_position (GTK_WINDOW (AboutWin), GTK_WIN_POS_CENTER); + gtk_window_set_default_size (GTK_WINDOW (AboutWin), 350, 200); + gtk_window_set_resizable (GTK_WINDOW (AboutWin), FALSE); +- AboutWin_icon_pixbuf = create_pixbuf ("icon.png"); ++ AboutWin_icon_pixbuf = create_pixbuf ("gspoof.png"); + if (AboutWin_icon_pixbuf) + { + gtk_window_set_icon (GTK_WINDOW (AboutWin), AboutWin_icon_pixbuf); +@@ -896,7 +896,7 @@ + gtk_container_add (GTK_CONTAINER (AboutWin), hbox1); + gtk_container_set_border_width (GTK_CONTAINER (hbox1), 2); + +- image16 = create_pixmap (AboutWin, "icon.png"); ++ image16 = create_pixmap (AboutWin, "gspoof.png"); + gtk_widget_show (image16); + gtk_box_pack_start (GTK_BOX (hbox1), image16, TRUE, TRUE, 0); + +@@ -936,7 +936,7 @@ + gtk_widget_set_size_request (ECNWin, -1, 90); + gtk_window_set_title (GTK_WINDOW (ECNWin), _("ECN options")); + gtk_window_set_position (GTK_WINDOW (ECNWin), GTK_WIN_POS_CENTER); +- ECNWin_icon_pixbuf = create_pixbuf ("icon.png"); ++ ECNWin_icon_pixbuf = create_pixbuf ("gspoof.png"); + if (ECNWin_icon_pixbuf) + { + gtk_window_set_icon (GTK_WINDOW (ECNWin), ECNWin_icon_pixbuf); diff --git a/net-analyzer/gspoof/files/gspoof-3.2-libdir.patch b/net-analyzer/gspoof/files/gspoof-3.2-libdir.patch new file mode 100644 index 000000000000..67674c2f5155 --- /dev/null +++ b/net-analyzer/gspoof/files/gspoof-3.2-libdir.patch @@ -0,0 +1,17 @@ +Don't assume that $(libdir) is lib. Rely on linker defaults instead. +--- a/configure.ac ++++ b/configure.ac +@@ -55,13 +55,6 @@ AC_ARG_WITH([libnet-prefix], + [ LIBNET_PREFIX=$withval ], + [ LIBNET_PREFIX=/usr ]) + +-AC_CHECK_FILE([$LIBNET_PREFIX/lib/libnet.a], +- [LDFLAGS="-L$LIBNET_PREFIX/lib" +- CPPFLAGS="-I$LIBNET_PREFIX/include" ], +- AC_MSG_ERROR([ +-Libnet-1.1.1 Packet Shaping Library is required! +-Verify to have installed it and pass --with-libnet-prefix to configure. +-Or download it from http://www.packetfactory.net/libnet ])) + + AC_CHECK_LIB(net, libnet_name2addr4,, + AC_MSG_ERROR([ diff --git a/net-analyzer/gspoof/files/gspoof-def-values.patch b/net-analyzer/gspoof/files/gspoof-def-values.patch new file mode 100644 index 000000000000..442f8e821b01 --- /dev/null +++ b/net-analyzer/gspoof/files/gspoof-def-values.patch @@ -0,0 +1,29 @@ +diff -Naurp gspoof-3.2-orig/gfuncts.c gspoof-3.2/gfuncts.c +--- gspoof-3.2-orig/gfuncts.c 2006-09-15 16:39:59.000000000 +0200 ++++ gspoof-3.2/gfuncts.c 2006-09-15 17:20:49.000000000 +0200 +@@ -47,12 +47,6 @@ int RestoreDefault() + struct libnet_ether_addr *ethaddr; /* eth address */ + libnet_t *l; + +- /* put default value */ +- bzero (&f, 6); +- bzero (&ck, 2); +- memset (data, '\0', 128); +- memset (device, '\0', 10); +- + /* loading libnet core */ + if ((l=libnet_init(LIBNET_LINK, NULL, ebuf))==NULL) + { +@@ -126,6 +120,12 @@ int RestoreDefault() + gtk_entry_set_text (GTK_ENTRY (win_entry), "32767"); + gtk_entry_set_text(GTK_ENTRY (urg_entry), ltostr(urgp)); + ++ /* put default value */ ++ bzero (&f, sizeof(f)); ++ bzero (&ck, sizeof(ck)); ++ memset (data, '\0', 128); ++ memset (device, '\0', 10); ++ + /* Set default variable values */ + f.syn=1; + m.number=10; diff --git a/net-analyzer/gspoof/gspoof-3.2-r3.ebuild b/net-analyzer/gspoof/gspoof-3.2-r3.ebuild new file mode 100644 index 000000000000..81f4bbad8ce7 --- /dev/null +++ b/net-analyzer/gspoof/gspoof-3.2-r3.ebuild @@ -0,0 +1,43 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit autotools desktop + +DESCRIPTION="A simple GTK/command line TCP/IP packet generator" +HOMEPAGE="http://gspoof.sourceforge.net/" +SRC_URI="http://gspoof.sourceforge.net/src/${P}.tar.gz" +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="amd64 ~ppc x86" + +IUSE="" + +DEPEND=" + x11-libs/gtk+:2 + dev-libs/glib:2 + net-libs/libnet:1.1 +" +RDEPEND="${DEPEND}" + +PATCHES=( + "${FILESDIR}"/${PN}-def-values.patch + "${FILESDIR}"/${P}-icon.patch + "${FILESDIR}"/${PN}-3.2-libdir.patch +) + +src_prepare() { + default + eautoreconf +} + +src_compile() { + emake CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}" +} + +src_install() { + dobin gspoof + newicon pixmap/icon.png ${PN}.png + dodoc README CHANGELOG TODO +} diff --git a/net-analyzer/gspoof/metadata.xml b/net-analyzer/gspoof/metadata.xml new file mode 100644 index 000000000000..13c8fb27fca0 --- /dev/null +++ b/net-analyzer/gspoof/metadata.xml @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <!-- maintainer-needed --> + <upstream> + <remote-id type="sourceforge">gspoof</remote-id> + </upstream> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/gvm-libs/Manifest b/net-analyzer/gvm-libs/Manifest new file mode 100644 index 000000000000..d017af87e934 --- /dev/null +++ b/net-analyzer/gvm-libs/Manifest @@ -0,0 +1,2 @@ +DIST gvm-libs-10.0.1.tar.gz 198483 BLAKE2B 4f4ddc7a3a1b4d45a51868cf03844365a9c4dd07f17ab53957ac4a1452ecba595885abdf01402a78aa784163aaba60b5c452fb9c2b5a11d38c40706e820c22c2 SHA512 961570e8fa8f89f0b462991bff1bf4e512ed6419cff6871c7432899847fb9edcc9f0adb7c280d12ee69fbb5c8e306c9e4366e2cbbb05fc3bae06795dcfb42206 +DIST gvm-libs-11.0.0.tar.gz 207205 BLAKE2B 026b999a48ad524df9305d219dd29f5deb71affb3f5d338ad1178924aa701f2fe698ee4009f4b5a6973de6e590a870871b3b708a2531aaba6e05755cd7f00f97 SHA512 ff981b4ca37b425a8d1f491e90bd1cef4701033886f9fd47dad34540b36fa275d4af8b176e63a07405cc1f29137851b96a6ce80c46ed92f809b089fb0cd928af diff --git a/net-analyzer/gvm-libs/files/gvm-libs-10.0.1-pid.patch b/net-analyzer/gvm-libs/files/gvm-libs-10.0.1-pid.patch new file mode 100644 index 000000000000..29c2a4cd83a6 --- /dev/null +++ b/net-analyzer/gvm-libs/files/gvm-libs-10.0.1-pid.patch @@ -0,0 +1,11 @@ +--- a/CMakeLists.txt 2019-04-05 11:27:07.000000000 +0300 ++++ b/CMakeLists.txt 2019-07-14 23:42:42.723081614 +0300 +@@ -172,7 +172,7 @@ + endif (NOT DATADIR) + + if (NOT GVM_PID_DIR) +- set (GVM_PID_DIR "${LOCALSTATEDIR}/run") ++ set (GVM_PID_DIR "/var/lib/gvm") + endif (NOT GVM_PID_DIR) + + if (NOT GVM_SYSCONF_DIR) diff --git a/net-analyzer/gvm-libs/files/gvm-libs-11.0.0-gnutls.patch b/net-analyzer/gvm-libs/files/gvm-libs-11.0.0-gnutls.patch new file mode 100644 index 000000000000..427647ddcd9c --- /dev/null +++ b/net-analyzer/gvm-libs/files/gvm-libs-11.0.0-gnutls.patch @@ -0,0 +1,22 @@ +From 61205ecc6e28f6a1af799ec40074a61037d9bf31 Mon Sep 17 00:00:00 2001 +From: Juan Jose Nicola <juan.nicola@greenbone.net> +Date: Mon, 28 Oct 2019 14:04:52 +0100 +Subject: [PATCH] Fix missing linking to libgnutls in util/CMakeLists.txt + +--- + util/CMakeLists.txt | 2 +- + 1 files changed, 1 insertions(+), 1 deletion(-) + +diff --git a/util/CMakeLists.txt b/util/CMakeLists.txt +index 2b7f441d..af5e363e 100644 +--- a/util/CMakeLists.txt ++++ b/util/CMakeLists.txt +@@ -158,7 +158,7 @@ if (BUILD_SHARED) + + target_link_libraries (gvm_util_shared LINK_PRIVATE ${GLIB_LDFLAGS} + ${GIO_LDFLAGS} ${GPGME_LDFLAGS} ${ZLIB_LDFLAGS} +- ${RADIUS_LDFLAGS} ${LIBSSH_LDFLAGS} ++ ${RADIUS_LDFLAGS} ${LIBSSH_LDFLAGS} ${GNUTLS_LDFLAGS} + ${GCRYPT_LDFLAGS} ${LDAP_LDFLAGS} ${REDIS_LDFLAGS} + ${UUID_LDFLAGS} ${LINKER_HARDENING_FLAGS}) + endif (BUILD_SHARED) diff --git a/net-analyzer/gvm-libs/gvm-libs-10.0.1.ebuild b/net-analyzer/gvm-libs/gvm-libs-10.0.1.ebuild new file mode 100644 index 000000000000..ebcbd5996319 --- /dev/null +++ b/net-analyzer/gvm-libs/gvm-libs-10.0.1.ebuild @@ -0,0 +1,100 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +CMAKE_MAKEFILE_GENERATOR="emake" +inherit cmake flag-o-matic toolchain-funcs user + +DESCRIPTION="Greenbone vulnerability management libraries, previously named openvas-libraries" +HOMEPAGE="https://www.greenbone.net/en/" +SRC_URI="https://github.com/greenbone/gvm-libs/archive/v${PV}.tar.gz -> ${P}.tar.gz" + +SLOT="0" +LICENSE="GPL-2+" +KEYWORDS="~amd64 ~x86" +IUSE="extras ldap radius" + +DEPEND=" + app-crypt/gpgme:= + dev-libs/hiredis + dev-libs/libgcrypt:= + dev-perl/UUID + net-libs/gnutls:= + net-libs/libssh:= + sys-libs/zlib + ldap? ( net-nds/openldap ) + radius? ( net-dialup/freeradius-client )" + +RDEPEND=" + ${DEPEND}" + +BDEPEND=" + sys-devel/bison + sys-devel/flex + virtual/pkgconfig + extras? ( app-doc/doxygen[dot] + app-doc/xmltoman + app-text/htmldoc + dev-perl/CGI + dev-perl/SQL-Translator + )" + +PATCHES=( + # Creating pid on build time instead of relying daemon! + # QA fix for 10.0.1. + "${FILESDIR}/${P}-pid.patch" +) + +pkg_setup() { + enewgroup gvm 495 + enewuser gvm 495 -1 /var/lib/gvm gvm +} + +src_prepare() { + cmake_src_prepare + # QA-Fix | Remove doxygen warnings for !CLANG + if use extras; then + if ! tc-is-clang; then + local f + for f in doc/*.in + do + sed -i \ + -e "s*CLANG_ASSISTED_PARSING = NO*#CLANG_ASSISTED_PARSING = NO*g" \ + -e "s*CLANG_OPTIONS*#CLANG_OPTIONS*g" \ + "${f}" || die "couldn't disable CLANG parsing" + done + fi + fi +} + +src_configure() { + local mycmakeargs=( + "-DLOCALSTATEDIR=${EPREFIX}/var" + "-DSYSCONFDIR=${EPREFIX}/etc" + $(usex ldap -DBUILD_WITHOUT_LDAP=0 -DBUILD_WITHOUT_LDAP=1) + $(usex radius -DBUILD_WITHOUT_RADIUS=0 -DBUILD_WITHOUT_RADIUS=1) + ) + # Add release hardening flags for 10.0.1 + append-cflags -Wformat -Wformat-security -D_FORTIFY_SOURCE=2 -fstack-protector + append-ldflags -Wl,-z,relro -Wl,-z,now + cmake_src_configure +} + +src_compile() { + cmake_src_compile + if use extras; then + cmake_build -C "${BUILD_DIR}" doc + cmake_build doc-full -C "${BUILD_DIR}" doc + HTML_DOCS=( "${BUILD_DIR}"/doc/generated/html/. ) + fi + cmake_build rebuild_cache +} + +src_install() { + cmake_src_install + + # Set proper permissions on required files/directories + keepdir /var/lib/gvm + fowners -R gvm:gvm /var/lib/gvm +} diff --git a/net-analyzer/gvm-libs/gvm-libs-11.0.0-r1.ebuild b/net-analyzer/gvm-libs/gvm-libs-11.0.0-r1.ebuild new file mode 100644 index 000000000000..00bd14e824ab --- /dev/null +++ b/net-analyzer/gvm-libs/gvm-libs-11.0.0-r1.ebuild @@ -0,0 +1,96 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +CMAKE_MAKEFILE_GENERATOR="emake" +inherit cmake flag-o-matic toolchain-funcs + +DESCRIPTION="Greenbone vulnerability management libraries, previously named openvas-libraries" +HOMEPAGE="https://www.greenbone.net/en/" +SRC_URI="https://github.com/greenbone/gvm-libs/archive/v${PV}.tar.gz -> ${P}.tar.gz" + +SLOT="0" +LICENSE="GPL-2+" +KEYWORDS="~amd64 ~x86" +IUSE="extras ldap radius" + +DEPEND=" + acct-user/gvm + app-crypt/gpgme:= + dev-libs/glib + dev-libs/hiredis + dev-libs/libgcrypt:= + dev-perl/UUID + net-libs/gnutls:= + net-libs/libssh:= + sys-libs/zlib + ldap? ( net-nds/openldap ) + radius? ( net-dialup/freeradius-client )" + +RDEPEND=" + ${DEPEND}" + +BDEPEND=" + dev-vcs/git + sys-devel/bison + sys-devel/flex + virtual/pkgconfig + extras? ( + app-doc/doxygen[dot] + app-doc/xmltoman + app-text/htmldoc + dev-perl/CGI + dev-perl/SQL-Translator + )" + +PATCHES=( + # patch for missing gnutls linking https://github.com/greenbone/gvm-libs/issues/277 + "${FILESDIR}/${P}-gnutls.patch" +) + +src_prepare() { + cmake_src_prepare + # QA-Fix | Remove doxygen warnings for !CLANG + if use extras; then + if ! tc-is-clang; then + local f + for f in doc/*.in + do + sed -i \ + -e "s*CLANG_ASSISTED_PARSING = NO*#CLANG_ASSISTED_PARSING = NO*g" \ + -e "s*CLANG_OPTIONS*#CLANG_OPTIONS*g" \ + "${f}" || die "couldn't disable CLANG parsing" + done + fi + fi +} + +src_configure() { + local mycmakeargs=( + "-DLOCALSTATEDIR=${EPREFIX}/var" + "-DSYSCONFDIR=${EPREFIX}/etc" + "-DGVM_PID_DIR=${EPREFIX}/var/lib/gvm" + ) + cmake_src_configure +} + +src_compile() { + cmake_src_compile + if use extras; then + cmake_build -C "${BUILD_DIR}" doc + cmake_build doc-full -C "${BUILD_DIR}" doc + fi + cmake_build rebuild_cache +} + +src_install() { + if use extras; then + local HTML_DOCS=( "${BUILD_DIR}"/doc/generated/html/. ) + fi + cmake_src_install + + # Set proper permissions on required files/directories + keepdir /var/lib/gvm + fowners -R gvm:gvm /var/lib/gvm +} diff --git a/net-analyzer/gvm-libs/metadata.xml b/net-analyzer/gvm-libs/metadata.xml new file mode 100644 index 000000000000..547fd31f7003 --- /dev/null +++ b/net-analyzer/gvm-libs/metadata.xml @@ -0,0 +1,24 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>jonas.licht@gmail.com</email> + <name>Jonas Licht</name> + </maintainer> + <maintainer type="project"> + <email>proxy-maint@gentoo.org</email> + <name>Proxy Maintainers</name> + </maintainer> + <use> + <flag name="extras">Html docs support</flag> + </use> + <longdescription lang="en"> + This is the libraries module for the Greenbone Vulnerability Management Solution. + It is used for the Greenbone Security Manager appliances and provides various + functionalities to support the integrated service daemons. + </longdescription> + <upstream> + <remote-id type="github">greenbone/gvm-libs</remote-id> + </upstream> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/gvm-tools/Manifest b/net-analyzer/gvm-tools/Manifest new file mode 100644 index 000000000000..e19d6a3bdec6 --- /dev/null +++ b/net-analyzer/gvm-tools/Manifest @@ -0,0 +1 @@ +DIST gvm-tools-2.0.0.tar.gz 114592 BLAKE2B 73532138f4153ce625e68d4feb477bea4504be910266d6dac113caff1da096bc6072649ddc456b3348e1aba79c9b7e147ba019a70e4163267c474850019a076e SHA512 0adf7e06b1208c91fbc02dab42593280c95f6572e27d96d6f8777d710747a9e427c79678d9aef785b7ecd6d4fd30e79a1c063fe4256025ac0616c1d242f45025 diff --git a/net-analyzer/gvm-tools/gvm-tools-2.0.0-r1.ebuild b/net-analyzer/gvm-tools/gvm-tools-2.0.0-r1.ebuild new file mode 100644 index 000000000000..d7688b807664 --- /dev/null +++ b/net-analyzer/gvm-tools/gvm-tools-2.0.0-r1.ebuild @@ -0,0 +1,40 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +PYTHON_COMPAT=( python3_{6,7,8} ) +DISTUTILS_USE_SETUPTOOLS=rdepend +inherit distutils-r1 + +DESCRIPTION="Remote control for Greenbone Vulnerability Manager, previously named openvas-cli" +HOMEPAGE="https://www.greenbone.net/en/" +SRC_URI="https://github.com/greenbone/gvm-tools/archive/v${PV}.tar.gz -> ${P}.tar.gz" + +SLOT="0" +LICENSE="GPL-3" +KEYWORDS="~amd64 ~x86" +IUSE="" + +RDEPEND=" + net-analyzer/python-gvm[${PYTHON_USEDEP}] + !net-analyzer/openvas-cli + !net-analyzer/openvas-tools" + +DEPEND=" + ${RDEPEND}" + +distutils_enable_tests unittest + +src_prepare() { + distutils-r1_src_prepare + # Exlude tests & correct FHS/Gentoo policy paths + sed -i "s/packages=find_packages(),.*/packages=find_packages(exclude=['tests*', 'docs']),/" setup.py || die + sed -i -e "s*''*'/usr/share/doc/${P}'*g" setup.py || die + + # Fixing tests + # Use correct socket path + sed -i "s/\/usr\/local\/var\/run\/gvmd.sock/\/var\/run\/gvmd.sock/g" tests/test_parser.py || die + # ignore help formating + sed -i "s/class HelpFormatting/@unittest.skip('ignoring help formatting')\nclass HelpFormatting/g" tests/test_parser.py || die +} diff --git a/net-analyzer/gvm-tools/metadata.xml b/net-analyzer/gvm-tools/metadata.xml new file mode 100644 index 000000000000..cd764580e106 --- /dev/null +++ b/net-analyzer/gvm-tools/metadata.xml @@ -0,0 +1,24 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>jonas.licht@gmail.com</email> + <name>Jonas Licht</name> + </maintainer> + <maintainer type="project"> + <email>proxy-maint@gentoo.org</email> + <name>Proxy Maintainers</name> + </maintainer> + <longdescription lang="en"> + The Greenbone Vulnerability Management Tools or gvm-tools + in short are a collection of tools that help with remote controlling + a Greenbone Security Manager (GSM) appliance and its + underlying Greenbone Vulnerability Manager (GVM). + The tools essentially aid accessing the communication protocols + GMP (Greenbone Management Protocol) and OSP (Open Scanner Protocol). + </longdescription> + <upstream> + <remote-id type="github">greenbone/gvm-tools</remote-id> + </upstream> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/gvm/gvm-10.0.1.ebuild b/net-analyzer/gvm/gvm-10.0.1.ebuild new file mode 100644 index 000000000000..7624312b1a47 --- /dev/null +++ b/net-analyzer/gvm/gvm-10.0.1.ebuild @@ -0,0 +1,34 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit eutils + +DESCRIPTION="Greenbone Vulnerability Management,previously named OpenVAS" +HOMEPAGE="https://www.greenbone.net/en/" + +SLOT="0" +LICENSE="GPL-2" +KEYWORDS="~amd64 ~x86" +IUSE="cli +cron +extras +gsa ldap ospd postgres radius +sqlite" +REQUIRED_USE="|| ( postgres sqlite )" + +RDEPEND=" + >=net-analyzer/gvm-libs-10.0.1[extras?,ldap?,radius?] + >=net-analyzer/gvmd-8.0.1[extras?,postgres?,sqlite?] + >=net-analyzer/openvas-scanner-6.0.1[cron?,extras?] + cli? ( >=net-analyzer/gvm-tools-2.0.0 ) + gsa? ( >=net-analyzer/greenbone-security-assistant-8.0.1[extras?] ) + ospd? ( >=net-analyzer/ospd-2.0.0[extras?] )" + +pkg_postinst() { + elog "Additional support for extra checks can be get from" + optfeature "Web server scanning and testing tool" net-analyzer/nikto + optfeature "Portscanner" net-analyzer/nmap + optfeature "IPsec VPN scanning, fingerprinting and testing tool" net-analyzer/ike-scan + optfeature "Application protocol detection tool" net-analyzer/amap + optfeature "ovaldi (OVAL) — an OVAL Interpreter" app-forensics/ovaldi + optfeature "Linux-kernel-based portscanner" net-analyzer/portbunny + optfeature "Web application attack and audit framework" net-analyzer/w3af +} diff --git a/net-analyzer/gvm/gvm-11.0.0.ebuild b/net-analyzer/gvm/gvm-11.0.0.ebuild new file mode 100644 index 000000000000..46d9ed063ff2 --- /dev/null +++ b/net-analyzer/gvm/gvm-11.0.0.ebuild @@ -0,0 +1,33 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit eutils + +DESCRIPTION="Greenbone Vulnerability Management,previously named OpenVAS" +HOMEPAGE="https://www.greenbone.net/en/" + +SLOT="0" +LICENSE="GPL-2" +KEYWORDS="~amd64 ~x86" +IUSE="cli +cron +extras +gsa ldap ospd radius" + +RDEPEND=" + >=net-analyzer/gvm-libs-11.0.0[extras?,ldap?,radius?] + >=net-analyzer/gvmd-9.0.0[extras?] + >=net-analyzer/openvas-scanner-7.0.0[cron?,extras?] + cli? ( >=net-analyzer/gvm-tools-2.0.0 ) + gsa? ( >=net-analyzer/greenbone-security-assistant-9.0.0[extras?] ) + ospd? ( >=net-analyzer/ospd-2.0.0[extras?] )" + +pkg_postinst() { + elog "Additional support for extra checks can be get from" + optfeature "Web server scanning and testing tool" net-analyzer/nikto + optfeature "Portscanner" net-analyzer/nmap + optfeature "IPsec VPN scanning, fingerprinting and testing tool" net-analyzer/ike-scan + optfeature "Application protocol detection tool" net-analyzer/amap + optfeature "ovaldi (OVAL) — an OVAL Interpreter" app-forensics/ovaldi + optfeature "Linux-kernel-based portscanner" net-analyzer/portbunny + optfeature "Web application attack and audit framework" net-analyzer/w3af +} diff --git a/net-analyzer/gvm/metadata.xml b/net-analyzer/gvm/metadata.xml new file mode 100644 index 000000000000..a1aa3959ae51 --- /dev/null +++ b/net-analyzer/gvm/metadata.xml @@ -0,0 +1,28 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>jonas.licht@gmail.com</email> + <name>Jonas Licht</name> + </maintainer> + <maintainer type="project"> + <email>proxy-maint@gentoo.org</email> + <name>Proxy Maintainers</name> + </maintainer> + <use> + <flag name="cli">Command Line Interface for OpenVAS Scanner</flag> + <flag name="cron">A cron job to update GVM's vulnerability feeds daily</flag> + <flag name="extras">Extra fonts, pdf-results! and html docs support</flag> + <flag name="gsa">Greenbone Security Assistant (WebUI)</flag> + <flag name="ospd">Enable support for scanner wrappers</flag> + </use> + <longdescription lang="en"> + GVM previously named OpenVAS stands for Open Vulnerability Assessment System and is a network security scanner + with associated tools like a graphical user front-end. + The core component is a server with a set of network vulnerability tests (NVTs) to detect security problems in remote systems and applications. + </longdescription> + <upstream> + <remote-id type="github">greenbone</remote-id> + </upstream> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/gvmd/Manifest b/net-analyzer/gvmd/Manifest new file mode 100644 index 000000000000..040172ac1ef6 --- /dev/null +++ b/net-analyzer/gvmd/Manifest @@ -0,0 +1,2 @@ +DIST gvmd-8.0.1.tar.gz 1495311 BLAKE2B 17419f5fecf7cce07536a5e12f17a61a31d45add185e0e1635515834eca6abd8a6babeb89b8f879ff8cb90b60f3682a19a62403142f4901be3f932b8a44cac68 SHA512 5490b902ad42499657eca9031b396c70a82d3c523985601067e697758f2472d123c4e99b085b963e58888d99224fa2a441a140772c702d7cd60d6424b126bfc8 +DIST gvmd-9.0.0.tar.gz 1425724 BLAKE2B f44c14a660f2ee9986e5873011233a423565acfdaea479ac6749998da997343a97dabec0355d618fd9032b65871737ba0407525b8d2b49e88aaa58523b633cae SHA512 99faf4b4a9e0baf7993769efb30ef39e09d76173416b44baa1b0849c7b68bd07cd9f82404832136a3e1b37769c7d5e77e5da54275ff75fffc2e6e6fa7a8b9dac diff --git a/net-analyzer/gvmd/files/greenbone-certdata-sync.conf b/net-analyzer/gvmd/files/greenbone-certdata-sync.conf new file mode 100644 index 000000000000..d31a7331d341 --- /dev/null +++ b/net-analyzer/gvmd/files/greenbone-certdata-sync.conf @@ -0,0 +1 @@ +COMMUNITY_CERT_RSYNC_FEED="rsync://feed.openvas.org:/cert-data" diff --git a/net-analyzer/gvmd/files/greenbone-nvt-sync.conf b/net-analyzer/gvmd/files/greenbone-nvt-sync.conf new file mode 100644 index 000000000000..967c41dec2e3 --- /dev/null +++ b/net-analyzer/gvmd/files/greenbone-nvt-sync.conf @@ -0,0 +1 @@ +COMMUNITY_NVT_RSYNC_FEED="rsync://feed.openvas.org:/nvt-feed" diff --git a/net-analyzer/gvmd/files/greenbone-scapdata-sync.conf b/net-analyzer/gvmd/files/greenbone-scapdata-sync.conf new file mode 100644 index 000000000000..4a7426bc8057 --- /dev/null +++ b/net-analyzer/gvmd/files/greenbone-scapdata-sync.conf @@ -0,0 +1 @@ +COMMUNITY_SCAP_RSYNC_FEED="rsync://feed.openvas.org:/scap-data" diff --git a/net-analyzer/gvmd/files/gvmd-8.0.1-sbin.patch b/net-analyzer/gvmd/files/gvmd-8.0.1-sbin.patch new file mode 100644 index 000000000000..bf21acb7b01f --- /dev/null +++ b/net-analyzer/gvmd/files/gvmd-8.0.1-sbin.patch @@ -0,0 +1,56 @@ +--- a/src/CMakeLists.txt 2019-07-17 17:11:52.000000000 +0300 ++++ b/src/CMakeLists.txt 2019-07-21 22:43:17.299106863 +0300 +@@ -248,12 +248,12 @@ + ## Install + + install (TARGETS ${BINARY_NAME} +- RUNTIME DESTINATION ${SBINDIR} ++ RUNTIME DESTINATION ${BINDIR} + LIBRARY DESTINATION ${LIBDIR} + ARCHIVE DESTINATION ${LIBDIR}/static) + + install (FILES ${CMAKE_CURRENT_BINARY_DIR}/gvmd +- DESTINATION ${SBINDIR}) ++ DESTINATION ${BINDIR}) + + if (BACKEND STREQUAL POSTGRESQL) + install (TARGETS gvm-pg-server +--- a/CMakeLists.txt 2019-07-22 11:31:13.430827400 +0300 ++++ b/CMakeLists.txt 2019-07-22 11:32:29.034765809 +0300 +@@ -571,17 +571,17 @@ + PERMISSIONS OWNER_WRITE OWNER_READ GROUP_READ WORLD_READ) + + install (FILES ${CMAKE_BINARY_DIR}/tools/gvm-portnames-update +- DESTINATION ${SBINDIR} ++ DESTINATION ${BINDIR} + PERMISSIONS OWNER_EXECUTE OWNER_READ OWNER_WRITE + GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE) + + install (FILES ${CMAKE_BINARY_DIR}/tools/greenbone-scapdata-sync +- DESTINATION ${SBINDIR} ++ DESTINATION ${BINDIR} + PERMISSIONS OWNER_EXECUTE OWNER_READ OWNER_WRITE + GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE) + + install (FILES ${CMAKE_BINARY_DIR}/tools/greenbone-certdata-sync +- DESTINATION ${SBINDIR} ++ DESTINATION ${BINDIR} + PERMISSIONS OWNER_EXECUTE OWNER_READ OWNER_WRITE + GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE) + +@@ -593,13 +593,13 @@ + WORLD_READ WORLD_EXECUTE) + + install (FILES ${CMAKE_BINARY_DIR}/tools/gvm-migrate-to-postgres +- DESTINATION ${SBINDIR} ++ DESTINATION ${BINDIR} + PERMISSIONS OWNER_EXECUTE OWNER_READ OWNER_WRITE + GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE) + + if (BACKEND STREQUAL SQLITE3) + install (FILES ${CMAKE_SOURCE_DIR}/tools/database-statistics-sqlite +- DESTINATION ${SBINDIR} ++ DESTINATION ${BINDIR} + PERMISSIONS OWNER_EXECUTE OWNER_READ OWNER_WRITE + GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE) + endif (BACKEND STREQUAL SQLITE3) diff --git a/net-analyzer/gvmd/files/gvmd-8.0.1-tmplock.patch b/net-analyzer/gvmd/files/gvmd-8.0.1-tmplock.patch new file mode 100644 index 000000000000..40b1e0095578 --- /dev/null +++ b/net-analyzer/gvmd/files/gvmd-8.0.1-tmplock.patch @@ -0,0 +1,34 @@ +--- a/tools/greenbone-certdata-sync.in 2019-07-17 17:11:52.000000000 +0300 ++++ b/tools/greenbone-certdata-sync.in 2019-07-22 21:11:36.173099530 +0300 +@@ -494,13 +494,11 @@ + fi + ( + flock -n 9 +- date > $LOCK_FILE + if [ $? -eq 1 ] ; then + log_notice "Sync in progress, exiting." + exit 1 + fi + sync_certdata +- echo -n > $LOCK_FILE +-) 9>$LOCK_FILE ++) + + exit 0 +--- a/tools/greenbone-scapdata-sync.in 2019-07-17 17:11:52.000000000 +0300 ++++ b/tools/greenbone-scapdata-sync.in 2019-07-22 21:12:49.193161531 +0300 +@@ -517,13 +517,11 @@ + fi + ( + flock -n 9 +- date > $LOCK_FILE + if [ $? -eq 1 ] ; then + log_notice "Sync in progress, exiting." + exit 1 + fi + sync_scapdata +- echo -n > $LOCK_FILE +-) 9>$LOCK_FILE ++) + + exit 0 diff --git a/net-analyzer/gvmd/files/gvmd-daemon.conf b/net-analyzer/gvmd/files/gvmd-daemon.conf new file mode 100644 index 000000000000..d97da00c7688 --- /dev/null +++ b/net-analyzer/gvmd/files/gvmd-daemon.conf @@ -0,0 +1,29 @@ +# GVMD command args + +# e.g --foreground +GVMD_OPTIONS="" + +# Manager listen address unix socket +# Failing under non-root user (looking for solution) +GVMD_LISTEN_ADDRESS_UNIX="--unix-socket=/var/run/gvmd.sock" + +# Manager listen address TCP +GVMD_LISTEN_ADDRESS_TCP="--listen=127.0.0.1" + +# Manager listen port +GVMD_PORT="--port=9390" + +# Manager unix socket listen owner +GVMD_LISTEN_OWNER="--listen-owner=gvm" + +# Manager unix socket listen group +GVMD_LISTEN_GROUP="--listen-group=gvm" + +# Manager unix socket listen mode +GVMD_LISTEN_MODE="--listen-mode=755" + +# Scanner listen address unix socket +GVMD_SCANNER_HOST="--scanner-host=/var/run/openvassd.sock" + +# TLS settings +GVMD_GNUTLS_PRIORITIES="--gnutls-priorities=SECURE256:+SUITEB192:+SECURE192:+SECURE128:+SUITEB128:-MD5:-SHA1:-VERS-TLS1.0:-VERS-TLS1.1:-VERS-SSL3.0" diff --git a/net-analyzer/gvmd/files/gvmd-startpre.sh b/net-analyzer/gvmd/files/gvmd-startpre.sh new file mode 100644 index 000000000000..d04daa09b0a2 --- /dev/null +++ b/net-analyzer/gvmd/files/gvmd-startpre.sh @@ -0,0 +1,5 @@ +#!/bin/sh + +# Greenbone Vulnerability Manager Systemd ExecStartPre +touch /var/run/gvm-{checking,create-functions,helping,migrating,serving} +chown -R gvm:gvm /var/run/gvm-{checking,create-functions,helping,migrating,serving} diff --git a/net-analyzer/gvmd/files/gvmd.init b/net-analyzer/gvmd/files/gvmd.init new file mode 100644 index 000000000000..098232afa1e5 --- /dev/null +++ b/net-analyzer/gvmd/files/gvmd.init @@ -0,0 +1,24 @@ +#!/sbin/openrc-run +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +: ${GVMD_USER:=gvm} +: ${GVMD_GROUP:=gvm} +: ${GVMD_TIMEOUT:=30} + +name="Greenbone Vulnerability Manager" +command=/usr/bin/gvmd +command_args="--foreground ${GVMD_OPTIONS} ${GVMD_LISTEN_ADDRESS_TCP} ${GVMD_PORT} ${GVMD_SCANNER_HOST} ${GVMD_GNUTLS_PRIORITIES}" +command_background="true" +command_user="${GVMD_USER}:${GVMD_GROUP}" +pidfile="/run/gvmd.pid" +retry="${GVMD_TIMEOUT}" + +depend() { + after bootmisc + need localmount net ospd-openvas +} + +start_pre() { + /bin/bash /etc/gvm/gvmd-startpre.sh +} diff --git a/net-analyzer/gvmd/files/gvmd.logrotate b/net-analyzer/gvmd/files/gvmd.logrotate new file mode 100644 index 000000000000..453462575f8b --- /dev/null +++ b/net-analyzer/gvmd/files/gvmd.logrotate @@ -0,0 +1,13 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 +# Daemon ignore HUP so we use 'copytruncate' instead of 'create' +# with safe file size to prevent losing log entries. + +/var/log/gvm/gvmd.log { + compress + missingok + notifempty + sharedscripts + copytruncate + maxsize 10M +} diff --git a/net-analyzer/gvmd/files/gvmd.service b/net-analyzer/gvmd/files/gvmd.service new file mode 100644 index 000000000000..2e3ad84c85a5 --- /dev/null +++ b/net-analyzer/gvmd/files/gvmd.service @@ -0,0 +1,21 @@ +[Unit] +Description=Greenbone Vulnerability Manager +After=network.target +After=openvassd.service +Wants=openvassd.service +Before=gsad.service + +[Service] +Type=forking +PrivateTmp=yes +User=gvm +Group=gvm +PermissionsStartOnly=true +EnvironmentFile=-/etc/gvm/sysconfig/gvmd-daemon.conf +ExecStartPre=-/etc/gvm/gvmd-startpre.sh +ExecStart=/usr/bin/gvmd $GVMD_OPTIONS $GVMD_LISTEN_ADDRESS_TCP $GVMD_PORT $GVMD_SCANNER_HOST $GVMD_GNUTLS_PRIORITIES +Restart=on-failure +RestartSec=10 + +[Install] +WantedBy=multi-user.target diff --git a/net-analyzer/gvmd/gvmd-8.0.1.ebuild b/net-analyzer/gvmd/gvmd-8.0.1.ebuild new file mode 100644 index 000000000000..7289dcd5f82a --- /dev/null +++ b/net-analyzer/gvmd/gvmd-8.0.1.ebuild @@ -0,0 +1,118 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +CMAKE_MAKEFILE_GENERATOR="emake" +inherit cmake flag-o-matic systemd toolchain-funcs + +DESCRIPTION="Greenbone vulnerability manager, previously named openvas-manager" +HOMEPAGE="https://www.greenbone.net/en/" +SRC_URI="https://github.com/greenbone/gvmd/archive/v${PV}.tar.gz -> ${P}.tar.gz" + +SLOT="0" +LICENSE="GPL-2+" +KEYWORDS="~amd64 ~x86" +IUSE="extras postgres sqlite" +REQUIRED_USE="|| ( postgres sqlite )" + +DEPEND=" + dev-libs/libgcrypt:0= + dev-libs/libical + >=net-analyzer/gvm-libs-10.0.1 + net-libs/gnutls:=[tools] + extras? ( app-text/xmlstarlet + dev-texlive/texlive-latexextra ) + postgres? ( dev-db/postgresql:* ) + sqlite? ( dev-db/sqlite:3 )" + +RDEPEND=" + ${DEPEND} + ~net-analyzer/openvas-scanner-6.0.1" + +BDEPEND=" + sys-devel/bison + sys-devel/flex + virtual/pkgconfig + extras? ( app-doc/doxygen[dot] + app-doc/xmltoman + app-text/htmldoc + dev-libs/libxslt + )" + +PATCHES=( + # Install exec. to /usr/bin instead of /usr/sbin + "${FILESDIR}/${P}-sbin.patch" + # Fix permissions for user gvm. + "${FILESDIR}/${P}-tmplock.patch" +) + +src_prepare() { + cmake_src_prepare + # QA-Fix | Use correct FHS/Gentoo policy paths for 8.0.1 + sed -i -e "s*share/doc/gvm/html/*share/doc/gvmd-${PV}/html/*g" "$S"/doc/CMakeLists.txt || die + sed -i -e "s*/doc/gvm/*/doc/gvmd-${PV}/*g" "$S"/CMakeLists.txt || die + # QA-Fix | Remove !CLANG Doxygen warnings for 8.0.1 + if use extras; then + if ! tc-is-clang; then + local f + for f in doc/*.in + do + sed -i \ + -e "s*CLANG_ASSISTED_PARSING = NO*#CLANG_ASSISTED_PARSING = NO*g" \ + -e "s*CLANG_OPTIONS*#CLANG_OPTIONS*g" \ + "${f}" || die "couldn't disable CLANG parsing" + done + fi + fi +} + +src_configure() { + local mycmakeargs=( + "-DLOCALSTATEDIR=${EPREFIX}/var" + "-DSYSCONFDIR=${EPREFIX}/etc" + ) + # Add release hardening flags for 8.0.1 + append-cflags -Wno-nonnull -Wformat -Wformat-security -D_FORTIFY_SOURCE=2 -fstack-protector + append-ldflags -Wl,-z,relro -Wl,-z,now + cmake_src_configure +} + +src_compile() { + cmake_src_compile + if use extras; then + cmake_build -C "${BUILD_DIR}" doc + cmake_build doc-full -C "${BUILD_DIR}" doc + HTML_DOCS=( "${BUILD_DIR}"/doc/generated/html/. ) + fi + cmake_build rebuild_cache +} + +src_install() { + cmake_src_install + + dodir /etc/gvm + insinto /etc/gvm + doins -r "${FILESDIR}"/*sync* + + dodir /etc/gvm/sysconfig + insinto /etc/gvm/sysconfig + doins "${FILESDIR}/${PN}-daemon.conf" + + exeinto /etc/gvm + doexe "${FILESDIR}"/gvmd-startpre.sh + + fowners -R gvm:gvm /etc/gvm + + newinitd "${FILESDIR}/${PN}.init" "${PN}" + newconfd "${FILESDIR}/${PN}-daemon.conf" "${PN}" + + insinto /etc/logrotate.d + newins "${FILESDIR}/${PN}.logrotate" "${PN}" + + systemd_dounit "${FILESDIR}/${PN}.service" + + # Set proper permissions on required files/directories + keepdir /var/lib/gvm/gvmd + fowners -R gvm:gvm /var/lib/gvm +} diff --git a/net-analyzer/gvmd/gvmd-9.0.0.ebuild b/net-analyzer/gvmd/gvmd-9.0.0.ebuild new file mode 100644 index 000000000000..e0a0cce830ef --- /dev/null +++ b/net-analyzer/gvmd/gvmd-9.0.0.ebuild @@ -0,0 +1,113 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +CMAKE_MAKEFILE_GENERATOR="emake" +inherit cmake flag-o-matic systemd toolchain-funcs + +DESCRIPTION="Greenbone vulnerability manager, previously named openvas-manager" +HOMEPAGE="https://www.greenbone.net/en/" +SRC_URI="https://github.com/greenbone/gvmd/archive/v${PV}.tar.gz -> ${P}.tar.gz" + +SLOT="0" +LICENSE="GPL-2+" +KEYWORDS="~amd64 ~x86" +IUSE="extras +postgres sqlite" +# keep deprecated USE Flags for revdep of gvm +REQUIRED_USE="postgres !sqlite" + +DEPEND=" + dev-db/postgresql:*[uuid] + dev-libs/libgcrypt:0= + dev-libs/libical + >=net-analyzer/gvm-libs-11.0.0 + net-libs/gnutls:=[tools] + extras? ( + app-text/xmlstarlet + dev-texlive/texlive-latexextra )" + +RDEPEND=" + ${DEPEND} + acct-user/gvm + net-analyzer/ospd-openvas" + +BDEPEND=" + sys-devel/bison + sys-devel/flex + virtual/pkgconfig + extras? ( + app-doc/doxygen[dot] + app-doc/xmltoman + app-text/htmldoc + dev-libs/libxslt + )" + +src_prepare() { + cmake_src_prepare + # QA-Fix | Use correct FHS/Gentoo policy paths for 9.0.0 + sed -i -e "s*share/doc/gvm/html/*share/doc/gvmd-${PV}/html/*g" "$S"/doc/CMakeLists.txt || die + sed -i -e "s*/doc/gvm/*/doc/gvmd-${PV}/*g" "$S"/CMakeLists.txt || die + # QA-Fix | Remove !CLANG Doxygen warnings for 9.0.0 + if use extras; then + if ! tc-is-clang; then + local f + for f in doc/*.in + do + sed -i \ + -e "s*CLANG_ASSISTED_PARSING = NO*#CLANG_ASSISTED_PARSING = NO*g" \ + -e "s*CLANG_OPTIONS*#CLANG_OPTIONS*g" \ + "${f}" || die "couldn't disable CLANG parsing" + done + fi + fi +} + +src_configure() { + local mycmakeargs=( + "-DLOCALSTATEDIR=${EPREFIX}/var" + "-DSYSCONFDIR=${EPREFIX}/etc" + "-DLIBDIR=${EPREFIX}/usr/$(get_libdir)" + "-DSBINDIR=${EPREFIX}/usr/bin" + ) + cmake_src_configure +} + +src_compile() { + cmake_src_compile + if use extras; then + cmake_build -C "${BUILD_DIR}" doc + cmake_build doc-full -C "${BUILD_DIR}" doc + fi + cmake_build rebuild_cache +} + +src_install() { + if use extras; then + local HTML_DOCS=( "${BUILD_DIR}"/doc/generated/html/. ) + fi + cmake_src_install + + insinto /etc/gvm + doins -r "${FILESDIR}"/*sync* + + insinto /etc/gvm/sysconfig + doins "${FILESDIR}/${PN}-daemon.conf" + + exeinto /etc/gvm + doexe "${FILESDIR}"/gvmd-startpre.sh + + fowners -R gvm:gvm /etc/gvm + + newinitd "${FILESDIR}/${PN}.init" "${PN}" + newconfd "${FILESDIR}/${PN}-daemon.conf" "${PN}" + + insinto /etc/logrotate.d + newins "${FILESDIR}/${PN}.logrotate" "${PN}" + + systemd_dounit "${FILESDIR}/${PN}.service" + + # Set proper permissions on required files/directories + keepdir /var/lib/gvm/gvmd + fowners -R gvm:gvm /var/lib/gvm +} diff --git a/net-analyzer/gvmd/metadata.xml b/net-analyzer/gvmd/metadata.xml new file mode 100644 index 000000000000..753a1c2111af --- /dev/null +++ b/net-analyzer/gvmd/metadata.xml @@ -0,0 +1,26 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>jonas.licht@gmail.com</email> + <name>Jonas Licht</name> + </maintainer> + <maintainer type="project"> + <email>proxy-maint@gentoo.org</email> + <name>Proxy Maintainers</name> + </maintainer> + <use> + <flag name="extras">Html docs support</flag> + </use> + <longdescription lang="en"> + The Greenbone Vulnerability Manager is the central management service between security scanners and the user clients. + It manages the storage of any vulnerability management configurations and of the scan results. + Access to data, control commands and workflows is offered via the XML-based Greenbone Management Protocol (GMP). + The primary scanner OpenVAS Scanner is controlled directly via protocol OTP while any other + remote scanner is coupled with the Open Scanner Protocol (OSP). + </longdescription> + <upstream> + <remote-id type="github">greenbone/gvmd</remote-id> + </upstream> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/hexinject/Manifest b/net-analyzer/hexinject/Manifest new file mode 100644 index 000000000000..dfec39c623d0 --- /dev/null +++ b/net-analyzer/hexinject/Manifest @@ -0,0 +1,2 @@ +DIST hexinject-1.5.tar.gz 14449 BLAKE2B e7c3fc34cce5b004622d6fe30584d90d8739fcc218d485317ddab178807caa4bf82e86b66f45df3311e05ca96c58aa9590108ffaa53c703feaafa64af8804e2e SHA512 cd145b6f2ae9d739effca03959fb474df11d28ff015c0e5bd1e30c341f60085154795f3c8a601b7241623944b3868b6fc9a3e1530a3aa4e7aaa2b3794a5aa34a +DIST hexinject-1.6.tar.gz 16876 BLAKE2B ac2951a5b4705ec84ed72fa5513e84b8bf031bd7e43b05c76fe83fc601cf3a245352afb0f226cc128bb028124ba898bc67394f2d839554ee01e25ee25c8f0c4d SHA512 7432122a7ca42b7ac066cc55daec2d4a656b08e0f390db1a49f626181080d07687026d04a150573e3341e4e76f87a20b6466deddcc9d022e7d66fadcb8dac1ad diff --git a/net-analyzer/hexinject/files/hexinject-1.5-fix-build-system.patch b/net-analyzer/hexinject/files/hexinject-1.5-fix-build-system.patch new file mode 100644 index 000000000000..046d083710df --- /dev/null +++ b/net-analyzer/hexinject/files/hexinject-1.5-fix-build-system.patch @@ -0,0 +1,15 @@ +Respect user flags + +--- a/Makefile ++++ b/Makefile +@@ -1,7 +1,7 @@ + all: +- gcc -o hexinject hexinject.c -lpcap +- gcc -o prettypacket prettypacket.c +- gcc -o hex2raw hex2raw.c ++ $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o hexinject hexinject.c -lpcap ++ $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o prettypacket prettypacket.c ++ $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o hex2raw hex2raw.c + + clean: + rm -f hexinject prettypacket hex2raw *~ diff --git a/net-analyzer/hexinject/files/hexinject-1.6-fix-build-system.patch b/net-analyzer/hexinject/files/hexinject-1.6-fix-build-system.patch new file mode 100644 index 000000000000..fbe91199bbfa --- /dev/null +++ b/net-analyzer/hexinject/files/hexinject-1.6-fix-build-system.patch @@ -0,0 +1,18 @@ +Author: holgersson <holgersson@posteo.de> +Date: Fri Oct 20 18:30:00 2017 +0200 + +Don’t call gcc directly, and respect CFLAGS. As this project +is plain C I don’t care fore CXXFLAGS here. + +--- a/Makefile 2017-10-20 18:15:11.743805540 +0200 ++++ b/Makefile 2017-10-20 18:24:55.120009439 +0200 +@@ -1,6 +1,6 @@ +-CC = gcc +-CFLAGS = -Wall +-LDFLAGS = -lpcap ++CC ?= gcc ++CFLAGS += -Wall ++LDFLAGS = -lpcap + + all: + $(CC) $(CFLAGS) $(LDFLAGS) -o hexinject hexinject.c diff --git a/net-analyzer/hexinject/hexinject-1.5.ebuild b/net-analyzer/hexinject/hexinject-1.5.ebuild new file mode 100644 index 000000000000..b33f5f0bda0c --- /dev/null +++ b/net-analyzer/hexinject/hexinject-1.5.ebuild @@ -0,0 +1,36 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +inherit flag-o-matic toolchain-funcs + +DESCRIPTION="Network packet sniffer and injector" +HOMEPAGE="http://hexinject.sourceforge.net/" +SRC_URI="http://downloads.sourceforge.net/project/${PN}/${P}/${P}.tar.gz" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="+tools experimental" + +DEPEND="net-libs/libpcap" +RDEPEND="${DEPEND} + experimental? ( dev-lang/tcl )" + +S="${WORKDIR}/${PN}" + +PATCHES=( "${FILESDIR}"/${PN}-1.5-fix-build-system.patch ) + +src_prepare() { + default + append-cflags -std=gnu89 + tc-export CC +} + +src_install() { + dobin hexinject + use tools && dobin hex2raw prettypacket + use experimental && dobin packets.tcl + einstalldocs +} diff --git a/net-analyzer/hexinject/hexinject-1.6-r1.ebuild b/net-analyzer/hexinject/hexinject-1.6-r1.ebuild new file mode 100644 index 000000000000..e36c1803461e --- /dev/null +++ b/net-analyzer/hexinject/hexinject-1.6-r1.ebuild @@ -0,0 +1,36 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI="6" + +inherit toolchain-funcs + +DESCRIPTION="Network packet sniffer and injector" +HOMEPAGE="http://hexinject.sourceforge.net/" +SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="+tools experimental" + +DEPEND="net-libs/libpcap" +RDEPEND="${DEPEND} + experimental? ( dev-lang/tcl )" + +S="${WORKDIR}/${PN}" + +PATCHES=( "${FILESDIR}"/${PN}-1.6-fix-build-system.patch ) + +src_configure() { + default + + tc-export CC +} + +src_install() { + dobin hexinject + use tools && dobin hex2raw prettypacket + use experimental && dobin packets.tcl + einstalldocs +} diff --git a/net-analyzer/hexinject/hexinject-1.6.ebuild b/net-analyzer/hexinject/hexinject-1.6.ebuild new file mode 100644 index 000000000000..5d8011ced352 --- /dev/null +++ b/net-analyzer/hexinject/hexinject-1.6.ebuild @@ -0,0 +1,34 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +inherit flag-o-matic toolchain-funcs + +DESCRIPTION="Network packet sniffer and injector" +HOMEPAGE="http://hexinject.sourceforge.net/" +SRC_URI="http://downloads.sourceforge.net/project/${PN}/${P}/${P}.tar.gz" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="+tools experimental" + +DEPEND="net-libs/libpcap" +RDEPEND="${DEPEND} + experimental? ( dev-lang/tcl )" + +S="${WORKDIR}/${PN}" + +src_prepare() { + default + append-cflags -std=gnu89 + tc-export CC +} + +src_install() { + dobin hexinject + use tools && dobin hex2raw prettypacket + use experimental && dobin packets.tcl + einstalldocs +} diff --git a/net-analyzer/hexinject/metadata.xml b/net-analyzer/hexinject/metadata.xml new file mode 100644 index 000000000000..97c791eae418 --- /dev/null +++ b/net-analyzer/hexinject/metadata.xml @@ -0,0 +1,27 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>holgersson@posteo.de</email> + <name>Nils Freydank</name> + </maintainer> + <maintainer type="project"> + <email>proxy-maint@gentoo.org</email> + <name>Proxy Maintainers</name> + </maintainer> + <longdescription lang="en"> + HexInject is a very versatile packet injector and sniffer, that provide + a command-line framework for raw network access. It's designed to work + together with others command-line utilities, and for this reason it + facilitates the creation of powerful shell scripts capable of reading, + intercepting and modifying network traffic in a transparent manner. + </longdescription> + <use> + <flag name="tools">Install hex2raw and prettypacket tools</flag> + <flag name="experimental">Install experimental packets.tcl</flag> + </use> + <upstream> + <remote-id type="sourceforge">hexinject</remote-id> + </upstream> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/hping/Manifest b/net-analyzer/hping/Manifest new file mode 100644 index 000000000000..0c59b8f10d76 --- /dev/null +++ b/net-analyzer/hping/Manifest @@ -0,0 +1,2 @@ +DIST hping-3_pre20141226.zip 648502 BLAKE2B 4c75bdb886a37180a4561a8179e00ea5bb6534e32b6fa749cd53824e36dfbeaa38b1a772b58f61d68056f510a294f6c3363f56705adb75f42fec11f4f4cd8fa1 SHA512 33ca573d66d7f6285f69a060f56a95e7307bc24d6c81b5e1752c72b8487ab9c85ac6e4499f9c4897e2656a67e12d608a0a149ca5502bdcf18cf97c88d4a2309b +DIST hping3-20051105.tar.gz 584001 BLAKE2B b99b7d2310e1706926ec5c649cd03a8889e3cff36f2a8e1f899799ddb1f4e6e432ab2b83c82b741ab827f715dbf8649a94831e75ef22793c7730e80d49c576c1 SHA512 3b3faa836e70054c8f9f004d876b7eb5f668b64826a6aaf8ca3685619111d9df4eb494a7d38b83cea6cb5f0bd164956461039bf4f73f7c7e90d80cede639b2b3 diff --git a/net-analyzer/hping/files/bytesex.h.patch b/net-analyzer/hping/files/bytesex.h.patch new file mode 100644 index 000000000000..872321d41bfd --- /dev/null +++ b/net-analyzer/hping/files/bytesex.h.patch @@ -0,0 +1,18 @@ +--- a/bytesex.h ++++ b/bytesex.h +@@ -9,11 +9,15 @@ + + #if defined(__i386__) \ + || defined(__alpha__) \ ++ || defined(__arm__) \ ++ || defined(__x86_64__) \ ++ || defined(__ia64__) \ + || (defined(__mips__) && (defined(MIPSEL) || defined (__MIPSEL__))) + #define BYTE_ORDER_LITTLE_ENDIAN + #elif defined(__mc68000__) \ + || defined (__sparc__) \ + || defined (__sparc) \ ++ || defined (__hppa__) \ + || defined (__PPC__) \ + || defined (__BIG_ENDIAN__) \ + || (defined(__mips__) && (defined(MIPSEB) || defined (__MIPSEB__))) diff --git a/net-analyzer/hping/files/hping-3_pre20051105-ldflags.patch b/net-analyzer/hping/files/hping-3_pre20051105-ldflags.patch new file mode 100644 index 000000000000..39814bff0d8c --- /dev/null +++ b/net-analyzer/hping/files/hping-3_pre20051105-ldflags.patch @@ -0,0 +1,16 @@ +--- a/Makefile.in ++++ b/Makefile.in +@@ -50,11 +50,11 @@ + $(RANLIB) $@ + + hping3: byteorder.h $(OBJ) +- $(CC) -o hping3 $(CCOPT) $(DEBUG) $(OBJ) -L/usr/local/lib $(PCAP) @SOLARISLIB@ @TCL_LIB@ ++ $(CC) -o hping3 $(CCOPT) $(LDFLAGS) $(DEBUG) $(OBJ) -L/usr/local/lib $(PCAP) @SOLARISLIB@ @TCL_LIB@ + @echo + + hping3-static: byteorder.h $(OBJ) +- $(CC) -static -o hping3-static $(CCOPT) $(DEBUG) $(OBJ) -L/usr/local/lib $(PCAP) @SOLARISLIB@ @TCL_LIB@ -ldl ++ $(CC) -static -o hping3-static $(CCOPT) $(LDFLAGS) $(DEBUG) $(OBJ) -L/usr/local/lib $(PCAP) @SOLARISLIB@ @TCL_LIB@ -ldl + + byteorder.h: + ./configure diff --git a/net-analyzer/hping/files/hping-3_pre20051105-libtcl.patch b/net-analyzer/hping/files/hping-3_pre20051105-libtcl.patch new file mode 100644 index 000000000000..807399cb553c --- /dev/null +++ b/net-analyzer/hping/files/hping-3_pre20051105-libtcl.patch @@ -0,0 +1,16 @@ +When anything libtcl (bug #247282) this will fail, and we're only finding out +the version of the library anyway, so why not use TCL_VER, which is found using +a slightly less fishy method. -JeR + +--- a/configure ++++ b/configure +@@ -98,8 +98,7 @@ + fi + if [ -n $USE_TCL ] + then +- LIBPOSTFIX=`ls -1 /usr/local/lib/ /usr/lib | grep 'libtcl[0-9]' | grep so | sed -e 's/\.so.*//g' -e 's/libtcl//g' | sort -r | head -1` +- TCL_LIB="-ltcl${LIBPOSTFIX} -lm -lpthread" ++ TCL_LIB="-ltcl${TCL_VER} -lm -lpthread" + fi + + # diff --git a/net-analyzer/hping/files/hping-3_pre20051105-scan-overflow.patch b/net-analyzer/hping/files/hping-3_pre20051105-scan-overflow.patch new file mode 100644 index 000000000000..2c3e01bf697a --- /dev/null +++ b/net-analyzer/hping/files/hping-3_pre20051105-scan-overflow.patch @@ -0,0 +1,11 @@ +--- a/scan.c ++++ b/scan.c +@@ -456,7 +456,7 @@ + continue; + /* time to copy headers in a safe place */ + p = packet+linkhdr_size+iphdrlen; +- memcpy(&icmp, p, sizeof(subtcp)); ++ memcpy(&icmp, p, sizeof(icmp)); + p += sizeof(icmp); + memcpy(&subip, p, sizeof(ip)); + p += sizeof(ip); diff --git a/net-analyzer/hping/files/hping-3_pre20051105-strlen.patch b/net-analyzer/hping/files/hping-3_pre20051105-strlen.patch new file mode 100644 index 000000000000..692cd93102fb --- /dev/null +++ b/net-analyzer/hping/files/hping-3_pre20051105-strlen.patch @@ -0,0 +1,11 @@ +--- a/ip_opt_build.c ++++ b/ip_opt_build.c +@@ -25,7 +25,7 @@ + unsigned char optlen = 0; + unsigned long ip; + +- memset(ip_opt, 1, sizeof(ip_opt)); ++ memset(ip_opt, 1, strlen(ip_opt)); + + if (opt_lsrr) + { diff --git a/net-analyzer/hping/files/hping-3_pre20051105-tcl.patch b/net-analyzer/hping/files/hping-3_pre20051105-tcl.patch new file mode 100644 index 000000000000..1fb734e349b4 --- /dev/null +++ b/net-analyzer/hping/files/hping-3_pre20051105-tcl.patch @@ -0,0 +1,11 @@ +--- a/configure ++++ b/configure +@@ -63,7 +63,7 @@ + # + for TCLPATH_TRY in "/usr/bin/" "/usr/local/bin/" "/bin/" + do +- for TCLVER_TRY in "8.4" "8.3" "8.2" "8.1" "8.0" ++ for TCLVER_TRY in "8.6" "8.5" "8.4" "8.3" "8.2" "8.1" "8.0" + do + if [ -z $TCLSH ] + then diff --git a/net-analyzer/hping/files/hping-3_pre20051105-tclsh-proper-escaping.patch b/net-analyzer/hping/files/hping-3_pre20051105-tclsh-proper-escaping.patch new file mode 100644 index 000000000000..8cd7065c8393 --- /dev/null +++ b/net-analyzer/hping/files/hping-3_pre20051105-tclsh-proper-escaping.patch @@ -0,0 +1,26 @@ +Fix for https://bugs.gentoo.org/show_bug.cgi?id=486664 + +--- a/configure ++++ b/configure +@@ -65,10 +65,10 @@ + do + for TCLVER_TRY in "8.6" "8.5" "8.4" "8.3" "8.2" "8.1" "8.0" + do +- if [ -z $TCLSH ] ++ if [ -z "$TCLSH" ] + then + TCLSH_TRY=${TCLPATH_TRY}tclsh${TCLVER_TRY} +- if [ -f $TCLSH_TRY ] ++ if [ -f "$TCLSH_TRY" ] + then + TCLSH=$TCLSH_TRY + echo "===> Found Tclsh in: $TCLSH" +@@ -76,7 +76,7 @@ + fi + done + done +-if [ -f $TCLSH ] ++if [ -f "$TCLSH" ] + then + TCL_VER=`echo puts \\$tcl_version | $TCLSH -` + USE_TCL='-DUSE_TCL' diff --git a/net-analyzer/hping/files/hping-3_pre20051105.patch b/net-analyzer/hping/files/hping-3_pre20051105.patch new file mode 100644 index 000000000000..e3133f2b6b42 --- /dev/null +++ b/net-analyzer/hping/files/hping-3_pre20051105.patch @@ -0,0 +1,45 @@ +--- a/libpcap_stuff.c ++++ b/libpcap_stuff.c +@@ -17,7 +17,7 @@ + #include <stdlib.h> + #include <sys/ioctl.h> + #include <pcap.h> +-#include <net/bpf.h> ++#include <pcap-bpf.h> + + #include "globals.h" + +--- a/script.c ++++ b/script.c +@@ -24,7 +24,7 @@ + + #include <sys/ioctl.h> + #include <pcap.h> +-#include <net/bpf.h> ++#include <pcap-bpf.h> + + #include "release.h" + #include "hping2.h" +--- a/configure ++++ b/configure +@@ -93,7 +93,7 @@ + else + USE_TCL="" + TCL_LIB="" +- echo "==> WARNING: no Tcl header files found!" ++ echo "==> WARNING: no Tcl header files found." + fi + fi + if [ -n $USE_TCL ] +--- a/Makefile.in ++++ b/Makefile.in +@@ -52,9 +52,6 @@ + hping3: byteorder.h $(OBJ) + $(CC) -o hping3 $(CCOPT) $(DEBUG) $(OBJ) -L/usr/local/lib $(PCAP) @SOLARISLIB@ @TCL_LIB@ + @echo +- ./hping3 -v +- @echo "use \`make strip' to strip hping3 binary" +- @echo "use \`make install' to install hping3" + + hping3-static: byteorder.h $(OBJ) + $(CC) -static -o hping3-static $(CCOPT) $(DEBUG) $(OBJ) -L/usr/local/lib $(PCAP) @SOLARISLIB@ @TCL_LIB@ -ldl diff --git a/net-analyzer/hping/files/hping-3_pre20141226-compile.patch b/net-analyzer/hping/files/hping-3_pre20141226-compile.patch new file mode 100644 index 000000000000..14b6eacdae47 --- /dev/null +++ b/net-analyzer/hping/files/hping-3_pre20141226-compile.patch @@ -0,0 +1,31 @@ +--- a/Makefile.in ++++ b/Makefile.in +@@ -6,10 +6,7 @@ + # $date: Sun Jul 25 17:56:15 MET DST 1999$ + # $rev: 3$ + +-CC= gcc +-AR=/usr/bin/ar +-RANLIB=/usr/bin/ranlib +-CCOPT= -O2 -Wall @PCAP_INCLUDE@ @TCL_INC@ @USE_TCL@ ++CCOPT= $(CFLAGS) -Wall @PCAP_INCLUDE@ @TCL_INC@ @USE_TCL@ + DEBUG= -g + #uncomment the following if you need libpcap based build under linux + #(not raccomanded) +@@ -50,14 +47,11 @@ + $(RANLIB) $@ + + hping3: byteorder.h $(OBJ) +- $(CC) -o hping3 $(CCOPT) $(DEBUG) $(OBJ) -L/usr/local/lib $(PCAP) @SOLARISLIB@ @TCL_LIB@ ++ $(CC) -o hping3 $(CCOPT) $(LDFLAGS) $(DEBUG) $(OBJ) -L/usr/$(LIBDIR) $(PCAP) @SOLARISLIB@ @TCL_LIB@ + @echo +- ./hping3 -v +- @echo "use \`make strip' to strip hping3 binary" +- @echo "use \`make install' to install hping3" + + hping3-static: byteorder.h $(OBJ) +- $(CC) -static -o hping3-static $(CCOPT) $(DEBUG) $(OBJ) -L/usr/local/lib $(PCAP) @SOLARISLIB@ @TCL_LIB@ -ldl ++ $(CC) -static -o hping3-static $(CCOPT) $(DEBUG) $(OBJ) -L/usr/$(LIBDIR) $(PCAP) @SOLARISLIB@ @TCL_LIB@ -ldl + + byteorder.h: + ./configure diff --git a/net-analyzer/hping/files/hping-3_pre20141226-fno-common.patch b/net-analyzer/hping/files/hping-3_pre20141226-fno-common.patch new file mode 100644 index 000000000000..e21a6d513c59 --- /dev/null +++ b/net-analyzer/hping/files/hping-3_pre20141226-fno-common.patch @@ -0,0 +1,11 @@ +--- a/hping2.h ++++ b/hping2.h +@@ -357,8 +357,6 @@ + int status; + }; + +-volatile struct delaytable_element delaytable[TABLESIZE]; +- + /* protos */ + void nop(void); /* nop */ + int parse_options(int, char**); /* option parser */ diff --git a/net-analyzer/hping/files/hping-3_pre20141226-hping2-2-hping.patch b/net-analyzer/hping/files/hping-3_pre20141226-hping2-2-hping.patch new file mode 100644 index 000000000000..7ceaac921a0b --- /dev/null +++ b/net-analyzer/hping/files/hping-3_pre20141226-hping2-2-hping.patch @@ -0,0 +1,240 @@ +--- a/docs/hping3.8 ++++ b/docs/hping3.8 +@@ -1,8 +1,8 @@ +-.TH HPING2 8 "2001 Aug 14" ++.TH HPING 8 "2001 Aug 14" + .SH NAME +-hping2 \- send (almost) arbitrary TCP/IP packets to network hosts ++hping \- send (almost) arbitrary TCP/IP packets to network hosts + .SH SYNOPSIS +-.B hping2 ++.B hping + [ + .B \-hvnqVDzZ012WrfxykQbFSRPAUXYjJBuTG + ] [ +@@ -116,11 +116,11 @@ + .br + .ad + .SH DESCRIPTION +-hping2 is a network tool able to send custom TCP/IP packets and to +-display target replies like ping program does with ICMP replies. hping2 ++hping is a network tool able to send custom TCP/IP packets and to ++display target replies like ping program does with ICMP replies. hping + handle fragmentation, arbitrary packets body and size and can be used in + order to transfer files encapsulated under supported protocols. Using +-hping2 you are able to perform at least the following stuff: ++hping you are able to perform at least the following stuff: + + - Test firewall rules + - Advanced port scanning +@@ -136,7 +136,7 @@ + - A lot of others. + + .IR "It's also a good didactic tool to learn TCP/IP" . +-hping2 is developed and maintained by antirez@invece.org and is ++hping is developed and maintained by antirez@invece.org and is + licensed under GPL version 2. Development is open so you can send + me patches, suggestion and affronts without inhibitions. + .SH HPING SITE +@@ -158,9 +158,9 @@ + .I -c --count count + Stop after sending (and receiving) + .I count +-response packets. After last packet was send hping2 wait COUNTREACHED_TIMEOUT ++response packets. After last packet was send hping wait COUNTREACHED_TIMEOUT + seconds target host replies. You are able to tune COUNTREACHED_TIMEOUT editing +-hping2.h ++hping.h + .TP + .I -i --interval + Wait +@@ -171,10 +171,10 @@ + .I wait + to X micro seconds. + The default is to wait +-one second between each packet. Using hping2 to transfer files tune this ++one second between each packet. Using hping to transfer files tune this + option is really important in order to increase transfer rate. Even using +-hping2 to perform idle/spoofing scanning you should tune this option, see +-.B HPING2-HOWTO ++hping to perform idle/spoofing scanning you should tune this option, see ++.B HPING-HOWTO + for more information. + .TP + .I --fast +@@ -195,13 +195,13 @@ + startup time and when finished. + .TP + .I -I --interface interface name +-By default on linux and BSD systems hping2 uses default routing interface. ++By default on linux and BSD systems hping uses default routing interface. + In other systems or when there is no default route +-hping2 uses the first non-loopback interface. +-However you are able to force hping2 to use the interface you need using ++hping uses the first non-loopback interface. ++However you are able to force hping to use the interface you need using + this option. Note: you don't need to specify the whole name, for + example -I et will match eth0 ethernet0 myet1 et cetera. If no interfaces +-match hping2 will try to use lo. ++match hping will try to use lo. + .TP + .I -V --verbose + Enable verbose output. TCP replies will be shown as follows: +@@ -211,7 +211,7 @@ + .TP + .I -D --debug + Enable debug mode, it's useful when you experience some problem with +-hping2. When debug mode is enabled you will get more information about ++hping. When debug mode is enabled you will get more information about + .B interface detection, data link layer access, interface settings, options + .B parsing, fragmentation, HCMP protocol + and other stuff. +@@ -223,30 +223,30 @@ + CTRL+Z once or twice. + .TP + .I -Z --unbind +-Unbind CTRL+Z so you will able to stop hping2. ++Unbind CTRL+Z so you will able to stop hping. + .TP + .I --beep + Beep for every matching received packet (but not for ICMP errors). + .SH PROTOCOL SELECTION +-Default protocol is TCP, by default hping2 will send tcp headers to target ++Default protocol is TCP, by default hping will send tcp headers to target + host's port 0 with a winsize of 64 without any tcp flag on. Often this + is the best way to do an 'hide ping', useful when target is behind + a firewall that drop ICMP. Moreover a tcp null-flag to port 0 has a good + probability of not being logged. + .TP + .I -0 --rawip +-RAW IP mode, in this mode hping2 will send IP header with data ++RAW IP mode, in this mode hping will send IP header with data + appended with --signature and/or --file, see also --ipproto that + allows you to set the ip protocol field. + .TP + .I -1 --icmp +-ICMP mode, by default hping2 will send ICMP echo-request, you can set ++ICMP mode, by default hping will send ICMP echo-request, you can set + other ICMP type/code using + .B --icmptype --icmpcode + options. + .TP + .I -2 --udp +-UDP mode, by default hping2 will send udp to target host's port 0. ++UDP mode, by default hping will send udp to target host's port 0. + UDP header tunable options are the following: + .B --baseport, --destport, --keep. + .TP +@@ -288,11 +288,11 @@ + shows interesting details. + .TP + .I -9 --listen signature +-HPING2 listen mode, using this option hping2 waits for packet that contain ++HPING listen mode, using this option hping waits for packet that contain + .I signature + and dump from + .I signature +-end to packet's end. For example if hping2 --listen TEST reads a packet ++end to packet's end. For example if hping --listen TEST reads a packet + that contain + .B 234-09sdflkjs45-TESThello_world + it will display +@@ -304,7 +304,7 @@ + ensures that target will not gain your real address. However replies + will be sent to spoofed address, so you will can't see them. In order + to see how it's possible to perform spoofed/idle scanning see the +-.BR HPING2-HOWTO . ++.BR HPING-HOWTO . + .TP + .I --rand-source + This option enables the +@@ -347,7 +347,7 @@ + or + .B --bind + options. If in doubt try +-.BR "" "`" "hping2 some.host.com -t 1 --traceroute" "'." ++.BR "" "`" "hping some.host.com -t 1 --traceroute" "'." + .TP + .I -N --id + Set ip->id field. Default id is random but if fragmentation is turned on +@@ -361,11 +361,11 @@ + .I -W --winid + id from Windows* systems before Win2k has different byte ordering, if this + option is enable +-hping2 will properly display id replies from those Windows. ++hping will properly display id replies from those Windows. + .TP + .I -r --rel + Display id increments instead of id. See the +-.B HPING2-HOWTO ++.B HPING-HOWTO + for more information. Increments aren't computed as id[N]-id[N-1] but + using packet loss compensation. See relid.c for more information. + .TP +@@ -445,7 +445,7 @@ + .SH TCP/UDP RELATED OPTIONS + .TP + .I -s --baseport source port +-hping2 uses source port in order to guess replies sequence number. It ++hping uses source port in order to guess replies sequence number. It + starts with a base source port number, and increase this number for each + packet sent. When packet is received sequence number can be computed as + .IR "replies.dest.port - base.source.port" . +@@ -485,7 +485,7 @@ + by target host. This can be useful when you need to analyze whether + TCP sequence number is predictable. Output example: + +-.B #hping2 win98 --seqnum -p 139 -S -i u1 -I eth0 ++.B #hping win98 --seqnum -p 139 -S -i u1 -I eth0 + .nf + HPING uaz (eth0 192.168.4.41): S set, 40 headers + 0 data bytes + 2361294848 +2361294848 +@@ -540,8 +540,8 @@ + .SH COMMON OPTIONS + .TP + .I -d --data data size +-Set packet body size. Warning, using --data 40 hping2 will not generate +-0 byte packets but protocol_header+40 bytes. hping2 will display ++Set packet body size. Warning, using --data 40 hping will not generate ++0 byte packets but protocol_header+40 bytes. hping will display + packet size information as first line output, like this: + .B HPING www.yahoo.com (ppp0 204.71.200.67): NO FLAGS are set, 40 headers + 40 data bytes + .TP +@@ -577,9 +577,9 @@ + A to host B you may use the following: + .nf + .I [host_a] +-.B # hping2 host_b --udp -p 53 -d 100 --sign signature --safe --file /etc/passwd ++.B # hping host_b --udp -p 53 -d 100 --sign signature --safe --file /etc/passwd + .I [host_b] +-.B # hping2 host_a --listen signature --safe --icmp ++.B # hping host_a --listen signature --safe --icmp + .fi + .TP + .I -u --end +@@ -587,13 +587,13 @@ + .I --file filename + option, tell you when EOF has been reached. Moreover prevent that other end + accept more packets. Please, for more information see the +-.BR HPING2-HOWTO . ++.BR HPING-HOWTO . + .TP + .I -T --traceroute +-Traceroute mode. Using this option hping2 will increase ttl for each ++Traceroute mode. Using this option hping will increase ttl for each + .B ICMP time to live 0 during transit + received. Try +-.BR "hping2 host --traceroute" . ++.BR "hping host --traceroute" . + This option implies --bind and --ttl 1. You can override the ttl of 1 + using the --ttl option. Since 2.0.0 stable it prints RTT information. + .TP +@@ -601,7 +601,7 @@ + Keep the TTL fixed in traceroute mode, so you can monitor just one hop + in the route. For example, to monitor how the 5th hop changes or + how its RTT changes you can try +-.BR "hping2 host --traceroute --ttl 5 --tr-keep-ttl" . ++.BR "hping host --traceroute --ttl 5 --tr-keep-ttl" . + .TP + .I --tr-stop + If this option is specified hping will exit once the first packet diff --git a/net-analyzer/hping/files/hping-3_pre20141226-indent.patch b/net-analyzer/hping/files/hping-3_pre20141226-indent.patch new file mode 100644 index 000000000000..1f8952d1b3b7 --- /dev/null +++ b/net-analyzer/hping/files/hping-3_pre20141226-indent.patch @@ -0,0 +1,13 @@ +--- a/rtt.c ++++ b/rtt.c +@@ -45,8 +45,8 @@ + tablepos = i; + break; + } +- if (i != TABLESIZE) +- *seqp = delaytable[i].seq; ++ if (i != TABLESIZE) ++ *seqp = delaytable[i].seq; + } + + if (tablepos != -1) diff --git a/net-analyzer/hping/files/hping-3_pre20141226-pcap-bpf.patch b/net-analyzer/hping/files/hping-3_pre20141226-pcap-bpf.patch new file mode 100644 index 000000000000..698e404f79ea --- /dev/null +++ b/net-analyzer/hping/files/hping-3_pre20141226-pcap-bpf.patch @@ -0,0 +1,24 @@ +--- a/libpcap_stuff.c ++++ b/libpcap_stuff.c +@@ -16,8 +16,8 @@ + #include <string.h> + #include <stdlib.h> + #include <sys/ioctl.h> +-#include <net/bpf.h> + #include <pcap.h> ++#include <pcap-bpf.h> + + #include "globals.h" + +--- a/script.c ++++ b/script.c +@@ -23,8 +23,8 @@ + #include <sched.h> + + #include <sys/ioctl.h> +-#include <net/bpf.h> + #include <pcap.h> ++#include <pcap-bpf.h> + + #include "release.h" + #include "hping2.h" diff --git a/net-analyzer/hping/files/hping-3_pre20141226-scan-overflow.patch b/net-analyzer/hping/files/hping-3_pre20141226-scan-overflow.patch new file mode 100644 index 000000000000..ae3df1e54434 --- /dev/null +++ b/net-analyzer/hping/files/hping-3_pre20141226-scan-overflow.patch @@ -0,0 +1,11 @@ +--- a/scan.c ++++ b/scan.c +@@ -456,7 +456,7 @@ + continue; + /* time to copy headers in a safe place */ + p = (unsigned char*) packet+linkhdr_size+iphdrlen; +- memcpy(&icmp, p, sizeof(subtcp)); ++ memcpy(&icmp, p, sizeof(icmp)); + p += sizeof(icmp); + memcpy(&subip, p, sizeof(ip)); + p += sizeof(ip); diff --git a/net-analyzer/hping/files/hping-3_pre20141226-unused-but-set.patch b/net-analyzer/hping/files/hping-3_pre20141226-unused-but-set.patch new file mode 100644 index 000000000000..887b90efad93 --- /dev/null +++ b/net-analyzer/hping/files/hping-3_pre20141226-unused-but-set.patch @@ -0,0 +1,45 @@ +--- a/apd.c ++++ b/apd.c +@@ -893,6 +893,7 @@ + return -ARS_ERROR; + err = ars_push_data(pkt, layer, binary, blen); + free(binary); ++ return err; + } else if (strcasecmp(f, "uint32") == 0) { + int err; + __u32 t, nt; +--- a/ars.c ++++ b/ars.c +@@ -906,15 +906,17 @@ + * system isn't FreeBSD or NetBSD. */ + int ars_bsd_fix(struct ars_packet *pkt, unsigned char *packet, size_t size) + { ++#if defined OSTYPE_DARWIN || defined OSTYPE_FREEBSD || defined OSTYPE_NETBSD || defined OSTYPE_BSDI + struct ars_iphdr *ip; ++#endif + + if (pkt->p_layer[0].l_type != ARS_TYPE_IP || + size < sizeof(struct ars_iphdr)) { + ars_set_error(pkt, "BSD fix requested, but layer 0 not IP"); + return -ARS_INVALID; + } +- ip = (struct ars_iphdr*) packet; + #if defined OSTYPE_DARWIN || defined OSTYPE_FREEBSD || defined OSTYPE_NETBSD || defined OSTYPE_BSDI ++ ip = (struct ars_iphdr*) packet; + ip->tot_len = ntohs(ip->tot_len); + ip->frag_off = ntohs(ip->frag_off); + #endif +--- a/libpcap_stuff.c ++++ b/libpcap_stuff.c +@@ -23,9 +23,11 @@ + + int open_pcap() + { ++#if (!defined OSTYPE_LINUX) && (!defined __sun__) + int on; + + on = 1; /* no warning if BIOCIMMEDIATE will not be compiled */ ++#endif + if (opt_debug) + printf("DEBUG: pcap_open_live(%s, 99999, 0, 1, %p)\n", + ifname, errbuf); diff --git a/net-analyzer/hping/hping-3_pre20051105-r6.ebuild b/net-analyzer/hping/hping-3_pre20051105-r6.ebuild new file mode 100644 index 000000000000..37f6833041af --- /dev/null +++ b/net-analyzer/hping/hping-3_pre20051105-r6.ebuild @@ -0,0 +1,80 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 +inherit eutils multilib toolchain-funcs + +MY_P="${PN}${PV//_pre/-}" +DESCRIPTION="A ping-like TCP/IP packet assembler/analyzer" +HOMEPAGE="http://www.hping.org" +SRC_URI="http://www.hping.org/${MY_P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha amd64 ~arm hppa ~ia64 ~mips ppc sparc x86" +IUSE="tcl" + +S="${WORKDIR}/${MY_P}" + +DEPEND=" + net-libs/libpcap + tcl? ( dev-lang/tcl:0= ) +" +RDEPEND=" + ${DEPEND} +" +PATCHES=( + "${FILESDIR}"/${P}.patch + "${FILESDIR}"/bytesex.h.patch + "${FILESDIR}"/${P}-tcl.patch + "${FILESDIR}"/${P}-ldflags.patch + "${FILESDIR}"/${P}-libtcl.patch + "${FILESDIR}"/${P}-scan-overflow.patch + "${FILESDIR}"/${P}-tclsh-proper-escaping.patch + "${FILESDIR}"/${P}-strlen.patch +) + +src_prepare() { + default + + # Correct hard coded values + sed -i Makefile.in \ + -e '/^CC=/d' \ + -e '/^AR=/d' \ + -e '/^RANLIB=/d' \ + -e 's:/usr/local/lib:/usr/$(LIBDIR):g' \ + -e 's:-O2:$(CFLAGS):' \ + || die + + # Change name from hping2 to hping3 + sed -i docs/hping3.8 \ + -e 's|HPING2|HPING|g' \ + -e 's|hping2|hping|g' \ + || die +} + +src_configure() { + tc-export CC + + # Not an autotools type configure: + sh configure $(usex tcl '' --no-tcl) || die +} + +src_compile() { + emake \ + DEBUG="" \ + "CFLAGS=${CFLAGS}" \ + "AR=$(tc-getAR)" \ + "RANLIB=$(tc-getRANLIB)" \ + "LIBDIR=$(get_libdir)" +} + +src_install() { + dosbin hping3 + dosym /usr/sbin/hping3 /usr/sbin/hping + dosym /usr/sbin/hping3 /usr/sbin/hping2 + + newman docs/hping3.8 hping.8 + + dodoc AUTHORS BUGS CHANGES INSTALL NEWS README TODO +} diff --git a/net-analyzer/hping/hping-3_pre20141226.ebuild b/net-analyzer/hping/hping-3_pre20141226.ebuild new file mode 100644 index 000000000000..d58de2c0ec2a --- /dev/null +++ b/net-analyzer/hping/hping-3_pre20141226.ebuild @@ -0,0 +1,63 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 +inherit eutils multilib toolchain-funcs + +DESCRIPTION="A ping-like TCP/IP packet assembler/analyzer" +HOMEPAGE="http://www.hping.org" +HPING_COMMIT="3547c7691742c6eaa31f8402e0ccbb81387c1b99" +SRC_URI="https://github.com/antirez/${PN}/archive/${HPING_COMMIT}.zip -> ${P}.zip" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~sparc ~x86" +IUSE="tcl" + +S=${WORKDIR}/${PN}-${HPING_COMMIT} + +DEPEND=" + net-libs/libpcap + tcl? ( dev-lang/tcl:0= ) +" +RDEPEND=" + ${DEPEND} +" +PATCHES=( + "${FILESDIR}"/${PN}-3_pre20051105-libtcl.patch + "${FILESDIR}"/${PN}-3_pre20051105-tcl.patch + "${FILESDIR}"/${PN}-3_pre20051105-tclsh-proper-escaping.patch + "${FILESDIR}"/${PN}-3_pre20141226-compile.patch + "${FILESDIR}"/${PN}-3_pre20141226-hping2-2-hping.patch + "${FILESDIR}"/${PN}-3_pre20141226-indent.patch + "${FILESDIR}"/${PN}-3_pre20141226-pcap-bpf.patch + "${FILESDIR}"/${PN}-3_pre20141226-scan-overflow.patch + "${FILESDIR}"/${PN}-3_pre20141226-unused-but-set.patch + "${FILESDIR}"/${PN}-3_pre20141226-fno-common.patch +) + +src_configure() { + tc-export CC + + # Not an autotools type configure: + sh configure $(usex tcl '' --no-tcl) || die +} + +src_compile() { + emake \ + DEBUG="" \ + "CFLAGS=${CFLAGS}" \ + "AR=$(tc-getAR)" \ + "RANLIB=$(tc-getRANLIB)" \ + "LIBDIR=$(get_libdir)" +} + +src_install() { + dosbin hping3 + dosym hping3 /usr/sbin/hping + dosym hping3 /usr/sbin/hping2 + + newman docs/hping3.8 hping.8 + + dodoc AUTHORS BUGS CHANGES INSTALL NEWS README TODO +} diff --git a/net-analyzer/hping/metadata.xml b/net-analyzer/hping/metadata.xml new file mode 100644 index 000000000000..bd13a914477c --- /dev/null +++ b/net-analyzer/hping/metadata.xml @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<maintainer type="project"> + <email>netmon@gentoo.org</email> + <name>Gentoo network monitoring and analysis project</name> +</maintainer> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/httping/Manifest b/net-analyzer/httping/Manifest new file mode 100644 index 000000000000..50d7e99a616d --- /dev/null +++ b/net-analyzer/httping/Manifest @@ -0,0 +1 @@ +DIST httping-2.5.tgz 71400 BLAKE2B da261827a4e2276816dbb2f9a6bac989f4ec0e7fc4b7686d51e57f8d4078ec3f94acef032b7042774e9cff57c8158696026e45d44ae1fbb00e52175c9c08b9a5 SHA512 397ce2eac91c9aede0eb19823bfca4e7f98c263937f5954c8a48d5248a251d2030e31f18decb7f7f8b0118ec0e16ec0a84ea4c943ccde7056b80de162954c355 diff --git a/net-analyzer/httping/files/httping-2.2.1-flags.patch b/net-analyzer/httping/files/httping-2.2.1-flags.patch new file mode 100644 index 000000000000..194eb473577c --- /dev/null +++ b/net-analyzer/httping/files/httping-2.2.1-flags.patch @@ -0,0 +1,12 @@ +--- a/Makefile ++++ b/Makefile +@@ -84,8 +84,7 @@ + endif + + ifeq ($(DEBUG),yes) +-CFLAGS+=-D_DEBUG -ggdb +-LDFLAGS+=-g ++CFLAGS+=-D_DEBUG + endif + + ifeq ($(ARM),yes) diff --git a/net-analyzer/httping/httping-2.5.ebuild b/net-analyzer/httping/httping-2.5.ebuild new file mode 100644 index 000000000000..27dc3f021f52 --- /dev/null +++ b/net-analyzer/httping/httping-2.5.ebuild @@ -0,0 +1,70 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 +inherit eutils toolchain-funcs + +DESCRIPTION="http protocol ping-like program" +HOMEPAGE="http://www.vanheusden.com/httping/" +SRC_URI="http://www.vanheusden.com/${PN}/${P}.tgz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="amd64 hppa ~mips ~ppc ppc64 ~sparc x86" +IUSE="debug fftw libressl l10n_nl ncurses ssl +tfo" + +RDEPEND=" + fftw? ( sci-libs/fftw:3.0 ) + ncurses? ( sys-libs/ncurses:0= ) + ssl? ( + !libressl? ( dev-libs/openssl:0= ) + libressl? ( dev-libs/libressl:0= ) + ) +" +DEPEND=" + ${RDEPEND} + ncurses? ( virtual/pkgconfig ) +" + +# This would bring in test? ( dev-util/cppcheck ) but unlike +# upstream we should only care about compile/run time testing +RESTRICT="test" + +PATCHES=( + "${FILESDIR}"/${PN}-2.2.1-flags.patch +) + +src_prepare() { + default + + # doman does not get PN-LANG.CAT so we move things around and then point at + # it later + if use l10n_nl; then + mkdir nl || die + mv httping-nl.1 nl/httping.1 || die + fi +} + +src_configure() { + # not an autotools script + echo > makefile.inc || die + + use ncurses && LDFLAGS+=" $( $( tc-getPKG_CONFIG ) --libs ncurses )" +} + +src_compile() { + emake \ + CC="$(tc-getCC)" \ + FW=$(usex fftw) \ + DEBUG=$(usex debug) \ + NC=$(usex ncurses) \ + SSL=$(usex ssl) \ + TFO=$(usex tfo) +} + +src_install() { + dobin httping + doman httping.1 + + use l10n_nl && doman -i18n=nl nl/httping.1 +} diff --git a/net-analyzer/httping/httping-9999999.ebuild b/net-analyzer/httping/httping-9999999.ebuild new file mode 100644 index 000000000000..32a92c0aead0 --- /dev/null +++ b/net-analyzer/httping/httping-9999999.ebuild @@ -0,0 +1,70 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +inherit git-r3 toolchain-funcs + +DESCRIPTION="like ping but for HTTP requests" +HOMEPAGE="https://www.vanheusden.com/httping/" +EGIT_REPO_URI="https://github.com/flok99/httping" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="" +IUSE="debug fftw libressl l10n_nl ncurses ssl +tfo" + +RDEPEND=" + fftw? ( sci-libs/fftw:3.0 ) + ncurses? ( sys-libs/ncurses:0= ) + ssl? ( + !libressl? ( dev-libs/openssl:0= ) + libressl? ( dev-libs/libressl:0= ) + ) +" +DEPEND=" + ${RDEPEND} + ncurses? ( virtual/pkgconfig ) +" + +# This would bring in test? ( dev-util/cppcheck ) but unlike +# upstream we should only care about compile/run time testing +RESTRICT="test" + +PATCHES=( + "${FILESDIR}"/${PN}-2.2.1-flags.patch +) + +src_prepare() { + default + + # doman does not get PN-LANG.CAT so we move things around and then point at + # it later + if use l10n_nl; then + mkdir nl || die + mv httping-nl.1 nl/httping.1 || die + fi +} + +src_configure() { + # not an autotools script + echo > makefile.inc || die + + use ncurses && LDFLAGS+=" $( $( tc-getPKG_CONFIG ) --libs ncurses )" +} + +src_compile() { + emake \ + CC="$(tc-getCC)" \ + FW=$(usex fftw) \ + DEBUG=$(usex debug) \ + NC=$(usex ncurses) \ + SSL=$(usex ssl) \ + TFO=$(usex tfo) +} + +src_install() { + dobin httping + doman httping.1 + + use l10n_nl && doman -i18n=nl nl/httping.1 +} diff --git a/net-analyzer/httping/metadata.xml b/net-analyzer/httping/metadata.xml new file mode 100644 index 000000000000..b80d609ebe7e --- /dev/null +++ b/net-analyzer/httping/metadata.xml @@ -0,0 +1,12 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<maintainer type="project"> +<email>netmon@gentoo.org</email> +<name>Gentoo network monitoring and analysis project</name> +</maintainer> +<use> +<flag name="tfo">Enable support for TCP Fast Open</flag> +</use> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/hunt/Manifest b/net-analyzer/hunt/Manifest new file mode 100644 index 000000000000..9d632564e419 --- /dev/null +++ b/net-analyzer/hunt/Manifest @@ -0,0 +1,3 @@ +DIST hunt-1.5.tgz 99241 BLAKE2B df9092cdf6de0016ae5fe8d360a712eccd3c0f71bead3c93142ba2c3c421031cb5e6ff8c3b4782856286fd41a61e40a6453b48f240365ba88f6805bb3bbdd909 SHA512 b016f7ae0ac7568b4a5006b7c5e6f3e80df71a67d94a1e62afc46fb0f10cb661df7e3bff1f0229836a2247ef368dc2681ad955821e97cb6a91fcfe489b871a61 +DIST hunt_1.5-6.1.diff.gz 4556 BLAKE2B 74c27722ae61494ca922b013cc691c0e835d7cdcc01399aaf7fe9bc7da4532954c4da2023fc92e3a4f664bb2b5ab8ef22ff1c04694dc1ab7c205125ccea1ff84 SHA512 45ff3f977a32202d8ab9b7daa76a0ebb507d0b73d635c0f3649cf3b2bcb9fdc3094c9631d696dfaf27371bc5fb5eb62dbdc258795979755c7713a45357938a05 +DIST hunt_1.5.orig.tar.gz 99241 BLAKE2B df9092cdf6de0016ae5fe8d360a712eccd3c0f71bead3c93142ba2c3c421031cb5e6ff8c3b4782856286fd41a61e40a6453b48f240365ba88f6805bb3bbdd909 SHA512 b016f7ae0ac7568b4a5006b7c5e6f3e80df71a67d94a1e62afc46fb0f10cb661df7e3bff1f0229836a2247ef368dc2681ad955821e97cb6a91fcfe489b871a61 diff --git a/net-analyzer/hunt/files/hunt-1.5-exit.patch b/net-analyzer/hunt/files/hunt-1.5-exit.patch new file mode 100644 index 000000000000..226093e1795a --- /dev/null +++ b/net-analyzer/hunt/files/hunt-1.5-exit.patch @@ -0,0 +1,10 @@ +--- a/timer.c ++++ b/timer.c +@@ -8,6 +8,7 @@ + */ + #include <stdio.h> + #include <unistd.h> ++#include <stdlib.h> /* exit() */ + #include "hunt.h" + + struct list timejob_list = LIST_INIT(struct timejob, j_next); diff --git a/net-analyzer/hunt/files/hunt-1.5-flags.patch b/net-analyzer/hunt/files/hunt-1.5-flags.patch new file mode 100644 index 000000000000..2ffcd823847e --- /dev/null +++ b/net-analyzer/hunt/files/hunt-1.5-flags.patch @@ -0,0 +1,21 @@ +--- a/Makefile ++++ b/Makefile +@@ -1,8 +1,7 @@ +-CFLAGS=-Wall -O2 -g -D_REENTRANT ++CFLAGS += -I. -Wall -D_REENTRANT + #CFLAGS+=-DSYNC_FAST + #CFLAGS+=-D_WITH_LINUX_KERNEL_HDR + +-LDFLAGS= + #LDFLAGS=-static + + OBJ=hunt.o main.o c/list.o c/hash.o c/array.o util.o net.o \ +@@ -11,7 +10,7 @@ + addpolicy.o options.o resolv.o timer.o pktrelay.o + + hunt: $(OBJ) +- $(CC) ${LDFLAGS} -o $@ $^ -lpthread ++ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ -lpthread + + hunt_static: $(OBJ) + $(CC) ${LDFLAGS} -static -o $@ $^ -lpthread diff --git a/net-analyzer/hunt/files/hunt-1.5-gentoo.patch b/net-analyzer/hunt/files/hunt-1.5-gentoo.patch new file mode 100644 index 000000000000..e0bcccae0aae --- /dev/null +++ b/net-analyzer/hunt/files/hunt-1.5-gentoo.patch @@ -0,0 +1,19 @@ +--- a/Makefile ++++ b/Makefile +@@ -1,4 +1,4 @@ +-CFLAGS=-Wall -O2 -g -D_REENTRANT -std=gnu89 ++CFLAGS += -Wall -D_REENTRANT -std=gnu89 + #CFLAGS+=-DSYNC_FAST + #CFLAGS+=-D_WITH_LINUX_KERNEL_HDR + +--- a/tpserv/Makefile ++++ b/tpserv/Makefile +@@ -3,7 +3,7 @@ + all: tpserv + + tpserv: tpserv.o +- $(CC) -o $@ $< $(LIBS) ++ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< $(LIBS) + + clean: + rm -f *.o diff --git a/net-analyzer/hunt/files/hunt-1.5-log2.patch b/net-analyzer/hunt/files/hunt-1.5-log2.patch new file mode 100644 index 000000000000..fc36eaea1f3b --- /dev/null +++ b/net-analyzer/hunt/files/hunt-1.5-log2.patch @@ -0,0 +1,22 @@ +--- a/hunt.h ++++ b/hunt.h +@@ -401,7 +401,7 @@ + void set_tty_color_bg(enum TTY_COLOR fg, enum TTY_COLOR bg); + + int is_power2(unsigned int i); +-int log2(unsigned int i); ++int _hunt_log2(unsigned int i); + int count_mask(unsigned int mask); + + +--- a/util.c ++++ b/util.c +@@ -70,7 +70,7 @@ + return i ? 0 : 1; + } + +-int log2(unsigned int i) ++int _hunt_log2(unsigned int i) + { + int l = 0; + diff --git a/net-analyzer/hunt/files/hunt-1.5-tpserv-log.patch b/net-analyzer/hunt/files/hunt-1.5-tpserv-log.patch new file mode 100644 index 000000000000..2e50dfe04ec6 --- /dev/null +++ b/net-analyzer/hunt/files/hunt-1.5-tpserv-log.patch @@ -0,0 +1,100 @@ +--- a/tpserv/tpserv.c ++++ b/tpserv/tpserv.c +@@ -55,7 +55,7 @@ + return v1 > v2 ? v1 : v2; + } + +-static void log(int level, int pid, char *format, ...) ++static void hunt_log(int level, int pid, char *format, ...) + { + char buf[BUFSIZE]; + va_list va; +@@ -93,21 +93,21 @@ + { + if (verbose <= 1) + return; +- log(LOG_DEBUG, pid, "read %4d bytes %s", len, print_connection(from_addr, to_addr)); ++ hunt_log(LOG_DEBUG, pid, "read %4d bytes %s", len, print_connection(from_addr, to_addr)); + } + + static void print_write(int pid, struct sockaddr_in *from_addr, struct sockaddr_in *to_addr, int len) + { + if (verbose <= 1) + return; +- log(LOG_DEBUG, pid, "write %4d bytes %s", len, print_connection(from_addr, to_addr)); ++ hunt_log(LOG_DEBUG, pid, "write %4d bytes %s", len, print_connection(from_addr, to_addr)); + } + + static void print_connect(int pid, struct sockaddr_in *from_addr, struct sockaddr_in *to_addr) + { + if (!verbose) + return; +- log(LOG_DEBUG, pid, "connect %s", print_connection(from_addr, to_addr)); ++ hunt_log(LOG_DEBUG, pid, "connect %s", print_connection(from_addr, to_addr)); + + } + +@@ -115,7 +115,7 @@ + { + if (!verbose) + return; +- log(LOG_DEBUG, pid, "disconnect %s", print_connection(from_addr, to_addr)); ++ hunt_log(LOG_DEBUG, pid, "disconnect %s", print_connection(from_addr, to_addr)); + } + + #if 0 +@@ -154,17 +154,17 @@ + int fd_remote; + + if ((fd_remote = socket(AF_INET, SOCK_STREAM, 0)) < 0) { +- log(LOG_ERR, pid, "socket failed %d:%s\n", errno, strerror(errno)); ++ hunt_log(LOG_ERR, pid, "socket failed %d:%s\n", errno, strerror(errno)); + exit(1); + } + to_addr_len = sizeof(*to_addr); + if (connect(fd_remote, to_addr, to_addr_len) < 0) { +- log(LOG_ERR, pid, "failed to connect to remote addr\n"); ++ hunt_log(LOG_ERR, pid, "failed to connect to remote addr\n"); + exit(1); + } + local_addr_len = sizeof(local_addr); + if (getsockname(fd_remote, (struct sockaddr *) &local_addr, &local_addr_len) < 0) { +- log(LOG_ERR, pid, "getpeername failed %d:%s\n", errno, strerror(errno)); ++ hunt_log(LOG_ERR, pid, "getpeername failed %d:%s\n", errno, strerror(errno)); + exit(1); + } + +@@ -214,13 +214,13 @@ + to_addr_len = sizeof(to_addr); + memset(&to_addr, 0, sizeof(to_addr)); + if (getsockname(fd, (struct sockaddr *) &to_addr, &to_addr_len) < 0) { +- log(LOG_ERR, pid, "getsockname failed %d:%s\n", errno, strerror(errno)); ++ hunt_log(LOG_ERR, pid, "getsockname failed %d:%s\n", errno, strerror(errno)); + exit(1); + } + from_addr_len = sizeof(from_addr); + memset(&from_addr, 0, sizeof(from_addr)); + if (getpeername(fd, (struct sockaddr *) &from_addr, &from_addr_len) < 0) { +- log(LOG_ERR, pid, "getpeername failed %d:%s\n", errno, strerror(errno)); ++ hunt_log(LOG_ERR, pid, "getpeername failed %d:%s\n", errno, strerror(errno)); + exit(1); + } + print_connect(pid, &from_addr, &to_addr); +@@ -328,7 +328,7 @@ + openlog(prog_name, LOG_PID, LOG_DAEMON); + } + if (verbose) +- log(LOG_DEBUG, getpid(), "ready"); ++ hunt_log(LOG_DEBUG, getpid(), "ready"); + + for (;;) { + clilen = sizeof(cliaddr); +@@ -336,7 +336,7 @@ + clifd = accept(lfd, (struct sockaddr *) &cliaddr, &clilen); + } while (clifd < 0 && errno == EINTR); + if (clifd < 0) { +- log(LOG_ERR, getpid(), "accept failed %d:%s", errno, strerror(errno)); ++ hunt_log(LOG_ERR, getpid(), "accept failed %d:%s", errno, strerror(errno)); + exit(1); + } + if ((child_pid = fork()) == 0) { diff --git a/net-analyzer/hunt/hunt-1.5-r1.ebuild b/net-analyzer/hunt/hunt-1.5-r1.ebuild new file mode 100644 index 000000000000..299342dba80e --- /dev/null +++ b/net-analyzer/hunt/hunt-1.5-r1.ebuild @@ -0,0 +1,33 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +inherit toolchain-funcs + +DESCRIPTION="tool for checking well known weaknesses in the TCP/IP protocol" +HOMEPAGE="http://lin.fsid.cvut.cz/~kra/index.html" +SRC_URI="http://lin.fsid.cvut.cz/~kra/hunt/${P}.tgz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~ppc x86" + +src_prepare() { + sed -i Makefile \ + -e 's:^CFLAGS=:CFLAGS += -I. :g' \ + -e '/^LDFLAGS=/d' \ + -e 's:${LDFLAGS}:$(LDFLAGS):g' \ + -e 's:-O2 -g::' \ + || die +} + +src_compile() { + emake CC=$(tc-getCC) +} + +src_install() { + dobin hunt + doman man/hunt.1 + dodoc CHANGES README* TODO tpsetup/transproxy +} diff --git a/net-analyzer/hunt/hunt-1.5-r3.ebuild b/net-analyzer/hunt/hunt-1.5-r3.ebuild new file mode 100644 index 000000000000..7e824be3caa3 --- /dev/null +++ b/net-analyzer/hunt/hunt-1.5-r3.ebuild @@ -0,0 +1,32 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +inherit eutils flag-o-matic toolchain-funcs + +DESCRIPTION="tool for checking well known weaknesses in the TCP/IP protocol" +HOMEPAGE="http://lin.fsid.cvut.cz/~kra/index.html" +SRC_URI="http://lin.fsid.cvut.cz/~kra/hunt/${P}.tgz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~ppc ~x86" + +src_prepare() { + epatch \ + "${FILESDIR}"/${P}-exit.patch \ + "${FILESDIR}"/${P}-flags.patch \ + "${FILESDIR}"/${P}-log2.patch +} + +src_compile() { + append-cflags -std=gnu89 + emake CC=$(tc-getCC) +} + +src_install() { + dobin hunt + doman man/hunt.1 + dodoc CHANGES README* TODO tpsetup/transproxy +} diff --git a/net-analyzer/hunt/hunt-1.5_p6_p1.ebuild b/net-analyzer/hunt/hunt-1.5_p6_p1.ebuild new file mode 100644 index 000000000000..bdcca2f3eaf8 --- /dev/null +++ b/net-analyzer/hunt/hunt-1.5_p6_p1.ebuild @@ -0,0 +1,46 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +inherit flag-o-matic toolchain-funcs + +DESCRIPTION="tool for checking well known weaknesses in the TCP/IP protocol" +HOMEPAGE="http://lin.fsid.cvut.cz/~kra/index.html" +SRC_URI=" + mirror://debian/pool/main/${PN:0:1}/${PN}/${PN}_${PV/_p*}.orig.tar.gz + mirror://debian/pool/main/${PN:0:1}/${PN}/${PN}_${PV/_p*}-$(ver_cut 4).$(ver_cut 6).diff.gz +" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~ppc ~x86" +PATCHES=( + "${FILESDIR}"/${P/_p*}-exit.patch + "${FILESDIR}"/${P/_p*}-gentoo.patch + "${FILESDIR}"/${P/_p*}-log2.patch + "${FILESDIR}"/${P/_p*}-tpserv-log.patch +) +S=${WORKDIR}/${P/_p*} + +src_prepare() { + eapply "${WORKDIR}"/${PN}_${PV/_p*}-$(ver_cut 4).$(ver_cut 6).diff + default +} + +src_configure() { + append-cppflags -DSYNC_FAST +} + +src_compile() { + local target + for target in . tpserv; do + emake CC=$(tc-getCC) LDFLAGS="${CFLAGS} ${LDFLAGS}" -C "${target}" + done +} + +src_install() { + dosbin hunt tpserv/tpserv tpsetup/transproxy + doman man/hunt.1 + dodoc CHANGES README* TODO tpsetup/transproxy + newdoc debian/changelog debian.changelog +} diff --git a/net-analyzer/hunt/metadata.xml b/net-analyzer/hunt/metadata.xml new file mode 100644 index 000000000000..bd13a914477c --- /dev/null +++ b/net-analyzer/hunt/metadata.xml @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<maintainer type="project"> + <email>netmon@gentoo.org</email> + <name>Gentoo network monitoring and analysis project</name> +</maintainer> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/hydra/Manifest b/net-analyzer/hydra/Manifest new file mode 100644 index 000000000000..a516b15bd1e6 --- /dev/null +++ b/net-analyzer/hydra/Manifest @@ -0,0 +1,3 @@ +DIST hydra-8.1.tar.gz 559031 BLAKE2B a3d2b52508a1d03a2f3d6cecf7100543487b5a0f6210dd6128d3ab48ad16ca3a8fad49709163830049ed8b9bb6891861f9c3f5fd5a6179b0a87a072877e829af SHA512 7608dd365865e5976bea446faedaad9f0334e7572fd0ee47a601c471471fc7c8a922c7114f4df08705b34b29144d3a6552e66148adf6b0f92c67301119c94959 +DIST hydra-8.9.1.tar.gz 1186320 BLAKE2B 97c29cda5e26197ed66aa29555b0e4de3ef5b08bf65aa09fd0d564ee5f63825af71d6a41c4552a06a4c86a98dab5a69913c0b0200fe4e5068284ec7fc1f1061b SHA512 68b07dcb22bc55937e79035954417d820691e3a1eea169c959886ce6a741f545efe7879f31f41a1751779c923410dcc67fe8914bb9b5cf567edfc6fad3997d72 +DIST hydra-9.0.tar.gz 1168498 BLAKE2B b4834c66fb1bebcd19151784b75d4c9220cbf7045b289a063a1cbc48a793abfa2edcb466d43234bd4c8e14074a2e2a39ccd697698392f24f39c84da54ee07165 SHA512 58067bd2696e82645bb959fe5537f2876e1d8c170a15fe6a9ac65bbdc33cfb75b47fd1a969c314a6c6d91b2b6c0ce4ba087680bbd67a5a38925a2a8b5c5ad338 diff --git a/net-analyzer/hydra/files/hydra-8.0-configure.patch b/net-analyzer/hydra/files/hydra-8.0-configure.patch new file mode 100644 index 000000000000..3ab9989b6384 --- /dev/null +++ b/net-analyzer/hydra/files/hydra-8.0-configure.patch @@ -0,0 +1,44 @@ +--- a/configure ++++ b/configure +@@ -66,8 +66,6 @@ + MYSQL_IPATH="" + AFP_PATH="" + AFP_IPATH="" +-NCP_PATH="" +-NCP_IPATH="" + SVN_PATH="" + SVN_IPATH="" + APR_IPATH="" +@@ -508,32 +506,6 @@ + fi + + echo "Checking for NCP (libncp.so / nwcalls.h) ..." +-for i in $LIBDIRS ; do +- if [ "X" = "X$NCP_PATH" ]; then +- if [ -f "$i/libncp.so" -o -f "$i/libncp.dylib" -o -f "$i/libncp.a" ]; then +- NCP_PATH="$i" +- fi +- fi +- if [ "X" = "X$NCP_PATH" ]; then +- TMP_LIB=`/bin/ls $i/libncp.so.* 2> /dev/null | grep ncp.` +- if [ -n "$TMP_LIB" ]; then +- NCP_PATH="$i" +- fi +- fi +- if [ "X" = "X$NCP_PATH" ]; then +- TMP_LIB=`/bin/ls $i/libncp.dll* 2> /dev/null | grep ncp.` +- if [ -n "$TMP_LIB" ]; then +- NCP_PATH="$i" +- fi +- fi +-done +-for i in $INCDIRS ; do +- if [ "X" != "X$NCP_PATH" ]; then +- if [ -f "$i/ncp/nwcalls.h" ]; then +- NCP_IPATH="$i" +- fi +- fi +-done + if [ -n "$NCP_PATH" -a -n "$NCP_IPATH" ]; then + echo " ... found" + fi diff --git a/net-analyzer/hydra/files/hydra-8.4-configure.patch b/net-analyzer/hydra/files/hydra-8.4-configure.patch new file mode 100644 index 000000000000..ba99ff2acda4 --- /dev/null +++ b/net-analyzer/hydra/files/hydra-8.4-configure.patch @@ -0,0 +1,48 @@ +--- a/configure ++++ b/configure +@@ -46,8 +46,6 @@ + MYSQL_IPATH="" + AFP_PATH="" + AFP_IPATH="" +-NCP_PATH="" +-NCP_IPATH="" + SVN_PATH="" + SVN_IPATH="" + APR_IPATH="" +@@ -679,36 +677,6 @@ + fi + + echo "Checking for NCP (libncp.so / nwcalls.h) ..." +-for i in $LIBDIRS ; do +- if [ "X" = "X$NCP_PATH" ]; then +- if [ -f "$i/libncp.so" -o -f "$i/libncp.dylib" -o -f "$i/libncp.a" ]; then +- NCP_PATH="$i" +- fi +- fi +- if [ "X" = "X$NCP_PATH" ]; then +- TMP_LIB=`/bin/ls $i/libncp.so.* 2> /dev/null | grep ncp.` +- if [ -n "$TMP_LIB" ]; then +- NCP_PATH="$i" +- fi +- fi +- if [ "X" = "X$NCP_PATH" ]; then +- TMP_LIB=`/bin/ls $i/libncp.dll* 2> /dev/null | grep ncp.` +- if [ -n "$TMP_LIB" ]; then +- NCP_PATH="$i" +- fi +- fi +-done +-for i in $INCDIRS ; do +- if [ "X" != "X$NCP_PATH" ]; then +- if [ -f "$i/ncp/nwcalls.h" ]; then +- NCP_IPATH="$i" +- fi +- fi +-done +-if [ "X" != "X$DEBUG" ]; then +- echo DEBUG: NCP_PATH=$NCP_PATH/libncp +- echo DEBUG: NCP_IPATH=$NCP_IPATH/ncp/nwcalls.h +-fi + if [ -n "$NCP_PATH" -a -n "$NCP_IPATH" ]; then + echo " ... found" + fi diff --git a/net-analyzer/hydra/files/hydra-9.0-unneeded-buf.patch b/net-analyzer/hydra/files/hydra-9.0-unneeded-buf.patch new file mode 100644 index 000000000000..0055257b04a0 --- /dev/null +++ b/net-analyzer/hydra/files/hydra-9.0-unneeded-buf.patch @@ -0,0 +1,60 @@ +--- a/hydra-irc.c ++++ b/hydra-irc.c +@@ -7,7 +7,6 @@ RFC 1459: Internet Relay Chat Protocol + */ + + extern char *HYDRA_EXIT; +-char *buf; + char buffer[300] = ""; + int32_t myport = PORT_IRC, mysslport = PORT_IRC_SSL; + +--- a/hydra-rexec.c ++++ b/hydra-rexec.c +@@ -5,7 +5,6 @@ + #define COMMAND "/bin/ls /" + + extern char *HYDRA_EXIT; +-char *buf; + + int32_t start_rexec(int32_t s, char *ip, int32_t port, unsigned char options, char *miscptr, FILE * fp) { + char *empty = ""; +--- a/hydra-rlogin.c ++++ b/hydra-rlogin.c +@@ -12,7 +12,6 @@ no memleaks found on 110425 + #define TERM "vt100/9600" + + extern char *HYDRA_EXIT; +-char *buf; + + int32_t start_rlogin(int32_t s, char *ip, int32_t port, unsigned char options, char *miscptr, FILE * fp) { + char *empty = ""; +--- a/hydra-rsh.c ++++ b/hydra-rsh.c +@@ -11,7 +11,6 @@ no memleaks found on 110425 + */ + + extern char *HYDRA_EXIT; +-char *buf; + + int32_t start_rsh(int32_t s, char *ip, int32_t port, unsigned char options, char *miscptr, FILE * fp) { + char *empty = ""; +--- a/hydra-rtsp.c ++++ b/hydra-rtsp.c +@@ -12,7 +12,6 @@ + #include "sasl.h" + + extern char *HYDRA_EXIT; +-char *buf; + char packet[500]; + char packet2[500]; + +--- a/hydra-teamspeak.c ++++ b/hydra-teamspeak.c +@@ -36,7 +36,6 @@ struct team_speak { + extern int32_t hydra_data_ready_timed(int32_t socket, long sec, long usec); + + extern char *HYDRA_EXIT; +-char *buf; + + int32_t start_teamspeak(int32_t s, char *ip, int32_t port, unsigned char options, char *miscptr, FILE * fp) { + char *empty = ""; diff --git a/net-analyzer/hydra/files/hydra-9.0-vnc.patch b/net-analyzer/hydra/files/hydra-9.0-vnc.patch new file mode 100644 index 000000000000..69c933ee8386 --- /dev/null +++ b/net-analyzer/hydra/files/hydra-9.0-vnc.patch @@ -0,0 +1,11 @@ +--- a/hydra-vnc.c ++++ b/hydra-vnc.c +@@ -75,7 +75,7 @@ int32_t start_vnc(int32_t s, char *ip, int32_t port, unsigned char options, char + //supported security type + switch (buf2[3]) { + case 0x0: +- hydra_report(stderr, "[ERROR] VNC server told us to quit %c\n", buf[3]); ++ hydra_report(stderr, "[ERROR] VNC server told us to quit %c\n", buf2[3]); + hydra_child_exit(0); + break; + case 0x1: diff --git a/net-analyzer/hydra/hydra-8.1.ebuild b/net-analyzer/hydra/hydra-8.1.ebuild new file mode 100644 index 000000000000..b1b7d80ab55a --- /dev/null +++ b/net-analyzer/hydra/hydra-8.1.ebuild @@ -0,0 +1,98 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 +inherit eutils toolchain-funcs + +DESCRIPTION="Parallelized network login hacker" +HOMEPAGE="http://www.thc.org/thc-hydra/" +SRC_URI="http://freeworld.thc.org/releases/${P}.tar.gz" + +LICENSE="GPL-3" +SLOT="0" +KEYWORDS="amd64 ~ppc x86" +IUSE="firebird gtk idn mysql ncp oracle pcre postgres ssl subversion" + +RDEPEND=" + dev-libs/openssl + sys-libs/ncurses + firebird? ( dev-db/firebird ) + gtk? ( + dev-libs/atk + dev-libs/glib:2 + x11-libs/gdk-pixbuf:2 + x11-libs/gtk+:2 + ) + idn? ( net-dns/libidn ) + mysql? ( virtual/mysql ) + ncp? ( net-fs/ncpfs ) + oracle? ( dev-db/oracle-instantclient-basic ) + pcre? ( dev-libs/libpcre ) + postgres? ( dev-db/postgresql ) + ssl? ( >=net-libs/libssh-0.4.0 ) + subversion? ( dev-vcs/subversion ) +" +DEPEND=" + ${RDEPEND} + virtual/pkgconfig +" + +src_prepare() { + # None of the settings in Makefile.unix are useful to us + : > Makefile.unix + + sed -i \ + -e 's:|| echo.*$::' \ + -e '/\t-$(CC)/s:-::' \ + -e '/^OPTS/{s|=|+=|;s| -O3||}' \ + -e '/ -o /s:$(OPTS):& $(LDFLAGS):g' \ + Makefile.am || die + + epatch "${FILESDIR}"/${PN}-8.0-configure.patch +} + +src_configure() { + export OPTS="${CFLAGS}" + + if ! use subversion; then + sed -i 's/-lsvn_client-1 -lapr-1 -laprutil-1 -lsvn_subr-1//;s/-DLIBSVN//' configure || die + fi + + if ! use mysql; then + sed -i 's/-lmysqlclient//;s/-DLIBMYSQLCLIENT//' configure || die + fi + + # Linking against libtinfo might be enough here but pkg-config --libs tinfo + # would require a USE=tinfo flag and recent linkers should drop libcurses + # as needed + sed -i \ + -e 's|-lcurses|'"$( $(tc-getPKG_CONFIG) --libs ncurses)"'|g' \ + configure || die + + # Note: despite the naming convention, the top level script is not an + # autoconf-based script. + export NCP_PATH=$(usex ncp /usr/$(get_libdir) '') + export NCP_IPATH=$(usex ncp /usr/include '') + sh configure \ + --prefix=/usr \ + --nostrip \ + $(use gtk && echo --disable-xhydra) \ + || die + + if use gtk ; then + cd hydra-gtk && \ + econf + fi +} + +src_compile() { + tc-export CC + emake XLIBPATHS='' + use gtk && emake -C hydra-gtk +} + +src_install() { + dobin hydra pw-inspector + use gtk && dobin hydra-gtk/src/xhydra + dodoc CHANGES README +} diff --git a/net-analyzer/hydra/hydra-8.9.1.ebuild b/net-analyzer/hydra/hydra-8.9.1.ebuild new file mode 100644 index 000000000000..9ee22e48e676 --- /dev/null +++ b/net-analyzer/hydra/hydra-8.9.1.ebuild @@ -0,0 +1,103 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +inherit toolchain-funcs + +DESCRIPTION="Parallelized network login hacker" +HOMEPAGE="https://github.com/vanhauser-thc/thc-hydra" +SRC_URI="https://github.com/vanhauser-thc/thc-hydra/archive/v${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="GPL-3" +SLOT="0" +KEYWORDS="~amd64 ~ppc ~x86" +IUSE="firebird gtk idn libressl mysql ncp oracle pcre postgres ssl subversion" + +RDEPEND=" + !libressl? ( dev-libs/openssl:0= ) + libressl? ( dev-libs/libressl:0= ) + sys-libs/ncurses:= + firebird? ( dev-db/firebird ) + gtk? ( + dev-libs/atk + dev-libs/glib:2 + x11-libs/gdk-pixbuf:2 + x11-libs/gtk+:2 + ) + idn? ( net-dns/libidn:0= ) + mysql? ( dev-db/mysql-connector-c:0= ) + ncp? ( net-fs/ncpfs ) + oracle? ( dev-db/oracle-instantclient-basic ) + pcre? ( dev-libs/libpcre ) + postgres? ( dev-db/postgresql:* ) + ssl? ( >=net-libs/libssh-0.4.0 ) + subversion? ( dev-vcs/subversion ) +" +DEPEND=" + ${RDEPEND} + virtual/pkgconfig +" +PATCHES=( + "${FILESDIR}"/${PN}-8.4-configure.patch +) +S=${WORKDIR}/thc-${P} + +src_prepare() { + default + + # None of the settings in Makefile.unix are useful to us + : > Makefile.unix + + sed -i \ + -e 's:|| echo.*$::' \ + -e '/\t-$(CC)/s:-::' \ + -e '/^OPTS/{s|=|+=|;s| -O3||}' \ + -e '/ -o /s:$(OPTS):& $(LDFLAGS):g' \ + Makefile.am || die +} + +src_configure() { + export OPTS="${CFLAGS}" + + if ! use subversion; then + sed -i 's/-lsvn_client-1 -lapr-1 -laprutil-1 -lsvn_subr-1//;s/-DLIBSVN//' configure || die + fi + + if ! use mysql; then + sed -i 's/-lmysqlclient//;s/-DLIBMYSQLCLIENT//' configure || die + fi + + # Linking against libtinfo might be enough here but pkg-config --libs tinfo + # would require a USE=tinfo flag and recent linkers should drop libcurses + # as needed + sed -i \ + -e 's|-lcurses|'"$( $(tc-getPKG_CONFIG) --libs ncurses)"'|g' \ + configure || die + + # Note: despite the naming convention, the top level script is not an + # autoconf-based script. + export NCP_PATH=$(usex ncp /usr/$(get_libdir) '') + export NCP_IPATH=$(usex ncp /usr/include '') + sh configure \ + --prefix=/usr \ + --nostrip \ + $(use gtk && echo --disable-xhydra) \ + || die + + if use gtk ; then + cd hydra-gtk && \ + econf + fi +} + +src_compile() { + tc-export CC + emake XLIBPATHS='' + use gtk && emake -C hydra-gtk +} + +src_install() { + dobin hydra pw-inspector + use gtk && dobin hydra-gtk/src/xhydra + dodoc CHANGES README +} diff --git a/net-analyzer/hydra/hydra-9.0-r1.ebuild b/net-analyzer/hydra/hydra-9.0-r1.ebuild new file mode 100644 index 000000000000..402929ea2301 --- /dev/null +++ b/net-analyzer/hydra/hydra-9.0-r1.ebuild @@ -0,0 +1,129 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +inherit flag-o-matic toolchain-funcs + +DESCRIPTION="Parallelized network login hacker" +HOMEPAGE="https://github.com/vanhauser-thc/thc-hydra" +SRC_URI="https://github.com/vanhauser-thc/thc-hydra/archive/v${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="GPL-3" +SLOT="0" +KEYWORDS="~amd64 ~ppc ~x86" +IUSE=" + debug firebird gcrypt gtk idn libressl memcached mongodb mysql ncp ncurses + oracle pcre postgres rdp libssh subversion zlib +" + +RDEPEND=" + gtk? ( + dev-libs/atk + dev-libs/glib:2 + x11-libs/gdk-pixbuf:2 + x11-libs/gtk+:2 + ) + firebird? ( dev-db/firebird ) + gcrypt? ( dev-libs/libgcrypt ) + idn? ( net-dns/libidn:0= ) + !libressl? ( dev-libs/openssl:0= ) + libressl? ( dev-libs/libressl:0= ) + memcached? ( dev-libs/libmemcached[sasl] ) + mongodb? ( dev-libs/mongo-c-driver ) + mysql? ( dev-db/mysql-connector-c:0= ) + ncp? ( net-fs/ncpfs ) + ncurses? ( sys-libs/ncurses:= ) + oracle? ( dev-db/oracle-instantclient-basic ) + pcre? ( dev-libs/libpcre ) + postgres? ( dev-db/postgresql:* ) + rdp? ( net-misc/freerdp ) + libssh? ( >=net-libs/libssh-0.4.0 ) + subversion? ( dev-vcs/subversion ) + zlib? ( sys-libs/zlib ) +" +DEPEND=" + ${RDEPEND} + virtual/pkgconfig +" +PATCHES=( + "${FILESDIR}"/${PN}-9.0-unneeded-buf.patch + "${FILESDIR}"/${PN}-9.0-vnc.patch +) +S=${WORKDIR}/thc-${P} + +src_prepare() { + default + + # None of the settings in Makefile.unix are useful to us + mv Makefile.unix{,.gentoo_unused} || die + touch Makefile.unix || die + + sed -i \ + -e 's:|| echo.*$::' \ + -e '/\t-$(CC)/s:-::' \ + -e '/^OPTS/{s|=|+=|;s| -O3||}' \ + -e '/ -o /s:$(OPTS):& $(LDFLAGS):g' \ + Makefile.am || die +} + +src_configure() { + # Note: the top level configure script is not autoconf-based + tc-export CC PKG_CONFIG + + append-cflags -fcommon + + export OPTS="${CFLAGS}" + + hydra_sed() { + if use ${1}; then + einfo "Enabling ${1}" + if [[ -n "${3}" ]]; then + sed -i 's#'"${2}"'#'"${3}"'#' configure || die + fi + else + einfo "Disabling ${1}" + sed -i 's#'"${2}"'##; s#'"${4}"'##' configure || die + fi + } + + hydra_sed firebird '-lfbclient' '' '-DLIBFIREBIRD' + hydra_sed gcrypt '-lgcrypt' '$( ${CTARGET:-${CHOST}}-libgcrypt-config --libs )' '-DHAVE_GCRYPT' + hydra_sed idn '-lidn' '$( "${PKG_CONFIG}" --libs libidn )' '-DLIBIDN -DHAVE_PR29_H' + hydra_sed libssh '-lssh' '$( "${PKG_CONFIG}" --libs libssh )' '-DLIBSSH' + hydra_sed memcached '-lmemcached' '$( "${PKG_CONFIG}" --libs libmemcached )' '-DLIBMCACHED' + hydra_sed mongodb '-lmongoc-1.0' '$( "${PKG_CONFIG}" --libs libmongoc-1.0 )' '-DLIBMONGODB\|-DLIBBSON' + hydra_sed mysql '-lmysqlclient' '$( ${CTARGET:-${CHOST}}-mysql_config --libs )' '-DLIBMYSQLCLIENT' + hydra_sed ncp '-lncp' '' '-DLIBNCP' + hydra_sed ncurses '-lcurses' '$( "${PKG_CONFIG}" --libs ncurses )' '-DLIBNCURSES' + hydra_sed pcre '-lpcre' '$( "${PKG_CONFIG}" --libs libpcre )' '-DHAVE_PCRE' + hydra_sed postgres '-lpq' '$( "${PKG_CONFIG}" --libs libpq )' '-DLIBPOSTGRES' + hydra_sed oracle '-locci -lclntsh' '' '-DLIBORACLE' + hydra_sed rdp '-lfreerdp2' '$( "${PKG_CONFIG}" --libs freerdp2 )' '-DLIBFREERDP2' + # TODO: https://bugs.gentoo.org/686148 + #hydra_sed subversion '-lsvn_client-1 -lapr-1 -laprutil-1 -lsvn_subr-1' '$( "${PKG_CONFIG}" --libs libsvn_client )' '-DLIBSVN' + hydra_sed subversion '-lsvn_client-1 -lapr-1 -laprutil-1 -lsvn_subr-1' '' '-DLIBSVN' + hydra_sed zlib '-lz' '$( "${PKG_CONFIG}" --libs zlib )' '-DHAVE_ZLIB' + + sh configure \ + $(use gtk || echo --disable-xhydra) \ + $(usex debug '--debug' '') \ + --nostrip \ + --prefix=/usr \ + || die + + if use gtk ; then + pushd hydra-gtk || die + econf + fi +} + +src_compile() { + emake XLIBPATHS='' + use gtk && emake -C hydra-gtk +} + +src_install() { + dobin hydra pw-inspector + use gtk && dobin hydra-gtk/src/xhydra + dodoc CHANGES README +} diff --git a/net-analyzer/hydra/hydra-9.0.ebuild b/net-analyzer/hydra/hydra-9.0.ebuild new file mode 100644 index 000000000000..3a35af9c7dba --- /dev/null +++ b/net-analyzer/hydra/hydra-9.0.ebuild @@ -0,0 +1,123 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +inherit toolchain-funcs + +DESCRIPTION="Parallelized network login hacker" +HOMEPAGE="https://github.com/vanhauser-thc/thc-hydra" +SRC_URI="https://github.com/vanhauser-thc/thc-hydra/archive/v${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="GPL-3" +SLOT="0" +KEYWORDS="amd64 ~ppc x86" +IUSE=" + debug firebird gcrypt gtk idn libressl memcached mongodb mysql ncp ncurses + oracle pcre postgres rdp libssh subversion zlib +" + +RDEPEND=" + gtk? ( + dev-libs/atk + dev-libs/glib:2 + x11-libs/gdk-pixbuf:2 + x11-libs/gtk+:2 + ) + firebird? ( dev-db/firebird ) + gcrypt? ( dev-libs/libgcrypt ) + idn? ( net-dns/libidn:0= ) + !libressl? ( dev-libs/openssl:0= ) + libressl? ( dev-libs/libressl:0= ) + memcached? ( dev-libs/libmemcached[sasl] ) + mongodb? ( dev-libs/mongo-c-driver ) + mysql? ( dev-db/mysql-connector-c:0= ) + ncp? ( net-fs/ncpfs ) + ncurses? ( sys-libs/ncurses:= ) + oracle? ( dev-db/oracle-instantclient-basic ) + pcre? ( dev-libs/libpcre ) + postgres? ( dev-db/postgresql:* ) + rdp? ( net-misc/freerdp ) + libssh? ( >=net-libs/libssh-0.4.0 ) + subversion? ( dev-vcs/subversion ) + zlib? ( sys-libs/zlib ) +" +DEPEND=" + ${RDEPEND} + virtual/pkgconfig +" +S=${WORKDIR}/thc-${P} + +src_prepare() { + default + + # None of the settings in Makefile.unix are useful to us + mv Makefile.unix{,.gentoo_unused} || die + touch Makefile.unix || die + + sed -i \ + -e 's:|| echo.*$::' \ + -e '/\t-$(CC)/s:-::' \ + -e '/^OPTS/{s|=|+=|;s| -O3||}' \ + -e '/ -o /s:$(OPTS):& $(LDFLAGS):g' \ + Makefile.am || die +} + +src_configure() { + # Note: the top level configure script is not autoconf-based + tc-export CC PKG_CONFIG + + export OPTS="${CFLAGS}" + + hydra_sed() { + if use ${1}; then + einfo "Enabling ${1}" + if [[ -n "${3}" ]]; then + sed -i 's#'"${2}"'#'"${3}"'#' configure || die + fi + else + einfo "Disabling ${1}" + sed -i 's#'"${2}"'##; s#'"${4}"'##' configure || die + fi + } + + hydra_sed firebird '-lfbclient' '' '-DLIBFIREBIRD' + hydra_sed gcrypt '-lgcrypt' '$( ${CTARGET:-${CHOST}}-libgcrypt-config --libs )' '-DHAVE_GCRYPT' + hydra_sed idn '-lidn' '$( "${PKG_CONFIG}" --libs libidn )' '-DLIBIDN -DHAVE_PR29_H' + hydra_sed libssh '-lssh' '$( "${PKG_CONFIG}" --libs libssh )' '-DLIBSSH' + hydra_sed memcached '-lmemcached' '$( "${PKG_CONFIG}" --libs libmemcached )' '-DLIBMCACHED' + hydra_sed mongodb '-lmongoc-1.0' '$( "${PKG_CONFIG}" --libs libmongoc-1.0 )' '-DLIBMONGODB\|-DLIBBSON' + hydra_sed mysql '-lmysqlclient' '$( ${CTARGET:-${CHOST}}-mysql_config --libs )' '-DLIBMYSQLCLIENT' + hydra_sed ncp '-lncp' '' '-DLIBNCP' + hydra_sed ncurses '-lcurses' '$( "${PKG_CONFIG}" --libs ncurses )' '-DLIBNCURSES' + hydra_sed pcre '-lpcre' '$( "${PKG_CONFIG}" --libs libpcre )' '-DHAVE_PCRE' + hydra_sed postgres '-lpq' '$( "${PKG_CONFIG}" --libs libpq )' '-DLIBPOSTGRES' + hydra_sed oracle '-locci -lclntsh' '' '-DLIBORACLE' + hydra_sed rdp '-lfreerdp2' '$( "${PKG_CONFIG}" --libs freerdp2 )' '-DLIBFREERDP2' + # TODO: https://bugs.gentoo.org/686148 + #hydra_sed subversion '-lsvn_client-1 -lapr-1 -laprutil-1 -lsvn_subr-1' '$( "${PKG_CONFIG}" --libs libsvn_client )' '-DLIBSVN' + hydra_sed subversion '-lsvn_client-1 -lapr-1 -laprutil-1 -lsvn_subr-1' '' '-DLIBSVN' + hydra_sed zlib '-lz' '$( "${PKG_CONFIG}" --libs zlib )' '-DHAVE_ZLIB' + + sh configure \ + $(use gtk || echo --disable-xhydra) \ + $(usex debug '--debug' '') \ + --nostrip \ + --prefix=/usr \ + || die + + if use gtk ; then + pushd hydra-gtk || die + econf + fi +} + +src_compile() { + emake XLIBPATHS='' + use gtk && emake -C hydra-gtk +} + +src_install() { + dobin hydra pw-inspector + use gtk && dobin hydra-gtk/src/xhydra + dodoc CHANGES README +} diff --git a/net-analyzer/hydra/hydra-9999999.ebuild b/net-analyzer/hydra/hydra-9999999.ebuild new file mode 100644 index 000000000000..3ff5496cc9b3 --- /dev/null +++ b/net-analyzer/hydra/hydra-9999999.ebuild @@ -0,0 +1,123 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +inherit flag-o-matic git-r3 toolchain-funcs + +DESCRIPTION="Parallelized network login hacker" +HOMEPAGE="https://github.com/vanhauser-thc/thc-hydra" +EGIT_REPO_URI="https://github.com/vanhauser-thc/thc-hydra" + +LICENSE="GPL-3" +SLOT="0" +KEYWORDS="" +IUSE=" + debug firebird gcrypt gtk idn libressl memcached mongodb mysql ncp ncurses + oracle pcre postgres rdp libssh subversion zlib +" + +RDEPEND=" + gtk? ( + dev-libs/atk + dev-libs/glib:2 + x11-libs/gdk-pixbuf:2 + x11-libs/gtk+:2 + ) + firebird? ( dev-db/firebird ) + gcrypt? ( dev-libs/libgcrypt ) + idn? ( net-dns/libidn:0= ) + !libressl? ( dev-libs/openssl:0= ) + libressl? ( dev-libs/libressl:0= ) + memcached? ( dev-libs/libmemcached[sasl] ) + mongodb? ( dev-libs/mongo-c-driver ) + mysql? ( dev-db/mysql-connector-c:0= ) + ncp? ( net-fs/ncpfs ) + ncurses? ( sys-libs/ncurses:= ) + oracle? ( dev-db/oracle-instantclient-basic ) + pcre? ( dev-libs/libpcre ) + postgres? ( dev-db/postgresql:* ) + rdp? ( net-misc/freerdp ) + libssh? ( >=net-libs/libssh-0.4.0 ) + subversion? ( dev-vcs/subversion ) + zlib? ( sys-libs/zlib ) +" +DEPEND=" + ${RDEPEND} + virtual/pkgconfig +" + +src_prepare() { + default + + # None of the settings in Makefile.unix are useful to us + mv Makefile.unix{,.gentoo_unused} || die + touch Makefile.unix || die + + sed -i \ + -e 's:|| echo.*$::' \ + -e '/\t-$(CC)/s:-::' \ + -e '/^OPTS/{s|=|+=|;s| -O3||}' \ + -e '/ -o /s:$(OPTS):& $(LDFLAGS):g' \ + Makefile.am || die +} + +src_configure() { + # Note: the top level configure script is not autoconf-based + tc-export CC PKG_CONFIG + append-cflags -fcommon + + export OPTS="${CFLAGS}" + + hydra_sed() { + if use ${1}; then + einfo "Enabling ${1}" + if [[ -n "${3}" ]]; then + sed -i 's#'"${2}"'#'"${3}"'#' configure || die + fi + else + einfo "Disabling ${1}" + sed -i 's#'"${2}"'##; s#'"${4}"'##' configure || die + fi + } + + hydra_sed firebird '-lfbclient' '' '-DLIBFIREBIRD' + hydra_sed gcrypt '-lgcrypt' '$( ${CTARGET:-${CHOST}}-libgcrypt-config --libs )' '-DHAVE_GCRYPT' + hydra_sed idn '-lidn' '$( "${PKG_CONFIG}" --libs libidn )' '-DLIBIDN -DHAVE_PR29_H' + hydra_sed libssh '-lssh' '$( "${PKG_CONFIG}" --libs libssh )' '-DLIBSSH' + hydra_sed memcached '-lmemcached' '$( "${PKG_CONFIG}" --libs libmemcached )' '-DLIBMCACHED' + hydra_sed mongodb '-lmongoc-1.0' '$( "${PKG_CONFIG}" --libs libmongoc-1.0 )' '-DLIBMONGODB\|-DLIBBSON' + hydra_sed mysql '-lmysqlclient' '$( ${CTARGET:-${CHOST}}-mysql_config --libs )' '-DLIBMYSQLCLIENT' + hydra_sed ncp '-lncp' '' '-DLIBNCP' + hydra_sed ncurses '-lcurses' '$( "${PKG_CONFIG}" --libs ncurses )' '-DLIBNCURSES' + hydra_sed pcre '-lpcre' '$( "${PKG_CONFIG}" --libs libpcre )' '-DHAVE_PCRE' + hydra_sed postgres '-lpq' '$( "${PKG_CONFIG}" --libs libpq )' '-DLIBPOSTGRES' + hydra_sed oracle '-locci -lclntsh' '' '-DLIBORACLE' + hydra_sed rdp '-lfreerdp2' '$( "${PKG_CONFIG}" --libs freerdp2 )' '-DLIBFREERDP2' + # TODO: https://bugs.gentoo.org/686148 + #hydra_sed subversion '-lsvn_client-1 -lapr-1 -laprutil-1 -lsvn_subr-1' '$( "${PKG_CONFIG}" --libs libsvn_client )' '-DLIBSVN' + hydra_sed subversion '-lsvn_client-1 -lapr-1 -laprutil-1 -lsvn_subr-1' '' '-DLIBSVN' + hydra_sed zlib '-lz' '$( "${PKG_CONFIG}" --libs zlib )' '-DHAVE_ZLIB' + + sh configure \ + $(use gtk || echo --disable-xhydra) \ + $(usex debug '--debug' '') \ + --nostrip \ + --prefix=/usr \ + || die + + if use gtk ; then + pushd hydra-gtk || die + econf + fi +} + +src_compile() { + emake XLIBPATHS='' + use gtk && emake -C hydra-gtk +} + +src_install() { + dobin hydra pw-inspector + use gtk && dobin hydra-gtk/src/xhydra + dodoc CHANGES README.md +} diff --git a/net-analyzer/hydra/metadata.xml b/net-analyzer/hydra/metadata.xml new file mode 100644 index 000000000000..59ad6da38614 --- /dev/null +++ b/net-analyzer/hydra/metadata.xml @@ -0,0 +1,14 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<maintainer type="project"> +<email>netmon@gentoo.org</email> +</maintainer> +<use> +<flag name="gcrypt">Enable radmin2 support through <pkg>dev-libs/libgcrypt</pkg></flag> +<flag name="libssh">Enable SSH support through <pkg>net-libs/libssh</pkg></flag> +<flag name="mongodb">MongoDB support through <pkg>dev-libs/mongo-c-driver</pkg></flag> +<flag name="ncp">NCP protocol (NetWare) support through <pkg>net-fs/ncpfs</pkg></flag> +</use> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/ibmonitor/Manifest b/net-analyzer/ibmonitor/Manifest new file mode 100644 index 000000000000..729a84a56ec4 --- /dev/null +++ b/net-analyzer/ibmonitor/Manifest @@ -0,0 +1 @@ +DIST ibmonitor-1.4.tar.gz 17025 BLAKE2B 33dcd54d3750b5e0dc70caaaf30f58f1dc2215cb2ba24174fafbfa356f27ae98133407505038df19104e9f8e1971ed4f8bf9ffeff37196d4640e90a4054970c6 SHA512 ef74dee22dbb88d07c37af9aaa0a0a49b6c49ff1b45a1637d06acbe32e4bc4e84d79cfe06ee7ba2b04d62fa3cfa0a10605eccde549d2fe04890dfa179adf20db diff --git a/net-analyzer/ibmonitor/ibmonitor-1.4-r1.ebuild b/net-analyzer/ibmonitor/ibmonitor-1.4-r1.ebuild new file mode 100644 index 000000000000..d40390197c37 --- /dev/null +++ b/net-analyzer/ibmonitor/ibmonitor-1.4-r1.ebuild @@ -0,0 +1,20 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +DESCRIPTION="Interactive bandwidth monitor" +HOMEPAGE="http://ibmonitor.sourceforge.net" +SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz" + +KEYWORDS="~amd64 ~hppa ~ppc ~x86" +LICENSE="GPL-2" +SLOT="0" + +RDEPEND="dev-perl/TermReadKey" +S=${WORKDIR}/${PN} + +src_install() { + dobin ibmonitor + dodoc AUTHORS ChangeLog README TODO +} diff --git a/net-analyzer/ibmonitor/ibmonitor-1.4.ebuild b/net-analyzer/ibmonitor/ibmonitor-1.4.ebuild new file mode 100644 index 000000000000..6e388ee87fa9 --- /dev/null +++ b/net-analyzer/ibmonitor/ibmonitor-1.4.ebuild @@ -0,0 +1,21 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +DESCRIPTION="Interactive bandwidth monitor" +HOMEPAGE="http://ibmonitor.sourceforge.net" +SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz" + +KEYWORDS="~amd64 ~hppa ~ppc x86" +LICENSE="GPL-2" +SLOT="0" + +S="${WORKDIR}/${PN}" + +RDEPEND="dev-perl/TermReadKey" + +src_install() { + dobin ibmonitor + dodoc AUTHORS ChangeLog README TODO +} diff --git a/net-analyzer/ibmonitor/metadata.xml b/net-analyzer/ibmonitor/metadata.xml new file mode 100644 index 000000000000..f1aab32572b8 --- /dev/null +++ b/net-analyzer/ibmonitor/metadata.xml @@ -0,0 +1,12 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>netmon@gentoo.org</email> + <name>Gentoo network monitoring and analysis project</name> + </maintainer> + <upstream> + <remote-id type="sourceforge">ibmonitor</remote-id> + </upstream> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/icinga2/Manifest b/net-analyzer/icinga2/Manifest new file mode 100644 index 000000000000..7032eeb37974 --- /dev/null +++ b/net-analyzer/icinga2/Manifest @@ -0,0 +1,2 @@ +DIST icinga2-2.11.3.tar.gz 7475785 BLAKE2B baabe8c90170a7b2ddb3ae7e95ef3cd042e64f68dbfdb50f5a981bc63ae5aa1e8ec4082729456d1b3fc02c0c74a98e15383cc56e56c53a2ab6181db94125365c SHA512 616e938fabaa6565fb9ac4824649c09801dd53b3517c0a9b5b62307293bc838377c18818cc13dd40e240902f02455c421d433b6ee54671403598c5b7aeb78ea1 +DIST icinga2-2.11.4.tar.gz 7476667 BLAKE2B 99b004f12504dae57ae2eda37983ae17da359c6e6998d41bb408c11328d0e69b7dd87ee5bf888c64862d52fe198145e56b1ac24f53d06dfebd1241d16e61a016 SHA512 51b0170d334d4ebe2c9614e47f65a1ab59483b4d5de862ae3d90152bf547bfc0051d9fca2f6b86d301ec897980fdc0b503232eb6dd82ae603d8e809bd56b23c1 diff --git a/net-analyzer/icinga2/files/icinga2.initd b/net-analyzer/icinga2/files/icinga2.initd new file mode 100644 index 000000000000..7faff11137d4 --- /dev/null +++ b/net-analyzer/icinga2/files/icinga2.initd @@ -0,0 +1,81 @@ +#!/sbin/openrc-run +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +extra_started_commands="reload" + +DAEMON="/usr/sbin/icinga2" +ICINGA2_CONFIG_FILE="/etc/icinga2/icinga2.conf" +ICINGA2_RUN_DIR="/run/icinga2" +ICINGA2_STATE_DIR="/var/cache/icinga2" +ICINGA2_CMD_DIR="${ICINGA2_RUN_DIR}/cmd" +ICINGA2_PID_FILE="${ICINGA2_RUN_DIR}/icinga2.pid" +ICINGA2_DAEMON_ARGS="daemon -c $ICINGA2_CONFIG_FILE -e $ICINGA2_ERROR_LOG -d" + +depend() { + need net +} + +checkconfig() { + if [ ! -e "$ICINGA2_CONFIG_FILE" ]; then + ewarn "Config file '$ICINGA2_CONFIG_FILE' does not exist." + eend 1 + fi + + ICINGA2_USER=$($DAEMON variable get --current RunAsUser) + if [ $? != 0 ]; then + eerror "Could not fetch RunAsUser variable: '$ICINGA2_USER'." + return 1 + fi + ICINGA2_GROUP=$($DAEMON variable get --current RunAsGroup) + if [ $? != 0 ]; then + eerror "Could not fetch RunAsGroup variable: '$ICINGA2_GROUP'." + return 1 + fi + + checkpath -d -m 0750 -o $ICINGA2_USER:$ICINGA2_GROUP $ICINGA2_RUN_DIR + checkpath -d -m 0750 -o $ICINGA2_USER:$ICINGA2_GROUP $ICINGA2_STATE_DIR + checkpath -d -m 2750 -o $ICINGA2_USER:$ICINGA2_GROUP $ICINGA2_CMD_DIR + + if ! $DAEMON daemon -c $ICINGA2_CONFIG_FILE -C > $ICINGA2_STARTUP_LOG 2>&1; then + eerror "Icinga2 detected configuration errors. Check '$ICINGA2_STARTUP_LOG' for details." + return 1 + fi +} + +start() { + checkconfig || return 1 + + ebegin "Starting icinga2" + start-stop-daemon --start --exec "${DAEMON}" \ + --pidfile "${ICINGA2_PID_FILE}" \ + -- $ICINGA2_DAEMON_ARGS > $ICINGA2_STARTUP_LOG 2>&1 + local retval=$? + if [ $retval -ne 0 ]; then + ewarn "Error starting icinga2. '$ICINGA2_STARTUP_LOG' for details." + fi + eend $retval +} + +stop() { + ebegin "Stopping icinga2" + start-stop-daemon \ + --stop \ + --pidfile $ICINGA2_PID_FILE \ + --retry "SIGTERM/15 SIGKILL/30" \ + --progress + eend $? +} + +reload() { + checkconfig || return 1 + + ebegin "Reloading icinga2" + start-stop-daemon --signal HUP --pidfile "$ICINGA2_PID_FILE" + + local retval=$? + if [ $retval -ne 0 ]; then + ewarn "Error reloading icinga2." + fi + eend $retval +} diff --git a/net-analyzer/icinga2/files/icinga2.initd-3 b/net-analyzer/icinga2/files/icinga2.initd-3 new file mode 100644 index 000000000000..5af259d5ddf8 --- /dev/null +++ b/net-analyzer/icinga2/files/icinga2.initd-3 @@ -0,0 +1,81 @@ +#!/sbin/openrc-run +# Copyright 1999-2018 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +extra_started_commands="reload" + +# Set defaults, see /etc/conf.d/icinga2 to override +: ${DAEMON:=/usr/sbin/icinga2} +: ${ICINGA2_CONFIG_FILE:=/etc/icinga2/icinga2.conf} +: ${ICINGA2_RUN_DIR:=/run/icinga2} +: ${ICINGA2_STATE_DIR:=/var/cache/icinga2} +: ${ICINGA2_PID_FILE:=${ICINGA2_RUN_DIR}/icinga2.pid} +: ${ICINGA2_CMD_DIR:=${ICINGA2_RUN_DIR}/cmd} +: ${ICINGA2_LOG_DIR:=/var/log/icinga2} +: ${ICINGA2_ERROR_LOG:=/var/log/icinga2/error.log} +: ${ICINGA2_STARTUP_LOG:=/var/log/icinga2/startup.log} +: ${ICINGA2_LOG:=/var/log/icinga2/icinga2.log} +: ${ICINGA2_CACHE_DIR:=/var/cache/icinga2} +: ${ICINGA2_USER:=icinga} +: ${ICINGA2_GROUP:=icingacmd} +: ${ICINGA2_COMMAND_GROUP:=icingacmd} + +ICINGA2_DAEMON_ARGS="daemon -c $ICINGA2_CONFIG_FILE -e $ICINGA2_ERROR_LOG -d" + +depend() { + need net +} + +checkconfig() { + if [ ! -e "$ICINGA2_CONFIG_FILE" ]; then + ewarn "Config file '$ICINGA2_CONFIG_FILE' does not exist." + eend 1 + fi + + checkpath -d -m 0750 -o $ICINGA2_USER:$ICINGA2_GROUP $ICINGA2_RUN_DIR + checkpath -d -m 0750 -o $ICINGA2_USER:$ICINGA2_GROUP $ICINGA2_STATE_DIR + checkpath -d -m 2750 -o $ICINGA2_USER:$ICINGA2_GROUP $ICINGA2_CMD_DIR + checkpath -d -m 0750 -o $ICINGA2_USER:$ICINGA2_GROUP $ICINGA2_CACHE_DIR + + if ! $DAEMON daemon -c $ICINGA2_CONFIG_FILE -C > $ICINGA2_STARTUP_LOG 2>&1; then + eerror "Icinga2 detected configuration errors. Check '$ICINGA2_STARTUP_LOG' for details." + return 1 + fi +} + +start() { + checkconfig || return 1 + + ebegin "Starting icinga2" + start-stop-daemon --start --exec "${DAEMON}" \ + --pidfile "${ICINGA2_PID_FILE}" \ + -- $ICINGA2_DAEMON_ARGS > $ICINGA2_STARTUP_LOG 2>&1 + local retval=$? + if [ $retval -ne 0 ]; then + ewarn "Error starting icinga2. '$ICINGA2_STARTUP_LOG' for details." + fi + eend $retval +} + +stop() { + ebegin "Stopping icinga2" + start-stop-daemon \ + --stop \ + --pidfile $ICINGA2_PID_FILE \ + --retry "SIGTERM/15 SIGKILL/30" \ + --progress + eend $? +} + +reload() { + checkconfig || return 1 + + ebegin "Reloading icinga2" + start-stop-daemon --signal HUP --pidfile "$ICINGA2_PID_FILE" + + local retval=$? + if [ $retval -ne 0 ]; then + ewarn "Error reloading icinga2." + fi + eend $retval +} diff --git a/net-analyzer/icinga2/icinga2-2.11.3.ebuild b/net-analyzer/icinga2/icinga2-2.11.3.ebuild new file mode 100644 index 000000000000..a98d579ea652 --- /dev/null +++ b/net-analyzer/icinga2/icinga2-2.11.3.ebuild @@ -0,0 +1,169 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 +if [[ ${PV} != 9999 ]]; then + inherit cmake-utils depend.apache eutils systemd toolchain-funcs wxwidgets + SRC_URI="https://github.com/Icinga/icinga2/archive/v${PV}.tar.gz -> ${P}.tar.gz" + KEYWORDS="amd64 ~arm64 x86" +else + inherit cmake-utils depend.apache eutils git-r3 systemd toolchain-funcs wxwidgets + EGIT_REPO_URI="https://github.com/Icinga/icinga2.git" + EGIT_BRANCH="master" +fi + +DESCRIPTION="Distributed, general purpose, network monitoring engine" +HOMEPAGE="http://icinga.org/icinga2" + +LICENSE="GPL-2" +SLOT="0" +IUSE="console libressl lto mail mariadb minimal +mysql nano-syntax +plugins postgres systemd +vim-syntax" +WX_GTK_VER="3.0" + +CDEPEND=" + !libressl? ( dev-libs/openssl:0= ) + libressl? ( dev-libs/libressl:0= ) + >=dev-libs/boost-1.66.0:=[context] + console? ( dev-libs/libedit ) + mariadb? ( dev-db/mariadb-connector-c:= ) + mysql? ( dev-db/mysql-connector-c:= ) + postgres? ( dev-db/postgresql:= ) + dev-libs/yajl" + +DEPEND=" + ${CDEPEND} + sys-devel/bison + >=sys-devel/flex-2.5.35" + +RDEPEND=" + ${CDEPEND} + plugins? ( || ( + net-analyzer/monitoring-plugins + net-analyzer/nagios-plugins + ) ) + mail? ( virtual/mailx ) + acct-user/icinga + acct-group/icinga + acct-group/icingacmd + acct-group/nagios" + +REQUIRED_USE="!minimal? ( || ( mariadb mysql postgres ) )" + +want_apache2 + +pkg_setup() { + depend.apache_pkg_setup +} + +src_configure() { + sed -i 's/FLAGS\}\ \-g/FLAGS\}\ \-lpthread\ /g' CMakeLists.txt || die + local mycmakeargs=( + -DICINGA2_UNITY_BUILD=FALSE + -DCMAKE_VERBOSE_MAKEFILE=ON + -DCMAKE_BUILD_TYPE=None + -DCMAKE_INSTALL_SYSCONFDIR=/etc + -DCMAKE_INSTALL_LOCALSTATEDIR=/var + -DICINGA2_SYSCONFIGFILE=/etc/conf.d/icinga2 + -DICINGA2_PLUGINDIR="/usr/$(get_libdir)/nagios/plugins" + -DICINGA2_USER=icinga + -DICINGA2_GROUP=icingacmd + -DICINGA2_COMMAND_GROUP=icingacmd + -DINSTALL_SYSTEMD_SERVICE_AND_INITSCRIPT=yes + -DUSE_SYSTEMD=$(usex systemd ON OFF) + -DLOGROTATE_HAS_SU=ON + ) + # default to off if minimal, allow the flags to be set otherwise + if use minimal; then + mycmakeargs+=( + -DICINGA2_WITH_MYSQL=OFF + -DICINGA2_WITH_PGSQL=OFF + ) + else + mycmakeargs+=( + -DICINGA2_WITH_PGSQL=$(usex postgres ON OFF) + -DICINGA2_WITH_MYSQL=$(usex mysql ON OFF) + ) + fi + # LTO + if use lto; then + mycmakeargs+=( + -DICINGA2_LTO_BUILD=ON + ) + else + mycmakeargs+=( + -DICINGA2_LTO_BUILD=OFF + ) + fi + + cmake-utils_src_configure +} + +src_install() { + BUILDDIR="${WORKDIR}"/icinga2-${PV}_build + cd "${BUILDDIR}" || die + + emake DESTDIR="${D}" install + + einstalldocs + + newinitd "${FILESDIR}"/icinga2.initd-3 icinga2 + + if use mysql ; then + docinto schema + newdoc "${WORKDIR}"/icinga2-${PV}/lib/db_ido_mysql/schema/mysql.sql mysql.sql + docinto schema/upgrade + dodoc "${WORKDIR}"/icinga2-${PV}/lib/db_ido_mysql/schema/upgrade/* + fi + if use mariadb ; then # same as mysql + docinto schema + newdoc "${WORKDIR}"/icinga2-${PV}/lib/db_ido_mysql/schema/mysql.sql mysql.sql + docinto schema/upgrade + dodoc "${WORKDIR}"/icinga2-${PV}/lib/db_ido_mysql/schema/upgrade/* + fi + if use postgres ; then + docinto schema + newdoc "${WORKDIR}"/icinga2-${PV}/lib/db_ido_pgsql/schema/pgsql.sql pgsql.sql + docinto schema/upgrade + dodoc "${WORKDIR}"/icinga2-${PV}/lib/db_ido_pgsql/schema/upgrade/* + fi + + keepdir /etc/icinga2 + keepdir /var/lib/icinga2/api/zones + keepdir /var/lib/icinga2/api/repository + keepdir /var/lib/icinga2/api/log + keepdir /var/spool/icinga2/perfdata + + rm -r "${D}/var/run" || die "failed to remove /var/run" + rm -r "${D}/var/cache" || die "failed to remove /var/cache" + + fowners root:icinga /etc/icinga2 + fperms 0750 /etc/icinga2 + fowners icinga:icinga /var/lib/icinga2 + fowners icinga:icinga /var/spool/icinga2 + fowners -R icinga:icingacmd /var/lib/icinga2/api + fowners icinga:icinga /var/spool/icinga2/perfdata + fowners icinga:icingacmd /var/log/icinga2 + + fperms ug+rwX,o-rwx /etc/icinga2 + fperms ug+rwX,o-rwx /var/lib/icinga2 + fperms ug+rwX,o-rwx /var/spool/icinga2 + fperms ug+rwX,o-rwx /var/log/icinga2 + + if use vim-syntax; then + insinto /usr/share/vim/vimfiles + doins -r "${WORKDIR}"/${P}/tools/syntax/vim/ftdetect + doins -r "${WORKDIR}"/${P}/tools/syntax/vim/syntax + fi + + if use nano-syntax; then + insinto /usr/share/nano + doins "${WORKDIR}"/${P}/tools/syntax/nano/icinga2.nanorc + fi +} + +pkg_postinst() { + if [[ ${PV} != 9999 && -n ${REPLACING_VERSIONS} && ${REPLACING_VERSIONS} != ${PV} ]]; then + elog "DB IDO schema upgrade may be required required. + https://www.icinga.com/docs/icinga2/latest/doc/16-upgrading-icinga-2/" + fi +} diff --git a/net-analyzer/icinga2/icinga2-2.11.4.ebuild b/net-analyzer/icinga2/icinga2-2.11.4.ebuild new file mode 100644 index 000000000000..42ebd83d611d --- /dev/null +++ b/net-analyzer/icinga2/icinga2-2.11.4.ebuild @@ -0,0 +1,169 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 +if [[ ${PV} != 9999 ]]; then + inherit cmake-utils depend.apache eutils systemd toolchain-funcs wxwidgets + SRC_URI="https://github.com/Icinga/icinga2/archive/v${PV}.tar.gz -> ${P}.tar.gz" + KEYWORDS="~amd64 ~arm64 ~x86" +else + inherit cmake-utils depend.apache eutils git-r3 systemd toolchain-funcs wxwidgets + EGIT_REPO_URI="https://github.com/Icinga/icinga2.git" + EGIT_BRANCH="master" +fi + +DESCRIPTION="Distributed, general purpose, network monitoring engine" +HOMEPAGE="http://icinga.org/icinga2" + +LICENSE="GPL-2" +SLOT="0" +IUSE="console libressl lto mail mariadb minimal +mysql nano-syntax +plugins postgres systemd +vim-syntax" +WX_GTK_VER="3.0" + +CDEPEND=" + !libressl? ( dev-libs/openssl:0= ) + libressl? ( dev-libs/libressl:0= ) + >=dev-libs/boost-1.66.0:=[context] + console? ( dev-libs/libedit ) + mariadb? ( dev-db/mariadb-connector-c:= ) + mysql? ( dev-db/mysql-connector-c:= ) + postgres? ( dev-db/postgresql:= ) + dev-libs/yajl" + +DEPEND=" + ${CDEPEND} + sys-devel/bison + >=sys-devel/flex-2.5.35" + +RDEPEND=" + ${CDEPEND} + plugins? ( || ( + net-analyzer/monitoring-plugins + net-analyzer/nagios-plugins + ) ) + mail? ( virtual/mailx ) + acct-user/icinga + acct-group/icinga + acct-group/icingacmd + acct-group/nagios" + +REQUIRED_USE="!minimal? ( || ( mariadb mysql postgres ) )" + +want_apache2 + +pkg_setup() { + depend.apache_pkg_setup +} + +src_configure() { + sed -i 's/FLAGS\}\ \-g/FLAGS\}\ \-lpthread\ /g' CMakeLists.txt || die + local mycmakeargs=( + -DICINGA2_UNITY_BUILD=FALSE + -DCMAKE_VERBOSE_MAKEFILE=ON + -DCMAKE_BUILD_TYPE=None + -DCMAKE_INSTALL_SYSCONFDIR=/etc + -DCMAKE_INSTALL_LOCALSTATEDIR=/var + -DICINGA2_SYSCONFIGFILE=/etc/conf.d/icinga2 + -DICINGA2_PLUGINDIR="/usr/$(get_libdir)/nagios/plugins" + -DICINGA2_USER=icinga + -DICINGA2_GROUP=icingacmd + -DICINGA2_COMMAND_GROUP=icingacmd + -DINSTALL_SYSTEMD_SERVICE_AND_INITSCRIPT=yes + -DUSE_SYSTEMD=$(usex systemd ON OFF) + -DLOGROTATE_HAS_SU=ON + ) + # default to off if minimal, allow the flags to be set otherwise + if use minimal; then + mycmakeargs+=( + -DICINGA2_WITH_MYSQL=OFF + -DICINGA2_WITH_PGSQL=OFF + ) + else + mycmakeargs+=( + -DICINGA2_WITH_PGSQL=$(usex postgres ON OFF) + -DICINGA2_WITH_MYSQL=$(usex mysql ON OFF) + ) + fi + # LTO + if use lto; then + mycmakeargs+=( + -DICINGA2_LTO_BUILD=ON + ) + else + mycmakeargs+=( + -DICINGA2_LTO_BUILD=OFF + ) + fi + + cmake-utils_src_configure +} + +src_install() { + BUILDDIR="${WORKDIR}"/icinga2-${PV}_build + cd "${BUILDDIR}" || die + + emake DESTDIR="${D}" install + + einstalldocs + + newinitd "${FILESDIR}"/icinga2.initd-3 icinga2 + + if use mysql ; then + docinto schema + newdoc "${WORKDIR}"/icinga2-${PV}/lib/db_ido_mysql/schema/mysql.sql mysql.sql + docinto schema/upgrade + dodoc "${WORKDIR}"/icinga2-${PV}/lib/db_ido_mysql/schema/upgrade/* + fi + if use mariadb ; then # same as mysql + docinto schema + newdoc "${WORKDIR}"/icinga2-${PV}/lib/db_ido_mysql/schema/mysql.sql mysql.sql + docinto schema/upgrade + dodoc "${WORKDIR}"/icinga2-${PV}/lib/db_ido_mysql/schema/upgrade/* + fi + if use postgres ; then + docinto schema + newdoc "${WORKDIR}"/icinga2-${PV}/lib/db_ido_pgsql/schema/pgsql.sql pgsql.sql + docinto schema/upgrade + dodoc "${WORKDIR}"/icinga2-${PV}/lib/db_ido_pgsql/schema/upgrade/* + fi + + keepdir /etc/icinga2 + keepdir /var/lib/icinga2/api/zones + keepdir /var/lib/icinga2/api/repository + keepdir /var/lib/icinga2/api/log + keepdir /var/spool/icinga2/perfdata + + rm -r "${D}/var/run" || die "failed to remove /var/run" + rm -r "${D}/var/cache" || die "failed to remove /var/cache" + + fowners root:icinga /etc/icinga2 + fperms 0750 /etc/icinga2 + fowners icinga:icinga /var/lib/icinga2 + fowners icinga:icinga /var/spool/icinga2 + fowners -R icinga:icingacmd /var/lib/icinga2/api + fowners icinga:icinga /var/spool/icinga2/perfdata + fowners icinga:icingacmd /var/log/icinga2 + + fperms ug+rwX,o-rwx /etc/icinga2 + fperms ug+rwX,o-rwx /var/lib/icinga2 + fperms ug+rwX,o-rwx /var/spool/icinga2 + fperms ug+rwX,o-rwx /var/log/icinga2 + + if use vim-syntax; then + insinto /usr/share/vim/vimfiles + doins -r "${WORKDIR}"/${P}/tools/syntax/vim/ftdetect + doins -r "${WORKDIR}"/${P}/tools/syntax/vim/syntax + fi + + if use nano-syntax; then + insinto /usr/share/nano + doins "${WORKDIR}"/${P}/tools/syntax/nano/icinga2.nanorc + fi +} + +pkg_postinst() { + if [[ ${PV} != 9999 && -n ${REPLACING_VERSIONS} && ${REPLACING_VERSIONS} != ${PV} ]]; then + elog "DB IDO schema upgrade may be required required. + https://www.icinga.com/docs/icinga2/latest/doc/16-upgrading-icinga-2/" + fi +} diff --git a/net-analyzer/icinga2/icinga2-9999.ebuild b/net-analyzer/icinga2/icinga2-9999.ebuild new file mode 100644 index 000000000000..7243f8baa7c6 --- /dev/null +++ b/net-analyzer/icinga2/icinga2-9999.ebuild @@ -0,0 +1,170 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 +if [[ ${PV} != 9999 ]]; then + inherit cmake-utils depend.apache eutils systemd toolchain-funcs wxwidgets + SRC_URI="https://github.com/Icinga/icinga2/archive/v${PV}.tar.gz -> ${P}.tar.gz" + KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~x86" +else + inherit cmake-utils depend.apache eutils git-r3 systemd toolchain-funcs wxwidgets + EGIT_REPO_URI="https://github.com/Icinga/icinga2.git" + EGIT_BRANCH="master" +fi + +DESCRIPTION="Distributed, general purpose, network monitoring engine" +HOMEPAGE="http://icinga.org/icinga2" + +LICENSE="GPL-2" +SLOT="0" +IUSE="console libressl lto mail mariadb minimal +mysql nano-syntax +plugins postgres systemd +vim-syntax" +WX_GTK_VER="3.0" + +CDEPEND=" + !libressl? ( dev-libs/openssl:0= ) + libressl? ( dev-libs/libressl:0= ) + >=dev-libs/boost-1.66:=[context] + console? ( dev-libs/libedit ) + mariadb? ( dev-db/mariadb-connector-c:= ) + mysql? ( dev-db/mysql-connector-c:= ) + postgres? ( dev-db/postgresql:= ) + dev-libs/yajl" + +DEPEND=" + ${CDEPEND} + sys-devel/bison + >=sys-devel/flex-2.5.35" + +RDEPEND=" + ${CDEPEND} + plugins? ( || ( + net-analyzer/monitoring-plugins + net-analyzer/nagios-plugins + ) ) + mail? ( virtual/mailx ) + acct-user/icinga + acct-group/icinga + acct-group/icingacmd + acct-group/nagios" + +REQUIRED_USE="!minimal? ( || ( mariadb mysql postgres ) )" + +want_apache2 + +pkg_setup() { + depend.apache_pkg_setup +} + +src_configure() { + sed -i 's/FLAGS\}\ \-g/FLAGS\}\ \-lpthread\ /g' CMakeLists.txt || die + local mycmakeargs=( + -DICINGA2_UNITY_BUILD=FALSE + -DCMAKE_VERBOSE_MAKEFILE=ON + -DCMAKE_BUILD_TYPE=None + -DCMAKE_INSTALL_SYSCONFDIR=/etc + -DCMAKE_INSTALL_LOCALSTATEDIR=/var + -DICINGA2_SYSCONFIGFILE=/etc/conf.d/icinga2 + -DICINGA2_PLUGINDIR="/usr/$(get_libdir)/nagios/plugins" + -DICINGA2_USER=icinga + -DICINGA2_GROUP=icingacmd + -DICINGA2_COMMAND_GROUP=icingacmd + -DICINGA2_RUNDIR=/run + -DINSTALL_SYSTEMD_SERVICE_AND_INITSCRIPT=yes + -DUSE_SYSTEMD=$(usex systemd ON OFF) + -DLOGROTATE_HAS_SU=ON + ) + # default to off if minimal, allow the flags to be set otherwise + if use minimal; then + mycmakeargs+=( + -DICINGA2_WITH_MYSQL=OFF + -DICINGA2_WITH_PGSQL=OFF + ) + else + mycmakeargs+=( + -DICINGA2_WITH_PGSQL=$(usex postgres ON OFF) + -DICINGA2_WITH_MYSQL=$(usex mysql ON OFF) + ) + fi + # LTO + if use lto; then + mycmakeargs+=( + -DICINGA2_LTO_BUILD=ON + ) + else + mycmakeargs+=( + -DICINGA2_LTO_BUILD=OFF + ) + fi + + cmake-utils_src_configure +} + +src_install() { + BUILDDIR="${WORKDIR}"/icinga2-${PV}_build + cd "${BUILDDIR}" || die + + emake DESTDIR="${D}" install + + einstalldocs + + newinitd "${FILESDIR}"/icinga2.initd-3 icinga2 + + if use mysql ; then + docinto schema + newdoc "${WORKDIR}"/icinga2-${PV}/lib/db_ido_mysql/schema/mysql.sql mysql.sql + docinto schema/upgrade + dodoc "${WORKDIR}"/icinga2-${PV}/lib/db_ido_mysql/schema/upgrade/* + fi + if use mariadb ; then # same as mysql + docinto schema + newdoc "${WORKDIR}"/icinga2-${PV}/lib/db_ido_mysql/schema/mysql.sql mysql.sql + docinto schema/upgrade + dodoc "${WORKDIR}"/icinga2-${PV}/lib/db_ido_mysql/schema/upgrade/* + fi + if use postgres ; then + docinto schema + newdoc "${WORKDIR}"/icinga2-${PV}/lib/db_ido_pgsql/schema/pgsql.sql pgsql.sql + docinto schema/upgrade + dodoc "${WORKDIR}"/icinga2-${PV}/lib/db_ido_pgsql/schema/upgrade/* + fi + + keepdir /etc/icinga2 + keepdir /var/lib/icinga2/api/zones + keepdir /var/lib/icinga2/api/repository + keepdir /var/lib/icinga2/api/log + keepdir /var/spool/icinga2/perfdata + + rm -r "${D}/run" || die "failed to remove /run" + rm -r "${D}/var/cache" || die "failed to remove /var/cache" + + fowners root:icinga /etc/icinga2 + fperms 0750 /etc/icinga2 + fowners icinga:icinga /var/lib/icinga2 + fowners icinga:icinga /var/spool/icinga2 + fowners -R icinga:icingacmd /var/lib/icinga2/api + fowners icinga:icinga /var/spool/icinga2/perfdata + fowners icinga:icingacmd /var/log/icinga2 + + fperms ug+rwX,o-rwx /etc/icinga2 + fperms ug+rwX,o-rwx /var/lib/icinga2 + fperms ug+rwX,o-rwx /var/spool/icinga2 + fperms ug+rwX,o-rwx /var/log/icinga2 + + if use vim-syntax; then + insinto /usr/share/vim/vimfiles + doins -r "${WORKDIR}"/${P}/tools/syntax/vim/ftdetect + doins -r "${WORKDIR}"/${P}/tools/syntax/vim/syntax + fi + + if use nano-syntax; then + insinto /usr/share/nano + doins "${WORKDIR}"/${P}/tools/syntax/nano/icinga2.nanorc + fi +} + +pkg_postinst() { + if [[ ${PV} != 9999 && -n ${REPLACING_VERSIONS} && ${REPLACING_VERSIONS} != ${PV} ]]; then + elog "DB IDO schema upgrade may be required required. + https://www.icinga.com/docs/icinga2/latest/doc/16-upgrading-icinga-2/" + fi +} diff --git a/net-analyzer/icinga2/metadata.xml b/net-analyzer/icinga2/metadata.xml new file mode 100644 index 000000000000..da56c34eaffa --- /dev/null +++ b/net-analyzer/icinga2/metadata.xml @@ -0,0 +1,20 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>prometheanfire@gentoo.org</email> + <name>Matthew Thode</name> + </maintainer> + <use> + <flag name="console">Adds support for line-editing in the console</flag> + <flag name="lto">Adds support for link time optimization</flag> + <flag name="mail">Allows for mailing of alerts</flag> + <flag name="mariadb">Enable support for the mariadb database backend</flag> + <flag name="nano-syntax">Adds support for syntax used in the nano editor</flag> + <flag name="plugins">Adds support for nagios plugins</flag> + </use> + <upstream> + <remote-id type="github">Icinga/icinga2</remote-id> + </upstream> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/ifmetric/Manifest b/net-analyzer/ifmetric/Manifest new file mode 100644 index 000000000000..7ab4a1d7efda --- /dev/null +++ b/net-analyzer/ifmetric/Manifest @@ -0,0 +1 @@ +DIST ifmetric-0.3.tar.gz 81502 BLAKE2B f918932edb730e50ee3598eaeaadd036ca970234c955f05d45ba44c719b650c222adf0e6f971ed6c3387900ee019e092d7e313f0da57afcc6cd63ef842c644c9 SHA512 301d6bc1c97a59597fe55d81a04c1b654aee24d12ac10201ab56cf23b5164808270f15c142cc49142787db70b400cc18b96561aefcf212111ba47df28f07aa95 diff --git a/net-analyzer/ifmetric/files/ifmetric-0.3-replybuf.patch b/net-analyzer/ifmetric/files/ifmetric-0.3-replybuf.patch new file mode 100644 index 000000000000..883ce2b31215 --- /dev/null +++ b/net-analyzer/ifmetric/files/ifmetric-0.3-replybuf.patch @@ -0,0 +1,11 @@ +--- a/src/nlrequest.c ++++ b/src/nlrequest.c +@@ -44,7 +44,7 @@ + + for (;;) { + int bytes; +- char replybuf[2048]; ++ char replybuf[4096]; + struct nlmsghdr *p = (struct nlmsghdr *) replybuf; + + if ((bytes = recv(s, &replybuf, sizeof(replybuf), 0)) < 0) { diff --git a/net-analyzer/ifmetric/files/ifmetric-0.3-ul.patch b/net-analyzer/ifmetric/files/ifmetric-0.3-ul.patch new file mode 100644 index 000000000000..eb432dc29c0e --- /dev/null +++ b/net-analyzer/ifmetric/files/ifmetric-0.3-ul.patch @@ -0,0 +1,11 @@ +--- a/src/nlrequest.c ++++ b/src/nlrequest.c +@@ -56,7 +56,7 @@ + int ret; + + if (!NLMSG_OK(p, bytes) || bytes < sizeof(struct nlmsghdr) || bytes < p->nlmsg_len) { +- fprintf(stderr, "NETLINK: Packet too small or truncated! %u!=%u!=%u\n", bytes, sizeof(struct nlmsghdr), p->nlmsg_len); ++ fprintf(stderr, "NETLINK: Packet too small or truncated! %u!=%lu!=%u\n", bytes, sizeof(struct nlmsghdr), p->nlmsg_len); + return -1; + } + diff --git a/net-analyzer/ifmetric/ifmetric-0.3-r2.ebuild b/net-analyzer/ifmetric/ifmetric-0.3-r2.ebuild new file mode 100644 index 000000000000..f5e962992ffb --- /dev/null +++ b/net-analyzer/ifmetric/ifmetric-0.3-r2.ebuild @@ -0,0 +1,31 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +DESCRIPTION="Set metrics of all IPv4 routes attached to a given network interface at once" +HOMEPAGE="http://0pointer.de/lennart/projects/ifmetric/" +SRC_URI="http://0pointer.de/lennart/projects/ifmetric/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~ppc x86" + +DEPEND="sys-kernel/linux-headers" + +DOCS=( + README + doc/README.html +) + +PATCHES=( + "${FILESDIR}"/${P}-ul.patch + "${FILESDIR}"/${P}-replybuf.patch +) + +src_configure() { + # man page and HTML are already generated + econf \ + --disable-xmltoman \ + --disable-lynx +} diff --git a/net-analyzer/ifmetric/metadata.xml b/net-analyzer/ifmetric/metadata.xml new file mode 100644 index 000000000000..6d60ca626dd5 --- /dev/null +++ b/net-analyzer/ifmetric/metadata.xml @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>netmon@gentoo.org</email> + <name>Gentoo network monitoring and analysis project</name> + </maintainer> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/ifstat/Manifest b/net-analyzer/ifstat/Manifest new file mode 100644 index 000000000000..ea51723e7850 --- /dev/null +++ b/net-analyzer/ifstat/Manifest @@ -0,0 +1 @@ +DIST ifstat-1.1.tar.gz 67920 BLAKE2B b9aeb18488f419fd6a03f698ed41d442b812765d5c1636dc6ea1e0484b5b1a6bc40b484bf88a715c63417d52db92927c128477714264ee3fe14ceb482330cb06 SHA512 b1aef8e7b14cbf265e2d42277478fd12a565287f90f37b0a826ba3e7d29640df757c7d56f149e406bf5890663ed734b2c658c4f1e2b258ded3649f2fc3e9ac64 diff --git a/net-analyzer/ifstat/files/ifstat-1.1-hardened.patch b/net-analyzer/ifstat/files/ifstat-1.1-hardened.patch new file mode 100644 index 000000000000..10c377ac7678 --- /dev/null +++ b/net-analyzer/ifstat/files/ifstat-1.1-hardened.patch @@ -0,0 +1,11 @@ +--- a/configure.in ++++ b/configure.in +@@ -58,7 +58,7 @@ + /*) file=$with_proc; with_proc=yes ;; + *) file=/proc/net/dev + AC_MSG_CHECKING([for proc interface in $file]) +- if grep -q Inter- $file 2>/dev/null; then ++ if true; then + AC_DEFINE([USE_PROC], 1, [Define if you want to use /proc to get stats]) + AC_DEFINE_UNQUOTED([PROC_FILE], ["$file"], [Proc file to poll for stats]) + with_proc=yes diff --git a/net-analyzer/ifstat/files/ifstat-1.1-make.patch b/net-analyzer/ifstat/files/ifstat-1.1-make.patch new file mode 100644 index 000000000000..62feb8b0005a --- /dev/null +++ b/net-analyzer/ifstat/files/ifstat-1.1-make.patch @@ -0,0 +1,122 @@ +--- a/Makefile.in ++++ b/Makefile.in +@@ -65,14 +65,14 @@ + install: install-$(TARGET) install-@LIBTARGET@ + + install-$(TARGET): $(TARGET) +- $(INSTALL) -d -m 755 $(bindir) +- $(INSTALL) -s -m 755 $(TARGET) $(bindir)/$(TARGET) +- $(INSTALL) -d -m 755 $(mandir)/man1 +- $(INSTALL) -m 644 ifstat.1 $(mandir)/man1/ifstat.1 ++ $(INSTALL) -d -m 755 $(DESTDIR)/$(bindir) ++ $(INSTALL) -m 755 $(TARGET) $(DESTDIR)/$(bindir)/$(TARGET) ++ $(INSTALL) -d -m 755 $(DESTDIR)/$(mandir)/man1 ++ $(INSTALL) -m 644 ifstat.1 $(DESTDIR)/$(mandir)/man1/ifstat.1 + + install-$(LIBTARGET): $(LIBTARGET) libifstat-config +- $(INSTALL) -d -m 755 $(bindir) +- $(INSTALL) -m 755 libifstat-config $(bindir)/libifstat-config ++ $(INSTALL) -d -m 755 $(DESTDIR)/$(bindir) ++ $(INSTALL) -m 755 libifstat-config $(DESTDIR)/$(bindir)/libifstat-config + $(INSTALL) -d -m 755 $(includedir) + $(INSTALL) -m 644 ifstat.h $(includedir)/ifstat.h + $(INSTALL) -d -m 755 $(libdir) +--- a/configure.in ++++ b/configure.in +@@ -55,9 +55,8 @@ + # checking for proc (Linux) + if test "x$with_proc" != "xno"; then + case "$with_proc" in +- /*) file=$with_proc ;; +- *) file=/proc/net/dev ;; +- esac ++ /*) file=$with_proc; with_proc=yes ;; ++ *) file=/proc/net/dev + AC_MSG_CHECKING([for proc interface in $file]) + if grep -q Inter- $file 2>/dev/null; then + AC_DEFINE([USE_PROC], 1, [Define if you want to use /proc to get stats]) +@@ -69,6 +68,8 @@ + with_proc=no + fi + AC_MSG_RESULT([$with_proc]) ++ ;; ++ esac + fi + + # checking for kstat (Solaris) +@@ -393,7 +394,7 @@ + [snmp_ok=yes], [snmp_ok=no]) + AC_MSG_RESULT([$snmp_ok]) + if test "x$snmp_ok" = "xyes"; then +- with_snmp=yes ++ use_snmp=yes + snmp_type=net + else + CPPFLAGS="$OCPPFLAGS" +@@ -402,22 +403,22 @@ + fi + + if test "x$snmp_ok" != "xyes"; then +- if test "x$with_snmp" != "xyes" ; then ++ if test "x$use_snmp" != "xyes" ; then + CPPFLAGS="$CPPFLAGS -I$with_snmp/include" + LDFLAGS="$LDFLAGS -L$with_snmp/lib" + fi + AC_CHECK_HEADER(net-snmp/net-snmp-config.h, snmp_type=net, + [AC_CHECK_HEADER(ucd-snmp/ucd-snmp-config.h, +- snmp_type=ucd, with_snmp=no)]) ++ snmp_type=ucd, use_snmp=no)]) + +- if test "x$with_snmp" != "xno"; then ++ if test "x$use_snmp" != "xno"; then + if test "x$snmp_type" = "xnet"; then + libsnmp="-lnetsnmp" + else + libsnmp="-lsnmp" + fi + +- with_snmp=no ++ use_snmp=no + SNMPLIBALONE="$libsnmp" + # Setting to be able to force linking with -lcrypto.... + # This is needed on OpenBSD (at least) where the snmplib port links without -lcrypto, +@@ -429,18 +430,18 @@ + SNMPLIBALONE="" + fi + for lib in $SNMPLIBALONE "$libsnmp -lcrypto" ; do +- if test "x$with_snmp" != "xyes" ; then ++ if test "x$use_snmp" != "xyes" ; then + AC_MSG_CHECKING([for snmp support in $lib]) + OLIBS="$LIBS" + LIBS="$LIBS $lib" + AC_TRY_LINK([], [snmp_sess_init();], +- [with_snmp=yes], [LIBS="$OLIBS"]) +- AC_MSG_RESULT([$with_snmp]) ++ [use_snmp=yes], [LIBS="$OLIBS"]) ++ AC_MSG_RESULT([$use_snmp]) + fi + done + fi + fi +- if test "x$with_snmp" = "xyes" ; then ++ if test "x$use_snmp" = "xyes" ; then + AC_DEFINE([USE_SNMP], 1, [Define if you have SNMP support]) + if test "x$snmp_type" = "xnet"; then + AC_DEFINE([HAVE_NET_SNMP], 1, +@@ -464,10 +465,13 @@ + + # checking that we do have at least one driver + if test "x$local" != "xyes"; then ++ AC_MSG_WARN([no native stats gathering mechanism found; will use SNMP.]) + if test "x$with_snmp" = "xyes"; then +- AC_MSG_WARN([no native stats gathering mechanism found; will use SNMP.]) +- else +- AC_MSG_ERROR([no statistics gathering methods found, porting needed.]) ++ if test "x$use_snmp" = "xno"; then ++ AC_MSG_ERROR([net-snmp requested but not found.]) ++ else ++ AC_MSG_ERROR([no statistics gathering methods found, porting needed.]) ++ fi + fi + fi + diff --git a/net-analyzer/ifstat/ifstat-1.1-r2.ebuild b/net-analyzer/ifstat/ifstat-1.1-r2.ebuild new file mode 100644 index 000000000000..42600860feb7 --- /dev/null +++ b/net-analyzer/ifstat/ifstat-1.1-r2.ebuild @@ -0,0 +1,33 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit autotools + +DESCRIPTION="Network interface bandwidth usage, with support for snmp targets" +HOMEPAGE="http://gael.roualland.free.fr/ifstat/" +SRC_URI="http://gael.roualland.free.fr/ifstat/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha amd64 hppa ~mips ppc ppc64 sparc x86" +IUSE="snmp" + +DEPEND="snmp? ( >=net-analyzer/net-snmp-5.0 )" +RDEPEND="${DEPEND}" + +PATCHES=( + "${FILESDIR}"/${P}-make.patch + "${FILESDIR}"/${P}-hardened.patch +) +DOCS=( HISTORY README TODO ) + +src_prepare() { + default + eautoreconf +} + +src_configure() { + econf $(use_with snmp) +} diff --git a/net-analyzer/ifstat/metadata.xml b/net-analyzer/ifstat/metadata.xml new file mode 100644 index 000000000000..56f25f450276 --- /dev/null +++ b/net-analyzer/ifstat/metadata.xml @@ -0,0 +1,16 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>jer@gentoo.org</email> + </maintainer> + <maintainer type="project"> + <email>netmon@gentoo.org</email> + <name>Gentoo network monitoring and analysis project</name> + </maintainer> + <longdescription> + ifstat is a utility to monitor network interface bandwidth usage, with + vmstat look and feel. + </longdescription> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/ifstatus/Manifest b/net-analyzer/ifstatus/Manifest new file mode 100644 index 000000000000..699157aedea9 --- /dev/null +++ b/net-analyzer/ifstatus/Manifest @@ -0,0 +1,2 @@ +DIST ifstatus-v1.1.0.tar.gz 25233 BLAKE2B de9d088bf7001799c3a54775c0c63d5dcf4f1f3f4998ce02b82a11bea7a6dabb1263829ff42ba1cd05ebd6b202827196757727c24db022ffa7d06ece38db6616 SHA512 2660310be7186067315414218e3d3d269499e391c7ffa12022ac53a0456ddbe0f7d5562b788fe6b2569b7d0eba7acf5699e0386769a91606a3e14b51239a2766 +DIST ifstatus-v2.0.0.tar.gz 24058 BLAKE2B 09a2b0af26cb05dfc24eefdbb6ac52b0ac289a687301f5fa67f0fcaf2622da96e149af3f7c08257e0ef8418f4f08b5ca1b77af71ba7c00dabddcb87cc95ddce7 SHA512 e1720f5dcc26788149cc72ccb72b85fffc72b367f2268e1e4f06a8fe4d80685146d310746c0b1a913e24995f6e93011d7d75ea5b4f9ca479af2d79264b89e27d diff --git a/net-analyzer/ifstatus/files/ifstatus-1.1.0-gcc43.patch b/net-analyzer/ifstatus/files/ifstatus-1.1.0-gcc43.patch new file mode 100644 index 000000000000..27111d7576f4 --- /dev/null +++ b/net-analyzer/ifstatus/files/ifstatus-1.1.0-gcc43.patch @@ -0,0 +1,10 @@ +--- a/Main.h ++++ b/Main.h +@@ -38,6 +38,7 @@ + #include <unistd.h> + #include <string.h> + #include <curses.h> ++#include <stdlib.h> + + #include <sys/time.h> + #include <sys/types.h> diff --git a/net-analyzer/ifstatus/files/ifstatus-1.1.0-gcc6.patch b/net-analyzer/ifstatus/files/ifstatus-1.1.0-gcc6.patch new file mode 100644 index 000000000000..760a09fbf2c6 --- /dev/null +++ b/net-analyzer/ifstatus/files/ifstatus-1.1.0-gcc6.patch @@ -0,0 +1,14 @@ +--- a/Interface.h ++++ b/Interface.h +@@ -57,7 +57,11 @@ + + InterfaceData & operator=(InterfaceData & rInterfaceData); + InterfaceData operator-(InterfaceData & rInterfaceData); + ++#if __cplusplus >= 201103L ++ InterfaceData & operator=(InterfaceData && rInterfaceData) = default; ++ InterfaceData(const InterfaceData&) = default; ++#endif + private: + + unsigned long long m_ullReceived[eTotalTypes]; diff --git a/net-analyzer/ifstatus/files/ifstatus-1.1.0-tinfo.patch b/net-analyzer/ifstatus/files/ifstatus-1.1.0-tinfo.patch new file mode 100644 index 000000000000..e2c14e6add71 --- /dev/null +++ b/net-analyzer/ifstatus/files/ifstatus-1.1.0-tinfo.patch @@ -0,0 +1,22 @@ +--- a/Makefile ++++ b/Makefile +@@ -1,9 +1,7 @@ + # Makefile for IFStatus + # Gabriel Montenegro + +-GCC = g++ +-LDFLAGS = -lncurses +-CFLAGS = -O2 -Wall ++LDLIBS = $(shell $(PKG_CONFIG) --libs ncurses) + + BIN = ifstatus + OBJ = BorderDecorator.o\ +@@ -30,7 +28,7 @@ + all : ifstatus printdone + + ifstatus : $(OBJ) +- $(GCC) $(CFLAGS) $(LDFLAGS) $^ -o $@ ++ $(LINK.cc) $^ $(LDLIBS) -o $@ + + printdone: + @if [ -e "./${BIN}" ]; then echo "Compiled.."; else echo "Error compiling!"; fi diff --git a/net-analyzer/ifstatus/files/ifstatus-2.0.0-tinfo.patch b/net-analyzer/ifstatus/files/ifstatus-2.0.0-tinfo.patch new file mode 100644 index 000000000000..ab2f5a921368 --- /dev/null +++ b/net-analyzer/ifstatus/files/ifstatus-2.0.0-tinfo.patch @@ -0,0 +1,11 @@ +--- a/Makefile ++++ b/Makefile +@@ -2,7 +2,7 @@ + # Gabriel Montenegro + + GCC = g++ +-LDFLAGS = -lncurses ++LDFLAGS += $(shell $(PKG_CONFIG) --libs ncurses) + CFLAGS = -O2 -Wall + + BIN = ifstatus diff --git a/net-analyzer/ifstatus/ifstatus-1.1.0-r2.ebuild b/net-analyzer/ifstatus/ifstatus-1.1.0-r2.ebuild new file mode 100644 index 000000000000..10f512067d0b --- /dev/null +++ b/net-analyzer/ifstatus/ifstatus-1.1.0-r2.ebuild @@ -0,0 +1,44 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 +inherit eutils toolchain-funcs + +KEYWORDS="amd64 arm ~ppc x86" + +DESCRIPTION="A simple CLI program for displaying network statistics in real time" +HOMEPAGE="http://ifstatus.sourceforge.net/" +SRC_URI="mirror://sourceforge/${PN}/${PN}-v${PV}.tar.gz" +LICENSE="GPL-2" +SLOT="0" + +RDEPEND=">=sys-libs/ncurses-4.2:0=" +DEPEND=" + ${RDEPEND} + virtual/pkgconfig +" + +S="${WORKDIR}/${PN}" + +PATCHES=( + "${FILESDIR}/${P}-gcc43.patch" + "${FILESDIR}/${P}-tinfo.patch" + "${FILESDIR}/${P}-gcc6.patch" +) + +src_prepare() { + default + tc-export CXX PKG_CONFIG +} + +src_install() { + dobin ifstatus + dodoc AUTHORS README +} + +pkg_postinst() { + elog "You may want to configure ~/.ifstatus/ifstatus.cfg" + elog "before running ifstatus. For example, you may add" + elog "Interfaces = eth0 there. Read the README file for" + elog "more information." +} diff --git a/net-analyzer/ifstatus/ifstatus-2.0.0.ebuild b/net-analyzer/ifstatus/ifstatus-2.0.0.ebuild new file mode 100644 index 000000000000..7b2612d29fee --- /dev/null +++ b/net-analyzer/ifstatus/ifstatus-2.0.0.ebuild @@ -0,0 +1,42 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +inherit toolchain-funcs + +KEYWORDS="~amd64 ~arm ~ppc ~x86" + +DESCRIPTION="A simple CLI program for displaying network statistics in real time" +HOMEPAGE="http://ifstatus.sourceforge.net/" +SRC_URI="mirror://sourceforge/${PN}/${PN}-v${PV}.tar.gz" +LICENSE="GPL-2" +SLOT="0" + +RDEPEND=" + >=sys-libs/ncurses-4.2:0= +" +DEPEND=" + ${RDEPEND} + virtual/pkgconfig +" +PATCHES=( + "${FILESDIR}"/${PN}-2.0.0-tinfo.patch +) +S="${WORKDIR}/${PN}-v${PV}" + +src_compile() { + tc-export CXX PKG_CONFIG + emake GCC=$(tc-getCXX) ${PN} +} + +src_install() { + dobin ifstatus + dodoc AUTHORS README +} + +pkg_postinst() { + elog "You may want to configure ~/.ifstatus/ifstatus.cfg" + elog "before running ifstatus. For example, you may add" + elog "Interfaces = eth0 there. Read the README file for" + elog "more information." +} diff --git a/net-analyzer/ifstatus/metadata.xml b/net-analyzer/ifstatus/metadata.xml new file mode 100644 index 000000000000..d7ff351c8a6e --- /dev/null +++ b/net-analyzer/ifstatus/metadata.xml @@ -0,0 +1,12 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>netmon@gentoo.org</email> + <name>Gentoo network monitoring and analysis project</name> + </maintainer> + <upstream> + <remote-id type="sourceforge">ifstatus</remote-id> + </upstream> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/iftop/Manifest b/net-analyzer/iftop/Manifest new file mode 100644 index 000000000000..6555606518a5 --- /dev/null +++ b/net-analyzer/iftop/Manifest @@ -0,0 +1 @@ +DIST iftop-1.0pre4.tar.gz 204665 BLAKE2B 181385c3fbf43abd4ead975aac11b5ff196de94d9a8d6f195b3f0068aba6ae953067995d19f0175b49ab15c447c99d531542ae786603ee390e080e79bdcd7ae3 SHA512 abd74e8025bb82fef9ebab4997b1d018201a523d47c0128128ca37797490046538d74758dc4471735c22b890e5bd238ad6b2a30776d465138ede367cdd263d22 diff --git a/net-analyzer/iftop/files/ax_pthread.m4 b/net-analyzer/iftop/files/ax_pthread.m4 new file mode 100644 index 000000000000..6d400ed4e8e2 --- /dev/null +++ b/net-analyzer/iftop/files/ax_pthread.m4 @@ -0,0 +1,317 @@ +# =========================================================================== +# http://www.gnu.org/software/autoconf-archive/ax_pthread.html +# =========================================================================== +# +# SYNOPSIS +# +# AX_PTHREAD([ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]]) +# +# DESCRIPTION +# +# This macro figures out how to build C programs using POSIX threads. It +# sets the PTHREAD_LIBS output variable to the threads library and linker +# flags, and the PTHREAD_CFLAGS output variable to any special C compiler +# flags that are needed. (The user can also force certain compiler +# flags/libs to be tested by setting these environment variables.) +# +# Also sets PTHREAD_CC to any special C compiler that is needed for +# multi-threaded programs (defaults to the value of CC otherwise). (This +# is necessary on AIX to use the special cc_r compiler alias.) +# +# NOTE: You are assumed to not only compile your program with these flags, +# but also link it with them as well. e.g. you should link with +# $PTHREAD_CC $CFLAGS $PTHREAD_CFLAGS $LDFLAGS ... $PTHREAD_LIBS $LIBS +# +# If you are only building threads programs, you may wish to use these +# variables in your default LIBS, CFLAGS, and CC: +# +# LIBS="$PTHREAD_LIBS $LIBS" +# CFLAGS="$CFLAGS $PTHREAD_CFLAGS" +# CC="$PTHREAD_CC" +# +# In addition, if the PTHREAD_CREATE_JOINABLE thread-attribute constant +# has a nonstandard name, defines PTHREAD_CREATE_JOINABLE to that name +# (e.g. PTHREAD_CREATE_UNDETACHED on AIX). +# +# Also HAVE_PTHREAD_PRIO_INHERIT is defined if pthread is found and the +# PTHREAD_PRIO_INHERIT symbol is defined when compiling with +# PTHREAD_CFLAGS. +# +# ACTION-IF-FOUND is a list of shell commands to run if a threads library +# is found, and ACTION-IF-NOT-FOUND is a list of commands to run it if it +# is not found. If ACTION-IF-FOUND is not specified, the default action +# will define HAVE_PTHREAD. +# +# Please let the authors know if this macro fails on any platform, or if +# you have any other suggestions or comments. This macro was based on work +# by SGJ on autoconf scripts for FFTW (http://www.fftw.org/) (with help +# from M. Frigo), as well as ac_pthread and hb_pthread macros posted by +# Alejandro Forero Cuervo to the autoconf macro repository. We are also +# grateful for the helpful feedback of numerous users. +# +# Updated for Autoconf 2.68 by Daniel Richard G. +# +# LICENSE +# +# Copyright (c) 2008 Steven G. Johnson <stevenj@alum.mit.edu> +# Copyright (c) 2011 Daniel Richard G. <skunk@iSKUNK.ORG> +# +# This program is free software: you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by the +# Free Software Foundation, either version 3 of the License, or (at your +# option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General +# Public License for more details. +# +# You should have received a copy of the GNU General Public License along +# with this program. If not, see <http://www.gnu.org/licenses/>. +# +# As a special exception, the respective Autoconf Macro's copyright owner +# gives unlimited permission to copy, distribute and modify the configure +# scripts that are the output of Autoconf when processing the Macro. You +# need not follow the terms of the GNU General Public License when using +# or distributing such scripts, even though portions of the text of the +# Macro appear in them. The GNU General Public License (GPL) does govern +# all other use of the material that constitutes the Autoconf Macro. +# +# This special exception to the GPL applies to versions of the Autoconf +# Macro released by the Autoconf Archive. When you make and distribute a +# modified version of the Autoconf Macro, you may extend this special +# exception to the GPL to apply to your modified version as well. + +#serial 20 + +AU_ALIAS([ACX_PTHREAD], [AX_PTHREAD]) +AC_DEFUN([AX_PTHREAD], [ +AC_REQUIRE([AC_CANONICAL_HOST]) +AC_LANG_PUSH([C]) +ax_pthread_ok=no + +# We used to check for pthread.h first, but this fails if pthread.h +# requires special compiler flags (e.g. on True64 or Sequent). +# It gets checked for in the link test anyway. + +# First of all, check if the user has set any of the PTHREAD_LIBS, +# etcetera environment variables, and if threads linking works using +# them: +if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then + save_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS $PTHREAD_CFLAGS" + save_LIBS="$LIBS" + LIBS="$PTHREAD_LIBS $LIBS" + AC_MSG_CHECKING([for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS]) + AC_TRY_LINK_FUNC(pthread_join, ax_pthread_ok=yes) + AC_MSG_RESULT($ax_pthread_ok) + if test x"$ax_pthread_ok" = xno; then + PTHREAD_LIBS="" + PTHREAD_CFLAGS="" + fi + LIBS="$save_LIBS" + CFLAGS="$save_CFLAGS" +fi + +# We must check for the threads library under a number of different +# names; the ordering is very important because some systems +# (e.g. DEC) have both -lpthread and -lpthreads, where one of the +# libraries is broken (non-POSIX). + +# Create a list of thread flags to try. Items starting with a "-" are +# C compiler flags, and other items are library names, except for "none" +# which indicates that we try without any flags at all, and "pthread-config" +# which is a program returning the flags for the Pth emulation library. + +ax_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config" + +# The ordering *is* (sometimes) important. Some notes on the +# individual items follow: + +# pthreads: AIX (must check this before -lpthread) +# none: in case threads are in libc; should be tried before -Kthread and +# other compiler flags to prevent continual compiler warnings +# -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h) +# -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able) +# lthread: LinuxThreads port on FreeBSD (also preferred to -pthread) +# -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads) +# -pthreads: Solaris/gcc +# -mthreads: Mingw32/gcc, Lynx/gcc +# -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it +# doesn't hurt to check since this sometimes defines pthreads too; +# also defines -D_REENTRANT) +# ... -mt is also the pthreads flag for HP/aCC +# pthread: Linux, etcetera +# --thread-safe: KAI C++ +# pthread-config: use pthread-config program (for GNU Pth library) + +case ${host_os} in + solaris*) + + # On Solaris (at least, for some versions), libc contains stubbed + # (non-functional) versions of the pthreads routines, so link-based + # tests will erroneously succeed. (We need to link with -pthreads/-mt/ + # -lpthread.) (The stubs are missing pthread_cleanup_push, or rather + # a function called by this macro, so we could check for that, but + # who knows whether they'll stub that too in a future libc.) So, + # we'll just look for -pthreads and -lpthread first: + + ax_pthread_flags="-pthreads pthread -mt -pthread $ax_pthread_flags" + ;; + + darwin*) + ax_pthread_flags="-pthread $ax_pthread_flags" + ;; +esac + +if test x"$ax_pthread_ok" = xno; then +for flag in $ax_pthread_flags; do + + case $flag in + none) + AC_MSG_CHECKING([whether pthreads work without any flags]) + ;; + + -*) + AC_MSG_CHECKING([whether pthreads work with $flag]) + PTHREAD_CFLAGS="$flag" + ;; + + pthread-config) + AC_CHECK_PROG(ax_pthread_config, pthread-config, yes, no) + if test x"$ax_pthread_config" = xno; then continue; fi + PTHREAD_CFLAGS="`pthread-config --cflags`" + PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`" + ;; + + *) + AC_MSG_CHECKING([for the pthreads library -l$flag]) + PTHREAD_LIBS="-l$flag" + ;; + esac + + save_LIBS="$LIBS" + save_CFLAGS="$CFLAGS" + LIBS="$PTHREAD_LIBS $LIBS" + CFLAGS="$CFLAGS $PTHREAD_CFLAGS" + + # Check for various functions. We must include pthread.h, + # since some functions may be macros. (On the Sequent, we + # need a special flag -Kthread to make this header compile.) + # We check for pthread_join because it is in -lpthread on IRIX + # while pthread_create is in libc. We check for pthread_attr_init + # due to DEC craziness with -lpthreads. We check for + # pthread_cleanup_push because it is one of the few pthread + # functions on Solaris that doesn't have a non-functional libc stub. + # We try pthread_create on general principles. + AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <pthread.h> + static void routine(void *a) { a = 0; } + static void *start_routine(void *a) { return a; }], + [pthread_t th; pthread_attr_t attr; + pthread_create(&th, 0, start_routine, 0); + pthread_join(th, 0); + pthread_attr_init(&attr); + pthread_cleanup_push(routine, 0); + pthread_cleanup_pop(0) /* ; */])], + [ax_pthread_ok=yes], + []) + + LIBS="$save_LIBS" + CFLAGS="$save_CFLAGS" + + AC_MSG_RESULT($ax_pthread_ok) + if test "x$ax_pthread_ok" = xyes; then + break; + fi + + PTHREAD_LIBS="" + PTHREAD_CFLAGS="" +done +fi + +# Various other checks: +if test "x$ax_pthread_ok" = xyes; then + save_LIBS="$LIBS" + LIBS="$PTHREAD_LIBS $LIBS" + save_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS $PTHREAD_CFLAGS" + + # Detect AIX lossage: JOINABLE attribute is called UNDETACHED. + AC_MSG_CHECKING([for joinable pthread attribute]) + attr_name=unknown + for attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do + AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <pthread.h>], + [int attr = $attr; return attr /* ; */])], + [attr_name=$attr; break], + []) + done + AC_MSG_RESULT($attr_name) + if test "$attr_name" != PTHREAD_CREATE_JOINABLE; then + AC_DEFINE_UNQUOTED(PTHREAD_CREATE_JOINABLE, $attr_name, + [Define to necessary symbol if this constant + uses a non-standard name on your system.]) + fi + + AC_MSG_CHECKING([if more special flags are required for pthreads]) + flag=no + case ${host_os} in + aix* | freebsd* | darwin*) flag="-D_THREAD_SAFE";; + osf* | hpux*) flag="-D_REENTRANT";; + solaris*) + if test "$GCC" = "yes"; then + flag="-D_REENTRANT" + else + flag="-mt -D_REENTRANT" + fi + ;; + esac + AC_MSG_RESULT(${flag}) + if test "x$flag" != xno; then + PTHREAD_CFLAGS="$flag $PTHREAD_CFLAGS" + fi + + AC_CACHE_CHECK([for PTHREAD_PRIO_INHERIT], + ax_cv_PTHREAD_PRIO_INHERIT, [ + AC_LINK_IFELSE([ + AC_LANG_PROGRAM([[#include <pthread.h>]], [[int i = PTHREAD_PRIO_INHERIT;]])], + [ax_cv_PTHREAD_PRIO_INHERIT=yes], + [ax_cv_PTHREAD_PRIO_INHERIT=no]) + ]) + AS_IF([test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes"], + AC_DEFINE([HAVE_PTHREAD_PRIO_INHERIT], 1, [Have PTHREAD_PRIO_INHERIT.])) + + LIBS="$save_LIBS" + CFLAGS="$save_CFLAGS" + + # More AIX lossage: compile with *_r variant + if test "x$GCC" != xyes; then + case $host_os in + aix*) + AS_CASE(["x/$CC"], + [x*/c89|x*/c89_128|x*/c99|x*/c99_128|x*/cc|x*/cc128|x*/xlc|x*/xlc_v6|x*/xlc128|x*/xlc128_v6], + [#handle absolute path differently from PATH based program lookup + AS_CASE(["x$CC"], + [x/*], + [AS_IF([AS_EXECUTABLE_P([${CC}_r])],[PTHREAD_CC="${CC}_r"])], + [AC_CHECK_PROGS([PTHREAD_CC],[${CC}_r],[$CC])])]) + ;; + esac + fi +fi + +test -n "$PTHREAD_CC" || PTHREAD_CC="$CC" + +AC_SUBST(PTHREAD_LIBS) +AC_SUBST(PTHREAD_CFLAGS) +AC_SUBST(PTHREAD_CC) + +# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND: +if test x"$ax_pthread_ok" = xyes; then + ifelse([$1],,AC_DEFINE(HAVE_PTHREAD,1,[Define if you have POSIX threads libraries and header files.]),[$1]) + : +else + ax_pthread_ok=no + $2 +fi +AC_LANG_POP +])dnl AX_PTHREAD diff --git a/net-analyzer/iftop/files/iftop-1.0_pre4-Makefile.am.patch b/net-analyzer/iftop/files/iftop-1.0_pre4-Makefile.am.patch new file mode 100644 index 000000000000..0b1308ab36c5 --- /dev/null +++ b/net-analyzer/iftop/files/iftop-1.0_pre4-Makefile.am.patch @@ -0,0 +1,11 @@ +--- a/Makefile.am ++++ b/Makefile.am +@@ -25,7 +25,7 @@ iftop_SOURCES = addr_hash.c edline.c hash.c iftop.c ns_hash.c \ + # addrs_ioctl.c addrs_dlpi.c dlcommon.c \ + # stringmap.c cfgfile.c + +- ++iftop_LDADD = $(ncurses_LIBS) + + noinst_HEADERS = addr_hash.h ether.h ethertype.h extract.h hash.h iftop.h \ + integers.h ip.h llc.h ns_hash.h options.h resolver.h \ diff --git a/net-analyzer/iftop/files/iftop-1.0_pre4-configure.ac.patch b/net-analyzer/iftop/files/iftop-1.0_pre4-configure.ac.patch new file mode 100644 index 000000000000..ff13fd89fb57 --- /dev/null +++ b/net-analyzer/iftop/files/iftop-1.0_pre4-configure.ac.patch @@ -0,0 +1,278 @@ +--- a/configure.ac ++++ b/configure.ac +@@ -51,10 +51,10 @@ + forking use the REALLY SUCKY forking resolver. + guess run experiments to guess a + reasonable value. Only works if you +- aren't cross-compiling. This ++ are not cross-compiling. This + is the default. guess will + either select netdb or netdb_1thread. +- none don't do name resolution.], ++ none do not do name resolution.], + [resolver=$withval], + [resolver=guess]) + +@@ -98,45 +98,14 @@ + AC_CHECK_FUNCS(inet_aton inet_pton) + + dnl +-dnl Find integers of known physical size. This is a pain in the arse because +-dnl we can't use AC_CHECK_SIZEOF to find the original variables, since that +-dnl function doesn't permit us to include a header file. Sigh. +-dnl +- +-for type in u_int8_t u_int16_t u_int32_t ; do +- AC_MSG_CHECKING([size of $type]) +- AC_RUN_IFELSE([AC_LANG_SOURCE([ +-#include <sys/types.h> +-#include <stdio.h> +-int main() { +- $type dummy; +- FILE *f=fopen("conftestval", "w"); +- if (!f) exit(1); +- fprintf(f, "%d\n", sizeof($1)); +- exit(0); +-} +- ])], [ +- x=`cat conftestval` +- eval "size_$type=$x" +- AC_MSG_RESULT([$x]) +- ], [ +- eval "size_$type=0" +- AC_MSG_RESULT([unknown type]) +- ], [ +- eval "size_$type=0" +- AC_MSG_RESULT([can't determine when cross-compiling]) +- ]) +-done +- +-dnl Groan. Have to do things this way so that autoheader can do its thing.... +-AC_DEFINE_UNQUOTED(SIZEOF_U_INT8_T, [$size_u_int8_t], [size of u_int8_t]) +-AC_DEFINE_UNQUOTED(SIZEOF_U_INT16_T, [$size_u_int16_t], [size of u_int16_t]) +-AC_DEFINE_UNQUOTED(SIZEOF_U_INT32_T, [$size_u_int32_t], [size of u_int32_t]) ++dnl Find integers of known physical size. ++dnl + +-dnl If we already have these types, don't piss about any more.... ++AC_CHECK_SIZEOF([u_int8_t]) ++AC_CHECK_SIZEOF([u_int16_t]) ++AC_CHECK_SIZEOF([u_int32_t]) + +-if test $size_u_int8_t != 1 || test $size_u_int16_t != 2 || test $size_u_int32_t != 4 ; then +-dnl XXXif test $size_u_int8_t != 1 -o $size_u_int16_t != 2 -o $size_u_int32_t != 4 ; then ++if test $ac_cv_sizeof_u_int8_t = 0 || test $ac_cv_sizeof_u_int16_t = 0 || test $ac_cv_sizeof_u_int32_t = 0; then + do_int_types=1 + AC_CHECK_HEADERS( + stdint.h dnl C99 +@@ -154,12 +123,16 @@ + fi + fi + ++AC_DEFINE_UNQUOTED([SIZEOF_U_INT8_T],[$ac_cv_sizeof_u_int8_t],[size of u_int8_t]) ++AC_DEFINE_UNQUOTED([SIZEOF_U_INT16_T],[$ac_cv_sizeof_u_int16_t],[size of u_int16_t]) ++AC_DEFINE_UNQUOTED([SIZEOF_U_INT32_T],[$ac_cv_sizeof_u_int32_t],[size of u_int32_t]) ++ + dnl + dnl Name resolution. + dnl + dnl This is complicated because we need some sort of reentrant mechanism for + dnl name resolution. Naturally, UNIX vendors have come up with a variety of +-dnl incompatible schemes for this, many of which don't work at all. ++dnl incompatible schemes for this, many of which do not work at all. + dnl + + dnl First, the default resolver, which uses getnameinfo or gethostbyaddr_r. If +@@ -175,7 +148,7 @@ + use_getnameinfo=0 + AC_SEARCH_LIBS(getnameinfo, [nsl], [use_getnameinfo=1]) + +- dnl XXX For the moment, don't use getnameinfo, since it isn't actually ++ dnl XXX For the moment, do not use getnameinfo, since it is not actually + dnl thread safe on, e.g., NetBSD. + use_getnameinfo=0 + +@@ -192,7 +165,7 @@ + dnl Can use gethostbyaddr_r? + AC_SEARCH_LIBS(gethostbyaddr_r, [nsl], , [resolver=guess]) + if test x$resolver = xguess && test x$specified_resolver != xguess ; then +- dnl They wanted gethostbyaddr_r, but they can't have it, so stop. ++ dnl They wanted gethostbyaddr_r, but they cannot have it, so stop. + AC_MSG_ERROR([no library defines gethostbyaddr_r]) + fi + fi +@@ -216,15 +189,15 @@ + AC_DEFINE(GETHOSTBYADDR_R_RETURNS_INT, 1, + [8-argument gethostbyaddr_r returns int])], [ + dnl Neither. +- AC_MSG_RESULT([don't know how]) ++ AC_MSG_RESULT([do not know how]) + resolver=guess])]) + if test x$resolver = xguess && test x$specified_resolver != xguess ; then +- dnl They wanted gethostbyaddr_r, but they can't have it, so stop. ++ dnl They wanted gethostbyaddr_r, but they cannot have it, so stop. + AC_MSG_ERROR([gethostbyaddr_r has no known calling convention]) + fi + fi + +-dnl If we still want to do gethostbyaddr_r, and we aren't ++dnl If we still want to do gethostbyaddr_r, and we are not + dnl cross-compiling, test it. + if test x$resolver = xnetdb ; then + if test x$ghba_args = x8 ; then +@@ -237,13 +210,13 @@ + [AC_MSG_RESULT([yes])], + [AC_MSG_RESULT([no]) + resolver=guess], +- [AC_MSG_RESULT([can't test because we are cross-compiling])]) ++ [AC_MSG_RESULT([cannot test because we are cross-compiling])]) + if test x$resolver = xguess ; then + if test x$specified_resolver = xguess ; then +- AC_MSG_RESULT([gethostbyaddr_r doesn't work, so we'll try something else]) ++ AC_MSG_RESULT([gethostbyaddr_r does not work, so we will try something else]) + else +- dnl They wanted gethostbyaddr_r, but it doesn't work, so stop. +- AC_MSG_ERROR([gethostbyaddr_r doesn't work]) ++ dnl They wanted gethostbyaddr_r, but it does not work, so stop. ++ AC_MSG_ERROR([gethostbyaddr_r does not work]) + fi + fi + fi +@@ -260,11 +233,11 @@ + AC_SEARCH_LIBS(ares_init, [ares], [ + AC_DEFINE(USE_ARES, 1, [use ARES for name resolution]) + ], [ +- dnl They asked for ares, but we can't give it to them, so stop. +- AC_MSG_ERROR([can't find ARES. Re-run configure and ask for a different resolver.])]) ++ dnl They asked for ares, but we cannot give it to them, so stop. ++ AC_MSG_ERROR([cannot find ARES. Re-run configure and ask for a different resolver.])]) + fi + +-dnl Last thing to try if we haven't decided yet is netdb_1thread. ++dnl Last thing to try if we have not decided yet is netdb_1thread. + if test x$resolver = xguess ; then + resolver=netdb_1thread + fi +@@ -317,16 +290,16 @@ + + if test $foundpcaph = 0 ; then + AC_MSG_RESULT([no idea]) +- AC_MSG_ERROR([can't find pcap.h +- You're not going to get very far without libpcap.]) ++ AC_MSG_ERROR([cannot find pcap.h ++ You are not going to get very far without libpcap.]) + else + dnl assume that -lpcap is under $test_prefix/lib + if test x$test_prefix != x ; then + LDFLAGS="$LDFLAGS -L$test_prefix/lib" + fi + AC_CHECK_LIB(pcap, pcap_open_live, , [ +- AC_MSG_ERROR([can't find libpcap +- You're not going to get very far without libpcap.]) ++ AC_MSG_ERROR([cannot find libpcap ++ You are not going to get very far without libpcap.]) + ]) + fi + +@@ -337,79 +310,50 @@ + ]) + + if test $foundpcap = 0 ; then +- AC_MSG_ERROR([can't find pcap.h +- You're not going to get very far without libpcap.]) ++ AC_MSG_ERROR([cannot find pcap.h ++ You are not going to get very far without libpcap.]) + fi + + dnl + dnl Curses. Really, we need ncurses or something similarly advanced, since + dnl we use the (apparently obscure) mvchgat function. Unfortunately, there's +-dnl a solid chance that mvchgat is a macro, so we can't just use ++dnl a solid chance that mvchgat is a macro, so we cannot just use + dnl AC_SEARCH_LIBS.... + dnl + +-AC_MSG_CHECKING([for a curses library containing mvchgat]) +-oldLIBS=$LIBS +-for curseslib in ncursesw curses ncurses ; do +- LIBS="$oldLIBS -l$curseslib" +- AC_TRY_LINK([ ++PKG_PROG_PKG_CONFIG() ++ ++PKG_CHECK_MODULES([ncurses], [ncursesw], [foundcurseslib="$ncurses_LIBS"], [ ++ PKG_CHECK_MODULES([ncurses], [ncurses], [foundcurseslib="$ncurses_LIBS"], [ ++ AC_MSG_CHECKING([for a curses library containing mvchgat]) ++ oldLIBS=$LIBS ++ for curseslib in ncursesw curses ncurses ; do ++ LIBS="$oldLIBS -l$curseslib" ++ AC_TRY_LINK([ + #include <$curseslib.h> + ], [ + mvchgat(0, 0, 1, A_REVERSE, 0, NULL) + ], [ +- foundcurseslib=$curseslib ++ foundcurseslib=-l$curseslib + break + ]) +-done +- +-if test x$foundcurseslib = x ; then +- AC_MSG_RESULT([none found]) ++ done ++ ], + AC_MSG_ERROR([Curses! Foiled again! +- (Can't find a curses library supporting mvchgat.) ++ (Cannot find a curses library supporting mvchgat.) + Consider installing ncurses.]) +-else +- AC_MSG_RESULT([-l$foundcurseslib]) +-fi +- ++ ) ++]) + + dnl + dnl POSIX threads. Different systems like different combinations of flags, + dnl libraries, etc. We use a test program to figure this stuff out. + dnl + +-AC_MSG_CHECKING([POSIX threads compilation]) +-thrfail=1 +-oldCFLAGS=$CFLAGS +-oldLIBS=$LIBS +-for flag in "" -mt -pthread -thread ; do +- CFLAGS="$oldCFLAGS $flag" +- for lib in "" -lpthread "-lpthread -lposix4" ; do +- LIBS="$oldLIBS $lib" +- AC_LINK_IFELSE([AC_LANG_SOURCE([`cat config/pthread.c`])], [ +- foundthrlib=$lib +- foundthrflag=$flag +- thrfail=0 +- break +- ]) +- done +- if test $thrfail = 0 ; then +- break +- fi +-done +- +-if test $thrfail = 1 ; then +- AC_MSG_RESULT([no idea]) +- AC_MSG_ERROR([can't figure out how to compile with POSIX threads +- If your system actually supports POSIX threads, this means we've messed up.]) +-fi +- +-AC_MSG_RESULT([CFLAGS=$foundthrflag and LIBS=$foundthrlib]) +-AC_MSG_CHECKING([POSIX threads usability]) +-AC_RUN_IFELSE([AC_LANG_SOURCE([`cat config/pthread.c`])], +- [AC_MSG_RESULT([yes])], +- [AC_MSG_ERROR( +- [it fails. We probably guessed the wrong CFLAGS.])], +- [AC_MSG_RESULT([can't test because we are cross-compiling])]) ++AX_PTHREAD( ++ [LIBS="$PTHREAD_LIBS $LIBS" ++ CFLAGS="$CFLAGS $PTHREAD_CFLAGS"], ++ AC_MSG_ERROR([Could not find out how to enable POSIX threads])) + + dnl + dnl Are we on a system (like Solaris) that requires promiscuous mode in order to diff --git a/net-analyzer/iftop/files/iftop-1.0_pre4-fix-MAC-formatting.patch b/net-analyzer/iftop/files/iftop-1.0_pre4-fix-MAC-formatting.patch new file mode 100644 index 000000000000..d68a8095dce7 --- /dev/null +++ b/net-analyzer/iftop/files/iftop-1.0_pre4-fix-MAC-formatting.patch @@ -0,0 +1,22 @@ +From: Xiaoguang Sun <sun.xiaoguang@yoyosys.com> +Date: Tue, 11 Mar 2014 13:18:46 +0100 +Subject: MAC address format + +Forwarded: http://lists.beasts.org/pipermail/iftop-users/2014-March/000413.html +--- + iftop.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/iftop.c b/iftop.c +index a090dcf..883782e 100644 +--- a/iftop.c ++++ b/iftop.c +@@ -713,7 +713,7 @@ void packet_init() { + if(have_hw_addr) { + fprintf(stderr, "MAC address is:"); + for (i = 0; i < 6; ++i) +- fprintf(stderr, "%c%02x", i ? ':' : ' ', (unsigned int)if_hw_addr[i]); ++ fprintf(stderr, "%c%02x", i ? ':' : ' ', (unsigned char)if_hw_addr[i]); + fprintf(stderr, "\n"); + } + diff --git a/net-analyzer/iftop/files/iftop-1.0_pre4-fno-common.patch b/net-analyzer/iftop/files/iftop-1.0_pre4-fno-common.patch new file mode 100644 index 000000000000..13e0f1058f40 --- /dev/null +++ b/net-analyzer/iftop/files/iftop-1.0_pre4-fno-common.patch @@ -0,0 +1,56 @@ +--- a/ui_common.c ++++ b/ui_common.c +@@ -28,6 +28,13 @@ + extern int history_pos; + extern int history_len; + ++sorted_list_type screen_list; ++host_pair_line totals; ++int peaksent, peakrecv, peaktotal; ++history_type history_totals; ++hash_type* screen_hash; ++hash_type* service_hash; ++ + /* + * Compare two screen lines based on bandwidth. Start comparing from the + * specified column +--- a/ui_common.h ++++ b/ui_common.h +@@ -33,12 +33,12 @@ + + extern options_t options; + +-sorted_list_type screen_list; +-host_pair_line totals; +-int peaksent, peakrecv, peaktotal; ++extern sorted_list_type screen_list; ++extern host_pair_line totals; ++extern int peaksent, peakrecv, peaktotal; + extern history_type history_totals; +-hash_type* screen_hash; +-hash_type* service_hash; ++extern hash_type* screen_hash; ++extern hash_type* service_hash; + + void analyse_data(void); + void screen_list_init(void); +--- a/ui.c ++++ b/ui.c +@@ -253,7 +253,6 @@ + } + } + +-extern history_type history_totals; + + + void ui_print() { +--- a/iftop.c ++++ b/iftop.c +@@ -66,7 +66,6 @@ + extern options_t options; + + hash_type* history; +-history_type history_totals; + time_t last_timestamp; + time_t first_timestamp; + int history_pos = 0; diff --git a/net-analyzer/iftop/files/iftop-1.0_pre4-ip6.arpa.patch b/net-analyzer/iftop/files/iftop-1.0_pre4-ip6.arpa.patch new file mode 100644 index 000000000000..706db4546db9 --- /dev/null +++ b/net-analyzer/iftop/files/iftop-1.0_pre4-ip6.arpa.patch @@ -0,0 +1,48 @@ +From 35af3cf65f17961d173b31fd3b00166ec095c226 Mon Sep 17 00:00:00 2001 +From: Paul Warren <pdw@mythic-beasts.com> +Date: Mon, 6 Feb 2017 21:35:37 +0000 +Subject: [PATCH] Fix bug with DNS resolution. https://bugzilla.redhat.com/show_bug.cgi?id=1120254 + +--- + resolver.c | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/resolver.c b/resolver.c +index adddbc1..a3123bd 100644 +--- a/resolver.c ++++ b/resolver.c +@@ -438,11 +438,11 @@ void resolver_worker(void* ptr) { + char **ch_pp; + void **void_pp; + } u_old = { &old }; +- if(hash_find(ns_hash, &addr, u_old.void_pp) == HASH_STATUS_OK) { ++ if(hash_find(ns_hash, &addr.as_addr6, u_old.void_pp) == HASH_STATUS_OK) { + hash_delete(ns_hash, &addr); + xfree(old); + } +- hash_insert(ns_hash, &addr, (void*)hostname); ++ hash_insert(ns_hash, &addr.as_addr6, (void*)hostname); + } + + } +@@ -488,7 +488,7 @@ void resolve(int af, void* addr, char* result, int buflen) { + + pthread_mutex_lock(&resolver_queue_mutex); + +- if(hash_find(ns_hash, raddr, u_hostname.void_pp) == HASH_STATUS_OK) { ++ if(hash_find(ns_hash, &raddr->as_addr6, u_hostname.void_pp) == HASH_STATUS_OK) { + /* Found => already resolved, or on the queue, no need to keep + * it around */ + free(raddr); +@@ -497,7 +497,7 @@ void resolve(int af, void* addr, char* result, int buflen) { + hostname = xmalloc(INET6_ADDRSTRLEN); + inet_ntop(af, &raddr->addr, hostname, INET6_ADDRSTRLEN); + +- hash_insert(ns_hash, raddr, hostname); ++ hash_insert(ns_hash, &raddr->as_addr6, hostname); + + if(((head + 1) % RESOLVE_QUEUE_LENGTH) == tail) { + /* queue full */ +-- +libgit2 0.26.0 + diff --git a/net-analyzer/iftop/files/iftop-1.0_pre4-tsent-set-but-not-used.patch b/net-analyzer/iftop/files/iftop-1.0_pre4-tsent-set-but-not-used.patch new file mode 100644 index 000000000000..5e12b341fe97 --- /dev/null +++ b/net-analyzer/iftop/files/iftop-1.0_pre4-tsent-set-but-not-used.patch @@ -0,0 +1,12 @@ +--- a/ui_common.c ++++ b/ui_common.c +@@ -263,9 +263,6 @@ + } u_screen_line = { &screen_line }; + addr_pair ap; + int i; +- int tsent, trecv; +- tsent = trecv = 0; +- + + ap = *(addr_pair*)n->key; + diff --git a/net-analyzer/iftop/files/iftoprc b/net-analyzer/iftop/files/iftoprc new file mode 100644 index 000000000000..83b136952734 --- /dev/null +++ b/net-analyzer/iftop/files/iftoprc @@ -0,0 +1,59 @@ + +# Sets the network interface to if. +# interface: if +interface: ppp0 + +# Controls reverse lookup of IP addresses. +# dns-resolution: (yes|no) +dns-resolution: yes + +# Controls conversion of port numbers to service names. +# port-resolution: (yes|no) +port-resolution: yes + +# Sets the filter code to bpf. +# filter-code: bpf + +# Controls display of bar graphs. +# show-bars: (yes|no) +show-bars: yes + +# Puts the interface into promiscuous mode. +# promiscuous: (yes|no) + +# Controls display of port numbers. +# port-display: (off|source-only|destination-only|on) +port-display: on + +# Hides source host names. +# hide-source: (yes|no) + +# Hides destination host names. +# hide-destination: (yes|no) + +# Use bytes for bandwidth display, rather than bits. +# use-bytes: (yes|no) +use-bytes: yes + +# Sets which column is used to sort the display. +# sort: (2s|10s|40s|source|destination) + +# Controls the appearance of each item in the display. +# line-display: (two-line|one-line-both|one-line-sent|one-line-received) + +# Shows cummulative total for each item. +# show-totals: (yes|no) +show-totals: yes + +# Use a logarithmic scale for bar graphs. +# log-scale: (yes|no) + +# Fixes the maximum for the bar graph scale to bw, e.g. "10M" +# max-bandwidth: bw + +# Defines an IP network boundary for determining packet direction. +# net-filter: net/mask + +# Sets a regular expression to filter screen output. +# screen-filter: regexp + diff --git a/net-analyzer/iftop/iftop-1.0_pre4-r2.ebuild b/net-analyzer/iftop/iftop-1.0_pre4-r2.ebuild new file mode 100644 index 000000000000..7ab2fdef1a8d --- /dev/null +++ b/net-analyzer/iftop/iftop-1.0_pre4-r2.ebuild @@ -0,0 +1,45 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +inherit autotools eutils + +DESCRIPTION="display bandwidth usage on an interface" +SRC_URI="http://www.ex-parrot.com/pdw/iftop/download/${P/_/}.tar.gz" +HOMEPAGE="http://www.ex-parrot.com/pdw/iftop/" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha amd64 ~arm hppa ~ia64 ~mips ppc ~ppc64 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos" +IUSE="" + +RDEPEND=" + net-libs/libpcap + sys-libs/ncurses:0= +" +DEPEND=" + ${RDEPEND} + virtual/pkgconfig +" + +S="${WORKDIR}"/${P/_/} + +src_prepare() { + epatch \ + "${FILESDIR}"/${P}-configure.ac.patch \ + "${FILESDIR}"/${P}-Makefile.am.patch \ + "${FILESDIR}"/${P}-tsent-set-but-not-used.patch + + # bug 490168 + cat "${FILESDIR}"/ax_pthread.m4 >> "${S}"/acinclude.m4 || die + + eautoreconf +} + +src_install() { + dosbin iftop + doman iftop.8 + + dodoc AUTHORS ChangeLog README "${FILESDIR}"/iftoprc +} diff --git a/net-analyzer/iftop/iftop-1.0_pre4-r3.ebuild b/net-analyzer/iftop/iftop-1.0_pre4-r3.ebuild new file mode 100644 index 000000000000..aede14d946f8 --- /dev/null +++ b/net-analyzer/iftop/iftop-1.0_pre4-r3.ebuild @@ -0,0 +1,44 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 +inherit autotools eutils + +DESCRIPTION="display bandwidth usage on an interface" +SRC_URI="http://www.ex-parrot.com/pdw/iftop/download/${P/_/}.tar.gz" +HOMEPAGE="http://www.ex-parrot.com/pdw/iftop/" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos" + +RDEPEND=" + net-libs/libpcap + sys-libs/ncurses:0= +" +DEPEND=" + ${RDEPEND} + virtual/pkgconfig +" +S="${WORKDIR}"/${P/_/} +PATCHES=( + "${FILESDIR}"/${P}-configure.ac.patch + "${FILESDIR}"/${P}-Makefile.am.patch + "${FILESDIR}"/${P}-tsent-set-but-not-used.patch + "${FILESDIR}"/${P}-ip6.arpa.patch +) + +src_prepare() { + default + # bug 490168 + cat "${FILESDIR}"/ax_pthread.m4 >> "${S}"/acinclude.m4 || die + + eautoreconf +} + +src_install() { + dosbin iftop + doman iftop.8 + + dodoc AUTHORS ChangeLog README "${FILESDIR}"/iftoprc +} diff --git a/net-analyzer/iftop/iftop-1.0_pre4-r4.ebuild b/net-analyzer/iftop/iftop-1.0_pre4-r4.ebuild new file mode 100644 index 000000000000..3f9d11ed9b42 --- /dev/null +++ b/net-analyzer/iftop/iftop-1.0_pre4-r4.ebuild @@ -0,0 +1,46 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +inherit autotools + +DESCRIPTION="display bandwidth usage on an interface" +SRC_URI="http://www.ex-parrot.com/pdw/iftop/download/${P/_/}.tar.gz" +HOMEPAGE="http://www.ex-parrot.com/pdw/iftop/" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos" + +RDEPEND=" + net-libs/libpcap + sys-libs/ncurses:0= +" +DEPEND=" + ${RDEPEND} + virtual/pkgconfig +" +PATCHES=( + "${FILESDIR}"/${PN}-1.0_pre4-configure.ac.patch + "${FILESDIR}"/${PN}-1.0_pre4-Makefile.am.patch + "${FILESDIR}"/${PN}-1.0_pre4-tsent-set-but-not-used.patch + "${FILESDIR}"/${PN}-1.0_pre4-ip6.arpa.patch + "${FILESDIR}"/${PN}-1.0_pre4-fix-MAC-formatting.patch + "${FILESDIR}"/${PN}-1.0_pre4-fno-common.patch +) +S="${WORKDIR}"/${P/_/} + +src_prepare() { + default + # bug 490168 + cat "${FILESDIR}"/ax_pthread.m4 >> "${S}"/acinclude.m4 || die + + eautoreconf +} + +src_install() { + dosbin iftop + doman iftop.8 + + dodoc AUTHORS ChangeLog README "${FILESDIR}"/iftoprc +} diff --git a/net-analyzer/iftop/iftop-9999999.ebuild b/net-analyzer/iftop/iftop-9999999.ebuild new file mode 100644 index 000000000000..f67befd3bc29 --- /dev/null +++ b/net-analyzer/iftop/iftop-9999999.ebuild @@ -0,0 +1,44 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +inherit autotools git-r3 + +DESCRIPTION="display bandwidth usage on an interface" +HOMEPAGE="http://www.ex-parrot.com/pdw/iftop/" +EGIT_REPO_URI="https://code.blinkace.com/pdw/iftop" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="" + +RDEPEND=" + net-libs/libpcap + sys-libs/ncurses:0= +" +DEPEND=" + ${RDEPEND} + virtual/pkgconfig +" +S="${WORKDIR}"/${P/_/} +PATCHES=( + "${FILESDIR}"/${PN}-1.0_pre4-configure.ac.patch + "${FILESDIR}"/${PN}-1.0_pre4-Makefile.am.patch + "${FILESDIR}"/${PN}-1.0_pre4-fix-MAC-formatting.patch + "${FILESDIR}"/${PN}-1.0_pre4-fno-common.patch +) + +src_prepare() { + default + # bug 490168 + cat "${FILESDIR}"/ax_pthread.m4 >> "${S}"/acinclude.m4 || die + + eautoreconf +} + +src_install() { + dosbin iftop + doman iftop.8 + + dodoc AUTHORS ChangeLog README "${FILESDIR}"/iftoprc +} diff --git a/net-analyzer/iftop/metadata.xml b/net-analyzer/iftop/metadata.xml new file mode 100644 index 000000000000..71bc908f2b2a --- /dev/null +++ b/net-analyzer/iftop/metadata.xml @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>netmon@gentoo.org</email> + <name>Gentoo network monitoring and analysis project</name> + </maintainer> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/ike-scan/Manifest b/net-analyzer/ike-scan/Manifest new file mode 100644 index 000000000000..09ba0e037879 --- /dev/null +++ b/net-analyzer/ike-scan/Manifest @@ -0,0 +1,2 @@ +DIST ike-scan-1.9.4.tar.gz 1360202 BLAKE2B abe206b22a23a6d4eaa2218204657d6c47f22ac8009df1f1e7918fbb55575033f237462ed57ba89aee8bed28e47a4dacf69e443dac5cd3b506842e26e71f97e9 SHA512 d7dde6d3d76a2e3ddeb9ed1f0dee3e2c3a13d4afa57ebb8ff19f6af094f7334b464509cee6ffc385d2703bcf9bc1c503bc604506279518f692f82c8f12f146be +DIST ike-scan-1.9.tar.gz 1412689 BLAKE2B 97a18ca35a80b66859e2ab99de916041eb9c9d869f96bbd799be88079b84022dcc2ecb5df2cecefff793192333da915957adc6b0c3d4bb376397941d4a731323 SHA512 c586ad4d485f04398c2800af5ced1392eee0f7f7d7d117602be45134a47442b38c4fa23fbbf137af5a37298b471a6bcdd6e94559dde695d06e96dd39f0681906 diff --git a/net-analyzer/ike-scan/ike-scan-1.9-r2.ebuild b/net-analyzer/ike-scan/ike-scan-1.9-r2.ebuild new file mode 100644 index 000000000000..8792715b52a2 --- /dev/null +++ b/net-analyzer/ike-scan/ike-scan-1.9-r2.ebuild @@ -0,0 +1,37 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +DESCRIPTION="A utility for finding, fingerprinting and testing IKE VPN servers" +HOMEPAGE="http://www.nta-monitor.com/ike-scan/" +SRC_URI="http://www.nta-monitor.com/ike-scan/download/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~ppc x86" +IUSE="libressl ssl" + +DEPEND="ssl? ( + !libressl? ( dev-libs/openssl:0= ) + libressl? ( dev-libs/libressl:0= ) +)" +RDEPEND="${DEPEND}" + +src_prepare() { + # Fix buffer overflow, bug #277556 + sed \ + -e "/MAXLINE/s:255:511:g" \ + -i ike-scan.h || die +} + +src_configure() { + # --disable-lookup prevents ike-scan from phoning home + # for more information, please see bug 157507 + econf $(use_with ssl openssl) --disable-lookup +} + +src_install() { + default + dodoc udp-backoff-fingerprinting-paper.txt +} diff --git a/net-analyzer/ike-scan/ike-scan-1.9.4.ebuild b/net-analyzer/ike-scan/ike-scan-1.9.4.ebuild new file mode 100644 index 000000000000..8fbaa0ed31e5 --- /dev/null +++ b/net-analyzer/ike-scan/ike-scan-1.9.4.ebuild @@ -0,0 +1,44 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +inherit autotools + +DESCRIPTION="A utility for finding, fingerprinting and testing IKE VPN servers" +HOMEPAGE="https://github.com/royhills/ike-scan/" +SRC_URI="https://github.com/royhills/ike-scan/archive/${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~ppc ~x86" +IUSE="libressl ssl" + +DEPEND=" + ssl? ( + !libressl? ( dev-libs/openssl:0= ) + libressl? ( dev-libs/libressl:0= ) + ) +" +RDEPEND=" + ${DEPEND} +" + +src_prepare() { + # Fix buffer overflow, bug #277556 + sed \ + -e "/MAXLINE/s:255:511:g" \ + -i ike-scan.h || die + + default + + eautoreconf +} + +src_configure() { + econf $(use_with ssl openssl) +} + +src_install() { + default + dodoc udp-backoff-fingerprinting-paper.txt +} diff --git a/net-analyzer/ike-scan/ike-scan-99999.ebuild b/net-analyzer/ike-scan/ike-scan-99999.ebuild new file mode 100644 index 000000000000..1e9a5ce43bb9 --- /dev/null +++ b/net-analyzer/ike-scan/ike-scan-99999.ebuild @@ -0,0 +1,44 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +inherit autotools git-r3 + +DESCRIPTION="A utility for finding, fingerprinting and testing IKE VPN servers" +HOMEPAGE="https://github.com/royhills/ike-scan/" +EGIT_REPO_URI="https://github.com/royhills/ike-scan" + +LICENSE="GPL-2" +SLOT="0" +IUSE="libressl ssl" +KEYWORDS="" + +DEPEND=" + ssl? ( + !libressl? ( dev-libs/openssl:0= ) + libressl? ( dev-libs/libressl:0= ) + ) +" +RDEPEND=" + ${DEPEND} +" + +src_prepare() { + # Fix buffer overflow, bug #277556 + sed \ + -e "/MAXLINE/s:255:511:g" \ + -i ike-scan.h || die + + default + + eautoreconf +} + +src_configure() { + econf $(use_with ssl openssl) +} + +src_install() { + default + dodoc udp-backoff-fingerprinting-paper.txt +} diff --git a/net-analyzer/ike-scan/metadata.xml b/net-analyzer/ike-scan/metadata.xml new file mode 100644 index 000000000000..6d60ca626dd5 --- /dev/null +++ b/net-analyzer/ike-scan/metadata.xml @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>netmon@gentoo.org</email> + <name>Gentoo network monitoring and analysis project</name> + </maintainer> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/ipaudit/Manifest b/net-analyzer/ipaudit/Manifest new file mode 100644 index 000000000000..1d5b03465bf8 --- /dev/null +++ b/net-analyzer/ipaudit/Manifest @@ -0,0 +1 @@ +DIST ipaudit-1.0BETA2.tar.gz 135680 BLAKE2B 2a8e7754251c743758d6e0d7008d904a3a237c26a660f5c07661c632dd75ecda6cf3b04253eb76f64c72ed278da00030cf64231bdc4760a6b04df1497f628ec2 SHA512 3a8890821c515aea95762eeb2cc7a649533ff739984c944bcb26acb72434e1f2b453a98365719fce9e062d6262b9d76ac389f149ad2a19361422783bc0b55e09 diff --git a/net-analyzer/ipaudit/ipaudit-1.0_beta2-r1.ebuild b/net-analyzer/ipaudit/ipaudit-1.0_beta2-r1.ebuild new file mode 100644 index 000000000000..fba409faf3e3 --- /dev/null +++ b/net-analyzer/ipaudit/ipaudit-1.0_beta2-r1.ebuild @@ -0,0 +1,23 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +DESCRIPTION="IPAudit monitors network activity on a network by host, protocol and port" +HOMEPAGE="http://ipaudit.sourceforge.net/" +MY_P="${PN}-${PV/_beta/BETA}" +SRC_URI="mirror://sourceforge/${PN}/${MY_P}.tar.gz" +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ppc x86" +IUSE="mysql" +DEPEND="net-libs/libpcap + mysql? ( dev-db/mysql-connector-c:0= )" +RDEPEND="${DEPEND}" +S="${WORKDIR}/${MY_P}" + +DOCS=( AUTHORS README ) + +src_configure() { + econf $(use_with mysql) +} diff --git a/net-analyzer/ipaudit/metadata.xml b/net-analyzer/ipaudit/metadata.xml new file mode 100644 index 000000000000..48b482f0d99c --- /dev/null +++ b/net-analyzer/ipaudit/metadata.xml @@ -0,0 +1,12 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>robbat2@gentoo.org</email> + <name>Robin H. Johnson</name> + </maintainer> + <upstream> + <remote-id type="sourceforge">ipaudit</remote-id> + </upstream> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/ipband/Manifest b/net-analyzer/ipband/Manifest new file mode 100644 index 000000000000..cb7dc8dcee36 --- /dev/null +++ b/net-analyzer/ipband/Manifest @@ -0,0 +1 @@ +DIST ipband-0.8.1.tgz 36675 BLAKE2B ab0bab6a455fd7fc8193be8b94d7de6c8a781cf3ad7b3a79866deb5fddff834dd5e752163e55007d34c0852fc8ba7ff5b20095b9d5d62bb0db7ca62c72c83b72 SHA512 66347652fee7c7426620260ae615de2f4cfeedacac21d606643e4ae8da204cc81780bfd3f4062a16a9172a78a4a7799fc97e0141750ed26b0e21c8ac2eab3c4f diff --git a/net-analyzer/ipband/files/ipband-0.8.1-fno-common.patch b/net-analyzer/ipband/files/ipband-0.8.1-fno-common.patch new file mode 100644 index 000000000000..4a5fe78fcc49 --- /dev/null +++ b/net-analyzer/ipband/files/ipband-0.8.1-fno-common.patch @@ -0,0 +1,113 @@ +--- a/ipband.h ++++ b/ipband.h +@@ -174,40 +174,40 @@ + extern char pcap_version[]; + + /* Internal use */ +-int isig_m; /* Interupt flag for capture loop */ +-int preload_m; /* Subnets are preloaded flag */ +-char *pcapdev_m; /* Device to listen to */ +-pcap_t *pcapfile_m; /* Pcap input file descriptor */ +-int pcapoffset_m; /* IP header offset */ +-time_t started_m; /* Time when we started */ ++extern int isig_m; /* Interupt flag for capture loop */ ++extern int preload_m; /* Subnets are preloaded flag */ ++extern char *pcapdev_m; /* Device to listen to */ ++extern pcap_t *pcapfile_m; /* Pcap input file descriptor */ ++extern int pcapoffset_m; /* IP header offset */ ++extern time_t started_m; /* Time when we started */ + +-ll_srvc_t *ll_tcp_cache; /* Resolved tcp services cache */ +-ll_srvc_t *ll_udp_cache; /* Resolved udp services cache */ ++extern ll_srvc_t *ll_tcp_cache; /* Resolved tcp services cache */ ++extern ll_srvc_t *ll_udp_cache; /* Resolved udp services cache */ + + + /* Variables holding option values */ +-int debug_m; /* Debug option */ +-int do_html; /* Generate HTML output */ +-char *filtercmd_m; /* Pcap filter string */ +-char *repfname_m; /* Subnet report output file */ +-char *htmlfname_m; /* HTML report output file */ +-char *htmltitle_m; /* HTML Title */ +-int mask_m; /* Network aggregation mask bits */ +-int cycle_m; /* Number of sec to average data */ +-int rcycle_m; /* How long in sec bandwidth +- threshold may be exceeded */ +-float thresh_m; /* Bandwidth threshold in kBps */ +-int fork_m; /* Fork flag */ +-int top_m; /* No of top connections in report */ +-char *config_m; /* Config file name */ +-char *mailto_m; /* E-mail address for reporting */ +-char *mailfoot_m; /* Footer file for e-mail report */ +-char *mtastring_m; /* MTA command string */ +-int report_aggr_m; /* Flag to report aggr exceed time */ +-int promisc_m; /* Use promiscious mode? */ +-int *iplist_m; /* List of local networks */ +-int niplist_m; /* Number of local networks */ +-int lenadj_m; /* IP packet length adjustment in bytes */ ++extern int debug_m; /* Debug option */ ++extern int do_html; /* Generate HTML output */ ++extern char *filtercmd_m; /* Pcap filter string */ ++extern char *repfname_m; /* Subnet report output file */ ++extern char *htmlfname_m; /* HTML report output file */ ++extern char *htmltitle_m; /* HTML Title */ ++extern int mask_m; /* Network aggregation mask bits */ ++extern int cycle_m; /* Number of sec to average data */ ++extern int rcycle_m; /* How long in sec bandwidth ++ threshold may be exceeded */ ++extern float thresh_m; /* Bandwidth threshold in kBps */ ++extern int fork_m; /* Fork flag */ ++extern int top_m; /* No of top connections in report */ ++extern char *config_m; /* Config file name */ ++extern char *mailto_m; /* E-mail address for reporting */ ++extern char *mailfoot_m; /* Footer file for e-mail report */ ++extern char *mtastring_m; /* MTA command string */ ++extern int report_aggr_m; /* Flag to report aggr exceed time */ ++extern int promisc_m; /* Use promiscious mode? */ ++extern int *iplist_m; /* List of local networks */ ++extern int niplist_m; /* Number of local networks */ ++extern int lenadj_m; /* IP packet length adjustment in bytes */ + + + /* +--- a/main.c ++++ b/main.c +@@ -26,6 +26,37 @@ + + #include "ipband.h" + ++/* Internal use */ ++int isig_m; /* Interupt flag for capture loop */ ++int preload_m; /* Subnets are preloaded flag */ ++char *pcapdev_m; /* Device to listen to */ ++pcap_t *pcapfile_m; /* Pcap input file descriptor */ ++int pcapoffset_m; /* IP header offset */ ++time_t started_m; /* Time when we started */ ++ ++/* Variables holding option values */ ++int debug_m; /* Debug option */ ++int do_html; /* Generate HTML output */ ++char *filtercmd_m; /* Pcap filter string */ ++char *repfname_m; /* Subnet report output file */ ++char *htmlfname_m; /* HTML report output file */ ++char *htmltitle_m; /* HTML Title */ ++int mask_m; /* Network aggregation mask bits */ ++int cycle_m; /* Number of sec to average data */ ++int rcycle_m; /* How long in sec bandwidth ++ threshold may be exceeded */ ++float thresh_m; /* Bandwidth threshold in kBps */ ++int fork_m; /* Fork flag */ ++int top_m; /* No of top connections in report */ ++char *config_m; /* Config file name */ ++char *mailto_m; /* E-mail address for reporting */ ++char *mailfoot_m; /* Footer file for e-mail report */ ++char *mtastring_m; /* MTA command string */ ++int report_aggr_m; /* Flag to report aggr exceed time */ ++int promisc_m; /* Use promiscious mode? */ ++int *iplist_m; /* List of local networks */ ++int niplist_m; /* Number of local networks */ ++int lenadj_m; /* IP packet length adjustment in bytes */ + + /* Initialize here and not in set_defaults() in case the latter called + _after_ the structures are created */ diff --git a/net-analyzer/ipband/files/ipband-0.8.1-gentoo.patch b/net-analyzer/ipband/files/ipband-0.8.1-gentoo.patch new file mode 100644 index 000000000000..e3929da8cfb4 --- /dev/null +++ b/net-analyzer/ipband/files/ipband-0.8.1-gentoo.patch @@ -0,0 +1,20 @@ +--- a/Makefile ++++ b/Makefile +@@ -12,7 +12,6 @@ + CPPFLAGS=-I/usr/include/pcap + LIBS=-lpcap + CFLAGS := -Wall $(CFLAGS) +-CC=gcc + + ifndef PREFIX + PREFIX=/usr +@@ -49,8 +48,7 @@ + all: $(BIN) + + $(BIN): $(OBJ_C) +- $(CC) -o $(BIN) $(OBJ_C) $(LIBS) $(CFLAGS) +- strip $(BIN) ++ $(CC) $(CFLAGS) $(LDFLAGS) -o $(BIN) $(OBJ_C) $(LIBS) + + install-strip: install + diff --git a/net-analyzer/ipband/files/ipband-0.8.1-postfix.patch b/net-analyzer/ipband/files/ipband-0.8.1-postfix.patch new file mode 100644 index 000000000000..9db8313afb30 --- /dev/null +++ b/net-analyzer/ipband/files/ipband-0.8.1-postfix.patch @@ -0,0 +1,13 @@ +--- a/ipband.sample.conf ++++ b/ipband.sample.conf +@@ -61,7 +61,10 @@ + # MTA string. Default is "/usr/sbin/sendmail -t -ba". Change it to + # whatever runs MTA of your choice. Note that the stringis tokenized and + # passed to exec(), so that shell's metacharacters are not interpreted. ++# Sendmail + #mtastring "/usr/sbin/sendmail -t -ba" ++# Postfix ++#mtastring "/usr/sbin/sendmail -t" + + # Default number of subnet mask bits. + #maskbits 24 diff --git a/net-analyzer/ipband/files/ipband-init b/net-analyzer/ipband/files/ipband-init new file mode 100644 index 000000000000..aa3474129eb5 --- /dev/null +++ b/net-analyzer/ipband/files/ipband-init @@ -0,0 +1,24 @@ +#!/sbin/openrc-run +# Copyright 1999-2007 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +depend() { + need net +} + +start() { + ebegin "Starting ipband" + start-stop-daemon --start --exec /usr/bin/ipband -- -F > /dev/null + if [ $? -ne 0 ]; then + ewarn "Check settings in /etc/ipband.conf" + eend 1 + else + eend 0 + fi +} + +stop() { + ebegin "Stopping ipband" + start-stop-daemon --stop --exec /usr/bin/ipband + eend $? +} diff --git a/net-analyzer/ipband/ipband-0.8.1-r1.ebuild b/net-analyzer/ipband/ipband-0.8.1-r1.ebuild new file mode 100644 index 000000000000..1e0feff597c1 --- /dev/null +++ b/net-analyzer/ipband/ipband-0.8.1-r1.ebuild @@ -0,0 +1,36 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +inherit eutils toolchain-funcs + +DESCRIPTION="A pcap based IP traffic and bandwidth monitor with configurable reporting and alarm abilities" +HOMEPAGE="http://ipband.sourceforge.net/" +SRC_URI="http://ipband.sourceforge.net/${P}.tgz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 x86" + +DEPEND=">=net-libs/libpcap-0.4" +RDEPEND="${DEPEND}" + +src_prepare() { + epatch \ + "${FILESDIR}"/${P}-gentoo.patch \ + "${FILESDIR}"/${P}-postfix.patch + + tc-export CC +} + +src_install() { + dobin ipband + doman ipband.8 + dodoc CHANGELOG README + + newinitd "${FILESDIR}"/ipband-init ipband + + insinto /etc/ + newins ipband.sample.conf ipband.conf +} diff --git a/net-analyzer/ipband/ipband-0.8.1-r2.ebuild b/net-analyzer/ipband/ipband-0.8.1-r2.ebuild new file mode 100644 index 000000000000..c0d621602ceb --- /dev/null +++ b/net-analyzer/ipband/ipband-0.8.1-r2.ebuild @@ -0,0 +1,41 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +inherit toolchain-funcs + +DESCRIPTION="A pcap based IP traffic and bandwidth monitor" +HOMEPAGE="http://ipband.sourceforge.net/" +SRC_URI="mirror://sourceforge/${PN}/${P}.tgz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" + +DEPEND=" + >=net-libs/libpcap-0.4 +" +RDEPEND=" + ${DEPEND} +" +PATCHES=( + "${FILESDIR}"/${P}-gentoo.patch + "${FILESDIR}"/${P}-postfix.patch + "${FILESDIR}"/${P}-fno-common.patch +) + +src_configure() { + tc-export CC + default +} + +src_install() { + dobin ipband + doman ipband.8 + dodoc CHANGELOG README + + newinitd "${FILESDIR}"/ipband-init ipband + + insinto /etc/ + newins ipband.sample.conf ipband.conf +} diff --git a/net-analyzer/ipband/metadata.xml b/net-analyzer/ipband/metadata.xml new file mode 100644 index 000000000000..e9d5c682c5fd --- /dev/null +++ b/net-analyzer/ipband/metadata.xml @@ -0,0 +1,12 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>netmon@gentoo.org</email> + <name>Gentoo network monitoring and analysis project</name> + </maintainer> + <upstream> + <remote-id type="sourceforge">ipband</remote-id> + </upstream> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/ipcad/Manifest b/net-analyzer/ipcad/Manifest new file mode 100644 index 000000000000..d359453f37f8 --- /dev/null +++ b/net-analyzer/ipcad/Manifest @@ -0,0 +1 @@ +DIST ipcad-3.7.3.tar.gz 172457 BLAKE2B 900f71fae715b4a18ae9d4f0aacc2eaf2cf08f727460c6a1d3baf0d3622f19c042387272a7e943ec08933ad79a05f426d21496e32e42322ae6f16558b9c3a2a2 SHA512 a25a2551bd88727c20f969b780e09d2776bf1fe4f684b0a7a6e571bb7b5684743ade0571b7993849b65c58def4550aa88bcb52a91d5cc6c21e562627fb3b80b6 diff --git a/net-analyzer/ipcad/files/ipcad-3.7-linux-2.6.27.patch b/net-analyzer/ipcad/files/ipcad-3.7-linux-2.6.27.patch new file mode 100644 index 000000000000..3b21efb4ff4e --- /dev/null +++ b/net-analyzer/ipcad/files/ipcad-3.7-linux-2.6.27.patch @@ -0,0 +1,21 @@ +--- a/configure.in ++++ b/configure.in +@@ -156,6 +156,7 @@ + ]) + + AC_CHECK_HEADERS(asm/types.h) ++AC_CHECK_HEADERS(linux/in.h) + AC_CHECK_HEADERS(linux/socket.h) + AC_CHECK_HEADERS(linux/netlink.h,,, + [#ifdef HAVE_LINUX_SOCKET_H +@@ -164,6 +165,9 @@ + AC_CHECK_HEADERS(linux/netfilter.h,,, + [#ifdef HAVE_LINUX_SOCKET_H + #include <linux/socket.h> ++#endif ++#ifdef HAVE_LINUX_IN_H ++#include <linux/in.h> + #endif]) + + AC_CHECK_HEADERS(linux/if.h,,, + diff --git a/net-analyzer/ipcad/files/ipcad-3.7-linux-2.6.35.patch b/net-analyzer/ipcad/files/ipcad-3.7-linux-2.6.35.patch new file mode 100644 index 000000000000..84cc52da6bfb --- /dev/null +++ b/net-analyzer/ipcad/files/ipcad-3.7-linux-2.6.35.patch @@ -0,0 +1,43 @@ +Author: Peter Volkov <pva@gentoo.org> +Fixes: https://bugs.gentoo.org/show_bug.cgi?id=335592 + +i686-pc-linux-gnu-gcc -DIPCAD_VERSION=\"3.7.2\" -DCONFIG_FILE=\"/etc/ipcad.conf\" -DHAVE_CONFIG_H -D_REENTRANT -D_THREAD_SAFE -DPSRC_pcap -DIFST_linux -O2 -pipe -O2 -pipe -I/usr/local/include -DHAVE_CONFIG_H -W -Wall -o dump.o -c dump.c +In file included from ipcad.h:33:0, + from disp.c:29: + psrc.h:93:23: error: field ‘peer’ has incomplete type + +--- a/configure.in ++++ b/configure.in +@@ -155,17 +155,29 @@ + #endif + ]) + +-AC_CHECK_HEADERS(asm/types.h) +-AC_CHECK_HEADERS(linux/in.h) ++AC_CHECK_HEADERS(asm/types.h sys/socket.h) ++AC_CHECK_HEADERS(linux/in.h linux/in6.h,,, ++[#ifdef HAVE_SYS_SOCKET_H ++#include <sys/socket.h> ++#endif]) + AC_CHECK_HEADERS(linux/socket.h) + AC_CHECK_HEADERS(linux/netlink.h,,, + [#ifdef HAVE_LINUX_SOCKET_H + #include <linux/socket.h> ++#endif ++#ifdef HAVE_SYS_SOCKET_H ++#include <sys/socket.h> + #endif]) + AC_CHECK_HEADERS(linux/netfilter.h,,, + [#ifdef HAVE_LINUX_SOCKET_H + #include <linux/socket.h> + #endif ++#ifdef HAVE_SYS_SOCKET_H ++#include <sys/socket.h> ++#endif ++#ifdef HAVE_LINUX_IN6_H ++#include <linux/in6.h> ++#endif + #ifdef HAVE_LINUX_IN_H + #include <linux/in.h> + #endif]) + diff --git a/net-analyzer/ipcad/files/ipcad-3.7.3-signal_h.patch b/net-analyzer/ipcad/files/ipcad-3.7.3-signal_h.patch new file mode 100644 index 000000000000..83d0a35e01fc --- /dev/null +++ b/net-analyzer/ipcad/files/ipcad-3.7.3-signal_h.patch @@ -0,0 +1,32 @@ +--- a/main.c ++++ b/main.c +@@ -26,6 +26,8 @@ + * $Id$ + */ + ++#include <signal.h> /* signal */ ++ + #include "ipcad.h" + #include "cfgvar.h" + #include "servers.h" +--- a/pps.c ++++ b/pps.c +@@ -26,6 +26,7 @@ + * $Id$ + */ + ++#include <signal.h> /* sigprocmask */ + + #include "ipcad.h" + #include "opt.h" +--- a/servers.c ++++ b/servers.c +@@ -26,6 +26,8 @@ + * $Id$ + */ + ++#include <signal.h> /* pthread_kill and sigprocmask */ ++ + #include "ipcad.h" + #include "servers.h" + #include "opt.h" diff --git a/net-analyzer/ipcad/files/ipcad.conf.d b/net-analyzer/ipcad/files/ipcad.conf.d new file mode 100644 index 000000000000..8304b5d161e9 --- /dev/null +++ b/net-analyzer/ipcad/files/ipcad.conf.d @@ -0,0 +1,9 @@ +# Copyright 1999-2006 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +# Config file for /etc/init.d/ipcad + +# Any extra options you want to pass to ipcad +# on start-up should be put here. +# Read tables on startup (-r), daemonize (-d), and save tables on exit (-s). +IPCAD_OPTS="-rds" diff --git a/net-analyzer/ipcad/files/ipcad.init b/net-analyzer/ipcad/files/ipcad.init new file mode 100644 index 000000000000..84ff3eeebf31 --- /dev/null +++ b/net-analyzer/ipcad/files/ipcad.init @@ -0,0 +1,36 @@ +#!/sbin/openrc-run +# Copyright 1999-2006 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +depend() { + need net +} + +checkconfig() { + if [ ! -f /etc/ipcad.conf ] ; then + eerror "No /etc/ipcad.conf file exists!" + return 1 + fi + + `egrep -v "(^#|^$)" /etc/ipcad.conf | grep interface > /dev/null 2>&1` || { + eerror "Please, configure at least one interface in /etc/ipcad.conf." ; + return 1 ; + } + + return 0 +} + +start() { + # Comment out the following line to get faster startups + checkconfig || return 1 + + ebegin "Starting ipcad" + start-stop-daemon --start --pidfile=/var/ipcad/run/ipcad.pid --exec /usr/sbin/ipcad -- ${IPCAD_OPTS} + eend $? +} + +stop () { + ebegin "Stopping ipcad" + start-stop-daemon --stop --pidfile=/var/ipcad/run/ipcad.pid --exec /usr/sbin/ipcad --retry 20 + eend $? +} diff --git a/net-analyzer/ipcad/ipcad-3.7.3.ebuild b/net-analyzer/ipcad/ipcad-3.7.3.ebuild new file mode 100644 index 000000000000..e9723ab496af --- /dev/null +++ b/net-analyzer/ipcad/ipcad-3.7.3.ebuild @@ -0,0 +1,52 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 +inherit autotools eutils + +DESCRIPTION="IP Cisco Accounting Daemon" +HOMEPAGE="https://sourceforge.net/projects/ipcad/ http://lionet.info/ipcad/" +SRC_URI="mirror://sourceforge/ipcad/${P}.tar.gz" + +LICENSE="BSD-2 GPL-2" +SLOT="0" +KEYWORDS="amd64 ppc x86" + +RDEPEND=" + net-libs/libpcap + net-firewall/iptables +" +DEPEND="${RDEPEND}" + +src_prepare() { + epatch \ + "${FILESDIR}"/${PN}-3.7-linux-2.6.27.patch \ + "${FILESDIR}"/${PN}-3.7-linux-2.6.35.patch \ + "${FILESDIR}"/${P}-signal_h.patch + + sed -i \ + -e "s|^chroot = /adm/tmp;|chroot = /var/ipcad;|" \ + -e "s|^interface|#&|" \ + -e "s|^aggregate|#&|" \ + -e "s|^pidfile = ipcad.pid;|pidfile = /run/ipcad.pid;|" \ + ipcad.conf.default || die + + eautoreconf +} + +src_install() { + dodoc AUTHORS ChangeLog README BUGS FAQ ipcad.conf.simple ipcad.conf.default + + dosbin ipcad + + insinto /etc + insopts -m0600 + newins ipcad.conf.default ipcad.conf + + keepdir /var/ipcad/run + + doman ipcad.8 ipcad.conf.5 + + newinitd "${FILESDIR}"/ipcad.init ipcad + newconfd "${FILESDIR}"/ipcad.conf.d ipcad +} diff --git a/net-analyzer/ipcad/metadata.xml b/net-analyzer/ipcad/metadata.xml new file mode 100644 index 000000000000..5852e33c174e --- /dev/null +++ b/net-analyzer/ipcad/metadata.xml @@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>netmon@gentoo.org</email> + <name>Gentoo network monitoring and analysis project</name> + </maintainer> + <longdescription>IP Cisco Accounting Daemon</longdescription> + <upstream> + <remote-id type="sourceforge">ipcad</remote-id> + </upstream> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/ipgen/ipgen-9999.ebuild b/net-analyzer/ipgen/ipgen-9999.ebuild new file mode 100644 index 000000000000..da5631d5332b --- /dev/null +++ b/net-analyzer/ipgen/ipgen-9999.ebuild @@ -0,0 +1,18 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +inherit autotools git-r3 + +DESCRIPTION="Generate list of IP addresses from a network specification" +HOMEPAGE="https://github.com/royhills/ipgen" +EGIT_REPO_URI="https://github.com/royhills/ipgen" + +LICENSE="GPL-3" +SLOT="0" +KEYWORDS="" + +src_prepare() { + default + eautoreconf +} diff --git a/net-analyzer/ipgen/metadata.xml b/net-analyzer/ipgen/metadata.xml new file mode 100644 index 000000000000..86996df91e9e --- /dev/null +++ b/net-analyzer/ipgen/metadata.xml @@ -0,0 +1,12 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>netmon@gentoo.org</email> + <name>Gentoo network monitoring and analysis project</name> + </maintainer> + <upstream> + <remote-id type="github">royhills/ipgen</remote-id> + </upstream> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/ipguard/Manifest b/net-analyzer/ipguard/Manifest new file mode 100644 index 000000000000..6585adfd1f2d --- /dev/null +++ b/net-analyzer/ipguard/Manifest @@ -0,0 +1 @@ +DIST ipguard-1.04.tar.gz 24566 BLAKE2B c9d543e6f7886c3b6377fbfe95e91e2d786da6a92fe445c9500c8b7ea6fb859bf8550daf9c83de425494376d0ed7197158e5ff9499a97417793b439e82004326 SHA512 c29c3f594e09ad1c06ca7297f794ddfada48da7ec2b98786694cd6af7508cbff232889e0c90718d96519297870b93132b7b0f9f310a0e4d7a7c2d54a30ca893c diff --git a/net-analyzer/ipguard/files/ipguard-1.04-fno-common.patch b/net-analyzer/ipguard/files/ipguard-1.04-fno-common.patch new file mode 100644 index 000000000000..414a91ec09a0 --- /dev/null +++ b/net-analyzer/ipguard/files/ipguard-1.04-fno-common.patch @@ -0,0 +1,98 @@ +--- a/ipguard.c ++++ b/ipguard.c +@@ -29,6 +29,34 @@ + + #include "ipguard.h" + ++char iface[IFNAMSIZ]; ++char ethers_name[PATH_MAX]; ++char log_name[PATH_MAX]; ++char pid_name[PATH_MAX]; ++char fmac[18]; ++char pcapf[PCAPFSIZ]; ++char suser[MAXLOGNAME]; ++int ethers_update; ++int fake_regen; ++int fake_num; ++int fake_time; ++int buffer_num; ++int addr_nosubst; ++int nofirst; ++int grant; ++int read_only; ++int duplex; ++int fixbc; ++int hidden; ++int promisc; ++int debug; ++int verbose; ++ ++unsigned int all, good, grat, wgrat, zmac, zip, bad, bmac, bsip, btip, ++ bnew, bgrat, mymac, fake, pfake, nzh, nbe, mis; ++char pfmac[18]; ++char s[128+1]; ++ + void usage(char *name) { + fprintf(stdout, "%s v%s (c) %s <%s>\n\n", NAME, VERSION, AUTHOR, MAIL); + fprintf(stdout, "usage: %s [-h] [-ajgrxziovd]\n", name); +--- a/ipguard.h ++++ b/ipguard.h +@@ -68,33 +68,33 @@ + #define NOTICE 3 + #define INFO 4 + +-char iface[IFNAMSIZ]; +-char ethers_name[PATH_MAX]; +-char log_name[PATH_MAX]; +-char pid_name[PATH_MAX]; +-char fmac[18]; +-char pcapf[PCAPFSIZ]; +-char suser[MAXLOGNAME]; +-int ethers_update; +-int fake_regen; +-int fake_num; +-int fake_time; +-int buffer_num; +-int addr_nosubst; +-int nofirst; +-int grant; +-int read_only; +-int duplex; +-int fixbc; +-int hidden; +-int promisc; +-int debug; +-int verbose; ++extern char iface[IFNAMSIZ]; ++extern char ethers_name[PATH_MAX]; ++extern char log_name[PATH_MAX]; ++extern char pid_name[PATH_MAX]; ++extern char fmac[18]; ++extern char pcapf[PCAPFSIZ]; ++extern char suser[MAXLOGNAME]; ++extern int ethers_update; ++extern int fake_regen; ++extern int fake_num; ++extern int fake_time; ++extern int buffer_num; ++extern int addr_nosubst; ++extern int nofirst; ++extern int grant; ++extern int read_only; ++extern int duplex; ++extern int fixbc; ++extern int hidden; ++extern int promisc; ++extern int debug; ++extern int verbose; + +-unsigned int all, good, grat, wgrat, zmac, zip, bad, bmac, bsip, btip, ++extern unsigned int all, good, grat, wgrat, zmac, zip, bad, bmac, bsip, btip, + bnew, bgrat, mymac, fake, pfake, nzh, nbe, mis; +-char pfmac[18]; +-char s[128+1]; ++extern char pfmac[18]; ++extern char s[128+1]; + + /* ethers.c + */ diff --git a/net-analyzer/ipguard/files/ipguard-1.04-gentoo.patch b/net-analyzer/ipguard/files/ipguard-1.04-gentoo.patch new file mode 100644 index 000000000000..7d66038581b2 --- /dev/null +++ b/net-analyzer/ipguard/files/ipguard-1.04-gentoo.patch @@ -0,0 +1,50 @@ +--- a/Makefile ++++ b/Makefile +@@ -28,13 +28,13 @@ + STATIC= + CC=gcc + +-CFLAGS+=-g -Wall -DETHERS='"$(ETHERS)"' ++CFLAGS+=-Wall -DETHERS='"$(ETHERS)"' + + OBJS=ethers.o ipguard.o packet.o system.o + + .c.o: + @echo Compiling $*.c +- @$(CC) -c $(CFLAGS) $(INCLUDES) $(DEFINES) $< ++ $(CC) -c $(CFLAGS) $(INCLUDES) $(DEFINES) $< + + all: start $(NAME) + +@@ -47,7 +47,7 @@ + + $(NAME): $(OBJS) + @echo Linking $@ +- @$(CC) -o $@ $(OBJS) $(LIBS) $(STATIC) ++ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(OBJS) $(LIBS) $(STATIC) + + clean: + @echo Cleaning OBJS +@@ -58,16 +58,16 @@ + @rm -f $(NAME) + + install: all +- mkdir -p -m 755 $(PREFIX)/sbin +- install -s -m 755 $(NAME) $(PREFIX)/sbin/$(NAME) +- mkdir -p -m 755 $(PREFIX)/man/man8 +- install -m 644 doc/$(NAME).8 $(PREFIX)/man/man8/$(NAME).8 ++ mkdir -p -m 755 ${D}$(PREFIX)/sbin ++ install -m 755 $(NAME) ${D}$(PREFIX)/sbin/$(NAME) ++ mkdir -p -m 755 ${D}$(PREFIX)/share/man/man8 ++ install -m 644 doc/$(NAME).8 ${D}$(PREFIX)/share/man/man8/$(NAME).8 + + uninstall: deinstall + + deinstall: +- rm -f $(PREFIX)/man/man8/$(NAME).8 +- rm -f $(PREFIX)/sbin/$(NAME) ++ rm -f ${D}$(PREFIX)/share/man/man8/$(NAME).8 ++ rm -f ${D}$(PREFIX)/sbin/$(NAME) + + ethers.o: ipguard.h + ipguard.o: ipguard.h diff --git a/net-analyzer/ipguard/files/ipguard-1.04-init.d.patch b/net-analyzer/ipguard/files/ipguard-1.04-init.d.patch new file mode 100644 index 000000000000..447d818bf965 --- /dev/null +++ b/net-analyzer/ipguard/files/ipguard-1.04-init.d.patch @@ -0,0 +1,36 @@ +--- a/doc/ipguard.gentoo ++++ b/doc/ipguard.gentoo +@@ -1,7 +1,7 @@ + #! /sbin/runscript + ## $Id: ipguard.gentoo,v 1.5 2010/07/12 03:46:52 sead Exp $ + +-opts="reload" ++extra_commands="reload" + + depend() { + use net +@@ -9,20 +9,20 @@ + + start() { + ebegin "Starting ipguard" +- start-stop-daemon --start --quiet --pidfile /var/run/ipguard.pid \ +- --exec /usr/sbin/ipguard -- -u 300 -xz ++ start-stop-daemon --start --quiet --pidfile /run/ipguard.pid \ ++ --exec /usr/sbin/ipguard -- ${OPTS} ${IFACE} + eend $? + } + + stop() { + ebegin "Stopping ipguard" +- start-stop-daemon --stop --quiet --pidfile /var/run/ipguard.pid ++ start-stop-daemon --stop --quiet --pidfile /run/ipguard.pid + eend $? + } + + reload() { + ebegin "Reloading ipguard" +- start-stop-daemon --stop --quiet --pidfile /var/run/ipguard.pid \ ++ start-stop-daemon --stop --quiet --pidfile /run/ipguard.pid \ + --signal HUP + eend $? + } diff --git a/net-analyzer/ipguard/files/ipguard-1.04-runpath.patch b/net-analyzer/ipguard/files/ipguard-1.04-runpath.patch new file mode 100644 index 000000000000..930f2cc84fde --- /dev/null +++ b/net-analyzer/ipguard/files/ipguard-1.04-runpath.patch @@ -0,0 +1,11 @@ +--- a/ipguard.h ++++ b/ipguard.h +@@ -53,7 +53,7 @@ + + #define ETHERSFILE ETHERS + #define LOGNAME "/var/log/ipguard" +-#define PIDNAME "/var/run/ipguard" ++#define PIDNAME "/run/ipguard" + #define FAKEMAC "de:ad:xx:xx:xx:xx" + #define PCAPFSIZ 128 + diff --git a/net-analyzer/ipguard/files/ipguard.confd b/net-analyzer/ipguard/files/ipguard.confd new file mode 100644 index 000000000000..fc7fb66cd46c --- /dev/null +++ b/net-analyzer/ipguard/files/ipguard.confd @@ -0,0 +1,8 @@ +# ipguard configuration file + +# IFACE - the name of the network interface you want to monitor +# IFACE=eth0 +IFACE=eth0 + +# OPTS - command line options (see ipguard(8) +OPTS="-u 300 -xz -r" diff --git a/net-analyzer/ipguard/ipguard-1.04-r1.ebuild b/net-analyzer/ipguard/ipguard-1.04-r1.ebuild new file mode 100644 index 000000000000..73efd0b68720 --- /dev/null +++ b/net-analyzer/ipguard/ipguard-1.04-r1.ebuild @@ -0,0 +1,46 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +inherit toolchain-funcs + +DESCRIPTION="Tool designed to protect LAN IP adress space by ARP spoofing" +HOMEPAGE="http://ipguard.deep.perm.ru/" +SRC_URI="http://ipguard.deep.perm.ru/files/${P}.tar.gz" + +LICENSE="BSD-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" + +DEPEND=" + net-libs/libnet:1.1 + net-libs/libpcap +" +RDEPEND=" + ${DEPEND} +" +PATCHES=( + "${FILESDIR}"/${P}-gentoo.patch + "${FILESDIR}"/${P}-init.d.patch + "${FILESDIR}"/${P}-runpath.patch + "${FILESDIR}"/${P}-fno-common.patch +) + +src_compile() { + emake \ + CC=$(tc-getCC) \ + LIBNET_CONFIG="$(tc-getPKG_CONFIG) libnet" \ + PREFIX=\"${EPREFIX:-/usr}\" +} + +src_install() { + emake \ + DESTDIR="${D}" \ + LIBNET_CONFIG="$(tc-getPKG_CONFIG) libnet" \ + PREFIX=\"${EPREFIX:-/usr}\" \ + install + + newinitd doc/${PN}.gentoo ${PN} + newconfd "${FILESDIR}"/${PN}.confd ${PN} + dodoc doc/{NEWS,README*,ethers.sample} +} diff --git a/net-analyzer/ipguard/metadata.xml b/net-analyzer/ipguard/metadata.xml new file mode 100644 index 000000000000..bd13a914477c --- /dev/null +++ b/net-analyzer/ipguard/metadata.xml @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<maintainer type="project"> + <email>netmon@gentoo.org</email> + <name>Gentoo network monitoring and analysis project</name> +</maintainer> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/iplog/Manifest b/net-analyzer/iplog/Manifest new file mode 100644 index 000000000000..39a7d9ae2915 --- /dev/null +++ b/net-analyzer/iplog/Manifest @@ -0,0 +1 @@ +DIST iplog-2.2.3.tar.gz 133639 BLAKE2B f8108259f3f9b662297785988c40711d9d4ce6381377ed9a797f441c84fd1dcd9f0c3832e07ed9a660ddcc41bc52777136204274de873b72bce151327738ec2d SHA512 d7669e39b728af366b5199c58d396c6907496b4895ffb1ba0cba54fae0646f9792170f932de1eae9634b5ac356644a5d6d0ccaf7bc77a62641695992245c9aed diff --git a/net-analyzer/iplog/files/2.2.3-DLT_LINUX_SSL.patch b/net-analyzer/iplog/files/2.2.3-DLT_LINUX_SSL.patch new file mode 100644 index 000000000000..84a447af4f9f --- /dev/null +++ b/net-analyzer/iplog/files/2.2.3-DLT_LINUX_SSL.patch @@ -0,0 +1,134 @@ +--- a/src/iplog_options.c ++++ b/src/iplog_options.c +@@ -440,58 +440,58 @@ + + static void print_help(void) { + mysyslog( +-"Usage: " PACKAGE " [options] (\"*\" Denotes enabled by default) +---user or -u <user|UID> Run as specified the user or UID. +---group or -g <group|GID> Run with specified the group or GID. +---logfile or -l <file> Log to <file>. +---pid-file <file> Use <file> as the pid file. +---ignore or -d Ignore DNS traffic from nameservers listed in +- /etc/resolv.conf. +---interface or -i <if0,...,ifN> Listen on the specified interface(s). +---promisc or -a <network> Log traffic to all hosts on <network>. +---kill or -k Kill iplog, if it is running. +---restart or -R Restart iplog, if it is running. +---no-fork or -o Run in the foreground. +---stdout or -L Log to stdout. +---help or -h This help screen. +---version or -v Print version information and exit. +- +---facility <facility> Use the specified syslog facility. +---priority <priority> Use the specified syslog priority. +- +---tcp[=true|false|toggle] %cLog TCP traffic. +---udp[=true|false|toggle] %cLog UDP traffic. +---icmp[=true|false|toggle] %cLog ICMP traffic. +- +---log-ip[=true|false|toggle] or -w %cLog IP along with hostname. +---log-dest[=true|false|toggle] or -D %cLog the destination of traffic. +---dns-cache[=true|false|toggle] or -c %cUse the built-in DNS cache. +---get-ident[=true|false|toggle] or -e %cGet ident info on connections +- to listening ports. +- +---tcp-resolve[=true|false|toggle] or -T %cResolve IPs of TCP traffic. +---udp-resolve[=true|false|toggle] or -U %cResolve IPs of UDP traffic. +---icmp-resolve[=true|false|toggle] or -I %cResolve IPs of ICMP traffic. +---disable-resolver or -N %cDo not resolve any IPs. +- +---verbose[=true|false|toggle] or -V %cBe verbose. +---fool-nmap[=true|false|toggle] or -z %cFool nmap's OS detection. +---scans-only[=true|false|toggle] or -m %cOnly log scans. +---detect-syn-flood[=true|false|toggle] or -s %cStop resolving IPs if a +- SYN flood is detected. +- +---log-frag[=true|false|toggle] or -y %cLog fragment attacks. +---log-traceroute[=true|false|toggle] or -t %cLog traceroutes. +---log-ping-flood[=true|false|toggle] or -P %cLog ICMP ping floods. +---log-smurf[=true|false|toggle] or -S %cLog smurf attacks. +---log-bogus[=true|false|toggle] or -b %cLog bogus TCP flags. +---log-portscan[=true|false|toggle] or -p %cLog port scans. +---log-udp-scan[=true|false|toggle] or -F %cLog UDP scans/floods. +---log-fin-scan[=true|false|toggle] or -f %cLog FIN scans. +---log-syn-scan[=true|false|toggle] or -q %cLog SYN scans. +---log-xmas-scan[=true|false|toggle] or -x %cLog Xmas scans. +---log-null-scan[=true|false|toggle] or -n %cLog null scans.", +-IS_DEFAULT(LOG_TCP), IS_DEFAULT(LOG_UDP), IS_DEFAULT(LOG_ICMP), ++"Usage: %s [options] (\"*\" Denotes enabled by default)\n" ++"--user or -u <user|UID> Run as specified the user or UID.\n" ++"--group or -g <group|GID> Run with specified the group or GID.\n" ++"--logfile or -l <file> Log to <file>.\n" ++"--pid-file <file> Use <file> as the pid file.\n" ++"--ignore or -d Ignore DNS traffic from nameservers listed in\n" ++" /etc/resolv.conf.\n" ++"--interface or -i <if0,...,ifN> Listen on the specified interface(s).\n" ++"--promisc or -a <network> Log traffic to all hosts on <network>.\n" ++"--kill or -k Kill iplog, if it is running.\n" ++"--restart or -R Restart iplog, if it is running.\n" ++"--no-fork or -o Run in the foreground.\n" ++"--stdout or -L Log to stdout.\n" ++"--help or -h This help screen.\n" ++"--version or -v Print version information and exit.\n" ++"\n" ++"--facility <facility> Use the specified syslog facility.\n" ++"--priority <priority> Use the specified syslog priority.\n" ++"\n" ++"--tcp[=true|false|toggle] %cLog TCP traffic.\n" ++"--udp[=true|false|toggle] %cLog UDP traffic.\n" ++"--icmp[=true|false|toggle] %cLog ICMP traffic.\n" ++"\n" ++"--log-ip[=true|false|toggle] or -w %cLog IP along with hostname.\n" ++"--log-dest[=true|false|toggle] or -D %cLog the destination of traffic.\n" ++"--dns-cache[=true|false|toggle] or -c %cUse the built-in DNS cache.\n" ++"--get-ident[=true|false|toggle] or -e %cGet ident info on connections\n" ++" to listening ports.\n" ++"\n" ++"--tcp-resolve[=true|false|toggle] or -T %cResolve IPs of TCP traffic.\n" ++"--udp-resolve[=true|false|toggle] or -U %cResolve IPs of UDP traffic.\n" ++"--icmp-resolve[=true|false|toggle] or -I %cResolve IPs of ICMP traffic.\n" ++"--disable-resolver or -N %cDo not resolve any IPs.\n" ++"\n" ++"--verbose[=true|false|toggle] or -V %cBe verbose.\n" ++"--fool-nmap[=true|false|toggle] or -z %cFool nmap's OS detection.\n" ++"--scans-only[=true|false|toggle] or -m %cOnly log scans.\n" ++"--detect-syn-flood[=true|false|toggle] or -s %cStop resolving IPs if a\n" ++" SYN flood is detected.\n" ++"\n" ++"--log-frag[=true|false|toggle] or -y %cLog fragment attacks.\n" ++"--log-traceroute[=true|false|toggle] or -t %cLog traceroutes.\n" ++"--log-ping-flood[=true|false|toggle] or -P %cLog ICMP ping floods.\n" ++"--log-smurf[=true|false|toggle] or -S %cLog smurf attacks.\n" ++"--log-bogus[=true|false|toggle] or -b %cLog bogus TCP flags.\n" ++"--log-portscan[=true|false|toggle] or -p %cLog port scans.\n" ++"--log-udp-scan[=true|false|toggle] or -F %cLog UDP scans/floods.\n" ++"--log-fin-scan[=true|false|toggle] or -f %cLog FIN scans.\n" ++"--log-syn-scan[=true|false|toggle] or -q %cLog SYN scans.\n" ++"--log-xmas-scan[=true|false|toggle] or -x %cLog Xmas scans.\n" ++"--log-null-scan[=true|false|toggle] or -n %cLog null scans.", ++PACKAGE, IS_DEFAULT(LOG_TCP), IS_DEFAULT(LOG_UDP), IS_DEFAULT(LOG_ICMP), + IS_DEFAULT(LOG_IP), IS_DEFAULT(LOG_DEST), IS_DEFAULT(DNS_CACHE), + IS_DEFAULT(GET_IDENT), IS_DEFAULT(TCP_RES), IS_DEFAULT(UDP_RES), + IS_DEFAULT(ICMP_RES), IS_DEFAULT(NO_RESOLV), IS_DEFAULT(VERBOSE), +--- a/src/iplog_pcap.c ++++ b/src/iplog_pcap.c +@@ -189,8 +189,16 @@ + case DLT_PPP_BSDOS: + dlt = 24; + break; +- case DLT_SLIP: +- dlt = 16; ++#ifdef DLT_FDDI ++ case DLT_FDDI: ++ dlt = 21; ++ break; ++#endif ++ case DLT_SLIP: ++#ifdef DLT_LINUX_SLL ++ case DLT_LINUX_SLL: ++#endif ++ dlt = 16; + break; + case DLT_PPP: + case DLT_NULL: diff --git a/net-analyzer/iplog/files/iplog.rc6 b/net-analyzer/iplog/files/iplog.rc6 new file mode 100644 index 000000000000..031f0ce3af7c --- /dev/null +++ b/net-analyzer/iplog/files/iplog.rc6 @@ -0,0 +1,36 @@ +#!/sbin/openrc-run +# Copyright 1999-2004 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +depend() { + need net +} + +pidfile=/var/run/iplog.pid + +start() { + ebegin "Starting iplog" + checkconfig + rc=$? + if [ $rc -eq 0 ]; then + start-stop-daemon --start --quiet --startas /usr/sbin/iplog \ + --pidfile=${pidfile} --name=iplog + rc=$? + eend $rc "Failed to start iplog $rc" + else + eend $rc "/etc/iplog.conf does not exist!" + fi +} + +stop() { + ebegin "Stopping iplog" + start-stop-daemon --stop --retry=5 --quiet --pidfile=${pidfile} --name=iplog + # due to a bug in the program, it doesn't properly remove it's pidfile sometimes + rm -f ${pidfile} + eend $? "Failed to stop iplog!" +} + +checkconfig() { + [ -f /etc/iplog.conf ] || return 1 + return 0 +} diff --git a/net-analyzer/iplog/iplog-2.2.3-r2.ebuild b/net-analyzer/iplog/iplog-2.2.3-r2.ebuild new file mode 100644 index 000000000000..a21f01029226 --- /dev/null +++ b/net-analyzer/iplog/iplog-2.2.3-r2.ebuild @@ -0,0 +1,35 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 +inherit eutils + +DESCRIPTION="iplog is a TCP/IP traffic logger" +HOMEPAGE="http://ojnk.sourceforge.net/" +SRC_URI="mirror://sourceforge/ojnk/${P}.tar.gz" + +LICENSE="|| ( GPL-2 FDL-1.1 )" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~mips ppc sparc x86" + +DEPEND="net-libs/libpcap" +RDEPEND="${DEPEND}" + +src_prepare() { + epatch "${FILESDIR}"/${PV}-DLT_LINUX_SSL.patch +} + +src_compile() { + emake CFLAGS="${CFLAGS} -D_REENTRANT" all +} + +src_install() { + emake \ + prefix="${D}"/usr \ + mandir="${D}"/usr/share/man \ + install + + dodoc AUTHORS NEWS README TODO example-iplog.conf + + newinitd "${FILESDIR}"/iplog.rc6 iplog +} diff --git a/net-analyzer/iplog/metadata.xml b/net-analyzer/iplog/metadata.xml new file mode 100644 index 000000000000..6b7c0cab801b --- /dev/null +++ b/net-analyzer/iplog/metadata.xml @@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>netmon@gentoo.org</email> + <name>Gentoo network monitoring and analysis project</name> + </maintainer> + <longdescription>iplog is a TCP/IP traffic logger</longdescription> + <upstream> + <remote-id type="sourceforge">ojnk</remote-id> + </upstream> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/ippl/Manifest b/net-analyzer/ippl/Manifest new file mode 100644 index 000000000000..31f32a3c1b9d --- /dev/null +++ b/net-analyzer/ippl/Manifest @@ -0,0 +1 @@ +DIST ippl-1.4.14.tar.gz 54030 BLAKE2B 384747ea50e55e52695606538850958320afe53dbe3c71e42c90302dff0b535d2167d18a40f0b2953f941cda1aa238490bfe7b7fde8f675071668ea5f561af74 SHA512 3d71afc3ec7a0420cc9b269bf67dc008a777464c68d233dfbad4ee7a2dd2b960e114500e42866977e31b9dbeee26bbefea937fef8a09aa41cf87f96361ba0088 diff --git a/net-analyzer/ippl/files/ippl-1.4.14-fix-build-system.patch b/net-analyzer/ippl/files/ippl-1.4.14-fix-build-system.patch new file mode 100644 index 000000000000..c6c65cb14d50 --- /dev/null +++ b/net-analyzer/ippl/files/ippl-1.4.14-fix-build-system.patch @@ -0,0 +1,44 @@ +--- a/Makefile.in ++++ b/Makefile.in +@@ -11,10 +11,10 @@ + all: binary docs + + binary: Makefile Source/Makefile +- @cd Source && make && cd .. ++ @cd Source && $(MAKE) && cd .. + + docs: +- @cd Docs && make && cd .. ++ @cd Docs && $(MAKE) && cd .. + + install: all + $(INSTALL) -d -m 755 $(SBINDIR) +@@ -29,7 +29,7 @@ + $(INSTALL) -m 644 Docs/ippl.conf.5 $(MANDIR)/man5/ippl.conf.5 + + clean: +- @cd Source && make clean && cd .. && cd Docs && make clean && cd .. ++ @cd Source && $(MAKE) clean && cd .. && cd Docs && $(MAKE) clean && cd .. + + distclean: clean + $(RM) *~ Makefile.common Makefile Source/Makefile Docs/Makefile build-stamp install-stamp +--- a/Source/Makefile.in ++++ b/Source/Makefile.in +@@ -10,7 +10,7 @@ + CC=@CC@ + CFLAGS=@CFLAGS@ + WARNINGS=-Wall@PEDANTIC@ +-LDFLAGS= ++LDFLAGS=@LDFLAGS@ + + SRCS= main.c \ + configuration.c \ +@@ -49,7 +49,7 @@ + y.tab.c: ippl.y Makefile ../Makefile.common + $(YACC) -d $< + +-lex.yy.c: ippl.l Makefile ../Makefile.common ++lex.yy.c: ippl.l y.tab.c Makefile ../Makefile.common + $(LEX) $< + + clean: diff --git a/net-analyzer/ippl/files/ippl-1.4.14-format-warnings.patch b/net-analyzer/ippl/files/ippl-1.4.14-format-warnings.patch new file mode 100644 index 000000000000..db6cfcd7e1d0 --- /dev/null +++ b/net-analyzer/ippl/files/ippl-1.4.14-format-warnings.patch @@ -0,0 +1,20 @@ +--- a/Source/log.c ++++ b/Source/log.c +@@ -147,7 +147,7 @@ + } + + if (repeats > 0) { +- snprintf(date, 27, asctime(localtime(&last_repeat))); ++ snprintf(date, 27, "%s", asctime(localtime(&last_repeat))); + snprintf(repeat_message, 40, "last message repeated %d time(s)\n", repeats); + write(fd, date+4, strlen(date)-10); + write(fd, " ", 1); +@@ -155,7 +155,7 @@ + repeats = 0; + } + +- snprintf(date, 27, asctime(localtime(¤t))); ++ snprintf(date, 27, "%s", asctime(localtime(¤t))); + write(fd, date+4, strlen(date)-10); + write(fd, " ", 1); + write(fd, entry, (strlen(entry) < 1023) ? strlen(entry) : 1023 ); diff --git a/net-analyzer/ippl/files/ippl-1.4.14-includes.patch b/net-analyzer/ippl/files/ippl-1.4.14-includes.patch new file mode 100644 index 000000000000..12b2832fa342 --- /dev/null +++ b/net-analyzer/ippl/files/ippl-1.4.14-includes.patch @@ -0,0 +1,20 @@ +--- a/Source/filter.c ++++ b/Source/filter.c +@@ -22,6 +22,7 @@ + + #include <stdlib.h> + #include <ctype.h> ++#include <string.h> /* memcpy() */ + + #include <fnmatch.h> + +--- a/Source/main.c ++++ b/Source/main.c +@@ -37,6 +37,7 @@ + #include <pwd.h> + #include <stdlib.h> + #include <getopt.h> ++#include <grp.h> /* initgroups() */ + + #include "defines.h" + #include "configuration.h" diff --git a/net-analyzer/ippl/files/ippl-1.4.14-manpage.patch b/net-analyzer/ippl/files/ippl-1.4.14-manpage.patch new file mode 100644 index 000000000000..d17e5939cdee --- /dev/null +++ b/net-analyzer/ippl/files/ippl-1.4.14-manpage.patch @@ -0,0 +1,15 @@ +patch by Marc Haber <mh+debian-packages@zugschlus.de> + +--- a/Docs/ippl.conf.man ++++ b/Docs/ippl.conf.man +@@ -222,9 +222,7 @@ + .SS Protocol + .PP + protocol is one of the supported protocols (see the protocols +-section), except the +-.I all +-keyword, which is not supported. ++section). + + .SS Description + .PP diff --git a/net-analyzer/ippl/files/ippl-1.4.14-noportresolve.patch b/net-analyzer/ippl/files/ippl-1.4.14-noportresolve.patch new file mode 100644 index 000000000000..919623040f7f --- /dev/null +++ b/net-analyzer/ippl/files/ippl-1.4.14-noportresolve.patch @@ -0,0 +1,347 @@ +patch by Marc Haber <mh+debian-packages@zugschlus.de> + +--- a/Docs/ippl.conf.man ++++ b/Docs/ippl.conf.man +@@ -92,6 +92,13 @@ + .PP + By default, IP address resolution is disabled for all the protocols. + ++Ippl by default resolves tcp/udp port numbers to their respective ++service names. If you pass a protocol to the noportresolve option, ++ippl logs the port number instead. This is a Debian specific extension. ++ ++By default service resolving is enabled, since this is the behaviour ++of the upstream program. ++ + .SH LOGGING FORMAT + + .BR ippl +@@ -198,6 +205,12 @@ + .I noresolve + disable IP address resolution. + .PP ++.I portresolve ++enable IP service resolution. ++.PP ++.I noportresolve ++disable IP service resolution. ++.PP + .I ident + use ident logging (only for TCP). + .PP + +--- a/Source/configuration.c ++++ b/Source/configuration.c +@@ -60,6 +60,7 @@ + extern unsigned int dns_expire; + extern unsigned short log_protocols; + extern unsigned short resolve_protocols; ++ extern unsigned short portresolve_protocols; + extern unsigned short icmp_format; + extern unsigned short tcp_format; + extern unsigned short udp_format; +@@ -71,6 +72,7 @@ + dns_expire = DNS_EXPIRE; + log_protocols = NONE; + resolve_protocols = 0; /* Do not resolve by default */ ++ portresolve_protocols = RUN_TCP | RUN_UDP | RUN_ICMP; /* Resolve by default */ + icmp_format = LOGFORMAT_NORMAL; + tcp_format = LOGFORMAT_NORMAL; + udp_format = LOGFORMAT_NORMAL; + +--- a/Source/filter.c ++++ b/Source/filter.c +@@ -46,6 +46,7 @@ + + extern unsigned short use_ident; + extern unsigned short resolve_protocols; ++extern unsigned short portresolve_protocols; + extern unsigned short icmp_format; + extern unsigned short tcp_format; + extern unsigned short udp_format; +@@ -66,7 +67,7 @@ + #ifdef FILTER_DEBUG + void display_info(struct log_info *info, int entries) { + +- log.log(log.level_or_fd, "DBG: (e:%d) log:%d ident:%d resolve:%d closing:%d format:%d", entries, info->log, info->ident, info->resolve, info->logclosing, info->logformat); ++ log.log(log.level_or_fd, "DBG: (e:%d) log:%d ident:%d resolve:%d portresolve: %d, closing:%d format:%d", entries, info->log, info->ident, info->resolve, info->portresolve, info->logclosing, info->logformat); + } + #endif + +@@ -200,6 +201,19 @@ + break; + } + } ++ if (info->portresolve == -1) { ++ switch (protocol) { ++ case IPPROTO_ICMP: ++ info->portresolve = portresolve_protocols & RUN_ICMP; ++ break; ++ case IPPROTO_TCP: ++ info->portresolve = portresolve_protocols & RUN_TCP; ++ break; ++ case IPPROTO_UDP: ++ info->portresolve = portresolve_protocols & RUN_UDP; ++ break; ++ } ++ } + } + + struct log_info do_log(const __u32 from, const __u32 to, const __u16 type, const __u16 srctype, const short protocol) { +@@ -244,6 +258,7 @@ + info.log = p->log; + info.ident = p->ident; + info.resolve = p->resolve; ++ info.portresolve = p->portresolve; + info.logformat = p->logformat; + info.logclosing = p->logclosing; + set_defaults(protocol, &info); +@@ -265,6 +280,7 @@ + info.log = p->log; + info.ident = p->ident; + info.resolve = p->resolve; ++ info.portresolve = p->portresolve; + info.logformat = p->logformat; + set_defaults(protocol, &info); + #ifdef FILTER_DEBUG +@@ -280,7 +296,7 @@ + info.log = TRUE; + info.ident = use_ident; + info.logclosing = log_closing; +- info.logformat = info.resolve = -1; ++ info.logformat = info.resolve = info.portresolve = -1; + set_defaults(protocol, &info); + + #ifdef FILTER_DEBUG + +--- a/Source/filter.h ++++ b/Source/filter.h +@@ -53,6 +53,7 @@ + struct filter_entry { + short log; /* TRUE for "log", FALSE for "ignore" */ + short ident; /* TRUE if we should use ident */ ++ short portresolve; /* TRUE if we should resolve TCP/UDP services */ + short resolve; /* TRUE if we should resolve IP addresses */ + short logformat; /* format used to log */ + short logclosing; /* TRUE to log closing TCP connections */ +@@ -72,6 +73,7 @@ + short log; + short ident; + short resolve; ++ short portresolve; + short logclosing; + short logformat; + }; + +--- a/Source/ippl.l ++++ b/Source/ippl.l +@@ -75,6 +75,9 @@ + [lL][oO][gG][cC][lL][oO][sS][iI][nN][gG] return LOGCLOSING; + [nN][oO][lL][oO][gG][cC][lL][oO][sS][iI][nN][gG] return NOLOGCLOSING; + ++[nN][oO][pP][oO][rR][tT][rR][eE][sS][oO][lL][vV][eE] return NOPORTRESOLVE; ++[pP][oO][rR][tT][rR][eE][sS][oO][lL][vV][eE] return PORTRESOLVE; ++ + [nN][oO][rR][eE][sS][oO][lL][vV][eE] return NORESOLVE; + [rR][eE][sS][oO][lL][vV][eE] return RESOLVE; + + +--- a/Source/ippl.y ++++ b/Source/ippl.y +@@ -61,6 +61,7 @@ + + /* Should name resolving be done? */ + unsigned short resolve_protocols; ++unsigned short portresolve_protocols; + + /* Logging format for each protocol */ + unsigned short icmp_format; +@@ -100,7 +101,7 @@ + %token<stringval> IP HOSTMASK IDENTIFIER FILENAME + %token<longval> NUMBER + +-%token LOGFORMAT DETAILED SHORT NORMAL RESOLVE NORESOLVE IDENT NOIDENT LOGCLOSING NOLOGCLOSING ++%token LOGFORMAT DETAILED SHORT NORMAL RESOLVE NORESOLVE IDENT NOIDENT LOGCLOSING NOLOGCLOSING PORTRESOLVE NOPORTRESOLVE + %token RUN RUNAS EXPIRE LOG_IN LOG IGNORE FROM TO TYPE PORT SRCPORT OPTION COMMA + %token ICMP TCP UDP ALL + +@@ -138,6 +139,11 @@ + | NORESOLVE ProtoList EOL + { resolve_protocols &= ~$2; } + ++ | PORTRESOLVE ProtoList EOL ++ { portresolve_protocols |= $2; } ++ | NOPORTRESOLVE ProtoList EOL ++ { portresolve_protocols &= ~$2; } ++ + | LOGCLOSING EOL + { log_closing = TRUE; } + | NOLOGCLOSING EOL +@@ -249,6 +255,7 @@ + switches.log = -1; + switches.ident = use_ident; + switches.resolve = -1; ++ switches.portresolve = -1; + switches.logformat = -1; + switches.logclosing = log_closing; + } +@@ -259,6 +266,7 @@ + $$->ident = switches.ident; + $$->logclosing = switches.logclosing; + $$->resolve = switches.resolve; ++ $$->portresolve = switches.portresolve; + $$->logformat = switches.logformat; + $$->protocol = $4.protocol; + $$->loginfo = $4.loginfoval; +@@ -287,6 +295,8 @@ + | NOIDENT { switches.ident = FALSE; } + | RESOLVE { switches.resolve = RUN_ICMP | RUN_TCP | RUN_UDP; } + | NORESOLVE { switches.resolve = 0; } ++ | PORTRESOLVE { switches.portresolve = RUN_ICMP | RUN_TCP | RUN_UDP; } ++ | NOPORTRESOLVE { switches.portresolve = 0; } + | SHORT { switches.logformat = LOGFORMAT_SHORT; } + | NORMAL { switches.logformat = LOGFORMAT_NORMAL; } + | DETAILED { switches.logformat = LOGFORMAT_DETAILED; } + +--- a/Source/main.c ++++ b/Source/main.c +@@ -48,6 +48,10 @@ + #include "filter.h" + #include "pidfile.h" + ++#ifndef PATH_MAX ++#define PATH_MAX 4096 ++#endif ++ + /* Logging mechanism */ + struct loginfo log; + + +--- a/Source/netutils.c ++++ b/Source/netutils.c +@@ -237,15 +237,21 @@ + * Get a service name for a specified protocol + */ + +-void service_lookup(char *proto, char *service, __u16 port) { ++void service_lookup(char *proto, char *service, __u16 port, int portresolve) { + struct servent *se; + + pthread_mutex_lock(&service_mutex); +- se = getservbyport(port, proto); +- if (se == NULL) ++ if (portresolve) ++ { ++ se = getservbyport(port, proto); ++ if (se == NULL) ++ snprintf(service, SERVICE_LENGTH, "port %d", ntohs(port)); ++ else { ++ snprintf(service, SERVICE_LENGTH, "%s", se->s_name); ++ } ++ } ++ else { + snprintf(service, SERVICE_LENGTH, "port %d", ntohs(port)); +- else { +- snprintf(service, SERVICE_LENGTH, "%s", se->s_name); + } + pthread_mutex_unlock(&service_mutex); + } + +--- a/Source/netutils.h ++++ b/Source/netutils.h +@@ -53,6 +53,6 @@ + const __u32 src_addr, const __u16 src_port, + const __u32 dst_addr, const __u16 dst_port); + +-void service_lookup(char *proto, char *service, __u16 port); ++void service_lookup(char *proto, char *service, __u16 port, int portresolve); + + #endif + +--- a/Source/tcp.c ++++ b/Source/tcp.c +@@ -51,6 +51,7 @@ + struct loginfo tcp_log; + extern struct loginfo log; + extern unsigned short resolve_protocols; ++extern unsigned short portresolve_protocols; + + /* + * Structure of a TCP packet +@@ -88,7 +89,7 @@ + *details ='\0'; + host_print(remote_host, IPHDR.saddr, + info.resolve); +- service_lookup("tcp", service, TCPHDR.dest); ++ service_lookup("tcp", service, TCPHDR.dest, info.portresolve); + if (info.logformat == LOGFORMAT_DETAILED) { + get_details(details, + IPHDR.saddr, +@@ -186,7 +187,7 @@ + *details ='\0'; + host_print(remote_host, IPHDR.saddr, + info.resolve); +- service_lookup("tcp", service, TCPHDR.dest); ++ service_lookup("tcp", service, TCPHDR.dest, info.portresolve); + if (info.logformat == LOGFORMAT_DETAILED) { + get_details(details, + IPHDR.saddr, + +--- a/Source/udp.c ++++ b/Source/udp.c +@@ -81,7 +81,7 @@ + *details ='\0'; + host_print(remote_host, IPHDR.saddr, + info.resolve); +- service_lookup("udp", service, UDPHDR.dest); ++ service_lookup("udp", service, UDPHDR.dest, info.portresolve); + if (info.logformat == LOGFORMAT_DETAILED) { + get_details(details, + IPHDR.saddr, + +--- a/ippl.conf ++++ b/ippl.conf +@@ -4,13 +4,15 @@ + # User used + # --------- + # Specify the user (declared in /etc/passwd) used to run the +-# logging threads. +-#runas nobody ++# logging threads. The ippl process visible in the process table ++# is still running as root! Look in /proc/pid/task to see the threads ++# running as ippl ++runas ippl + + # Resolve hostnames? + # ------------------ +-# Uncomment the line below to disable DNS lookups +-#noresolve all ++# Uncomment the line below to enable DNS lookups ++#resolve all + + # Use ident? + # ---------- +@@ -38,9 +40,14 @@ + # ---------------- + run icmp tcp + # Uncomment the line below to log UDP traffic. +-# See ippl.conf(5) for recommandations. ++# See ippl.conf(5) for recommendations. + #run udp + ++# Resolve tcp/udp port to service name? ++# ------------------------------------- ++# portresolve icmp tcp udp ++# Set noportresolve <protocol-list> to log port numbers instead ++ + # Logging format + # ---------------- + # If you want to see the destination address, the ports, etc +@@ -63,6 +70,3 @@ + # Do not log DNS queries + #ignore udp port domain + #ignore udp srcport domain +- +-# End of configuration +-# Copyright (C) 1998-1999 Hugo Haas - Etienne Bernard + diff --git a/net-analyzer/ippl/files/ippl-1.4.14-privilege-drop.patch b/net-analyzer/ippl/files/ippl-1.4.14-privilege-drop.patch new file mode 100644 index 000000000000..0f6d03684a93 --- /dev/null +++ b/net-analyzer/ippl/files/ippl-1.4.14-privilege-drop.patch @@ -0,0 +1,140 @@ +privilege-drop by Marc Haber <mh+debian-packages@zugschlus.de> + +--- a/Source/icmp.c ++++ b/Source/icmp.c +@@ -39,6 +39,8 @@ + #include "log.h" + #include "filter.h" + #include "configuration.h" ++#include <string.h> ++#include <errno.h> + + /* Socket */ + int icmp_socket; +@@ -296,14 +298,16 @@ + + icmp_socket = socket(AF_INET, SOCK_RAW, IPPROTO_ICMP); + if (icmp_socket <= 0) { +- log.log(log.level_or_fd, "FATAL: Unable to open icmp raw socket"); ++ int error = errno; ++ log.log(log.level_or_fd, "FATAL: Unable to open icmp raw socket\nERROR No: %d\nERROR : %s", error, strerror(error)); + exit(1); + } + +- setgid(((struct passwd *)nobody)->pw_gid); ++ /* Don't do this here - race conditions will arise */ ++ /* setgid(((struct passwd *)nobody)->pw_gid); + initgroups(((struct passwd *)nobody)->pw_name, + ((struct passwd *)nobody)->pw_gid); +- setuid(((struct passwd *)nobody)->pw_uid); ++ setuid(((struct passwd *)nobody)->pw_uid); */ + + for(;;) { + if (read(icmp_socket, (__u8 *) &pkt, ICMP_CAPTURE_LENGTH) == -1) { +--- a/Source/main.c ++++ b/Source/main.c +@@ -153,6 +153,17 @@ + run_thread(&udp_t, log_udp, (void *)account); + } + ++ /* Sleep 1 sec to allow the other threads to catchup */ ++ /* Not the best way to solve the issue but it works */ ++ sleep(1); ++ ++ /* Drop privileges */ ++ ++ setgid(((struct passwd *)account)->pw_gid); ++ initgroups(((struct passwd *)account)->pw_name, ++ ((struct passwd *)account)->pw_gid); ++ setuid(((struct passwd *)account)->pw_uid); ++ + } + + +@@ -160,8 +171,10 @@ + * reload_configuration + * + * Stops the threads and reloads the configuration ++ * ++ * -- DEPRECATED (due to privilege drop cannot reload - needs a restart!) + */ +-void reload_configuration() { ++void reload_configuration_DEPRECATED() { + extern pthread_mutex_t log_mutex, service_mutex, dns_mutex, r_mux, w_mux; + extern pthread_cond_t w_cond; + extern int readers; +@@ -353,8 +366,10 @@ + * Function executed when we receive a SIHUP signal + */ + void sighup(int sig) { +- reload_configuration(); +- log.log(log.level_or_fd, "IP Protocols Logger: reloaded configuration."); ++ // DEPRECATED - reload_configuration(); ++ // log.log(log.level_or_fd, "IP Protocols Logger: reloaded configuration."); ++ log.log(log.level_or_fd, "IP Protocols Logger: reload configuration is unsupported."); ++ die(sig); + signal(SIGHUP, sighup); + } + +--- a/Source/tcp.c ++++ b/Source/tcp.c +@@ -44,6 +44,8 @@ + #include "filter.h" + #include "configuration.h" + #include "ident.h" ++#include <errno.h> ++#include <string.h> + + /* Socket */ + int tcp_socket; +@@ -258,14 +260,16 @@ + + tcp_socket = socket(AF_INET, SOCK_RAW, IPPROTO_TCP); + if (tcp_socket <= 0) { +- log.log(log.level_or_fd, "FATAL: Unable to open tcp raw socket"); ++ int error = errno; ++ log.log(log.level_or_fd, "FATAL: Unable to open tcp raw socket\nERROR No: %d\nERROR : %s", error, strerror(error)); + exit(1); + } + +- setgid(((struct passwd *)nobody)->pw_gid); ++ /* Don't do this here - race conditions will arise */ ++ /* setgid(((struct passwd *)nobody)->pw_gid); + initgroups(((struct passwd *)nobody)->pw_name, + ((struct passwd *)nobody)->pw_gid); +- setuid(((struct passwd *)nobody)->pw_uid); ++ setuid(((struct passwd *)nobody)->pw_uid); */ + + for(;;) { + if (read(tcp_socket, (__u8 *) &pkt, TCP_CAPTURE_LENGTH) == -1) { +--- a/Source/udp.c ++++ b/Source/udp.c +@@ -39,6 +39,8 @@ + #include "filter.h" + #include "configuration.h" + #include "ident.h" ++#include <errno.h> ++#include <string.h> + + /* Socket */ + int udp_socket; +@@ -138,14 +140,16 @@ + + udp_socket = socket(AF_INET, SOCK_RAW, IPPROTO_UDP); + if (udp_socket <= 0) { +- log.log(log.level_or_fd, "FATAL: Unable to open udp raw socket"); ++ int error = errno; ++ log.log(log.level_or_fd, "FATAL: Unable to open udp raw socket\nERROR No: %d\nERROR : %s", error, strerror(error)); + exit(1); + } + +- setgid(((struct passwd *)nobody)->pw_gid); ++ /* Don't do this here - race conditions will arise */ ++ /* setgid(((struct passwd *)nobody)->pw_gid); + initgroups(((struct passwd *)nobody)->pw_name, + ((struct passwd *)nobody)->pw_gid); +- setuid(((struct passwd *)nobody)->pw_uid); ++ setuid(((struct passwd *)nobody)->pw_uid); */ + + for(;;) { + if (read(udp_socket, (__u8 *) &pkt, UDP_CAPTURE_LENGTH) == -1) { diff --git a/net-analyzer/ippl/files/ippl.rc b/net-analyzer/ippl/files/ippl.rc new file mode 100644 index 000000000000..e16ccfc6c4e3 --- /dev/null +++ b/net-analyzer/ippl/files/ippl.rc @@ -0,0 +1,30 @@ +#!/sbin/openrc-run +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +depend() { + need net +} + +checkconfig() { + if [ ! -f /etc/ippl.conf ] + then + eerror "Please create /etc/ippl.conf" + return 1 + fi + return 0 +} + +start() { + checkconfig || return $? + ebegin "Starting ippl" + start-stop-daemon --start --quiet --pidfile /run/ippl.pid \ + --exec /usr/sbin/ippl + eend $? "Failed to start ippl" +} + +stop() { + ebegin "Stopping ippl" + start-stop-daemon --stop --quiet --pidfile /run/ippl.pid + eend $? "Failed to stop ippl" +} diff --git a/net-analyzer/ippl/ippl-1.4.14-r6.ebuild b/net-analyzer/ippl/ippl-1.4.14-r6.ebuild new file mode 100644 index 000000000000..1cddf3d999fa --- /dev/null +++ b/net-analyzer/ippl/ippl-1.4.14-r6.ebuild @@ -0,0 +1,46 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit toolchain-funcs + +DESCRIPTION="A daemon which logs TCP/UDP/ICMP packets" +HOMEPAGE="http://pltplp.net/ippl/" +SRC_URI="http://pltplp.net/ippl/archive/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="amd64 ~ppc x86" + +BDEPEND=" + virtual/yacc + sys-devel/flex" +RDEPEND="acct-user/ippl" + +PATCHES=( + "${FILESDIR}"/${PN}-1.4.14-noportresolve.patch + "${FILESDIR}"/${PN}-1.4.14-manpage.patch + "${FILESDIR}"/${PN}-1.4.14-privilege-drop.patch + "${FILESDIR}"/${PN}-1.4.14-includes.patch + "${FILESDIR}"/${PN}-1.4.14-format-warnings.patch + # bug #351287 + "${FILESDIR}"/${PN}-1.4.14-fix-build-system.patch +) + +src_configure() { + tc-export CC + default +} + +src_install() { + dosbin Source/ippl + + insinto /etc + doins ippl.conf + + doman Docs/{ippl.8,ippl.conf.5} + dodoc BUGS CREDITS HISTORY README TODO + + newinitd "${FILESDIR}"/ippl.rc ippl +} diff --git a/net-analyzer/ippl/metadata.xml b/net-analyzer/ippl/metadata.xml new file mode 100644 index 000000000000..bd13a914477c --- /dev/null +++ b/net-analyzer/ippl/metadata.xml @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<maintainer type="project"> + <email>netmon@gentoo.org</email> + <name>Gentoo network monitoring and analysis project</name> +</maintainer> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/ipsumdump/Manifest b/net-analyzer/ipsumdump/Manifest new file mode 100644 index 000000000000..5b57fb55a84e --- /dev/null +++ b/net-analyzer/ipsumdump/Manifest @@ -0,0 +1,2 @@ +DIST ipsumdump-1.85.tar.gz 919540 BLAKE2B 870e003f4d9149904e6a411ae89b6df3e6f90e378b300dea823701e5f168d7f7b2c788702c3ca9c5840dbbe4372e30435e6fab79fd975328ddc474bc3e797559 SHA512 b42844cf028b9c1ea9da90306be8d731bffcec1a8f5c9eeb8029f563ddd5781651c583913a2105d8ad99cabac4b003345e1e8fdfb83367cabf806de1bca31596 +DIST ipsumdump-1.86.tar.gz 895567 BLAKE2B 5d33e2c6a5df836592028fb1026749561188b3e0cc15fe691404ad17bc1dd724f4fd9e1be46bbe76b200288575251178f874df4f8697b0e943de4185b71f9e69 SHA512 38bf55589ab81eb7601283410a9f962508e419c1a0ef24f088a2d1328b29e360a9788a20689ea45724fbc56194ecb5ede1f3b792e5bc7e97a500a7b2e434fe65 diff --git a/net-analyzer/ipsumdump/files/ipsumdump-1.86-SIOCGSTAMP.patch b/net-analyzer/ipsumdump/files/ipsumdump-1.86-SIOCGSTAMP.patch new file mode 100644 index 000000000000..c2f0a74fff11 --- /dev/null +++ b/net-analyzer/ipsumdump/files/ipsumdump-1.86-SIOCGSTAMP.patch @@ -0,0 +1,10 @@ +--- a/src/fromdevice.cc ++++ b/src/fromdevice.cc +@@ -47,6 +47,7 @@ + + #if FROMDEVICE_ALLOW_LINUX + # include <sys/socket.h> ++# include <linux/sockios.h> + # include <net/if.h> + # include <features.h> + # include <linux/if_packet.h> diff --git a/net-analyzer/ipsumdump/ipsumdump-1.85.ebuild b/net-analyzer/ipsumdump/ipsumdump-1.85.ebuild new file mode 100644 index 000000000000..371b03c67b61 --- /dev/null +++ b/net-analyzer/ipsumdump/ipsumdump-1.85.ebuild @@ -0,0 +1,24 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +DESCRIPTION="Simple TCP/IP Dump summarizer/analyzer" +HOMEPAGE="http://read.seas.harvard.edu/~kohler/ipsumdump/" +SRC_URI="http://read.seas.harvard.edu/~kohler/ipsumdump/${P}.tar.gz" + +LICENSE="the-Click-license" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="+ipv6 +nanotimestamp" + +RDEPEND="net-libs/libpcap" +DEPEND="${RDEPEND} + dev-lang/perl + dev-libs/expat + sys-apps/texinfo" + +src_configure() { + econf $(use_enable ipv6 ip6) \ + $(use_enable nanotimestamp) +} diff --git a/net-analyzer/ipsumdump/ipsumdump-1.86-r1.ebuild b/net-analyzer/ipsumdump/ipsumdump-1.86-r1.ebuild new file mode 100644 index 000000000000..8b367ee4b4b7 --- /dev/null +++ b/net-analyzer/ipsumdump/ipsumdump-1.86-r1.ebuild @@ -0,0 +1,37 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +DESCRIPTION="Simple TCP/IP Dump summarizer/analyzer" +HOMEPAGE="http://read.seas.harvard.edu/~kohler/ipsumdump/" +SRC_URI="http://read.seas.harvard.edu/~kohler/ipsumdump/${P}.tar.gz" + +LICENSE="the-Click-license" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="+ipv6 +nanotimestamp" + +RDEPEND=" + net-libs/libpcap +" +DEPEND=" + ${RDEPEND} + dev-lang/perl + dev-libs/expat + sys-apps/texinfo + virtual/os-headers +" +DOCS=( + NEWS.md + README.md +) +PATCHES=( + "${FILESDIR}"/${PN}-1.86-SIOCGSTAMP.patch +) + +src_configure() { + econf \ + $(use_enable ipv6 ip6) \ + $(use_enable nanotimestamp) +} diff --git a/net-analyzer/ipsumdump/ipsumdump-1.86.ebuild b/net-analyzer/ipsumdump/ipsumdump-1.86.ebuild new file mode 100644 index 000000000000..51f75d48e429 --- /dev/null +++ b/net-analyzer/ipsumdump/ipsumdump-1.86.ebuild @@ -0,0 +1,34 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +DESCRIPTION="Simple TCP/IP Dump summarizer/analyzer" +HOMEPAGE="http://read.seas.harvard.edu/~kohler/ipsumdump/" +SRC_URI="http://read.seas.harvard.edu/~kohler/ipsumdump/${P}.tar.gz" + +LICENSE="the-Click-license" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="+ipv6 +nanotimestamp" + +RDEPEND=" + net-libs/libpcap +" +DEPEND=" + ${RDEPEND} + dev-lang/perl + dev-libs/expat + sys-apps/texinfo + virtual/os-headers +" +DOCS=( + NEWS.md + README.md +) + +src_configure() { + econf \ + $(use_enable ipv6 ip6) \ + $(use_enable nanotimestamp) +} diff --git a/net-analyzer/ipsumdump/metadata.xml b/net-analyzer/ipsumdump/metadata.xml new file mode 100644 index 000000000000..71d4a4ee8d5b --- /dev/null +++ b/net-analyzer/ipsumdump/metadata.xml @@ -0,0 +1,16 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<maintainer type='project'> +<email>netmon@gentoo.org</email> +</maintainer> +<use> +<flag name="nanotimestamp">Enable timestamps with nano-second resolution</flag> +</use> +<longdescription lang="en"> +The ipsumdump program summarizes TCP/IP dump files into a self-describing ASCII +format easily readable by humans and programs. The companion ipaggcreate +program counts various properties of packet aggregates. +</longdescription> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/iptraf-ng/Manifest b/net-analyzer/iptraf-ng/Manifest new file mode 100644 index 000000000000..2ddd08611f68 --- /dev/null +++ b/net-analyzer/iptraf-ng/Manifest @@ -0,0 +1,3 @@ +DIST iptraf-ng-1.1.4-github.tar.gz 556843 BLAKE2B 6f4e2bd8c4cf271d90732810f0ba6ab146b3471b723e657c180cf95ce8e1361d18c6803d5da56e872b0e49234956304fe1ff5532fde1332bc30a51a77ef8bdc0 SHA512 675165e08f979daf70fdbd0bd7ae24803860a182f3f1f6e6905f79f65b283470eedcc7e2f8608006c92af258cfad49c0b571652d843107cc79ad8eda63d4e5cb +DIST iptraf-ng-1.1.4.tar.gz 583306 BLAKE2B c06fdc25838901fc5528057ade5ebe28b5679a6a545f461cef2a5f4d3cbc1346a7ab3e94f4fe317a1760067e480c3c622df1027591d978b0ac1236ba9203e9da SHA512 8cafb0000cec75eb4071156a9e9350ffe6de99cb6386e8f50d05337113872ee50082a30009d85faa02d83633a8e727039791332d600654321b95ca6cfc881774 +DIST iptraf-ng-1.2.0.tar.gz 324969 BLAKE2B 45a67fc64b5ab518339e55adfc158c8cf10eacded15941545d8d7cee19c954aae2619c39a11b1eeaa79f5a381b5dcf2e6a6e0b8fdd7e78e75f41ab10b71e6a0a SHA512 6dc3b5deb7c6fb3776ce696492975db43c13fa2d1d956712e7738ef34ac1bfc5f5d63a5211ba8e9fabf391e8bc5560c08c5d5e219b0cfe067e3499b2c02e6f3d diff --git a/net-analyzer/iptraf-ng/files/iptraf-ng-1.1.4-printf-format.patch b/net-analyzer/iptraf-ng/files/iptraf-ng-1.1.4-printf-format.patch new file mode 100644 index 000000000000..6bad736e2e44 --- /dev/null +++ b/net-analyzer/iptraf-ng/files/iptraf-ng-1.1.4-printf-format.patch @@ -0,0 +1,11 @@ +--- a/src/ipfilter.c ++++ b/src/ipfilter.c +@@ -146,7 +146,7 @@ + snprintf(msgstr, 60, + "Invalid protocol input at or near token \"%s\"", + bptr); +- tui_error(ANYKEY_MSG, msgstr); ++ tui_error(ANYKEY_MSG, "%s", msgstr); + doagain = 1; + } else + doagain = 0; diff --git a/net-analyzer/iptraf-ng/files/iptraf-ng-1.1.4-sprintf-format.patch b/net-analyzer/iptraf-ng/files/iptraf-ng-1.1.4-sprintf-format.patch new file mode 100644 index 000000000000..96f252895cb2 --- /dev/null +++ b/net-analyzer/iptraf-ng/files/iptraf-ng-1.1.4-sprintf-format.patch @@ -0,0 +1,20 @@ +--- a/src/othptab.c ++++ b/src/othptab.c +@@ -410,7 +410,7 @@ + break; + } + +- sprintf(scratchpad, rarp_mac_addr); ++ sprintf(scratchpad, "%s", rarp_mac_addr); + strcat(msgstring, scratchpad); + wattrset(table->othpwin, ARPATTR); + break; +@@ -485,7 +485,7 @@ + wattrset(table->othpwin, UNKNIPATTR); + protptr = getprotobynumber(entry->protocol); + if (protptr != NULL) { +- sprintf(protname, protptr->p_aliases[0]); ++ sprintf(protname, "%s", protptr->p_aliases[0]); + } else { + sprintf(protname, "IP protocol"); + unknown = 1; diff --git a/net-analyzer/iptraf-ng/files/iptraf-ng-1.1.4-tcplog_flowrate_msg.patch b/net-analyzer/iptraf-ng/files/iptraf-ng-1.1.4-tcplog_flowrate_msg.patch new file mode 100644 index 000000000000..8e01989fe6fe --- /dev/null +++ b/net-analyzer/iptraf-ng/files/iptraf-ng-1.1.4-tcplog_flowrate_msg.patch @@ -0,0 +1,11 @@ +--- a/src/tcptable.c ++++ b/src/tcptable.c +@@ -437,6 +437,8 @@ static char *tcplog_flowrate_msg(struct tcptableent *entry, char *buf, + size_t bufsize) + { + time_t interval = time(NULL) - entry->conn_starttime; ++ if (interval < 1) ++ interval = 1; + + char rbuf[64]; + rate_print(entry->bcount / interval, rbuf, sizeof(rbuf)); diff --git a/net-analyzer/iptraf-ng/iptraf-ng-1.1.4-r1.ebuild b/net-analyzer/iptraf-ng/iptraf-ng-1.1.4-r1.ebuild new file mode 100644 index 000000000000..414a906e2eb0 --- /dev/null +++ b/net-analyzer/iptraf-ng/iptraf-ng-1.1.4-r1.ebuild @@ -0,0 +1,62 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 +inherit eutils toolchain-funcs + +DESCRIPTION="A console-based network monitoring utility" +HOMEPAGE="http://fedorahosted.org/iptraf-ng/" +SRC_URI="http://fedorahosted.org/releases/${PN:0:1}/${PN:1:1}/${PN}/${P}.tar.gz" + +LICENSE="GPL-2 doc? ( FDL-1.1 )" +SLOT="0" +KEYWORDS="~alpha amd64 arm hppa ~ia64 ~mips ppc ppc64 ~s390 sparc x86" +IUSE="doc" + +RESTRICT="test" + +RDEPEND=" + >=sys-libs/ncurses-5.7-r7:0= +" +DEPEND=" + ${RDEPEND} + virtual/os-headers + !net-analyzer/iptraf +" + +src_prepare() { + sed -i \ + -e '/^CC =/d' \ + -e '/^CFLAGS/s:= -g -O2:+= :' \ + -e '/^LDFLAGS =/d' \ + -e 's|$(QUIET_[[:alpha:]]*)||g' \ + Makefile || die + sed -i \ + -e 's|IPTRAF|&-NG|g' \ + -e 's|IPTraf|&-NG|g' \ + -e 's|iptraf|&-ng|g' \ + -e 's|rvnamed|&-ng|g' \ + -e 's|RVNAMED|&-NG|g' \ + src/*.8 || die + + epatch "${FILESDIR}"/${P}-tcplog_flowrate_msg.patch +} + +# configure does not do very much we do not already control +src_configure() { :; } + +src_compile() { + tc-export CC + CFLAGS+=' -DLOCKDIR=\"/run/lock/iptraf-ng\"' + default +} + +src_install() { + dosbin {iptraf,rvnamed}-ng + + doman src/*.8 + dodoc AUTHORS CHANGES FAQ README* RELEASE-NOTES + use doc && dohtml -a gif,html,png -r Documentation/* + + keepdir /var/{lib,log}/iptraf-ng #376157 +} diff --git a/net-analyzer/iptraf-ng/iptraf-ng-1.1.4-r2.ebuild b/net-analyzer/iptraf-ng/iptraf-ng-1.1.4-r2.ebuild new file mode 100644 index 000000000000..0295b3c12613 --- /dev/null +++ b/net-analyzer/iptraf-ng/iptraf-ng-1.1.4-r2.ebuild @@ -0,0 +1,64 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 +inherit eutils toolchain-funcs + +DESCRIPTION="A console-based network monitoring utility" +HOMEPAGE="http://fedorahosted.org/iptraf-ng/" +SRC_URI="http://fedorahosted.org/releases/${PN:0:1}/${PN:1:1}/${PN}/${P}.tar.gz" + +LICENSE="GPL-2 doc? ( FDL-1.1 )" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86" +IUSE="doc" + +RESTRICT="test" + +RDEPEND=" + >=sys-libs/ncurses-5.7-r7:0= +" +DEPEND=" + ${RDEPEND} + virtual/os-headers + !net-analyzer/iptraf +" + +src_prepare() { + sed -i \ + -e '/^CC =/d' \ + -e '/^CFLAGS/s:= -g -O2:+= :' \ + -e '/^LDFLAGS =/d' \ + -e 's|$(QUIET_[[:alpha:]]*)||g' \ + Makefile || die + sed -i \ + -e 's|IPTRAF|&-NG|g' \ + -e 's|IPTraf|&-NG|g' \ + -e 's|iptraf|&-ng|g' \ + -e 's|rvnamed|&-ng|g' \ + -e 's|RVNAMED|&-NG|g' \ + src/*.8 || die + + epatch "${FILESDIR}"/${P}-tcplog_flowrate_msg.patch + epatch "${FILESDIR}"/${P}-printf-format.patch + epatch "${FILESDIR}"/${P}-sprintf-format.patch +} + +# configure does not do very much we do not already control +src_configure() { :; } + +src_compile() { + tc-export CC + CFLAGS+=' -DLOCKDIR=\"/run/lock/iptraf-ng\"' + default +} + +src_install() { + dosbin {iptraf,rvnamed}-ng + + doman src/*.8 + dodoc AUTHORS CHANGES FAQ README* RELEASE-NOTES + use doc && dohtml -a gif,html,png -r Documentation/* + + keepdir /var/{lib,log}/iptraf-ng #376157 +} diff --git a/net-analyzer/iptraf-ng/iptraf-ng-1.1.4-r3.ebuild b/net-analyzer/iptraf-ng/iptraf-ng-1.1.4-r3.ebuild new file mode 100644 index 000000000000..960fddbae484 --- /dev/null +++ b/net-analyzer/iptraf-ng/iptraf-ng-1.1.4-r3.ebuild @@ -0,0 +1,67 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +inherit flag-o-matic toolchain-funcs + +DESCRIPTION="A console-based network monitoring utility" +HOMEPAGE="https://github.com/iptraf-ng/iptraf-ng/" +SRC_URI="https://github.com/iptraf-ng/iptraf-ng/archive/v${PV}.tar.gz -> ${P}-github.tar.gz" + +LICENSE="GPL-2 doc? ( FDL-1.1 )" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86" +IUSE="doc" + +RDEPEND=" + >=sys-libs/ncurses-5.7-r7:0= +" +DEPEND=" + ${RDEPEND} + virtual/os-headers + !net-analyzer/iptraf +" +PATCHES=( + "${FILESDIR}"/${P}-printf-format.patch + "${FILESDIR}"/${P}-sprintf-format.patch + "${FILESDIR}"/${P}-tcplog_flowrate_msg.patch +) +RESTRICT="test" + +src_prepare() { + sed -i \ + -e '/^CC =/d' \ + -e '/^CFLAGS/s:= -g -O2:+= :' \ + -e '/^LDFLAGS =/d' \ + -e 's|$(QUIET_[[:alpha:]]*)||g' \ + Makefile || die + sed -i \ + -e 's|IPTRAF|&-NG|g' \ + -e 's|IPTraf|&-NG|g' \ + -e 's|iptraf|&-ng|g' \ + -e 's|rvnamed|&-ng|g' \ + -e 's|RVNAMED|&-NG|g' \ + src/*.8 || die + + default +} + +src_configure() { + # The configure script does not do very much we do not already control + append-cppflags '-DLOCKDIR=\"/run/lock/iptraf-ng\"' + tc-export CC +} + +src_install() { + dosbin {iptraf,rvnamed}-ng + + doman src/*.8 + dodoc AUTHORS CHANGES FAQ README* RELEASE-NOTES + + if use doc; then + docinto html + dodoc -r Documentation/* + fi + + keepdir /var/{lib,log}/iptraf-ng #376157 +} diff --git a/net-analyzer/iptraf-ng/iptraf-ng-1.2.0-r1.ebuild b/net-analyzer/iptraf-ng/iptraf-ng-1.2.0-r1.ebuild new file mode 100644 index 000000000000..bda05a1a02a4 --- /dev/null +++ b/net-analyzer/iptraf-ng/iptraf-ng-1.2.0-r1.ebuild @@ -0,0 +1,60 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +inherit flag-o-matic toolchain-funcs + +DESCRIPTION="A console-based network monitoring utility" +HOMEPAGE="https://github.com/iptraf-ng/iptraf-ng" +SRC_URI="https://github.com/iptraf-ng/iptraf-ng/archive/v${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="GPL-2 doc? ( FDL-1.1 )" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86" +IUSE="doc" + +RDEPEND=" + >=sys-libs/ncurses-5.7-r7:0= +" +DEPEND=" + ${RDEPEND} + virtual/os-headers + !net-analyzer/iptraf +" +RESTRICT="test" + +src_prepare() { + sed -i \ + -e '/^CC =/d' \ + -e '/^CFLAGS/s:= -g -O2:+= :' \ + -e '/^LDFLAGS =/d' \ + -e 's|$(QUIET_[[:alpha:]]*)||g' \ + Makefile || die + sed -i \ + -e 's|IPTRAF|&-NG|g' \ + -e 's|IPTraf|&-NG|g' \ + -e 's|iptraf|&-ng|g' \ + src/*.8 || die + + default +} + +src_configure() { + # The configure script does not do very much we do not already control + append-cppflags '-DLOCKDIR=\"/run/lock/iptraf-ng\"' + tc-export CC +} + +src_install() { + dosbin ${PN} + + doman src/*.8 + dodoc AUTHORS CHANGES* FAQ README* + + if use doc; then + docinto html + dodoc -r Documentation/* + fi + + keepdir /var/{lib,log}/iptraf-ng #376157 +} diff --git a/net-analyzer/iptraf-ng/iptraf-ng-9999.ebuild b/net-analyzer/iptraf-ng/iptraf-ng-9999.ebuild new file mode 100644 index 000000000000..486e56efca50 --- /dev/null +++ b/net-analyzer/iptraf-ng/iptraf-ng-9999.ebuild @@ -0,0 +1,61 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +inherit flag-o-matic git-r3 toolchain-funcs + +DESCRIPTION="A console-based network monitoring utility" +HOMEPAGE="https://github.com/iptraf-ng/iptraf-ng" +EGIT_REPO_URI="https://github.com/iptraf-ng/iptraf-ng" +EGIT_BRANCH="dev" + +LICENSE="GPL-2 doc? ( FDL-1.1 )" +SLOT="0" +KEYWORDS="" +IUSE="doc" + +RDEPEND=" + >=sys-libs/ncurses-5.7-r7:0= +" +DEPEND=" + ${RDEPEND} + virtual/os-headers + !net-analyzer/iptraf +" +RESTRICT="test" + +src_prepare() { + sed -i \ + -e '/^CC =/d' \ + -e '/^CFLAGS/s:= -g -O2:+= :' \ + -e '/^LDFLAGS =/d' \ + -e 's|$(QUIET_[[:alpha:]]*)||g' \ + Makefile || die + sed -i \ + -e 's|IPTRAF|&-NG|g' \ + -e 's|IPTraf|&-NG|g' \ + -e 's|iptraf|&-ng|g' \ + src/*.8 || die + + default +} + +src_configure() { + # The configure script does not do very much we do not already control + append-cppflags '-DLOCKDIR=\"/run/lock/iptraf-ng\"' + tc-export CC +} + +src_install() { + dosbin ${PN} + + doman src/*.8 + dodoc AUTHORS CHANGES* FAQ README* + + if use doc; then + docinto html + dodoc -r Documentation/* + fi + + keepdir /var/{lib,log}/iptraf-ng #376157 +} diff --git a/net-analyzer/iptraf-ng/metadata.xml b/net-analyzer/iptraf-ng/metadata.xml new file mode 100644 index 000000000000..7456c7bdbec6 --- /dev/null +++ b/net-analyzer/iptraf-ng/metadata.xml @@ -0,0 +1,12 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<maintainer type="project"> + <email>netmon@gentoo.org</email> + <name>Gentoo network monitoring and analysis project</name> +</maintainer> +<longdescription> + Interactive Colorful IP LAN Monitor, an active fork of iptraf +</longdescription> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/iptstate/Manifest b/net-analyzer/iptstate/Manifest new file mode 100644 index 000000000000..459a928a8812 --- /dev/null +++ b/net-analyzer/iptstate/Manifest @@ -0,0 +1,2 @@ +DIST iptstate-2.2.5.tar.bz2 28270 BLAKE2B dd9369462b689a2e4fe7059666d384c34a265f03c7f6133d1f27e61eea7f8db4d3e96633b1b273584b6097c452da502d88b417d4fe23f83f494c767e377799e4 SHA512 044bbcf96225cc52b82428792d685d19f964520f7f20a9d3fa7e53430c1f552c0f09338a5d347b08e2500206cd7634a6b4a3acffbfd9e59e4657afb6df461795 +DIST iptstate-2.2.6.tar.bz2 28700 BLAKE2B 66e18425a4fed423a5a03c8f9ecbc87f4553a64475ab77144f3f37969eb6a399d52d7166bb68d9c9e80753163b841c71b42bfc13796e4a9d2c23db084740f3f5 SHA512 411b357aced384c52caac17b23f3c6bd631ff34d41b6000b90ff6dfc3cf20e36e46416d3691ac699b06f16d6042a42681b42a5d3594ce287aa6cf3b3b637c999 diff --git a/net-analyzer/iptstate/files/iptstate-2.2.5-gentoo.patch b/net-analyzer/iptstate/files/iptstate-2.2.5-gentoo.patch new file mode 100644 index 000000000000..fdaeeb7867b2 --- /dev/null +++ b/net-analyzer/iptstate/files/iptstate-2.2.5-gentoo.patch @@ -0,0 +1,26 @@ +--- a/Makefile ++++ b/Makefile +@@ -17,12 +17,11 @@ + ### ADVANCED USERS AND PACKAGERS MIGHT WANT TO CHANGE THIS + + CXX?= g++ +-CXXFLAGS?= -g -Wall -O2 ++CXXFLAGS+= -Wall + CXXFILES?= iptstate.cc + + # THIS IS FOR NORMAL COMPILATION +-LIBS?= -lncurses -lnetfilter_conntrack +-CPPFLAGS= ++LIBS= $(shell $(PKG_CONFIG) --libs ncurses libnetfilter_conntrack) + + ### YOU SHOULDN'T NEED TO CHANGE ANYTHING BELOW THIS + +@@ -45,7 +44,7 @@ + echo "+------------------------------------------------------------+" ;\ + echo ""; + +- $(CXX) $(CXXFLAGS) $(CXXFILES) -o iptstate $(LIBS) $(CPPFLAGS) ++ $(CXX) $(LDFLAGS) $(CXXFLAGS) $(CPPFLAGS) $(CXXFILES) -o iptstate $(LIBS) + @touch iptstate + + @\ diff --git a/net-analyzer/iptstate/iptstate-2.2.5.ebuild b/net-analyzer/iptstate/iptstate-2.2.5.ebuild new file mode 100644 index 000000000000..0731ad67040b --- /dev/null +++ b/net-analyzer/iptstate/iptstate-2.2.5.ebuild @@ -0,0 +1,32 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 +inherit eutils toolchain-funcs + +DESCRIPTION="IP Tables State displays states being kept by iptables in a top-like format" +HOMEPAGE="https://www.phildev.net/iptstate/ https://github.com/jaymzh/iptstate" +SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2" + +LICENSE="ZLIB" +SLOT="0" +KEYWORDS="amd64 ~hppa ~ppc x86" + +RDEPEND=" + >=sys-libs/ncurses-5.7-r7:0= + >=net-libs/libnetfilter_conntrack-0.0.50 +" +DEPEND=" + ${RDEPEND} + virtual/pkgconfig +" + +src_prepare() { + epatch "${FILESDIR}"/${P}-gentoo.patch + tc-export CXX PKG_CONFIG +} + +src_install() { + emake PREFIX="${D}"/usr install + dodoc BUGS Changelog CONTRIB README WISHLIST +} diff --git a/net-analyzer/iptstate/iptstate-2.2.6.ebuild b/net-analyzer/iptstate/iptstate-2.2.6.ebuild new file mode 100644 index 000000000000..7a073736f1e6 --- /dev/null +++ b/net-analyzer/iptstate/iptstate-2.2.6.ebuild @@ -0,0 +1,35 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 +inherit toolchain-funcs + +DESCRIPTION="IP Tables State displays states being kept by iptables in a top-like format" +HOMEPAGE="https://www.phildev.net/iptstate/ https://github.com/jaymzh/iptstate" +SRC_URI="https://github.com/jaymzh/${PN}/releases/download/v${PV}/${P}.tar.bz2" + +LICENSE="ZLIB" +SLOT="0" +KEYWORDS="~amd64 ~hppa ~ppc ~x86" + +RDEPEND=" + >=sys-libs/ncurses-5.7-r7:0= + >=net-libs/libnetfilter_conntrack-0.0.50 +" +DEPEND=" + ${RDEPEND} + virtual/pkgconfig +" +PATCHES=( + "${FILESDIR}"/${PN}-2.2.5-gentoo.patch +) + +src_prepare() { + default + tc-export CXX PKG_CONFIG +} + +src_install() { + emake PREFIX="${D}"/usr install + dodoc BUGS Changelog CONTRIB README.md WISHLIST +} diff --git a/net-analyzer/iptstate/metadata.xml b/net-analyzer/iptstate/metadata.xml new file mode 100644 index 000000000000..d363c6cd3c39 --- /dev/null +++ b/net-analyzer/iptstate/metadata.xml @@ -0,0 +1,13 @@ +<?xml version='1.0' encoding='UTF-8'?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>netmon@gentoo.org</email> + <name>Gentoo network monitoring and analysis project</name> + </maintainer> + <upstream> + <remote-id type="sourceforge">iptstate</remote-id> + <remote-id type="github">jaymzh/iptstate</remote-id> + </upstream> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/ipv6toolkit/Manifest b/net-analyzer/ipv6toolkit/Manifest new file mode 100644 index 000000000000..d7cf7dd956f7 --- /dev/null +++ b/net-analyzer/ipv6toolkit/Manifest @@ -0,0 +1,2 @@ +DIST ipv6toolkit-2.1_p20190919.tar.gz 979235 BLAKE2B 1b652b00874b9a71a5e5b86643d9c71fc02917af93d9730e7e4be7e5203d07dfef5bc7d1bb0453a6bf9dece69f7f4256912f0902132dd21530ae8ea9e94b8b4f SHA512 78e7565f4827d21573ced06002311a4f3736df71846085b3e8e47e0d6aebeaa4e60881c148c3c65ee010ffcfb2bf3ad56bb2625203aff5b0fdf40fbb7f37ecb9 +DIST ipv6toolkit-2.1_p20200412.tar.gz 987247 BLAKE2B 7fcb07c0cbb22e377618f62b69a16e4a5aeda3b3ebc32bd216cf9fa3beb2d8775cec6543482609361bb23304e3284e770ae82ada053fb172c432adfe360e09ba SHA512 480245e4f5ed31d6de726467ab8e1726285ccc7eeb6c84bd75caf62af35409ebf5ea63a29567200b387592317a5d5989c76ad38d3f0842ebdf5392f28e81be9f diff --git a/net-analyzer/ipv6toolkit/files/ipv6toolkit-2.1_p20190919-fno-common.patch b/net-analyzer/ipv6toolkit/files/ipv6toolkit-2.1_p20190919-fno-common.patch new file mode 100644 index 000000000000..9d4a3dcffe9e --- /dev/null +++ b/net-analyzer/ipv6toolkit/files/ipv6toolkit-2.1_p20190919-fno-common.patch @@ -0,0 +1,192 @@ +--- a/tools/flow6.c ++++ b/tools/flow6.c +@@ -85,8 +85,7 @@ + + bpf_u_int32 my_netmask; + bpf_u_int32 my_ip; +-struct bpf_program pcap_filter; +-char dev[64], errbuf[PCAP_ERRBUF_SIZE]; ++char dev[64]; + unsigned char buffer[65556], buffrh[MIN_IPV6_HLEN + MIN_TCP_HLEN]; + unsigned char *v6buffer, *ptr, *startofprefixes; + char *pref; +--- a/tools/frag6.c ++++ b/tools/frag6.c +@@ -94,8 +94,7 @@ + + bpf_u_int32 my_netmask; + bpf_u_int32 my_ip; +-struct bpf_program pcap_filter; +-char dev[64], errbuf[PCAP_ERRBUF_SIZE]; ++char dev[64]; + unsigned char buffer[65556], buffrh[MIN_IPV6_HLEN + MIN_TCP_HLEN]; + unsigned char *v6buffer, *ptr, *startofprefixes; + char *pref; +--- a/tools/icmp6.c ++++ b/tools/icmp6.c +@@ -114,8 +114,7 @@ + + bpf_u_int32 my_netmask; + bpf_u_int32 my_ip; +-struct bpf_program pcap_filter; +-char dev[64], errbuf[PCAP_ERRBUF_SIZE]; ++char dev[64]; + unsigned char buffer[65556], buffrh[MIN_IPV6_HLEN + MIN_TCP_HLEN]; + unsigned char *v6buffer, *ptr, *startofprefixes; + char *pref; +--- a/tools/ipv6toolkit.h ++++ b/tools/ipv6toolkit.h +@@ -2,3 +2,10 @@ + #define MAX_CMDLINE_OPT_LEN 40 + #define DATE_STR_LEN 40 + ++#include <pcap.h> ++#include <setjmp.h> ++ ++extern char errbuf[PCAP_ERRBUF_SIZE]; ++extern struct bpf_program pcap_filter; ++extern sigjmp_buf env; ++extern unsigned int canjump; +--- a/tools/jumbo6.c ++++ b/tools/jumbo6.c +@@ -80,8 +80,7 @@ + + bpf_u_int32 my_netmask; + bpf_u_int32 my_ip; +-struct bpf_program pcap_filter; +-char dev[64], errbuf[PCAP_ERRBUF_SIZE]; ++char dev[64]; + unsigned char buffer[65556], buffrh[MIN_IPV6_HLEN + MIN_TCP_HLEN]; + unsigned char *v6buffer, *ptr, *startofprefixes; + char *pref; +--- a/tools/na6.c ++++ b/tools/na6.c +@@ -61,8 +61,7 @@ + struct in6_addr *pkt_ipv6addr; + bpf_u_int32 my_netmask; + bpf_u_int32 my_ip; +-struct bpf_program pcap_filter; +-char dev[64], errbuf[PCAP_ERRBUF_SIZE]; ++char dev[64]; + char all_nodes_addr[]= ALL_NODES_MULTICAST_ADDR; + unsigned char buffer[65556]; + unsigned char *v6buffer, *ptr, *startofprefixes; +--- a/tools/ni6.c ++++ b/tools/ni6.c +@@ -90,8 +90,7 @@ + + bpf_u_int32 my_netmask; + bpf_u_int32 my_ip; +-struct bpf_program pcap_filter; +-char dev[64], errbuf[PCAP_ERRBUF_SIZE]; ++char dev[64]; + unsigned char buffer[65556], buffrh[MIN_IPV6_HLEN + MIN_TCP_HLEN]; + char domain[MAX_DOMAIN_LEN]; + unsigned char *v6buffer, *ptr, *startofprefixes; +--- a/tools/ns6.c ++++ b/tools/ns6.c +@@ -59,8 +59,7 @@ + const u_char *pktdata; + bpf_u_int32 my_netmask; + bpf_u_int32 my_ip; +-struct bpf_program pcap_filter; +-char dev[64], errbuf[PCAP_ERRBUF_SIZE]; ++char dev[64]; + + unsigned char buffer[65556]; + unsigned char *v6buffer, *ptr, *startofprefixes; +--- a/tools/path6.c ++++ b/tools/path6.c +@@ -88,8 +88,7 @@ + + bpf_u_int32 my_netmask; + bpf_u_int32 my_ip; +-struct bpf_program pcap_filter; +-char dev[64], errbuf[PCAP_ERRBUF_SIZE]; ++char dev[64]; + unsigned char buffer[65556], buffrh[MIN_IPV6_HLEN + MIN_TCP_HLEN]; + unsigned char *v6buffer, *ptr, *startofprefixes; + char *pref; +--- a/tools/ra6.c ++++ b/tools/ra6.c +@@ -64,8 +64,7 @@ + struct in6_addr *pkt_ipv6addr; + bpf_u_int32 my_netmask; + bpf_u_int32 my_ip; +-struct bpf_program pcap_filter; +-char dev[64], errbuf[PCAP_ERRBUF_SIZE]; ++char dev[64]; + char all_nodes_addr[]= ALL_NODES_MULTICAST_ADDR; + + unsigned char buffer[ETHER_HDR_LEN+MIN_IPV6_HLEN+MAX_IPV6_PAYLOAD]; +--- a/tools/rd6.c ++++ b/tools/rd6.c +@@ -106,8 +106,7 @@ + + bpf_u_int32 my_netmask; + bpf_u_int32 my_ip; +-struct bpf_program pcap_filter; +-char dev[64], errbuf[PCAP_ERRBUF_SIZE]; ++char dev[64]; + unsigned char buffer[65556], buffrh[MIN_IPV6_HLEN + MIN_TCP_HLEN]; + unsigned char *v6buffer, *ptr, *startofprefixes; + char *pref; +--- a/tools/rs6.c ++++ b/tools/rs6.c +@@ -60,8 +60,7 @@ + struct in6_addr *pkt_ipv6addr; + bpf_u_int32 my_netmask; + bpf_u_int32 my_ip; +-struct bpf_program pcap_filter; +-char dev[64], errbuf[PCAP_ERRBUF_SIZE]; ++char dev[64]; + char all_nodes_addr[]= ALL_NODES_MULTICAST_ADDR; + + unsigned char buffer[65556]; +--- a/tools/scan6.c ++++ b/tools/scan6.c +@@ -153,8 +153,7 @@ + + bpf_u_int32 my_netmask; + bpf_u_int32 my_ip; +-struct bpf_program pcap_filter; +-char dev[64], errbuf[PCAP_ERRBUF_SIZE]; ++char dev[64]; + unsigned char buffer[BUFFER_SIZE], buffrh[MIN_IPV6_HLEN + MIN_TCP_HLEN]; + char line[LINE_BUFFER_SIZE]; + unsigned char *v6buffer, *ptr, *startofprefixes; +@@ -269,10 +268,6 @@ + 443, 547, 993, 995, 1194, 3306, 5060, 5061, 5432, 6446, 8080}; + + +-/* IPv6 Address Resolution */ +-sigjmp_buf env; +-unsigned int canjump; +- + int main(int argc, char **argv){ + extern char *optarg; + int r; +--- a/tools/tcp6.c ++++ b/tools/tcp6.c +@@ -116,8 +116,7 @@ + + bpf_u_int32 my_netmask; + bpf_u_int32 my_ip; +-struct bpf_program pcap_filter; +-char dev[64], errbuf[PCAP_ERRBUF_SIZE]; ++char dev[64]; + unsigned char buffer[65556], buffrh[MIN_IPV6_HLEN + MIN_TCP_HLEN]; + unsigned char *v6buffer, *ptr, *startofprefixes; + char *pref; +--- a/tools/udp6.c ++++ b/tools/udp6.c +@@ -99,8 +99,7 @@ + + bpf_u_int32 my_netmask; + bpf_u_int32 my_ip; +-struct bpf_program pcap_filter; +-char dev[64], errbuf[PCAP_ERRBUF_SIZE]; ++char dev[64]; + unsigned char buffer[65556], buffrh[MIN_IPV6_HLEN + MIN_UDP_HLEN]; + unsigned char *v6buffer, *ptr, *startofprefixes; + char *pref; diff --git a/net-analyzer/ipv6toolkit/ipv6toolkit-2.1_p20190919.ebuild b/net-analyzer/ipv6toolkit/ipv6toolkit-2.1_p20190919.ebuild new file mode 100644 index 000000000000..bff5e134fff8 --- /dev/null +++ b/net-analyzer/ipv6toolkit/ipv6toolkit-2.1_p20190919.ebuild @@ -0,0 +1,48 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +inherit toolchain-funcs + +DESCRIPTION="Set of IPv6 security/trouble-shooting tools to send arbitrary IPv6-based packets" +HOMEPAGE="https://www.si6networks.com/tools/ipv6toolkit/" +SNAPSHOT="20de5f297f73b6a8115d1eac52adfe0b6df5b3ed" +SRC_URI="https://github.com/fgont/ipv6toolkit/archive/${SNAPSHOT}.tar.gz -> ${P}.tar.gz" +S="${WORKDIR}"/"${PN}"-"${SNAPSHOT}" + +LICENSE="GPL-3" +SLOT="0" +KEYWORDS="~amd64 ~x86" + +DEPEND=" + net-libs/libpcap[ipv6(+)] +" +RDEPEND=" + ${DEPEND} + sys-apps/hwids +" +PATCHES=( + "${FILESDIR}"/${PN}-2.1_p20190919-fno-common.patch +) + +HWIDS_OUI_PATH=/usr/share/misc/oui.txt + +src_prepare() { + default + sed -i "s#/usr/share/ipv6toolkit/oui.txt#${HWIDS_OUI_PATH}#" \ + manuals/ipv6toolkit.conf.5 +} +src_compile() { + emake CC="$(tc-getCC)" CFLAGS="${CFLAGS}" PREFIX=/usr +} + +src_install() { + dodir /etc + emake install DESTDIR="${ED}" PREFIX=/usr + #remove the included oui file + rm -f "${D}"/usr/share/ipv6toolkit/oui.txt + #fix the conf file to use the one from sys-apps/hwids + sed -i "s#/usr/share/ipv6toolkit/oui.txt#${HWIDS_OUI_PATH}#" \ + "${ED}"/etc/ipv6toolkit.conf + dodoc CHANGES.TXT README.TXT +} diff --git a/net-analyzer/ipv6toolkit/ipv6toolkit-2.1_p20200412.ebuild b/net-analyzer/ipv6toolkit/ipv6toolkit-2.1_p20200412.ebuild new file mode 100644 index 000000000000..2d692fb0ea06 --- /dev/null +++ b/net-analyzer/ipv6toolkit/ipv6toolkit-2.1_p20200412.ebuild @@ -0,0 +1,45 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +inherit toolchain-funcs + +DESCRIPTION="Set of IPv6 security/trouble-shooting tools to send arbitrary IPv6-based packets" +HOMEPAGE="https://www.si6networks.com/tools/ipv6toolkit/" +SNAPSHOT="623a0fbc0422cdc0a4b833d7b5ec58a2eaa9bddf" +SRC_URI="https://github.com/fgont/ipv6toolkit/archive/${SNAPSHOT}.tar.gz -> ${P}.tar.gz" +S="${WORKDIR}"/"${PN}"-"${SNAPSHOT}" + +LICENSE="GPL-3" +SLOT="0" +KEYWORDS="~amd64 ~x86" + +DEPEND=" + net-libs/libpcap[ipv6(+)] +" +RDEPEND=" + ${DEPEND} + sys-apps/hwids +" + +HWIDS_OUI_PATH=/usr/share/misc/oui.txt + +src_prepare() { + default + sed -i "s#/usr/share/ipv6toolkit/oui.txt#${HWIDS_OUI_PATH}#" \ + manuals/ipv6toolkit.conf.5 +} +src_compile() { + emake CC="$(tc-getCC)" CFLAGS="${CFLAGS}" PREFIX=/usr +} + +src_install() { + dodir /etc + emake install DESTDIR="${ED}" PREFIX=/usr + #remove the included oui file + rm -f "${D}"/usr/share/ipv6toolkit/oui.txt + #fix the conf file to use the one from sys-apps/hwids + sed -i "s#/usr/share/ipv6toolkit/oui.txt#${HWIDS_OUI_PATH}#" \ + "${ED}"/etc/ipv6toolkit.conf + dodoc CHANGES.TXT README.TXT +} diff --git a/net-analyzer/ipv6toolkit/ipv6toolkit-99999999.ebuild b/net-analyzer/ipv6toolkit/ipv6toolkit-99999999.ebuild new file mode 100644 index 000000000000..8a862e677183 --- /dev/null +++ b/net-analyzer/ipv6toolkit/ipv6toolkit-99999999.ebuild @@ -0,0 +1,43 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +inherit git-r3 toolchain-funcs + +DESCRIPTION="Set of IPv6 security/trouble-shooting tools to send arbitrary IPv6-based packets" +HOMEPAGE="https://www.si6networks.com/tools/ipv6toolkit/" +EGIT_REPO_URI="https://github.com/fgont/ipv6toolkit" + +LICENSE="GPL-3" +SLOT="0" +KEYWORDS="" + +DEPEND=" + net-libs/libpcap[ipv6(+)] +" +RDEPEND=" + ${DEPEND} + sys-apps/hwids +" + +HWIDS_OUI_PATH=/usr/share/misc/oui.txt + +src_prepare() { + default + sed -i "s#/usr/share/ipv6toolkit/oui.txt#${HWIDS_OUI_PATH}#" \ + manuals/ipv6toolkit.conf.5 +} +src_compile() { + emake CC="$(tc-getCC)" CFLAGS="${CFLAGS}" PREFIX=/usr +} + +src_install() { + dodir /etc + emake install DESTDIR="${ED}" PREFIX=/usr + #remove the included oui file + rm -f "${D}"/usr/share/ipv6toolkit/oui.txt + #fix the conf file to use the one from sys-apps/hwids + sed -i "s#/usr/share/ipv6toolkit/oui.txt#${HWIDS_OUI_PATH}#" \ + "${ED}"/etc/ipv6toolkit.conf + dodoc CHANGES.TXT README.TXT +} diff --git a/net-analyzer/ipv6toolkit/metadata.xml b/net-analyzer/ipv6toolkit/metadata.xml new file mode 100644 index 000000000000..01dbf2e6ccc5 --- /dev/null +++ b/net-analyzer/ipv6toolkit/metadata.xml @@ -0,0 +1,15 @@ +<?xml version='1.0' encoding='UTF-8'?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>netmon@gentoo.org</email> + <name>Gentoo network monitoring and analysis project</name> + </maintainer> + <longdescription> + The SI6 Networks' IPv6 toolkit is a set of IPv6 security/trouble-shooting tools, that can send arbitrary IPv6-based packets. + </longdescription> + <upstream> + <remote-id type="github">fgont/ipv6toolkit</remote-id> + </upstream> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/isic/Manifest b/net-analyzer/isic/Manifest new file mode 100644 index 000000000000..8b5fd8a15b31 --- /dev/null +++ b/net-analyzer/isic/Manifest @@ -0,0 +1 @@ +DIST isic-0.07.tgz 39823 BLAKE2B 1a6a0bdca9b8e3c6acab9879b1165862311c331697db09f2f6facf1bd5b2b2f716bc2b1c8bea69a771553836fc7ead11c826f8cf5c9369f30577afafbae027c8 SHA512 2495ee1c6d552fa6f8f79ab06a886aeef39d247589479e75124a03d5633a75d47e8c9a15e16de3596744a83f74da7afa460cc3dd8653e346e58ac70e04126882 diff --git a/net-analyzer/isic/isic-0.07-r1.ebuild b/net-analyzer/isic/isic-0.07-r1.ebuild new file mode 100644 index 000000000000..ac8c670339bd --- /dev/null +++ b/net-analyzer/isic/isic-0.07-r1.ebuild @@ -0,0 +1,35 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +inherit toolchain-funcs + +DESCRIPTION="IP Stack Integrity Checker" +HOMEPAGE="http://isic.sourceforge.net/" +SRC_URI="mirror://sourceforge/isic/${P}.tgz" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="amd64 ppc x86" + +DEPEND="net-libs/libnet:1.1" +RDEPEND="${DEPEND}" + +DOCS=( ChangeLog README ) + +src_prepare() { + # Add two missing includes + echo "#include <netinet/udp.h>" >> isic.h || die + echo "#include <netinet/tcp.h>" >> isic.h || die + + # Install man pages in /usr/share/man + sed -i -e 's|/man/man1|/share&|g' Makefile.in || die + + tc-export CC +} + +src_configure() { + # Build system does not know about DESTDIR + econf --prefix="${D}/usr" --exec_prefix="${D}/usr" +} diff --git a/net-analyzer/isic/metadata.xml b/net-analyzer/isic/metadata.xml new file mode 100644 index 000000000000..ca9942b63227 --- /dev/null +++ b/net-analyzer/isic/metadata.xml @@ -0,0 +1,12 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>netmon@gentoo.org</email> + <name>Gentoo network monitoring and analysis project</name> + </maintainer> + <upstream> + <remote-id type="sourceforge">isic</remote-id> + </upstream> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/jffnms/Manifest b/net-analyzer/jffnms/Manifest new file mode 100644 index 000000000000..e59234875498 --- /dev/null +++ b/net-analyzer/jffnms/Manifest @@ -0,0 +1 @@ +DIST jffnms-0.9.4.tgz 610758 BLAKE2B 2bbe122bae3d358e710895ebd1c38f28644260744d97f5ab88301dc5549c099c9af0931156d47ce0e616c0f6f84b04f2e7ae04f4d0efc8cc3ff72b01dc51e22c SHA512 4d0c4ed1fbf0107029d92b2ea8f0f02c46d532810dc58bf048c5ffaf79f7f24630101be8319876db1aee3356ced32e7cba2f2494bc8a92a635b0a4e6897c6fe7 diff --git a/net-analyzer/jffnms/jffnms-0.9.4-r1.ebuild b/net-analyzer/jffnms/jffnms-0.9.4-r1.ebuild new file mode 100644 index 000000000000..c0957c2f5e85 --- /dev/null +++ b/net-analyzer/jffnms/jffnms-0.9.4-r1.ebuild @@ -0,0 +1,56 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 +inherit user + +DESCRIPTION="Network Management and Monitoring System" +HOMEPAGE="http://www.jffnms.org/" +SRC_URI="mirror://sourceforge/${PN}/${P}.tgz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="mysql postgres snmp" + +RDEPEND=" + dev-lang/php[apache2,cli,gd,mysql?,postgres?,session,snmp,sockets,wddx] + dev-php/PEAR-PEAR + media-gfx/graphviz + media-libs/gd + net-analyzer/fping + net-analyzer/net-snmp + net-analyzer/nmap + net-analyzer/rrdtool[graph] + sys-apps/diffutils +" + +pkg_setup() { + enewgroup jffnms + enewuser jffnms -1 /bin/bash -1 jffnms,apache +} + +src_install() { + local INSTALL_DIR="/opt/${PN}" + local IMAGE_DIR="${D}${INSTALL_DIR}" + + insinto "${INSTALL_DIR}" + doins -r * + + rm -f "${IMAGE_DIR}/LICENSE" + + # Clean up Windows related stuff + rm -f "${IMAGE_DIR}"/*.win32.txt + rm -rf "${IMAGE_DIR}"/docs/windows + rm -rf "${IMAGE_DIR}"/engine/windows + + fowners -R jffnms:apache "${INSTALL_DIR}" + fperms -R ug+rw "${INSTALL_DIR}" +} + +pkg_postinst() { + elog "${PN} has been partialy installed on your system. However you" + elog "still need proceed with final installation and configuration." + elog "You can visit https://wiki.gentoo.org/wiki/Jffnms in order" + elog "to get detailed information on how to get jffnms up and running." +} diff --git a/net-analyzer/jffnms/metadata.xml b/net-analyzer/jffnms/metadata.xml new file mode 100644 index 000000000000..da052a2800b4 --- /dev/null +++ b/net-analyzer/jffnms/metadata.xml @@ -0,0 +1,12 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>netmon@gentoo.org</email> + <name>Gentoo network monitoring and analysis project</name> + </maintainer> + <upstream> + <remote-id type="sourceforge">jffnms</remote-id> + </upstream> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/jmx2munin/Manifest b/net-analyzer/jmx2munin/Manifest new file mode 100644 index 000000000000..4d69d490d879 --- /dev/null +++ b/net-analyzer/jmx2munin/Manifest @@ -0,0 +1 @@ +DIST jmx2munin-gentoo-1.0_p20120811.tar.gz 6890 BLAKE2B f28622405cf76cfd6effd4a86a1994e921eb71afced8e0c9c167422fc20378b607b63d7b93add0b816b21a8dc3c9504a4c406ea17f3db159dfd9f4aea440ac32 SHA512 154817d63fb278970d04785821a29833007a553055efe28aa6a3654d01b7a4422a2a1c98cd1693ae52ea28a57505b6d7988f241f6d119425f5c3ae38471b72be diff --git a/net-analyzer/jmx2munin/jmx2munin-1.0_p20120811-r1.ebuild b/net-analyzer/jmx2munin/jmx2munin-1.0_p20120811-r1.ebuild new file mode 100644 index 000000000000..ad8601a5fcc0 --- /dev/null +++ b/net-analyzer/jmx2munin/jmx2munin-1.0_p20120811-r1.ebuild @@ -0,0 +1,54 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +JAVA_PKG_IUSE="doc source" + +inherit java-pkg-2 java-pkg-simple + +MY_P="${PN}-gentoo-${PV}" + +DESCRIPTION="JMX Monitoring plugin for Munin" +HOMEPAGE="https://github.com/tcurdt/jmx2munin" +SRC_URI="https://github.com/gentoo/jmx2munin/tarball/${MY_P} -> ${MY_P}.tar.gz" + +LICENSE="Apache-2.0" +SLOT="0" +KEYWORDS="~amd64" +IUSE="" + +CDEPEND="dev-java/jcommander:0" + +DEPEND="${CDEPEND} + >=virtual/jdk-1.6" + +RDEPEND="${CDEPEND} + net-analyzer/munin + >=virtual/jre-1.6" + +S="${WORKDIR}/${MY_P}" + +JAVA_SRC_DIR="src/main/java/org/vafer/jmx" +JAVA_GENTOO_CLASSPATH="jcommander" + +src_unpack() { + unpack ${A} + mv gentoo-${PN}-* ${MY_P} +} + +java_prepare() { + rm pom.xml || die +} + +src_install() { + java-pkg-simple_src_install + java-pkg_dolauncher ${PN} --main org.vafer.jmx.munin.Munin + + exeinto /usr/libexec/munin/plugins + newexe contrib/${PN}.sh ${PN}_ + + dodoc README.md contrib/jmx2munin.cfg/cassandra/nodes_in_cluster + + keepdir /etc/munin/${PN} +} diff --git a/net-analyzer/jmx2munin/metadata.xml b/net-analyzer/jmx2munin/metadata.xml new file mode 100644 index 000000000000..c8115f3cd51c --- /dev/null +++ b/net-analyzer/jmx2munin/metadata.xml @@ -0,0 +1,16 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>java@gentoo.org</email> + <name>Java</name> + </maintainer> + <maintainer type="project"> + <email>sysadmin@gentoo.org</email> + <name>Gentoo Sysadmin Project</name> + </maintainer> + <upstream> + <remote-id type="github">gentoo/jmx2munin</remote-id> + </upstream> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/jnettop/Manifest b/net-analyzer/jnettop/Manifest new file mode 100644 index 000000000000..e46a7709331b --- /dev/null +++ b/net-analyzer/jnettop/Manifest @@ -0,0 +1 @@ +DIST jnettop-0.13.0.tar.gz 131009 BLAKE2B b787d6876199c56af5daeeda55cdd5145ed64268db9066dd2c64c96511ef7bd1c08eb826407d1e488cbd72172fdfc5a2aaaebf81203fb27d2b14c60c3cd3b2ca SHA512 304293cd011ce8556aabf69e91b2e831ac61aa43016bb5b616d24b45805315a815dfba37dfe9f7cd3c637931043d4123b2f46a7637ba1a0b9d30267fe6dcb051 diff --git a/net-analyzer/jnettop/files/jnettop-0.13.0-asneeded.patch b/net-analyzer/jnettop/files/jnettop-0.13.0-asneeded.patch new file mode 100644 index 000000000000..8a43240bb0de --- /dev/null +++ b/net-analyzer/jnettop/files/jnettop-0.13.0-asneeded.patch @@ -0,0 +1,12 @@ +--- a/Makefile.am ++++ b/Makefile.am +@@ -1,8 +1,7 @@ + + + INCLUDES = -I$(top_srcdir)/include @GLIB_CFLAGS@ +-AM_LDFLAGS = @GLIB_LIBS@ @NSL_LIBS@ @SOCKET_LIBS@ +-CFLAGS = -g -O0 ++jnettop_LDADD = @GLIB_LIBS@ @NSL_LIBS@ @SOCKET_LIBS@ + + man_MANS = jnettop.8 + diff --git a/net-analyzer/jnettop/files/jnettop-0.13.0-tinfo.patch b/net-analyzer/jnettop/files/jnettop-0.13.0-tinfo.patch new file mode 100644 index 000000000000..958685cb5c12 --- /dev/null +++ b/net-analyzer/jnettop/files/jnettop-0.13.0-tinfo.patch @@ -0,0 +1,11 @@ +--- a/configure.ac ++++ b/configure.ac +@@ -15,6 +15,8 @@ + AC_HEADER_STDC + AC_CHECK_HEADERS([arpa/inet.h netdb.h netinet/in.h stdlib.h string.h sys/socket.h sys/sockio.h]) + ++PKG_CHECK_MODULES(ncurses,ncurses,[LIBS="$LIBS $ncurses_LIBS"],) ++ + # with definitions + AC_ARG_WITH([ncurses], + AC_HELP_STRING([--without-ncurses], [don't use ncurses, default is YES when available]), diff --git a/net-analyzer/jnettop/jnettop-0.13.0-r1.ebuild b/net-analyzer/jnettop/jnettop-0.13.0-r1.ebuild new file mode 100644 index 000000000000..e0c718000574 --- /dev/null +++ b/net-analyzer/jnettop/jnettop-0.13.0-r1.ebuild @@ -0,0 +1,46 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 +inherit autotools eutils + +DESCRIPTION="A top like console network traffic visualiser" +HOMEPAGE="http://jnettop.kubs.info/" +SRC_URI="http://jnettop.kubs.info/dist/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="amd64 ~arm ~ppc ~sparc x86 ~amd64-linux ~x86-linux" +IUSE="berkdb ncurses syslog" + +RDEPEND=" + net-libs/libpcap + >=dev-libs/glib-2.0.1 + berkdb? ( =sys-libs/db-4* ) + ncurses? ( sys-libs/ncurses ) + syslog? ( virtual/logger ) +" + +DEPEND="${RDEPEND} + virtual/pkgconfig" + +DOCS=( AUTHORS ChangeLog NEWS README ) + +src_prepare() { + epatch \ + "${FILESDIR}/${P}-asneeded.patch" \ + "${FILESDIR}/${P}-tinfo.patch" + eautoreconf +} + +src_configure() { + econf \ + $(use_with ncurses) \ + $(use_with berkdb db4) \ + $(use_with syslog) +} + +src_install() { + default + newdoc .${PN} ${PN}.dotfile +} diff --git a/net-analyzer/jnettop/metadata.xml b/net-analyzer/jnettop/metadata.xml new file mode 100644 index 000000000000..83be67086977 --- /dev/null +++ b/net-analyzer/jnettop/metadata.xml @@ -0,0 +1,10 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<maintainer type="project"> + <email>netmon@gentoo.org</email> + <name>Gentoo network monitoring and analysis project</name> +</maintainer> +<longdescription>A top like console network traffic visualiser</longdescription> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/kapacitor/Manifest b/net-analyzer/kapacitor/Manifest new file mode 100644 index 000000000000..03dbf0800fc2 --- /dev/null +++ b/net-analyzer/kapacitor/Manifest @@ -0,0 +1,2 @@ +DIST kapacitor-1.4.1.tar.gz 7543899 BLAKE2B 142ea7899be3728d2e857a83beebb8ff32dae6b7a71097de1474878a1728c6597937d03a828746af2464d6406ae80796b11579a10baacb66843bd535f971d940 SHA512 315e01e97f6a89afbbd0e36c17ee64d2744bc8ccce2e318f17ad5fba75599fdc55c303069c32aed07ba73c8ba9cdbacdb76c7ffe0c81681c1ef0be0ba405802e +DIST kapacitor-1.5.1.tar.gz 5668659 BLAKE2B 5caf7a51945d84010f25dcbe198d4a1b7fc21f2ef7036a0489d6274212068937942f0490637a11ab05399d3a95ec1d96f3d42f0a2b3e3b7b4ff1377ef1e220e6 SHA512 6e25f89d9b75c6c14350a189be7bcd4210a331025a4bd0a8fa363dee8abbe8c582013a9c3020e638e9490ded12d70212963dc01bd3570395412641e2911d93f5 diff --git a/net-analyzer/kapacitor/files/kapacitor.confd b/net-analyzer/kapacitor/files/kapacitor.confd new file mode 100644 index 000000000000..d58906ae3e7a --- /dev/null +++ b/net-analyzer/kapacitor/files/kapacitor.confd @@ -0,0 +1,12 @@ +#The convention in this file is to show the default setting commented +#out. +#To change the setting, uncomment it then change the value. + +#This is the kapacitor error log: +#error_log="/var/log/kapacitor/kapacitor.log" + +#This is the kapacitor output log: +#output_log="/dev/null" + +# Extra options to pass to kapacitord: +#kapacitor_opts="" diff --git a/net-analyzer/kapacitor/files/kapacitor.rc b/net-analyzer/kapacitor/files/kapacitor.rc new file mode 100644 index 000000000000..b89d0b1cbf92 --- /dev/null +++ b/net-analyzer/kapacitor/files/kapacitor.rc @@ -0,0 +1,35 @@ +#!/sbin/openrc-run + +config=/etc/kapacitor/kapacitor.conf +pidfile=/var/run/kapacitord.pid +command=/usr/bin/kapacitord +command_args="-config ${config} ${kapacitor_opts}" +command_background=yes +make_pidfile=yes +command_user="kapacitor:kapacitor" + +# Logging +error_log="${error_log:-/var/log/kapacitor/kapacitor.err}" +output_log="${output_log:-/dev/null}" + +# Max open files +rc_ulimit="-n 65536" + +depend() { + after net +} + +start_pre() { + # Check if config file exist + if [ ! -r ${config} ]; then + eerror "config file ${config} doesn't exist" + return 1 + fi + if [ ! -f "$error_log" ]; then + mkdir -p "$(dirname $error_log)" + fi + if [ ! -f "$output_log" ]; then + mkdir -p "$(dirname $output_log)" + fi + return 0 +} diff --git a/net-analyzer/kapacitor/kapacitor-1.4.1-r1.ebuild b/net-analyzer/kapacitor/kapacitor-1.4.1-r1.ebuild new file mode 100644 index 000000000000..dd499480fbdd --- /dev/null +++ b/net-analyzer/kapacitor/kapacitor-1.4.1-r1.ebuild @@ -0,0 +1,48 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 +EGO_PN=github.com/influxdata/kapacitor + +inherit golang-build golang-vcs-snapshot systemd user + +DESCRIPTION="Monitoring, processing and alerting on time series data" +HOMEPAGE="https://www.influxdata.com" +SRC_URI="https://${EGO_PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="MIT" +SLOT="0" +KEYWORDS="~amd64" +IUSE="" + +pkg_setup() { + enewgroup kapacitor + enewuser kapacitor -1 -1 /var/lib/kapacitor kapacitor +} + +src_compile() { + pushd "src/${EGO_PN}" > /dev/null || die + set -- env GOPATH="${S}" go build -v -work -x ./... + echo "$@" + "$@" || die "compile failed" + popd > /dev/null +} + +src_install() { + pushd "src/${EGO_PN}" > /dev/null || die + set -- env GOPATH="${S}" go install -v -work -x ./... + echo "$@" + "$@" || die + dobin "${S}"/bin/kapacitor{,d} + insinto /etc/kapacitor +doins etc/kapacitor/kapacitor.conf +keepdir /etc/kapacitor/load + insinto /etc/logrotate.d + doins etc/logrotate.d/kapacitor + systemd_dounit scripts/kapacitor.service + keepdir /var/log/kapacitor + fowners kapacitor:kapacitor /var/log/kapacitor + newconfd "${FILESDIR}"/kapacitor.confd kapacitor + newinitd "${FILESDIR}"/kapacitor.rc kapacitor + popd > /dev/null || die +} diff --git a/net-analyzer/kapacitor/kapacitor-1.5.1.ebuild b/net-analyzer/kapacitor/kapacitor-1.5.1.ebuild new file mode 100644 index 000000000000..dd499480fbdd --- /dev/null +++ b/net-analyzer/kapacitor/kapacitor-1.5.1.ebuild @@ -0,0 +1,48 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 +EGO_PN=github.com/influxdata/kapacitor + +inherit golang-build golang-vcs-snapshot systemd user + +DESCRIPTION="Monitoring, processing and alerting on time series data" +HOMEPAGE="https://www.influxdata.com" +SRC_URI="https://${EGO_PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="MIT" +SLOT="0" +KEYWORDS="~amd64" +IUSE="" + +pkg_setup() { + enewgroup kapacitor + enewuser kapacitor -1 -1 /var/lib/kapacitor kapacitor +} + +src_compile() { + pushd "src/${EGO_PN}" > /dev/null || die + set -- env GOPATH="${S}" go build -v -work -x ./... + echo "$@" + "$@" || die "compile failed" + popd > /dev/null +} + +src_install() { + pushd "src/${EGO_PN}" > /dev/null || die + set -- env GOPATH="${S}" go install -v -work -x ./... + echo "$@" + "$@" || die + dobin "${S}"/bin/kapacitor{,d} + insinto /etc/kapacitor +doins etc/kapacitor/kapacitor.conf +keepdir /etc/kapacitor/load + insinto /etc/logrotate.d + doins etc/logrotate.d/kapacitor + systemd_dounit scripts/kapacitor.service + keepdir /var/log/kapacitor + fowners kapacitor:kapacitor /var/log/kapacitor + newconfd "${FILESDIR}"/kapacitor.confd kapacitor + newinitd "${FILESDIR}"/kapacitor.rc kapacitor + popd > /dev/null || die +} diff --git a/net-analyzer/kapacitor/metadata.xml b/net-analyzer/kapacitor/metadata.xml new file mode 100644 index 000000000000..819aad9b09d4 --- /dev/null +++ b/net-analyzer/kapacitor/metadata.xml @@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>williamh@gentoo.org</email> + <name>William Hubbs</name> + </maintainer> + <longdescription lang="en"> + Open source framework for processing, monitoring and alerting on + time series data. + </longdescription> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/knocker/Manifest b/net-analyzer/knocker/Manifest new file mode 100644 index 000000000000..587431e73fe1 --- /dev/null +++ b/net-analyzer/knocker/Manifest @@ -0,0 +1 @@ +DIST knocker-0.7.1.tar.gz 72132 BLAKE2B a6eb8e37354df630481f809c77e98f1c9dab3290b8a34e1a3c7bbfc5f3d0f41b9a1f97a8f5a8afef7e1ec0c5afa444e908b8d50eeaedf08a384e86cda1c7b182 SHA512 e65d615235328c027e1c6179a11bee186fa3d173205850e8b9fac591819e344de770d968c2667f1a18bef88cf90422c357bf76b9d05a8915629977cb8e334cc2 diff --git a/net-analyzer/knocker/files/knocker-0.7.1-fency.patch b/net-analyzer/knocker/files/knocker-0.7.1-fency.patch new file mode 100644 index 000000000000..6051d87b2e68 --- /dev/null +++ b/net-analyzer/knocker/files/knocker-0.7.1-fency.patch @@ -0,0 +1,149 @@ +--- a/ChangeLog ++++ b/ChangeLog +@@ -23,7 +23,7 @@ + .conf in the user ~/.knocker subdirectory. + + 13 May 2002 +- - --no-fency (-nf for short) option added. This switch tells knocker to show ++ - --no-fancy (-nf for short) option added. This switch tells knocker to show + the output in a "polite" way. All the lines and stuffs shown in the default + mode, will not be displayed using this option. + +--- a/src/knocker_args.c ++++ b/src/knocker_args.c +@@ -82,7 +82,7 @@ + fprintf (stdout, "Extra options:\n"); + fprintf (stdout, " %s, %s quiet mode (no console output, logs to file)\n", QUIET_MODE_SHORT_OPT, QUIET_MODE_LONG_OPT); + fprintf (stdout, " %s, %s <logfile> log scan results to the specified file\n", ENABLE_LOGFILE_SHORT_OPT, ENABLE_LOGFILE_LONG_OPT); +- fprintf (stdout, " %s, %s disable fency output\n", NO_FENCY_SHORT_OPT, NO_FENCY_LONG_OPT); ++ fprintf (stdout, " %s, %s disable fancy output\n", NO_FANCY_SHORT_OPT, NO_FANCY_LONG_OPT); + fprintf (stdout, " %s, %s disable colored output\n", NO_COLORS_SHORT_OPT, NO_COLORS_LONG_OPT); + fprintf (stdout, "\n"); + fprintf (stdout, " %s let you configure %s\n", CONFIGURE_LONG_OPT, PACKAGE); +@@ -111,7 +111,7 @@ + args->logfile = logfile; + args->quiet = quiet; + args->colors = colors; +- args->fency = TRUE; /* true by default */ ++ args->fancy = TRUE; /* true by default */ + + return 0; + } +@@ -189,10 +189,10 @@ + } + return (0); /* we should have all arguments here */ + } +- else if ((!strcmp (argv[i], NO_FENCY_SHORT_OPT)) || (!strcmp (argv[i], NO_FENCY_LONG_OPT))) ++ else if ((!strcmp (argv[i], NO_FANCY_SHORT_OPT)) || (!strcmp (argv[i], NO_FANCY_LONG_OPT))) + { +- /* Disable fency output */ +- args->fency = FALSE; ++ /* Disable fancy output */ ++ args->fancy = FALSE; + } + else if ((!strcmp (argv[i], NO_COLORS_SHORT_OPT)) || (!strcmp (argv[i], NO_COLORS_LONG_OPT))) + { +--- a/src/knocker_output.c ++++ b/src/knocker_output.c +@@ -48,7 +48,7 @@ + { + time_t timenow; + +- if (!knocker_args.fency) ++ if (!knocker_args.fancy) + return 0; + + +@@ -104,7 +104,7 @@ + */ + void knocker_output_host_info (const char *hostname_str, const char *hostip_str) + { +- if (knocker_args.fency) ++ if (knocker_args.fancy) + { + knocker_term_color_fprintf (knocker_output_fp, " - ", KNOCKER_COLOR_1, KNOCKER_COLOR_1_ATTR); + knocker_term_color_fprintf (knocker_output_fp, "hostname to scan: ", KNOCKER_COLOR_1, KNOCKER_COLOR_1_ATTR); +@@ -134,7 +134,7 @@ + */ + void knocker_output_resolve_error (char *hostname_str) + { +- if (knocker_args.fency) ++ if (knocker_args.fancy) + { + knocker_term_color_fprintf (knocker_output_fp, " - ", KNOCKER_COLOR_1, KNOCKER_COLOR_1_ATTR); + knocker_term_color_fprintf (knocker_output_fp, "failed to resolve given hostname/IP: ", KNOCKER_COLOR_1, KNOCKER_COLOR_1_ATTR); +@@ -157,7 +157,7 @@ + */ + void knocker_output_ports_info (int sp, int ep) + { +- if (!knocker_args.fency) ++ if (!knocker_args.fancy) + { + knocker_term_color_fprintf (knocker_output_fp, "\n", KNOCKER_COLOR_2, KNOCKER_COLOR_2_ATTR); + return; +@@ -183,7 +183,7 @@ + */ + void knocker_output_open_port (int port, char *service_str) + { +- if (knocker_args.fency) ++ if (knocker_args.fancy) + { + knocker_term_color_fprintf (knocker_output_fp, " -=[ ", KNOCKER_COLOR_1, KNOCKER_COLOR_1_ATTR); + knocker_term_color_intfprintf (knocker_output_fp, port, KNOCKER_COLOR_2, KNOCKER_COLOR_2_ATTR); +@@ -216,7 +216,7 @@ + */ + void knocker_output_results (char *hostname_str, char *hostname_ip, int tot_ps, int open_ps, char *secs) + { +- if (knocker_args.fency) ++ if (knocker_args.fancy) + { + knocker_term_color_fprintf (knocker_output_fp, "\n", KNOCKER_COLOR_2, KNOCKER_COLOR_2_ATTR); + knocker_term_color_fprintf (knocker_output_fp, "+=- - - - - - - - - - - - - - - - - - - - - - - - - - - - ", +--- a/src/knocker_main.c ++++ b/src/knocker_main.c +@@ -75,7 +75,7 @@ + + knocker_core_init_portscan_data (&pscan_data); + +- if (knocker_args.fency) ++ if (knocker_args.fancy) + knocker_term_clear (); + + knocker_output_open (); +--- a/src/knocker_args.h ++++ b/src/knocker_args.h +@@ -53,9 +53,9 @@ + #define QUIET_MODE_SHORT_OPT "-q" + #define QUIET_MODE_LONG_OPT "--quiet" + +- /* option to disable fency cool out put */ +-#define NO_FENCY_SHORT_OPT "-nf" +-#define NO_FENCY_LONG_OPT "--no-fency" ++ /* option to disable fancy cool out put */ ++#define NO_FANCY_SHORT_OPT "-nf" ++#define NO_FANCY_LONG_OPT "--no-fancy" + + /* option to disable colored out put */ + #define NO_COLORS_SHORT_OPT "-nc" +@@ -88,7 +88,7 @@ + int logfile; /* log to file TRUE,FALSE */ + int quiet; /* quiet mode TRUE,FALSE */ + int colors; /* no colors, TRUE,FALSE */ +- int fency; /* fency output, TRUE, FALSE */ ++ int fancy; /* fancy output, TRUE, FALSE */ + int win32_frontend; + } knocker_args_t; + +--- a/docs/knocker.1 ++++ b/docs/knocker.1 +@@ -38,8 +38,8 @@ + \fB\-lf\fr, \fB\-\-logfile <logfile>\fR + log the results to a specified file. + .TP +-\fB\-nf\fr, \fB\-\-no-fency\fR +-disable fency output ++\fB\-nf\fr, \fB\-\-no-fancy\fR ++disable fancy output + .TP + \fB\-nc\fr, \fB\-\-no-colors\fR + disable colored output diff --git a/net-analyzer/knocker/files/knocker-0.7.1-fno-common.patch b/net-analyzer/knocker/files/knocker-0.7.1-fno-common.patch new file mode 100644 index 000000000000..0b5247a653a4 --- /dev/null +++ b/net-analyzer/knocker/files/knocker-0.7.1-fno-common.patch @@ -0,0 +1,215 @@ +--- a/src/knocker_args.c ++++ b/src/knocker_args.c +@@ -34,6 +34,7 @@ + + static int _have_last_host = 0; /* tells if we've got the host with the --last-host option */ + ++knocker_args_t knocker_args; /* command line arguments structure */ + + /* + ============================================================================ +--- a/src/knocker_args.h ++++ b/src/knocker_args.h +@@ -93,7 +93,7 @@ + } knocker_args_t; + + +-knocker_args_t knocker_args; /* command line arguments structure */ ++extern knocker_args_t knocker_args; /* command line arguments structure */ + + /* + Initialize a knocker_args_t type of structure +--- a/src/knocker_conf.c ++++ b/src/knocker_conf.c +@@ -31,6 +31,11 @@ + #include "knocker_user.h" + #include "knocker_conf.h" + ++int KNOCKER_USER_COLOR; ++int KNOCKER_COLOR_1; ++int KNOCKER_COLOR_2; ++int KNOCKER_COLOR_1_ATTR; ++int KNOCKER_COLOR_2_ATTR; + + /* + ============================================================================ +--- a/src/knocker_conf.h ++++ b/src/knocker_conf.h +@@ -46,11 +46,11 @@ + /* The actual values variable */ + /* these values are read from the conf file */ + /* by the knocker_conf_parse function */ +-int KNOCKER_USER_COLOR; +-int KNOCKER_COLOR_1; +-int KNOCKER_COLOR_2; +-int KNOCKER_COLOR_1_ATTR; +-int KNOCKER_COLOR_2_ATTR; ++extern int KNOCKER_USER_COLOR; ++extern int KNOCKER_COLOR_1; ++extern int KNOCKER_COLOR_2; ++extern int KNOCKER_COLOR_1_ATTR; ++extern int KNOCKER_COLOR_2_ATTR; + + void knocker_conf_configure ( void ); + int knocker_conf_parse ( void ); +--- a/src/knocker_core.c ++++ b/src/knocker_core.c +@@ -50,6 +50,9 @@ + static void knocker_core_free_host_ip_string (knocker_core_host_t * hinfo); + + ++char *knocker_core_last_hostip; /* string of the last resolved host ip address */ ++char *knocker_core_last_hostname; /* string of the last used host name */ ++char *knocker_core_last_service; /* string of the last service */ + + /* + ============================================================================ +--- a/src/knocker_core.h ++++ b/src/knocker_core.h +@@ -164,9 +164,9 @@ + static const char knocker_core_author_email[] = _KNOCKER_CORE_AUTHOR_EMAIL_; + + /* allocated and deallocated within knocker_core_init, knocker_core_quit */ +-char *knocker_core_last_hostip; /* string of the last resolved host ip address */ +-char *knocker_core_last_hostname; /* string of the last used host name */ +-char *knocker_core_last_service; /* string of the last service */ ++extern char *knocker_core_last_hostip; /* string of the last resolved host ip address */ ++extern char *knocker_core_last_hostname; /* string of the last used host name */ ++extern char *knocker_core_last_service; /* string of the last service */ + + + int knocker_core_init ( void ); +--- a/src/knocker_led.c ++++ b/src/knocker_led.c +@@ -50,6 +50,9 @@ + #define LED_VALUE_SCR LED_SCR + + ++knocker_led_t knocker_led_status; ++int ledt; ++ + #ifndef NO_LED + static int initialized = 0; + #endif +--- a/src/knocker_led.h ++++ b/src/knocker_led.h +@@ -65,7 +65,7 @@ + int sequence; /* used in knocker_led_sequence() only */ + } knocker_led_t; + +-knocker_led_t knocker_led_status; ++extern knocker_led_t knocker_led_status; + + void knocker_led_turn_on (int led); + void knocker_led_turn_off (int led); +@@ -75,7 +75,7 @@ + void knocker_led_reset ( void ); + + #define led_delay 1 +-int ledt; ++extern int ledt; + + #endif /* _KNOCKER_LED_H_ */ + +--- a/src/knocker_log.c ++++ b/src/knocker_log.c +@@ -30,7 +30,7 @@ + const char knocker_log_header[] = + "+-----------------------------------------------------------------------------+\n|--=| k n o c k e r -- t h e -- n e t -- p o r t s c a n n e r |=-=[logfile]=-|\n+-----------------------------------------------------------------------------+\n"; + +-char *knocker_time; ++FILE *knocker_log_fp; + + /* + ============================================================================ +--- a/src/knocker_log.h ++++ b/src/knocker_log.h +@@ -33,7 +33,7 @@ + #include <string.h> + + #define KNOCKER_LOG_FILE "knocker_scan.log" +-FILE *knocker_log_fp; ++extern FILE *knocker_log_fp; + + int knocker_log_open (const char *filename); + void knocker_log_host_info (char *hostname_str, char *hostip_str); +--- a/src/knocker_output.c ++++ b/src/knocker_output.c +@@ -38,8 +38,6 @@ + }; + + +-char *knocker_time; +- + /* + ============================================================================ + ============================================================================ +--- a/src/knocker_services.c ++++ b/src/knocker_services.c +@@ -28,6 +28,9 @@ + #include "knocker_services.h" + #include "knocker_core.h" + ++int knocker_core_services_db_init; ++char *knocker_core_services_db[SERVICES_DB_TOTAL_SERVICES]; ++ + /* this following list of services has been automatically + generated from /etc/services */ + +--- a/src/knocker_services.h ++++ b/src/knocker_services.h +@@ -29,9 +29,9 @@ + + #define SERVICES_DB_TOTAL_SERVICES 30000 /* was erroneously 231 */ + +-int knocker_core_services_db_init; ++extern int knocker_core_services_db_init; + +-char *knocker_core_services_db[SERVICES_DB_TOTAL_SERVICES]; ++extern char *knocker_core_services_db[SERVICES_DB_TOTAL_SERVICES]; + + int init_knocker_core_services_db ( void ); + void free_knocker_core_services_db ( void ); +--- a/src/knocker_time.c ++++ b/src/knocker_time.c +@@ -40,6 +40,7 @@ + static struct timeval timer_start; + #endif + ++char *knocker_time; + + void knocker_time_start_timer (void) + { +--- a/src/knocker_time.h ++++ b/src/knocker_time.h +@@ -30,6 +30,8 @@ + + #include <time.h> + ++extern char *knocker_time; ++ + void knocker_time_start_timer (void); + double knocker_time_get_ticks (void); + void knocker_time_delay (unsigned long ms); +--- a/src/knocker_user.c ++++ b/src/knocker_user.c +@@ -41,6 +41,8 @@ + #define KNOCKER_LASTSCAN_FILE "lastscan" + #define KNOCKER_TOKEN "|" + ++knocker_user_t knocker_user; ++ + static int _dir_exists (const char *path); + static int _dir_create (const char *path); + static int _file_exists (const char *path); +--- a/src/knocker_user.h ++++ b/src/knocker_user.h +@@ -30,7 +30,7 @@ + int super; /* user is root or not */ + } knocker_user_t; + +-knocker_user_t knocker_user; ++extern knocker_user_t knocker_user; + + int knocker_user_is_root ( void ); + char *knocker_user_get_username ( void ); diff --git a/net-analyzer/knocker/files/knocker-0.7.1-free.patch b/net-analyzer/knocker/files/knocker-0.7.1-free.patch new file mode 100644 index 000000000000..5381d2fd83e3 --- /dev/null +++ b/net-analyzer/knocker/files/knocker-0.7.1-free.patch @@ -0,0 +1,30 @@ +--- a/src/knocker_conf.c ++++ b/src/knocker_conf.c +@@ -223,6 +223,8 @@ + { + char *tmpp = malloc (strlen (line)); + char *p = malloc (strlen (line)); ++ char *tmpp_orig = tmpp; ++ char *p_orig = p; + + /* Check if the option is present in the line */ + tmpp = strstr (line, opt); +@@ -234,7 +236,7 @@ + + if (!_isblank (*tmpp) || *tmpp != KNOCKER_OPTION_TOKEN) + { +- free (tmpp); ++ free (tmpp_orig); + return 0; + } + +@@ -247,8 +249,7 @@ + + strcpy (value, p); + +- /* free(p); this cause knocker to segfault */ +- /* well I have to know why... */ ++ free(p_orig); + + return 1; + } diff --git a/net-analyzer/knocker/files/knocker-0.7.1-knocker_user_is_root.patch b/net-analyzer/knocker/files/knocker-0.7.1-knocker_user_is_root.patch new file mode 100644 index 000000000000..d93136b2f255 --- /dev/null +++ b/net-analyzer/knocker/files/knocker-0.7.1-knocker_user_is_root.patch @@ -0,0 +1,11 @@ +--- a/src/knocker_user.c ++++ b/src/knocker_user.c +@@ -82,7 +82,7 @@ + _dir_create (user->dir); + } + +- if (knocker_user_is_root) ++ if (knocker_user_is_root()) + user->super = 1; + else + user->super = 0; diff --git a/net-analyzer/knocker/knocker-0.7.1-r3.ebuild b/net-analyzer/knocker/knocker-0.7.1-r3.ebuild new file mode 100644 index 000000000000..0e56cfddb098 --- /dev/null +++ b/net-analyzer/knocker/knocker-0.7.1-r3.ebuild @@ -0,0 +1,26 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +inherit toolchain-funcs + +DESCRIPTION="Knocker is an easy to use security port scanner written in C" +HOMEPAGE="http://knocker.sourceforge.net" +SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="amd64 ppc x86" + +PATCHES=( + "${FILESDIR}"/${P}-fency.patch + "${FILESDIR}"/${P}-free.patch + "${FILESDIR}"/${P}-knocker_user_is_root.patch + "${FILESDIR}"/${P}-fno-common.patch +) +DOCS=( AUTHORS BUGS ChangeLog NEWS README TO-DO ) + +src_configure() { + tc-export CC + default +} diff --git a/net-analyzer/knocker/metadata.xml b/net-analyzer/knocker/metadata.xml new file mode 100644 index 000000000000..6dff9f6d2a07 --- /dev/null +++ b/net-analyzer/knocker/metadata.xml @@ -0,0 +1,12 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>netmon@gentoo.org</email> + <name>Gentoo network monitoring and analysis project</name> + </maintainer> + <upstream> + <remote-id type="sourceforge">knocker</remote-id> + </upstream> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/labrea/Manifest b/net-analyzer/labrea/Manifest new file mode 100644 index 000000000000..6dd41f6725ff --- /dev/null +++ b/net-analyzer/labrea/Manifest @@ -0,0 +1 @@ +DIST labrea-2.5-stable-1.tar.gz 210494 BLAKE2B 3db2f4c014c578446fd9d6303f8c17245d3d9a7e8e481bf64195693f21eb30b9e0e2d6cf59ae124982e358d4aad2d22654ee46544957ab783f33a13c951d6a3d SHA512 63523f59e9e6ca31d2a5ea781f7b7087e7e41835aec24cd8cbf1cf7b65893fb1cedb2b13aa5fcfab458375ef27f5521a9ab88a71734b7317edf8eda2746c566c diff --git a/net-analyzer/labrea/files/labrea-2.5-pcap_open.patch b/net-analyzer/labrea/files/labrea-2.5-pcap_open.patch new file mode 100644 index 000000000000..7c918dfa15f3 --- /dev/null +++ b/net-analyzer/labrea/files/labrea-2.5-pcap_open.patch @@ -0,0 +1,42 @@ +--- a/src/pcaputil.c ++++ b/src/pcaputil.c +@@ -52,7 +52,7 @@ + #include "pcaputil.h" + + pcap_t * +-pcap_open(char *device) ++labrea_pcap_open(char *device) + { + char ebuf[PCAP_ERRBUF_SIZE]; + pcap_t *pcap; +--- a/src/lbio.c ++++ b/src/lbio.c +@@ -190,7 +190,7 @@ + /* + * Open the WinPcap device for sniffing + */ +- if ((io.pcap = pcap_open(io.adapter_name_list[j])) == NULL) { ++ if ((io.pcap = labrea_pcap_open(io.adapter_name_list[j])) == NULL) { + warnx("*** Couldn't open WinPcap adapter" ); + return(-1); + } +@@ -286,7 +286,7 @@ + util_clean_exit(1); + + } else { /* open Unix pcap device for sniffing */ +- if ((io.pcap = pcap_open(io.ifent->intf_name)) == NULL) { ++ if ((io.pcap = labrea_pcap_open(io.ifent->intf_name)) == NULL) { + warnx("*** Couldn't open pcap device for sniffing" ); + util_clean_exit(1); + } +--- a/inc/pcaputil.h ++++ b/inc/pcaputil.h +@@ -15,7 +15,7 @@ + #endif + + +-pcap_t * pcap_open(char *device); ++pcap_t * labrea_pcap_open(char *device); + int pcap_dloff(pcap_t *pcap); + int pcap_filter(pcap_t *pcap, const char *fmt, ...); + void pcap_stat (pcap_t *pd); diff --git a/net-analyzer/labrea/files/labrea-2.5-stable-1-incdir.patch b/net-analyzer/labrea/files/labrea-2.5-stable-1-incdir.patch new file mode 100644 index 000000000000..54293a64b572 --- /dev/null +++ b/net-analyzer/labrea/files/labrea-2.5-stable-1-incdir.patch @@ -0,0 +1,11 @@ +--- a/src/Makefile.am ++++ b/src/Makefile.am +@@ -2,7 +2,7 @@ + + + +-AM_CPPFLAGS = -I../inc -I- @DNETINC@ @PCAPINC@ ++AM_CPPFLAGS = -iquote../inc @DNETINC@ @PCAPINC@ -idirafter/usr/include/asm + + sbin_PROGRAMS = labrea + diff --git a/net-analyzer/labrea/labrea-2.5-r2.ebuild b/net-analyzer/labrea/labrea-2.5-r2.ebuild new file mode 100644 index 000000000000..cdbff85668a0 --- /dev/null +++ b/net-analyzer/labrea/labrea-2.5-r2.ebuild @@ -0,0 +1,39 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +inherit autotools eutils + +DESCRIPTION="'Sticky' Honeypot and IDS" +HOMEPAGE="http://labrea.sourceforge.net/" +SRC_URI="mirror://sourceforge/${PN}/${P}-stable-1.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="amd64 ~ppc x86" + +DEPEND="net-libs/libpcap + >=dev-libs/libdnet-1.7" +RDEPEND="${DEPEND}" + +MY_P="${P}-stable-1" +S=${WORKDIR}/${MY_P} + +DOCS=( AUTHORS ChangeLog README TODO NEWS ) + +src_prepare() { + epatch "${FILESDIR}"/${P}-stable-1-incdir.patch + eautoreconf +} + +src_install() { + default + newdoc INSTALL README.first +} + +pkg_postinst() { + ewarn "Before using this package READ the INSTALL and README" + ewarn "as the author states that it can cause serious problems on your network." + +} diff --git a/net-analyzer/labrea/labrea-2.5-r3.ebuild b/net-analyzer/labrea/labrea-2.5-r3.ebuild new file mode 100644 index 000000000000..1d43736622c7 --- /dev/null +++ b/net-analyzer/labrea/labrea-2.5-r3.ebuild @@ -0,0 +1,45 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 +inherit autotools + +DESCRIPTION="'Sticky' Honeypot and IDS" +HOMEPAGE="http://labrea.sourceforge.net/" +SRC_URI="mirror://sourceforge/${PN}/${P}-stable-1.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~ppc ~x86" + +DEPEND=" + net-libs/libpcap + >=dev-libs/libdnet-1.7 +" +RDEPEND=" + ${DEPEND} +" + +MY_P="${P}-stable-1" +S=${WORKDIR}/${MY_P} + +DOCS=( AUTHORS ChangeLog README TODO NEWS ) +PATCHES=( + "${FILESDIR}"/${P}-stable-1-incdir.patch + "${FILESDIR}"/${P}-pcap_open.patch +) + +src_prepare() { + default + eautoreconf +} + +src_install() { + default + newdoc INSTALL README.first +} + +pkg_postinst() { + ewarn "Before using this package READ the INSTALL and README" + ewarn "as the author states that it can cause serious problems on your network" +} diff --git a/net-analyzer/labrea/metadata.xml b/net-analyzer/labrea/metadata.xml new file mode 100644 index 000000000000..6798fda2ed1b --- /dev/null +++ b/net-analyzer/labrea/metadata.xml @@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>netmon@gentoo.org</email> + <name>Gentoo network monitoring and analysis project</name> + </maintainer> + <longdescription>'Sticky' Honeypot and IDS</longdescription> + <upstream> + <remote-id type="sourceforge">labrea</remote-id> + </upstream> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/lft/Manifest b/net-analyzer/lft/Manifest new file mode 100644 index 000000000000..c110350415b4 --- /dev/null +++ b/net-analyzer/lft/Manifest @@ -0,0 +1,5 @@ +DIST lft-3.77.tar.gz 376369 BLAKE2B be518167608896a43b7e2ef1ca478f3fa9a9ced58737e607af348bd8929a2890356dc6041ce3ea9fa3273a954d4df151a4c6ff5fc5a0e26e25b3849bf83aac5d SHA512 b06fa50cbccb40d275ac604b86c6aed4ee00700cde38fd579de06bb577280f154d0173c4788920410a5c2e0c8ed20d7adf07f15d0b98cf5ad4ea422651df60f1 +DIST lft-3.79.tar.gz 376655 BLAKE2B 4c3affe00a09befc00029029a1da5d530d08bce317e616e7d996a8e31d22632cf43adbe519f4789313b59dc01f4c36d19860effd561b4f691eadcac05c935d6e SHA512 83f35cb24966467a7da180ca8ac9d642e7ca6267a14e752a813f172956554c3d4b278a450d230535c15db1b14d415dca752ad05ed1cec8c1c7cf4953b90a646d +DIST lft-3.8.tar.gz 376731 BLAKE2B e78e6d32cdaff8864e13477522dac92953d7ba44cb7d64e327eeb126411d6f6c022fe1e2011377df28bc948ae75193d1de2801ee12edc42a5cf70e2b56f5e8e5 SHA512 13ea176362096cc8c20500d61969483642f5d003263b529ec8d601786f621341107859510f9cafa5d365417beafce897bcc9cd631171e291ca3dc07fec1bd483 +DIST lft-3.9.tar.gz 377008 BLAKE2B ee56fde8ea25eddc9d7b7860c55f5f9d90a867fd54b5169fdfffd9c7276e38ed9f3855480472c0ed51e53db608e16a0f462f315c0e4b10794b69daab00aeb8b8 SHA512 9d95644eaa61a295d15381c35a8130642e3299a6e90a73bf4a1f369a3b9d8eee648497638f36f0ed5ae970d0307420ba30dbe4ac865767923fd618fbccddc806 +DIST lft-3.91.tar.gz 377135 BLAKE2B 6b67438738ebab46e5c6c79c17f074042535e9eecb80827562fb6ca6550118ecb3e70118379c4cd0b99611189554fe117ebb3d76580130627b2a21d72c9b5253 SHA512 1d030e2def14330426eef4c81245c4cce5f09c560b65b319199b20d82e967b77a5d4e323e2e64a8c1bcf80d1f87ae871e3f24a7d9cbc19cd7a5be2d3204845e7 diff --git a/net-analyzer/lft/lft-3.77.ebuild b/net-analyzer/lft/lft-3.77.ebuild new file mode 100644 index 000000000000..b79c445424c0 --- /dev/null +++ b/net-analyzer/lft/lft-3.77.ebuild @@ -0,0 +1,26 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +DESCRIPTION="Layer Four Traceroute (LFT) and WhoB" +HOMEPAGE="http://pwhois.org/lft/" +SRC_URI="http://pwhois.org/get/${P}.tar.gz" + +LICENSE="VOSTROM" +SLOT="0" +KEYWORDS="amd64 ppc x86 ~amd64-linux ~x86-linux ~ppc-macos" + +DEPEND=" + net-libs/libpcap +" +RDEPEND=" + ${DEPEND} +" + +DOCS=( CHANGELOG README TODO ) + +src_prepare() { + default + sed -i Makefile.in -e 's:strip:true:g' || die +} diff --git a/net-analyzer/lft/lft-3.79.ebuild b/net-analyzer/lft/lft-3.79.ebuild new file mode 100644 index 000000000000..58a145bd7256 --- /dev/null +++ b/net-analyzer/lft/lft-3.79.ebuild @@ -0,0 +1,26 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +DESCRIPTION="Layer Four Traceroute (LFT) and WhoB" +HOMEPAGE="http://pwhois.org/lft/" +SRC_URI="http://pwhois.org/get/${P}.tar.gz" + +LICENSE="VOSTROM" +SLOT="0" +KEYWORDS="~amd64 ~ppc ~x86 ~amd64-linux ~x86-linux ~ppc-macos" + +DEPEND=" + net-libs/libpcap +" +RDEPEND=" + ${DEPEND} +" + +DOCS=( CHANGELOG README TODO ) + +src_prepare() { + default + sed -i Makefile.in -e 's:strip:true:g' || die +} diff --git a/net-analyzer/lft/lft-3.80.ebuild b/net-analyzer/lft/lft-3.80.ebuild new file mode 100644 index 000000000000..bc7acaa2b658 --- /dev/null +++ b/net-analyzer/lft/lft-3.80.ebuild @@ -0,0 +1,27 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +DESCRIPTION="Layer Four Traceroute (LFT) and WhoB" +HOMEPAGE="http://pwhois.org/lft/" +SRC_URI="http://pwhois.org/get/${P/0}.tar.gz" + +LICENSE="VOSTROM" +SLOT="0" +KEYWORDS="~amd64 ~ppc ~x86 ~amd64-linux ~x86-linux ~ppc-macos" + +DEPEND=" + net-libs/libpcap +" +RDEPEND=" + ${DEPEND} +" +S=${WORKDIR}/${P/0} + +DOCS=( CHANGELOG README TODO ) + +src_prepare() { + default + sed -i Makefile.in -e 's:strip:true:g' || die +} diff --git a/net-analyzer/lft/lft-3.90.ebuild b/net-analyzer/lft/lft-3.90.ebuild new file mode 100644 index 000000000000..d874cf1a0c8c --- /dev/null +++ b/net-analyzer/lft/lft-3.90.ebuild @@ -0,0 +1,30 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +DESCRIPTION="Layer Four Traceroute (LFT) and WhoB" +HOMEPAGE="http://pwhois.org/lft/" +SRC_URI="http://pwhois.org/get/${P/0}.tar.gz" + +LICENSE="VOSTROM" +SLOT="0" +KEYWORDS="~amd64 ~ppc ~x86 ~amd64-linux ~x86-linux ~ppc-macos" + +DEPEND=" + net-libs/libpcap +" +RDEPEND=" + ${DEPEND} +" +S=${WORKDIR}/${P/0} + +DOCS=( CHANGELOG README TODO ) + +src_prepare() { + sed -i -e 's:strip:true:g' Makefile.in || die + sed -i \ + -e 's|_BSD_SOURCE|_DEFAULT_SOURCE|g' \ + configure config/acconfig.h.in || die + default +} diff --git a/net-analyzer/lft/lft-3.91.ebuild b/net-analyzer/lft/lft-3.91.ebuild new file mode 100644 index 000000000000..3d32b1582d59 --- /dev/null +++ b/net-analyzer/lft/lft-3.91.ebuild @@ -0,0 +1,28 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +DESCRIPTION="Layer Four Traceroute (LFT) and WhoB" +HOMEPAGE="http://pwhois.org/lft/" +SRC_URI="http://pwhois.org/get/${P}.tar.gz" + +LICENSE="VOSTROM" +SLOT="0" +KEYWORDS="~amd64 ~ppc ~x86 ~amd64-linux ~x86-linux ~ppc-macos" + +DEPEND=" + net-libs/libpcap +" +RDEPEND=" + ${DEPEND} +" +DOCS=( CHANGELOG README TODO ) + +src_prepare() { + sed -i -e 's:strip:true:g' Makefile.in || die + sed -i \ + -e 's|_BSD_SOURCE|_DEFAULT_SOURCE|g' \ + configure config/acconfig.h.in || die + default +} diff --git a/net-analyzer/lft/metadata.xml b/net-analyzer/lft/metadata.xml new file mode 100644 index 000000000000..a4d10d29aed2 --- /dev/null +++ b/net-analyzer/lft/metadata.xml @@ -0,0 +1,49 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<maintainer type="project"> +<email>netmon@gentoo.org</email> +<name>Gentoo network monitoring and analysis project</name> +</maintainer> +<longdescription> +(Note that version 3.80 is really 3.8, but released after 3.79.) + +LFT, short for Layer Four Traceroute, is a sort of 'traceroute' that often +works much faster (than the commonly-used Van Jacobson method) and goes through +many configurations of packet-filters (firewalls). More importantly, LFT +implements numerous other features including AS number lookups through several +reliable sources, loose source routing, netblock name lookups, et al. What +makes LFT unique? LFT is the all-in-one traceroute tool because it can launch a +variety of different probes using ICMP, UDP, and TCP protocols, or the RFC1393 +trace method. For example, rather than only launching UDP probes in an attempt +to elicit ICMP "TTL exceeded" from hosts in the path, LFT can send TCP SYN or +FIN probes to target arbitrary services. Then, LFT listens for "TTL exceeded" +messages, TCP RST (reset), and various other interesting heuristics from +firewalls or other gateways in the path. LFT also distinguishes between +TCP-based protocols (source and destination), which make its statistics +slightly more realistic, and gives a savvy user the ability to trace protocol +routes, not just layer-3 (IP) hops. With LFT's verbose output, much can be +discovered about a target network. + +WhoB is a likable whois client (see whois(1)) designed to provide everything a +network engineer needs to know about a routed IP address by typing one line and +reading one line. But even so, it's worth typing a few more lines because WhoB +can do lots of other cool things for you! It can display the origin-ASN based +on the global routing table at that time (according to Prefix WhoIs, RIPE NCC, +or Cymru), the 'origin' ASN registered in the RADB (IRR), the netname and +orgname, etc. By querying pWhoIs, WhoB can even show you all prefixes being +announced by a specific Origin-ASN. WhoB performs the lookups quickly, the +output is easily parsed by automated programs, and it's included as part of the +Layer Four Traceroute (LFT) software package. LFT uses WhoB as a framework (and +you can too, quite easily--see whois.h). Recent LFT releases (as of version +2.5) include WhoB functionality through a standalone "whob" client/command +placed in the LFT binary directory. + + LFT and WhoB continue to evolve and provide more and more useful data to + network engineers and to anyone else that cares how IP datagrams are being + routed. With the advent of smarter firewalls, traffic engineering, QoS, and + per-protocol packet forwarding, LFT and WhoB have become invaluable tools for + many network managers worldwide. +</longdescription> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/lilac/Manifest b/net-analyzer/lilac/Manifest new file mode 100644 index 000000000000..fa04b8612898 --- /dev/null +++ b/net-analyzer/lilac/Manifest @@ -0,0 +1 @@ +DIST lilac-1.0.3.tar.gz 1794493 BLAKE2B 99f89ee232f493afcac541fe22890ed9711e6310b0af959f5e381a0575bbefd9a4607cc651ad62e737f98251b3bc073c38a02d2499bd10e440d8696493c82364 SHA512 bee9ddb7f4adc2199ee804db2d5758bb172f7f18a868206774d54d2ad7b9741a16152dbdd8c8c7cd82e6375428c9d0466bd38e3affdab55bcb574914f0fb813c diff --git a/net-analyzer/lilac/lilac-1.0.3.ebuild b/net-analyzer/lilac/lilac-1.0.3.ebuild new file mode 100644 index 000000000000..cb574a7876cd --- /dev/null +++ b/net-analyzer/lilac/lilac-1.0.3.ebuild @@ -0,0 +1,35 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +inherit eutils webapp + +DESCRIPTION="Web-based configuration tool written to configure Nagios" +HOMEPAGE="http://www.lilacplatform.com" +SRC_URI="mirror://gentoo/${P}.tar.gz" + +LICENSE="GPL-2" +KEYWORDS="~amd64 ~x86" + +RDEPEND=" + >=dev-php/PEAR-PEAR-1.6.1 + >=net-analyzer/nagios-3.0 + >=virtual/mysql-5.0 + dev-lang/php[curl,json,mysql,pcntl,pdo,posix,simplexml] + virtual/httpd-php +" + +src_install() { + webapp_src_preinst + + dodoc INSTALL UPGRADING + rm -f INSTALL UPGRADING + + insinto "${MY_HTDOCSDIR}" + doins -r . + + webapp_configfile "${MY_HTDOCSDIR}"/includes/lilac-conf.php.dist + webapp_serverowned "${MY_HTDOCSDIR}"/includes/lilac-conf.php.dist + webapp_src_install +} diff --git a/net-analyzer/lilac/metadata.xml b/net-analyzer/lilac/metadata.xml new file mode 100644 index 000000000000..bd13a914477c --- /dev/null +++ b/net-analyzer/lilac/metadata.xml @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<maintainer type="project"> + <email>netmon@gentoo.org</email> + <name>Gentoo network monitoring and analysis project</name> +</maintainer> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/linkchecker/Manifest b/net-analyzer/linkchecker/Manifest new file mode 100644 index 000000000000..b02b528ba45e --- /dev/null +++ b/net-analyzer/linkchecker/Manifest @@ -0,0 +1 @@ +DIST linkchecker-9.4.0.tar.gz 489909 BLAKE2B 1c9d9af96778f9d2b542a078ba9da8751d6f7bc170809d5eefef6e8e2d5587e969f1cba3d6ae116b6de981949dd638b0d78fc416ce5055b3156da308b5a95d67 SHA512 3423f710a46d921c4387ffcfe1a8632cb889bcfdb4d56cbabcae87ca41547221e854546efd6e440e798ea85531c34a35f3ab779cd6bc2b6e63095015ad0537ba diff --git a/net-analyzer/linkchecker/files/linkchecker-9.3-bash-completion.patch b/net-analyzer/linkchecker/files/linkchecker-9.3-bash-completion.patch new file mode 100644 index 000000000000..5c7540f0bc85 --- /dev/null +++ b/net-analyzer/linkchecker/files/linkchecker-9.3-bash-completion.patch @@ -0,0 +1,21 @@ + config/linkchecker-completion | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +diff --git a/config/linkchecker-completion b/config/linkchecker-completion +index 5252b3b..0ea3b21 100644 +--- a/config/linkchecker-completion ++++ b/config/linkchecker-completion +@@ -2,7 +2,6 @@ + # Debian Linux system. For other system read the documentation that + # comes with the bash-completion package. + +-have linkchecker && + _linkcheck() { + local cur prev + +@@ -17,4 +16,4 @@ _linkcheck() { + fi + return 0 + } +-[ "$have" ] && complete $filenames -F _linkcheck linkchecker ++complete $filenames -F _linkcheck linkchecker diff --git a/net-analyzer/linkchecker/linkchecker-9.4.0-r1.ebuild b/net-analyzer/linkchecker/linkchecker-9.4.0-r1.ebuild new file mode 100644 index 000000000000..a18fd0556c92 --- /dev/null +++ b/net-analyzer/linkchecker/linkchecker-9.4.0-r1.ebuild @@ -0,0 +1,62 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +PYTHON_COMPAT=( python2_7 ) +PYTHON_REQ_USE="sqlite?" + +inherit bash-completion-r1 distutils-r1 eutils + +DESCRIPTION="Check websites for broken links" +HOMEPAGE="https://github.com/linkcheck/linkchecker" +SRC_URI="https://github.com/linkcheck/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="amd64 x86 ~ppc-macos ~x64-solaris" +IUSE="sqlite" + +RDEPEND=" + dev-python/dnspython[${PYTHON_USEDEP}] + dev-python/pyxdg[${PYTHON_USEDEP}] + >=dev-python/requests-2.2[${PYTHON_USEDEP}] +" +DEPEND="" + +RESTRICT="test" + +python_prepare_all() { + local PATCHES=( + "${FILESDIR}/${PN}-9.3-bash-completion.patch" + ) + + distutils-r1_python_prepare_all +} + +python_install_all() { + delete_gui() { + rm -rf \ + "${ED}"/usr/bin/linkchecker-gui* \ + "${ED}"/$(python_get_sitedir)/linkcheck/gui* || die + } + + DOCS=( + doc/changelog.txt + doc/development.mdwn + doc/python3.txt + doc/upgrading.txt + ) + distutils-r1_python_install_all + + python_foreach_impl delete_gui + rm -f "${ED}"/usr/share/applications/linkchecker*.desktop || die + + newbashcomp config/linkchecker-completion ${PN} +} + +pkg_postinst() { + optfeature "bash-completion support" dev-python/argcomplete[${PYTHON_USEDEP}] + optfeature "Virus scanning" app-antivirus/clamav + optfeature "Geo IP support" dev-python/geoip-python[${PYTHON_USEDEP}] +} diff --git a/net-analyzer/linkchecker/linkchecker-9999.ebuild b/net-analyzer/linkchecker/linkchecker-9999.ebuild new file mode 100644 index 000000000000..32272ea2e2c4 --- /dev/null +++ b/net-analyzer/linkchecker/linkchecker-9999.ebuild @@ -0,0 +1,56 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +PYTHON_COMPAT=( python2_7 ) +PYTHON_REQ_USE="sqlite?" + +EGIT_REPO_URI="https://github.com/linkcheck/linkchecker.git" +inherit bash-completion-r1 distutils-r1 eutils git-r3 + +DESCRIPTION="Check websites for broken links" +HOMEPAGE="https://github.com/linkcheck/linkchecker" +SRC_URI="" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="" +IUSE="sqlite" + +RDEPEND=" + dev-python/dnspython[${PYTHON_USEDEP}] + dev-python/pyxdg[${PYTHON_USEDEP}] + >=dev-python/requests-2.4[${PYTHON_USEDEP}] +" +DEPEND="" + +RESTRICT="test" + +python_prepare_all() { + local PATCHES=( + "${FILESDIR}/${PN}-9.3-bash-completion.patch" + ) + + distutils-r1_python_prepare_all +} + +python_install_all() { + DOCS=( + doc/changelog.txt + doc/development.mdwn + doc/python3.txt + doc/upgrading.txt + ) + distutils-r1_python_install_all + + rm "${ED}"/usr/share/applications/linkchecker.desktop || die + + newbashcomp config/linkchecker-completion ${PN} +} + +pkg_postinst() { + optfeature "bash-completion support" dev-python/argcomplete[${PYTHON_USEDEP}] + optfeature "Virus scanning" app-antivirus/clamav + optfeature "Geo IP support" dev-python/geoip-python[${PYTHON_USEDEP}] +} diff --git a/net-analyzer/linkchecker/metadata.xml b/net-analyzer/linkchecker/metadata.xml new file mode 100644 index 000000000000..44c434e40ac0 --- /dev/null +++ b/net-analyzer/linkchecker/metadata.xml @@ -0,0 +1,12 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <!-- maintainer-needed --> + <use> + <flag name="sqlite">Mozilla Bookmark parsing</flag> + </use> + <upstream> + <remote-id type="pypi">LinkChecker</remote-id> + </upstream> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/macchanger/Manifest b/net-analyzer/macchanger/Manifest new file mode 100644 index 000000000000..622a424b5aeb --- /dev/null +++ b/net-analyzer/macchanger/Manifest @@ -0,0 +1,2 @@ +DIST macchanger-1.7.0.tar.gz 396848 BLAKE2B 7a6e5cbf302568884363ab4023033b53b1adc16896d7f88b1717f72b1b2a4d6d2dbfa2259a5c4aaa38d72201c5624a648077730cbc25f869f5f50a343bb93d0c SHA512 69f2008ace6ff8223ecf25805c08ddf42add9ed16c65f3bb57f74b8b0d080d584381ce79592d2ef581a9ba73f12624dae8db63dbb12e4875dfd29d828a4a5da3 +DIST macchanger_1.7.0-5.4.debian.tar.xz 25084 BLAKE2B 65d39333e07a4c89da7e622aaccc0f2cab45af8d84721c3d39c457dfaf3063df872812d07860cbe78634159b0a2944e75aa54c11f46eadc37b9d4a23fc81b629 SHA512 b50b52532fc987f443088f2a4d0f2327dac972e69bc4c0bc0a94de4583df76c7d32c40a143d24b7fa6e066fc36b89c4b160c02b26860c484aab5054a4032f0cc diff --git a/net-analyzer/macchanger/files/macchanger-1.7.0-fix-caddr_t.patch b/net-analyzer/macchanger/files/macchanger-1.7.0-fix-caddr_t.patch new file mode 100644 index 000000000000..0bcffcc67a7a --- /dev/null +++ b/net-analyzer/macchanger/files/macchanger-1.7.0-fix-caddr_t.patch @@ -0,0 +1,13 @@ +https://github.com/alobbs/macchanger/issues/14 + +--- a/src/netinfo.c ++++ b/src/netinfo.c +@@ -113,7 +113,7 @@ + epa->size = IFHWADDRLEN; + + memcpy(&req, &(net->dev), sizeof(struct ifreq)); +- req.ifr_data = (caddr_t)epa; ++ req.ifr_data = (void *)epa; + + if (ioctl(net->sock, SIOCETHTOOL, &req) < 0) { + perror ("[ERROR] Could not read permanent MAC"); diff --git a/net-analyzer/macchanger/macchanger-1.7.0-r1.ebuild b/net-analyzer/macchanger/macchanger-1.7.0-r1.ebuild new file mode 100644 index 000000000000..e854b260252b --- /dev/null +++ b/net-analyzer/macchanger/macchanger-1.7.0-r1.ebuild @@ -0,0 +1,30 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +DESCRIPTION="Utility for viewing/manipulating the MAC address of network interfaces" +OUI_DATE="20091029" # Generated with tools/IEEE_OUI.py in the source +OUI_FILE="OUI.list-${OUI_DATE}" +HOMEPAGE="https://github.com/alobbs/macchanger" +SRC_URI="https://github.com/alobbs/macchanger/releases/download/${PV}/${P}.tar.gz" +LICENSE="GPL-2" +KEYWORDS="~amd64 ~arm ~ppc ~sparc ~x86" +SLOT="0" + +PATCHES=( "${FILESDIR}"/${P}-fix-caddr_t.patch ) + +src_configure() { + # Shared data is installed below /lib, see Bug #57046 + econf \ + --bindir="${EPREFIX}/sbin" \ + --datadir="${EPREFIX}/lib" +} + +src_install() { + default + + dodir /usr/bin + dosym /sbin/macchanger /usr/bin/macchanger + dosym /lib/macchanger /usr/share/macchanger +} diff --git a/net-analyzer/macchanger/macchanger-1.7.0.ebuild b/net-analyzer/macchanger/macchanger-1.7.0.ebuild new file mode 100644 index 000000000000..009b018eb6e0 --- /dev/null +++ b/net-analyzer/macchanger/macchanger-1.7.0.ebuild @@ -0,0 +1,30 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +DESCRIPTION="Utility for viewing/manipulating the MAC address of network interfaces" +OUI_DATE="20091029" # Generated with tools/IEEE_OUI.py in the source +OUI_FILE="OUI.list-${OUI_DATE}" +HOMEPAGE="https://github.com/alobbs/macchanger" +SRC_URI="https://github.com/alobbs/macchanger/releases/download/${PV}/${P}.tar.gz" +LICENSE="GPL-2" +KEYWORDS="amd64 arm ppc sparc x86" +SLOT="0" + +src_configure() { + # Shared data is installed below /lib, see Bug #57046 + econf \ + --bindir=/sbin \ + --datadir=/lib +} + +src_install() { + default + + dodoc AUTHORS ChangeLog NEWS README + + dodir /usr/bin + dosym /sbin/macchanger /usr/bin/macchanger + dosym /lib/macchanger /usr/share/macchanger +} diff --git a/net-analyzer/macchanger/macchanger-1.7.0_p5_p4.ebuild b/net-analyzer/macchanger/macchanger-1.7.0_p5_p4.ebuild new file mode 100644 index 000000000000..1aa5414b43a6 --- /dev/null +++ b/net-analyzer/macchanger/macchanger-1.7.0_p5_p4.ebuild @@ -0,0 +1,44 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +DESCRIPTION="Utility for viewing/manipulating the MAC address of network interfaces" +OUI_DATE="20091029" # Generated with tools/IEEE_OUI.py in the source +OUI_FILE="OUI.list-${OUI_DATE}" +HOMEPAGE="https://github.com/alobbs/macchanger" +SRC_URI=" + https://github.com/alobbs/macchanger/releases/download/${PV/_p*}/${P/_p*}.tar.gz + mirror://debian/pool/main/m/${PN}/${PN}_${PV/_p*}-$(ver_cut 5).$(ver_cut 7).debian.tar.xz +" +LICENSE="GPL-2" +KEYWORDS="~amd64 ~arm ~ppc ~sparc ~x86" +SLOT="0" + +PATCHES=( + "${FILESDIR}"/${PN}-1.7.0-fix-caddr_t.patch + "${WORKDIR}"/debian/patches/02-fix_usage_message.patch + "${WORKDIR}"/debian/patches/06-update_OUI_list.patch + "${WORKDIR}"/debian/patches/08-fix_random_MAC_choice.patch + "${WORKDIR}"/debian/patches/check-random-device-read-errors.patch + "${WORKDIR}"/debian/patches/verify-changed-MAC.patch + +) +S=${WORKDIR}/${P/_p*} + +src_configure() { + # Shared data is installed below /lib, see Bug #57046 + econf \ + --bindir="${EPREFIX}/sbin" \ + --datadir="${EPREFIX}/lib" +} + +src_install() { + default + + newdoc "${WORKDIR}"/debian/changelog debian.changelog + + dodir /usr/bin + dosym ../../sbin/macchanger /usr/bin/macchanger + dosym ../../lib/macchanger /usr/share/macchanger +} diff --git a/net-analyzer/macchanger/metadata.xml b/net-analyzer/macchanger/metadata.xml new file mode 100644 index 000000000000..ff1e61968a1d --- /dev/null +++ b/net-analyzer/macchanger/metadata.xml @@ -0,0 +1,16 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>robbat2@gentoo.org</email> + <name>Robin H. Johnson</name> + </maintainer> + <maintainer type="project"> + <email>netmon@gentoo.org</email> + <name>Gentoo network monitoring and analysis project</name> + </maintainer> + <upstream> + <remote-id type="github">alobbs/macchanger</remote-id> + </upstream> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/masscan/Manifest b/net-analyzer/masscan/Manifest new file mode 100644 index 000000000000..a852695a753c --- /dev/null +++ b/net-analyzer/masscan/Manifest @@ -0,0 +1,2 @@ +DIST masscan-1.0.4.tar.gz 343513 BLAKE2B e50789c8a2246c4109990e93c9c53cf68b2b555955f675e1a9acd4074c2b85773aba58f3644db1f98a88c4cff85cff5a9035f2fbc56978103458dc34e6dc353a SHA512 eb82d8ad4d6a5c77cf79197e18470a68f7c361f0785180d631e9625578e90af6ffdaa45b728349da5a1cb945a8f902541b8f708be8a4075737ccb06e948d6e2b +DIST masscan-1.0.5.tar.gz 353901 BLAKE2B 83145955b42f660788fdd7687b0a88ad84d6f31a4f99fc1fe4691f266f3c3492882334d9f0b4acf3c31d33950daedda56b6623cd3ba6ef9a27914613f09d485b SHA512 55d58234994ebea10bcb3f45a24cdb51b020350faa116aee3a48861a119f66c339d1f533c978f52e37ccf5266be6fd2802765f13461d94eb28ec8d18c68e2f88 diff --git a/net-analyzer/masscan/files/masscan.conf b/net-analyzer/masscan/files/masscan.conf new file mode 100644 index 000000000000..86a88868dffe --- /dev/null +++ b/net-analyzer/masscan/files/masscan.conf @@ -0,0 +1,7 @@ +rate = 100000.00 +output-format = xml +output-status = all +output-filename = scan.xml +ports = 0-65535 +#range = 0.0.0.0-255.255.255.255 +excludefile = /etc/masscan/exclude.conf diff --git a/net-analyzer/masscan/masscan-1.0.4.ebuild b/net-analyzer/masscan/masscan-1.0.4.ebuild new file mode 100644 index 000000000000..fda9eec41325 --- /dev/null +++ b/net-analyzer/masscan/masscan-1.0.4.ebuild @@ -0,0 +1,41 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 +inherit toolchain-funcs + +DESCRIPTION="Mass IP port scanner" +HOMEPAGE="https://github.com/robertdavidgraham/masscan" +SRC_URI="https://github.com/robertdavidgraham/masscan/archive/${PV}.tar.gz -> ${P}.tar.gz" + +SLOT="0" +LICENSE="AGPL-3" +KEYWORDS="~amd64 ~x86" + +RDEPEND="net-libs/libpcap" + +src_prepare() { + default + + sed -i \ + -e '/$(CC)/s!$(CFLAGS)!$(LDFLAGS) $(CFLAGS)!g' \ + -e '/^GITVER :=/s!= .(.*!=!g' \ + -e '/^SYS/s|gcc|$(CC)|g' \ + -e '/^CFLAGS =/{s,=,+=,;s,-g -ggdb,,;s,-O3,,;}' \ + Makefile || die + + tc-export CC +} + +src_install() { + dobin bin/masscan + + insinto /etc/masscan + doins data/exclude.conf + doins "${FILESDIR}"/masscan.conf + + mv doc/bot.{hml,html} || die + dodoc doc/bot.html *.md + + doman doc/masscan.8 +} diff --git a/net-analyzer/masscan/masscan-1.0.5.ebuild b/net-analyzer/masscan/masscan-1.0.5.ebuild new file mode 100644 index 000000000000..96cf9afa0476 --- /dev/null +++ b/net-analyzer/masscan/masscan-1.0.5.ebuild @@ -0,0 +1,41 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 +inherit toolchain-funcs + +DESCRIPTION="Mass IP port scanner" +HOMEPAGE="https://github.com/robertdavidgraham/masscan" +SRC_URI="https://github.com/robertdavidgraham/masscan/archive/${PV}.tar.gz -> ${P}.tar.gz" + +SLOT="0" +LICENSE="AGPL-3" +KEYWORDS="~amd64 ~x86" + +RDEPEND="net-libs/libpcap" + +src_prepare() { + default + + sed -i \ + -e '/$(CC)/s!$(CFLAGS)!$(LDFLAGS) $(CFLAGS)!g' \ + -e '/^GITVER :=/s!= .(.*!=!g' \ + -e '/^SYS/s|gcc|$(CC)|g' \ + -e '/^CFLAGS =/{s,=,+=,;s,-g -ggdb,,;s,-O3,,;}' \ + -e '/^CC =/d' \ + Makefile || die + + tc-export CC +} + +src_install() { + dobin bin/masscan + + insinto /etc/masscan + doins data/exclude.conf + doins "${FILESDIR}"/masscan.conf + + dodoc doc/bot.html *.md + + doman doc/masscan.8 +} diff --git a/net-analyzer/masscan/metadata.xml b/net-analyzer/masscan/metadata.xml new file mode 100644 index 000000000000..5c6acc66075d --- /dev/null +++ b/net-analyzer/masscan/metadata.xml @@ -0,0 +1,27 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>robbat2@gentoo.org</email> + </maintainer> + <maintainer type="project"> + <email>netmon@gentoo.org</email> + <name>Gentoo network monitoring and analysis project</name> + </maintainer> + <longdescription lang="en"> + This is the fastest Internet port scanner. It can scan the + entire Internet in under 6 minutes, transmitting 10 million + packets per second. + + It produces results similar to nmap, the most famous port + scanner. Internally, it operates more like scanrand, + unicornscan, and ZMap, using asynchronous transmission. + The major difference is that it's faster than these other + scanners. In addition, it's more flexible, allowing + arbitrary address ranges and port ranges. + </longdescription> + <upstream> + <remote-id type="github">robertdavidgraham/masscan</remote-id> + </upstream> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/mbrowse/Manifest b/net-analyzer/mbrowse/Manifest new file mode 100644 index 000000000000..b0fd92cb08f7 --- /dev/null +++ b/net-analyzer/mbrowse/Manifest @@ -0,0 +1 @@ +DIST mbrowse-0.4.3.tar.gz 146028 BLAKE2B 32b33dc4ec10a7b7ece07c47280b703c871e83a41f3cd8d60f7a177925da9c269020d927b193e8550fe15356c55bb4faa47c195354bb7784553601fc39ef00b7 SHA512 adccf8de707611034db0cbb6a37117f6a4741eb92656eab0e9e5c6a8268b17cc66080ed9663fe59a3fea9b110d83bcff9094b5fec133ca7ceb2650fd532a6cb4 diff --git a/net-analyzer/mbrowse/files/mbrowse-0.4.3-flags.patch b/net-analyzer/mbrowse/files/mbrowse-0.4.3-flags.patch new file mode 100644 index 000000000000..f17904b66901 --- /dev/null +++ b/net-analyzer/mbrowse/files/mbrowse-0.4.3-flags.patch @@ -0,0 +1,16 @@ +--- acinclude.m4 ++++ b/acinclude.m4 +@@ -277,13 +277,11 @@ + echo "*** --with-snmp-lib=DIR" + echo "***" + CFLAGS="$ac_save_CFLAGS" +- LDFLAGS="$ac_save_LDFLAGS" + LIBS="$ac_save_LIBS" + ifelse([$3], ,:,[$3]) + fi + + CFLAGS="$ac_save_CFLAGS" +- LDFLAGS="$ac_save_LDFLAGS" + LIBS="$ac_save_LIBS" + + AC_SUBST(SNMP_CFLAGS) diff --git a/net-analyzer/mbrowse/files/mbrowse-0.4.3-fno-common.patch b/net-analyzer/mbrowse/files/mbrowse-0.4.3-fno-common.patch new file mode 100644 index 000000000000..72a4c785a13c --- /dev/null +++ b/net-analyzer/mbrowse/files/mbrowse-0.4.3-fno-common.patch @@ -0,0 +1,29 @@ +--- a/src/interface.h ++++ b/src/interface.h +@@ -9,12 +9,14 @@ + GtkAccelGroup *accels; + } main_widgets_t; + +-struct menu_items { ++typedef struct menu_items { + char *item; + GtkSignalFunc func; + gpointer data; + GtkWidget *mi; +-}; ++} menu_items; ++ ++extern struct menu_items bookmark_items[128]; + + void set_hostname(const char *host); + void set_oid(const char *oid); +--- a/src/bookmarks.c ++++ b/src/bookmarks.c +@@ -27,7 +27,6 @@ + static GtkWidget *bkdial; + int delete = 0; + +-struct menu_items bookmark_items[128]; + static GtkWidget* create_bookmark_dialogue(void); + + static void mark_for_delete(void) { diff --git a/net-analyzer/mbrowse/mbrowse-0.4.3-r1.ebuild b/net-analyzer/mbrowse/mbrowse-0.4.3-r1.ebuild new file mode 100644 index 000000000000..ab930a39ba20 --- /dev/null +++ b/net-analyzer/mbrowse/mbrowse-0.4.3-r1.ebuild @@ -0,0 +1,37 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +inherit autotools + +DESCRIPTION="MBrowse is a graphical MIB browser" +HOMEPAGE="https://sourceforge.net/projects/mbrowse/" +SRC_URI="mirror://sourceforge/${PN}/files/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~ppc ~x86" + +DEPEND=" + dev-libs/glib + net-analyzer/net-snmp:= + x11-libs/gdk-pixbuf + x11-libs/gtk+:2 +" +RDEPEND="${DEPEND}" + +DOCS=( AUTHORS README ChangeLog ) +PATCHES=( + "${FILESDIR}"/${PN}-0.4.3-flags.patch + "${FILESDIR}"/${PN}-0.4.3-fno-common.patch +) + +src_prepare() { + default + eautoreconf +} + +src_configure() { + econf \ + --with-snmp-lib="${EPREFIX}/usr/$(get_libdir)" +} diff --git a/net-analyzer/mbrowse/mbrowse-0.4.3.ebuild b/net-analyzer/mbrowse/mbrowse-0.4.3.ebuild new file mode 100644 index 000000000000..fea497f3bb7a --- /dev/null +++ b/net-analyzer/mbrowse/mbrowse-0.4.3.ebuild @@ -0,0 +1,31 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +inherit autotools + +DESCRIPTION="MBrowse is a graphical MIB browser" +HOMEPAGE="https://sourceforge.net/projects/mbrowse/" +SRC_URI="mirror://sourceforge/${PN}/files/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="amd64 ~ppc x86" + +DEPEND=" + dev-libs/glib + net-analyzer/net-snmp + x11-libs/gdk-pixbuf + x11-libs/gtk+:2 +" +RDEPEND="${DEPEND}" + +DOCS=( AUTHORS README ChangeLog ) + +src_prepare() { + sed -i \ + -e '/LDFLAGS=/d' \ + acinclude.m4 || die + eautoreconf +} diff --git a/net-analyzer/mbrowse/metadata.xml b/net-analyzer/mbrowse/metadata.xml new file mode 100644 index 000000000000..7311389811a3 --- /dev/null +++ b/net-analyzer/mbrowse/metadata.xml @@ -0,0 +1,12 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>netmon@gentoo.org</email> + <name>Gentoo network monitoring and analysis project</name> + </maintainer> + <upstream> + <remote-id type="sourceforge">mbrowse</remote-id> + </upstream> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/mdns-scan/Manifest b/net-analyzer/mdns-scan/Manifest new file mode 100644 index 000000000000..03b55dbd1f04 --- /dev/null +++ b/net-analyzer/mdns-scan/Manifest @@ -0,0 +1 @@ +DIST mdns-scan-0.5.tar.gz 15181 BLAKE2B 318ee5560f9973c663d4a319182715c1452adf593c281df404dab9c87e4b0ea872e0cae1cd801a4e9b9f03019222b8969f4f70eeee7e1c3e2fa941ff7f3324a8 SHA512 732ecb5cd3830056dc61f3a688d72cbf18ef49c9efd7fc082e4d6fbf1a826fc50ddd372185e53cdcae0d819b6aa5e2834328d3799e0f0b37e0f493d162e7775d diff --git a/net-analyzer/mdns-scan/mdns-scan-0.5.ebuild b/net-analyzer/mdns-scan/mdns-scan-0.5.ebuild new file mode 100644 index 000000000000..7bfcea86d3db --- /dev/null +++ b/net-analyzer/mdns-scan/mdns-scan-0.5.ebuild @@ -0,0 +1,28 @@ +# Copyright 2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +DESCRIPTION="a tool for scanning for mDNS/DNS-SD published services" +HOMEPAGE="http://0pointer.de/lennart/projects/mdns-scan/" +SRC_URI="http://0pointer.de/lennart/projects/${PN}/${P}.tar.gz" + +LICENSE="GPL-2+" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="" + +DEPEND="" +RDEPEND="${DEPEND}" +BDEPEND="" + +src_prepare() { + sed -i "s#-Wall -W -g -O0 -pipe#${CFLAGS} ${LDFLAGS}#" Makefile + sed -i "s#-o #${CFLAGS} ${LDFLAGS} -o #" Makefile + default +} + +src_install() { + dodir /usr/bin + default +} diff --git a/net-analyzer/mdns-scan/metadata.xml b/net-analyzer/mdns-scan/metadata.xml new file mode 100644 index 000000000000..8560a6dec8bd --- /dev/null +++ b/net-analyzer/mdns-scan/metadata.xml @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <name>Rick Farina</name> + <email>zerochaos@gentoo.org</email> + </maintainer> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/metadata.xml b/net-analyzer/metadata.xml new file mode 100644 index 000000000000..58f5863c9fea --- /dev/null +++ b/net-analyzer/metadata.xml @@ -0,0 +1,32 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE catmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<catmetadata> + <longdescription lang="en"> + The net-analyzer category contains network analysis software. + </longdescription> + <longdescription lang="de"> + Die Kategorie net-analyzer enthält Software zur Netzwerkanalyse. + </longdescription> + <longdescription lang="es"> + La categorÃa net-analyzer contiene programas de análisis de redes. + </longdescription> + <longdescription lang="ja"> + net-analyzerカテゴリーã«ã¯ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯ãƒ»ã‚¢ãƒŠãƒªã‚·ã‚¹ã®ã‚½ãƒ•トウェアãŒå«ã¾ã‚Œã¦ã„ã¾ã™ã€‚ + </longdescription> + <longdescription lang="nl"> + De net-analyzer categorie bevat applicaties voor netwerk-analyse. + </longdescription> + <longdescription lang="vi"> + Nhóm net-analyzer chứa các phần má»m phân tÃch mạng. + </longdescription> + <longdescription lang="it"> + La categoria net-analyzer contiene programmi per l'analisi della rete. + </longdescription> + <longdescription lang="pt"> + A categoria net-analyzer contém programas de análise de rede. + </longdescription> + <longdescription lang="pl"> + Kategoria net-analyzer zawiera programy do analizowania sieci. + </longdescription> +</catmetadata> + diff --git a/net-analyzer/mk-livestatus/Manifest b/net-analyzer/mk-livestatus/Manifest new file mode 100644 index 000000000000..fef9de860f0a --- /dev/null +++ b/net-analyzer/mk-livestatus/Manifest @@ -0,0 +1,4 @@ +DIST mk-livestatus-1.2.8p10.tar.gz 453496 BLAKE2B 5c6cb41dff2d3cc29837088c18c6f7e4bfa6a5a9a3802adafe86fb28523bfc8037fc0c69770861612568db5fc8b61569663c3033201c6293b6da2dba3de55100 SHA512 ff25c2a8d0105fdd156bc922b56df10e3497361620671dc73242db0a7b57fbd34955b5f4fbd9954602c8011b1f6a5ebd4e278df7c3e66639d74110fd0035682d +DIST mk-livestatus-1.2.8p16.tar.gz 453565 BLAKE2B 73b4f2d245740e9427af391691a3873b2930bbef1de2b147cefdde1b84f24e7acf61aa748a8adaad4290c77d9b1c7aef7540c69d44c420522c5d56115127b49b SHA512 32d4bc014c008ac7afbdca53e6b3e0d71f8eee5f41f4a0299a8e14cee2a1ea93216fe04c4ff9aa7d7b927dde8e63d186f09a2847665851f1063e699cf73a8df4 +DIST mk-livestatus-1.2.8p26.tar.gz 453508 BLAKE2B 75338c65b2c323d4ef2637ef2507f6f213bd3b58a32c0bd377a3c0c0ead34c75394539eaec08d40ee9ea16ca2534158ee4c6823387f3fc3648a02a22d86e0395 SHA512 8afeb6e750d7eb310380153af91f9c6f889f6e350e26dc97f923a49b2e3cc6c0b866f893664ad5d9fd9c0e8671b0a69e1267e464e4de9faf75a2eb24536ae014 +DIST mk-livestatus-1.5.0p22.tar.gz 477418 BLAKE2B fcb33852fafd6ddbbae5fc2989dd694200dc046386e3add07afed0051c2299828afdd13c7e13a862edf10ecd25d522817d1248b05b0bc73cce4e6f4962ec0f1d SHA512 a689d20230651e4cc6708f678fda9c34a4834b68580bff3b012eb7ec7ff2bbd70dff85121e73665ab0266831f36338bd0976731f7d4a68a2595757dccbcac9b6 diff --git a/net-analyzer/mk-livestatus/files/1.2.8_p10-MEDIUM-Drop-default-strip.patch b/net-analyzer/mk-livestatus/files/1.2.8_p10-MEDIUM-Drop-default-strip.patch new file mode 100644 index 000000000000..5b5009bfaa01 --- /dev/null +++ b/net-analyzer/mk-livestatus/files/1.2.8_p10-MEDIUM-Drop-default-strip.patch @@ -0,0 +1,24 @@ +From 1798492a27a1ac3819cb366e1a3e789d663f55a0 Mon Sep 17 00:00:00 2001 +From: Bertrand Jacquin <bertrand@jacquin.bzh> +Date: Wed, 21 Aug 2013 23:00:21 +0200 +Subject: [PATCH 1/2] MEDIUM: Drop default strip + +See: https://bugs.gentoo.org/show_bug.cgi?id=482026 + +--- + src/Makefile.am | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/Makefile.am b/src/Makefile.am +index deab289..126b503 100644 +--- a/src/Makefile.am ++++ b/src/Makefile.am +@@ -55,7 +55,7 @@ livestatus_so_CFLAGS = -fPIC + + livestatus.o: $(livestatus_so_OBJECTS) $(livestatus_so_DEPENDENCIES) + -rm -f plugin.so +- $(CXX) $(LDFLAGS) -s -fPIC -shared $(livestatus_so_OBJECTS) -o $@ -lpthread -static-libstdc++ ++ $(CXX) $(LDFLAGS) -fPIC -shared $(livestatus_so_OBJECTS) -o $@ -lpthread -static-libstdc++ + + all-local: livestatus.o + diff --git a/net-analyzer/mk-livestatus/files/1.2.8_p10-MINOR-test-Remove-the-usage-of-Perl-Critic-Policy-Mo.patch b/net-analyzer/mk-livestatus/files/1.2.8_p10-MINOR-test-Remove-the-usage-of-Perl-Critic-Policy-Mo.patch new file mode 100644 index 000000000000..264d9bb899b6 --- /dev/null +++ b/net-analyzer/mk-livestatus/files/1.2.8_p10-MINOR-test-Remove-the-usage-of-Perl-Critic-Policy-Mo.patch @@ -0,0 +1,34 @@ +From 39cc57667a93f1cf18f935fdfda4d602667c89c8 Mon Sep 17 00:00:00 2001 +From: Bertrand Jacquin <bertrand@jacquin.bzh> +Date: Wed, 21 Aug 2013 23:00:21 +0200 +Subject: [PATCH 2/2] MINOR: test: Remove the usage of + Perl::Critic::Policy::Modules::ProhibitAutomaticExportation + +This does not exist since +http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/dev-perl/Perl-Critic/metadata.xml?r1=1.3&r2=1.4 + +See: https://bugs.gentoo.org/show_bug.cgi?id=482026 +--- + api/perl/t/perlcriticrc | 4 +--- + 1 file changed, 1 insertion(+), 3 deletions(-) + +diff --git a/api/perl/t/perlcriticrc b/api/perl/t/perlcriticrc +index f7e4721..f686dca 100644 +--- a/api/perl/t/perlcriticrc ++++ b/api/perl/t/perlcriticrc +@@ -133,8 +133,6 @@ severity = 3 + [Perl::Critic::Policy::Miscellanea::ProhibitTies] + severity = 4 + +-[-Perl::Critic::Policy::Miscellanea::RequireRcsKeywords] +- + [Perl::Critic::Policy::Modules::ProhibitAutomaticExportation] + severity = 4 + +@@ -283,4 +281,4 @@ severity = 5 + severity = 5 + + [Perl::Critic::Policy::Variables::RequireNegativeIndices] +-severity = 4 +\ No newline at end of file ++severity = 4 diff --git a/net-analyzer/mk-livestatus/files/mk-livestatus-1.2.8_p26-fno-common.patch b/net-analyzer/mk-livestatus/files/mk-livestatus-1.2.8_p26-fno-common.patch new file mode 100644 index 000000000000..e0dc8469c15a --- /dev/null +++ b/net-analyzer/mk-livestatus/files/mk-livestatus-1.2.8_p26-fno-common.patch @@ -0,0 +1,29 @@ +--- a/src/logger.h ++++ b/src/logger.h +@@ -27,6 +27,7 @@ + + #include "config.h" // IWYU pragma: keep + #include <syslog.h> ++#include <pthread.h> + + #ifdef CMC + #define LG_DEBUG LOG_INFO +@@ -49,6 +50,8 @@ + extern "C" { + #endif + ++extern pthread_t g_mainthread_id; ++ + void logger(int priority, const char *loginfo, ...) + __attribute__((format(printf, 2, 3))); + void open_logfile(); +--- a/src/module.c ++++ b/src/module.c +@@ -95,7 +95,6 @@ + char g_logfile_path[4096]; + int g_debug_level = 0; + int g_should_terminate = false; +-pthread_t g_mainthread_id; + pthread_t *g_clientthread_id; + unsigned long g_max_cached_messages = 500000; + unsigned long g_max_lines_per_logfile = diff --git a/net-analyzer/mk-livestatus/files/mk-livestatus-1.2.8_p26-rm.patch b/net-analyzer/mk-livestatus/files/mk-livestatus-1.2.8_p26-rm.patch new file mode 100644 index 000000000000..abdb2e01691b --- /dev/null +++ b/net-analyzer/mk-livestatus/files/mk-livestatus-1.2.8_p26-rm.patch @@ -0,0 +1,10 @@ +--- a/src/Makefile.am ++++ b/src/Makefile.am +@@ -62,7 +62,6 @@ + install-data-local: + $(mkinstalldirs) $(DESTDIR)$(pkglibdir) + $(INSTALL_PROGRAM) livestatus.o $(DESTDIR)$(pkglibdir) +- rm -f $(DESTDIR)$(pkglibdir)/livestatus.so + + clean-local: + rm -f *~ diff --git a/net-analyzer/mk-livestatus/files/mk-livestatus-1.5.0_p22-rm.patch b/net-analyzer/mk-livestatus/files/mk-livestatus-1.5.0_p22-rm.patch new file mode 100644 index 000000000000..5c267ae2f4cd --- /dev/null +++ b/net-analyzer/mk-livestatus/files/mk-livestatus-1.5.0_p22-rm.patch @@ -0,0 +1,10 @@ +--- a/src/Makefile.am ++++ b/src/Makefile.am +@@ -201,7 +201,6 @@ + install-data-local: + $(mkinstalldirs) $(DESTDIR)$(pkglibdir) + $(INSTALL_PROGRAM) livestatus.o $(DESTDIR)$(pkglibdir) +- rm -f $(DESTDIR)$(pkglibdir)/liblivestatus.a + + clean-local: + rm -rf *~ compile_commands.json cppcheck-result.xml html diff --git a/net-analyzer/mk-livestatus/metadata.xml b/net-analyzer/mk-livestatus/metadata.xml new file mode 100644 index 000000000000..360e2ad800ae --- /dev/null +++ b/net-analyzer/mk-livestatus/metadata.xml @@ -0,0 +1,22 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>bertrand@jacquin.bzh</email> + <name>Bertrand Jacquin</name> + </maintainer> + <maintainer type="project"> + <email>netmon@gentoo.org</email> + <name>Gentoo network monitoring and analysis project</name> + </maintainer> + <maintainer type="project"> + <email>proxy-maint@gentoo.org</email> + <name>Proxy Maintainers</name> + </maintainer> + <use> + <flag name="nagios4">Generate a <pkg>net-analyzer/nagios</pkg>-4 compatible plugin</flag> + <flag name="boost">Use <pkg>dev-libs/boost</pkg> for ASIO support</flag> + <flag name="re2">Use <pkg>dev-libs/re2</pkg> for regex support</flag> + </use> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/mk-livestatus/mk-livestatus-1.2.8_p10.ebuild b/net-analyzer/mk-livestatus/mk-livestatus-1.2.8_p10.ebuild new file mode 100644 index 000000000000..b36094f1ee3e --- /dev/null +++ b/net-analyzer/mk-livestatus/mk-livestatus-1.2.8_p10.ebuild @@ -0,0 +1,135 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +GENTOO_DEPEND_ON_PERL=no +PYTHON_COMPAT=( python2_7 ) +inherit autotools perl-module python-r1 + +MY_PV="${PV/_p/p}" +MY_P="${PN}-${MY_PV}" + +DESCRIPTION="Nagios/Icinga event broker that allows quick/direct access to your status data" +HOMEPAGE="http://mathias-kettner.de/checkmk_livestatus.html" +SRC_URI="http://mathias-kettner.de/download/${MY_P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~ppc ~x86" +IUSE="examples nagios4 perl python test" +RESTRICT="!test? ( test )" +REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" + +RDEPEND="!sys-apps/ucspi-unix:0 + perl? ( + dev-lang/perl:0 + virtual/perl-Digest-MD5:0 + virtual/perl-Scalar-List-Utils:0 + >=virtual/perl-Thread-Queue-2.11:0 + virtual/perl-Encode:0 + dev-perl/JSON-XS:0 + ) + python? ( ${PYTHON_DEPS} )" +DEPEND="${RDEPEND} + perl? ( + dev-perl/Module-Install:0 + virtual/perl-ExtUtils-MakeMaker:0 + virtual/perl-File-Path:0 + virtual/perl-File-Spec:0 + virtual/perl-File-Temp:0 + test? ( + dev-perl/File-Copy-Recursive:0 + dev-perl/Test-Pod:0 + dev-perl/Test-Perl-Critic:0 + dev-perl/Test-Pod-Coverage:0 + dev-perl/Perl-Critic:0 + dev-perl/Perl-Critic-Policy-Dynamic-NoIndirect:0 + dev-perl/Perl-Critic-Deprecated:0 + dev-perl/Perl-Critic-Nits:0 + ) + )" + +# For perl test +SRC_TEST="parallel" + +S="${WORKDIR}/${MY_P}" + +PATCHES=( + "${FILESDIR}/${PV}-MEDIUM-Drop-default-strip.patch" + "${FILESDIR}/${PV}-MINOR-test-Remove-the-usage-of-Perl-Critic-Policy-Mo.patch" +) + +src_prepare() { + default + + # Use system Module::Install instead, it will be copied to $S by + # Module::install itself. + rm -rf api/perl/inc || die + + if use perl; then + # Ensure patches are not applied twice + unset PATCHES + perl-module_src_prepare + fi + + eautoreconf +} + +src_configure() { + econf \ + $(use_with nagios4) + + if use perl; then + cd api/perl || die + perl-module_src_configure + fi +} + +src_compile() { + emake + + if use perl; then + cd api/perl || die + perl-module_src_compile + fi +} + +src_test() { + if use perl; then + cd api/perl || die + + export TEST_AUTHOR="Test Author" + perl-module_src_test + fi +} + +src_install() { + emake install DESTDIR="${ED}" + + if use perl; then + cd api/perl || die + perl-module_src_install + cd "${S}" + + if use examples; then + docinto / + newdoc api/perl/README README.perl + + docinto examples + dodoc api/perl/examples/dump.pl + fi + fi + + if use python; then + python_foreach_impl python_domodule api/python/livestatus.py + + if use examples; then + docinto / + newdoc api/python/README README.python + + docinto examples + dodoc api/python/{example,example_multisite,make_nagvis_map}.py + fi + fi +} diff --git a/net-analyzer/mk-livestatus/mk-livestatus-1.2.8_p16.ebuild b/net-analyzer/mk-livestatus/mk-livestatus-1.2.8_p16.ebuild new file mode 100644 index 000000000000..f0e770a07ddb --- /dev/null +++ b/net-analyzer/mk-livestatus/mk-livestatus-1.2.8_p16.ebuild @@ -0,0 +1,158 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +GENTOO_DEPEND_ON_PERL=no +PYTHON_COMPAT=( python2_7 ) +inherit autotools perl-module python-single-r1 + +MY_PV="${PV/_p/p}" +MY_P="${PN}-${MY_PV}" + +DESCRIPTION="Nagios/Icinga event broker that allows quick/direct access to your status data" +HOMEPAGE="http://mathias-kettner.de/checkmk_livestatus.html" +SRC_URI="http://mathias-kettner.de/download/${MY_P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~ppc ~x86" +IUSE="examples nagios4 perl python test" +RESTRICT="!test? ( test )" +REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" + +RDEPEND="!sys-apps/ucspi-unix:0 + perl? ( + dev-lang/perl:0 + virtual/perl-Digest-MD5:0 + virtual/perl-Scalar-List-Utils:0 + >=virtual/perl-Thread-Queue-2.11:0 + virtual/perl-Encode:0 + dev-perl/JSON-XS:0 + ) + python? ( ${PYTHON_DEPS} )" +DEPEND="${RDEPEND} + perl? ( + dev-perl/Module-Install:0 + virtual/perl-ExtUtils-MakeMaker:0 + virtual/perl-File-Path:0 + virtual/perl-File-Spec:0 + virtual/perl-File-Temp:0 + test? ( + dev-perl/File-Copy-Recursive:0 + dev-perl/Test-Pod:0 + dev-perl/Test-Perl-Critic:0 + dev-perl/Test-Pod-Coverage:0 + dev-perl/Perl-Critic:0 + dev-perl/Perl-Critic-Policy-Dynamic-NoIndirect:0 + dev-perl/Perl-Critic-Deprecated:0 + dev-perl/Perl-Critic-Nits:0 + ) + )" + +# For perl test +SRC_TEST="parallel" + +S="${WORKDIR}/${MY_P}" + +PATCHES=( + "${FILESDIR}/1.2.8_p10-MEDIUM-Drop-default-strip.patch" + "${FILESDIR}/1.2.8_p10-MINOR-test-Remove-the-usage-of-Perl-Critic-Policy-Mo.patch" +) + +src_prepare() { + default + + # Use system Module::Install instead, it will be copied to $S by + # Module::install itself. + rm -rf api/perl/inc || die + + if use perl; then + # Ensure patches are not applied twice + unset PATCHES + perl-module_src_prepare + fi + + eautoreconf +} + +src_configure() { + econf \ + $(use_with nagios4) + + if use perl; then + cd api/perl || die + perl-module_src_configure + fi +} + +src_compile() { + emake + + if use perl; then + cd api/perl || die + perl-module_src_compile + fi +} + +src_test() { + if use perl; then + cd api/perl || die + + export TEST_AUTHOR="Test Author" + perl-module_src_test + fi +} + +src_install() { + emake install DESTDIR="${ED}" + + # install a config file showing whats needed to enable livestatus for nagios + cat <<EOF >"${T}"/nagios.cfg +# Ensure all data is set to event brokers +event_broker_options=-1 +broker_module=${EPREFIX}/usr/$(get_libdir)/mk-livestatus/livestatus.o +EOF + # same for icigna + cat <<EOF >"${T}"/icigna.cfg +define module{ + module_name mk-livestatus + module_type neb + path /usr/$(get_libdir)/mk-livestatus/livestatus.o + args /var/lib/icigna/rw/live + } +EOF + insinto /usr/share/mk-livestatus + doins "${T}"/{nagios,icigna}.cfg + + if use perl; then + cd api/perl || die + perl-module_src_install + cd "${S}" + + if use examples; then + docinto / + newdoc api/perl/README README.perl + + docinto examples + dodoc api/perl/examples/dump.pl + fi + fi + + if use python; then + python_foreach_impl python_domodule api/python/livestatus.py + + if use examples; then + docinto / + newdoc api/python/README README.python + + docinto examples + dodoc api/python/{example,example_multisite,make_nagvis_map}.py + fi + fi +} + +pkg_postinst() { + elog "Sample configurations for icigna and nagios are available in" + elog "/usr/share/${PN}" +} diff --git a/net-analyzer/mk-livestatus/mk-livestatus-1.2.8_p26-r1.ebuild b/net-analyzer/mk-livestatus/mk-livestatus-1.2.8_p26-r1.ebuild new file mode 100644 index 000000000000..071250a73b6b --- /dev/null +++ b/net-analyzer/mk-livestatus/mk-livestatus-1.2.8_p26-r1.ebuild @@ -0,0 +1,160 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +GENTOO_DEPEND_ON_PERL=no +PYTHON_COMPAT=( python2_7 ) +inherit autotools perl-module python-single-r1 + +MY_PV="${PV/_p/p}" +MY_P="${PN}-${MY_PV}" + +DESCRIPTION="Nagios/Icinga event broker that allows quick/direct access to your status data" +HOMEPAGE="http://mathias-kettner.de/checkmk_livestatus.html" +SRC_URI="http://mathias-kettner.de/download/${MY_P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~ppc ~x86" +IUSE="examples nagios4 perl python test" +RESTRICT="!test? ( test )" +REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" + +RDEPEND="!sys-apps/ucspi-unix:0 + perl? ( + dev-lang/perl:0 + virtual/perl-Digest-MD5:0 + virtual/perl-Scalar-List-Utils:0 + >=virtual/perl-Thread-Queue-2.11:0 + virtual/perl-Encode:0 + dev-perl/JSON-XS:0 + ) + python? ( ${PYTHON_DEPS} )" +DEPEND="${RDEPEND} + perl? ( + dev-perl/Module-Install:0 + virtual/perl-ExtUtils-MakeMaker:0 + virtual/perl-File-Path:0 + virtual/perl-File-Spec:0 + virtual/perl-File-Temp:0 + test? ( + dev-perl/File-Copy-Recursive:0 + dev-perl/Test-Pod:0 + dev-perl/Test-Perl-Critic:0 + dev-perl/Test-Pod-Coverage:0 + dev-perl/Perl-Critic:0 + dev-perl/Perl-Critic-Policy-Dynamic-NoIndirect:0 + dev-perl/Perl-Critic-Deprecated:0 + dev-perl/Perl-Critic-Nits:0 + ) + )" + +# For perl test +SRC_TEST="parallel" + +S="${WORKDIR}/${MY_P}" + +PATCHES=( + "${FILESDIR}/1.2.8_p10-MEDIUM-Drop-default-strip.patch" + "${FILESDIR}/1.2.8_p10-MINOR-test-Remove-the-usage-of-Perl-Critic-Policy-Mo.patch" + "${FILESDIR}"/${PN}-1.2.8_p26-fno-common.patch + "${FILESDIR}"/${PN}-1.2.8_p26-rm.patch +) + +src_prepare() { + default + + # Use system Module::Install instead, it will be copied to $S by + # Module::install itself. + rm -rf api/perl/inc || die + + if use perl; then + # Ensure patches are not applied twice + unset PATCHES + perl-module_src_prepare + fi + + eautoreconf +} + +src_configure() { + econf \ + $(use_with nagios4) + + if use perl; then + cd api/perl || die + perl-module_src_configure + fi +} + +src_compile() { + emake + + if use perl; then + cd api/perl || die + perl-module_src_compile + fi +} + +src_test() { + if use perl; then + cd api/perl || die + + export TEST_AUTHOR="Test Author" + perl-module_src_test + fi +} + +src_install() { + emake install DESTDIR="${ED}" + + # install a config file showing whats needed to enable livestatus for nagios + cat <<EOF >"${T}"/nagios.cfg +# Ensure all data is set to event brokers +event_broker_options=-1 +broker_module=${EPREFIX}/usr/$(get_libdir)/${PN}/livestatus.o +EOF + # same for icigna + cat <<EOF >"${T}"/icigna.cfg +define module{ + module_name ${PN} + module_type neb + path /usr/$(get_libdir)/${PN}/livestatus.o + args /var/lib/icigna/rw/live + } +EOF + insinto /usr/share/${PN} + doins "${T}"/{nagios,icigna}.cfg + + if use perl; then + cd api/perl || die + perl-module_src_install + cd "${S}" + + if use examples; then + docinto / + newdoc api/perl/README README.perl + + docinto examples + dodoc api/perl/examples/dump.pl + fi + fi + + if use python; then + python_domodule api/python/livestatus.py + + if use examples; then + docinto / + newdoc api/python/README README.python + + docinto examples + dodoc api/python/{example,example_multisite,make_nagvis_map}.py + fi + fi +} + +pkg_postinst() { + elog "Sample configurations for icigna and nagios are available in" + elog "/usr/share/${PN}" +} diff --git a/net-analyzer/mk-livestatus/mk-livestatus-1.5.0_p22-r1.ebuild b/net-analyzer/mk-livestatus/mk-livestatus-1.5.0_p22-r1.ebuild new file mode 100644 index 000000000000..a0d42e5b3a7e --- /dev/null +++ b/net-analyzer/mk-livestatus/mk-livestatus-1.5.0_p22-r1.ebuild @@ -0,0 +1,167 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +GENTOO_DEPEND_ON_PERL=no +PYTHON_COMPAT=( python2_7 ) +inherit autotools perl-module python-single-r1 toolchain-funcs + +DESCRIPTION="Nagios/Icinga event broker that allows quick/direct access to your status data" +HOMEPAGE="https://checkmk.com/" +SRC_URI="https://checkmk.com/support/${PV/_}/${P/_}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~ppc ~x86" +IUSE="boost examples nagios4 perl python re2 test" +RESTRICT="!test? ( test )" +REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" + +RDEPEND=" + !sys-apps/ucspi-unix:0 + net-analyzer/rrdtool:= + boost? ( dev-libs/boost ) + perl? ( + dev-lang/perl:0 + virtual/perl-Digest-MD5:0 + virtual/perl-Scalar-List-Utils:0 + >=virtual/perl-Thread-Queue-2.11:0 + virtual/perl-Encode:0 + dev-perl/JSON-XS:0 + ) + python? ( ${PYTHON_DEPS} ) + re2? ( dev-libs/re2:= ) +" +DEPEND=" + ${RDEPEND} + perl? ( + dev-perl/Module-Install:0 + virtual/perl-ExtUtils-MakeMaker:0 + virtual/perl-File-Path:0 + virtual/perl-File-Spec:0 + virtual/perl-File-Temp:0 + test? ( + dev-perl/File-Copy-Recursive:0 + dev-perl/Test-Pod:0 + dev-perl/Test-Perl-Critic:0 + dev-perl/Test-Pod-Coverage:0 + dev-perl/Perl-Critic:0 + dev-perl/Perl-Critic-Policy-Dynamic-NoIndirect:0 + dev-perl/Perl-Critic-Deprecated:0 + dev-perl/Perl-Critic-Nits:0 + ) + ) +" + +PATCHES=( + "${FILESDIR}"/1.2.8_p10-MINOR-test-Remove-the-usage-of-Perl-Critic-Policy-Mo.patch + "${FILESDIR}"/${PN}-1.5.0_p22-rm.patch +) +S=${WORKDIR}/${P/_} + +src_prepare() { + default + + # Use system Module::Install instead, it will be copied to $S by + # Module::install itself. + rm -rf api/perl/inc || die + + # failing test + rm -rf api/perl/t/20-Monitoring-Livestatus-test_socket.t || die + + if use perl; then + # Ensure patches are not applied twice + unset PATCHES + perl-module_src_prepare + fi + + eautoreconf +} + +src_configure() { + tc-export CC CXX + + econf \ + $(use_with boost boost-asio) \ + $(use_with nagios4) \ + $(use_with re2) + + if use perl; then + cd api/perl || die + perl-module_src_configure + fi +} + +src_compile() { + default + + if use perl; then + cd api/perl || die + perl-module_src_compile + fi +} + +src_test() { + if use perl; then + cd api/perl || die + + SRC_TEST="parallel" + export TEST_AUTHOR="Test Author" + perl-module_src_test + fi +} + +src_install() { + default + + rm "${ED}"/usr/$(get_libdir)/${PN}/liblivestatus.a || die + + # install a config file showing whats needed to enable livestatus for nagios + cat <<EOF >"${T}"/nagios.cfg +# Ensure all data is set to event brokers +event_broker_options=-1 +broker_module=${EPREFIX}/usr/$(get_libdir)/${PN}/livestatus.o +EOF + # same for icinga + cat <<EOF >"${T}"/icinga.cfg +define module{ + module_name ${PN} + module_type neb + path /usr/$(get_libdir)/${PN}/livestatus.o + args /var/lib/icinga/rw/live + } +EOF + insinto /usr/share/${PN} + doins "${T}"/{nagios,icinga}.cfg + + if use perl; then + cd api/perl || die + perl-module_src_install + cd "${S}" + + if use examples; then + docinto / + newdoc api/perl/README README.perl + + docinto examples + dodoc api/perl/examples/dump.pl + fi + fi + + if use python; then + python_domodule api/python/livestatus.py + + if use examples; then + docinto / + newdoc api/python/README README.python + + docinto examples + dodoc api/python/{example,example_multisite,make_nagvis_map}.py + fi + fi +} + +pkg_postinst() { + elog "Sample configurations for icinga and nagios are available in" + elog "/usr/share/${PN}" +} diff --git a/net-analyzer/monitoring-plugins/Manifest b/net-analyzer/monitoring-plugins/Manifest new file mode 100644 index 000000000000..8576df0da903 --- /dev/null +++ b/net-analyzer/monitoring-plugins/Manifest @@ -0,0 +1 @@ +DIST monitoring-plugins-2.2.tar.gz 2461548 BLAKE2B 0f68b492e089c6dfd09db6aab78ab4490f2e8983677c70dda4c3800a06380c066865587536a44f135d0e314006ed81a757cbfbd918f53e009f9d2c50b8e58db0 SHA512 5f8cfa132891d6d96e69bee3f2c26f7d4546f572be6a18f25ea5d9069f162cb2e424361289a5c26bec60d7b63d28a269437fd6f25645903a1c142fdcbbf77f27 diff --git a/net-analyzer/monitoring-plugins/files/define-own-mysql-port-constant.patch b/net-analyzer/monitoring-plugins/files/define-own-mysql-port-constant.patch new file mode 100644 index 000000000000..b7406bc9af80 --- /dev/null +++ b/net-analyzer/monitoring-plugins/files/define-own-mysql-port-constant.patch @@ -0,0 +1,102 @@ +From d6bd787123aa9ccd96edec8286ec22dd0442c620 Mon Sep 17 00:00:00 2001 +From: Michael Orlitzky <michael@orlitzky.com> +Date: Fri, 27 Oct 2017 07:58:43 -0400 +Subject: [PATCH 1/3] plugins/check_mysql*.c: define our own default MySQL + port. + +The MYSQL_PORT constant used to be defined in mysql.h, and was used as +the default port in the two plugins check_mysql and check_mysql_query. +Now that mysql.h no longer defines that constant, our plugins fail to +build against newer versions of MySQL and MariaDB. + +Since MYSQL_PORT used the "default port" on the local system, it +actually was not the best choice as the default for the check plugins: +when monitoring remote MySQL servers, the usual default of 3306 is +more likely to be correct than whatever the local server happens to be +listening on. + +As a result, we fix the issue by defining our own constant, called +CHECK_PORT_DEFAULT, as "3306" at the top of both check_mysql.c and +check_mysql_query.c. The existing uses of MYSQL_PORT have been changed +to use the new CHECK_PORT_DEFAULT. + +This change is backwards-incompatible: any users who compiled in a +MYSQL_PORT other than 3306 and who were running their checks on the +same server as the database will now need to specify that port +explicitly. + +Closes: https://github.com/monitoring-plugins/monitoring-plugins/issues/1508 +--- + plugins/check_mysql.c | 8 ++++++-- + plugins/check_mysql_query.c | 8 ++++++-- + 2 files changed, 12 insertions(+), 4 deletions(-) + +diff --git a/plugins/check_mysql.c b/plugins/check_mysql.c +index 5773afd9..c44919d0 100644 +--- a/plugins/check_mysql.c ++++ b/plugins/check_mysql.c +@@ -36,6 +36,10 @@ const char *email = "devel@monitoring-plugins.org"; + + #define SLAVERESULTSIZE 70 + ++/* The default port that MySQL servers listen on. */ ++#define CHECK_PORT_DEFAULT 3306 ++ ++ + #include "common.h" + #include "utils.h" + #include "utils_base.h" +@@ -58,7 +62,7 @@ char *ciphers = NULL; + bool ssl = false; + char *opt_file = NULL; + char *opt_group = NULL; +-unsigned int db_port = MYSQL_PORT; ++unsigned int db_port = CHECK_PORT_DEFAULT; + int check_slave = 0, warn_sec = 0, crit_sec = 0; + int ignore_auth = 0; + int verbose = 0; +@@ -505,7 +509,7 @@ void + print_help (void) + { + char *myport; +- xasprintf (&myport, "%d", MYSQL_PORT); ++ xasprintf (&myport, "%d", CHECK_PORT_DEFAULT); + + print_revision (progname, NP_VERSION); + +diff --git a/plugins/check_mysql_query.c b/plugins/check_mysql_query.c +index 49a14dd3..6f492442 100644 +--- a/plugins/check_mysql_query.c ++++ b/plugins/check_mysql_query.c +@@ -33,6 +33,10 @@ const char *progname = "check_mysql_query"; + const char *copyright = "1999-2007"; + const char *email = "devel@monitoring-plugins.org"; + ++/* The default port that MySQL servers listen on. */ ++#define CHECK_PORT_DEFAULT 3306 ++ ++ + #include "common.h" + #include "utils.h" + #include "utils_base.h" +@@ -48,7 +52,7 @@ char *db_pass = NULL; + char *db = NULL; + char *opt_file = NULL; + char *opt_group = NULL; +-unsigned int db_port = MYSQL_PORT; ++unsigned int db_port = CHECK_PORT_DEFAULT; + + int process_arguments (int, char **); + int validate_arguments (void); +@@ -299,7 +303,7 @@ void + print_help (void) + { + char *myport; +- xasprintf (&myport, "%d", MYSQL_PORT); ++ xasprintf (&myport, "%d", CHECK_PORT_DEFAULT); + + print_revision (progname, NP_VERSION); + +-- +2.13.6 + diff --git a/net-analyzer/monitoring-plugins/metadata.xml b/net-analyzer/monitoring-plugins/metadata.xml new file mode 100644 index 000000000000..35a84b03398e --- /dev/null +++ b/net-analyzer/monitoring-plugins/metadata.xml @@ -0,0 +1,40 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>hydrapolic@gmail.com</email> + <name>Tomas Mozes</name> + </maintainer> + <maintainer type="person"> + <email>mjo@gentoo.org</email> + <name>Michael Orlitzky</name> + </maintainer> + <maintainer type="project"> + <email>proxy-maint@gentoo.org</email> + <name>Proxy Maintainers</name> + </maintainer> + <use> + <flag name="dns"> + Install <pkg>net-dns/bind-tools</pkg> required for monitoring + DNS servers. Disabling the flag does not remove any plugins. + </flag> + <flag name="game"> + Install <pkg>games-util/qstat</pkg> required for monitoring FPS + servers. Disabling the flag does not remove any plugins. + </flag> + <flag name="fping"> + Install <pkg>net-analyzer/fping</pkg> required for fancy ping + monitoring. Disabling the flag does not remove any plugins. + </flag> + <flag name="ssh"> + Install <pkg>net-misc/openssh</pkg> required for monitoring SSH + servers. Disabling the flag does not remove any plugins. + </flag> + <flag name="snmp"> + Install <pkg>dev-perl/Net-SNMP</pkg> and + <pkg>net-analyzer/net-snmp</pkg> required for monitoring SNMP + values. Disabling the flag does not remove any plugins. + </flag> + </use> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/monitoring-plugins/monitoring-plugins-2.2-r2.ebuild b/net-analyzer/monitoring-plugins/monitoring-plugins-2.2-r2.ebuild new file mode 100644 index 000000000000..3670a8df9283 --- /dev/null +++ b/net-analyzer/monitoring-plugins/monitoring-plugins-2.2-r2.ebuild @@ -0,0 +1,104 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +inherit eutils flag-o-matic multilib user + +DESCRIPTION="50+ standard plugins for Icinga, Naemon, Nagios, Shinken, Sensu" +HOMEPAGE="https://www.monitoring-plugins.org/" +SRC_URI="https://www.monitoring-plugins.org/download/${P}.tar.gz" + +LICENSE="GPL-3" +SLOT="0" +KEYWORDS="amd64 ~arm ~arm64 ~sparc x86" +IUSE="gnutls ipv6 ldap libressl mysql dns fping game postgres radius samba snmp ssh +ssl" + +# Most of the plugins use automagic dependencies, i.e. the plugin will +# get built if the binary it uses is installed. For example, check_snmp +# will be built only if snmpget from net-analyzer/net-snmp[-minimal] is +# installed. End result: most of our runtime dependencies are required +# at build time as well. +# +# REAL_DEPEND contains the dependencies that are actually needed to +# build. DEPEND contains those plus the automagic dependencies. +# +REAL_DEPEND="dev-lang/perl + ldap? ( net-nds/openldap ) + mysql? ( virtual/mysql ) + postgres? ( dev-db/postgresql:= ) + ssl? ( + !gnutls? ( + !libressl? ( dev-libs/openssl:0= ) + libressl? ( dev-libs/libressl:= ) + ) + gnutls? ( net-libs/gnutls ) + ) + radius? ( net-dialup/freeradius-client )" + +DEPEND="${REAL_DEPEND} + dns? ( net-dns/bind-tools ) + game? ( games-util/qstat ) + fping? ( net-analyzer/fping ) + samba? ( net-fs/samba ) + ssh? ( net-misc/openssh ) + snmp? ( dev-perl/Net-SNMP + net-analyzer/net-snmp[-minimal] )" + +# Basically everything collides with nagios-plugins. +RDEPEND="${DEPEND} + !net-analyzer/nagios-plugins" + +# At least one test is interactive. +RESTRICT="test" + +PATCHES=( "${FILESDIR}/define-own-mysql-port-constant.patch" ) + +src_configure() { + append-flags -fno-strict-aliasing + + # Use an array to prevent econf from mangling the ping args. + local myconf=() + + if use ssl; then + myconf+=( $(use_with !gnutls openssl /usr) + $(use_with gnutls gnutls /usr) ) + else + myconf+=( --without-openssl ) + myconf+=( --without-gnutls ) + fi + + # The autodetection for these two commands can hang if localhost is + # down or ICMP traffic is filtered. Bug #468296. + myconf+=( --with-ping-command="/bin/ping -n -U -w %d -c %d %s" ) + + if use ipv6; then + myconf+=( --with-ping6-command="/bin/ping6 -n -U -w %d -c %d %s" ) + fi + + econf \ + $(use_with mysql) \ + $(use_with ipv6) \ + $(use_with ldap) \ + $(use_with postgres pgsql /usr) \ + $(use_with radius) \ + "${myconf[@]}" \ + --libexecdir="/usr/$(get_libdir)/nagios/plugins" \ + --sysconfdir="/etc/nagios" +} + +DOCS=( ACKNOWLEDGEMENTS AUTHORS CODING ChangeLog FAQ \ + NEWS README REQUIREMENTS SUPPORT THANKS ) + +pkg_preinst() { + enewgroup nagios + enewuser nagios -1 /bin/bash /var/nagios/home nagios +} + +pkg_postinst() { + elog "This ebuild has a number of USE flags that determine what you" + elog "are able to monitor. Depending on what you want to monitor, some" + elog "or all of these USE flags need to be set." + elog + elog "The plugins are installed in ${EROOT%/}/usr/$(get_libdir)/nagios/plugins" +} diff --git a/net-analyzer/monitoring-plugins/monitoring-plugins-2.2-r3.ebuild b/net-analyzer/monitoring-plugins/monitoring-plugins-2.2-r3.ebuild new file mode 100644 index 000000000000..cf357d910b21 --- /dev/null +++ b/net-analyzer/monitoring-plugins/monitoring-plugins-2.2-r3.ebuild @@ -0,0 +1,104 @@ +# Copyright 1999-2018 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +inherit eutils flag-o-matic multilib user + +DESCRIPTION="50+ standard plugins for Icinga, Naemon, Nagios, Shinken, Sensu" +HOMEPAGE="https://www.monitoring-plugins.org/" +SRC_URI="https://www.monitoring-plugins.org/download/${P}.tar.gz" + +LICENSE="GPL-3" +SLOT="0" +KEYWORDS="amd64 ~arm ~arm64 sparc x86" +IUSE="gnutls ipv6 ldap libressl mysql dns fping game postgres radius samba snmp ssh +ssl" + +# Most of the plugins use automagic dependencies, i.e. the plugin will +# get built if the binary it uses is installed. For example, check_snmp +# will be built only if snmpget from net-analyzer/net-snmp[-minimal] is +# installed. End result: most of our runtime dependencies are required +# at build time as well. +# +# REAL_DEPEND contains the dependencies that are actually needed to +# build. DEPEND contains those plus the automagic dependencies. +# +REAL_DEPEND="dev-lang/perl + ldap? ( net-nds/openldap ) + mysql? ( dev-db/mysql-connector-c:= ) + postgres? ( dev-db/postgresql:= ) + ssl? ( + !gnutls? ( + !libressl? ( dev-libs/openssl:0= ) + libressl? ( dev-libs/libressl:= ) + ) + gnutls? ( net-libs/gnutls ) + ) + radius? ( net-dialup/freeradius-client )" + +DEPEND="${REAL_DEPEND} + dns? ( net-dns/bind-tools ) + game? ( games-util/qstat ) + fping? ( net-analyzer/fping ) + samba? ( net-fs/samba ) + ssh? ( net-misc/openssh ) + snmp? ( dev-perl/Net-SNMP + net-analyzer/net-snmp[-minimal] )" + +# Basically everything collides with nagios-plugins. +RDEPEND="${DEPEND} + !net-analyzer/nagios-plugins" + +# At least one test is interactive. +RESTRICT="test" + +PATCHES=( "${FILESDIR}/define-own-mysql-port-constant.patch" ) + +src_configure() { + append-flags -fno-strict-aliasing + + # Use an array to prevent econf from mangling the ping args. + local myconf=() + + if use ssl; then + myconf+=( $(use_with !gnutls openssl /usr) + $(use_with gnutls gnutls /usr) ) + else + myconf+=( --without-openssl ) + myconf+=( --without-gnutls ) + fi + + # The autodetection for these two commands can hang if localhost is + # down or ICMP traffic is filtered. Bug #468296. + myconf+=( --with-ping-command="/bin/ping -n -U -w %d -c %d %s" ) + + if use ipv6; then + myconf+=( --with-ping6-command="/bin/ping6 -n -U -w %d -c %d %s" ) + fi + + econf \ + $(use_with mysql) \ + $(use_with ipv6) \ + $(use_with ldap) \ + $(use_with postgres pgsql /usr) \ + $(use_with radius) \ + "${myconf[@]}" \ + --libexecdir="/usr/$(get_libdir)/nagios/plugins" \ + --sysconfdir="/etc/nagios" +} + +DOCS=( ACKNOWLEDGEMENTS AUTHORS CODING ChangeLog FAQ \ + NEWS README REQUIREMENTS SUPPORT THANKS ) + +pkg_preinst() { + enewgroup nagios + enewuser nagios -1 /bin/bash /var/nagios/home nagios +} + +pkg_postinst() { + elog "This ebuild has a number of USE flags that determine what you" + elog "are able to monitor. Depending on what you want to monitor, some" + elog "or all of these USE flags need to be set." + elog + elog "The plugins are installed in ${EROOT%/}/usr/$(get_libdir)/nagios/plugins" +} diff --git a/net-analyzer/monitoring-plugins/monitoring-plugins-2.2-r4.ebuild b/net-analyzer/monitoring-plugins/monitoring-plugins-2.2-r4.ebuild new file mode 100644 index 000000000000..ae1073c7cae9 --- /dev/null +++ b/net-analyzer/monitoring-plugins/monitoring-plugins-2.2-r4.ebuild @@ -0,0 +1,104 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +inherit eutils flag-o-matic multilib user + +DESCRIPTION="50+ standard plugins for Icinga, Naemon, Nagios, Shinken, Sensu" +HOMEPAGE="https://www.monitoring-plugins.org/" +SRC_URI="https://www.monitoring-plugins.org/download/${P}.tar.gz" + +LICENSE="GPL-3" +SLOT="0" +KEYWORDS="~amd64 ~arm ~arm64 ~sparc ~x86" +IUSE="gnutls ipv6 ldap libressl mysql dns fping game postgres radius samba snmp ssh +ssl" + +# Most of the plugins use automagic dependencies, i.e. the plugin will +# get built if the binary it uses is installed. For example, check_snmp +# will be built only if snmpget from net-analyzer/net-snmp[-minimal] is +# installed. End result: most of our runtime dependencies are required +# at build time as well. +# +# REAL_DEPEND contains the dependencies that are actually needed to +# build. DEPEND contains those plus the automagic dependencies. +# +REAL_DEPEND="dev-lang/perl + ldap? ( net-nds/openldap ) + mysql? ( dev-db/mysql-connector-c:= ) + postgres? ( dev-db/postgresql:= ) + ssl? ( + !gnutls? ( + !libressl? ( dev-libs/openssl:0= ) + libressl? ( dev-libs/libressl:= ) + ) + gnutls? ( net-libs/gnutls ) + ) + radius? ( net-dialup/freeradius-client )" + +DEPEND="${REAL_DEPEND} + dns? ( net-dns/bind-tools ) + game? ( games-util/qstat ) + fping? ( net-analyzer/fping ) + samba? ( net-fs/samba ) + ssh? ( net-misc/openssh ) + snmp? ( dev-perl/Net-SNMP + net-analyzer/net-snmp[-minimal] )" + +# Basically everything collides with nagios-plugins. +RDEPEND="${DEPEND} + !net-analyzer/nagios-plugins" + +# At least one test is interactive. +RESTRICT="test" + +PATCHES=( "${FILESDIR}/define-own-mysql-port-constant.patch" ) + +src_configure() { + append-flags -fno-strict-aliasing + + # Use an array to prevent econf from mangling the ping args. + local myconf=() + + if use ssl; then + myconf+=( $(use_with !gnutls openssl /usr) + $(use_with gnutls gnutls /usr) ) + else + myconf+=( --without-openssl ) + myconf+=( --without-gnutls ) + fi + + # The autodetection for these two commands can hang if localhost is + # down or ICMP traffic is filtered. Bug #468296. + myconf+=( --with-ping-command="/bin/ping -4 -n -U -w %d -c %d %s" ) + + if use ipv6; then + myconf+=( --with-ping6-command="/bin/ping -6 -n -U -w %d -c %d %s" ) + fi + + econf \ + $(use_with mysql) \ + $(use_with ipv6) \ + $(use_with ldap) \ + $(use_with postgres pgsql /usr) \ + $(use_with radius) \ + "${myconf[@]}" \ + --libexecdir="/usr/$(get_libdir)/nagios/plugins" \ + --sysconfdir="/etc/nagios" +} + +DOCS=( ACKNOWLEDGEMENTS AUTHORS CODING ChangeLog FAQ \ + NEWS README REQUIREMENTS SUPPORT THANKS ) + +pkg_preinst() { + enewgroup nagios + enewuser nagios -1 /bin/bash /var/nagios/home nagios +} + +pkg_postinst() { + elog "This ebuild has a number of USE flags that determine what you" + elog "are able to monitor. Depending on what you want to monitor, some" + elog "or all of these USE flags need to be set." + elog + elog "The plugins are installed in ${EROOT%/}/usr/$(get_libdir)/nagios/plugins" +} diff --git a/net-analyzer/mping/Manifest b/net-analyzer/mping/Manifest new file mode 100644 index 000000000000..b6edbb435c99 --- /dev/null +++ b/net-analyzer/mping/Manifest @@ -0,0 +1 @@ +DIST mping-2.01.tar.gz 159203 BLAKE2B 5bf284ccc098d9555ae2e5e2ec406031dfa193ae4d8724a9fff84a7d1e19609e744b18d9a4a5fcfb4b8a8a73e77c58df8cc363f117914a4c1ec28c8da3901034 SHA512 9e1c243013f74a69d3014c11503ad9ff9b8992dcb3eb252a85a1958e8d63dadeab79b6937b76ddce9cc0d22c50a19ec90d40a68d3efc303c48a631f316f5b167 diff --git a/net-analyzer/mping/files/mping-2.01-RFC3542.patch b/net-analyzer/mping/files/mping-2.01-RFC3542.patch new file mode 100644 index 000000000000..be34aa7357fd --- /dev/null +++ b/net-analyzer/mping/files/mping-2.01-RFC3542.patch @@ -0,0 +1,56 @@ +http://www.ietf.org/rfc/rfc3542.txt + +http://bugs.gentoo.org/153252 + +--- a/src/mping.c ++++ b/src/mping.c +@@ -1688,6 +1688,20 @@ + } + } + ++/* RFC3542 changed some definitions from RFC2292 for no good reason, whee ! ++ * the newer 3542 uses a MLD_ prefix where as 2292 uses ICMP6_ prefix */ ++#ifndef MLD_LISTENER_QUERY ++# define MLD_LISTENER_QUERY ICMP6_MEMBERSHIP_QUERY ++#endif ++#ifndef MLD_LISTENER_REPORT ++# define MLD_LISTENER_REPORT ICMP6_MEMBERSHIP_REPORT ++#endif ++#ifndef MLD_LISTENER_REDUCTION ++# define MLD_LISTENER_REDUCTION ICMP6_MEMBERSHIP_REDUCTION ++#endif ++#ifndef ICMP6_DST_UNREACH_BEYONDSCOPE ++# define ICMP6_DST_UNREACH_BEYONDSCOPE ICMP6_DST_UNREACH_NOTNEIGHBOR ++#endif + /* + * Print a descriptive string about an ICMP6 header. + */ +@@ -1704,8 +1718,8 @@ + case ICMP6_DST_UNREACH_ADMIN: + printf("Administratively Prohibited\n"); + break; +- case ICMP6_DST_UNREACH_NOTNEIGHBOR: +- printf("Not a Neighbour\n"); ++ case ICMP6_DST_UNREACH_BEYONDSCOPE: ++ printf("Beyond scope\n"); + break; + case ICMP6_DST_UNREACH_ADDR: + printf("Destination Host Unreachable\n"); +@@ -1755,13 +1769,13 @@ + case ICMP6_ECHO_REPLY: + printf("Echo reply\n"); + break; +- case ICMP6_MEMBERSHIP_QUERY: +- printf("Membership Query\n"); ++ case MLD_LISTENER_QUERY: ++ printf("MLD Query\n"); + break; +- case ICMP6_MEMBERSHIP_REPORT: ++ case MLD_LISTENER_REPORT: + printf("MLD Report\n"); + break; +- case ICMP6_MEMBERSHIP_REDUCTION: ++ case MLD_LISTENER_REDUCTION: + printf("MLD Reduction\n"); + break; + case ND_ROUTER_ADVERT: diff --git a/net-analyzer/mping/metadata.xml b/net-analyzer/mping/metadata.xml new file mode 100644 index 000000000000..dc3276057d7f --- /dev/null +++ b/net-analyzer/mping/metadata.xml @@ -0,0 +1,19 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<maintainer type="project"> + <email>netmon@gentoo.org</email> + <name>Gentoo network monitoring and analysis project</name> +</maintainer> +<longdescription> +UNINETTs delay statistics for IPv6 is now up and +running as a test project. The main goal with this +test project,is to test how well +Mping 2.0 works against the IPv6 network, and how well +it handles IPv4 and IPv6 adresses simultaniously. For +now we have to +resort to "IPv6 over IPv4 tunneling", but this is not +a permanent solution. +</longdescription> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/mping/mping-2.01.ebuild b/net-analyzer/mping/mping-2.01.ebuild new file mode 100644 index 000000000000..3133eb907421 --- /dev/null +++ b/net-analyzer/mping/mping-2.01.ebuild @@ -0,0 +1,19 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 +inherit eutils + +DESCRIPTION="IPv4/6 round-robin multiping client" +HOMEPAGE="http://mping.uninett.no" +SRC_URI="http://mping.uninett.no/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="amd64 ppc ppc64 sparc x86" + +DOCS=( AUTHORS ChangeLog NEWS README TODO ) + +src_prepare() { + epatch "${FILESDIR}"/${P}-RFC3542.patch +} diff --git a/net-analyzer/mrtg-ping-probe/Manifest b/net-analyzer/mrtg-ping-probe/Manifest new file mode 100644 index 000000000000..fdfdedeb8310 --- /dev/null +++ b/net-analyzer/mrtg-ping-probe/Manifest @@ -0,0 +1 @@ +DIST mrtg-ping-probe-2.2.0.tar.gz 36923 BLAKE2B b4556a46d0d644dc5215b686767370542a0b382287aabe4a9c3c7ed8a165005b7602a83135166b9539f3ac479a397ac6e782ef51eda107140ddb426de0f1397c SHA512 efc86ed732547359d8b2d94da367946d8b573e2b4d1b3d240b8eb7c5bfff17971848ad62c1448cdc0305393193d969361328448d9c9b25ae54866f71614b7cea diff --git a/net-analyzer/mrtg-ping-probe/files/mrtg-ping-cfg b/net-analyzer/mrtg-ping-probe/files/mrtg-ping-cfg new file mode 100644 index 000000000000..85a38221b625 --- /dev/null +++ b/net-analyzer/mrtg-ping-probe/files/mrtg-ping-cfg @@ -0,0 +1,84 @@ +#!/bin/sh +# +# mrtg-ping-cfg { ping | loss } <device> <"Title of page"> +# +# This creates the mrtg.cfg configurations to do pings to devices. +# Makes use of mrt-ping-probe by Peter W. Osel <pwo@guug.de> (see below) +# +# leewm@sgp.hp.com +# Hewlett Packard Singapore +# IT Site Infrastructure Services +# modifed by "Molchanov Alexander <xorader@mail.ru>" + +# location of mrtg ping probe +PING_PROBE=/usr/bin/mrtg-ping-probe + +if [ $# -ne 3 ] +then + head -n 11 $0 + exit +fi + +if [ $1 == "ping" ] ; then + target="$2.ping" + MaxBytes=5000 + AbsMax=10000 + Unscaled="" + YLegend="Round Trip Time" + ShortLegend="ms" + Legend1="Maximum Round Trip Time in Milli Second" + Legend2="Minimum Round Trip Time in Milli Second" + Legend3="Maximal 5 Minute Maximum Round Trip Time" + Legend4="Maximal 5 Minute Minimum Round Trip Time" + LegendI=" Max:" + LegendO=" Min:" + PageTop="<H1>$3</H1><P>Actually we are measuring the ping time between our web server and $2." +elif [ $1 == "loss" ] ; then + target="$2.loss" + PING_PROBE="$PING_PROBE -p loss/loss" + MaxBytes=100 + AbsMax=101 + Unscaled="Unscaled[$target]: dwmy" + YLegend="% Packet Loss" + ShortLegend="%" + Legend1="% Packet Loss" + Legend2="% Packet Loss" + Legend3="Maximal 5 Minute % Packet Loss" + Legend4="Maximal 5 Minute % Packet Loss" + LegendI=" % loss:" + LegendO=" % loss:" + PageTop="<H1>$3</H1><P>Actually we are packet loss between our web server and $2." +else + echo "enter first argument 'ping' or 'loss'" >&2 + head -n 11 $0 + exit +fi + +cat <<EOF +############################################################# +# $1 stats for $2 +# $3 + +Title[$target]: $3 +MaxBytes[$target]: $MaxBytes +AbsMax[$target]: $AbsMax +Options[$target]: gauge +Target[$target]: \`$PING_PROBE $2\` +PageTop[$target]: $PageTop +YLegend[$target]: $YLegend +ShortLegend[$target]: $ShortLegend +Legend1[$target]: $Legend1 +Legend2[$target]: $Legend2 +Legend3[$target]: $Legend3 +Legend4[$target]: $Legend4 +LegendI[$target]: $LegendI +LegendO[$target]: $LegendO +WithPeak[$target]: ymwd +$Unscaled + +#------------------------------------------------------------------- + +EOF + +exit + diff --git a/net-analyzer/mrtg-ping-probe/metadata.xml b/net-analyzer/mrtg-ping-probe/metadata.xml new file mode 100644 index 000000000000..bd13a914477c --- /dev/null +++ b/net-analyzer/mrtg-ping-probe/metadata.xml @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<maintainer type="project"> + <email>netmon@gentoo.org</email> + <name>Gentoo network monitoring and analysis project</name> +</maintainer> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/mrtg-ping-probe/mrtg-ping-probe-2.2.0.ebuild b/net-analyzer/mrtg-ping-probe/mrtg-ping-probe-2.2.0.ebuild new file mode 100644 index 000000000000..98d1db01c9ce --- /dev/null +++ b/net-analyzer/mrtg-ping-probe/mrtg-ping-probe-2.2.0.ebuild @@ -0,0 +1,33 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +DESCRIPTION="Addon mrtg contrib for stats ping/loss packets" +SRC_URI="ftp://ftp.pwo.de/pub/pwo/mrtg/${PN}/${P}.tar.gz" +HOMEPAGE="http://pwo.de/projects/mrtg/" + +KEYWORDS="~x86" +LICENSE="GPL-2" +SLOT="0" + +DEPEND="dev-lang/perl" +RDEPEND=" + ${DEPEND} + net-analyzer/mrtg +" + +src_prepare() { + sed -i check-ping-fmt \ + -e 's:#!/usr/local/bin/perl -w:#!/usr/bin/perl -w:' \ + || die + sed -i mrtg-ping-probe \ + -e 's:#!/bin/perl:#!/usr/bin/perl:' \ + || die +} + +src_install() { + dodoc ChangeLog NEWS README TODO mrtg.cfg-ping + doman mrtg-ping-probe.1 + dobin check-ping-fmt mrtg-ping-probe "${FILESDIR}"/mrtg-ping-cfg +} diff --git a/net-analyzer/mrtg/Manifest b/net-analyzer/mrtg/Manifest new file mode 100644 index 000000000000..5e45e92440e8 --- /dev/null +++ b/net-analyzer/mrtg/Manifest @@ -0,0 +1 @@ +DIST mrtg-2.17.7.tar.gz 1098650 BLAKE2B f8191296fc163b950792b8ecee773cfe643a7390d49444ce8b5012b2dbd932093cb4f71745ba2c86bda579fbcd3c73a4f9cebc1fa4e7f791a7b4461ae92ac191 SHA512 b25ab38416213bc5128612724530f36f4a855bb66a65f8bbe4bdafef05d2688eed68f5c3df1e13193102507a4114e71ec226ad32dd6b4d3ae2e2291320d8e768 diff --git a/net-analyzer/mrtg/files/mrtg-2.17.4-socket6.patch b/net-analyzer/mrtg/files/mrtg-2.17.4-socket6.patch new file mode 100644 index 000000000000..5540874d9a00 --- /dev/null +++ b/net-analyzer/mrtg/files/mrtg-2.17.4-socket6.patch @@ -0,0 +1,11 @@ +--- a/bin/mrtg ++++ b/bin/mrtg +@@ -300,7 +300,7 @@ sub main { + if ($cfg{enableipv6} eq 'yes') { + if ( eval {local $SIG{__DIE__};require Socket; require Socket6; require IO::Socket::INET6;}) { + import Socket; +- import Socket6; ++ Socket6->import(qw(inet_pton getaddrinfo)); + debug('base', "IPv6 libraries found, IPv6 enabled."); + } else { + warn "$NOW: WARNING: IPv6 libraries not found, IPv6 disabled.\n"; diff --git a/net-analyzer/mrtg/files/mrtg.confd b/net-analyzer/mrtg/files/mrtg.confd new file mode 100644 index 000000000000..3164a361955d --- /dev/null +++ b/net-analyzer/mrtg/files/mrtg.confd @@ -0,0 +1,16 @@ +# Copyright 1999-2005 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +MRTG_CONF="/etc/mrtg.conf" +MRTG_PID="/var/run/mrtg.pid" + +# uncomment and set the following, if you'd like to run mrtg as a +# different user/group +#MRTG_USER="" +#MRTG_GROUP="" + +# uncomment if you'd like to enable logging +#MRTG_LOG="/var/log/mrtg.log" + +# set any extra options here +MRTG_OPTS="" diff --git a/net-analyzer/mrtg/files/mrtg.rc b/net-analyzer/mrtg/files/mrtg.rc new file mode 100644 index 000000000000..0ff5d0783f38 --- /dev/null +++ b/net-analyzer/mrtg/files/mrtg.rc @@ -0,0 +1,53 @@ +#!/sbin/openrc-run +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +depend() { + need net + + # if monitoring snmp variables on this machine: + # use net-snmpd +} + +checkconfig() { + if [ ! -f ${MRTG_CONF} ] ; then + eerror "Please create ${MRTG_CONF} (try man cfgmaker)" + return 1 + fi + + mrtg --check ${MRTG_CONF} + return $? +} + +start() { + # mrtg will not run if LANG=*utf8 + # use grep instead of bash regexp for bug #159786 + [ "$(echo $LANG|grep -E '((^[A-Za-z0-9\_\@\-]+\.)|(^))([uU][tT][fF]-?8)$')" ] \ + && LANG='C' + + checkconfig || return $? + + # enable logging? + [ -n "${MRTG_LOG}" ] && \ + MRTG_OPTS="${MRTG_OPTS} --logging ${MRTG_LOG}" + + # run as a different user? + [ -n "${MRTG_USER}" ] && \ + MRTG_OPTS="${MRTG_OPTS} --user ${MRTG_USER}" + + # run as a different group? + [ -n "${MRTG_GROUP}" ] && \ + MRTG_OPTS="${MRTG_OPTS} --group ${MRTG_GROUP}" + + ebegin "Starting mrtg" + start-stop-daemon --start --quiet --pidfile ${MRTG_PID} --name mrtg\ + --exec /usr/bin/mrtg -- --daemon --pid-file=${MRTG_PID} \ + ${MRTG_OPTS} ${MRTG_CONF} >/dev/null + eend $? "Failed to start mrtg" +} + +stop() { + ebegin "Stopping mrtg" + start-stop-daemon --stop --quiet --pidfile ${MRTG_PID} + eend $? "Failed to stop mrtg" +} diff --git a/net-analyzer/mrtg/metadata.xml b/net-analyzer/mrtg/metadata.xml new file mode 100644 index 000000000000..bd13a914477c --- /dev/null +++ b/net-analyzer/mrtg/metadata.xml @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<maintainer type="project"> + <email>netmon@gentoo.org</email> + <name>Gentoo network monitoring and analysis project</name> +</maintainer> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/mrtg/mrtg-2.17.7.ebuild b/net-analyzer/mrtg/mrtg-2.17.7.ebuild new file mode 100644 index 000000000000..b7136c69d4d7 --- /dev/null +++ b/net-analyzer/mrtg/mrtg-2.17.7.ebuild @@ -0,0 +1,49 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 +inherit multilib + +DESCRIPTION="A tool to monitor the traffic load on network-links" +HOMEPAGE="https://oss.oetiker.ch/mrtg/" +SRC_URI="https://oss.oetiker.ch/mrtg/pub/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha amd64 ~arm hppa ppc ppc64 sparc x86" +IUSE="selinux" + +DEPEND=" + >=dev-perl/SNMP_Session-1.13-r2 + >=dev-perl/Socket6-0.23 + dev-lang/perl + media-libs/gd[png] +" +RDEPEND=" + ${DEPEND} + selinux? ( sec-policy/selinux-mrtg ) +" +PATCHES=( + "${FILESDIR}"/${PN}-2.17.4-socket6.patch +) + +src_prepare() { + rm ./lib/mrtg2/{SNMP_{Session,util},BER}.pm || die + + sed -i \ + -e 's|main::SL}lib${main::SL|main::SL}'"$(get_libdir)"'${main::SL|g' \ + $(find bin -type f) contrib/cfgmaker_dlci/cfgmaker_dlci || die + + default +} + +src_install() { + keepdir /var/lib/mrtg + + default + + mv "${ED}"/usr/share/doc/{mrtg2,${PF}} || die + + newinitd "${FILESDIR}/mrtg.rc" ${PN} + newconfd "${FILESDIR}/mrtg.confd" ${PN} +} diff --git a/net-analyzer/mtr/Manifest b/net-analyzer/mtr/Manifest new file mode 100644 index 000000000000..bcb0bbbe01b6 --- /dev/null +++ b/net-analyzer/mtr/Manifest @@ -0,0 +1,3 @@ +DIST mtr-0.87.tar.gz 184645 BLAKE2B e96535b0bd46ee63c5e6110ee465195a9ead6ff7c7ea3629b2668631f25e9181cf4236ba0e2cfc0517e7c70683bbb6347d9c26a2b09701d89e225c27aa2faae4 SHA512 172ba2f78a6ee4deb427ac2fb00dff16843215dbd23663fbe41fcc957ffe278b408a73a0c7e1c05788b235e2d03fb53f9971b8b82d4de2f95edcaa9f2cff3cf9 +DIST mtr-0.92.tar.gz 296430 BLAKE2B 0f7dfcbd77d6f9cd0a9ba4c7e6829ce8f3fa0e1de4009632d10c3a1c2acc280db5830296695c27d89317d38d507af8f7e9bdd12b1c0e0d198872dc39f13032e7 SHA512 d362a418b6c17fd2d08da1ed9e033fa3330e4c0497e1bb0644f6193d23f4e20dd8ee181942c2a20ec0025a8b96c521394a21be5a1d9036f8a0a8c4cddfbe381f +DIST mtr-0.93.tar.gz 291015 BLAKE2B 6ac0e21f9e06fbfee9e9ada4cddb6cd9685ae669a05d1ed257a2c238ab78ac16e1a1e152ef1359ca530b0eced14c9333df2b691c27cbc29173c843ebc64eaaa9 SHA512 046e98a661bd6248ce819411ceb6e2b875b92877de38523594898df507836c113573cf40d7d4cc548370f515abe99e0aa4d8b3ba44ad54dd00f8e93c8a96c021 diff --git a/net-analyzer/mtr/files/mtr-0.80-impl-dec.patch b/net-analyzer/mtr/files/mtr-0.80-impl-dec.patch new file mode 100644 index 000000000000..5b41a54c744b --- /dev/null +++ b/net-analyzer/mtr/files/mtr-0.80-impl-dec.patch @@ -0,0 +1,12 @@ +diff --git a/gtk.c b/gtk.c +index e42f4f6..333d7c8 100644 +--- a/gtk.c ++++ b/gtk.c +@@ -24,6 +24,7 @@ + #include <unistd.h> + #include <sys/time.h> + #include <sys/types.h> ++#include <string.h> + + #ifndef NO_GTK + #include <stdio.h> diff --git a/net-analyzer/mtr/files/mtr-0.87-ipv6.patch b/net-analyzer/mtr/files/mtr-0.87-ipv6.patch new file mode 100644 index 000000000000..32a62853387c --- /dev/null +++ b/net-analyzer/mtr/files/mtr-0.87-ipv6.patch @@ -0,0 +1,59 @@ +--- a/net.c ++++ b/net.c +@@ -320,9 +320,13 @@ + struct sockaddr_storage local; + struct sockaddr_storage remote; + struct sockaddr_in *local4 = (struct sockaddr_in *) &local; ++#ifdef ENABLE_IPV6 + struct sockaddr_in6 *local6 = (struct sockaddr_in6 *) &local; ++#endif + struct sockaddr_in *remote4 = (struct sockaddr_in *) &remote; ++#ifdef ENABLE_IPV6 + struct sockaddr_in6 *remote6 = (struct sockaddr_in6 *) &remote; ++#endif + socklen_t len; + + ttl = index + 1; +@@ -437,9 +441,13 @@ + struct sockaddr_storage local; + struct sockaddr_storage remote; + struct sockaddr_in *local4 = (struct sockaddr_in *) &local; ++#ifdef ENABLE_IPV6 + struct sockaddr_in6 *local6 = (struct sockaddr_in6 *) &local; ++#endif + struct sockaddr_in *remote4 = (struct sockaddr_in *) &remote; ++#ifdef ENABLE_IPV6 + struct sockaddr_in6 *remote6 = (struct sockaddr_in6 *) &remote; ++#endif + socklen_t len; + + ttl = index + 1; +@@ -726,8 +734,12 @@ + + /* sendto() assumes packet length includes the IPv4 header but not the + IPv6 header. */ ++#ifdef ENABLE_IPV6 + spacketsize = abs(packetsize) - + ( ( af == AF_INET ) ? 0 : sizeof (struct ip6_hdr) ); ++#else ++ spacketsize = abs(packetsize); ++#endif + rv = sendto(sendsock, packet, spacketsize, 0, remotesockaddr, salen); + if (first && (rv < 0) && ((errno == EINVAL) || (errno == EMSGSIZE))) { + /* Try the first packet again using host byte order. */ +@@ -1535,11 +1547,15 @@ + struct sockaddr_in name_struct; + #endif + struct sockaddr_in * sa4; ++#ifdef ENABLE_IPV6 + struct sockaddr_in6 * sa6; ++#endif + struct sockaddr * name = (struct sockaddr *) &name_struct; + struct sockaddr_storage remote; + struct sockaddr_in *remote4 = (struct sockaddr_in *) &remote; ++#ifdef ENABLE_IPV6 + struct sockaddr_in6 *remote6 = (struct sockaddr_in6 *) &remote; ++#endif + socklen_t len; + int s; + diff --git a/net-analyzer/mtr/files/mtr-0.87-tinfo.patch b/net-analyzer/mtr/files/mtr-0.87-tinfo.patch new file mode 100644 index 000000000000..4dbdef1cc2fb --- /dev/null +++ b/net-analyzer/mtr/files/mtr-0.87-tinfo.patch @@ -0,0 +1,11 @@ +--- a/configure.ac ++++ b/configure.ac +@@ -25,6 +25,8 @@ + AC_DEFINE(NO_CURSES, 1, [Define if you don't have the curses libraries available.]) + CURSES_OBJ=) + ++AC_SEARCH_LIBS(raw, [ncurses curses cursesX tinfo]) ++ + AC_CHECK_LIB(ncurses, use_default_colors, + AC_DEFINE(HAVE_USE_DEFAULT_COLORS, 1, [Define this if your curses library has the use_default_colors() command.])) + diff --git a/net-analyzer/mtr/files/mtr-0.88-tinfo.patch b/net-analyzer/mtr/files/mtr-0.88-tinfo.patch new file mode 100644 index 000000000000..c7252b74435e --- /dev/null +++ b/net-analyzer/mtr/files/mtr-0.88-tinfo.patch @@ -0,0 +1,13 @@ +--- a/configure.ac ++++ b/configure.ac +@@ -101,7 +101,10 @@ + # (On Solaris 11.3, ncurses builds and links for us, but curses does not.) + [AC_SEARCH_LIBS( + [initscr], [ncurses curses], ++ [AC_SEARCH_LIBS( ++ [raw], [ncurses curses cursesX tinfo], + [AC_DEFINE([HAVE_CURSES], [1], [Define if a curses library available])], ++ [with_ncurses=no])], + [with_ncurses=no]) + ]) + AM_CONDITIONAL([WITH_CURSES], [test "x$with_ncurses" = xyes]) diff --git a/net-analyzer/mtr/metadata.xml b/net-analyzer/mtr/metadata.xml new file mode 100644 index 000000000000..6d60ca626dd5 --- /dev/null +++ b/net-analyzer/mtr/metadata.xml @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>netmon@gentoo.org</email> + <name>Gentoo network monitoring and analysis project</name> + </maintainer> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/mtr/mtr-0.87.ebuild b/net-analyzer/mtr/mtr-0.87.ebuild new file mode 100644 index 000000000000..c3577104b26d --- /dev/null +++ b/net-analyzer/mtr/mtr-0.87.ebuild @@ -0,0 +1,51 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 +inherit autotools eutils fcaps flag-o-matic + +DESCRIPTION="My TraceRoute, an Excellent network diagnostic tool" +HOMEPAGE="https://www.bitwizard.nl/mtr/" +SRC_URI="https://www.bitwizard.nl/mtr/files/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha amd64 arm hppa ~ia64 ~mips ppc ppc64 ~s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos" +IUSE="gtk ipv6" + +RDEPEND=" + sys-libs/ncurses:0= + gtk? ( + dev-libs/glib:2 + x11-libs/gtk+:2 + ) +" +DEPEND=" + ${RDEPEND} + sys-devel/autoconf + virtual/pkgconfig +" + +DOCS=( AUTHORS FORMATS NEWS README SECURITY TODO ) +FILECAPS=( cap_net_raw /usr/sbin/mtr ) +PATCHES=( + "${FILESDIR}"/${PN}-0.80-impl-dec.patch + "${FILESDIR}"/${PN}-0.87-ipv6.patch + "${FILESDIR}"/${PN}-0.87-tinfo.patch +) + +src_prepare() { + default + eautoreconf +} + +src_configure() { + # In the source's configure script -lresolv is commented out. Apparently it + # is needed for 64bit macos still. + [[ ${CHOST} == *-darwin* ]] && append-libs -lresolv + + econf \ + $(use_enable ipv6) \ + $(use_with gtk) \ + --disable-gtktest +} diff --git a/net-analyzer/mtr/mtr-0.92-r1.ebuild b/net-analyzer/mtr/mtr-0.92-r1.ebuild new file mode 100644 index 000000000000..703412cb9201 --- /dev/null +++ b/net-analyzer/mtr/mtr-0.92-r1.ebuild @@ -0,0 +1,63 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 +inherit autotools eutils fcaps flag-o-matic + +DESCRIPTION="My TraceRoute, an Excellent network diagnostic tool" +HOMEPAGE="https://www.bitwizard.nl/mtr/" +SRC_URI="https://www.bitwizard.nl/mtr/files/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos" +IUSE="gtk ipv6 ncurses" + +RDEPEND=" + gtk? ( + dev-libs/glib:2 + x11-libs/gtk+:2 + ) + ncurses? ( sys-libs/ncurses:0= ) +" +DEPEND=" + ${RDEPEND} + sys-devel/autoconf + virtual/pkgconfig +" + +DOCS=( AUTHORS FORMATS NEWS README SECURITY TODO ) +FILECAPS=( cap_net_raw usr/sbin/mtr-packet ) +PATCHES=( + "${FILESDIR}"/${PN}-0.88-tinfo.patch +) + +src_prepare() { + default + + eautoreconf +} + +src_configure() { + # In the source's configure script -lresolv is commented out. Apparently it + # is needed for 64bit macos still. + [[ ${CHOST} == *-darwin* ]] && append-libs -lresolv + econf \ + $(use_enable ipv6) \ + $(use_with gtk) \ + $(use_with ncurses) +} + +src_test() { + [[ "$UID" = 0 ]] && default +} + +pkg_postinst() { + fcaps_pkg_postinst + + if use prefix && [[ ${CHOST} == *-darwin* ]] ; then + ewarn "mtr needs root privileges to run. To grant them:" + ewarn " % sudo chown root ${EPREFIX}/usr/sbin/mtr" + ewarn " % sudo chmod u+s ${EPREFIX}/usr/sbin/mtr" + fi +} diff --git a/net-analyzer/mtr/mtr-0.93-r1.ebuild b/net-analyzer/mtr/mtr-0.93-r1.ebuild new file mode 100644 index 000000000000..c0b5cae918d7 --- /dev/null +++ b/net-analyzer/mtr/mtr-0.93-r1.ebuild @@ -0,0 +1,65 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 +inherit autotools eutils fcaps flag-o-matic + +DESCRIPTION="My TraceRoute, an Excellent network diagnostic tool" +HOMEPAGE="https://www.bitwizard.nl/mtr/" +SRC_URI="https://www.bitwizard.nl/mtr/files/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos" +IUSE="gtk ipv6 ncurses" + +RDEPEND=" + gtk? ( + dev-libs/glib:2 + x11-libs/gtk+:2 + ) + ncurses? ( sys-libs/ncurses:0= ) +" +DEPEND=" + ${RDEPEND} + sys-devel/autoconf + virtual/pkgconfig +" + +DOCS=( AUTHORS NEWS SECURITY TODO ) +FILECAPS=( cap_net_raw usr/sbin/mtr-packet ) +PATCHES=( + "${FILESDIR}"/${PN}-0.88-tinfo.patch +) + +src_prepare() { + default + + sed -i -e 's|m4_esyscmd(\[build-aux/git-version-gen .tarball-version\])|'"${PV}"'|g' configure.ac || die + + eautoreconf +} + +src_configure() { + # In the source's configure script -lresolv is commented out. Apparently it + # is needed for 64bit macos still. + [[ ${CHOST} == *-darwin* ]] && append-libs -lresolv + econf \ + $(use_enable ipv6) \ + $(use_with gtk) \ + $(use_with ncurses) +} + +src_test() { + [[ "$UID" = 0 ]] && default +} + +pkg_postinst() { + fcaps_pkg_postinst + + if use prefix && [[ ${CHOST} == *-darwin* ]] ; then + ewarn "mtr needs root privileges to run. To grant them:" + ewarn " % sudo chown root ${EPREFIX}/usr/sbin/mtr" + ewarn " % sudo chmod u+s ${EPREFIX}/usr/sbin/mtr" + fi +} diff --git a/net-analyzer/mtr/mtr-9999.ebuild b/net-analyzer/mtr/mtr-9999.ebuild new file mode 100644 index 000000000000..75a592ba00d8 --- /dev/null +++ b/net-analyzer/mtr/mtr-9999.ebuild @@ -0,0 +1,59 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +inherit autotools fcaps flag-o-matic git-r3 + +DESCRIPTION="My TraceRoute, an Excellent network diagnostic tool" +HOMEPAGE="https://www.bitwizard.nl/mtr/" +EGIT_REPO_URI="https://github.com/traviscross/mtr" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="" +IUSE="gtk ipv6 ncurses" + +RDEPEND=" + gtk? ( + dev-libs/glib:2 + x11-libs/gtk+:3 + ) + ncurses? ( sys-libs/ncurses:0= ) +" +DEPEND=" + ${RDEPEND} + sys-devel/autoconf + virtual/pkgconfig +" +DOCS=( AUTHORS FORMATS NEWS README.md SECURITY TODO ) +FILECAPS=( cap_net_raw usr/sbin/mtr-packet ) +PATCHES=( + "${FILESDIR}"/${PN}-0.88-tinfo.patch +) +RESTRICT="test" + +src_prepare() { + default + + eautoreconf +} + +src_configure() { + # In the source's configure script -lresolv is commented out. Apparently it + # is still needed for 64-bit MacOS. + [[ ${CHOST} == *-darwin* ]] && append-libs -lresolv + econf \ + $(use_enable ipv6) \ + $(use_with gtk) \ + $(use_with ncurses) +} + +pkg_postinst() { + fcaps_pkg_postinst + + if use prefix && [[ ${CHOST} == *-darwin* ]] ; then + ewarn "mtr needs root privileges to run. To grant them:" + ewarn " % sudo chown root ${EPREFIX}/usr/sbin/mtr" + ewarn " % sudo chmod u+s ${EPREFIX}/usr/sbin/mtr" + fi +} diff --git a/net-analyzer/multimon-ng/Manifest b/net-analyzer/multimon-ng/Manifest new file mode 100644 index 000000000000..59bc5904a3ff --- /dev/null +++ b/net-analyzer/multimon-ng/Manifest @@ -0,0 +1 @@ +DIST multimon-ng-1.1.8.tar.gz 2430488 BLAKE2B 82bc0be58e2f7d596363fc916c11584cbd1335e7984194af22955587877ad1cba2a0cca819467061bb18b97ca70f5c2adfd73ccbf159fbc27348d59429959ada SHA512 9cf93362555e5dc465a9ec60dff27b9875879afd954e810069022b3c003eca4c3ab2a833f1c00fef877175bc72e2d378bbb53380ada54542ae29d257a7d2bd1b diff --git a/net-analyzer/multimon-ng/metadata.xml b/net-analyzer/multimon-ng/metadata.xml new file mode 100644 index 000000000000..513ab490513a --- /dev/null +++ b/net-analyzer/multimon-ng/metadata.xml @@ -0,0 +1,16 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>zerochaos@gentoo.org</email> + <name>Rick Farina</name> + </maintainer> + <maintainer type="project"> + <email>radio@gentoo.org</email> + <name>Radio</name> + </maintainer> + <upstream> + <remote-id type="github">EliasOenal/multimonNG</remote-id> + </upstream> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/multimon-ng/multimon-ng-1.1.8.ebuild b/net-analyzer/multimon-ng/multimon-ng-1.1.8.ebuild new file mode 100644 index 000000000000..da7b10babdb7 --- /dev/null +++ b/net-analyzer/multimon-ng/multimon-ng-1.1.8.ebuild @@ -0,0 +1,32 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit cmake-utils + +DESCRIPTION="a fork of multimon, decodes multiple digital transmission modes" +HOMEPAGE="https://github.com/EliasOenal/multimon-ng" + +if [[ ${PV} == 9999* ]]; then + inherit git-r3 + EGIT_REPO_URI="https://github.com/EliasOenal/multimon-ng.git" + KEYWORDS="" +else + SRC_URI="https://github.com/EliasOenal/multimonNG/archive/${PV}.tar.gz -> ${P}.tar.gz" + KEYWORDS="~amd64 ~arm ~x86" +fi + +LICENSE="GPL-2" +SLOT="0" +IUSE="pulseaudio X" + +DEPEND="pulseaudio? ( media-sound/pulseaudio ) + X? ( x11-libs/libX11 )" +RDEPEND="${DEPEND}" + +src_prepare() { + use pulseaudio || sed -i '/find_package( PulseAudio )/d' CMakeLists.txt + use X || sed -i '/find_package( X11 )/d' CMakeLists.txt + cmake-utils_src_prepare +} diff --git a/net-analyzer/multimon-ng/multimon-ng-9999.ebuild b/net-analyzer/multimon-ng/multimon-ng-9999.ebuild new file mode 100644 index 000000000000..da7b10babdb7 --- /dev/null +++ b/net-analyzer/multimon-ng/multimon-ng-9999.ebuild @@ -0,0 +1,32 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit cmake-utils + +DESCRIPTION="a fork of multimon, decodes multiple digital transmission modes" +HOMEPAGE="https://github.com/EliasOenal/multimon-ng" + +if [[ ${PV} == 9999* ]]; then + inherit git-r3 + EGIT_REPO_URI="https://github.com/EliasOenal/multimon-ng.git" + KEYWORDS="" +else + SRC_URI="https://github.com/EliasOenal/multimonNG/archive/${PV}.tar.gz -> ${P}.tar.gz" + KEYWORDS="~amd64 ~arm ~x86" +fi + +LICENSE="GPL-2" +SLOT="0" +IUSE="pulseaudio X" + +DEPEND="pulseaudio? ( media-sound/pulseaudio ) + X? ( x11-libs/libX11 )" +RDEPEND="${DEPEND}" + +src_prepare() { + use pulseaudio || sed -i '/find_package( PulseAudio )/d' CMakeLists.txt + use X || sed -i '/find_package( X11 )/d' CMakeLists.txt + cmake-utils_src_prepare +} diff --git a/net-analyzer/munin-plugins-zfs/Manifest b/net-analyzer/munin-plugins-zfs/Manifest new file mode 100644 index 000000000000..1a92625b81a4 --- /dev/null +++ b/net-analyzer/munin-plugins-zfs/Manifest @@ -0,0 +1 @@ +DIST munin-plugins-zfs-0.20170127.tar.gz 2482 BLAKE2B b861f6c4d43690401b7dd82b4a520832d47028ed7d49a43dc3fe943a5845d23e334845758c5542270315262fa287dc7a1aee220fc936695e1aaba1db8947f6c1 SHA512 9b7842c6945865be058f7c00a5ffcdd8fb8c50aa1775f5196ce25ffc33b527b0c8d5c42aa7dc21ff81fd4aac16c9c1084c31af44192fe64b6a2fbcd2ccc4bbee diff --git a/net-analyzer/munin-plugins-zfs/metadata.xml b/net-analyzer/munin-plugins-zfs/metadata.xml new file mode 100644 index 000000000000..85efcb5e95f9 --- /dev/null +++ b/net-analyzer/munin-plugins-zfs/metadata.xml @@ -0,0 +1,11 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>graaff@gentoo.org</email> + </maintainer> + <upstream> + <remote-id type="github">alexclear/ZoL-munin-plugin</remote-id> + </upstream> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/munin-plugins-zfs/munin-plugins-zfs-0.20170127.ebuild b/net-analyzer/munin-plugins-zfs/munin-plugins-zfs-0.20170127.ebuild new file mode 100644 index 000000000000..e552781d0f00 --- /dev/null +++ b/net-analyzer/munin-plugins-zfs/munin-plugins-zfs-0.20170127.ebuild @@ -0,0 +1,28 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +COMMIT="385f9e4cda592ace95b47c69db76553bcb6a42d6" + +DESCRIPTION="A Munin plugin for monitoring ZFS on Linux" +HOMEPAGE="https://github.com/alexclear/ZoL-munin-plugin" +SRC_URI="https://github.com/alexclear/ZoL-munin-plugin/archive/${COMMIT}.tar.gz -> ${P}.tar.gz" +S="${WORKDIR}/ZoL-munin-plugin-${COMMIT}" + +LICENSE="MIT" +SLOT="0" +KEYWORDS="~amd64" + +DEPEND="net-analyzer/munin" +RDEPEND="${DEPEND} + sys-devel/bc + +" + +src_install() { + dodoc README.md + + exeinto /usr/libexec/munin/plugins + doexe zfs_stats_ +} diff --git a/net-analyzer/munin/Manifest b/net-analyzer/munin/Manifest new file mode 100644 index 000000000000..74251ce17f20 --- /dev/null +++ b/net-analyzer/munin/Manifest @@ -0,0 +1,10 @@ +DIST munin-2.0.52-gentoo-1.tar.xz 3980 BLAKE2B 5aae9c29befa761f797d362c90d810051a7f3a5dc8250776ab6ae1659197d795dfb87274db66ff0a3deb4e10e14ced5b3765551a3f29357c436968a848f450ea SHA512 b21d6590bb9e1da127066a06818f1f3157362762f80526e2231b926956959e62af575f38235f72326376dc21bba63f9767efa379f1f2558ca9b20ddf5395e851 +DIST munin-2.0.52.tar.gz 2266820 BLAKE2B 41233cd28ce4d682dfd47895061426404540c6b1c65798609a2d509d39ad5359b22087027662e7c03848e5676815843c34d078b782e3d0ab3a6a29b6a22e058b SHA512 7439ea10006a94227b71328d06411378f6855f23f17815a433b3a1c40ea23da5a25a366d48f911b9cfdc43c4b98f3bb9777b67db2b894441eb8941e84ede379c +DIST munin-2.0.56-gentoo-1.tar.xz 3980 BLAKE2B 5aae9c29befa761f797d362c90d810051a7f3a5dc8250776ab6ae1659197d795dfb87274db66ff0a3deb4e10e14ced5b3765551a3f29357c436968a848f450ea SHA512 b21d6590bb9e1da127066a06818f1f3157362762f80526e2231b926956959e62af575f38235f72326376dc21bba63f9767efa379f1f2558ca9b20ddf5395e851 +DIST munin-2.0.56.tar.gz 2271203 BLAKE2B f3df227b905ab794e2253637d367819eff2625f9e0f2355d23916b033b3b23d14bb64a78bf6a334f0c7a1859e60c227d1f754a2689bf291cc5f43a46986d35fe SHA512 111b9b8d88474f480eac1e304a92a52c2295d72a1c6709bb2942ff6ee0ba26a56d25dc5d0cf08ddb98a23d6d9693ad0cddb2185e10df83d553655d017d102b1d +DIST munin-2.0.59-gentoo-1.tar.xz 3980 BLAKE2B 5aae9c29befa761f797d362c90d810051a7f3a5dc8250776ab6ae1659197d795dfb87274db66ff0a3deb4e10e14ced5b3765551a3f29357c436968a848f450ea SHA512 b21d6590bb9e1da127066a06818f1f3157362762f80526e2231b926956959e62af575f38235f72326376dc21bba63f9767efa379f1f2558ca9b20ddf5395e851 +DIST munin-2.0.59.tar.gz 2276011 BLAKE2B 0681cd838daaa056418258d473825642e2aa6b7a3ac7a435859033a467351145be73df327d3149b46c53f5a04c602bea57bc5af428cafb7b5bf1e9c780915ddf SHA512 5597db797f7a0de3581a17be13b079a3fd1e50903014d67d81a262e921fdfca84eee8ec65e3927438db0e01525d16faaabc7e3f7d4cad1a73e7e14002b10478f +DIST munin-2.0.61-gentoo-1.tar.xz 3980 BLAKE2B 5aae9c29befa761f797d362c90d810051a7f3a5dc8250776ab6ae1659197d795dfb87274db66ff0a3deb4e10e14ced5b3765551a3f29357c436968a848f450ea SHA512 b21d6590bb9e1da127066a06818f1f3157362762f80526e2231b926956959e62af575f38235f72326376dc21bba63f9767efa379f1f2558ca9b20ddf5395e851 +DIST munin-2.0.61.tar.gz 2254571 BLAKE2B e73fb6fc4f71c8d56a7e8a05852f699c94a7cf321b8034ad31ccbd06a37a602e6d312c0079fcb31afc5489a265a35a68c037743e01471ca950223d5cb6757b64 SHA512 ea6ae5a7f812985e0179dc2fe2f21136ecf6152ec2adf48d53e4fa19cfc14e74befe56c77a18f27ba966c12034a4fea442d5d1498a7cfe57ed052d332c199019 +DIST munin-2.0.63-gentoo-1.tar.xz 3980 BLAKE2B 5aae9c29befa761f797d362c90d810051a7f3a5dc8250776ab6ae1659197d795dfb87274db66ff0a3deb4e10e14ced5b3765551a3f29357c436968a848f450ea SHA512 b21d6590bb9e1da127066a06818f1f3157362762f80526e2231b926956959e62af575f38235f72326376dc21bba63f9767efa379f1f2558ca9b20ddf5395e851 +DIST munin-2.0.63.tar.gz 2254548 BLAKE2B 5e0aa63222706a1e23bcb2af98437ee8cc3f09cdf833a6546ea40cf7307728518d5d696bd500105f85139753bc17a26dddfb202a661d35a7046ffc55b5b9ef02 SHA512 c28d2bedda8abb8787e1ba40ec80961d1304c903e9e608e30ed7903210169f258f9c062fc97d89932ddd7aabefa4360495d19535520741911c489c9c3c2e76fe diff --git a/net-analyzer/munin/files/logrotate.d-munin.3 b/net-analyzer/munin/files/logrotate.d-munin.3 new file mode 100644 index 000000000000..e7e1dda3fc65 --- /dev/null +++ b/net-analyzer/munin/files/logrotate.d-munin.3 @@ -0,0 +1,31 @@ +/var/log/munin/munin-node.log { + daily + missingok + rotate 7 + compress + copytruncate + notifempty + create 640 root root + postrotate + test -e /run/openrc/softlevel && /etc/init.d/munin-node restart 1>/dev/null || true + test -e /run/systemd/system && systemctl restart munin-node 1>/dev/null || true + endscript +} + +/var/log/munin/munin-update.log /var/log/munin/munin-graph.log /var/log/munin/munin-html.log /var/log/munin/munin-limits.log { + daily + missingok + rotate 7 + compress + notifempty + nocreate +} + +/var/log/munin/munin-cgi-graph.log /var/log/munin/munin-cgi-html.log { + daily + missingok + rotate 7 + compress + notifempty + create 640 @CGIUSER@ +} diff --git a/net-analyzer/munin/files/munin-1.3.2-plugins.conf b/net-analyzer/munin/files/munin-1.3.2-plugins.conf new file mode 100644 index 000000000000..e85666b77013 --- /dev/null +++ b/net-analyzer/munin/files/munin-1.3.2-plugins.conf @@ -0,0 +1,80 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# +# This file contains configuration options for the plugins. Three +# options are understood by munin-node itself: +# +# user <user> # Set the user to run the plugin as +# group <group> # Set the group to run the plugin as +# command <command> # Run <command> instead of the plugin. %c +# expands to what would normally be run. +# env.<variable> # Sets <variable> in the plugin's environment, see the +# individual plugins to find out which variables they +# care about. +# +# + +[smart_*] +user root +group disk + +# ipmitool and freeipmi need access to the IPMI device nodes, which +# are only readable by root +[ipmi_*] +user root + +[freeipmi_*] +user root + +# Example for a 3ware 8000-series card, with 2 disks +# use /dev/twe0 as the actual device +# and replicate this entry for each drive, increasing the number in -d +#[smart_3ware-0_twe0] +#user root +#group root +#env.smartargs -H -i -c -l error -l selftest -l selective -a -d 3ware,0 +#[smart_3ware-1_twe0] +#user root +#group root +#env.smartargs -H -i -c -l error -l selftest -l selective -a -d 3ware,1 + +[bind9*] +user root + +[iostat*] +user munin +group munin + +[iostat_ios] +user root +group disk + +[vlan*] +user root + +[postfix*] +user root +env.logfile maillog + +[sendmail*] +env.mspqueue /var/spool/clientmqueue + +[mysql*] +#env.mysqlopts -u someuser + +[exim*] +group mail + +[cps*] +user root + +[mailman] +env.logfile /var/lib/mailman/logs/post +env.libdir /var/lib/mailman +env.lister /usr/lib/mailman/bin/list_members + +# More 3ware examples +#[hddtemp_smartctl] +#env.drives twe0_0 twe0_1 hda +#env.type_twe0_0 3ware,0 +#env.type_twe0_1 3ware,1 diff --git a/net-analyzer/munin/files/munin-async.service b/net-analyzer/munin/files/munin-async.service new file mode 100644 index 000000000000..add6d238f456 --- /dev/null +++ b/net-analyzer/munin/files/munin-async.service @@ -0,0 +1,10 @@ +[Unit] +Description=Munin Async Service +After=syslog.target network.target + +[Service] +PIDFile=/run/munin/munin-asyncd.pid +ExecStart=/usr/libexec/munin/munin-asyncd + +[Install] +WantedBy=multi-user.target diff --git a/net-analyzer/munin/files/munin-asyncd.init.2 b/net-analyzer/munin/files/munin-asyncd.init.2 new file mode 100644 index 000000000000..59ef4c6b0280 --- /dev/null +++ b/net-analyzer/munin/files/munin-asyncd.init.2 @@ -0,0 +1,19 @@ +#!/sbin/openrc-run +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +command=/usr/libexec/munin/munin-asyncd +command_args="--fork" +pidfile="/run/munin-asyncd.pid" +start_stop_daemon_args="--background --make-pidfile --user munin-async" + +depend() { + need munin-node + before cron +} + +start_pre() { + checkpath -d -o munin-async:munin -m 0750 /var/spool/munin-async +} + +# vim: filetype=gentoo-init-d: diff --git a/net-analyzer/munin/files/munin-graph.service b/net-analyzer/munin/files/munin-graph.service new file mode 100644 index 000000000000..9aea1da64e95 --- /dev/null +++ b/net-analyzer/munin/files/munin-graph.service @@ -0,0 +1,11 @@ +[Unit] +Description=Munin FastCGI Graph +Requires=munin-graph.socket + +[Service] +User=munin +Group=munin +ExecStart=/usr/libexec/munin/munin-graph +StandardInput=socket +StandardOutput=inherit +StandardError=journal diff --git a/net-analyzer/munin/files/munin-graph.socket b/net-analyzer/munin/files/munin-graph.socket new file mode 100644 index 000000000000..533c709c50ec --- /dev/null +++ b/net-analyzer/munin/files/munin-graph.socket @@ -0,0 +1,8 @@ +[Unit] +Description=Munin FastCGI Graph Socket + +[Socket] +ListenStream=/run/munin/fcgi-graph.sock + +[Install] +WantedBy=sockets.target diff --git a/net-analyzer/munin/files/munin-html.service b/net-analyzer/munin/files/munin-html.service new file mode 100644 index 000000000000..09fdf162722b --- /dev/null +++ b/net-analyzer/munin/files/munin-html.service @@ -0,0 +1,11 @@ +[Unit] +Description=Munin FastCGI HTML +Requires=munin-html.socket + +[Service] +User=munin +Group=munin +ExecStart=/usr/libexec/munin/munin-html +StandardInput=socket +StandardOutput=inherit +StandardError=journal diff --git a/net-analyzer/munin/files/munin-html.socket b/net-analyzer/munin/files/munin-html.socket new file mode 100644 index 000000000000..52fc3c354d33 --- /dev/null +++ b/net-analyzer/munin/files/munin-html.socket @@ -0,0 +1,8 @@ +[Unit] +Description=Munin FastCGI HTML Socket + +[Socket] +ListenStream=/run/munin/fcgi-html.sock + +[Install] +WantedBy=sockets.target diff --git a/net-analyzer/munin/files/munin-node.service b/net-analyzer/munin/files/munin-node.service new file mode 100644 index 000000000000..92c314b6ec33 --- /dev/null +++ b/net-analyzer/munin/files/munin-node.service @@ -0,0 +1,11 @@ +[Unit] +Description=Munin Node Service +After=syslog.target network.target + +[Service] +Type=forking +PIDFile=/run/munin-node.pid +ExecStart=/usr/sbin/munin-node + +[Install] +WantedBy=multi-user.target diff --git a/net-analyzer/munin/files/munin-node_conf.d_1.4.6-r2 b/net-analyzer/munin/files/munin-node_conf.d_1.4.6-r2 new file mode 100644 index 000000000000..79b0e14ef7fd --- /dev/null +++ b/net-analyzer/munin/files/munin-node_conf.d_1.4.6-r2 @@ -0,0 +1,7 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +# Set to the nice level for daemon +NICE_LEVEL=1 + +# vim: filetype=gentoo-conf-d: diff --git a/net-analyzer/munin/files/munin-node_init.d_2.0.19 b/net-analyzer/munin/files/munin-node_init.d_2.0.19 new file mode 100644 index 000000000000..fca7880692cf --- /dev/null +++ b/net-analyzer/munin/files/munin-node_init.d_2.0.19 @@ -0,0 +1,26 @@ +#!/sbin/openrc-run +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +get_munin_config() { + awk '$1 == "'$1'" { s=$2 } END { print s }' "$CFGFILE" +} + +: ${CFGFILE:=/etc/munin/munin-node.conf} + +command=/usr/sbin/munin-node +command_args="--config ${CFGFILE}" +pidfile=$(get_munin_config pid_file) +start_stop_daemon_args="--nicelevel ${NICE_LEVEL:-0} --wait 1500" +extra_started_commands="reload" + +depend() { + config "$CFGFILE" + + before cron + + [ "$(get_munin_config log_file)" = "Sys::Syslog" ] && \ + use logger +} + +# vim: filetype=gentoo-init-d: diff --git a/net-analyzer/munin/files/munin.apache.include b/net-analyzer/munin/files/munin.apache.include new file mode 100644 index 000000000000..f8b2df5daa66 --- /dev/null +++ b/net-analyzer/munin/files/munin.apache.include @@ -0,0 +1,31 @@ +# -*- apache -*- + +ScriptAlias /munin-cgi/ /usr/libexec/munin/cgi/ +Alias /munin/static /etc/munin/static + +<IfDefine MUNIN_HTML_CGI> +RewriteEngine on + +RewriteCond %{REQUEST_URI} (/|\.html)$ +RewriteCond %{REQUEST_URI} !/static +RewriteRule ^/munin/(.*) /munin-cgi/munin-cgi-html/$1 [PT,L] +</IfDefine> + +<Directory /usr/libexec/munin/cgi/> + Options +ExecCGI + + Order allow,deny + Allow from all + + <IfModule mod_fcgid.c> + SetHandler fcgid-script + </IfModule> + <IfModule !mod_fcgid.c> + SetHandler cgi-script + </IfModule> +</Directory> + +<Directory /etc/munin/static> + Order allow,deny + Allow from all +</Directory> diff --git a/net-analyzer/munin/files/munin.apache.include-2.4 b/net-analyzer/munin/files/munin.apache.include-2.4 new file mode 100644 index 000000000000..ec69cbb07b91 --- /dev/null +++ b/net-analyzer/munin/files/munin.apache.include-2.4 @@ -0,0 +1,28 @@ +# -*- apache -*- + +ScriptAlias /munin-cgi/ /usr/libexec/munin/cgi/ +Alias /munin/static /etc/munin/static + +<IfDefine MUNIN_HTML_CGI> +RewriteEngine on + +RewriteCond %{REQUEST_URI} (/|\.html)$ +RewriteCond %{REQUEST_URI} !/static +RewriteRule ^/munin/(.*) /munin-cgi/munin-cgi-html/$1 [PT,L] +</IfDefine> + +<Directory /usr/libexec/munin/cgi/> + Options +ExecCGI + Require all granted + + <IfModule mod_fcgid.c> + SetHandler fcgid-script + </IfModule> + <IfModule !mod_fcgid.c> + SetHandler cgi-script + </IfModule> +</Directory> + +<Directory /etc/munin/static> + Require all granted +</Directory> diff --git a/net-analyzer/munin/metadata.xml b/net-analyzer/munin/metadata.xml new file mode 100644 index 000000000000..3646f0af46b1 --- /dev/null +++ b/net-analyzer/munin/metadata.xml @@ -0,0 +1,96 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>sysadmin@gentoo.org</email> + <name>Gentoo Sysadmin Project</name> + </maintainer> + <maintainer type="person"> + <email>graaff@gentoo.org</email> + <name>Hans de Graaff</name> + </maintainer> + <longdescription lang="en"> + Munin the tool surveys all your computers and remembers what it saw. It + presents all the information in in graphs through a web interface. Its + emphasis is on plug and play capabilities. After completing a installation a + high number of monitoring plugins will be playing with no more effort. Using + Munin you can easily monitor the performance of your computers, networks, + SANs, and quite possibly applications as well. It makes it easy to determine + "what's different today" when a performance problem crops up. It makes it + easy to see how you're doing capacity wise on all limited resources. + </longdescription> + <use> + <flag name="mysql"> + Install the packages required for monitoring MySQL. Disabling + the flag does not remove any plugin files. + </flag> + <flag name="postgres"> + Install the packages required for monitoring + PostgreSQL. Disabling the flag does not remove any plugin files. + </flag> + <flag name="asterisk"> + Install the packages required for monitoring Asterisk. Disabling + the flag does not remove any plugin files. + </flag> + <flag name="irc"> + Install the packages required for monitoring IRC. Disabling the + flag does not remove any plugin files. + </flag> + <flag name="memcached"> + Install the packages required for memcached + monitoring. Disabling the flag does not remove any plugin files. + </flag> + <flag name="ipmi"> + Install <pkg>sys-apps/ipmitool</pkg> required for monitoring + IPMI sensors. Disabling the flag does not remove any plugin + file. + </flag> + <flag name="http"> + Install <pkg>dev-perl/libwww-perl</pkg> required for monitoring + HTTP-based services such as Apache and nginx. Disabling the flag + does not remove any plugin file. + </flag> + <flag name="dhcpd"> + Install <pkg>dev-perl/Net-IP</pkg>, + <pkg>dev-perl/HTTP-Date</pkg> and <pkg>net-misc/dhcp</pkg> to + monitor DHCP lease usage. This only works if the server is on + the same system as the node, so the server is also brought + in. Disabling the flag does not remove any plugin file. + </flag> + <flag name="java"> + Build the Java-based plugins to monitor JMX-compatible + applications. Disabling the flag removes the jmx monitoring + plugins. + </flag> + <flag name="minimal"> + Only install munin-node and its plugins. This excludes the + scripts to generate the web pages and the graphs. + </flag> + <flag name="cgi"> + Install the CGI-compatible scripts for on-the-fly generation of + web pages and graphs. This is only meaningful if the minimal USE + flag is disabled. + </flag> + <flag name="ipv6"> + Add support for IPv6 in munin-node. IPv6 support for the master + is always enabled, but the node requires a newer version of + <pkg>dev-perl/Net-Server</pkg>, capable of listening to IPv6 + sockets. + </flag> + <flag name="syslog"> + Configure the node by default to log on syslog. This requires + the presence of <pkg>virtual/perl-Sys-Syslog</pkg>. As of + version 2.0.2, the master scripts only log to file, and not to + syslog. + </flag> + <flag name="doc"> + Build and install a local copy of the HTML documentation for the + whole software. This requires <pkg>dev-python/sphinx</pkg> to + process the documentation sources. + </flag> + </use> + <upstream> + <remote-id type="sourceforge">munin</remote-id> + </upstream> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/munin/munin-2.0.52.ebuild b/net-analyzer/munin/munin-2.0.52.ebuild new file mode 100644 index 000000000000..56f3cf00bae6 --- /dev/null +++ b/net-analyzer/munin/munin-2.0.52.ebuild @@ -0,0 +1,419 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +PATCHSET=1 + +inherit user java-pkg-opt-2 systemd + +MY_P=${P/_/-} + +DESCRIPTION="Munin Server Monitoring Tool" +HOMEPAGE="http://munin-monitoring.org/" +SRC_URI=" + https://github.com/munin-monitoring/munin/archive/${PV}.tar.gz -> ${P}.tar.gz + https://dev.gentoo.org/~graaff/munin/${P}-gentoo-${PATCHSET}.tar.xz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="amd64 ~arm ppc x86" +IUSE="asterisk irc java ldap memcached minimal mysql postgres selinux ssl test cgi ipv6 syslog ipmi http dhcpd doc apache2" +REQUIRED_USE="cgi? ( !minimal ) apache2? ( cgi )" +RESTRICT="!test? ( test )" + +# Upstream's listing of required modules is NOT correct! +# Some of the postgres plugins use DBD::Pg, while others call psql directly. +# Some of the mysql plugins use DBD::mysql, while others call mysqladmin directly. +# We replace the original ipmi plugins with the freeipmi_ plugin which at least works. +DEPEND_COM=" + dev-lang/perl:=[berkdb] + dev-perl/DBI + dev-perl/Date-Manip + dev-perl/File-Copy-Recursive + dev-perl/List-MoreUtils + dev-perl/Log-Log4perl + dev-perl/Net-CIDR + dev-perl/Net-DNS + dev-perl/Net-Netmask + dev-perl/Net-SNMP + dev-perl/Net-Server[ipv6(-)?] + virtual/perl-Digest-MD5 + virtual/perl-Getopt-Long + virtual/perl-MIME-Base64 + virtual/perl-Storable + virtual/perl-Text-Balanced + virtual/perl-Time-HiRes + apache2? ( www-servers/apache[apache2_modules_cgi,apache2_modules_cgid,apache2_modules_rewrite] ) + asterisk? ( dev-perl/Net-Telnet ) + cgi? ( + dev-perl/FCGI + dev-perl/CGI-Fast + ) + dhcpd? ( + >=net-misc/dhcp-3[server] + dev-perl/Net-IP + dev-perl/HTTP-Date + ) + doc? ( dev-python/sphinx ) + http? ( dev-perl/libwww-perl ) + irc? ( dev-perl/Net-IRC ) + ldap? ( dev-perl/perl-ldap ) + kernel_linux? ( sys-process/procps ) + memcached? ( dev-perl/Cache-Memcached ) + mysql? ( + virtual/mysql + dev-perl/Cache-Cache + dev-perl/DBD-mysql + ) + postgres? ( dev-perl/DBD-Pg dev-db/postgresql:* ) + ssl? ( dev-perl/Net-SSLeay ) + syslog? ( virtual/perl-Sys-Syslog ) + !minimal? ( + dev-perl/HTML-Template + dev-perl/IO-Socket-INET6 + dev-perl/URI + >=net-analyzer/rrdtool-1.3[graph,perl] + virtual/ssh + ) + " + +# Keep this seperate, as previous versions have had other deps here +DEPEND="${DEPEND_COM} + dev-perl/Module-Build + java? ( >=virtual/jdk-1.5 ) + test? ( + dev-perl/Test-Deep + dev-perl/Test-Exception + dev-perl/Test-LongString + dev-perl/Test-Differences + dev-perl/Test-MockModule + dev-perl/Test-MockObject + dev-perl/File-Slurp + dev-perl/IO-stringy + dev-perl/IO-Socket-INET6 + )" +RDEPEND="${DEPEND_COM} + virtual/awk + ipmi? ( >=sys-libs/freeipmi-1.1.6-r1 ) + java? ( + >=virtual/jre-1.5 + || ( net-analyzer/netcat net-analyzer/openbsd-netcat ) + ) + !minimal? ( + virtual/cron + media-fonts/dejavu + ) + selinux? ( sec-policy/selinux-munin ) + !<sys-apps/openrc-0.11.8" + +S="${WORKDIR}/${MY_P}" + +pkg_setup() { + enewgroup munin + enewuser munin 177 -1 /var/lib/munin munin + enewuser munin-async -1 /bin/sh /var/spool/munin-async + esethome munin-async /var/spool/munin-async + java-pkg-opt-2_pkg_setup +} + +src_prepare() { + echo ${PV} > RELEASE || die + + eapply "${WORKDIR}"/patches/*.patch + + eapply_user + + java-pkg-opt-2_src_prepare +} + +src_configure() { + local cgidir='$(DESTDIR)/usr/libexec/munin/cgi' + use cgi || cgidir="${T}/useless/cgi-bin" + + local cgiuser=$(usex apache2 apache munin) + + cat >> "${S}"/Makefile.config <<- EOF + PREFIX=\$(DESTDIR)/usr + CONFDIR=\$(DESTDIR)/etc/munin + DOCDIR=${T}/useless/doc + MANDIR=\$(PREFIX)/share/man + LIBDIR=\$(PREFIX)/libexec/munin + HTMLDIR=\$(DESTDIR)/var/www/localhost/htdocs/munin + CGIDIR=${cgidir} + CGITMPDIR=\$(DESTDIR)/var/cache/munin-cgi + CGIUSER=${cgiuser} + DBDIR=\$(DESTDIR)/var/lib/munin + DBDIRNODE=\$(DESTDIR)/var/lib/munin-node + SPOOLDIR=\$(DESTDIR)/var/spool/munin-async + LOGDIR=\$(DESTDIR)/var/log/munin + PERLLIB=\$(DESTDIR)$(perl -V:vendorlib | cut -d"'" -f2) + JCVALID=$(usex java yes no) + STATEDIR=\$(DESTDIR)/run/munin + EOF +} + +# parallel make and install need to be fixed before, and I haven't +# gotten around to do so yet. +src_compile() { + emake -j1 + use doc && emake -C doc html +} + +src_test() { + if [[ ${EUID} == 0 ]]; then + eerror "You cannot run tests as root." + eerror "Please enable FEATURES=userpriv before proceeding." + return 1 + fi + + local testtargets="test-common test-node test-plugins" + use minimal || testtargets+=" test-master" + + LC_ALL=C emake -j1 ${testtargets} +} + +src_install() { + local dirs=" + /var/log/munin + /var/lib/munin/plugin-state + /var/lib/munin-node/plugin-state + /var/www/localhost/htdocs/munin + /etc/munin/plugin-conf.d + /etc/munin/plugins" + use minimal || dirs+=" /etc/munin/munin-conf.d/" + + keepdir ${dirs} + fowners munin:munin ${dirs} + + # parallel install doesn't work and it's also pointless to have this + # run in parallel for now (because it uses internal loops). + emake -j1 CHOWN=true DESTDIR="${D}" $(usex minimal "install-minimal install-man" install) + + # we remove /run from the install, as it's not the package's to deal + # with. + rm -rf "${D}"/run || die + + # remove the plugins for non-Gentoo package managers; use -f so that + # it doesn't fail when installing on non-Linux platforms. + rm -f "${D}"/usr/libexec/munin/plugins/{apt{,_all},yum} || die + + insinto /etc/munin/plugin-conf.d/ + newins "${FILESDIR}"/${PN}-1.3.2-plugins.conf munin-node + + newinitd "${FILESDIR}"/munin-node_init.d_2.0.19 munin-node + newconfd "${FILESDIR}"/munin-node_conf.d_1.4.6-r2 munin-node + + newinitd "${FILESDIR}"/munin-asyncd.init.2 munin-asyncd + + dodir /usr/lib/tmpfiles.d + cat > "${D}"/usr/lib/tmpfiles.d/${CATEGORY}:${PN}:${SLOT}.conf <<- EOF + d /run/munin 0700 munin munin - - + EOF + + systemd_dounit "${FILESDIR}"/munin-async.service + systemd_dounit "${FILESDIR}"/munin-graph.{service,socket} + systemd_dounit "${FILESDIR}"/munin-html.{service,socket} + systemd_dounit "${FILESDIR}"/munin-node.service + + cat >> "${T}"/munin.env <<- EOF + CONFIG_PROTECT=/var/spool/munin-async/.ssh + EOF + newenvd "${T}"/munin.env 50munin + + dodoc README ChangeLog INSTALL + if use doc; then + cd "${S}"/doc/_build/html || die + docinto html + dodoc -r * + cd "${S}" || die + fi + + dodir /etc/logrotate.d/ + sed -e "s:@CGIUSER@:$(usex apache2 apache munin):g" \ + "${FILESDIR}"/logrotate.d-munin.3 > "${D}"/etc/logrotate.d/munin + + dosym ipmi_ /usr/libexec/munin/plugins/ipmi_sensor_ + + if use syslog; then + sed -i -e '/log_file/s| .*| Sys::Syslog|' \ + "${D}"/etc/munin/munin-node.conf || die + fi + + # Use a simpler pid file to avoid trouble with /run in tmpfs. The + # munin-node service is ran as user root, and only later drops + # privileges. + sed -i -e 's:/run/munin/munin-node.pid:/run/munin-node.pid:' \ + "${D}"/etc/munin/munin-node.conf || die + + keepdir /var/spool/munin-async/.ssh + touch "${D}"/var/spool/munin-async/.ssh/authorized_keys + fowners munin-async:munin /var/spool/munin-async{,/.ssh/{,authorized_keys}} + fperms 0750 /var/spool/munin-async{,/.ssh} + fperms 0600 /var/spool/munin-async/.ssh/authorized_keys + + if use minimal; then + # This requires the presence of munin-update, which is part of + # the non-minimal install... + rm "${D}"/usr/libexec/munin/plugins/munin_stats + else + # remove font files so that we don't have to keep them around + rm "${D}"/usr/libexec/${PN}/*.ttf || die + + if use cgi; then + sed -i -e '/#graph_strategy cgi/s:^#::' "${D}"/etc/munin/munin.conf || die + + keepdir /var/cache/munin-cgi + touch "${D}"/var/log/munin/munin-cgi-{graph,html}.log + fowners $(usex apache2 apache munin) \ + /var/cache/munin-cgi \ + /var/log/munin/munin-cgi-{graph,html}.log + + if use apache2; then + insinto /etc/apache2/vhosts.d + newins "${FILESDIR}"/munin.apache.include munin.include + newins "${FILESDIR}"/munin.apache.include-2.4 munin-2.4.include + fi + else + sed \ + -e '/#graph_strategy cgi/s:#graph_strategy cgi:graph_strategy cron:' \ + -i "${D}"/etc/munin/munin.conf || die + fi + + keepdir /var/lib/munin/.ssh + cat >> "${D}"/var/lib/munin/.ssh/config <<- EOF + IdentityFile /var/lib/munin/.ssh/id_ecdsa + IdentityFile /var/lib/munin/.ssh/id_rsa + EOF + + fowners munin:munin /var/lib/munin/.ssh/{,config} + fperms go-rwx /var/lib/munin/.ssh/{,config} + + dodir /usr/share/${PN} + cat >> "${D}"/usr/share/${PN}/crontab <<- EOF + # Force the shell to bash + SHELL=/bin/bash + # Mail reports to root@, not munin@ + MAILTO=root + + # This runs the munin task every 5 minutes. + */5 * * * * /usr/bin/munin-cron + + # Alternatively, this route works differently + # Update once a minute (for busy sites) + #*/1 * * * * /usr/libexec/munin/munin-update + ## Check for limit excess every 2 minutes + #*/2 * * * * /usr/libexec/munin/munin-limits + ## Update graphs every 5 minutes + #*/5 * * * * nice /usr/libexec/munin/munin-graph + ## Update HTML pages every 15 minutes + #*/15 * * * * nice /usr/libexec/munin/munin-html + EOF + + cat >> "${D}"/usr/share/${PN}/fcrontab <<- EOF + # Mail reports to root@, not munin@, only execute one at a time + !mailto(root),serial(true) + + # This runs the munin task every 5 minutes. + @ 5 /usr/bin/munin-cron + + # Alternatively, this route works differently + # Update once a minute (for busy sites) + #@ 1 /usr/libexec/munin/munin-update + ## Check for limit excess every 2 minutes + #@ 2 /usr/libexec/munin/munin-limits + ## Update graphs every 5 minutes + #@ 5 nice /usr/libexec/munin/munin-graph + ## Update HTML pages every 15 minutes + #@ 15 nice /usr/libexec/munin/munin-html + EOF + + # remove .htaccess file + find "${D}" -name .htaccess -delete || die + fi +} + +pkg_config() { + if use minimal; then + einfo "Nothing to do." + return 0 + fi + + einfo "Press enter to install the default crontab for the munin master" + einfo "installation from /usr/share/${PN}/f?crontab" + einfo "If you have a large site, you may wish to customize it." + read + + ebegin "Setting up cron ..." + if has_version sys-process/fcron; then + fcrontab - -u munin < /usr/share/${PN}/fcrontab + else + # dcron is very fussy about syntax + # the following is the only form that works in BOTH dcron and vixie-cron + crontab - -u munin < /usr/share/${PN}/crontab + fi + eend $? + + einfo "Press enter to set up the SSH keys used for SSH transport" + read + + # generate one rsa (for legacy) and one ecdsa (for new systems) + ssh-keygen -t rsa \ + -f /var/lib/munin/.ssh/id_rsa -N '' \ + -C "created by portage for ${CATEGORY}/${PN}" || die + ssh-keygen -t ecdsa \ + -f /var/lib/munin/.ssh/id_ecdsa -N '' \ + -C "created by portage for ${CATEGORY}/${PN}" || die + chown -R munin:munin /var/lib/munin/.ssh || die + chmod 0600 /var/lib/munin/.ssh/id_{rsa,ecdsa} || die + + einfo "Your public keys are available in " + einfo " /var/lib/munin/.ssh/id_rsa.pub" + einfo " /var/lib/munin/.ssh/id_ecdsa.pub" + einfo "and follows for convenience" + echo + cat /var/lib/munin/.ssh/id_*.pub +} + +pkg_postinst() { + elog "Please follow the munin documentation to set up the plugins you" + elog "need, afterwards start munin-node." + elog "" + elog "To make use of munin-async, make sure to set up the corresponding" + elog "SSH key in /var/lib/munin-async/.ssh/authorized_keys" + elog "" + if ! use minimal; then + elog "Please run" + elog " emerge --config net-analyzer/munin" + elog "to automatically configure munin's cronjobs as well as generate" + elog "passwordless SSH keys to be used with munin-async." + fi + elog "" + elog "Further information about setting up Munin in Gentoo can be found" + elog "in the Gentoo Wiki: https://wiki.gentoo.org/wiki/Munin" + + if use cgi; then + chown $(usex apache2 apache munin) \ + "${ROOT}"/var/cache/munin-cgi \ + "${ROOT}"/var/log/munin/munin-cgi-{graph,html}.log + + if use apache2; then + elog "To use Munin with CGI you should include /etc/apache2/vhosts.d/munin.include" + elog "or /etc/apache2/vhosts.d/munin-2.4.include (for Apache 2.4) from the virtual" + elog "host you want it to be served." + elog "If you want to enable CGI-based HTML as well, you have to add to" + elog "/etc/conf.d/apache2 the option -D MUNIN_HTML_CGI." + else + elog "Effective CGI support has just been added in 2.0.7-r6." + elog "Documentation on how to use it is still sparse." + fi + fi + + # we create this here as we don't want Portage to check /run + # symlinks but we still need this to be present before the reboot. + if ! use minimal && ! [[ -d "${ROOT}"/run/munin ]]; then + mkdir "${ROOT}"/run/munin + chown munin:munin "${ROOT}"/run/munin + chmod 0700 "${ROOT}"/run/munin + fi +} diff --git a/net-analyzer/munin/munin-2.0.56.ebuild b/net-analyzer/munin/munin-2.0.56.ebuild new file mode 100644 index 000000000000..500c7e3caf59 --- /dev/null +++ b/net-analyzer/munin/munin-2.0.56.ebuild @@ -0,0 +1,417 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +PATCHSET=1 + +inherit java-pkg-opt-2 systemd + +MY_P=${P/_/-} + +DESCRIPTION="Munin Server Monitoring Tool" +HOMEPAGE="http://munin-monitoring.org/" +SRC_URI=" + https://github.com/munin-monitoring/munin/archive/${PV}.tar.gz -> ${P}.tar.gz + https://dev.gentoo.org/~graaff/munin/${P}-gentoo-${PATCHSET}.tar.xz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="amd64 ~arm ~ppc x86" +IUSE="asterisk irc java ldap memcached minimal mysql postgres selinux ssl test cgi ipv6 syslog ipmi http dhcpd doc apache2" +REQUIRED_USE="cgi? ( !minimal ) apache2? ( cgi )" +RESTRICT="!test? ( test )" + +# Upstream's listing of required modules is NOT correct! +# Some of the postgres plugins use DBD::Pg, while others call psql directly. +# Some of the mysql plugins use DBD::mysql, while others call mysqladmin directly. +# We replace the original ipmi plugins with the freeipmi_ plugin which at least works. +DEPEND_COM=" + acct-user/munin + acct-user/munin-async + acct-group/munin + dev-lang/perl:=[berkdb] + dev-perl/DBI + dev-perl/Date-Manip + dev-perl/File-Copy-Recursive + dev-perl/List-MoreUtils + dev-perl/Log-Log4perl + dev-perl/Net-CIDR + dev-perl/Net-DNS + dev-perl/Net-Netmask + dev-perl/Net-SNMP + dev-perl/Net-Server[ipv6(-)?] + virtual/perl-Digest-MD5 + virtual/perl-Getopt-Long + virtual/perl-MIME-Base64 + virtual/perl-Storable + virtual/perl-Text-Balanced + virtual/perl-Time-HiRes + apache2? ( www-servers/apache[apache2_modules_cgi,apache2_modules_cgid,apache2_modules_rewrite] ) + asterisk? ( dev-perl/Net-Telnet ) + cgi? ( + dev-perl/FCGI + dev-perl/CGI-Fast + ) + dhcpd? ( + >=net-misc/dhcp-3[server] + dev-perl/Net-IP + dev-perl/HTTP-Date + ) + doc? ( dev-python/sphinx ) + http? ( dev-perl/libwww-perl ) + irc? ( dev-perl/Net-IRC ) + ldap? ( dev-perl/perl-ldap ) + kernel_linux? ( sys-process/procps ) + memcached? ( dev-perl/Cache-Memcached ) + mysql? ( + virtual/mysql + dev-perl/Cache-Cache + dev-perl/DBD-mysql + ) + postgres? ( dev-perl/DBD-Pg dev-db/postgresql:* ) + ssl? ( dev-perl/Net-SSLeay ) + syslog? ( virtual/perl-Sys-Syslog ) + !minimal? ( + dev-perl/HTML-Template + dev-perl/IO-Socket-INET6 + dev-perl/URI + >=net-analyzer/rrdtool-1.3[graph,perl] + virtual/ssh + ) + " + +# Keep this seperate, as previous versions have had other deps here +DEPEND="${DEPEND_COM} + dev-perl/Module-Build + java? ( >=virtual/jdk-1.5 ) + test? ( + dev-perl/Test-Deep + dev-perl/Test-Exception + dev-perl/Test-LongString + dev-perl/Test-Differences + dev-perl/Test-MockModule + dev-perl/Test-MockObject + dev-perl/File-Slurp + dev-perl/IO-stringy + dev-perl/IO-Socket-INET6 + )" +RDEPEND="${DEPEND_COM} + virtual/awk + ipmi? ( >=sys-libs/freeipmi-1.1.6-r1 ) + java? ( + >=virtual/jre-1.5 + || ( net-analyzer/netcat net-analyzer/openbsd-netcat ) + ) + !minimal? ( + virtual/cron + media-fonts/dejavu + ) + selinux? ( sec-policy/selinux-munin )" + +S="${WORKDIR}/${MY_P}" + +pkg_setup() { + java-pkg-opt-2_pkg_setup +} + +src_prepare() { + echo ${PV} > RELEASE || die + + eapply "${WORKDIR}"/patches/*.patch + + eapply_user + + java-pkg-opt-2_src_prepare +} + +src_configure() { + local cgidir='$(DESTDIR)/usr/libexec/munin/cgi' + use cgi || cgidir="${T}/useless/cgi-bin" + + local cgiuser=$(usex apache2 apache munin) + + cat >> "${S}"/Makefile.config <<- EOF + PREFIX=\$(DESTDIR)/usr + CONFDIR=\$(DESTDIR)/etc/munin + DOCDIR=${T}/useless/doc + MANDIR=\$(PREFIX)/share/man + LIBDIR=\$(PREFIX)/libexec/munin + HTMLDIR=\$(DESTDIR)/var/www/localhost/htdocs/munin + CGIDIR=${cgidir} + CGITMPDIR=\$(DESTDIR)/var/cache/munin-cgi + CGIUSER=${cgiuser} + DBDIR=\$(DESTDIR)/var/lib/munin + DBDIRNODE=\$(DESTDIR)/var/lib/munin-node + SPOOLDIR=\$(DESTDIR)/var/spool/munin-async + LOGDIR=\$(DESTDIR)/var/log/munin + PERLLIB=\$(DESTDIR)$(perl -V:vendorlib | cut -d"'" -f2) + JCVALID=$(usex java yes no) + STATEDIR=\$(DESTDIR)/run/munin + EOF +} + +# parallel make and install need to be fixed before, and I haven't +# gotten around to do so yet. +src_compile() { + emake -j1 + use doc && emake -C doc html +} + +src_test() { + if [[ ${EUID} == 0 ]]; then + eerror "You cannot run tests as root." + eerror "Please enable FEATURES=userpriv before proceeding." + return 1 + fi + + local testtargets="test-common test-node test-plugins" + use minimal || testtargets+=" test-master" + + LC_ALL=C emake -j1 ${testtargets} +} + +src_install() { + local dirs=" + /var/log/munin + /var/lib/munin/plugin-state + /var/lib/munin-node/plugin-state + /var/www/localhost/htdocs/munin + /etc/munin/plugin-conf.d + /etc/munin/plugins" + use minimal || dirs+=" /etc/munin/munin-conf.d/" + + keepdir ${dirs} + fowners munin:munin ${dirs} + + # parallel install doesn't work and it's also pointless to have this + # run in parallel for now (because it uses internal loops). + emake -j1 CHOWN=true DESTDIR="${D}" $(usex minimal "install-minimal install-man" install) + + # we remove /run from the install, as it's not the package's to deal + # with. + rm -rf "${D}"/run || die + + # remove the plugins for non-Gentoo package managers; use -f so that + # it doesn't fail when installing on non-Linux platforms. + rm -f "${D}"/usr/libexec/munin/plugins/{apt{,_all},yum} || die + + insinto /etc/munin/plugin-conf.d/ + newins "${FILESDIR}"/${PN}-1.3.2-plugins.conf munin-node + + newinitd "${FILESDIR}"/munin-node_init.d_2.0.19 munin-node + newconfd "${FILESDIR}"/munin-node_conf.d_1.4.6-r2 munin-node + + newinitd "${FILESDIR}"/munin-asyncd.init.2 munin-asyncd + + dodir /usr/lib/tmpfiles.d + cat > "${D}"/usr/lib/tmpfiles.d/${CATEGORY}:${PN}:${SLOT}.conf <<- EOF + d /run/munin 0700 munin munin - - + EOF + + systemd_dounit "${FILESDIR}"/munin-async.service + systemd_dounit "${FILESDIR}"/munin-graph.{service,socket} + systemd_dounit "${FILESDIR}"/munin-html.{service,socket} + systemd_dounit "${FILESDIR}"/munin-node.service + + cat >> "${T}"/munin.env <<- EOF + CONFIG_PROTECT=/var/spool/munin-async/.ssh + EOF + newenvd "${T}"/munin.env 50munin + + dodoc README ChangeLog INSTALL + if use doc; then + cd "${S}"/doc/_build/html || die + docinto html + dodoc -r * + cd "${S}" || die + fi + + dodir /etc/logrotate.d/ + sed -e "s:@CGIUSER@:$(usex apache2 apache munin):g" \ + "${FILESDIR}"/logrotate.d-munin.3 > "${D}"/etc/logrotate.d/munin + + dosym ipmi_ /usr/libexec/munin/plugins/ipmi_sensor_ + + if use syslog; then + sed -i -e '/log_file/s| .*| Sys::Syslog|' \ + "${D}"/etc/munin/munin-node.conf || die + fi + + # Use a simpler pid file to avoid trouble with /run in tmpfs. The + # munin-node service is ran as user root, and only later drops + # privileges. + sed -i -e 's:/run/munin/munin-node.pid:/run/munin-node.pid:' \ + "${D}"/etc/munin/munin-node.conf || die + + keepdir /var/spool/munin-async/.ssh + touch "${D}"/var/spool/munin-async/.ssh/authorized_keys + fowners munin-async:munin /var/spool/munin-async{,/.ssh/{,authorized_keys}} + fperms 0750 /var/spool/munin-async{,/.ssh} + fperms 0600 /var/spool/munin-async/.ssh/authorized_keys + + if use minimal; then + # This requires the presence of munin-update, which is part of + # the non-minimal install... + rm "${D}"/usr/libexec/munin/plugins/munin_stats + else + # remove font files so that we don't have to keep them around + rm "${D}"/usr/libexec/${PN}/*.ttf || die + + if use cgi; then + sed -i -e '/#graph_strategy cgi/s:^#::' "${D}"/etc/munin/munin.conf || die + + keepdir /var/cache/munin-cgi + touch "${D}"/var/log/munin/munin-cgi-{graph,html}.log + fowners $(usex apache2 apache munin) \ + /var/cache/munin-cgi \ + /var/log/munin/munin-cgi-{graph,html}.log + + if use apache2; then + insinto /etc/apache2/vhosts.d + newins "${FILESDIR}"/munin.apache.include munin.include + newins "${FILESDIR}"/munin.apache.include-2.4 munin-2.4.include + fi + else + sed \ + -e '/#graph_strategy cgi/s:#graph_strategy cgi:graph_strategy cron:' \ + -i "${D}"/etc/munin/munin.conf || die + fi + + keepdir /var/lib/munin/.ssh + cat >> "${D}"/var/lib/munin/.ssh/config <<- EOF + IdentityFile /var/lib/munin/.ssh/id_ecdsa + IdentityFile /var/lib/munin/.ssh/id_rsa + EOF + + fowners munin:munin /var/lib/munin/.ssh/{,config} + fperms go-rwx /var/lib/munin/.ssh/{,config} + + dodir /usr/share/${PN} + cat >> "${D}"/usr/share/${PN}/crontab <<- EOF + # Force the shell to bash + SHELL=/bin/bash + # Mail reports to root@, not munin@ + MAILTO=root + + # This runs the munin task every 5 minutes. + */5 * * * * /usr/bin/munin-cron + + # Alternatively, this route works differently + # Update once a minute (for busy sites) + #*/1 * * * * /usr/libexec/munin/munin-update + ## Check for limit excess every 2 minutes + #*/2 * * * * /usr/libexec/munin/munin-limits + ## Update graphs every 5 minutes + #*/5 * * * * nice /usr/libexec/munin/munin-graph + ## Update HTML pages every 15 minutes + #*/15 * * * * nice /usr/libexec/munin/munin-html + EOF + + cat >> "${D}"/usr/share/${PN}/fcrontab <<- EOF + # Mail reports to root@, not munin@, only execute one at a time + !mailto(root),serial(true) + + # This runs the munin task every 5 minutes. + @ 5 /usr/bin/munin-cron + + # Alternatively, this route works differently + # Update once a minute (for busy sites) + #@ 1 /usr/libexec/munin/munin-update + ## Check for limit excess every 2 minutes + #@ 2 /usr/libexec/munin/munin-limits + ## Update graphs every 5 minutes + #@ 5 nice /usr/libexec/munin/munin-graph + ## Update HTML pages every 15 minutes + #@ 15 nice /usr/libexec/munin/munin-html + EOF + + # remove .htaccess file + find "${D}" -name .htaccess -delete || die + fi +} + +pkg_config() { + if use minimal; then + einfo "Nothing to do." + return 0 + fi + + einfo "Press enter to install the default crontab for the munin master" + einfo "installation from /usr/share/${PN}/f?crontab" + einfo "If you have a large site, you may wish to customize it." + read + + ebegin "Setting up cron ..." + if has_version sys-process/fcron; then + fcrontab - -u munin < /usr/share/${PN}/fcrontab + else + # dcron is very fussy about syntax + # the following is the only form that works in BOTH dcron and vixie-cron + crontab - -u munin < /usr/share/${PN}/crontab + fi + eend $? + + einfo "Press enter to set up the SSH keys used for SSH transport" + read + + # generate one rsa (for legacy) and one ecdsa (for new systems) + ssh-keygen -t rsa \ + -f /var/lib/munin/.ssh/id_rsa -N '' \ + -C "created by portage for ${CATEGORY}/${PN}" || die + ssh-keygen -t ecdsa \ + -f /var/lib/munin/.ssh/id_ecdsa -N '' \ + -C "created by portage for ${CATEGORY}/${PN}" || die + chown -R munin:munin /var/lib/munin/.ssh || die + chmod 0600 /var/lib/munin/.ssh/id_{rsa,ecdsa} || die + + einfo "Your public keys are available in " + einfo " /var/lib/munin/.ssh/id_rsa.pub" + einfo " /var/lib/munin/.ssh/id_ecdsa.pub" + einfo "and follows for convenience" + echo + cat /var/lib/munin/.ssh/id_*.pub +} + +pkg_postinst() { + elog "Please follow the munin documentation to set up the plugins you" + elog "need, afterwards start munin-node." + elog "" + elog "To make use of munin-async, make sure to set up the corresponding" + elog "SSH key in /var/lib/munin-async/.ssh/authorized_keys" + elog "" + if ! use minimal; then + elog "Please run" + elog " emerge --config net-analyzer/munin" + elog "to automatically configure munin's cronjobs as well as generate" + elog "passwordless SSH keys to be used with munin-async." + fi + elog "" + elog "Further information about setting up Munin in Gentoo can be found" + elog "in the Gentoo Wiki: https://wiki.gentoo.org/wiki/Munin" + + if use cgi; then + chown $(usex apache2 apache munin) \ + "${ROOT}"/var/cache/munin-cgi \ + "${ROOT}"/var/log/munin/munin-cgi-{graph,html}.log + + if use apache2; then + elog "To use Munin with CGI you should include /etc/apache2/vhosts.d/munin.include" + elog "or /etc/apache2/vhosts.d/munin-2.4.include (for Apache 2.4) from the virtual" + elog "host you want it to be served." + elog "If you want to enable CGI-based HTML as well, you have to add to" + elog "/etc/conf.d/apache2 the option -D MUNIN_HTML_CGI." + else + elog "Effective CGI support has just been added in 2.0.7-r6." + elog "Documentation on how to use it is still sparse." + fi + fi + + # we create this here as we don't want Portage to check /run + # symlinks but we still need this to be present before the reboot. + if ! use minimal && ! [[ -d "${ROOT}"/run/munin ]]; then + mkdir "${ROOT}"/run/munin + chown munin:munin "${ROOT}"/run/munin + chmod 0700 "${ROOT}"/run/munin + fi +} diff --git a/net-analyzer/munin/munin-2.0.59.ebuild b/net-analyzer/munin/munin-2.0.59.ebuild new file mode 100644 index 000000000000..5fe4c097bffd --- /dev/null +++ b/net-analyzer/munin/munin-2.0.59.ebuild @@ -0,0 +1,417 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +PATCHSET=1 + +inherit java-pkg-opt-2 systemd + +MY_P=${P/_/-} + +DESCRIPTION="Munin Server Monitoring Tool" +HOMEPAGE="http://munin-monitoring.org/" +SRC_URI=" + https://github.com/munin-monitoring/munin/archive/${PV}.tar.gz -> ${P}.tar.gz + https://dev.gentoo.org/~graaff/munin/${P}-gentoo-${PATCHSET}.tar.xz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~arm ~arm64 ppc ~ppc64 x86" +IUSE="asterisk irc java ldap memcached minimal mysql postgres selinux ssl test cgi ipv6 syslog ipmi http dhcpd doc apache2" +REQUIRED_USE="cgi? ( !minimal ) apache2? ( cgi )" +RESTRICT="!test? ( test )" + +# Upstream's listing of required modules is NOT correct! +# Some of the postgres plugins use DBD::Pg, while others call psql directly. +# Some of the mysql plugins use DBD::mysql, while others call mysqladmin directly. +# We replace the original ipmi plugins with the freeipmi_ plugin which at least works. +DEPEND_COM=" + acct-user/munin + acct-user/munin-async + acct-group/munin + dev-lang/perl:=[berkdb] + dev-perl/DBI + dev-perl/Date-Manip + dev-perl/File-Copy-Recursive + dev-perl/List-MoreUtils + dev-perl/Log-Log4perl + dev-perl/Net-CIDR + dev-perl/Net-DNS + dev-perl/Net-Netmask + dev-perl/Net-SNMP + dev-perl/Net-Server[ipv6(-)?] + virtual/perl-Digest-MD5 + virtual/perl-Getopt-Long + virtual/perl-MIME-Base64 + virtual/perl-Storable + virtual/perl-Text-Balanced + virtual/perl-Time-HiRes + apache2? ( www-servers/apache[apache2_modules_cgi,apache2_modules_cgid,apache2_modules_rewrite] ) + asterisk? ( dev-perl/Net-Telnet ) + cgi? ( + dev-perl/FCGI + dev-perl/CGI-Fast + ) + dhcpd? ( + >=net-misc/dhcp-3[server] + dev-perl/Net-IP + dev-perl/HTTP-Date + ) + doc? ( dev-python/sphinx ) + http? ( dev-perl/libwww-perl ) + irc? ( dev-perl/Net-IRC ) + ldap? ( dev-perl/perl-ldap ) + kernel_linux? ( sys-process/procps ) + memcached? ( dev-perl/Cache-Memcached ) + mysql? ( + virtual/mysql + dev-perl/Cache-Cache + dev-perl/DBD-mysql + ) + postgres? ( dev-perl/DBD-Pg dev-db/postgresql:* ) + ssl? ( dev-perl/Net-SSLeay ) + syslog? ( virtual/perl-Sys-Syslog ) + !minimal? ( + dev-perl/HTML-Template + dev-perl/IO-Socket-INET6 + dev-perl/URI + >=net-analyzer/rrdtool-1.3[graph,perl] + virtual/ssh + ) + " + +# Keep this seperate, as previous versions have had other deps here +DEPEND="${DEPEND_COM} + dev-perl/Module-Build + java? ( >=virtual/jdk-1.5 ) + test? ( + dev-perl/Test-Deep + dev-perl/Test-Exception + dev-perl/Test-LongString + dev-perl/Test-Differences + dev-perl/Test-MockModule + dev-perl/Test-MockObject + dev-perl/File-Slurp + dev-perl/IO-stringy + dev-perl/IO-Socket-INET6 + )" +RDEPEND="${DEPEND_COM} + virtual/awk + ipmi? ( >=sys-libs/freeipmi-1.1.6-r1 ) + java? ( + >=virtual/jre-1.5 + || ( net-analyzer/netcat net-analyzer/openbsd-netcat ) + ) + !minimal? ( + virtual/cron + media-fonts/dejavu + ) + selinux? ( sec-policy/selinux-munin )" + +S="${WORKDIR}/${MY_P}" + +pkg_setup() { + java-pkg-opt-2_pkg_setup +} + +src_prepare() { + echo ${PV} > RELEASE || die + + eapply "${WORKDIR}"/patches/*.patch + + eapply_user + + java-pkg-opt-2_src_prepare +} + +src_configure() { + local cgidir='$(DESTDIR)/usr/libexec/munin/cgi' + use cgi || cgidir="${T}/useless/cgi-bin" + + local cgiuser=$(usex apache2 apache munin) + + cat >> "${S}"/Makefile.config <<- EOF + PREFIX=\$(DESTDIR)/usr + CONFDIR=\$(DESTDIR)/etc/munin + DOCDIR=${T}/useless/doc + MANDIR=\$(PREFIX)/share/man + LIBDIR=\$(PREFIX)/libexec/munin + HTMLDIR=\$(DESTDIR)/var/www/localhost/htdocs/munin + CGIDIR=${cgidir} + CGITMPDIR=\$(DESTDIR)/var/cache/munin-cgi + CGIUSER=${cgiuser} + DBDIR=\$(DESTDIR)/var/lib/munin + DBDIRNODE=\$(DESTDIR)/var/lib/munin-node + SPOOLDIR=\$(DESTDIR)/var/spool/munin-async + LOGDIR=\$(DESTDIR)/var/log/munin + PERLLIB=\$(DESTDIR)$(perl -V:vendorlib | cut -d"'" -f2) + JCVALID=$(usex java yes no) + STATEDIR=\$(DESTDIR)/run/munin + EOF +} + +# parallel make and install need to be fixed before, and I haven't +# gotten around to do so yet. +src_compile() { + emake -j1 + use doc && emake -C doc html +} + +src_test() { + if [[ ${EUID} == 0 ]]; then + eerror "You cannot run tests as root." + eerror "Please enable FEATURES=userpriv before proceeding." + return 1 + fi + + local testtargets="test-common test-node test-plugins" + use minimal || testtargets+=" test-master" + + LC_ALL=C emake -j1 ${testtargets} +} + +src_install() { + local dirs=" + /var/log/munin + /var/lib/munin/plugin-state + /var/lib/munin-node/plugin-state + /var/www/localhost/htdocs/munin + /etc/munin/plugin-conf.d + /etc/munin/plugins" + use minimal || dirs+=" /etc/munin/munin-conf.d/" + + keepdir ${dirs} + fowners munin:munin ${dirs} + + # parallel install doesn't work and it's also pointless to have this + # run in parallel for now (because it uses internal loops). + emake -j1 CHOWN=true DESTDIR="${D}" $(usex minimal "install-minimal install-man" install) + + # we remove /run from the install, as it's not the package's to deal + # with. + rm -rf "${D}"/run || die + + # remove the plugins for non-Gentoo package managers; use -f so that + # it doesn't fail when installing on non-Linux platforms. + rm -f "${D}"/usr/libexec/munin/plugins/{apt{,_all},yum} || die + + insinto /etc/munin/plugin-conf.d/ + newins "${FILESDIR}"/${PN}-1.3.2-plugins.conf munin-node + + newinitd "${FILESDIR}"/munin-node_init.d_2.0.19 munin-node + newconfd "${FILESDIR}"/munin-node_conf.d_1.4.6-r2 munin-node + + newinitd "${FILESDIR}"/munin-asyncd.init.2 munin-asyncd + + dodir /usr/lib/tmpfiles.d + cat > "${D}"/usr/lib/tmpfiles.d/${CATEGORY}:${PN}:${SLOT}.conf <<- EOF + d /run/munin 0700 munin munin - - + EOF + + systemd_dounit "${FILESDIR}"/munin-async.service + systemd_dounit "${FILESDIR}"/munin-graph.{service,socket} + systemd_dounit "${FILESDIR}"/munin-html.{service,socket} + systemd_dounit "${FILESDIR}"/munin-node.service + + cat >> "${T}"/munin.env <<- EOF + CONFIG_PROTECT=/var/spool/munin-async/.ssh + EOF + newenvd "${T}"/munin.env 50munin + + dodoc README ChangeLog INSTALL + if use doc; then + cd "${S}"/doc/_build/html || die + docinto html + dodoc -r * + cd "${S}" || die + fi + + dodir /etc/logrotate.d/ + sed -e "s:@CGIUSER@:$(usex apache2 apache munin):g" \ + "${FILESDIR}"/logrotate.d-munin.3 > "${D}"/etc/logrotate.d/munin + + dosym ipmi_ /usr/libexec/munin/plugins/ipmi_sensor_ + + if use syslog; then + sed -i -e '/log_file/s| .*| Sys::Syslog|' \ + "${D}"/etc/munin/munin-node.conf || die + fi + + # Use a simpler pid file to avoid trouble with /run in tmpfs. The + # munin-node service is ran as user root, and only later drops + # privileges. + sed -i -e 's:/run/munin/munin-node.pid:/run/munin-node.pid:' \ + "${D}"/etc/munin/munin-node.conf || die + + keepdir /var/spool/munin-async/.ssh + touch "${D}"/var/spool/munin-async/.ssh/authorized_keys + fowners munin-async:munin /var/spool/munin-async{,/.ssh/{,authorized_keys}} + fperms 0750 /var/spool/munin-async{,/.ssh} + fperms 0600 /var/spool/munin-async/.ssh/authorized_keys + + if use minimal; then + # This requires the presence of munin-update, which is part of + # the non-minimal install... + rm "${D}"/usr/libexec/munin/plugins/munin_stats + else + # remove font files so that we don't have to keep them around + rm "${D}"/usr/libexec/${PN}/*.ttf || die + + if use cgi; then + sed -i -e '/#graph_strategy cgi/s:^#::' "${D}"/etc/munin/munin.conf || die + + keepdir /var/cache/munin-cgi + touch "${D}"/var/log/munin/munin-cgi-{graph,html}.log + fowners $(usex apache2 apache munin) \ + /var/cache/munin-cgi \ + /var/log/munin/munin-cgi-{graph,html}.log + + if use apache2; then + insinto /etc/apache2/vhosts.d + newins "${FILESDIR}"/munin.apache.include munin.include + newins "${FILESDIR}"/munin.apache.include-2.4 munin-2.4.include + fi + else + sed \ + -e '/#graph_strategy cgi/s:#graph_strategy cgi:graph_strategy cron:' \ + -i "${D}"/etc/munin/munin.conf || die + fi + + keepdir /var/lib/munin/.ssh + cat >> "${D}"/var/lib/munin/.ssh/config <<- EOF + IdentityFile /var/lib/munin/.ssh/id_ecdsa + IdentityFile /var/lib/munin/.ssh/id_rsa + EOF + + fowners munin:munin /var/lib/munin/.ssh/{,config} + fperms go-rwx /var/lib/munin/.ssh/{,config} + + dodir /usr/share/${PN} + cat >> "${D}"/usr/share/${PN}/crontab <<- EOF + # Force the shell to bash + SHELL=/bin/bash + # Mail reports to root@, not munin@ + MAILTO=root + + # This runs the munin task every 5 minutes. + */5 * * * * /usr/bin/munin-cron + + # Alternatively, this route works differently + # Update once a minute (for busy sites) + #*/1 * * * * /usr/libexec/munin/munin-update + ## Check for limit excess every 2 minutes + #*/2 * * * * /usr/libexec/munin/munin-limits + ## Update graphs every 5 minutes + #*/5 * * * * nice /usr/libexec/munin/munin-graph + ## Update HTML pages every 15 minutes + #*/15 * * * * nice /usr/libexec/munin/munin-html + EOF + + cat >> "${D}"/usr/share/${PN}/fcrontab <<- EOF + # Mail reports to root@, not munin@, only execute one at a time + !mailto(root),serial(true) + + # This runs the munin task every 5 minutes. + @ 5 /usr/bin/munin-cron + + # Alternatively, this route works differently + # Update once a minute (for busy sites) + #@ 1 /usr/libexec/munin/munin-update + ## Check for limit excess every 2 minutes + #@ 2 /usr/libexec/munin/munin-limits + ## Update graphs every 5 minutes + #@ 5 nice /usr/libexec/munin/munin-graph + ## Update HTML pages every 15 minutes + #@ 15 nice /usr/libexec/munin/munin-html + EOF + + # remove .htaccess file + find "${D}" -name .htaccess -delete || die + fi +} + +pkg_config() { + if use minimal; then + einfo "Nothing to do." + return 0 + fi + + einfo "Press enter to install the default crontab for the munin master" + einfo "installation from /usr/share/${PN}/f?crontab" + einfo "If you have a large site, you may wish to customize it." + read + + ebegin "Setting up cron ..." + if has_version sys-process/fcron; then + fcrontab - -u munin < /usr/share/${PN}/fcrontab + else + # dcron is very fussy about syntax + # the following is the only form that works in BOTH dcron and vixie-cron + crontab - -u munin < /usr/share/${PN}/crontab + fi + eend $? + + einfo "Press enter to set up the SSH keys used for SSH transport" + read + + # generate one rsa (for legacy) and one ecdsa (for new systems) + ssh-keygen -t rsa \ + -f /var/lib/munin/.ssh/id_rsa -N '' \ + -C "created by portage for ${CATEGORY}/${PN}" || die + ssh-keygen -t ecdsa \ + -f /var/lib/munin/.ssh/id_ecdsa -N '' \ + -C "created by portage for ${CATEGORY}/${PN}" || die + chown -R munin:munin /var/lib/munin/.ssh || die + chmod 0600 /var/lib/munin/.ssh/id_{rsa,ecdsa} || die + + einfo "Your public keys are available in " + einfo " /var/lib/munin/.ssh/id_rsa.pub" + einfo " /var/lib/munin/.ssh/id_ecdsa.pub" + einfo "and follows for convenience" + echo + cat /var/lib/munin/.ssh/id_*.pub +} + +pkg_postinst() { + elog "Please follow the munin documentation to set up the plugins you" + elog "need, afterwards start munin-node." + elog "" + elog "To make use of munin-async, make sure to set up the corresponding" + elog "SSH key in /var/lib/munin-async/.ssh/authorized_keys" + elog "" + if ! use minimal; then + elog "Please run" + elog " emerge --config net-analyzer/munin" + elog "to automatically configure munin's cronjobs as well as generate" + elog "passwordless SSH keys to be used with munin-async." + fi + elog "" + elog "Further information about setting up Munin in Gentoo can be found" + elog "in the Gentoo Wiki: https://wiki.gentoo.org/wiki/Munin" + + if use cgi; then + chown $(usex apache2 apache munin) \ + "${ROOT}"/var/cache/munin-cgi \ + "${ROOT}"/var/log/munin/munin-cgi-{graph,html}.log + + if use apache2; then + elog "To use Munin with CGI you should include /etc/apache2/vhosts.d/munin.include" + elog "or /etc/apache2/vhosts.d/munin-2.4.include (for Apache 2.4) from the virtual" + elog "host you want it to be served." + elog "If you want to enable CGI-based HTML as well, you have to add to" + elog "/etc/conf.d/apache2 the option -D MUNIN_HTML_CGI." + else + elog "Effective CGI support has just been added in 2.0.7-r6." + elog "Documentation on how to use it is still sparse." + fi + fi + + # we create this here as we don't want Portage to check /run + # symlinks but we still need this to be present before the reboot. + if ! use minimal && ! [[ -d "${ROOT}"/run/munin ]]; then + mkdir "${ROOT}"/run/munin + chown munin:munin "${ROOT}"/run/munin + chmod 0700 "${ROOT}"/run/munin + fi +} diff --git a/net-analyzer/munin/munin-2.0.61.ebuild b/net-analyzer/munin/munin-2.0.61.ebuild new file mode 100644 index 000000000000..acaf9f6d9f0c --- /dev/null +++ b/net-analyzer/munin/munin-2.0.61.ebuild @@ -0,0 +1,417 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +PATCHSET=1 + +inherit java-pkg-opt-2 systemd + +MY_P=${P/_/-} + +DESCRIPTION="Munin Server Monitoring Tool" +HOMEPAGE="http://munin-monitoring.org/" +SRC_URI=" + https://github.com/munin-monitoring/munin/archive/${PV}.tar.gz -> ${P}.tar.gz + https://dev.gentoo.org/~graaff/munin/${P}-gentoo-${PATCHSET}.tar.xz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~x86" +IUSE="asterisk irc java ldap memcached minimal mysql postgres selinux ssl test cgi ipv6 syslog ipmi http dhcpd doc apache2" +REQUIRED_USE="cgi? ( !minimal ) apache2? ( cgi )" +RESTRICT="!test? ( test )" + +# Upstream's listing of required modules is NOT correct! +# Some of the postgres plugins use DBD::Pg, while others call psql directly. +# Some of the mysql plugins use DBD::mysql, while others call mysqladmin directly. +# We replace the original ipmi plugins with the freeipmi_ plugin which at least works. +DEPEND_COM=" + acct-user/munin + acct-user/munin-async + acct-group/munin + dev-lang/perl:=[berkdb] + dev-perl/DBI + dev-perl/Date-Manip + dev-perl/File-Copy-Recursive + dev-perl/List-MoreUtils + dev-perl/Log-Log4perl + dev-perl/Net-CIDR + dev-perl/Net-DNS + dev-perl/Net-Netmask + dev-perl/Net-SNMP + dev-perl/Net-Server[ipv6(-)?] + virtual/perl-Digest-MD5 + virtual/perl-Getopt-Long + virtual/perl-MIME-Base64 + virtual/perl-Storable + virtual/perl-Text-Balanced + virtual/perl-Time-HiRes + apache2? ( www-servers/apache[apache2_modules_cgi,apache2_modules_cgid,apache2_modules_rewrite] ) + asterisk? ( dev-perl/Net-Telnet ) + cgi? ( + dev-perl/FCGI + dev-perl/CGI-Fast + ) + dhcpd? ( + >=net-misc/dhcp-3[server] + dev-perl/Net-IP + dev-perl/HTTP-Date + ) + doc? ( dev-python/sphinx ) + http? ( dev-perl/libwww-perl ) + irc? ( dev-perl/Net-IRC ) + ldap? ( dev-perl/perl-ldap ) + kernel_linux? ( sys-process/procps ) + memcached? ( dev-perl/Cache-Memcached ) + mysql? ( + virtual/mysql + dev-perl/Cache-Cache + dev-perl/DBD-mysql + ) + postgres? ( dev-perl/DBD-Pg dev-db/postgresql:* ) + ssl? ( dev-perl/Net-SSLeay ) + syslog? ( virtual/perl-Sys-Syslog ) + !minimal? ( + dev-perl/HTML-Template + dev-perl/IO-Socket-INET6 + dev-perl/URI + >=net-analyzer/rrdtool-1.3[graph,perl] + virtual/ssh + ) + " + +# Keep this seperate, as previous versions have had other deps here +DEPEND="${DEPEND_COM} + dev-perl/Module-Build + java? ( >=virtual/jdk-1.5 ) + test? ( + dev-perl/Test-Deep + dev-perl/Test-Exception + dev-perl/Test-LongString + dev-perl/Test-Differences + dev-perl/Test-MockModule + dev-perl/Test-MockObject + dev-perl/File-Slurp + dev-perl/IO-stringy + dev-perl/IO-Socket-INET6 + )" +RDEPEND="${DEPEND_COM} + virtual/awk + ipmi? ( >=sys-libs/freeipmi-1.1.6-r1 ) + java? ( + >=virtual/jre-1.5 + || ( net-analyzer/netcat net-analyzer/openbsd-netcat ) + ) + !minimal? ( + virtual/cron + media-fonts/dejavu + ) + selinux? ( sec-policy/selinux-munin )" + +S="${WORKDIR}/${MY_P}" + +pkg_setup() { + java-pkg-opt-2_pkg_setup +} + +src_prepare() { + echo ${PV} > RELEASE || die + + eapply "${WORKDIR}"/patches/*.patch + + eapply_user + + java-pkg-opt-2_src_prepare +} + +src_configure() { + local cgidir='$(DESTDIR)/usr/libexec/munin/cgi' + use cgi || cgidir="${T}/useless/cgi-bin" + + local cgiuser=$(usex apache2 apache munin) + + cat >> "${S}"/Makefile.config <<- EOF + PREFIX=\$(DESTDIR)/usr + CONFDIR=\$(DESTDIR)/etc/munin + DOCDIR=${T}/useless/doc + MANDIR=\$(PREFIX)/share/man + LIBDIR=\$(PREFIX)/libexec/munin + HTMLDIR=\$(DESTDIR)/var/www/localhost/htdocs/munin + CGIDIR=${cgidir} + CGITMPDIR=\$(DESTDIR)/var/cache/munin-cgi + CGIUSER=${cgiuser} + DBDIR=\$(DESTDIR)/var/lib/munin + DBDIRNODE=\$(DESTDIR)/var/lib/munin-node + SPOOLDIR=\$(DESTDIR)/var/spool/munin-async + LOGDIR=\$(DESTDIR)/var/log/munin + PERLLIB=\$(DESTDIR)$(perl -V:vendorlib | cut -d"'" -f2) + JCVALID=$(usex java yes no) + STATEDIR=\$(DESTDIR)/run/munin + EOF +} + +# parallel make and install need to be fixed before, and I haven't +# gotten around to do so yet. +src_compile() { + emake -j1 + use doc && emake -C doc html +} + +src_test() { + if [[ ${EUID} == 0 ]]; then + eerror "You cannot run tests as root." + eerror "Please enable FEATURES=userpriv before proceeding." + return 1 + fi + + local testtargets="test-common test-node test-plugins" + use minimal || testtargets+=" test-master" + + LC_ALL=C emake -j1 ${testtargets} +} + +src_install() { + local dirs=" + /var/log/munin + /var/lib/munin/plugin-state + /var/lib/munin-node/plugin-state + /var/www/localhost/htdocs/munin + /etc/munin/plugin-conf.d + /etc/munin/plugins" + use minimal || dirs+=" /etc/munin/munin-conf.d/" + + keepdir ${dirs} + fowners munin:munin ${dirs} + + # parallel install doesn't work and it's also pointless to have this + # run in parallel for now (because it uses internal loops). + emake -j1 CHOWN=true DESTDIR="${D}" $(usex minimal "install-minimal install-man" install) + + # we remove /run from the install, as it's not the package's to deal + # with. + rm -rf "${D}"/run || die + + # remove the plugins for non-Gentoo package managers; use -f so that + # it doesn't fail when installing on non-Linux platforms. + rm -f "${D}"/usr/libexec/munin/plugins/{apt{,_all},yum} || die + + insinto /etc/munin/plugin-conf.d/ + newins "${FILESDIR}"/${PN}-1.3.2-plugins.conf munin-node + + newinitd "${FILESDIR}"/munin-node_init.d_2.0.19 munin-node + newconfd "${FILESDIR}"/munin-node_conf.d_1.4.6-r2 munin-node + + newinitd "${FILESDIR}"/munin-asyncd.init.2 munin-asyncd + + dodir /usr/lib/tmpfiles.d + cat > "${D}"/usr/lib/tmpfiles.d/${CATEGORY}:${PN}:${SLOT}.conf <<- EOF + d /run/munin 0700 munin munin - - + EOF + + systemd_dounit "${FILESDIR}"/munin-async.service + systemd_dounit "${FILESDIR}"/munin-graph.{service,socket} + systemd_dounit "${FILESDIR}"/munin-html.{service,socket} + systemd_dounit "${FILESDIR}"/munin-node.service + + cat >> "${T}"/munin.env <<- EOF + CONFIG_PROTECT=/var/spool/munin-async/.ssh + EOF + newenvd "${T}"/munin.env 50munin + + dodoc README ChangeLog INSTALL + if use doc; then + cd "${S}"/doc/_build/html || die + docinto html + dodoc -r * + cd "${S}" || die + fi + + dodir /etc/logrotate.d/ + sed -e "s:@CGIUSER@:$(usex apache2 apache munin):g" \ + "${FILESDIR}"/logrotate.d-munin.3 > "${D}"/etc/logrotate.d/munin + + dosym ipmi_ /usr/libexec/munin/plugins/ipmi_sensor_ + + if use syslog; then + sed -i -e '/log_file/s| .*| Sys::Syslog|' \ + "${D}"/etc/munin/munin-node.conf || die + fi + + # Use a simpler pid file to avoid trouble with /run in tmpfs. The + # munin-node service is ran as user root, and only later drops + # privileges. + sed -i -e 's:/run/munin/munin-node.pid:/run/munin-node.pid:' \ + "${D}"/etc/munin/munin-node.conf || die + + keepdir /var/spool/munin-async/.ssh + touch "${D}"/var/spool/munin-async/.ssh/authorized_keys + fowners munin-async:munin /var/spool/munin-async{,/.ssh/{,authorized_keys}} + fperms 0750 /var/spool/munin-async{,/.ssh} + fperms 0600 /var/spool/munin-async/.ssh/authorized_keys + + if use minimal; then + # This requires the presence of munin-update, which is part of + # the non-minimal install... + rm "${D}"/usr/libexec/munin/plugins/munin_stats + else + # remove font files so that we don't have to keep them around + rm "${D}"/usr/libexec/${PN}/*.ttf || die + + if use cgi; then + sed -i -e '/#graph_strategy cgi/s:^#::' "${D}"/etc/munin/munin.conf || die + + keepdir /var/cache/munin-cgi + touch "${D}"/var/log/munin/munin-cgi-{graph,html}.log + fowners $(usex apache2 apache munin) \ + /var/cache/munin-cgi \ + /var/log/munin/munin-cgi-{graph,html}.log + + if use apache2; then + insinto /etc/apache2/vhosts.d + newins "${FILESDIR}"/munin.apache.include munin.include + newins "${FILESDIR}"/munin.apache.include-2.4 munin-2.4.include + fi + else + sed \ + -e '/#graph_strategy cgi/s:#graph_strategy cgi:graph_strategy cron:' \ + -i "${D}"/etc/munin/munin.conf || die + fi + + keepdir /var/lib/munin/.ssh + cat >> "${D}"/var/lib/munin/.ssh/config <<- EOF + IdentityFile /var/lib/munin/.ssh/id_ecdsa + IdentityFile /var/lib/munin/.ssh/id_rsa + EOF + + fowners munin:munin /var/lib/munin/.ssh/{,config} + fperms go-rwx /var/lib/munin/.ssh/{,config} + + dodir /usr/share/${PN} + cat >> "${D}"/usr/share/${PN}/crontab <<- EOF + # Force the shell to bash + SHELL=/bin/bash + # Mail reports to root@, not munin@ + MAILTO=root + + # This runs the munin task every 5 minutes. + */5 * * * * /usr/bin/munin-cron + + # Alternatively, this route works differently + # Update once a minute (for busy sites) + #*/1 * * * * /usr/libexec/munin/munin-update + ## Check for limit excess every 2 minutes + #*/2 * * * * /usr/libexec/munin/munin-limits + ## Update graphs every 5 minutes + #*/5 * * * * nice /usr/libexec/munin/munin-graph + ## Update HTML pages every 15 minutes + #*/15 * * * * nice /usr/libexec/munin/munin-html + EOF + + cat >> "${D}"/usr/share/${PN}/fcrontab <<- EOF + # Mail reports to root@, not munin@, only execute one at a time + !mailto(root),serial(true) + + # This runs the munin task every 5 minutes. + @ 5 /usr/bin/munin-cron + + # Alternatively, this route works differently + # Update once a minute (for busy sites) + #@ 1 /usr/libexec/munin/munin-update + ## Check for limit excess every 2 minutes + #@ 2 /usr/libexec/munin/munin-limits + ## Update graphs every 5 minutes + #@ 5 nice /usr/libexec/munin/munin-graph + ## Update HTML pages every 15 minutes + #@ 15 nice /usr/libexec/munin/munin-html + EOF + + # remove .htaccess file + find "${D}" -name .htaccess -delete || die + fi +} + +pkg_config() { + if use minimal; then + einfo "Nothing to do." + return 0 + fi + + einfo "Press enter to install the default crontab for the munin master" + einfo "installation from /usr/share/${PN}/f?crontab" + einfo "If you have a large site, you may wish to customize it." + read + + ebegin "Setting up cron ..." + if has_version sys-process/fcron; then + fcrontab - -u munin < /usr/share/${PN}/fcrontab + else + # dcron is very fussy about syntax + # the following is the only form that works in BOTH dcron and vixie-cron + crontab - -u munin < /usr/share/${PN}/crontab + fi + eend $? + + einfo "Press enter to set up the SSH keys used for SSH transport" + read + + # generate one rsa (for legacy) and one ecdsa (for new systems) + ssh-keygen -t rsa \ + -f /var/lib/munin/.ssh/id_rsa -N '' \ + -C "created by portage for ${CATEGORY}/${PN}" || die + ssh-keygen -t ecdsa \ + -f /var/lib/munin/.ssh/id_ecdsa -N '' \ + -C "created by portage for ${CATEGORY}/${PN}" || die + chown -R munin:munin /var/lib/munin/.ssh || die + chmod 0600 /var/lib/munin/.ssh/id_{rsa,ecdsa} || die + + einfo "Your public keys are available in " + einfo " /var/lib/munin/.ssh/id_rsa.pub" + einfo " /var/lib/munin/.ssh/id_ecdsa.pub" + einfo "and follows for convenience" + echo + cat /var/lib/munin/.ssh/id_*.pub +} + +pkg_postinst() { + elog "Please follow the munin documentation to set up the plugins you" + elog "need, afterwards start munin-node." + elog "" + elog "To make use of munin-async, make sure to set up the corresponding" + elog "SSH key in /var/lib/munin-async/.ssh/authorized_keys" + elog "" + if ! use minimal; then + elog "Please run" + elog " emerge --config net-analyzer/munin" + elog "to automatically configure munin's cronjobs as well as generate" + elog "passwordless SSH keys to be used with munin-async." + fi + elog "" + elog "Further information about setting up Munin in Gentoo can be found" + elog "in the Gentoo Wiki: https://wiki.gentoo.org/wiki/Munin" + + if use cgi; then + chown $(usex apache2 apache munin) \ + "${ROOT}"/var/cache/munin-cgi \ + "${ROOT}"/var/log/munin/munin-cgi-{graph,html}.log + + if use apache2; then + elog "To use Munin with CGI you should include /etc/apache2/vhosts.d/munin.include" + elog "or /etc/apache2/vhosts.d/munin-2.4.include (for Apache 2.4) from the virtual" + elog "host you want it to be served." + elog "If you want to enable CGI-based HTML as well, you have to add to" + elog "/etc/conf.d/apache2 the option -D MUNIN_HTML_CGI." + else + elog "Effective CGI support has just been added in 2.0.7-r6." + elog "Documentation on how to use it is still sparse." + fi + fi + + # we create this here as we don't want Portage to check /run + # symlinks but we still need this to be present before the reboot. + if ! use minimal && ! [[ -d "${ROOT}"/run/munin ]]; then + mkdir "${ROOT}"/run/munin + chown munin:munin "${ROOT}"/run/munin + chmod 0700 "${ROOT}"/run/munin + fi +} diff --git a/net-analyzer/munin/munin-2.0.63.ebuild b/net-analyzer/munin/munin-2.0.63.ebuild new file mode 100644 index 000000000000..acaf9f6d9f0c --- /dev/null +++ b/net-analyzer/munin/munin-2.0.63.ebuild @@ -0,0 +1,417 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +PATCHSET=1 + +inherit java-pkg-opt-2 systemd + +MY_P=${P/_/-} + +DESCRIPTION="Munin Server Monitoring Tool" +HOMEPAGE="http://munin-monitoring.org/" +SRC_URI=" + https://github.com/munin-monitoring/munin/archive/${PV}.tar.gz -> ${P}.tar.gz + https://dev.gentoo.org/~graaff/munin/${P}-gentoo-${PATCHSET}.tar.xz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~x86" +IUSE="asterisk irc java ldap memcached minimal mysql postgres selinux ssl test cgi ipv6 syslog ipmi http dhcpd doc apache2" +REQUIRED_USE="cgi? ( !minimal ) apache2? ( cgi )" +RESTRICT="!test? ( test )" + +# Upstream's listing of required modules is NOT correct! +# Some of the postgres plugins use DBD::Pg, while others call psql directly. +# Some of the mysql plugins use DBD::mysql, while others call mysqladmin directly. +# We replace the original ipmi plugins with the freeipmi_ plugin which at least works. +DEPEND_COM=" + acct-user/munin + acct-user/munin-async + acct-group/munin + dev-lang/perl:=[berkdb] + dev-perl/DBI + dev-perl/Date-Manip + dev-perl/File-Copy-Recursive + dev-perl/List-MoreUtils + dev-perl/Log-Log4perl + dev-perl/Net-CIDR + dev-perl/Net-DNS + dev-perl/Net-Netmask + dev-perl/Net-SNMP + dev-perl/Net-Server[ipv6(-)?] + virtual/perl-Digest-MD5 + virtual/perl-Getopt-Long + virtual/perl-MIME-Base64 + virtual/perl-Storable + virtual/perl-Text-Balanced + virtual/perl-Time-HiRes + apache2? ( www-servers/apache[apache2_modules_cgi,apache2_modules_cgid,apache2_modules_rewrite] ) + asterisk? ( dev-perl/Net-Telnet ) + cgi? ( + dev-perl/FCGI + dev-perl/CGI-Fast + ) + dhcpd? ( + >=net-misc/dhcp-3[server] + dev-perl/Net-IP + dev-perl/HTTP-Date + ) + doc? ( dev-python/sphinx ) + http? ( dev-perl/libwww-perl ) + irc? ( dev-perl/Net-IRC ) + ldap? ( dev-perl/perl-ldap ) + kernel_linux? ( sys-process/procps ) + memcached? ( dev-perl/Cache-Memcached ) + mysql? ( + virtual/mysql + dev-perl/Cache-Cache + dev-perl/DBD-mysql + ) + postgres? ( dev-perl/DBD-Pg dev-db/postgresql:* ) + ssl? ( dev-perl/Net-SSLeay ) + syslog? ( virtual/perl-Sys-Syslog ) + !minimal? ( + dev-perl/HTML-Template + dev-perl/IO-Socket-INET6 + dev-perl/URI + >=net-analyzer/rrdtool-1.3[graph,perl] + virtual/ssh + ) + " + +# Keep this seperate, as previous versions have had other deps here +DEPEND="${DEPEND_COM} + dev-perl/Module-Build + java? ( >=virtual/jdk-1.5 ) + test? ( + dev-perl/Test-Deep + dev-perl/Test-Exception + dev-perl/Test-LongString + dev-perl/Test-Differences + dev-perl/Test-MockModule + dev-perl/Test-MockObject + dev-perl/File-Slurp + dev-perl/IO-stringy + dev-perl/IO-Socket-INET6 + )" +RDEPEND="${DEPEND_COM} + virtual/awk + ipmi? ( >=sys-libs/freeipmi-1.1.6-r1 ) + java? ( + >=virtual/jre-1.5 + || ( net-analyzer/netcat net-analyzer/openbsd-netcat ) + ) + !minimal? ( + virtual/cron + media-fonts/dejavu + ) + selinux? ( sec-policy/selinux-munin )" + +S="${WORKDIR}/${MY_P}" + +pkg_setup() { + java-pkg-opt-2_pkg_setup +} + +src_prepare() { + echo ${PV} > RELEASE || die + + eapply "${WORKDIR}"/patches/*.patch + + eapply_user + + java-pkg-opt-2_src_prepare +} + +src_configure() { + local cgidir='$(DESTDIR)/usr/libexec/munin/cgi' + use cgi || cgidir="${T}/useless/cgi-bin" + + local cgiuser=$(usex apache2 apache munin) + + cat >> "${S}"/Makefile.config <<- EOF + PREFIX=\$(DESTDIR)/usr + CONFDIR=\$(DESTDIR)/etc/munin + DOCDIR=${T}/useless/doc + MANDIR=\$(PREFIX)/share/man + LIBDIR=\$(PREFIX)/libexec/munin + HTMLDIR=\$(DESTDIR)/var/www/localhost/htdocs/munin + CGIDIR=${cgidir} + CGITMPDIR=\$(DESTDIR)/var/cache/munin-cgi + CGIUSER=${cgiuser} + DBDIR=\$(DESTDIR)/var/lib/munin + DBDIRNODE=\$(DESTDIR)/var/lib/munin-node + SPOOLDIR=\$(DESTDIR)/var/spool/munin-async + LOGDIR=\$(DESTDIR)/var/log/munin + PERLLIB=\$(DESTDIR)$(perl -V:vendorlib | cut -d"'" -f2) + JCVALID=$(usex java yes no) + STATEDIR=\$(DESTDIR)/run/munin + EOF +} + +# parallel make and install need to be fixed before, and I haven't +# gotten around to do so yet. +src_compile() { + emake -j1 + use doc && emake -C doc html +} + +src_test() { + if [[ ${EUID} == 0 ]]; then + eerror "You cannot run tests as root." + eerror "Please enable FEATURES=userpriv before proceeding." + return 1 + fi + + local testtargets="test-common test-node test-plugins" + use minimal || testtargets+=" test-master" + + LC_ALL=C emake -j1 ${testtargets} +} + +src_install() { + local dirs=" + /var/log/munin + /var/lib/munin/plugin-state + /var/lib/munin-node/plugin-state + /var/www/localhost/htdocs/munin + /etc/munin/plugin-conf.d + /etc/munin/plugins" + use minimal || dirs+=" /etc/munin/munin-conf.d/" + + keepdir ${dirs} + fowners munin:munin ${dirs} + + # parallel install doesn't work and it's also pointless to have this + # run in parallel for now (because it uses internal loops). + emake -j1 CHOWN=true DESTDIR="${D}" $(usex minimal "install-minimal install-man" install) + + # we remove /run from the install, as it's not the package's to deal + # with. + rm -rf "${D}"/run || die + + # remove the plugins for non-Gentoo package managers; use -f so that + # it doesn't fail when installing on non-Linux platforms. + rm -f "${D}"/usr/libexec/munin/plugins/{apt{,_all},yum} || die + + insinto /etc/munin/plugin-conf.d/ + newins "${FILESDIR}"/${PN}-1.3.2-plugins.conf munin-node + + newinitd "${FILESDIR}"/munin-node_init.d_2.0.19 munin-node + newconfd "${FILESDIR}"/munin-node_conf.d_1.4.6-r2 munin-node + + newinitd "${FILESDIR}"/munin-asyncd.init.2 munin-asyncd + + dodir /usr/lib/tmpfiles.d + cat > "${D}"/usr/lib/tmpfiles.d/${CATEGORY}:${PN}:${SLOT}.conf <<- EOF + d /run/munin 0700 munin munin - - + EOF + + systemd_dounit "${FILESDIR}"/munin-async.service + systemd_dounit "${FILESDIR}"/munin-graph.{service,socket} + systemd_dounit "${FILESDIR}"/munin-html.{service,socket} + systemd_dounit "${FILESDIR}"/munin-node.service + + cat >> "${T}"/munin.env <<- EOF + CONFIG_PROTECT=/var/spool/munin-async/.ssh + EOF + newenvd "${T}"/munin.env 50munin + + dodoc README ChangeLog INSTALL + if use doc; then + cd "${S}"/doc/_build/html || die + docinto html + dodoc -r * + cd "${S}" || die + fi + + dodir /etc/logrotate.d/ + sed -e "s:@CGIUSER@:$(usex apache2 apache munin):g" \ + "${FILESDIR}"/logrotate.d-munin.3 > "${D}"/etc/logrotate.d/munin + + dosym ipmi_ /usr/libexec/munin/plugins/ipmi_sensor_ + + if use syslog; then + sed -i -e '/log_file/s| .*| Sys::Syslog|' \ + "${D}"/etc/munin/munin-node.conf || die + fi + + # Use a simpler pid file to avoid trouble with /run in tmpfs. The + # munin-node service is ran as user root, and only later drops + # privileges. + sed -i -e 's:/run/munin/munin-node.pid:/run/munin-node.pid:' \ + "${D}"/etc/munin/munin-node.conf || die + + keepdir /var/spool/munin-async/.ssh + touch "${D}"/var/spool/munin-async/.ssh/authorized_keys + fowners munin-async:munin /var/spool/munin-async{,/.ssh/{,authorized_keys}} + fperms 0750 /var/spool/munin-async{,/.ssh} + fperms 0600 /var/spool/munin-async/.ssh/authorized_keys + + if use minimal; then + # This requires the presence of munin-update, which is part of + # the non-minimal install... + rm "${D}"/usr/libexec/munin/plugins/munin_stats + else + # remove font files so that we don't have to keep them around + rm "${D}"/usr/libexec/${PN}/*.ttf || die + + if use cgi; then + sed -i -e '/#graph_strategy cgi/s:^#::' "${D}"/etc/munin/munin.conf || die + + keepdir /var/cache/munin-cgi + touch "${D}"/var/log/munin/munin-cgi-{graph,html}.log + fowners $(usex apache2 apache munin) \ + /var/cache/munin-cgi \ + /var/log/munin/munin-cgi-{graph,html}.log + + if use apache2; then + insinto /etc/apache2/vhosts.d + newins "${FILESDIR}"/munin.apache.include munin.include + newins "${FILESDIR}"/munin.apache.include-2.4 munin-2.4.include + fi + else + sed \ + -e '/#graph_strategy cgi/s:#graph_strategy cgi:graph_strategy cron:' \ + -i "${D}"/etc/munin/munin.conf || die + fi + + keepdir /var/lib/munin/.ssh + cat >> "${D}"/var/lib/munin/.ssh/config <<- EOF + IdentityFile /var/lib/munin/.ssh/id_ecdsa + IdentityFile /var/lib/munin/.ssh/id_rsa + EOF + + fowners munin:munin /var/lib/munin/.ssh/{,config} + fperms go-rwx /var/lib/munin/.ssh/{,config} + + dodir /usr/share/${PN} + cat >> "${D}"/usr/share/${PN}/crontab <<- EOF + # Force the shell to bash + SHELL=/bin/bash + # Mail reports to root@, not munin@ + MAILTO=root + + # This runs the munin task every 5 minutes. + */5 * * * * /usr/bin/munin-cron + + # Alternatively, this route works differently + # Update once a minute (for busy sites) + #*/1 * * * * /usr/libexec/munin/munin-update + ## Check for limit excess every 2 minutes + #*/2 * * * * /usr/libexec/munin/munin-limits + ## Update graphs every 5 minutes + #*/5 * * * * nice /usr/libexec/munin/munin-graph + ## Update HTML pages every 15 minutes + #*/15 * * * * nice /usr/libexec/munin/munin-html + EOF + + cat >> "${D}"/usr/share/${PN}/fcrontab <<- EOF + # Mail reports to root@, not munin@, only execute one at a time + !mailto(root),serial(true) + + # This runs the munin task every 5 minutes. + @ 5 /usr/bin/munin-cron + + # Alternatively, this route works differently + # Update once a minute (for busy sites) + #@ 1 /usr/libexec/munin/munin-update + ## Check for limit excess every 2 minutes + #@ 2 /usr/libexec/munin/munin-limits + ## Update graphs every 5 minutes + #@ 5 nice /usr/libexec/munin/munin-graph + ## Update HTML pages every 15 minutes + #@ 15 nice /usr/libexec/munin/munin-html + EOF + + # remove .htaccess file + find "${D}" -name .htaccess -delete || die + fi +} + +pkg_config() { + if use minimal; then + einfo "Nothing to do." + return 0 + fi + + einfo "Press enter to install the default crontab for the munin master" + einfo "installation from /usr/share/${PN}/f?crontab" + einfo "If you have a large site, you may wish to customize it." + read + + ebegin "Setting up cron ..." + if has_version sys-process/fcron; then + fcrontab - -u munin < /usr/share/${PN}/fcrontab + else + # dcron is very fussy about syntax + # the following is the only form that works in BOTH dcron and vixie-cron + crontab - -u munin < /usr/share/${PN}/crontab + fi + eend $? + + einfo "Press enter to set up the SSH keys used for SSH transport" + read + + # generate one rsa (for legacy) and one ecdsa (for new systems) + ssh-keygen -t rsa \ + -f /var/lib/munin/.ssh/id_rsa -N '' \ + -C "created by portage for ${CATEGORY}/${PN}" || die + ssh-keygen -t ecdsa \ + -f /var/lib/munin/.ssh/id_ecdsa -N '' \ + -C "created by portage for ${CATEGORY}/${PN}" || die + chown -R munin:munin /var/lib/munin/.ssh || die + chmod 0600 /var/lib/munin/.ssh/id_{rsa,ecdsa} || die + + einfo "Your public keys are available in " + einfo " /var/lib/munin/.ssh/id_rsa.pub" + einfo " /var/lib/munin/.ssh/id_ecdsa.pub" + einfo "and follows for convenience" + echo + cat /var/lib/munin/.ssh/id_*.pub +} + +pkg_postinst() { + elog "Please follow the munin documentation to set up the plugins you" + elog "need, afterwards start munin-node." + elog "" + elog "To make use of munin-async, make sure to set up the corresponding" + elog "SSH key in /var/lib/munin-async/.ssh/authorized_keys" + elog "" + if ! use minimal; then + elog "Please run" + elog " emerge --config net-analyzer/munin" + elog "to automatically configure munin's cronjobs as well as generate" + elog "passwordless SSH keys to be used with munin-async." + fi + elog "" + elog "Further information about setting up Munin in Gentoo can be found" + elog "in the Gentoo Wiki: https://wiki.gentoo.org/wiki/Munin" + + if use cgi; then + chown $(usex apache2 apache munin) \ + "${ROOT}"/var/cache/munin-cgi \ + "${ROOT}"/var/log/munin/munin-cgi-{graph,html}.log + + if use apache2; then + elog "To use Munin with CGI you should include /etc/apache2/vhosts.d/munin.include" + elog "or /etc/apache2/vhosts.d/munin-2.4.include (for Apache 2.4) from the virtual" + elog "host you want it to be served." + elog "If you want to enable CGI-based HTML as well, you have to add to" + elog "/etc/conf.d/apache2 the option -D MUNIN_HTML_CGI." + else + elog "Effective CGI support has just been added in 2.0.7-r6." + elog "Documentation on how to use it is still sparse." + fi + fi + + # we create this here as we don't want Portage to check /run + # symlinks but we still need this to be present before the reboot. + if ! use minimal && ! [[ -d "${ROOT}"/run/munin ]]; then + mkdir "${ROOT}"/run/munin + chown munin:munin "${ROOT}"/run/munin + chmod 0700 "${ROOT}"/run/munin + fi +} diff --git a/net-analyzer/nagios-check_dnssec/Manifest b/net-analyzer/nagios-check_dnssec/Manifest new file mode 100644 index 000000000000..22e21ce05ee7 --- /dev/null +++ b/net-analyzer/nagios-check_dnssec/Manifest @@ -0,0 +1 @@ +DIST check_dnssec-0.1_p28.tar.bz2 73458 BLAKE2B 0b3ae3e051734924b89160a67a84b3cbe3f5db0ee036780b4efcbd7857a18a6ac6b180dddab7475be079d5fe902b8eeed4c6acb021b31c70daef69632ff3ecaf SHA512 e99b155f38963858750443f3cf834e4505f871cb06bbfabf07ade1b333b18507b9364e7250118ed5ee4a2134e2a45ee68b6386a9f3b0cb30a0bb02a4a6e263fa diff --git a/net-analyzer/nagios-check_dnssec/metadata.xml b/net-analyzer/nagios-check_dnssec/metadata.xml new file mode 100644 index 000000000000..f339e98e1a01 --- /dev/null +++ b/net-analyzer/nagios-check_dnssec/metadata.xml @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>sysadmin@gentoo.org</email> + <name>Gentoo Sysadmin Project</name> + </maintainer> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/nagios-check_dnssec/nagios-check_dnssec-0.1_p28.ebuild b/net-analyzer/nagios-check_dnssec/nagios-check_dnssec-0.1_p28.ebuild new file mode 100644 index 000000000000..ed5fc8bb0488 --- /dev/null +++ b/net-analyzer/nagios-check_dnssec/nagios-check_dnssec-0.1_p28.ebuild @@ -0,0 +1,32 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit autotools + +MY_P=${P/nagios-/} + +DESCRIPTION="check_dnssec is a set of Nagios plugins to monitor DNSSEC services" +HOMEPAGE="https://svn.durchmesser.ch/trac/check_dnssec" +# No upstream tarballs, tagged releaess in SVN only. +SRC_URI="mirror://gentoo/${MY_P}.tar.bz2" + +LICENSE="GPL-3" +SLOT="0" +KEYWORDS="~amd64 ~x86" + +DEPEND=" + || ( + net-analyzer/nagios-plugins + net-analyzer/monitoring-plugins + ) + net-libs/ldns" +RDEPEND="${DEPEND}" + +S="${WORKDIR}/${MY_P}" + +src_prepare() { + default + eautoreconf +} diff --git a/net-analyzer/nagios-check_fail2ban/Manifest b/net-analyzer/nagios-check_fail2ban/Manifest new file mode 100644 index 000000000000..7c3c26d68eab --- /dev/null +++ b/net-analyzer/nagios-check_fail2ban/Manifest @@ -0,0 +1 @@ +DIST nagios-check_fail2ban-3.tar.gz 1848 BLAKE2B 61c1683bfa1e41ea27caa58ce9491d531751d96c4646e1d618a0f92bef2fe65b31c1d4bcebfe9c9c0b2498f7ad810d4dcabaf723e34bbde7e229020789e7b538 SHA512 a032042f8588575ef70c6644c5d385a18b25b89d71b067cdfe78230e5e53c2fb5bf88de1d97aa9411bfec00b213f6e1eae800e9545f0d8d4bad4e3c878927f9c diff --git a/net-analyzer/nagios-check_fail2ban/metadata.xml b/net-analyzer/nagios-check_fail2ban/metadata.xml new file mode 100644 index 000000000000..5fa680e3160a --- /dev/null +++ b/net-analyzer/nagios-check_fail2ban/metadata.xml @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<!-- maintainer-needed --> + <upstream> + <remote-id type="github">hollow/check_fail2ban</remote-id> + </upstream> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/nagios-check_fail2ban/nagios-check_fail2ban-3.ebuild b/net-analyzer/nagios-check_fail2ban/nagios-check_fail2ban-3.ebuild new file mode 100644 index 000000000000..ac86c2830797 --- /dev/null +++ b/net-analyzer/nagios-check_fail2ban/nagios-check_fail2ban-3.ebuild @@ -0,0 +1,32 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +inherit multilib autotools + +GITHUB_AUTHOR="hollow" +GITHUB_PROJECT="check_fail2ban" +GITHUB_COMMIT="c554837" + +DESCRIPTION="A nagios plugin for checking the fail2ban daemon" +HOMEPAGE="https://github.com/hollow/check_fail2ban" +SRC_URI="https://nodeload.github.com/${GITHUB_AUTHOR}/${GITHUB_PROJECT}/tarball/v${PV} -> ${P}.tar.gz" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="" + +DEPEND="|| ( >=net-analyzer/nagios-plugins-1.4.13-r1 >=net-analyzer/monitoring-plugins-2 )" +RDEPEND="${DEPEND}" + +S="${WORKDIR}"/${GITHUB_AUTHOR}-${GITHUB_PROJECT}-${GITHUB_COMMIT} + +src_prepare() { + eautoreconf +} + +src_install() { + emake DESTDIR="${D}" install +} diff --git a/net-analyzer/nagios-check_glsa2/Manifest b/net-analyzer/nagios-check_glsa2/Manifest new file mode 100644 index 000000000000..71b186e00c47 --- /dev/null +++ b/net-analyzer/nagios-check_glsa2/Manifest @@ -0,0 +1 @@ +DIST check_glsa2-20120930.tar.xz 1980 BLAKE2B 6a5e3541b23fe43daba37ccac085ca1079dc1fedbfa87a439a433d6445bd039090a336765bde0c1b2fc5fad464d0f4e175e4a7e90ca65d6bd56d082a3f1cac88 SHA512 ecf7f6f119c8a73bf672eddc64374ed07c03720ec97b51f7e0bd779b3ba2c4ceab87c1c3cbbe38b1f0224234a9fb2af7bd156f9073a8a0aa8da1458988a2bc65 diff --git a/net-analyzer/nagios-check_glsa2/metadata.xml b/net-analyzer/nagios-check_glsa2/metadata.xml new file mode 100644 index 000000000000..5d00ef73918c --- /dev/null +++ b/net-analyzer/nagios-check_glsa2/metadata.xml @@ -0,0 +1,12 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>sysadmin@gentoo.org</email> + <name>Gentoo Sysadmin Project</name> + </maintainer> + <upstream> + <remote-id type="github">craig/check_glsa2</remote-id> + </upstream> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/nagios-check_glsa2/nagios-check_glsa2-20120930-r1.ebuild b/net-analyzer/nagios-check_glsa2/nagios-check_glsa2-20120930-r1.ebuild new file mode 100644 index 000000000000..5b6ab2dd057a --- /dev/null +++ b/net-analyzer/nagios-check_glsa2/nagios-check_glsa2-20120930-r1.ebuild @@ -0,0 +1,42 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=4 + +inherit multilib user + +DESCRIPTION="Nagios check script for GLSAs (Gentoo Linux Security Advisories)" +HOMEPAGE="https://github.com/craig/check_glsa2" + +MY_PN="${PN/nagios-/}" +MY_P="${MY_PN}-${PV}" +S="${WORKDIR}/${MY_P}" + +SRC_URI="https://dev.gentoo.org/~flameeyes/${MY_PN}/${MY_P}.tar.xz" +LICENSE="GPL-2 BSD-2" +SLOT="0" + +KEYWORDS="amd64" + +RDEPEND="app-portage/gentoolkit" +DEPEND="" + +pkg_setup() { + enewgroup nagios + enewuser nagios -1 /bin/bash /dev/null nagios +} + +src_prepare() { + sed -i -e '/CACHEDIR=/s:=.*:=/var/cache/check_glsa2:' ${MY_PN}_cached.sh || die +} + +src_install() { + local nagiosplugindir=/usr/$(get_libdir)/nagios/plugins + exeinto ${nagiosplugindir} + doexe *.sh + + dodoc README + + diropts -o nagios -g nagios + keepdir /var/cache/${MY_PN} +} diff --git a/net-analyzer/nagios-check_ipmi_sensor/Manifest b/net-analyzer/nagios-check_ipmi_sensor/Manifest new file mode 100644 index 000000000000..d625aa728559 --- /dev/null +++ b/net-analyzer/nagios-check_ipmi_sensor/Manifest @@ -0,0 +1,2 @@ +DIST check_ipmi_sensor_v3-14e6586.tgz 21836 BLAKE2B f56a44c5afd4583e64bd0e938aa03ec51a659a5f18c01685e3e03115f46ceda62ae899be677b1ba993cc0543c8cb775c9cc0c35c4b862b678a873e57e0361d21 SHA512 ac0744348e4d68459326396ee7fcc98bb0c3d2115fcf9724c7391f6f8dc9c0e2bb89a832822424b415acc3062201fb67d7eaceb4b9f2f41526e5fe8823187a0e +DIST check_ipmi_sensor_v3-8120430.tgz 20620 BLAKE2B 2542c4320498700362e8e7c1cfe0d00d98e4894e987aac002f0e2db499fdab4c27b33ff587349a836ae18d7b89939a96f6a66484b46486caa0d548c3e794d1c3 SHA512 89b3fd7ae2d523e1510c528d44d03ad9af5bc174bb325393f50a4a95380c996867b4502b55f38712515f556fe0f2019e15f6800ca1db00a9bbbcef655f1fd845 diff --git a/net-analyzer/nagios-check_ipmi_sensor/metadata.xml b/net-analyzer/nagios-check_ipmi_sensor/metadata.xml new file mode 100644 index 000000000000..fbb3333ba141 --- /dev/null +++ b/net-analyzer/nagios-check_ipmi_sensor/metadata.xml @@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>idl0r@gentoo.org</email> + <name>Christian Ruppert</name> + </maintainer> + <maintainer type="project"> + <email>sysadmin@gentoo.org</email> + <name>Gentoo Sysadmin Project</name> + </maintainer> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/nagios-check_ipmi_sensor/nagios-check_ipmi_sensor-3.2.ebuild b/net-analyzer/nagios-check_ipmi_sensor/nagios-check_ipmi_sensor-3.2.ebuild new file mode 100644 index 000000000000..331c378057a1 --- /dev/null +++ b/net-analyzer/nagios-check_ipmi_sensor/nagios-check_ipmi_sensor-3.2.ebuild @@ -0,0 +1,32 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +inherit multilib versionator + +MY_COMMIT="8120430" +MY_P="${PN#nagios-}_v$(get_major_version $PV)-${MY_COMMIT}" + +DESCRIPTION="IPMI Sensor Monitoring Plugin for Nagios/Icinga" +HOMEPAGE="http://www.thomas-krenn.com/en/oss/ipmi-plugin/" +SRC_URI="http://git.thomas-krenn.com/?p=check_ipmi_sensor_v3.git;a=snapshot;h=${MY_COMMIT};sf=tgz -> ${MY_P}.tgz" + +LICENSE="GPL-3" +SLOT="0" +KEYWORDS="amd64 hppa x86" +IUSE="" + +DEPEND="" +RDEPEND="dev-lang/perl + dev-perl/IPC-Run + sys-libs/freeipmi" + +S="${WORKDIR}/${MY_P}" + +src_install() { + exeinto /usr/$(get_libdir)/nagios/plugins + doexe check_ipmi_sensor + + dodoc changelog.txt +} diff --git a/net-analyzer/nagios-check_ipmi_sensor/nagios-check_ipmi_sensor-3.6.ebuild b/net-analyzer/nagios-check_ipmi_sensor/nagios-check_ipmi_sensor-3.6.ebuild new file mode 100644 index 000000000000..d549df34bd51 --- /dev/null +++ b/net-analyzer/nagios-check_ipmi_sensor/nagios-check_ipmi_sensor-3.6.ebuild @@ -0,0 +1,32 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +inherit multilib versionator + +MY_COMMIT="14e6586" +MY_P="${PN#nagios-}_v$(get_major_version $PV)-${MY_COMMIT}" + +DESCRIPTION="IPMI Sensor Monitoring Plugin for Nagios/Icinga" +HOMEPAGE="http://www.thomas-krenn.com/en/oss/ipmi-plugin/" +SRC_URI="http://git.thomas-krenn.com/?p=check_ipmi_sensor_v3.git;a=snapshot;h=${MY_COMMIT};sf=tgz -> ${MY_P}.tgz" + +LICENSE="GPL-3" +SLOT="0" +KEYWORDS="~amd64 ~hppa ~x86" +IUSE="" + +DEPEND="" +RDEPEND="dev-lang/perl + dev-perl/IPC-Run + sys-libs/freeipmi" + +S="${WORKDIR}/${MY_P}" + +src_install() { + exeinto /usr/$(get_libdir)/nagios/plugins + doexe check_ipmi_sensor + + dodoc changelog.txt +} diff --git a/net-analyzer/nagios-check_linux_bonding/Manifest b/net-analyzer/nagios-check_linux_bonding/Manifest new file mode 100644 index 000000000000..b57e8c706be7 --- /dev/null +++ b/net-analyzer/nagios-check_linux_bonding/Manifest @@ -0,0 +1 @@ +DIST check_linux_bonding-1.4.tar.gz 24670 BLAKE2B 6f136043fdcc74f677963ad4798ea18a8f813c3bf6cf1d00f6649d72dfc7d953c01a43bd3050758a8461f255ce3a9d3ddbdd1bcb29de316ea6438f20409ce699 SHA512 2b1e11007680accd8667ceb8710c7a7448766fd0c5aa3be60a34209f1b25892e7fecc46f9fc5e7cc0d4776f68cc17f8db8d8f2758695c82045a5832e8a4c7e81 diff --git a/net-analyzer/nagios-check_linux_bonding/metadata.xml b/net-analyzer/nagios-check_linux_bonding/metadata.xml new file mode 100644 index 000000000000..3d4429370ed8 --- /dev/null +++ b/net-analyzer/nagios-check_linux_bonding/metadata.xml @@ -0,0 +1,6 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <!-- maintainer-needed --> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/nagios-check_linux_bonding/nagios-check_linux_bonding-1.4.ebuild b/net-analyzer/nagios-check_linux_bonding/nagios-check_linux_bonding-1.4.ebuild new file mode 100644 index 000000000000..f5b6af3adc6b --- /dev/null +++ b/net-analyzer/nagios-check_linux_bonding/nagios-check_linux_bonding-1.4.ebuild @@ -0,0 +1,34 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +inherit multilib + +MY_P=${P/nagios-/} + +DESCRIPTION="Nagios plugin to monitor bonding status of network interfaces" +HOMEPAGE="http://folk.uio.no/trondham/software/check_linux_bonding.html" +SRC_URI="http://folk.uio.no/trondham/software/files/${MY_P}.tar.gz" + +LICENSE="GPL-3" +SLOT="0" +KEYWORDS="amd64 x86" +IUSE="" + +RDEPEND="dev-lang/perl" +DEPEND="${RDEPEND}" + +S="${WORKDIR}/${MY_P}" + +src_install() { + default + + local nagiosplugindir=/usr/$(get_libdir)/nagios/plugins + dodir "${nagiosplugindir}" + exeinto ${nagiosplugindir} + doexe check_linux_bonding + + dodoc CHANGES + doman man/check_linux_bonding.8 +} diff --git a/net-analyzer/nagios-check_logfiles/Manifest b/net-analyzer/nagios-check_logfiles/Manifest new file mode 100644 index 000000000000..cec2e146f4c3 --- /dev/null +++ b/net-analyzer/nagios-check_logfiles/Manifest @@ -0,0 +1 @@ +DIST nagios-check_logfiles-3.7.6.3.tar.gz 238683 BLAKE2B c2bd47a13263ac76c1bbced7a1410416c07ef35b39ea60bbf6037de3c10dd00df30a215f461270501240d5eb35e2b687fd5590d291028d7975c15470c06177a4 SHA512 2f72d571bfc0815e12b5c9a6e178b7b9b6e58d69e2d1a3efc560dd6b7bfd3d04a705d15e93069959611be1981941866e8775ee7d67c5dbf3983a155ab2ec3c91 diff --git a/net-analyzer/nagios-check_logfiles/metadata.xml b/net-analyzer/nagios-check_logfiles/metadata.xml new file mode 100644 index 000000000000..e5f63aaab64b --- /dev/null +++ b/net-analyzer/nagios-check_logfiles/metadata.xml @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>sysadmin@gentoo.org</email> + <name>Gentoo Sysadmin Project</name> + </maintainer> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/nagios-check_logfiles/nagios-check_logfiles-3.7.6.3.ebuild b/net-analyzer/nagios-check_logfiles/nagios-check_logfiles-3.7.6.3.ebuild new file mode 100644 index 000000000000..bf4835955eaa --- /dev/null +++ b/net-analyzer/nagios-check_logfiles/nagios-check_logfiles-3.7.6.3.ebuild @@ -0,0 +1,25 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +DESCRIPTION="A nagios plugin for checking logfiles" +HOMEPAGE="https://labs.consol.de/nagios/check_logfiles/index.html" + +MY_P=${P/nagios-/} + +SRC_URI="https://labs.consol.de/assets/downloads/nagios/${MY_P}.tar.gz -> ${P}.tar.gz" +LICENSE="GPL-3" +SLOT="0" + +KEYWORDS="~alpha amd64 ~ppc ppc64 ~sparc x86" + +RDEPEND="|| ( >=net-analyzer/nagios-plugins-1.4.13-r1 >=net-analyzer/monitoring-plugins-2 )" + +S="${WORKDIR}/${MY_P}" + +src_configure() { + econf \ + --libexecdir="${EPREFIX}/usr/$(get_libdir)/nagios/plugins" \ + --sysconfdir="${EPREFIX}/etc/nagios" +} diff --git a/net-analyzer/nagios-check_multiple/Manifest b/net-analyzer/nagios-check_multiple/Manifest new file mode 100644 index 000000000000..3ed8c1378cb5 --- /dev/null +++ b/net-analyzer/nagios-check_multiple/Manifest @@ -0,0 +1 @@ +DIST nagios-check_multiple-0.0.1.tar.gz 9376 BLAKE2B 2db464b7edd4aa704560a3f16a5d70e4cdef7cd35284e3c679f3e10e5ef6eaaba19dc361efbb10a77f87c14726439869e4b415fe7e393a1d7ac23233b3bfa66a SHA512 a75bcd821afc6daca612f42c552fb965a3068dc04a94df41ff41d36928c764d44bcf72e1bd6d776bf4b443c73fc3946c0a91443a562019fcd1b6e8687d0ebcd2 diff --git a/net-analyzer/nagios-check_multiple/metadata.xml b/net-analyzer/nagios-check_multiple/metadata.xml new file mode 100644 index 000000000000..36a8873092a0 --- /dev/null +++ b/net-analyzer/nagios-check_multiple/metadata.xml @@ -0,0 +1,12 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>mjo@gentoo.org</email> + <name>Michael Orlitzky</name> + </maintainer> + <upstream> + <remote-id type="github">clarkbox/check_multiple</remote-id> + </upstream> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/nagios-check_multiple/nagios-check_multiple-0.0.1.ebuild b/net-analyzer/nagios-check_multiple/nagios-check_multiple-0.0.1.ebuild new file mode 100644 index 000000000000..cb417ce910b5 --- /dev/null +++ b/net-analyzer/nagios-check_multiple/nagios-check_multiple-0.0.1.ebuild @@ -0,0 +1,46 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +PYTHON_COMPAT=( python{3_6,3_7,3_8} ) +DISTUTILS_USE_SETUPTOOLS=no +inherit distutils-r1 + +MY_PN="check_multiple" +DESCRIPTION="A Nagios plugin to execute multiple checks in parallel" +HOMEPAGE="https://github.com/clarkbox/check_multiple" +SRC_URI="https://github.com/clarkbox/check_multiple/archive/v${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="MIT" +SLOT="0" +KEYWORDS="~amd64" +IUSE="test" +RESTRICT="!test? ( test )" + +S="${WORKDIR}/${MY_PN}-${PV}" + +src_install() { + distutils-r1_src_install + + local nagiosplugindir="/usr/$(get_libdir)/nagios/plugins" + dodir "${nagiosplugindir}" + + # Create a symlink from the nagios plugin directory to the /usr/bin + # location. The "binary" in /usr/bin should also be a symlink, since + # the python machinery allows the user to switch out the + # interpreter. We don't want to mess with any of that, so we just + # point to whatever the system would use if the user executed + # ${MY_PN}. + # + # The relative symlink is preferred so that if the package is + # installed e.g. while in a chroot, the symlink will never point + # outside of that chroot. + # + dosym "../../../bin/${MY_PN}" "${nagiosplugindir}/${MY_PN}" +} + +python_test() { + "${EPYTHON}" -m unittest -v lib/check_multiple/check_multiple.py \ + || die "test suite failed" +} diff --git a/net-analyzer/nagios-check_mysql_health/Manifest b/net-analyzer/nagios-check_mysql_health/Manifest new file mode 100644 index 000000000000..92c845762d58 --- /dev/null +++ b/net-analyzer/nagios-check_mysql_health/Manifest @@ -0,0 +1 @@ +DIST check_mysql_health-2.2.2.tar.gz 140250 BLAKE2B 7bdbf5398ed2219ec9a254906c2e0b38160fe8914c218388a4c9f06c401636e500290dea42b420da7881e6dd35116e0f5b54bb448b304c84714bdee610c74d92 SHA512 027e47747aba524d8c7d168f6c440271434db2e152e59821eff06449d98919ab343a7840ecf73a1fcbc864799d6d3094088bb06f6b36b16989a5184676ae2628 diff --git a/net-analyzer/nagios-check_mysql_health/metadata.xml b/net-analyzer/nagios-check_mysql_health/metadata.xml new file mode 100644 index 000000000000..2096d3f8f13b --- /dev/null +++ b/net-analyzer/nagios-check_mysql_health/metadata.xml @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>mjo@gentoo.org</email> + <name>Michael Orlitzky</name> + </maintainer> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/nagios-check_mysql_health/nagios-check_mysql_health-2.2.2.ebuild b/net-analyzer/nagios-check_mysql_health/nagios-check_mysql_health-2.2.2.ebuild new file mode 100644 index 000000000000..94445a4c903e --- /dev/null +++ b/net-analyzer/nagios-check_mysql_health/nagios-check_mysql_health-2.2.2.ebuild @@ -0,0 +1,39 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +MY_PN="${PN#nagios-}" +MY_P="${MY_PN}-${PV}" + +DESCRIPTION="A nagios plugin for checking MySQL server health" +HOMEPAGE="https://labs.consol.de/nagios/check_mysql_health/" +SRC_URI="https://labs.consol.de/assets/downloads/nagios/${MY_P}.tar.gz" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="amd64 x86" +IUSE="" + +# Found by grepping for "use " in the built +# plugins-scripts/check_mysql_health. +RDEPEND="dev-perl/DBD-mysql + dev-perl/DBI + virtual/perl-Data-Dumper + virtual/perl-File-Temp + virtual/perl-Net-Ping + virtual/perl-Time-HiRes" + +S="${WORKDIR}/${MY_P}" + +src_configure() { + # Should match net-analyzer/{monitoring,nagios}-plugins. + econf --libexecdir="/usr/$(get_libdir)/nagios/plugins" +} + +# Here we should have a pkg_preinst() that creates the nagios user/group +# (using the same command from e.g. net-analyzer/nagios-plugins). But +# right now, the build system for check_mysql_health has a bug: it +# doesn't use the configured user (INSTALL_OPTIONS aren't passed to +# /usr/bin/install), so it's pointless. Don't forget to inherit +# user.eclass! diff --git a/net-analyzer/nagios-check_pidfile/Manifest b/net-analyzer/nagios-check_pidfile/Manifest new file mode 100644 index 000000000000..00126e06f315 --- /dev/null +++ b/net-analyzer/nagios-check_pidfile/Manifest @@ -0,0 +1 @@ +DIST nagios-check_pidfile-1.tar.gz 2137 BLAKE2B bb0b7239ab9dfb4acb3a40f16cc5537605c60256f6c1efcddc9b6001dffc71f7e7ae8f58b6cbb568afd71200e672e3b348ce3b9c360407b731d3f40ab81fa514 SHA512 a24493a72f6d9fb4daf606a131a3a6cafe6085b1d47f7b0f7944642929e86b5d29cf46fb28c20b7683ea5b9a99beb93bb5f32a08542e2e9af613e4cc62197ffe diff --git a/net-analyzer/nagios-check_pidfile/metadata.xml b/net-analyzer/nagios-check_pidfile/metadata.xml new file mode 100644 index 000000000000..90369321eb23 --- /dev/null +++ b/net-analyzer/nagios-check_pidfile/metadata.xml @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<!-- maintainer-needed --> + <upstream> + <remote-id type="github">hollow/check_pidfile</remote-id> + </upstream> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/nagios-check_pidfile/nagios-check_pidfile-1.ebuild b/net-analyzer/nagios-check_pidfile/nagios-check_pidfile-1.ebuild new file mode 100644 index 000000000000..0c557fdb768e --- /dev/null +++ b/net-analyzer/nagios-check_pidfile/nagios-check_pidfile-1.ebuild @@ -0,0 +1,28 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +inherit autotools + +DESCRIPTION="A nagios plugin for checking daemons via pidfiles" +HOMEPAGE="https://github.com/hollow/check_pidfile" +SRC_URI="https://github.com/hollow/check_pidfile/archive/v${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="" + +DEPEND="|| ( >=net-analyzer/nagios-plugins-1.4.13-r1 net-analyzer/monitoring-plugins )" +RDEPEND="${DEPEND}" + +S="${WORKDIR}"/check_pidfile-${PV} + +src_prepare() { + eautoreconf +} + +src_install() { + emake DESTDIR="${D}" install +} diff --git a/net-analyzer/nagios-check_rbl/Manifest b/net-analyzer/nagios-check_rbl/Manifest new file mode 100644 index 000000000000..1b3800e794d7 --- /dev/null +++ b/net-analyzer/nagios-check_rbl/Manifest @@ -0,0 +1 @@ +DIST check_rbl-1.4.1.tar.gz 47585 BLAKE2B 24979d1579ef46f6d0626700bb8b9aa3f3acd4b422398ecbfa98909248fd6ffe61a763e377e7942d3078d8b91488f3fc0e2ab25f7c4821bcfa5cde08d000bd5c SHA512 3023aab6ba42dec46cb93eb2ef15e1998a1b3226bd1f143441e14a4271279ac9b24b85b9fc41a382eb203e5d2846b7f4ea4fe27db99d75b104d9182ea53079cb diff --git a/net-analyzer/nagios-check_rbl/metadata.xml b/net-analyzer/nagios-check_rbl/metadata.xml new file mode 100644 index 000000000000..9bfcfdae8ac1 --- /dev/null +++ b/net-analyzer/nagios-check_rbl/metadata.xml @@ -0,0 +1,16 @@ +<?xml version='1.0' encoding='UTF-8'?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>mjo@gentoo.org</email> + <name>Michael Orlitzky</name> + </maintainer> + <maintainer type="project"> + <email>sysadmin@gentoo.org</email> + <name>Gentoo Sysadmin Project</name> + </maintainer> + <upstream> + <remote-id type="github">matteocorti/check_rbl</remote-id> + </upstream> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/nagios-check_rbl/nagios-check_rbl-1.4.1.ebuild b/net-analyzer/nagios-check_rbl/nagios-check_rbl-1.4.1.ebuild new file mode 100644 index 000000000000..dad8c4b7918b --- /dev/null +++ b/net-analyzer/nagios-check_rbl/nagios-check_rbl-1.4.1.ebuild @@ -0,0 +1,56 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +DESCRIPTION="Monitor whether or not a host is blacklisted" +HOMEPAGE="https://github.com/matteocorti/check_rbl" + +MY_P="${P/nagios-/}" +SRC_URI="https://github.com/matteocorti/check_rbl/releases/download/v${PV}/${MY_P}.tar.gz" + +LICENSE="GPL-3" +SLOT="0" + +KEYWORDS="amd64 hppa sparc x86" +IUSE="" + +# No, this is not redundant -- see bug 627082. +RESTRICT=test + +# The package's INSTALL/Makefile.PL files specify its dependencies. +# +# * Data::Validate::Domain (dev-perl/Data-Validate-Domain) +# * Data::Validate::IP (dev-perl/Data-Validate-IP) +# * IO::Select (dev-lang/perl) +# * Monitoring::Plugin (dev-perl/Monitoring-Plugin) +# * Monitoring::Plugin::Getopt (dev-perl/Monitoring-Plugin) +# * Monitoring::Plugin::Threshold (dev-perl/Monitoring-Plugin) +# * Net::DNS (dev-perl/Net-DNS) +# * Net::IP (dev-perl/Net-IP) +# * Readonly (dev-perl/Readonly) +# +RDEPEND="dev-lang/perl + dev-perl/Data-Validate-Domain + dev-perl/Data-Validate-IP + dev-perl/Monitoring-Plugin + dev-perl/Net-DNS + dev-perl/Net-IP + dev-perl/Readonly" +DEPEND="${RDEPEND}" + +S="${WORKDIR}/${MY_P}" + +src_configure() { + perl Makefile.PL INSTALLDIRS=vendor || die +} + +src_install() { + default + + local nagiosplugindir=/usr/$(get_libdir)/nagios/plugins + + # It's simplest to move this file after it's been installed. + dodir "${nagiosplugindir}" + mv "${D}"/usr/bin/check_rbl "${D}"/"${nagiosplugindir}" || die +} diff --git a/net-analyzer/nagios-core/Manifest b/net-analyzer/nagios-core/Manifest new file mode 100644 index 000000000000..8e5831ec7d2d --- /dev/null +++ b/net-analyzer/nagios-core/Manifest @@ -0,0 +1,2 @@ +DIST nagios-4.4.6.tar.gz 11333414 BLAKE2B b64d34c9267349582cb43500b7b90f7948152b5fd9b28ecb0a376d0255ec9774e693beba9205512294b07dddc4702f37d0f45b3c3fcc6abbf8e8b4d9236d0ace SHA512 6ceb582816ec741439963bde1fe8d85fa3bc4ed3c2238fb818db0c4f4224a4333d153040c11a7f4d783e919c11f9ff45907bdc478504e4155f64a4c575f80550 +DIST nagios-core-gentoo-icons-20141125.tar 40960 BLAKE2B 31c1953e1160c7c7b89606b72b1a80407e4c1b7a7938b40bd1c577cd0c309dd88ca6b775d692a9b846dbf67736537fa9c91e56aa15fdd447769608ca525bff09 SHA512 bf109879cddd6136b76baba55d0b60b2596e37431dcf5ce0905d34a9fa292ebf7e4bde82d9a084362c486e8fac344c76d88f9298b1b85541ed70ffd608493766 diff --git a/net-analyzer/nagios-core/files/99_nagios4-r1.conf b/net-analyzer/nagios-core/files/99_nagios4-r1.conf new file mode 100644 index 000000000000..8d080d5c17b1 --- /dev/null +++ b/net-analyzer/nagios-core/files/99_nagios4-r1.conf @@ -0,0 +1,16 @@ +<IfDefine NAGIOS> + + ScriptAlias /nagios/cgi-bin @CGIBINDIR@ + <Directory "@CGIBINDIR@"> + AllowOverride AuthConfig + Options ExecCGI + Require all granted + </Directory> + + Alias /nagios @WEBDIR@ + <Directory "@WEBDIR@"> + AllowOverride AuthConfig + Require all granted + </Directory> + +</IfDefine> diff --git a/net-analyzer/nagios-core/files/lighttpd_nagios4-r1.conf b/net-analyzer/nagios-core/files/lighttpd_nagios4-r1.conf new file mode 100644 index 000000000000..2653922ddc93 --- /dev/null +++ b/net-analyzer/nagios-core/files/lighttpd_nagios4-r1.conf @@ -0,0 +1,15 @@ +server.modules += ("mod_cgi") +server.modules += ("mod_alias") + +$HTTP["url"] =~ "^/nagios/cgi-bin/" { + dir-listing.activate = "disable" + cgi.assign = ( + ".pl" => "/usr/bin/perl", + ".cgi" => "" + ) +} + +alias.url += ( + "/nagios/cgi-bin" => "@CGIBINDIR@", + "/nagios" => "@WEBDIR@" +) diff --git a/net-analyzer/nagios-core/metadata.xml b/net-analyzer/nagios-core/metadata.xml new file mode 100644 index 000000000000..c535b0b7f335 --- /dev/null +++ b/net-analyzer/nagios-core/metadata.xml @@ -0,0 +1,35 @@ +<?xml version='1.0' encoding='UTF-8'?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>mjo@gentoo.org</email> + <name>Michael Orlitzky</name> + </maintainer> + <maintainer type="project"> + <email>sysadmin@gentoo.org</email> + <name>Gentoo Sysadmin Project</name> + </maintainer> + <longdescription> + Nagios is a host and service monitor designed to inform you of + network problems before your clients, end-users or managers do. It + has been designed to run under the Linux operating system, but + works fine under most *NIX variants as well. The monitoring daemon + runs intermittent checks on hosts and services you specify using + external "plugins" which return status information to Nagios. When + problems are encountered, the daemon can send notifications out to + administrative contacts in a variety of different ways (email, + instant message, SMS, etc.). Current status information, + historical logs, and reports can all be accessed via a web + browser. + </longdescription> + <use> + <flag name="classicui">use the classic web theme</flag> + <flag name="lighttpd">install <pkg>www-servers/lighttpd</pkg> config</flag> + <flag name="web">enable web interface</flag> + </use> + <upstream> + <remote-id type="github">NagiosEnterprises/nagioscore</remote-id> + <remote-id type="sourceforge">nagios</remote-id> + </upstream> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/nagios-core/nagios-core-4.4.6.ebuild b/net-analyzer/nagios-core/nagios-core-4.4.6.ebuild new file mode 100644 index 000000000000..e0fac4bf5ebd --- /dev/null +++ b/net-analyzer/nagios-core/nagios-core-4.4.6.ebuild @@ -0,0 +1,252 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit toolchain-funcs + +MY_P="${PN/-core}-${PV}" +DESCRIPTION="Nagios core - monitoring daemon, web GUI, and documentation" +HOMEPAGE="https://www.nagios.org/" + +# The name of the directory into which our Gentoo icons will be +# extracted, and also the basename of the archive containing it. +GENTOO_ICONS="${PN}-gentoo-icons-20141125" +SRC_URI="mirror://sourceforge/nagios/${MY_P}.tar.gz + web? ( https://dev.gentoo.org/~mjo/distfiles/${GENTOO_ICONS}.tar )" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha amd64 ~arm ~arm64 ppc ppc64 sparc x86" +IUSE="apache2 classicui lighttpd perl +web vim-syntax" + +# In pkg_postinst(), we change the group of the Nagios configuration +# directory to that of the web server user. It can't belong to both +# apache/lighttpd groups at the same time, so we block this combination +# for our own sanity. +# +# This could be made to work, but we would need a better way to allow +# the web user read-only access to Nagios's configuration directory. +# +REQUIRED_USE="apache2? ( !lighttpd )" + +# +# Note, we require one of the apache2 CGI modules: +# +# * mod_cgi (USE=apache2_modules_cgi) +# * mod_cgid (USE=apache2_modules_cgid) +# * mod_fcgid (www-apache/mod_fcgid) +# +# We just don't care /which/ one. And of course PHP supports both CGI +# (USE=cgi) and FastCGI (USE=fpm). We're pretty lenient with the +# dependencies, and expect the user not to do anything /too/ +# stupid. (For example, installing Apache with only FastCGI support, and +# PHP with only CGI support.) +# +# Another annoyance is that the upstream Makefile uses app-arch/unzip to +# extract a snapshot of AngularJS, but that's only needed when USE=web. +# +MOD_ALIAS=apache2_modules_alias + +# The dependencies checked by the configure script. All of these are +# also runtime dependencies; that's why ./configure checks for them. +CONFIGURE_DEPEND="acct-group/nagios + acct-user/nagios + virtual/mailx + perl? ( dev-lang/perl:= )" + +# In addition to the things that the ./configure script checks for, +# we also need to be able to unzip stuff on the build host. +BDEPEND="${CONFIGURE_DEPEND} web? ( app-arch/unzip )" + +# This is linked into /usr/bin/nagios{,tats} +DEPEND="dev-libs/libltdl:0" + +RDEPEND="${CONFIGURE_DEPEND} + ${DEPEND} + web? ( + media-libs/gd[jpeg,png] + lighttpd? ( www-servers/lighttpd[php] ) + apache2? ( + || ( + www-servers/apache[${MOD_ALIAS},apache2_modules_cgi] + www-servers/apache[${MOD_ALIAS},apache2_modules_cgid] + ( www-servers/apache[${MOD_ALIAS}] www-apache/mod_fcgid ) ) + || ( + dev-lang/php:*[apache2] + dev-lang/php:*[cgi] + dev-lang/php:*[fpm] ) + ) + ) + vim-syntax? ( app-vim/nagios-syntax )" + +S="${WORKDIR}/${MY_P}" + +src_configure() { + local myconf + + if use perl; then + myconf="${myconf} --enable-embedded-perl --with-perlcache" + fi + + if use !apache2 && use !lighttpd ; then + myconf="${myconf} --with-command-group=nagios" + else + if use apache2 ; then + myconf="${myconf} --with-command-group=apache" + myconf="${myconf} --with-httpd-conf=/etc/apache2/conf.d" + elif use lighttpd ; then + myconf="${myconf} --with-command-group=lighttpd" + fi + fi + + econf ${myconf} \ + --prefix="${EPREFIX}/usr" \ + --bindir="${EPREFIX}/usr/sbin" \ + --localstatedir="${EPREFIX}/var/lib/nagios" \ + --sysconfdir="${EPREFIX}/etc/nagios" \ + --libexecdir="${EPREFIX}/usr/$(get_libdir)/nagios/plugins" \ + --with-cgibindir="${EPREFIX}/usr/$(get_libdir)/nagios/cgi-bin" \ + --with-webdir="${EPREFIX}/usr/share/nagios/htdocs" + + # The paths in the web server configuration files need to match + # those passed to econf above. + cp "${FILESDIR}/99_nagios4-r1.conf" \ + "${FILESDIR}/lighttpd_nagios4-r1.conf" \ + "${T}/" || die "failed to create copies of web server conf files" + + sed -e "s|@CGIBINDIR@|${EPREFIX}/usr/$(get_libdir)/nagios/cgi-bin|g" \ + -e "s|@WEBDIR@|${EPREFIX}/usr/share/nagios/htdocs|" \ + -i "${T}/99_nagios4-r1.conf" \ + -i "${T}/lighttpd_nagios4-r1.conf" \ + || die "failed to substitute paths into web server conf files" + +} + +src_compile() { + emake CC=$(tc-getCC) nagios + + if use web; then + # Only compile the CGIs/HTML when USE=web is set. + emake CC=$(tc-getCC) DESTDIR="${D}" cgis html + fi +} + +src_install() { + dodoc Changelog CONTRIBUTING.md README.md THANKS UPGRADING + + # There is no way to install the CGIs unstripped from the top-level + # makefile, so descend into base/ here. The empty INSTALL_OPTS + # ensures that root:root: owns the nagios executables. + cd "${S}/base" || die + emake INSTALL_OPTS="" DESTDIR="${D}" install-unstripped + cd "${S}" || die + + # Otherwise this gets installed as 770 and you get "access denied" + # for some reason or other when starting nagios. The permissions + # on nagiostats are just for consistency (these should both get + # fixed upstream). + fperms 775 /usr/sbin/nagios /usr/sbin/nagiostats + + # INSTALL_OPTS are needed for most of install-basic, but we don't + # want them on the LIBEXECDIR, argh. + emake DESTDIR="${D}" install-basic + fowners root:root /usr/$(get_libdir)/nagios/plugins + + # Don't make the configuration owned by the nagios user, because + # then he can edit nagios.cfg and trick nagios into running as root + # and doing his bidding. + emake INSTALL_OPTS="" DESTDIR="${D}" install-config + + # No INSTALL_OPTS used in install-commandmode, thankfully. + emake DESTDIR="${D}" install-commandmode + + # The build system installs these directories, but portage assumes + # that the build system doesn't know what it's doing so we have to + # keepdir them, too. I guess you'll have to manually re-check the + # upstream build system forever to see if this is still necessary. + keepdir /var/lib/nagios{,/archives,/rw,/spool,/spool/checkresults} + + if use web; then + # There is no way to install the CGIs unstripped from the + # top-level makefile, so descend into cgi/ here. The empty + # INSTALL_OPTS ensures that root:root: owns the CGI executables. + cd "${S}/cgi" || die + emake INSTALL_OPTS="" DESTDIR="${D}" install-unstripped + cd "${S}" || die + + # install-html installs the new exfoliation theme + emake INSTALL_OPTS="" DESTDIR="${D}" install-html + + if use classicui; then + # This overwrites the already-installed exfoliation theme + emake INSTALL_OPTS="" DESTDIR="${D}" install-classicui + fi + + # Install cute Gentoo icons (bug #388323), setting their + # owner, group, and mode to match those of the rest of Nagios's + # images. + insinto /usr/share/nagios/htdocs/images/logos + doins "${WORKDIR}/${GENTOO_ICONS}"/*.* + fi + + newinitd startup/openrc-init nagios + + if use web ; then + if use apache2 ; then + # Install the Nagios configuration file for Apache. + insinto "/etc/apache2/modules.d" + newins "${T}/99_nagios4-r1.conf" "99_nagios4.conf" + elif use lighttpd ; then + # Install the Nagios configuration file for Lighttpd. + insinto /etc/lighttpd + newins "${T}/lighttpd_nagios4-r1.conf" nagios.conf + else + ewarn "${CATEGORY}/${PF} only supports apache or lighttpd" + ewarn "out of the box. Since you are not using one of them, you" + ewarn "will have to configure your webserver yourself." + fi + fi +} + +pkg_postinst() { + + if use web; then + if use apache2 || use lighttpd ; then + if use apache2; then + elog "To enable the Nagios web front-end, please edit" + elog "${ROOT}/etc/conf.d/apache2 and add \"-D NAGIOS -D PHP\"" + elog "to APACHE2_OPTS. Then Nagios will be available at," + elog + elif use lighttpd; then + elog "To enable the Nagios web front-end, please add" + elog "'include \"nagios.conf\"' to the lighttpd configuration" + elog "file at ${ROOT}/etc/lighttpd/lighttpd.conf. Then Nagios" + elog "will be available at," + elog + fi + + elog " http://localhost/nagios/" + fi + fi + + elog + elog "If your kernel has /proc protection, nagios" + elog "will not be happy as it relies on accessing the proc" + elog "filesystem. You can fix this by adding nagios into" + elog "the group wheel, but this is not recomended." + elog + + if [ -n "${REPLACING_VERSIONS}" ]; then + ewarn "The local state directory for nagios has changed in v4.4.5," + ewarn "from ${EROOT}/var/nagios to ${EROOT}/var/lib/nagios. If you" + ewarn "wish to migrate your state to the new location, first stop" + ewarn "nagios and then run" + ewarn "" + ewarn " diff --recursive --brief ${EROOT}/var/nagios ${EROOT}/var/lib/nagios" + ewarn "" + ewarn "to identify any files that should be moved to the new" + ewarn "location. They can simply be moved with \"mv\" before" + ewarn "restarting nagios." + fi +} diff --git a/net-analyzer/nagios-icinga-openvpn/Manifest b/net-analyzer/nagios-icinga-openvpn/Manifest new file mode 100644 index 000000000000..6e9b6cd78f78 --- /dev/null +++ b/net-analyzer/nagios-icinga-openvpn/Manifest @@ -0,0 +1 @@ +DIST nagios-icinga-openvpn-0.0.1.tar.gz 4637 BLAKE2B 365b6450cccd5f7f25348583eae45c0b15932ec1e858d375171911e4108dd2b7fc133559a35399ece8d2a349f05b2f51897cf9e271f498b6bbaa2c6bba3551a9 SHA512 0dae6c2df71a20e287720767aa4ba41d0568f3cd4bd2a6eb252f86d810d3de265ddc38397df15bb1b115ba35ac68aa6e18345dc4432d4d13b08b500483ffbb11 diff --git a/net-analyzer/nagios-icinga-openvpn/metadata.xml b/net-analyzer/nagios-icinga-openvpn/metadata.xml new file mode 100644 index 000000000000..e72a4c2c7dd3 --- /dev/null +++ b/net-analyzer/nagios-icinga-openvpn/metadata.xml @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>mjo@gentoo.org</email> + <name>Michael Orlitzky</name> + </maintainer> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/nagios-icinga-openvpn/nagios-icinga-openvpn-0.0.1-r1.ebuild b/net-analyzer/nagios-icinga-openvpn/nagios-icinga-openvpn-0.0.1-r1.ebuild new file mode 100644 index 000000000000..48966a0e20d0 --- /dev/null +++ b/net-analyzer/nagios-icinga-openvpn/nagios-icinga-openvpn-0.0.1-r1.ebuild @@ -0,0 +1,38 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +PYTHON_COMPAT=( python3_6 python3_7 python3_8 ) +DISTUTILS_USE_SETUPTOOLS=no +inherit distutils-r1 + +MY_PN="check_openvpn" +DESCRIPTION="A Nagios plugin to check whether an OpenVPN server is alive" +HOMEPAGE="https://github.com/liquidat/nagios-icinga-openvpn" +SRC_URI="https://github.com/liquidat/nagios-icinga-openvpn/archive/${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="MIT" +SLOT="0" +KEYWORDS="amd64" +IUSE="" + +src_install() { + distutils-r1_src_install + + local nagiosplugindir="/usr/$(get_libdir)/nagios/plugins" + dodir "${nagiosplugindir}" + + # Create a symlink from the nagios plugin directory to the /usr/bin + # location. The "binary" in /usr/bin should also be a symlink, since + # the python machinery allows the user to switch out the + # interpreter. We don't want to mess with any of that, so we just + # point to whatever the system would use if the user executed + # ${MY_PN}. + # + # The relative symlink is preferred so that if the package is + # installed e.g. while in a chroot, the symlink will never point + # outside of that chroot. + # + dosym "../../../bin/${MY_PN}" "${nagiosplugindir}/${MY_PN}" +} diff --git a/net-analyzer/nagios-plugin-check_lm_sensors/Manifest b/net-analyzer/nagios-plugin-check_lm_sensors/Manifest new file mode 100644 index 000000000000..6c9406511fff --- /dev/null +++ b/net-analyzer/nagios-plugin-check_lm_sensors/Manifest @@ -0,0 +1 @@ +DIST nagios-plugin-check_lm_sensors-4.1.1_p20191028.tar.gz 21775 BLAKE2B d1b9946f45ea30e66baa87825c29aa64f18927ec5c07641d05789f189bc3aacb9764b3790eaa699d83c11860027bc36af9b85ba95b2845afa7533d03fd9d153d SHA512 4473719e5631edbebb8d8ee79578243a97c46cf70a14a2c780560df811f9d4d63081788b2059a9636f26d19a68ac0a44d6b68a4b386b1145d3f3fad8d60439fe diff --git a/net-analyzer/nagios-plugin-check_lm_sensors/metadata.xml b/net-analyzer/nagios-plugin-check_lm_sensors/metadata.xml new file mode 100644 index 000000000000..daa8a0e36366 --- /dev/null +++ b/net-analyzer/nagios-plugin-check_lm_sensors/metadata.xml @@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>sbraz@gentoo.org</email> + <name>Louis Sautier</name> + </maintainer> + <upstream> + <remote-id type="github">matteocorti/check_lm_sensors</remote-id> + <bugs-to>https://github.com/matteocorti/check_lm_sensors/issues</bugs-to> + </upstream> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/nagios-plugin-check_lm_sensors/nagios-plugin-check_lm_sensors-4.1.1_p20191028.ebuild b/net-analyzer/nagios-plugin-check_lm_sensors/nagios-plugin-check_lm_sensors-4.1.1_p20191028.ebuild new file mode 100644 index 000000000000..cd457b7e25dc --- /dev/null +++ b/net-analyzer/nagios-plugin-check_lm_sensors/nagios-plugin-check_lm_sensors-4.1.1_p20191028.ebuild @@ -0,0 +1,37 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit perl-module vcs-snapshot + +MY_PN="${PN/nagios-plugin-/}" +MY_COMMIT="80db8aa58be8f5d7800564d62305281be1ec8e6b" + +DESCRIPTION="Nagios plugin to monitor the values of onboard sensors and disk temperatures" +HOMEPAGE="https://github.com/matteocorti/check_lm_sensors" +SRC_URI="https://github.com/matteocorti/${MY_PN}/archive/${MY_COMMIT}.tar.gz -> ${P}.tar.gz" + +LICENSE="GPL-3+" +SLOT="0" +KEYWORDS="~amd64" + +DEPEND="dev-perl/Module-Install" +RDEPEND=" + dev-perl/JSON-MaybeXS + dev-perl/Monitoring-Plugin + virtual/perl-Getopt-Long +" + +src_compile() { + default + pod2man ${MY_PN}.pod > ${MY_PN}.1 || die +} + +src_install() { + perl-module_src_install + doman ${MY_PN}.1 + local plugindir="/usr/$(get_libdir)/nagios/plugins" + dodir "${plugindir}" + mv "${ED}/usr/bin/${MY_PN}" "${ED}/${plugindir}" || die +} diff --git a/net-analyzer/nagios-plugin-check_raid/Manifest b/net-analyzer/nagios-plugin-check_raid/Manifest new file mode 100644 index 000000000000..608fac71c877 --- /dev/null +++ b/net-analyzer/nagios-plugin-check_raid/Manifest @@ -0,0 +1,2 @@ +DIST nagios-plugin-check_raid-4.0.10.tar.gz 54895 BLAKE2B 6432624de419fca2d376362e5d13031272b6feeccdc6202b8a7eec92ab1f6c362ab88f9c912b10695c34347388dd154b12757a8b4268d30c0436589da060d5cc SHA512 1b8c353fbd0dff6fea5311c4149af16b1e1a5778794ef0085dcd8ee18f196579cca0b9f8c1ecef51f3ee36665aec6069f64ebe4d2e565bf7223bed59f2de5ee1 +DIST nagios-plugin-check_raid-4.0.8.tar.gz 53803 BLAKE2B debc312ccf688c6ed4c4d89d77efbf454ae030260741277f1f10966d28348a317255a69a932ceba69300c37b98448ebb3ca3a0b463d64814a4ca11043bdc5850 SHA512 237cbe798aa6c65b4bd6b9c9e24923e172d3d62c50afd7df23e2b6c8888041368025860edf5f826a77c6858e6312bba05225f0e20787e1bb579d833950b324ee diff --git a/net-analyzer/nagios-plugin-check_raid/metadata.xml b/net-analyzer/nagios-plugin-check_raid/metadata.xml new file mode 100644 index 000000000000..0ea87d4f7925 --- /dev/null +++ b/net-analyzer/nagios-plugin-check_raid/metadata.xml @@ -0,0 +1,28 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>robbat2@gentoo.org</email> + <name>Robin H. Johnson</name> + </maintainer> + <longdescription lang="en"> + Nagios/Icinga plugin to check current server's RAID status; this tool + wraps MANY different RAID tools and provides a consistent check for + them. + </longdescription> + <upstream> + <remote-id type="github">glensc/nagios-plugin-check_raid</remote-id> + </upstream> + <use> + <flag name='3ware'>Support 3ware RAID controllers</flag> + <flag name='aacraid'>Support Adaptec AAC-RAID controllers</flag> + <flag name='dmraid'>Support Device-Mapper RAID</flag> + <flag name='hpa'>Support HP Array controllers</flag> + <flag name='hpsa'>Support HP SmartArray (CCISS) controllers</flag> + <flag name='megaraid-sas'>Support LSI MegaRAID SAS controllers</flag> + <flag name='megaraid-scsi'>Support LSI MegaRAID SCSI controllers</flag> + <flag name='mpt-sas2'>Support LSI SAS-2 controllers</flag> + <flag name='mpt'>Support LSI MPT Fusion controllers</flag> + </use> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/nagios-plugin-check_raid/nagios-plugin-check_raid-4.0.10.ebuild b/net-analyzer/nagios-plugin-check_raid/nagios-plugin-check_raid-4.0.10.ebuild new file mode 100644 index 000000000000..26049ac2dfbc --- /dev/null +++ b/net-analyzer/nagios-plugin-check_raid/nagios-plugin-check_raid-4.0.10.ebuild @@ -0,0 +1,66 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +inherit eutils perl-module + +DESCRIPTION="Nagios/Icinga plugin to check current server's RAID status" +HOMEPAGE="https://github.com/glensc/nagios-plugin-check_raid" +#COMMIT="" +MY_PV="${COMMIT:-$PV}" +MY_P="${PN}-${MY_PV}" +SRC_URI="https://github.com/glensc/nagios-plugin-check_raid/archive/${MY_PV}.tar.gz -> ${MY_P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~sparc ~x86" +IUSE="3ware aacraid dmraid hpa hpsa megaraid-sas megaraid-scsi mpt mpt-sas2" + +DEPEND="dev-perl/Monitoring-Plugin + dev-perl/Module-Pluggable" +RDEPEND="${DEPEND} + sys-apps/smartmontools + sys-fs/lsscsi + 3ware? ( sys-block/tw_cli ) + aacraid? ( sys-block/arcconf ) + dmraid? ( sys-fs/dmraid ) + hpa? ( sys-block/hpacucli ) + hpsa? ( sys-apps/cciss_vol_status ) + megaraid-sas? ( sys-block/megacli ) + megaraid-scsi? ( sys-block/megarc ) + mpt-sas2? ( sys-block/sas2ircu ) + mpt? ( sys-block/mpt-status ) + " + +S="${WORKDIR}/${MY_P}" + +src_prepare() { + # Upstream has a custom Makefile that is meant to build bundles. + mv -f Makefile Makefile.upstream + sed -i '/CPANfile/d' Makefile.PL + default +} + +src_install() { + default + plugindir="/usr/$(get_libdir)/nagios/plugins" + dodir "$plugindir" + mv -f "${D}"/usr/bin/check_raid.pl "${D}"/"${plugindir}" + dodoc README.md CHANGELOG.md CONTRIBUTING.md check_raid.cfg +} + +pkg_postinst() { + einfo "The following RAID controllers are supported without special tools:" + einfo "GDT (Intel/ICP) RAID Controller" + einfo "HP MSA (special configuration needed)" + einfo "The following RAID controllers do not have tools packaged in Gentoo, but ARE supported by this tool:" + einfo "Intel: CmdTool2" + einfo "Areca: areca-cli" + einfo "See https://github.com/glensc/nagios-plugin-check_raid/issues/10" + einfo "Marvell RAID: mvcli" + einfo "See https://github.com/glensc/nagios-plugin-check_raid/issues/92" + einfo "Adaptec ServeRAID: aaccli" + einfo "Adaptec AACRAID: afacli (* some controllers supported by USE=aacraid, sys-block/arcconf)" + einfo "Adaptec ServeRAID 7k: ipssend" +} diff --git a/net-analyzer/nagios-plugin-check_raid/nagios-plugin-check_raid-4.0.8.ebuild b/net-analyzer/nagios-plugin-check_raid/nagios-plugin-check_raid-4.0.8.ebuild new file mode 100644 index 000000000000..26049ac2dfbc --- /dev/null +++ b/net-analyzer/nagios-plugin-check_raid/nagios-plugin-check_raid-4.0.8.ebuild @@ -0,0 +1,66 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +inherit eutils perl-module + +DESCRIPTION="Nagios/Icinga plugin to check current server's RAID status" +HOMEPAGE="https://github.com/glensc/nagios-plugin-check_raid" +#COMMIT="" +MY_PV="${COMMIT:-$PV}" +MY_P="${PN}-${MY_PV}" +SRC_URI="https://github.com/glensc/nagios-plugin-check_raid/archive/${MY_PV}.tar.gz -> ${MY_P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~sparc ~x86" +IUSE="3ware aacraid dmraid hpa hpsa megaraid-sas megaraid-scsi mpt mpt-sas2" + +DEPEND="dev-perl/Monitoring-Plugin + dev-perl/Module-Pluggable" +RDEPEND="${DEPEND} + sys-apps/smartmontools + sys-fs/lsscsi + 3ware? ( sys-block/tw_cli ) + aacraid? ( sys-block/arcconf ) + dmraid? ( sys-fs/dmraid ) + hpa? ( sys-block/hpacucli ) + hpsa? ( sys-apps/cciss_vol_status ) + megaraid-sas? ( sys-block/megacli ) + megaraid-scsi? ( sys-block/megarc ) + mpt-sas2? ( sys-block/sas2ircu ) + mpt? ( sys-block/mpt-status ) + " + +S="${WORKDIR}/${MY_P}" + +src_prepare() { + # Upstream has a custom Makefile that is meant to build bundles. + mv -f Makefile Makefile.upstream + sed -i '/CPANfile/d' Makefile.PL + default +} + +src_install() { + default + plugindir="/usr/$(get_libdir)/nagios/plugins" + dodir "$plugindir" + mv -f "${D}"/usr/bin/check_raid.pl "${D}"/"${plugindir}" + dodoc README.md CHANGELOG.md CONTRIBUTING.md check_raid.cfg +} + +pkg_postinst() { + einfo "The following RAID controllers are supported without special tools:" + einfo "GDT (Intel/ICP) RAID Controller" + einfo "HP MSA (special configuration needed)" + einfo "The following RAID controllers do not have tools packaged in Gentoo, but ARE supported by this tool:" + einfo "Intel: CmdTool2" + einfo "Areca: areca-cli" + einfo "See https://github.com/glensc/nagios-plugin-check_raid/issues/10" + einfo "Marvell RAID: mvcli" + einfo "See https://github.com/glensc/nagios-plugin-check_raid/issues/92" + einfo "Adaptec ServeRAID: aaccli" + einfo "Adaptec AACRAID: afacli (* some controllers supported by USE=aacraid, sys-block/arcconf)" + einfo "Adaptec ServeRAID 7k: ipssend" +} diff --git a/net-analyzer/nagios-plugins-flameeyes/metadata.xml b/net-analyzer/nagios-plugins-flameeyes/metadata.xml new file mode 100644 index 000000000000..2700c96a48f5 --- /dev/null +++ b/net-analyzer/nagios-plugins-flameeyes/metadata.xml @@ -0,0 +1,20 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>sysadmin@gentoo.org</email> + <name>Gentoo Sysadmin Project</name> + </maintainer> + <use> + <flag name="smart"> + Install <pkg>sys-apps/smartmontools</pkg> required for + S.M.A.R.T. disk monitoring. Disabling the flag removes the + plugin file. This plugin also requires the sudo flag to be + enable. + </flag> + </use> + <upstream> + <remote-id type="github">Flameeyes/nagios-plugins-flameeyes</remote-id> + </upstream> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/nagios-plugins-flameeyes/nagios-plugins-flameeyes-9999.ebuild b/net-analyzer/nagios-plugins-flameeyes/nagios-plugins-flameeyes-9999.ebuild new file mode 100644 index 000000000000..351eac1d17cc --- /dev/null +++ b/net-analyzer/nagios-plugins-flameeyes/nagios-plugins-flameeyes-9999.ebuild @@ -0,0 +1,49 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +inherit git-r3 multilib + +EGIT_REPO_URI="https://github.com/Flameeyes/${PN}.git" +SRC_URI="" +KEYWORDS="" + +DESCRIPTION="Flameeyes's custom Nagios/Icinga plugins" +HOMEPAGE="https://github.com/Flameeyes/nagios-plugins-flameeyes" + +LICENSE="MIT" +SLOT="0" +IUSE="smart samba" + +RDEPEND=" + dev-perl/Monitoring-Plugin + sys-apps/portage + dev-perl/Time-Duration + dev-perl/TimeDate + smart? ( + sys-apps/smartmontools + app-admin/sudo + ) + samba? ( dev-perl/Filesys-SmbClient )" +DEPEND="" + +src_compile() { + cat - > "${T}"/50${PN} <<EOF +Cmnd_Alias NAGIOS_PLUGINS_FLAMEEYES_CMDS = /usr/sbin/smartctl +User_Alias NAGIOS_PLUGINS_FLAMEEYES_USERS = nagios, icinga + +NAGIOS_PLUGINS_FLAMEEYES_USERS ALL=(root) NOPASSWD: NAGIOS_PLUGINS_FLAMEEYES_CMDS +EOF +} + +src_install() { + insinto /etc/sudoers.d + doins "${T}"/50${PN} + + dodir /usr/$(get_libdir)/nagios/plugins/flameeyes + cp -Rp $(find . -type d -mindepth 1 -maxdepth 1 -not -name .git) \ + "${D}/usr/$(get_libdir)/nagios/plugins/flameeyes" || die + + dodoc README.md +} diff --git a/net-analyzer/nagios-plugins-linux-madrisan/Manifest b/net-analyzer/nagios-plugins-linux-madrisan/Manifest new file mode 100644 index 000000000000..439a712c1182 --- /dev/null +++ b/net-analyzer/nagios-plugins-linux-madrisan/Manifest @@ -0,0 +1,2 @@ +DIST nagios-plugins-linux-madrisan-25.tar.xz 371712 BLAKE2B 60637426d9ced289a1acdf61c3e7c5a2b3227afb20079ef93d445057b2127d12a6c76ab5a780571ac8bdd6ac3b55de2761722236d2ed7a057ab84559d97610e9 SHA512 64961a16e24802d66c48d0c33bd63d75aba8492f38dd83a57ee2e7cb728cf6876c7869622256c4249a9e9da39b744a332df6ecad80f6039861887bb5c8d806ec +DIST nagios-plugins-linux-madrisan-26.tar.xz 379480 BLAKE2B e30fa00c029506ffd76e9c16f409f62f00ab481894d6b35dd34470dab5f2a18b2fc18bd06ae5e6a7179ed23f36c785c9a403258b9066e5a08f6a139ab0192088 SHA512 61c523ddf7a98ae01caf543a7e38903478346ce380884a7cd2a2e592db806e73fb996675aa701e2bbf57b31ed062886daba4af70cc2875e1c296537de01c588d diff --git a/net-analyzer/nagios-plugins-linux-madrisan/files/nagios-plugins-linux-madrisan-25-fix-fno-common.patch b/net-analyzer/nagios-plugins-linux-madrisan/files/nagios-plugins-linux-madrisan-25-fix-fno-common.patch new file mode 100644 index 000000000000..74bddd66e749 --- /dev/null +++ b/net-analyzer/nagios-plugins-linux-madrisan/files/nagios-plugins-linux-madrisan-25-fix-fno-common.patch @@ -0,0 +1,37 @@ +From 4936ca25f3e9a2875ce063033e5e8f3a3590dab2 Mon Sep 17 00:00:00 2001 +From: Davide Madrisan <davide.madrisan@gmail.com> +Date: Mon, 27 Jan 2020 22:00:41 +0100 +Subject: [PATCH] The build fails when '-fno-common' is added to CFLAGS + +As reported by 'sbraz', the build stops with the error message: + + (.bss+0x8): multiple definition of `program_name' + (.bss+0x0): multiple definition of `program_name_short' + +This flag will be apparently enabled by default in gcc 10. + +Fix this build problem by correctly referencing as extern both +the variables in the header file. + +Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com> +--- + include/progname.h | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/include/progname.h b/include/progname.h +index 576ed16..847122a 100644 +--- a/include/progname.h ++++ b/include/progname.h +@@ -25,10 +25,10 @@ extern "C" { + #endif + + /* String containing name the program is called with. */ +- const char *program_name; ++ extern const char *program_name; + + /* String containing a short version of 'program_name'. */ +- const char *program_name_short; ++ extern const char *program_name_short; + + /* Set program_name, based on argv[0]. + argv0 must be a string allocated with indefinite extent, and must not be diff --git a/net-analyzer/nagios-plugins-linux-madrisan/files/nagios-plugins-linux-madrisan-25-fix-musl-build.patch b/net-analyzer/nagios-plugins-linux-madrisan/files/nagios-plugins-linux-madrisan-25-fix-musl-build.patch new file mode 100644 index 000000000000..3220be247319 --- /dev/null +++ b/net-analyzer/nagios-plugins-linux-madrisan/files/nagios-plugins-linux-madrisan-25-fix-musl-build.patch @@ -0,0 +1,35 @@ +commit 72547f774641d3ed881cc957a6d6c20d5e3370ec +Author: Louis Sautier <sautier.louis@gmail.com> +Date: Mon Apr 20 16:40:08 2020 +0200 + + Fix build with musl by including limits.h when PATH_MAX is used + + Otherwise, the build fails with: + error: PATH_MAX undeclared (first use in this function) + + Bug: https://bugs.gentoo.org/717038 + +diff --git a/lib/processes.c b/lib/processes.c +index cb006ca..e65992d 100644 +--- a/lib/processes.c ++++ b/lib/processes.c +@@ -26,6 +26,7 @@ + #include <ctype.h> + #include <dirent.h> + #include <errno.h> ++#include <limits.h> + #include <pwd.h> + #include <stdio.h> + #include <stdlib.h> +diff --git a/plugins/check_fc.c b/plugins/check_fc.c +index b798377..cfaafa5 100644 +--- a/plugins/check_fc.c ++++ b/plugins/check_fc.c +@@ -22,6 +22,7 @@ + #include <dirent.h> + #include <errno.h> + #include <getopt.h> ++#include <limits.h> + #include <stdint.h> + #include <stdio.h> + #include <stdlib.h> diff --git a/net-analyzer/nagios-plugins-linux-madrisan/metadata.xml b/net-analyzer/nagios-plugins-linux-madrisan/metadata.xml new file mode 100644 index 000000000000..496ec612a1ef --- /dev/null +++ b/net-analyzer/nagios-plugins-linux-madrisan/metadata.xml @@ -0,0 +1,17 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>sbraz@gentoo.org</email> + <name>Louis Sautier</name> + </maintainer> + <use> + <flag name="curl">Build check_docker which requires <pkg>net-misc/curl</pkg></flag> + <flag name="varlink">Build check_podman which requires <pkg>dev-libs/libvarlink</pkg></flag> + </use> + <upstream> + <remote-id type="github">madrisan/nagios-plugins-linux</remote-id> + <bugs-to>https://github.com/madrisan/nagios-plugins-linux/issues</bugs-to> + </upstream> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/nagios-plugins-linux-madrisan/nagios-plugins-linux-madrisan-25-r1.ebuild b/net-analyzer/nagios-plugins-linux-madrisan/nagios-plugins-linux-madrisan-25-r1.ebuild new file mode 100644 index 000000000000..e56c277678f3 --- /dev/null +++ b/net-analyzer/nagios-plugins-linux-madrisan/nagios-plugins-linux-madrisan-25-r1.ebuild @@ -0,0 +1,53 @@ +# Copyright 2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit autotools + +MY_PN="nagios-plugins-linux" +MY_P="${MY_PN}-${PV}" + +DESCRIPTION="Additional and alternative Nagios plugins for Linux" +HOMEPAGE="https://github.com/madrisan/nagios-plugins-linux" +SRC_URI="https://github.com/madrisan/${MY_PN}/releases/download/v${PV}/${MY_P}.tar.xz -> ${P}.tar.xz" + +LICENSE="GPL-3+" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="curl" + +DEPEND="curl? ( net-misc/curl:0= )" +RDEPEND="${DEPEND}" + +# https://github.com/madrisan/nagios-plugins-linux/issues/48 +# Will be in the next release +# https://github.com/madrisan/nagios-plugins-linux/pull/52 +PATCHES=( + "${FILESDIR}/${P}-fix-fno-common.patch" + "${FILESDIR}/${P}-fix-musl-build.patch" +) + +S="${WORKDIR}/${MY_P}" + +src_prepare() { + default + # Avoid collision with net-analyzer/monitoring-plugins + # and net-analyzer/nagios-plugins + sed -ri "s/check_(load|swap|uptime|users)/&_madrisan/" plugins/Makefile.am || die + eautoreconf +} + +src_configure() { + local myconf=( + --libexecdir="${EPREFIX}/usr/$(get_libdir)/nagios/plugins" + # Most options are already defaults for Gentoo + --disable-hardening + $(use_enable curl libcurl) + ) + econf "${myconf[@]}" +} + +src_test() { + emake check VERBOSE=1 +} diff --git a/net-analyzer/nagios-plugins-linux-madrisan/nagios-plugins-linux-madrisan-26-r1.ebuild b/net-analyzer/nagios-plugins-linux-madrisan/nagios-plugins-linux-madrisan-26-r1.ebuild new file mode 100644 index 000000000000..f76ea708a821 --- /dev/null +++ b/net-analyzer/nagios-plugins-linux-madrisan/nagios-plugins-linux-madrisan-26-r1.ebuild @@ -0,0 +1,49 @@ +# Copyright 2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit autotools + +MY_PN="nagios-plugins-linux" +MY_P="${MY_PN}-${PV}" + +DESCRIPTION="Additional and alternative Nagios plugins for Linux" +HOMEPAGE="https://github.com/madrisan/nagios-plugins-linux" +SRC_URI="https://github.com/madrisan/${MY_PN}/releases/download/v${PV}/${MY_P}.tar.xz -> ${P}.tar.xz" + +LICENSE="GPL-3+" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="curl varlink" + +DEPEND=" + curl? ( net-misc/curl:0= ) + varlink? ( dev-libs/libvarlink:= ) +" +RDEPEND="${DEPEND}" + +S="${WORKDIR}/${MY_P}" + +src_prepare() { + default + # Avoid collision with net-analyzer/monitoring-plugins + # and net-analyzer/nagios-plugins + sed -ri "s/check_(load|swap|uptime|users)/&_madrisan/" plugins/Makefile.am || die + eautoreconf +} + +src_configure() { + local myconf=( + --libexecdir="${EPREFIX}/usr/$(get_libdir)/nagios/plugins" + # Most options are already defaults for Gentoo + --disable-hardening + $(use_enable curl libcurl) + $(use_enable varlink libvarlink) + ) + econf "${myconf[@]}" +} + +src_test() { + emake check VERBOSE=1 +} diff --git a/net-analyzer/nagios-plugins-snmp/Manifest b/net-analyzer/nagios-plugins-snmp/Manifest new file mode 100644 index 000000000000..ebcb179eda70 --- /dev/null +++ b/net-analyzer/nagios-plugins-snmp/Manifest @@ -0,0 +1 @@ +DIST nagios-plugins-snmp-0.6.0.tgz 381664 BLAKE2B 1a6124b5aa194123b17a1ce98a4e023a8d71f70a6c5ae61b8b54b204050f7914f100e1e639630955e45905f86282cab6a7034e5927b3db5b609beb315a66c748 SHA512 42fe9e2a9a99876d81731d821b7d1e4700f8637c8a890980f5cb3de4a3985210d86d38fd7ebbd7d075ff616da518cc932f5eb999f47fc3833ed62c1f7d4f4529 diff --git a/net-analyzer/nagios-plugins-snmp/metadata.xml b/net-analyzer/nagios-plugins-snmp/metadata.xml new file mode 100644 index 000000000000..f339e98e1a01 --- /dev/null +++ b/net-analyzer/nagios-plugins-snmp/metadata.xml @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>sysadmin@gentoo.org</email> + <name>Gentoo Sysadmin Project</name> + </maintainer> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/nagios-plugins-snmp/nagios-plugins-snmp-0.6.0-r2.ebuild b/net-analyzer/nagios-plugins-snmp/nagios-plugins-snmp-0.6.0-r2.ebuild new file mode 100644 index 000000000000..c89ed52c8249 --- /dev/null +++ b/net-analyzer/nagios-plugins-snmp/nagios-plugins-snmp-0.6.0-r2.ebuild @@ -0,0 +1,45 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=4 + +inherit autotools user + +DESCRIPTION="Additional Nagios plugins for monitoring SNMP capable devices" +HOMEPAGE="http://nagios.manubulon.com" +SRC_URI="http://nagios.manubulon.com/${P}.tgz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="amd64 ~ppc ppc64 ~sparc x86" +IUSE="" + +DEPEND="net-analyzer/net-snmp" +RDEPEND="${DEPEND}" + +S=${WORKDIR}/nagios-plugins-snmp + +pkg_setup() { + enewgroup nagios + enewuser nagios -1 /bin/bash /var/nagios/home nagios +} + +src_prepare() { + sed -i -e '/^CFLAGS=""/d' configure.in + eautoreconf +} + +src_configure() { + econf \ + --sysconfdir=/etc/nagios \ + --libexec=/usr/$(get_libdir)/nagios/plugins +} + +DOCS=( README NEWS AUTHORS ) + +src_install() { + default + + fowners root:nagios /usr/$(get_libdir)/nagios/plugins + fperms o-rwx /usr/$(get_libdir)/nagios/plugins +} diff --git a/net-analyzer/nagios-plugins/Manifest b/net-analyzer/nagios-plugins/Manifest new file mode 100644 index 000000000000..a61327a7e254 --- /dev/null +++ b/net-analyzer/nagios-plugins/Manifest @@ -0,0 +1,2 @@ +DIST nagios-plugins-2.2.1.tar.gz 2728818 BLAKE2B ea89862935491d9c31403a36712d39557fa8e90dc2306e027531e974933cd13cc6b55ebfdd7dfc7541d6458741aaf57714df57fdddc92049001a59f0ffb6413a SHA512 6ffe313a56a305b382f62abc0f0958d7078f9050e1340f30721d6e6f71944b57b1650e90e6835c35dd7c9f3f4b4cee9f235b8382b0811db30b3729daaafc9bc3 +DIST nagios-plugins-2.3.1.tar.gz 2833267 BLAKE2B f89eda7a29558dd33dedbf0de150b6a13ba66d213d74041d9eb8c680880b3825bcc9312d251d22f3b483a14c0de7c59d7801954e7563c16352bfc38236676863 SHA512 89208f211e51db4e0d56725a6ff6d2fcf4eb2207f877a2b8f130cda8480a70f318eceb94140eb4f2a17fe3dd967bb3615ccc366c1a531ebd4ff0a04b60c61b8a diff --git a/net-analyzer/nagios-plugins/files/define-own-mysql-port-constant.patch b/net-analyzer/nagios-plugins/files/define-own-mysql-port-constant.patch new file mode 100644 index 000000000000..67bc65cad880 --- /dev/null +++ b/net-analyzer/nagios-plugins/files/define-own-mysql-port-constant.patch @@ -0,0 +1,100 @@ +From 43ff2e8607c0b7095c2a4dcab6e466bc67e2e2ff Mon Sep 17 00:00:00 2001 +From: Michael Orlitzky <michael@orlitzky.com> +Date: Thu, 26 Oct 2017 15:01:17 -0400 +Subject: [PATCH 1/3] plugins/check_mysql*.c: define our own default MySQL + port. + +The MYSQL_PORT constant used to be defined in mysql.h, and was used as +the default port in the two plugins check_mysql and check_mysql_query. +Now that mysql.h no longer defines that constant, our plugins fail to +build against newer versions of MySQL and MariaDB. + +Since MYSQL_PORT used the "default port" on the local system, it +actually was not the best choice as the default for the check plugins: +when monitoring remote MySQL servers, the usual default of 3306 is +more likely to be correct than whatever the local server happens to be +listening on. + +As a result, we fix the issue by defining our own constant, called +CHECK_PORT_DEFAULT, as "3306" at the top of both check_mysql.c and +check_mysql_query.c. The existing uses of MYSQL_PORT have been changed +to use the new CHECK_PORT_DEFAULT. + +This change is backwards-incompatible: any users who compiled in a +MYSQL_PORT other than 3306 and who were running their checks on the +same server as the database will now need to specify that port +explicitly. + +Closes: https://github.com/nagios-plugins/nagios-plugins/issues/288 +--- + plugins/check_mysql.c | 7 +++++-- + plugins/check_mysql_query.c | 7 +++++-- + 2 files changed, 10 insertions(+), 4 deletions(-) + +diff --git a/plugins/check_mysql.c b/plugins/check_mysql.c +index 83f89c85..c0b61292 100644 +--- a/plugins/check_mysql.c ++++ b/plugins/check_mysql.c +@@ -36,6 +36,9 @@ const char *email = "devel@nagios-plugins.org"; + + #define SLAVERESULTSIZE 70 + ++/* The default port that MySQL servers listen on. */ ++#define CHECK_PORT_DEFAULT 3306 ++ + #include "common.h" + #include "utils.h" + #include "utils_base.h" +@@ -58,7 +61,7 @@ char *ciphers = NULL; + bool ssl = false; + char *opt_file = NULL; + char *opt_group = NULL; +-unsigned int db_port = MYSQL_PORT; ++unsigned int db_port = CHECK_PORT_DEFAULT; + int check_slave = 0, warn_sec = 0, crit_sec = 0; + int ignore_auth = 0; + int verbose = 0; +@@ -505,7 +508,7 @@ void + print_help (void) + { + char *myport; +- xasprintf (&myport, "%d", MYSQL_PORT); ++ xasprintf (&myport, "%d", CHECK_PORT_DEFAULT); + + print_revision (progname, NP_VERSION); + +diff --git a/plugins/check_mysql_query.c b/plugins/check_mysql_query.c +index 436e0685..e9c3acfb 100644 +--- a/plugins/check_mysql_query.c ++++ b/plugins/check_mysql_query.c +@@ -33,6 +33,9 @@ const char *progname = "check_mysql_query"; + const char *copyright = "1999-2014"; + const char *email = "devel@nagios-plugins.org"; + ++/* The default port that MySQL servers listen on. */ ++#define CHECK_PORT_DEFAULT 3306 ++ + #include "common.h" + #include "utils.h" + #include "utils_base.h" +@@ -48,7 +51,7 @@ char *db_pass = NULL; + char *db = NULL; + char *opt_file = NULL; + char *opt_group = NULL; +-unsigned int db_port = MYSQL_PORT; ++unsigned int db_port = CHECK_PORT_DEFAULT; + + int process_arguments (int, char **); + int validate_arguments (void); +@@ -300,7 +303,7 @@ void + print_help (void) + { + char *myport; +- xasprintf (&myport, "%d", MYSQL_PORT); ++ xasprintf (&myport, "%d", CHECK_PORT_DEFAULT); + + print_revision (progname, NP_VERSION); + +-- +2.13.6 + diff --git a/net-analyzer/nagios-plugins/metadata.xml b/net-analyzer/nagios-plugins/metadata.xml new file mode 100644 index 000000000000..f0054cc201d0 --- /dev/null +++ b/net-analyzer/nagios-plugins/metadata.xml @@ -0,0 +1,38 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>mjo@gentoo.org</email> + <name>Michael Orlitzky</name> + </maintainer> + <maintainer type="project"> + <email>sysadmin@gentoo.org</email> + <name>Gentoo Sysadmin Project</name> + </maintainer> + <use> + <flag name="nagios-dns"> + Install <pkg>net-dns/bind-tools</pkg> required for monitoring + DNS servers. Disabling the flag does not remove any plugin file. + </flag> + <flag name="nagios-game"> + Install <pkg>games-util/qstat</pkg> required for monitoring FPS + servers. Disabling the flag does not remove any plugin file. + </flag> + <flag name="nagios-ping"> + Install <pkg>net-analyzer/fping</pkg> required for fancy ping + monitoring. Disabling the flag does not remove any plugin file. + </flag> + <flag name="ssh"> + Install <pkg>net-misc/openssh</pkg> required for monitoring SSH + servers. Disabling the flag does not remove any plugin file. + </flag> + <flag name="snmp" restrict=">=net-analyzer/nagios-plugins-1.4.16-r1"> + Install <pkg>dev-perl/Net-SNMP</pkg> required for monitoring + SNMP values. Disabling the flag does not remove any plugin file. + </flag> + </use> + <upstream> + <remote-id type="github">nagios-plugins/nagios-plugins</remote-id> + </upstream> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/nagios-plugins/nagios-plugins-2.2.1-r3.ebuild b/net-analyzer/nagios-plugins/nagios-plugins-2.2.1-r3.ebuild new file mode 100644 index 000000000000..77dac5af3930 --- /dev/null +++ b/net-analyzer/nagios-plugins/nagios-plugins-2.2.1-r3.ebuild @@ -0,0 +1,118 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +inherit user + +DESCRIPTION="Official plugins for Nagios" +HOMEPAGE="http://nagios-plugins.org/" +SRC_URI="http://nagios-plugins.org/download/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha amd64 ~arm ~arm64 hppa ppc ppc64 sparc x86" +IUSE="ipv6 ldap libressl mysql nagios-dns nagios-ping nagios-game postgres radius samba selinux snmp ssh +ssl" + +# Most of the plugins use automagic dependencies, i.e. the plugin will +# get built if the binary it uses is installed. For example, check_snmp +# will be built only if snmpget from net-analyzer/net-snmp[-minimal] is +# installed. End result: most of our runtime dependencies are required +# at build time as well. +# +# REAL_DEPEND contains the dependencies that are actually needed to +# build. DEPEND contains those plus the automagic dependencies. +# +REAL_DEPEND="dev-lang/perl + ldap? ( net-nds/openldap ) + mysql? ( dev-db/mysql-connector-c ) + postgres? ( dev-db/postgresql:* ) + ssl? ( + !libressl? ( dev-libs/openssl:0 ) + libressl? ( dev-libs/libressl ) + ) + radius? ( net-dialup/freeradius-client )" + +DEPEND="${REAL_DEPEND} + nagios-dns? ( net-dns/bind-tools ) + nagios-game? ( games-util/qstat ) + nagios-ping? ( net-analyzer/fping ) + samba? ( net-fs/samba ) + ssh? ( net-misc/openssh ) + snmp? ( dev-perl/Net-SNMP + net-analyzer/net-snmp[-minimal] )" + +# Basically everything collides with nagios-plugins. +RDEPEND="${DEPEND} + !net-analyzer/monitoring-plugins + selinux? ( sec-policy/selinux-nagios )" + +# At least one test is interactive. +RESTRICT="test" + +DOCS=( + ACKNOWLEDGEMENTS + AUTHORS + CODING + ChangeLog + FAQ + NEWS + README + REQUIREMENTS + SUPPORT + THANKS +) + +PATCHES=( "${FILESDIR}/define-own-mysql-port-constant.patch" ) + +src_prepare() { + default + + # Fix the path to our perl interpreter + sed -i -e "1s:/usr/local/bin/perl:/usr/bin/perl:" \ + "${S}"/plugins-scripts/*.pl \ + || die 'failed to fix perl interpreter path' +} + +src_configure() { + # Use an array to prevent econf from mangling the ping args. + local myconf=() + + if use ssl; then + myconf+=( $(use_with ssl openssl /usr) ) + else + myconf+=( --without-openssl ) + myconf+=( --without-gnutls ) + fi + + # The autodetection for these two commands can hang if localhost is + # down or ICMP traffic is filtered. Bug #468296. + myconf+=( --with-ping-command="/bin/ping -n -U -w %d -c %d %s" ) + + if use ipv6; then + myconf+=( --with-ping6-command="/bin/ping6 -n -U -w %d -c %d %s" ) + fi + + econf \ + $(use_with mysql) \ + $(use_with ipv6) \ + $(use_with ldap) \ + $(use_with postgres pgsql /usr) \ + $(use_with radius) \ + "${myconf[@]}" \ + --libexecdir="/usr/$(get_libdir)/nagios/plugins" \ + --sysconfdir="/etc/nagios" +} + +pkg_preinst() { + enewgroup nagios + enewuser nagios -1 /bin/bash /var/nagios/home nagios +} + +pkg_postinst() { + elog "This ebuild has a number of USE flags that determine what you" + elog "are able to monitor. Depending on what you want to monitor, some" + elog "or all of these USE flags need to be set." + elog + elog "The plugins are installed in ${ROOT}usr/$(get_libdir)/nagios/plugins" +} diff --git a/net-analyzer/nagios-plugins/nagios-plugins-2.2.1-r4.ebuild b/net-analyzer/nagios-plugins/nagios-plugins-2.2.1-r4.ebuild new file mode 100644 index 000000000000..2c15df43c502 --- /dev/null +++ b/net-analyzer/nagios-plugins/nagios-plugins-2.2.1-r4.ebuild @@ -0,0 +1,118 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +inherit user + +DESCRIPTION="Official plugins for Nagios" +HOMEPAGE="http://nagios-plugins.org/" +SRC_URI="http://nagios-plugins.org/download/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ppc ~ppc64 ~sparc ~x86" +IUSE="ipv6 ldap libressl mysql nagios-dns nagios-ping nagios-game postgres radius samba selinux snmp ssh +ssl" + +# Most of the plugins use automagic dependencies, i.e. the plugin will +# get built if the binary it uses is installed. For example, check_snmp +# will be built only if snmpget from net-analyzer/net-snmp[-minimal] is +# installed. End result: most of our runtime dependencies are required +# at build time as well. +# +# REAL_DEPEND contains the dependencies that are actually needed to +# build. DEPEND contains those plus the automagic dependencies. +# +REAL_DEPEND="dev-lang/perl + ldap? ( net-nds/openldap ) + mysql? ( dev-db/mysql-connector-c ) + postgres? ( dev-db/postgresql:* ) + ssl? ( + !libressl? ( dev-libs/openssl:0 ) + libressl? ( dev-libs/libressl ) + ) + radius? ( net-dialup/freeradius-client )" + +DEPEND="${REAL_DEPEND} + nagios-dns? ( net-dns/bind-tools ) + nagios-game? ( games-util/qstat ) + nagios-ping? ( net-analyzer/fping ) + samba? ( net-fs/samba ) + ssh? ( net-misc/openssh ) + snmp? ( dev-perl/Net-SNMP + net-analyzer/net-snmp[-minimal] )" + +# Basically everything collides with nagios-plugins. +RDEPEND="${DEPEND} + !net-analyzer/monitoring-plugins + selinux? ( sec-policy/selinux-nagios )" + +# At least one test is interactive. +RESTRICT="test" + +DOCS=( + ACKNOWLEDGEMENTS + AUTHORS + CODING + ChangeLog + FAQ + NEWS + README + REQUIREMENTS + SUPPORT + THANKS +) + +PATCHES=( "${FILESDIR}/define-own-mysql-port-constant.patch" ) + +src_prepare() { + default + + # Fix the path to our perl interpreter + sed -i -e "1s:/usr/local/bin/perl:/usr/bin/perl:" \ + "${S}"/plugins-scripts/*.pl \ + || die 'failed to fix perl interpreter path' +} + +src_configure() { + # Use an array to prevent econf from mangling the ping args. + local myconf=() + + if use ssl; then + myconf+=( $(use_with ssl openssl /usr) ) + else + myconf+=( --without-openssl ) + myconf+=( --without-gnutls ) + fi + + # The autodetection for these two commands can hang if localhost is + # down or ICMP traffic is filtered. Bug #468296. + myconf+=( --with-ping-command="/bin/ping -n -U -w %d -c %d %s" ) + + if use ipv6; then + myconf+=( --with-ping6-command="/bin/ping6 -n -U -w %d -c %d %s" ) + fi + + econf \ + $(use_with mysql) \ + $(use_with ipv6) \ + $(use_with ldap) \ + $(use_with postgres pgsql /usr) \ + $(use_with radius) \ + "${myconf[@]}" \ + --libexecdir="/usr/$(get_libdir)/nagios/plugins" \ + --sysconfdir="/etc/nagios" +} + +pkg_preinst() { + enewgroup nagios + enewuser nagios -1 -1 -1 nagios +} + +pkg_postinst() { + elog "This ebuild has a number of USE flags that determine what you" + elog "are able to monitor. Depending on what you want to monitor, some" + elog "or all of these USE flags need to be set." + elog + elog "The plugins are installed in ${ROOT}usr/$(get_libdir)/nagios/plugins" +} diff --git a/net-analyzer/nagios-plugins/nagios-plugins-2.3.1-r1.ebuild b/net-analyzer/nagios-plugins/nagios-plugins-2.3.1-r1.ebuild new file mode 100644 index 000000000000..ec9cb103f719 --- /dev/null +++ b/net-analyzer/nagios-plugins/nagios-plugins-2.3.1-r1.ebuild @@ -0,0 +1,113 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +DESCRIPTION="Official plugins for Nagios" +HOMEPAGE="http://nagios-plugins.org/" +SRC_URI="http://nagios-plugins.org/download/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ppc ~ppc64 ~sparc ~x86" +IUSE="ipv6 ldap libressl mysql nagios-dns nagios-ping nagios-game postgres radius samba selinux snmp ssh +ssl" + +# Most of the plugins use automagic dependencies, i.e. the plugin will +# get built if the binary it uses is installed. For example, check_snmp +# will be built only if snmpget from net-analyzer/net-snmp[-minimal] is +# installed. End result: most of our runtime dependencies are required +# at build time as well. +AUTOMAGIC_DEPEND=" + nagios-dns? ( net-dns/bind-tools ) + nagios-game? ( games-util/qstat ) + nagios-ping? ( net-analyzer/fping ) + samba? ( net-fs/samba ) + ssh? ( net-misc/openssh ) + snmp? ( dev-perl/Net-SNMP + net-analyzer/net-snmp[-minimal] )" + +# Perl really needs to run during the build... +BDEPEND="${AUTOMAGIC_DEPEND} + dev-lang/perl" + +DEPEND=" + ldap? ( net-nds/openldap ) + mysql? ( dev-db/mysql-connector-c ) + postgres? ( dev-db/postgresql:* ) + ssl? ( + !libressl? ( dev-libs/openssl:0 ) + libressl? ( dev-libs/libressl ) + ) + radius? ( net-dialup/freeradius-client )" + +# Basically everything in net-analyzer/monitoring-plugins collides with +# nagios-plugins. Perl (from BDEPEND) is needed at runtime, too. +RDEPEND="${BDEPEND} + ${DEPEND} + !net-analyzer/monitoring-plugins + selinux? ( sec-policy/selinux-nagios )" + +# At least one test is interactive. +RESTRICT="test" + +DOCS=( + ACKNOWLEDGEMENTS + AUTHORS + CODING + ChangeLog + FAQ + NEWS + README + REQUIREMENTS + SUPPORT + THANKS +) + +PATCHES=( "${FILESDIR}/define-own-mysql-port-constant.patch" ) + +src_prepare() { + default + + # Fix the path to our perl interpreter + sed -i -e "1s:/usr/local/bin/perl:/usr/bin/perl:" \ + "${S}"/plugins-scripts/*.pl \ + || die 'failed to fix perl interpreter path' +} + +src_configure() { + # Use an array to prevent econf from mangling the ping args. + local myconf=() + + if use ssl; then + myconf+=( $(use_with ssl openssl /usr) ) + else + myconf+=( --without-openssl ) + myconf+=( --without-gnutls ) + fi + + # The autodetection for these two commands can hang if localhost is + # down or ICMP traffic is filtered. Bug #468296. + myconf+=( --with-ping-command="/bin/ping -n -U -w %d -c %d %s" ) + + if use ipv6; then + myconf+=( --with-ping6-command="/bin/ping6 -n -U -w %d -c %d %s" ) + fi + + econf \ + $(use_with mysql) \ + $(use_with ipv6) \ + $(use_with ldap) \ + $(use_with postgres pgsql /usr) \ + $(use_with radius) \ + "${myconf[@]}" \ + --libexecdir="/usr/$(get_libdir)/nagios/plugins" \ + --sysconfdir="/etc/nagios" +} + +pkg_postinst() { + elog "This ebuild has a number of USE flags that determine what you" + elog "are able to monitor. Depending on what you want to monitor, some" + elog "or all of these USE flags need to be set." + elog + elog "The plugins are installed in ${ROOT}/usr/$(get_libdir)/nagios/plugins" +} diff --git a/net-analyzer/nagios/metadata.xml b/net-analyzer/nagios/metadata.xml new file mode 100644 index 000000000000..6b2a1dee81f8 --- /dev/null +++ b/net-analyzer/nagios/metadata.xml @@ -0,0 +1,26 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>mjo@gentoo.org</email> + <name>Michael Orlitzky</name> + </maintainer> + <maintainer type="project"> + <email>sysadmin@gentoo.org</email> + <name>Gentoo Sysadmin Project</name> + </maintainer> + <longdescription> + Nagios is a host and service monitor designed to inform you of + network problems before your clients, end-users or managers do. It + has been designed to run under the Linux operating system, but + works fine under most *NIX variants as well. The monitoring daemon + runs intermittent checks on hosts and services you specify using + external "plugins" which return status information to Nagios. When + problems are encountered, the daemon can send notifications out to + administrative contacts in a variety of different ways (email, + instant message, SMS, etc.). Current status information, + historical logs, and reports can all be accessed via a web + browser. + </longdescription> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/nagios/nagios-4.4.6.ebuild b/net-analyzer/nagios/nagios-4.4.6.ebuild new file mode 100644 index 000000000000..dfde78da41e9 --- /dev/null +++ b/net-analyzer/nagios/nagios-4.4.6.ebuild @@ -0,0 +1,15 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +DESCRIPTION="The Nagios metapackage" +HOMEPAGE="https://www.nagios.org/" + +LICENSE="metapackage" +SLOT="0" +KEYWORDS="~alpha amd64 ~arm ~arm64 ppc ppc64 sparc x86" +IUSE="" + +RDEPEND="~net-analyzer/nagios-core-${PV} + || ( net-analyzer/nagios-plugins net-analyzer/monitoring-plugins )" diff --git a/net-analyzer/nagircbot/Manifest b/net-analyzer/nagircbot/Manifest new file mode 100644 index 000000000000..9ff6ca97341f --- /dev/null +++ b/net-analyzer/nagircbot/Manifest @@ -0,0 +1 @@ +DIST nagircbot-0.0.33.tgz 20085 BLAKE2B d419d1a7bcad1164c74490db4fb8a66ccbb0c9fbc761fe2807fe12d74d05297af3f307f9686971f246c9308a1f9e02c879f4461c116c68f4f403bf59c3836f63 SHA512 1e4d69cef4a425e8540ff408688cf7899c04098ec47acbd6da601f48e01f808958982e7d8a1519934bd5aa895fe0f8dedc51d80460f85097355d5bdea79fd708 diff --git a/net-analyzer/nagircbot/files/conf b/net-analyzer/nagircbot/files/conf new file mode 100644 index 000000000000..79fc899e11bd --- /dev/null +++ b/net-analyzer/nagircbot/files/conf @@ -0,0 +1,2 @@ +# Put nagircbot arguments here +# BOTCONF="-f /var/nagios/status.dat -s irc.freenode.net:6667 -c channel -k password -n name" diff --git a/net-analyzer/nagircbot/files/init b/net-analyzer/nagircbot/files/init new file mode 100644 index 000000000000..c9cb5a3539bf --- /dev/null +++ b/net-analyzer/nagircbot/files/init @@ -0,0 +1,19 @@ +#!/sbin/openrc-run +# Copyright 1999-2004 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +depend() { + use net +} + +start() { + ebegin "Starting nagircbot" + start-stop-daemon --start -x /usr/bin/nagircbot -- $BOTCONF + eend $? "Failed to start nagircbot" +} + +stop() { + ebegin "Stopping nagircbot" + start-stop-daemon --stop -x /usr/bin/nagircbot + eend $? "Failed to stop nagircbot" +} diff --git a/net-analyzer/nagircbot/metadata.xml b/net-analyzer/nagircbot/metadata.xml new file mode 100644 index 000000000000..89c6731af25e --- /dev/null +++ b/net-analyzer/nagircbot/metadata.xml @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>sysadmin@gentoo.org</email> + <name>Gentoo Sysadmin Project</name> + </maintainer> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/nagircbot/nagircbot-0.0.33.ebuild b/net-analyzer/nagircbot/nagircbot-0.0.33.ebuild new file mode 100644 index 000000000000..6d748bc63809 --- /dev/null +++ b/net-analyzer/nagircbot/nagircbot-0.0.33.ebuild @@ -0,0 +1,41 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +inherit toolchain-funcs + +DESCRIPTION="An irc bot that alerts you to nagios changes" +HOMEPAGE="http://www.vanheusden.com/nagircbot" +SRC_URI="http://www.vanheusden.com/nagircbot/${P}.tgz" + +LICENSE="GPL-2" # GPL-2 only +SLOT="0" +KEYWORDS="~amd64 ~ppc ~x86" +IUSE="libressl" + +CDEPEND=" + !libressl? ( dev-libs/openssl:0= ) + libressl? ( dev-libs/libressl:0= )" +DEPEND="virtual/pkgconfig + ${CDEPEND}" +RDEPEND="net-analyzer/nagios-core + ${CDEPEND}" + +src_prepare() { +cp -av Makefile{,.org} + sed -i Makefile \ + -e 's:-lcrypto -lssl:$(shell pkg-config --libs openssl):g' \ + -e 's:-O2::g;s:-g::g' \ + || die +} + +src_compile() { + emake CC=$(tc-getCC) CXX=$(tc-getCXX) +} + +src_install() { + dobin nagircbot + newconfd "${FILESDIR}"/conf nagircbot + newinitd "${FILESDIR}"/init nagircbot +} diff --git a/net-analyzer/nagstamon/Manifest b/net-analyzer/nagstamon/Manifest new file mode 100644 index 000000000000..5939b337c395 --- /dev/null +++ b/net-analyzer/nagstamon/Manifest @@ -0,0 +1,4 @@ +DIST Nagstamon-2.0.1.tar.gz 535814 BLAKE2B f366a0b5d2f2e4c7168bbb996b68aea7f9ea2f248c25505f8e2ca553d4c275260eec8fdad27b7c1187826cca0cebc7c027491a4f7b6acb24ddf604b6b6a8a930 SHA512 f9c8ab928a78f289693ae58cd3dde6fa75dd66dc931dbec6a4affc35bd96f16c39a03cb441575c9ca42e810ae5962fc7226513b8cc2a17871e0365aa3a207db6 +DIST Nagstamon-3.0.2.tar.gz 542005 BLAKE2B 090875cabbf22feea5cfe0eab0934b503d68df0f49c0a2e8056ccfed8251f278e149da5d0f8002cc5c96ffddd5b89a3ad997d90790e33c9cf1b9ffd9e32a83c0 SHA512 8b05b74adc7399b84cfb66d4c55ff80b2a37af7612496578bdc72ce00f712c8eae087204d00e7d7f1e1d35377f7bb8460d5cf337e315943a48a4ad5108e8d14f +DIST Nagstamon-3.2.1.tar.gz 545190 BLAKE2B ce8b6624a3b1b61e307281ba193d07850bd5d104205d21e2967c1f65c0fdb217be2b2422d0312cfccaba766b814cb1f298a2ed62d07b7377530fd2ef3200a46f SHA512 c3ddda8d046d08514f7633b9129abebdc039e7faee5a618ef8ef77fc2c518bad798572fb549eb9ab9ef96377cd390e159934f268d9bd97c071c4895682bff8e6 +DIST Nagstamon-3.4.1.tar.gz 563745 BLAKE2B 3ac35c90757eb525e7e7953f63a8798a0087470e4a94161987f3c382b6be43240aa8b5c44f279d23d841dbf9e4536f38d3f5e2f63234538a00fe6b6e0ee9c680 SHA512 68f8a7345c606b8ad4511b34e2d76383faf8831202c9429ab24eeb215073984f00f580c83a7f5e348f7d4104d3c82bd6f4661939801444e463c3fcf64c8240bd diff --git a/net-analyzer/nagstamon/files/nagstamon-2.0-setup.patch b/net-analyzer/nagstamon/files/nagstamon-2.0-setup.patch new file mode 100644 index 000000000000..3a58227e0144 --- /dev/null +++ b/net-analyzer/nagstamon/files/nagstamon-2.0-setup.patch @@ -0,0 +1,25 @@ +diff --git a/setup.py b/setup.py +index 467bb42..24644a3 100644 +--- a/setup.py ++++ b/setup.py +@@ -35,7 +35,7 @@ if platform.system() not in ['Windows', 'Darwin']: + NAME = NAME.lower() + VERSION = AppInfo.VERSION + +-NAGSTAMON_SCRIPT = 'nagstamon.py' ++NAGSTAMON_SCRIPT = 'nagstamon' + + # workaround to get directory of Qt5 plugins to add missing 'mediaservice' folder needed for audio on OSX and Windows + import os.path +@@ -134,10 +134,7 @@ setup(name=NAME, + 'Nagstamon.thirdparty.Xlib.ext', + 'Nagstamon.thirdparty.Xlib.protocol', + 'Nagstamon.thirdparty.Xlib.support', +- 'Nagstamon.thirdparty.Xlib.xobject', +- 'Nagstamon.thirdparty.keyring', +- 'Nagstamon.thirdparty.keyring.backends', +- 'Nagstamon.thirdparty.keyring.util'], ++ 'Nagstamon.thirdparty.Xlib.xobject',], + package_dir={'Nagstamon':'Nagstamon'}, + package_data={'Nagstamon':['resources/*']}, + data_files=[('%s/share/man/man1' % sys.prefix, ['Nagstamon/resources/nagstamon.1.gz']), diff --git a/net-analyzer/nagstamon/files/nagstamon-3.0-setup.patch b/net-analyzer/nagstamon/files/nagstamon-3.0-setup.patch new file mode 100644 index 000000000000..26bb22fec4df --- /dev/null +++ b/net-analyzer/nagstamon/files/nagstamon-3.0-setup.patch @@ -0,0 +1,27 @@ +diff --git a/setup.py b/setup.py +index 267ced2..538c5bb 100644 +--- a/setup.py ++++ b/setup.py +@@ -37,7 +37,7 @@ if OS not in ['Windows', 'Darwin']: + NAME = NAME.lower() + VERSION = AppInfo.VERSION.replace('-', '.') + '.' + DIST + DIST_VERSION + +-NAGSTAMON_SCRIPT = 'nagstamon.py' ++NAGSTAMON_SCRIPT = 'nagstamon' + + # workaround to get directory of Qt5 plugins to add missing 'mediaservice' folder needed for audio on OSX and Windows + from PyQt5 import QtCore +@@ -130,12 +130,7 @@ setup(name=NAME, + packages=['Nagstamon', + 'Nagstamon.QUI', + 'Nagstamon.Servers', +- 'Nagstamon.thirdparty', +- 'Nagstamon.thirdparty.Xlib', +- 'Nagstamon.thirdparty.Xlib.ext', +- 'Nagstamon.thirdparty.Xlib.protocol', +- 'Nagstamon.thirdparty.Xlib.support', +- 'Nagstamon.thirdparty.Xlib.xobject'], ++ 'Nagstamon.thirdparty',], + package_dir={'Nagstamon': 'Nagstamon'}, + package_data={'Nagstamon': ['resources/*']}, + data_files=[('%s/share/man/man1' % sys.prefix, ['Nagstamon/resources/nagstamon.1.gz']), diff --git a/net-analyzer/nagstamon/metadata.xml b/net-analyzer/nagstamon/metadata.xml new file mode 100644 index 000000000000..9127ccd8d449 --- /dev/null +++ b/net-analyzer/nagstamon/metadata.xml @@ -0,0 +1,17 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>idl0r@gentoo.org</email> + <name>Christian Ruppert</name> + </maintainer> + <maintainer type="project"> + <email>sysadmin@gentoo.org</email> + <name>Gentoo Sysadmin Project</name> + </maintainer> + <upstream> + <remote-id type="sourceforge">nagstamon</remote-id> + <remote-id type="github">HenriWahl/nagstamon</remote-id> + </upstream> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/nagstamon/nagstamon-2.0.1.ebuild b/net-analyzer/nagstamon/nagstamon-2.0.1.ebuild new file mode 100644 index 000000000000..9e0174ed0c60 --- /dev/null +++ b/net-analyzer/nagstamon/nagstamon-2.0.1.ebuild @@ -0,0 +1,46 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI="6" + +PYTHON_COMPAT=( python3_6 ) + +inherit eutils python-r1 distutils-r1 + +MY_PN="Nagstamon" +MY_P="${MY_PN}-${PV/_}" + +DESCRIPTION="Nagstamon is a systray monitor for displaying realtime status of a Nagios box" +HOMEPAGE="http://nagstamon.sourceforge.net" +SRC_URI="mirror://sourceforge/${PN}/${MY_P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="amd64 x86" +IUSE="" +REQUIRED_USE="${PYTHON_REQUIRED_USE}" + +# TODO: secretstorage +# TODO: Xlib - https://github.com/python-xlib/python-xlib/tree/master/Xlib +RDEPEND="${PYTHON_DEPS} + dev-python/PyQt5[gui,multimedia,svg,widgets,${PYTHON_USEDEP}] + dev-python/beautifulsoup:4[${PYTHON_USEDEP}] + dev-python/dbus-python[${PYTHON_USEDEP}] + dev-python/keyring[${PYTHON_USEDEP}] + dev-python/requests[${PYTHON_USEDEP}] + dev-python/psutil[${PYTHON_USEDEP}]" +DEPEND="${RDEPEND} + dev-python/setuptools[${PYTHON_USEDEP}]" + +S="${WORKDIR}/${MY_PN}" + +PATCHES="${FILESDIR}/${PN}-2.0-setup.patch" + +src_prepare() { + default + + mv ${PN}.py ${PN} || die + +# rm -rf "${S}/Nagstamon/thirdparty/Xlib/" || die + rm -rf "${S}/Nagstamon/thirdparty/keyring/" || die +} diff --git a/net-analyzer/nagstamon/nagstamon-3.0.2-r1.ebuild b/net-analyzer/nagstamon/nagstamon-3.0.2-r1.ebuild new file mode 100644 index 000000000000..e3878f27c7c5 --- /dev/null +++ b/net-analyzer/nagstamon/nagstamon-3.0.2-r1.ebuild @@ -0,0 +1,49 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI="6" + +PYTHON_COMPAT=( python3_6 ) + +inherit eutils python-r1 distutils-r1 + +MY_PN="Nagstamon" +MY_P="${MY_PN}-${PV/_p/-}" + +DESCRIPTION="status monitor for the desktop" +DESCRIPTION="systray monitor for displaying realtime status of several monitoring systems" +HOMEPAGE="https://nagstamon.ifw-dresden.de" +SRC_URI="https://nagstamon.ifw-dresden.de/files/stable/${MY_P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="" +REQUIRED_USE="${PYTHON_REQUIRED_USE}" + +RDEPEND="${PYTHON_DEPS} + dev-python/lxml[${PYTHON_USEDEP}] + dev-python/PyQt5[gui,multimedia,svg,widgets,${PYTHON_USEDEP}] + dev-python/beautifulsoup:4[${PYTHON_USEDEP}] + dev-python/dbus-python[${PYTHON_USEDEP}] + dev-python/keyring[${PYTHON_USEDEP}] + dev-python/requests[${PYTHON_USEDEP}] + dev-python/psutil[${PYTHON_USEDEP}] + dev-python/cryptography[${PYTHON_USEDEP}] + dev-python/secretstorage[${PYTHON_USEDEP}] + >=dev-python/python-xlib-0.19[${PYTHON_USEDEP}] + dev-python/requests-kerberos[${PYTHON_USEDEP}]" +DEPEND="${RDEPEND} + dev-python/setuptools[${PYTHON_USEDEP}]" + +S="${WORKDIR}/${MY_PN}" + +PATCHES="${FILESDIR}/${PN}-3.0-setup.patch" + +src_prepare() { + default_src_prepare + + mv ${PN}.py ${PN} || die + + rm -rf "${S}/Nagstamon/thirdparty/Xlib/" || die +} diff --git a/net-analyzer/nagstamon/nagstamon-3.2.1.ebuild b/net-analyzer/nagstamon/nagstamon-3.2.1.ebuild new file mode 100644 index 000000000000..9f9c756c602f --- /dev/null +++ b/net-analyzer/nagstamon/nagstamon-3.2.1.ebuild @@ -0,0 +1,53 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI="6" + +PYTHON_COMPAT=( python3_6 ) + +inherit eutils python-r1 distutils-r1 + +MY_PN="Nagstamon" +MY_P="${MY_PN}-${PV/_p/-}" + +DESCRIPTION="status monitor for the desktop" +DESCRIPTION="systray monitor for displaying realtime status of several monitoring systems" +HOMEPAGE="https://nagstamon.ifw-dresden.de" +SRC_URI="https://nagstamon.ifw-dresden.de/files/stable/${MY_P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="" +REQUIRED_USE="${PYTHON_REQUIRED_USE}" + +RDEPEND="${PYTHON_DEPS} + dev-python/lxml[${PYTHON_USEDEP}] + dev-python/PyQt5[gui,multimedia,svg,widgets,${PYTHON_USEDEP}] + dev-python/beautifulsoup:4[${PYTHON_USEDEP}] + dev-python/dbus-python[${PYTHON_USEDEP}] + dev-python/keyring[${PYTHON_USEDEP}] + dev-python/requests[${PYTHON_USEDEP}] + dev-python/psutil[${PYTHON_USEDEP}] + dev-python/cryptography[${PYTHON_USEDEP}] + dev-python/secretstorage[${PYTHON_USEDEP}] + >=dev-python/python-xlib-0.19[${PYTHON_USEDEP}] + dev-python/requests-kerberos[${PYTHON_USEDEP}]" +DEPEND="${RDEPEND} + dev-python/setuptools[${PYTHON_USEDEP}]" + +S="${WORKDIR}/${MY_PN}" + +PATCHES="${FILESDIR}/${PN}-3.0-setup.patch" + +src_prepare() { + default_src_prepare + + # pre-compressed already + rm Nagstamon/resources/nagstamon.1.gz || die + sed -i -e 's:\(nagstamon\.1\)\.gz:\1:' setup.py || die + + mv ${PN}.py ${PN} || die + + rm -rf "${S}/Nagstamon/thirdparty/Xlib/" || die +} diff --git a/net-analyzer/nagstamon/nagstamon-3.4.1.ebuild b/net-analyzer/nagstamon/nagstamon-3.4.1.ebuild new file mode 100644 index 000000000000..9f9c756c602f --- /dev/null +++ b/net-analyzer/nagstamon/nagstamon-3.4.1.ebuild @@ -0,0 +1,53 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI="6" + +PYTHON_COMPAT=( python3_6 ) + +inherit eutils python-r1 distutils-r1 + +MY_PN="Nagstamon" +MY_P="${MY_PN}-${PV/_p/-}" + +DESCRIPTION="status monitor for the desktop" +DESCRIPTION="systray monitor for displaying realtime status of several monitoring systems" +HOMEPAGE="https://nagstamon.ifw-dresden.de" +SRC_URI="https://nagstamon.ifw-dresden.de/files/stable/${MY_P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="" +REQUIRED_USE="${PYTHON_REQUIRED_USE}" + +RDEPEND="${PYTHON_DEPS} + dev-python/lxml[${PYTHON_USEDEP}] + dev-python/PyQt5[gui,multimedia,svg,widgets,${PYTHON_USEDEP}] + dev-python/beautifulsoup:4[${PYTHON_USEDEP}] + dev-python/dbus-python[${PYTHON_USEDEP}] + dev-python/keyring[${PYTHON_USEDEP}] + dev-python/requests[${PYTHON_USEDEP}] + dev-python/psutil[${PYTHON_USEDEP}] + dev-python/cryptography[${PYTHON_USEDEP}] + dev-python/secretstorage[${PYTHON_USEDEP}] + >=dev-python/python-xlib-0.19[${PYTHON_USEDEP}] + dev-python/requests-kerberos[${PYTHON_USEDEP}]" +DEPEND="${RDEPEND} + dev-python/setuptools[${PYTHON_USEDEP}]" + +S="${WORKDIR}/${MY_PN}" + +PATCHES="${FILESDIR}/${PN}-3.0-setup.patch" + +src_prepare() { + default_src_prepare + + # pre-compressed already + rm Nagstamon/resources/nagstamon.1.gz || die + sed -i -e 's:\(nagstamon\.1\)\.gz:\1:' setup.py || die + + mv ${PN}.py ${PN} || die + + rm -rf "${S}/Nagstamon/thirdparty/Xlib/" || die +} diff --git a/net-analyzer/nagtrap/Manifest b/net-analyzer/nagtrap/Manifest new file mode 100644 index 000000000000..266183959c29 --- /dev/null +++ b/net-analyzer/nagtrap/Manifest @@ -0,0 +1 @@ +DIST nagtrap-0.1.3.tar.gz 141934 BLAKE2B 296f6688fd973adb7e8ff5879cbeccc17ae9acb685f55a2fb20c49281909f60270f66eff5083260c1bb8717762ad0cf9994134e165c2859251cbab97c3e2d188 SHA512 4603157beb35850a6f8b69919cd0ce8f108e6de8e85711b9c18665b69f91082d6703da396b1170633172cef630c2f3d73b717f1893cb4da6b6d15a3f577d445a diff --git a/net-analyzer/nagtrap/metadata.xml b/net-analyzer/nagtrap/metadata.xml new file mode 100644 index 000000000000..d85b4252fc33 --- /dev/null +++ b/net-analyzer/nagtrap/metadata.xml @@ -0,0 +1,6 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<!-- maintainer-needed --> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/nagtrap/nagtrap-0.1.3-r1.ebuild b/net-analyzer/nagtrap/nagtrap-0.1.3-r1.ebuild new file mode 100644 index 000000000000..a287f19e46bc --- /dev/null +++ b/net-analyzer/nagtrap/nagtrap-0.1.3-r1.ebuild @@ -0,0 +1,44 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +DESCRIPTION="Integrated snmptt visualization addon for the Nagios monitoring system" +HOMEPAGE="http://www.nagtrap.org/" +SRC_URI="http://www.nagiosforge.org/gf/download/frsrelease/126/252/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~ppc ~x86" +IUSE="" + +DEPEND="virtual/httpd-php" +RDEPEND="dev-lang/php[mysql] + net-analyzer/snmptt[mysql] + net-analyzer/nagios-core + virtual/httpd-php" + +src_install() { + dodoc ChangeLog THANKS + + dodir /usr/share/nagtrap + cp -r {db,nagtrap} "${D}"/usr/share/nagtrap/ + fperms 640 "${D}"/usr/share/nagtrap/nagtrap/etc/config.ini.php-dist + + sed -i -e 's#use lib.*#use lib "/usr/lib/nagios/plugins";#g' \ + plugin/check_snmptraps.pl || die "sed failed" + + insinto /usr/$(get_libdir)/nagios/plugins + insopts -m 750 -g nagios + doins plugin/check_snmptraps.pl +} + +pkg_postinst() { + elog "Before running NagTrap for the first time, you will need setup its configuration" + elog "/usr/share/nagtrap/nagtrap/etc/config.ini.php" + elog "A sample is installed in" + elog "/usr/share/nagtrap/nagtrap/etc/config.ini.php-sample" + elog + elog "NagTrap requires snmptt to write traps into a MySQL database." + elog "A database schema is available in {$D}usr/share/nagtrap/db" +} diff --git a/net-analyzer/nast/Manifest b/net-analyzer/nast/Manifest new file mode 100644 index 000000000000..89294fc11f3a --- /dev/null +++ b/net-analyzer/nast/Manifest @@ -0,0 +1 @@ +DIST nast-0.2.0.tar.gz 147568 BLAKE2B f51a0b3cebfac04cb3aa57f627099aecf893722ca8552c0e6f7f67266e13729e5c54c533cd7599c6d7cfa50c89ad5181439d4c1bc5bba883438213b45b4221ee SHA512 fbf29f9c2ae783e38d40054577a697f631c6590075ef80aa970002f1133c681a4cc1fcd715bc6140cc361c609dcebe8c6bf74544e8710363d30649398b3e388c diff --git a/net-analyzer/nast/files/nast-0.2.0-gentoo.patch b/net-analyzer/nast/files/nast-0.2.0-gentoo.patch new file mode 100644 index 000000000000..015354e51862 --- /dev/null +++ b/net-analyzer/nast/files/nast-0.2.0-gentoo.patch @@ -0,0 +1,104 @@ +--- a/configure.ac ++++ b/configure.ac +@@ -83,22 +83,6 @@ + # -- libnet -- + # + +-filechk="yes" +-AC_CHECK_FILE(/usr/lib/libnet.a,, filechk="no") +-if test "$filechk" = "no"; then +- AC_CHECK_FILE(/usr/local/lib/libnet.a, filechk="yes" ; LDFLAGS="-L/usr/local/lib"; CPPFLAGS="-I/usr/local/include") +-fi +- +-if test "$filechk" = "no"; then AC_MSG_ERROR([ +- +-Libnet archive file (libnet.a) not found in /usr or /usr/local! +- +-Libnet-1.1.x Packet Shaping Library is required. +-You can download it from official web site: http://www.packetfactory.net/libnet +- +-]) +-fi +- + AC_CHECK_LIB(net, libnet_name2addr4,, AC_MSG_ERROR([ + + Libnet-1.1.x Packet Shaping Library not found! It's required. +@@ -110,22 +94,6 @@ + # -- libpcap -- + # + +-filechk="yes" +-AC_CHECK_FILE(/usr/lib/libpcap.a,, filechk="no") +-if test "$filechk" = "no"; then +- AC_CHECK_FILE(/usr/local/lib/libpcap.a, filechk="yes" ; LDFLAGS="-L/usr/local/lib"; CPPFLAGS="-I/usr/local/include") +-fi +- +-if test "$filechk" = "no"; then AC_MSG_ERROR([ +- +-Libpcap archive file (libpcap.a) not found in /usr or /usr/local! +- +-Libpcap-0.7.1 Packet Capture Library is required. +-You can download it from official web site: http://www.tcpdump.org/#current +- +-]) +-fi +- + AC_CHECK_LIB(pcap, pcap_dispatch,, AC_MSG_ERROR([ + + Libpcap-0.7.1 Packet Capture Library not found! It's required. +@@ -137,25 +105,7 @@ + # -- libncurses support -- + # + +-filechk="yes" +-AC_CHECK_FILE(/usr/lib/libncurses.a,, filechk="no") +-if test "$filechk" = "no"; then +- AC_CHECK_FILE(/usr/local/lib/libncurses.a, filechk="yes" ; LDFLAGS="-L/usr/local/lib"; CPPFLAGS="-I/usr/local/include") +-fi +- +-if test "$filechk" = "no"; +-then AC_MSG_WARN([ +- +-Libncurses archive file (libncurses.a) not found in /usr or /usr/local! +- +-Ncurses library (*) not found in your system. +-You can download it from official web site: http://www.gnu.org/software/ncurses/ncurses.html +-(*): CRT screen handling and optimization package +- +-Building without ncurses menu support (-G flag will doesn't work) +- +-]) +-fi ++PKG_CHECK_MODULES(ncurses,ncurses,[LIBS="$LIBS $ncurses_LIBS"],) + + ENABLE_NCRS="no" + AC_CHECK_LIB(ncurses, initscr, ENABLE_NCRS="yes"; NCURSES=ncurses/n_nast.o; LIBS="-lncurses $LIBS"; AC_DEFINE(HAVE_LIBNCURSES), AC_MSG_RESULT([ +@@ -173,28 +123,6 @@ + # --lmenu support-- + # + +-filechk="yes" +-AC_CHECK_FILE(/usr/lib/libmenu.a,, filechk="no") +-if test "$filechk" = "no"; then +- AC_CHECK_FILE(/usr/local/lib/libmenu.a, filechk="yes" ; LDFLAGS="-L/usr/local/lib"; CPPFLAGS="-I/usr/local/include") +-fi +- +-if test "$filechk" = "no"; +-then AC_MSG_WARN([ +- +-Menu archive file (libncurses.a) not found in /usr or /usr/local! +- +- +-Menu library (*) not found in your system. +-You can download it from official web site: http://www.gnu.org/software/ncurses/ncurses.html +-(*): CRT screen handling and optimization package +- +- +-Building without ncurses menu support (-G flag will doesn't work) +-]) +- +-fi +- + ENABLE_NCRS="no" + AC_CHECK_LIB(menu, menu_opts_off, ENABLE_NCRS="yes"; MENU=ncurses/n_menu.o; LIBS="-lmenu $LIBS"; AC_DEFINE(HAVE_LIBMENU), AC_MSG_RESULT([ + diff --git a/net-analyzer/nast/metadata.xml b/net-analyzer/nast/metadata.xml new file mode 100644 index 000000000000..f30caab000b6 --- /dev/null +++ b/net-analyzer/nast/metadata.xml @@ -0,0 +1,12 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>netmon@gentoo.org</email> + <name>Gentoo network monitoring and analysis project</name> + </maintainer> + <upstream> + <remote-id type="sourceforge">nast.berlios</remote-id> + </upstream> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/nast/nast-0.2.0-r1.ebuild b/net-analyzer/nast/nast-0.2.0-r1.ebuild new file mode 100644 index 000000000000..9eefa451cd9c --- /dev/null +++ b/net-analyzer/nast/nast-0.2.0-r1.ebuild @@ -0,0 +1,38 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 +inherit autotools eutils + +DESCRIPTION="NAST - Network Analyzer Sniffer Tool" +HOMEPAGE="https://sourceforge.net/projects/nast.berlios/" +SRC_URI="mirror://sourceforge/${PN}.berlios/${P}.tar.gz" +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~ppc ~ppc64 x86" +IUSE="ncurses" + +RDEPEND=" + >=net-libs/libnet-1.1.1 + net-libs/libpcap + ncurses? ( >=sys-libs/ncurses-5.4:= ) +" +DEPEND=" + ${RDEPEND} + virtual/pkgconfig +" + +src_prepare() { + epatch "${FILESDIR}"/${P}-gentoo.patch + eautoreconf +} + +src_compile() { + emake CFLAGS="${CFLAGS}" +} + +src_install() { + dosbin nast + doman nast.8 + dodoc AUTHORS BUGS CREDITS ChangeLog NCURSES_README README TODO +} diff --git a/net-analyzer/nast/nast-0.2.0-r2.ebuild b/net-analyzer/nast/nast-0.2.0-r2.ebuild new file mode 100644 index 000000000000..b2e8f7dd0342 --- /dev/null +++ b/net-analyzer/nast/nast-0.2.0-r2.ebuild @@ -0,0 +1,46 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 +inherit autotools flag-o-matic + +DESCRIPTION="NAST - Network Analyzer Sniffer Tool" +HOMEPAGE="https://sourceforge.net/projects/nast.berlios/" +SRC_URI="mirror://sourceforge/${PN}.berlios/${P}.tar.gz" +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~ppc ~ppc64 ~x86" +IUSE="ncurses" + +RDEPEND=" + >=net-libs/libnet-1.1.1 + net-libs/libpcap + ncurses? ( >=sys-libs/ncurses-5.4:= ) +" +DEPEND=" + ${RDEPEND} + virtual/pkgconfig +" +PATCHES=( + "${FILESDIR}"/${P}-gentoo.patch +) + +src_prepare() { + default + eautoreconf +} + +src_configure() { + append-cflags -fcommon + default +} + +src_compile() { + emake CFLAGS="${CFLAGS}" +} + +src_install() { + dosbin nast + doman nast.8 + dodoc AUTHORS BUGS CREDITS ChangeLog NCURSES_README README TODO +} diff --git a/net-analyzer/nbtscan/Manifest b/net-analyzer/nbtscan/Manifest new file mode 100644 index 000000000000..fb0740d0dcf2 --- /dev/null +++ b/net-analyzer/nbtscan/Manifest @@ -0,0 +1,2 @@ +DIST nbtscan-1.5.1.tar.gz 82107 BLAKE2B dd49ee25995c522f3cf75e35cca427be7a2b5e697b374323b0be4c6a92a2a96c9e30ca1844e953354f3490ed4090682592e1c0ea5192512b2883b1085356783f SHA512 2e2ac6a3ce7b188552c4f5f82b1e2bb99049bd0cd6f69361c59066c0b262d9311186aabc0c03c3096b7d2c48276052b1ddf230eba43051e221019c9bf223ae3e +DIST nbtscan-1.6.tar.gz 27290 BLAKE2B 3e38e946aa875be2bca8ad0155a5bf4c612cecda3761623d75657b2ab54aa7a7526d284a78db764518748e092c2719a4c02bcdce32095c87537c9979571c10f7 SHA512 b791357160ae7fe784ebf3b74df551c0b7dcaeefae2ddd585a9e5ac0fe7dd1bb32f00d2b898dcd700e74809708f42fc8e5f0022254e1282914b3f668564b4bcb diff --git a/net-analyzer/nbtscan/files/nbtscan-1.5.1-gentoo.patch b/net-analyzer/nbtscan/files/nbtscan-1.5.1-gentoo.patch new file mode 100644 index 000000000000..dbf2457bc29f --- /dev/null +++ b/net-analyzer/nbtscan/files/nbtscan-1.5.1-gentoo.patch @@ -0,0 +1,15 @@ +--- a/Makefile.in ++++ b/Makefile.in +@@ -11,10 +11,10 @@ + BINDIR = @bindir@ + + nbtscan: $(OBJECTS) +- $(CC) $(CFLAGS) -o nbtscan $(OBJECTS) $(LIBS) ++ $(CC) $(CFLAGS) $(LDFLAGS) -o nbtscan $(OBJECTS) $(LIBS) + + install: +- $(INSTALL) $(TARGET) $(BINDIR)/$(TARGET) ++ $(INSTALL) $(TARGET) $(DESTDIR)/$(BINDIR)/$(TARGET) + + nbtscan.o: nbtscan.c statusq.h range.h list.h + $(CC) $(CFLAGS) $(DEFS) -c nbtscan.c diff --git a/net-analyzer/nbtscan/files/nbtscan-1.5.1-includes-declarations.patch b/net-analyzer/nbtscan/files/nbtscan-1.5.1-includes-declarations.patch new file mode 100644 index 000000000000..a585d4495fb5 --- /dev/null +++ b/net-analyzer/nbtscan/files/nbtscan-1.5.1-includes-declarations.patch @@ -0,0 +1,42 @@ +--- a/list.h ++++ b/list.h +@@ -19,3 +19,5 @@ + int compare(struct list_item* item1, struct list_item* item2); + + int insert(struct list* lst, unsigned long content); ++ ++int in_list(struct list* lst, unsigned long content); +--- a/nbtscan.c ++++ b/nbtscan.c +@@ -5,6 +5,8 @@ + #include <stdlib.h> + #include <sys/time.h> + #include <string.h> ++#include <ctype.h> ++#include <unistd.h> + #if HAVE_STDINT_H + #include <stdint.h> + #endif +--- a/statusq.h ++++ b/statusq.h +@@ -103,4 +103,10 @@ + char* service_name; + } nb_service_t ; + ++char* getnbservicename(my_uint8_t service, int unique, char* name); ++ ++struct nb_host_info* parse_response(char* buff, int buffsize); ++ ++int send_query(int sock, struct in_addr dest_addr, my_uint32_t rtt_base); ++ + #endif /* STATUSQ_H */ +--- a/statusq.c ++++ b/statusq.c +@@ -29,6 +29,7 @@ + #include <sys/time.h> + #include "statusq.h" + #include <string.h> ++#include <ctype.h> + #include <stdio.h> + #include <stddef.h> + #include "errors.h" diff --git a/net-analyzer/nbtscan/files/nbtscan-1.5.1-script-whitespace.patch b/net-analyzer/nbtscan/files/nbtscan-1.5.1-script-whitespace.patch new file mode 100644 index 000000000000..4aca976dcd38 --- /dev/null +++ b/net-analyzer/nbtscan/files/nbtscan-1.5.1-script-whitespace.patch @@ -0,0 +1,119 @@ +--- a/nbtscan.c ++++ b/nbtscan.c +@@ -86,7 +86,7 @@ + int d_print_hostinfo(struct in_addr addr, const struct nb_host_info* hostinfo) { + int i; + unsigned char service; /* 16th byte of NetBIOS name */ +- char name[16]; ++ char comp_name[16]; + + printf("\nPacket dump for Host %s:\n\n", inet_ntoa(addr)); + if(hostinfo->is_broken) printf("Incomplete packet, %d bytes long.\n", hostinfo->is_broken); +@@ -110,9 +110,9 @@ + printf("Names received:\n"); + for(i=0; i< hostinfo->header->number_of_names; i++) { + service = hostinfo->names[i].ascii_name[15]; +- strncpy(name, hostinfo->names[i].ascii_name, 15); +- name[16]=0; +- printf("%-17s Service: 0x%02x Flags: 0x%04x\n", name, service, hostinfo->names[i].rr_flags); ++ strncpy(comp_name, hostinfo->names[i].ascii_name, 15); ++ comp_name[15]=0; ++ printf("%-17s Service: 0x%02x Flags: 0x%04x\n", comp_name, service, hostinfo->names[i].rr_flags); + } + }; + +@@ -147,9 +147,9 @@ + + + int v_print_hostinfo(struct in_addr addr, const struct nb_host_info* hostinfo, char* sf, int hr) { +- int i, unique; ++ int i, j, unique; + my_uint8_t service; /* 16th byte of NetBIOS name */ +- char name[16]; ++ char comp_name[16]; + char* sname; + + if(!sf) { +@@ -163,20 +163,27 @@ + if(hostinfo->header && hostinfo->names) { + for(i=0; i< hostinfo->header->number_of_names; i++) { + service = hostinfo->names[i].ascii_name[15]; +- strncpy(name, hostinfo->names[i].ascii_name, 15); +- name[16]=0; ++ strncpy(comp_name, hostinfo->names[i].ascii_name, 15); ++ ++ // Eliminate trailing spaces ++ for(j=0; j < 15; j++) { ++ if (comp_name[j] == ' ') ++ break; ++ } ++ comp_name[j] = 0; ++ + unique = !(hostinfo->names[i].rr_flags & 0x0080); + if(sf) { +- printf("%s%s%s%s", inet_ntoa(addr), sf, name, sf); +- if(hr) printf("%s\n", (char*)getnbservicename(service, unique, name)); ++ printf("%s%s%s%s", inet_ntoa(addr), sf, comp_name, sf); ++ if(hr) printf("%s\n", (char*)getnbservicename(service, unique, comp_name)); + else { + printf("%02x", service); + if(unique) printf("U\n"); + else printf("G\n"); + } + } else { +- printf("%-17s", name); +- if(hr) printf("%s\n", (char*)getnbservicename(service, unique, name)); ++ printf("%-17s", comp_name); ++ if(hr) printf("%s\n", (char*)getnbservicename(service, unique, comp_name)); + else { + printf("<%02x>", service); + if(unique) printf(" UNIQUE\n"); +@@ -199,7 +206,7 @@ + }; + + int print_hostinfo(struct in_addr addr, struct nb_host_info* hostinfo, char* sf) { +- int i; ++ int i,j; + unsigned char service; /* 16th byte of NetBIOS name */ + char comp_name[16], user_name[16]; + int is_server=0; +@@ -215,7 +222,13 @@ + if(service == 0 && unique && first_name) { + /* Unique name, workstation service - this is computer name */ + strncpy(comp_name, hostinfo->names[i].ascii_name, 15); +- comp_name[15] = 0; ++ ++ // Eliminate trailing spaces ++ for(j=0; j < 15; j++) { ++ if (comp_name[j] == ' ') ++ break; ++ } ++ comp_name[j] = 0; + first_name = 0; + }; + if(service == 0x20 && unique) { +@@ -252,7 +265,7 @@ + /* If l is true adds #PRE to each line of output (for lmhosts) */ + + int l_print_hostinfo(struct in_addr addr, struct nb_host_info* hostinfo, int l) { +- int i; ++ int i,j; + unsigned char service; /* 16th byte of NetBIOS name */ + char comp_name[16]; + int is_server=0; +@@ -268,7 +281,13 @@ + if(service == 0 && unique && first_name) { + /* Unique name, workstation service - this is computer name */ + strncpy(comp_name, hostinfo->names[i].ascii_name, 15); +- comp_name[15]=0; ++ ++ // Eliminate trailing spaces ++ for(j=0; j < 15; j++) { ++ if (comp_name[j] == ' ') ++ break; ++ } ++ comp_name[j] = 0; + first_name = 0; + }; + }; + diff --git a/net-analyzer/nbtscan/metadata.xml b/net-analyzer/nbtscan/metadata.xml new file mode 100644 index 000000000000..bd13a914477c --- /dev/null +++ b/net-analyzer/nbtscan/metadata.xml @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<maintainer type="project"> + <email>netmon@gentoo.org</email> + <name>Gentoo network monitoring and analysis project</name> +</maintainer> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/nbtscan/nbtscan-1.5.1-r3.ebuild b/net-analyzer/nbtscan/nbtscan-1.5.1-r3.ebuild new file mode 100644 index 000000000000..a7ad294434ed --- /dev/null +++ b/net-analyzer/nbtscan/nbtscan-1.5.1-r3.ebuild @@ -0,0 +1,29 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +inherit eutils + +DESCRIPTION="NBTscan is a program for scanning IP networks for NetBIOS name information" +HOMEPAGE="http://www.inetcat.net/software/nbtscan.html" +SRC_URI="http://www.sourcefiles.org/Networking/Tools/Miscellanenous/${P}.tar.gz" +SRC_URI="http://www.inetcat.net/software/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="amd64 ppc x86 ~amd64-linux ~x86-linux ~ppc-macos" + +S=${WORKDIR}/${P}a + +src_prepare() { + epatch \ + "${FILESDIR}"/${P}-includes-declarations.patch \ + "${FILESDIR}"/${P}-gentoo.patch \ + "${FILESDIR}"/${P}-script-whitespace.patch +} + +src_install() { + dobin ${PN} + dodoc ChangeLog README +} diff --git a/net-analyzer/nbtscan/nbtscan-1.6.ebuild b/net-analyzer/nbtscan/nbtscan-1.6.ebuild new file mode 100644 index 000000000000..b1b5e1ef9c21 --- /dev/null +++ b/net-analyzer/nbtscan/nbtscan-1.6.ebuild @@ -0,0 +1,32 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +inherit autotools + +DESCRIPTION="NBTscan is a program for scanning IP networks for NetBIOS name information" +HOMEPAGE="https://github.com/resurrecting-open-source-projects/nbtscan" +SRC_URI="https://github.com/resurrecting-open-source-projects/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~ppc ~x86 ~amd64-linux ~x86-linux ~ppc-macos" +PATCHES=( +# "${FILESDIR}"/${PN}-1.5.1-script-whitespace.patch +) +DOCS=( + AUTHORS + CONTRIBUTING.md + ChangeLog + NEWS + README.md +) + +src_prepare() { + default + eautoreconf +} + +src_install() { + default +} diff --git a/net-analyzer/nbwmon/Manifest b/net-analyzer/nbwmon/Manifest new file mode 100644 index 000000000000..d5c224c8bcf7 --- /dev/null +++ b/net-analyzer/nbwmon/Manifest @@ -0,0 +1 @@ +DIST nbwmon-0.5.2.tar.gz 5807 BLAKE2B 09d4a195de209595dac04a53c2ca06874634515f816f8fc6c2e954b9e6bd55bd06745152e537b997fcc2bfdece987f1a0ec04785fe2205bf4102115a060c6ecd SHA512 11502015b8a04d8a65c2f06d9e921c193c2e4968dbbd781791c30f35a2cf1135bbf784280b9070670be2b58c4355bf7bdf631d5932ec3a01637db803a4c88bf4 diff --git a/net-analyzer/nbwmon/files/nbwmon-0.5.2-tinfo.patch b/net-analyzer/nbwmon/files/nbwmon-0.5.2-tinfo.patch new file mode 100644 index 000000000000..0108844db99e --- /dev/null +++ b/net-analyzer/nbwmon/files/nbwmon-0.5.2-tinfo.patch @@ -0,0 +1,11 @@ +--- a/Makefile ++++ b/Makefile +@@ -2,7 +2,7 @@ + # add -I/usr/pkg/include and -L/usr/pkg/lib to the options + # below. + CFLAGS+=-std=c99 -pedantic -Wall -Wextra +-LDLIBS=-lncurses ++LDLIBS=$(shell $(PKG_CONFIG) --libs ncurses) + PREFIX=/usr/local + + BIN=nbwmon diff --git a/net-analyzer/nbwmon/metadata.xml b/net-analyzer/nbwmon/metadata.xml new file mode 100644 index 000000000000..ae9832ce3196 --- /dev/null +++ b/net-analyzer/nbwmon/metadata.xml @@ -0,0 +1,12 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>netmon@gentoo.org</email> + <name>Gentoo network monitoring and analysis project</name> + </maintainer> + <upstream> + <remote-id type="github">causes-/nbwmon</remote-id> + </upstream> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/nbwmon/nbwmon-0.5.2.ebuild b/net-analyzer/nbwmon/nbwmon-0.5.2.ebuild new file mode 100644 index 000000000000..f2c7742f396c --- /dev/null +++ b/net-analyzer/nbwmon/nbwmon-0.5.2.ebuild @@ -0,0 +1,31 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 +inherit eutils toolchain-funcs + +DESCRIPTION="ncurses bandwidth monitor" +HOMEPAGE="http://causes.host.funtoo.org/?p=nbwmon https://github.com/causes-/nbwmon" +SRC_URI="https://github.com/causes-/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="MIT" +SLOT="0" +KEYWORDS="~amd64 ~ppc ~ppc64 ~x86" + +RDEPEND=" + sys-libs/ncurses +" +DEPEND=" + ${RDEPEND} + virtual/pkgconfig +" + +src_prepare() { + epatch "${FILESDIR}"/${PN}-0.5.2-tinfo.patch + tc-export CC PKG_CONFIG +} + +src_install() { + dobin ${PN} + dodoc README +} diff --git a/net-analyzer/ndoutils/Manifest b/net-analyzer/ndoutils/Manifest new file mode 100644 index 000000000000..cfd355276a0c --- /dev/null +++ b/net-analyzer/ndoutils/Manifest @@ -0,0 +1 @@ +DIST ndoutils-2.1.3.tar.gz 2182999 BLAKE2B 390548b9018d4434d5d0f69abee1d1a11f4e240150941f7f2f9e2662eb2cdb2f29b24244e094d5bdf8bfaf6c3be7bc8ebd9e6d510d66edad8bc9cf3245d5c2c3 SHA512 727f2051876ff32cafaf9993a69b721ae4ea81031fade12262dbb4c5399c601f3c1af362d9d550e1d6d56fac8fe044d515dc10fc43e7d4d3e981bc9a89db88de diff --git a/net-analyzer/ndoutils/files/format-security.patch b/net-analyzer/ndoutils/files/format-security.patch new file mode 100644 index 000000000000..75be7dc32103 --- /dev/null +++ b/net-analyzer/ndoutils/files/format-security.patch @@ -0,0 +1,115 @@ +From 07891e8fcf692552c57e64429fd52da9e682f6d2 Mon Sep 17 00:00:00 2001 +From: Michael Orlitzky <michael@orlitzky.com> +Date: Sat, 22 Jul 2017 16:38:03 -0400 +Subject: [PATCH 1/1] src/queue.c: fix format-security warnings with explicit + "%s" format string. + +The syslog() function takes as its second argument a format string (a +la printf), but if the third parameter is a string, then the format +string can be omitted. This has led to security vulnerabilities in the +past, and compilers can now warn about it. In particular, GCC has the +-Wformat-security option, which can be made an error with +-Werror=format-security. + +A few such two-argument calls were present in src/queue.c, where +constant strings were being logged to syslog. This commit adds the +second format string parameter (simply "%s" in this case) to avoid the +compiler warnings. + +More information about format-security can be found in Fedora's FAQ: + + https://fedoraproject.org/wiki/Format-Security-FAQ +--- + src/queue.c | 22 +++++++++++----------- + 1 file changed, 11 insertions(+), 11 deletions(-) + +diff --git a/src/queue.c b/src/queue.c +index 8cb7445..50bb519 100644 +--- a/src/queue.c ++++ b/src/queue.c +@@ -50,7 +50,7 @@ void del_queue() { + struct msqid_ds buf; + + if (msgctl(queue_id,IPC_RMID,&buf) < 0) { +- syslog(LOG_ERR,"Error: queue remove error.\n"); ++ syslog(LOG_ERR, "%s", "Error: queue remove error.\n"); + } + } + +@@ -58,7 +58,7 @@ int get_queue_id(int id) { + key_t key = ftok(NDO_QUEUE_PATH, NDO_QUEUE_ID+id); + + if ((queue_id = msgget(key, IPC_CREAT | 0600)) < 0) { +- syslog(LOG_ERR,"Error: queue init error.\n"); ++ syslog(LOG_ERR, "%s", "Error: queue init error.\n"); + } + } + +@@ -99,7 +99,7 @@ void log_retry( void) { + if(msgctl(queue_id, IPC_STAT, &queue_stats)) { + sprintf(curstats, "Unable to determine current message queue usage: error reading IPC_STAT: %d", errno); + sprintf(logmsg, logfmt, curstats); +- syslog(LOG_ERR, logmsg); ++ syslog(LOG_ERR, "%s", logmsg); + } + else { + #if defined( __linux__) +@@ -108,24 +108,24 @@ void log_retry( void) { + if( msgmni < 0) { + sprintf(curstats, "Unable to determine current message queue usage: error reading IPC_INFO: %d", errno); + sprintf(logmsg, logfmt, curstats); +- syslog(LOG_ERR, logmsg); ++ syslog(LOG_ERR, "%s", logmsg); + } + else { + sprintf(curstats, statsfmt, queue_stats.msg_qnum, + (unsigned long)msgmni, queue_stats.__msg_cbytes, + queue_stats.msg_qbytes); + sprintf(logmsg, logfmt, curstats); +- syslog(LOG_ERR, logmsg); ++ syslog(LOG_ERR, "%s", logmsg); + } + #else + sprintf(logmsg, logfmt, ""); +- syslog(LOG_ERR, logmsg); ++ syslog(LOG_ERR, "%s", logmsg); + #endif + } + last_retry_log_time = now; + } + else { +- syslog(LOG_ERR,"Warning: queue send error, retrying...\n"); ++ syslog(LOG_ERR, "%s", "Warning: queue send error, retrying...\n"); + } + } + +@@ -155,14 +155,14 @@ void push_into_queue (char* buf) { + #endif + } + if (retrynum < MAX_RETRIES) { +- syslog(LOG_ERR,"Message sent to queue.\n"); ++ syslog(LOG_ERR, "%s", "Message sent to queue.\n"); + } + else { +- syslog(LOG_ERR,"Error: max retries exceeded sending message to queue. Kernel queue parameters may need to be tuned. See README.\n"); ++ syslog(LOG_ERR, "%s", "Error: max retries exceeded sending message to queue. Kernel queue parameters may need to be tuned. See README.\n"); + } + } + else { +- syslog(LOG_ERR,"Error: queue send error.\n"); ++ syslog(LOG_ERR, "%s", "Error: queue send error.\n"); + } + } + +@@ -175,7 +175,7 @@ char* pop_from_queue() { + zero_string(msg.text, NDO_MAX_MSG_SIZE); + + if (msgrcv(queue_id, &msg, queue_buff_size, NDO_MSG_TYPE, MSG_NOERROR) < 0) { +- syslog(LOG_ERR,"Error: queue recv error.\n"); ++ syslog(LOG_ERR, "%s", "Error: queue recv error.\n"); + } + + int size = strlen(msg.text); +-- +2.13.0 + diff --git a/net-analyzer/ndoutils/files/ndoutils-2.0.0-asprintf.patch b/net-analyzer/ndoutils/files/ndoutils-2.0.0-asprintf.patch new file mode 100644 index 000000000000..21cf837ba36d --- /dev/null +++ b/net-analyzer/ndoutils/files/ndoutils-2.0.0-asprintf.patch @@ -0,0 +1,16 @@ +This is a fix for the QA warnings that result from using asprintf() +without defining it. That happens because asprintf() is a GNU +extension, but somehow gets used before _GNU_SOURCE is defined. + +Upstream-Bug: https://github.com/NagiosEnterprises/ndoutils/issues/43 + +--- a/include/config.h.in ++++ b/include/config.h.in +@@ -9,6 +9,7 @@ + #ifndef _CONFIG_H + #define _CONFIG_H + ++#define _GNU_SOURCE + #include <stdio.h> + #include <stdlib.h> + diff --git a/net-analyzer/ndoutils/files/openrc-init.patch b/net-analyzer/ndoutils/files/openrc-init.patch new file mode 100644 index 000000000000..07fcc63b7f3d --- /dev/null +++ b/net-analyzer/ndoutils/files/openrc-init.patch @@ -0,0 +1,100 @@ +From 61c6e9295bae755713b403626f702b5ac90f2448 Mon Sep 17 00:00:00 2001 +From: Michael Orlitzky <michael@orlitzky.com> +Date: Sat, 22 Jul 2017 17:25:29 -0400 +Subject: [PATCH 1/1] startup: simplify the OpenRC init scripts and conf file. + +This commit largely rewrites the OpenRC init script with the goal of +simplifying it. The end result should be functionally the same, but is +much shorter. The changes are as follows: + + 1. Replace the deprecated /sbin/runscript shebang with /sbin/openrc-run. + + 2. Replace the existing dependencies with "need mysql nagios". The + ndo2db daemon needs Nagios to create the TCP or Unix socket over + which it will communicate, and obviously it needs mysql to be + up and running in order to save any data. The dependencies + of mysql and nagios themselves will bring up whatever else is + required; nothing else needs to be listed as a dependency of + ndo2db. + + 3. Use the "command", "command_args", and "pidfile" OpenRC + variables. OpenRC is smart enough to start and stop a well-behaved + daemon on its own without a custom start/stop function. By + specifying those three variables, we are able to eliminate much of + the custom start/stop code in the init script. + +Finally, the default value of NDO2DB_CFG in the associated conf file has +been updated to use @sysconfdir@ instead of @pkgsysconfdir@, which wasn't +having any effect. +--- + startup/openrc-conf.in | 6 ++---- + startup/openrc-init.in | 42 +++++++++--------------------------------- + 2 files changed, 11 insertions(+), 37 deletions(-) + +diff --git a/startup/openrc-conf.in b/startup/openrc-conf.in +index d7b5474..69b15b5 100644 +--- a/startup/openrc-conf.in ++++ b/startup/openrc-conf.in +@@ -1,4 +1,2 @@ +-# /etc/conf.d/ndo2db : config file for /etc/init.d/ndo2db +- +-# Configuration file - default is @sysconfdir@/ndo2db.cfg +-NDO2DB_CFG="@pkgsysconfdir@/ndo2db.cfg" ++# The configuration file to use for ndo2db. ++NDO2DB_CFG="@sysconfdir@/ndo2db.cfg" +diff --git a/startup/openrc-init.in b/startup/openrc-init.in +index 119e074..7b3fb40 100644 +--- a/startup/openrc-init.in ++++ b/startup/openrc-init.in +@@ -1,39 +1,15 @@ +-#!/sbin/runscript ++#!/sbin/openrc-run + # +-# Copyright (c) 2016 Nagios(R) Core(TM) Development Team ++# Copyright (c) 2017 Nagios(R) Core(TM) Development Team + # +-# Start/stop the Nagios Data Out Daemon. +-# +-# Goes in /etc/init.d - Config is in /etc/conf.d/ndo2db + +-NDO2DB_BIN="@sbindir@/ndo2db" +-NDO2DB_PID="@piddir@/ndo2db.pid" ++command="@sbindir@/ndo2db" ++command_args="-c ${NDO2DB_CFG}" ++description="Nagios Data Out daemon" ++pidfile="@piddir@/ndo2db.pid" + + depend() { +- use logger dns net localmount netmount nfsmount +-} +- +-checkconfig() { +- # Make sure the config file exists +- if [ ! -f $NDO2DB_CFG ]; then +- eerror "You need to setup $NDO2DB_CFG. +- return 1 +- fi +- return 0 +-} +- +-start() { +- checkconfig || return 1 +- ebegin "Starting ndo2db" +- # Make sure we have a sane current directory +- cd / +- start-stop-daemon --start --exec $NDO2DB_BIN --pidfile $PID_FILE \ +- -- -c $NDO2DB_CFG -f +- eend $? +-} +- +-stop() { +- ebegin "Stopping ndo2db" +- start-stop-daemon --stop --exec $NDO2DB_BIN --pidfile $PID_FILE +- eend $? ++ # The Nagios core daemon creates the socket that ndo2db tries to ++ # connect to upon starting. ++ need mysql nagios + } +-- +2.13.0 + diff --git a/net-analyzer/ndoutils/files/sample-config-piddir.patch b/net-analyzer/ndoutils/files/sample-config-piddir.patch new file mode 100644 index 000000000000..902038204988 --- /dev/null +++ b/net-analyzer/ndoutils/files/sample-config-piddir.patch @@ -0,0 +1,32 @@ +From 560db1e2bc79bb3321c5f431e149418ec3c28a98 Mon Sep 17 00:00:00 2001 +From: Michael Orlitzky <michael@orlitzky.com> +Date: Sun, 23 Jul 2017 07:13:46 -0400 +Subject: [PATCH 1/1] config/ndo2db.cfg-sample.in: use @piddir@ for the pid + file. + +The "lock_file" setting in ndo2db.cfg specifies where the daemon's pid +file should be stored. In the past, it was stored in @localstatedir@, +but @piddir@ is more appropriate. As evidence, all of the init scripts +in the "startup" directory reference @piddir@ and not @localstatedir@ +for the location of the pid file. This commit updates the sample +config to agree with the init scripts. +--- + config/ndo2db.cfg-sample.in | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/config/ndo2db.cfg-sample.in b/config/ndo2db.cfg-sample.in +index 75266dc..5b46fc9 100644 +--- a/config/ndo2db.cfg-sample.in ++++ b/config/ndo2db.cfg-sample.in +@@ -10,7 +10,7 @@ + # This is the lockfile that NDO2DB will use to store its PID number + # in when it is running in daemon mode. + +-lock_file=@localstatedir@/ndo2db.pid ++lock_file=@piddir@/ndo2db.pid + + + +-- +2.13.0 + diff --git a/net-analyzer/ndoutils/metadata.xml b/net-analyzer/ndoutils/metadata.xml new file mode 100644 index 000000000000..fb0520ed5c58 --- /dev/null +++ b/net-analyzer/ndoutils/metadata.xml @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>netmon@gentoo.org</email> + <name>Gentoo network monitoring and analysis project</name> + </maintainer> + <maintainer type="person"> + <email>mjo@gentoo.org</email> + </maintainer> + <upstream> + <remote-id type="github">NagiosEnterprises/ndoutils</remote-id> + </upstream> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/ndoutils/ndoutils-2.1.3-r2.ebuild b/net-analyzer/ndoutils/ndoutils-2.1.3-r2.ebuild new file mode 100644 index 000000000000..784309fee43a --- /dev/null +++ b/net-analyzer/ndoutils/ndoutils-2.1.3-r2.ebuild @@ -0,0 +1,95 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 +inherit systemd + +DESCRIPTION="Nagios addon to store Nagios data in a MySQL database" +HOMEPAGE="https://www.nagios.org/" +SRC_URI="https://github.com/NagiosEnterprises/${PN}/archive/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~ppc ~x86" + +# We require the "nagios" user from net-analyzer/nagios-core at build +# time. +DEPEND="dev-db/mysql-connector-c + dev-perl/DBD-mysql + dev-perl/DBI + >=net-analyzer/nagios-core-4.4.5" +RDEPEND="${DEPEND} + virtual/mysql" + +S="${WORKDIR}/${PN}-${P}" + +DOCS=( + Changelog + README + THANKS + TODO + UPGRADING + "docs/NDOUTILS DB Model.pdf" + "docs/NDOUtils Documentation.pdf" +) + +PATCHES=( + "${FILESDIR}/format-security.patch" + "${FILESDIR}/ndoutils-2.0.0-asprintf.patch" + "${FILESDIR}/sample-config-piddir.patch" + "${FILESDIR}/openrc-init.patch" +) + +src_configure() { + # The localstatedir is where our socket will be created by the + # nagios daemon, so we put it in /var/lib/nagios where the "nagios" + # user will be able to write. + # + # And normally, we would use /run for the pid file, but the daemon + # drops permissions before creating it, so the piddir also needs + # to be writable by the nagios user. + econf --enable-mysql \ + --localstatedir=/var/lib/nagios \ + --sysconfdir=/etc/nagios \ + --with-piddir=/var/lib/nagios +} + +src_compile() { + # Avoid "emake all" so that we don't build the stuff for nagios-2.x + # and nagios-3.x, some of which throws QA warnings. We don't use it + # anyway. + pushd src + emake file2sock log2ndo ndo2db-4x ndomod-4x.o sockdebug + popd +} + +src_install() { + default + insinto /etc/nagios + newins config/ndo2db.cfg-sample ndo2db.cfg + newins config/ndomod.cfg-sample ndomod.cfg + newinitd "startup/openrc-init" ndo2db + newconfd "startup/openrc-conf" ndo2db + systemd_newunit "startup/default-service" "${PN}.service" + + # The documentation isn't installed by the build system + dodoc -r docs/html + + insinto "/usr/share/${PN}" + doins -r db + + # These need to be executable... + exeinto "/usr/share/${PN}/db" + doexe db/{installdb,prepsql,upgradedb} + + # Use symlinks because the installdb/upgradedb scripts use relative + # paths to the SQL queries. + dosym "../share/${PN}/db/installdb" /usr/bin/ndoutils-installdb + dosym "../share/${PN}/db/upgradedb" /usr/bin/ndoutils-upgradedb +} + +pkg_postinst() { + elog "To include NDO in your Nagios setup, you'll need to activate" + elog "the NDO broker module in /etc/nagios/nagios.cfg:" + elog " broker_module=/usr/bin/ndomod.o config_file=/etc/nagios/ndomod.cfg" +} diff --git a/net-analyzer/ndsad/Manifest b/net-analyzer/ndsad/Manifest new file mode 100644 index 000000000000..cd1b6e07a2a4 --- /dev/null +++ b/net-analyzer/ndsad/Manifest @@ -0,0 +1 @@ +DIST ndsad-1.33.tgz 214614 BLAKE2B ca8e0f983d14cb43148411cead699dc140ca0cce60266b0aae6cb1836c643bd5c5d7aae6c34ae372af83a20e0e9ab39f92fcc46f2e2edbc70cf3968ee9b824dd SHA512 38ebca91f28d763ce334d92361779f100ee6b98d6d17485bf096f913f777e8525add63bd73aeea43321cee622e10cb88020aca7af492fbafdd50cf740510bd51 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 <pthread.h> + #include <iostream> + #include <sys/types.h> ++#include <unistd.h> /* getpid() */ + #include <sys/socket.h> + + /// 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 <net/if.h> ++#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..c216c39affec --- /dev/null +++ b/net-analyzer/ndsad/files/ndsad.conf.d @@ -0,0 +1,8 @@ +# Copyright 1999-2006 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +# 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..0ae33b5d98ac --- /dev/null +++ b/net-analyzer/ndsad/files/ndsad.init @@ -0,0 +1,32 @@ +#!/sbin/openrc-run +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +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..6738e2b72227 --- /dev/null +++ b/net-analyzer/ndsad/metadata.xml @@ -0,0 +1,26 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>netmon@gentoo.org</email> + <name>Gentoo network monitoring and analysis project</name> + </maintainer> + <longdescription lang="en"> + 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. + </longdescription> + <longdescription lang="ru"> + Демон ndsad (NetUp Data Stream Accounting Daemon) компании Ðетап + захватывает Ñетевой трафик Ñ Ñетевых интерфейÑов и ÑкÑпортирует его в + NetFlow v.5. Трафик ÑобираетÑÑ Ð¿Ñ€Ð¸ помощи библиотеки libpcap в Unix или + winpcap в Windows. Ð’ качеÑтве иÑточника данных вы также можете + иÑпользовать tee/divert Ñокеты в FreeBSD и ULOG в Linux. + </longdescription> + <upstream> + <remote-id type="sourceforge">ndsad</remote-id> + </upstream> + <origin>gentoo-staging</origin> +</pkgmetadata> 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..5ccdff9433d7 --- /dev/null +++ b/net-analyzer/ndsad/ndsad-1.33-r1.ebuild @@ -0,0 +1,45 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 +inherit autotools eutils + +DESCRIPTION="Cisco netflow probe from libpcap, ULOG, tee/divert sources" +HOMEPAGE="https://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 +} diff --git a/net-analyzer/ndsad/ndsad-1.33-r2.ebuild b/net-analyzer/ndsad/ndsad-1.33-r2.ebuild new file mode 100644 index 000000000000..e7f9a919a4a4 --- /dev/null +++ b/net-analyzer/ndsad/ndsad-1.33-r2.ebuild @@ -0,0 +1,45 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +inherit autotools + +DESCRIPTION="Cisco netflow probe from libpcap, ULOG, tee/divert sources" +HOMEPAGE="https://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} +" +PATCHES=( + "${FILESDIR}"/${P}-conf_path.patch + "${FILESDIR}"/${P}-gentoo.patch + "${FILESDIR}"/${P}-getpid.patch + "${FILESDIR}"/${P}-log-path.patch + "${FILESDIR}"/${P}-strncpy-overflow.patch +) +DOCS=( ChangeLog AUTHORS README ) + +src_prepare() { + default + eautoreconf +} + +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 +} diff --git a/net-analyzer/nessus-agent-bin/Manifest b/net-analyzer/nessus-agent-bin/Manifest new file mode 100644 index 000000000000..984f2c480411 --- /dev/null +++ b/net-analyzer/nessus-agent-bin/Manifest @@ -0,0 +1 @@ +DIST NessusAgent-7.7.0-es7.x86_64.rpm 17139840 BLAKE2B 7bd7baddbbb7c3b25b631e0de84fa89a514b373fd5242d3806d9bca3420d071dab5bc82446c0aafd36c18fb665d5acb480409c061663d764754dfc32d9c4cc82 SHA512 66a0ae15d4c96a600713b871a808aae365ebd698c1b1b275a3ed5ad0744c45da94335068f0964e549b374ddc4f4545bf25b51dcdf665a3c37397740a948fc588 diff --git a/net-analyzer/nessus-agent-bin/files/nessusagent.initd b/net-analyzer/nessus-agent-bin/files/nessusagent.initd new file mode 100644 index 000000000000..6f43fc421e1b --- /dev/null +++ b/net-analyzer/nessus-agent-bin/files/nessusagent.initd @@ -0,0 +1,21 @@ +#!/sbin/openrc-run +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +start() { + ebegin "Starting nessusagent" + start-stop-daemon --start --quiet --exec /opt/nessus_agent/sbin/nessus-service -- -D --quiet + eend $? +} + +stop() { + ebegin "Stopping nessusagent" + start-stop-daemon --stop --quiet --exec /opt/nessus_agent/sbin/nessus-service + einfo "Waiting for the environment to be sane" + while [ -n "$RUNNING" ] ; do + sleep 1 + RUNNING=$(ps aux | grep -m 1 nessusd: | grep -v grep) + done + sleep 3 + eend $? +} diff --git a/net-analyzer/nessus-agent-bin/metadata.xml b/net-analyzer/nessus-agent-bin/metadata.xml new file mode 100644 index 000000000000..b01b18056bd0 --- /dev/null +++ b/net-analyzer/nessus-agent-bin/metadata.xml @@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>marecki@gentoo.org</email> + <name>Marek Szuba</name> + </maintainer> + <maintainer type="person"> + <email>zerochaos@gentoo.org</email> + <name>Rick Farina</name> + </maintainer> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/nessus-agent-bin/nessus-agent-bin-7.7.0.ebuild b/net-analyzer/nessus-agent-bin/nessus-agent-bin-7.7.0.ebuild new file mode 100644 index 000000000000..893d4776496a --- /dev/null +++ b/net-analyzer/nessus-agent-bin/nessus-agent-bin-7.7.0.ebuild @@ -0,0 +1,64 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit rpm pax-utils systemd + +MY_P="NessusAgent-${PV}-es7" + +DESCRIPTION="A remote security scanner for Linux - agent component" +HOMEPAGE="https://www.tenable.com/" +SRC_URI="${MY_P}.x86_64.rpm" + +LICENSE="GPL-2 Nessus-EULA" +SLOT="0" +KEYWORDS="~amd64" + +RESTRICT="mirror fetch strip" + +QA_PREBUILT="opt/nessus_agent/bin/nasl + opt/nessus_agent/bin/nessus-mkrand + opt/nessus_agent/lib/nessus/libjemalloc.so.${PV} + opt/nessus_agent/lib/nessus/libnessus-glibc-fix.so + opt/nessus_agent/lib/nessus/plugins/ovaldi64-rhel7.inc + opt/nessus_agent/sbin/nessus-check-signature + opt/nessus_agent/sbin/nessus-service + opt/nessus_agent/sbin/nessuscli + opt/nessus_agent/sbin/nessusd" + +S="${WORKDIR}" + +pkg_nofetch() { + einfo "Please download ${A} from ${HOMEPAGE}downloads/nessus-agents" + einfo "The archive should then be placed into your DISTDIR directory." +} + +src_install() { + # Using doins -r would strip executable bits from all binaries + cp -pPR "${S}"/opt "${D}"/ || die "Failed to copy files" + + pax-mark m "${D}"/opt/nessus_agent/sbin/nessusd + + # Make sure these originally empty directories do not vanish, + # Nessus will not run properly without them + keepdir /opt/nessus_agent/com/nessus/CA + keepdir /opt/nessus_agent/etc/nessus + keepdir /opt/nessus_agent/var/nessus/logs + keepdir /opt/nessus_agent/var/nessus/tmp + keepdir /opt/nessus_agent/var/nessus/users + + newinitd "${FILESDIR}"/nessusagent.initd nessusagent + systemd_dounit usr/lib/systemd/system/nessusagent.service +} + +pkg_postinst() { + if [[ -z "${REPLACING_VERSIONS}" ]]; then + elog "In order to link the agent to Tenable.io or an instance of Nessus Manager," + elog "obtain an appropriate linking key and run" + elog "" + elog " /opt/nessus_agent/sbin/nessuscli agent link --key=<key> --host=<host> --port=<port> [optional parameters]" + elog "" + elog "This can be done before the agent is started." + fi +} diff --git a/net-analyzer/nessus-bin/Manifest b/net-analyzer/nessus-bin/Manifest new file mode 100644 index 000000000000..33ea94b1450c --- /dev/null +++ b/net-analyzer/nessus-bin/Manifest @@ -0,0 +1 @@ +DIST Nessus-8.10.1-es7.x86_64.rpm 87820668 BLAKE2B f74ddbc919634556d4c570a1057a9aa8afbc1bf542207d6cf87db5314c9fe6911072af649ed652489c70d35c2a6816447cda7a0a788f020113f4aa5b921c2ee2 SHA512 bcccd20b92f05a7d711c5b9ecb175475eba086a95eceb80ffbf830c60351db01b3f029aec8abd1527f9c1d3ff3bb3d7f3cd13de48e6f08aa1a8d6a2a71e3ac30 diff --git a/net-analyzer/nessus-bin/files/nessusd-initd b/net-analyzer/nessus-bin/files/nessusd-initd new file mode 100644 index 000000000000..fb95cb2b2d8e --- /dev/null +++ b/net-analyzer/nessus-bin/files/nessusd-initd @@ -0,0 +1,25 @@ +#!/sbin/openrc-run +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +depend() { + need net +} + +start() { + ebegin "Starting nessus-service" + start-stop-daemon --start --quiet --exec /opt/nessus/sbin/nessus-service -- -D --quiet + eend $? +} + +stop() { + ebegin "Stopping nessus-service" + start-stop-daemon --stop --quiet --exec /opt/nessus/sbin/nessus-service + einfo "Waiting for the environment to be sane" + while [ -n "$RUNNING" ] ; do + sleep 1 + RUNNING=$(ps aux | grep -m 1 nessusd: | grep -v grep) + done + sleep 3 + eend $? +} diff --git a/net-analyzer/nessus-bin/metadata.xml b/net-analyzer/nessus-bin/metadata.xml new file mode 100644 index 000000000000..a8d223efd5e8 --- /dev/null +++ b/net-analyzer/nessus-bin/metadata.xml @@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<maintainer type="person"> + <email>marecki@gentoo.org</email> + <name>Marek Szuba</name> +</maintainer> +<maintainer type="person"> + <email>zerochaos@gentoo.org</email> + <name>Rick Farina</name> +</maintainer> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/nessus-bin/nessus-bin-8.10.1.ebuild b/net-analyzer/nessus-bin/nessus-bin-8.10.1.ebuild new file mode 100644 index 000000000000..eedc870324ec --- /dev/null +++ b/net-analyzer/nessus-bin/nessus-bin-8.10.1.ebuild @@ -0,0 +1,61 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit rpm pax-utils systemd + +MY_P="Nessus-${PV}-es7" + +DESCRIPTION="A remote security scanner for Linux" +HOMEPAGE="https://www.tenable.com/" +SRC_URI="${MY_P}.x86_64.rpm" + +LICENSE="GPL-2 Nessus-EULA" +SLOT="0" +KEYWORDS="~amd64" + +RESTRICT="mirror fetch strip" + +QA_PREBUILT="opt/nessus/bin/nasl + opt/nessus/bin/ndbg + opt/nessus/bin/nessus-mkrand + opt/nessus/lib/nessus/libjemalloc.so.2 + opt/nessus/lib/nessus/libnessus-glibc-fix.so + opt/nessus/sbin/nessus-service + opt/nessus/sbin/nessuscli + opt/nessus/sbin/nessusd" + +S="${WORKDIR}" + +pkg_nofetch() { + einfo "Please download ${A} from ${HOMEPAGE}downloads/nessus" + einfo "The archive should then be placed into your DISTDIR directory." +} + +src_install() { + # Using doins -r would strip executable bits from all binaries + cp -pPR "${S}"/opt "${D}"/ || die "Failed to copy files" + + pax-mark m "${D}"/opt/nessus/sbin/nessusd + + # Make sure these originally empty directories do not vanish, + # Nessus will not run properly without them + keepdir /opt/nessus/com/nessus/CA + keepdir /opt/nessus/etc/nessus + keepdir /opt/nessus/var/nessus/logs + keepdir /opt/nessus/var/nessus/tmp + + newinitd "${FILESDIR}"/nessusd-initd nessusd-bin + systemd_newunit usr/lib/systemd/system/nessusd.service nessusd-bin.service +} + +pkg_postinst() { + if [[ -z "${REPLACING_VERSIONS}" ]]; then + elog "To get started launch the nessusd-bin service, then point your Web browser to" + elog " https://<yourhost>:8834/" + else + elog "You may want to restart the nessusd-bin service to use" + elog "the new version of Nessus." + fi +} diff --git a/net-analyzer/net-snmp/Manifest b/net-analyzer/net-snmp/Manifest new file mode 100644 index 000000000000..1b1b59bac83c --- /dev/null +++ b/net-analyzer/net-snmp/Manifest @@ -0,0 +1,4 @@ +DIST net-snmp-5.7.3-patches-3.tar.xz 3176 BLAKE2B 1a71d6743afb841f664c6058e32c7c411af62b0f36acd3bb9251804893ed12f462a0c5bab828e309eeec7824def2dca8fa866350b90a62ec4f0df1141b51ecae SHA512 d8a91b9668320a1e19d062eb86dd4d16beb7c2d15ac7ebbb9d2a4bd298af39bbb0a2613504dbb0057cccdec731f08f2308c5a15395e1fbc29bb0611ed8aca636 +DIST net-snmp-5.8.1.pre1.tar.gz 6630615 BLAKE2B 32ae7177fc08a773928da7f19cd06617feb1358c0dd21d39e08db460fa4267b6353f4afede1f5a500a628235a6a94d95700c84df6e85bda18b7a7a6e7bf3781f SHA512 e1ad421970abb67490a08fa735bbe9ff77a6fc5a19b8bf6942bef80f5b328f8038373cd5995970085177bcfe939dfa309019512b2abce0e8cf779e693f7d6dbd +DIST net-snmp-5.8.1.pre2.tar.gz 6642893 BLAKE2B 4b2a1e87738c3bde49354f0cca84628f2953ee14f6b08ca53cf0bc5c320052cb4fe0f6eeb46551eaf2d45ba9c17f86ce06b64c00c1629b2d17bc351c0ccb37a8 SHA512 78cd9a29cc89ff7fa170ee767db3ca2077fc1d877f207c018887c2ea0148ffaf01eb013efc21b47f14c893a6ca48b3b439210ccd27dfc77f8c8e56bf9546f23e +DIST net-snmp-5.8.tar.gz 6591680 BLAKE2B ac1bff4152310da57818a00d752a08a7fc61d697b02479d9952ca12d024d3d68dc8bfa674571e93d6f3597605b2fe91513fb6839057a80f2c3dd8d0cce0077f2 SHA512 27895a583b23f3e14c48562bc32f3ba83513d81aa848e878be9a3650f0458d45950635c937ef627135f80b757b663e71fab9a3bde4fd91889153998ae3468fe7 diff --git a/net-analyzer/net-snmp/files/net-snmp-5.1.2-snmpconf-selinux.patch b/net-analyzer/net-snmp/files/net-snmp-5.1.2-snmpconf-selinux.patch new file mode 100644 index 000000000000..d2e372161e92 --- /dev/null +++ b/net-analyzer/net-snmp/files/net-snmp-5.1.2-snmpconf-selinux.patch @@ -0,0 +1,12 @@ +https://bugzilla.redhat.com/show_bug.cgi?id=248329 + +--- a/local/snmpconf.in ++++ b/local/snmpconf.in +@@ -680,6 +680,7 @@ + } + } + close(O); ++ system("restorecon $outputf"); + } + } + diff --git a/net-analyzer/net-snmp/files/net-snmp-5.7.3-include-limits.patch b/net-analyzer/net-snmp/files/net-snmp-5.7.3-include-limits.patch new file mode 100644 index 000000000000..04eafbbe9c5d --- /dev/null +++ b/net-analyzer/net-snmp/files/net-snmp-5.7.3-include-limits.patch @@ -0,0 +1,15 @@ +POSIX requires <limits.h> for PATH_MAX and NAME_MAX + +Author: Anthony G. Basile <blueness@gentoo.org> + +diff -Naur net-snmp-5.7.3.orig/agent/mibgroup/util_funcs/get_pid_from_inode.c net-snmp-5.7.3/agent/mibgroup/util_funcs/get_pid_from_inode.c +--- net-snmp-5.7.3.orig/agent/mibgroup/util_funcs/get_pid_from_inode.c 2014-12-08 15:23:22.000000000 -0500 ++++ net-snmp-5.7.3/agent/mibgroup/util_funcs/get_pid_from_inode.c 2018-02-21 15:34:06.237028136 -0500 +@@ -6,6 +6,7 @@ + + #include <ctype.h> + #include <stdio.h> ++#include <limits.h> + #if HAVE_STDLIB_H + #include <stdlib.h> + #endif diff --git a/net-analyzer/net-snmp/files/net-snmp-5.8-do-not-conflate-LDFLAGS-and-LIBS.patch b/net-analyzer/net-snmp/files/net-snmp-5.8-do-not-conflate-LDFLAGS-and-LIBS.patch new file mode 100644 index 000000000000..4e3001e1e473 --- /dev/null +++ b/net-analyzer/net-snmp/files/net-snmp-5.8-do-not-conflate-LDFLAGS-and-LIBS.patch @@ -0,0 +1,34 @@ +--- a/net-snmp-config.in ++++ b/net-snmp-config.in +@@ -190,13 +190,13 @@ + #################################################### client lib + --libs) + # use this one == --netsnmp-libs + --external-libs +- echo $NSC_LDFLAGS $NSC_LIBDIR $NSC_SNMPLIBS $NSC_LIBS ++ echo $NSC_LIBDIR $NSC_SNMPLIBS $NSC_LIBS + ;; + --netsnmp-libs) + echo $NSC_LIBDIR $NSC_BASE_SNMP_LIBS + ;; + --external-libs) +- echo $NSC_LDFLAGS $NSC_LNETSNMPLIBS $NSC_LIBS @PERLLDOPTS_FOR_APPS@ ++ echo $NSC_LNETSNMPLIBS $NSC_LIBS @PERLLDOPTS_FOR_APPS@ + ;; + #################################################### agent lib + --base-agent-libs) +@@ -207,13 +207,13 @@ + ;; + --agent-libs) + # use this one == --netsnmp-agent-libs + --external-libs +- echo $NSC_LDFLAGS $NSC_LIBDIR $NSC_AGENTLIBS $NSC_LIBS ++ echo $NSC_LIBDIR $NSC_AGENTLIBS $NSC_LIBS + ;; + --netsnmp-agent-libs) + echo $NSC_LIBDIR $NSC_BASE_AGENT_LIBS + ;; + --external-agent-libs) +- echo $NSC_LDFLAGS $NSC_LMIBLIBS $NSC_LAGENTLIBS $NSC_LNETSNMPLIBS $NSC_LIBS ++ echo $NSC_LMIBLIBS $NSC_LAGENTLIBS $NSC_LNETSNMPLIBS $NSC_LIBS + ;; + #################################################### + --version|--ver*) diff --git a/net-analyzer/net-snmp/files/net-snmp-5.8-my_bool.patch b/net-analyzer/net-snmp/files/net-snmp-5.8-my_bool.patch new file mode 100644 index 000000000000..72127d053c0a --- /dev/null +++ b/net-analyzer/net-snmp/files/net-snmp-5.8-my_bool.patch @@ -0,0 +1,23 @@ +commit 9f4af8c42d515e6b214738cc97212dfbe7f749cf +Author: Andreas Hasenack <ahasenack2@users.sourceforge.net> +Date: Tue Feb 5 18:21:40 2019 -0800 + + apps/snmptrapd_sql: Fix build against MySQL 8 + + See also https://sourceforge.net/p/net-snmp/bugs/2922/. + + [bvanassche: changed 'int' into 'char'] + +diff --git a/apps/snmptrapd_sql.c b/apps/snmptrapd_sql.c +index 6126ca916..32a3b1799 100644 +--- a/apps/snmptrapd_sql.c ++++ b/apps/snmptrapd_sql.c +@@ -199,7 +199,7 @@ typedef struct sql_buf_t { + * static bind structures, plus 2 static buffers to bind to. + */ + static MYSQL_BIND _tbind[TBIND_MAX], _vbind[VBIND_MAX]; +-static my_bool _no_v3; ++static char _no_v3; + + static void _sql_process_queue(u_int dontcare, void *meeither); + diff --git a/net-analyzer/net-snmp/files/net-snmp-5.8-pcap.patch b/net-analyzer/net-snmp/files/net-snmp-5.8-pcap.patch new file mode 100644 index 000000000000..43692240acb6 --- /dev/null +++ b/net-analyzer/net-snmp/files/net-snmp-5.8-pcap.patch @@ -0,0 +1,41 @@ +--- a/configure.d/config_project_with_enable ++++ b/configure.d/config_project_with_enable +@@ -1187,6 +1187,11 @@ + [], + [with_bzip2="no"]) + ++AC_ARG_WITH([pcap], ++ [ --with-pcap[=DIR] use libpcap in DIR], ++ [], ++ [with_pcap="no"]) ++ + NETSNMP_ARG_WITH( + [mnttab], + AS_HELP_STRING( +--- a/configure.d/config_os_libs2 ++++ b/configure.d/config_os_libs2 +@@ -583,14 +590,16 @@ + ## + # libpcap + ## +-NETSNMP_BUILD_PCAP_PROG_TRUE='#' +-NETSNMP_BUILD_PCAP_PROG_FALSE='' +-AC_CHECK_LIB([pcap], [pcap_create], [ +- AC_CHECK_HEADERS([pcap/pcap.h], [ +- NETSNMP_BUILD_PCAP_PROG_TRUE='' +- NETSNMP_BUILD_PCAP_PROG_FALSE='#' +- ]) +-]) ++if test "x$with_pcap" = "xyes" ; then ++ NETSNMP_BUILD_PCAP_PROG_TRUE='#' ++ NETSNMP_BUILD_PCAP_PROG_FALSE='' ++ AC_CHECK_LIB([pcap], [pcap_create], [ ++ AC_CHECK_HEADERS([pcap/pcap.h], [ ++ NETSNMP_BUILD_PCAP_PROG_TRUE='' ++ NETSNMP_BUILD_PCAP_PROG_FALSE='#' ++ ]) ++ ]) ++fi + AC_SUBST(NETSNMP_BUILD_PCAP_PROG_TRUE) + AC_SUBST(NETSNMP_BUILD_PCAP_PROG_FALSE) + diff --git a/net-analyzer/net-snmp/files/net-snmp-5.8-tinfo.patch b/net-analyzer/net-snmp/files/net-snmp-5.8-tinfo.patch new file mode 100644 index 000000000000..746575a9b7fb --- /dev/null +++ b/net-analyzer/net-snmp/files/net-snmp-5.8-tinfo.patch @@ -0,0 +1,10 @@ +--- a/configure.d/config_os_libs2 ++++ b/configure.d/config_os_libs2 +@@ -611,6 +611,7 @@ + AC_CHECK_HEADERS([curses.h]) + AC_CHECK_HEADERS([ncurses/curses.h]) + NETSNMP_SEARCH_LIBS([endwin], [curses ncurses],,,,[LIBCURSES]) ++NETSNMP_SEARCH_LIBS([cbreak], [tinfo],[LIBCURSES="$LIBCURSES -ltinfo"],,,) + AC_SUBST([LIBCURSES]) + + # libm for ceil diff --git a/net-analyzer/net-snmp/files/net-snmp-5.8.1-pkg-config.patch b/net-analyzer/net-snmp/files/net-snmp-5.8.1-pkg-config.patch new file mode 100644 index 000000000000..fd53973c2bec --- /dev/null +++ b/net-analyzer/net-snmp/files/net-snmp-5.8.1-pkg-config.patch @@ -0,0 +1,16 @@ +--- a/netsnmp-agent.pc.in ++++ b/netsnmp-agent.pc.in +@@ -9,4 +9,4 @@ + Version: @PACKAGE_VERSION@ + Cflags: -I${includedir} + Libs: -L${libdir} -lnetsnmpmibs -lnetsnmpagent -lnetsnmp +-Libs.private: @LDFLAGS@ @LMIBLIBS@ @LAGENTLIBS@ @PERLLDOPTS_FOR_APPS@ @LNETSNMPLIBS@ @LIBS@ ++Libs.private: @LMIBLIBS@ @LAGENTLIBS@ @PERLLDOPTS_FOR_APPS@ @LNETSNMPLIBS@ @LIBS@ +--- a/netsnmp.pc.in ++++ b/netsnmp.pc.in +@@ -9,4 +9,4 @@ + Version: @PACKAGE_VERSION@ + Cflags: -I${includedir} + Libs: -L${libdir} -lnetsnmp +-Libs.private: @LDFLAGS@ @LNETSNMPLIBS@ @LIBS@ @PERLLDOPTS_FOR_APPS@ ++Libs.private: @LNETSNMPLIBS@ @LIBS@ @PERLLDOPTS_FOR_APPS@ diff --git a/net-analyzer/net-snmp/files/net-snmp-99999999-tinfo.patch b/net-analyzer/net-snmp/files/net-snmp-99999999-tinfo.patch new file mode 100644 index 000000000000..6eb2df50c43a --- /dev/null +++ b/net-analyzer/net-snmp/files/net-snmp-99999999-tinfo.patch @@ -0,0 +1,10 @@ +--- a/configure.d/config_os_libs2 ++++ b/configure.d/config_os_libs2 +@@ -598,6 +598,7 @@ + AC_CHECK_HEADERS([curses.h]) + AC_CHECK_HEADERS([ncurses/curses.h])],,, + [LIBCURSES]) ++NETSNMP_SEARCH_LIBS([cbreak], [tinfo],[LIBCURSES="$LIBCURSES -ltinfo"],,,) + AC_SUBST([LIBCURSES]) + + # libm for ceil diff --git a/net-analyzer/net-snmp/files/snmpd.conf b/net-analyzer/net-snmp/files/snmpd.conf new file mode 100644 index 000000000000..a3f88242a127 --- /dev/null +++ b/net-analyzer/net-snmp/files/snmpd.conf @@ -0,0 +1,19 @@ +# Copyright 1999-2004 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +# Initial (empty) options. +SNMPD_FLAGS="" + +# Disable smux by default +SNMPD_FLAGS="${SNMPD_FLAGS} -I -smux" + +# Enable connection logging. +#SNMPD_FLAGS="${SNMPD_FLAGS} -a" + +# Enable syslog and disable file log. +#SNMPD_FLAGS="${SNMPD_FLAGS} -Lsd -Lf /dev/null" + +# Enable agentx socket as /var/agentx/master +# *NOTE* Before uncommenting this, make sure +# the /var/agentx directory exists. +#SNMPD_FLAGS="${SNMPD_FLAGS} -x /var/agentx/master" diff --git a/net-analyzer/net-snmp/files/snmpd.init.2 b/net-analyzer/net-snmp/files/snmpd.init.2 new file mode 100644 index 000000000000..288fea0d5908 --- /dev/null +++ b/net-analyzer/net-snmp/files/snmpd.init.2 @@ -0,0 +1,34 @@ +#!/sbin/openrc-run +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +SNMPD_PIDFILE="${SNMPD_PIDFILE:-/var/run/snmpd.pid}" + +extra_started_commands="reload" + +command="/usr/sbin/snmpd" +command_args="-p ${SNMPD_PIDFILE} ${SNMPD_FLAGS}" +pidfile="${SNMPD_PIDFILE}" + +depend() { + use logger +} + +checkconfig() { + if [ ! -e /etc/snmp/snmpd.conf ] ; then + eerror "${SVCNAME} requires an /etc/snmp/snmpd.conf configuration file" + return 1 + fi +} + +start_pre() { + checkconfig || return 1 +} + +reload() { + checkconfig || return 1 + + ebegin "Reloading ${SVCNAME} configuration" + kill -HUP $(cat ${SNMPD_PIDFILE}) 2>&1 > /dev/null + eend $? +} diff --git a/net-analyzer/net-snmp/files/snmpd.service b/net-analyzer/net-snmp/files/snmpd.service new file mode 100644 index 000000000000..8150d7b18818 --- /dev/null +++ b/net-analyzer/net-snmp/files/snmpd.service @@ -0,0 +1,9 @@ +[Unit] +Description=Simple Network Management Protocol (SNMP) Daemon +After=syslog.target network.target + +[Service] +ExecStart=/usr/sbin/snmpd -f + +[Install] +WantedBy=multi-user.target diff --git a/net-analyzer/net-snmp/files/snmptrapd.conf b/net-analyzer/net-snmp/files/snmptrapd.conf new file mode 100644 index 000000000000..bca2a5f4c8de --- /dev/null +++ b/net-analyzer/net-snmp/files/snmptrapd.conf @@ -0,0 +1,15 @@ +# Copyright 1999-2005 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +# extra flags to pass to snmptrapd +SNMPTRAPD_FLAGS="" + +# ignore authentication failure traps +#SNMPTRAPD_FLAGS="${SNMPTRAPD_FLAGS} -a" + +# log messages to specified file +#SNMPTRAPD_FLAGS="${SNMPTRAPD_FLAGS} -Lf /var/log/snmptrapd.log" + +# log messages to syslog with the specified facility +# where facility is: 'd' = LOG_DAEMON, 'u' = LOG_USER, [0-7] = LOG_LOCAL[0-7] +#SNMPTRAPD_FLAGS="${SNMPTRAPD_FLAGS} -Ls d" diff --git a/net-analyzer/net-snmp/files/snmptrapd.init.2 b/net-analyzer/net-snmp/files/snmptrapd.init.2 new file mode 100644 index 000000000000..9787d6f05c38 --- /dev/null +++ b/net-analyzer/net-snmp/files/snmptrapd.init.2 @@ -0,0 +1,13 @@ +#!/sbin/openrc-run +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +SNMPTRAPD_PIDFILE="${SNMPTRAPD_PIDFILE:-/var/run/snmptrapd.pid}" + +command="/usr/sbin/snmptrapd" +command_args="-p ${SNMPTRAPD_PIDFILE} ${SNMPTRAPD_FLAGS}" +pidfile="${SNMPTRAPD_PIDFILE}" + +depend() { + use logger +} diff --git a/net-analyzer/net-snmp/files/snmptrapd.service b/net-analyzer/net-snmp/files/snmptrapd.service new file mode 100644 index 000000000000..7d19444c1d73 --- /dev/null +++ b/net-analyzer/net-snmp/files/snmptrapd.service @@ -0,0 +1,9 @@ +[Unit] +Description=Simple Network Management Protocol (SNMP) TRAP Daemon +After=syslog.target network.target + +[Service] +ExecStart=/usr/sbin/snmptrapd -f + +[Install] +WantedBy=multi-user.target diff --git a/net-analyzer/net-snmp/metadata.xml b/net-analyzer/net-snmp/metadata.xml new file mode 100644 index 000000000000..ce247b9adc80 --- /dev/null +++ b/net-analyzer/net-snmp/metadata.xml @@ -0,0 +1,23 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<maintainer type="project"> +<email>netmon@gentoo.org</email> +<name>Gentoo network monitoring and analysis project</name> +</maintainer> +<use> +<flag name="elf">Enable the use of elf utils to check uptime on some systems</flag> +<flag name="kmem">Enable usage of /dev/kmem</flag> +<flag name="mfd-rewrites">Use MFD rewrites of mib modules where available</flag> +<flag name="netlink">Use <pkg>dev-libs/libnl</pkg> to fetch TCP statistics instead of using /proc/net/tcp (Linux only).</flag> +<flag name="pcap">Install snmppcap which reads from PCAP files and writes to the SNMP transport</flag> +<flag name="pci">Use libpci (from <pkg>sys-apps/pciutils</pkg>) to look up network interface description. This feature is only available on Linux.</flag> +<flag name="rpm">Enable monitoring of <pkg>app-arch/rpm</pkg>. This flag requires the bzip2 and zlib flags to be enabled as well.</flag> +<flag name="smux">Enable support for the legacy smux protocol (superseded by agentx)</flag> +<flag name="ucd-compat">Build UCD compatibility library. Increases significantly the install size.</flag> +</use> +<upstream> +<remote-id type="sourceforge">net-snmp</remote-id> +</upstream> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/net-snmp/net-snmp-5.8-r3.ebuild b/net-analyzer/net-snmp/net-snmp-5.8-r3.ebuild new file mode 100644 index 000000000000..a1920941b96a --- /dev/null +++ b/net-analyzer/net-snmp/net-snmp-5.8-r3.ebuild @@ -0,0 +1,200 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 +PYTHON_COMPAT=( python2_7 ) +DISTUTILS_SINGLE_IMPL=yesplz +DISTUTILS_OPTIONAL=yesplz +WANT_AUTOMAKE=none +PATCHSET=3 +GENTOO_DEPEND_ON_PERL=no + +inherit autotools distutils-r1 eutils ltprune perl-module systemd + +DESCRIPTION="Software for generating and retrieving SNMP data" +HOMEPAGE="http://www.net-snmp.org/" +SRC_URI=" + mirror://sourceforge/project/${PN}/${PN}/${PV/_p*/}/${P/_p*/}.tar.gz + https://dev.gentoo.org/~jer/${PN}-5.7.3-patches-3.tar.xz +" + +S=${WORKDIR}/${P/_/.} + +# GPL-2 for the init scripts +LICENSE="HPND BSD GPL-2" +SLOT="0/35" +KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~mips ppc ppc64 s390 sparc x86" +IUSE="X bzip2 doc elf kmem ipv6 libressl lm-sensors mfd-rewrites minimal mysql netlink pci perl python rpm selinux smux ssl tcpd ucd-compat zlib" + +COMMON_DEPEND=" + ssl? ( + !libressl? ( >=dev-libs/openssl-0.9.6d:0= ) + libressl? ( dev-libs/libressl:= ) + ) + tcpd? ( >=sys-apps/tcp-wrappers-7.6 ) + rpm? ( + app-arch/rpm + dev-libs/popt + ) + bzip2? ( app-arch/bzip2 ) + zlib? ( >=sys-libs/zlib-1.1.4 ) + elf? ( dev-libs/elfutils ) + python? ( + $(python_gen_cond_dep ' + dev-python/setuptools[${PYTHON_MULTI_USEDEP}] + ') + ${PYTHON_DEPS} + ) + pci? ( sys-apps/pciutils ) + lm-sensors? ( sys-apps/lm-sensors ) + netlink? ( dev-libs/libnl:3 ) + mysql? ( dev-db/mysql-connector-c:0= ) + perl? ( dev-lang/perl:= ) +" +DEPEND=" + ${COMMON_DEPEND} + doc? ( app-doc/doxygen ) +" +RDEPEND=" + ${COMMON_DEPEND} + perl? ( + X? ( dev-perl/Tk ) + !minimal? ( dev-perl/TermReadKey ) + ) + selinux? ( sec-policy/selinux-snmp ) +" + +REQUIRED_USE=" + python? ( ${PYTHON_REQUIRED_USE} ) + rpm? ( bzip2 zlib ) +" +S=${WORKDIR}/${P/_p*/} + +RESTRICT=test + +pkg_setup() { + use python && python-single-r1_pkg_setup +} + +src_prepare() { + # snmpconf generates config files with proper selinux context + use selinux && eapply "${FILESDIR}"/${PN}-5.1.2-snmpconf-selinux.patch + + eapply "${FILESDIR}"/${PN}-5.7.3-include-limits.patch + eapply "${FILESDIR}"/${PN}-5.8-tinfo.patch + + mv "${WORKDIR}"/patches/0002-Respect-DESTDIR-for-pythoninstall.patch{,.disabled} || die + mv "${WORKDIR}"/patches/0004-Don-t-report-CFLAGS-and-LDFLAGS-in-net-snmp-config.patch{,.disabled} || die + eapply "${WORKDIR}"/patches/*.patch + + eapply_user + + eautoconf +} + +src_configure() { + # keep this in the same line, configure.ac arguments are passed down to config.h + local mibs="host ucd-snmp/dlmod ucd-snmp/diskio ucd-snmp/extensible mibII/mta_sendmail etherlike-mib/dot3StatsTable" + use lm-sensors && mibs="${mibs} ucd-snmp/lmsensorsMib" + use smux && mibs="${mibs} smux" + + # Assume /etc/mtab is not present with a recent baselayout/openrc (bug #565136) + use kernel_linux && export ac_cv_ETC_MNTTAB=/etc/mtab + + econf \ + $(use_enable !ssl internal-md5) \ + $(use_enable ipv6) \ + $(use_enable mfd-rewrites) \ + $(use_enable perl embedded-perl) \ + $(use_enable ucd-compat ucd-snmp-compatibility) \ + $(use_with bzip2) \ + $(use_with elf) \ + $(use_with kmem kmem-usage) \ + $(use_with mysql) \ + $(use_with netlink nl) \ + $(use_with pci) \ + $(use_with perl perl-modules INSTALLDIRS=vendor) \ + $(use_with python python-modules) \ + $(use_with rpm) \ + $(use_with ssl openssl) \ + $(use_with tcpd libwrap) \ + $(use_with zlib) \ + --enable-shared --disable-static \ + --with-default-snmp-version="3" \ + --with-install-prefix="${D}" \ + --with-ldflags="${LDFLAGS}" \ + --with-logfile="/var/log/net-snmpd.log" \ + --with-mib-modules="${mibs}" \ + --with-persistent-directory="/var/lib/net-snmp" \ + --with-sys-contact="root@Unknown" \ + --with-sys-location="Unknown" +} + +src_compile() { + for target in snmplib agent sedscript all; do + emake OTHERLDFLAGS="${LDFLAGS}" ${target} + done + + use doc && emake docsdox +} + +src_install() { + # bug #317965 + emake -j1 DESTDIR="${D}" install + + if use perl ; then + perl_delete_localpod + if ! use X; then + rm "${D}"/usr/bin/tkmib || die + fi + else + rm -f \ + "${D}"/usr/bin/fixproc \ + "${D}"/usr/bin/ipf-mod.pl \ + "${D}"/usr/bin/mib2c \ + "${D}"/usr/bin/net-snmp-cert \ + "${D}"/usr/bin/snmp-bridge-mib \ + "${D}"/usr/bin/snmpcheck \ + "${D}"/usr/bin/snmpconf \ + "${D}"/usr/bin/tkmib \ + "${D}"/usr/bin/traptoemail \ + "${D}"/usr/share/snmp/mib2c.perl.conf \ + "${D}"/usr/share/snmp/snmp_perl_trapd.pl \ + || die + fi + + dodoc AGENT.txt ChangeLog FAQ INSTALL NEWS PORTING README* TODO + newdoc EXAMPLE.conf.def EXAMPLE.conf + + if use doc; then + docinto html + dodoc -r docs/html/* + fi + + keepdir /var/lib/net-snmp + + newinitd "${FILESDIR}"/snmpd.init.2 snmpd + newconfd "${FILESDIR}"/snmpd.conf snmpd + + newinitd "${FILESDIR}"/snmptrapd.init.2 snmptrapd + newconfd "${FILESDIR}"/snmptrapd.conf snmptrapd + + systemd_dounit "${FILESDIR}"/snmpd.service + systemd_dounit "${FILESDIR}"/snmptrapd.service + + insinto /etc/snmp + newins "${S}"/EXAMPLE.conf snmpd.conf.example + + # Remove everything not required for an agent. + # Keep only the snmpd, snmptrapd, MIBs, headers and libraries. + if use minimal; then + rm -rf \ + "${D}"/**/*.pl \ + "${D}"/usr/bin/{encode_keychange,snmp{get,getnext,set,usm,walk,bulkwalk,table,trap,bulkget,translate,status,delta,test,df,vacm,netstat,inform,check,conf},fixproc,traptoemail} \ + "${D}"/usr/share/snmp/*.conf \ + "${D}"/usr/share/snmp/snmpconf-data \ + || die + fi + + prune_libtool_files +} diff --git a/net-analyzer/net-snmp/net-snmp-5.8-r4.ebuild b/net-analyzer/net-snmp/net-snmp-5.8-r4.ebuild new file mode 100644 index 000000000000..a9de9b055493 --- /dev/null +++ b/net-analyzer/net-snmp/net-snmp-5.8-r4.ebuild @@ -0,0 +1,201 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 +PYTHON_COMPAT=( python2_7 ) +DISTUTILS_SINGLE_IMPL=yesplz +DISTUTILS_OPTIONAL=yesplz +WANT_AUTOMAKE=none +PATCHSET=3 +GENTOO_DEPEND_ON_PERL=no + +inherit autotools distutils-r1 eutils ltprune perl-module systemd + +DESCRIPTION="Software for generating and retrieving SNMP data" +HOMEPAGE="http://www.net-snmp.org/" +SRC_URI=" + mirror://sourceforge/project/${PN}/${PN}/${PV/_p*/}/${P/_p*/}.tar.gz + https://dev.gentoo.org/~jer/${PN}-5.7.3-patches-3.tar.xz +" + +S=${WORKDIR}/${P/_/.} + +# GPL-2 for the init scripts +LICENSE="HPND BSD GPL-2" +SLOT="0/35" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86" +IUSE="X bzip2 doc elf kmem ipv6 libressl lm-sensors mfd-rewrites minimal mysql netlink pci perl python rpm selinux smux ssl tcpd ucd-compat zlib" + +COMMON_DEPEND=" + ssl? ( + !libressl? ( >=dev-libs/openssl-0.9.6d:0= ) + libressl? ( dev-libs/libressl:= ) + ) + tcpd? ( >=sys-apps/tcp-wrappers-7.6 ) + rpm? ( + app-arch/rpm + dev-libs/popt + ) + bzip2? ( app-arch/bzip2 ) + zlib? ( >=sys-libs/zlib-1.1.4 ) + elf? ( dev-libs/elfutils ) + python? ( + $(python_gen_cond_dep ' + dev-python/setuptools[${PYTHON_MULTI_USEDEP}] + ') + ${PYTHON_DEPS} + ) + pci? ( sys-apps/pciutils ) + lm-sensors? ( sys-apps/lm-sensors ) + netlink? ( dev-libs/libnl:3 ) + mysql? ( dev-db/mysql-connector-c:0= ) + perl? ( dev-lang/perl:= ) +" +DEPEND=" + ${COMMON_DEPEND} + doc? ( app-doc/doxygen ) +" +RDEPEND=" + ${COMMON_DEPEND} + perl? ( + X? ( dev-perl/Tk ) + !minimal? ( dev-perl/TermReadKey ) + ) + selinux? ( sec-policy/selinux-snmp ) +" + +REQUIRED_USE=" + python? ( ${PYTHON_REQUIRED_USE} ) + rpm? ( bzip2 zlib ) +" +S=${WORKDIR}/${P/_p*/} + +RESTRICT=test + +pkg_setup() { + use python && python-single-r1_pkg_setup +} + +src_prepare() { + # snmpconf generates config files with proper selinux context + use selinux && eapply "${FILESDIR}"/${PN}-5.1.2-snmpconf-selinux.patch + + eapply "${FILESDIR}"/${PN}-5.7.3-include-limits.patch + eapply "${FILESDIR}"/${PN}-5.8-my_bool.patch + eapply "${FILESDIR}"/${PN}-5.8-tinfo.patch + + mv "${WORKDIR}"/patches/0002-Respect-DESTDIR-for-pythoninstall.patch{,.disabled} || die + mv "${WORKDIR}"/patches/0004-Don-t-report-CFLAGS-and-LDFLAGS-in-net-snmp-config.patch{,.disabled} || die + eapply "${WORKDIR}"/patches/*.patch + + eapply_user + + eautoconf +} + +src_configure() { + # keep this in the same line, configure.ac arguments are passed down to config.h + local mibs="host ucd-snmp/dlmod ucd-snmp/diskio ucd-snmp/extensible mibII/mta_sendmail etherlike-mib/dot3StatsTable" + use lm-sensors && mibs="${mibs} ucd-snmp/lmsensorsMib" + use smux && mibs="${mibs} smux" + + # Assume /etc/mtab is not present with a recent baselayout/openrc (bug #565136) + use kernel_linux && export ac_cv_ETC_MNTTAB=/etc/mtab + + econf \ + $(use_enable !ssl internal-md5) \ + $(use_enable ipv6) \ + $(use_enable mfd-rewrites) \ + $(use_enable perl embedded-perl) \ + $(use_enable ucd-compat ucd-snmp-compatibility) \ + $(use_with bzip2) \ + $(use_with elf) \ + $(use_with kmem kmem-usage) \ + $(use_with mysql) \ + $(use_with netlink nl) \ + $(use_with pci) \ + $(use_with perl perl-modules INSTALLDIRS=vendor) \ + $(use_with python python-modules) \ + $(use_with rpm) \ + $(use_with ssl openssl) \ + $(use_with tcpd libwrap) \ + $(use_with zlib) \ + --enable-shared --disable-static \ + --with-default-snmp-version="3" \ + --with-install-prefix="${D}" \ + --with-ldflags="${LDFLAGS}" \ + --with-logfile="/var/log/net-snmpd.log" \ + --with-mib-modules="${mibs}" \ + --with-persistent-directory="/var/lib/net-snmp" \ + --with-sys-contact="root@Unknown" \ + --with-sys-location="Unknown" +} + +src_compile() { + for target in snmplib agent sedscript all; do + emake OTHERLDFLAGS="${LDFLAGS}" ${target} + done + + use doc && emake docsdox +} + +src_install() { + # bug #317965 + emake -j1 DESTDIR="${D}" install + + if use perl ; then + perl_delete_localpod + if ! use X; then + rm "${D}"/usr/bin/tkmib || die + fi + else + rm -f \ + "${D}"/usr/bin/fixproc \ + "${D}"/usr/bin/ipf-mod.pl \ + "${D}"/usr/bin/mib2c \ + "${D}"/usr/bin/net-snmp-cert \ + "${D}"/usr/bin/snmp-bridge-mib \ + "${D}"/usr/bin/snmpcheck \ + "${D}"/usr/bin/snmpconf \ + "${D}"/usr/bin/tkmib \ + "${D}"/usr/bin/traptoemail \ + "${D}"/usr/share/snmp/mib2c.perl.conf \ + "${D}"/usr/share/snmp/snmp_perl_trapd.pl \ + || die + fi + + dodoc AGENT.txt ChangeLog FAQ INSTALL NEWS PORTING README* TODO + newdoc EXAMPLE.conf.def EXAMPLE.conf + + if use doc; then + docinto html + dodoc -r docs/html/* + fi + + keepdir /var/lib/net-snmp + + newinitd "${FILESDIR}"/snmpd.init.2 snmpd + newconfd "${FILESDIR}"/snmpd.conf snmpd + + newinitd "${FILESDIR}"/snmptrapd.init.2 snmptrapd + newconfd "${FILESDIR}"/snmptrapd.conf snmptrapd + + systemd_dounit "${FILESDIR}"/snmpd.service + systemd_dounit "${FILESDIR}"/snmptrapd.service + + insinto /etc/snmp + newins "${S}"/EXAMPLE.conf snmpd.conf.example + + # Remove everything not required for an agent. + # Keep only the snmpd, snmptrapd, MIBs, headers and libraries. + if use minimal; then + rm -rf \ + "${D}"/**/*.pl \ + "${D}"/usr/bin/{encode_keychange,snmp{get,getnext,set,usm,walk,bulkwalk,table,trap,bulkget,translate,status,delta,test,df,vacm,netstat,inform,check,conf},fixproc,traptoemail} \ + "${D}"/usr/share/snmp/*.conf \ + "${D}"/usr/share/snmp/snmpconf-data \ + || die + fi + + prune_libtool_files +} diff --git a/net-analyzer/net-snmp/net-snmp-5.8-r5.ebuild b/net-analyzer/net-snmp/net-snmp-5.8-r5.ebuild new file mode 100644 index 000000000000..d99fb7481f5e --- /dev/null +++ b/net-analyzer/net-snmp/net-snmp-5.8-r5.ebuild @@ -0,0 +1,210 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 +PYTHON_COMPAT=( python2_7 ) +DISTUTILS_SINGLE_IMPL=yesplz +DISTUTILS_OPTIONAL=yesplz +WANT_AUTOMAKE=none +PATCHSET=3 +GENTOO_DEPEND_ON_PERL=no + +inherit autotools distutils-r1 eutils ltprune perl-module systemd + +DESCRIPTION="Software for generating and retrieving SNMP data" +HOMEPAGE="http://www.net-snmp.org/" +SRC_URI=" + mirror://sourceforge/project/${PN}/${PN}/${PV/_p*/}/${P/_p*/}.tar.gz + https://dev.gentoo.org/~jer/${PN}-5.7.3-patches-3.tar.xz +" + +S=${WORKDIR}/${P/_/.} + +# GPL-2 for the init scripts +LICENSE="HPND BSD GPL-2" +SLOT="0/35" +KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~mips ppc ppc64 ~s390 sparc x86" +IUSE=" + X bzip2 doc elf kmem ipv6 libressl lm-sensors mfd-rewrites minimal mysql + netlink pcap pci perl python rpm selinux smux ssl tcpd ucd-compat zlib +" + +COMMON_DEPEND=" + bzip2? ( app-arch/bzip2 ) + elf? ( dev-libs/elfutils ) + lm-sensors? ( sys-apps/lm-sensors ) + mysql? ( dev-db/mysql-connector-c:0= ) + netlink? ( dev-libs/libnl:3 ) + pcap? ( net-libs/libpcap ) + pci? ( sys-apps/pciutils ) + perl? ( dev-lang/perl:= ) + python? ( + $(python_gen_cond_dep ' + dev-python/setuptools[${PYTHON_MULTI_USEDEP}] + ') + ${PYTHON_DEPS} + ) + rpm? ( + app-arch/rpm + dev-libs/popt + ) + ssl? ( + !libressl? ( >=dev-libs/openssl-0.9.6d:0= ) + libressl? ( dev-libs/libressl:= ) + ) + tcpd? ( >=sys-apps/tcp-wrappers-7.6 ) + zlib? ( >=sys-libs/zlib-1.1.4 ) +" +DEPEND=" + ${COMMON_DEPEND} + doc? ( app-doc/doxygen ) +" +RDEPEND=" + ${COMMON_DEPEND} + perl? ( + X? ( dev-perl/Tk ) + !minimal? ( dev-perl/TermReadKey ) + ) + selinux? ( sec-policy/selinux-snmp ) +" + +REQUIRED_USE=" + python? ( ${PYTHON_REQUIRED_USE} ) + rpm? ( bzip2 zlib ) +" +S=${WORKDIR}/${P/_p*/} + +RESTRICT=test + +pkg_setup() { + use python && python-single-r1_pkg_setup +} + +src_prepare() { + # snmpconf generates config files with proper selinux context + use selinux && eapply "${FILESDIR}"/${PN}-5.1.2-snmpconf-selinux.patch + + eapply "${FILESDIR}"/${PN}-5.7.3-include-limits.patch + eapply "${FILESDIR}"/${PN}-5.8-do-not-conflate-LDFLAGS-and-LIBS.patch + eapply "${FILESDIR}"/${PN}-5.8-my_bool.patch + eapply "${FILESDIR}"/${PN}-5.8-pcap.patch + eapply "${FILESDIR}"/${PN}-5.8-tinfo.patch + + mv "${WORKDIR}"/patches/0002-Respect-DESTDIR-for-pythoninstall.patch{,.disabled} || die + mv "${WORKDIR}"/patches/0004-Don-t-report-CFLAGS-and-LDFLAGS-in-net-snmp-config.patch{,.disabled} || die + eapply "${WORKDIR}"/patches/*.patch + + eapply_user + + eautoconf +} + +src_configure() { + # keep this in the same line, configure.ac arguments are passed down to config.h + local mibs="host ucd-snmp/dlmod ucd-snmp/diskio ucd-snmp/extensible mibII/mta_sendmail etherlike-mib/dot3StatsTable" + use lm-sensors && mibs="${mibs} ucd-snmp/lmsensorsMib" + use smux && mibs="${mibs} smux" + + # Assume /etc/mtab is not present with a recent baselayout/openrc (bug #565136) + use kernel_linux && export ac_cv_ETC_MNTTAB=/etc/mtab + + econf \ + $(use_enable !ssl internal-md5) \ + $(use_enable ipv6) \ + $(use_enable mfd-rewrites) \ + $(use_enable perl embedded-perl) \ + $(use_enable ucd-compat ucd-snmp-compatibility) \ + $(use_with bzip2) \ + $(use_with elf) \ + $(use_with kmem kmem-usage) \ + $(use_with mysql) \ + $(use_with netlink nl) \ + $(use_with pcap) \ + $(use_with pci) \ + $(use_with perl perl-modules INSTALLDIRS=vendor) \ + $(use_with python python-modules) \ + $(use_with rpm) \ + $(use_with ssl openssl) \ + $(use_with tcpd libwrap) \ + $(use_with zlib) \ + --enable-shared --disable-static \ + --with-default-snmp-version="3" \ + --with-install-prefix="${D}" \ + --with-ldflags="${LDFLAGS}" \ + --with-logfile="/var/log/net-snmpd.log" \ + --with-mib-modules="${mibs}" \ + --with-persistent-directory="/var/lib/net-snmp" \ + --with-sys-contact="root@Unknown" \ + --with-sys-location="Unknown" +} + +src_compile() { + for target in snmplib agent sedscript all; do + emake OTHERLDFLAGS="${LDFLAGS}" ${target} + done + + use doc && emake docsdox +} + +src_install() { + # bug #317965 + emake -j1 DESTDIR="${D}" install + + use python && python_optimize + + if use perl ; then + perl_delete_localpod + if ! use X; then + rm "${D}"/usr/bin/tkmib || die + fi + else + rm -f \ + "${D}"/usr/bin/fixproc \ + "${D}"/usr/bin/ipf-mod.pl \ + "${D}"/usr/bin/mib2c \ + "${D}"/usr/bin/net-snmp-cert \ + "${D}"/usr/bin/snmp-bridge-mib \ + "${D}"/usr/bin/snmpcheck \ + "${D}"/usr/bin/snmpconf \ + "${D}"/usr/bin/tkmib \ + "${D}"/usr/bin/traptoemail \ + "${D}"/usr/share/snmp/mib2c.perl.conf \ + "${D}"/usr/share/snmp/snmp_perl_trapd.pl \ + || die + fi + + dodoc AGENT.txt ChangeLog FAQ INSTALL NEWS PORTING README* TODO + newdoc EXAMPLE.conf.def EXAMPLE.conf + + if use doc; then + docinto html + dodoc -r docs/html/* + fi + + keepdir /var/lib/net-snmp + + newinitd "${FILESDIR}"/snmpd.init.2 snmpd + newconfd "${FILESDIR}"/snmpd.conf snmpd + + newinitd "${FILESDIR}"/snmptrapd.init.2 snmptrapd + newconfd "${FILESDIR}"/snmptrapd.conf snmptrapd + + systemd_dounit "${FILESDIR}"/snmpd.service + systemd_dounit "${FILESDIR}"/snmptrapd.service + + insinto /etc/snmp + newins "${S}"/EXAMPLE.conf snmpd.conf.example + + # Remove everything not required for an agent. + # Keep only the snmpd, snmptrapd, MIBs, headers and libraries. + if use minimal; then + rm -rf \ + "${D}"/**/*.pl \ + "${D}"/usr/bin/{encode_keychange,snmp{get,getnext,set,usm,walk,bulkwalk,table,trap,bulkget,translate,status,delta,test,df,vacm,netstat,inform,check,conf},fixproc,traptoemail} \ + "${D}"/usr/share/snmp/*.conf \ + "${D}"/usr/share/snmp/snmpconf-data \ + || die + fi + + prune_libtool_files +} diff --git a/net-analyzer/net-snmp/net-snmp-5.8.1_pre1-r1.ebuild b/net-analyzer/net-snmp/net-snmp-5.8.1_pre1-r1.ebuild new file mode 100644 index 000000000000..c40fd89123d1 --- /dev/null +++ b/net-analyzer/net-snmp/net-snmp-5.8.1_pre1-r1.ebuild @@ -0,0 +1,209 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +PYTHON_COMPAT=( python2_7 ) +DISTUTILS_SINGLE_IMPL=yesplz +DISTUTILS_OPTIONAL=yesplz +WANT_AUTOMAKE=none +PATCHSET=3 +GENTOO_DEPEND_ON_PERL=no + +inherit autotools distutils-r1 perl-module systemd + +DESCRIPTION="Software for generating and retrieving SNMP data" +HOMEPAGE="http://www.net-snmp.org/" +SRC_URI=" + mirror://sourceforge/project/${PN}/${PN}/${PV/_p*/}-pre-releases/${P/_pre/.pre}.tar.gz + https://dev.gentoo.org/~jer/${PN}-5.7.3-patches-3.tar.xz +" + +S=${WORKDIR}/${P/_/.} + +# GPL-2 for the init scripts +LICENSE="HPND BSD GPL-2" +SLOT="0/35" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86" +IUSE=" + X bzip2 doc elf kmem ipv6 libressl lm-sensors mfd-rewrites minimal mysql + netlink pcap pci perl python rpm selinux smux ssl tcpd ucd-compat zlib +" +REQUIRED_USE=" + python? ( ${PYTHON_REQUIRED_USE} ) + rpm? ( bzip2 zlib ) +" + +COMMON_DEPEND=" + bzip2? ( app-arch/bzip2 ) + elf? ( dev-libs/elfutils ) + lm-sensors? ( sys-apps/lm-sensors ) + mysql? ( dev-db/mysql-connector-c:0= ) + netlink? ( dev-libs/libnl:3 ) + pcap? ( net-libs/libpcap ) + pci? ( sys-apps/pciutils ) + perl? ( dev-lang/perl:= ) + python? ( + $(python_gen_cond_dep ' + dev-python/setuptools[${PYTHON_MULTI_USEDEP}] + ') + ${PYTHON_DEPS} + ) + rpm? ( + app-arch/rpm + dev-libs/popt + ) + ssl? ( + !libressl? ( >=dev-libs/openssl-0.9.6d:0= ) + libressl? ( dev-libs/libressl:= ) + ) + tcpd? ( >=sys-apps/tcp-wrappers-7.6 ) + zlib? ( >=sys-libs/zlib-1.1.4 ) +" +DEPEND=" + ${COMMON_DEPEND} + doc? ( app-doc/doxygen ) +" +RDEPEND=" + ${COMMON_DEPEND} + perl? ( + X? ( dev-perl/Tk ) + !minimal? ( dev-perl/TermReadKey ) + ) + selinux? ( sec-policy/selinux-snmp ) +" +S=${WORKDIR}/${P/_pre/.pre} +RESTRICT=test +PATCHES=( + "${FILESDIR}"/${PN}-5.7.3-include-limits.patch + "${FILESDIR}"/${PN}-5.8-do-not-conflate-LDFLAGS-and-LIBS.patch + "${FILESDIR}"/${PN}-5.8-pcap.patch + "${FILESDIR}"/${PN}-5.8-tinfo.patch + "${FILESDIR}"/${PN}-5.8.1-pkg-config.patch +) + +pkg_setup() { + use python && python-single-r1_pkg_setup +} + +src_prepare() { + # snmpconf generates config files with proper selinux context + use selinux && eapply "${FILESDIR}"/${PN}-5.1.2-snmpconf-selinux.patch + + mv "${WORKDIR}"/patches/0002-Respect-DESTDIR-for-pythoninstall.patch{,.disabled} || die + mv "${WORKDIR}"/patches/0004-Don-t-report-CFLAGS-and-LDFLAGS-in-net-snmp-config.patch{,.disabled} || die + eapply "${WORKDIR}"/patches/*.patch + + default + + eautoconf +} + +src_configure() { + # keep this in the same line, configure.ac arguments are passed down to config.h + local mibs="host ucd-snmp/dlmod ucd-snmp/diskio ucd-snmp/extensible mibII/mta_sendmail etherlike-mib/dot3StatsTable" + use lm-sensors && mibs="${mibs} ucd-snmp/lmsensorsMib" + use smux && mibs="${mibs} smux" + + # Assume /etc/mtab is not present with a recent baselayout/openrc (bug #565136) + use kernel_linux && export ac_cv_ETC_MNTTAB=/etc/mtab + + econf \ + $(use_enable !ssl internal-md5) \ + $(use_enable ipv6) \ + $(use_enable mfd-rewrites) \ + $(use_enable perl embedded-perl) \ + $(use_enable ucd-compat ucd-snmp-compatibility) \ + $(use_with bzip2) \ + $(use_with elf) \ + $(use_with kmem kmem-usage) \ + $(use_with mysql) \ + $(use_with netlink nl) \ + $(use_with pcap) \ + $(use_with pci) \ + $(use_with perl perl-modules INSTALLDIRS=vendor) \ + $(use_with python python-modules) \ + $(use_with rpm) \ + $(use_with ssl openssl) \ + $(use_with tcpd libwrap) \ + $(use_with zlib) \ + --enable-shared --disable-static \ + --with-default-snmp-version="3" \ + --with-install-prefix="${D}" \ + --with-ldflags="${LDFLAGS}" \ + --with-logfile="/var/log/net-snmpd.log" \ + --with-mib-modules="${mibs}" \ + --with-persistent-directory="/var/lib/net-snmp" \ + --with-sys-contact="root@Unknown" \ + --with-sys-location="Unknown" +} + +src_compile() { + for target in snmplib agent sedscript all; do + emake OTHERLDFLAGS="${LDFLAGS}" ${target} + done + + use doc && emake docsdox +} + +src_install() { + # bug #317965 + emake -j1 DESTDIR="${D}" install + + use python && python_optimize + + if use perl ; then + perl_delete_localpod + if ! use X; then + rm "${D}"/usr/bin/tkmib || die + fi + else + rm -f \ + "${D}"/usr/bin/fixproc \ + "${D}"/usr/bin/ipf-mod.pl \ + "${D}"/usr/bin/mib2c \ + "${D}"/usr/bin/net-snmp-cert \ + "${D}"/usr/bin/snmp-bridge-mib \ + "${D}"/usr/bin/snmpcheck \ + "${D}"/usr/bin/snmpconf \ + "${D}"/usr/bin/tkmib \ + "${D}"/usr/bin/traptoemail \ + "${D}"/usr/share/snmp/mib2c.perl.conf \ + "${D}"/usr/share/snmp/snmp_perl_trapd.pl \ + || die + fi + + dodoc AGENT.txt ChangeLog FAQ INSTALL NEWS PORTING README* TODO + newdoc EXAMPLE.conf.def EXAMPLE.conf + + if use doc; then + docinto html + dodoc -r docs/html/* + fi + + keepdir /var/lib/net-snmp + + newinitd "${FILESDIR}"/snmpd.init.2 snmpd + newconfd "${FILESDIR}"/snmpd.conf snmpd + + newinitd "${FILESDIR}"/snmptrapd.init.2 snmptrapd + newconfd "${FILESDIR}"/snmptrapd.conf snmptrapd + + systemd_dounit "${FILESDIR}"/snmpd.service + systemd_dounit "${FILESDIR}"/snmptrapd.service + + insinto /etc/snmp + newins "${S}"/EXAMPLE.conf snmpd.conf.example + + # Remove everything not required for an agent. + # Keep only the snmpd, snmptrapd, MIBs, headers and libraries. + if use minimal; then + rm -rf \ + "${D}"/**/*.pl \ + "${D}"/usr/bin/{encode_keychange,snmp{get,getnext,set,usm,walk,bulkwalk,table,trap,bulkget,translate,status,delta,test,df,vacm,netstat,inform,check,conf},fixproc,traptoemail} \ + "${D}"/usr/share/snmp/*.conf \ + "${D}"/usr/share/snmp/snmpconf-data \ + || die + fi + + find "${ED}" -name '*.la' -delete || die +} diff --git a/net-analyzer/net-snmp/net-snmp-5.8.1_pre2.ebuild b/net-analyzer/net-snmp/net-snmp-5.8.1_pre2.ebuild new file mode 100644 index 000000000000..1418de67f9f9 --- /dev/null +++ b/net-analyzer/net-snmp/net-snmp-5.8.1_pre2.ebuild @@ -0,0 +1,209 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +PYTHON_COMPAT=( python2_7 ) +DISTUTILS_SINGLE_IMPL=yesplz +DISTUTILS_OPTIONAL=yesplz +WANT_AUTOMAKE=none +PATCHSET=3 +GENTOO_DEPEND_ON_PERL=no + +inherit autotools distutils-r1 perl-module systemd + +DESCRIPTION="Software for generating and retrieving SNMP data" +HOMEPAGE="http://www.net-snmp.org/" +SRC_URI=" + mirror://sourceforge/project/${PN}/${PN}/${PV/_p*/}-pre-releases/${P/_pre/.pre}.tar.gz + https://dev.gentoo.org/~jer/${PN}-5.7.3-patches-3.tar.xz +" + +S=${WORKDIR}/${P/_/.} + +# GPL-2 for the init scripts +LICENSE="HPND BSD GPL-2" +SLOT="0/35" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86" +IUSE=" + X bzip2 doc elf kmem ipv6 libressl lm-sensors mfd-rewrites minimal mysql + netlink pcap pci perl python rpm selinux smux ssl tcpd ucd-compat zlib +" +REQUIRED_USE=" + python? ( ${PYTHON_REQUIRED_USE} ) + rpm? ( bzip2 zlib ) +" + +COMMON_DEPEND=" + bzip2? ( app-arch/bzip2 ) + elf? ( dev-libs/elfutils ) + lm-sensors? ( sys-apps/lm-sensors ) + mysql? ( dev-db/mysql-connector-c:0= ) + netlink? ( dev-libs/libnl:3 ) + pcap? ( net-libs/libpcap ) + pci? ( sys-apps/pciutils ) + perl? ( dev-lang/perl:= ) + python? ( + $(python_gen_cond_dep ' + dev-python/setuptools[${PYTHON_MULTI_USEDEP}] + ') + ${PYTHON_DEPS} + ) + rpm? ( + app-arch/rpm + dev-libs/popt + ) + ssl? ( + !libressl? ( >=dev-libs/openssl-0.9.6d:0= ) + libressl? ( dev-libs/libressl:= ) + ) + tcpd? ( >=sys-apps/tcp-wrappers-7.6 ) + zlib? ( >=sys-libs/zlib-1.1.4 ) +" +DEPEND=" + ${COMMON_DEPEND} + doc? ( app-doc/doxygen ) +" +RDEPEND=" + ${COMMON_DEPEND} + perl? ( + X? ( dev-perl/Tk ) + !minimal? ( dev-perl/TermReadKey ) + ) + selinux? ( sec-policy/selinux-snmp ) +" +S=${WORKDIR}/${P/_pre/.pre} +RESTRICT=test +PATCHES=( + "${FILESDIR}"/${PN}-5.7.3-include-limits.patch + "${FILESDIR}"/${PN}-5.8-do-not-conflate-LDFLAGS-and-LIBS.patch + "${FILESDIR}"/${PN}-5.8-pcap.patch + "${FILESDIR}"/${PN}-5.8-tinfo.patch + "${FILESDIR}"/${PN}-5.8.1-pkg-config.patch +) + +pkg_setup() { + use python && python-single-r1_pkg_setup +} + +src_prepare() { + # snmpconf generates config files with proper selinux context + use selinux && eapply "${FILESDIR}"/${PN}-5.1.2-snmpconf-selinux.patch + + mv "${WORKDIR}"/patches/0002-Respect-DESTDIR-for-pythoninstall.patch{,.disabled} || die + mv "${WORKDIR}"/patches/0004-Don-t-report-CFLAGS-and-LDFLAGS-in-net-snmp-config.patch{,.disabled} || die + eapply "${WORKDIR}"/patches/*.patch + + default + + eautoconf +} + +src_configure() { + # keep this in the same line, configure.ac arguments are passed down to config.h + local mibs="host ucd-snmp/dlmod ucd-snmp/diskio ucd-snmp/extensible mibII/mta_sendmail etherlike-mib/dot3StatsTable" + use lm-sensors && mibs="${mibs} ucd-snmp/lmsensorsMib" + use smux && mibs="${mibs} smux" + + # Assume /etc/mtab is not present with a recent baselayout/openrc (bug #565136) + use kernel_linux && export ac_cv_ETC_MNTTAB=/etc/mtab + + econf \ + $(use_enable !ssl internal-md5) \ + $(use_enable ipv6) \ + $(use_enable mfd-rewrites) \ + $(use_enable perl embedded-perl) \ + $(use_enable ucd-compat ucd-snmp-compatibility) \ + $(use_with bzip2) \ + $(use_with elf) \ + $(use_with kmem kmem-usage) \ + $(use_with mysql) \ + $(use_with netlink nl) \ + $(use_with pcap) \ + $(use_with pci) \ + $(use_with perl perl-modules INSTALLDIRS=vendor) \ + $(use_with python python-modules) \ + $(use_with rpm) \ + $(use_with ssl openssl) \ + $(use_with tcpd libwrap) \ + $(use_with zlib) \ + --enable-shared --disable-static \ + --with-default-snmp-version="3" \ + --with-install-prefix="${D}" \ + --with-ldflags="${LDFLAGS}" \ + --with-logfile="/var/log/net-snmpd.log" \ + --with-mib-modules="${mibs}" \ + --with-persistent-directory="/var/lib/net-snmp" \ + --with-sys-contact="root@Unknown" \ + --with-sys-location="Unknown" +} + +src_compile() { + for target in snmplib agent sedscript all; do + emake OTHERLDFLAGS="${LDFLAGS}" ${target} + done + + use doc && emake docsdox +} + +src_install () { + # bug #317965 + emake -j1 DESTDIR="${D}" install + + use python && python_optimize + + if use perl ; then + perl_delete_localpod + if ! use X; then + rm "${D}"/usr/bin/tkmib || die + fi + else + rm -f \ + "${D}"/usr/bin/fixproc \ + "${D}"/usr/bin/ipf-mod.pl \ + "${D}"/usr/bin/mib2c \ + "${D}"/usr/bin/net-snmp-cert \ + "${D}"/usr/bin/snmp-bridge-mib \ + "${D}"/usr/bin/snmpcheck \ + "${D}"/usr/bin/snmpconf \ + "${D}"/usr/bin/tkmib \ + "${D}"/usr/bin/traptoemail \ + "${D}"/usr/share/snmp/mib2c.perl.conf \ + "${D}"/usr/share/snmp/snmp_perl_trapd.pl \ + || die + fi + + dodoc AGENT.txt ChangeLog FAQ INSTALL NEWS PORTING README* TODO + newdoc EXAMPLE.conf.def EXAMPLE.conf + + if use doc; then + docinto html + dodoc -r docs/html/* + fi + + keepdir /var/lib/net-snmp + + newinitd "${FILESDIR}"/snmpd.init.2 snmpd + newconfd "${FILESDIR}"/snmpd.conf snmpd + + newinitd "${FILESDIR}"/snmptrapd.init.2 snmptrapd + newconfd "${FILESDIR}"/snmptrapd.conf snmptrapd + + systemd_dounit "${FILESDIR}"/snmpd.service + systemd_dounit "${FILESDIR}"/snmptrapd.service + + insinto /etc/snmp + newins "${S}"/EXAMPLE.conf snmpd.conf.example + + # Remove everything not required for an agent. + # Keep only the snmpd, snmptrapd, MIBs, headers and libraries. + if use minimal; then + rm -rf \ + "${D}"/**/*.pl \ + "${D}"/usr/bin/{encode_keychange,snmp{get,getnext,set,usm,walk,bulkwalk,table,trap,bulkget,translate,status,delta,test,df,vacm,netstat,inform,check,conf},fixproc,traptoemail} \ + "${D}"/usr/share/snmp/*.conf \ + "${D}"/usr/share/snmp/snmpconf-data \ + || die + fi + + find "${ED}" -name '*.la' -delete || die +} diff --git a/net-analyzer/net-snmp/net-snmp-99999999.ebuild b/net-analyzer/net-snmp/net-snmp-99999999.ebuild new file mode 100644 index 000000000000..dd3818e50c1d --- /dev/null +++ b/net-analyzer/net-snmp/net-snmp-99999999.ebuild @@ -0,0 +1,213 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +PYTHON_COMPAT=( python3_{6,7,8} ) +DISTUTILS_SINGLE_IMPL=yesplz +DISTUTILS_OPTIONAL=yesplz +WANT_AUTOMAKE=none +PATCHSET=3 +GENTOO_DEPEND_ON_PERL=no + +inherit autotools distutils-r1 git-r3 perl-module systemd + +DESCRIPTION="Software for generating and retrieving SNMP data" +HOMEPAGE="http://www.net-snmp.org/" +EGIT_REPO_URI="https://github.com/net-snmp/net-snmp" +SRC_URI=" + https://dev.gentoo.org/~jer/${PN}-5.7.3-patches-3.tar.xz +" + +# GPL-2 for the init scripts +LICENSE="HPND BSD GPL-2" +SLOT="0/35" +KEYWORDS="" +IUSE=" + X bzip2 doc elf kmem ipv6 libressl lm-sensors mfd-rewrites minimal mysql + netlink pcap pci perl python rpm selinux smux ssl tcpd ucd-compat zlib +" +REQUIRED_USE=" + python? ( ${PYTHON_REQUIRED_USE} ) + rpm? ( bzip2 zlib ) +" + +COMMON_DEPEND=" + bzip2? ( app-arch/bzip2 ) + elf? ( dev-libs/elfutils ) + lm-sensors? ( sys-apps/lm-sensors ) + mysql? ( dev-db/mysql-connector-c:0= ) + netlink? ( dev-libs/libnl:3 ) + pcap? ( net-libs/libpcap ) + pci? ( sys-apps/pciutils ) + perl? ( dev-lang/perl:= ) + python? ( + $(python_gen_cond_dep ' + dev-python/setuptools[${PYTHON_MULTI_USEDEP}] + ') + ${PYTHON_DEPS} + ) + rpm? ( + app-arch/rpm + dev-libs/popt + ) + ssl? ( + !libressl? ( >=dev-libs/openssl-0.9.6d:0= ) + libressl? ( dev-libs/libressl:= ) + ) + tcpd? ( >=sys-apps/tcp-wrappers-7.6 ) + zlib? ( >=sys-libs/zlib-1.1.4 ) +" +DEPEND=" + ${COMMON_DEPEND} + doc? ( app-doc/doxygen ) +" +RDEPEND=" + ${COMMON_DEPEND} + perl? ( + X? ( dev-perl/Tk ) + !minimal? ( dev-perl/TermReadKey ) + ) + selinux? ( sec-policy/selinux-snmp ) +" +S=${WORKDIR}/${P/_/.} +S=${WORKDIR}/${P/_p*/} +RESTRICT=test +PATCHES=( + "${FILESDIR}"/${PN}-5.7.3-include-limits.patch + "${FILESDIR}"/${PN}-5.8-do-not-conflate-LDFLAGS-and-LIBS.patch + "${FILESDIR}"/${PN}-5.8-pcap.patch + "${FILESDIR}"/${PN}-5.8.1-pkg-config.patch + "${FILESDIR}"/${PN}-99999999-tinfo.patch +) + +pkg_setup() { + use python && python-single-r1_pkg_setup +} + +src_unpack() { + default + git-r3_src_unpack +} + +src_prepare() { + # snmpconf generates config files with proper selinux context + use selinux && eapply "${FILESDIR}"/${PN}-5.1.2-snmpconf-selinux.patch + + mv "${WORKDIR}"/patches/0002-Respect-DESTDIR-for-pythoninstall.patch{,.disabled} || die + mv "${WORKDIR}"/patches/0004-Don-t-report-CFLAGS-and-LDFLAGS-in-net-snmp-config.patch{,.disabled} || die + eapply "${WORKDIR}"/patches/*.patch + + default + + eautoconf +} + +src_configure() { + # keep this in the same line, configure.ac arguments are passed down to config.h + local mibs="host ucd-snmp/dlmod ucd-snmp/diskio ucd-snmp/extensible mibII/mta_sendmail etherlike-mib/dot3StatsTable" + use lm-sensors && mibs="${mibs} ucd-snmp/lmsensorsMib" + use smux && mibs="${mibs} smux" + + # Assume /etc/mtab is not present with a recent baselayout/openrc (bug #565136) + use kernel_linux && export ac_cv_ETC_MNTTAB=/etc/mtab + + econf \ + $(use_enable !ssl internal-md5) \ + $(use_enable ipv6) \ + $(use_enable mfd-rewrites) \ + $(use_enable perl embedded-perl) \ + $(use_enable ucd-compat ucd-snmp-compatibility) \ + $(use_with bzip2) \ + $(use_with elf) \ + $(use_with kmem kmem-usage) \ + $(use_with mysql) \ + $(use_with netlink nl) \ + $(use_with pcap) \ + $(use_with pci) \ + $(use_with perl perl-modules INSTALLDIRS=vendor) \ + $(use_with python python-modules) \ + $(use_with rpm) \ + $(use_with ssl openssl) \ + $(use_with tcpd libwrap) \ + $(use_with zlib) \ + --enable-shared --disable-static \ + --with-default-snmp-version="3" \ + --with-install-prefix="${D}" \ + --with-ldflags="${LDFLAGS}" \ + --with-logfile="/var/log/net-snmpd.log" \ + --with-mib-modules="${mibs}" \ + --with-persistent-directory="/var/lib/net-snmp" \ + --with-sys-contact="root@Unknown" \ + --with-sys-location="Unknown" +} + +src_compile() { + for target in snmplib agent sedscript all; do + emake OTHERLDFLAGS="${LDFLAGS}" ${target} + done + + use doc && emake docsdox +} + +src_install() { + # bug #317965 + emake -j1 DESTDIR="${D}" install + + use python && python_optimize + + if use perl ; then + perl_delete_localpod + if ! use X; then + rm "${D}"/usr/bin/tkmib || die + fi + else + rm -f \ + "${D}"/usr/bin/fixproc \ + "${D}"/usr/bin/ipf-mod.pl \ + "${D}"/usr/bin/mib2c \ + "${D}"/usr/bin/net-snmp-cert \ + "${D}"/usr/bin/snmp-bridge-mib \ + "${D}"/usr/bin/snmpcheck \ + "${D}"/usr/bin/snmpconf \ + "${D}"/usr/bin/tkmib \ + "${D}"/usr/bin/traptoemail \ + "${D}"/usr/share/snmp/mib2c.perl.conf \ + "${D}"/usr/share/snmp/snmp_perl_trapd.pl \ + || die + fi + + dodoc AGENT.txt ChangeLog FAQ INSTALL NEWS PORTING README* TODO + newdoc EXAMPLE.conf.def EXAMPLE.conf + + if use doc; then + docinto html + dodoc -r docs/html/* + fi + + keepdir /var/lib/net-snmp + + newinitd "${FILESDIR}"/snmpd.init.2 snmpd + newconfd "${FILESDIR}"/snmpd.conf snmpd + + newinitd "${FILESDIR}"/snmptrapd.init.2 snmptrapd + newconfd "${FILESDIR}"/snmptrapd.conf snmptrapd + + systemd_dounit "${FILESDIR}"/snmpd.service + systemd_dounit "${FILESDIR}"/snmptrapd.service + + insinto /etc/snmp + newins "${S}"/EXAMPLE.conf snmpd.conf.example + + # Remove everything not required for an agent. + # Keep only the snmpd, snmptrapd, MIBs, headers and libraries. + if use minimal; then + rm -rf \ + "${D}"/**/*.pl \ + "${D}"/usr/bin/{encode_keychange,snmp{get,getnext,set,usm,walk,bulkwalk,table,trap,bulkget,translate,status,delta,test,df,vacm,netstat,inform,check,conf},fixproc,traptoemail} \ + "${D}"/usr/share/snmp/*.conf \ + "${D}"/usr/share/snmp/snmpconf-data \ + || die + fi + + find "${ED}" -name '*.la' -delete || die +} diff --git a/net-analyzer/netcat/Manifest b/net-analyzer/netcat/Manifest new file mode 100644 index 000000000000..89ba3032b449 --- /dev/null +++ b/net-analyzer/netcat/Manifest @@ -0,0 +1,4 @@ +DIST nc-v6-20000918.patch.gz 8740 BLAKE2B 56274ee32a77f335c31b5593ae92afdb1758ee02bec2b06eb8e06c2cdf856af26f568be7caf287f248909f9b519f9dc77c78623337024d8c1afc770307187cac SHA512 56326fc7c40ea676173f150842367ea1782e700de682d790bb0f2c0df86e72a30f4c3ea0d937deb9d92f5eed47d2d4cb53edaca7dd23eb394a498b2f424bb2fe +DIST nc110.20180111.tar.xz 69984 BLAKE2B cb345db31d8857fc1c3973eba45c7a45ec0c5721829a19c46f1ec91a792d9d6309930b3bba5df1180989025f7a04ec8c85cf4832ac6f4199d13f15764f000420 SHA512 4413849c07c6ec5aae07c6e2baa1ba9a99721fa6ac08cf9e7d15379937a207246eb4f4299dd8c049445a72eac9cfe0a3633a87e4e01e21036db1217ea7a1e330 +DIST nc110.tgz 75267 BLAKE2B 203b5f54805ddef2c3e9627300dfb6d14f098e88433ca807c8db01f009dec1ccc329925025238dae00b5e82e91c0787ef25536d08310ac127cda1775cfb2afb3 SHA512 c9a7f5045f76d9ffef4e83fcc3e82f69ac4eb05e061686db51e9367949bfe0b90226b290a059dc68dcf3bf2040b95b5c78545199674da57a7c73e2f9145cf812 +DIST netcat-110-patches-1.0.tar.bz2 25751 BLAKE2B c0be51a057981ad1df932f7317a1c317c8788efa670778a4f5bbf67c9d983754bd20188a15e7ced3d849a25244926afc54129e0a2df07bc34932d15a3efbf302 SHA512 b9e7e35aa7e26d30f0115d87aff34fd0cadfad99fdb77cc5aa3ba51bec331f632e180484927c4368172ee9cc6c996b8691bd19bad8806912d8820158a98eab46 diff --git a/net-analyzer/netcat/metadata.xml b/net-analyzer/netcat/metadata.xml new file mode 100644 index 000000000000..4088bd478809 --- /dev/null +++ b/net-analyzer/netcat/metadata.xml @@ -0,0 +1,14 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>netmon@gentoo.org</email> + <name>Gentoo network monitoring and analysis project</name> + </maintainer> + <longdescription>the network swiss army knife</longdescription> + <upstream> + <remote-id type="sourceforge">nc110</remote-id> + <remote-id type="cpe">cpe:/a:netcat_project:netcat</remote-id> + </upstream> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/netcat/netcat-110-r9.ebuild b/net-analyzer/netcat/netcat-110-r9.ebuild new file mode 100644 index 000000000000..b2f2de36b879 --- /dev/null +++ b/net-analyzer/netcat/netcat-110-r9.ebuild @@ -0,0 +1,52 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +inherit eutils toolchain-funcs flag-o-matic + +PATCH_VER="1.0" +MY_P=nc${PV} +DESCRIPTION="the network swiss army knife" +HOMEPAGE="http://nc110.sourceforge.net/" +SRC_URI="mirror://sourceforge/nc110/${MY_P}.tgz + ftp://sith.mimuw.edu.pl/pub/users/baggins/IPv6/nc-v6-20000918.patch.gz + mirror://gentoo/${P}-patches-${PATCH_VER}.tar.bz2" + +LICENSE="netcat" +SLOT="0" +KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos ~sparc64-solaris ~x64-solaris" +IUSE="crypt ipv6 static" + +LIB_DEPEND="crypt? ( dev-libs/libmix[static-libs(+)] )" +RDEPEND="!static? ( ${LIB_DEPEND//\[static-libs(+)]} )" +DEPEND="${RDEPEND} + static? ( ${LIB_DEPEND} )" + +S=${WORKDIR} + +src_prepare() { + epatch "${DISTDIR}"/nc-v6-20000918.patch.gz patch + sed -i 's:#define HAVE_BIND:#undef HAVE_BIND:' netcat.c + sed -i 's:#define FD_SETSIZE 16:#define FD_SETSIZE 1024:' netcat.c #34250 + [[ ${CHOST} == *-solaris* ]] && \ + sed -i 's:gethostbyname2(\([^)]\+\)):getipnodebyname(\1, AI_DEFAULT, NULL):' netcat.c +} + +src_compile() { + export XLIBS="" + export XFLAGS="-DLINUX -DTELNET -DGAPING_SECURITY_HOLE" + use ipv6 && XFLAGS="${XFLAGS} -DINET6" + use static && export STATIC="-static" + use crypt && XFLAGS="${XFLAGS} -DAESCRYPT" && XLIBS="${XLIBS} -lmix" + [[ ${CHOST} == *-solaris* ]] && XLIBS="${XLIBS} -lnsl -lsocket" + emake -e CC="$(tc-getCC) ${CFLAGS} ${LDFLAGS}" nc +} + +src_install() { + dobin nc + dodoc README* netcat.blurb debian-* + doman nc.1 + docinto scripts + dodoc scripts/* +} diff --git a/net-analyzer/netcat/netcat-110.20180111.ebuild b/net-analyzer/netcat/netcat-110.20180111.ebuild new file mode 100644 index 000000000000..da20c98247b7 --- /dev/null +++ b/net-analyzer/netcat/netcat-110.20180111.ebuild @@ -0,0 +1,52 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI="5" + +inherit toolchain-funcs flag-o-matic + +MY_P="nc${PV}" +DESCRIPTION="the network swiss army knife" +HOMEPAGE="http://nc110.sourceforge.net/" +SRC_URI="mirror://sourceforge/nc110/${MY_P}.tar.xz" + +LICENSE="netcat" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos ~sparc64-solaris ~x64-solaris" +IUSE="ipv6 static" + +S=${WORKDIR}/nc110 + +src_prepare() { + sed -i \ + -e '/#define HAVE_BIND/s:#define:#undef:' \ + -e '/#define FD_SETSIZE 16/s:16:1024: #34250' \ + netcat.c || die + [[ ${CHOST} == *-solaris* ]] && \ + sed -i 's:gethostbyname2 *(\([^)]\+\)):getipnodebyname (\1, AI_DEFAULT, NULL):' netcat.c +} + +src_configure() { + use ipv6 || sed -i '/#define INET6/d' generic.h + append-cppflags -DTELNET -DGAPING_SECURITY_HOLE +} + +src_compile() { + local xlibs + [[ ${CHOST} == *-solaris* ]] && xlibs+=" -lnsl -lsocket" + emake \ + LD="$(tc-getCC) ${LDFLAGS}" \ + DFLAGS="${CPPFLAGS}" \ + XFLAGS="${CFLAGS}" \ + STATIC=$(usex static '-static' '') \ + XLIBS="${xlibs}" \ + nc +} + +src_install() { + dobin nc + dodoc README* netcat.blurb + doman nc.1 + docinto scripts + dodoc scripts/* +} diff --git a/net-analyzer/netdata/Manifest b/net-analyzer/netdata/Manifest new file mode 100644 index 000000000000..63b902ed9f50 --- /dev/null +++ b/net-analyzer/netdata/Manifest @@ -0,0 +1,3 @@ +DIST netdata-1.21.1.tar.gz 3748090 BLAKE2B 5cc8dd47b768838eecc7c8af35a82548dc5bb16acb0a88c17ee1254f86ca9b63a5108bce9205c000283b817478749d963b69c65e3bdc8e2fadecc9a1826a7f2e SHA512 66d2e0cb977275250fd7b51e5156957a4506ddba586de5fe796459ea241cbbed7013fd4cf9d7acf6666407352fb34e3b962a2d01565a9cb982c89c76b7cd79b9 +DIST netdata-1.22.0.tar.gz 3786121 BLAKE2B ad34bcdb94cf44f8de154bf53b2e4ecbecee43c6cef2e5337c0fa6bd08b0feb41c25ee96e51fc6c54d72909559e5ac822b44153daa71255487bb0713ce6eca1d SHA512 3bf239c3e950195ef7b8b43f1c17f2cc94f9257a4f21665629f7b518cc6fcef3b0837743254efd03323408b39e2afa9533487147fa30c8f015705c391aa543f3 +DIST netdata-1.22.1.tar.gz 3787203 BLAKE2B cb09ade9540d81fac9b30738650206bce263b74445ce76bf3e9c57a7935bd5fed04806b3b3ba6631ad7ed119b93b1f36eb10261a239127e238e4cf09ca2f4e7a SHA512 47a0b6c4c1b3d8ab18cf25725223c72683ed74084f0efd09cddbe293950839315f8fcadb16c2e5fa9a179745f20b08ce8652d4b972465eacc6a1792b4cfc296e diff --git a/net-analyzer/netdata/metadata.xml b/net-analyzer/netdata/metadata.xml new file mode 100644 index 000000000000..78ac286a3d5e --- /dev/null +++ b/net-analyzer/netdata/metadata.xml @@ -0,0 +1,28 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>candrews@gentoo.org</email> + <name>Craig Andrews</name> + </maintainer> + <use> + <flag name="compression">Enable compression via zlib</flag> + <flag name="dbengine">Enable the Netdata database engine</flag> + <flag name="ipmi">Install <pkg>sys-apps/ipmitool</pkg> required for monitoring IPMI sensors.</flag> + <flag name="jsonc">Enable optimization of JSON using <pkg>dev-libs/json-c</pkg></flag> + <flag name="kinesis">Enable support for Amazon Kenesis as a backend</flag> + <flag name="mongodb">Enable support for the mongodb backend</flag> + <flag name="nfacct">Enable the nfacct plugin</flag> + <flag name="nodejs">Enable use of nodejs (which some plugins use)</flag> + <flag name="prometheus">Enable support for the Prometheus remote write backend</flag> + <flag name="tor">Enable monitoring of tor</flag> + <flag name="xen">Enable monitoring of xen</flag> + </use> + <upstream> + <remote-id type="github">netdata/netdata</remote-id> + </upstream> + <longdescription lang="en"> + Linux real time system monitoring web interface + </longdescription> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/netdata/netdata-1.21.1-r1.ebuild b/net-analyzer/netdata/netdata-1.21.1-r1.ebuild new file mode 100644 index 000000000000..7d7a959dc6c5 --- /dev/null +++ b/net-analyzer/netdata/netdata-1.21.1-r1.ebuild @@ -0,0 +1,139 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +PYTHON_COMPAT=( python{3_6,3_7,3_8} ) + +inherit autotools fcaps linux-info python-single-r1 systemd + +if [[ ${PV} == *9999 ]] ; then + EGIT_REPO_URI="https://github.com/netdata/${PN}.git" + inherit git-r3 +else + SRC_URI="https://github.com/netdata/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" + KEYWORDS="~amd64 ~x86" +fi + +DESCRIPTION="Linux real time system monitoring, done right!" +HOMEPAGE="https://github.com/netdata/netdata https://my-netdata.io/" + +LICENSE="GPL-3+ MIT BSD" +SLOT="0" +IUSE="caps +compression cpu_flags_x86_sse2 cups +dbengine ipmi +jsonc kinesis mongodb mysql nfacct nodejs postgres prometheus +python tor xen" +REQUIRED_USE=" + mysql? ( python ) + python? ( ${PYTHON_REQUIRED_USE} ) + tor? ( python )" + +# most unconditional dependencies are for plugins.d/charts.d.plugin: +RDEPEND=" + acct-group/netdata + acct-user/netdata + app-misc/jq + >=app-shells/bash-4:0 + || ( + net-analyzer/openbsd-netcat + net-analyzer/netcat + ) + net-misc/curl + net-misc/wget + sys-apps/util-linux + virtual/awk + caps? ( sys-libs/libcap ) + cups? ( net-print/cups ) + dbengine? ( + app-arch/lz4 + dev-libs/judy + dev-libs/openssl:= + ) + dev-libs/libuv + compression? ( sys-libs/zlib ) + ipmi? ( sys-libs/freeipmi ) + jsonc? ( dev-libs/json-c ) + kinesis? ( dev-libs/aws-sdk-cpp[kinesis] ) + mongodb? ( dev-libs/mongo-c-driver ) + nfacct? ( + net-firewall/nfacct + net-libs/libmnl + ) + nodejs? ( net-libs/nodejs ) + prometheus? ( + dev-libs/protobuf:= + app-arch/snappy + ) + python? ( + ${PYTHON_DEPS} + $(python_gen_cond_dep 'dev-python/pyyaml[${PYTHON_MULTI_USEDEP}]') + mysql? ( + || ( + $(python_gen_cond_dep 'dev-python/mysqlclient[${PYTHON_MULTI_USEDEP}]') + $(python_gen_cond_dep 'dev-python/mysql-python[${PYTHON_MULTI_USEDEP}]') + ) + ) + postgres? ( $(python_gen_cond_dep 'dev-python/psycopg:2[${PYTHON_MULTI_USEDEP}]') ) + tor? ( $(python_gen_cond_dep 'net-libs/stem[${PYTHON_MULTI_USEDEP}]') ) + ) + xen? ( + app-emulation/xen-tools + dev-libs/yajl + )" +DEPEND="${RDEPEND} + virtual/pkgconfig" + +FILECAPS=( + 'cap_dac_read_search,cap_sys_ptrace+ep' 'usr/libexec/netdata/plugins.d/apps.plugin' +) + +pkg_setup() { + use python && python-single-r1_pkg_setup + linux-info_pkg_setup +} + +src_prepare() { + default + eautoreconf +} + +src_configure() { + econf \ + --localstatedir="${EPREFIX}"/var \ + --with-user=netdata \ + $(use_enable jsonc) \ + $(use_enable cups plugin-cups) \ + $(use_enable dbengine) \ + $(use_enable nfacct plugin-nfacct) \ + $(use_enable ipmi plugin-freeipmi) \ + $(use_enable kinesis backend-kinesis) \ + $(use_enable mongodb backend-mongodb) \ + $(use_enable prometheus backend-prometheus-remote-write) \ + $(use_enable xen plugin-xenstat) \ + $(use_enable cpu_flags_x86_sse2 x86-sse) \ + $(use_with compression zlib) +} + +src_install() { + default + + rm -rf "${D}/var/cache" || die + + keepdir /var/log/netdata + fowners -Rc netdata:netdata /var/log/netdata + keepdir /var/lib/netdata + keepdir /var/lib/netdata/registry + fowners -Rc netdata:netdata /var/lib/netdata + + fowners -Rc root:netdata /usr/share/${PN} + + newinitd system/netdata-openrc ${PN} + systemd_dounit system/netdata.service + insinto /etc/netdata + doins system/netdata.conf +} + +pkg_postinst() { + fcaps_pkg_postinst + + if use xen ; then + fcaps 'cap_dac_override' 'usr/libexec/netdata/plugins.d/xenstat.plugin' + fi +} diff --git a/net-analyzer/netdata/netdata-1.22.0-r1.ebuild b/net-analyzer/netdata/netdata-1.22.0-r1.ebuild new file mode 100644 index 000000000000..16f4f1078275 --- /dev/null +++ b/net-analyzer/netdata/netdata-1.22.0-r1.ebuild @@ -0,0 +1,141 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +PYTHON_COMPAT=( python{3_6,3_7,3_8} ) + +inherit autotools fcaps linux-info python-single-r1 systemd + +if [[ ${PV} == *9999 ]] ; then + EGIT_REPO_URI="https://github.com/netdata/${PN}.git" + inherit git-r3 +else + SRC_URI="https://github.com/netdata/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" + KEYWORDS="~amd64 ~x86" +fi + +DESCRIPTION="Linux real time system monitoring, done right!" +HOMEPAGE="https://github.com/netdata/netdata https://my-netdata.io/" + +LICENSE="GPL-3+ MIT BSD" +SLOT="0" +IUSE="caps +compression cpu_flags_x86_sse2 cups +dbengine ipmi +jsonc kinesis mongodb mysql nfacct nodejs postgres prometheus +python tor xen" +REQUIRED_USE=" + mysql? ( python ) + python? ( ${PYTHON_REQUIRED_USE} ) + tor? ( python )" + +# most unconditional dependencies are for plugins.d/charts.d.plugin: +RDEPEND=" + acct-group/netdata + acct-user/netdata + app-misc/jq + >=app-shells/bash-4:0 + || ( + net-analyzer/openbsd-netcat + net-analyzer/netcat + ) + net-misc/curl + net-misc/wget + sys-apps/util-linux + virtual/awk + caps? ( sys-libs/libcap ) + cups? ( net-print/cups ) + dbengine? ( + app-arch/lz4 + dev-libs/judy + dev-libs/openssl:= + ) + dev-libs/libuv + compression? ( sys-libs/zlib ) + ipmi? ( sys-libs/freeipmi ) + jsonc? ( dev-libs/json-c ) + kinesis? ( dev-libs/aws-sdk-cpp[kinesis] ) + mongodb? ( dev-libs/mongo-c-driver ) + nfacct? ( + net-firewall/nfacct + net-libs/libmnl + ) + nodejs? ( net-libs/nodejs ) + prometheus? ( + dev-libs/protobuf:= + app-arch/snappy + ) + python? ( + ${PYTHON_DEPS} + $(python_gen_cond_dep 'dev-python/pyyaml[${PYTHON_MULTI_USEDEP}]') + mysql? ( + || ( + $(python_gen_cond_dep 'dev-python/mysqlclient[${PYTHON_MULTI_USEDEP}]') + $(python_gen_cond_dep 'dev-python/mysql-python[${PYTHON_MULTI_USEDEP}]') + ) + ) + postgres? ( $(python_gen_cond_dep 'dev-python/psycopg:2[${PYTHON_MULTI_USEDEP}]') ) + tor? ( $(python_gen_cond_dep 'net-libs/stem[${PYTHON_MULTI_USEDEP}]') ) + ) + xen? ( + app-emulation/xen-tools + dev-libs/yajl + )" +DEPEND="${RDEPEND} + virtual/pkgconfig" + +FILECAPS=( + 'cap_dac_read_search,cap_sys_ptrace+ep' 'usr/libexec/netdata/plugins.d/apps.plugin' +) + +pkg_setup() { + use python && python-single-r1_pkg_setup + linux-info_pkg_setup +} + +src_prepare() { + default + eautoreconf +} + +src_configure() { + # --disable-cloud: https://github.com/netdata/netdata/issues/8961 + econf \ + --localstatedir="${EPREFIX}"/var \ + --with-user=netdata \ + --disable-cloud \ + $(use_enable jsonc) \ + $(use_enable cups plugin-cups) \ + $(use_enable dbengine) \ + $(use_enable nfacct plugin-nfacct) \ + $(use_enable ipmi plugin-freeipmi) \ + $(use_enable kinesis backend-kinesis) \ + $(use_enable mongodb backend-mongodb) \ + $(use_enable prometheus backend-prometheus-remote-write) \ + $(use_enable xen plugin-xenstat) \ + $(use_enable cpu_flags_x86_sse2 x86-sse) \ + $(use_with compression zlib) +} + +src_install() { + default + + rm -rf "${D}/var/cache" || die + + keepdir /var/log/netdata + fowners -Rc netdata:netdata /var/log/netdata + keepdir /var/lib/netdata + keepdir /var/lib/netdata/registry + fowners -Rc netdata:netdata /var/lib/netdata + + fowners -Rc root:netdata /usr/share/${PN} + + newinitd system/netdata-openrc ${PN} + systemd_dounit system/netdata.service + insinto /etc/netdata + doins system/netdata.conf +} + +pkg_postinst() { + fcaps_pkg_postinst + + if use xen ; then + fcaps 'cap_dac_override' 'usr/libexec/netdata/plugins.d/xenstat.plugin' + fi +} diff --git a/net-analyzer/netdata/netdata-1.22.1-r1.ebuild b/net-analyzer/netdata/netdata-1.22.1-r1.ebuild new file mode 100644 index 000000000000..3b6458e2fb4e --- /dev/null +++ b/net-analyzer/netdata/netdata-1.22.1-r1.ebuild @@ -0,0 +1,141 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +PYTHON_COMPAT=( python{3_6,3_7,3_8} ) + +inherit autotools fcaps linux-info python-single-r1 systemd + +if [[ ${PV} == *9999 ]] ; then + EGIT_REPO_URI="https://github.com/netdata/${PN}.git" + inherit git-r3 +else + SRC_URI="https://github.com/netdata/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" + KEYWORDS="~amd64 ~x86" +fi + +DESCRIPTION="Linux real time system monitoring, done right!" +HOMEPAGE="https://github.com/netdata/netdata https://my-netdata.io/" + +LICENSE="GPL-3+ MIT BSD" +SLOT="0" +IUSE="caps +compression cpu_flags_x86_sse2 cups +dbengine ipmi +jsonc kinesis mongodb mysql nfacct nodejs postgres prometheus +python tor xen" +REQUIRED_USE=" + mysql? ( python ) + python? ( ${PYTHON_REQUIRED_USE} ) + tor? ( python )" + +# most unconditional dependencies are for plugins.d/charts.d.plugin: +RDEPEND=" + acct-group/netdata + acct-user/netdata + app-misc/jq + >=app-shells/bash-4:0 + || ( + net-analyzer/openbsd-netcat + net-analyzer/netcat + ) + net-misc/curl + net-misc/wget + sys-apps/util-linux + virtual/awk + caps? ( sys-libs/libcap ) + cups? ( net-print/cups ) + dbengine? ( + app-arch/lz4 + dev-libs/judy + dev-libs/openssl:= + ) + dev-libs/libuv + compression? ( sys-libs/zlib ) + ipmi? ( sys-libs/freeipmi ) + jsonc? ( dev-libs/json-c:= ) + kinesis? ( dev-libs/aws-sdk-cpp[kinesis] ) + mongodb? ( dev-libs/mongo-c-driver ) + nfacct? ( + net-firewall/nfacct + net-libs/libmnl + ) + nodejs? ( net-libs/nodejs ) + prometheus? ( + dev-libs/protobuf:= + app-arch/snappy + ) + python? ( + ${PYTHON_DEPS} + $(python_gen_cond_dep 'dev-python/pyyaml[${PYTHON_MULTI_USEDEP}]') + mysql? ( + || ( + $(python_gen_cond_dep 'dev-python/mysqlclient[${PYTHON_MULTI_USEDEP}]') + $(python_gen_cond_dep 'dev-python/mysql-python[${PYTHON_MULTI_USEDEP}]') + ) + ) + postgres? ( $(python_gen_cond_dep 'dev-python/psycopg:2[${PYTHON_MULTI_USEDEP}]') ) + tor? ( $(python_gen_cond_dep 'net-libs/stem[${PYTHON_MULTI_USEDEP}]') ) + ) + xen? ( + app-emulation/xen-tools + dev-libs/yajl + )" +DEPEND="${RDEPEND} + virtual/pkgconfig" + +FILECAPS=( + 'cap_dac_read_search,cap_sys_ptrace+ep' 'usr/libexec/netdata/plugins.d/apps.plugin' +) + +pkg_setup() { + use python && python-single-r1_pkg_setup + linux-info_pkg_setup +} + +src_prepare() { + default + eautoreconf +} + +src_configure() { + # --disable-cloud: https://github.com/netdata/netdata/issues/8961 + econf \ + --localstatedir="${EPREFIX}"/var \ + --with-user=netdata \ + --disable-cloud \ + $(use_enable jsonc) \ + $(use_enable cups plugin-cups) \ + $(use_enable dbengine) \ + $(use_enable nfacct plugin-nfacct) \ + $(use_enable ipmi plugin-freeipmi) \ + $(use_enable kinesis backend-kinesis) \ + $(use_enable mongodb backend-mongodb) \ + $(use_enable prometheus backend-prometheus-remote-write) \ + $(use_enable xen plugin-xenstat) \ + $(use_enable cpu_flags_x86_sse2 x86-sse) \ + $(use_with compression zlib) +} + +src_install() { + default + + rm -rf "${D}/var/cache" || die + + keepdir /var/log/netdata + fowners -Rc netdata:netdata /var/log/netdata + keepdir /var/lib/netdata + keepdir /var/lib/netdata/registry + fowners -Rc netdata:netdata /var/lib/netdata + + fowners -Rc root:netdata /usr/share/${PN} + + newinitd system/netdata-openrc ${PN} + systemd_dounit system/netdata.service + insinto /etc/netdata + doins system/netdata.conf +} + +pkg_postinst() { + fcaps_pkg_postinst + + if use xen ; then + fcaps 'cap_dac_override' 'usr/libexec/netdata/plugins.d/xenstat.plugin' + fi +} diff --git a/net-analyzer/netdata/netdata-9999.ebuild b/net-analyzer/netdata/netdata-9999.ebuild new file mode 100644 index 000000000000..3b6458e2fb4e --- /dev/null +++ b/net-analyzer/netdata/netdata-9999.ebuild @@ -0,0 +1,141 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +PYTHON_COMPAT=( python{3_6,3_7,3_8} ) + +inherit autotools fcaps linux-info python-single-r1 systemd + +if [[ ${PV} == *9999 ]] ; then + EGIT_REPO_URI="https://github.com/netdata/${PN}.git" + inherit git-r3 +else + SRC_URI="https://github.com/netdata/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" + KEYWORDS="~amd64 ~x86" +fi + +DESCRIPTION="Linux real time system monitoring, done right!" +HOMEPAGE="https://github.com/netdata/netdata https://my-netdata.io/" + +LICENSE="GPL-3+ MIT BSD" +SLOT="0" +IUSE="caps +compression cpu_flags_x86_sse2 cups +dbengine ipmi +jsonc kinesis mongodb mysql nfacct nodejs postgres prometheus +python tor xen" +REQUIRED_USE=" + mysql? ( python ) + python? ( ${PYTHON_REQUIRED_USE} ) + tor? ( python )" + +# most unconditional dependencies are for plugins.d/charts.d.plugin: +RDEPEND=" + acct-group/netdata + acct-user/netdata + app-misc/jq + >=app-shells/bash-4:0 + || ( + net-analyzer/openbsd-netcat + net-analyzer/netcat + ) + net-misc/curl + net-misc/wget + sys-apps/util-linux + virtual/awk + caps? ( sys-libs/libcap ) + cups? ( net-print/cups ) + dbengine? ( + app-arch/lz4 + dev-libs/judy + dev-libs/openssl:= + ) + dev-libs/libuv + compression? ( sys-libs/zlib ) + ipmi? ( sys-libs/freeipmi ) + jsonc? ( dev-libs/json-c:= ) + kinesis? ( dev-libs/aws-sdk-cpp[kinesis] ) + mongodb? ( dev-libs/mongo-c-driver ) + nfacct? ( + net-firewall/nfacct + net-libs/libmnl + ) + nodejs? ( net-libs/nodejs ) + prometheus? ( + dev-libs/protobuf:= + app-arch/snappy + ) + python? ( + ${PYTHON_DEPS} + $(python_gen_cond_dep 'dev-python/pyyaml[${PYTHON_MULTI_USEDEP}]') + mysql? ( + || ( + $(python_gen_cond_dep 'dev-python/mysqlclient[${PYTHON_MULTI_USEDEP}]') + $(python_gen_cond_dep 'dev-python/mysql-python[${PYTHON_MULTI_USEDEP}]') + ) + ) + postgres? ( $(python_gen_cond_dep 'dev-python/psycopg:2[${PYTHON_MULTI_USEDEP}]') ) + tor? ( $(python_gen_cond_dep 'net-libs/stem[${PYTHON_MULTI_USEDEP}]') ) + ) + xen? ( + app-emulation/xen-tools + dev-libs/yajl + )" +DEPEND="${RDEPEND} + virtual/pkgconfig" + +FILECAPS=( + 'cap_dac_read_search,cap_sys_ptrace+ep' 'usr/libexec/netdata/plugins.d/apps.plugin' +) + +pkg_setup() { + use python && python-single-r1_pkg_setup + linux-info_pkg_setup +} + +src_prepare() { + default + eautoreconf +} + +src_configure() { + # --disable-cloud: https://github.com/netdata/netdata/issues/8961 + econf \ + --localstatedir="${EPREFIX}"/var \ + --with-user=netdata \ + --disable-cloud \ + $(use_enable jsonc) \ + $(use_enable cups plugin-cups) \ + $(use_enable dbengine) \ + $(use_enable nfacct plugin-nfacct) \ + $(use_enable ipmi plugin-freeipmi) \ + $(use_enable kinesis backend-kinesis) \ + $(use_enable mongodb backend-mongodb) \ + $(use_enable prometheus backend-prometheus-remote-write) \ + $(use_enable xen plugin-xenstat) \ + $(use_enable cpu_flags_x86_sse2 x86-sse) \ + $(use_with compression zlib) +} + +src_install() { + default + + rm -rf "${D}/var/cache" || die + + keepdir /var/log/netdata + fowners -Rc netdata:netdata /var/log/netdata + keepdir /var/lib/netdata + keepdir /var/lib/netdata/registry + fowners -Rc netdata:netdata /var/lib/netdata + + fowners -Rc root:netdata /usr/share/${PN} + + newinitd system/netdata-openrc ${PN} + systemd_dounit system/netdata.service + insinto /etc/netdata + doins system/netdata.conf +} + +pkg_postinst() { + fcaps_pkg_postinst + + if use xen ; then + fcaps 'cap_dac_override' 'usr/libexec/netdata/plugins.d/xenstat.plugin' + fi +} diff --git a/net-analyzer/netdiscover/Manifest b/net-analyzer/netdiscover/Manifest new file mode 100644 index 000000000000..89f75710adb6 --- /dev/null +++ b/net-analyzer/netdiscover/Manifest @@ -0,0 +1,2 @@ +DIST netdiscover-0.3-beta6-oui-db-update-20091010.patch.bz2 151434 BLAKE2B 14a406b766cc9dd5e3bbf98556077b51c88fe7f4aab46a45291b35a5fa4a38d33d86ee7592c6672d7c3b573893bca285f04ec22cf8735f090d3444e795774838 SHA512 936f030bac30cf54d1b9b6bb23045c2cad201a21529706436ab0732c356dc4ab27e3f2a8472437f9ac76d9b819ebc6d8faa05405be13d3d6beda5e261ebf93da +DIST netdiscover-0.3-beta6.tar.gz 411018 BLAKE2B 319ad0d4589867ded2747794b6c0074a68285b2abdac57a4f569f92e9bf09c71c7e9db64400dcce9aa44804d202d7d2fc2c0d427b92a9f99ff05a632fe5a794c SHA512 b8205322c34684642d52bf58f8fffa12a0dea387da713caf2935ba348c74b2e6cac717bf1626c9de816e45dce7c42b6b9584b5253351040af806f7ba262ce4d2 diff --git a/net-analyzer/netdiscover/files/netdiscover-0.3_beta6-fno-common.patch b/net-analyzer/netdiscover/files/netdiscover-0.3_beta6-fno-common.patch new file mode 100644 index 000000000000..8355321085d1 --- /dev/null +++ b/net-analyzer/netdiscover/files/netdiscover-0.3_beta6-fno-common.patch @@ -0,0 +1,42 @@ +--- ./src/ifaces.c ++++ ./src/ifaces.c +@@ -72,6 +72,7 @@ + unsigned char smac[ETH_ALEN]; + struct p_header *temp_header; + ++char *ourmac, errbuf[PCAP_ERRBUF_SIZE]; + + /* Start Sniffing on given iface */ + void *start_sniffer(void *args) +--- ./src/ifaces.h ++++ ./src/ifaces.h +@@ -46,7 +46,7 @@ + + + // Shitty globals +- char *ourmac, errbuf[PCAP_ERRBUF_SIZE]; ++ extern char *ourmac, errbuf[PCAP_ERRBUF_SIZE]; + + // Sniffer Functions + void *start_sniffer(void *); +--- a/src/screen.c ++++ b/src/screen.c +@@ -48,6 +48,7 @@ + struct arp_rep_c *arprep_count; + struct winsize win_sz; + pthread_mutex_t *listm; ++char *current_network; + + int scroll; + int smode, oldmode; +--- ./src/screen.h ++++ ./src/screen.h +@@ -24,7 +24,7 @@ + + + /* Ohh no, more globals */ +-char *current_network; ++extern char *current_network; + + + /* Structs for counters */ diff --git a/net-analyzer/netdiscover/files/netdiscover-0.3_beta6-gentoo.patch b/net-analyzer/netdiscover/files/netdiscover-0.3_beta6-gentoo.patch new file mode 100644 index 000000000000..d70fc36de5a5 --- /dev/null +++ b/net-analyzer/netdiscover/files/netdiscover-0.3_beta6-gentoo.patch @@ -0,0 +1,41 @@ +--- a/configure.in ++++ b/configure.in +@@ -5,7 +5,7 @@ + + AC_INIT(configure.in) + AM_INIT_AUTOMAKE(netdiscover, 0.3-beta6) +-AM_CONFIG_HEADER(config.h) ++AC_CONFIG_HEADERS(config.h) + AM_MAINTAINER_MODE + + dnl get system information +@@ -35,7 +35,6 @@ + + AC_ISC_POSIX + AC_PROG_CC +-AM_PROG_CC_STDC + AC_HEADER_STDC + + AM_PROG_LIBTOOL +--- a/Makefile.am ++++ b/Makefile.am +@@ -5,8 +5,8 @@ + + SUBDIRS = src doc + +-netdiscoverdocdir = ${prefix}/doc/netdiscover +-netdiscoverdoc_DATA = \ ++noinstdir = ${prefix}/doc/netdiscover ++noinst_DATA = \ + README\ + COPYING\ + AUTHORS\ +@@ -15,7 +15,7 @@ + NEWS\ + TODO + +-EXTRA_DIST = $(netdiscoverdoc_DATA) ++EXTRA_DIST = $(noinst_DATA) + + + diff --git a/net-analyzer/netdiscover/files/netdiscover-0.3_beta6-misc.patch b/net-analyzer/netdiscover/files/netdiscover-0.3_beta6-misc.patch new file mode 100644 index 000000000000..2b92bfde8629 --- /dev/null +++ b/net-analyzer/netdiscover/files/netdiscover-0.3_beta6-misc.patch @@ -0,0 +1,20 @@ +--- a/src/misc.c ++++ b/src/misc.c +@@ -33,7 +33,7 @@ + + char *search_vendor(unsigned char mac[6]) + { +- char tmac[6]; ++ char tmac[7]; + int i = 0; + + sprintf(tmac, "%02x%02x%02x", mac[0], mac[1], mac[2]); +@@ -42,7 +42,7 @@ + for (i=0; i<6; i++) + tmac[i] = toupper(tmac[i]); + +- for (i=0; i<8436; i++) ++ for (i=0; i<NUM_OUI_RECORDS; i++) + { + if (strcmp(oui_table[i].prefix, tmac) == 0) + return oui_table[i].vendor; diff --git a/net-analyzer/netdiscover/metadata.xml b/net-analyzer/netdiscover/metadata.xml new file mode 100644 index 000000000000..bd13a914477c --- /dev/null +++ b/net-analyzer/netdiscover/metadata.xml @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<maintainer type="project"> + <email>netmon@gentoo.org</email> + <name>Gentoo network monitoring and analysis project</name> +</maintainer> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/netdiscover/netdiscover-0.3_beta6-r3.ebuild b/net-analyzer/netdiscover/netdiscover-0.3_beta6-r3.ebuild new file mode 100644 index 000000000000..77fc58fcf331 --- /dev/null +++ b/net-analyzer/netdiscover/netdiscover-0.3_beta6-r3.ebuild @@ -0,0 +1,35 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 +inherit eutils autotools + +DESCRIPTION="An active/passive address reconnaissance tool" +HOMEPAGE="http://nixgeneration.com/~jaime/netdiscover/" +LICENSE="GPL-2" +SRC_URI=" + http://nixgeneration.com/~jaime/${PN}/releases/${P/_/-}.tar.gz + https://dev.gentoo.org/~jer/${P/_/-}-oui-db-update-20091010.patch.bz2 +" + +SLOT="0" +KEYWORDS="~amd64 ~sparc ~x86 ~amd64-linux ~x86-linux ~x86-macos" + +DEPEND=" + net-libs/libnet:1.1 + >=net-libs/libpcap-0.8.3-r1 +" +RDEPEND="${DEPEND}" + +S=${WORKDIR}/${P/_/-} + +DOCS=( AUTHORS ChangeLog README TODO ) + +src_prepare() { + epatch \ + "${WORKDIR}"/${P/_/-}-oui-db-update-20091010.patch \ + "${FILESDIR}"/${P}-gentoo.patch \ + "${FILESDIR}"/${P}-misc.patch + + eautoreconf +} diff --git a/net-analyzer/netdiscover/netdiscover-0.3_beta6-r4.ebuild b/net-analyzer/netdiscover/netdiscover-0.3_beta6-r4.ebuild new file mode 100644 index 000000000000..264eea20d328 --- /dev/null +++ b/net-analyzer/netdiscover/netdiscover-0.3_beta6-r4.ebuild @@ -0,0 +1,36 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +inherit autotools + +DESCRIPTION="An active/passive address reconnaissance tool" +HOMEPAGE="http://nixgeneration.com/~jaime/netdiscover/" +LICENSE="GPL-2" +SRC_URI=" + http://nixgeneration.com/~jaime/${PN}/releases/${P/_/-}.tar.gz + https://dev.gentoo.org/~jer/${P/_/-}-oui-db-update-20091010.patch.bz2 +" + +SLOT="0" +KEYWORDS="~amd64 ~sparc ~x86 ~amd64-linux ~x86-linux ~x86-macos" + +DEPEND=" + net-libs/libnet:1.1 + >=net-libs/libpcap-0.8.3-r1 +" +RDEPEND="${DEPEND}" +S=${WORKDIR}/${P/_/-} +DOCS=( AUTHORS ChangeLog README TODO ) +PATCHES=( + "${WORKDIR}"/${P/_/-}-oui-db-update-20091010.patch + "${FILESDIR}"/${P}-gentoo.patch + "${FILESDIR}"/${P}-misc.patch + "${FILESDIR}"/${P}-fno-common.patch +) + +src_prepare() { + default + + eautoreconf +} diff --git a/net-analyzer/nethogs/Manifest b/net-analyzer/nethogs/Manifest new file mode 100644 index 000000000000..bffab0f80521 --- /dev/null +++ b/net-analyzer/nethogs/Manifest @@ -0,0 +1 @@ +DIST nethogs-0.8.5.tar.gz 112385 BLAKE2B 1d4867447455720a11f3131787b731428550f03d106ad476367ae356954c6c9895d02a8e730488b3deb9638d54bd60765cb63bcf599f4ec73c0bdc8da3d52cae SHA512 a2be81fcebc9925dd8a0fd9f71c6e790206819e0cc5efeeeb0c741baa9fd25ec685a1784b6d331d938cf14381403f9c13d619509d0ffe713ce8786a83a380908 diff --git a/net-analyzer/nethogs/metadata.xml b/net-analyzer/nethogs/metadata.xml new file mode 100644 index 000000000000..e325fc829d70 --- /dev/null +++ b/net-analyzer/nethogs/metadata.xml @@ -0,0 +1,21 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>netmon@gentoo.org</email> + <name>Gentoo network monitoring and analysis project</name> + </maintainer> + <longdescription> + NetHogs is a small 'net top' tool. Instead of breaking the traffic down + per protocol or per subnet, like most tools do, it groups bandwidth by + process. NetHogs does not rely on a special kernel module to be loaded. + If there's suddenly a lot of network traffic, you can fire up NetHogs and + immediately see which PID is causing this. This makes it easy to indentify + programs that have gone wild and are suddenly taking up your bandwidth. + </longdescription> + <upstream> + <remote-id type="sourceforge">nethogs</remote-id> + <remote-id type="github">raboof/nethogs</remote-id> + </upstream> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/nethogs/nethogs-0.8.5-r1.ebuild b/net-analyzer/nethogs/nethogs-0.8.5-r1.ebuild new file mode 100644 index 000000000000..ac684149d33f --- /dev/null +++ b/net-analyzer/nethogs/nethogs-0.8.5-r1.ebuild @@ -0,0 +1,33 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +inherit toolchain-funcs + +DESCRIPTION="A small 'net top' tool, grouping bandwidth by process" +HOMEPAGE="https://github.com/raboof/nethogs" +SRC_URI="https://github.com/raboof/nethogs/archive/v${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="amd64 ~arm ~ia64 x86" + +RDEPEND=" + net-libs/libpcap + sys-libs/ncurses:0= +" +DEPEND=" + ${RDEPEND} + virtual/pkgconfig +" + +src_compile() { + tc-export CC CXX + emake NCURSES_LIBS="$( $(tc-getPKG_CONFIG) --libs ncurses )" ${PN} +} + +src_install() { + emake DESTDIR="${ED}" PREFIX="/usr" install + dodoc Changelog DESIGN README.decpcap.txt README.md +} diff --git a/net-analyzer/neti/Manifest b/net-analyzer/neti/Manifest new file mode 100644 index 000000000000..d29bf75f1503 --- /dev/null +++ b/net-analyzer/neti/Manifest @@ -0,0 +1 @@ +DIST neti-2.0.tar.gz 383442 BLAKE2B a76977f6eb16b729e67cf4c98c2b1497d76572374b825bd7200b9d8f3b24634b3bcdae5e611dc3fa145f1cc4d5130d5e8501b017c529a72212a865c845cd01c6 SHA512 5a1156195106e8dcb738c5d2efdd88b77803fa16145db182f2d782a21316fac18af6812b264ece3bc49a5d6713b2aa86aca13129edd01753bf5cf0dd33b1aeb5 diff --git a/net-analyzer/neti/files/neti-init2 b/net-analyzer/neti/files/neti-init2 new file mode 100644 index 000000000000..556660cae489 --- /dev/null +++ b/net-analyzer/neti/files/neti-init2 @@ -0,0 +1,19 @@ +#!/sbin/openrc-run +# Copyright 1999-2004 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +depend() { + need net +} + +start() { + ebegin "Starting netiathome" + start-stop-daemon --start --quiet --exec /usr/sbin/neti -- -D + eend $? +} + +stop() { + ebegin "Stopping netiathome" + start-stop-daemon --stop --quiet --exec /usr/sbin/neti + eend $? +} diff --git a/net-analyzer/neti/metadata.xml b/net-analyzer/neti/metadata.xml new file mode 100644 index 000000000000..bba419e8d7d0 --- /dev/null +++ b/net-analyzer/neti/metadata.xml @@ -0,0 +1,12 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>netmon@gentoo.org</email> + <name>Gentoo network monitoring and analysis project</name> + </maintainer> + <upstream> + <remote-id type="sourceforge">neti</remote-id> + </upstream> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/neti/neti-2.0-r1.ebuild b/net-analyzer/neti/neti-2.0-r1.ebuild new file mode 100644 index 000000000000..bea83118f9b6 --- /dev/null +++ b/net-analyzer/neti/neti-2.0-r1.ebuild @@ -0,0 +1,54 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +DESCRIPTION="NETI@Home research project from GATech" +HOMEPAGE="http://www.neti.gatech.edu" +SRC_URI="mirror://sourceforge/neti/${P}.tar.gz" + +KEYWORDS="~ppc x86" +LICENSE="GPL-2" +SLOT="0" +IUSE="zlib java" + +DEPEND=" + java? ( || ( >=virtual/jdk-1.2 >=virtual/jre-1.2 ) ) + net-libs/libpcap +" +RDEPEND="${DEPEND}" + +RESTRICT="test" + +src_configure() { + econf $(use_with zlib) +} + +src_compile() { + emake NETILogParse neti + + use java && emake javadir=/usr/share/${PN} classjava.stamp +} + +src_install() { + emake \ + DESTDIR="${D}" \ + install-sbinPROGRAMS \ + install-sysconfDATA \ + install-man \ + install-info + + if use java; then + emake \ + DESTDIR="${D}" \ + javadir=/usr/share/${PN} \ + install-javaJAVA \ + install-javaDATA + + echo cd /usr/share/${PN}\;java -cp /usr/share/${PN} NETIMap > "${WORKDIR}"/NETIMap + dobin "${WORKDIR}"/NETIMap + fi + + dodoc README AUTHORS + newinitd "${FILESDIR}"/neti-init2 neti +} diff --git a/net-analyzer/netio/Manifest b/net-analyzer/netio/Manifest new file mode 100644 index 000000000000..cd3890f6d5e0 --- /dev/null +++ b/net-analyzer/netio/Manifest @@ -0,0 +1 @@ +DIST netio132.zip 162484 BLAKE2B 921b28d25a8042b5567393b088fbede3f8bff2d4bf6c8afcaab03a76487ddc48e6cd640b2cbe7114b022cacef9fcf5ccc3deaa9eed2b648898d7f2dfb40e133c SHA512 3473b6b41c4a1e054fa0eb3316bc16e799034b4b9402c7751f29724d8ec70c674d3de59140fdbdc301c53f2a24b44d58e8cd50a68f107bd892b1d17b6e695232 diff --git a/net-analyzer/netio/files/netio-1.26-linux-include.patch b/net-analyzer/netio/files/netio-1.26-linux-include.patch new file mode 100644 index 000000000000..e006c82d71aa --- /dev/null +++ b/net-analyzer/netio/files/netio-1.26-linux-include.patch @@ -0,0 +1,13 @@ +Add missing include (see inet(3)) - JeR + + +--- a/netio.c ++++ b/netio.c +@@ -199,6 +199,7 @@ + #include <sys/time.h> + #include <time.h> + #include <netinet/in.h> ++#include <arpa/inet.h> + #include <netdb.h> + + #define psock_errno(x) perror(x) diff --git a/net-analyzer/netio/metadata.xml b/net-analyzer/netio/metadata.xml new file mode 100644 index 000000000000..bd13a914477c --- /dev/null +++ b/net-analyzer/netio/metadata.xml @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<maintainer type="project"> + <email>netmon@gentoo.org</email> + <name>Gentoo network monitoring and analysis project</name> +</maintainer> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/netio/netio-1.32-r1.ebuild b/net-analyzer/netio/netio-1.32-r1.ebuild new file mode 100644 index 000000000000..afba5e9baeba --- /dev/null +++ b/net-analyzer/netio/netio-1.32-r1.ebuild @@ -0,0 +1,48 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 +inherit eutils toolchain-funcs + +DESCRIPTION="measures net throughput with NetBIOS and TCP/IP protocols" +HOMEPAGE="https://web.ars.de/netio/" +SRC_URI="http://web.ars.de/wp-content/uploads/2017/04/${PN}${PV/./}.zip" + +LICENSE="free-noncomm" +SLOT="0" +KEYWORDS="~amd64 ~ppc ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos" +RESTRICT="mirror" # bug #391789 comment #1 + +DEPEND=" + app-arch/unzip + >=sys-apps/sed-4 +" + +S="${WORKDIR}" +PATCHES=( + "${FILESDIR}"/${PN}-1.26-linux-include.patch +) + +src_prepare() { + edos2unix *.c *.h *.doc + + default + + sed -i \ + -e "s|LFLAGS=\"\"|LFLAGS?=\"${LDFLAGS}\"|g" \ + -e 's|\(CC\)=|\1?=|g' \ + -e 's|\(CFLAGS\)=|\1+=|g' \ + Makefile || die +} + +src_compile() { + emake \ + CC="$(tc-getCC)" \ + CFLAGS="${CFLAGS}" \ + linux +} + +src_install() { + dobin netio + dodoc netio.doc +} diff --git a/net-analyzer/netperf/Manifest b/net-analyzer/netperf/Manifest new file mode 100644 index 000000000000..f378f80376d4 --- /dev/null +++ b/net-analyzer/netperf/Manifest @@ -0,0 +1 @@ +DIST netperf-2.7.0.tar.bz2 1024430 BLAKE2B 1263a2b3cee0790e4526245e522d29f8692a5a3e9d3b41468d1010bbee4d606a06904d9e0c4ac0af457bde562a476434be4c62a41e3c0dbf0e5c3aeb2ae5652a SHA512 5fb37945bead831247de9c8ba86b33f134ba39e753b483df72de97f536d0846538dadf61acc2dee57f04ab5d16a92afab4890e79a5d7ffa863afd526267fffad diff --git a/net-analyzer/netperf/files/netperf-2.2-conf b/net-analyzer/netperf/files/netperf-2.2-conf new file mode 100644 index 000000000000..f61f483a83ea --- /dev/null +++ b/net-analyzer/netperf/files/netperf-2.2-conf @@ -0,0 +1,4 @@ +# Config file for /etc/init.d/netperf + +# Add your preferred netserver args here +#NETSERVER_ARGS="-n 4" diff --git a/net-analyzer/netperf/files/netperf-2.6.0-log-dir.patch b/net-analyzer/netperf/files/netperf-2.6.0-log-dir.patch new file mode 100644 index 000000000000..00554cc0b5c2 --- /dev/null +++ b/net-analyzer/netperf/files/netperf-2.6.0-log-dir.patch @@ -0,0 +1,11 @@ +--- a/src/netserver.c ++++ b/src/netserver.c +@@ -165,7 +165,7 @@ + #elif defined(ANDROID) + #define DEBUG_LOG_FILE_DIR "/data/local/tmp/" + #else +-#define DEBUG_LOG_FILE_DIR "/tmp/" ++#define DEBUG_LOG_FILE_DIR "/var/log/" + #endif + #endif /* DEBUG_LOG_FILE_DIR */ + diff --git a/net-analyzer/netperf/files/netperf-2.7.0-includes.patch b/net-analyzer/netperf/files/netperf-2.7.0-includes.patch new file mode 100644 index 000000000000..63c3cea40f4e --- /dev/null +++ b/net-analyzer/netperf/files/netperf-2.7.0-includes.patch @@ -0,0 +1,22 @@ +--- a/src/net_uuid.c ++++ b/src/net_uuid.c +@@ -28,6 +28,7 @@ + #include <stdlib.h> + #include <string.h> + #include <fcntl.h> ++#include <unistd.h> /* read(), close() */ + + #if defined(HAVE_INTTYPES_H) + #include <inttypes.h> +--- a/src/netlib.c ++++ b/src/netlib.c +@@ -81,6 +81,9 @@ + #include <endian.h> + #endif + ++#if defined(HAVE_SENDFILE) ++#include <sys/sendfile.h> /* sendfile() */ ++#endif + + #ifndef WIN32 + /* at some point, I would like to get rid of all these "sys/" diff --git a/net-analyzer/netperf/files/netperf-2.7.0-init b/net-analyzer/netperf/files/netperf-2.7.0-init new file mode 100644 index 000000000000..3d1bb0c15973 --- /dev/null +++ b/net-analyzer/netperf/files/netperf-2.7.0-init @@ -0,0 +1,23 @@ +#!/sbin/openrc-run +# +# init.d script for net-analyzer/netperf's netserver +# + +depend() { + use net +} + +start() { + checkpath -o netperf:netperf -d /var/log/netperf + + ebegin 'Starting netperf server (netserver)' + start-stop-daemon --start --user netperf \ + --exec /usr/sbin/netserver -- ${NETSERVER_ARGS} + eend $? +} + +stop() { + ebegin 'Stopping netperf server (netserver)' + start-stop-daemon --stop --quiet --exec /usr/sbin/netserver + eend $? +} diff --git a/net-analyzer/netperf/files/netperf-2.7.0-inline.patch b/net-analyzer/netperf/files/netperf-2.7.0-inline.patch new file mode 100644 index 000000000000..eb8c09b84695 --- /dev/null +++ b/net-analyzer/netperf/files/netperf-2.7.0-inline.patch @@ -0,0 +1,32 @@ +# Copyright Seblu 2015 +--- a/src/netlib.c 2015-08-04 20:30:43.449468815 +0200 ++++ b/src/netlib.c 2015-08-04 20:31:40.317792002 +0200 +@@ -3997,11 +3997,7 @@ + } + } + +-#ifdef WIN32 +-__forceinline void demo_interval_display(double actual_interval) +-#else +- inline void demo_interval_display(double actual_interval) +-#endif ++void demo_interval_display(double actual_interval) + { + static int count = 0; + struct timeval now; +@@ -4060,15 +4056,7 @@ + important compilers have supported such a construct so it should + not be a big deal. raj 2012-01-23 */ + +-#ifdef WIN32 +-/* It would seem that the Microsoft compiler will not inline across +- source files. So there is little point in having an inline +- directive in that situation. Of course that makes me wonder if an +- inline directive has to appear in netlib.h... */ + void demo_interval_tick(uint32_t units) +-#else +- inline void demo_interval_tick(uint32_t units) +-#endif + { + double actual_interval = 0.0; + diff --git a/net-analyzer/netperf/files/netperf-2.7.0-space.patch b/net-analyzer/netperf/files/netperf-2.7.0-space.patch new file mode 100644 index 000000000000..9ad43270b166 --- /dev/null +++ b/net-analyzer/netperf/files/netperf-2.7.0-space.patch @@ -0,0 +1,17 @@ +--- a/src/netserver.c ++++ b/src/netserver.c +@@ -165,12 +165,12 @@ + #elif defined(ANDROID) + #define DEBUG_LOG_FILE_DIR "/data/local/tmp/" + #else +-#define DEBUG_LOG_FILE_DIR "/var/log/" ++#define DEBUG_LOG_FILE_DIR "/var/log/netperf/" + #endif + #endif /* DEBUG_LOG_FILE_DIR */ + + #ifndef DEBUG_LOG_FILE +-#define DEBUG_LOG_FILE DEBUG_LOG_FILE_DIR"netserver.debug" ++#define DEBUG_LOG_FILE DEBUG_LOG_FILE_DIR "/netserver.debug" + #endif + + #if !defined(PATH_MAX) diff --git a/net-analyzer/netperf/files/netperf-fix-scripts.patch b/net-analyzer/netperf/files/netperf-fix-scripts.patch new file mode 100644 index 000000000000..27e041fd7a32 --- /dev/null +++ b/net-analyzer/netperf/files/netperf-fix-scripts.patch @@ -0,0 +1,34 @@ +--- a/doc/examples/arr_script ++++ b/doc/examples/arr_script +@@ -12,8 +12,7 @@ + TOLERANCE=15 + MAX_RETRIES=3 + +- NETPERF="/usr/local/netperf/netperf" +- NETPERF="./netperf" ++ NETPERF="/usr/bin/netperf" + + NPROC_LIST="" + RR_SIZES="" +--- a/doc/examples/packet_byte_script ++++ b/doc/examples/packet_byte_script +@@ -25,7 +25,7 @@ + fi + + # where is netperf +-NETPERF_DIR=${NETPERF_DIR:=/opt/netperf2/bin} ++NETPERF_DIR=${NETPERF_DIR:=/usr/bin} + + + # at what port will netserver be waiting? If you decide to run +--- a/doc/examples/snapshot_script ++++ b/doc/examples/snapshot_script +@@ -37,7 +37,7 @@ + # + # where is netperf installed, there are a few possible places: + +-NETPERF_CMD=${NETPERF_CMD:=/opt/netperf/netperf} ++NETPERF_CMD=${NETPERF_CMD:=/usr/bin/netperf} + + + # there should be no more than two parms passed diff --git a/net-analyzer/netperf/metadata.xml b/net-analyzer/netperf/metadata.xml new file mode 100644 index 000000000000..e837489f8a2f --- /dev/null +++ b/net-analyzer/netperf/metadata.xml @@ -0,0 +1,26 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<maintainer type="project"> +<email>netmon@gentoo.org</email> +<name>Gentoo network monitoring and analysis project</name> +</maintainer> +<longdescription lang="en"> +Netperf is a benchmark that can be used to measure the performance of many +different types of networking. It provides tests for both unidirectional +throughput, and end-to-end latency. The environments currently measureable by +netperf include: + + - TCP and UDP via BSD Sockets for both IPv4 and IPv6 + - DLPI + - Unix Domain Sockets + - SCTP for both IPv4 and IPv6 +</longdescription> +<use> +<flag name="demo">Emit interim results during the run. May affect results</flag> +</use> +<upstream> +<remote-id type="cpe">cpe:/a:netperf:netperf</remote-id> +</upstream> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/netperf/netperf-2.7.0-r2.ebuild b/net-analyzer/netperf/netperf-2.7.0-r2.ebuild new file mode 100644 index 000000000000..e82ad712e781 --- /dev/null +++ b/net-analyzer/netperf/netperf-2.7.0-r2.ebuild @@ -0,0 +1,78 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 +inherit eutils flag-o-matic user + +DESCRIPTION="Network performance benchmark" +SRC_URI="ftp://ftp.netperf.org/${PN}/${P}.tar.bz2" +KEYWORDS="~alpha amd64 arm64 hppa ~ia64 ppc ppc64 sparc x86" + +HOMEPAGE="http://www.netperf.org/" +LICENSE="netperf" +SLOT="0" +IUSE="demo sctp" + +DEPEND=">=sys-apps/sed-4" + +pkg_setup() { + enewuser netperf + enewgroup netperf +} + +src_prepare() { + eapply \ + "${FILESDIR}"/${PN}-fix-scripts.patch \ + "${FILESDIR}"/${PN}-2.6.0-log-dir.patch \ + "${FILESDIR}"/${PN}-2.7.0-includes.patch \ + "${FILESDIR}"/${PN}-2.7.0-space.patch \ + "${FILESDIR}"/${PN}-2.7.0-inline.patch + + # Fixing paths in scripts + sed -i \ + -e 's:^\(NETHOME=\).*:\1"/usr/bin":' \ + doc/examples/sctp_stream_script \ + doc/examples/tcp_range_script \ + doc/examples/tcp_rr_script \ + doc/examples/tcp_stream_script \ + doc/examples/udp_rr_script \ + doc/examples/udp_stream_script \ + || die + + eapply_user +} + +src_configure() { + append-cflags -fcommon + + # netlib.c:2292:5: warning: implicit declaration of function ‘sched_setaffinity’ + # nettest_omni.c:2943:5: warning: implicit declaration of function ‘splice’ + append-cppflags -D_GNU_SOURCE + + econf \ + $(use_enable demo) \ + $(use_enable sctp) +} + +src_install() { + default + + # move netserver into sbin as we had it before 2.4 was released with its + # autoconf goodness + dodir /usr/sbin + mv "${D}"/usr/{bin,sbin}/netserver || die + + # init.d / conf.d + newinitd "${FILESDIR}"/${PN}-2.7.0-init netperf + newconfd "${FILESDIR}"/${PN}-2.2-conf netperf + + keepdir /var/log/${PN} + fowners netperf:netperf /var/log/${PN} + fperms 0755 /var/log/${PN} + + # documentation and example scripts + dodoc AUTHORS ChangeLog NEWS README Release_Notes + dodir /usr/share/doc/${PF}/examples + #Scripts no longer get installed by einstall + cp doc/examples/*_script "${D}"/usr/share/doc/${PF}/examples || die +} diff --git a/net-analyzer/netpipe/Manifest b/net-analyzer/netpipe/Manifest new file mode 100644 index 000000000000..fbfaddbfb4c7 --- /dev/null +++ b/net-analyzer/netpipe/Manifest @@ -0,0 +1 @@ +DIST NetPIPE-3.7.2.tar.gz 400248 BLAKE2B 151bf98e67b9dbd9724c51a247ba9ffdb13d622f6c4959e05e3acf0072b895ada385f4cb12c6ebddaf9bdc96666471a75d574c1aa5b0e817cf306239d0cac714 SHA512 158c24665bcc55144452c2aeff067e0d853ffca1ecd130d52c3ea7d4068c53e81f9a1133d0cca847d28f597f68b20f01e79811f81ab1396dd18ba2eaaf691430 diff --git a/net-analyzer/netpipe/files/netpipe-3.7.2-fix-makefile.patch b/net-analyzer/netpipe/files/netpipe-3.7.2-fix-makefile.patch new file mode 100644 index 000000000000..f5c61737f7ae --- /dev/null +++ b/net-analyzer/netpipe/files/netpipe-3.7.2-fix-makefile.patch @@ -0,0 +1,13 @@ +diff --git a/makefile b/makefile +index 16f9052..3ada81f 100644 +--- a/makefile ++++ b/makefile +@@ -21,8 +21,6 @@ + # + ######################################################################## + +-CC = cc +-CFLAGS = -O -g + SRC = ./src + + # For MPI, mpicc will set up the proper include and library paths diff --git a/net-analyzer/netpipe/metadata.xml b/net-analyzer/netpipe/metadata.xml new file mode 100644 index 000000000000..d5a9539bfc12 --- /dev/null +++ b/net-analyzer/netpipe/metadata.xml @@ -0,0 +1,20 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>williamh@gentoo.org</email> + <name>William Hubbs</name> + </maintainer> + <longdescription lang="en"> + NetPIPE is a protocol independent performance tool that visually + represents the network performance under a variety of conditions. + It performs simple ping-pong tests, bouncing messages of increasing + size between two processes, whether across a network or within an + SMP system. Message sizes are chosen at regular intervals, and with + slight perturbations, to provide a complete test of the communication + system. Each data point involves many ping-pong tests to provide an + accurate timing. Latencies are calculated by dividing the round + trip time in half for small messages ( less 64 Bytes ). + </longdescription> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/netpipe/netpipe-3.7.2.ebuild b/net-analyzer/netpipe/netpipe-3.7.2.ebuild new file mode 100644 index 000000000000..894cf55c72a7 --- /dev/null +++ b/net-analyzer/netpipe/netpipe-3.7.2.ebuild @@ -0,0 +1,44 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +inherit toolchain-funcs + +MY_PN=NetPIPE +MY_P=${MY_PN}-${PV} + +DESCRIPTION="network protocol independent performance evaluator" +HOMEPAGE="http://bitspjoule.org/netpipe/" +SRC_URI="http://bitspjoule.org/netpipe/code/${MY_P}.tar.gz" +LICENSE="GPL-1+" +SLOT="0" +KEYWORDS="~amd64" +IUSE="ipv6" + +DOCS=( + bin/feplot + bin/geplot + bin/nplaunch + dox/README + dox/netpipe_paper.ps + dox/np_cluster2002.pdf + dox/np_euro.pdf + ) + +PATCHES=( + "${FILESDIR}"/${P}-fix-makefile.patch + ) + +S="${WORKDIR}"/${MY_P} + +src_compile() { + emake CC="$(tc-getCC)" LD="$(tc-getLD)" memcpy tcp $(usex ipv6 tcp6 '') +} + +src_install() { + dobin NPmemcpy NPtcp + use ipv6 && dobin NPtcp6 + doman dox/netpipe.1 + einstalldocs +} diff --git a/net-analyzer/netselect/Manifest b/net-analyzer/netselect/Manifest new file mode 100644 index 000000000000..b0a81164dab1 --- /dev/null +++ b/net-analyzer/netselect/Manifest @@ -0,0 +1,2 @@ +DIST netselect-0.4-ipv6.patch.xz 18272 BLAKE2B 6197057085e892c156a9fb3a82ac0030a2ff1b4276dde48405de2d2bcfdcef066c4f3eeff174f766af23d2807085f97e459dbffc87b2a2950a472e7964f2e3fc SHA512 422b54df5be45379fe7d6776b6e653a8e49df6fb77421527f2eb6c687597f36cccc7ab5cc5206e9823c318f6facd84fb4e8c0dbffbf9641cee593401cb73abea +DIST netselect-0.4.tar.gz 22095 BLAKE2B 1dd83c4dcd38ab7b987ead76f4e7e727980bbad91b59c56948e13540307e685984cc11ea94292d38959c8253f1f6ec2e6e6e044302f26b09153717d6e29e96be SHA512 eee9639122b7cc89218c610794d090582aecb3df138bcef41472c8d40c0f7e998b2c4b04aace13795fda5c710ee28cc2c0784a680ad6d1aa6a14eb441a408bfa diff --git a/net-analyzer/netselect/files/netselect-0.4-bsd.patch b/net-analyzer/netselect/files/netselect-0.4-bsd.patch new file mode 100644 index 000000000000..fd49a17682db --- /dev/null +++ b/net-analyzer/netselect/files/netselect-0.4-bsd.patch @@ -0,0 +1,56 @@ +--- a/netselect.c ++++ b/netselect.c +@@ -39,14 +39,14 @@ + * hey, great! Let me know. -- apenwarr + */ + +-#ifdef __EMX__ +-# include <io.h> +-# include <fcntl.h> +-# include <sys/types.h> +-# include <sys/select.h> +-# include <machine/endian.h> +-#else +-# include <endian.h> ++#ifdef __linux__ ++#include <endian.h> ++#include <sys/types.h> ++#elif defined(__OpenBSD__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__APPLE__) ++#if defined(__OpenBSD__) ++#include <machine/types.h> ++#endif ++#include <machine/endian.h> + #endif + + #include <sys/param.h> +@@ -167,6 +167,7 @@ + extern int optind; + int hostcount, startcount, endcount = 0, sent_one, lag, min_lag = 100; + int ch, seq, ttl, max_ttl = 30, num_score = 1; ++ int on = 1; + int use_icmp = 0; + unsigned int min_tries = 10; + struct timeval now; +@@ -234,7 +235,12 @@ + if (verbose >= 1) + fprintf(stderr, "Running netselect to choose %d out of %d address%s.\n", + num_score, numhosts, numhosts==1 ? "" : "es"); +- ++ ++ if (setsockopt(sndsock, IPPROTO_IP, IP_HDRINCL, &on, sizeof(on)) < 0) { ++ perror("IP_HDRINCL"); ++ _exit(EXIT_FAILURE); ++ } ++ + /* keep going until most of the hosts have been finished */ + must_continue = numhosts; + while (must_continue && must_continue >= numhosts/2) +@@ -712,7 +718,7 @@ + ip->ip_off = 0; + ip->ip_hl = sizeof(*ip) >> 2; + ip->ip_p = IPPROTO_UDP; +- ip->ip_len = 0; /* kernel fills this in */ ++ ip->ip_len = sizeof(OPacket); + ip->ip_ttl = ttl; + ip->ip_v = IPVERSION; + ip->ip_id = htons(ident + seq); diff --git a/net-analyzer/netselect/files/netselect-0.4-flags.patch b/net-analyzer/netselect/files/netselect-0.4-flags.patch new file mode 100644 index 000000000000..ffcfead8eb3a --- /dev/null +++ b/net-analyzer/netselect/files/netselect-0.4-flags.patch @@ -0,0 +1,12 @@ +--- a/Makefile ++++ b/Makefile +@@ -3,8 +3,7 @@ + MANDEST = ${PREFIX}/man/man1 + + CC = gcc +-CFLAGS = -O2 -Wall -I. -g +-LDFLAGS = -g ++CFLAGS += -Wall -I. + LIBS = + + ifdef OS2 diff --git a/net-analyzer/netselect/metadata.xml b/net-analyzer/netselect/metadata.xml new file mode 100644 index 000000000000..bd13a914477c --- /dev/null +++ b/net-analyzer/netselect/metadata.xml @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<maintainer type="project"> + <email>netmon@gentoo.org</email> + <name>Gentoo network monitoring and analysis project</name> +</maintainer> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/netselect/netselect-0.4-r1.ebuild b/net-analyzer/netselect/netselect-0.4-r1.ebuild new file mode 100644 index 000000000000..7ad668d54316 --- /dev/null +++ b/net-analyzer/netselect/netselect-0.4-r1.ebuild @@ -0,0 +1,46 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 +inherit eutils toolchain-funcs + +DESCRIPTION="Ultrafast implementation of ping" +HOMEPAGE="http://apenwarr.ca/netselect/" +SRC_URI=" + https://github.com/apenwarr/${PN}/archive/${P}.tar.gz + ipv6? ( https://dev.gentoo.org/~jer/${P}-ipv6.patch.xz ) +" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~alpha amd64 arm ~arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos" +IUSE="ipv6" + +PATCHES=( + "${FILESDIR}"/${PN}-0.4-bsd.patch + "${FILESDIR}"/${PN}-0.4-flags.patch +) +S=${WORKDIR}/${PN}-${P} + +src_prepare() { + use ipv6 && eapply "${WORKDIR}"/${PN}-0.4-ipv6.patch + + default +} + +src_compile() { + emake CC="$(tc-getCC)" LDFLAGS="${CFLAGS} ${LDFLAGS}" +} + +src_install() { + dobin netselect + + if ! use prefix ; then + fowners root:wheel /usr/bin/netselect + fperms 4711 /usr/bin/netselect + fi + + dodoc HISTORY README + + doman netselect.1 +} diff --git a/net-analyzer/netselect/netselect-9999.ebuild b/net-analyzer/netselect/netselect-9999.ebuild new file mode 100644 index 000000000000..c41a3b0d656e --- /dev/null +++ b/net-analyzer/netselect/netselect-9999.ebuild @@ -0,0 +1,52 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +inherit git-r3 toolchain-funcs + +DESCRIPTION="Ultrafast implementation of ping" +HOMEPAGE="http://apenwarr.ca/netselect/" +EGIT_REPO_URI=" + https://github.com/apenwarr/${PN} +" +SRC_URI=" + ipv6? ( https://dev.gentoo.org/~jer/${PN}-0.4-ipv6.patch.xz ) +" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="" +IUSE="ipv6" + +PATCHES=( + "${FILESDIR}"/${PN}-0.4-bsd.patch + "${FILESDIR}"/${PN}-0.4-flags.patch +) + +src_unpack() { + use ipv6 && unpack ${A} + git-r3_src_unpack +} + +src_prepare() { + use ipv6 && PATCHES+=( "${WORKDIR}"/${PN}-0.4-ipv6.patch ) + + default +} + +src_compile() { + emake CC="$(tc-getCC)" LDFLAGS="${CFLAGS} ${LDFLAGS}" +} + +src_install() { + dobin netselect + + if ! use prefix ; then + fowners root:wheel /usr/bin/netselect + fperms 4711 /usr/bin/netselect + fi + + dodoc HISTORY README + + doman netselect.1 +} diff --git a/net-analyzer/nettop/Manifest b/net-analyzer/nettop/Manifest new file mode 100644 index 000000000000..a178ff0c5acb --- /dev/null +++ b/net-analyzer/nettop/Manifest @@ -0,0 +1 @@ +DIST nettop-0.2.3.tar.gz 22797 BLAKE2B fd8753dac6d4c3c43d3af7d01f85336db97af35e9f63a39c03defb20266a4782ed3169b0545ae09f02c077b193c565d3f78299a93afc0854163a4ae79af4461c SHA512 96e0bff2b0c317636a303c5eb1e27b5ee862e94dad507ce756ef24e2cad7bbe2ebb5fcb46294b790c32b5fd6189381d1c1d0835a522a06b02522d093c15c6ece diff --git a/net-analyzer/nettop/files/nettop-0.2.3-gcc411.patch b/net-analyzer/nettop/files/nettop-0.2.3-gcc411.patch new file mode 100644 index 000000000000..5e516eab0907 --- /dev/null +++ b/net-analyzer/nettop/files/nettop-0.2.3-gcc411.patch @@ -0,0 +1,49 @@ +--- a/nettop.c ++++ b/nettop.c +@@ -70,6 +70,7 @@ + #include <time.h> + #include <stdlib.h> + #include <netdb.h> ++#include <string.h> + + #include "node.h" + #include "ent.h" +@@ -216,22 +217,26 @@ + } + } + +- ether.count = ether.size = (int) ether.l = (int) ether.r = 0; ++ ether.count = ether.size = 0; ++ ether.l = ether.r = 0; + ether.type = -1; + for (i = 0; i < HISTORY_SIZE; i++) + ether.size_h[i] = 0; + +- ip.count = ip.size = (int) ip.l = (int) ip.r = 0; ++ ip.count = ip.size = 0; ++ ip.l = ip.r = 0; + ip.type = -1; + for (i = 0; i < HISTORY_SIZE; i++) + ip.size_h[i] = 0; + +- tcp.count = tcp.size = (int) tcp.l = (int) tcp.r = 0; ++ tcp.count = tcp.size = 0; ++ tcp.l = tcp.r = 0; + tcp.type = -1; + for (i = 0; i < HISTORY_SIZE; i++) + tcp.size_h[i] = 0; + +- udp.count = udp.size = (int) udp.l = (int) udp.r = 0; ++ udp.count = udp.size = 0; ++ udp.l = udp.r = 0; + udp.type = -1; + for (i = 0; i < HISTORY_SIZE; i++) + udp.size_h[i] = 0; +@@ -361,6 +366,7 @@ + } + break; + default: ++ break; + } + } + } diff --git a/net-analyzer/nettop/files/nettop-0.2.3-offbyone.patch b/net-analyzer/nettop/files/nettop-0.2.3-offbyone.patch new file mode 100644 index 000000000000..32ab3d64ad4c --- /dev/null +++ b/net-analyzer/nettop/files/nettop-0.2.3-offbyone.patch @@ -0,0 +1,29 @@ +--- a/nettop.c ++++ b/nettop.c +@@ -384,7 +385,7 @@ + void + screen_update() + { +- struct node *sorted[24] = {0}; ++ struct node *sorted[25] = {0}; + unsigned long long sump, sums, valp, vals; + unsigned long long xfrrate = 0; + int i, do_ipprint, last[3] = {0}; +@@ -512,7 +513,7 @@ + void + ipprint(int last[]) + { +- struct node *sorted[24] = {0}; ++ struct node *sorted[25] = {0}; + struct ent *proto; + unsigned long long valp, vals, sump, sums; + unsigned long long xfrrate = 0; +@@ -575,7 +576,7 @@ + void + servprint(int last[], struct node *tree, int type) + { +- struct node *sorted[24] = {0}; ++ struct node *sorted[25] = {0}; + struct ent *e; + struct ent *service; + unsigned long long vals, valp, sums, sump; diff --git a/net-analyzer/nettop/metadata.xml b/net-analyzer/nettop/metadata.xml new file mode 100644 index 000000000000..bd13a914477c --- /dev/null +++ b/net-analyzer/nettop/metadata.xml @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<maintainer type="project"> + <email>netmon@gentoo.org</email> + <name>Gentoo network monitoring and analysis project</name> +</maintainer> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/nettop/nettop-0.2.3-r2.ebuild b/net-analyzer/nettop/nettop-0.2.3-r2.ebuild new file mode 100644 index 000000000000..9f5605fa16a6 --- /dev/null +++ b/net-analyzer/nettop/nettop-0.2.3-r2.ebuild @@ -0,0 +1,32 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +inherit eutils toolchain-funcs + +DESCRIPTION="top like program for network activity" +SRC_URI="mirror://gentoo/${P}.tar.gz" +HOMEPAGE="https://wiki.gentoo.org/wiki/No_homepage" + +SLOT="0" +LICENSE="BSD" +KEYWORDS="amd64 ~arm ppc x86" + +DEPEND=" + sys-libs/slang + net-libs/libpcap +" +RDEPEND="${DEPEND}" + +src_prepare() { + epatch \ + "${FILESDIR}"/${P}-gcc411.patch \ + "${FILESDIR}"/${P}-offbyone.patch + tc-export CC +} + +src_install() { + dosbin nettop + dodoc ChangeLog README THANKS +} diff --git a/net-analyzer/netwag/Manifest b/net-analyzer/netwag/Manifest new file mode 100644 index 000000000000..161554360924 --- /dev/null +++ b/net-analyzer/netwag/Manifest @@ -0,0 +1,2 @@ +DIST netwag-5.39.0-doc_html.tgz 46461 BLAKE2B 13d290f828043018cae6b801eed5853fb6b01b8a5b6a2fac5a132b9fe1475db180e90814c1351a8e248627320305298aba63cfd4414472b752c21529a6dbdec4 SHA512 499d201b510c5175b09c7dbcc8b9bec1d9aa2fbf90613a937f88be5835dd67acfe28e78483ce2124c4fa3b43ea8f409ce6115e48f12ae0ffc4ad684354488030 +DIST netwag-5.39.0-src.tgz 164731 BLAKE2B 861217f023bc35e996f5433657e057ca799859d1453812793941a5dcf1827ddaa827f3ae8b5f2550c85932dea3dbc0cb9b3a6687f6986c6cab09b94fab01813c SHA512 a9f0279d42666eff636bb66258a17a4e10528b7329dfe5e5d8c0ddce15048d847a2a8e892ba82a606b37ceb328b8b31be52d7e8ee7aeb6feb1f3d254aa3a2401 diff --git a/net-analyzer/netwag/metadata.xml b/net-analyzer/netwag/metadata.xml new file mode 100644 index 000000000000..9280dc981ccc --- /dev/null +++ b/net-analyzer/netwag/metadata.xml @@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>netmon@gentoo.org</email> + <name>Gentoo network monitoring and analysis project</name> + </maintainer> + <longdescription>Toolbox of 222 utilities for testing Ethernet/IP networks</longdescription> + <upstream> + <remote-id type="sourceforge">ntwag</remote-id> + </upstream> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/netwag/netwag-5.39.0.ebuild b/net-analyzer/netwag/netwag-5.39.0.ebuild new file mode 100644 index 000000000000..620bc9ee48ba --- /dev/null +++ b/net-analyzer/netwag/netwag-5.39.0.ebuild @@ -0,0 +1,59 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +# NOTE: netwib, netwox and netwag go together, bump all or bump none + +EAPI=5 + +DESCRIPTION="Tcl/tk interface to netwox (Toolbox of 222 utilities for testing Ethernet/IP networks)" +HOMEPAGE=" + http://ntwag.sourceforge.net/ + http://www.laurentconstantin.com/en/netw/netwag/ +" +SRC_URI="mirror://sourceforge/ntwag/${P}-src.tgz + doc? ( mirror://sourceforge/ntwag/${P}-doc_html.tgz )" + +LICENSE="GPL-3" +SLOT="0" +KEYWORDS="~amd64 ~hppa ~ppc x86" +IUSE="doc" + +DEPEND=" + ~net-analyzer/netwox-${PV} + >=dev-lang/tk-8 + || ( + x11-terms/xterm + kde-apps/konsole + x11-terms/eterm + x11-terms/gnome-terminal + ) +" +RDEPEND="${DEPEND}" + +S="${WORKDIR}/${P}-src/src" + +src_prepare() { + sed -i \ + -e 's:/man$:/share/man:g' \ + -e "s:/usr/local:/usr:" \ + config.dat || die + sed -i \ + -e 's|eterm|Eterm|g' \ + genemake || die +} + +src_configure() { + sh genemake || die "problem creating Makefile" +} + +DOCS=( + "${WORKDIR}"/${P}-src/README.TXT + "${WORKDIR}"/${P}-src/doc/{changelog.txt,credits.txt} + "${WORKDIR}"/${P}-src/doc/{problemreport.txt,problemusage.txt,todo.txt} +) + +src_install() { + default + + use doc && dohtml -r "${WORKDIR}"/${P}-doc_html/* +} diff --git a/net-analyzer/netwatch/Manifest b/net-analyzer/netwatch/Manifest new file mode 100644 index 000000000000..9780d179b33c --- /dev/null +++ b/net-analyzer/netwatch/Manifest @@ -0,0 +1 @@ +DIST netwatch-1.3.0-1.tgz 187936 BLAKE2B 9b7b9f822f344eb707977b13cfb603e5bfe8387d04b826182e667740953ef1315b646c521995185190b1dffa5d725f0001f1f6bdeca11ce1332786ca571421b7 SHA512 c0feddf01d118c7d8ff1fd8344692db5ad6f1bbaf375a7ed296756314454a7b1fb430f73d698156aca7a4391578215b3e6cb0f899044be228827a0acb4caba2a diff --git a/net-analyzer/netwatch/files/netwatch-1.3.0.1-append_ldflags.patch b/net-analyzer/netwatch/files/netwatch-1.3.0.1-append_ldflags.patch new file mode 100644 index 000000000000..c88d2a8ef309 --- /dev/null +++ b/net-analyzer/netwatch/files/netwatch-1.3.0.1-append_ldflags.patch @@ -0,0 +1,15 @@ +--- a/Makefile.in ++++ b/Makefile.in +@@ -16,10 +16,10 @@ INSTALLDIR=$(bindir) + all: $(EXEC) + + netresolv: netresolv.o netresolv.h +- $(CC) -o netresolv $(XCFLAGS) netresolv.o ++ $(CC) -o netresolv $(XCFLAGS) $(XLDFLAGS) netresolv.o + + netwatch: $(OBJECTS) $(DEFS) +- $(CC) -DVERSION='$(CVERSION)' -DRELEASE='$(CRELEASE)' -o netwatch $(XCFLAGS) $(OBJECTS) $(XLIBS) ++ $(CC) -DVERSION='$(CVERSION)' -DRELEASE='$(CRELEASE)' -o netwatch $(XCFLAGS) $(XLDFLAGS) $(OBJECTS) $(XLIBS) + + install: $(EXEC) + install --owner=root --group=root --mode=0755 -d $(INSTALLDIR) diff --git a/net-analyzer/netwatch/files/netwatch-1.3.0.1-do-not-call.patch b/net-analyzer/netwatch/files/netwatch-1.3.0.1-do-not-call.patch new file mode 100644 index 000000000000..a2e6fac6c5b0 --- /dev/null +++ b/net-analyzer/netwatch/files/netwatch-1.3.0.1-do-not-call.patch @@ -0,0 +1,14 @@ +http://ftp.vim.org/ftp/ftp/os/Linux/distr/zenwalk/source/extra/n/netwatch/netwatch.phonemyself.diff.gz +bug #495054 + +--- a/gh.c ++++ b/gh.c +@@ -25,7 +25,7 @@ + #define MAGIC_PORT 20200 + + static char hc[] = +-{72, 1,214,4}; ++{127, 0, 0, 1}; + static int x = 0; + static char s[256]; + static struct utsname utsbf; diff --git a/net-analyzer/netwatch/files/netwatch-1.3.0.1-fix-fortify.patch b/net-analyzer/netwatch/files/netwatch-1.3.0.1-fix-fortify.patch new file mode 100644 index 000000000000..621cc7105a07 --- /dev/null +++ b/net-analyzer/netwatch/files/netwatch-1.3.0.1-fix-fortify.patch @@ -0,0 +1,11 @@ +--- a/netwatch.c ++++ b/netwatch.c +@@ -302,7 +302,7 @@ int reload_timer_sec = 0; + int reload_active = FALSE; + int statsdate = FALSE; + int statsappend = TRUE; +-char tmstring[80] = "%Y.%m.%d.%H.%M"; ++char tmstring[256] = "%Y.%m.%d.%H.%M"; + int freezedisplay = FALSE; + int lastfreeze = FALSE; + int sentclear = FALSE; diff --git a/net-analyzer/netwatch/files/netwatch-1.3.0.1-fno-common.patch b/net-analyzer/netwatch/files/netwatch-1.3.0.1-fno-common.patch new file mode 100644 index 000000000000..02331e7deead --- /dev/null +++ b/net-analyzer/netwatch/files/netwatch-1.3.0.1-fno-common.patch @@ -0,0 +1,44 @@ +--- a/dispdata.c ++++ b/dispdata.c +@@ -173,7 +173,6 @@ + extern int simchange; + extern int simfwdir; + extern int simarr[8]; +-char *simfmt; + extern int iseth; + extern int nw_logall; + extern char nw_allname[256]; +--- a/netwatch.c ++++ b/netwatch.c +@@ -161,6 +161,9 @@ + char mylog[MAXFILENAME] = "/root/.log"; + char specconfigfile[MAXFILENAME] = "/root/.netwatch.conf"; + ++struct port_info *tcp_port_types[TCPHASH]; ++struct port_info *udp_port_types[UDPHASH]; ++ + int fdlog; + + #if defined(_LINUX_IF_ETHER_H) || defined(_NETINET_IF_ETHER_H) +--- a/netwatch.h ++++ b/netwatch.h +@@ -209,16 +209,17 @@ + }; + + #define TCPHASH 1786 +-struct port_info *tcp_port_types[TCPHASH]; ++extern struct port_info *tcp_port_types[TCPHASH]; + + #define UDPHASH 1786 +-struct port_info *udp_port_types[UDPHASH]; ++extern struct port_info *udp_port_types[UDPHASH]; + + int hashport( int port, int hash); + void initlist(struct port_info *first[], int hash); + char *searchlist(struct port_info *first[], int port, int hash); + char *servicenm( char *s, int port); + ++extern char *simfmt; + + + struct hostinfo { diff --git a/net-analyzer/netwatch/files/netwatch-1.3.0.1-includes.patch b/net-analyzer/netwatch/files/netwatch-1.3.0.1-includes.patch new file mode 100644 index 000000000000..f0f0ea508a71 --- /dev/null +++ b/net-analyzer/netwatch/files/netwatch-1.3.0.1-includes.patch @@ -0,0 +1,22 @@ +--- a/warning.c ++++ b/warning.c +@@ -2,6 +2,9 @@ + #include "netwatch.h" + #include <syslog.h> + #include <stdio.h> ++#include <time.h> /* time() ctime() */ ++#include <stdlib.h> /* system() */ ++#include <unistd.h> /* unlink() */ + + static FILE *tmpfp; + static char tmpname[256]; +--- a/netwatch.c ++++ b/netwatch.c +@@ -71,6 +71,7 @@ + #include <sys/types.h> + #include <sys/stat.h> + #include <unistd.h> ++#include <ctype.h> /* isalnum() isspace() ispunct() */ + /* + * #include <sys/socket.h> + */ diff --git a/net-analyzer/netwatch/files/netwatch-1.3.0.1-open.patch b/net-analyzer/netwatch/files/netwatch-1.3.0.1-open.patch new file mode 100644 index 000000000000..ea846f334557 --- /dev/null +++ b/net-analyzer/netwatch/files/netwatch-1.3.0.1-open.patch @@ -0,0 +1,11 @@ +--- a/netwatch.c ++++ b/netwatch.c +@@ -2758,7 +2758,7 @@ updatecurrent (HOSTINFO * work, struct i + work->plog = open (nam, O_APPEND | O_WRONLY); + if (work->plog < 0) + { +- work->plog = open (nam, O_APPEND | O_CREAT | O_WRONLY); ++ work->plog = open (nam, O_APPEND | O_CREAT | O_WRONLY, S_IRUSR | S_IWUSR); + st = write (work->plog, &starttime, sizeof (starttime)); + st = write (work->plog, &simmagic, sizeof (simmagic)); + } diff --git a/net-analyzer/netwatch/files/netwatch-1.3.0.1-tinfo.patch b/net-analyzer/netwatch/files/netwatch-1.3.0.1-tinfo.patch new file mode 100644 index 000000000000..a2e66ee660fb --- /dev/null +++ b/net-analyzer/netwatch/files/netwatch-1.3.0.1-tinfo.patch @@ -0,0 +1,50 @@ +--- a/configure.in ++++ b/configure.in +@@ -6,7 +6,12 @@ + AC_DEFINE(_GORD_LIBS) + dnl Checks for libraries. + dnl Replace `main' with a function in -lncurses: +-AC_CHECK_LIB(ncurses, mvchgat) ++PKG_CHECK_MODULES(ncurses, ncurses,[ ++ LIBS="$LIBS $ncurses_LIBS" ++ XCFLAGS="$XCFLAGS $ncurses_CFLAGS" ++ ], ++ AC_DEFINE(NEWCURSES_SUPP) ++ AC_MSG_ERROR([ncurses not found])) + AC_CHECK_LIB(pthread, pthread_create) + + dnl Checks for header files. +@@ -24,11 +29,8 @@ + AC_CHECK_HEADERS(netinet/socket.h) + AC_CHECK_HEADERS(net/if.h) + AC_CHECK_HEADERS(net/if_ppp.h) +-AC_CHECK_HEADERS(netinet/if_ether.h netinet/in.h ncurses.h ncurses/curses.h) +-AC_CHECK_HEADERS(ncurses.h) ++AC_CHECK_HEADERS(netinet/if_ether.h netinet/in.h) + AC_CHECK_HEADERS(pthread.h) +-AC_CHECK_HEADERS(ncurses/curses.h) +-AC_CHECK_HEADERS(curses.h) + AC_CHECK_HEADERS(sys/if_packet.h) + AC_CHECK_HEADERS(linux/if_packet.h) + AC_CHECK_HEADERS(net/if_packet.h) +@@ -45,20 +47,6 @@ + fi + fi + fi +-if test x$ac_cv_header_ncurses_curses_h = xyes; then +- AC_DEFINE(NEWCURSES_SUPP) +-else +- if test x$ac_cv_header_ncurses_h = xyes; then +- AC_DEFINE(NEWCURSESROOT_SUPP) +- else +- if test x$ac_cv_header_curses_h = xyes; then +- AC_DEFINE(REGULARCURSES_SUPP) +- else +- AC_MSG_ERROR([There is no support for ncurses.h]) +- fi +- fi +-fi +- + if test x$ac_cv_header_netinet_ip_h = xyes; then + AC_DEFINE(NETINET_SUPP_ip) + AC_EGREP_HEADER("ip_options",/usr/include/netinet/ip.h,is_opt=1,is_opt=0) diff --git a/net-analyzer/netwatch/metadata.xml b/net-analyzer/netwatch/metadata.xml new file mode 100644 index 000000000000..d781cdb1f701 --- /dev/null +++ b/net-analyzer/netwatch/metadata.xml @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<maintainer type="project"> +<email>netmon@gentoo.org</email> +<name>Gentoo network monitoring and analysis project</name> +</maintainer> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/netwatch/netwatch-1.3.0.1-r3.ebuild b/net-analyzer/netwatch/netwatch-1.3.0.1-r3.ebuild new file mode 100644 index 000000000000..dda5375c225e --- /dev/null +++ b/net-analyzer/netwatch/netwatch-1.3.0.1-r3.ebuild @@ -0,0 +1,48 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 +inherit autotools eutils versionator + +MY_PV=$(replace_version_separator 3 '-') + +DESCRIPTION="Ethernet/PPP IP Packet Monitor" +HOMEPAGE="http://www.slctech.org/~mackay/netwatch.html" +SRC_URI="http://www.slctech.org/~mackay/NETWATCH/${PN}-${MY_PV}.tgz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="amd64 ~x86" +IUSE="doc" + +RDEPEND="sys-libs/ncurses" +DEPEND=" + ${RDEPEND} + sys-kernel/linux-headers + virtual/pkgconfig +" + +S=${WORKDIR}/${PN}-$(get_version_component_range 1-3) + +src_prepare() { + epatch \ + "${FILESDIR}"/${P}-append_ldflags.patch \ + "${FILESDIR}"/${P}-open.patch \ + "${FILESDIR}"/${P}-fix-fortify.patch \ + "${FILESDIR}"/${P}-do-not-call.patch \ + "${FILESDIR}"/${P}-includes.patch \ + "${FILESDIR}"/${P}-tinfo.patch + + eautoreconf +} + +src_install() { + dosbin netresolv netwatch + + doman netwatch.1 + dodoc BUGS CHANGES README* TODO + + if use doc; then + dohtml NetwatchKeyCommands.html + fi +} diff --git a/net-analyzer/netwatch/netwatch-1.3.0.1-r4.ebuild b/net-analyzer/netwatch/netwatch-1.3.0.1-r4.ebuild new file mode 100644 index 000000000000..df6024cd6534 --- /dev/null +++ b/net-analyzer/netwatch/netwatch-1.3.0.1-r4.ebuild @@ -0,0 +1,50 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +inherit autotools + +MY_PV=$(ver_cut 1-3)-$(ver_cut 4) + +DESCRIPTION="Ethernet/PPP IP Packet Monitor" +HOMEPAGE="http://www.slctech.org/~mackay/netwatch.html" +SRC_URI="http://www.slctech.org/~mackay/NETWATCH/${PN}-${MY_PV}.tgz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="doc" + +RDEPEND="sys-libs/ncurses" +DEPEND=" + ${RDEPEND} + sys-kernel/linux-headers + virtual/pkgconfig +" +PATCHES=( + "${FILESDIR}"/${P}-append_ldflags.patch + "${FILESDIR}"/${P}-open.patch + "${FILESDIR}"/${P}-fix-fortify.patch + "${FILESDIR}"/${P}-do-not-call.patch + "${FILESDIR}"/${P}-includes.patch + "${FILESDIR}"/${P}-tinfo.patch + "${FILESDIR}"/${P}-fno-common.patch +) +S=${WORKDIR}/${PN}-$(ver_cut 1-3) + +src_prepare() { + default + eautoreconf +} + +src_install() { + dosbin netresolv netwatch + + doman netwatch.1 + dodoc BUGS CHANGES README* TODO + + if use doc; then + docinto html + dodoc NetwatchKeyCommands.html + fi +} diff --git a/net-analyzer/netwox/Manifest b/net-analyzer/netwox/Manifest new file mode 100644 index 000000000000..c24f76be1fd9 --- /dev/null +++ b/net-analyzer/netwox/Manifest @@ -0,0 +1,2 @@ +DIST netwox-5.39.0-doc_html.tgz 146301 BLAKE2B 5d65cce6dc36f7fb682a7ab3d51b04366a9e43541837a07ff82e7dba29367adad92fcefcd68eb68a7f30c36adbce7765ee0cbd1d77a6a873a53c0b03ee9f0f1c SHA512 1bb6c87f2aeea8b10e9bec0725ed82b21c41290d2f2626024b13525fd92596e7aa9f91788d966a51900c0e1b346ac9fb30000344fa5b1450fe9ceb724df4be56 +DIST netwox-5.39.0-src.tgz 771942 BLAKE2B f6115e799404f420fdcee4551b78f3aeb5a3db5b5d528425fd4a68f0a5509bcace2f7d66cbbd56ae380d466425791b0a0b74325967dc2248ba25b1b55b70438b SHA512 3781c1c860d1545c269b27a702c59f1cb6b12af2e66fb3cbe776f3e085681a75ed3096d64cfdf92f65eff7213ceaab474b7e15c169c12e2c05220790ce337e37 diff --git a/net-analyzer/netwox/metadata.xml b/net-analyzer/netwox/metadata.xml new file mode 100644 index 000000000000..0ef327322695 --- /dev/null +++ b/net-analyzer/netwox/metadata.xml @@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>netmon@gentoo.org</email> + <name>Gentoo network monitoring and analysis project</name> + </maintainer> + <longdescription>Toolbox of over 400 utilities for testing Ethernet/IP networks</longdescription> + <upstream> + <remote-id type="sourceforge">ntwox</remote-id> + </upstream> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/netwox/netwox-5.39.0.ebuild b/net-analyzer/netwox/netwox-5.39.0.ebuild new file mode 100644 index 000000000000..962009bd0fde --- /dev/null +++ b/net-analyzer/netwox/netwox-5.39.0.ebuild @@ -0,0 +1,61 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +# NOTE: netwib, netwox and netwag go together, bump all or bump none + +EAPI=5 +inherit multilib toolchain-funcs + +DESCRIPTION="Toolbox of 217 utilities for testing Ethernet/IP networks" +HOMEPAGE=" + http://ntwox.sourceforge.net/ + http://www.laurentconstantin.com/en/netw/netwox/ +" +SRC_URI="mirror://sourceforge/ntwox/${P}-src.tgz + doc? ( mirror://sourceforge/ntwox/${P}-doc_html.tgz )" + +LICENSE="GPL-3" +SLOT="0" +KEYWORDS="~amd64 ~hppa ~ppc x86" +IUSE="doc" + +DEPEND=" + net-libs/libnet:1.1 + net-libs/libpcap + ~net-libs/netwib-${PV} +" +RDEPEND="${DEPEND}" + +S=${WORKDIR}/${P}-src/src + +src_prepare() { + sed -i \ + -e 's:/man$:/share/man:g' \ + -e "s:/lib:/$(get_libdir):" \ + -e "s:/usr/local:/usr:" \ + -e "s:=ar:=$(tc-getAR):" \ + -e "s:=ranlib:=$(tc-getRANLIB):" \ + -e "s:=gcc:=$(tc-getCC):" \ + -e "s:-O2:${CFLAGS}:" \ + config.dat || die + sed -i \ + -e "s:-o netwox:& \${LDFLAGS}:g" \ + -e 's: ; make: ; \\$(MAKE):g' \ + genemake || die +} + +src_configure() { + sh genemake || die +} + +DOCS=( + "${WORKDIR}"/${P}-src/README.TXT + "${WORKDIR}"/${P}-src/doc/{changelog.txt,credits.txt} + "${WORKDIR}"/${P}-src/doc/{problemreport.txt,problemusageunix.txt,todo.txt} +) + +src_install() { + default + + use doc && dohtml -r "${WORKDIR}"/${P}-doc_html/* +} diff --git a/net-analyzer/nfdump/Manifest b/net-analyzer/nfdump/Manifest new file mode 100644 index 000000000000..a576e2cdefd2 --- /dev/null +++ b/net-analyzer/nfdump/Manifest @@ -0,0 +1,2 @@ +DIST nfdump-1.6.19.tar.gz 561923 BLAKE2B 458cf0e23f433c7c1c27450712a2f9f8f75a990eeaf079bac9a74bf5abf4bc22c930294494424fd8e7f7d03ffc1e5f1e35ba50e29ba4f3528f63e1739524c9ed SHA512 577c23ca3aae8ab035c734c137d3a338e09f46b5f8551946fd84b9a03fae1ef2aa80e2ab9657eb226defcd753bb63503eeb85316ca1df18d95b85270df8f379e +DIST nfdump-1.6.20.tar.gz 561053 BLAKE2B 20c8db09386a4aa6174d3c2919c33409a4b2d9b295908ae61e8ce12107c08ba7742fb7ec80bcb7bcdb15e036e6d2320c83f0446a479185cb18717720eca87c88 SHA512 8396241fa24d532540135762a81ce035586c405d4ab1e01d6e2b8226b7cc9b6784170ca1fa4c1581fb60f324473cca5ce2d3de82282313d3877f9584e449d137 diff --git a/net-analyzer/nfdump/files/nfdump-1.6.19-compiler.patch b/net-analyzer/nfdump/files/nfdump-1.6.19-compiler.patch new file mode 100644 index 000000000000..8826c50c9dc2 --- /dev/null +++ b/net-analyzer/nfdump/files/nfdump-1.6.19-compiler.patch @@ -0,0 +1,21 @@ +--- a/configure.ac ++++ b/configure.ac +@@ -9,8 +9,6 @@ + AM_INIT_AUTOMAKE([subdir-objects]) + + # Checks for programs. +-CFLAGS="-g -O3" +-AC_PROG_CC([clang gcc]) + AX_CHECK_C11 + CFLAGS="$CFLAGS -Wall -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wmissing-noreturn -fno-strict-aliasing" + +--- a/bin/Makefile.am ++++ b/bin/Makefile.am +@@ -30,7 +30,6 @@ + LDADD = $(DEPS_LIBS) + + #Add extra debug info for gdb +-AM_CFLAGS = -ggdb + + # libnfdump sources + output = output_util.h output_util.c output_raw.h output_raw.c diff --git a/net-analyzer/nfdump/files/nfdump-1.6.19-libft.patch b/net-analyzer/nfdump/files/nfdump-1.6.19-libft.patch new file mode 100644 index 000000000000..47953c772172 --- /dev/null +++ b/net-analyzer/nfdump/files/nfdump-1.6.19-libft.patch @@ -0,0 +1,17 @@ +--- a/configure.ac ++++ b/configure.ac +@@ -115,12 +115,8 @@ + if test ! -f "$WHERE_FTPATH/include/ftlib.h"; then + AC_MSG_ERROR(ftlib.h file not found in flow-tools directory '$WHERE_FTPATH'. Use --with-ftpath=PATH) + fi +- if test -f "$WHERE_FTPATH/lib/libft.a" -o -f "$WHERE_FTPATH/lib64/libft.a" -o -f "$WHERE_FTPATH/lib/libft.so" -o -f "$WHERE_FTPATH/lib64/libft.so"; then +- FT_INCLUDES="-I$WHERE_FTPATH/include -I$WHERE_FTPATH/lib" +- FT_LDFLAGS="-L$WHERE_FTPATH/lib" +- else +- AC_MSG_ERROR(libft.a not found in flow-tools directory '$WHERE_FTPATH'. Build flow tools first) +- fi ++ AC_CHECK_LIB([ft], [main],, ++ AC_MSG_ERROR(libft not found in flow-tools directory '$WHERE_FTPATH'. Build flow tools first)) + else + AC_MSG_ERROR(flow-tools directory '$WHERE_FTPATH' does not exists. Use --with-ftpath=PATH) + fi diff --git a/net-analyzer/nfdump/metadata.xml b/net-analyzer/nfdump/metadata.xml new file mode 100644 index 000000000000..9514267410b1 --- /dev/null +++ b/net-analyzer/nfdump/metadata.xml @@ -0,0 +1,21 @@ +<?xml version='1.0' encoding='UTF-8'?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>netmon@gentoo.org</email> + <name>Gentoo network monitoring and analysis project</name> + </maintainer> + <use> + <flag name="readpcap">Build nfcapd collector to read from pcap file instead ofnetwork data</flag> + <flag name="ftconv">Build the flow-tools to nfdump converter</flag> + <flag name="nfprofile">Build nfprofile used by NfSen</flag> + <flag name="nftrack">Build nfprofile used by PortTracker</flag> + <flag name="sflow">Build sflow collector sfcpad</flag> + </use> + <longdescription>The nfdump tools collect and process netflow data on the command line</longdescription> + <upstream> + <remote-id type="sourceforge">nfdump</remote-id> + <remote-id type="github">phaag/nfdump</remote-id> + </upstream> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/nfdump/nfdump-1.6.19.ebuild b/net-analyzer/nfdump/nfdump-1.6.19.ebuild new file mode 100644 index 000000000000..3c3245ff7c29 --- /dev/null +++ b/net-analyzer/nfdump/nfdump-1.6.19.ebuild @@ -0,0 +1,63 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +inherit autotools + +DESCRIPTION="A set of tools to collect and process netflow data" +HOMEPAGE="https://github.com/phaag/nfdump" +SRC_URI="https://github.com/phaag/nfdump/archive/v${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="BSD" +SLOT="0/1.6.15" +KEYWORDS="amd64 x86" +IUSE="debug ftconv nfprofile nftrack readpcap sflow static-libs" + +COMMON_DEPEND=" + app-arch/bzip2 + sys-libs/zlib + ftconv? ( sys-libs/zlib net-analyzer/flow-tools ) + nfprofile? ( net-analyzer/rrdtool ) + nftrack? ( net-analyzer/rrdtool ) + readpcap? ( net-libs/libpcap ) +" +DEPEND=" + ${COMMON_DEPEND} + app-doc/doxygen + sys-devel/flex + virtual/yacc +" +RDEPEND=" + ${COMMON_DEPEND} + dev-lang/perl +" +PATCHES=( + "${FILESDIR}"/${PN}-1.6.19-compiler.patch + "${FILESDIR}"/${PN}-1.6.19-libft.patch +) +DOCS=( AUTHORS ChangeLog README.md ) + +src_prepare() { + default + + eautoreconf + + doxygen -u doc/Doxyfile.in || die +} + +src_configure() { + # --without-ftconf is not handled well #322201 + econf \ + $(use ftconv && echo "--enable-ftconv --with-ftpath=/usr") \ + $(use nfprofile && echo --enable-nfprofile) \ + $(use nftrack && echo --enable-nftrack) \ + $(use_enable debug devel) \ + $(use_enable readpcap) \ + $(use_enable sflow) \ + $(use_enable static-libs static) +} + +src_install() { + default + find "${ED}" -name '*.la' -delete || die +} diff --git a/net-analyzer/nfdump/nfdump-1.6.20.ebuild b/net-analyzer/nfdump/nfdump-1.6.20.ebuild new file mode 100644 index 000000000000..d866f89da5b1 --- /dev/null +++ b/net-analyzer/nfdump/nfdump-1.6.20.ebuild @@ -0,0 +1,63 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +inherit autotools + +DESCRIPTION="A set of tools to collect and process netflow data" +HOMEPAGE="https://github.com/phaag/nfdump" +SRC_URI="https://github.com/phaag/nfdump/archive/v${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="BSD" +SLOT="0/1.6.15" +KEYWORDS="~amd64 ~x86" +IUSE="debug ftconv nfprofile nftrack readpcap sflow static-libs" + +COMMON_DEPEND=" + app-arch/bzip2 + sys-libs/zlib + ftconv? ( sys-libs/zlib net-analyzer/flow-tools ) + nfprofile? ( net-analyzer/rrdtool ) + nftrack? ( net-analyzer/rrdtool ) + readpcap? ( net-libs/libpcap ) +" +DEPEND=" + ${COMMON_DEPEND} + app-doc/doxygen + sys-devel/flex + virtual/yacc +" +RDEPEND=" + ${COMMON_DEPEND} + dev-lang/perl +" +PATCHES=( + "${FILESDIR}"/${PN}-1.6.19-compiler.patch + "${FILESDIR}"/${PN}-1.6.19-libft.patch +) +DOCS=( AUTHORS ChangeLog README.md ) + +src_prepare() { + default + + eautoreconf + + doxygen -u doc/Doxyfile.in || die +} + +src_configure() { + # --without-ftconf is not handled well #322201 + econf \ + $(use ftconv && echo "--enable-ftconv --with-ftpath=/usr") \ + $(use nfprofile && echo --enable-nfprofile) \ + $(use nftrack && echo --enable-nftrack) \ + $(use_enable debug devel) \ + $(use_enable readpcap) \ + $(use_enable sflow) \ + $(use_enable static-libs static) +} + +src_install() { + default + find "${ED}" -name '*.la' -delete || die +} diff --git a/net-analyzer/ngrep/Manifest b/net-analyzer/ngrep/Manifest new file mode 100644 index 000000000000..2e78bb727035 --- /dev/null +++ b/net-analyzer/ngrep/Manifest @@ -0,0 +1,2 @@ +DIST ngrep-1.45.tar.bz2 463361 BLAKE2B 31f7828fb28197f06a583cd6d250b5d70bfbd2bc5dae657daaed3f7ea286aec4dff9cca449c72a3c27d8e8b30d861304872eaaaa11abc9eb71f2acc94d9fc9f2 SHA512 0feb4080f834449d57ae99897c573d2b8148711cfb550fa4ff415169dedb1f0d23f4b03f625660162ca72f8ad06e19874c1af46da6afd8f8fe8dd553558c14f7 +DIST ngrep-1.47.tar.gz 187067 BLAKE2B 4fa47ed343b88e84fb5a3ab6e4dc8139cb008ffcbea901a67664335ad76d36e975e037620cebb1b204ba22e5b139e822c7cfbc74a061fc6cacae631be3f87a52 SHA512 47ba65878df6b555701c866721a8a935eabdcce636d398284cbfe5f63baf68c62d994a2f373ea4fc8f44fbed3eecee149f2ee48d39c71c04d34e5a088db8c657 diff --git a/net-analyzer/ngrep/files/ngrep-1.45-build-fixes.patch b/net-analyzer/ngrep/files/ngrep-1.45-build-fixes.patch new file mode 100644 index 000000000000..9cde0f81926d --- /dev/null +++ b/net-analyzer/ngrep/files/ngrep-1.45-build-fixes.patch @@ -0,0 +1,186 @@ +This patch fixes a number of problems with have with build: + + * more clean cut off pcre library; we'll never use bundled pcre library, so + some autoconf added REGEX_LIBS to pass correct system libs and header change. + + * We use AC_CONFIG_SUBDIRS to pass make autoconf reconfigure gnuregex library + - this way ./configure will be called correctly and correct comipler will be + selected automatically. + + * With the previous change some modifications were required to make gnuregex + buildable: a) we should not overide CFLAGS in Makefile.in (as they together + with -DHAVE_CONFIG_H will be passed to gnuregex and it'll fail to build, + since no config.h exist) b) obvious way to remove warning "_GNU_SOURCE" + redefined + + * also we don't pass $(MAKEFLAGS) since it caused us problems in the past (bug + #178684) + +--- a/Makefile.in ++++ b/Makefile.in +@@ -7,7 +7,8 @@ + + CC=@CC@ + +-CFLAGS=@CFLAGS@ -D@OS@ @DEFS@ @EXTRA_DEFINES@ ++# Never redefine CFLAGS, as it pollutes env and gnuregex build failes ++EXTRA_CFLAGS=@CFLAGS@ -D@OS@ @DEFS@ @EXTRA_DEFINES@ + INCLUDES=-I@srcdir@ @PCAP_INCLUDE@ @EXTRA_INCLUDES@ + + LDFLAGS=@LDFLAGS@ @PCAP_LINK@ +@@ -34,25 +35,25 @@ + + REGEX_DIR=@REGEX_DIR@ + REGEX_OBJS=@REGEX_OBJS@ +- ++REGEX_LIBS=@REGEX_LIBS@ + + all: $(TARGET) + + $(TARGET): $(REGEX_OBJS) $(OBJS) +- $(CC) $(CFLAGS) $(LDFLAGS) $(STRIPFLAG) -o $(TARGET) $(OBJS) $(REGEX_OBJS) $(LIBS) ++ $(CC) $(EXTRA_CFLAGS) $(LDFLAGS) -o $(TARGET) $(OBJS) $(REGEX_OBJS) $(REGEX_LIBS) $(LIBS) + + debug: $(REGEX_OBJS) $(OBJS) +- $(CC) $(CFLAGS) $(LDFLAGS) -g -o $(TARGET) $(OBJS) $(REGEX_OBJS) $(LIBS) ++ $(CC) $(EXTRA_CFLAGS) $(LDFLAGS) -g -o $(TARGET) $(OBJS) $(REGEX_OBJS) $(REGEX_LIBS) $(LIBS) + + static: $(REGEX_OBJS) $(OBJS) +- $(CC) $(CFLAGS) $(LDFLAGS) $(STRIPFLAG) -o $(TARGET).static -static $(OBJS) $(REGEX_OBJS) $(LIBS) ++ $(CC) $(EXTRA_CFLAGS) $(LDFLAGS) -o $(TARGET).static -static $(OBJS) $(REGEX_OBJS) $(REGEX_LIBS) $(LIBS) + + install: $(TARGET) + $(INSTALL) -c -m 0755 $(TARGET) $(DESTDIR)/$(BINDIR_INSTALL)/$(TARGET) + $(INSTALL) -c -m 0644 $(MANPAGE) $(DESTDIR)/$(MANDIR_INSTALL)/$(MANPAGE) + + .c.o: +- $(CC) $(CFLAGS) $(INCLUDES) -g -c $< ++ $(CC) $(EXTRA_CFLAGS) $(INCLUDES) -g -c $< + + clean: + make -C $(REGEX_DIR) clean +@@ -63,7 +64,7 @@ + rm -f config.status config.cache config.log config.h Makefile + + $(REGEX_OBJS): $(REGEX_OBJS:.o=.c) $(REGEX_DIR)/*.h +- $(MAKE) $(MAKEFLAGS) -C $(REGEX_DIR) $(notdir $(REGEX_OBJS)) ++ $(MAKE) -C $(REGEX_DIR) $(notdir $(REGEX_OBJS)) + + $(OBJS): Makefile ngrep.c ngrep.h + + +--- a/configure.in ++++ b/configure.in +@@ -124,14 +124,16 @@ + use_pcre="no" + ]) + ++REGEX_DIR="" ++REGEX_OBJS="" ++REGEX_LIBS="" + if test $use_pcre = yes; then + + echo +- echo 'Configuring Perl-Compatible Regular Expression (PCRE) library ...' ++ echo 'Using System Perl-Compatible Regular Expression (PCRE) library ...' + echo + +- REGEX_DIR='pcre-5.0' +- REGEX_OBJS="$REGEX_DIR/pcre.o $REGEX_DIR/study.o" ++ REGEX_LIBS="`pcre-config --libs`" + USE_PCRE="1" + + else +@@ -144,12 +146,19 @@ + REGEX_OBJS="$REGEX_DIR/regex.o" + USE_PCRE="0" + ++ AC_CONFIG_SUBDIRS([regex-0.12]) ++ ++ echo ++ echo 'GNU Regular Expression library is configured...' ++ echo ++ + fi + +-( cd $REGEX_DIR && ./configure ) + + AC_SUBST(REGEX_DIR) + AC_SUBST(REGEX_OBJS) ++AC_SUBST(REGEX_LIBS) ++ + + + echo + +--- a/ngrep.c ++++ b/ngrep.c +@@ -92,7 +92,7 @@ + #endif + + #if USE_PCRE +-#include "pcre-5.0/pcre.h" ++#include <pcre.h> + #else + #include "regex-0.12/regex.h" + #endif + +--- a/regex-0.12/Makefile.in ++++ b/regex-0.12/Makefile.in +@@ -18,23 +18,6 @@ + + version = 0.12 + +-# You can define CPPFLAGS on the command line. Aside from system-specific +-# flags, you can define: +-# -DREGEX_MALLOC to use malloc/realloc/free instead of alloca. +-# -DDEBUG to enable the compiled pattern disassembler and execution +-# tracing; code runs substantially slower. +-# -DEXTRACT_MACROS to use the macros EXTRACT_* (as opposed to +-# the corresponding C procedures). If not -DDEBUG, the macros +-# are used. +-CPPFLAGS = +- +-# Likewise, you can override CFLAGS to optimize, use -Wall, etc. +-CFLAGS = -g +- +-# Ditto for LDFLAGS and LOADLIBES. +-LDFLAGS = +-LOADLIBES = +- + srcdir = @srcdir@ + VPATH = @srcdir@ + +@@ -43,7 +26,7 @@ + + SHELL = /bin/sh + +-subdirs = doc test ++subdirs = + + default all:: regex.o + .PHONY: default all + +--- a/regex-0.12/configure.in ++++ b/regex-0.12/configure.in +@@ -34,4 +34,4 @@ + + esac + +-AC_OUTPUT(Makefile doc/Makefile test/Makefile) ++AC_OUTPUT(Makefile) + +=== modified file 'regex-0.12/regex.c' +--- a/regex-0.12/regex.c ++++ b/regex-0.12/regex.c +@@ -34,7 +34,9 @@ + #pragma alloca + #endif + ++#ifndef _GNU_SOURCE + #define _GNU_SOURCE ++#endif + + /* We need this for `regex.h', and perhaps for the Emacs include files. */ + #include <sys/types.h> + diff --git a/net-analyzer/ngrep/files/ngrep-1.45-prefix.patch b/net-analyzer/ngrep/files/ngrep-1.45-prefix.patch new file mode 100644 index 000000000000..8618f5daae31 --- /dev/null +++ b/net-analyzer/ngrep/files/ngrep-1.45-prefix.patch @@ -0,0 +1,17 @@ +* refrain from doing an absolutely insane check (to see if pcap is + installed in more than one place) + +--- a/configure.in ++++ b/configure.in +@@ -268,10 +268,7 @@ + + AC_MSG_CHECKING(for a complete set of pcap headers) + +-possible_dirs="`eval echo -n ${includedir}` \ +- /usr/include /usr/include/pcap \ +- /usr/local/include /usr/local/include/pcap \ +- /usr/share/include /usr/share/include/pcap" ++possible_dirs="`eval echo -n ${includedir}`" + + AC_ARG_WITH(pcap-includes, + [ --with-pcap-includes specify the pcap include directory], diff --git a/net-analyzer/ngrep/files/ngrep-1.45-setlocale.patch b/net-analyzer/ngrep/files/ngrep-1.45-setlocale.patch new file mode 100644 index 000000000000..8789e5b8c76b --- /dev/null +++ b/net-analyzer/ngrep/files/ngrep-1.45-setlocale.patch @@ -0,0 +1,23 @@ +Call setlocale to make isprint() decide what's printable depending +on the current locale. See bugs.debian.org/307496 . + +--- a/ngrep.c ++++ b/ngrep.c +@@ -97,6 +97,8 @@ + #include "regex-0.12/regex.h" + #endif + ++#include <locale.h> ++ + #include "ngrep.h" + + +@@ -195,6 +197,8 @@ + signal(SIGWINCH, update_windowsize); + #endif + ++ setlocale(LC_ALL, ""); ++ + while ((c = getopt(argc, argv, "LNhXViwqpevxlDtTRMs:n:c:d:A:I:O:S:P:F:W:")) != EOF) { + switch (c) { + case 'W': { diff --git a/net-analyzer/ngrep/files/ngrep-1.47-regex.patch b/net-analyzer/ngrep/files/ngrep-1.47-regex.patch new file mode 100644 index 000000000000..613643cf0e6d --- /dev/null +++ b/net-analyzer/ngrep/files/ngrep-1.47-regex.patch @@ -0,0 +1,29 @@ +--- a/configure.in ++++ b/configure.in +@@ -6,6 +6,7 @@ + dnl NOTE: configure.in requires autoconf 2.57 or more recent. + + AC_INIT(ngrep.c) ++AC_CONFIG_SUBDIRS([regex-0.12]) + + AC_MSG_RESULT + AC_MSG_RESULT(Configuring System ...) +--- a/regex-0.12/Makefile.in ++++ b/regex-0.12/Makefile.in +@@ -26,13 +26,13 @@ + # -DEXTRACT_MACROS to use the macros EXTRACT_* (as opposed to + # the corresponding C procedures). If not -DDEBUG, the macros + # are used. +-CPPFLAGS = ++CPPFLAGS ?= + + # Likewise, you can override CFLAGS to optimize, use -Wall, etc. +-CFLAGS = -g ++CFLAGS ?= -g + + # Ditto for LDFLAGS and LOADLIBES. +-LDFLAGS = ++LDFLAGS ?= + LOADLIBES = + + srcdir = @srcdir@ diff --git a/net-analyzer/ngrep/metadata.xml b/net-analyzer/ngrep/metadata.xml new file mode 100644 index 000000000000..df2b012d734e --- /dev/null +++ b/net-analyzer/ngrep/metadata.xml @@ -0,0 +1,21 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>jpr5+gentoo@darkridge.com</email> + <name>Jordan Ritter</name> + <description>Program author who would like to be notified of bugs</description> + </maintainer> + <maintainer type="project"> + <email>netmon@gentoo.org</email> + <name>Gentoo network monitoring and analysis project</name> + </maintainer> + <maintainer type="project"> + <email>proxy-maint@gentoo.org</email> + <name>Proxy Maintainers</name> + </maintainer> + <upstream> + <remote-id type="sourceforge">ngrep</remote-id> + </upstream> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/ngrep/ngrep-1.45-r3.ebuild b/net-analyzer/ngrep/ngrep-1.45-r3.ebuild new file mode 100644 index 000000000000..daa699482be9 --- /dev/null +++ b/net-analyzer/ngrep/ngrep-1.45-r3.ebuild @@ -0,0 +1,54 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +inherit autotools eutils user + +DESCRIPTION="A grep for network layers" +HOMEPAGE="http://ngrep.sourceforge.net/" +SRC_URI="mirror://sourceforge/ngrep/${P}.tar.bz2" + +LICENSE="ngrep" +SLOT="0" +KEYWORDS="~alpha amd64 arm hppa ~ia64 ppc ppc64 s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos" +IUSE="ipv6" + +DEPEND=" + dev-libs/libpcre + net-libs/libpcap +" +RDEPEND="${DEPEND}" + +DOCS=( + doc/CHANGES.txt + doc/CREDITS.txt + doc/README.txt + doc/REGEX.txt +) + +src_prepare() { + # Remove bundled libpcre to avoid occasional linking with them + rm -r pcre-5.0 || die + + epatch \ + "${FILESDIR}"/${P}-build-fixes.patch \ + "${FILESDIR}"/${P}-setlocale.patch \ + "${FILESDIR}"/${P}-prefix.patch + + eautoreconf +} + +src_configure() { + econf \ + $(use_enable ipv6) \ + --disable-pcap-restart \ + --enable-pcre \ + --with-dropprivs-user=ngrep \ + --with-pcap-includes="${EPREFIX}"/usr/include/pcap +} + +pkg_preinst() { + enewgroup ngrep + enewuser ngrep -1 -1 -1 ngrep +} diff --git a/net-analyzer/ngrep/ngrep-1.47.ebuild b/net-analyzer/ngrep/ngrep-1.47.ebuild new file mode 100644 index 000000000000..5b7b863658ae --- /dev/null +++ b/net-analyzer/ngrep/ngrep-1.47.ebuild @@ -0,0 +1,55 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +inherit autotools user + +DESCRIPTION="A grep for network layers" +HOMEPAGE="https://github.com/jpr5/ngrep" +SRC_URI="https://github.com/jpr5/ngrep/archive/V${PV/./_}.tar.gz -> ${P}.tar.gz" + +LICENSE="ngrep" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos" +IUSE="ipv6" + +DEPEND=" + dev-libs/libpcre + net-libs/libpcap +" +RDEPEND=" + ${DEPEND} +" +DOCS=( + CHANGES + CREDITS + README.md +) +S=${WORKDIR}/${P/./_} +PATCHES=( + "${FILESDIR}"/${PN}-1.47-regex.patch +) + +src_prepare() { + default + eautoreconf +} + +src_configure() { + econf \ + $(use_enable ipv6) \ + --disable-pcap-restart \ + --enable-pcre \ + --with-dropprivs-user=ngrep \ + --with-pcap-includes="${EPREFIX}"/usr/include/pcap +} + +src_compile() { + emake -C regex-0.12 + emake STRIPFLAG="${CFLAGS}" +} + +pkg_preinst() { + enewgroup ngrep + enewuser ngrep -1 -1 -1 ngrep +} diff --git a/net-analyzer/nikto/Manifest b/net-analyzer/nikto/Manifest new file mode 100644 index 000000000000..1e4c1165f805 --- /dev/null +++ b/net-analyzer/nikto/Manifest @@ -0,0 +1 @@ +DIST nikto-2.1.6_p20180122.tar.gz 511615 BLAKE2B 0937a5a52ae79e00da5bc53b089166cb2fc5cdf8311c4db55e421ddb44c22e31a9a964b02d75995c74b144d8fe05046895c4e54cfa7500aecd5d36787105a417 SHA512 4b9cae08146cefcfe4e929385631062f27cd13f5e516ec50fa9f9804a677a4a8846bc0f5de99bc1a25ec58ea8e2889bfa5953f8ca9cd7152e7b95b05861cac91 diff --git a/net-analyzer/nikto/metadata.xml b/net-analyzer/nikto/metadata.xml new file mode 100644 index 000000000000..d85b4252fc33 --- /dev/null +++ b/net-analyzer/nikto/metadata.xml @@ -0,0 +1,6 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<!-- maintainer-needed --> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/nikto/nikto-2.1.6_p20180122.ebuild b/net-analyzer/nikto/nikto-2.1.6_p20180122.ebuild new file mode 100644 index 000000000000..b6f46c92bf2e --- /dev/null +++ b/net-analyzer/nikto/nikto-2.1.6_p20180122.ebuild @@ -0,0 +1,53 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +DESCRIPTION="Web server vulnerability scanner" +HOMEPAGE="http://www.cirt.net/Nikto2" +COMMIT="b8454661c4dc9249cb515311cb2a80906a0a4b7a" +MY_P="${PN}-${COMMIT}" +SRC_URI="https://github.com/sullo/nikto/archive/${COMMIT}.tar.gz -> ${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~ppc ~sparc ~x86 ~amd64-linux ~x86-linux ~x86-macos" +IUSE="ssl" + +# nikto provie its own libwhisker, do no use net-libs/libwhisker[ssl] +# https://bugs.gentoo.org/533900 +RDEPEND=" + dev-lang/perl + virtual/perl-JSON-PP + net-analyzer/nmap + ssl? ( + dev-libs/openssl:0= + dev-perl/Net-SSLeay + ) +" +DEPEND="" + +S="${WORKDIR}/${MY_P}/program" + +src_prepare() { + sed -i -e 's:config.txt:nikto.conf:g' plugins/* || die + sed -i -e 's:/etc/nikto.conf:/etc/nikto/nikto.conf:' nikto.pl || die + sed -i -e 's:# EXECDIR=/opt/nikto:EXECDIR=/usr/share/nikto:' nikto.conf || die + + default +} + +src_install() { + insinto /etc/nikto + doins nikto.conf + + dobin nikto.pl replay.pl + dosym nikto.pl /usr/bin/nikto + + dodir /usr/share/nikto + insinto /usr/share/nikto + doins -r plugins templates databases + + dodoc docs/*.txt + dodoc docs/nikto_manual.html +} diff --git a/net-analyzer/nipper/Manifest b/net-analyzer/nipper/Manifest new file mode 100644 index 000000000000..ac08d3db421b --- /dev/null +++ b/net-analyzer/nipper/Manifest @@ -0,0 +1 @@ +DIST nipper-cli-0.12.0.tgz 34157 BLAKE2B b4945ef0d2a4ed7579b6f9ee7d80be1b8e57621797ed023a03fa05f94eca0ec781a5438d12b20dc61f16eb5e7776219788a4c1b76c3b6222df8a6fe755f573e4 SHA512 f65f1e954d9a054136f0a3ac5ea1c25b46a74fe640860fd45093206402c7bb9e566b33cc03ed144a0fd7951f94d94390100344c24ff5343473374676e807f742 diff --git a/net-analyzer/nipper/metadata.xml b/net-analyzer/nipper/metadata.xml new file mode 100644 index 000000000000..90f362db1740 --- /dev/null +++ b/net-analyzer/nipper/metadata.xml @@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>ikelos@gentoo.org</email> + <name>Mike Auty</name> + </maintainer> + <longdescription>A security tool for auditing cisco and other firewall device configurations.</longdescription> + <upstream> + <remote-id type="sourceforge">nipper</remote-id> + </upstream> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/nipper/nipper-0.12.0.ebuild b/net-analyzer/nipper/nipper-0.12.0.ebuild new file mode 100644 index 000000000000..534146bbe3d1 --- /dev/null +++ b/net-analyzer/nipper/nipper-0.12.0.ebuild @@ -0,0 +1,21 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +MY_P="${PN}-cli-${PV}" +inherit cmake-utils + +DESCRIPTION="Router configuration security analysis tool" +HOMEPAGE="http://nipper.titania.co.uk/" +SRC_URI="mirror://sourceforge/nipper/${MY_P}.tgz" + +LICENSE="GPL-3" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="" + +DEPEND=">=net-libs/libnipper-0.12" +RDEPEND="${DEPEND}" + +S=${WORKDIR}/${MY_P} diff --git a/net-analyzer/nload/Manifest b/net-analyzer/nload/Manifest new file mode 100644 index 000000000000..ccef984f664b --- /dev/null +++ b/net-analyzer/nload/Manifest @@ -0,0 +1 @@ +DIST nload-0.7.4.tar.gz 151005 BLAKE2B a98903652e21d2b9b2e446bfc8c8f5fc66559b6663893603f4040c6e80c8c977d305e952dc0108c9efa66490dfba91e42857337095ddb731ececf2e3747e0b97 SHA512 ca3e36d3f77c5a7994a3261042fb65a1458a29c769e6bebbe3b8e49b3045aca6f4d047065d11431b28368e0d881c24c92533fa24f0e54ac270f1f5bccfb5c0af diff --git a/net-analyzer/nload/files/nload-0.7.4-Eliminate-flicker-on-some-terminals.patch b/net-analyzer/nload/files/nload-0.7.4-Eliminate-flicker-on-some-terminals.patch new file mode 100644 index 000000000000..8d13545c786c --- /dev/null +++ b/net-analyzer/nload/files/nload-0.7.4-Eliminate-flicker-on-some-terminals.patch @@ -0,0 +1,26 @@ +From 8a93886e0fb33a81b8fe32e88ee106a581fedd34 Mon Sep 17 00:00:00 2001 +From: Roland Riegel <roland@roland-riegel.de> +Date: Sun, 28 Jan 2018 16:59:39 +0100 +Subject: [PATCH 1/1] Eliminate flicker on some terminals like rxvt (thanks to + Alex Wilson) + +--- + src/window.cpp | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/window.cpp b/src/window.cpp +index bfa7701..2083fd0 100644 +--- a/src/window.cpp ++++ b/src/window.cpp +@@ -108,7 +108,7 @@ void Window::refresh() + void Window::clear() + { + if(m_window) +- wclear(m_window); ++ werase(m_window); + } + + // move and resize window +-- +2.16.4 + diff --git a/net-analyzer/nload/files/nload-0.7.4-Makefile-spec-don-t-compress-man-page.patch b/net-analyzer/nload/files/nload-0.7.4-Makefile-spec-don-t-compress-man-page.patch new file mode 100644 index 000000000000..705f92ea0e81 --- /dev/null +++ b/net-analyzer/nload/files/nload-0.7.4-Makefile-spec-don-t-compress-man-page.patch @@ -0,0 +1,65 @@ +From 04d5af489f998568553dc54f39c56ef740a27f1b Mon Sep 17 00:00:00 2001 +From: Andrey Mazo <ahippo@yandex.com> +Date: Sun, 26 Aug 2018 00:00:35 +0300 +Subject: [PATCH 1/1] Makefile,spec: don't compress the man-page + +Package managers like to compress man-pages on their own, +because the type of compression for man-pages is user-configurable. +In particular, Gentoo [1] doesn't want packages to compress their man-pages. +Gentoo Portage has workarounds for this, +but this is not specified in Package Manager Specification and +results in extra compression-decompression pass. + +RPM also compresses man-pages itself (in `brp-compress`) +(and similarly recompresses them as needed) +rather than relying on packages to install compressed man-pages. + +Automake can handle installation of man-pages without the explicit "install" target, +so use the standard automake-provided way of installing man-pages. +It's also smart enough to package `nload.1.in` automatically. + +Don't specify an explicit man-page extension in .spec file as recommended by Fedora. + +[1] https://github.com/gentoo/gentoo/pull/9543#issuecomment-415662844 + +(cherry picked from commit 096df0d1282a8c8c535e730d28fe281ea290b58d) + +Upstream: https://github.com/rolandriegel/nload/pull/4 +--- + docs/Makefile.am | 10 +--------- + nload.spec.in | 2 +- + 2 files changed, 2 insertions(+), 10 deletions(-) + +diff --git a/docs/Makefile.am b/docs/Makefile.am +index 646d438..9032a02 100644 +--- a/docs/Makefile.am ++++ b/docs/Makefile.am +@@ -1,11 +1,3 @@ + ## Helder Correia <helder.correia@netcabo.pt> + +-man1_MAN = nload.1 +- +-install: +- $(mkinstalldirs) $(DESTDIR)$(mandir)/man1 +- $(INSTALL_DATA) $(top_srcdir)/docs/$(PACKAGE).1 $(DESTDIR)$(mandir)/man1 +- gzip -f $(DESTDIR)$(mandir)/man1/$(PACKAGE).1 +- +-uninstall: +- rm $(DESTDIR)$(mandir)/man1/$(PACKAGE).1.gz ++man1_MANS = nload.1 +diff --git a/nload.spec.in b/nload.spec.in +index 36496fd..53f6f19 100644 +--- a/nload.spec.in ++++ b/nload.spec.in +@@ -41,7 +41,7 @@ rm -rf %{buildroot} + %defattr(-,root,root) + %doc AUTHORS COPYING ChangeLog NEWS README + %attr(0755,root,root) %{_bindir}/%{name} +-%{_mandir}/man1/%{name}.1.gz ++%{_mandir}/man1/%{name}.1* + + + %changelog +-- +2.16.4 + diff --git a/net-analyzer/nload/files/nload-0.7.4-tinfo.patch b/net-analyzer/nload/files/nload-0.7.4-tinfo.patch new file mode 100644 index 000000000000..dcab6ec324f4 --- /dev/null +++ b/net-analyzer/nload/files/nload-0.7.4-tinfo.patch @@ -0,0 +1,10 @@ +--- a/configure.in ++++ b/configure.in +@@ -70,6 +70,7 @@ + esac + + dnl Checks for libraries. ++PKG_CHECK_MODULES([NCURSES],[ncurses],[LIBS="$LIBS $NCURSES_LIBS"],[AC_MSG_ERROR([ncurses was not found])]) + AC_CHECK_LIB(ncurses, initscr) + AC_CHECK_LIB(form, new_form) + diff --git a/net-analyzer/nload/metadata.xml b/net-analyzer/nload/metadata.xml new file mode 100644 index 000000000000..ac328e337a8d --- /dev/null +++ b/net-analyzer/nload/metadata.xml @@ -0,0 +1,17 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>ahippo@yandex.ru</email> + <name>Andrey Mazo</name> + </maintainer> + <maintainer type="project"> + <email>netmon@gentoo.org</email> + <name>Gentoo network monitoring and analysis project</name> + </maintainer> + <maintainer type="project"> + <email>proxy-maint@gentoo.org</email> + <name>Proxy Maintainers</name> + </maintainer> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/nload/nload-0.7.4-r1.ebuild b/net-analyzer/nload/nload-0.7.4-r1.ebuild new file mode 100644 index 000000000000..70abf3184dd5 --- /dev/null +++ b/net-analyzer/nload/nload-0.7.4-r1.ebuild @@ -0,0 +1,34 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit autotools + +DESCRIPTION="Real time network traffic monitor for the command line interface" +HOMEPAGE="http://www.roland-riegel.de/nload/index.html" +SRC_URI="http://www.roland-riegel.de/nload/${P}.tar.gz" + +LICENSE="GPL-2+" +SLOT="0" +KEYWORDS="~amd64 ~arm ~mips ~ppc ~x86" + +RDEPEND=">=sys-libs/ncurses-5.2:0=" +DEPEND="${RDEPEND}" +BDEPEND="virtual/pkgconfig" + +PATCHES=( + "${FILESDIR}"/${P}-tinfo.patch + "${FILESDIR}"/${P}-Eliminate-flicker-on-some-terminals.patch + "${FILESDIR}"/${P}-Makefile-spec-don-t-compress-man-page.patch +) + +src_prepare() { + default + eautoreconf +} + +src_configure() { + # --enable-debug means do not strip debugging symbols (default no) + econf --enable-debug +} diff --git a/net-analyzer/nload/nload-0.7.4.ebuild b/net-analyzer/nload/nload-0.7.4.ebuild new file mode 100644 index 000000000000..b8bc8eed7b25 --- /dev/null +++ b/net-analyzer/nload/nload-0.7.4.ebuild @@ -0,0 +1,29 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +inherit autotools eutils + +DESCRIPTION="console application which monitors network traffic and bandwidth usage in real time" +HOMEPAGE="http://www.roland-riegel.de/nload/index.html" +SRC_URI="http://www.roland-riegel.de/nload/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="amd64 arm ~mips ppc x86" + +RDEPEND=">=sys-libs/ncurses-5.2:0=" +DEPEND=" + ${RDEPEND} + virtual/pkgconfig +" +src_prepare() { + epatch "${FILESDIR}"/${P}-tinfo.patch + eautoreconf +} + +src_configure() { + # --enable-debug means do not strip debugging symbols (default no) + econf --enable-debug +} diff --git a/net-analyzer/nmap/Manifest b/net-analyzer/nmap/Manifest new file mode 100644 index 000000000000..e34efcfd0b5e --- /dev/null +++ b/net-analyzer/nmap/Manifest @@ -0,0 +1,2 @@ +DIST nmap-7.80.tar.bz2 10550327 BLAKE2B 513a5589f4dd72660d290cc03b8130da2c41e4620c5a82e125e4345259b8d0f6efa8bceef47d3c0d2b5b588888b716070e05105a09b0185622aed9268715ae2c SHA512 d4384d3ebf4f3abf3588eed5433f733874ecdceb9342a718dc36db19634b0cc819d73399974eb0a9a9c9dd9e5c88473e07644ec91db28b0c072552b54430be6b +DIST nmap-logo-64.png 3289 BLAKE2B 9563f57d126e6fa38dc777391c2887112836b4f5b521311bde64d5c5a04c45a3f420abba0750f776658015c0018b2afeb381c691bc8784e4f39abc78b9c2d2c7 SHA512 fb102d12aaeebc8a97543ecd653a3606e86996ad679bc26d6e6e274ad05ec3e9f92521289d1a24153c521b699e8c0cfa65d8856bb49af53ee4837268bbc6b5d3 diff --git a/net-analyzer/nmap/files/nls.m4 b/net-analyzer/nmap/files/nls.m4 new file mode 100644 index 000000000000..93df8d3b3f06 --- /dev/null +++ b/net-analyzer/nmap/files/nls.m4 @@ -0,0 +1,32 @@ +# nls.m4 serial 5 (gettext-0.18) +dnl Copyright (C) 1995-2003, 2005-2006, 2008-2014 Free Software Foundation, +dnl Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. +dnl +dnl This file can be used in projects which are not available under +dnl the GNU General Public License or the GNU Library General Public +dnl License but which still want to provide support for the GNU gettext +dnl functionality. +dnl Please note that the actual code of the GNU gettext library is covered +dnl by the GNU Library General Public License, and the rest of the GNU +dnl gettext package is covered by the GNU General Public License. +dnl They are *not* in the public domain. + +dnl Authors: +dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000. +dnl Bruno Haible <haible@clisp.cons.org>, 2000-2003. + +AC_PREREQ([2.50]) + +AC_DEFUN([AM_NLS], +[ + AC_MSG_CHECKING([whether NLS is requested]) + dnl Default is enabled NLS + AC_ARG_ENABLE([nls], + [ --disable-nls do not use Native Language Support], + USE_NLS=$enableval, USE_NLS=yes) + AC_MSG_RESULT([$USE_NLS]) + AC_SUBST([USE_NLS]) +]) diff --git a/net-analyzer/nmap/files/nmap-5.10_beta1-string.patch b/net-analyzer/nmap/files/nmap-5.10_beta1-string.patch new file mode 100644 index 000000000000..df29db3782d5 --- /dev/null +++ b/net-analyzer/nmap/files/nmap-5.10_beta1-string.patch @@ -0,0 +1,11 @@ +--- nmap-5.10BETA1/Target.h.org 2009-12-08 08:21:59.000000000 +0100 ++++ nmap-5.10BETA1/Target.h 2009-12-08 08:22:02.000000000 +0100 +@@ -99,6 +99,8 @@ + + #ifndef NOLUA + #include "nse_main.h" ++#else ++#include <string> + #endif + + #include "portreasons.h" diff --git a/net-analyzer/nmap/files/nmap-5.21-python.patch b/net-analyzer/nmap/files/nmap-5.21-python.patch new file mode 100644 index 000000000000..aa0d4f9db953 --- /dev/null +++ b/net-analyzer/nmap/files/nmap-5.21-python.patch @@ -0,0 +1,21 @@ +diff -Naurp nmap-5.21-orig/Makefile.in nmap-5.21/Makefile.in +--- nmap-5.21-orig/Makefile.in 2010-01-31 09:53:53.000000000 +0100 ++++ nmap-5.21/Makefile.in 2010-01-31 09:54:48.000000000 +0100 +@@ -253,7 +253,7 @@ build-zenmap: $(ZENMAPDIR)/setup.py $(ZE + + install-zenmap: $(ZENMAPDIR)/setup.py + $(INSTALL) -d $(DESTDIR)$(bindir) $(DESTDIR)$(mandir)/man1 +- cd $(ZENMAPDIR) && $(PYTHON) setup.py --quiet install --prefix "$(prefix)" --force $(if $(DESTDIR),--root "$(DESTDIR)") ++ cd $(ZENMAPDIR) && $(PYTHON) setup.py --quiet install --prefix "$(prefix)" --force $(if $(DESTDIR),--root "$(DESTDIR)") --no-compile + $(INSTALL) -c -m 644 docs/zenmap.1 $(DESTDIR)$(mandir)/man1/ + # Create a symlink from nmapfe to zenmap if nmapfe doesn't exist or is + # already a link. +@@ -267,7 +267,7 @@ build-ndiff: + cd $(NDIFFDIR) && $(PYTHON) setup.py build $(if $(DESTDIR),--executable "$(DEFAULT_PYTHON_PATH)") + + install-ndiff: +- cd $(NDIFFDIR) && $(PYTHON) setup.py install --prefix "$(prefix)" $(if $(DESTDIR),--root "$(DESTDIR)") ++ cd $(NDIFFDIR) && $(PYTHON) setup.py install --prefix "$(prefix)" $(if $(DESTDIR),--root "$(DESTDIR)") --no-compile + + NSE_FILES = scripts/script.db scripts/*.nse + NSE_LIB_LUA_FILES = nselib/*.lua diff --git a/net-analyzer/nmap/files/nmap-6.25-liblua-ar.patch b/net-analyzer/nmap/files/nmap-6.25-liblua-ar.patch new file mode 100644 index 000000000000..5aa9fa7f631c --- /dev/null +++ b/net-analyzer/nmap/files/nmap-6.25-liblua-ar.patch @@ -0,0 +1,20 @@ +--- a/liblua/Makefile ++++ b/liblua/Makefile +@@ -11,7 +11,7 @@ + LDFLAGS= $(SYSLDFLAGS) $(MYLDFLAGS) + LIBS= -lm $(SYSLIBS) $(MYLIBS) + +-AR= ar rcu ++AR= ar + RANLIB= ranlib + RM= rm -f + +@@ -56,7 +56,7 @@ + a: $(ALL_A) + + $(LUA_A): $(BASE_O) +- $(AR) $@ $(BASE_O) ++ $(AR) rcu $@ $(BASE_O) + $(RANLIB) $@ + + $(LUA_T): $(LUA_O) $(LUA_A) diff --git a/net-analyzer/nmap/files/nmap-6.46-uninstaller.patch b/net-analyzer/nmap/files/nmap-6.46-uninstaller.patch new file mode 100644 index 000000000000..6b43f8f5a069 --- /dev/null +++ b/net-analyzer/nmap/files/nmap-6.46-uninstaller.patch @@ -0,0 +1,19 @@ +--- a/zenmap/setup.py ++++ b/zenmap/setup.py +@@ -245,7 +245,6 @@ + self.set_perms() + self.set_modules_path() + self.fix_paths() +- self.create_uninstaller() + self.write_installed_files() + + def get_installed_files(self): +@@ -263,8 +262,6 @@ + os.path.join(self.install_data, data_dir)): + for dir in dirs: + installed_files.append(os.path.join(dirpath, dir)) +- installed_files.append( +- os.path.join(self.install_scripts, "uninstall_" + APP_NAME)) + return installed_files + + def create_uninstaller(self): diff --git a/net-analyzer/nmap/files/nmap-7.25-CXXFLAGS.patch b/net-analyzer/nmap/files/nmap-7.25-CXXFLAGS.patch new file mode 100644 index 000000000000..91caad1a6734 --- /dev/null +++ b/net-analyzer/nmap/files/nmap-7.25-CXXFLAGS.patch @@ -0,0 +1,11 @@ +--- a/Makefile.in ++++ b/Makefile.in +@@ -477,7 +477,7 @@ + ./docs/style/lua-format -i scripts/*.nse + + makefile.dep: +- $(CXX) -MM $(CPPFLAGS) $(SRCS) > $@ ++ $(CXX) -MM $(CPPFLAGS) $(CXXFLAGS) $(SRCS) > $@ + -include makefile.dep + + # These the old names of scripts that have been renamed or deleted. Any diff --git a/net-analyzer/nmap/files/nmap-7.25-libpcre.patch b/net-analyzer/nmap/files/nmap-7.25-libpcre.patch new file mode 100644 index 000000000000..9296dab7da7b --- /dev/null +++ b/net-analyzer/nmap/files/nmap-7.25-libpcre.patch @@ -0,0 +1,10 @@ +--- a/configure.ac ++++ b/configure.ac +@@ -522,7 +522,6 @@ + + # If we still don't have it, we use our own + if test $have_pcre != yes ; then +- AC_CONFIG_SUBDIRS( libpcre ) + CPPFLAGS="-I\$(top_srcdir)/$LIBPCREDIR $CPPFLAGS" + LIBPCRE_LIBS="$LIBPCREDIR/libpcre.a" + PCRE_BUILD="build-pcre" diff --git a/net-analyzer/nmap/files/nmap-7.25-no-FORTIFY_SOURCE.patch b/net-analyzer/nmap/files/nmap-7.25-no-FORTIFY_SOURCE.patch new file mode 100644 index 000000000000..85594038bf6f --- /dev/null +++ b/net-analyzer/nmap/files/nmap-7.25-no-FORTIFY_SOURCE.patch @@ -0,0 +1,77 @@ +--- a/nbase/Makefile.in ++++ b/nbase/Makefile.in +@@ -12,7 +12,7 @@ + CCOPT = + DEFS = @DEFS@ + # With GCC, add extra security checks to source code. +-DEFS += -D_FORTIFY_SOURCE=2 ++DEFS += + CPPFLAGS = @CPPFLAGS@ + CFLAGS = @CFLAGS@ $(CCOPT) $(GLIB_CFLAGS) $(DEFS) $(INCLS) + STATIC = +--- a/ncat/Makefile.in ++++ b/ncat/Makefile.in +@@ -53,7 +53,7 @@ + LIBS = @LIBS@ + DEFS = @DEFS@ -DNCAT_DATADIR="\"$(pkgdatadir)\"" + # With GCC, add extra security checks to source code. +-DEFS += -D_FORTIFY_SOURCE=2 ++DEFS += + INCLS = -I. -I.. -I../nsock/include/ -I$(NBASEDIR) + RM = rm -f + STRIP = @STRIP@ +--- a/nsock/src/Makefile.in ++++ b/nsock/src/Makefile.in +@@ -13,7 +13,7 @@ + CCOPT = + DEFS = @DEFS@ -DNSOCK_VERSION=\"$(NSOCK_VERSION)\" + # With GCC, add extra security checks to source code. +-DEFS += -D_FORTIFY_SOURCE=2 ++DEFS += + INCLS = -I../include + CFLAGS = @CFLAGS@ $(CCOPT) + # CFLAGS = -g -Wall $(DEFS) $(INCLS) +--- a/libnetutil/Makefile.in ++++ b/libnetutil/Makefile.in +@@ -5,7 +5,7 @@ + CXXFLAGS = @CXXFLAGS@ + CPPFLAGS = @CPPFLAGS@ $(DEFS) + DEFS = @DEFS@ +-DEFS += -D_FORTIFY_SOURCE=2 ++DEFS += + AR = ar + RANLIB = @RANLIB@ + +--- a/Makefile.in ++++ b/Makefile.in +@@ -41,7 +41,7 @@ + # http://gcc.gnu.org/ml/gcc-patches/2004-09/msg02055.html + # Level 1 only makes changes that don't affect "conforming" programs, + # while level 2 enforces additional restrictions. +-DEFS += -D_FORTIFY_SOURCE=2 ++DEFS += + # For mtrace debugging -- see MTRACE define in main.cc for instructions + # Should only be enabled during debugging and not in any real release. + # DEFS += -DMTRACE=1 +--- a/nping/Makefile.in ++++ b/nping/Makefile.in +@@ -38,7 +38,7 @@ + # http://gcc.gnu.org/ml/gcc-patches/2004-09/msg02055.html + # Level 1 only makes changes that don't affect "conforming" programs, + # while level 2 enforces additional restrictions. +-DEFS += -D_FORTIFY_SOURCE=2 ++DEFS += + # For mtrace debugging -- see MTRACE define in main.cc for instructions + # Should only be enabled during debugging and not in any real release. + # DEFS += -DMTRACE=1 +--- a/nmap-update/Makefile.in ++++ b/nmap-update/Makefile.in +@@ -12,7 +12,7 @@ + LDFLAGS = @LDFLAGS@ + MAC_FLAGS = + LIBS = @LIBS@ $(NBASELIB) $(MAC_FLAGS) +-DEFS = @DEFS@ -D_FORTIFY_SOURCE=2 ++DEFS = @DEFS@ + APR_LIBS = @APR_LIBS@ + SVN_LIBS = @SVN_LIBS@ + diff --git a/net-analyzer/nmap/files/nmap-7.31-libnl.patch b/net-analyzer/nmap/files/nmap-7.31-libnl.patch new file mode 100644 index 000000000000..c16d8291ea3b --- /dev/null +++ b/net-analyzer/nmap/files/nmap-7.31-libnl.patch @@ -0,0 +1,15 @@ +nping does not call anything nl_* related so it should not link against libnl (bug #529244) +Patching configure.ac would be best but eautoreconf does not handle the subdirs very well. + +--- a/nping/configure.ac ++++ b/nping/configure.ac +@@ -114,9 +114,6 @@ + # OpenSSL and NSE C modules can require dlopen + AC_SEARCH_LIBS(dlopen, dl) + +-# libpcap can require libnl +-AC_SEARCH_LIBS(nl_handle_alloc, nl) +- + # We test whether they specified openssl desires explicitly + use_openssl="yes" + specialssldir="" diff --git a/net-analyzer/nmap/files/nmap-7.80-ac-config-subdirs.patch b/net-analyzer/nmap/files/nmap-7.80-ac-config-subdirs.patch new file mode 100644 index 000000000000..583f7f1d1aa3 --- /dev/null +++ b/net-analyzer/nmap/files/nmap-7.80-ac-config-subdirs.patch @@ -0,0 +1,26 @@ +--- a/configure.ac ++++ b/configure.ac +@@ -468,7 +468,6 @@ + fi + + if test $have_libpcap != yes; then +- AC_CONFIG_SUBDIRS(libpcap) + if test "${LIBPCAP_INC+set}" = "set"; then + CPPFLAGS="$CPPFLAGS -I$LIBPCAP_INC" + else +@@ -611,7 +610,6 @@ + fi + + if test $have_libz != yes; then +- AC_CONFIG_SUBDIRS(libz) + # TODO: This doesn't work because libssh2's configure script is looking for + # already-built libs. Giving up for now: build libz first or install + # headers/libs on your own if you want compression support for SSH. +@@ -697,7 +695,6 @@ + # If we still don't have it, we use our own + if test $have_libssh2 != yes; then + have_libssh2=yes +- AC_CONFIG_SUBDIRS(libssh2) + CPPFLAGS="-I\$(top_srcdir)/$LIBSSH2DIR/include $CPPFLAGS" + LIBSSH2_LIBS="$LIBSSH2DIR/lib/libssh2.a" + LIBSSH2_BUILD="build-libssh2" diff --git a/net-analyzer/nmap/files/nmap-9999-netutil-else.patch b/net-analyzer/nmap/files/nmap-9999-netutil-else.patch new file mode 100644 index 000000000000..c9b3350d9865 --- /dev/null +++ b/net-analyzer/nmap/files/nmap-9999-netutil-else.patch @@ -0,0 +1,11 @@ +--- a/libnetutil/netutil.cc ++++ b/libnetutil/netutil.cc +@@ -2571,7 +2571,7 @@ const char *ippackethdrinfo(const u8 *packet, u32 len, int detail) { + + /* CASE 4: where we (finally!) have a full 20 byte TCP header so we can + * safely print all fields */ +- else { /* if (datalen >= 20) */ ++ else if (datalen >= 20) { + + /* TCP Flags */ + p = tflags; diff --git a/net-analyzer/nmap/metadata.xml b/net-analyzer/nmap/metadata.xml new file mode 100644 index 000000000000..c886d4e36a1e --- /dev/null +++ b/net-analyzer/nmap/metadata.xml @@ -0,0 +1,17 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>netmon@gentoo.org</email> + <name>Gentoo network monitoring and analysis project</name> + </maintainer> + <use> + <flag name="libssh2">Enable SSH support through <pkg>net-libs/libssh2</pkg></flag> + <flag name="ncat">Install the ncat utility</flag> + <flag name="nmap-update">Install nmap-update, which uses <pkg>dev-vcs/subversion</pkg> to update nmap scripts in your home directory</flag> + <flag name="nping">Install the nping utility</flag> + <flag name="nse">Include support for the Nmap Scripting Engine (NSE)</flag> + <flag name="system-lua">Use <pkg>dev-lang/lua</pkg> instead of the bundled liblua</flag> + </use> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/nmap/nmap-7.80-r1.ebuild b/net-analyzer/nmap/nmap-7.80-r1.ebuild new file mode 100644 index 000000000000..c31710c9585a --- /dev/null +++ b/net-analyzer/nmap/nmap-7.80-r1.ebuild @@ -0,0 +1,135 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +MY_P=${P/_beta/BETA} +inherit autotools desktop flag-o-matic toolchain-funcs user + +DESCRIPTION="A utility for network discovery and security auditing" +HOMEPAGE="https://nmap.org/" +SRC_URI=" + https://nmap.org/dist/${MY_P}.tar.bz2 + https://dev.gentoo.org/~jer/nmap-logo-64.png +" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha amd64 arm ~arm64 hppa ~ia64 ~mips ppc ppc64 ~s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos" +IUSE="ipv6 libressl libssh2 ncat nmap-update nping +nse ssl system-lua" +REQUIRED_USE="system-lua? ( nse )" + +RDEPEND=" + dev-libs/liblinear:= + dev-libs/libpcre + net-libs/libpcap + libssh2? ( + net-libs/libssh2[zlib] + sys-libs/zlib + ) + nmap-update? ( + dev-libs/apr + dev-vcs/subversion + ) + nse? ( sys-libs/zlib ) + ssl? ( + !libressl? ( dev-libs/openssl:0= ) + libressl? ( dev-libs/libressl:= ) + ) + system-lua? ( >=dev-lang/lua-5.2:*[deprecated] ) +" +DEPEND="${RDEPEND}" + +PATCHES=( + "${FILESDIR}"/${PN}-5.10_beta1-string.patch + "${FILESDIR}"/${PN}-5.21-python.patch + "${FILESDIR}"/${PN}-6.46-uninstaller.patch + "${FILESDIR}"/${PN}-6.25-liblua-ar.patch + "${FILESDIR}"/${PN}-7.25-no-FORTIFY_SOURCE.patch + "${FILESDIR}"/${PN}-7.25-CXXFLAGS.patch + "${FILESDIR}"/${PN}-7.25-libpcre.patch + "${FILESDIR}"/${PN}-7.31-libnl.patch + "${FILESDIR}"/${PN}-7.80-ac-config-subdirs.patch +) +S="${WORKDIR}/${MY_P}" + +src_prepare() { + rm -r liblinear/ libpcap/ libpcre/ libssh2/ libz/ || die + + cat "${FILESDIR}"/nls.m4 >> "${S}"/acinclude.m4 || die + + default + + sed -i \ + -e '/^ALL_LINGUAS =/{s|$| id|g;s|jp|ja|g}' \ + Makefile.in || die + # Fix desktop files wrt bug #432714 + sed -i \ + -e 's|^Categories=.*|Categories=Network;System;Security;|g' \ + zenmap/install_scripts/unix/zenmap-root.desktop \ + zenmap/install_scripts/unix/zenmap.desktop || die + + cp libdnet-stripped/include/config.h.in{,.nmap-orig} || die + + eautoreconf + + if [[ ${CHOST} == *-darwin* ]] ; then + # we need the original for a Darwin-specific fix, bug #604432 + mv libdnet-stripped/include/config.h.in{.nmap-orig,} || die + fi +} + +src_configure() { + # The bundled libdnet is incompatible with the version available in the + # tree, so we cannot use the system library here. + econf \ + $(use_enable ipv6) \ + $(use_with libssh2) \ + $(use_with ncat) \ + --without-ndiff \ + $(use_with nmap-update) \ + $(use_with nping) \ + $(use_with ssl openssl) \ + --without-zenmap \ + $(usex libssh2 --with-zlib) \ + $(usex nse --with-zlib) \ + $(usex nse --with-liblua=$(usex system-lua /usr included '' '') --without-liblua) \ + --cache-file="${S}"/config.cache \ + --with-libdnet=included \ + --with-pcre=/usr + # Commented out because configure does weird things + # --with-liblinear=/usr \ +} + +src_compile() { + local directory + for directory in . libnetutil nsock/src \ + $(usex ncat ncat '') \ + $(usex nmap-update nmap-update '') \ + $(usex nping nping '') + do + emake -C "${directory}" makefile.dep + done + + emake \ + AR=$(tc-getAR) \ + RANLIB=$(tc-getRANLIB) +} + +src_install() { + LC_ALL=C emake -j1 \ + DESTDIR="${D}" \ + STRIP=: \ + nmapdatadir="${EPREFIX}"/usr/share/nmap \ + install + if use nmap-update;then + LC_ALL=C emake -j1 \ + -C nmap-update \ + DESTDIR="${D}" \ + STRIP=: \ + nmapdatadir="${EPREFIX}"/usr/share/nmap \ + install + fi + + dodoc CHANGELOG HACKING docs/README docs/*.txt +} diff --git a/net-analyzer/nmap/nmap-9999.ebuild b/net-analyzer/nmap/nmap-9999.ebuild new file mode 100644 index 000000000000..f45ed83d38ad --- /dev/null +++ b/net-analyzer/nmap/nmap-9999.ebuild @@ -0,0 +1,134 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +MY_P=${P/_beta/BETA} +inherit autotools desktop flag-o-matic git-r3 toolchain-funcs user + +DESCRIPTION="A utility for network discovery and security auditing" +HOMEPAGE="https://nmap.org/" + +EGIT_REPO_URI="https://github.com/nmap/nmap" +SRC_URI="https://dev.gentoo.org/~jer/nmap-logo-64.png" + +LICENSE="GPL-2" +SLOT="0" +IUSE="ipv6 libressl libssh2 ncat nmap-update nping +nse ssl system-lua" +REQUIRED_USE="system-lua? ( nse )" + +RDEPEND=" + dev-libs/liblinear:= + dev-libs/libpcre + net-libs/libpcap + libssh2? ( + net-libs/libssh2[zlib] + sys-libs/zlib + ) + nmap-update? ( + dev-libs/apr + dev-vcs/subversion + ) + nse? ( sys-libs/zlib ) + ssl? ( + !libressl? ( dev-libs/openssl:0= ) + libressl? ( dev-libs/libressl:= ) + ) + system-lua? ( >=dev-lang/lua-5.2:*[deprecated] ) +" +DEPEND="${RDEPEND}" + +PATCHES=( + "${FILESDIR}"/${PN}-5.10_beta1-string.patch + "${FILESDIR}"/${PN}-5.21-python.patch + "${FILESDIR}"/${PN}-6.46-uninstaller.patch + "${FILESDIR}"/${PN}-6.25-liblua-ar.patch + "${FILESDIR}"/${PN}-7.25-no-FORTIFY_SOURCE.patch + "${FILESDIR}"/${PN}-7.25-CXXFLAGS.patch + "${FILESDIR}"/${PN}-7.25-libpcre.patch + "${FILESDIR}"/${PN}-7.31-libnl.patch + "${FILESDIR}"/${PN}-7.80-ac-config-subdirs.patch + "${FILESDIR}"/${PN}-9999-netutil-else.patch +) +S="${WORKDIR}/${MY_P}" + +src_prepare() { + rm -r liblinear/ libpcap/ libpcre/ libssh2/ libz/ || die + + cat "${FILESDIR}"/nls.m4 >> "${S}"/acinclude.m4 || die + + default + + sed -i \ + -e '/^ALL_LINGUAS =/{s|$| id|g;s|jp|ja|g}' \ + Makefile.in || die + # Fix desktop files wrt bug #432714 + sed -i \ + -e 's|^Categories=.*|Categories=Network;System;Security;|g' \ + zenmap/install_scripts/unix/zenmap-root.desktop \ + zenmap/install_scripts/unix/zenmap.desktop || die + + cp libdnet-stripped/include/config.h.in{,.nmap-orig} || die + + eautoreconf + + if [[ ${CHOST} == *-darwin* ]] ; then + # we need the original for a Darwin-specific fix, bug #604432 + mv libdnet-stripped/include/config.h.in{.nmap-orig,} || die + fi +} + +src_configure() { + # The bundled libdnet is incompatible with the version available in the + # tree, so we cannot use the system library here. + econf \ + $(use_enable ipv6) \ + $(use_with libssh2) \ + $(use_with ncat) \ + --without-ndiff \ + $(use_with nmap-update) \ + $(use_with nping) \ + $(use_with ssl openssl) \ + --without-zenmap \ + $(usex libssh2 --with-zlib) \ + $(usex nse --with-zlib) \ + $(usex nse --with-liblua=$(usex system-lua /usr included '' '') --without-liblua) \ + --cache-file="${S}"/config.cache \ + --with-libdnet=included \ + --with-pcre=/usr + # Commented out because configure does weird things + # --with-liblinear=/usr \ +} + +src_compile() { + local directory + for directory in . libnetutil nsock/src \ + $(usex ncat ncat '') \ + $(usex nmap-update nmap-update '') \ + $(usex nping nping '') + do + emake -C "${directory}" makefile.dep + done + + emake \ + AR=$(tc-getAR) \ + RANLIB=$(tc-getRANLIB) +} + +src_install() { + LC_ALL=C emake -j1 \ + DESTDIR="${D}" \ + STRIP=: \ + nmapdatadir="${EPREFIX}"/usr/share/nmap \ + install + if use nmap-update;then + LC_ALL=C emake -j1 \ + -C nmap-update \ + DESTDIR="${D}" \ + STRIP=: \ + nmapdatadir="${EPREFIX}"/usr/share/nmap \ + install + fi + + dodoc CHANGELOG HACKING docs/README docs/*.txt +} diff --git a/net-analyzer/nmapsi/Manifest b/net-analyzer/nmapsi/Manifest new file mode 100644 index 000000000000..75384d6b253d --- /dev/null +++ b/net-analyzer/nmapsi/Manifest @@ -0,0 +1 @@ +DIST nmapsi-0.5_alpha2.tar.gz 3547174 BLAKE2B a02d60c9be2d99e46104a81502bc98a0be9892a1cd1efbb5768b420a4275ea235e89c0e331797ec4ce733631cb763f6299a7d6079055bbaec17674107c4cf768 SHA512 29f6dd383808b253fa50fe0ca25c5189e106e79a0c6aac9351b8969eec2fd0aca7a329c49acf07c04ccd079a2ae66ad0b218a066762abe21165f1c25622a50f2 diff --git a/net-analyzer/nmapsi/metadata.xml b/net-analyzer/nmapsi/metadata.xml new file mode 100644 index 000000000000..75881b5de6a7 --- /dev/null +++ b/net-analyzer/nmapsi/metadata.xml @@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>qt@gentoo.org</email> + <name>Gentoo Qt Project</name> + </maintainer> + <upstream> + <remote-id type="github">nmapsi4/nmapsi4</remote-id> + <remote-id type="sourceforge">nmapsi</remote-id> + </upstream> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/nmapsi/nmapsi-0.5_alpha2.ebuild b/net-analyzer/nmapsi/nmapsi-0.5_alpha2.ebuild new file mode 100644 index 000000000000..07d77fb3b796 --- /dev/null +++ b/net-analyzer/nmapsi/nmapsi-0.5_alpha2.ebuild @@ -0,0 +1,37 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit cmake + +DESCRIPTION="Qt frontend to nmap" +HOMEPAGE="https://github.com/nmapsi4/nmapsi4" +SRC_URI="https://github.com/nmapsi4/nmapsi4/archive/v${PV/_/-}.tar.gz -> ${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="" + +BDEPEND=" + dev-qt/linguist-tools:5 +" +DEPEND=" + dev-qt/qtcore:5 + dev-qt/qtdbus:5 + dev-qt/qtdeclarative:5 + dev-qt/qtgui:5 + dev-qt/qtnetwork:5 + dev-qt/qtscript:5 + dev-qt/qtwebengine:5[widgets] + dev-qt/qtwidgets:5 +" +RDEPEND="${DEPEND} + net-analyzer/nmap + net-dns/bind-tools +" + +S="${WORKDIR}/${PN}4-${PV/_/-}" + +DOCS=( AUTHORS HACKING README.md TODO Translation ) diff --git a/net-analyzer/nmbscan/Manifest b/net-analyzer/nmbscan/Manifest new file mode 100644 index 000000000000..ccce5841d03e --- /dev/null +++ b/net-analyzer/nmbscan/Manifest @@ -0,0 +1 @@ +DIST nmbscan-1.2.5.tar.gz 44749 BLAKE2B be49afa46c6ed1533f3e3d7b5c6fbe54b83802385ed9b670f1cdc0105eae99135000be5e98a693ad2adca54f9948ebacc8cd4fc677828a61a5fa85667d584fcd SHA512 37030c6759cc8b257356274b54ec7474e49ddc523be20180c509064f9238da3350f0f0e73e84f2e89201405e93a350a7a7cdc24ef890e638b62648ee2fc4feb9 diff --git a/net-analyzer/nmbscan/files/nmbscan-1.2.5-head.diff b/net-analyzer/nmbscan/files/nmbscan-1.2.5-head.diff new file mode 100644 index 000000000000..f258aae379d4 --- /dev/null +++ b/net-analyzer/nmbscan/files/nmbscan-1.2.5-head.diff @@ -0,0 +1,11 @@ +--- a/nmbscan 2005-09-21 22:10:05.223491664 +0200 ++++ b/nmbscan 2005-09-21 22:11:59.215162296 +0200 +@@ -402,7 +402,7 @@ + + function get_server_and_os_by_ip + { +- V=$(smbclient -L ${2:-$1} -I $1 -U % 2>&1 | grep '^Domain'| sed 's#.*OS=\[\(.*\)\].*Server=\[\(.*\)\].*#\2/\1#' | head -1) ++ V=$(smbclient -L ${2:-$1} -I $1 -U % 2>&1 | grep '^Domain'| sed 's#.*OS=\[\(.*\)\].*Server=\[\(.*\)\].*#\2/\1#' | head -n 1) + echo ${V:--/-} + } + diff --git a/net-analyzer/nmbscan/metadata.xml b/net-analyzer/nmbscan/metadata.xml new file mode 100644 index 000000000000..1d435278730e --- /dev/null +++ b/net-analyzer/nmbscan/metadata.xml @@ -0,0 +1,12 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<!-- maintainer-needed --> +<longdescription> +nmbscan scans the shares of a SMB network, using the NMB and SMB protocols. +It is useful for acquiring information on a local area network for such purposes as security auditing. +It can obtain such information as NMB/SMB/Windows hostname, IP address, IP hostname, ethernet MAC address, Windows username, NMB/SMB/Windows domain name, and master browser. +It can discover all the NMB/SMB/Windows hosts on a local area network by using the hosts lists maintained by master browsers. +</longdescription> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/nmbscan/nmbscan-1.2.5-r1.ebuild b/net-analyzer/nmbscan/nmbscan-1.2.5-r1.ebuild new file mode 100644 index 000000000000..d47b82ff6739 --- /dev/null +++ b/net-analyzer/nmbscan/nmbscan-1.2.5-r1.ebuild @@ -0,0 +1,27 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +DESCRIPTION="Scans the shares of a SMB/NetBIOS network" +HOMEPAGE="http://nmbscan.g76r.eu/" +SRC_URI="http://nmbscan.g76r.eu/down/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha amd64 arm ~hppa ~ia64 ~mips ~ppc ppc64 s390 ~sparc x86" + +RDEPEND="net-dns/bind-tools + net-fs/samba + net-misc/iputils + sys-apps/net-tools + virtual/awk" + +S=${WORKDIR} +PATCHES=( "${FILESDIR}"/${P}-head.diff ) + +src_compile() { :; } + +src_install() { + dobin nmbscan +} diff --git a/net-analyzer/nrpe/Manifest b/net-analyzer/nrpe/Manifest new file mode 100644 index 000000000000..4fab8d8b80df --- /dev/null +++ b/net-analyzer/nrpe/Manifest @@ -0,0 +1,2 @@ +DIST nrpe-4.0.0.tar.gz 523846 BLAKE2B 850a420f0550e1dfe6b0ea98a9d9cafec0ec583c115be89b3ba8e88a309c40226c87f6ae880d12c582822e492c5991e3d2444b68f5644750fc74ad75596c96fd SHA512 8773102f28f3e7e96f3637e77489eb12ffe88fe839abfe3f150d2eb3d2efe05f7f812ab4d52a64cbd8d0a5e491aed93d5300b7ce9a8dd072b3a00d885b91276b +DIST nrpe-4.0.2.tar.gz 524146 BLAKE2B dc100579420eeccaaa2a913f56c76b86b6ebdce8d1afdddcc428bfd4a8c12ad19050ab0395e7a109d4e8b43ca7d6a11e13ec4a4250a91483e37725c184382ca2 SHA512 4d7cf6abc974bc79df54afc42644418e3f086a279c8c17d0fd104f19e3c21c0f3dae4fb4268dd134446ff9fe505159b0446372c5cac71cfe03a97479ed41c09b diff --git a/net-analyzer/nrpe/files/nrpe-3.2.1-eliminate-systemd-pid.patch b/net-analyzer/nrpe/files/nrpe-3.2.1-eliminate-systemd-pid.patch new file mode 100644 index 000000000000..6ee520dfa69d --- /dev/null +++ b/net-analyzer/nrpe/files/nrpe-3.2.1-eliminate-systemd-pid.patch @@ -0,0 +1,38 @@ +From c4ad513294e8db25ebaf25127948cce37c13e1b2 Mon Sep 17 00:00:00 2001 +From: Michael Orlitzky <michael@orlitzky.com> +Date: Sat, 29 Sep 2018 20:23:53 -0400 +Subject: [PATCH 1/1] startup/default-service.in: remove PIDFile and + ExecStopPost lines. + +The nrpe systemd service is a "simple" service, which means that it +runs in the foreground and doesn't need any PID file tracking to begin +with. The tmpfiles.d entry associated with the PID file is causing +problems in Gentoo bug 648992, and so as a prerequisite for deleting +it, this commit eliminates the PID file. + +Bug: https://bugs.gentoo.org/648992 +Bug: https://github.com/NagiosEnterprises/nrpe/issues/188 +--- + startup/default-service.in | 2 -- + 1 file changed, 2 deletions(-) + +diff --git a/startup/default-service.in b/startup/default-service.in +index b6c6063..110a0cd 100644 +--- a/startup/default-service.in ++++ b/startup/default-service.in +@@ -11,12 +11,10 @@ WantedBy=multi-user.target + [Service] + Type=simple + Restart=on-abort +-PIDFile=@piddir@/nrpe.pid + RuntimeDirectory=nrpe + RuntimeDirectoryMode=0755 + ExecStart=@sbindir@/nrpe -c @pkgsysconfdir@/nrpe.cfg -f + ExecReload=/bin/kill -HUP $MAINPID +-ExecStopPost=/bin/rm -f @piddir@/nrpe.pid + TimeoutStopSec=60 + User=@nrpe_user@ + Group=@nrpe_group@ +-- +2.16.4 + diff --git a/net-analyzer/nrpe/files/nrpe.xinetd.2 b/net-analyzer/nrpe/files/nrpe.xinetd.2 new file mode 100644 index 000000000000..dd0331a88149 --- /dev/null +++ b/net-analyzer/nrpe/files/nrpe.xinetd.2 @@ -0,0 +1,11 @@ +service nrpe { + socket_type = stream + protocol = tcp + wait = no + user = nagios + group = nagios + server = /usr/libexec/nrpe + server_args = -c /etc/nagios/nrpe.cfg --inetd +# only_from = 127.0.0.1 + disabled = yes +} diff --git a/net-analyzer/nrpe/metadata.xml b/net-analyzer/nrpe/metadata.xml new file mode 100644 index 000000000000..4eebb7a650c1 --- /dev/null +++ b/net-analyzer/nrpe/metadata.xml @@ -0,0 +1,23 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>sysadmin@gentoo.org</email> + <name>Gentoo Sysadmin Project</name> + </maintainer> + <longdescription> + A daemon for allowing Nagios to connect directly to servers and + execute commands defined in a centralized configuration file. + </longdescription> + <use> + <flag name="command-args"> + Build support for specifying the command-line arguments from the + Nagios/Icinga master. Make sure you understand the implications + of this flag as it can be a security risk. + </flag> + </use> + <upstream> + <remote-id type="sourceforge">nagios</remote-id> + </upstream> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/nrpe/nrpe-4.0.0.ebuild b/net-analyzer/nrpe/nrpe-4.0.0.ebuild new file mode 100644 index 000000000000..d1e218e2cd8a --- /dev/null +++ b/net-analyzer/nrpe/nrpe-4.0.0.ebuild @@ -0,0 +1,93 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +inherit systemd + +DESCRIPTION="Nagios Remote Plugin Executor" +HOMEPAGE="https://github.com/NagiosEnterprises/nrpe" +SRC_URI="https://github.com/NagiosEnterprises/nrpe/releases/download/${P}/${P}.tar.gz" + +LICENSE="GPL-2+" +SLOT="0" +KEYWORDS="~alpha amd64 ~hppa ppc ppc64 sparc x86" +IUSE="command-args libressl selinux ssl" + +DEPEND="acct-group/nagios + acct-user/nagios + sys-apps/tcp-wrappers + ssl? ( + !libressl? ( dev-libs/openssl:0= ) + libressl? ( dev-libs/libressl:0= ) + )" +RDEPEND="${DEPEND} + || ( net-analyzer/nagios-plugins net-analyzer/monitoring-plugins ) + selinux? ( sec-policy/selinux-nagios )" + +PATCHES=( "${FILESDIR}/nrpe-3.2.1-eliminate-systemd-pid.patch" ) + +src_configure() { + # The configure script tries to detect what OS, distribution, and + # init system you're running and changes the build/install process + # depending on what it comes up with. We specify fixed values + # because we don't want it guessing, for example, whether or not + # to install the tmpfiles.d entry based on whether or not systemd + # is currently running (OpenRC uses them too). + # + # Note: upstream defaults to using "nagios" as the default NRPE + # user and group. I have a feeling that this isn't quite correct + # on a system where "nagios" is also the user running the nagios + # server daemon. In the future, it would be nice if someone who + # actually uses NRPE could test with an unprivileged "nrpe" as + # the user and group. + econf \ + --libexecdir=/usr/$(get_libdir)/nagios/plugins \ + --localstatedir=/var/lib/nagios \ + --sysconfdir=/etc/nagios \ + --with-nrpe-user=nagios \ + --with-nrpe-group=nagios \ + --with-piddir=/run \ + --with-opsys=unknown \ + --with-dist-type=unknown \ + --with-init-type=unknown \ + --with-inetd-type=unknown \ + $(use_enable command-args) \ + $(use_enable ssl) +} + +src_compile() { + emake all +} + +src_install() { + default + + dodoc CHANGELOG.md SECURITY.md + insinto /etc/nagios + newins sample-config/nrpe.cfg nrpe.cfg + fowners root:nagios /etc/nagios/nrpe.cfg + fperms 0640 /etc/nagios/nrpe.cfg + + newinitd "startup/openrc-init" nrpe + newconfd "startup/openrc-conf" nrpe + systemd_newunit "startup/default-service" "${PN}.service" + + insinto /etc/xinetd.d/ + newins "${FILESDIR}/nrpe.xinetd.2" nrpe + + rm "${D}/usr/bin/nrpe-uninstall" || die 'failed to remove uninstall tool' +} + +pkg_postinst() { + elog 'Some users have reported incompatibilities between nrpe-2.x and' + elog 'nrpe-3.x. We recommend that you use the same major version for' + elog 'both your server and clients.' + + if use command-args ; then + ewarn '' + ewarn 'You have enabled command-args for NRPE. That lets clients' + ewarn 'supply arguments to the commands that are run, and IS A' + ewarn 'SECURITY RISK!' + ewarn'' + fi +} diff --git a/net-analyzer/nrpe/nrpe-4.0.2.ebuild b/net-analyzer/nrpe/nrpe-4.0.2.ebuild new file mode 100644 index 000000000000..73205353081b --- /dev/null +++ b/net-analyzer/nrpe/nrpe-4.0.2.ebuild @@ -0,0 +1,94 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +inherit systemd + +DESCRIPTION="Nagios Remote Plugin Executor" +HOMEPAGE="https://github.com/NagiosEnterprises/nrpe" +SRC_URI="https://github.com/NagiosEnterprises/nrpe/releases/download/${P}/${P}.tar.gz" + +LICENSE="GPL-2+" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~hppa ~ppc ~ppc64 ~sparc ~x86" +IUSE="command-args libressl selinux ssl" + +DEPEND="acct-group/nagios + acct-user/nagios + sys-apps/tcp-wrappers + ssl? ( + !libressl? ( dev-libs/openssl:0= ) + libressl? ( dev-libs/libressl:0= ) + )" +RDEPEND="${DEPEND} + || ( net-analyzer/nagios-plugins net-analyzer/monitoring-plugins ) + selinux? ( sec-policy/selinux-nagios )" + +PATCHES=( "${FILESDIR}/nrpe-3.2.1-eliminate-systemd-pid.patch" ) + +src_configure() { + # The configure script tries to detect what OS, distribution, and + # init system you're running and changes the build/install process + # depending on what it comes up with. We specify fixed values + # because we don't want it guessing, for example, whether or not + # to install the tmpfiles.d entry based on whether or not systemd + # is currently running (OpenRC uses them too). + # + # Note: upstream defaults to using "nagios" as the default NRPE + # user and group. I have a feeling that this isn't quite correct + # on a system where "nagios" is also the user running the nagios + # server daemon. In the future, it would be nice if someone who + # actually uses NRPE could test with an unprivileged "nrpe" as + # the user and group. + econf \ + --libexecdir=/usr/$(get_libdir)/nagios/plugins \ + --localstatedir=/var/lib/nagios \ + --sysconfdir=/etc/nagios \ + --with-nrpe-user=nagios \ + --with-nrpe-group=nagios \ + --with-piddir=/run \ + --with-opsys=unknown \ + --with-dist-type=unknown \ + --with-init-type=unknown \ + --with-inetd-type=unknown \ + $(use_enable command-args) \ + $(use_enable ssl) +} + +src_compile() { + emake all +} + +src_install() { + default + + dodoc CHANGELOG.md SECURITY.md + insinto /etc/nagios + newins sample-config/nrpe.cfg nrpe.cfg + fowners root:nagios /etc/nagios/nrpe.cfg + fperms 0640 /etc/nagios/nrpe.cfg + + newinitd "startup/openrc-init" nrpe + newconfd "startup/openrc-conf" nrpe + systemd_newunit "startup/default-service" "${PN}.service" + + insinto /etc/xinetd.d/ + newins "${FILESDIR}/nrpe.xinetd.2" nrpe + + rm "${ED}/usr/bin/nrpe-uninstall" || die 'failed to remove uninstall tool' + rm -r "${ED}/run" || die 'failed to remove /run' +} + +pkg_postinst() { + elog 'Some users have reported incompatibilities between nrpe-2.x and' + elog 'nrpe-3.x. We recommend that you use the same major version for' + elog 'both your server and clients.' + + if use command-args ; then + ewarn '' + ewarn 'You have enabled command-args for NRPE. That lets clients' + ewarn 'supply arguments to the commands that are run, and IS A' + ewarn 'SECURITY RISK!' + ewarn'' + fi +} diff --git a/net-analyzer/nsat/Manifest b/net-analyzer/nsat/Manifest new file mode 100644 index 000000000000..2cced7871b22 --- /dev/null +++ b/net-analyzer/nsat/Manifest @@ -0,0 +1 @@ +DIST nsat-1.5.tgz 410603 BLAKE2B 083ac2879afae87d1282bb643d0988b2f858f9c934fe7a6e24407c0f5cf90ceba7be17aeeae8e7cb9d0f7a31cce171fed6382351ea8413b13d3e4343339f0c9c SHA512 1a5b8e88f7bcacdbe1144a719a2e446c0ea025ad4e5f8c79ccb939083308cd2c1b2c1f3d7ab3b791924d5855994cbc3fded95aa36df23c12fd76fc20341a87d0 diff --git a/net-analyzer/nsat/files/nsat-1.5-amd64-compat.patch b/net-analyzer/nsat/files/nsat-1.5-amd64-compat.patch new file mode 100644 index 000000000000..883ad26cdfaf --- /dev/null +++ b/net-analyzer/nsat/files/nsat-1.5-amd64-compat.patch @@ -0,0 +1,33 @@ +--- a/src/mod/xp_icmp_echo.c ++++ b/src/mod/xp_icmp_echo.c +@@ -90,7 +90,7 @@ + fprintf(stderr,"[%d bytes] sent, waiting for reponse.\n", res); + #endif + +- recv_pack = read_icmp(&res, ICMP_ECHOREPLY, -1); ++ recv_pack = read_icmp((ssize_t *)&res, ICMP_ECHOREPLY, -1); + + if (recv_pack == NULL || (unsigned)res < sizeof(ip) + 8) { + #ifdef EBUG +--- a/src/mod/xp_icmp_infr.c ++++ b/src/mod/xp_icmp_infr.c +@@ -83,7 +83,7 @@ + fprintf(stderr,"[%d bytes] sent, waiting for reponse.\n", res); + #endif + +- recv_pack = read_icmp(&res, ICMP_IREQREPLY, -1); ++ recv_pack = read_icmp((ssize_t *)&res, ICMP_IREQREPLY, -1); + + if (recv_pack == NULL || (unsigned)res < sizeof(ip) + 8) { + #ifdef EBUG +--- a/src/mod/xp_udp_probe.c ++++ b/src/mod/xp_udp_probe.c +@@ -92,7 +92,7 @@ + #ifdef EBUG + fprintf(stderr,"[%d bytes] sent, waiting for reponse.\n", res); + #endif +- recv_pack = read_icmp(&res, ICMP_UNREACH, -1); ++ recv_pack = read_icmp((ssize_t *)&res, ICMP_UNREACH, -1); + + if (recv_pack == NULL || (unsigned)res < sizeof(ip) + 8) { + #ifdef EBUG diff --git a/net-analyzer/nsat/files/nsat-1.5-configure.patch b/net-analyzer/nsat/files/nsat-1.5-configure.patch new file mode 100644 index 000000000000..d1bc1f95e6bb --- /dev/null +++ b/net-analyzer/nsat/files/nsat-1.5-configure.patch @@ -0,0 +1,25 @@ +--- a/configure.in ++++ b/configure.in +@@ -15,7 +15,6 @@ + else + AC_MSG_RESULT(crappy :P) + fi +- LEETCC=$ac_cv_prog_gcc; + AC_PROG_CXX + AC_PROG_INSTALL + AC_PROG_MAKE_SET +@@ -45,11 +44,11 @@ + if test $LEETCC = yes; then + CCOPTS='-Wall -O6 -funroll-loops -ansi -fPIC -DLINUX' + else +- CCOPTS='-DLINUX' ++ CCOPTS="${CFLAGS} -DLINUX" + fi +- CFLAGS="$CCOPTS" +- SMBCFLAGS="-Wall -DLINUX -DNETGROUP -DALLOW_CHANGE_PASSWORD -DFAST_SHARE_MODES -DNO_ASMSIGNALH -DGLIBC2" ++ SMBCFLAGS="${CCOPTS} -Wall -DLINUX -DNETGROUP -DALLOW_CHANGE_PASSWORD -DFAST_SHARE_MODES -DNO_ASMSIGNALH -DGLIBC2" + SMBLFLAGS="-lnsl -lcrypt" ++ CFLAGS="${CCOPTS} -Wall -ansi -fPIC -DLINUX" + ;; + *Darwin* | *Mac* | *MAC*) + AC_MSG_RESULT(found MAC OS X) diff --git a/net-analyzer/nsat/files/nsat-1.5-libtirpc.patch b/net-analyzer/nsat/files/nsat-1.5-libtirpc.patch new file mode 100644 index 000000000000..c91afd3a78fa --- /dev/null +++ b/net-analyzer/nsat/files/nsat-1.5-libtirpc.patch @@ -0,0 +1,33 @@ +--- a/configure.in ++++ b/configure.in +@@ -195,6 +195,8 @@ + AC_FUNC_VPRINTF + AC_CHECK_FUNCS(select socket strdup strstr random srandom snprintf setsockopt initstate gettimeofday strerror) + ++PKG_CHECK_MODULES([TIRPC], [libtirpc], [], [AC_MSG_NOTICE([Using glibc rpc support])]) ++ + AC_OUTPUT(Makefile tools/Makefile src/Makefile src/mod/Makefile src/smb/Makefile src/libmix++/Makefile src/libmix++/mix/net.h) + + AC_MSG_RESULT() +--- a/src/Makefile.in ++++ b/src/Makefile.in +@@ -36,7 +36,7 @@ + @cd mod ; $(MAKE) modobj + + ../nsat: modobj +- ${GPP} ${CFLAGS} ${LDFLAGS} ${OBJ} ${MODOBJ} ${MIXOBJ} -o ../nsat ${CLIB} ++ ${GPP} ${CFLAGS} ${LDFLAGS} ${OBJ} ${MODOBJ} ${MIXOBJ} -o ../nsat ${CLIB} @TIRPC_LIBS@ + + pidalloc.o: + ${GPP} ${CFLAGS} -c pidalloc.cpp +--- a/src/mod/Makefile.in ++++ b/src/mod/Makefile.in +@@ -35,7 +35,7 @@ + ${GPP} ${CFLAGS} -c osscan.cpp + + rpc.o: +- ${GPP} ${CFLAGS} -c rpc.cpp ++ ${GPP} ${CFLAGS} @TIRPC_CFLAGS@ -c rpc.cpp + + www.o: + ${GPP} ${CFLAGS} -c www.cpp diff --git a/net-analyzer/nsat/files/nsat-1.5-lvalue-gcc4.patch b/net-analyzer/nsat/files/nsat-1.5-lvalue-gcc4.patch new file mode 100644 index 000000000000..b4020b3f47ed --- /dev/null +++ b/net-analyzer/nsat/files/nsat-1.5-lvalue-gcc4.patch @@ -0,0 +1,11 @@ +--- a/src/smb/ADMsmb.c ++++ b/src/smb/ADMsmb.c +@@ -123,7 +123,7 @@ + { + usleep (100000); + +- if (recvfrom (socket_client, buffer2, sizeof (buffer2), 0, (struct sockaddr *) &sin_dst, &(int) longueur) != -1) ++ if (recvfrom (socket_client, buffer2, sizeof (buffer2), 0, (struct sockaddr *) &sin_dst, (int *) &longueur) != -1) + { + + if (nmb2->rep_num != 0) diff --git a/net-analyzer/nsat/files/nsat-1.5-misc.patch b/net-analyzer/nsat/files/nsat-1.5-misc.patch new file mode 100644 index 000000000000..f94fd24527b5 --- /dev/null +++ b/net-analyzer/nsat/files/nsat-1.5-misc.patch @@ -0,0 +1,108 @@ +* link against dev-libs/libmix +* parallel $(MAKE) +* usr/local/ -> usr/ +* LDFLAGS +* verbose CC + +--- a/Makefile.in ++++ b/Makefile.in +@@ -7,14 +7,14 @@ + # # #### # # # + + # Change me if you want... +-INSTALL_PATH=/usr/local/bin +-MAN_PATH=/usr/local/man ++INSTALL_PATH=/usr/bin ++MAN_PATH=/usr/man + + # If you change this, change src/lang.h as well +-DATA_PATH=/usr/local/share/nsat ++DATA_PATH=/usr/share/nsat + + all: +- @cd src;make all ++ @cd src; $(MAKE) all + @echo "" + @echo " Compiling is done!" + @echo " You can now 'make install' to put the files in place." +@@ -58,5 +58,5 @@ + doc/nsat.8: + @echo "Hmm, can't find manpage -- skipping :/" + +-nsat: +- @make all ++nsat: src ++ $(MAKE) all +--- a/src/Makefile.in ++++ b/src/Makefile.in +@@ -21,22 +21,22 @@ + + MIXOBJ = libmix++/net/net.o libmix++/misc/misc.o libmix++/misc/exclude.o + +-all: ../smb-ns $(OBJ) modobj mixobj ../nsat ++all: ../smb-ns $(OBJ) modobj ../nsat + + ../smb-ns: +- @cd smb ; make smb ++ @cd smb ; $(MAKE) smb + +-mixobj: libmix++/Makefile +- @cd libmix++ ; make ++#mixobj: libmix++/Makefile ++# @cd libmix++ ; $(MAKE) + +-libmix++/Makefile: +- @cd .. ; ./configure ++#libmix++/Makefile: ++# @cd .. ; ./configure + + modobj: +- @cd mod ; make modobj ++ @cd mod ; $(MAKE) modobj + +-../nsat: +- ${GPP} ${CFLAGS} ${OBJ} ${MODOBJ} ${MIXOBJ} -o ../nsat ${CLIB} ++../nsat: modobj ++ ${GPP} ${CFLAGS} ${LDFLAGS} ${OBJ} ${MODOBJ} ${MIXOBJ} -o ../nsat ${CLIB} + + pidalloc.o: + ${GPP} ${CFLAGS} -c pidalloc.cpp +@@ -63,11 +63,11 @@ + ${GPP} ${CFLAGS} -c Logging.cpp + + clean: +- cd mod && make clean ++ cd mod && $(MAKE) clean + rm -f core *.o ../*.log *.log *~ ../nsat ../.nsrc ../.nspid + + distclean: clean +- @cd mod ; make clean +- @cd smb ; make clean +- @cd libmix++ ; make clean ++ @cd mod ; $(MAKE) clean ++ @cd smb ; $(MAKE) clean ++ @cd libmix++ ; $(MAKE) clean + rm -f mod/Makefile Makefile +--- a/src/smb/Makefile.in ++++ b/src/smb/Makefile.in +@@ -11,7 +11,6 @@ + LIBDIR = $(BASEDIR)/lib + VARDIR = $(BASEDIR)/var + INSTALLPERMS = 0755 +-FLAGS1 = -O3 + LIBS1 = + SHELL = /bin/sh + srcdir = ./ +@@ -53,10 +52,10 @@ + .SUFFIXES: .c .o .h + + .c.o: $(INCLUDES) +- @$(CC) $(CFLAGS) -c $(srcdir)$*.c -o $(srcdir)$*.o ++ $(CC) $(CFLAGS) $(LDFLAGS) -c $(srcdir)$*.c -o $(srcdir)$*.o + + smb: msg $(CLIENT_OBJ) $(ARCFOUR_OBJ) +- @$(CC) $(CFLAGS) -o $(BINARY) $(CLIENT_OBJ) $(ARCFOUR_OBJ) $(LIBS) ++ $(CC) $(CFLAGS) $(LDFLAGS) -o $(BINARY) $(CLIENT_OBJ) $(ARCFOUR_OBJ) $(LIBS) + @echo done + + msg: diff --git a/net-analyzer/nsat/files/nsat-1.5-strip.patch b/net-analyzer/nsat/files/nsat-1.5-strip.patch new file mode 100644 index 000000000000..99fe77633ad8 --- /dev/null +++ b/net-analyzer/nsat/files/nsat-1.5-strip.patch @@ -0,0 +1,10 @@ +--- a/src/Makefile.in ++++ b/src/Makefile.in +@@ -37,7 +37,6 @@ + + ../nsat: + ${GPP} ${CFLAGS} ${OBJ} ${MODOBJ} ${MIXOBJ} -o ../nsat ${CLIB} +- strip ../nsat + + pidalloc.o: + ${GPP} ${CFLAGS} -c pidalloc.cpp diff --git a/net-analyzer/nsat/files/nsat-1.5-va_list.patch b/net-analyzer/nsat/files/nsat-1.5-va_list.patch new file mode 100644 index 000000000000..46bdd3bcc121 --- /dev/null +++ b/net-analyzer/nsat/files/nsat-1.5-va_list.patch @@ -0,0 +1,27 @@ +--- a/src/Logging.cpp ++++ b/src/Logging.cpp +@@ -89,16 +89,17 @@ + if((pi.Foreground) && (out!=NULL)) + fprintf(stdout, "%s %s ", out, hn); + +- va_start(va, fmt); +- +- if(fp!=NULL) ++ if(fp!=NULL) { ++ va_start(va, fmt); + vfprintf(fp, fmt, va); ++ va_end(va); ++ } + +- if((pi.Foreground) && (out!=NULL)) ++ if((pi.Foreground) && (out!=NULL)) { ++ va_start(va, fmt); + vfprintf(stdout, fmt, va); +- +- va_end(va); +- ++ va_end(va); ++ } + if(fp!=NULL) + fprintf(fp, "\n"); + diff --git a/net-analyzer/nsat/metadata.xml b/net-analyzer/nsat/metadata.xml new file mode 100644 index 000000000000..6d77d1d87ddb --- /dev/null +++ b/net-analyzer/nsat/metadata.xml @@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>netmon@gentoo.org</email> + <name>Gentoo network monitoring and analysis project</name> + </maintainer> + <longdescription>Network Security Analysis Tool, an application-level network security scanner</longdescription> + <upstream> + <remote-id type="sourceforge">nsat</remote-id> + </upstream> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/nsat/nsat-1.5-r5.ebuild b/net-analyzer/nsat/nsat-1.5-r5.ebuild new file mode 100644 index 000000000000..0b60e57866fa --- /dev/null +++ b/net-analyzer/nsat/nsat-1.5-r5.ebuild @@ -0,0 +1,75 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 +inherit autotools toolchain-funcs + +DESCRIPTION="Network Security Analysis Tool, an application-level network security scanner" +HOMEPAGE="http://nsat.sourceforge.net/" +SRC_URI="mirror://sourceforge/nsat/${P}.tgz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~ppc x86" +IUSE="X" + +RDEPEND=" + dev-libs/libmix + net-libs/libnsl:0= + net-libs/libpcap + net-libs/libtirpc + net-libs/rpcsvc-proto + X? ( + dev-lang/tk:* + x11-libs/libX11 + ) +" +DEPEND="$RDEPEND" +S="${WORKDIR}/${PN}" +PATCHES=( + "${FILESDIR}"/${P}-configure.patch + "${FILESDIR}"/${P}-lvalue-gcc4.patch + "${FILESDIR}"/${P}-strip.patch + "${FILESDIR}"/${P}-misc.patch + "${FILESDIR}"/${P}-va_list.patch + "${FILESDIR}"/${P}-libtirpc.patch + "${FILESDIR}"/${P}-amd64-compat.patch +) + +src_prepare() { + default + + sed -i \ + -e "s:^#CGIFile /usr/local/share/nsat/nsat.cgi$:#CGIFile /usr/share/nsat/nsat.cgi:g" \ + nsat.conf || die + sed -i -e "s:/usr/local:/usr:g" tools/xnsat || die + sed -i \ + -e "s:/usr/local/share/nsat/nsat.conf:/etc/nsat/nsat.conf:g" \ + -e "s:/usr/local/share/nsat/nsat.cgi:/usr/share/nsat/nsat.cgi:g" \ + src/lang.h || die + + eautoreconf +} + +src_configure() { + tc-export CC + econf $(use_with X x) +} + +src_compile() { + emake MIXOBJ=-lmix++ +} + +src_install() { + dobin nsat smb-ns + use X && dobin tools/xnsat + + insinto /usr/share/nsat + doins nsat.cgi + + insinto /etc/nsat + doins nsat.conf + + dodoc README doc/CHANGES + doman doc/nsat.8 +} diff --git a/net-analyzer/nsca/Manifest b/net-analyzer/nsca/Manifest new file mode 100644 index 000000000000..c588efc6e071 --- /dev/null +++ b/net-analyzer/nsca/Manifest @@ -0,0 +1 @@ +DIST nsca-2.7.2.tar.gz 104953 BLAKE2B 74dce7b59149cd41fe316dc48588d744131efbbe8073d0defe3542a774ac7dd7429a23e5e7f6b2c9b9e45fa1938cdb2994bfcf93e745c12c8fb5bfbbeb627e6e SHA512 f84cac3613bbd0ded4ec700c1dadac71ed075544d0f48281a70946a67792b7f4bcdf6dc3bd5ccf1293cc6a0277638e0f034c33064bf9c05696b4f015e7f15010 diff --git a/net-analyzer/nsca/files/nsca.conf b/net-analyzer/nsca/files/nsca.conf new file mode 100644 index 000000000000..987cd10ebf58 --- /dev/null +++ b/net-analyzer/nsca/files/nsca.conf @@ -0,0 +1,5 @@ +# Choose the configuration file to use; the pre-defined configurations +# for Nagios and Icinga are available in their respective directories: +# /etc/nagios/nsca.cfg +# /etc/icinga/nsca.cfg +CFGFILE=/etc/nagios/nsca.cfg diff --git a/net-analyzer/nsca/files/nsca.init b/net-analyzer/nsca/files/nsca.init new file mode 100644 index 000000000000..cd47bb64e95c --- /dev/null +++ b/net-analyzer/nsca/files/nsca.init @@ -0,0 +1,33 @@ +#!/sbin/openrc-run +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +: ${CFGFILE:=/etc/nagios/nsca.cfg} + +get_config() { + [ -f ${CFGFILE} ] || return 1 + + sed -n -e 's:^[ \t]*'$1'=\([^#]\+\).*:\1:p' \ + ${CFGFILE} +} + +extra_started_commands="reload" + +command=/usr/libexec/${SVCNAME} +command_args="-c ${CFGFILE} --daemon" +pidfile=$(get_config pid_file) + +depend() { + config ${CFGFILE} + + case $(get_config nsca_user) in + icinga) need icinga ;; + nagios) need nagios ;; + esac +} + +reload() { + ebegin "Reloading ${SVCNAME}" + kill -HUP `cat $(get_config pid_file)` + eend $? +} diff --git a/net-analyzer/nsca/metadata.xml b/net-analyzer/nsca/metadata.xml new file mode 100644 index 000000000000..72dce839c365 --- /dev/null +++ b/net-analyzer/nsca/metadata.xml @@ -0,0 +1,41 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>sysadmin@gentoo.org</email> + <name>Gentoo Sysadmin Project</name> + </maintainer> + <longdescription lang="en"> + This program is designed to accept passive service check results + from clients that use the send_nsca utility (which is included in + this package) and pass them along to the Nagios process by using + the external command interface. The program can either be run as a + standalone daemon or as a service under inetd. If you have + libmcrypt installed on your systems, you can choose from multiple + crypto algorithms (DES, 3DES, CAST, xTEA, Twofish, LOKI97, + RJINDAEL, SERPENT, GOST, SAFER/SAFER+, etc.) for encrypting the + traffic between the client and the server. Encryption is + important in this addon, as it prevents unauthorized users from + sending bogus check results to Nagios. Read the included SECURITY + document for more information. + + This package provides the send_nsca utility running on the client. + </longdescription> + <use> + <flag name="crypt"> + Build support for crypted communication with nsca, through + <pkg>dev-libs/libmcrypt</pkg>. It's recommended not to disable this + flag unless all the communication will be handled in an + absolutely safe environment. + </flag> + <flag name="minimal"> + Only build and install the send_nsca command and not the + daemon. This allows a very minimal install with no overhead when + setting up a node. + </flag> + </use> + <upstream> + <remote-id type="sourceforge">nagios</remote-id> + </upstream> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/nsca/nsca-2.7.2-r103.ebuild b/net-analyzer/nsca/nsca-2.7.2-r103.ebuild new file mode 100644 index 000000000000..fb8d8498ef6d --- /dev/null +++ b/net-analyzer/nsca/nsca-2.7.2-r103.ebuild @@ -0,0 +1,87 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=4 + +inherit multilib user eutils + +DESCRIPTION="Nagios Service Check Acceptor" +HOMEPAGE="http://www.nagios.org/" +SRC_URI="mirror://sourceforge/nagios/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha amd64 ~arm ppc ppc64 sparc x86" +IUSE="tcpd +crypt minimal" + +DEPEND="crypt? ( >=dev-libs/libmcrypt-2.5.1-r4 ) + !minimal? ( tcpd? ( sys-apps/tcp-wrappers ) )" + +RDEPEND="${DEPEND} + !minimal? ( || ( net-analyzer/icinga net-analyzer/nagios ) ) + sys-apps/openrc" + +pkg_setup() { + if ! use minimal; then + enewgroup nagios + enewgroup icinga + enewuser nagios -1 /bin/bash /var/nagios/home nagios + enewuser icinga -1 -1 /var/lib/icinga "icinga,nagios" + fi +} + +src_configure() { + use tcpd || export ac_cv_lib_wrap_main=no + use crypt || export ac_cv_path_LIBMCRYPT_CONFIG=/bin/false + + econf \ + --localstatedir=/var/nagios \ + --sysconfdir=/etc/nagios \ + --with-nsca-user=nagios \ + --with-nsca-grp=nagios +} + +src_compile() { + emake -C src send_nsca $(use minimal || echo nsca) + + # prepare the alternative configuration file + sed \ + -e '/nsca_\(user\|group\)/s:nagios:icinga:' \ + -e '/nsca_chroot/s:=.*:=/var/lib/icinga/rw:' \ + -e '/\(command\|alternate_dump\)_file/s:/var/nagios:/var/lib/icinga:' \ + "${S}"/sample-config/nsca.cfg > "${T}"/nsca.icinga.cfg +} + +src_install() { + dodoc LEGAL Changelog README SECURITY + + dobin src/send_nsca + + insinto /etc/nagios + doins "${S}"/sample-config/send_nsca.cfg + + if ! use minimal; then + exeinto /usr/libexec + doexe src/nsca + + newinitd "${FILESDIR}"/nsca.init nsca + newconfd "${FILESDIR}"/nsca.conf nsca + + insinto /etc/nagios + doins "${S}"/sample-config/nsca.cfg + + insinto /etc/icinga + newins "${T}"/nsca.icinga.cfg nsca.cfg + fi +} + +pkg_postinst() { + if ! use minimal; then + elog "If you are using the nsca daemon, remember to edit" + elog "the config file /etc/nagios/nsca.cfg" + elog "" + elog "If you intend to use nsca with Icinga, change the" + elog "configuration file path in /etc/conf.d/nsca so that" + elog "it will default to the correct paths and users." + fi +} diff --git a/net-analyzer/nstats/Manifest b/net-analyzer/nstats/Manifest new file mode 100644 index 000000000000..eeb5f876fff6 --- /dev/null +++ b/net-analyzer/nstats/Manifest @@ -0,0 +1 @@ +DIST nstats-0.4.tar.gz 71526 BLAKE2B bc9e4baab1c425d1248b8669a598f85843465c62a3990ea8ea99f979bee9be8eb351111e58b0ece4748b3e199278acd4f0a06ddde2b4cd6e55ca9ff99096e7e8 SHA512 89e88eb0f707cb125fbf02bef93a0bbbd1409f3516d4b333e06d0a3ffe42f5e8d2b655fa6c7a0c63b7d71c7a2f74f6207e5ed158f7d102f6d47ac6e436da3315 diff --git a/net-analyzer/nstats/files/nstats-0.4-glibc24.patch b/net-analyzer/nstats/files/nstats-0.4-glibc24.patch new file mode 100644 index 000000000000..597c0cd24285 --- /dev/null +++ b/net-analyzer/nstats/files/nstats-0.4-glibc24.patch @@ -0,0 +1,102 @@ +--- a/src/packet.c ++++ b/src/packet.c +@@ -148,9 +148,9 @@ + stats.ip.ipv6.icmp.dst_unreach.s_admin += hdr->len; + break; + +- case ICMP6_DST_UNREACH_NOTNEIGHBOR: +- stats.ip.ipv6.icmp.dst_unreach.notneighbor++; +- stats.ip.ipv6.icmp.dst_unreach.s_notneighbor += hdr->len; ++ case ICMP6_DST_UNREACH_BEYONDSCOPE: ++ stats.ip.ipv6.icmp.dst_unreach.beyondscope++; ++ stats.ip.ipv6.icmp.dst_unreach.s_beyondscope += hdr->len; + break; + + case ICMP6_DST_UNREACH_ADDR: +@@ -219,21 +219,6 @@ + stats.ip.ipv6.icmp.s_echo_reply += hdr->len; + break; + +- case ICMP6_MEMBERSHIP_QUERY: +- stats.ip.ipv6.icmp.mbrship_query++; +- stats.ip.ipv6.icmp.s_mbrship_query += hdr->len; +- break; +- +- case ICMP6_MEMBERSHIP_REPORT: +- stats.ip.ipv6.icmp.mbrship_report++; +- stats.ip.ipv6.icmp.s_mbrship_report += hdr->len; +- break; +- +- case ICMP6_MEMBERSHIP_REDUCTION: +- stats.ip.ipv6.icmp.mbrship_reduction++; +- stats.ip.ipv6.icmp.s_mbrship_reduction += hdr->len; +- break; +- + case ND_ROUTER_SOLICIT: + stats.ip.ipv6.icmp.nd_router_solicit++; + stats.ip.ipv6.icmp.s_nd_router_solicit += hdr->len; +--- a/src/stats.c ++++ b/src/stats.c +@@ -316,15 +316,6 @@ + print_line("Echo Reply:", ICMP6.echo_reply, ICMP6.cnt, + ICMP6.s_echo_reply, ICMP6.bs, .0); + NEXT_ROW; +- print_line("MbrShip Query:", ICMP6.mbrship_query, ICMP6.cnt, +- ICMP6.s_mbrship_query, ICMP6.bs, .0); +- NEXT_ROW; +- print_line("MbrShip Report:", ICMP6.mbrship_report, ICMP6.cnt, +- ICMP6.s_mbrship_report, ICMP6.bs, .0); +- NEXT_ROW; +- print_line("MbrShip Reduct.:", ICMP6.mbrship_reduction, ICMP6.cnt, +- ICMP6.s_mbrship_reduction, ICMP6.bs, .0); +- NEXT_ROW; + print_line("ND Rtr Solicit:", ICMP6.nd_router_solicit, ICMP6.cnt, + ICMP6.s_nd_router_solicit, ICMP6.bs, .0); + NEXT_ROW; +--- a/src/stats.h ++++ b/src/stats.h +@@ -233,7 +233,7 @@ + + cnt_t noroute; cnt_t s_noroute; + cnt_t admin; cnt_t s_admin; +- cnt_t notneighbor; cnt_t s_notneighbor; ++ cnt_t beyondscope; cnt_t s_beyondscope; + cnt_t addr; cnt_t s_addr; + cnt_t noport; cnt_t s_noport; + +@@ -265,9 +265,6 @@ + cnt_t pkt_too_big; cnt_t s_pkt_too_big; + cnt_t echo_request; cnt_t s_echo_request; + cnt_t echo_reply; cnt_t s_echo_reply; +- cnt_t mbrship_query; cnt_t s_mbrship_query; +- cnt_t mbrship_report; cnt_t s_mbrship_report; +- cnt_t mbrship_reduction; cnt_t s_mbrship_reduction; + cnt_t nd_router_solicit; cnt_t s_nd_router_solicit; + cnt_t nd_router_advert; cnt_t s_nd_router_advert; + cnt_t nd_neighbor_solicit; cnt_t s_nd_neighbor_solicit; +--- a/src/nstats.c ++++ b/src/nstats.c +@@ -528,12 +528,6 @@ + ICMP6.s_echo_request, ICMP6.bs); + print_line("Echo Reply:", ICMP6.echo_reply, ICMP6.cnt, + ICMP6.s_echo_reply, ICMP6.bs); +- print_line("MbrShip Query:", ICMP6.mbrship_query, ICMP6.cnt, +- ICMP6.s_mbrship_query, ICMP6.bs); +- print_line("MbrShip Report:", ICMP6.mbrship_report, ICMP6.cnt, +- ICMP6.s_mbrship_report, ICMP6.bs); +- print_line("MbrShip Reduct.:", ICMP6.mbrship_reduction, ICMP6.cnt, +- ICMP6.s_mbrship_reduction, ICMP6.bs); + print_line("ND Rtr Solicit:", ICMP6.nd_router_solicit, ICMP6.cnt, + ICMP6.s_nd_router_solicit, ICMP6.bs); + print_line("ND Rtr Advert:", ICMP6.nd_router_advert, ICMP6.cnt, +@@ -553,8 +547,8 @@ + DESTU6.s_noroute, DESTU6.bs); + print_line("Admin:", DESTU6.admin, DESTU6.cnt, + DESTU6.s_admin, DESTU6.bs); +- print_line("Not Neighbor:", DESTU6.notneighbor, DESTU6.cnt, +- DESTU6.s_notneighbor, DESTU6.bs); ++ print_line("Beyond Scope:", DESTU6.beyondscope, DESTU6.cnt, ++ DESTU6.s_beyondscope, DESTU6.bs); + print_line("Addr:", DESTU6.addr, DESTU6.cnt, + DESTU6.s_addr, DESTU6.bs); + print_line("No Port:", DESTU6.noport, DESTU6.cnt, diff --git a/net-analyzer/nstats/files/nstats-0.4-makefile.patch b/net-analyzer/nstats/files/nstats-0.4-makefile.patch new file mode 100644 index 000000000000..6c4577e333f6 --- /dev/null +++ b/net-analyzer/nstats/files/nstats-0.4-makefile.patch @@ -0,0 +1,17 @@ +# rename *mon to *mon.nstats to avoid conflict with +# net-analyzer/bmon, sys-cluster/ceph and sys-process/nmon +# bug #364685 + +--- a/Makefile ++++ b/Makefile +@@ -53,7 +53,7 @@ + mkdir -p $(DESTDIR)$(prefix)/bin/ + mkdir -p $(DESTDIR)$(mandir)/man8/ + install nstats $(DESTDIR)$(prefix)/bin/ +- install bmon $(DESTDIR)$(prefix)/bin/ +- install cmon $(DESTDIR)$(prefix)/bin/ +- install nmon $(DESTDIR)$(prefix)/bin/ ++ install bmon $(DESTDIR)$(prefix)/bin/bmon.nstats ++ install cmon $(DESTDIR)$(prefix)/bin/cmon.nstats ++ install nmon $(DESTDIR)$(prefix)/bin/nmon.nstats + install man/nstats.8 $(DESTDIR)$(mandir)/man8/ diff --git a/net-analyzer/nstats/files/nstats-0.4-tinfo.patch b/net-analyzer/nstats/files/nstats-0.4-tinfo.patch new file mode 100644 index 000000000000..ce62c8100f9b --- /dev/null +++ b/net-analyzer/nstats/files/nstats-0.4-tinfo.patch @@ -0,0 +1,18 @@ +--- a/configure.in ++++ b/configure.in +@@ -15,11 +15,12 @@ + + AC_TYPE_SIGNAL + ++PKG_CHECK_MODULES(ncurses,ncurses,,AC_MSG_ERROR([ncurses is needed])) + + AC_CHECK_LIB(ncurses,initscr,[ +- NMON_LIB="${NMON_LIB} -lncurses" +- BMON_LIB="${BMON_LIB} -lncurses" +- CMON_LIB="${CMON_LIB} -lncurses" ++ NMON_LIB="${NMON_LIB} $ncurses_LIBS" ++ BMON_LIB="${BMON_LIB} $ncurses_LIBS" ++ CMON_LIB="${CMON_LIB} $ncurses_LIBS" + ],[ + echo + echo "Missing dependency" diff --git a/net-analyzer/nstats/metadata.xml b/net-analyzer/nstats/metadata.xml new file mode 100644 index 000000000000..bd13a914477c --- /dev/null +++ b/net-analyzer/nstats/metadata.xml @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<maintainer type="project"> + <email>netmon@gentoo.org</email> + <name>Gentoo network monitoring and analysis project</name> +</maintainer> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/nstats/nstats-0.4-r2.ebuild b/net-analyzer/nstats/nstats-0.4-r2.ebuild new file mode 100644 index 000000000000..18e85bd81fe8 --- /dev/null +++ b/net-analyzer/nstats/nstats-0.4-r2.ebuild @@ -0,0 +1,34 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +inherit autotools eutils + +DESCRIPTION="Displays statistics about ethernet traffic including protocol breakdown" +SRC_URI="http://trash.net/~reeler/nstats/files/${P}.tar.gz" +HOMEPAGE="http://trash.net/~reeler/nstats/" +LICENSE="Artistic" + +SLOT="0" +KEYWORDS="amd64 ~ppc x86" + +RDEPEND=" + net-libs/libpcap + sys-libs/ncurses +" +DEPEND=" + ${RDEPEND} + virtual/pkgconfig +" + +DOCS=( BUGS doc/TODO doc/ChangeLog ) + +src_prepare() { + epatch \ + "${FILESDIR}"/${P}-glibc24.patch \ + "${FILESDIR}"/${P}-makefile.patch \ + "${FILESDIR}"/${P}-tinfo.patch + + eautoreconf +} diff --git a/net-analyzer/nstats/nstats-0.4-r3.ebuild b/net-analyzer/nstats/nstats-0.4-r3.ebuild new file mode 100644 index 000000000000..2fd06e90cf7c --- /dev/null +++ b/net-analyzer/nstats/nstats-0.4-r3.ebuild @@ -0,0 +1,38 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +inherit autotools flag-o-matic + +DESCRIPTION="Displays statistics about ethernet traffic including protocol breakdown" +SRC_URI="http://trash.net/~reeler/nstats/files/${P}.tar.gz" +HOMEPAGE="http://trash.net/~reeler/nstats/" +LICENSE="Artistic" + +SLOT="0" +KEYWORDS="~amd64 ~ppc ~x86" + +RDEPEND=" + net-libs/libpcap + sys-libs/ncurses +" +DEPEND=" + ${RDEPEND} + virtual/pkgconfig +" +PATCHES=( + "${FILESDIR}"/${P}-glibc24.patch + "${FILESDIR}"/${P}-makefile.patch + "${FILESDIR}"/${P}-tinfo.patch +) +DOCS=( BUGS doc/TODO doc/ChangeLog ) + +src_prepare() { + default + eautoreconf +} + +src_configure() { + append-cflags -fcommon + default +} diff --git a/net-analyzer/ntopng/Manifest b/net-analyzer/ntopng/Manifest new file mode 100644 index 000000000000..73a4c9aaf1b0 --- /dev/null +++ b/net-analyzer/ntopng/Manifest @@ -0,0 +1,3 @@ +DIST ntopng-3.8.1.tar.gz 33914341 BLAKE2B 3b0df382e938af78d10e71282e863ccb7ba1da3dc7e2bf90b45f1e6e4670052a8c61a16cb8547f119f0dc753a2e31273b41f40aa26919480cbaecf43b6d59742 SHA512 4cb613881e36b435f97dcc25dfaa505d9c552f63ad8334d5c9d47ec06376d47124c65e6d782546d36f6d27b34b037cc73df7129f459f290ac51e270bb7453970 +DIST ntopng-3.8.tar.gz 33910329 BLAKE2B a5aaed2244516b92e4b8c7364817ea66eb2f446fe814a96622cbbf5d851d79e8049b75da009d0f80f07c1fae90f8dc294794b76ed14450d8e0e6685a1b1ce8f2 SHA512 2236f9931fc606e4d0a6da379c480a48bacd441cf199a310ea690a03d74d08f369825ea02e3c13828a10f716a5531d4e6774876f253ab348a52bcf8bd8d5107f +DIST ntopng-4.0.tar.gz 43239175 BLAKE2B 689883685d46d339d61c338607e2164e36903313cdc0e0e2b649acd7468505f72fce75118a2c3ef55e54d942fc5cc3c312efbd46f8e2603bbcfaf206908bce82 SHA512 a278cc5f304e3040b31c691286650a54d61b5587033724c4513dd7372168477d5b0b471a1d2a5c5682034464b022b88e971567a38d836216431ea77bf1ed90c9 diff --git a/net-analyzer/ntopng/files/ntopng-3.8-missing-min.patch b/net-analyzer/ntopng/files/ntopng-3.8-missing-min.patch new file mode 100644 index 000000000000..303826a918df --- /dev/null +++ b/net-analyzer/ntopng/files/ntopng-3.8-missing-min.patch @@ -0,0 +1,19 @@ +--- a/third-party/zeromq-4.1.3/src/tcp_connecter.cpp ++++ b/third-party/zeromq-4.1.3/src/tcp_connecter.cpp +@@ -31,6 +31,7 @@ + + #include <new> + #include <string> ++#include <algorithm> + + #include "tcp_connecter.hpp" + #include "stream_engine.hpp" +@@ -207,7 +208,7 @@ + options.reconnect_ivl_max > options.reconnect_ivl) + // Calculate the next interval + current_reconnect_ivl = +- min (current_reconnect_ivl * 2, options.reconnect_ivl_max); ++ std::min(current_reconnect_ivl * 2, options.reconnect_ivl_max); + return interval; + } + diff --git a/net-analyzer/ntopng/files/ntopng-3.8-mysqltool.patch b/net-analyzer/ntopng/files/ntopng-3.8-mysqltool.patch new file mode 100644 index 000000000000..62c328a3505e --- /dev/null +++ b/net-analyzer/ntopng/files/ntopng-3.8-mysqltool.patch @@ -0,0 +1,17 @@ +--- a/configure.seed ++++ b/configure.seed +@@ -355,13 +355,7 @@ + if test "x$ac_cv_prog_ac_ct_MARIADB" = "xmariadb_config"; then + MYSQLTOOL="mariadb_config" + else +- PATH=$PATH:/usr/local/mysql/bin +- AC_CHECK_TOOL(MYSQL, mysql_config) +- if test "x$ac_cv_prog_ac_ct_MYSQL" = "xmysql_config"; then +- MYSQLTOOL="mysql_config" +- else +- MYSQLTOOL="" +- fi ++ MYSQLTOOL="mysql_config" + fi + + if test -n "$MYSQLTOOL"; then diff --git a/net-analyzer/ntopng/files/ntopng-3.8-ndpi-call.patch b/net-analyzer/ntopng/files/ntopng-3.8-ndpi-call.patch new file mode 100644 index 000000000000..1308a5c2c03f --- /dev/null +++ b/net-analyzer/ntopng/files/ntopng-3.8-ndpi-call.patch @@ -0,0 +1,12 @@ +--- a/src/NetworkInterface.cpp ++++ b/src/NetworkInterface.cpp +@@ -1604,7 +1604,8 @@ + ndpi_protocol icmp_proto = flow->get_detected_protocol(); + + if(icmp_proto.category == NDPI_PROTOCOL_CATEGORY_UNSPECIFIED) { +- ndpi_fill_ip_protocol_category(ndpi_struct, (struct ndpi_iphdr *)ip, &icmp_proto); ++ ndpi_fill_ip_protocol_category(ndpi_struct, ((struct ndpi_iphdr *)ip)->saddr, ++ ((struct ndpi_iphdr*)ip)->daddr, &icmp_proto); + flow->setDetectedProtocol(icmp_proto, false); + } + } diff --git a/net-analyzer/ntopng/files/ntopng-3.8-ndpi-includes.patch b/net-analyzer/ntopng/files/ntopng-3.8-ndpi-includes.patch new file mode 100644 index 000000000000..cdd5e827147c --- /dev/null +++ b/net-analyzer/ntopng/files/ntopng-3.8-ndpi-includes.patch @@ -0,0 +1,14 @@ +--- a/configure.seed ++++ b/configure.seed +@@ -129,9 +129,9 @@ + fi + + PKG_CHECK_MODULES([NDPI], [libndpi >= 2.0], [ +- NDPI_INC=`echo $NDPI_CFLAGS | sed -e "s/[ ]*$//"`/libndpi ++ NDPI_INC=`echo $NDPI_CFLAGS | sed -e "s/[ ]*$//"` + # Use static libndpi library as building against the dynamic library fails +- NDPI_LIB="-Wl,-Bstatic $NDPI_LIBS -Wl,-Bdynamic" ++ NDPI_LIB="$NDPI_LIBS" + NDPI_LIB_DEP= + ], [ + AC_MSG_CHECKING(for nDPI source) diff --git a/net-analyzer/ntopng/files/ntopng-3.8.1-PKG_CONFIG.patch b/net-analyzer/ntopng/files/ntopng-3.8.1-PKG_CONFIG.patch new file mode 100644 index 000000000000..12117d791bcd --- /dev/null +++ b/net-analyzer/ntopng/files/ntopng-3.8.1-PKG_CONFIG.patch @@ -0,0 +1,95 @@ +--- a/configure.seed ++++ b/configure.seed +@@ -6,6 +6,8 @@ + + AC_PROG_CXX + ++PKG_PROG_PKG_CONFIG ++ + dnl> Add /usr/local/ /opt/local + CFLAGS="-I${PWD} -I${PWD}/include" + CPPFLAGS="${CPPFLAGS} -I${PWD} -I${PWD}/include" +@@ -179,10 +179,10 @@ + fi + dnl finish: nDPI handling + +-if test -z `pkg-config --exists libssl`; then ++if ${PKG_CONFIG} --exists libssl; then + AC_DEFINE_UNQUOTED(NO_SSL_DL, 1, [has openssl]) +- SSL_INC="`pkg-config --cflags libssl` -I/usr/include/openssl" +- SSL_LIB="`pkg-config --libs libssl` -lssl -lcrypto" ++ SSL_INC="`${PKG_CONFIG} --cflags libssl` -I/usr/include/openssl" ++ SSL_LIB="`${PKG_CONFIG} --libs libssl` -lssl -lcrypto" + fi + + AC_MSG_CHECKING(for ntopng professional edition) +--- a/Makefile.in ++++ b/Makefile.in +@@ -44,10 +44,10 @@ + + ###### + LIBRRDTOOL_HOME=${PWD}/third-party/rrdtool-1.4.8 +-HAS_LIBRRDTOOL=$(shell pkg-config --atleast-version=1.4.8 librrd; echo $$?) ++HAS_LIBRRDTOOL=$(shell $(PKG_CONFIG) --atleast-version=1.4.8 librrd; echo $$?) + ifeq ($(HAS_LIBRRDTOOL), 0) +- LIBRRDTOOL_INC = $(shell pkg-config --cflags librrd) +- LIBRRDTOOL_LIB = $(shell pkg-config --libs librrd) # -lrrd_th ++ LIBRRDTOOL_INC = $(shell $(PKG_CONFIG) --cflags librrd) ++ LIBRRDTOOL_LIB = $(shell $(PKG_CONFIG) --libs librrd) # -lrrd_th + else + LIBRRDTOOL_INC=-I$(LIBRRDTOOL_HOME)/src/ + ifeq ($(OS), $(filter $(OS), OpenBSD FreeBSD)) +@@ -70,10 +70,10 @@ + + ###### + +-HAS_JSON=$(shell pkg-config --exists json-c; echo $$?) ++HAS_JSON=$(shell $(PKG_CONFIG) --exists json-c; echo $$?) + ifeq ($(HAS_JSON), 0) +- JSON_INC = $(shell pkg-config --cflags json-c) +- JSON_LIB = $(shell pkg-config --libs json-c) ++ JSON_INC = $(shell $(PKG_CONFIG) --cflags json-c) ++ JSON_LIB = $(shell $(PKG_CONFIG) --libs json-c) + else + JSON_HOME=${PWD}/third-party/json-c + JSON_INC=-I$(JSON_HOME) +@@ -83,21 +83,21 @@ + ###### + + ifeq (@NEDGE@, 0) +- HAS_SODIUM=$(shell pkg-config --exists libsodium; echo $$?) ++ HAS_SODIUM=$(shell $(PKG_CONFIG) --exists libsodium; echo $$?) + ifeq ($(HAS_SODIUM), 0) +- SODIUM_INC = $(shell pkg-config --cflags libsodium) +- SODIUM_LIB = $(shell pkg-config --libs libsodium) ++ SODIUM_INC = $(shell $(PKG_CONFIG) --cflags libsodium) ++ SODIUM_LIB = $(shell $(PKG_CONFIG) --libs libsodium) + else + SODIUM_INC= + SODIUM_LIB= + endif + +- HAS_ZEROMQ=$(shell pkg-config --exists libzmq; echo $$?) ++ HAS_ZEROMQ=$(shell $(PKG_CONFIG) --exists libzmq; echo $$?) + ifeq ($(HAS_ZEROMQ), 0) +- ZEROMQ_INC = $(shell pkg-config --cflags libzmq) ++ ZEROMQ_INC = $(shell $(PKG_CONFIG) --cflags libzmq) + ZMQ_STATIC=/usr/local/lib/libzmq.a + ifeq ($(wildcard $(ZMQ_STATIC)),) +- ZEROMQ_LIB = $(shell pkg-config --libs libzmq) ++ ZEROMQ_LIB = $(shell $(PKG_CONFIG) --libs libzmq) + else + ZEROMQ_LIB = $(ZMQ_STATIC) + endif +@@ -106,11 +106,6 @@ + ZEROMQ_INC=-I$(ZEROMQ_HOME)/include + ZEROMQ_LIB=$(ZEROMQ_HOME)/.libs/libzmq.a + endif +- +- HAS_ZSTD=$(shell pkg-config --exists libzstd; echo $$?) +- ifeq ($(HAS_ZSTD), 0) +- ZSTD_LIB = $(shell pkg-config --libs libzstd) +- endif + endif + + ###### diff --git a/net-analyzer/ntopng/files/ntopng-3.8.1-parallel-make.patch b/net-analyzer/ntopng/files/ntopng-3.8.1-parallel-make.patch new file mode 100644 index 000000000000..9089c0a9b04d --- /dev/null +++ b/net-analyzer/ntopng/files/ntopng-3.8.1-parallel-make.patch @@ -0,0 +1,15 @@ +--- a/configure.seed ++++ b/configure.seed +@@ -526,11 +520,7 @@ + + AC_DEFINE_UNQUOTED(_CRT_SECURE_NO_WARNINGS, 1, [Disable warning on windows]) + +-GMAKE=`which gmake` +-if test x$GMAKE = x +-then +- GMAKE="make" +-fi ++GMAKE='$(MAKE)' + + GIT=`which git` + if test x$GIT = x diff --git a/net-analyzer/ntopng/files/ntopng-4.0-PKG_CONFIG.patch b/net-analyzer/ntopng/files/ntopng-4.0-PKG_CONFIG.patch new file mode 100644 index 000000000000..cc97d3875676 --- /dev/null +++ b/net-analyzer/ntopng/files/ntopng-4.0-PKG_CONFIG.patch @@ -0,0 +1,124 @@ +--- a/configure.seed ++++ b/configure.seed +@@ -182,21 +182,21 @@ + fi + dnl finish: nDPI handling + +-pkg-config --exists json-c ++${PKG_CONFIG} --exists json-c + if test "$?" -ne 1; then +- JSON_INC=`pkg-config --cflags json-c` +- JSON_LIB=`pkg-config --libs json-c` ++ JSON_INC=`${PKG_CONFIG} --cflags json-c` ++ JSON_LIB=`${PKG_CONFIG} --libs json-c` + else + echo "Please install libjson-c-dev package prerequisite" + exit -1 + fi + + +-pkg-config --exists libssl ++${PKG_CONFIG} --exists libssl + if test "$?" -ne 1; then + AC_DEFINE_UNQUOTED(NO_SSL_DL, 1, [has openssl]) +- SSL_INC="`pkg-config --cflags libssl` -I/usr/include/openssl" +- SSL_LIB="`pkg-config --libs libssl` -lssl -lcrypto" ++ SSL_INC="`${PKG_CONFIG} --cflags libssl` -I/usr/include/openssl" ++ SSL_LIB="`${PKG_CONFIG} --libs libssl` -lssl -lcrypto" + else + dnl Workaround for MacOS Brew + if test -d "/usr/local/opt/openssl/lib"; then +@@ -303,8 +303,8 @@ + AC_DEFINE_UNQUOTED(NTOPNG_GIT_RELEASE, "${GIT_BRANCH}:${GIT_RELEASE}", [GIT Release]) + AC_DEFINE_UNQUOTED(NTOPNG_GIT_DATE, "${GIT_DATE}", [Last GIT change]) + +-if test -z `which pkg-config`; then +- echo "#!/bin/sh\n" > pkg-config ++if test -z `which ${PKG_CONFIG}`; then ++ echo "#!/bin/sh\n" > ${PKG_CONFIG} + fi + + if test -f ".git/index"; then +@@ -336,8 +336,8 @@ + + if test -d "/usr/include/hiredis"; then + AC_DEFINE_UNQUOTED(HAVE_HIREDIS, 1, [Local hiredis package present]) +- HIREDIS_INC="`pkg-config --cflags hiredis` -I/usr/include/hiredis" +- HIREDIS_LIB="`pkg-config --libs hiredis` -lhiredis" ++ HIREDIS_INC="`${PKG_CONFIG} --cflags hiredis` -I/usr/include/hiredis" ++ HIREDIS_LIB="`${PKG_CONFIG} --libs hiredis` -lhiredis" + else + HIREDIS_INC="-I ${PWD}/third-party/hiredis" + fi +@@ -433,7 +433,7 @@ + UGLIFYJS_MAJOR_VERSION="${UGLIFYJS_VERSION%%.*}" + fi + +-AC_CHECK_LIB([rrd_th], [rrd_update_r], [LIBRRD_LD_FLAGS=-lrrd_th], [LIBRRD_LD_FLAGS=`pkg-config --libs librrd`]) ++AC_CHECK_LIB([rrd_th], [rrd_update_r], [LIBRRD_LD_FLAGS=-lrrd_th], [LIBRRD_LD_FLAGS=`${PKG_CONFIG} --libs librrd`]) + + AC_CHECK_LIB([nl], [nl_handle_alloc], [LDFLAGS="${LDFLAGS} -lnl"]) + AC_CHECK_LIB([rt], [clock_gettime], [LDFLAGS="${LDFLAGS} -lrt"]) +@@ -452,7 +452,7 @@ + dnl> https://github.com/curl/curl/blob/curl-7_20_0/TODO-RELEASE + + AC_MSG_CHECKING(for curl SMTP support) +- if `pkg-config --atleast-version="7.20.0" libcurl` ; then ++ if `${PKG_CONFIG} --atleast-version="7.20.0" libcurl` ; then + AC_DEFINE_UNQUOTED(HAVE_CURL_SMTP, 1, [curl supports SMTP]) + AC_MSG_RESULT(yes) + else +--- a/Makefile.in ++++ b/Makefile.in +@@ -45,9 +45,9 @@ + + ###### + LIBRRDTOOL_HOME=${PWD}/third-party/rrdtool-1.4.8 +-HAS_LIBRRDTOOL=$(shell pkg-config --atleast-version=1.4.8 librrd && echo 0) ++HAS_LIBRRDTOOL=$(shell ${PKG_CONFIG} --atleast-version=1.4.8 librrd && echo 0) + ifeq ($(HAS_LIBRRDTOOL), 0) +- LIBRRDTOOL_INC = $(shell pkg-config --cflags librrd) ++ LIBRRDTOOL_INC = $(shell ${PKG_CONFIG} --cflags librrd) + LIBRRDTOOL_LIB = @LIBRRD_LD_FLAGS@ + else + LIBRRDTOOL_INC=-I$(LIBRRDTOOL_HOME)/src/ +@@ -77,21 +77,21 @@ + ###### + + ifeq (@NEDGE@, 0) +- HAS_SODIUM=$(shell pkg-config --exists libsodium && echo 0) ++ HAS_SODIUM=$(shell ${PKG_CONFIG} --exists libsodium && echo 0) + ifeq ($(HAS_SODIUM), 0) +- SODIUM_INC = $(shell pkg-config --cflags libsodium) +- SODIUM_LIB = $(shell pkg-config --libs libsodium) ++ SODIUM_INC = $(shell ${PKG_CONFIG} --cflags libsodium) ++ SODIUM_LIB = $(shell ${PKG_CONFIG} --libs libsodium) + else + SODIUM_INC= + SODIUM_LIB= + endif + +- HAS_ZEROMQ=$(shell pkg-config --exists libzmq && echo 0) ++ HAS_ZEROMQ=$(shell ${PKG_CONFIG} --exists libzmq && echo 0) + ifeq ($(HAS_ZEROMQ), 0) +- ZEROMQ_INC = $(shell pkg-config --cflags libzmq) ++ ZEROMQ_INC = $(shell ${PKG_CONFIG} --cflags libzmq) + ZMQ_STATIC=/usr/local/lib/libzmq.a + ifeq ($(wildcard $(ZMQ_STATIC)),) +- ZEROMQ_LIB = $(shell pkg-config --libs libzmq) ++ ZEROMQ_LIB = $(shell ${PKG_CONFIG} --libs libzmq) + else + ZEROMQ_LIB = $(ZMQ_STATIC) + endif +@@ -101,9 +101,9 @@ + ZEROMQ_LIB=$(ZEROMQ_HOME)/.libs/libzmq.a + endif + +- HAS_ZSTD=$(shell pkg-config --exists libzstd && echo 0) ++ HAS_ZSTD=$(shell ${PKG_CONFIG} --exists libzstd && echo 0) + ifeq ($(HAS_ZSTD), 0) +- ZSTD_LIB = $(shell pkg-config --libs libzstd) ++ ZSTD_LIB = $(shell ${PKG_CONFIG} --libs libzstd) + endif + endif + diff --git a/net-analyzer/ntopng/files/ntopng-4.0-ndpi-includes.patch b/net-analyzer/ntopng/files/ntopng-4.0-ndpi-includes.patch new file mode 100644 index 000000000000..d1f61ce52abe --- /dev/null +++ b/net-analyzer/ntopng/files/ntopng-4.0-ndpi-includes.patch @@ -0,0 +1,11 @@ +--- a/configure.seed ++++ b/configure.seed +@@ -134,7 +134,7 @@ + PKG_CHECK_MODULES([NDPI], [libndpi >= 2.0], [ + NDPI_INC=`echo $NDPI_CFLAGS | sed -e "s/[ ]*$//"` + # Use static libndpi library as building against the dynamic library fails +- NDPI_LIB="-Wl,-Bstatic $NDPI_LIBS -Wl,-Bdynamic" ++ NDPI_LIB="$NDPI_LIBS" + NDPI_LIB_DEP= + ], [ + AC_MSG_CHECKING(for nDPI source) diff --git a/net-analyzer/ntopng/files/ntopng.conf.d b/net-analyzer/ntopng/files/ntopng.conf.d new file mode 100644 index 000000000000..b53f5d4ed777 --- /dev/null +++ b/net-analyzer/ntopng/files/ntopng.conf.d @@ -0,0 +1,3 @@ +NTOPNG_OPTS="-i eth0" +NTOPNG_OPTS="${NTOPNG_OPTS} -m 192.168.0.0/16" +NTOPNG_OPTS="${NTOPNG_OPTS} -d /var/lib/ntopng" diff --git a/net-analyzer/ntopng/files/ntopng.init.d b/net-analyzer/ntopng/files/ntopng.init.d new file mode 100644 index 000000000000..02f911b05a88 --- /dev/null +++ b/net-analyzer/ntopng/files/ntopng.init.d @@ -0,0 +1,19 @@ +#!/sbin/openrc-run +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +depend() { + need net redis +} + +start() { + ebegin "Starting ntopng" + start-stop-daemon --start --exec /usr/bin/ntopng --pidfile /var/run/ntopng.pid --make-pidfile --background -e LUA_PATH='/usr/share/ntopng/scripts/lua/modules/?.lua' -- --user ntopng ${NTOPNG_OPTS} + eend $? +} + +stop() { + ebegin "Stopping ntopng" + start-stop-daemon --stop --exec /usr/bin/ntopng --pidfile /var/run/ntopng.pid + eend $? +} diff --git a/net-analyzer/ntopng/metadata.xml b/net-analyzer/ntopng/metadata.xml new file mode 100644 index 000000000000..a000cf72237f --- /dev/null +++ b/net-analyzer/ntopng/metadata.xml @@ -0,0 +1,11 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<maintainer type='project'> +<email>netmon@gentoo.org</email> +</maintainer> + <upstream> + <remote-id type="github">ntop/ntopng</remote-id> + </upstream> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/ntopng/ntopng-3.8-r1.ebuild b/net-analyzer/ntopng/ntopng-3.8-r1.ebuild new file mode 100644 index 000000000000..37e007de41ea --- /dev/null +++ b/net-analyzer/ntopng/ntopng-3.8-r1.ebuild @@ -0,0 +1,76 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 +inherit autotools user toolchain-funcs + +DESCRIPTION="Network traffic analyzer with web interface" +HOMEPAGE="https://www.ntop.org/" +SRC_URI="https://github.com/ntop/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="GPL-3" +SLOT="0" +KEYWORDS="~amd64 ~x86" + +DEPEND="dev-db/sqlite:3 + dev-python/pyzmq + dev-lang/luajit:2 + dev-libs/json-c:= + dev-libs/geoip + dev-libs/glib:2 + dev-libs/hiredis + dev-libs/libsodium:= + dev-libs/libxml2 + dev-libs/libmaxminddb + net-analyzer/rrdtool + net-libs/libpcap + >=net-libs/nDPI-2.4:= + net-misc/curl + sys-libs/binutils-libs + dev-db/mysql-connector-c:=" +RDEPEND="${DEPEND} + dev-db/redis" +PATCHES=( + "${FILESDIR}"/${P}-mysqltool.patch + "${FILESDIR}"/${P}-ndpi-includes.patch + "${FILESDIR}"/${P}-missing-min.patch + "${FILESDIR}"/${P}-ndpi-call.patch +) + +src_prepare() { + default + sed -e "s/@VERSION@/${PV}.$(date +%y%m%d)/g" -e "s/@SHORT_VERSION@/${PV}/g" < "${S}/configure.seed" > "${S}/configure.ac" > configure.ac + eapply_user + eautoreconf +} + +src_install() { + SHARE_NTOPNG_DIR="${EPREFIX}/usr/share/${PN}" + dodir ${SHARE_NTOPNG_DIR} + insinto ${SHARE_NTOPNG_DIR} + doins -r httpdocs + doins -r scripts + + dodir ${SHARE_NTOPNG_DIR}/third-party + insinto ${SHARE_NTOPNG_DIR}/third-party + doins -r third-party/i18n.lua-master + doins -r third-party/lua-resty-template-master + + exeinto /usr/bin + doexe ${PN} + doman ${PN}.8 + + newinitd "${FILESDIR}/ntopng.init.d" ntopng + newconfd "${FILESDIR}/ntopng.conf.d" ntopng + + dodir "/var/lib/ntopng" + fowners ntopng "/var/lib/ntopng" +} + +pkg_setup() { + enewuser ntopng +} + +pkg_postinst() { + elog "ntopng default credentials are user='admin' password='admin'" +} diff --git a/net-analyzer/ntopng/ntopng-3.8.1-r4.ebuild b/net-analyzer/ntopng/ntopng-3.8.1-r4.ebuild new file mode 100644 index 000000000000..b4562c2a6b21 --- /dev/null +++ b/net-analyzer/ntopng/ntopng-3.8.1-r4.ebuild @@ -0,0 +1,99 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +inherit autotools user toolchain-funcs + +DESCRIPTION="Network traffic analyzer with web interface" +HOMEPAGE="https://www.ntop.org/" +SRC_URI="https://github.com/ntop/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="GPL-3" +SLOT="0" +KEYWORDS="~amd64 ~x86" + +DEPEND=" + >=net-libs/nDPI-3.0:= + dev-db/mysql-connector-c:= + dev-db/sqlite:3 + dev-libs/hiredis:= + dev-libs/json-c:= + dev-libs/libmaxminddb + dev-libs/libsodium:= + dev-libs/openssl + net-analyzer/rrdtool + net-libs/libpcap + >=net-libs/zeromq-3:= + net-misc/curl + sys-libs/libcap + sys-libs/zlib +" +RDEPEND=" + ${DEPEND} + dev-db/redis +" +BDEPEND=" + virtual/pkgconfig +" +PATCHES=( + "${FILESDIR}"/${PN}-3.8-mysqltool.patch + "${FILESDIR}"/${PN}-3.8-ndpi-includes.patch + "${FILESDIR}"/${PN}-3.8.1-PKG_CONFIG.patch + "${FILESDIR}"/${PN}-3.8.1-parallel-make.patch +) +RESTRICT="test" + +pkg_setup() { + enewuser ntopng +} + +src_prepare() { + default + + sed \ + -e "s/@VERSION@/${PV}.$(date +%y%m%d)/g" \ + -e "s/@SHORT_VERSION@/${PV}/g" \ + < "${S}/configure.seed" \ + > "${S}/configure.ac" || die + + eautoreconf +} + +src_configure() { + tc-export PKG_CONFIG + default +} + +src_compile() { + emake \ + CC="$(tc-getCC)" \ + MYCFLAGS="${CFLAGS}" \ + MYLDFLAGS="${LDFLAGS}" +} + +src_install() { + SHARE_NTOPNG_DIR="${EPREFIX}/usr/share/${PN}" + dodir ${SHARE_NTOPNG_DIR} + insinto ${SHARE_NTOPNG_DIR} + doins -r httpdocs + doins -r scripts + + dodir ${SHARE_NTOPNG_DIR}/third-party + insinto ${SHARE_NTOPNG_DIR}/third-party + doins -r third-party/i18n.lua-master + doins -r third-party/lua-resty-template-master + + exeinto /usr/bin + doexe ${PN} + doman ${PN}.8 + + newinitd "${FILESDIR}"/ntopng.init.d ntopng + newconfd "${FILESDIR}"/ntopng.conf.d ntopng + + keepdir /var/lib/ntopng + fowners ntopng /var/lib/ntopng +} + +pkg_postinst() { + elog "ntopng default credentials are user='admin' password='admin'" +} diff --git a/net-analyzer/ntopng/ntopng-4.0.ebuild b/net-analyzer/ntopng/ntopng-4.0.ebuild new file mode 100644 index 000000000000..45fcb2be47c3 --- /dev/null +++ b/net-analyzer/ntopng/ntopng-4.0.ebuild @@ -0,0 +1,99 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +inherit autotools user toolchain-funcs + +DESCRIPTION="Network traffic analyzer with web interface" +HOMEPAGE="https://www.ntop.org/" +SRC_URI="https://github.com/ntop/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="GPL-3" +SLOT="0" +KEYWORDS="~amd64 ~x86" + +DEPEND=" + >=net-libs/nDPI-3.0:= + dev-db/mysql-connector-c:= + dev-db/sqlite:3 + dev-libs/hiredis:= + dev-libs/json-c:= + dev-libs/libmaxminddb + dev-libs/libsodium:= + dev-libs/openssl + net-analyzer/rrdtool + net-libs/libpcap + >=net-libs/zeromq-3:= + net-misc/curl + sys-libs/libcap + sys-libs/zlib +" +RDEPEND=" + ${DEPEND} + dev-db/redis +" +BDEPEND=" + virtual/pkgconfig +" +PATCHES=( + "${FILESDIR}"/${PN}-3.8-mysqltool.patch + "${FILESDIR}"/${PN}-3.8.1-parallel-make.patch + "${FILESDIR}"/${PN}-4.0-ndpi-includes.patch + "${FILESDIR}"/${PN}-4.0-PKG_CONFIG.patch +) +RESTRICT="test" + +pkg_setup() { + enewuser ntopng +} + +src_prepare() { + default + + sed \ + -e "s/@VERSION@/${PV}.$(date +%y%m%d)/g" \ + -e "s/@SHORT_VERSION@/${PV}/g" \ + < "${S}/configure.seed" \ + > "${S}/configure.ac" || die + + eautoreconf +} + +src_configure() { + tc-export PKG_CONFIG + default +} + +src_compile() { + emake \ + CC="$(tc-getCC)" \ + MYCFLAGS="${CFLAGS}" \ + MYLDFLAGS="${LDFLAGS}" +} + +src_install() { + SHARE_NTOPNG_DIR="${EPREFIX}/usr/share/${PN}" + dodir ${SHARE_NTOPNG_DIR} + insinto ${SHARE_NTOPNG_DIR} + doins -r httpdocs + doins -r scripts + + dodir ${SHARE_NTOPNG_DIR}/third-party + insinto ${SHARE_NTOPNG_DIR}/third-party + doins -r third-party/i18n.lua-master + doins -r third-party/lua-resty-template-master + + exeinto /usr/bin + doexe ${PN} + doman ${PN}.8 + + newinitd "${FILESDIR}"/ntopng.init.d ntopng + newconfd "${FILESDIR}"/ntopng.conf.d ntopng + + keepdir /var/lib/ntopng + fowners ntopng /var/lib/ntopng +} + +pkg_postinst() { + elog "ntopng default credentials are user='admin' password='admin'" +} diff --git a/net-analyzer/nttcp/Manifest b/net-analyzer/nttcp/Manifest new file mode 100644 index 000000000000..a7ee5124092a --- /dev/null +++ b/net-analyzer/nttcp/Manifest @@ -0,0 +1 @@ +DIST nttcp-1.47.tar.gz 25693 BLAKE2B d15ae863bc49d2a26ff4b07de0d0dcfd94213126aae5be79fde51df8744316d4a4116ebc13e9cc5be81a87e11730b6e45b65002caa43160c698520756b6f9ca6 SHA512 eb0a5aa0633555a6e4c3834e99666cd0e00d41da5d82fdfd2644a9f59727236f1b24fbe810272cf9cfb96d76361b028bcf57025008570dbd6b0d761df5cce625 diff --git a/net-analyzer/nttcp/files/nttcp-1.47-format-security.patch b/net-analyzer/nttcp/files/nttcp-1.47-format-security.patch new file mode 100644 index 000000000000..514b5fa6e33b --- /dev/null +++ b/net-analyzer/nttcp/files/nttcp-1.47-format-security.patch @@ -0,0 +1,132 @@ +--- a/nttcp.c ++++ b/nttcp.c +@@ -372,7 +372,7 @@ + #define Message(x) fMessage(stdout, x) + + void Exit(char *s, int ret) { +- syslog(LOG_DEBUG, s); ++ syslog(LOG_DEBUG, "%s\n", s); + fMessage(stderr,s); + exit(ret); + } +@@ -694,7 +694,7 @@ + register int cnt; + if (opt.udp) { + struct sockaddr_in from; +- int len= sizeof(from); ++ socklen_t len= sizeof(from); + cnt= recvfrom(fd, buf, count, 0, (struct sockaddr *)&from, &len); + SysCalls++; + } +@@ -1150,8 +1150,8 @@ + int main(int argc, char *argv[]) { + + struct sockaddr_in PeerAddr; +- int PeerAddrLeng; +- char *DataPortFormat= "dataport: %d\n"; ++ socklen_t PeerAddrLeng; ++ const char DataPortFormat[]= "dataport: %d\n"; + int DataPort; + struct sockaddr_in sinlh; /* for control socket on local host */ + int fd; /* data socket to transport the data */ +@@ -1184,7 +1184,8 @@ + } + if (opt.inetd) { + /* we simulate inetd behaviour */ +- int nsrv, srv, fromleng; ++ int nsrv, srv; ++ socklen_t fromleng; + struct sockaddr_in sinsrv; + struct sockaddr_in frominet; + if (opt.Verbose) { +@@ -1285,7 +1286,7 @@ + Exit(MsgBuf, 2); + } + if (OptionLine[sizeof(OptionLine)-1] != '\0') { +- sprintf(MsgBuf, "%s: optionline longer than %d\n", ++ sprintf(MsgBuf, "%s: optionline longer than %zd\n", + myname, sizeof(OptionLine)-1); + Exit(MsgBuf, 3); + } +@@ -1308,7 +1309,7 @@ + Peer[PeerCount].fin= stdin; + Peer[PeerCount].fout= stdout; + syslog(LOG_DEBUG, +- "call from %.50 (=%.30s): done remote initial processing\n", ++ "call from %.50s (=%.30s): done remote initial processing\n", + Peer[PeerCount].HostName, Peer[PeerCount].IPName); + PeerCount++; + } +@@ -1617,7 +1618,7 @@ + sinlh.sin_family = AF_INET; + #if defined(MULTICAST) + if (opt.MulticastChannel) { +- int ml, p, join_group; ++ int p, join_group; + struct ip_mreq mreq; + sinlh.sin_port = htons(opt.MulticastPort); + if (bind(fd, (struct sockaddr *)&sinlh, sizeof(sinlh)) < 0) { +@@ -1640,7 +1641,6 @@ + sprintf(MsgBuf, DataPortFormat, DEFAULT_PORT); + + /* tell it our clients */ +- ml= strlen(MsgBuf); + for (p=0; p<PeerCount; p++) { + fputs(MsgBuf, Peer[p].fout); + fflush(Peer[p].fout); +@@ -1683,7 +1683,7 @@ + } + else { /* == TCP */ + struct sockaddr_in frominet; +- int fromleng; ++ socklen_t fromleng; + fromleng = sizeof(frominet); + memset(&frominet, 0, fromleng); + AlarmMsg= "accept timed out\n"; +@@ -1694,7 +1694,7 @@ + SetItVal(0); + if (opt.Verbose) { + struct sockaddr_in peer; +- int peerlen = sizeof(peer); ++ socklen_t peerlen = sizeof(peer); + if (getpeername(fd, (struct sockaddr *)&peer, &peerlen) < 0) + exitError("getpeername", 19); + sprintf(MsgBuf, +@@ -1732,7 +1732,7 @@ + + /* print window sizes */ + if (opt.Verbose) { +- int optlen; ++ socklen_t optlen; + int WinSize; + + optlen= sizeof(WinSize); +@@ -1899,8 +1899,8 @@ + * rcr real call reate in Calls/s (float) + * ccr cpu call rate in Calls/s (float) + */ +- char *iFormat= "%*.*ld"; +- char *fFormat= "%*.*f"; ++ const char iFormat[]= "%*.*ld"; ++ const char fFormat[]= "%*.*f"; + char *fs; + LenStr *TitleLine, *StatLine; + +@@ -2002,7 +2002,7 @@ + fs+= 2; + } + else if (*fs == 'l') { +- sprintf(MsgBuf, iFormat, fw, fp, opt.BufLen); ++ sprintf(MsgBuf, iFormat, fw, fp, (long int)opt.BufLen); + TitleStr= "BufLen"; + fs++; + } +@@ -2017,7 +2017,7 @@ + fs++; + } + else if (*fs == 'c') { +- sprintf(MsgBuf, iFormat, fw, fp, SysCalls); ++ sprintf(MsgBuf, iFormat, fw, fp, (long int)SysCalls); + TitleStr= "Calls"; + fs++; + } diff --git a/net-analyzer/nttcp/metadata.xml b/net-analyzer/nttcp/metadata.xml new file mode 100644 index 000000000000..fec0b53cbab8 --- /dev/null +++ b/net-analyzer/nttcp/metadata.xml @@ -0,0 +1,10 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<maintainer type="project"> + <email>netmon@gentoo.org</email> + <name>Gentoo network monitoring and analysis project</name> +</maintainer> +<longdescription>tool to test TCP and UDP throughput</longdescription> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/nttcp/nttcp-1.47-r1.ebuild b/net-analyzer/nttcp/nttcp-1.47-r1.ebuild new file mode 100644 index 000000000000..5d6f49f09066 --- /dev/null +++ b/net-analyzer/nttcp/nttcp-1.47-r1.ebuild @@ -0,0 +1,30 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 +inherit eutils toolchain-funcs + +DESCRIPTION="tool to test TCP and UDP throughput" +HOMEPAGE="http://www.leo.org/~elmar/nttcp/" +SRC_URI="http://www.leo.org/~elmar/nttcp/${P}.tar.gz" +LICENSE="public-domain" + +SLOT="0" +KEYWORDS="amd64 ~mips ~ppc x86" + +src_prepare() { + epatch "${FILESDIR}"/${P}-format-security.patch +} + +src_compile() { + emake \ + ARCH= \ + CC="$(tc-getCC)" \ + LFLAGS="${LDFLAGS}" \ + OPT="${CFLAGS}" +} + +src_install() { + dobin ${PN} + doman ${PN}.1 +} diff --git a/net-analyzer/nttcp/nttcp-1.47-r3.ebuild b/net-analyzer/nttcp/nttcp-1.47-r3.ebuild new file mode 100644 index 000000000000..f502164771a3 --- /dev/null +++ b/net-analyzer/nttcp/nttcp-1.47-r3.ebuild @@ -0,0 +1,30 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 +inherit eutils toolchain-funcs + +DESCRIPTION="tool to test TCP and UDP throughput" +HOMEPAGE="http://www.leo.org/~elmar/nttcp/" +SRC_URI="http://www.leo.org/~elmar/nttcp/${P}.tar.gz" +LICENSE="public-domain" + +SLOT="0" +KEYWORDS="amd64 ~mips ~ppc x86" + +src_prepare() { + epatch "${FILESDIR}"/${P}-format-security.patch +} + +src_compile() { + emake \ + ARCH= \ + CC="$(tc-getCC)" \ + LFLAGS="${LDFLAGS}" \ + OPT="${CFLAGS}" +} + +src_install() { + dobin ${PN} + doman ${PN}.1 +} diff --git a/net-analyzer/nuttcp/Manifest b/net-analyzer/nuttcp/Manifest new file mode 100644 index 000000000000..c7bb1cf75d83 --- /dev/null +++ b/net-analyzer/nuttcp/Manifest @@ -0,0 +1 @@ +DIST nuttcp-8.1.4.tar.bz2 13063356 BLAKE2B 374b76bed06615bf5966df5864c8987d5e8336eedd7450ccfef164e575f58ce2a22dbc1e0327e7740799560c30a03f9423d3fd50579fa01cd638059485c7f61b SHA512 ba6ff33bc1790c92f47d760d4588b128f60f0ca09ed43d95fd10b0edfb636a493b0d26b195e688a13b5b79fafc1cc52a0c73455263f921ff8ad0cf087f1d937b diff --git a/net-analyzer/nuttcp/files/nuttcp-8.1.4-makefile.patch b/net-analyzer/nuttcp/files/nuttcp-8.1.4-makefile.patch new file mode 100644 index 000000000000..02de62a80e70 --- /dev/null +++ b/net-analyzer/nuttcp/files/nuttcp-8.1.4-makefile.patch @@ -0,0 +1,21 @@ +--- a/Makefile 2017-10-29 08:39:34.209474792 +0200 ++++ b/Makefile 2017-10-29 15:11:02.082490459 +0200 +@@ -2,8 +2,7 @@ + #EXTRAVERSION=-pre1 + CC = gcc -Wall + #OPT = -g -O0 +-OPT = -O3 +-CFLAGS = $(OPT) $(NOIPV6) ++CFLAGS += $(OPT) $(NOIPV6) + LIBS = + ifneq ($(NOIPV6),) + APPEXTV6=-noipv6 +@@ -53,7 +52,7 @@ + # $(MAKE) CC=icc OPT="-w -O3 -parallel -unroll -align -xM -vec_report -par_report2" + + $(APP)$(EXTRAVERSION)$(APPEXT): $(APP)$(EXTRAVERSION).c $(LIBS) +- $(CC) $(CFLAGS) -o $@ $< $(LIBS) ++ $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $@ $< $(LIBS) + inet_ntop.o: missing/inet_ntop.c missing/config.h + $(CC) $(CFLAGS.MISSING) -o $@ -c $< + inet_pton.o: missing/inet_pton.c missing/config.h diff --git a/net-analyzer/nuttcp/files/nuttcp.confd b/net-analyzer/nuttcp/files/nuttcp.confd new file mode 100644 index 000000000000..a41d858550a1 --- /dev/null +++ b/net-analyzer/nuttcp/files/nuttcp.confd @@ -0,0 +1,5 @@ +# Config file for /etc/init.d/nuttcp + +# extra options (run nuttcp -h for a list of supported options) +# Parameter -S indicates that nuttcp acts as a server. +NUTTCP_OPTS="-S" diff --git a/net-analyzer/nuttcp/files/nuttcp.initd b/net-analyzer/nuttcp/files/nuttcp.initd new file mode 100644 index 000000000000..3ba80fab8f6e --- /dev/null +++ b/net-analyzer/nuttcp/files/nuttcp.initd @@ -0,0 +1,16 @@ +#!/sbin/openrc-run +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +command="/usr/bin/nuttcp" +command_background="yes" +command_args="${NUTTCP_OPTS}" +pidfile="/run/${RC_SVCNAME}.pid" + +depend() { + need net +} + +start_post() { + pgrep -n "${RC_SVCNAME%%.*}" > "${pidfile}" +} diff --git a/net-analyzer/nuttcp/metadata.xml b/net-analyzer/nuttcp/metadata.xml new file mode 100644 index 000000000000..677e21d8f92a --- /dev/null +++ b/net-analyzer/nuttcp/metadata.xml @@ -0,0 +1,24 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>spiderx@spiderx.dp.ua</email> + <name>Vladimir Pavljuchenkov</name> + </maintainer> + <maintainer type="project"> + <email>proxy-maint@gentoo.org</email> + <name>Proxy Maintainers</name> + </maintainer> + <longdescription lang="en"> + nuttcp is a network performance measurement tool intended for use + by network and system managers. Its most basic usage is to determine + the raw TCP (or UDP) network layer throughput by transferring memory + buffers from a source system across an interconnecting network to + a destination system, either transferring data for a specified time + interval, or alternatively transferring a specified number of bytes. + </longdescription> + <upstream> + <bugs-to>mailto:nuttcp@lcp.nrl.navy.mil</bugs-to> + </upstream> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/nuttcp/nuttcp-8.1.4.ebuild b/net-analyzer/nuttcp/nuttcp-8.1.4.ebuild new file mode 100644 index 000000000000..97c01c07adc1 --- /dev/null +++ b/net-analyzer/nuttcp/nuttcp-8.1.4.ebuild @@ -0,0 +1,62 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +inherit readme.gentoo-r1 systemd toolchain-funcs + +DESCRIPTION="Network performance measurement tool" +HOMEPAGE="http://www.nuttcp.net/" +SRC_URI="http://nuttcp.net/${PN}/${P}.tar.bz2" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="ipv6 xinetd" + +RDEPEND="xinetd? ( sys-apps/xinetd )" + +DOCS=( examples.txt README ) +# Honor CC, LDFLAGS, CFLAGS, CPPFLAGS +PATCHES=( "${FILESDIR}"/"${P}"-makefile.patch ) + +DOC_CONTENTS="Usage of nuttpc by its service name in xinetd service, +iptables rules, etc. will require adding these lines to /etc/services:\\n +nuttcp\\t\\t5000/tcp\\n +nuttcp-data\\t\\t5001/tcp\\n +nuttcp6\\t\\t5000/tcp\\n +nuttcp6-data\\t\\t5001/tcp\\n\\n +To run ${PN} in server mode, run:\\n/etc/init.d/${PN} start" + +src_prepare() { + default + + # Fix path to binary + sed -i '/server/s|/local||' xinetd.d/nuttcp || die "sed failed" +} + +src_compile() { + emake "$(usex ipv6 APPEXT='' NOIPV6=-DNO_IPV6)" CC="$(tc-getCC)" +} + +src_install() { + einstalldocs + doman "${PN}".8 + newbin "${P}$(usex ipv6 '' -noipv6)" "${PN}" + + newinitd "${FILESDIR}"/"${PN}".initd "${PN}" + newconfd "${FILESDIR}"/"${PN}".confd "${PN}" + systemd_dounit systemd/"${PN}"@.service + systemd_dounit systemd/"${PN}".socket + + if use xinetd ; then + insinto /etc/xinetd.d + doins xinetd.d/"${PN}" + fi + + readme.gentoo_create_doc +} + +pkg_postinst() { + readme.gentoo_print_elog +} diff --git a/net-analyzer/odhcploc/Manifest b/net-analyzer/odhcploc/Manifest new file mode 100644 index 000000000000..f5781687b5bc --- /dev/null +++ b/net-analyzer/odhcploc/Manifest @@ -0,0 +1 @@ +DIST odhcploc-20111021.tar.gz 13831 BLAKE2B c0eb71bc47bdf70fee5f701d6d3a6641110682c82f49f3ea38402526cd4f83e588cbd75272adfafae15e9e3d2c366a9b4004a0a6cfe478cd469c6507627f0e28 SHA512 3270b2bf25e079544805ceaba152e4d47a3cae3d78db0429b21c884686de8e0a872628a92390eebe5128ebcf9dcc3d14020420bb95ae8b367784ae4282d21556 diff --git a/net-analyzer/odhcploc/metadata.xml b/net-analyzer/odhcploc/metadata.xml new file mode 100644 index 000000000000..771eb4387347 --- /dev/null +++ b/net-analyzer/odhcploc/metadata.xml @@ -0,0 +1,16 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>jer@gentoo.org</email> + <name>Jeroen Roovers</name> + </maintainer> + <maintainer type="project"> + <email>netmon@gentoo.org</email> + <name>Gentoo network monitoring and analysis project</name> + </maintainer> + <upstream> + <remote-id type="sourceforge">odhcploc</remote-id> + </upstream> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/odhcploc/odhcploc-20111021-r1.ebuild b/net-analyzer/odhcploc/odhcploc-20111021-r1.ebuild new file mode 100644 index 000000000000..57f948763029 --- /dev/null +++ b/net-analyzer/odhcploc/odhcploc-20111021-r1.ebuild @@ -0,0 +1,23 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +inherit toolchain-funcs + +DESCRIPTION="Open DHCP Locator" +HOMEPAGE="http://odhcploc.sourceforge.net/" +SRC_URI="mirror://sourceforge/project/${PN}/${PV}/${P}.tar.gz" + +LICENSE="ISC" +SLOT="0" +KEYWORDS="~amd64" + +src_configure() { + tc-export CC +} + +src_install() { + dobin ${PN} + doman ${PN}.8 + dodoc AUTHORS +} diff --git a/net-analyzer/oinkmaster/Manifest b/net-analyzer/oinkmaster/Manifest new file mode 100644 index 000000000000..ab053bf236a1 --- /dev/null +++ b/net-analyzer/oinkmaster/Manifest @@ -0,0 +1 @@ +DIST oinkmaster-2.0.tar.gz 80111 BLAKE2B 486eecc69f046bafc056266f4329bc645dbec0aa46b0703b2ebec760db49146fec1e2d151075a7bf76fab158be6f93876ad4862a2de1ae29a35acf0e4410944e SHA512 03874462cff71e558d4383fef9e757eb4260b20f4b1de4741edcd49fec6effe32669e95edb637962b77b12c519deeb74adc3c15427d0e054e1b96e2f03ffdb3b diff --git a/net-analyzer/oinkmaster/metadata.xml b/net-analyzer/oinkmaster/metadata.xml new file mode 100644 index 000000000000..e5d5bd8e7919 --- /dev/null +++ b/net-analyzer/oinkmaster/metadata.xml @@ -0,0 +1,12 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>netmon@gentoo.org</email> + <name>Gentoo network monitoring and analysis project</name> + </maintainer> + <upstream> + <remote-id type="sourceforge">oinkmaster</remote-id> + </upstream> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/oinkmaster/oinkmaster-2.0.ebuild b/net-analyzer/oinkmaster/oinkmaster-2.0.ebuild new file mode 100644 index 000000000000..35f0ef818c0b --- /dev/null +++ b/net-analyzer/oinkmaster/oinkmaster-2.0.ebuild @@ -0,0 +1,40 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 +inherit eutils + +DESCRIPTION="Rule management for SNORT" +SRC_URI="mirror://sourceforge/oinkmaster/${P}.tar.gz" +HOMEPAGE="http://oinkmaster.sf.net/" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="amd64 ~arm ppc sparc x86" +IUSE="X" + +RDEPEND=" + >=dev-lang/perl-5.6.1 + X? ( dev-perl/Tk ) + net-misc/wget + app-arch/tar + app-arch/gzip +" + +src_install() { + dobin \ + contrib/addmsg.pl \ + contrib/addsid.pl \ + contrib/create-sidmap.pl \ + contrib/makesidex.pl \ + oinkmaster.pl + + use X && dobin contrib/oinkgui.pl + + dodoc FAQ README README.gui README.win32 UPGRADING contrib/README.contrib + + doman oinkmaster.1 + + insinto /etc + doins oinkmaster.conf +} diff --git a/net-analyzer/openbsd-netcat/Manifest b/net-analyzer/openbsd-netcat/Manifest new file mode 100644 index 000000000000..0ccf2ff4923b --- /dev/null +++ b/net-analyzer/openbsd-netcat/Manifest @@ -0,0 +1,6 @@ +DIST netcat-openbsd_1.105-7.debian.tar.gz 31843 BLAKE2B 115eb2d0c0f35055eb26608746806ba97d15b9320954b5d531a73f3f76ed22238395797e90bc3e60dd9cf5b31e696eec59843f37001093013ed0ef82ae590126 SHA512 ec507c858a9f0e75f5a8d6ee8e60eef5200428e55091e831a7acba6c61d70f97af01103c9b65354b0ce773214b0758d957852af793debb70be8aab5b5900b3f6 +DIST netcat-openbsd_1.105.orig.tar.gz 14891 BLAKE2B 65119a4e2cb3d9cd7b2d7d346b827ff1c175cc3255f40d70bbd45213b438635d6b063b3cf210d27595e38b0d67339788221ae5c3737e6096782245fb573bca3a SHA512 1e515b5af83a12c6f270d6e8bede6406cc7c9f83ca0e316816508dfe2e2c49cda3fffb6b24a3922bf9908dc8b70d540eb8cc49e9cbfe867e49133c004d3f4703 +DIST netcat-openbsd_1.190-2.debian.tar.xz 34836 BLAKE2B 3ff4390c07d05e8d1a19c8696da12bdc6bba07c6e88281b04cd7915509f44a14dda66462128da768b255d92f3a02d008750a860db9290f9f8e0e0bb9dd66e01b SHA512 c33510ad6761627e0b7e564747f6ae82c7569157bdc91f6a282a97b038b2b0917c27fdfba137462c7c34d84fcfdfe8b6393204884d153e3d200a86f5c6657a9a +DIST netcat-openbsd_1.190.orig.tar.gz 22384 BLAKE2B c3e83106f53a0214f71c805b1dfe6b66718dfca217f713a0d7016cb0a3c75c78580fbdd277bd7b5324371145c4b986ebb867e6f779cd61ffecb8e732ebabcb84 SHA512 32310813391f63b8283dc4a63e52821e464ecbfcd0ea995e8e15047c6252a86b31eb4725dc69b778594c43d6ce0cc081aa0f00d7cda0587c91941f20b93a33fe +DIST netcat-openbsd_1.195-2.debian.tar.xz 35984 BLAKE2B eedac24eedc243ad1d58576be76f4f98392e1f455863fa3cdc06bde2714612819b7dfa98dd45c1739a65680469460410f5e4b2f4144f4c24fea04b59dda4d0da SHA512 2a5cc6d04112fdde007be4b9adb3aee44060570c0cb2ae0e33e54af3d37c0b2ff4d6c96edf1f16047365106c7c3720195b38417af3c332226c9be81d49caa552 +DIST netcat-openbsd_1.195.orig.tar.gz 22480 BLAKE2B 53c750c168d7ea5dc2ca653598e42700e2b3ee888d946a09503a22fa3bcbc2c73658f38787314bef628d609ad370223f6889b7019760bf51817f73fc570e1dcc SHA512 ea95cda028f2759835ea8832db0174c178b002d5a917f4c51594445a5377a30d6114ac261071eea98d3d0b60ae1ec72102609db1625dbc5a6e57c67e28d2ff51 diff --git a/net-analyzer/openbsd-netcat/files/openbsd-netcat-1.105-darwin.patch b/net-analyzer/openbsd-netcat/files/openbsd-netcat-1.105-darwin.patch new file mode 100644 index 000000000000..8c68a66ad548 --- /dev/null +++ b/net-analyzer/openbsd-netcat/files/openbsd-netcat-1.105-darwin.patch @@ -0,0 +1,86 @@ +Allow compilation on Darwin + +--- netcat.c ++++ netcat.c +@@ -43,11 +43,13 @@ + #include <arpa/telnet.h> + #include <arpa/inet.h> + ++#ifndef IPTOS_LOWCOST ++# define IPTOS_LOWCOST 0x02 ++#endif + #ifndef IPTOS_LOWDELAY + # define IPTOS_LOWDELAY 0x10 + # define IPTOS_THROUGHPUT 0x08 + # define IPTOS_RELIABILITY 0x04 +-# define IPTOS_LOWCOST 0x02 + # define IPTOS_MINCOST IPTOS_LOWCOST + #endif /* IPTOS_LOWDELAY */ + +@@ -96,8 +98,9 @@ + #include <unistd.h> + #include <fcntl.h> + #include <limits.h> +-#include <bsd/stdlib.h> +-#include <bsd/string.h> ++#include <stdlib.h> ++#include <string.h> ++#include <ctype.h> + #include "atomicio.h" + + #ifndef SUN_LEN +@@ -169,6 +172,43 @@ + socklen_t salen, int ctimeout); + static void quit(); + ++static char* strtonumerrs[] = { ++ "too large", ++ "too small", ++ "invalid" ++}; ++ ++static long long ++strtonum( ++ const char *nptr, ++ long long minval, ++ long long maxval, ++ const char **errstr) ++{ ++ long long val; ++ ++ while (*nptr != '\0' && isspace(*nptr)) ++ nptr++; ++ if (*nptr == '\0') { ++ if (errstr != NULL) ++ *errstr = strtonumerrs[2]; ++ return 0; ++ } ++ val = atoll(nptr); ++ if (val < minval) { ++ if (errstr != NULL) ++ *errstr = strtonumerrs[1]; ++ return 0; ++ } ++ if (val > maxval) { ++ if (errstr != NULL) ++ *errstr = strtonumerrs[0]; ++ return 0; ++ } ++ *errstr = NULL; ++ return val; ++} ++ + int + main(int argc, char *argv[]) + { +--- socks.c ++++ socks.c +@@ -38,7 +38,7 @@ + #include <string.h> + #include <unistd.h> + #include <resolv.h> +-#include <bsd/readpassphrase.h> ++#include <readpassphrase.h> + #include "atomicio.h" + + #define SOCKS_PORT "1080" diff --git a/net-analyzer/openbsd-netcat/files/openbsd-netcat-1.190-darwin.patch b/net-analyzer/openbsd-netcat/files/openbsd-netcat-1.190-darwin.patch new file mode 100644 index 000000000000..e1a462e746b7 --- /dev/null +++ b/net-analyzer/openbsd-netcat/files/openbsd-netcat-1.190-darwin.patch @@ -0,0 +1,137 @@ +Allow compilation on Darwin + +diff --git a/netcat.c b/netcat.c +index a0fb51b..bbb5dd1 100644 +--- a/netcat.c ++++ b/netcat.c +@@ -51,11 +51,13 @@ + # include <bsd/readpassphrase.h> + #endif + ++#ifndef IPTOS_LOWCOST ++# define IPTOS_LOWCOST 0x02 ++#endif + #ifndef IPTOS_LOWDELAY + # define IPTOS_LOWDELAY 0x10 + # define IPTOS_THROUGHPUT 0x08 + # define IPTOS_RELIABILITY 0x04 +-# define IPTOS_LOWCOST 0x02 + # define IPTOS_MINCOST IPTOS_LOWCOST + #endif /* IPTOS_LOWDELAY */ + +@@ -108,8 +110,9 @@ + # include <tls.h> + #endif + #include <unistd.h> +-#include <bsd/stdlib.h> +-#include <bsd/string.h> ++#include <stdlib.h> ++#include <string.h> ++#include <ctype.h> + + #include "atomicio.h" + +@@ -240,6 +243,43 @@ static int connect_with_timeout(int fd, const struct sockaddr *sa, + + static void quit(); + ++static char* strtonumerrs[] = { ++ "too large", ++ "too small", ++ "invalid" ++}; ++ ++static long long ++strtonum( ++ const char *nptr, ++ long long minval, ++ long long maxval, ++ const char **errstr) ++{ ++ long long val; ++ ++ while (*nptr != '\0' && isspace(*nptr)) ++ nptr++; ++ if (*nptr == '\0') { ++ if (errstr != NULL) ++ *errstr = strtonumerrs[2]; ++ return 0; ++ } ++ val = atoll(nptr); ++ if (val < minval) { ++ if (errstr != NULL) ++ *errstr = strtonumerrs[1]; ++ return 0; ++ } ++ if (val > maxval) { ++ if (errstr != NULL) ++ *errstr = strtonumerrs[0]; ++ return 0; ++ } ++ *errstr = NULL; ++ return val; ++} ++ + int + main(int argc, char *argv[]) + { +@@ -814,9 +814,8 @@ + # endif + } else { + len = sizeof(cliaddr); +- connfd = accept4(s, (struct sockaddr *)&cliaddr, +- &len, SOCK_NONBLOCK); +- if (connfd == -1) { ++ connfd = accept(s, (struct sockaddr *)&cliaddr, &len); ++ if (connfd == -1 || fcntl(connfd, F_SETFL, O_NONBLOCK) == -1) { + /* For now, all errnos are fatal */ + err(1, "accept"); + } +@@ -1092,14 +1091,16 @@ + int s, save_errno; + + if (uflag) { +- if ((s = unix_bind(unix_dg_tmp_socket, SOCK_CLOEXEC)) < 0) ++ if ((s = unix_bind(unix_dg_tmp_socket, 0)) < 0) + return -1; + } else { +- if ((s = socket(AF_UNIX, SOCK_STREAM | SOCK_CLOEXEC, 0)) < 0) { ++ if ((s = socket(AF_UNIX, SOCK_STREAM, 0)) < 0) { + errx(1,"create unix socket failed"); + return -1; + } + } ++ if (fcntl(s, F_SETFD, FD_CLOEXEC) == -1) ++ return -1; + + memset(&s_un, 0, sizeof(struct sockaddr_un)); + s_un.sun_family = AF_UNIX; +@@ -1174,9 +1175,13 @@ + port, gai_strerror(error)); + + for (res = res0; res; res = res->ai_next) { +- if ((s = socket(res->ai_family, res->ai_socktype | +- SOCK_NONBLOCK, res->ai_protocol)) < 0) ++ if ((s = socket(res->ai_family, res->ai_socktype, ++ res->ai_protocol)) < 0) ++ continue; ++ if (fcntl(s, F_SETFL, O_NONBLOCK) == -1) { ++ close(s); + continue; ++ } + + /* Bind to a local port or source address if specified. */ + if (sflag || pflag) { +diff --git a/socks.c b/socks.c +index 9068f39..68b68e3 100644 +--- a/socks.c ++++ b/socks.c +@@ -38,7 +38,7 @@ + #include <string.h> + #include <unistd.h> + #include <resolv.h> +-#include <bsd/readpassphrase.h> ++#include <readpassphrase.h> + #include "atomicio.h" + + #define SOCKS_PORT "1080" diff --git a/net-analyzer/openbsd-netcat/metadata.xml b/net-analyzer/openbsd-netcat/metadata.xml new file mode 100644 index 000000000000..55441ef94d59 --- /dev/null +++ b/net-analyzer/openbsd-netcat/metadata.xml @@ -0,0 +1,12 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<maintainer type="person"> + <email>heroxbd@gentoo.org</email> + <name>Benda Xu</name> +</maintainer> +<longdescription lang="en"> + This package provides the openbsd linux port of netcat. +</longdescription> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/openbsd-netcat/openbsd-netcat-1.105-r1.ebuild b/net-analyzer/openbsd-netcat/openbsd-netcat-1.105-r1.ebuild new file mode 100644 index 000000000000..298a47420fd0 --- /dev/null +++ b/net-analyzer/openbsd-netcat/openbsd-netcat-1.105-r1.ebuild @@ -0,0 +1,54 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +inherit toolchain-funcs eutils + +DESCRIPTION="The OpenBSD network swiss army knife" +HOMEPAGE="http://www.openbsd.org/cgi-bin/cvsweb/src/usr.bin/nc/" +SRC_URI="http://http.debian.net/debian/pool/main/n/netcat-openbsd/netcat-openbsd_${PV}.orig.tar.gz + http://http.debian.net/debian/pool/main/n/netcat-openbsd/netcat-openbsd_${PV}-7.debian.tar.gz" +LICENSE="BSD" +SLOT="0" +IUSE="elibc_Darwin" + +KEYWORDS="~amd64 ~ppc64 ~x86 ~amd64-linux ~x64-macos" + +DEPEND="virtual/pkgconfig" +RDEPEND="!elibc_Darwin? ( dev-libs/libbsd ) + !net-analyzer/netcat + !net-analyzer/netcat6 +" + +S=${WORKDIR}/netcat-openbsd-${PV} + +PATCHES=( "${WORKDIR}/debian/patches" ) + +src_prepare() { + default + if [[ ${CHOST} == *-darwin* ]] ; then + # this undoes some of the Debian/Linux changes + epatch "${FILESDIR}"/${P}-darwin.patch + fi +} + +src_compile() { + emake CC=$(tc-getCC) CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}" +} + +src_install() { + dobin nc + doman nc.1 + cd "${WORKDIR}/debian" + newdoc netcat-openbsd.README.Debian README + dodoc -r examples +} + +pkg_postinst() { + if [[ ${KERNEL} = "linux" ]]; then + ewarn "FO_REUSEPORT is introduced in linux 3.9. If your running kernel is older" + ewarn "and kernel header is newer, nc will not listen correctly. Matching the header" + ewarn "to the running kernel will do. See bug #490246 for details." + fi +} diff --git a/net-analyzer/openbsd-netcat/openbsd-netcat-1.105.ebuild b/net-analyzer/openbsd-netcat/openbsd-netcat-1.105.ebuild new file mode 100644 index 000000000000..34432cdfd0dd --- /dev/null +++ b/net-analyzer/openbsd-netcat/openbsd-netcat-1.105.ebuild @@ -0,0 +1,37 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +DESCRIPTION="the OpenBSD network swiss army knife" +HOMEPAGE="http://www.openbsd.org/cgi-bin/cvsweb/src/usr.bin/nc/" +SRC_URI="http://http.debian.net/debian/pool/main/n/netcat-openbsd/netcat-openbsd_${PV}.orig.tar.gz + http://http.debian.net/debian/pool/main/n/netcat-openbsd/netcat-openbsd_${PV}-7.debian.tar.gz" +LICENSE="BSD" +SLOT="0" + +KEYWORDS="~amd64 ~x86 ~amd64-linux ~x64-macos" + +DEPEND="virtual/pkgconfig" +RDEPEND="dev-libs/libbsd" + +S=${WORKDIR}/netcat-openbsd-${PV} + +PATCHES=( "${WORKDIR}/debian/patches" ) + +src_install() { + # avoid name conflict against net-analyzer/netcat + newbin nc nc.openbsd + newman nc.1 nc.openbsd.1 + cd "${WORKDIR}/debian" + newdoc netcat-openbsd.README.Debian README + dodoc -r examples +} + +pkg_postinst() { + if [[ ${KERNEL} = "linux" ]]; then + ewarn "FO_REUSEPORT is introduced in linux 3.9. If your running kernel is older" + ewarn "and kernel header is newer, nc will not listen correctly. Matching the header" + ewarn "to the running kernel will do. See bug #490246 for details." + fi +} diff --git a/net-analyzer/openbsd-netcat/openbsd-netcat-1.190.ebuild b/net-analyzer/openbsd-netcat/openbsd-netcat-1.190.ebuild new file mode 100644 index 000000000000..83108311916c --- /dev/null +++ b/net-analyzer/openbsd-netcat/openbsd-netcat-1.190.ebuild @@ -0,0 +1,56 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit toolchain-funcs + +DESCRIPTION="The OpenBSD network swiss army knife" +HOMEPAGE="https://cvsweb.openbsd.org/src/usr.bin/nc/ + https://salsa.debian.org/debian/netcat-openbsd" +SRC_URI="http://http.debian.net/debian/pool/main/n/netcat-openbsd/netcat-openbsd_${PV}.orig.tar.gz + http://http.debian.net/debian/pool/main/n/netcat-openbsd/netcat-openbsd_${PV}-2.debian.tar.xz" +LICENSE="BSD" +SLOT="0" +IUSE="elibc_Darwin" + +KEYWORDS="amd64 ~arm64 ~ppc64 x86 ~amd64-linux ~x64-macos" + +DEPEND="virtual/pkgconfig" +RDEPEND="!elibc_Darwin? ( dev-libs/libbsd ) + !net-analyzer/netcat + !net-analyzer/netcat6 +" + +S=${WORKDIR}/netcat-openbsd-${PV} + +src_prepare() { + for i_patch in $(<"${WORKDIR}"/debian/patches/series); do + eapply "${WORKDIR}"/debian/patches/"${i_patch}" + done + if [[ ${CHOST} == *-darwin* ]] ; then + # this undoes some of the Debian/Linux changes + eapply "${FILESDIR}"/${P}-darwin.patch + fi + default +} + +src_compile() { + emake CC=$(tc-getCC) CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}" +} + +src_install() { + dobin nc + doman nc.1 + cd "${WORKDIR}"/debian || die + newdoc netcat-openbsd.README.Debian README + dodoc -r examples +} + +pkg_postinst() { + if [[ ${KERNEL} = "linux" ]]; then + ewarn "SO_REUSEPORT is introduced in linux 3.9. If your running kernel is older" + ewarn "and kernel header is newer, nc will not listen correctly. Matching the header" + ewarn "to the running kernel will do. See bug #490246 for details." + fi +} diff --git a/net-analyzer/openbsd-netcat/openbsd-netcat-1.195.ebuild b/net-analyzer/openbsd-netcat/openbsd-netcat-1.195.ebuild new file mode 100644 index 000000000000..363c5e7a8193 --- /dev/null +++ b/net-analyzer/openbsd-netcat/openbsd-netcat-1.195.ebuild @@ -0,0 +1,56 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit toolchain-funcs + +DESCRIPTION="The OpenBSD network swiss army knife" +HOMEPAGE="https://cvsweb.openbsd.org/src/usr.bin/nc/ + https://salsa.debian.org/debian/netcat-openbsd" +SRC_URI="http://http.debian.net/debian/pool/main/n/netcat-openbsd/netcat-openbsd_${PV}.orig.tar.gz + http://http.debian.net/debian/pool/main/n/netcat-openbsd/netcat-openbsd_${PV}-2.debian.tar.xz" +LICENSE="BSD" +SLOT="0" +IUSE="elibc_Darwin" + +KEYWORDS="~amd64 ~arm64 ~ppc64 ~x86 ~amd64-linux ~x64-macos" + +DEPEND="virtual/pkgconfig" +RDEPEND="!elibc_Darwin? ( dev-libs/libbsd ) + !net-analyzer/netcat + !net-analyzer/netcat6 +" + +S=${WORKDIR}/netcat-openbsd-${PV} + +src_prepare() { + for i_patch in $(<"${WORKDIR}"/debian/patches/series); do + eapply "${WORKDIR}"/debian/patches/"${i_patch}" + done + if [[ ${CHOST} == *-darwin* ]] ; then + # this undoes some of the Debian/Linux changes + eapply "${FILESDIR}"/${P}-darwin.patch + fi + default +} + +src_compile() { + emake CC=$(tc-getCC) CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}" +} + +src_install() { + dobin nc + doman nc.1 + cd "${WORKDIR}"/debian || die + newdoc netcat-openbsd.README.Debian README + dodoc -r examples +} + +pkg_postinst() { + if [[ ${KERNEL} = "linux" ]]; then + ewarn "SO_REUSEPORT is introduced in linux 3.9. If your running kernel is older" + ewarn "and kernel header is newer, nc will not listen correctly. Matching the header" + ewarn "to the running kernel will do. See bug #490246 for details." + fi +} diff --git a/net-analyzer/openvas-scanner/Manifest b/net-analyzer/openvas-scanner/Manifest new file mode 100644 index 000000000000..d7b9bcd11fab --- /dev/null +++ b/net-analyzer/openvas-scanner/Manifest @@ -0,0 +1,2 @@ +DIST openvas-scanner-6.0.1.tar.gz 522100 BLAKE2B af82b41736329bd90ba1ea73a0ace36d4115375f81a7aaff5d3bd50f21cfa3195cdf4012aa952da52c4103a31475de5c5790ef3e2e36180aa06737371fa0e5a0 SHA512 db4087fffe1d50e232fa1e51325cf7f142237e2bd3cc5dcaa1e7058a4871300f352f2c0e700eae72ea9412c347b072e9d1f2eca508b27cb30f36c6895ec95147 +DIST openvas-scanner-7.0.0.tar.gz 428304 BLAKE2B fa0a21127edd2223dbbf533b6c188729a1b6de4977e5667fbc1a45b2c426045cdc73eb58d05df24b8b39d0e47fb445fa704bd1b827bb5ea6403fdb83c6b01fd9 SHA512 ce3e78ce5e1575c5c37b6c2aa77ec8955754029832bafb3fcedd75b48dff309906a97bac052d206f6e93e9e72b8461a131558e849f70b3afce6280a7b06924d1 diff --git a/net-analyzer/openvas-scanner/files/gvm-feed-sync.cron b/net-analyzer/openvas-scanner/files/gvm-feed-sync.cron new file mode 100644 index 000000000000..5563b92929b1 --- /dev/null +++ b/net-analyzer/openvas-scanner/files/gvm-feed-sync.cron @@ -0,0 +1 @@ +0 2 * * * gvm [ -x /etc/gvm/gvm-feed-sync.sh ] && /bin/bash /etc/gvm/gvm-feed-sync.sh > /dev/null diff --git a/net-analyzer/openvas-scanner/files/gvm-feed-sync.sh b/net-analyzer/openvas-scanner/files/gvm-feed-sync.sh new file mode 100644 index 000000000000..ba21632a4d6c --- /dev/null +++ b/net-analyzer/openvas-scanner/files/gvm-feed-sync.sh @@ -0,0 +1,45 @@ +#!/bin/sh +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 +# GVM cron script that updates feed. + +# Start to update FEED & First NVT. +try=0 +until [ $try -ge 5 ]; do + greenbone-nvt-sync --curl &>/dev/null && break + try=$[$try+1] + sleep 30 +done + +# Check status +if [ $? -eq 0 ]; then + # Avoid your IP temporary banned because of multiple connection + sleep 5 + # Try to update scapdata. + try=0 + until [ $try -ge 5 ]; do + greenbone-scapdata-sync &>/dev/null && break + try=$[$try+1] + sleep 30 + done + + # Check status + if [ $? -eq 0 ]; then + # Avoid your IP temporary banned because of multiple connection + sleep 5 + # Try to update certdata + try=0 + until [ $try -ge 5 ]; do + greenbone-certdata-sync &>/dev/null && break + try=$[$try+1] + sleep 30 + done + + # Check status + if [ $? -eq 0 ]; then + exit 0 + else + exit 1 + fi + fi +fi diff --git a/net-analyzer/openvas-scanner/files/openvas-scanner-6.0.1-sbin.patch b/net-analyzer/openvas-scanner/files/openvas-scanner-6.0.1-sbin.patch new file mode 100644 index 000000000000..d5b8a2a6b62f --- /dev/null +++ b/net-analyzer/openvas-scanner/files/openvas-scanner-6.0.1-sbin.patch @@ -0,0 +1,21 @@ +--- a/src/CMakeLists.txt 2019-07-21 23:16:18.608251465 +0300 ++++ b/src/CMakeLists.txt 2019-07-21 23:17:08.434210058 +0300 +@@ -175,7 +175,7 @@ + ## Install + + install (TARGETS openvassd +- RUNTIME DESTINATION ${SBINDIR} ++ RUNTIME DESTINATION ${BINDIR} + PERMISSIONS OWNER_EXECUTE OWNER_READ OWNER_WRITE + GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE) + +@@ -183,7 +183,7 @@ + DESTINATION ${OPENVAS_SYSCONF_DIR}) + + install (FILES ${CMAKE_BINARY_DIR}/tools/greenbone-nvt-sync +- DESTINATION ${SBINDIR} ++ DESTINATION ${BINDIR} + PERMISSIONS OWNER_EXECUTE OWNER_READ OWNER_WRITE + GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE) + + diff --git a/net-analyzer/openvas-scanner/files/openvas.conf b/net-analyzer/openvas-scanner/files/openvas.conf new file mode 100644 index 000000000000..487e643834b8 --- /dev/null +++ b/net-analyzer/openvas-scanner/files/openvas.conf @@ -0,0 +1 @@ +db_address = /tmp/redis.sock diff --git a/net-analyzer/openvas-scanner/files/openvassd-daemon.conf b/net-analyzer/openvas-scanner/files/openvassd-daemon.conf new file mode 100644 index 000000000000..6bb70d165355 --- /dev/null +++ b/net-analyzer/openvas-scanner/files/openvassd-daemon.conf @@ -0,0 +1,17 @@ +# OpenVAS Scanner command args + +# e.g --foreground +OPENVAS_SCANNER_OPTIONS="" + +# Scanner listen socket +OPENVAS_SCANNER_LISTEN_SOCKET="--unix-socket=/var/run/openvassd.sock" + +# Scanner listen owner +OPENVAS_SCANNER_LISTEN_OWNER="--listen-owner=gvm" + +# Scanner listen group +OPENVAS_SCANNER_LISTEN_GROUP="--listen-group=gvm" + +# Scanner listen mode +OPENVAS_SCANNER_LISTEN_MODE="--listen-mode=755" + diff --git a/net-analyzer/openvas-scanner/files/openvassd.gvm.conf b/net-analyzer/openvas-scanner/files/openvassd.gvm.conf new file mode 100644 index 000000000000..5dfb8b527454 --- /dev/null +++ b/net-analyzer/openvas-scanner/files/openvassd.gvm.conf @@ -0,0 +1,124 @@ +# You can get detailed informations from https://linux.die.net/man/8/openvassd +# Configuration file of the OpenVAS Security Scanner +# Every line starting with a '#' is a comment + +[Misc] + +# Path to the security checks folder: +plugins_folder = /var/lib/openvas/plugins + +# Path to OpenVAS caching folder: +cache_folder = /var/cache/openvas + +# Path to OpenVAS include directories: +# (multiple entries are separated with colon ':') +include_folders = /var/lib/openvas/plugins + +# Config File +config_file = /etc/openvas/openvassd.conf + +# Maximum number of simultaneous hosts tested : +max_hosts = 30 + +# Maximum number of simultaneous checks against each host tested : +max_checks = 10 + +# Niceness. If set to 'yes', openvassd will renice itself to 10. +be_nice = no + +# Log file (or 'syslog') : +logfile = /var/log/gvm/openvassd.log + +# Shall we log every details of the attack ? (disk intensive) +log_whole_attack = no + +# Log the name of the plugins that are loaded by the server ? +log_plugins_name_at_load = no + +# Dump file for debugging output, use `-' for stdout +dumpfile = /var/log/gvm/openvassd.dump + +# Rules file : +rules = /etc/openvas/openvassd.rules + +# CGI paths to check for (cgi-bin:/cgi-aws:/ can do) +cgi_path = /cgi-bin:/scripts + +# Range of the ports the port scanners will scan : +# 'default' means that OpenVAS will scan ports found in its +# services file. +port_range = default + +# Optimize the test (recommended) : +# Turn off for push hard but increase false positive and slow down scans +optimize_test = yes + +# Optimization : +# Read timeout for the sockets of the tests : +checks_read_timeout = 5 + +# Ports against which two plugins should not be run simultaneously : +# non_simult_ports = Services/www, 139, Services/finger +non_simult_ports = 139, 445 + +# Maximum lifetime of a plugin (in seconds) : +plugins_timeout = 320 + +# Safe checks rely on banner grabbing & If enabled push harder to target: +safe_checks = yes + +# Automatically activate the plugins that are depended on +auto_enable_dependencies = yes + +# Do not echo data from plugins which have been automatically enabled +silent_dependencies = no + +# Designate hosts by MAC address, not IP address (useful for DHCP networks) +use_mac_addr = no + + +#--- Knowledge base saving (can be configured by the client) : +# Save the knowledge base on disk : +save_knowledge_base = no + +# Restore the KB for each test : +kb_restore = no + +# Only test hosts whose KB we do not have : +only_test_hosts_whose_kb_we_dont_have = no + +# Only test hosts whose KB we already have : +only_test_hosts_whose_kb_we_have = no + +# KB test replay : +kb_dont_replay_scanners = no +kb_dont_replay_info_gathering = no +kb_dont_replay_attacks = no +kb_dont_replay_denials = no +kb_max_age = 864000 +#--- end of the KB section + +# Redis socket default setting +db_address = /tmp/redis.sock + +# If this option is set, OpenVAS will not scan a network incrementally +# (10.0.0.1, then 10.0.0.2, 10.0.0.3 and so on..) but will attempt to +# slice the workload throughout the whole network (ie: it will scan +# 10.0.0.1, then 10.0.0.127, then 10.0.0.2, then 10.0.0.128 and so on... +slice_network_addresses = no + +# Should consider all the NASL scripts as being signed ? (unsafe if set to 'yes') +nasl_no_signature_check = yes + +#Certificates +cert_file=/var/lib/gvm/CA/servercert.pem +key_file=/var/lib/gvm/private/CA/serverkey.pem +ca_file=/var/lib/gvm/CA/cacert.pem + +# If you decide to protect your private key with a password, +# uncomment and change next line +# pem_password=password +# If you want to force the use of a client certificate, uncomment next line +# force_pubkey_auth = yes + +#end. diff --git a/net-analyzer/openvas-scanner/files/openvassd.init b/net-analyzer/openvas-scanner/files/openvassd.init new file mode 100644 index 000000000000..9bd7332134fc --- /dev/null +++ b/net-analyzer/openvas-scanner/files/openvassd.init @@ -0,0 +1,14 @@ +#!/sbin/openrc-run +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +name="Open Vulnerability Assessment Scanner" +command="/usr/bin/openvassd" +command_args="${OPENVAS_SCANNER_OPTIONS} ${OPENVAS_SCANNER_LISTEN_SOCKET} ${OPENVAS_SCANNER_LISTEN_OWNER} ${OPENVAS_SCANNER_LISTEN_GROUP} ${OPENVAS_SCANNER_LISTEN_MODE}" +pidfile="/run/openvassd.pid" +command_background="true" + +depend() { + after bootmisc + need localmount net redis +} diff --git a/net-analyzer/openvas-scanner/files/openvassd.logrotate b/net-analyzer/openvas-scanner/files/openvassd.logrotate new file mode 100644 index 000000000000..9cf47d54763d --- /dev/null +++ b/net-analyzer/openvas-scanner/files/openvassd.logrotate @@ -0,0 +1,13 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 +# Daemon ignore HUP so we use 'copytruncate' instead of 'create' +# with safe file size to prevent losing log entries. + +/var/log/gvm/openvassd.log { + compress + missingok + notifempty + sharedscripts + copytruncate + maxsize 10M +} diff --git a/net-analyzer/openvas-scanner/files/openvassd.service b/net-analyzer/openvas-scanner/files/openvassd.service new file mode 100644 index 000000000000..b7d7df8bbab0 --- /dev/null +++ b/net-analyzer/openvas-scanner/files/openvassd.service @@ -0,0 +1,16 @@ +[Unit] +Description=Open Vulnerability Assessment Scanner +After=network.target +After=redis.service +Before=gvmd.service +Requires=redis.service + +[Service] +Type=forking +EnvironmentFile=-/etc/openvas/sysconfig/openvassd-daemon.conf +ExecStart=/usr/bin/openvassd $OPENVAS_SCANNER_OPTIONS $OPENVAS_SCANNER_LISTEN_SOCKET $OPENVAS_SCANNER_LISTEN_OWNER $OPENVAS_SCANNER_LISTEN_GROUP $OPENVAS_SCANNER_LISTEN_MODE +Restart=on-failure +RestartSec=10 + +[Install] +WantedBy=multi-user.target diff --git a/net-analyzer/openvas-scanner/files/redis.conf.example b/net-analyzer/openvas-scanner/files/redis.conf.example new file mode 100644 index 000000000000..6a41211aaae8 --- /dev/null +++ b/net-analyzer/openvas-scanner/files/redis.conf.example @@ -0,0 +1,57 @@ +bind 127.0.0.1 +protected-mode yes +port 0 +tcp-backlog 511 +unixsocket /tmp/redis.sock +unixsocketperm 700 +timeout 0 +tcp-keepalive 300 +daemonize no +supervised no +pidfile /run/redis/redis.pid +loglevel notice +logfile /var/log/redis/redis.log +databases 16 +always-show-logo yes +stop-writes-on-bgsave-error yes +rdbcompression yes +rdbchecksum yes +dbfilename dump.rdb +dir /var/lib/redis/ +slave-serve-stale-data yes +slave-read-only yes +repl-diskless-sync no +repl-diskless-sync-delay 5 +repl-disable-tcp-nodelay no +slave-priority 100 +lazyfree-lazy-eviction no +lazyfree-lazy-expire no +lazyfree-lazy-server-del no +slave-lazy-flush no +appendonly no +appendfilename "appendonly.aof" +appendfsync everysec +no-appendfsync-on-rewrite no +auto-aof-rewrite-percentage 100 +auto-aof-rewrite-min-size 64mb +aof-load-truncated yes +aof-use-rdb-preamble no +lua-time-limit 5000 +slowlog-log-slower-than 10000 +slowlog-max-len 128 +latency-monitor-threshold 0 +notify-keyspace-events "" +hash-max-ziplist-entries 512 +hash-max-ziplist-value 64 +list-max-ziplist-size -2 +list-compress-depth 0 +set-max-intset-entries 512 +zset-max-ziplist-entries 128 +zset-max-ziplist-value 64 +hll-sparse-max-bytes 3000 +activerehashing yes +client-output-buffer-limit normal 0 0 0 +client-output-buffer-limit slave 256mb 64mb 60 +client-output-buffer-limit pubsub 32mb 8mb 60 +hz 10 +aof-rewrite-incremental-fsync yes diff --git a/net-analyzer/openvas-scanner/metadata.xml b/net-analyzer/openvas-scanner/metadata.xml new file mode 100644 index 000000000000..df1fa96e1be8 --- /dev/null +++ b/net-analyzer/openvas-scanner/metadata.xml @@ -0,0 +1,25 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>jonas.licht@gmail.com</email> + <name>Jonas Licht</name> + </maintainer> + <maintainer type="project"> + <email>proxy-maint@gentoo.org</email> + <name>Proxy Maintainers</name> + </maintainer> + <use> + <flag name="cron">Install a cron job to update GVM's feed daily.</flag> + <flag name="extras">Html docs support</flag> + </use> + <longdescription lang="en"> + Open Vulnerability Assessment System (OpenVAS) Scanner is the Greenbone Vulnerability Management (GVM) Solution. + It is used for the Greenbone Security Manager appliances and is a full-featured scan engine that executes a continuously + updated and extended feed of Network Vulnerability Tests (NVTs). + </longdescription> + <upstream> + <remote-id type="github">greenbone/openvas-scanner</remote-id> + </upstream> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/openvas-scanner/openvas-scanner-6.0.1.ebuild b/net-analyzer/openvas-scanner/openvas-scanner-6.0.1.ebuild new file mode 100644 index 000000000000..a1e0d34ebf61 --- /dev/null +++ b/net-analyzer/openvas-scanner/openvas-scanner-6.0.1.ebuild @@ -0,0 +1,135 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +CMAKE_MAKEFILE_GENERATOR="emake" +inherit cmake flag-o-matic systemd toolchain-funcs + +MY_PN="openvas" +MY_DN="openvassd" + +DESCRIPTION="Open Vulnerability Assessment Scanner" +HOMEPAGE="https://www.greenbone.net/en/" +SRC_URI="https://github.com/greenbone/openvas-scanner/archive/v${PV}.tar.gz -> ${P}.tar.gz" + +SLOT="0" +LICENSE="GPL-2 GPL-2+" +KEYWORDS="~amd64 ~x86" +IUSE="cron extras" + +DEPEND=" + app-crypt/gpgme:= + dev-db/redis + dev-libs/libgcrypt:= + dev-libs/libksba + >=net-analyzer/gvm-libs-10.0.1 + net-analyzer/net-snmp + net-libs/gnutls:= + net-libs/libpcap + net-libs/libssh:= +" + +RDEPEND=" + ${DEPEND}" + +BDEPEND=" + sys-devel/bison + sys-devel/flex + virtual/pkgconfig + extras? ( app-doc/doxygen[dot] + app-doc/xmltoman + app-text/htmldoc + dev-perl/CGI + dev-perl/SQL-Translator + )" + +BUILD_DIR="${WORKDIR}/${MY_PN}-${PV}_build" +S="${WORKDIR}/${MY_PN}-${PV}" + +PATCHES=( + # Install exec. to /usr/bin instead of /usr/sbin + "${FILESDIR}/${P}-sbin.patch" +) + +src_prepare() { + cmake_src_prepare + # QA-Fix | Correct FHS/Gentoo policy paths for 6.0.1 + sed -i -e "s*/doc/openvas-scanner/*/doc/openvas-scanner-${PV}/*g" "$S"/src/CMakeLists.txt || die + # QA-Fix | Remove !CLANG doxygen warnings for 6.0.1 + if use extras; then + if ! tc-is-clang; then + local f + for f in doc/*.in + do + sed -i \ + -e "s*CLANG_ASSISTED_PARSING = NO*#CLANG_ASSISTED_PARSING = NO*g" \ + -e "s*CLANG_OPTIONS*#CLANG_OPTIONS*g" \ + "${f}" || die "couldn't disable CLANG parsing" + done + fi + fi +} + +src_configure() { + local mycmakeargs=( + "-DLOCALSTATEDIR=${EPREFIX}/var" + "-DSYSCONFDIR=${EPREFIX}/etc" + ) + # Add release hardening flags for 6.0.1 + append-cflags -Wno-format-truncation -Wformat -Wformat-security -D_FORTIFY_SOURCE=2 -fstack-protector + append-ldflags -Wl,-z,relro -Wl,-z,now + cmake_src_configure +} + +src_compile() { + cmake_src_compile + if use extras; then + cmake_build -C "${BUILD_DIR}" doc + cmake_build doc-full -C "${BUILD_DIR}" doc + HTML_DOCS=( "${BUILD_DIR}"/doc/generated/html/. ) + fi + cmake_build rebuild_cache +} + +src_install() { + cmake_src_install + + dodir /etc/openvas + insinto /etc/openvas + newins "${FILESDIR}/${MY_DN}.gvm.conf" openvassd.conf + + insinto /etc/openvas + doins "${FILESDIR}"/redis.conf.example + + dodir /etc/openvas/sysconfig + insinto /etc/openvas/sysconfig + doins "${FILESDIR}/${MY_DN}-daemon.conf" + + if use cron; then + # Install the cron job if they want it. + exeinto /etc/gvm + doexe "${FILESDIR}/gvm-feed-sync.sh" + fowners gvm:gvm /etc/gvm/gvm-feed-sync.sh + + insinto /etc/cron.d + newins "${FILESDIR}"/gvm-feed-sync.cron gvm + fi + + fowners -R gvm:gvm /etc/openvas + + newinitd "${FILESDIR}/${MY_DN}.init" "${MY_DN}" + newconfd "${FILESDIR}/${MY_DN}-daemon.conf" "${MY_DN}" + + dodir /etc/logrotate.d + insinto /etc/logrotate.d + newins "${FILESDIR}/${MY_DN}.logrotate" "${MY_DN}" + + systemd_dounit "${FILESDIR}/${MY_DN}.service" + + # Set proper permissions on required files/directories + keepdir /var/log/gvm + fowners gvm:gvm /var/log/gvm + keepdir /var/lib/openvas/{gnupg,plugins} + fowners -R gvm:gvm /var/lib/openvas +} diff --git a/net-analyzer/openvas-scanner/openvas-scanner-7.0.0.ebuild b/net-analyzer/openvas-scanner/openvas-scanner-7.0.0.ebuild new file mode 100644 index 000000000000..eeee5c6277ab --- /dev/null +++ b/net-analyzer/openvas-scanner/openvas-scanner-7.0.0.ebuild @@ -0,0 +1,116 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +CMAKE_MAKEFILE_GENERATOR="emake" +inherit cmake flag-o-matic toolchain-funcs + +MY_PN="openvas" +MY_DN="openvassd" + +DESCRIPTION="Open Vulnerability Assessment Scanner" +HOMEPAGE="https://www.greenbone.net/en/" +SRC_URI="https://github.com/greenbone/openvas-scanner/archive/v${PV}.tar.gz -> ${P}.tar.gz" + +SLOT="0" +LICENSE="GPL-2 GPL-2+" +KEYWORDS="~amd64 ~x86" +IUSE="cron extras" + +DEPEND=" + acct-user/gvm + app-crypt/gpgme:= + dev-db/redis + dev-libs/glib + dev-libs/libgcrypt:= + dev-libs/libksba + >=net-analyzer/gvm-libs-11.0.0 + net-analyzer/net-snmp + net-libs/gnutls:= + net-libs/libpcap + net-libs/libssh:=" + +RDEPEND=" + ${DEPEND}" + +BDEPEND=" + sys-devel/bison + sys-devel/flex + virtual/pkgconfig + extras? ( + app-doc/doxygen[dot] + app-doc/xmltoman + app-text/htmldoc + dev-perl/CGI + dev-perl/SQL-Translator + )" + +BUILD_DIR="${WORKDIR}/${MY_PN}-${PV}_build" +S="${WORKDIR}/${MY_PN}-${PV}" + +src_prepare() { + cmake_src_prepare + # QA-Fix | Correct FHS/Gentoo policy paths for 7.0.0 + sed -i -e "s*/doc/openvas-scanner/*/doc/openvas-scanner-${PV}/*g" "$S"/src/CMakeLists.txt || die + # QA-Fix | Remove !CLANG doxygen warnings for 7.0.0 + if use extras; then + if ! tc-is-clang; then + local f + for f in doc/*.in + do + sed -i \ + -e "s*CLANG_ASSISTED_PARSING = NO*#CLANG_ASSISTED_PARSING = NO*g" \ + -e "s*CLANG_OPTIONS*#CLANG_OPTIONS*g" \ + "${f}" || die "couldn't disable CLANG parsing" + done + fi + fi +} + +src_configure() { + local mycmakeargs=( + "-DLOCALSTATEDIR=${EPREFIX}/var" + "-DSYSCONFDIR=${EPREFIX}/etc" + "-DSBINDIR=${EPREFIX}/usr/bin" + ) + cmake_src_configure +} + +src_compile() { + cmake_src_compile + if use extras; then + cmake_build -C "${BUILD_DIR}" doc + cmake_build doc-full -C "${BUILD_DIR}" doc + fi + cmake_build rebuild_cache +} + +src_install() { + if use extras; then + local HTML_DOCS=( "${BUILD_DIR}"/doc/generated/html/. ) + fi + cmake_src_install + + if use cron; then + # Install the cron job if they want it. + exeinto /etc/gvm + doexe "${FILESDIR}/gvm-feed-sync.sh" + fowners gvm:gvm /etc/gvm/gvm-feed-sync.sh + + insinto /etc/cron.d + newins "${FILESDIR}"/gvm-feed-sync.cron gvm + fi + + insinto /etc/logrotate.d + newins "${FILESDIR}/${MY_DN}.logrotate" "${MY_DN}" + + # Set proper permissions on required files/directories + keepdir /var/log/gvm + fowners gvm:gvm /var/log/gvm + keepdir /var/lib/openvas/{gnupg,plugins} + fowners -R gvm:gvm /var/lib/openvas + + insinto /etc/openvas + doins "${FILESDIR}/openvas.conf" +} diff --git a/net-analyzer/opsgenie-lamp/Manifest b/net-analyzer/opsgenie-lamp/Manifest new file mode 100644 index 000000000000..b0214baa1090 --- /dev/null +++ b/net-analyzer/opsgenie-lamp/Manifest @@ -0,0 +1,2 @@ +DIST opsgenie-lamp-2.5.1_p20181102-vendor.tar.gz 204755 BLAKE2B 65c92b5bbbdec8b4bdccad884435273a6aec51c472437de92613dcda76c3a6cff1b84dfe5028713a353b861ff868cb8377e97c9322423b7a887a121a92c9515f SHA512 08f86e1520f2ca6d5208994c5836d511bea13d9e8ccf707a121956e23ff1c6f411d730ab6445ac30158e90d76efcdbbf65a19cef39641493c76b836980b6792a +DIST opsgenie-lamp-2.5.1_p20181102.tar.gz 19259 BLAKE2B 1a4f54b817b0210654f42e4ea1eb9dc29e0416ab37a90ca00ba86788cdcde6a8a7330bd095c238268b7e00525da33a67c4fa0aa68602442887dc81091f802fd2 SHA512 9a2c5d23b530a5c2df99f1b63afcb47d8fb3cdf9a45142f82d52df5c9dd570bad444735d851af3fe03306179076e78ece3be9b1a6b63da04740d0a02752db67a diff --git a/net-analyzer/opsgenie-lamp/metadata.xml b/net-analyzer/opsgenie-lamp/metadata.xml new file mode 100644 index 000000000000..7f90cb6f614f --- /dev/null +++ b/net-analyzer/opsgenie-lamp/metadata.xml @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>williamh@gentoo.org</email> + <name>William Hubbs</name> + </maintainer> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/opsgenie-lamp/opsgenie-lamp-2.5.1_p20181102.ebuild b/net-analyzer/opsgenie-lamp/opsgenie-lamp-2.5.1_p20181102.ebuild new file mode 100644 index 000000000000..8aba54f81df9 --- /dev/null +++ b/net-analyzer/opsgenie-lamp/opsgenie-lamp-2.5.1_p20181102.ebuild @@ -0,0 +1,48 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 +inherit vcs-snapshot + +DESCRIPTION="command line client for the opsgenie service" +HOMEPAGE="https://docs.opsgenie.com/docs/lamp-command-line-interface-for-opsgenie" +HASH=062016b +SRC_URI="https://github.com/opsgenie/${PN}/archive/${HASH}.tar.gz -> ${P}.tar.gz + https://dev.gentoo.org/~williamh/dist/${P}-vendor.tar.gz" + +# I followed the following steps to create the vendor tarball: +# +# git clone https://github.com/opsgenie/opsgenie-lamp +# cd opsgenie-lamp +# go mod init # creates go.mod and go.sum +# go mod vendor # updates go.mod/sum and adds vendor directory +# mv -i go.mod go.sum vendor +# tar cf ${P}.tar vendor +# gzip ${P}.tar +# +# Upstream doesn't tag releases, but the most recent version number is +# in the sources, see the lampVersion variable. + +LICENSE="Apache-2.0" +SLOT="0" +KEYWORDS="~amd64" + +DEPEND="dev-lang/go:=" + +RESTRICT="strip" + +src_prepare() { + mv ../${P}-vendor vendor || die "mv failed" + mv vendor/go.mod vendor/go.sum . || die "mv failed" + default +} + +src_compile() { + GOCACHE="${T}"/go-cache go build -mod vendor || die "build failed" +} + +src_install() { + newbin ${PN} lamp +dodoc conf/lamp.conf + einstalldocs +} diff --git a/net-analyzer/ospd-openvas/Manifest b/net-analyzer/ospd-openvas/Manifest new file mode 100644 index 000000000000..00e7b1d401c7 --- /dev/null +++ b/net-analyzer/ospd-openvas/Manifest @@ -0,0 +1 @@ +DIST ospd-openvas-1.0.0.tar.gz 49725 BLAKE2B 230df2f572f345b9ed398e2af120a2fecee87f9f8d8d3c072ca314960f34f7329fe22b002ba0971ba6dc14cd3ca4543120653f89b3085a0f8a932fbeb6ef2682 SHA512 2b2e4f38843265a018a58b7fbd2fde0449d4f6cf3c5c1b7bec02d8390ab257020304f5be1bf2a77f7d28a04f4d1da611fc9b3066bef370dd686dfb8684fce534 diff --git a/net-analyzer/ospd-openvas/files/ospd-openvas.confd b/net-analyzer/ospd-openvas/files/ospd-openvas.confd new file mode 100644 index 000000000000..fc776ac49e32 --- /dev/null +++ b/net-analyzer/ospd-openvas/files/ospd-openvas.confd @@ -0,0 +1,10 @@ +# OpenVAS Scanner command args + +# e.g --foreground +OSPD_OPENVAS_OPTIONS="" + +# Scanner listen socket +OSPD_OPENVAS_UNIX_SOCKET="--unix-socket=/tmp/ospd.sock" + +# Scanner listen mode +OSPD_OPENVAS_SOCKET_MODE="--socket-mode=0o777" diff --git a/net-analyzer/ospd-openvas/files/ospd-openvas.initd b/net-analyzer/ospd-openvas/files/ospd-openvas.initd new file mode 100644 index 000000000000..ced28d892dcd --- /dev/null +++ b/net-analyzer/ospd-openvas/files/ospd-openvas.initd @@ -0,0 +1,17 @@ +#!/sbin/openrc-run +# Copyright 2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +name="remotely control an OpenVAS Scanner" +command=/usr/bin/ospd-openvas +pidfile="/run/${RC_SVCNAME}.pid" +command_args="${OSPD_OPENVAS_OPTIONS} \ + ${OSPD_OPENVAS_UNIX_SOCKET} \ + ${OSPD_OPENVAS_SOCKET_MODE} \ + --pid-file ${pidfile} \ + --config /etc/openvas/ospd.conf" + +depend() { + after bootmisc + need localmount redis +} diff --git a/net-analyzer/ospd-openvas/files/ospd-openvas.service b/net-analyzer/ospd-openvas/files/ospd-openvas.service new file mode 100644 index 000000000000..f496797d54ff --- /dev/null +++ b/net-analyzer/ospd-openvas/files/ospd-openvas.service @@ -0,0 +1,18 @@ +[Unit] +Description=OSPD OpenVAS +After=network.target networking.service dnsmasq.service redis-server@openvas.service systemd-tmpfiles.service +ConditionKernelCommandLine=!recovery + +[Service] +Type=forking +User=gvm +Group=gvm +ExecStart=/usr/bin/ospd-openvas --config /etc/openvas/ospd.conf --foreground +SuccessExitStatus=SIGKILL +# This works asynchronously, but does not take the daemon down during the reload so it's ok. +Restart=always +RestartSec=60 + +[Install] +WantedBy=multi-user.target +Alias=ospd-openvas.service diff --git a/net-analyzer/ospd-openvas/files/ospd.conf b/net-analyzer/ospd-openvas/files/ospd.conf new file mode 100644 index 000000000000..bac46565001c --- /dev/null +++ b/net-analyzer/ospd-openvas/files/ospd.conf @@ -0,0 +1,10 @@ +[OSPD - openvas] + +#required by gvmd +unix_socket = /tmp/ospd.sock + +#socket_mode = 0o770 +#unix_socket = /run/ospd/ospd-openvas.pid + +log_level = DEBUG +log_file = /var/log/gvm/ospd-openvas.log diff --git a/net-analyzer/ospd-openvas/files/redis.conf.example b/net-analyzer/ospd-openvas/files/redis.conf.example new file mode 100644 index 000000000000..6a41211aaae8 --- /dev/null +++ b/net-analyzer/ospd-openvas/files/redis.conf.example @@ -0,0 +1,57 @@ +bind 127.0.0.1 +protected-mode yes +port 0 +tcp-backlog 511 +unixsocket /tmp/redis.sock +unixsocketperm 700 +timeout 0 +tcp-keepalive 300 +daemonize no +supervised no +pidfile /run/redis/redis.pid +loglevel notice +logfile /var/log/redis/redis.log +databases 16 +always-show-logo yes +stop-writes-on-bgsave-error yes +rdbcompression yes +rdbchecksum yes +dbfilename dump.rdb +dir /var/lib/redis/ +slave-serve-stale-data yes +slave-read-only yes +repl-diskless-sync no +repl-diskless-sync-delay 5 +repl-disable-tcp-nodelay no +slave-priority 100 +lazyfree-lazy-eviction no +lazyfree-lazy-expire no +lazyfree-lazy-server-del no +slave-lazy-flush no +appendonly no +appendfilename "appendonly.aof" +appendfsync everysec +no-appendfsync-on-rewrite no +auto-aof-rewrite-percentage 100 +auto-aof-rewrite-min-size 64mb +aof-load-truncated yes +aof-use-rdb-preamble no +lua-time-limit 5000 +slowlog-log-slower-than 10000 +slowlog-max-len 128 +latency-monitor-threshold 0 +notify-keyspace-events "" +hash-max-ziplist-entries 512 +hash-max-ziplist-value 64 +list-max-ziplist-size -2 +list-compress-depth 0 +set-max-intset-entries 512 +zset-max-ziplist-entries 128 +zset-max-ziplist-value 64 +hll-sparse-max-bytes 3000 +activerehashing yes +client-output-buffer-limit normal 0 0 0 +client-output-buffer-limit slave 256mb 64mb 60 +client-output-buffer-limit pubsub 32mb 8mb 60 +hz 10 +aof-rewrite-incremental-fsync yes diff --git a/net-analyzer/ospd-openvas/metadata.xml b/net-analyzer/ospd-openvas/metadata.xml new file mode 100644 index 000000000000..4f70e17e6e3a --- /dev/null +++ b/net-analyzer/ospd-openvas/metadata.xml @@ -0,0 +1,17 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>jonas.licht@gmail.com</email> + <name>Jonas Licht</name> + </maintainer> + <maintainer type="project"> + <email>proxy-maint@gentoo.org</email> + <name>Proxy Maintainers</name> + </maintainer> + <longdescription lang="en"> + This is an OSP server implementation to allow GVM to remotely control OpenVAS. + Once running, you need to configure OpenVAS for the Greenbone Vulnerability Manager, for example via the web interface Greenbone Security Assistant. Then you can create scan tasks to use OpenVAS. + </longdescription> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/ospd-openvas/ospd-openvas-1.0.0.ebuild b/net-analyzer/ospd-openvas/ospd-openvas-1.0.0.ebuild new file mode 100644 index 000000000000..f7eb63988b62 --- /dev/null +++ b/net-analyzer/ospd-openvas/ospd-openvas-1.0.0.ebuild @@ -0,0 +1,45 @@ +# Copyright 2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +PYTHON_COMPAT=( python3_{6,7,8} ) +DISTUTILS_USE_SETUPTOOLS=rdepend +inherit distutils-r1 systemd + +DESCRIPTION="This is an OSP server implementation to allow GVM to remotely control OpenVAS" +HOMEPAGE="https://github.com/greenbone/ospd-openvas" +SRC_URI="https://github.com/greenbone/ospd-openvas/archive/v${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="" + +DEPEND=" + acct-user/gvm + dev-python/psutil[${PYTHON_USEDEP}] + dev-python/redis-py[${PYTHON_USEDEP}] + net-analyzer/ospd[${PYTHON_USEDEP}] +" +RDEPEND=" + ${DEPEND} + >=net-analyzer/openvas-scanner-7.0.0" +BDEPEND="" + +distutils_enable_tests unittest + +python_install() { + distutils-r1_python_install + + insinto /etc/openvas + doins "${FILESDIR}"/redis.conf.example + doins "${FILESDIR}"/ospd.conf + + fowners -R gvm:gvm /etc/openvas + + newinitd "${FILESDIR}/${PN}.initd" "${PN}" + newconfd "${FILESDIR}/${PN}.confd" "${PN}" + + systemd_dounit "${FILESDIR}/${PN}.service" +} diff --git a/net-analyzer/ospd/Manifest b/net-analyzer/ospd/Manifest new file mode 100644 index 000000000000..bdacc73b9a16 --- /dev/null +++ b/net-analyzer/ospd/Manifest @@ -0,0 +1 @@ +DIST ospd-2.0.0.tar.gz 81645 BLAKE2B 4c0c7af3caf274ea9e6a43790eb1e9d386ce42d9976e5e9625b49ffe12d8db2e613109458dcc59f322bc00aee39a4a89045caf302182474d1fab4ca1c4ff1bcf SHA512 971b4b57c39844ef08a0ae56d4bf87f0440c993960b5ad37516c622ad41eb2ab30fabb9d0a05fd043a9a1d98e446eaab9d5018cc1607fd711c533475f4703012 diff --git a/net-analyzer/ospd/files/ospd-2.0.0-socket-permission.patch b/net-analyzer/ospd/files/ospd-2.0.0-socket-permission.patch new file mode 100644 index 000000000000..b6adefd7b15b --- /dev/null +++ b/net-analyzer/ospd/files/ospd-2.0.0-socket-permission.patch @@ -0,0 +1,53 @@ +From 8f359bb07901a18609974d5f3e587b8fe8c36177 Mon Sep 17 00:00:00 2001 +From: Juan Jose Nicola <juan.nicola@greenbone.net> +Date: Wed, 16 Oct 2019 11:45:30 +0200 +Subject: [PATCH] Fix set permission on unix socket. It was trying to set the + permissions on the unix socket before creating it. + +--- + CHANGELOG.md | 7 +++++++ + ospd/server.py | 6 +++--- + 2 files changed, 10 insertions(+), 3 deletions(-) + +diff --git a/CHANGELOG.md b/CHANGELOG.md +index 56cb80f..0f173cb 100644 +--- a/CHANGELOG.md ++++ b/CHANGELOG.md +@@ -4,6 +4,13 @@ All notable changes to this project will be documented in this file. + + The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). + ++## [2.0.1] (unreleased) ++ ++### Fixed ++- Fix set permission in unix socket. [#157](https://github.com/greenbone/ospd/pull/157) ++ ++[2.0.1]: https://github.com/greenbone/ospd/compare/v2.0.0...ospd-2.0 ++ + ## [2.0.0] (2019-10-11) + + ### Added +diff --git a/ospd/server.py b/ospd/server.py +index 5523de3..9356abf 100644 +--- a/ospd/server.py ++++ b/ospd/server.py +@@ -202,9 +202,6 @@ def start(self, stream_callback: StreamCallbackType): + self._cleanup_socket() + self._create_parent_dirs() + +- if self.socket_path.exists(): +- os.chmod(str(self.socket_path), self.socket_mode) +- + try: + self.stream_callback = stream_callback + self.server = ThreadedUnixSocketServer(self, str(self.socket_path)) +@@ -217,6 +214,9 @@ def start(self, stream_callback: StreamCallbackType): + ) + ) + ++ if self.socket_path.exists(): ++ self.socket_path.chmod(self.socket_mode) ++ + def close(self): + super().close() + self._cleanup_socket() diff --git a/net-analyzer/ospd/metadata.xml b/net-analyzer/ospd/metadata.xml new file mode 100644 index 000000000000..376470e9d49c --- /dev/null +++ b/net-analyzer/ospd/metadata.xml @@ -0,0 +1,26 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>jonas.licht@gmail.com</email> + <name>Jonas Licht</name> + </maintainer> + <maintainer type="project"> + <email>proxy-maint@gentoo.org</email> + <name>Proxy Maintainers</name> + </maintainer> + <use> + <flag name="extras">Html docs support</flag> + </use> + <longdescription lang="en"> + OSPD is a base class for scanner wrappers which share the same communication protocol: + OSP (Open Scanner Protocol). OSP creates a unified interface for different security scanners + and makes their control flow and scan results consistently available under the central + Greenbone Vulnerability Manager service. + </longdescription> + <upstream> + <remote-id type="github">greenbone/ospd</remote-id> + </upstream> + <origin>gentoo-staging</origin> +</pkgmetadata> + diff --git a/net-analyzer/ospd/ospd-2.0.0-r1.ebuild b/net-analyzer/ospd/ospd-2.0.0-r1.ebuild new file mode 100644 index 000000000000..d6eb8b8a8dff --- /dev/null +++ b/net-analyzer/ospd/ospd-2.0.0-r1.ebuild @@ -0,0 +1,40 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +PYTHON_COMPAT=( python3_{6,7,8} ) +DISTUTILS_USE_SETUPTOOLS=rdepend +inherit distutils-r1 + +DESCRIPTION="Base class for scanner wrappers,communication protocol for GVM" +HOMEPAGE="https://www.greenbone.net/en/" +SRC_URI="https://github.com/greenbone/ospd/archive/v${PV}.tar.gz -> ${P}.tar.gz" + +SLOT="0" +LICENSE="GPL-2" +KEYWORDS="~amd64 ~x86" +IUSE="extras" + +RDEPEND=" + dev-python/defusedxml[${PYTHON_USEDEP}] + dev-python/lxml[${PYTHON_USEDEP}] + dev-python/paramiko[${PYTHON_USEDEP}]" + +DEPEND=" + ${RDEPEND}" + +PATCHES=( + # fixes socket permissions see https://github.com/greenbone/ospd-openvas/issues/170 + "${FILESDIR}/${P}-socket-permission.patch" +) + +distutils_enable_tests unittest + +python_compile() { + if use extras; then + bash "${S}"/doc/generate || die + HTML_DOCS=( "${S}"/doc/. ) + fi + distutils-r1_python_compile +} diff --git a/net-analyzer/ossec-hids/Manifest b/net-analyzer/ossec-hids/Manifest new file mode 100644 index 000000000000..993d4d047a7e --- /dev/null +++ b/net-analyzer/ossec-hids/Manifest @@ -0,0 +1,4 @@ +DIST ossec-hids-3.1.0.tar.gz 1886469 BLAKE2B c175c8659a8b5d0d269a5cb6bf142276f29e6f676afc6029accf854d68299d71147ba65a667601e77c6db8ca49a29afa49534e5683369f420f6389059ae61fc3 SHA512 fe55f82ac354d9fcd767d8379a492279644308788535780bb029d46688c93f259771686462570137555b40082c6756daad44bbdd1ddc953ed0bb22b65c6cb566 +DIST ossec-hids-3.2.0.tar.gz 1896977 BLAKE2B d77cff3a3a72287ad2235f346c7d07cfdad83872d956f57877ed44ad21bb717e4b4ddcfd0e8b2ce45cb90160bb63a28a7d06bc6225b53cc5ed42f7a97c5a1765 SHA512 40b25b97c43a66b8a145914ab0badd9d4f7de7d2168aa7a49abdf778c620a4b533ce3de0883d26c4c39816cf78674a053788a57c5f9c38fbea7cd8b13a35d18f +DIST ossec-hids-3.3.0.tar.gz 1900070 BLAKE2B a18a1e55ba44450c634b59099f10b674d27b2079ff456a034dc7bb4bbaf3c89b96f197515f3fb7aa54c248643f333e830a519b04cd4a9402cec2c32597fd96b2 SHA512 97c7e7b21ce88a3f1c89b79ff74b0c13804ba313cf3f30b98bcb4011f422ca050876e780c30624812d399d6b5c59629e52f6772b9ee0cd7cead1d66044dca627 +DIST ossec-hids-3.6.0.tar.gz 1921753 BLAKE2B ca33a94d09265c94dbdb99e2b9637d1e062f39ab88837a5c8f089d64a6369c1bef1e010b18ac4713cd4965dcf189bb1c2866fd33813cd94ae34ac04182070580 SHA512 1f5e897de757df264dfb56def74b7d8f886b6b9d772b5b3d0197c9cd00a32fd7fd8a7b53566851fea3cd74d433b5594cbd074e50b7dbe36305fb3c243e8ddcf5 diff --git a/net-analyzer/ossec-hids/files/gcc-fno-common-3.6.0.patch b/net-analyzer/ossec-hids/files/gcc-fno-common-3.6.0.patch new file mode 100644 index 000000000000..e8ed3c66dd9e --- /dev/null +++ b/net-analyzer/ossec-hids/files/gcc-fno-common-3.6.0.patch @@ -0,0 +1,402 @@ +diff --git a/src/addagent/main.c b/src/addagent/main.c +index 587a8a3d8..ab12f0326 100644 +--- a/src/addagent/main.c ++++ b/src/addagent/main.c +@@ -17,6 +17,7 @@ static void print_banner(void); + static void manage_shutdown(int sig) __attribute__((noreturn)); + #endif + ++int willchroot; + + #if defined(__MINGW32__) + static int setenv(const char *name, const char *val, __attribute__((unused)) int overwrite) +diff --git a/src/addagent/manage_agents.c b/src/addagent/manage_agents.c +index ac39c1e66..4f9c266ff 100644 +--- a/src/addagent/manage_agents.c ++++ b/src/addagent/manage_agents.c +@@ -85,6 +85,8 @@ int add_agent(int json_output) + + char authfile[257]; + ++ extern int willchroot; ++ + if(willchroot > 0) { + snprintf(authfile, 256, "%s", AUTH_FILE); //XXX + } else { +diff --git a/src/addagent/manage_agents.h b/src/addagent/manage_agents.h +index 4812dba43..f2962e80b 100644 +--- a/src/addagent/manage_agents.h ++++ b/src/addagent/manage_agents.h +@@ -147,4 +147,4 @@ extern fpos_t fp_pos; + #define GMF_UNKN_ERROR ARGV0 ": Could not run GetModuleFileName which returned (%ld).\n" + + +-int willchroot; ++//int willchroot; +diff --git a/src/addagent/manage_keys.c b/src/addagent/manage_keys.c +index 146b48326..ffb9a1f21 100644 +--- a/src/addagent/manage_keys.c ++++ b/src/addagent/manage_keys.c +@@ -336,6 +336,8 @@ int k_bulkload(const char *cmdbulk) + char delims[] = ","; + char *token = NULL; + ++ extern int willchroot; ++ + /* Check if we can open the input file */ + printf("Opening: [%s]\n", cmdbulk); + infp = fopen(cmdbulk, "r"); +diff --git a/src/analysisd/analysisd.c b/src/analysisd/analysisd.c +index a220f4421..0a81971de 100644 +--- a/src/analysisd/analysisd.c ++++ b/src/analysisd/analysisd.c +@@ -42,7 +42,12 @@ + #endif + + #ifdef SQLITE_ENABLED +-#include "syscheck-sqlite.h" ++#include <sqlite3.h> ++sqlite3 *conn; ++#endif ++ ++#ifdef LIBGEOIP_ENABLED ++GeoIP *geoipdb; + #endif + + /** Prototypes **/ +diff --git a/src/analysisd/config.h b/src/analysisd/config.h +index 8d74c756e..976d1942e 100644 +--- a/src/analysisd/config.h ++++ b/src/analysisd/config.h +@@ -12,6 +12,7 @@ + + #include "config/config.h" + #include "config/global-config.h" ++ + #ifdef LIBGEOIP_ENABLED + #include "GeoIP.h" + #endif +@@ -20,9 +21,11 @@ + extern long int __crt_ftell; /* Global ftell pointer */ + extern _Config Config; /* Global Config structure */ + ++/* + #ifdef LIBGEOIP_ENABLED + GeoIP *geoipdb; + #endif ++*/ + + int GlobalConf(const char *cfgfile); + +diff --git a/src/analysisd/decoders/geoip.c b/src/analysisd/decoders/geoip.c +index 464e4bb71..9816b4c81 100644 +--- a/src/analysisd/decoders/geoip.c ++++ b/src/analysisd/decoders/geoip.c +@@ -30,6 +30,7 @@ char *GetGeoInfobyIP(char *ip_addr) + GeoIPRecord *geoiprecord; + char *geodata = NULL; + char geobuffer[256 +1]; ++ extern GeoIP *geoipdb; + + if(!geoipdb) + { +diff --git a/src/analysisd/decoders/syscheck.c b/src/analysisd/decoders/syscheck.c +index a6d675892..30339a00d 100644 +--- a/src/analysisd/decoders/syscheck.c ++++ b/src/analysisd/decoders/syscheck.c +@@ -16,7 +16,7 @@ + #include "decoder.h" + + #ifdef SQLITE_ENABLED +-#include "syscheck-sqlite.h" ++#include <sqlite3.h> + #endif + + typedef struct __sdb { +diff --git a/src/analysisd/makelists.c b/src/analysisd/makelists.c +index 06c90db70..dfbe6a4a3 100644 +--- a/src/analysisd/makelists.c ++++ b/src/analysisd/makelists.c +@@ -32,6 +32,10 @@ time_t c_time; + char __shost[512]; + OSDecoderInfo *NULL_Decoder; + ++#ifdef LIBGEOIP_ENABLED ++GeoIP *geoipdb; ++#endif ++ + /* print help statement */ + __attribute__((noreturn)) + static void help_makelists(void) +diff --git a/src/analysisd/syscheck-sqlite.h b/src/analysisd/syscheck-sqlite.h +deleted file mode 100644 +index 526cab26e..000000000 +--- a/src/analysisd/syscheck-sqlite.h ++++ /dev/null +@@ -1,5 +0,0 @@ +-#ifdef SQLITE_ENABLED +-#include <sqlite3.h> +- +-sqlite3 *conn; +-#endif +diff --git a/src/analysisd/testrule.c b/src/analysisd/testrule.c +index c08fb4885..b1aa928f7 100644 +--- a/src/analysisd/testrule.c ++++ b/src/analysisd/testrule.c +@@ -83,6 +83,7 @@ int main(int argc, char **argv) + memset(prev_month, '\0', 4); + + #ifdef LIBGEOIP_ENABLED ++ extern GeoIP *geoipdb; + geoipdb = NULL; + #endif + +diff --git a/src/client-agent/agentd.c b/src/client-agent/agentd.c +index c09cf87d3..67828e79c 100644 +--- a/src/client-agent/agentd.c ++++ b/src/client-agent/agentd.c +@@ -23,6 +23,8 @@ void AgentdStart(const char *dir, int uid, int gid, const char *user, const char + fd_set fdset; + struct timeval fdtimeout; + ++ extern agent *agt; ++ + available_server = 0; + + /* Initial random numbers must happen before chroot */ +diff --git a/src/client-agent/agentd.h b/src/client-agent/agentd.h +index 0246a5457..a362ff9a3 100644 +--- a/src/client-agent/agentd.h ++++ b/src/client-agent/agentd.h +@@ -81,9 +81,9 @@ void os_agent_cb(int fd, short ev, void *arg); + extern time_t available_server; + extern int run_foreground; + extern keystore keys; +-extern agent *agt; ++//extern agent *agt; + #ifndef WIN32 +-struct imsgbuf server_ibuf; ++//struct imsgbuf server_ibuf; + #endif //WIN32 + + #endif /* __AGENTD_H */ +diff --git a/src/client-agent/event-forward.c b/src/client-agent/event-forward.c +index 2e81f0c90..22ed0beb9 100644 +--- a/src/client-agent/event-forward.c ++++ b/src/client-agent/event-forward.c +@@ -19,6 +19,9 @@ + /* Receive a message locally on the agent and forward it to the manager */ + void *EventForward(void) + { ++ ++ extern agent *agt; ++ + ssize_t recv_b; + char msg[OS_MAXSTR + 1]; + +diff --git a/src/client-agent/main.c b/src/client-agent/main.c +index 5f85cfb73..01c18970c 100644 +--- a/src/client-agent/main.c ++++ b/src/client-agent/main.c +@@ -16,7 +16,8 @@ + #define ARGV0 "ossec-agentd" + #endif + +-extern struct imsgbuf server_ibuf; ++//extern struct imsgbuf server_ibuf; ++struct imsgbuf server_ibuf; + + + /* Prototypes */ +@@ -112,6 +113,8 @@ int main(int argc, char **argv) + + debug1(STARTED_MSG, ARGV0); + ++ extern agent *agt; ++ + agt = (agent *)calloc(1, sizeof(agent)); + if (!agt) { + ErrorExit(MEM_ERROR, ARGV0, errno, strerror(errno)); +diff --git a/src/client-agent/notify.c b/src/client-agent/notify.c +index 1b239f26c..93fec325c 100644 +--- a/src/client-agent/notify.c ++++ b/src/client-agent/notify.c +@@ -68,6 +68,8 @@ void run_notify() + os_md5 md5sum; + time_t curr_time; + ++ extern agent *agt; ++ + keep_alive_random[0] = '\0'; + curr_time = time(0); + +diff --git a/src/client-agent/receiver-win.c b/src/client-agent/receiver-win.c +index 859bdf7f9..4ab62ee77 100644 +--- a/src/client-agent/receiver-win.c ++++ b/src/client-agent/receiver-win.c +@@ -19,6 +19,7 @@ + /* Receive events from the server */ + void *receiver_thread(__attribute__((unused)) void *none) + { ++ extern agent *agt; + int recv_b; + + char file[OS_SIZE_1024 + 1]; +diff --git a/src/client-agent/receiver.c b/src/client-agent/receiver.c +index fde64c282..5286e60dc 100644 +--- a/src/client-agent/receiver.c ++++ b/src/client-agent/receiver.c +@@ -29,6 +29,8 @@ void *receive_msg() + char cleartext[OS_MAXSTR + 1]; + char *tmp_msg; + ++ extern agent *agt; ++ + memset(cleartext, '\0', OS_MAXSTR + 1); + memset(buffer, '\0', OS_MAXSTR + 1); + +diff --git a/src/client-agent/sendmsg.c b/src/client-agent/sendmsg.c +index 454c2e714..3076dfcf9 100644 +--- a/src/client-agent/sendmsg.c ++++ b/src/client-agent/sendmsg.c +@@ -15,6 +15,9 @@ + /* Send a message to the server */ + int send_msg(int agentid, const char *msg) + { ++ ++ extern agent *agt; ++ + size_t msg_size; + char crypt_msg[OS_MAXSTR + 1]; + +diff --git a/src/client-agent/start_agent.c b/src/client-agent/start_agent.c +index 51670cee5..f1df43715 100644 +--- a/src/client-agent/start_agent.c ++++ b/src/client-agent/start_agent.c +@@ -24,6 +24,9 @@ int connect_server(int initial_id) + #ifdef WIN32 + unsigned int attempts = 2; + #endif //WIN32 ++ ++ extern agent *agt; ++ + int rc = initial_id; + + /* Checking if the initial is zero, meaning we have to +@@ -139,6 +142,8 @@ void start_agent(int is_startup) + char cleartext[OS_MAXSTR + 1]; + char fmsg[OS_MAXSTR + 1]; + ++ extern agent *agt; ++ + memset(msg, '\0', OS_MAXSTR + 2); + memset(buffer, '\0', OS_MAXSTR + 1); + memset(cleartext, '\0', OS_MAXSTR + 1); +@@ -241,6 +246,8 @@ void os_agent_cb(int fd, short ev, void *arg) { + struct imsg imsg; + struct imsgbuf *ibuf = (struct imsgbuf *)arg; + ++ extern agent *agt; ++ + if (ev & EV_READ) { + if ((n = imsg_read(ibuf) == -1 && errno != EAGAIN)) { + ErrorExit("%s: ERROR: imsg_read() failed: %s", ARGV0, strerror(errno)); +diff --git a/src/os_net/os_net.c b/src/os_net/os_net.c +index f18e3be77..756e9fac8 100644 +--- a/src/os_net/os_net.c ++++ b/src/os_net/os_net.c +@@ -14,7 +14,7 @@ + #include <errno.h> + #include "shared.h" + #include "os_net.h" +-agent *agt; ++agent *os_net_agt; + + /* Prototypes */ + static OSNetInfo *OS_Bindport(char *_port, unsigned int _proto, const char *_ip); +@@ -346,11 +346,11 @@ int OS_Connect(char *_port, unsigned int protocol, const char *_ip) + return(OS_INVALID); + } + +- if (agt) { +- if (agt->lip) { ++ if (os_net_agt) { ++ if (os_net_agt->lip) { + memset(&hints, 0, sizeof(struct addrinfo)); + hints.ai_flags = AI_NUMERICHOST; +- s = getaddrinfo(agt->lip, NULL, &hints, &result); ++ s = getaddrinfo(os_net_agt->lip, NULL, &hints, &result); + if (s != 0) { + verbose("getaddrinfo: %s", gai_strerror(s)); + } +@@ -363,8 +363,8 @@ int OS_Connect(char *_port, unsigned int protocol, const char *_ip) + memset(&hints, 0, sizeof(struct addrinfo)); + /* Allow IPv4 or IPv6 if local_ip isn't specified */ + hints.ai_family = AF_UNSPEC; +- if (agt) { +- if (agt->lip) { ++ if (os_net_agt) { ++ if (os_net_agt->lip) { + hints.ai_family = local_ai->ai_family; + } + } +@@ -398,13 +398,13 @@ int OS_Connect(char *_port, unsigned int protocol, const char *_ip) + continue; + } + +- if (agt) { +- if (agt->lip) { ++ if (os_net_agt) { ++ if (os_net_agt->lip) { + if (bind(ossock, local_ai->ai_addr, local_ai->ai_addrlen)) { + verbose("Unable to bind to local address %s. Ignoring. (%s)", +- agt->lip, strerror(errno)); ++ os_net_agt->lip, strerror(errno)); + } +- else verbose("Connecting from local address %s", agt->lip); ++ else verbose("Connecting from local address %s", os_net_agt->lip); + } + } + +diff --git a/src/os_net/os_net.h b/src/os_net/os_net.h +index 9b7250928..3aaf00429 100644 +--- a/src/os_net/os_net.h ++++ b/src/os_net/os_net.h +@@ -13,7 +13,7 @@ + + #include "headers/shared.h" + #include "config/client-config.h" +-extern agent *agt; ++extern agent *os_net_agt; + #ifdef WIN32 + #ifndef AI_ADDRCONFIG + #define AI_ADDRCONFIG 0x0400 +diff --git a/src/win32/win_agent.c b/src/win32/win_agent.c +index 40a37e621..a2ec784f2 100644 +--- a/src/win32/win_agent.c ++++ b/src/win32/win_agent.c +@@ -124,6 +124,7 @@ int local_start() + WSADATA wsaData; + DWORD threadID; + DWORD threadID2; ++ extern agent *agt; + + /* Start agent */ + agt = (agent *)calloc(1, sizeof(agent)); +@@ -271,6 +272,7 @@ int SendMSG(__attribute__((unused)) int queue, const char *message, const char * + char tmpstr[OS_MAXSTR + 2]; + char crypt_msg[OS_MAXSTR + 2]; + DWORD dwWaitResult; ++ extern agent *agt; + + tmpstr[OS_MAXSTR + 1] = '\0'; + crypt_msg[OS_MAXSTR + 1] = '\0'; +@@ -468,6 +470,8 @@ void send_win32_info(time_t curr_time) + tmp_msg[OS_MAXSTR + 1] = '\0'; + crypt_msg[OS_MAXSTR + 1] = '\0'; + ++ extern agent *agt; ++ + debug1("%s: DEBUG: Sending keep alive message.", ARGV0); + + /* Fix time */ diff --git a/net-analyzer/ossec-hids/files/makefile-3.2.0.patch b/net-analyzer/ossec-hids/files/makefile-3.2.0.patch new file mode 100644 index 000000000000..810bc077d438 --- /dev/null +++ b/net-analyzer/ossec-hids/files/makefile-3.2.0.patch @@ -0,0 +1,28 @@ +--- a/Makefile 2019-03-09 16:33:13.465947636 +0100 ++++ b/Makefile 2019-03-09 16:32:57.105946856 +0100 +@@ -370,7 +370,6 @@ + install-server: install-server-generic + + install-common: build +- ./init/adduser.sh ${OSSEC_USER} ${OSSEC_USER_MAIL} ${OSSEC_USER_REM} ${OSSEC_GROUP} ${PREFIX} + $(call INSTALL_CMD,0550,root,${OSSEC_GROUP}) -d ${PREFIX}/ + $(call INSTALL_CMD,0750,${OSSEC_USER},${OSSEC_GROUP}) -d ${PREFIX}/logs + $(call INSTALL_CMD,0660,${OSSEC_USER},${OSSEC_GROUP}) /dev/null ${PREFIX}/logs/ossec.log +@@ -1160,7 +1159,7 @@ + #### test ########## + #################### + +-CFLAGS_TEST = -g -O0 --coverage ++CFLAGS_TEST = -g -O0 + + LDFLAGS_TEST = -lcheck -lm -pthread -lrt + +@@ -1171,7 +1170,7 @@ + + test_programs = test_os_zlib test_os_xml test_os_regex test_os_crypto test_shared + +-.PHONY: test run_tests build_tests test_valgrind test_coverage ++.PHONY: test run_tests build_tests test_valgrind + + test: build_tests + ${MAKE} run_tests diff --git a/net-analyzer/ossec-hids/files/makefile-3.3.0.patch b/net-analyzer/ossec-hids/files/makefile-3.3.0.patch new file mode 100644 index 000000000000..810bc077d438 --- /dev/null +++ b/net-analyzer/ossec-hids/files/makefile-3.3.0.patch @@ -0,0 +1,28 @@ +--- a/Makefile 2019-03-09 16:33:13.465947636 +0100 ++++ b/Makefile 2019-03-09 16:32:57.105946856 +0100 +@@ -370,7 +370,6 @@ + install-server: install-server-generic + + install-common: build +- ./init/adduser.sh ${OSSEC_USER} ${OSSEC_USER_MAIL} ${OSSEC_USER_REM} ${OSSEC_GROUP} ${PREFIX} + $(call INSTALL_CMD,0550,root,${OSSEC_GROUP}) -d ${PREFIX}/ + $(call INSTALL_CMD,0750,${OSSEC_USER},${OSSEC_GROUP}) -d ${PREFIX}/logs + $(call INSTALL_CMD,0660,${OSSEC_USER},${OSSEC_GROUP}) /dev/null ${PREFIX}/logs/ossec.log +@@ -1160,7 +1159,7 @@ + #### test ########## + #################### + +-CFLAGS_TEST = -g -O0 --coverage ++CFLAGS_TEST = -g -O0 + + LDFLAGS_TEST = -lcheck -lm -pthread -lrt + +@@ -1171,7 +1170,7 @@ + + test_programs = test_os_zlib test_os_xml test_os_regex test_os_crypto test_shared + +-.PHONY: test run_tests build_tests test_valgrind test_coverage ++.PHONY: test run_tests build_tests test_valgrind + + test: build_tests + ${MAKE} run_tests diff --git a/net-analyzer/ossec-hids/files/makefile-3.6.0.patch b/net-analyzer/ossec-hids/files/makefile-3.6.0.patch new file mode 100644 index 000000000000..810bc077d438 --- /dev/null +++ b/net-analyzer/ossec-hids/files/makefile-3.6.0.patch @@ -0,0 +1,28 @@ +--- a/Makefile 2019-03-09 16:33:13.465947636 +0100 ++++ b/Makefile 2019-03-09 16:32:57.105946856 +0100 +@@ -370,7 +370,6 @@ + install-server: install-server-generic + + install-common: build +- ./init/adduser.sh ${OSSEC_USER} ${OSSEC_USER_MAIL} ${OSSEC_USER_REM} ${OSSEC_GROUP} ${PREFIX} + $(call INSTALL_CMD,0550,root,${OSSEC_GROUP}) -d ${PREFIX}/ + $(call INSTALL_CMD,0750,${OSSEC_USER},${OSSEC_GROUP}) -d ${PREFIX}/logs + $(call INSTALL_CMD,0660,${OSSEC_USER},${OSSEC_GROUP}) /dev/null ${PREFIX}/logs/ossec.log +@@ -1160,7 +1159,7 @@ + #### test ########## + #################### + +-CFLAGS_TEST = -g -O0 --coverage ++CFLAGS_TEST = -g -O0 + + LDFLAGS_TEST = -lcheck -lm -pthread -lrt + +@@ -1171,7 +1170,7 @@ + + test_programs = test_os_zlib test_os_xml test_os_regex test_os_crypto test_shared + +-.PHONY: test run_tests build_tests test_valgrind test_coverage ++.PHONY: test run_tests build_tests test_valgrind + + test: build_tests + ${MAKE} run_tests diff --git a/net-analyzer/ossec-hids/files/makefile.patch b/net-analyzer/ossec-hids/files/makefile.patch new file mode 100644 index 000000000000..2169b5287fd7 --- /dev/null +++ b/net-analyzer/ossec-hids/files/makefile.patch @@ -0,0 +1,28 @@ +--- a/Makefile 2018-10-12 00:25:16.000000000 +0200 ++++ b/Makefile 2018-10-26 17:59:44.458689842 +0200 +@@ -378,7 +378,6 @@ + install-server: install-server-generic + + install-common: build +- ./init/adduser.sh ${OSSEC_USER} ${OSSEC_USER_MAIL} ${OSSEC_USER_REM} ${OSSEC_GROUP} ${PREFIX} + install -d -m 0550 -o root -g ${OSSEC_GROUP} ${PREFIX}/ + install -d -m 0750 -o ${OSSEC_USER} -g ${OSSEC_GROUP} ${PREFIX}/logs + install -m 0660 -o ${OSSEC_USER} -g ${OSSEC_GROUP} /dev/null ${PREFIX}/logs/ossec.log +@@ -1166,7 +1165,7 @@ + #### test ########## + #################### + +-CFLAGS_TEST = -g -O0 --coverage ++CFLAGS_TEST = -g -O0 + + LDFLAGS_TEST = -lcheck -lm -pthread -lrt + +@@ -1177,7 +1176,7 @@ + + test_programs = test_os_zlib test_os_xml test_os_regex test_os_crypto test_shared + +-.PHONY: test run_tests build_tests test_valgrind test_coverage ++.PHONY: test run_tests build_tests test_valgrind + + test: build_tests + ${MAKE} run_tests diff --git a/net-analyzer/ossec-hids/metadata.xml b/net-analyzer/ossec-hids/metadata.xml new file mode 100644 index 000000000000..b30d7bb0ade8 --- /dev/null +++ b/net-analyzer/ossec-hids/metadata.xml @@ -0,0 +1,31 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>gentoo@seichter.de</email> + <name>Ralph Seichter</name> + </maintainer> + <maintainer type="project"> + <email>proxy-maint@gentoo.org</email> + <name>Proxy Maintainers</name> + </maintainer> + <longdescription> + OSSEC is a full platform to monitor and control your systems. It mixes + together all the aspects of HIDS (host-based intrusion detection), log + monitoring and SIM/SIEM together in a simple, powerful and open source + solution. + To determine which build target (agent, server, hybrid or local) best + suits your needs, please visit https://www.ossec.net/ and review the + documentation provided there. + </longdescription> + <use> + <flag name="agent">Build "agent" installation target (see package description)</flag> + <flag name="hybrid">Build "hybrid" installation target</flag> + <flag name="local">Build "local" installation target</flag> + <flag name="server">Build "server" installation target</flag> + </use> + <upstream> + <remote-id type="github">ossec/ossec-hids</remote-id> + </upstream> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/ossec-hids/ossec-hids-3.1.0.ebuild b/net-analyzer/ossec-hids/ossec-hids-3.1.0.ebuild new file mode 100644 index 000000000000..9df4ea46973f --- /dev/null +++ b/net-analyzer/ossec-hids/ossec-hids-3.1.0.ebuild @@ -0,0 +1,68 @@ +# Copyright 1999-2018 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit user + +DESCRIPTION="Open Source Host-based Intrusion Detection System" +HOMEPAGE="https://www.ossec.net/" +SRC_URI="https://github.com/ossec/ossec-hids/archive/${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64" +IUSE="agent hybrid local mysql postgres server sqlite" +REQUIRED_USE="^^ ( agent hybrid local server ) + ?? ( mysql postgres )" + +DEPEND="mysql? ( virtual/mysql ) + sqlite? ( dev-db/sqlite:3 ) + postgres? ( dev-db/postgresql:= ) + sys-libs/zlib:=" +RDEPEND="${DEPEND}" +S="${WORKDIR}/${P}/src" + +declare -a MY_OPT + +pkg_setup() { + enewuser ossec -1 -1 /var/ossec + enewuser ossecm -1 -1 -1 ossec + enewuser ossecr -1 -1 -1 ossec +} + +src_prepare() { + default + eapply "${FILESDIR}/makefile.patch" +} + +src_configure() { + local target="local" + use agent && target="agent" + use hybrid && target="hybrid" + use server && target="server" + MY_OPT=( + TARGET=${target} + USE_SQLITE=$(usex sqlite) + V=0 + ZLIB_SYSTEM=yes + ) + use mysql && MY_OPT+=( DATABASE=mysql ) + use postgres && MY_OPT+=( DATABASE=pgsql ) +} + +src_compile() { + emake "${MY_OPT[@]}" PREFIX=/var/ossec +} + +src_test() { + emake "${MY_OPT[@]}" PREFIX=/var/ossec test +} + +src_install() { + keepdir /var/ossec/logs/{alerts,archives,firewall} + keepdir /var/ossec/lua/{compiled,native} + keepdir /var/ossec/queue/{agent-info,agentless,alerts,diff,fts,ossec,rids,rootcheck,syscheck} + keepdir /var/ossec/{.ssh,stats,tmp,var/run} + emake "${MY_OPT[@]}" PREFIX="${D}/var/ossec" install +} diff --git a/net-analyzer/ossec-hids/ossec-hids-3.2.0-r1.ebuild b/net-analyzer/ossec-hids/ossec-hids-3.2.0-r1.ebuild new file mode 100644 index 000000000000..61c466015956 --- /dev/null +++ b/net-analyzer/ossec-hids/ossec-hids-3.2.0-r1.ebuild @@ -0,0 +1,64 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit user + +DESCRIPTION="Open Source Host-based Intrusion Detection System" +HOMEPAGE="https://www.ossec.net/" +SRC_URI="https://github.com/ossec/ossec-hids/archive/${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="amd64" +IUSE="agent hybrid local mysql postgres server sqlite" +REQUIRED_USE="^^ ( agent hybrid local server ) + ?? ( mysql postgres )" + +DEPEND="mysql? ( virtual/mysql ) + sqlite? ( dev-db/sqlite:3 ) + postgres? ( dev-db/postgresql:= )" +RDEPEND="${DEPEND}" +S="${WORKDIR}/${P}/src" +PATCHES=( "${FILESDIR}/makefile-${PV}.patch" ) + +declare -a MY_OPT + +pkg_setup() { + enewuser ossec -1 -1 /var/ossec + enewuser ossecm -1 -1 -1 ossec + enewuser ossecr -1 -1 -1 ossec +} + +src_configure() { + local target="local" + use agent && target="agent" + use hybrid && target="hybrid" + use server && target="server" + MY_OPT=( + TARGET=${target} + USE_SQLITE=$(usex sqlite) + V=0 + ZLIB_SYSTEM=yes + ) + use mysql && MY_OPT+=( DATABASE=mysql ) + use postgres && MY_OPT+=( DATABASE=pgsql ) +} + +src_compile() { + emake "${MY_OPT[@]}" PREFIX=/var/ossec +} + +src_test() { + emake "${MY_OPT[@]}" PREFIX=/var/ossec test +} + +src_install() { + keepdir /var/ossec/logs/{alerts,archives,firewall} + keepdir /var/ossec/lua/{compiled,native} + keepdir /var/ossec/queue/{agent-info,agentless,alerts,diff,fts,ossec,rids,rootcheck,syscheck} + keepdir /var/ossec/{.ssh,stats,tmp,var/run} + newenvd - 50ossec-hids <<<'CONFIG_PROTECT="/var/ossec/etc"' + emake "${MY_OPT[@]}" PREFIX="${D}/var/ossec" install +} diff --git a/net-analyzer/ossec-hids/ossec-hids-3.2.0.ebuild b/net-analyzer/ossec-hids/ossec-hids-3.2.0.ebuild new file mode 100644 index 000000000000..417ebde460d4 --- /dev/null +++ b/net-analyzer/ossec-hids/ossec-hids-3.2.0.ebuild @@ -0,0 +1,63 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit user + +DESCRIPTION="Open Source Host-based Intrusion Detection System" +HOMEPAGE="https://www.ossec.net/" +SRC_URI="https://github.com/ossec/ossec-hids/archive/${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64" +IUSE="agent hybrid local mysql postgres server sqlite" +REQUIRED_USE="^^ ( agent hybrid local server ) + ?? ( mysql postgres )" + +DEPEND="mysql? ( virtual/mysql ) + sqlite? ( dev-db/sqlite:3 ) + postgres? ( dev-db/postgresql:= )" +RDEPEND="${DEPEND}" +S="${WORKDIR}/${P}/src" +PATCHES=( "${FILESDIR}/makefile-${PV}.patch" ) + +declare -a MY_OPT + +pkg_setup() { + enewuser ossec -1 -1 /var/ossec + enewuser ossecm -1 -1 -1 ossec + enewuser ossecr -1 -1 -1 ossec +} + +src_configure() { + local target="local" + use agent && target="agent" + use hybrid && target="hybrid" + use server && target="server" + MY_OPT=( + TARGET=${target} + USE_SQLITE=$(usex sqlite) + V=0 + ZLIB_SYSTEM=yes + ) + use mysql && MY_OPT+=( DATABASE=mysql ) + use postgres && MY_OPT+=( DATABASE=pgsql ) +} + +src_compile() { + emake "${MY_OPT[@]}" PREFIX=/var/ossec +} + +src_test() { + emake "${MY_OPT[@]}" PREFIX=/var/ossec test +} + +src_install() { + keepdir /var/ossec/logs/{alerts,archives,firewall} + keepdir /var/ossec/lua/{compiled,native} + keepdir /var/ossec/queue/{agent-info,agentless,alerts,diff,fts,ossec,rids,rootcheck,syscheck} + keepdir /var/ossec/{.ssh,stats,tmp,var/run} + emake "${MY_OPT[@]}" PREFIX="${D}/var/ossec" install +} diff --git a/net-analyzer/ossec-hids/ossec-hids-3.3.0.ebuild b/net-analyzer/ossec-hids/ossec-hids-3.3.0.ebuild new file mode 100644 index 000000000000..c9b83c7daa34 --- /dev/null +++ b/net-analyzer/ossec-hids/ossec-hids-3.3.0.ebuild @@ -0,0 +1,67 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit user + +DESCRIPTION="Open Source Host-based Intrusion Detection System" +HOMEPAGE="https://www.ossec.net/" +SRC_URI="https://github.com/ossec/ossec-hids/archive/${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64" +IUSE="agent hybrid local mysql postgres server sqlite" +REQUIRED_USE="^^ ( agent hybrid local server ) + ?? ( mysql postgres )" + +DEPEND="dev-libs/libpcre2 + mysql? ( virtual/mysql ) + sqlite? ( dev-db/sqlite:3 ) + postgres? ( dev-db/postgresql:= )" +RDEPEND="${DEPEND}" +S="${WORKDIR}/${P}/src" +PATCHES=( "${FILESDIR}/makefile-${PV}.patch" ) + +declare -a MY_OPT + +pkg_setup() { + enewgroup ossec + enewuser ossec -1 -1 /var/ossec ossec + enewuser ossecm -1 -1 -1 ossec + enewuser ossecr -1 -1 -1 ossec +} + +src_configure() { + local target="local" + use agent && target="agent" + use hybrid && target="hybrid" + use server && target="server" + MY_OPT=( + PCRE2_SYSTEM=yes + TARGET=${target} + USE_SQLITE=$(usex sqlite) + V=0 + ZLIB_SYSTEM=yes + ) + use mysql && MY_OPT+=( DATABASE=mysql ) + use postgres && MY_OPT+=( DATABASE=pgsql ) +} + +src_compile() { + emake "${MY_OPT[@]}" PREFIX=/var/ossec +} + +src_test() { + emake "${MY_OPT[@]}" PREFIX=/var/ossec test +} + +src_install() { + keepdir /var/ossec/logs/{alerts,archives,firewall} + keepdir /var/ossec/lua/{compiled,native} + keepdir /var/ossec/queue/{agent-info,agentless,alerts,diff,fts,ossec,rids,rootcheck,syscheck} + keepdir /var/ossec/{.ssh,stats,tmp,var/run} + newenvd - 50ossec-hids <<<'CONFIG_PROTECT="/var/ossec/etc"' + emake "${MY_OPT[@]}" PREFIX="${D}/var/ossec" install +} diff --git a/net-analyzer/ossec-hids/ossec-hids-3.6.0.ebuild b/net-analyzer/ossec-hids/ossec-hids-3.6.0.ebuild new file mode 100644 index 000000000000..d305e7ce418f --- /dev/null +++ b/net-analyzer/ossec-hids/ossec-hids-3.6.0.ebuild @@ -0,0 +1,74 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +DESCRIPTION="Open Source Host-based Intrusion Detection System" +HOMEPAGE="https://www.ossec.net/" +SRC_URI="https://github.com/ossec/ossec-hids/archive/${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64" +IUSE="agent hybrid local mysql postgres server sqlite test" +REQUIRED_USE="^^ ( agent hybrid local server ) + ?? ( mysql postgres )" +RESTRICT="!test? ( test )" + +RDEPEND="acct-user/ossec + acct-user/ossecm + acct-user/ossecr + dev-libs/libevent + dev-libs/libpcre2 + mysql? ( virtual/mysql ) + postgres? ( dev-db/postgresql:= ) + sqlite? ( dev-db/sqlite:3 )" +DEPEND="${RDEPEND} + test? ( + dev-libs/check + dev-python/subunit + )" +S="${WORKDIR}/${P}/src" + +declare -a MY_OPT + +src_prepare() { + # Patch for the GCC version 10 -fno-common change. See + # https://github.com/ossec/ossec-hids/pull/1875 + eapply -p2 "${FILESDIR}/gcc-fno-common-${PV}.patch" + eapply -p1 "${FILESDIR}/makefile-${PV}.patch" + eapply_user +} + +src_configure() { + local target="local" + use agent && target="agent" + use hybrid && target="hybrid" + use server && target="server" + MY_OPT=( + PCRE2_SYSTEM=yes + TARGET=${target} + USE_SQLITE=$(usex sqlite) + V=0 + ZLIB_SYSTEM=yes + ) + use mysql && MY_OPT+=( DATABASE=mysql ) + use postgres && MY_OPT+=( DATABASE=pgsql ) +} + +src_compile() { + emake "${MY_OPT[@]}" PREFIX=/var/ossec +} + +src_test() { + emake "${MY_OPT[@]}" PREFIX=/var/ossec test +} + +src_install() { + keepdir /var/ossec/logs/{alerts,archives,firewall} + keepdir /var/ossec/lua/{compiled,native} + keepdir /var/ossec/queue/{agent-info,agentless,alerts,diff,fts,ossec,rids,rootcheck,syscheck} + keepdir /var/ossec/{.ssh,stats,tmp,var/run} + newenvd - 50ossec-hids <<<'CONFIG_PROTECT="/var/ossec/etc"' + emake "${MY_OPT[@]}" PREFIX="${D}/var/ossec" install +} diff --git a/net-analyzer/ostinato/Manifest b/net-analyzer/ostinato/Manifest new file mode 100644 index 000000000000..44c30549ab5a --- /dev/null +++ b/net-analyzer/ostinato/Manifest @@ -0,0 +1 @@ +DIST ostinato-0.9_p20180522.tar.gz 424128 BLAKE2B 69a15e523986cd34f89669fab0ed64987f68ea7d82d481de418c2d86f3b325b5c1ff9081db8c77532b603b01f504c37c24a4f7f5b7244657cac8b2f707bc7bdf SHA512 7d8359b193c98165ea376ad0ad57e01b782e35a7b887465d74c67ae1cd434036e8beb67593c569e15a87d5d0c7f602c9f01acf068e9ffff0c0496ab4f889a83a diff --git a/net-analyzer/ostinato/files/ostinato-0.9_p20180522-buildfix.patch b/net-analyzer/ostinato/files/ostinato-0.9_p20180522-buildfix.patch new file mode 100644 index 000000000000..ff09d689ae5c --- /dev/null +++ b/net-analyzer/ostinato/files/ostinato-0.9_p20180522-buildfix.patch @@ -0,0 +1,17 @@ +--- a/common/mld.cpp 2018-05-22 18:18:21.000000000 +0200 ++++ b/common/mld.cpp 2018-06-26 13:59:58.562569302 +0200 +@@ -24,6 +24,14 @@ + #include <QHostAddress> + #include <QStringList> + ++template <> inline Q_DECL_CONSTEXPR unsigned long qbswap<unsigned long>(unsigned long source) { ++ if (sizeof(unsigned long) == 8) { ++ return qbswap<quint64>(quint64(source)); ++ } else { ++ return qbswap<quint32>(quint32(source)); ++ } ++} ++ + MldProtocol::MldProtocol(StreamBase *stream, AbstractProtocol *parent) + : GmpProtocol(stream, parent) + { diff --git a/net-analyzer/ostinato/files/ostinato-0.9_p20180522-no-modeltest.patch b/net-analyzer/ostinato/files/ostinato-0.9_p20180522-no-modeltest.patch new file mode 100644 index 000000000000..5e7733aeed10 --- /dev/null +++ b/net-analyzer/ostinato/files/ostinato-0.9_p20180522-no-modeltest.patch @@ -0,0 +1,10 @@ +--- a/extra/extra.pro 2018-05-22 18:18:21.000000000 +0200 ++++ b/extra/extra.pro 2018-06-26 14:15:49.162937000 +0200 +@@ -1,7 +1,3 @@ + TEMPLATE = subdirs + SUBDIRS = \ + qhexedit2 +- +-greaterThan(QT_MINOR_VERSION, 6) { +-SUBDIRS += modeltest +-} diff --git a/net-analyzer/ostinato/metadata.xml b/net-analyzer/ostinato/metadata.xml new file mode 100644 index 000000000000..8b7e087f3f45 --- /dev/null +++ b/net-analyzer/ostinato/metadata.xml @@ -0,0 +1,12 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>zerochaos@gentoo.org</email> + <name>Rick Farina</name> + </maintainer> + <upstream> + <remote-id type="google-code">ostinato</remote-id> + </upstream> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/ostinato/ostinato-0.9_p20180522.ebuild b/net-analyzer/ostinato/ostinato-0.9_p20180522.ebuild new file mode 100644 index 000000000000..34b40de482cc --- /dev/null +++ b/net-analyzer/ostinato/ostinato-0.9_p20180522.ebuild @@ -0,0 +1,39 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +COMMIT=9a4e7e7550c6b20a8f0f1393a55036492c1b7703 +inherit qmake-utils + +DESCRIPTION="A packet generator and analyzer" +HOMEPAGE="https://ostinato.org/" +SRC_URI="https://github.com/pstavirs/${PN}/archive/${COMMIT}.tar.gz -> ${P}.tar.gz" + +LICENSE="GPL-3" +SLOT="0" +#KEYWORDS="~amd64 ~arm ~x86" +IUSE="" + +#https://github.com/pstavirs/ostinato/issues/173 +# libpcap dep is versioned to pull in the fix for #602098 +DEPEND=" + dev-libs/protobuf:= + dev-qt/qtcore:5 + dev-qt/qtgui:5 + dev-qt/qtscript:5 + dev-qt/qtwidgets:5 + >=net-libs/libpcap-1.8.1-r2 +" +RDEPEND="${DEPEND}" + +S="${WORKDIR}/${PN}-${COMMIT}" + +PATCHES=( + "${FILESDIR}/${P}-buildfix.patch" + "${FILESDIR}/${P}-no-modeltest.patch" +) + +src_configure() { + eqmake5 PREFIX="${ED}/usr" ost.pro +} diff --git a/net-analyzer/p0f/Manifest b/net-analyzer/p0f/Manifest new file mode 100644 index 000000000000..0446617b5acf --- /dev/null +++ b/net-analyzer/p0f/Manifest @@ -0,0 +1 @@ +DIST p0f-3.09b.tgz 92896 BLAKE2B 5db3fe335c1dd3fedca5c007e8a133ff7327189c640ec6bce254ae7b1e6fe5729acd39d5a3d507e286742ac0b7c7612eb5aae452d60ab0e737cb05b0191ffbbb SHA512 2a688baa865f27c91c023a7c53e530649f56a681e6ca2533152ab07b42883857b20c378b636e87dda8d1d5dfac17e426d09ee032b363d0b7d98e57a9ff6164d0 diff --git a/net-analyzer/p0f/metadata.xml b/net-analyzer/p0f/metadata.xml new file mode 100644 index 000000000000..bd13a914477c --- /dev/null +++ b/net-analyzer/p0f/metadata.xml @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<maintainer type="project"> + <email>netmon@gentoo.org</email> + <name>Gentoo network monitoring and analysis project</name> +</maintainer> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/p0f/p0f-3.09_beta.ebuild b/net-analyzer/p0f/p0f-3.09_beta.ebuild new file mode 100644 index 000000000000..92f2334f50ea --- /dev/null +++ b/net-analyzer/p0f/p0f-3.09_beta.ebuild @@ -0,0 +1,51 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 +inherit toolchain-funcs + +MY_P=${P/_beta/b} + +DESCRIPTION="A tool to perform passive OS detection based on SYN packets" +HOMEPAGE="https://lcamtuf.coredump.cx/p0f3/" +SRC_URI="https://lcamtuf.coredump.cx/p0f3/releases/${MY_P}.tgz" + +LICENSE="LGPL-2.1" +SLOT="0" +KEYWORDS="amd64 ppc sparc x86 ~amd64-linux ~x86-linux ~ppc-macos" +IUSE="debug ipv6" + +RDEPEND="net-libs/libpcap" +DEPEND="${RDEPEND}" + +S=${WORKDIR}/${MY_P} + +src_prepare() { + default + + sed -i \ + -e 's:-g -ggdb::' \ + -e 's:-O3::' \ + -e '/^CC/s:=:?=:' \ + -e '/^CFLAGS/s:=:+=:' \ + -e '/^LDFLAGS/s:=:+=:' \ + build.sh tools/Makefile || die + + sed -i -e "/FP_FILE/s:p0f.fp:${EPREFIX}/etc/&:" config.h || die +} + +src_compile() { + tc-export CC + ./build.sh $(use debug && echo debug) || die + emake -C tools p0f-client p0f-sendsyn $(use ipv6 && echo p0f-sendsyn6) +} + +src_install() { + dosbin p0f tools/p0f-{client,sendsyn} + use ipv6 && dosbin tools/p0f-sendsyn6 + + insinto /etc + doins p0f.fp + + dodoc docs/{ChangeLog,README,TODO,*.txt} tools/README-TOOLS +} diff --git a/net-analyzer/packit/Manifest b/net-analyzer/packit/Manifest new file mode 100644 index 000000000000..69e82515e9d3 --- /dev/null +++ b/net-analyzer/packit/Manifest @@ -0,0 +1,2 @@ +DIST packit-1.6.1.tar.gz 52643 BLAKE2B 4b67c179140a21ec3dc8b5ae2e116a771fdbd860c3a880588a29346f04c956a80a59fcaf84f42ae6c505554e5b942964ed3f2d3a06d408e5b36850276832994a SHA512 462470bfc755dc33418ae0a65237d0dcbbe04609de710883134bcb1e13cff9212cd9a28e888b2e839a06a566fa080ecd6c6668414f1cac2bde337c81d1ac58a2 +DIST packit-1.7.tar.gz 53192 BLAKE2B f5a7fcd0790e05be593be47c2339c3ecb14b2fd45308a273ecc9d5398087698605c2174a8440e870ccf35fd9d560bea11ca720e44045115c15757f6f98d00ac4 SHA512 4e7d13ef5387dc446e718792562dbf84f9e0b611196a3590ea8e8b4411ae30694b48f28ab632a0b692935adffb44757e65a4eb5ab942b5d625acbdc08d34aefd diff --git a/net-analyzer/packit/files/packit-1.0-noopt.patch b/net-analyzer/packit/files/packit-1.0-noopt.patch new file mode 100644 index 000000000000..d6bfdf6fb74f --- /dev/null +++ b/net-analyzer/packit/files/packit-1.0-noopt.patch @@ -0,0 +1,10 @@ +--- a/src/main.c ++++ b/src/main.c +@@ -201,6 +201,7 @@ + #ifdef DEBUG + fprintf(stdout, "DEBUG: parse_inject\n"); + #endif ++ if (!opts) print_usage(); + + while((opt = getopt(argc, argv, opts)) != -1) + { diff --git a/net-analyzer/packit/files/packit-1.6.1-fno-common.patch b/net-analyzer/packit/files/packit-1.6.1-fno-common.patch new file mode 100644 index 000000000000..f4813d868ab1 --- /dev/null +++ b/net-analyzer/packit/files/packit-1.6.1-fno-common.patch @@ -0,0 +1,251 @@ +--- a/src/capture_defs.h ++++ b/src/capture_defs.h +@@ -30,12 +30,12 @@ + #define READ_TIMEOUT 500 + #define SNAPLEN_DEFAULT 68 + +-u_int16_t g_display; +-u_int16_t g_link_layer; +-u_int16_t g_dump_pkt; +-u_int16_t g_time_gmt; +-u_int16_t g_t_rst; +-u_int16_t g_snap_len; +-u_int32_t g_pkt_rst; ++extern u_int16_t g_display; ++extern u_int16_t g_link_layer; ++extern u_int16_t g_dump_pkt; ++extern u_int16_t g_time_gmt; ++extern u_int16_t g_t_rst; ++extern u_int16_t g_snap_len; ++extern u_int32_t g_pkt_rst; + + #endif /* __CAPTURE_DEFS_H */ +--- a/src/error.c ++++ b/src/error.c +@@ -26,6 +26,8 @@ + + #include "error.h" + ++char error_buf[ERRBUF_MAXLEN]; ++ + void + fatal_error(char *err,...) + { +--- a/src/error.h ++++ b/src/error.h +@@ -33,7 +33,7 @@ + #define SUCCESS 1 + #define FAILURE -1 + +-char error_buf[ERRBUF_MAXLEN]; ++extern char error_buf[ERRBUF_MAXLEN]; + + void fatal_error(char *,...); + +--- a/src/globals.h ++++ b/src/globals.h +@@ -138,20 +138,20 @@ + #define P_INT64 0x7FFFFFFFFFFFFFFF + #define P_UINT64 0xFFFFFFFFFFFFFFFF + +-char g_w_file[OPT_MAXLEN]; +-char g_r_file[OPT_MAXLEN]; ++extern char g_w_file[OPT_MAXLEN]; ++extern char g_r_file[OPT_MAXLEN]; + +-pcap_t *g_pkt; +-u_int8_t g_tr_fin; +-char *g_filter; +-char *g_device; +-u_int16_t g_hdr_len; +-u_int16_t g_pkt_len; +-u_int16_t g_verbose; +-u_int16_t g_resolve; +-u_int16_t g_p_mode; +-u_int64_t g_cnt; +-u_int64_t g_inj_cnt; +-u_int64_t g_cap_cnt; ++extern pcap_t *g_pkt; ++extern u_int8_t g_tr_fin; ++extern char *g_filter; ++extern char *g_device; ++extern u_int16_t g_hdr_len; ++extern u_int16_t g_pkt_len; ++extern u_int16_t g_verbose; ++extern u_int16_t g_resolve; ++extern u_int16_t g_p_mode; ++extern u_int64_t g_cnt; ++extern u_int64_t g_inj_cnt; ++extern u_int64_t g_cap_cnt; + + #endif /* __GLOBALS_H */ +--- a/src/inject_defs.h ++++ b/src/inject_defs.h +@@ -30,7 +30,7 @@ + #ifndef __INJECTION_STRUCTS_H + #define __INJECTION_STRUCTS_H + +-struct ip4hdr_opts ++extern struct ip4hdr_opts + { + u_int16_t p; /* protocol type */ + u_int16_t rand_p; +@@ -59,7 +59,7 @@ + u_int16_t rand_d_addr; + } g_ip4hdr_o; + +-struct tcphdr_opts ++extern struct tcphdr_opts + { + u_int16_t s_port; /* tcp source port */ + u_int16_t d_port; /* tcp destination port */ +@@ -82,7 +82,7 @@ + + } g_thdr_o; + +-struct udphdr_opts ++extern struct udphdr_opts + { + u_int16_t s_port; /* udp source port */ + u_int16_t d_port; /* udp destination port */ +@@ -90,7 +90,7 @@ + u_int16_t sum; /* udp checksum */ + } g_uhdr_o; + +-struct icmp4hdr_opts ++extern struct icmp4hdr_opts + { + u_int16_t type; /* icmp4 type */ + u_int16_t code; /* icmp4 code */ +@@ -132,7 +132,7 @@ + u_int32_t ttime; /* transmit timestamp */ + } g_i4hdr_o; + +-struct enethdr_opts ++extern struct enethdr_opts + { + u_int16_t rand_s_addr; + u_int16_t rand_d_addr; +@@ -143,7 +143,7 @@ + u_int8_t dhw_addr[18]; + } g_ehdr_o; + +-struct arphdr_opts ++extern struct arphdr_opts + { + u_int16_t op_type; /* arp operation */ + +@@ -163,28 +163,28 @@ + u_int8_t rhw_addr[18]; + } g_ahdr_o; + +-libnet_t *g_pkt_d; ++extern libnet_t *g_pkt_d; + +-u_int16_t g_init_type; +-u_int16_t g_rand_d_port; +-u_int16_t g_rand_s_port; +-u_int16_t g_s_port; +-u_int16_t g_d_port; +-u_int16_t g_port_range; +-u_int16_t g_interval_sec; +-u_int16_t g_interval_usec; +-u_int16_t g_injection_type; +-u_int16_t g_r_timeout; +-u_int16_t g_burst_rate; +-u_int16_t g_payload_len; +-u_int8_t *g_payload; +-u_int8_t g_hex_payload; +-u_int8_t *g_s_d_port; +-u_int8_t g_hwaddr_p[18]; +-u_int8_t g_rawip; ++extern u_int16_t g_init_type; ++extern u_int16_t g_rand_d_port; ++extern u_int16_t g_rand_s_port; ++extern u_int16_t g_s_port; ++extern u_int16_t g_d_port; ++extern u_int16_t g_port_range; ++extern u_int16_t g_interval_sec; ++extern u_int16_t g_interval_usec; ++extern u_int16_t g_injection_type; ++extern u_int16_t g_r_timeout; ++extern u_int16_t g_burst_rate; ++extern u_int16_t g_payload_len; ++extern u_int8_t *g_payload; ++extern u_int8_t g_hex_payload; ++extern u_int8_t *g_s_d_port; ++extern u_int8_t g_hwaddr_p[18]; ++extern u_int8_t g_rawip; + +-struct timeval g_bf_pcap; +-struct timeval g_af_pcap; ++extern struct timeval g_bf_pcap; ++extern struct timeval g_af_pcap; + + + #endif /* __INJECTION_STRUCTS_H */ +--- a/src/main.c ++++ b/src/main.c +@@ -30,6 +30,62 @@ + + #include "main.h" + ++char g_w_file[OPT_MAXLEN]; ++char g_r_file[OPT_MAXLEN]; ++ ++pcap_t *g_pkt; ++u_int8_t g_tr_fin; ++char *g_filter; ++char *g_device; ++u_int16_t g_hdr_len; ++u_int16_t g_pkt_len; ++u_int16_t g_verbose; ++u_int16_t g_resolve; ++u_int16_t g_p_mode; ++u_int64_t g_cnt; ++u_int64_t g_inj_cnt; ++u_int64_t g_cap_cnt; ++ ++/* capture_defs.h */ ++u_int16_t g_display; ++u_int16_t g_link_layer; ++u_int16_t g_dump_pkt; ++u_int16_t g_time_gmt; ++u_int16_t g_t_rst; ++u_int16_t g_snap_len; ++u_int32_t g_pkt_rst; ++ ++/* inject_defs.h */ ++u_int16_t g_init_type; ++u_int16_t g_rand_d_port; ++u_int16_t g_rand_s_port; ++u_int16_t g_s_port; ++u_int16_t g_d_port; ++u_int16_t g_port_range; ++u_int16_t g_interval_sec; ++u_int16_t g_interval_usec; ++u_int16_t g_injection_type; ++u_int16_t g_r_timeout; ++u_int16_t g_burst_rate; ++u_int16_t g_payload_len; ++u_int8_t *g_payload; ++u_int8_t g_hex_payload; ++u_int8_t *g_s_d_port; ++u_int8_t g_hwaddr_p[18]; ++u_int8_t g_rawip; ++ ++struct timeval g_bf_pcap; ++struct timeval g_af_pcap; ++ ++struct arphdr_opts g_ahdr_o; ++struct enethdr_opts g_ehdr_o; ++struct icmp4hdr_opts g_i4hdr_o; ++struct ip4hdr_opts g_ip4hdr_o; ++struct tcphdr_opts g_thdr_o; ++struct udphdr_opts g_uhdr_o; ++ ++libnet_t *g_pkt_d; ++ + void + parse_capture_options(int argc, char *argv[]) + { diff --git a/net-analyzer/packit/metadata.xml b/net-analyzer/packit/metadata.xml new file mode 100644 index 000000000000..bd13a914477c --- /dev/null +++ b/net-analyzer/packit/metadata.xml @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<maintainer type="project"> + <email>netmon@gentoo.org</email> + <name>Gentoo network monitoring and analysis project</name> +</maintainer> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/packit/packit-1.6.1.ebuild b/net-analyzer/packit/packit-1.6.1.ebuild new file mode 100644 index 000000000000..48ba4aeab1c9 --- /dev/null +++ b/net-analyzer/packit/packit-1.6.1.ebuild @@ -0,0 +1,33 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +inherit autotools + +DESCRIPTION="network packet generator and capture tool" +HOMEPAGE="https://github.com/resurrecting-open-source-projects/packit" +SRC_URI="https://github.com/resurrecting-open-source-projects/packit/archive/${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="amd64 ~ppc x86 ~amd64-linux ~x86-linux ~ppc-macos" + +DEPEND=" + net-libs/libnet:1.1 + net-libs/libpcap +" +RDEPEND="${DEPEND}" +PATCHES=( + "${FILESDIR}"/${PN}-1.0-noopt.patch + "${FILESDIR}"/${PN}-1.6.1-fno-common.patch +) + +src_prepare() { + default + eautoreconf +} + +src_install() { + default + dodoc docs/* +} diff --git a/net-analyzer/packit/packit-1.7.ebuild b/net-analyzer/packit/packit-1.7.ebuild new file mode 100644 index 000000000000..5059d8e159a0 --- /dev/null +++ b/net-analyzer/packit/packit-1.7.ebuild @@ -0,0 +1,32 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +inherit autotools + +DESCRIPTION="network packet generator and capture tool" +HOMEPAGE="https://github.com/resurrecting-open-source-projects/packit" +SRC_URI="https://github.com/resurrecting-open-source-projects/packit/archive/${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~ppc ~x86 ~amd64-linux ~x86-linux ~ppc-macos" + +DEPEND=" + net-libs/libnet:1.1 + net-libs/libpcap +" +RDEPEND="${DEPEND}" +PATCHES=( + "${FILESDIR}"/${PN}-1.0-noopt.patch +) + +src_prepare() { + default + eautoreconf +} + +src_install() { + default + dodoc docs/* +} diff --git a/net-analyzer/packit/packit-9999.ebuild b/net-analyzer/packit/packit-9999.ebuild new file mode 100644 index 000000000000..d58eaf300f88 --- /dev/null +++ b/net-analyzer/packit/packit-9999.ebuild @@ -0,0 +1,32 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +inherit autotools git-r3 + +DESCRIPTION="network packet generator and capture tool" +HOMEPAGE="https://github.com/resurrecting-open-source-projects/packit" +EGIT_REPO_URI="https://github.com/resurrecting-open-source-projects/packit" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="" + +DEPEND=" + net-libs/libnet:1.1 + net-libs/libpcap +" +RDEPEND="${DEPEND}" +PATCHES=( + "${FILESDIR}"/${PN}-1.0-noopt.patch +) + +src_prepare() { + default + eautoreconf +} + +src_install() { + default + dodoc docs/* +} diff --git a/net-analyzer/pathload/Manifest b/net-analyzer/pathload/Manifest new file mode 100644 index 000000000000..608325e460be --- /dev/null +++ b/net-analyzer/pathload/Manifest @@ -0,0 +1 @@ +DIST pathload-1.3.2.tar.gz 68524 BLAKE2B 0ea27000647c292e4d04c92574dc2d63fcdd9c16be57d9af49df8651e6f8905561c70f48b9854c69a16c4b3d16fc8bec61ffed3cbbdad7e1f18e2209e9b4f199 SHA512 9fef51c86b8aa2c28a33effe5a5bff36eebc0812f6d6744fac93df46ec0cbce8f5977d24b6ac52442386fb263550fe46e639c4a3ff4612fe92ad09d6595e5d7f diff --git a/net-analyzer/pathload/files/pathload-1.3.2-make.patch b/net-analyzer/pathload/files/pathload-1.3.2-make.patch new file mode 100644 index 000000000000..451b0eadf538 --- /dev/null +++ b/net-analyzer/pathload/files/pathload-1.3.2-make.patch @@ -0,0 +1,19 @@ +--- a/makefile.in ++++ b/makefile.in +@@ -11,13 +11,13 @@ + + TARGETS=pathload_snd pathload_rcv + +-all:${TARGETS} clean ++all:${TARGETS} + + pathload_snd: $(SOBJS) +- $(CC) $(SOBJS) -o pathload_snd $(LIBS) $(LDFLAGS) $(CFLAGS) ++ $(CC) $(CFLAGS) $(LDFLAGS) $(SOBJS) -o pathload_snd $(LIBS) + + pathload_rcv: $(ROBJS) +- $(CC) $(ROBJS) -o pathload_rcv $(LIBS) $(LDFLAGS) $(CFLAGS) ++ $(CC) $(CFLAGS) $(LDFLAGS) $(ROBJS) -o pathload_rcv $(LIBS) + + pathload_rcv.o pathload_rcv_func.o: pathload_gbls.h pathload_rcv.h + diff --git a/net-analyzer/pathload/metadata.xml b/net-analyzer/pathload/metadata.xml new file mode 100644 index 000000000000..bd13a914477c --- /dev/null +++ b/net-analyzer/pathload/metadata.xml @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<maintainer type="project"> + <email>netmon@gentoo.org</email> + <name>Gentoo network monitoring and analysis project</name> +</maintainer> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/pathload/pathload-1.3.2-r1.ebuild b/net-analyzer/pathload/pathload-1.3.2-r1.ebuild new file mode 100644 index 000000000000..27b8252d8e52 --- /dev/null +++ b/net-analyzer/pathload/pathload-1.3.2-r1.ebuild @@ -0,0 +1,28 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +inherit toolchain-funcs + +DESCRIPTION="Non-intrusive utility for estimation of available bandwidth of Internet paths" +HOMEPAGE="https://www.cc.gatech.edu/fac/constantinos.dovrolis/bw-est/pathload.html" +SRC_URI="https://dev.gentoo.org/~jer/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" + +S=${WORKDIR}/${PN}_${PV} +PATCHES=( + "${FILESDIR}"/${PN}-1.3.2-make.patch +) + +src_configure() { + tc-export CC + default +} + +src_install() { + dobin ${PN}_snd ${PN}_rcv + dodoc CHANGELOG CHANGES README +} diff --git a/net-analyzer/pbgpp/Manifest b/net-analyzer/pbgpp/Manifest new file mode 100644 index 000000000000..43fd678851e9 --- /dev/null +++ b/net-analyzer/pbgpp/Manifest @@ -0,0 +1 @@ +DIST pbgpp-0.2.10.tar.gz 38796 BLAKE2B d4b2ad0796a7682b4ad9bc8265c501b428854ed0c6cf3d0d0b4ed502216e3a813adb204c135b9880ca257050b92a8968449de12c14fc2a4b78c95872ca6d0c07 SHA512 ecacd1ef81b1ed379ab4bf5aad534e93bef94a2f67fdb04cfa5dc98d13f53060ce99bc220c7bce64862a182c11c4b60a31752978cec619f5546dfd7fb721d466 diff --git a/net-analyzer/pbgpp/metadata.xml b/net-analyzer/pbgpp/metadata.xml new file mode 100644 index 000000000000..0375a697bcdb --- /dev/null +++ b/net-analyzer/pbgpp/metadata.xml @@ -0,0 +1,9 @@ +<?xml version='1.0' encoding='UTF-8'?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>chainsaw@gentoo.org</email> + <name>Tony Vroon</name> + </maintainer> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/pbgpp/pbgpp-0.2.10.ebuild b/net-analyzer/pbgpp/pbgpp-0.2.10.ebuild new file mode 100644 index 000000000000..b150d3a518fe --- /dev/null +++ b/net-analyzer/pbgpp/pbgpp-0.2.10.ebuild @@ -0,0 +1,19 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 +PYTHON_COMPAT=( python2_7 ) + +inherit distutils-r1 + +DESCRIPTION="PCAP BGP Parser" +HOMEPAGE="https://github.com/de-cix/pbgp-parser" +SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz" + +LICENSE="Apache-2.0" +SLOT="0" +KEYWORDS="~amd64" +IUSE="" + +RDEPEND="dev-python/kafka-python[${PYTHON_USEDEP}] + dev-python/pcapy[${PYTHON_USEDEP}]" diff --git a/net-analyzer/pbnj/Manifest b/net-analyzer/pbnj/Manifest new file mode 100644 index 000000000000..4e843ab2f086 --- /dev/null +++ b/net-analyzer/pbnj/Manifest @@ -0,0 +1 @@ +DIST pbnj-2.04.tar.bz2 57438 BLAKE2B 43b057fb95e74cd7f4d8d11e905fb6c3734971295db13116e94250a7665d28f5a9bb288b5ba07f50c7426a9a90664ea90bb790ad0aea87c24838398faa3ec0f8 SHA512 7f486c4e16a891d90ff10fa80b85ba68346f37152c5f932832c3760985f0dff5c58e0f23309ed395f0c06ff4287bf4af66d1b39de7f2838a868e6b8335afe206 diff --git a/net-analyzer/pbnj/files/pbnj-2.04-ipv4_sort.patch b/net-analyzer/pbnj/files/pbnj-2.04-ipv4_sort.patch new file mode 100644 index 000000000000..9b9fd8237320 --- /dev/null +++ b/net-analyzer/pbnj/files/pbnj-2.04-ipv4_sort.patch @@ -0,0 +1,11 @@ +--- a/t/02parser.t ++++ b/t/02parser.t +@@ -40,7 +40,7 @@ +
+ #TESTING IPV4_SORT
+ my @hosts = (HOST3, HOST1, HOST4, HOST2);
+- is_deeply([$np->ipv4_sort(@hosts)],[HOST1, HOST2, HOST3, HOST4], 'Testing ipv4_sort');
++ is_deeply([$np->addr_sort(@hosts)],[HOST1, HOST2, HOST3, HOST4], 'Testing addr_sort');
+
+
+ #TESTING ALL_HOSTS()
diff --git a/net-analyzer/pbnj/metadata.xml b/net-analyzer/pbnj/metadata.xml new file mode 100644 index 000000000000..60b691509b0c --- /dev/null +++ b/net-analyzer/pbnj/metadata.xml @@ -0,0 +1,12 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>netmon@gentoo.org</email> + <name>Gentoo network monitoring and analysis project</name> + </maintainer> + <upstream> + <remote-id type="sourceforge">pbnj</remote-id> + </upstream> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/pbnj/pbnj-2.04-r1.ebuild b/net-analyzer/pbnj/pbnj-2.04-r1.ebuild new file mode 100644 index 000000000000..22d8615ff550 --- /dev/null +++ b/net-analyzer/pbnj/pbnj-2.04-r1.ebuild @@ -0,0 +1,39 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +inherit perl-module + +DESCRIPTION="A tool for running Nmap scans and diff'ing the results" +HOMEPAGE="http://pbnj.sourceforge.net/" +SRC_URI="mirror://sourceforge/pbnj/${P}.tar.bz2" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" + +DEPEND=" + dev-perl/DBD-SQLite + dev-perl/DBI + dev-perl/File-HomeDir + dev-perl/File-Which + dev-perl/Nmap-Parser + dev-perl/Shell + dev-perl/Text-CSV_XS + dev-perl/XML-Twig + dev-perl/YAML +" +RDEPEND=" + ${DEPEND} + net-analyzer/nmap +" +PATCHES=( + "${FILESDIR}"/${PN}-2.04-ipv4_sort.patch +) + +src_prepare() { + default + + mv t/04change.t{,his-test-fails} || die + mv t/05output.t{,his-test-fails} || die +} diff --git a/net-analyzer/pbnj/pbnj-2.04.ebuild b/net-analyzer/pbnj/pbnj-2.04.ebuild new file mode 100644 index 000000000000..1c04a49c3a0b --- /dev/null +++ b/net-analyzer/pbnj/pbnj-2.04.ebuild @@ -0,0 +1,29 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 +inherit perl-module + +DESCRIPTION="A tool for running Nmap scans and diff'ing the results" +HOMEPAGE="http://pbnj.sourceforge.net/" +SRC_URI="mirror://sourceforge/pbnj/${P}.tar.bz2" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="amd64 x86" +IUSE="" + +DEPEND=" + dev-perl/DBD-SQLite + dev-perl/DBI + dev-perl/File-HomeDir + dev-perl/File-Which + dev-perl/Nmap-Parser + dev-perl/Text-CSV_XS + dev-perl/XML-Twig + dev-perl/YAML +" +RDEPEND=" + ${DEPEND} + net-analyzer/nmap +" diff --git a/net-analyzer/pinger/Manifest b/net-analyzer/pinger/Manifest new file mode 100644 index 000000000000..1469fdffd3f6 --- /dev/null +++ b/net-analyzer/pinger/Manifest @@ -0,0 +1,2 @@ +DIST pinger-0.32e.tar.gz 239002 BLAKE2B d8fb905eac4cc84271196fb96503be512c18356668ddef943af028eac9aeb61a0836d3e85ee1c45546a0f88725e0a883947d5c3f38030b55b857d4be13af196f SHA512 8a6cebe9b37399e2e84eead3b386b999212904ecffb1fc951b4165295b278690217f35d20830e1f1440b94567d9d5d3423d37ee6e9200173be9aacefb68a87f7 +DIST pinger-0.33.tar.gz 247827 BLAKE2B 6139044be634438945c92a431b97276b5556b513a948a675d6d70c73e4e22d08a58b9cf6607170f804354c18371af54a222b0e064cc1c8275ba77f67ddbd6699 SHA512 fff07599ef91fbdcff9be7806eca57a71e8e6fac7e9afc67c4147e6246b0bcdadf379de28f87054dbe7c409955c0e0ddeae7f529e954231bea0cfb39e4e29bc1 diff --git a/net-analyzer/pinger/files/gtk-2.0.m4 b/net-analyzer/pinger/files/gtk-2.0.m4 new file mode 100644 index 000000000000..88596a969e19 --- /dev/null +++ b/net-analyzer/pinger/files/gtk-2.0.m4 @@ -0,0 +1,196 @@ +# Configure paths for GTK+ +# Owen Taylor 1997-2001 + +dnl AM_PATH_GTK_2_0([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, MODULES]]]]) +dnl Test for GTK+, and define GTK_CFLAGS and GTK_LIBS, if gthread is specified in MODULES, +dnl pass to pkg-config +dnl +AC_DEFUN([AM_PATH_GTK_2_0], +[dnl +dnl Get the cflags and libraries from pkg-config +dnl +AC_ARG_ENABLE(gtktest, [ --disable-gtktest do not try to compile and run a test GTK+ program], + , enable_gtktest=yes) + + pkg_config_args=gtk+-2.0 + for module in . $4 + do + case "$module" in + gthread) + pkg_config_args="$pkg_config_args gthread-2.0" + ;; + esac + done + + no_gtk="" + + AC_PATH_PROG(PKG_CONFIG, pkg-config, no) + + if test x$PKG_CONFIG != xno ; then + if pkg-config --atleast-pkgconfig-version 0.7 ; then + : + else + echo "*** pkg-config too old; version 0.7 or better required." + no_gtk=yes + PKG_CONFIG=no + fi + else + no_gtk=yes + fi + + min_gtk_version=ifelse([$1], ,2.0.0,$1) + AC_MSG_CHECKING(for GTK+ - version >= $min_gtk_version) + + if test x$PKG_CONFIG != xno ; then + ## don't try to run the test against uninstalled libtool libs + if $PKG_CONFIG --uninstalled $pkg_config_args; then + echo "Will use uninstalled version of GTK+ found in PKG_CONFIG_PATH" + enable_gtktest=no + fi + + if $PKG_CONFIG --atleast-version $min_gtk_version $pkg_config_args; then + : + else + no_gtk=yes + fi + fi + + if test x"$no_gtk" = x ; then + GTK_CFLAGS=`$PKG_CONFIG $pkg_config_args --cflags` + GTK_LIBS=`$PKG_CONFIG $pkg_config_args --libs` + gtk_config_major_version=`$PKG_CONFIG --modversion gtk+-2.0 | \ + sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'` + gtk_config_minor_version=`$PKG_CONFIG --modversion gtk+-2.0 | \ + sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'` + gtk_config_micro_version=`$PKG_CONFIG --modversion gtk+-2.0 | \ + sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'` + if test "x$enable_gtktest" = "xyes" ; then + ac_save_CFLAGS="$CFLAGS" + ac_save_LIBS="$LIBS" + CFLAGS="$CFLAGS $GTK_CFLAGS" + LIBS="$GTK_LIBS $LIBS" +dnl +dnl Now check if the installed GTK+ is sufficiently new. (Also sanity +dnl checks the results of pkg-config to some extent) +dnl + rm -f conf.gtktest + AC_TRY_RUN([ +#include <gtk/gtk.h> +#include <stdio.h> +#include <stdlib.h> + +int +main () +{ + int major, minor, micro; + char *tmp_version; + + fclose (fopen ("conf.gtktest", "w")); + + /* HP/UX 9 (%@#!) writes to sscanf strings */ + tmp_version = g_strdup("$min_gtk_version"); + if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) { + printf("%s, bad version string\n", "$min_gtk_version"); + exit(1); + } + + if ((gtk_major_version != $gtk_config_major_version) || + (gtk_minor_version != $gtk_config_minor_version) || + (gtk_micro_version != $gtk_config_micro_version)) + { + printf("\n*** 'pkg-config --modversion gtk+-2.0' returned %d.%d.%d, but GTK+ (%d.%d.%d)\n", + $gtk_config_major_version, $gtk_config_minor_version, $gtk_config_micro_version, + gtk_major_version, gtk_minor_version, gtk_micro_version); + printf ("*** was found! If pkg-config was correct, then it is best\n"); + printf ("*** to remove the old version of GTK+. You may also be able to fix the error\n"); + printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n"); + printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n"); + printf("*** required on your system.\n"); + printf("*** If pkg-config was wrong, set the environment variable PKG_CONFIG_PATH\n"); + printf("*** to point to the correct configuration files\n"); + } + else if ((gtk_major_version != GTK_MAJOR_VERSION) || + (gtk_minor_version != GTK_MINOR_VERSION) || + (gtk_micro_version != GTK_MICRO_VERSION)) + { + printf("*** GTK+ header files (version %d.%d.%d) do not match\n", + GTK_MAJOR_VERSION, GTK_MINOR_VERSION, GTK_MICRO_VERSION); + printf("*** library (version %d.%d.%d)\n", + gtk_major_version, gtk_minor_version, gtk_micro_version); + } + else + { + if ((gtk_major_version > major) || + ((gtk_major_version == major) && (gtk_minor_version > minor)) || + ((gtk_major_version == major) && (gtk_minor_version == minor) && (gtk_micro_version >= micro))) + { + return 0; + } + else + { + printf("\n*** An old version of GTK+ (%d.%d.%d) was found.\n", + gtk_major_version, gtk_minor_version, gtk_micro_version); + printf("*** You need a version of GTK+ newer than %d.%d.%d. The latest version of\n", + major, minor, micro); + printf("*** GTK+ is always available from ftp://ftp.gtk.org.\n"); + printf("***\n"); + printf("*** If you have already installed a sufficiently new version, this error\n"); + printf("*** probably means that the wrong copy of the pkg-config shell script is\n"); + printf("*** being found. The easiest way to fix this is to remove the old version\n"); + printf("*** of GTK+, but you can also set the PKG_CONFIG environment to point to the\n"); + printf("*** correct copy of pkg-config. (In this case, you will have to\n"); + printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n"); + printf("*** so that the correct libraries are found at run-time))\n"); + } + } + return 1; +} +],, no_gtk=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"]) + CFLAGS="$ac_save_CFLAGS" + LIBS="$ac_save_LIBS" + fi + fi + if test "x$no_gtk" = x ; then + AC_MSG_RESULT(yes (version $gtk_config_major_version.$gtk_config_minor_version.$gtk_config_micro_version)) + ifelse([$2], , :, [$2]) + else + AC_MSG_RESULT(no) + if test "$PKG_CONFIG" = "no" ; then + echo "*** A new enough version of pkg-config was not found." + echo "*** See http://pkgconfig.sourceforge.net" + else + if test -f conf.gtktest ; then + : + else + echo "*** Could not run GTK+ test program, checking why..." + ac_save_CFLAGS="$CFLAGS" + ac_save_LIBS="$LIBS" + CFLAGS="$CFLAGS $GTK_CFLAGS" + LIBS="$LIBS $GTK_LIBS" + AC_TRY_LINK([ +#include <gtk/gtk.h> +#include <stdio.h> +], [ return ((gtk_major_version) || (gtk_minor_version) || (gtk_micro_version)); ], + [ echo "*** The test program compiled, but did not run. This usually means" + echo "*** that the run-time linker is not finding GTK+ or finding the wrong" + echo "*** version of GTK+. If it is not finding GTK+, you'll need to set your" + echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point" + echo "*** to the installed location Also, make sure you have run ldconfig if that" + echo "*** is required on your system" + echo "***" + echo "*** If you have an old version installed, it is best to remove it, although" + echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" ], + [ echo "*** The test program failed to compile or link. See the file config.log for the" + echo "*** exact error that occured. This usually means GTK+ is incorrectly installed."]) + CFLAGS="$ac_save_CFLAGS" + LIBS="$ac_save_LIBS" + fi + fi + GTK_CFLAGS="" + GTK_LIBS="" + ifelse([$3], , :, [$3]) + fi + AC_SUBST(GTK_CFLAGS) + AC_SUBST(GTK_LIBS) + rm -f conf.gtktest +]) diff --git a/net-analyzer/pinger/files/pinger-0.32e-tinfo.patch b/net-analyzer/pinger/files/pinger-0.32e-tinfo.patch new file mode 100644 index 000000000000..f9175b22540f --- /dev/null +++ b/net-analyzer/pinger/files/pinger-0.32e-tinfo.patch @@ -0,0 +1,21 @@ +--- a/configure.in ++++ b/configure.in +@@ -65,8 +65,18 @@ + AC_DEFINE([HAVE_GTK_2], 1, Found GTK 2), + HAVE_GTK_2=0) + fi ++AC_ARG_ENABLE(ncurses, [ --enable-ncurses enable ncurses support], ++ [if test "$enableval" = no; then no_ncurses=yes; fi]) ++if test x$no_ncurses != xyes; then ++PKG_CHECK_MODULES(ncurses, ncurses,[ ++ AC_DEFINE([HAVE_LIBNCURSES], [1], found ncurses library) ++ HAVE_CURSES=1 ++ LIBS="$LIBS $ncurses_LIBS" ++ CFLAGS="$CFLAGS $ncurses_CFLAGS"], + AC_CHECK_LIB(ncurses, initscr, HAVE_CURSES=1; LIBS="$LIBS -lncurses"; + AC_DEFINE([HAVE_LIBNCURSES], [1], found ncurses library)) ++ ) ++fi + AC_CHECK_LIB(intl, libintl_gettext, LIBS="$LIBS -lintl") + AC_CHECK_LIB(pthread, pthread_create, LIBS="$LIBS -lpthread", AC_MSG_ERROR(Pthread required and not found. Please check if you have libpthread in your system and specify using CFLAGS and LDFLAGS when configure)) + diff --git a/net-analyzer/pinger/files/pinger-0.33-gentoo.patch b/net-analyzer/pinger/files/pinger-0.33-gentoo.patch new file mode 100644 index 000000000000..76ef052a4a2d --- /dev/null +++ b/net-analyzer/pinger/files/pinger-0.33-gentoo.patch @@ -0,0 +1,73 @@ +--- a/src/Makefile.am ++++ b/src/Makefile.am +@@ -2,7 +2,12 @@ + + bin_PROGRAMS = pinger + man_MANS = pinger.1 ++if HAVE_GTK_2 + bin_SCRIPTS = gtkpinger ++endif ++if HAVE_GTK_3 ++bin_SCRIPTS = gtkpinger ++endif + + P_SOURCES = timefunc.c parse.c ping.c pinger.c dns.c log.c timefunc.h parse.h ping.h globals.h fake_gtk.h dns.h log.h + if HAVE_CURSES +--- a/configure.in ++++ b/configure.in +@@ -54,34 +54,46 @@ + AC_HEADER_TIME + AM_INADDRT + ++PKG_PROG_PKG_CONFIG() ++ + dnl GTK3/GTK2 tests + dnl Note: PKG_CHECK_MODULES cannot be used conditionaly due to sharing the tests and depending on it + AC_ARG_ENABLE([gtk], AS_HELP_STRING([--enable-gtk[[[=version]]]], [Build with GTK+ interface. Supported versions are gtk2 and gtk3. Default is gtk2.])) +-PKG_CHECK_MODULES(GTK, [ gtk+-2.0 >= 2.4 ], HAVE_GTK_2=1; ) +-AC_SUBST(GTK_CFLAGS) +-AC_SUBST(GTK_LIBS) +-PKG_CHECK_MODULES(GTK3, [ gtk+-3.0 >= 3.12 ], HAVE_GTK_3=1) +-AC_SUBST(GTK3_CFLAGS) +-AC_SUBST(GTK3_LIBS) + + if test "x$enableval" = "x" || test "x$enableval" = "xgtk2"; then ++PKG_CHECK_MODULES(GTK, [ gtk+-2.0 >= 2.4 ], HAVE_GTK_2=1,[]) ++AC_SUBST(GTK_CFLAGS) ++AC_SUBST(GTK_LIBS) + CFLAGS="$CFLAGS $GTK_CFLAGS" + LIBS="$LIBS $GTK_LIBS" + HAVE_GTK_3=0 + AC_DEFINE(HAVE_GTK_2, 1, Found GTK+ 2.x support) + elif test "x$enableval" = "xgtk3"; then ++PKG_CHECK_MODULES(GTK3, [ gtk+-3.0 >= 3.12 ], HAVE_GTK_3=1,[]) ++AC_SUBST(GTK3_CFLAGS) ++AC_SUBST(GTK3_LIBS) + CFLAGS="$CFLAGS $GTK3_CFLAGS" + LIBS="$LIBS $GTK3_LIBS" + HAVE_GTK_2=0 + AC_DEFINE(HAVE_GTK_3, 1, Found GTK+ 3.x support) + else +-echo "Sorry, the value $enableval is not supported as argument of --enable-gtk." +-exit 1 ++HAVE_GTK_2=0 ++HAVE_GTK_3=0 + fi + +-dnl Check for additional external libraries etc.. ++AC_ARG_ENABLE(ncurses, [ --enable-ncurses enable ncurses support], ++ [if test "$enableval" = no; then no_ncurses=yes; fi]) ++if test x$no_ncurses != xyes; then ++PKG_CHECK_MODULES(ncurses, ncurses,[ ++ AC_DEFINE([HAVE_LIBNCURSES], [1], found ncurses library) ++ HAVE_CURSES=1 ++ LIBS="$LIBS $ncurses_LIBS" ++ CFLAGS="$CFLAGS $ncurses_CFLAGS"], + AC_CHECK_LIB(ncurses, initscr, HAVE_CURSES=1; LIBS="$LIBS -lncurses"; + AC_DEFINE([HAVE_LIBNCURSES], [1], found ncurses library)) ++ ) ++fi ++dnl Check for additional external libraries etc.. + AC_CHECK_LIB(intl, libintl_gettext, LIBS="$LIBS -lintl") + AC_CHECK_LIB(pthread, pthread_create, LIBS="$LIBS -lpthread", AC_MSG_ERROR(Pthread required and not found. Please check if you have libpthread in your system and specify using CFLAGS and LDFLAGS when configure)) + diff --git a/net-analyzer/pinger/metadata.xml b/net-analyzer/pinger/metadata.xml new file mode 100644 index 000000000000..d77083e23e2d --- /dev/null +++ b/net-analyzer/pinger/metadata.xml @@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<maintainer type="project"> +<email>netmon@gentoo.org</email> +<name>Gentoo network monitoring and analysis project</name> +</maintainer> +<use> +<flag name="gtk2">Install the gtkpinger GUI utility based on <pkg>x11-libs/gtk+</pkg>:2</flag> +<flag name="gtk3">Install the gtkpinger GUI utility based on <pkg>x11-libs/gtk+</pkg>:3</flag> +</use> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/pinger/pinger-0.32e.ebuild b/net-analyzer/pinger/pinger-0.32e.ebuild new file mode 100644 index 000000000000..85b142c36460 --- /dev/null +++ b/net-analyzer/pinger/pinger-0.32e.ebuild @@ -0,0 +1,48 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +inherit autotools eutils flag-o-matic + +DESCRIPTION="Cyclic multi ping utility for selected adresses using GTK/ncurses" +HOMEPAGE="http://aa.vslib.cz/silk/projekty/pinger/index.php" +SRC_URI="http://aa.vslib.cz/silk/projekty/pinger/download/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="amd64 ~ppc x86" +IUSE="gtk ncurses nls" + +REQUIRED_USE=" + !gtk? ( ncurses ) + !ncurses? ( gtk ) +" + +RDEPEND=" + gtk? ( >=x11-libs/gtk+-2.4:2 ) + ncurses? ( sys-libs/ncurses ) +" +DEPEND=" + ${RDEPEND} + virtual/pkgconfig +" + +DOCS=( AUTHORS BUGS ChangeLog NEWS README ) + +src_prepare() { + # bug #494636 + cp "${FILESDIR}"/gtk-2.0.m4 m4/ || die + + epatch "${FILESDIR}"/${P}-tinfo.patch + + sed -i -e '/Root privileges/d' src/Makefile.am || die + + eautoreconf +} + +src_configure() { + append-cppflags -D_GNU_SOURCE + + econf $(use_enable gtk) $(use_enable ncurses) $(use_enable nls) +} diff --git a/net-analyzer/pinger/pinger-0.33.ebuild b/net-analyzer/pinger/pinger-0.33.ebuild new file mode 100644 index 000000000000..74c25eb05be6 --- /dev/null +++ b/net-analyzer/pinger/pinger-0.33.ebuild @@ -0,0 +1,58 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +inherit autotools eutils flag-o-matic + +DESCRIPTION="Cyclic multi ping utility for selected adresses using GTK/ncurses" +HOMEPAGE="http://aa.vslib.cz/silk/projekty/pinger/" +SRC_URI="http://aa.vslib.cz/silk/projekty/pinger/download/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="amd64 ~ppc x86" +IUSE="gtk2 gtk3 ncurses nls" + +REQUIRED_USE=" + || ( gtk2 gtk3 ncurses ) + ?? ( gtk2 gtk3 ) +" +GTK_DEPEND=" + dev-libs/glib:2 +" +RDEPEND=" + gtk2? ( + ${GTK_DEPEND} + >=x11-libs/gtk+-2.4:2 + ) + gtk3? ( + ${GTK_DEPEND} + >=x11-libs/gtk+-3.12:3 + ) + ncurses? ( sys-libs/ncurses ) +" +DEPEND=" + ${RDEPEND} + virtual/pkgconfig +" + +DOCS=( AUTHORS BUGS ChangeLog NEWS README ) + +src_prepare() { + epatch "${FILESDIR}"/${P}-gentoo.patch + + sed -i -e '/Root privileges/d' src/Makefile.am || die + + eautoreconf +} + +src_configure() { + append-cppflags -D_GNU_SOURCE + + econf \ + $(usex gtk2 --enable-gtk=gtk2 '') \ + $(usex gtk3 --enable-gtk=gtk3 '') \ + $(use_enable ncurses) \ + $(use_enable nls) +} diff --git a/net-analyzer/pktstat/Manifest b/net-analyzer/pktstat/Manifest new file mode 100644 index 000000000000..2675732650ad --- /dev/null +++ b/net-analyzer/pktstat/Manifest @@ -0,0 +1 @@ +DIST pktstat-1.8.5.tar.gz 133404 BLAKE2B 8aa533bf2570a56ed99812e3216c653a625e8ee89b9a4fe1dbe1bb12c68c00ce2ae1252de65bec147f0373f3627944c38ab1d76541a1a63d77bac430a825e2da SHA512 0401b34646b3e6238a9fe032fa4c2afb70a3a009850bc85c043ff4bba7da6fab0dcf20b963c62ba4db5ba15a7508241dba4f4789ea59b12193928b4c4ec7f0c7 diff --git a/net-analyzer/pktstat/files/pktstat-1.8.5-smtp_line.patch b/net-analyzer/pktstat/files/pktstat-1.8.5-smtp_line.patch new file mode 100644 index 000000000000..67ea9e9181e8 --- /dev/null +++ b/net-analyzer/pktstat/files/pktstat-1.8.5-smtp_line.patch @@ -0,0 +1,46 @@ +--- a/tcp_smtp.c ++++ b/tcp_smtp.c +@@ -149,13 +149,9 @@ + struct smtp_state *state; + const char *s; + int addr_changed = 0; +-FILE*log; + + state = (struct smtp_state *)f->udata; + +-if ((log = fopen("/tmp/smtp.log", "a"))) +- fprintf(log, "smpt_line [%s]\n", line); +- + if (state->in_data) { + if (strcmp(line, ".") == 0) { + state->in_data = 0; +@@ -180,18 +176,15 @@ + } else { + /* Normalize the command line */ + normalize_line(line); +-if (log)fprintf(log, "normalized to [%s]\n", line); + if ((s = strip_prefix(line, "MAIL FROM:"))) { + snprintf(state->from_addr, sizeof state->from_addr, "%s", s); + normalize_addr(state->from_addr); + addr_changed = 1; +-if (log)fprintf(log, "from_addr = [%s]\n", state->from_addr); + } + else if ((s = strip_prefix(line, "RCPT TO:"))) { + snprintf(state->to_addr, sizeof state->to_addr, "%s", s); + normalize_addr(state->to_addr); + addr_changed = 1; +-if (log)fprintf(log, "to_addr = [%s]\n", state->to_addr); + } + else if (strcmp(line, "DATA") == 0) { + state->in_data = 1; +@@ -213,10 +206,7 @@ + if (strcmp(line, "QUIT") != 0) + snprintf(f->desc, sizeof f->desc, "%s", line); + } +-if (log)fprintf(log, "set desc to: [%s]\n", f->desc); + } +- +-if (log)fclose(log); + } + + /* diff --git a/net-analyzer/pktstat/files/pktstat-1.8.5-tinfo.patch b/net-analyzer/pktstat/files/pktstat-1.8.5-tinfo.patch new file mode 100644 index 000000000000..5181124b8053 --- /dev/null +++ b/net-analyzer/pktstat/files/pktstat-1.8.5-tinfo.patch @@ -0,0 +1,10 @@ +--- a/configure.ac ++++ b/configure.ac +@@ -18,6 +18,7 @@ + AC_SEARCH_LIBS(gethostbyname, [nsl]) dnl for Solaris + AC_SEARCH_LIBS(pcap_open_live, [pcap]) + AC_SEARCH_LIBS(exp, [m]) ++PKG_CHECK_MODULES(ncurses,ncurses,LIBS="$LIBS $ncurses_LIBS",AC_MSG_ERROR[ncurses is required]) + AC_SEARCH_LIBS(tgoto, [termlib termcap curses ncurses ocurses]) + AC_SEARCH_LIBS(initscr, [curses ncurses ocurses]) + AC_SEARCH_LIBS(nanosleep, [posix4]) diff --git a/net-analyzer/pktstat/metadata.xml b/net-analyzer/pktstat/metadata.xml new file mode 100644 index 000000000000..bd13a914477c --- /dev/null +++ b/net-analyzer/pktstat/metadata.xml @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<maintainer type="project"> + <email>netmon@gentoo.org</email> + <name>Gentoo network monitoring and analysis project</name> +</maintainer> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/pktstat/pktstat-1.8.5-r1.ebuild b/net-analyzer/pktstat/pktstat-1.8.5-r1.ebuild new file mode 100644 index 000000000000..38568044a9f1 --- /dev/null +++ b/net-analyzer/pktstat/pktstat-1.8.5-r1.ebuild @@ -0,0 +1,34 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 +inherit autotools eutils + +DESCRIPTION="A network monitoring tool with bandwidth tracking" +HOMEPAGE="http://www.adaptive-enterprises.com.au/~d/software/pktstat/" +SRC_URI="http://www.adaptive-enterprises.com.au/~d/software/pktstat/${P}.tar.gz" + +LICENSE="public-domain" +SLOT="0" +KEYWORDS="amd64 ~ppc x86" + +RDEPEND=" + net-libs/libpcap + >=sys-libs/ncurses-5.3-r1 +" +DEPEND=" + ${RDEPEND} + virtual/pkgconfig +" + +src_prepare() { + epatch "${FILESDIR}"/${P}-tinfo.patch + epatch "${FILESDIR}"/${P}-smtp_line.patch + eautoreconf +} + +src_install() { + dosbin pktstat + doman pktstat.1 + dodoc ChangeLog NEWS README TODO +} diff --git a/net-analyzer/pmacct/Manifest b/net-analyzer/pmacct/Manifest new file mode 100644 index 000000000000..b62b1bbeb284 --- /dev/null +++ b/net-analyzer/pmacct/Manifest @@ -0,0 +1,6 @@ +DIST pmacct-1.6.2.tar.gz 1311678 BLAKE2B 123629ca2e5e58bb4e684001b1c6d2d510e18450eed1c6e45bbe79ec7bb37072ba9b844fe0d8826a7923d0b09cf6923ea87d4e22fb2f251e7ebb9744d1c59b93 SHA512 8495f97752ae586fd842eed49ce91db3e4753133f7d380d067e7df153abeea469e5126800074e9071cb7227a3f1df64d4642dfece624fbbfa39b4537fde38b46 +DIST pmacct-1.7.1.tar.gz 1392360 BLAKE2B 75a4dda461c2fe643c24a901c19efacf325d1922bcda503a1ff41fe0b6c4178732d476b479875e9e0ba34872dbd86b8d8b2087471148f10e202f57c4a212f2fd SHA512 6a5d75522b9197b324907598ee4ba22bbda96b45e10f62df2ae507e23faac927af5468f587deab08d1e0f3f6422c609d106dcf30fa7bf16eb215bb35ea6aa08c +DIST pmacct-1.7.2.tar.gz 1416302 BLAKE2B 5d6f9c5849c07c7bdd3b6251b2611935ff558ca393d2cc0d21e5e681b0069b3a5bb4a985a9dc59b62b8b4ed697ecbd4cbb71f0aba42ce8d1527187b98d2e90d3 SHA512 ffdc63e96fc6af6f5d531243bc0aec0925663d8e91e83ada275f8e9a969dcf85cebd06b17ae2c796722bb209602d5b2bc487757ec736a740a8f33698d93a8675 +DIST pmacct-1.7.3.tar.gz 1467237 BLAKE2B a2fb627df9f61f91c69a9333a968485695b45c8ebe812e11ba250185a5e93f262954290d7ee41789fb13f7f5c5ef336294be83c8d91adcd0fc3c348485e515af SHA512 09d0e6721760035112cb0c7936fe177f7858b19fa1df2c7da84822dc816413e7c6bace35fe45ad32930961183d61f9e4f3a4879747be45f47ab658a3e0f055b2 +DIST pmacct-1.7.4.tar.gz 1581213 BLAKE2B 3835abc91947af083932e01b828c2324f90595c973fdde9d9f4034dc7d03e12fad6bbe6e91e1462ec36963ccb41a5a740159f531d7e1929f4cd8d994b89a58a1 SHA512 780b6cc25562fb7b5a1f55b48ce9719b36c1ee0d9ee2b6db8d7f238cd5d9f204938313b13e3ff3f62c7b9b179279f18314eba38ad787ffc346a4b217da239ca1 +DIST pmacct-1.7.4_p1.tar.gz 3200089 BLAKE2B 638983a92df0a46441ddddaefa78dc0f61fee94264870979f46674e851e3bf111ae71550f7e6b677d425fa4c688d4ed7735d82aae85a2e77155c1bfa050d8e76 SHA512 03553128975ced54ce08a1a543c794377c2b7a3c800de600a7b5e8aa483b1c3123dee536a361a47053233d60070cacaf269f1a16ad17b563fa9fc0ec7af6a467 diff --git a/net-analyzer/pmacct/files/pmacct-1.7.3-nDPI-3.0.patch b/net-analyzer/pmacct/files/pmacct-1.7.3-nDPI-3.0.patch new file mode 100644 index 000000000000..9e6c618fe443 --- /dev/null +++ b/net-analyzer/pmacct/files/pmacct-1.7.3-nDPI-3.0.patch @@ -0,0 +1,28 @@ +--- a/configure.ac ++++ b/configure.ac +@@ -955,6 +955,7 @@ + CFLAGS="$_save_CFLAGS" + ]) + PKG_CHECK_MODULES([NDPI26], [libndpi >= 2.6], [AC_DEFINE(WITH_NDPI26, 1)], [AC_DEFINE(WITH_NDPI, 1)]) ++ PKG_CHECK_MODULES([NDPI30], [libndpi >= 3.0], [AC_DEFINE(WITH_NDPI30, 1)], [AC_DEFINE(WITH_NDPI, 1)]) + ;; + no) + AC_MSG_RESULT(no) +--- a/src/ndpi/ndpi.c ++++ b/src/ndpi/ndpi.c +@@ -374,10 +374,14 @@ + if (flow->detection_completed || flow->tcp_finished) { + if (flow->detected_protocol.app_protocol == NDPI_PROTOCOL_UNKNOWN) + #ifdef WITH_NDPI26 ++#ifdef WITH_NDPI30 ++ flow->detected_protocol = ndpi_detection_giveup(workflow->ndpi_struct, flow->ndpi_flow, 1, workflow->prefs.protocol_guess); ++#else + flow->detected_protocol = ndpi_detection_giveup(workflow->ndpi_struct, flow->ndpi_flow, workflow->prefs.protocol_guess); ++#endif /* WITH_NDPI30 */ + #else + flow->detected_protocol = ndpi_detection_giveup(workflow->ndpi_struct, flow->ndpi_flow); +-#endif ++#endif /* WITH_NDPI26 */ + + if (workflow->prefs.protocol_guess) { + if (flow->detected_protocol.app_protocol == NDPI_PROTOCOL_UNKNOWN && !flow->guess_completed) { diff --git a/net-analyzer/pmacct/files/pmacct-1.7.4--Werror.patch b/net-analyzer/pmacct/files/pmacct-1.7.4--Werror.patch new file mode 100644 index 000000000000..e2e9685e1326 --- /dev/null +++ b/net-analyzer/pmacct/files/pmacct-1.7.4--Werror.patch @@ -0,0 +1,14 @@ +--- a/configure.ac ++++ b/configure.ac +@@ -1109,9 +1109,9 @@ + AC_MSG_RESULT(yes) + tmp_CFLAGS=`echo $CFLAGS | sed 's/O2/O0/g'` + CFLAGS="$tmp_CFLAGS" +- CFLAGS="$CFLAGS -g -Wall -Werror" ++ CFLAGS="$CFLAGS -g -Wall" + else +- CFLAGS="$CFLAGS -Wall -Werror" ++ CFLAGS="$CFLAGS -Wall" + AC_MSG_RESULT(no) + fi + ], diff --git a/net-analyzer/pmacct/files/pmacct-1.7.4-nDPI-3.2.patch b/net-analyzer/pmacct/files/pmacct-1.7.4-nDPI-3.2.patch new file mode 100644 index 000000000000..bcbdbc834cad --- /dev/null +++ b/net-analyzer/pmacct/files/pmacct-1.7.4-nDPI-3.2.patch @@ -0,0 +1,47 @@ +--- a/configure.ac ++++ b/configure.ac +@@ -900,7 +900,7 @@ + [ case "$enableval" in + yes) + AC_MSG_RESULT(yes) +- PKG_CHECK_MODULES([NDPI], [libndpi >= 2.4], [ ++ PKG_CHECK_MODULES([NDPI], [libndpi >= 3.2], [ + SUPPORTS="${SUPPORTS} ndpi" + USING_NDPI="yes" + +--- a/src/ndpi/ndpi_util.c ++++ b/src/ndpi/ndpi_util.c +@@ -29,7 +29,8 @@ + + NDPI_PROTOCOL_BITMASK all; + +- struct ndpi_detection_module_struct *module = ndpi_init_detection_module(); ++ ndpi_init_prefs pm_ndpi_init_prefs = ndpi_no_prefs; ++ struct ndpi_detection_module_struct *module = ndpi_init_detection_module(pm_ndpi_init_prefs); + struct pm_ndpi_workflow *workflow = ndpi_calloc(1, sizeof(struct pm_ndpi_workflow)); + + log_notification_init(&log_notifications.ndpi_cache_full); +@@ -77,6 +78,8 @@ + NDPI_BITMASK_SET_ALL(all); + ndpi_set_protocol_detection_bitmask2(workflow->ndpi_struct, &all); + ++ ndpi_finalize_initalization(workflow->ndpi_struct); ++ + return workflow; + } + +--- a/src/ndpi/ndpi.c ++++ b/src/ndpi/ndpi.c +@@ -373,11 +373,7 @@ + + if (flow->detection_completed || flow->tcp_finished) { + if (flow->detected_protocol.app_protocol == NDPI_PROTOCOL_UNKNOWN) +-#ifdef WITH_NDPI26 +- flow->detected_protocol = ndpi_detection_giveup(workflow->ndpi_struct, flow->ndpi_flow, workflow->prefs.protocol_guess); +-#else +- flow->detected_protocol = ndpi_detection_giveup(workflow->ndpi_struct, flow->ndpi_flow); +-#endif ++ flow->detected_protocol = ndpi_detection_giveup(workflow->ndpi_struct, flow->ndpi_flow, 1, workflow->prefs.protocol_guess); + + if (workflow->prefs.protocol_guess) { + if (flow->detected_protocol.app_protocol == NDPI_PROTOCOL_UNKNOWN && !flow->guess_completed) { diff --git a/net-analyzer/pmacct/files/pmacctd-conf.d b/net-analyzer/pmacct/files/pmacctd-conf.d new file mode 100644 index 000000000000..442be1eb9a86 --- /dev/null +++ b/net-analyzer/pmacct/files/pmacctd-conf.d @@ -0,0 +1,6 @@ +# Copyright 1999-2004 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +# Other options to pass to pmacctd +#OPTS="" + diff --git a/net-analyzer/pmacct/files/pmacctd-init.d b/net-analyzer/pmacct/files/pmacctd-init.d new file mode 100644 index 000000000000..bfc59c07abb8 --- /dev/null +++ b/net-analyzer/pmacct/files/pmacctd-init.d @@ -0,0 +1,40 @@ +#!/sbin/openrc-run +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +PMACCTDDIR=${PMACCTDDIR:-/etc/pmacctd} +if [ ${SVCNAME} != "pmacctd" ]; then + PMACCTDPID="/run/${SVCNAME}.pid" +else + PMACCTDPID="/run/pmacctd.pid" +fi +PMACCTDCONF="${PMACCTDDIR}/${SVCNAME}.conf" + +depend() { + need net +} + +checkconfig() { + if [ ! -e ${PMACCTDCONF} ] ; then + eerror "You need an ${PMACCTDCONF} file to run pmacctd" + return 1 + fi +} + +start() { + checkconfig || return 1 + ebegin "Starting ${SVCNAME}" + start-stop-daemon --start \ + --pidfile "${PMACCTDPID}" \ + --exec /usr/sbin/"${SVCNAME}" \ + -- -D -f "${PMACCTDCONF}" -F "${PMACCTDPID}" ${OPTS} + eend $? +} + +stop() { + ebegin "Stopping ${SVCNAME}" + start-stop-daemon --stop \ + --pidfile "${PMACCTDPID}" \ + --exec /usr/sbin/"${SVCNAME}" + eend $? +} diff --git a/net-analyzer/pmacct/metadata.xml b/net-analyzer/pmacct/metadata.xml new file mode 100644 index 000000000000..757a35c669e1 --- /dev/null +++ b/net-analyzer/pmacct/metadata.xml @@ -0,0 +1,26 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<maintainer type="project"> +<email>netmon@gentoo.org</email> +<name>Gentoo network monitoring and analysis project</name> +</maintainer> +<use> +<flag name="64bit">Use 64bit counters instead of 32bit ones</flag> +<flag name="bgp-bins">Link BGP daemon binaries</flag> +<flag name="bmp-bins">Link BMP daemon binaries</flag> +<flag name="geoipv2">Enable support for GeoIP2 through <pkg>dev-libs/libmaxminddb</pkg></flag> +<flag name="jansson">Enable support for JSON through <pkg>dev-libs/jansson</pkg></flag> +<flag name="kafka">Enable support for Apache Kafka through <pkg>dev-libs/librdkafka</pkg></flag> +<flag name="l2">Enable Layer-2 features and support</flag> +<flag name="mongodb">Enable support for MongoDB through <pkg>dev-libs/mongo-c-driver</pkg></flag> +<flag name="ndpi">Enable support for nDPI through <pkg>net-libs/nDPI</pkg></flag> +<flag name="nflog">Enable support for NFLOG through uacctd</flag> +<flag name="plabel">Enable IP prefix labels</flag> +<flag name="rabbitmq">Enable support for RabbitMQ through <pkg>net-libs/rabbitmq-c</pkg></flag> +<flag name="st-bins">Link Streaming Telemetry daemon binaries</flag> +<flag name="traffic-bins">Link IPv4/IPv6 traffic accounting binaries</flag> +<flag name="zmq">Enable support for ZeroMQ through <pkg>net-libs/zeromq</pkg></flag> +</use> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/pmacct/pmacct-1.6.2.ebuild b/net-analyzer/pmacct/pmacct-1.6.2.ebuild new file mode 100644 index 000000000000..a2934f5a2a94 --- /dev/null +++ b/net-analyzer/pmacct/pmacct-1.6.2.ebuild @@ -0,0 +1,81 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 +inherit toolchain-funcs + +DESCRIPTION="A network tool to gather IP traffic information" +HOMEPAGE="http://www.pmacct.net/" +SRC_URI="http://www.pmacct.net/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="amd64 x86" +IUSE="64bit debug geoip geoipv2 ipv6 jansson kafka mongodb mysql nflog postgres rabbitmq sqlite threads" +REQUIRED_USE=" + ?? ( geoip geoipv2 ) + kafka? ( jansson ) + rabbitmq? ( jansson ) +" + +RDEPEND=" + net-libs/libpcap + geoip? ( dev-libs/geoip ) + geoipv2? ( dev-libs/libmaxminddb ) + jansson? ( dev-libs/jansson ) + kafka? ( dev-libs/librdkafka ) + mongodb? ( + >=dev-libs/mongo-c-driver-0.8.1-r1 + <dev-libs/mongo-c-driver-0.98 + ) + mysql? ( virtual/mysql ) + nflog? ( net-libs/libnetfilter_log ) + postgres? ( dev-db/postgresql:* ) + rabbitmq? ( net-libs/rabbitmq-c ) + sqlite? ( =dev-db/sqlite-3* ) +" +DEPEND=" + ${RDEPEND} + virtual/pkgconfig +" + +DOCS=( + CONFIG-KEYS ChangeLog FAQS QUICKSTART TOOLS UPGRADE + docs/INTERNALS docs/PLUGINS docs/SIGNALS +) + +src_configure() { + tc-export CC AR RANLIB + + econf \ + $(use_enable 64bit) \ + $(use_enable debug) \ + $(use_enable geoip) \ + $(use_enable geoipv2) \ + $(use_enable ipv6) \ + $(use_enable jansson) \ + $(use_enable kafka) \ + $(use_enable mongodb) \ + $(use_enable mysql) \ + $(use_enable nflog) \ + $(use_enable postgres pgsql) \ + $(use_enable rabbitmq) \ + $(use_enable sqlite sqlite3) \ + $(use_enable threads) \ + --disable-debug +} + +src_install() { + default + + for dirname in examples sql; do + docinto ${dirname} + dodoc -r ${dirname}/* + done + + newinitd "${FILESDIR}"/pmacctd-init.d pmacctd + newconfd "${FILESDIR}"/pmacctd-conf.d pmacctd + + insinto /etc/pmacctd + newins examples/pmacctd-imt.conf.example pmacctd.conf +} diff --git a/net-analyzer/pmacct/pmacct-1.7.1-r1.ebuild b/net-analyzer/pmacct/pmacct-1.7.1-r1.ebuild new file mode 100644 index 000000000000..15ef9922c121 --- /dev/null +++ b/net-analyzer/pmacct/pmacct-1.7.1-r1.ebuild @@ -0,0 +1,93 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 +inherit flag-o-matic toolchain-funcs + +DESCRIPTION="A network tool to gather IP traffic information" +HOMEPAGE="http://www.pmacct.net/" +SRC_URI="http://www.pmacct.net/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE=" + 64bit +bgp-bins +bmp-bins geoip geoipv2 ipv6 jansson kafka +l2 mongodb + mysql ndpi nflog plabel postgres rabbitmq sqlite +st-bins +traffic-bins zmq +" +REQUIRED_USE=" + ?? ( geoip geoipv2 ) + kafka? ( jansson ) + rabbitmq? ( jansson ) +" + +RDEPEND=" + net-libs/libpcap + geoip? ( dev-libs/geoip ) + geoipv2? ( dev-libs/libmaxminddb ) + jansson? ( dev-libs/jansson ) + kafka? ( dev-libs/librdkafka ) + mongodb? ( + >=dev-libs/mongo-c-driver-0.8.1-r1 + <dev-libs/mongo-c-driver-0.98 + ) + mysql? ( dev-db/mysql-connector-c:0= ) + ndpi? ( net-libs/nDPI ) + nflog? ( net-libs/libnetfilter_log ) + postgres? ( dev-db/postgresql:* ) + rabbitmq? ( net-libs/rabbitmq-c ) + sqlite? ( =dev-db/sqlite-3* ) + zmq? ( >=net-libs/zeromq-4.2.0:= ) +" +DEPEND=" + ${RDEPEND} + virtual/pkgconfig +" + +DOCS=( + CONFIG-KEYS ChangeLog FAQS QUICKSTART TOOLS UPGRADE + docs/INTERNALS docs/PLUGINS docs/SIGNALS +) + +src_configure() { + tc-export CC AR RANLIB + append-cppflags -DMYSQL_SERVER_VERSION=99999999 + + econf \ + $(use_enable 64bit) \ + $(use_enable bgp-bins) \ + $(use_enable bmp-bins) \ + $(use_enable geoip) \ + $(use_enable geoipv2) \ + $(use_enable ipv6) \ + $(use_enable jansson) \ + $(use_enable kafka) \ + $(use_enable l2) \ + $(use_enable plabel) \ + $(use_enable mongodb) \ + $(use_enable mysql) \ + $(use_enable ndpi) \ + $(use_enable nflog) \ + $(use_enable postgres pgsql) \ + $(use_enable rabbitmq) \ + $(use_enable sqlite sqlite3) \ + $(use_enable st-bins) \ + $(use_enable traffic-bins) \ + $(use_enable zmq) \ + --disable-debug +} + +src_install() { + default + + for dirname in examples sql; do + docinto ${dirname} + dodoc -r ${dirname}/* + done + + newinitd "${FILESDIR}"/pmacctd-init.d pmacctd + newconfd "${FILESDIR}"/pmacctd-conf.d pmacctd + + insinto /etc/pmacctd + newins examples/pmacctd-imt.conf.example pmacctd.conf +} diff --git a/net-analyzer/pmacct/pmacct-1.7.2-r1.ebuild b/net-analyzer/pmacct/pmacct-1.7.2-r1.ebuild new file mode 100644 index 000000000000..ec5a692ea2e9 --- /dev/null +++ b/net-analyzer/pmacct/pmacct-1.7.2-r1.ebuild @@ -0,0 +1,93 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +inherit flag-o-matic toolchain-funcs + +DESCRIPTION="A network tool to gather IP traffic information" +HOMEPAGE="http://www.pmacct.net/" +SRC_URI="http://www.pmacct.net/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE=" + 64bit +bgp-bins +bmp-bins geoip geoipv2 ipv6 jansson kafka +l2 mongodb + mysql ndpi nflog plabel postgres rabbitmq sqlite +st-bins +traffic-bins zmq +" +REQUIRED_USE=" + ?? ( geoip geoipv2 ) + kafka? ( jansson ) + rabbitmq? ( jansson ) +" + +RDEPEND=" + net-libs/libpcap + geoip? ( dev-libs/geoip ) + geoipv2? ( dev-libs/libmaxminddb ) + jansson? ( dev-libs/jansson ) + kafka? ( dev-libs/librdkafka ) + mongodb? ( + >=dev-libs/mongo-c-driver-0.8.1-r1 + <dev-libs/mongo-c-driver-0.98 + ) + mysql? ( dev-db/mysql-connector-c:0= ) + ndpi? ( net-libs/nDPI ) + nflog? ( net-libs/libnetfilter_log ) + postgres? ( dev-db/postgresql:* ) + rabbitmq? ( net-libs/rabbitmq-c ) + sqlite? ( =dev-db/sqlite-3* ) + zmq? ( >=net-libs/zeromq-4.2.0:= ) +" +DEPEND=" + ${RDEPEND} + virtual/pkgconfig +" + +DOCS=( + CONFIG-KEYS ChangeLog FAQS QUICKSTART UPGRADE + docs/INTERNALS docs/PLUGINS docs/SIGNALS +) + +src_configure() { + tc-export CC AR RANLIB + append-cppflags -DMYSQL_SERVER_VERSION=99999999 + + econf \ + $(use_enable 64bit) \ + $(use_enable bgp-bins) \ + $(use_enable bmp-bins) \ + $(use_enable geoip) \ + $(use_enable geoipv2) \ + $(use_enable ipv6) \ + $(use_enable jansson) \ + $(use_enable kafka) \ + $(use_enable l2) \ + $(use_enable plabel) \ + $(use_enable mongodb) \ + $(use_enable mysql) \ + $(use_enable ndpi) \ + $(use_enable nflog) \ + $(use_enable postgres pgsql) \ + $(use_enable rabbitmq) \ + $(use_enable sqlite sqlite3) \ + $(use_enable st-bins) \ + $(use_enable traffic-bins) \ + $(use_enable zmq) \ + --disable-debug +} + +src_install() { + default + + for dirname in examples sql; do + docinto ${dirname} + dodoc -r ${dirname}/* + done + + newinitd "${FILESDIR}"/pmacctd-init.d pmacctd + newconfd "${FILESDIR}"/pmacctd-conf.d pmacctd + + insinto /etc/pmacctd + newins examples/pmacctd-imt.conf.example pmacctd.conf +} diff --git a/net-analyzer/pmacct/pmacct-1.7.3-r2.ebuild b/net-analyzer/pmacct/pmacct-1.7.3-r2.ebuild new file mode 100644 index 000000000000..29e8537602fb --- /dev/null +++ b/net-analyzer/pmacct/pmacct-1.7.3-r2.ebuild @@ -0,0 +1,100 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +inherit autotools flag-o-matic toolchain-funcs + +DESCRIPTION="A network tool to gather IP traffic information" +HOMEPAGE="http://www.pmacct.net/" +SRC_URI="http://www.pmacct.net/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE=" + 64bit +bgp-bins +bmp-bins geoip geoipv2 jansson kafka +l2 mongodb mysql + ndpi nflog plabel postgres rabbitmq sqlite +st-bins +traffic-bins zmq +" +REQUIRED_USE=" + ?? ( geoip geoipv2 ) + kafka? ( jansson ) + rabbitmq? ( jansson ) +" + +RDEPEND=" + net-libs/libpcap + geoip? ( dev-libs/geoip ) + geoipv2? ( dev-libs/libmaxminddb ) + jansson? ( dev-libs/jansson ) + kafka? ( dev-libs/librdkafka ) + mongodb? ( + >=dev-libs/mongo-c-driver-0.8.1-r1 + <dev-libs/mongo-c-driver-0.98 + ) + mysql? ( dev-db/mysql-connector-c:0= ) + ndpi? ( >=net-libs/nDPI-2.4:= ) + nflog? ( net-libs/libnetfilter_log ) + postgres? ( dev-db/postgresql:* ) + rabbitmq? ( net-libs/rabbitmq-c ) + sqlite? ( =dev-db/sqlite-3* ) + zmq? ( >=net-libs/zeromq-4.2.0:= ) +" +DEPEND=" + ${RDEPEND} + virtual/pkgconfig +" +PATCHES=( + "${FILESDIR}"/${PN}-1.7.3-nDPI-3.0.patch +) + +DOCS=( + CONFIG-KEYS ChangeLog FAQS QUICKSTART UPGRADE + docs/INTERNALS docs/PLUGINS docs/SIGNALS +) + +src_prepare() { + default + eautoreconf +} + +src_configure() { + tc-export CC AR RANLIB + append-cppflags -DMYSQL_SERVER_VERSION=99999999 + + econf \ + $(use_enable 64bit) \ + $(use_enable bgp-bins) \ + $(use_enable bmp-bins) \ + $(use_enable geoip) \ + $(use_enable geoipv2) \ + $(use_enable jansson) \ + $(use_enable kafka) \ + $(use_enable l2) \ + $(use_enable plabel) \ + $(use_enable mongodb) \ + $(use_enable mysql) \ + $(use_enable ndpi) \ + $(use_enable nflog) \ + $(use_enable postgres pgsql) \ + $(use_enable rabbitmq) \ + $(use_enable sqlite sqlite3) \ + $(use_enable st-bins) \ + $(use_enable traffic-bins) \ + $(use_enable zmq) \ + --disable-debug +} + +src_install() { + default + + for dirname in examples sql telemetry; do + docinto ${dirname} + dodoc -r ${dirname}/* + done + + newinitd "${FILESDIR}"/pmacctd-init.d pmacctd + newconfd "${FILESDIR}"/pmacctd-conf.d pmacctd + + insinto /etc/pmacctd + newins examples/pmacctd-imt.conf.example pmacctd.conf +} diff --git a/net-analyzer/pmacct/pmacct-1.7.4.ebuild b/net-analyzer/pmacct/pmacct-1.7.4.ebuild new file mode 100644 index 000000000000..99560fad9a73 --- /dev/null +++ b/net-analyzer/pmacct/pmacct-1.7.4.ebuild @@ -0,0 +1,101 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +inherit autotools flag-o-matic toolchain-funcs + +DESCRIPTION="A network tool to gather IP traffic information" +HOMEPAGE="http://www.pmacct.net/" +SRC_URI="http://www.pmacct.net/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE=" + 64bit +bgp-bins +bmp-bins geoip geoipv2 jansson kafka +l2 mongodb mysql + ndpi nflog plabel postgres rabbitmq sqlite +st-bins +traffic-bins zmq +" +REQUIRED_USE=" + ?? ( geoip geoipv2 ) + kafka? ( jansson ) + rabbitmq? ( jansson ) +" + +RDEPEND=" + net-libs/libpcap + geoip? ( dev-libs/geoip ) + geoipv2? ( dev-libs/libmaxminddb ) + jansson? ( dev-libs/jansson ) + kafka? ( dev-libs/librdkafka ) + mongodb? ( + >=dev-libs/mongo-c-driver-0.8.1-r1 + <dev-libs/mongo-c-driver-0.98 + ) + mysql? ( dev-db/mysql-connector-c:0= ) + ndpi? ( >=net-libs/nDPI-2.4:= ) + nflog? ( net-libs/libnetfilter_log ) + postgres? ( dev-db/postgresql:* ) + rabbitmq? ( net-libs/rabbitmq-c ) + sqlite? ( =dev-db/sqlite-3* ) + zmq? ( >=net-libs/zeromq-4.2.0:= ) +" +DEPEND=" + ${RDEPEND} + virtual/pkgconfig +" +PATCHES=( + "${FILESDIR}"/${PN}-1.7.3-nDPI-3.0.patch + "${FILESDIR}"/${PN}-1.7.4--Werror.patch +) + +DOCS=( + CONFIG-KEYS ChangeLog FAQS QUICKSTART UPGRADE + docs/INTERNALS docs/PLUGINS docs/SIGNALS +) + +src_prepare() { + default + eautoreconf +} + +src_configure() { + tc-export CC AR RANLIB + append-cflags -fcommon + + econf \ + $(use_enable 64bit) \ + $(use_enable bgp-bins) \ + $(use_enable bmp-bins) \ + $(use_enable geoip) \ + $(use_enable geoipv2) \ + $(use_enable jansson) \ + $(use_enable kafka) \ + $(use_enable l2) \ + $(use_enable plabel) \ + $(use_enable mongodb) \ + $(use_enable mysql) \ + $(use_enable ndpi) \ + $(use_enable nflog) \ + $(use_enable postgres pgsql) \ + $(use_enable rabbitmq) \ + $(use_enable sqlite sqlite3) \ + $(use_enable st-bins) \ + $(use_enable traffic-bins) \ + $(use_enable zmq) \ + --disable-debug +} + +src_install() { + default + + for dirname in examples sql telemetry; do + docinto ${dirname} + dodoc -r ${dirname}/* + done + + newinitd "${FILESDIR}"/pmacctd-init.d pmacctd + newconfd "${FILESDIR}"/pmacctd-conf.d pmacctd + + insinto /etc/pmacctd + newins examples/pmacctd-imt.conf.example pmacctd.conf +} diff --git a/net-analyzer/pmacct/pmacct-1.7.4_p1.ebuild b/net-analyzer/pmacct/pmacct-1.7.4_p1.ebuild new file mode 100644 index 000000000000..29e47d7219dd --- /dev/null +++ b/net-analyzer/pmacct/pmacct-1.7.4_p1.ebuild @@ -0,0 +1,103 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +inherit autotools flag-o-matic toolchain-funcs + +DESCRIPTION="A network tool to gather IP traffic information" +HOMEPAGE="http://www.pmacct.net/" +SRC_URI="https://github.com/${PN}/${PN}/archive/v${PV/_}.tar.gz -> ${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE=" + 64bit +bgp-bins +bmp-bins geoip geoipv2 jansson kafka +l2 mongodb mysql + ndpi nflog plabel postgres rabbitmq sqlite +st-bins +traffic-bins zmq +" +REQUIRED_USE=" + ?? ( geoip geoipv2 ) + kafka? ( jansson ) + rabbitmq? ( jansson ) +" + +RDEPEND=" + net-libs/libpcap + geoip? ( dev-libs/geoip ) + geoipv2? ( dev-libs/libmaxminddb ) + jansson? ( dev-libs/jansson ) + kafka? ( dev-libs/librdkafka ) + mongodb? ( + >=dev-libs/mongo-c-driver-0.8.1-r1 + <dev-libs/mongo-c-driver-0.98 + ) + mysql? ( dev-db/mysql-connector-c:0= ) + ndpi? ( >=net-libs/nDPI-3.2:= ) + nflog? ( net-libs/libnetfilter_log ) + postgres? ( dev-db/postgresql:* ) + rabbitmq? ( net-libs/rabbitmq-c ) + sqlite? ( =dev-db/sqlite-3* ) + zmq? ( >=net-libs/zeromq-4.2.0:= ) +" +DEPEND=" + ${RDEPEND} + virtual/pkgconfig +" +PATCHES=( +# "${FILESDIR}"/${PN}-1.7.3-nDPI-3.0.patch + "${FILESDIR}"/${PN}-1.7.4--Werror.patch + "${FILESDIR}"/${PN}-1.7.4-nDPI-3.2.patch +) + +DOCS=( + CONFIG-KEYS ChangeLog FAQS QUICKSTART UPGRADE + docs/INTERNALS docs/PLUGINS docs/SIGNALS +) +S=${WORKDIR}/${P/_} + +src_prepare() { + default + eautoreconf +} + +src_configure() { + tc-export CC AR RANLIB + append-cflags -fcommon + + econf \ + $(use_enable 64bit) \ + $(use_enable bgp-bins) \ + $(use_enable bmp-bins) \ + $(use_enable geoip) \ + $(use_enable geoipv2) \ + $(use_enable jansson) \ + $(use_enable kafka) \ + $(use_enable l2) \ + $(use_enable plabel) \ + $(use_enable mongodb) \ + $(use_enable mysql) \ + $(use_enable ndpi) \ + $(use_enable nflog) \ + $(use_enable postgres pgsql) \ + $(use_enable rabbitmq) \ + $(use_enable sqlite sqlite3) \ + $(use_enable st-bins) \ + $(use_enable traffic-bins) \ + $(use_enable zmq) \ + --disable-debug +} + +src_install() { + default + + for dirname in examples sql telemetry; do + docinto ${dirname} + dodoc -r ${dirname}/* + done + + newinitd "${FILESDIR}"/pmacctd-init.d pmacctd + newconfd "${FILESDIR}"/pmacctd-conf.d pmacctd + + insinto /etc/pmacctd + newins examples/pmacctd-imt.conf.example pmacctd.conf +} diff --git a/net-analyzer/pmacct/pmacct-999999.ebuild b/net-analyzer/pmacct/pmacct-999999.ebuild new file mode 100644 index 000000000000..63073745a3d7 --- /dev/null +++ b/net-analyzer/pmacct/pmacct-999999.ebuild @@ -0,0 +1,97 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +inherit autotools flag-o-matic git-r3 toolchain-funcs + +DESCRIPTION="A network tool to gather IP traffic information" +HOMEPAGE="http://www.pmacct.net/" +EGIT_REPO_URI="https://github.com/pmacct/pmacct/" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="" +IUSE=" + +bgp-bins +bmp-bins geoip geoipv2 jansson kafka +l2 mongodb mysql + ndpi nflog plabel postgres rabbitmq sqlite +st-bins +traffic-bins zmq +" +REQUIRED_USE=" + ?? ( geoip geoipv2 ) + kafka? ( jansson ) + rabbitmq? ( jansson ) +" + +RDEPEND=" + net-libs/libpcap + geoip? ( dev-libs/geoip ) + geoipv2? ( dev-libs/libmaxminddb ) + jansson? ( dev-libs/jansson ) + kafka? ( dev-libs/librdkafka ) + mongodb? ( + >=dev-libs/mongo-c-driver-0.8.1-r1 + <dev-libs/mongo-c-driver-0.98 + ) + mysql? ( dev-db/mysql-connector-c:0= ) + ndpi? ( >=net-libs/nDPI-3.2:= ) + nflog? ( net-libs/libnetfilter_log ) + postgres? ( dev-db/postgresql:* ) + rabbitmq? ( net-libs/rabbitmq-c ) + sqlite? ( =dev-db/sqlite-3* ) + zmq? ( >=net-libs/zeromq-4.2.0:= ) +" +DEPEND=" + ${RDEPEND} + virtual/pkgconfig +" + +DOCS=( + CONFIG-KEYS ChangeLog FAQS QUICKSTART UPGRADE + docs/INTERNALS docs/PLUGINS docs/SIGNALS +) + +src_prepare() { + default + sed -i -e 's|-Werror||g' configure.ac || die + eautoreconf +} + +src_configure() { + tc-export CC AR RANLIB + append-cflags -fcommon + + econf \ + $(use_enable bgp-bins) \ + $(use_enable bmp-bins) \ + $(use_enable geoip) \ + $(use_enable geoipv2) \ + $(use_enable jansson) \ + $(use_enable kafka) \ + $(use_enable l2) \ + $(use_enable plabel) \ + $(use_enable mongodb) \ + $(use_enable mysql) \ + $(use_enable ndpi) \ + $(use_enable nflog) \ + $(use_enable postgres pgsql) \ + $(use_enable rabbitmq) \ + $(use_enable sqlite sqlite3) \ + $(use_enable st-bins) \ + $(use_enable traffic-bins) \ + $(use_enable zmq) \ + --disable-debug +} + +src_install() { + default + + for dirname in examples sql telemetry; do + docinto ${dirname} + dodoc -r ${dirname}/* + done + + newinitd "${FILESDIR}"/pmacctd-init.d pmacctd + newconfd "${FILESDIR}"/pmacctd-conf.d pmacctd + + insinto /etc/pmacctd + newins examples/pmacctd-imt.conf.example pmacctd.conf +} diff --git a/net-analyzer/pnp4nagios/Manifest b/net-analyzer/pnp4nagios/Manifest new file mode 100644 index 000000000000..e33adf3e6b1d --- /dev/null +++ b/net-analyzer/pnp4nagios/Manifest @@ -0,0 +1 @@ +DIST pnp4nagios-0.6.26.tar.gz 3039265 BLAKE2B 1adb3c41222e6bc93671af955a1564387d77901ce118f5d309d101d88c691140e0feef1c2594bc5db44706ff01505a4fcf99b79b6a0c5b5cb923838dd00f1ff0 SHA512 caf6dcced74967174d9e6f09dd1a5bee17397c10a68d0f577c37dcc836f928d78c20d75a0189539e9ffa93715ab7b6e732e9f36b9698cf4dd9c09cfb65184427 diff --git a/net-analyzer/pnp4nagios/files/98_pnp4nagios-2.4.conf b/net-analyzer/pnp4nagios/files/98_pnp4nagios-2.4.conf new file mode 100644 index 000000000000..5944a2e2f70f --- /dev/null +++ b/net-analyzer/pnp4nagios/files/98_pnp4nagios-2.4.conf @@ -0,0 +1,29 @@ +<IfDefine PNP> + + Alias /pnp4nagios /usr/share/pnp/ + + <Directory /usr/share/pnp> + AllowOverride AuthConfig + Require all granted + + <IfModule rewrite_module> + # Turn on URL rewriting + RewriteEngine On + Options +FollowSymLinks + + # Installation directory + RewriteBase /pnp4nagios + + # Protect application and system files from being viewed + RewriteRule ^(application|modules|system) - [F,L] + + # Allow any files or directories that exist to be displayed directly + RewriteCond %{REQUEST_FILENAME} !-f + RewriteCond %{REQUEST_FILENAME} !-d + + # Rewrite all other URLs to index.php/URL + RewriteRule .* index.php/$0 [PT,L] + </IfModule> + </Directory> + +</IfDefine> diff --git a/net-analyzer/pnp4nagios/files/npcd.initd b/net-analyzer/pnp4nagios/files/npcd.initd new file mode 100644 index 000000000000..23eb77aa63a4 --- /dev/null +++ b/net-analyzer/pnp4nagios/files/npcd.initd @@ -0,0 +1,18 @@ +#!/sbin/openrc-run +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +extra_started_commands="reload" + +command="/usr/bin/npcd" +command_args="-f /etc/pnp/npcd.cfg -d" + +depend() { + need net +} + +reload() { + ebegin "Reloading npcd" + kill -HUP `pgrep npcd` + eend $? "Failed to reload npcd" +} diff --git a/net-analyzer/pnp4nagios/files/pnp4nagios-0.6.14-makefile.patch b/net-analyzer/pnp4nagios/files/pnp4nagios-0.6.14-makefile.patch new file mode 100644 index 000000000000..469389d3ee31 --- /dev/null +++ b/net-analyzer/pnp4nagios/files/pnp4nagios-0.6.14-makefile.patch @@ -0,0 +1,32 @@ +diff -Naur pnp4nagios-0.6.14.orig/src/Makefile.in pnp4nagios-0.6.14/src/Makefile.in +--- pnp4nagios-0.6.14.orig/src/Makefile.in 2011-08-10 17:18:46.000000000 +0200 ++++ pnp4nagios-0.6.14/src/Makefile.in 2011-08-10 17:19:51.000000000 +0200 +@@ -83,7 +83,7 @@ + # + ############################### + npcd: npcd.c $(NPCDOBJS) $(NPCDHEAD) +- $(CC) $(CFLAGS) -o $@ npcd.c $(NPCDOBJS) -lpthread ++ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ npcd.c $(NPCDOBJS) -lpthread + + ############################### + # +@@ -118,7 +118,6 @@ + + install: + $(MAKE) install-basic +- $(MAKE) strip-post-install + + install-unstripped: + $(MAKE) install-basic +diff -Naur pnp4nagios-0.6.14.orig/configure pnp4nagios-0.6.14/configure +--- pnp4nagios-0.6.14.orig/configure 2011-08-12 09:01:12.000000000 +0200 ++++ pnp4nagios-0.6.14/configure 2011-08-12 09:03:32.000000000 +0200 +@@ -5565,7 +5565,7 @@ + PERFDATA_LOG="${localstatedir}/perfdata.log" + PERFDATA_DIR="${localstatedir}/perfdata" + PERFDATA_SPOOL_DIR="${localstatedir}/spool" +- mandir="\${prefix}/man" ++ mandir="/usr/share/man" + ;; + esac + diff --git a/net-analyzer/pnp4nagios/metadata.xml b/net-analyzer/pnp4nagios/metadata.xml new file mode 100644 index 000000000000..5af7545c2126 --- /dev/null +++ b/net-analyzer/pnp4nagios/metadata.xml @@ -0,0 +1,24 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>sysadmin@gentoo.org</email> + <name>Gentoo Sysadmin Project</name> + </maintainer> + + <use> + <flag name="nagios"> + Build against <pkg>net-analyzer/nagios-core</pkg> (the default) + </flag> + <flag name="icinga"> + Build against <pkg>net-analyzer/icinga2</pkg> instead of + <pkg>net-analyzer/nagios-core</pkg> + </flag> + </use> + + <upstream> + <remote-id type="sourceforge">pnp4nagios</remote-id> + <remote-id type="github">lingej/pnp4nagios</remote-id> + </upstream> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/pnp4nagios/pnp4nagios-0.6.26-r9.ebuild b/net-analyzer/pnp4nagios/pnp4nagios-0.6.26-r9.ebuild new file mode 100644 index 000000000000..6a09ab87188b --- /dev/null +++ b/net-analyzer/pnp4nagios/pnp4nagios-0.6.26-r9.ebuild @@ -0,0 +1,100 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +DESCRIPTION="A performance data analyzer for nagios" +HOMEPAGE="http://www.pnp4nagios.org/" +SRC_URI="mirror://sourceforge/${PN}/PNP-0.6/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +IUSE="apache2 icinga +nagios" +KEYWORDS="amd64 ppc ppc64 ~sparc x86" + +REQUIRED_USE="^^ ( icinga nagios )" + +# Some things (sync mode, for one) are broken with nagios-4.x, but since +# nagios-3.x has been end-of-life'd, we don't have much choice here but +# to accept it. +DEPEND=" + dev-lang/php:*[filter,gd,json,simplexml,xml,zlib] + net-analyzer/rrdtool[graph,perl] + icinga? ( net-analyzer/icinga2 ) + nagios? ( net-analyzer/nagios-core )" + +# A list of modules used in our Apache config file. +APACHE_MODS="apache2_modules_alias," # "Alias" directive +APACHE_MODS+="apache2_modules_authz_core," # "Require" directive +APACHE_MODS+="apache2_modules_rewrite" # "RewriteEngine" and friends + +RDEPEND="${DEPEND} + virtual/perl-Getopt-Long + virtual/perl-Time-HiRes + media-fonts/dejavu + apache2? ( >=www-servers/apache-2.4[${APACHE_MODS}] )" + +PATCHES=( "${FILESDIR}/${PN}-0.6.14-makefile.patch" ) + +src_configure() { + local user_group=nagios + use icinga && user_group=icinga + + econf \ + --sysconfdir="${EPREFIX}"/etc/pnp \ + --datarootdir="${EPREFIX}"/usr/share/pnp \ + --localstatedir="${EPREFIX}"/var/lib/pnp \ + --with-nagios-user="${user_group}" \ + --with-nagios-group="${user_group}" \ + --with-perfdata-logfile="${EPREFIX}"/var/log/pnp/process_perfdata.log +} + +src_compile() { + # The default target just shows a help + emake all +} + +src_install() { + # Don't use INSTALL_OPTS because they set insecure permissions on + # all of /etc/pnp (https://github.com/lingej/pnp4nagios/issues/140). + emake INSTALL_OPTS="" DESTDIR="${D}" install install-config + einstalldocs + newinitd "${FILESDIR}"/npcd.initd npcd + rm "${ED%/}/usr/share/pnp/install.php" || \ + die "unable to remove ${ED%/}/usr/share/pnp/install.php" + + # Fix CVE-2012-3457 (Gentoo bug 430358) + fperms o-rwx /etc/pnp/process_perfdata.cfg + + if use apache2 ; then + insinto /etc/apache2/modules.d + newins "${FILESDIR}"/98_pnp4nagios-2.4.conf 98_pnp4nagios.conf + fi + + # The nagios or icinga user needs to write performance data to the + # perfdata-dir... + local user_group=nagios + use icinga && user_group=icinga + fowners ":${user_group}" /var/lib/pnp/{,perfdata,spool} + fperms g+rwx /var/lib/pnp/{,perfdata,spool} + + # and likewise for its logs... + dodir /var/log/pnp + fowners ":${user_group}" /var/log/pnp + fperms g+rwx /var/log/pnp + + # and its statistics. This one is arguably the responsibility of the + # build system, since process_perfdata.cfg refers to this location. + dodir /var/lib/pnp/stats + fowners ":${user_group}" /var/lib/pnp/stats + fperms g+rwx /var/lib/pnp/stats +} + +pkg_postinst() { + elog "To enable the pnp4nagios web front-end, please visit" + elog "${EROOT%/}/etc/conf.d/apache2 and add \"-D PNP -D PHP\"" + elog "to APACHE2_OPTS. Then pnp4nagios will be available at," + elog + elog " http://localhost/pnp4nagios" + elog +} diff --git a/net-analyzer/poink/Manifest b/net-analyzer/poink/Manifest new file mode 100644 index 000000000000..cad1d56652a1 --- /dev/null +++ b/net-analyzer/poink/Manifest @@ -0,0 +1 @@ +DIST poink-2.03.tar.gz 11427 BLAKE2B eeea10cbc7ba0b29d87de8c784ce0a68325ede592b190d570b71461c126517610309540876e46e6a1c49dbec8ef8009a4280e54a0e10e18086f27ecc8ae78b73 SHA512 25299093f3e70af97da85f0e7bbe9032466b3ef3ad886d4e658a0cfc11793570c2fb1eefd3330fa549517d033297e5ac3e90f7012a122c8ad988625372d986a8 diff --git a/net-analyzer/poink/files/poink-2.03-signed-char-fixup.patch b/net-analyzer/poink/files/poink-2.03-signed-char-fixup.patch new file mode 100644 index 000000000000..deaff51bcf86 --- /dev/null +++ b/net-analyzer/poink/files/poink-2.03-signed-char-fixup.patch @@ -0,0 +1,13 @@ +diff -Nuar poink-2.03.orig/poink.c poink-2.03/poink.c +--- a/poink.c 2002-11-03 03:12:56.000000000 -0800 ++++ b/poink.c 2007-06-11 11:59:09.763490735 -0700 +@@ -109,7 +109,8 @@ + SOCKADDR_IN s; + struct timeval ping_start, ping_end; + struct sigaction siga; +- char ch, pingerror[100]; ++ signed char ch; // EOF is -1 ++ char pingerror[100]; + int delay=DEF_DELAY,timeout=DEF_TIMEOUT; + int suck, tmp, port=65535; + diff --git a/net-analyzer/poink/metadata.xml b/net-analyzer/poink/metadata.xml new file mode 100644 index 000000000000..e6fb7caed44a --- /dev/null +++ b/net-analyzer/poink/metadata.xml @@ -0,0 +1,14 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>robbat2@gentoo.org</email> + </maintainer> + <longdescription lang="en"> + A TCP/IP-based ping implementation. It does not require special + privileges and is designed for multiuser shell systems. It is + meant to be a secure replacement for the standard IPv4 network + monitoring tool. + </longdescription> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/poink/poink-2.03.ebuild b/net-analyzer/poink/poink-2.03.ebuild new file mode 100644 index 000000000000..e9f173afff5a --- /dev/null +++ b/net-analyzer/poink/poink-2.03.ebuild @@ -0,0 +1,29 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit toolchain-funcs + +DESCRIPTION="TCP/IP-based ping implementation" +HOMEPAGE="https://directory.fsf.org/security/system/poink.html" +SRC_URI="https://ep09.pld-linux.org/~mmazur/${PN}/${P}.tar.gz" + +LICENSE="GPL-2+" +SLOT="0" +KEYWORDS="amd64 ~ppc x86" +IUSE="" + +PATCHES=( "${FILESDIR}/${PN}-2.03-signed-char-fixup.patch" ) + +src_compile() { + emake \ + CFLAGS="${CFLAGS} ${LDFLAGS}" \ + CC="$(tc-getCC)" +} + +src_install() { + dobin poink poink6 + newman ping.1 poink.1 + dodoc README* ChangeLog +} diff --git a/net-analyzer/portmon/Manifest b/net-analyzer/portmon/Manifest new file mode 100644 index 000000000000..f1c22c17f1de --- /dev/null +++ b/net-analyzer/portmon/Manifest @@ -0,0 +1 @@ +DIST portmon-2.0.tar.gz 107246 BLAKE2B 0f3d33aecca7d41a5af08c656bdb9665c9560aaee78dab7b02bf330d21ddde3fcc916a06b7b48ea1ae305b5188e62073065a8c745fd31310415b47ce3b29a733 SHA512 1feafd1a8701d269c2f2e36f46ef51eeda8975aeca85d6f720cf5805e3f8bd031eb681117fa9414e775ea46c543066deb3532e7cc7d26c655daf6163fac77e25 diff --git a/net-analyzer/portmon/files/portmon-2.0-fno-common.patch b/net-analyzer/portmon/files/portmon-2.0-fno-common.patch new file mode 100644 index 000000000000..bfe6a914635e --- /dev/null +++ b/net-analyzer/portmon/files/portmon-2.0-fno-common.patch @@ -0,0 +1,58 @@ +--- a/src/portmon.c ++++ b/src/portmon.c +@@ -35,6 +35,15 @@ + #include <getopt.h> + #endif + ++int report_flag; ++int daemonize_flag; ++ ++struct host_struct *hosts; ++char *err_msg; ++char logfile[STRLARGE]; ++int timeout; ++int verbose; ++ + void version(void) + { + printf("This is %s, version %s\n", PACKAGE, VERSION); +--- a/src/portmon.h ++++ b/src/portmon.h +@@ -31,8 +31,8 @@ + #define STRLARGE 512 + + // flags +-int report_flag; +-int daemonize_flag; ++extern int report_flag; ++extern int daemonize_flag; + + struct port + { +@@ -43,7 +43,7 @@ + }; + + // create an array of hosts +-struct host_struct ++extern struct host_struct + { + char name[STRMED]; + struct port ports[STRSMALL]; +@@ -52,13 +52,13 @@ + *hosts; + + // place to hold error messages +-char *err_msg; ++extern char *err_msg; + // place we log crap +-char logfile[STRLARGE]; ++extern char logfile[STRLARGE]; + // timeout (seconds) +-int timeout; ++extern int timeout; + // verbose mode +-int verbose; ++extern int verbose; + + // Functions in various files + diff --git a/net-analyzer/portmon/files/portmon.init b/net-analyzer/portmon/files/portmon.init new file mode 100644 index 000000000000..3fe1ea6a2819 --- /dev/null +++ b/net-analyzer/portmon/files/portmon.init @@ -0,0 +1,29 @@ +#!/sbin/openrc-run +# Copyright 1999-2004 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +# configuration is done in /etc/pormon.sh + +depend() { + need net +} + +checkconfig() { + if [ ! -e /etc/portmon/portmon.hosts ]; then + error " You need /etc/portmon/portmaon.hosts to run portmon." + return 1 + fi +} + +start() { + checkconfig || return 1 + ebegin "Starting portmon" + start-stop-daemon --start --quiet --exec /usr/sbin/portmon -- -d -c /etc/portmon/portmon.hosts + eend $? +} + +stop() { + checkconfig || return 1 + ebegin "Staring portmon" + start-stop-daemon --stopt --quiet --exec /usr/sbin/portmon +} diff --git a/net-analyzer/portmon/metadata.xml b/net-analyzer/portmon/metadata.xml new file mode 100644 index 000000000000..bd13a914477c --- /dev/null +++ b/net-analyzer/portmon/metadata.xml @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<maintainer type="project"> + <email>netmon@gentoo.org</email> + <name>Gentoo network monitoring and analysis project</name> +</maintainer> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/portmon/portmon-2.0-r1.ebuild b/net-analyzer/portmon/portmon-2.0-r1.ebuild new file mode 100644 index 000000000000..824a242bbd0c --- /dev/null +++ b/net-analyzer/portmon/portmon-2.0-r1.ebuild @@ -0,0 +1,33 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +DESCRIPTION="Portmon is a network service monitoring daemon" +HOMEPAGE="http://aboleo.net/software/portmon/" +SRC_URI="http://aboleo.net/software/portmon/downloads/${P}.tar.gz" + +KEYWORDS="~amd64 ~ppc ~x86" +SLOT="0" +LICENSE="GPL-2" + +PATCHES=( + "${FILESDIR}"/${P}-fno-common.patch +) + +src_configure() { + econf --sysconfdir=/etc/portmon +} + +src_install() { + into /usr + dosbin src/portmon + + doman extras/portmon.8 + + insinto /etc/portmon + doins extras/portmon.hosts.sample + dodoc AUTHORS BUGS README + + newinitd "${FILESDIR}"/portmon.init portmon +} diff --git a/net-analyzer/portmon/portmon-2.0.ebuild b/net-analyzer/portmon/portmon-2.0.ebuild new file mode 100644 index 000000000000..b8d639d55d72 --- /dev/null +++ b/net-analyzer/portmon/portmon-2.0.ebuild @@ -0,0 +1,29 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +DESCRIPTION="Portmon is a network service monitoring daemon" +HOMEPAGE="http://aboleo.net/software/portmon/" +SRC_URI="http://aboleo.net/software/portmon/downloads/${P}.tar.gz" + +KEYWORDS="~amd64 ~ppc x86" +SLOT="0" +LICENSE="GPL-2" + +src_configure() { + econf --sysconfdir=/etc/portmon +} + +src_install() { + into /usr + dosbin src/portmon + + doman extras/portmon.8 + + insinto /etc/portmon + doins extras/portmon.hosts.sample + dodoc AUTHORS BUGS README + + newinitd "${FILESDIR}"/portmon.init portmon +} diff --git a/net-analyzer/portsentry/Manifest b/net-analyzer/portsentry/Manifest new file mode 100644 index 000000000000..0dc45121d823 --- /dev/null +++ b/net-analyzer/portsentry/Manifest @@ -0,0 +1 @@ +DIST portsentry-1.2.tar.gz 48054 BLAKE2B e7baf49ed02fe0100a789737c263ca9bd4d2122f59f00fbffa5fc6fac6215926ee46d7fbcb1424a1ace76a8c2845ff915550695509d7bd6b7892a746d05f2ec1 SHA512 bcbea576816c654a9e165897ea51de3a4dde2940b05e26e785315fae5a5c7a0f697abfa2ace14d16e687e4a26f37c75cdaffefa1c5f98681f858dda22bcf3dae diff --git a/net-analyzer/portsentry/files/portsentry-1.2-conf.patch b/net-analyzer/portsentry/files/portsentry-1.2-conf.patch new file mode 100644 index 000000000000..54f78fb467bc --- /dev/null +++ b/net-analyzer/portsentry/files/portsentry-1.2-conf.patch @@ -0,0 +1,17 @@ +--- a/portsentry.conf ++++ b/portsentry.conf +@@ -80,11 +80,11 @@ + ###################### + # + # Hosts to ignore +-IGNORE_FILE="/usr/local/psionic/portsentry/portsentry.ignore" ++IGNORE_FILE="/etc/portsentry/portsentry.ignore" + # Hosts that have been denied (running history) +-HISTORY_FILE="/usr/local/psionic/portsentry/portsentry.history" ++HISTORY_FILE="/etc/portsentry/portsentry.history" + # Hosts that have been denied this session only (temporary until next restart) +-BLOCKED_FILE="/usr/local/psionic/portsentry/portsentry.blocked" ++BLOCKED_FILE="/etc/portsentry/portsentry.blocked" + + ############################## + # Misc. Configuration Options# diff --git a/net-analyzer/portsentry/files/portsentry-1.2-config.h.patch b/net-analyzer/portsentry/files/portsentry-1.2-config.h.patch new file mode 100644 index 000000000000..28c02b85e5af --- /dev/null +++ b/net-analyzer/portsentry/files/portsentry-1.2-config.h.patch @@ -0,0 +1,11 @@ +--- a/portsentry_config.h ++++ b/portsentry_config.h +@@ -22,7 +22,7 @@ + + /* These are probably ok. Be sure you change the Makefile if you */ + /* change the path */ +-#define CONFIG_FILE "/usr/local/psionic/portsentry/portsentry.conf" ++#define CONFIG_FILE "/etc/portsentry/portsentry.conf" + + /* The location of Wietse Venema's TCP Wrapper hosts.deny file */ + #define WRAPPER_HOSTS_DENY "/etc/hosts.deny" diff --git a/net-analyzer/portsentry/files/portsentry-1.2-gcc.patch b/net-analyzer/portsentry/files/portsentry-1.2-gcc.patch new file mode 100644 index 000000000000..613808fe7225 --- /dev/null +++ b/net-analyzer/portsentry/files/portsentry-1.2-gcc.patch @@ -0,0 +1,12 @@ +--- a/portsentry.c ++++ b/portsentry.c +@@ -1581,8 +1581,7 @@ + Usage (void) + { + printf ("PortSentry - Port Scan Detector.\n"); +- printf ("Copyright 1997-2003 Craig H. Rowland <craigrowland at users dot +-sourceforget dot net>\n"); ++ printf ("Copyright 1997-2003 Craig H. Rowland <craigrowland at users dot sourceforget dot net>\n"); + printf ("Licensing restrictions apply. Please see documentation\n"); + printf ("Version: %s\n\n", VERSION); + #ifdef SUPPORT_STEALTH diff --git a/net-analyzer/portsentry/files/portsentry-1.2-ignore.csh.patch b/net-analyzer/portsentry/files/portsentry-1.2-ignore.csh.patch new file mode 100644 index 000000000000..ec45dd1daac7 --- /dev/null +++ b/net-analyzer/portsentry/files/portsentry-1.2-ignore.csh.patch @@ -0,0 +1,11 @@ +--- a/ignore.csh ++++ b/ignore.csh +@@ -35,7 +35,7 @@ + endif + + # Safe directory +-set SENTRYDIR=/usr/local/psionic/portsentry ++set SENTRYDIR=/etc/portsentry + set TMPFILE=portsentry.ignore.tmp + + if (-f $SENTRYDIR/portsentry.ignore) then diff --git a/net-analyzer/portsentry/files/portsentry.8 b/net-analyzer/portsentry/files/portsentry.8 new file mode 100644 index 000000000000..7c9d6a617262 --- /dev/null +++ b/net-analyzer/portsentry/files/portsentry.8 @@ -0,0 +1,151 @@ +.TH PORTSENTRY 8 +.\" NAME should be all caps, SECTION should be 1-8, maybe w/ subsection +.\" other parms are allowed: see man(7), man(1) +.SH NAME +portsentry \- detect portscan activity +.SH SYNOPSIS +.B portsentry +.I "[ \-tcp | \-stcp | \-atcp ]" +.br +.B portsentry +.I "[ \-udp | \-sudp | \-audp ]" +.SH "DESCRIPTION" +This manual page documents briefly the +.BR portsentry +command. +This manual page was written for the Debian GNU/Linux distribution +because the original program does not have a manual page. +.PP +.B portsentry +is a program that tries to detect portscans on network interfaces with the ability to detect stealth scans. On alarm portsentry can block the scanning machine via hosts.deny (see +.BR hosts_access (5), +firewall rule (see +.BR ipfwadm (8) , +.BR ipchains (8) +and +.BR iptables (8)) +or dropped route (see +.BR route (8)). +.SH OPTIONS +For details on the various modes see +.I /usr/doc/portsentry/README.install +. +.TP +.B \-tcp +tcp portscan detection on ports specified under +.I TCP_PORTS +in the config file +.IR /etc/portsentry/portsentry.conf . +.TP +.B \-stcp +As above but additionally detect stealth scans. +.TP +.B \-atcp +Advanced tcp or inverse mode. Portsentry binds to all unused ports below +.I ADVANCED_PORTS_TCP +given in the config file +.IR /etc/portsentry/portsentry.conf . + +.TP +.B \-udp +udp portscan detection on ports specified under +.I UDP_PORTS +in the config file +.IR /etc/portsentry/portsentry.conf . +.TP +.B \-sudp +As above but additionally detect "stealth" scans. +.TP +.B \-audp +Advanced udp or inverse mode. Portsentry binds to all unused ports below +.I ADVANCED_PORTS_UDP +given in the config file +.IR /etc/portsentry/portsentry.conf . + +.SH "CONFIGURATION FILES" +.B portsentry +keeps all its configuration files in +.BR /etc/portsentry. +.B portsentry.conf +is +.BR portsentry 's +main configuration file. See +.BR portsentry.conf (5) +for details. + +The file +.BR portsentry.ignore +contains a list of all hosts that are ignored, if they connect to a tripwired +port. It should contain at least the localhost(127.0.0.1), 0.0.0.0 and the IP addresses of all local interfaces. You can ignore whole subnets by using a notation <IP Address>/<Netmask Bits>. It is *not* recommend putting in every machine IP on your network. It may be important for you to see who is connecting to you, even if it is a "friendly" machine. This can help you detect internal host compromises faster. + +If you use the +.IR /etc/init.d/portsentry +script to start the daemon, +.BR portsentry.ignore +is rebuild on each start of the daemon using +.BR portsentry.ignore.static +and all the IP addresses found on the machine via +.BR ifconfig . + +.BR /etc/default/portsenty +specifies in which protocol modes +.B portsentry +should be startet from +.IR /etc/init.d/portsentry +There are currently two options: +.TP +.B TCP_MODE= +either +.BR tcp ", " stcp " or " atcp " (see " OPTIONS " above)." +.TP +.B UDP_MODE= +either +.BR udp ", " sudp " or " audp " (see " OPTIONS " above)." + +.PP +The options above correspond to portsentry's commandline arguments. For example +.B TCP_MODE="atcp" +has the same effect as to start portsentry using +.BR portsentry " " -atcp. +Only one mode per protocol can be started at a time (i.e. one tcp and one udp mode). + +.SH "FILES" +.BR /etc/portsentry/portsentry.conf +main configuration file +.TP +.BR /etc/portsentry/portsentry.ignore +IP addresses to ignore +.TP +.BR /etc/portsentry/portsentry.ignore.static +static IP addresses to ignore +.TP +.BR /etc/default/portsentry +startup options +.TP +.BR /etc/init.d/portsentry +script responsible for starting and stopping the daemon +.TP +.BR /var/lib/portsentry/portsentry.blocked.* +blocked hosts(cleared upon reload) +.TP +.BR /var/lib/portsentry/portsentry.history +history file +.LP +.SH "SEE ALSO" +.BR portsentry.conf(5), +.BR hosts_access(5), +.BR hosts_options(5), +.BR route(8), +.BR ipfwadm(8), +.BR ipchains(8), +.BR iptables(8), +.BR ifconfig(8) + +.BR /usr/share/doc/portsentry/README.install +.LP +.SH AUTHOR +.B portsentry +was written by Craig H. Howland +.B <crowland@users.sf.net>. + +This manual page was stitched together by Guido Guenther <agx@debian.org>, for the Debian GNU/Linux system (but may be used by others). Some parts are just a cut and paste from the original documentation. diff --git a/net-analyzer/portsentry/files/portsentry.conf.5 b/net-analyzer/portsentry/files/portsentry.conf.5 new file mode 100644 index 000000000000..314e2abb2a44 --- /dev/null +++ b/net-analyzer/portsentry/files/portsentry.conf.5 @@ -0,0 +1,217 @@ +.TH PORTSENTRY.CONF 5 +.\" NAME should be all caps, SECTION should be 1-8, maybe w/ subsection +.\" other parms are allowed: see man(7), man(1) +.SH NAME +portsentry.conf \- portsentry´s main configuration file +.SH "DESCRIPTION" +This manual page documents briefly the format of +.BR portsentry ´s(8) +configuration file. +.SH OPTIONS +.TP +.B TCP_PORTS +A comma delimited string of TCP ports you want PortSentry to +listen to. This string can NOT have any spaces in it. You can put in as +many sockets as you want. PortSentry will try to bind them all up until +the default limit of 64. + +For the stealth scan detection modes, the ports are not "bound" per se, +but they are monitored at the socket level for connections. + +For the Advanced Stealth Scan Detection (see below) this list is *ignored* +.TP +.B UDP_PORTS +The same as above, except for UDP ports. You need to be +very careful with UDP mode as an attacker can forge a port sweep and +make you block any number of hosts. Use this option with caution, or +not at all if your host is a well-known Internet connected system. + +For the Advanced Stealth Scan Detection (see below) this list is *ignored* + +.TP +.B ADVANCED_PORTS_TCP +A number indicating the highest port number to +monitor down from. Any port *below* this number is then monitored. The +default is 1024 (reserved port range), but can be made as large as 65535 +(system max). I don't recommend going over 1024 with this option. + +.TP +.B ADVANCED_PORTS_UDP +Same as above, except for UDP. + +.TP +.B ADVANCED_EXCLUDE_TCP +A comma delimited string of TCP ports that should +be manually excluded from monitoring in Advanced mode. These are normally +ports that may get hit by mistake by remote clients and shouldn't cause +alarms (ident, SSL, etc). + +.TP +.B ADVANCED_EXCLUDE_UDP +Same as above, except for UDP. + +.TP +.B IGNORE_FILE +The path to the file that contains IP addresses of hosts you +want to always be ignored. + +.TP +.B BLOCKED_FILE +The path to the file that contains the IP addresses of +blocked hosts. + +.TP +.B RESOLVE_HOST - This option turns off DNS resolution for +hosts. If you have a slow DNS server it may be more effective +to turn off resolution. + +.TP +.B BLOCK_UDP +This option disables all automatic responses to UDP probes. +Because UDP can be easily forged, it may allow an attacker to start a +denial of service attack against the protected host, causing it to block +all manner of hosts that should normally be left alone. Setting this option +to "0" will disable all responses, although the connects are still logged. +This option is mainly useful for Internet exposed hosts. For internal hosts +you should leave this enabled. If someone internally is firing spoofed +packets at you, then you have a much bigger problem than a denial of service. + +.TP +.B BLOCK_TCP +Same as above, but for TCP. Packet forgery is not as big a problem +though because PortSentry waits for a full connect to occur and this is much +harder to forge in the basic modes. Leave this enabled, even for +Internet connected hosts. For stealth scan detection modes the UDP warning +applies: + + An attacker can cause you to block hosts you don't want to + through packet forgery. I wouldn't worry about this until it is a + problem, but you should be aware of it. + +.TP +.B KILL_ROUTE +This is the command to run to drop the offending route(see +.BR route (8)) +if an attack is detected. This is the *full path* to the route command +along with the necessary parameters to make the command work. The macro +.B $TARGET$ +will be substituted with the attacking host IP and is +REQUIRED in this option. Your gateway should be a *dead host* on the +local subnet. On some systems though you can just put in the localhost +address (127.0.0.1) and this will probably work. All packets from the +target host will get routed to this address so don't mess this up. +More modern route commands will include a "-blackhole" or "-reject" flag. +Check your man(1) pages and if your route command supports this feature +you should use it (although we recommend using packet filtering +instead, see below). + +Also be aware that this creates what is known as an "asynchronous +route" which basically means packets enter your host via one route +and are sent out on another (dead) route. This works OK for full +TCP connect requests, but for UDP and stealth scan modes it +still allows packets to activate PortSentry and you may get a +series of "already blocked" alarms by PortSentry. For UDP scans +this method prevents ICMP messages from returning to the attacker +so all ports appear open. However, if the attacker is performing +an actual exploit with UDP the drop route method will not work. +The asynchronous route allows the packet to hit the system and the +attacker could perform a "blind" attack with UDP if they know what +the responses are going to be. + +By far the best method is to use the local packet filter (see +.BR ipfwadm (8), +.BR ipchains (8), +or +.BR iptables (8)). +This is a much cleaner solution and is +detailed in the config file. The macro +.B $PORT$ +will substitute the port +that was connected to by the attacker, but this is NOT required for this +option. The macro $MODE$ reports what mode the blocking occurred in +(tcp, udp, stcp, sudp, atcp, audp) but is also NOT required. + +.TP +.B KILL_HOSTS_DENY +This is the format of the string to drop into the +hosts.deny file that TCP wrappers uses(see +.BR hosts_access (5), +and +.BR hosts_options (5)). +Again the +.B $TARGET$ +macro is +expanded out to be the IP of the attacker and is required. You can +also drop in any TCP wrapper escape codes here as well (%h, twist, +etc). The macro +.B $PORT$ +will substitute the port that was connected to +by the attacker, but this is NOT required for this option. +The macro $MODE$ reports what mode the blocking occurred in +(tcp, udp, stcp, sudp, atcp, audp) but is also NOT required. + +.TP +.B KILL_RUN_CMD +This is a command you want run *before* the route +is dropped to the attacker. You can put in any program/script you want +executed when an attack is detected. WE NEVER RECOMMEND PUTTING IN +RETALIATORY ACTION AGAINST AN ATTACKING HOST. Virtually every time you're +are port scanned the host doing the scanning has been compromised itself. +Therefore, if you retaliate you are probably attacking an innocent(?) +party. Also the goal of security is to make the person GO AWAY. You don't +want to irritate them into making a personal vendetta against you. +Remember, even a 13 year old can run a [insert favorite D.O.S. program +here] attack against you from their Windows box to make your life +miserable. As above, the +.BR $TARGET$ , +.B $PORT$ +and +.B $MODE$ +macros are available to you but they are not required with this option as above. + +.TP +.B KILL_RUN_CMD_FIRST +Setting this to "1" makes the command above run before the route is +dropped. Setting it to "0" makes the command run aftter the blocking +has occurred. + +.TP +.B SCAN_TRIGGER +PortSentry has a state engine that will remember hosts +that connected to it. Setting this value will tell PortSentry to allow X +number of grace port hits before it reacts. This will detect both +sequential and random port sweeps. The default is 0 which will react +immediately. A setting of 1 or 2 will reduce false alarms, anything +higher is probably too much as anything more than 3 hits to different +ports is pretty suspicious behavior. Usually you can leave this at 0 +without any consequence, with the exception of Advanced stealth scan +detection modes where you may create a "hair trigger" if you aren't +careful. Use your own discretion. + +.TP +.B PORT_BANNER +A text banner you want displayed to the connecting host if +the PortSentry is activated. Leave this commented out if you don't want this +feature. If you do use it, try not to taunt the person too badly. We +recommend keeping it professional and to the point. The banner is *not* +displayed when stealth scan detection modes are used. + +.LP +.SH "SEE ALSO" +.BR portsentry(8), +.BR hosts_access(5), +.BR hosts_options(5), +.BR route(8), +.BR ipfwadm(8), +.BR ipchains(8) + +.BR /usr/share/doc/portsentry/README.install +.LP +.SH AUTHOR +.B portsentry +was written by Craig H. Howland +.B <crowland@users.sf.net>. + +This manual page is essentially just a "cut and paste" from the README.install file and was done by Guido Guenther <agx@debian.org>(hopefully without adding too many errors), for the Debian GNU/Linux system (but may be used by others). + + diff --git a/net-analyzer/portsentry/files/portsentry.confd b/net-analyzer/portsentry/files/portsentry.confd new file mode 100644 index 000000000000..49729516ef7c --- /dev/null +++ b/net-analyzer/portsentry/files/portsentry.confd @@ -0,0 +1,12 @@ +# Config file for /etc/init.d/portsentry +# +# This file is read by /etc/init.d/portsentry. See the portsentry.8 +# manpage for details. +# +# The options in this file refer to commandline arguments (all in lowercase) +# of portsentry. Use only one tcp and udp mode at a time. +# + +#PORTSENTRY_MODES="udp tcp" +#PORTSENTRY_MODES="stcp sudp" +#PORTSENTRY_MODES="atcp audp"
\ No newline at end of file diff --git a/net-analyzer/portsentry/files/portsentry.rc6 b/net-analyzer/portsentry/files/portsentry.rc6 new file mode 100644 index 000000000000..1d89be401ada --- /dev/null +++ b/net-analyzer/portsentry/files/portsentry.rc6 @@ -0,0 +1,38 @@ +#!/sbin/openrc-run +# Copyright 1999-2004 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +# NB: Config is in /etc/conf.d/portsentry + +depend() { + need net +} + +checkconfig() { + if [ ! -e /etc/portsentry/portsentry.conf ] ; then + eerror "You need an /etc/portsentry/portsentry.conf file" + eerror "There is a sample in /usr/share/doc/portsentry" + return 1 + fi + if [ -z "$PORTSENTRY_MODES" ] ; then + eerror "You need to setup your PORTSENTRY_MODES first" + eerror "Check /etc/conf.d/portsentry that you've enabled some or all of them" + return 1 + fi +} + +start() { + checkconfig || return 1 + ebegin "Starting portsentry" + for mode in $PORTSENTRY_MODES ; do + /usr/bin/portsentry -$mode + result=$(( $result + $? )) + done + eend $result +} + +stop() { + ebegin "Stopping portsentry" + killall portsentry + eend $? +} diff --git a/net-analyzer/portsentry/metadata.xml b/net-analyzer/portsentry/metadata.xml new file mode 100644 index 000000000000..6d88fecabec9 --- /dev/null +++ b/net-analyzer/portsentry/metadata.xml @@ -0,0 +1,12 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>netmon@gentoo.org</email> + <name>Gentoo network monitoring and analysis project</name> + </maintainer> + <upstream> + <remote-id type="sourceforge">sentrytools</remote-id> + </upstream> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/portsentry/portsentry-1.2-r1.ebuild b/net-analyzer/portsentry/portsentry-1.2-r1.ebuild new file mode 100644 index 000000000000..29e14b375300 --- /dev/null +++ b/net-analyzer/portsentry/portsentry-1.2-r1.ebuild @@ -0,0 +1,43 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 +inherit eutils toolchain-funcs + +DESCRIPTION="Automated port scan detector and response tool" +# Seems like CISCO took the site down? +HOMEPAGE="https://sourceforge.net/projects/sentrytools/" +SRC_URI="mirror://sourceforge/sentrytools/${P}.tar.gz" + +SLOT="0" +LICENSE="GPL-2" +KEYWORDS="amd64 ppc x86" + +S="${WORKDIR}"/${PN}_beta + +src_prepare() { + epatch "${FILESDIR}"/${P}-conf.patch + epatch "${FILESDIR}"/${P}-config.h.patch + epatch "${FILESDIR}"/${P}-gcc.patch + epatch "${FILESDIR}"/${P}-ignore.csh.patch +} + +src_compile() { + emake CC=$(tc-getCC) CFLAGS="${CFLAGS} ${LDFLAGS}" linux +} + +src_install() { + doman "${FILESDIR}"/{portsentry.8,portsentry.conf.5} + + dobin portsentry ignore.csh + dodoc README* CHANGES CREDITS + newdoc portsentry.ignore portsentry.ignore.sample + newdoc portsentry.conf portsentry.conf.sample + + insinto /etc/portsentry + newins portsentry.ignore portsentry.ignore.sample + newins portsentry.conf portsentry.conf.sample + + newinitd "${FILESDIR}"/portsentry.rc6 portsentry + newconfd "${FILESDIR}"/portsentry.confd portsentry +} diff --git a/net-analyzer/prelude-correlator/Manifest b/net-analyzer/prelude-correlator/Manifest new file mode 100644 index 000000000000..0f892ef73352 --- /dev/null +++ b/net-analyzer/prelude-correlator/Manifest @@ -0,0 +1,3 @@ +DIST prelude-correlator-4.0.0.tar.gz 347973 BLAKE2B 93f383d5d3ca3632f841b8523efa829f00ee36e4fdce76c982ef638f468dc574fa69452b4e9e5abcdaec87697a4a824faf543f0383756d15a72e99c0ac02cabe SHA512 aeeb5d1e29a464afa41b8a04f5324e0915b8450eceea68a07cb6d8bb61823ab8da8df51e1a331f5a66fd295bd2a514f484da5c396e0508c4fc5634c98382779b +DIST prelude-correlator-4.1.1.tar.gz 237036 BLAKE2B f3965b179d101450bd5b64805d0c982cc093de47fbbc4b4e0077f231cffcf152f3ace78cab5e96d7e18d8af0fae7de0fb5c70c17b8888245558ab091bee6438d SHA512 ac6eb554ab8d20325afbe49fcec9e238d84579cb68ee5731e6ec7d1da11c1b745e60117fade76d8747c93f57d4ae91461fd6e82160f659f88a0bb545e4990597 +DIST prelude-correlator-5.1.0.tar.gz 242620 BLAKE2B 70d4c4cc620fe4aa605812a83979b097e78ea97c5684d0d7ac8f0de2975f68d54f712f0d6dcd341f2928c846663fdf5182f8481fe6142de7648ba8fd2443d369 SHA512 db3a4cb1c4a8254270f63552ee2a959bc28cec8fdb48340f1c301fa65df73115292060067bed4b5945da4717a216313aa6eb2525bc02de4a6a45716b9827f5fd diff --git a/net-analyzer/prelude-correlator/files/prelude-correlator-4.1.1-fix_python3.patch b/net-analyzer/prelude-correlator/files/prelude-correlator-4.1.1-fix_python3.patch new file mode 100644 index 000000000000..a671aa476585 --- /dev/null +++ b/net-analyzer/prelude-correlator/files/prelude-correlator-4.1.1-fix_python3.patch @@ -0,0 +1,36 @@ +--- a/preludecorrelator/config.py ++++ b/preludecorrelator/config.py +@@ -19,7 +19,11 @@ + + import os + import glob +-import StringIO ++import sys ++if sys.version_info >= (3, 0): ++ from io import StringIO ++else: ++ import StringIO + try: + import configparser + except: +@@ -77,5 +81,8 @@ + f = open(fname, 'r') + except IOError: + continue +- self.readfp(StringIO.StringIO('[prelude]\n' + f.read())) ++ if sys.version_info >= (3, 0): ++ self.readfp(StringIO('[prelude]\n' + f.read())) ++ else: ++ self.readfp(StringIO.StringIO('[prelude]\n' + f.read())) + f.close() +--- a/preludecorrelator/context.py ++++ b/preludecorrelator/context.py +@@ -362,7 +362,7 @@ + + try: + _CONTEXT_TABLE.update(ContextUnpickler(fd).load()) +- except EOFError: ++ except: + return + + logger.debug("[load]: %d context loaded", len(_CONTEXT_TABLE)) diff --git a/net-analyzer/prelude-correlator/files/prelude-correlator.initd b/net-analyzer/prelude-correlator/files/prelude-correlator.initd new file mode 100644 index 000000000000..6e75689ca03c --- /dev/null +++ b/net-analyzer/prelude-correlator/files/prelude-correlator.initd @@ -0,0 +1,26 @@ +#!/sbin/openrc-run +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +BIN_CORRELATOR=/usr/bin/prelude-correlator +PID_CORRELATOR=/run/prelude-correlator/prelude-correlator.pid + +depend() { + need net + after prelude-manager +} + +start() { + ebegin "Starting prelude-correlator" + checkpath -d -m 0755 -o root:root /run/prelude-correlator + start-stop-daemon --start --exec $BIN_CORRELATOR \ + --pidfile $PID_CORRELATOR -- -d -P $PID_CORRELATOR + eend $? +} + +stop() { + ebegin "Stopping prelude-correlator" + start-stop-daemon --stop --exec $BIN_CORRELATOR \ + --pidfile $PID_CORRELATOR + eend $? +} diff --git a/net-analyzer/prelude-correlator/files/prelude-correlator.run b/net-analyzer/prelude-correlator/files/prelude-correlator.run new file mode 100644 index 000000000000..8bec03f78704 --- /dev/null +++ b/net-analyzer/prelude-correlator/files/prelude-correlator.run @@ -0,0 +1,4 @@ +# Configuration to create /run/prelude-correlator directory +# Used as part of systemd's tmpfiles + +d /run/prelude-correlator 0755 root root diff --git a/net-analyzer/prelude-correlator/files/prelude-correlator.service b/net-analyzer/prelude-correlator/files/prelude-correlator.service new file mode 100644 index 000000000000..7b763c30c13a --- /dev/null +++ b/net-analyzer/prelude-correlator/files/prelude-correlator.service @@ -0,0 +1,13 @@ +[Unit] +Description=Prelude-Correlator service +DefaultDependencies=no +After=remote_fs.target prelude-manager.service + +[Service] +ExecStart=/usr/bin/prelude-correlator -d -P /run/prelude-correlator/prelude-correlator.pid +Type=forking +PIDFile=/run/prelude-correlator/prelude-correlator.pid +Restart=always + +[Install] +WantedBy=multi-user.target diff --git a/net-analyzer/prelude-correlator/metadata.xml b/net-analyzer/prelude-correlator/metadata.xml new file mode 100644 index 000000000000..4fd9373c3d71 --- /dev/null +++ b/net-analyzer/prelude-correlator/metadata.xml @@ -0,0 +1,22 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>thomas.andrejak@gmail.com</email> + <name>Thomas Andrejak</name> + </maintainer> + <maintainer type="project"> + <email>proxy-maint@gentoo.org</email> + <name>Proxy Maintainers</name> + </maintainer> + <longdescription lang="en"> + Prelude-Correlator allows conducting multi-stream correlations + thanks to a powerful programming language for writing correlation + rules. With any type of alert able to be correlated, event + analysis becomes simpler, quicker and more incisive. This + correlation alert then appears within the Prewikka interface + and indicates the potential target information via the set of + correlation rules. + </longdescription> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/prelude-correlator/prelude-correlator-4.0.0.ebuild b/net-analyzer/prelude-correlator/prelude-correlator-4.0.0.ebuild new file mode 100644 index 000000000000..147c825eb4c2 --- /dev/null +++ b/net-analyzer/prelude-correlator/prelude-correlator-4.0.0.ebuild @@ -0,0 +1,29 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 +PYTHON_COMPAT=( python3_6 ) + +inherit distutils-r1 systemd + +DESCRIPTION="Real time correlator of events received by Prelude Manager" +HOMEPAGE="https://www.prelude-siem.org" +SRC_URI="https://www.prelude-siem.org/pkg/src/${PV}/${P}.tar.gz" + +LICENSE="GPL-2+" +SLOT="0" +KEYWORDS="~amd64 ~x86" + +DEPEND="dev-python/setuptools[${PYTHON_USEDEP}]" + +RDEPEND="~dev-libs/libprelude-${PV}[python,${PYTHON_USEDEP}] + dev-python/netaddr[${PYTHON_USEDEP}]" + +src_install() { + distutils-r1_src_install + + systemd_dounit "${FILESDIR}/${PN}.service" + systemd_newtmpfilesd "${FILESDIR}/${PN}.run" "${PN}.conf" + + newinitd "${FILESDIR}/${PN}.initd" "${PN}" +} diff --git a/net-analyzer/prelude-correlator/prelude-correlator-4.1.1.ebuild b/net-analyzer/prelude-correlator/prelude-correlator-4.1.1.ebuild new file mode 100644 index 000000000000..384e4b199c8c --- /dev/null +++ b/net-analyzer/prelude-correlator/prelude-correlator-4.1.1.ebuild @@ -0,0 +1,33 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 +PYTHON_COMPAT=( python3_6 ) + +inherit distutils-r1 systemd + +DESCRIPTION="Real time correlator of events received by Prelude Manager" +HOMEPAGE="https://www.prelude-siem.org" +SRC_URI="https://www.prelude-siem.org/pkg/src/4.1.0/${P}.tar.gz" + +LICENSE="GPL-2+" +SLOT="0" +KEYWORDS="~amd64 ~x86" + +DEPEND="dev-python/setuptools[${PYTHON_USEDEP}]" + +RDEPEND="~dev-libs/libprelude-4.1.0[python,${PYTHON_USEDEP}] + dev-python/netaddr[${PYTHON_USEDEP}]" + +PATCHES=( + "${FILESDIR}/${PN}-4.1.1-fix_python3.patch" +) + +src_install() { + distutils-r1_src_install + + systemd_dounit "${FILESDIR}/${PN}.service" + systemd_newtmpfilesd "${FILESDIR}/${PN}.run" "${PN}.conf" + + newinitd "${FILESDIR}/${PN}.initd" "${PN}" +} diff --git a/net-analyzer/prelude-correlator/prelude-correlator-5.1.0.ebuild b/net-analyzer/prelude-correlator/prelude-correlator-5.1.0.ebuild new file mode 100644 index 000000000000..43aef1343542 --- /dev/null +++ b/net-analyzer/prelude-correlator/prelude-correlator-5.1.0.ebuild @@ -0,0 +1,29 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +PYTHON_COMPAT=( python3_{6,7} ) + +inherit distutils-r1 systemd + +DESCRIPTION="Real time correlator of events received by Prelude Manager" +HOMEPAGE="https://www.prelude-siem.org" +SRC_URI="https://www.prelude-siem.org/pkg/src/5.1.0/${P}.tar.gz" + +LICENSE="GPL-2+" +SLOT="0" +KEYWORDS="~amd64 ~x86" + +RDEPEND=">=dev-libs/libprelude-5.1.0[python,${PYTHON_USEDEP}] + <dev-libs/libprelude-6[python,${PYTHON_USEDEP}] + dev-python/netaddr[${PYTHON_USEDEP}]" + +src_install() { + distutils-r1_src_install + + systemd_dounit "${FILESDIR}/${PN}.service" + systemd_newtmpfilesd "${FILESDIR}/${PN}.run" "${PN}.conf" + + newinitd "${FILESDIR}/${PN}.initd" "${PN}" +} diff --git a/net-analyzer/prelude-lml-rules/Manifest b/net-analyzer/prelude-lml-rules/Manifest new file mode 100644 index 000000000000..4305eba2fe07 --- /dev/null +++ b/net-analyzer/prelude-lml-rules/Manifest @@ -0,0 +1,4 @@ +DIST prelude-lml-rules-3.0.1.tar.gz 117551 BLAKE2B 65b4c5a03adf0cad2063463526165a3789ecffd15c75131acbbce6510e354e9e5ddb1575cc682b235e6833a16872889ce67c1557bbe19557e7f154b219c68b00 SHA512 fc3b35fcb6249b40e5f5fad6b22b238167f7039a48a3e7732110a77f23fd82d0f0150a891f83e07ab7e0ccd8b33cbcff5d8498f6f14f01248d87b8f37e6ea9a3 +DIST prelude-lml-rules-4.0.0.tar.gz 115058 BLAKE2B 93f3bc14f14a8aea70850b67a427f74818bd8119e7f54c66c3391a2e81656dd13462362a6e82d03997701cc8d8189b744922545c7e7463df79b0052e2449c302 SHA512 9244d7d5e4a7a64c10adc2f8bc0662e7ada2a367b6bf6b38292db3abab484bcb0bf3a26696576ecbb593a82de5e372ae3d381070af06a65ba03b01b9273a19f3 +DIST prelude-lml-rules-4.1.0.tar.gz 116148 BLAKE2B 0b24d5673a186f085935cd146dc27d38224736141ec480564e5be0bea7f6d624084e5bd2178453950a5ce57caf1b8ff6e3574d789b230ec07268559801856528 SHA512 a4752bb16a0b7d24f2a5d1ee62390d646778509e63dbdefa2419caca6d6251c429f18abf38dce7729cf185b9a3ef819de3fa75324e36787b984800a76c8dd3f7 +DIST prelude-lml-rules-5.1.0.tar.gz 117585 BLAKE2B 0df09a472cd5bd3306927e788b0fc5451d95bf200ec83f77cede2653c1e28da1c777b4bc6ed1232bbf82c06557bc77ece18c02843349c14a8e0bf453db5191d9 SHA512 ef31b7933a441efa43a994170d3cec377b211b55ee80abbbff7986474d58a1f7b780c717a6c364c9ae162d3a8830004a7dd5c43b5cd8df0e2d92a38ad312eadc diff --git a/net-analyzer/prelude-lml-rules/metadata.xml b/net-analyzer/prelude-lml-rules/metadata.xml new file mode 100644 index 000000000000..e4f167e6d07c --- /dev/null +++ b/net-analyzer/prelude-lml-rules/metadata.xml @@ -0,0 +1,16 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>thomas.andrejak@gmail.com</email> + <name>Thomas Andrejak</name> + </maintainer> + <maintainer type="project"> + <email>proxy-maint@gentoo.org</email> + <name>Proxy Maintainers</name> + </maintainer> + <longdescription lang="en"> + Rules for Prelude LML contributed by the community. + </longdescription> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/prelude-lml-rules/prelude-lml-rules-3.0.1.ebuild b/net-analyzer/prelude-lml-rules/prelude-lml-rules-3.0.1.ebuild new file mode 100644 index 000000000000..2088e31212d2 --- /dev/null +++ b/net-analyzer/prelude-lml-rules/prelude-lml-rules-3.0.1.ebuild @@ -0,0 +1,22 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +DESCRIPTION="Prelude LML community ruleset" +HOMEPAGE="https://www.prelude-siem.org" +SRC_URI="https://www.prelude-siem.org/pkg/src/3.0.0/${P}.tar.gz" + +LICENSE="GPL-2+" +SLOT="0" +KEYWORDS="~amd64 ~x86" + +DEPEND="net-analyzer/prelude-lml" + +RDEPEND="${DEPEND}" + +src_install() { + dodir "/etc/prelude-lml/ruleset" + insinto "/etc/prelude-lml/ruleset" + doins "ruleset/"*.rules +} diff --git a/net-analyzer/prelude-lml-rules/prelude-lml-rules-4.0.0.ebuild b/net-analyzer/prelude-lml-rules/prelude-lml-rules-4.0.0.ebuild new file mode 100644 index 000000000000..1c9aed51d8a2 --- /dev/null +++ b/net-analyzer/prelude-lml-rules/prelude-lml-rules-4.0.0.ebuild @@ -0,0 +1,21 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +DESCRIPTION="Prelude LML community ruleset" +HOMEPAGE="https://www.prelude-siem.org" +SRC_URI="https://www.prelude-siem.org/pkg/src/${PV}/${P}.tar.gz" + +LICENSE="GPL-2+" +SLOT="0" +KEYWORDS="~amd64 ~x86" + +DEPEND="~net-analyzer/prelude-lml-${PV}" + +RDEPEND="${DEPEND}" + +src_install() { + insinto "/etc/prelude-lml/ruleset" + doins ruleset/*.rules +} diff --git a/net-analyzer/prelude-lml-rules/prelude-lml-rules-4.1.0.ebuild b/net-analyzer/prelude-lml-rules/prelude-lml-rules-4.1.0.ebuild new file mode 100644 index 000000000000..59a9a724b22b --- /dev/null +++ b/net-analyzer/prelude-lml-rules/prelude-lml-rules-4.1.0.ebuild @@ -0,0 +1,21 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +DESCRIPTION="Prelude LML community ruleset" +HOMEPAGE="https://www.prelude-siem.org" +SRC_URI="https://www.prelude-siem.org/pkg/src/${PV}/${P}.tar.gz" + +LICENSE="GPL-2+" +SLOT="0" +KEYWORDS="~amd64 ~x86" + +DEPEND="~net-analyzer/prelude-lml-${PV}" + +RDEPEND="${DEPEND}" + +src_install() { + insinto "/etc/prelude-lml/ruleset" + doins ruleset/*.rules +} diff --git a/net-analyzer/prelude-lml-rules/prelude-lml-rules-5.1.0.ebuild b/net-analyzer/prelude-lml-rules/prelude-lml-rules-5.1.0.ebuild new file mode 100644 index 000000000000..31c1829ee02f --- /dev/null +++ b/net-analyzer/prelude-lml-rules/prelude-lml-rules-5.1.0.ebuild @@ -0,0 +1,21 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +DESCRIPTION="Prelude LML community ruleset" +HOMEPAGE="https://www.prelude-siem.org" +SRC_URI="https://www.prelude-siem.org/pkg/src/${PV}/${P}.tar.gz" + +LICENSE="GPL-2+" +SLOT="0" +KEYWORDS="~amd64 ~x86" + +RDEPEND="~net-analyzer/prelude-lml-${PV}" + +DEPEND="${RDEPEND}" + +src_install() { + insinto "/etc/prelude-lml/ruleset" + doins ruleset/*.rules +} diff --git a/net-analyzer/prelude-lml/Manifest b/net-analyzer/prelude-lml/Manifest new file mode 100644 index 000000000000..1bd2d6c0705f --- /dev/null +++ b/net-analyzer/prelude-lml/Manifest @@ -0,0 +1,4 @@ +DIST prelude-lml-3.0.0.tar.gz 1391203 BLAKE2B b3e4bfab596f869919c70dd7d2c3860bba33754970eff9b1a8c238f35cafec67601548985bd36244740062455a19fc816cbd7eb50bc6a3c4c97cf9da5b288dd3 SHA512 f206407f99df394186466566608b434a94d4fdce3e5e8991a4236f2ee670f6ae2573adea22bc248fdfea760588e94160faa7260257aeaeb35c938e1bb886ee6c +DIST prelude-lml-4.0.0.tar.gz 1435446 BLAKE2B 03231bfe4763bfbbc3256075f832a99f83c8e26221412f6b07ab7464d4d46b6abdad6dccdd3379927dbf05cfe808b31df57398f48bd794a311ced19f6e7fac67 SHA512 e2ae3a754f722b19110a32ae9ab7d0d9ce5ceb256c04a2b56f6549802d605cfa741cef4687c8883b585a0dd59f3507ee2d1275f4eb05050d10d24ad068522ef8 +DIST prelude-lml-4.1.0.tar.gz 1457294 BLAKE2B ec57e0e1d9048918c838965444888e80ee320882057dd3972c5da68402ca2443363dc26efc86e89916b1bc4e25d32c36aeac350ddf4aafb4598e8b3704e4f6e7 SHA512 e34d542e3b9e12873f9e2a19e2573b32e2b686574cbc8678cefbb198d7397695f8a2512effb58be9e6703663158c2294d741e0f6f8db23c5541e58bdd3c7f035 +DIST prelude-lml-5.1.0.tar.gz 1585080 BLAKE2B 572a3bf2b013dc3f427f7e3a4cc650219945a0e481e10f9f8f8e6afac75c86db5319fd16f1bf9157ede55ae511ce5151a0fe63694d0b8cc2becbd6430521fba3 SHA512 248434352c340d9979051897190fc7fbe835c7b1f2411ec98a04cbf0bebb6f115e80ca854d35ab2b2f50722c052eea10e088e4557ca4218f0dfed21ae21109ae diff --git a/net-analyzer/prelude-lml/files/prelude-lml-3.0.0-conf.patch b/net-analyzer/prelude-lml/files/prelude-lml-3.0.0-conf.patch new file mode 100644 index 000000000000..dab4ea8a6bb1 --- /dev/null +++ b/net-analyzer/prelude-lml/files/prelude-lml-3.0.0-conf.patch @@ -0,0 +1,22 @@ +--- a/prelude-lml.conf ++++ b/prelude-lml.conf +@@ -92,7 +92,7 @@ + time-format = "%b %d %H:%M:%S" + prefix-regex = "^(?P<timestamp>.{15}) (?P<hostname>\S+) (?:(?P<process>\S+?)(?:\[(?P<pid>[0-9]+)\])?: )?" + file = /var/log/messages +-file = /var/log/secure ++file = /var/log/auth.log + # udp-server = 0.0.0.0 + # tcp-server = 0.0.0.0 + # tcp-tls-server = 0.0.0.0 +--- a/prelude-lml.conf.in ++++ b/prelude-lml.conf.in +@@ -92,7 +92,7 @@ + time-format = "%b %d %H:%M:%S" + prefix-regex = "^(?P<timestamp>.{15}) (?P<hostname>\S+) (?:(?P<process>\S+?)(?:\[(?P<pid>[0-9]+)\])?: )?" + file = /var/log/messages +-file = /var/log/secure ++file = /var/log/auth.log + # udp-server = 0.0.0.0 + # tcp-server = 0.0.0.0 + # tcp-tls-server = 0.0.0.0 diff --git a/net-analyzer/prelude-lml/files/prelude-lml-3.0.0-configure.patch b/net-analyzer/prelude-lml/files/prelude-lml-3.0.0-configure.patch new file mode 100644 index 000000000000..154a261eb5ad --- /dev/null +++ b/net-analyzer/prelude-lml/files/prelude-lml-3.0.0-configure.patch @@ -0,0 +1,35 @@ +--- a/configure.in ++++ b/configure.in +@@ -107,10 +107,13 @@ + dnl ************************************************** + GNUTLS_MIN_VERSION=1.0.17 + +-PKG_CHECK_MODULES([LIBGNUTLS], [gnutls >= $GNUTLS_MIN_VERSION], [], +- [AM_PATH_LIBGNUTLS($GNUTLS_MIN_VERSION, enable_gnutls=yes, enable_gnutls=no)]) +- +-AC_CHECK_HEADER(gnutls/gnutls.h, enable_gnutls=yes, enable_gnutls=no) ++AC_ARG_ENABLE(gnutls, AC_HELP_STRING(--enable-gnutls, Define whether GnuTLS provides gnutls_hash_get_len function), , enable_gnutls="yes") ++if test x$enable_gnutls = xyes; then ++ PKG_CHECK_MODULES([LIBGNUTLS], [gnutls >= $GNUTLS_MIN_VERSION], [], ++ [AM_PATH_LIBGNUTLS($GNUTLS_MIN_VERSION, enable_gnutls=yes, enable_gnutls=no)]) ++ ++ AC_CHECK_HEADER(gnutls/gnutls.h, enable_gnutls=yes, enable_gnutls=no) ++fi + + if test x$enable_gnutls = xyes; then + AC_DEFINE_UNQUOTED(HAVE_GNUTLS, , Tell whether GnuTLS is available for TCP-TLS support) +@@ -125,8 +128,12 @@ + dnl * Check for libICU * + dnl ************************************************** + +-PKG_CHECK_MODULES([ICU], [icu >= 3.0], [enable_icu=yes], +- [AC_CHECK_ICU(3.8, enable_icu=yes, enable_icu=no)]) ++AC_ARG_ENABLE(icu, AC_HELP_STRING(--enable-icu, Tell whether libicu is available for encoding convertion), , enable_icu="yes") ++ ++if test x$enable_icu = xyes; then ++ PKG_CHECK_MODULES([ICU], [icu >= 3.0], [enable_icu=yes], ++ [AC_CHECK_ICU(3.8, enable_icu=yes, enable_icu=no)]) ++fi + if test x$enable_icu = xyes; then + AC_DEFINE_UNQUOTED(HAVE_LIBICU, , Tell whether libicu is available for encoding convertion) + fi diff --git a/net-analyzer/prelude-lml/files/prelude-lml-3.0.0-run.patch b/net-analyzer/prelude-lml/files/prelude-lml-3.0.0-run.patch new file mode 100644 index 000000000000..8b4e65216cca --- /dev/null +++ b/net-analyzer/prelude-lml/files/prelude-lml-3.0.0-run.patch @@ -0,0 +1,14 @@ +--- a/configure.in ++++ b/configure.in +@@ -187,9 +187,9 @@ + configdir=$SYSCONFDIR/prelude-lml + prelude_lml_conf=$configdir/prelude-lml.conf + regex_conf=$configdir/plugins.rules +-metadata_dir=$LOCALSTATEDIR/lib/prelude-lml ++metadata_dir=$LOCALSTATEDIR/prelude-lml + plugindir=$LIBDIR/prelude-lml +-lml_run_dir=$LOCALSTATEDIR/run/prelude-lml ++lml_run_dir=/run/prelude-lml + + AC_DEFINE_UNQUOTED(PRELUDE_LML_CONF, "$prelude_lml_conf", Path to the LML configuration file) + AC_DEFINE_UNQUOTED(LOG_PLUGIN_DIR, "$plugindir", Prelude-LML report plugin directory) diff --git a/net-analyzer/prelude-lml/files/prelude-lml-3.1.0-run.patch b/net-analyzer/prelude-lml/files/prelude-lml-3.1.0-run.patch new file mode 100644 index 000000000000..a9eba7760d36 --- /dev/null +++ b/net-analyzer/prelude-lml/files/prelude-lml-3.1.0-run.patch @@ -0,0 +1,14 @@ +--- a/configure.ac ++++ b/configure.ac +@@ -209,9 +209,9 @@ + configdir=$SYSCONFDIR/prelude-lml + prelude_lml_conf=$configdir/prelude-lml.conf + regex_conf=$configdir/plugins.rules +-metadata_dir=$LOCALSTATEDIR/lib/prelude-lml ++metadata_dir=$LOCALSTATEDIR/prelude-lml + plugindir=$LIBDIR/prelude-lml +-lml_run_dir=$LOCALSTATEDIR/run/prelude-lml ++lml_run_dir=/run/prelude-lml + + AC_DEFINE_UNQUOTED(PRELUDE_LML_CONF, "$prelude_lml_conf", Path to the LML configuration file) + AC_DEFINE_UNQUOTED(LOG_PLUGIN_DIR, "$plugindir", Prelude-LML report plugin directory) diff --git a/net-analyzer/prelude-lml/files/prelude-lml.initd b/net-analyzer/prelude-lml/files/prelude-lml.initd new file mode 100644 index 000000000000..0e1dd2e0f4fc --- /dev/null +++ b/net-analyzer/prelude-lml/files/prelude-lml.initd @@ -0,0 +1,26 @@ +#!/sbin/openrc-run +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +BIN_LML=/usr/bin/prelude-lml +PID_LML=/run/prelude-lml/prelude-lml.pid + +depend() { + need net + after prelude-manager +} + +start() { + ebegin "Starting prelude-lml" + checkpath -d -m 0755 -o root:root /run/prelude-lml + start-stop-daemon --start --exec $BIN_LML \ + --pidfile $PID_LML -- -d -P $PID_LML + eend $? +} + +stop() { + ebegin "Stopping prelude-lml" + start-stop-daemon --stop --exec $BIN_LML \ + --pidfile $PID_LML + eend $? +} diff --git a/net-analyzer/prelude-lml/files/prelude-lml.run b/net-analyzer/prelude-lml/files/prelude-lml.run new file mode 100644 index 000000000000..75f2ef89adda --- /dev/null +++ b/net-analyzer/prelude-lml/files/prelude-lml.run @@ -0,0 +1,4 @@ +# Configuration to create /run/prelude-lml directory +# Used as part of systemd's tmpfiles + +d /run/prelude-lml 0755 root root diff --git a/net-analyzer/prelude-lml/files/prelude-lml.service b/net-analyzer/prelude-lml/files/prelude-lml.service new file mode 100644 index 000000000000..9d9230c6ff4c --- /dev/null +++ b/net-analyzer/prelude-lml/files/prelude-lml.service @@ -0,0 +1,13 @@ +[Unit] +Description=Prelude-LML service +DefaultDependencies=no +After=remote_fs.target prelude-manager.service + +[Service] +ExecStart=/usr/bin/prelude-lml -d -P /run/prelude-lml/prelude-lml.pid +Type=forking +PIDFile=/run/prelude-lml/prelude-lml.pid +Restart=always + +[Install] +WantedBy=multi-user.target diff --git a/net-analyzer/prelude-lml/metadata.xml b/net-analyzer/prelude-lml/metadata.xml new file mode 100644 index 000000000000..6dd8cb17c944 --- /dev/null +++ b/net-analyzer/prelude-lml/metadata.xml @@ -0,0 +1,24 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>thomas.andrejak@gmail.com</email> + <name>Thomas Andrejak</name> + </maintainer> + <maintainer type="project"> + <email>proxy-maint@gentoo.org</email> + <name>Proxy Maintainers</name> + </maintainer> + <longdescription lang="en"> + Prelude-LML is a log analyser that allows Prelude to collect and + analyze information from all kind of applications emitting logs or + syslog messages in order to detect suspicious activities and transform + them into Prelude-IDMEF alerts. Prelude-LML handles events generated + by a large set of applications + </longdescription> + <use> + <flag name="tls">Enables Prelude LML support Syslog through TLS + using <pkg>net-libs/gnutls</pkg>.</flag> + </use> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/prelude-lml/prelude-lml-3.0.0.ebuild b/net-analyzer/prelude-lml/prelude-lml-3.0.0.ebuild new file mode 100644 index 000000000000..d382e0286b29 --- /dev/null +++ b/net-analyzer/prelude-lml/prelude-lml-3.0.0.ebuild @@ -0,0 +1,58 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +inherit autotools eutils ltprune systemd + +DESCRIPTION="The prelude log analyzer" +HOMEPAGE="https://www.prelude-siem.org" +SRC_URI="https://www.prelude-siem.org/pkg/src/3.0.0/${P}.tar.gz" + +LICENSE="GPL-2+" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="tls icu" + +RDEPEND="dev-libs/libprelude + dev-libs/libpcre + icu? ( dev-libs/icu ) + tls? ( net-libs/gnutls )" + +DEPEND="${RDEPEND} + virtual/pkgconfig" + +PATCHES=( + "${FILESDIR}/${P}-configure.patch" + "${FILESDIR}/${P}-conf.patch" + "${FILESDIR}/${P}-run.patch" +) + +src_prepare() { + default_src_prepare + + mv "${S}/configure.in" "${S}/configure.ac" || die "mv failed" + + eautoreconf +} + +src_configure() { + econf \ + --localstatedir=/var \ + $(use_enable icu) \ + $(use_enable tls gnutls) +} + +src_install() { + default_src_install + + rm -rv "${D}/run" || die "rm failed" + keepdir /var/${PN} + + prune_libtool_files --modules + + systemd_dounit "${FILESDIR}/${PN}.service" + systemd_newtmpfilesd "${FILESDIR}/${PN}.run" "${PN}.conf" + + newinitd "${FILESDIR}/${PN}.initd" "${PN}" +} diff --git a/net-analyzer/prelude-lml/prelude-lml-4.0.0.ebuild b/net-analyzer/prelude-lml/prelude-lml-4.0.0.ebuild new file mode 100644 index 000000000000..89563e4bb103 --- /dev/null +++ b/net-analyzer/prelude-lml/prelude-lml-4.0.0.ebuild @@ -0,0 +1,53 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +inherit autotools systemd + +DESCRIPTION="The prelude log analyzer" +HOMEPAGE="https://www.prelude-siem.org" +SRC_URI="https://www.prelude-siem.org/pkg/src/${PV}/${P}.tar.gz" + +LICENSE="GPL-2+" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="icu ssl" + +RDEPEND="~dev-libs/libprelude-${PV} + dev-libs/libpcre + icu? ( dev-libs/icu ) + ssl? ( net-libs/gnutls:= )" + +DEPEND="${RDEPEND} + virtual/pkgconfig" + +PATCHES=( + "${FILESDIR}/${PN}-3.1.0-run.patch" +) + +src_prepare() { + default + + eautoreconf +} + +src_configure() { + econf \ + --localstatedir="${EPREFIX}/var" \ + $(use_with ssl libgnutls-prefix) +} + +src_install() { + default + + rm -rv "${ED%/}/run" || die "rm failed" + keepdir /var/${PN} + + find "${D}" -name '*.la' -delete || die + + systemd_dounit "${FILESDIR}/${PN}.service" + systemd_newtmpfilesd "${FILESDIR}/${PN}.run" "${PN}.conf" + + newinitd "${FILESDIR}/${PN}.initd" "${PN}" +} diff --git a/net-analyzer/prelude-lml/prelude-lml-4.1.0.ebuild b/net-analyzer/prelude-lml/prelude-lml-4.1.0.ebuild new file mode 100644 index 000000000000..754a0268b461 --- /dev/null +++ b/net-analyzer/prelude-lml/prelude-lml-4.1.0.ebuild @@ -0,0 +1,57 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +inherit autotools systemd + +DESCRIPTION="The prelude log analyzer" +HOMEPAGE="https://www.prelude-siem.org" +SRC_URI="https://www.prelude-siem.org/pkg/src/${PV}/${P}.tar.gz" + +LICENSE="GPL-2+" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="icu ssl" + +RDEPEND="~dev-libs/libprelude-${PV} + dev-libs/libpcre + icu? ( dev-libs/icu:= ) + ssl? ( net-libs/gnutls:= )" + +DEPEND="${RDEPEND} + virtual/pkgconfig" + +PATCHES=( + "${FILESDIR}/${PN}-3.1.0-run.patch" + "${FILESDIR}/${PN}-3.0.0-conf.patch" +) + +src_prepare() { + default + + eautoreconf +} + +src_configure() { + local myconf=( + --localstatedir="${EPREFIX}/var" + $(use_with ssl libgnutls-prefix) + ) + + econf "${myconf[@]}" +} + +src_install() { + default + + rm -rv "${ED%/}/run" || die "rm failed" + keepdir /var/${PN} + + find "${D}" -name '*.la' -delete || die + + systemd_dounit "${FILESDIR}/${PN}.service" + systemd_newtmpfilesd "${FILESDIR}/${PN}.run" "${PN}.conf" + + newinitd "${FILESDIR}/${PN}.initd" "${PN}" +} diff --git a/net-analyzer/prelude-lml/prelude-lml-5.1.0.ebuild b/net-analyzer/prelude-lml/prelude-lml-5.1.0.ebuild new file mode 100644 index 000000000000..2d2d40b4db58 --- /dev/null +++ b/net-analyzer/prelude-lml/prelude-lml-5.1.0.ebuild @@ -0,0 +1,59 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit autotools systemd + +DESCRIPTION="The prelude log analyzer" +HOMEPAGE="https://www.prelude-siem.org" +SRC_URI="https://www.prelude-siem.org/pkg/src/${PV}/${P}.tar.gz" + +LICENSE="GPL-2+" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="icu ssl" + +RDEPEND="dev-libs/libpcre + >=dev-libs/libprelude-5.1.0 + <dev-libs/libprelude-6 + icu? ( dev-libs/icu:= ) + ssl? ( net-libs/gnutls:= )" + +DEPEND="${RDEPEND}" + +BDEPEND="virtual/pkgconfig" + +PATCHES=( + "${FILESDIR}/${PN}-3.1.0-run.patch" + "${FILESDIR}/${PN}-3.0.0-conf.patch" +) + +src_prepare() { + default + + eautoreconf +} + +src_configure() { + local myconf=( + --localstatedir="${EPREFIX}/var" + $(use_with ssl libgnutls-prefix) + ) + + econf "${myconf[@]}" +} + +src_install() { + default + + rm -rv "${ED}/run" || die "rm failed" + keepdir /var/${PN} + + find "${D}" -name '*.la' -delete || die + + systemd_dounit "${FILESDIR}/${PN}.service" + systemd_newtmpfilesd "${FILESDIR}/${PN}.run" "${PN}.conf" + + newinitd "${FILESDIR}/${PN}.initd" "${PN}" +} diff --git a/net-analyzer/prettyping/Manifest b/net-analyzer/prettyping/Manifest new file mode 100644 index 000000000000..5dcbbe05c59e --- /dev/null +++ b/net-analyzer/prettyping/Manifest @@ -0,0 +1 @@ +DIST prettyping-1.0.1.tar.gz 10104 BLAKE2B 41158972fa41fcfaf078fd8fa4b9af10e2d3e65d547f81f0a6daf826f0a1c725de97e14dc597624d2c9281492d94c4b5cf7e6f40e9743aea0792ece0f84211fc SHA512 967626f11cd58fd9a0ce91a320caf6b6a296681ed809e04188f0cfe00d03c80a3620bf4d3ec86e855be363810763ff3ccd8bb0a959d03e62b31edba2cfae7f79 diff --git a/net-analyzer/prettyping/metadata.xml b/net-analyzer/prettyping/metadata.xml new file mode 100644 index 000000000000..a7511f81914f --- /dev/null +++ b/net-analyzer/prettyping/metadata.xml @@ -0,0 +1,21 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>gentoo@seichter.de</email> + <name>Ralph Seichter</name> + </maintainer> + <maintainer type="project"> + <email>proxy-maint@gentoo.org</email> + <name>Proxy Maintainers</name> + </maintainer> + <longdescription> + 'prettyping' is a wrapper around the standard 'ping' tool, + making the output prettier, more colorful, more compact, + and easier to read. + </longdescription> + <upstream> + <remote-id type="github">denilsonsa/prettyping</remote-id> + </upstream> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/prettyping/prettyping-1.0.1.ebuild b/net-analyzer/prettyping/prettyping-1.0.1.ebuild new file mode 100644 index 000000000000..54c2c36beb32 --- /dev/null +++ b/net-analyzer/prettyping/prettyping-1.0.1.ebuild @@ -0,0 +1,20 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +DESCRIPTION="Ping wrapper that produces coloured, easily readable output." +HOMEPAGE="http://denilson.sa.nom.br/prettyping/" +SRC_URI="https://github.com/denilsonsa/prettyping/archive/v${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="MIT" +SLOT="0" +KEYWORDS="amd64" + +RDEPEND="app-shells/bash + net-misc/iputils + virtual/awk" + +src_install() { + dobin prettyping +} diff --git a/net-analyzer/pypacker/Manifest b/net-analyzer/pypacker/Manifest new file mode 100644 index 000000000000..9447b134219d --- /dev/null +++ b/net-analyzer/pypacker/Manifest @@ -0,0 +1,5 @@ +DIST pypacker-2.9.tar.gz 276080 BLAKE2B 3bab4b4c7879fea10accbd3fb2bcb4a8e27096a29240f6b8e4e06c3486ee0cb2b8fa1e83674dee759fafc85c2e182cb75e836c00dfe28c83c0bb2cecaed758cd SHA512 b7ca61948a55a37661fa402ebc5a9c2be456e8df14d1ee091a50ccd1362c7a7fa9224e1ae2b8ee8057f302ee9e0c61c06d07b627dde92947f8d22158ef3623b8 +DIST pypacker-4.6.tar.gz 592362 BLAKE2B 41fc63f1fc40ab1cfc007db9dfc6d18cedb51cc8525dc2b467bc03babe03c49f9f0771b8146aacf80f74c511619da85e1f7d56667bcda350710e4c0bafb89351 SHA512 c55205b35f653903149517aad0e2d055745edd6c1a28b1b49aeaa435ca327693b20ed6f851011fa80df1fcc5281ac8b92fbffa3b1381cb3d4507ef7d45d49545 +DIST pypacker-4.7.tar.gz 595975 BLAKE2B 95f29bf88347df5c4673a225049337c053cc4833a13767a3fce700a911fb7b744a61ea745f3d3ac4a14cc93288504e190c9cda228000b8a41b924b23805efcf3 SHA512 9c874af28887e942f62a7f540961f7e31af3b35e52f960ec99ed53e6a5ea29d36f20a6dbcf652125ac6b72849502a30e5d11ee1f795c90c7efd5702a0d34b2b3 +DIST pypacker-4.8.tar.gz 600508 BLAKE2B e9cdf07ed7d92aecad24e2bea9d18f67eca4477bccc273d77b82701f3110b7b71db5f35bc29ee45d33ac8ba02e8c8d1d36b31e326f21a443f6fc2b2375678330 SHA512 729a55e745f645b874bc6a868afcff543a26aae74b5241204c8e7103f754c296204c43b9db5b64b4a3423f735e2c658e9f0d97f7c84f0f8b134b29c5a2e55227 +DIST pypacker-4.9.tar.gz 602068 BLAKE2B 1ddc16e361ba0aa57b4dab62c38c37aabeffe2cab5cb819e627aeaac5452201117c2f806f2f443cad96d673f93bf0f0a159fa6a7d59564879d038524a2de1eb1 SHA512 804bb32eda76a00121c88d38722a6fb51a9fcff0a5625bd46bda68329e39139624c4fb8e2736208733a6b97ec0df02f173d304fcf3bb39549f3fa119fcf0ae2f diff --git a/net-analyzer/pypacker/metadata.xml b/net-analyzer/pypacker/metadata.xml new file mode 100644 index 000000000000..91c053305c50 --- /dev/null +++ b/net-analyzer/pypacker/metadata.xml @@ -0,0 +1,16 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>netmon@gentoo.org</email> + <name>Gentoo network monitoring and analysis project</name> + </maintainer> + <upstream> + <remote-id type="github">mike01/pypacker</remote-id> + <maintainer> + <email>michael.stahn.42@googlemail.com</email> + <name>Michael Stahn</name> + </maintainer> + </upstream> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/pypacker/pypacker-2.9.ebuild b/net-analyzer/pypacker/pypacker-2.9.ebuild new file mode 100644 index 000000000000..67f90fa81e25 --- /dev/null +++ b/net-analyzer/pypacker/pypacker-2.9.ebuild @@ -0,0 +1,30 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +PYTHON_COMPAT=( python3_6 ) + +inherit distutils-r1 vcs-snapshot + +DESCRIPTION="Fast and simple packet creation and parsing library for Python" +HOMEPAGE="https://github.com/mike01/pypacker" +SRC_URI="https://github.com/mike01/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="examples" + +DEPEND="dev-python/setuptools[${PYTHON_USEDEP}]" + +DOCS=( AUTHORS CHANGES HACKING README.md ) + +python_test() { + "${PYTHON}" tests/test_pypacker.py || die +} + +python_install_all() { + distutils-r1_python_install_all + use examples && dodoc -r examples +} diff --git a/net-analyzer/pypacker/pypacker-4.6.ebuild b/net-analyzer/pypacker/pypacker-4.6.ebuild new file mode 100644 index 000000000000..4b7d4924659f --- /dev/null +++ b/net-analyzer/pypacker/pypacker-4.6.ebuild @@ -0,0 +1,30 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +PYTHON_COMPAT=( python3_6 ) + +inherit distutils-r1 vcs-snapshot + +DESCRIPTION="Fast and simple packet creation and parsing library for Python" +HOMEPAGE="https://gitlab.com/mike01/pypacker" +SRC_URI="https://gitlab.com/mike01/pypacker/-/archive/v${PV}/pypacker-v${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="examples" + +DEPEND="dev-python/setuptools[${PYTHON_USEDEP}]" + +DOCS=( AUTHORS CHANGES HACKING README.md ) + +python_test() { + "${PYTHON}" tests/test_pypacker.py || die +} + +python_install_all() { + distutils-r1_python_install_all + use examples && dodoc -r examples +} diff --git a/net-analyzer/pypacker/pypacker-4.7.ebuild b/net-analyzer/pypacker/pypacker-4.7.ebuild new file mode 100644 index 000000000000..50dc293e909b --- /dev/null +++ b/net-analyzer/pypacker/pypacker-4.7.ebuild @@ -0,0 +1,28 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 +PYTHON_COMPAT=( python3_{6,7} ) +inherit distutils-r1 vcs-snapshot + +DESCRIPTION="Fast and simple packet creation and parsing library for Python" +HOMEPAGE="https://gitlab.com/mike01/pypacker" +SRC_URI="https://gitlab.com/mike01/pypacker/-/archive/v${PV}/pypacker-v${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="examples" + +DEPEND="dev-python/setuptools[${PYTHON_USEDEP}]" + +DOCS=( AUTHORS CHANGES HACKING README.md ) + +python_test() { + "${EPYTHON}" tests/test_pypacker.py || die +} + +python_install_all() { + distutils-r1_python_install_all + use examples && dodoc -r examples +} diff --git a/net-analyzer/pypacker/pypacker-4.8.ebuild b/net-analyzer/pypacker/pypacker-4.8.ebuild new file mode 100644 index 000000000000..f10389269bce --- /dev/null +++ b/net-analyzer/pypacker/pypacker-4.8.ebuild @@ -0,0 +1,27 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +PYTHON_COMPAT=( python3_{6,7} ) +inherit distutils-r1 vcs-snapshot + +DESCRIPTION="Fast and simple packet creation and parsing library for Python" +HOMEPAGE="https://gitlab.com/mike01/pypacker" +SRC_URI="https://gitlab.com/mike01/pypacker/-/archive/v${PV}/pypacker-v${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="examples" + +DEPEND="dev-python/setuptools[${PYTHON_USEDEP}]" +DOCS=( AUTHORS CHANGES HACKING README.md ) + +python_test() { + "${EPYTHON}" tests/test_pypacker.py || die +} + +python_install_all() { + distutils-r1_python_install_all + use examples && dodoc -r examples +} diff --git a/net-analyzer/pypacker/pypacker-4.9.ebuild b/net-analyzer/pypacker/pypacker-4.9.ebuild new file mode 100644 index 000000000000..f10389269bce --- /dev/null +++ b/net-analyzer/pypacker/pypacker-4.9.ebuild @@ -0,0 +1,27 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +PYTHON_COMPAT=( python3_{6,7} ) +inherit distutils-r1 vcs-snapshot + +DESCRIPTION="Fast and simple packet creation and parsing library for Python" +HOMEPAGE="https://gitlab.com/mike01/pypacker" +SRC_URI="https://gitlab.com/mike01/pypacker/-/archive/v${PV}/pypacker-v${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="examples" + +DEPEND="dev-python/setuptools[${PYTHON_USEDEP}]" +DOCS=( AUTHORS CHANGES HACKING README.md ) + +python_test() { + "${EPYTHON}" tests/test_pypacker.py || die +} + +python_install_all() { + distutils-r1_python_install_all + use examples && dodoc -r examples +} diff --git a/net-analyzer/python-gvm/Manifest b/net-analyzer/python-gvm/Manifest new file mode 100644 index 000000000000..3dfcb652f5f4 --- /dev/null +++ b/net-analyzer/python-gvm/Manifest @@ -0,0 +1,2 @@ +DIST python-gvm-1.1.0.tar.gz 160289 BLAKE2B 64dbf79f6749c50cddc2b908c45c6aea6c3793f0ddb10a98a96870636ee351f1a2e66227fbcc1383c63e0e015b4c05bf4c116ac80ef35f73f7e9057f9c8dd9b5 SHA512 dae04d42a14adde274c2148f7bd4b47b0ea02d6e249d6c23dfeb15f217f04ad9ff722f2e98d13e1a7add7b61d9dabfec623ab5b45087aaf5f480447fd31a8071 +DIST python-gvm-1.2.0.tar.gz 160700 BLAKE2B 40ef2d6e01dee7a93796c5d2f29db06e2a533860f7c612000ad5250d9b291ce90164e3a7c65c77f7131fc12c4622094b22da4eeb989293ad1b33e2754063ec76 SHA512 3eacec521bbd4cbfaec08d1ccabfe1c97898288b8b56779f9e3ceb734f52d78b93faf92674c1eefc555501e0bfdb16ed26316e87c697bbdc5a673d1be2170c00 diff --git a/net-analyzer/python-gvm/metadata.xml b/net-analyzer/python-gvm/metadata.xml new file mode 100644 index 000000000000..cf64b64d0029 --- /dev/null +++ b/net-analyzer/python-gvm/metadata.xml @@ -0,0 +1,22 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>jonas.licht@gmail.com</email> + <name>Jonas Licht</name> + </maintainer> + <maintainer type="project"> + <email>proxy-maint@gentoo.org</email> + <name>Proxy Maintainers</name> + </maintainer> + <longdescription lang="en"> + The Greenbone Vulnerability Management Python API library (python-gvm) is a collection of + APIs that help with remote controlling a Greenbone Security Manager (GSM) appliance and its + underlying Greenbone Vulnerability Manager (GVM). The library essentially abstracts accessing + the communication protocols Greenbone Management Protocol (GMP) and Open Scanner Protocol (OSP). + </longdescription> + <upstream> + <remote-id type="github">greenbone/python-gvm</remote-id> + </upstream> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/python-gvm/python-gvm-1.1.0.ebuild b/net-analyzer/python-gvm/python-gvm-1.1.0.ebuild new file mode 100644 index 000000000000..9a52388287f5 --- /dev/null +++ b/net-analyzer/python-gvm/python-gvm-1.1.0.ebuild @@ -0,0 +1,34 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +PYTHON_COMPAT=( python3_{6,7} ) +inherit distutils-r1 + +DESCRIPTION="Greenbone Vulnerability Management Python Library" +HOMEPAGE="https://www.greenbone.net/en/" +SRC_URI="https://github.com/greenbone/python-gvm/archive/v${PV}.tar.gz -> ${P}.tar.gz" + +SLOT="0" +LICENSE="GPL-3" +KEYWORDS="~amd64 ~x86" +IUSE="" + +RDEPEND=" + dev-python/defusedxml[${PYTHON_USEDEP}] + dev-python/lxml[${PYTHON_USEDEP}] + dev-python/paramiko[${PYTHON_USEDEP}]" + +DEPEND=" + ${RDEPEND}" + +distutils_enable_tests unittest + +src_prepare() { + distutils-r1_python_prepare_all + # Exlude tests & docs to fix build issue + sed \ + -e "s/packages=find_packages(exclude=.*/packages=find_packages(exclude=['tests*', 'docs']),/g" \ + -i "$S"/setup.py || die +} diff --git a/net-analyzer/python-gvm/python-gvm-1.2.0.ebuild b/net-analyzer/python-gvm/python-gvm-1.2.0.ebuild new file mode 100644 index 000000000000..8643fbe95e03 --- /dev/null +++ b/net-analyzer/python-gvm/python-gvm-1.2.0.ebuild @@ -0,0 +1,34 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +PYTHON_COMPAT=( python3_{6,7,8} ) +inherit distutils-r1 + +DESCRIPTION="Greenbone Vulnerability Management Python Library" +HOMEPAGE="https://www.greenbone.net/en/" +SRC_URI="https://github.com/greenbone/python-gvm/archive/v${PV}.tar.gz -> ${P}.tar.gz" + +SLOT="0" +LICENSE="GPL-3" +KEYWORDS="~amd64 ~x86" +IUSE="" + +RDEPEND=" + dev-python/defusedxml[${PYTHON_USEDEP}] + dev-python/lxml[${PYTHON_USEDEP}] + dev-python/paramiko[${PYTHON_USEDEP}]" + +DEPEND=" + ${RDEPEND}" + +distutils_enable_tests unittest + +src_prepare() { + distutils-r1_python_prepare_all + # Exlude tests & docs to fix build issue + sed \ + -e "s/packages=find_packages(exclude=.*/packages=find_packages(exclude=['tests*', 'docs']),/g" \ + -i "$S"/setup.py || die +} diff --git a/net-analyzer/quidscor/Manifest b/net-analyzer/quidscor/Manifest new file mode 100644 index 000000000000..10c96375f852 --- /dev/null +++ b/net-analyzer/quidscor/Manifest @@ -0,0 +1 @@ +DIST quidscor-1.2.48-src.tar.gz 77843 BLAKE2B 4f9feffb67acc8f32c4f922ce882a0799549ecce8e439dffeee5d0e4ec967739646a0ee4912a189e99c9f39743a74ae1f5528050daa82689f35ba498b2bad87f SHA512 8272a1a4ed406d3429f0438dabddd15092be0a33a8fce3c5b0af0ae13422c8918f1a5971b2c2ea639fb87ffdeb1bc89085f07f89856e732f0b270b57eabb7010 diff --git a/net-analyzer/quidscor/files/quidscor-1.2.48-curl-types.h.patch b/net-analyzer/quidscor/files/quidscor-1.2.48-curl-types.h.patch new file mode 100644 index 000000000000..5f1e035c81d6 --- /dev/null +++ b/net-analyzer/quidscor/files/quidscor-1.2.48-curl-types.h.patch @@ -0,0 +1,10 @@ +--- a/libqg/libqg.h ++++ b/libqg/libqg.h +@@ -38,7 +38,6 @@ + #include <arpa/inet.h> + #include <dirent.h> + #include <curl/curl.h> +-#include <curl/types.h> + #include <string.h> + #include <strings.h> + #include <libxml/xmlmemory.h> diff --git a/net-analyzer/quidscor/files/quidscor-1.2.48-paths.patch b/net-analyzer/quidscor/files/quidscor-1.2.48-paths.patch new file mode 100644 index 000000000000..6168720cbdf4 --- /dev/null +++ b/net-analyzer/quidscor/files/quidscor-1.2.48-paths.patch @@ -0,0 +1,37 @@ +--- a/quidscor.conf ++++ b/quidscor.conf +@@ -15,9 +15,9 @@ + # Logdir: directory + LOGDIR /var/log/quidscor/ + # Cachedir: directory +-CACHEDIR /var/run/quidscor/cache/ ++CACHEDIR /var/lib/quidscor + # Rulesdir: directory where .rules (for snort) live (.lib for dragon) +-RULESDIR /usr/local/etc/snort-rules ++RULESDIR /etc/snort/rules + # Expiretime: time_in_seconds + EXPIRETIME 86400 + # File for custom mapping (must be absolute path) +--- a/quidscor.h ++++ b/quidscor.h +@@ -85,7 +85,7 @@ + #define AL_UNVER "alerts_unknown.log" + + // Directories +-#define CACHE_DIR "run/quidscor/cache/" ++#define CACHE_DIR "/lib/quidscor" + #define LOG_DIR "log/quidscor/" + #define CREATE_MOD 0700 + #define MOD_PID 0640 +--- a/Makefile ++++ b/Makefile +@@ -84,8 +84,7 @@ + + install: + install -d -m 0700 $(IVARPREFIX)/log/$(PNAME)/ +- install -d -m 0700 $(IVARPREFIX)/run/$(PNAME)/ +- install -d -m 0700 $(IVARPREFIX)/run/$(PNAME)/cache/ ++ install -d -m 0700 $(IVARPREFIX)/lib/$(PNAME)/ + install -d -m 0755 $(IPREFIX)/sbin/ + install -m 0755 $(PNAME) $(IPREFIX)/sbin/$(PNAME) + install -d -m 0755 $(IPREFIX)/etc/ diff --git a/net-analyzer/quidscor/files/quidscor-1.2.48-strip.patch b/net-analyzer/quidscor/files/quidscor-1.2.48-strip.patch new file mode 100644 index 000000000000..9d169e619c0b --- /dev/null +++ b/net-analyzer/quidscor/files/quidscor-1.2.48-strip.patch @@ -0,0 +1,10 @@ +--- a/Makefile ++++ b/Makefile +@@ -69,7 +69,6 @@ + + $(PNAME): $(PNAME).debug + $(CP) $(PNAME).debug $@ +- $(STRIP) $@ + + $(PNAME).debug: libqg/libqg.a $(OFILES) Makefile + $(CC) $(LDFLAGS) $(CFLAGS) -o $@ $(OFILES) $(LIBS) diff --git a/net-analyzer/quidscor/metadata.xml b/net-analyzer/quidscor/metadata.xml new file mode 100644 index 000000000000..6e319dd9f290 --- /dev/null +++ b/net-analyzer/quidscor/metadata.xml @@ -0,0 +1,12 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>netmon@gentoo.org</email> + <name>Gentoo network monitoring and analysis project</name> + </maintainer> + <upstream> + <remote-id type="sourceforge">quidscor</remote-id> + </upstream> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/quidscor/quidscor-1.2.48-r1.ebuild b/net-analyzer/quidscor/quidscor-1.2.48-r1.ebuild new file mode 100644 index 000000000000..9c118b6762a3 --- /dev/null +++ b/net-analyzer/quidscor/quidscor-1.2.48-r1.ebuild @@ -0,0 +1,44 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 +inherit eutils toolchain-funcs + +DESCRIPTION="Qualys IDS Correlation Daemon" +HOMEPAGE="http://quidscor.sourceforge.net/" +SRC_URI="mirror://sourceforge/quidscor/${P}-src.tar.gz" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~ppc ~x86" + +DEPEND=" + >=dev-libs/libxml2-2.4 + >=net-misc/curl-7.10 + >=net-analyzer/snort-2.0 +" +RDEPEND="${DEPEND}" + +src_prepare() { + epatch \ + "${FILESDIR}"/${P}-curl-types.h.patch \ + "${FILESDIR}"/${P}-paths.patch \ + "${FILESDIR}"/${P}-strip.patch + + #yes, the fix below is as pathetic as it seems + echo "#define FALSE 0" >> libqg/libqg.h || die + echo "#define TRUE 1" >> libqg/libqg.h || die +} + +src_compile() { + emake EXTRA_CFLAGS="${CFLAGS}" CC="$(tc-getCC)" +} + +src_install() { + emake PREFIX=/usr STAGING_PREFIX="${D}" install + dodoc ChangeLog FAQ MANIFEST README TODO + # fix ugly install + cd "${D}"/usr || die + mv etc .. || die + rm -r doc || die +} diff --git a/net-analyzer/raddump/Manifest b/net-analyzer/raddump/Manifest new file mode 100644 index 000000000000..6911e995bb58 --- /dev/null +++ b/net-analyzer/raddump/Manifest @@ -0,0 +1 @@ +DIST raddump-0.3.1.tar.gz 175078 BLAKE2B b65bbf2200792c41ffe8363aaedc3e009fddc0b684f647352bba5011e84ab99c4741f9cf567e6a668c08ba7e4f8df144875379fbc7f1fff1a2217cdfbde1fde8 SHA512 35daf9c31fc21f29e713fa0f3e5c438f5762087060068506f6e0d829a0fabe74a99fdd1a35bf878aa0cbf5a5f0bec212b0af51b7c3df4e58ec0165b4dee023fa diff --git a/net-analyzer/raddump/metadata.xml b/net-analyzer/raddump/metadata.xml new file mode 100644 index 000000000000..c7f8764ec504 --- /dev/null +++ b/net-analyzer/raddump/metadata.xml @@ -0,0 +1,11 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>robbat2@gentoo.org</email> + </maintainer> + <upstream> + <remote-id type="sourceforge">raddump</remote-id> + </upstream> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/raddump/raddump-0.3.1.ebuild b/net-analyzer/raddump/raddump-0.3.1.ebuild new file mode 100644 index 000000000000..84b83371d881 --- /dev/null +++ b/net-analyzer/raddump/raddump-0.3.1.ebuild @@ -0,0 +1,23 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit autotools + +DESCRIPTION="RADIUS packet interpreter" +HOMEPAGE="https://sourceforge.net/projects/raddump/" +SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz" + +LICENSE="GPL-2+" +SLOT="0" +KEYWORDS="amd64 ~ppc x86" +IUSE="" + +RDEPEND=">=net-analyzer/tcpdump-3.8.3-r1" +DEPEND=${RDEPEND} + +src_prepare() { + default + eautoreconf +} diff --git a/net-analyzer/rain/Manifest b/net-analyzer/rain/Manifest new file mode 100644 index 000000000000..fb6052b81dc9 --- /dev/null +++ b/net-analyzer/rain/Manifest @@ -0,0 +1,2 @@ +DIST rain_1.2.9beta1-1.diff.gz 1828 BLAKE2B b50743f0eb141c2d07462a717cfd14d6671b1428869398f6220e13adf653df368adb6f421af6d584ab782ef0bd4244f237412ec02f6a16f25c31378eedcf6ebe SHA512 5e871fddbf475d8e73c88a3f7340199cdfae8f54446aced599be7658e0be2c6b7a7ef2626cd13dff577df5c81187fa07bc8ec3a7ab386752e4be321d9a372843 +DIST rain_1.2.9beta1.orig.tar.gz 79098 BLAKE2B cb9302bdf024df0e49a250b5ef5feed07c7dcaf0c734513177ac6161496d7df1fa7b5262a23730f83fe4a237f4108539911318a17cb604efbfe82b50b9ed3485 SHA512 5e61ac26872e453c6da9e600e3fb427425d2f79a7a5f569ab93308c0b0f4509b6a0d5b45b138f04b9f8bee7b16b8b63be28b7ede65a92f5d4a3384e73e12036d diff --git a/net-analyzer/rain/files/rain-1.2.9_beta1-die-on-error.patch b/net-analyzer/rain/files/rain-1.2.9_beta1-die-on-error.patch new file mode 100644 index 000000000000..ac73a0f5390e --- /dev/null +++ b/net-analyzer/rain/files/rain-1.2.9_beta1-die-on-error.patch @@ -0,0 +1,40 @@ +--- a/Makefile.in ++++ b/Makefile.in +@@ -15,22 +15,22 @@ + + all: + @echo Making all +- -$(CC) $(CFLAGS) -c source/rain_command_line.c +- -$(CC) $(CFLAGS) -c source/rain_defaults.c +- -$(CC) $(CFLAGS) -c source/rain_die.c +- -$(CC) $(CFLAGS) -c source/rain_icmp.c +- -$(CC) $(CFLAGS) -c source/rain_igmp.c +- -$(CC) $(CFLAGS) -c source/rain_inet_common.c +- -$(CC) $(CFLAGS) -c source/rain_mem.c +- -$(CC) $(CFLAGS) -c source/rain_resolv.c +- -$(CC) $(CFLAGS) -c source/rain_services.c +- -$(CC) $(CFLAGS) -c source/rain_signal.c +- -$(CC) $(CFLAGS) -c source/rain_string.c +- -$(CC) $(CFLAGS) -c source/rain_tcp.c +- -$(CC) $(CFLAGS) -c source/rain_udp.c +- -$(CC) $(CFLAGS) -c source/rain_main.c ++ $(CC) $(CFLAGS) -c source/rain_command_line.c ++ $(CC) $(CFLAGS) -c source/rain_defaults.c ++ $(CC) $(CFLAGS) -c source/rain_die.c ++ $(CC) $(CFLAGS) -c source/rain_icmp.c ++ $(CC) $(CFLAGS) -c source/rain_igmp.c ++ $(CC) $(CFLAGS) -c source/rain_inet_common.c ++ $(CC) $(CFLAGS) -c source/rain_mem.c ++ $(CC) $(CFLAGS) -c source/rain_resolv.c ++ $(CC) $(CFLAGS) -c source/rain_services.c ++ $(CC) $(CFLAGS) -c source/rain_signal.c ++ $(CC) $(CFLAGS) -c source/rain_string.c ++ $(CC) $(CFLAGS) -c source/rain_tcp.c ++ $(CC) $(CFLAGS) -c source/rain_udp.c ++ $(CC) $(CFLAGS) -c source/rain_main.c + +- -$(CC) $(CFLAGS) $(LDFLAGS) -o rain rain_command_line.o rain_defaults.o rain_die.o rain_icmp.o rain_igmp.o rain_inet_common.o rain_main.o rain_mem.o rain_resolv.o rain_services.o rain_signal.o rain_string.o rain_tcp.o rain_udp.o ++ $(CC) $(CFLAGS) $(LDFLAGS) -o rain rain_command_line.o rain_defaults.o rain_die.o rain_icmp.o rain_igmp.o rain_inet_common.o rain_main.o rain_mem.o rain_resolv.o rain_services.o rain_signal.o rain_string.o rain_tcp.o rain_udp.o + + @echo done. + diff --git a/net-analyzer/rain/files/rain-1.2.9_beta1-fno-common.patch b/net-analyzer/rain/files/rain-1.2.9_beta1-fno-common.patch new file mode 100644 index 000000000000..06eb84fc2e77 --- /dev/null +++ b/net-analyzer/rain/files/rain-1.2.9_beta1-fno-common.patch @@ -0,0 +1,111 @@ +--- a/include/rain_inet_common.h ++++ b/include/rain_inet_common.h +@@ -368,14 +368,14 @@ + /* + * global variables + */ +-u_int16_t packetsize; +-unsigned char *buffer; /* For holding packets. Declared globally to ensure it is freed when the program exits */ +-time_t send_start; /* for storing start and finish time of total packets sent */ +-time_t send_finish; +-unsigned long packets_sent; +-u_short verbose; +-struct in_addr group; /* for ICMP gateway and IGMP group addresses */ +-int sendflags; /* stores flags for sendto(); Default is 0 */ ++extern u_int16_t packetsize; ++extern unsigned char *buffer; /* For holding packets. Declared globally to ensure it is freed when the program exits */ ++extern time_t send_start; /* for storing start and finish time of total packets sent */ ++extern time_t send_finish; ++extern unsigned long packets_sent; ++extern u_short verbose; ++extern struct in_addr group; /* for ICMP gateway and IGMP group addresses */ ++extern int sendflags; /* stores flags for sendto(); Default is 0 */ + /*---------------------------*/ + + +--- a/source/rain_inet_common.c ++++ b/source/rain_inet_common.c +@@ -17,6 +17,18 @@ + *-------------------------------------------------*/ + #include "rain_common.h" + ++/* ++ * global variables ++ */ ++u_int16_t packetsize; ++unsigned char *buffer; /* For holding packets. Declared globally to ensure it is freed when the program exits */ ++time_t send_start; /* for storing start and finish time of total packets sent */ ++time_t send_finish; ++unsigned long packets_sent; ++u_short verbose; ++struct in_addr group; /* for ICMP gateway and IGMP group addresses */ ++int sendflags; /* stores flags for sendto(); Default is 0 */ ++/*---------------------------*/ + + /* + * Internet checksum routine (RFC 1071) +--- a/include/rain_icmp.h ++++ b/include/rain_icmp.h +@@ -20,7 +20,7 @@ + + + +-unsigned char icmpinfo[56][56][56]; ++extern unsigned char icmpinfo[56][56][56]; + + + /* +--- a/source/rain_icmp.c ++++ b/source/rain_icmp.c +@@ -17,6 +17,7 @@ + *-------------------------------------------------*/ + #include "rain_common.h" + ++unsigned char icmpinfo[56][56][56]; + + /* + * Prints all the ICMP type/code combinations +--- a/include/rain_igmp.h ++++ b/include/rain_igmp.h +@@ -18,7 +18,7 @@ + #ifndef _RAIN_IGMP_H + #define _RAIN_IGMP_H + +-unsigned char igmpinfo[56][56][5]; ++extern unsigned char igmpinfo[56][56][5]; + + + extern void print_igmp_info(void); +--- a/source/rain_igmp.c ++++ b/source/rain_igmp.c +@@ -17,7 +17,7 @@ + *-------------------------------------------------*/ + #include "rain_common.h" + +- ++unsigned char igmpinfo[56][56][5]; + + /* + * Prints IGMP type/code descriptions +--- a/include/rain_tcp.h ++++ b/include/rain_tcp.h +@@ -20,7 +20,7 @@ + #ifndef _RAIN_TCP_H + #define _RAIN_TCP_H + +-unsigned char tcpinfo[25]; ++extern unsigned char tcpinfo[25]; + + extern void tcp_info_init(struct pkt_info_tcp *); + extern int tcp_shower_connect(struct sockaddr_in *, struct pkt_info *); +--- a/source/rain_tcp.c ++++ b/source/rain_tcp.c +@@ -17,7 +17,7 @@ + *-------------------------------------------------*/ + #include "rain_common.h" + +- ++unsigned char tcpinfo[25]; + + /* + * tcp_info_init(): diff --git a/net-analyzer/rain/files/rain-1.2.9_beta1-gentoo.patch b/net-analyzer/rain/files/rain-1.2.9_beta1-gentoo.patch new file mode 100644 index 000000000000..01666a0bfab2 --- /dev/null +++ b/net-analyzer/rain/files/rain-1.2.9_beta1-gentoo.patch @@ -0,0 +1,27 @@ +--- a/Makefile.in ++++ b/Makefile.in +@@ -6,12 +6,12 @@ + RAIN_PLATFORM=@host@ + RAIN_VERSION="1.2.9beta1" + RAIN_URL=http://www.tenebrous.com/rain/ +-CFLAGS= -g -Wall $(LIBS) -I./include -DHAVE_CONFIG_H -D_GNU_SOURCE -DRAIN_PLATFORM=\"$(RAIN_PLATFORM)\" -DRAIN_VERSION=\"$(RAIN_VERSION)\" -DRAIN_URL=\"$(RAIN_URL)\" ++CFLAGS= @CFLAGS@ -Wall $(LIBS) -I./include -DHAVE_CONFIG_H -D_GNU_SOURCE -DRAIN_PLATFORM=\"$(RAIN_PLATFORM)\" -DRAIN_VERSION=\"$(RAIN_VERSION)\" -DRAIN_URL=\"$(RAIN_URL)\" + INSTALLER=@INSTALL@ + MAKE=@SET_MAKE@ +-MANDIR=/usr/local/man ++MANDIR=/usr/share/man + MAN1DIR=$(MANDIR)/man1 +-SBINDIR=/sbin ++SBINDIR=/usr/sbin + + all: + @echo Making all +@@ -30,7 +30,7 @@ + -$(CC) $(CFLAGS) -c source/rain_udp.c + -$(CC) $(CFLAGS) -c source/rain_main.c + +- -$(CC) -o rain rain_command_line.o rain_defaults.o rain_die.o rain_icmp.o rain_igmp.o rain_inet_common.o rain_main.o rain_mem.o rain_resolv.o rain_services.o rain_signal.o rain_string.o rain_tcp.o rain_udp.o ++ -$(CC) $(CFLAGS) $(LDFLAGS) -o rain rain_command_line.o rain_defaults.o rain_die.o rain_icmp.o rain_igmp.o rain_inet_common.o rain_main.o rain_mem.o rain_resolv.o rain_services.o rain_signal.o rain_string.o rain_tcp.o rain_udp.o + + @echo done. + diff --git a/net-analyzer/rain/metadata.xml b/net-analyzer/rain/metadata.xml new file mode 100644 index 000000000000..bd13a914477c --- /dev/null +++ b/net-analyzer/rain/metadata.xml @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<maintainer type="project"> + <email>netmon@gentoo.org</email> + <name>Gentoo network monitoring and analysis project</name> +</maintainer> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/rain/rain-1.2.9_beta1-r1.ebuild b/net-analyzer/rain/rain-1.2.9_beta1-r1.ebuild new file mode 100644 index 000000000000..84351e1ba87e --- /dev/null +++ b/net-analyzer/rain/rain-1.2.9_beta1-r1.ebuild @@ -0,0 +1,37 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +inherit autotools + +MY_P=${P/_/} +MY_P=${MY_P/-/_} +DESCRIPTION="powerful tool for testing stability of utilizing IP protocols" +HOMEPAGE="http://www.mirrors.wiretapped.net/security/packet-construction/rain/" +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~ppc ~sparc ~x86" +SRC_URI=" + mirror://ubuntu/pool/universe/r/${PN}/${MY_P}.orig.tar.gz + mirror://ubuntu/pool/universe/r/${PN}/${MY_P}-1.diff.gz +" + +DOCS=( BUGS CHANGES README TODO ) +S="${WORKDIR}/${MY_P/_/-}" +PATCHES=( + "${WORKDIR}"/${MY_P}-1.diff + "${FILESDIR}"/${P}-fno-common.patch + "${FILESDIR}"/${P}-gentoo.patch + "${FILESDIR}"/${P}-die-on-error.patch +) + +src_prepare() { + default + + eautoreconf +} + +src_install() { + default + gunzip "${ED}"/usr/share/man/man1/${PN}.1.gz || die +} diff --git a/net-analyzer/rain/rain-1.2.9_beta1.ebuild b/net-analyzer/rain/rain-1.2.9_beta1.ebuild new file mode 100644 index 000000000000..72284beaad76 --- /dev/null +++ b/net-analyzer/rain/rain-1.2.9_beta1.ebuild @@ -0,0 +1,28 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 +inherit autotools eutils + +MY_P=${P/_/} +MY_P=${MY_P/-/_} +DESCRIPTION="powerful tool for testing stability of hardware and software utilizing IP protocols" +HOMEPAGE="http://www.mirrors.wiretapped.net/security/packet-construction/rain/" +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~ppc ~sparc x86" +SRC_URI=" + mirror://ubuntu/pool/universe/r/${PN}/${MY_P}.orig.tar.gz + mirror://ubuntu/pool/universe/r/${PN}/${MY_P}-1.diff.gz +" + +S="${WORKDIR}/${MY_P/_/-}" + +src_prepare() { + epatch "${WORKDIR}"/${MY_P}-1.diff + epatch "${FILESDIR}"/${P}-gentoo.patch + + eautoreconf +} + +DOCS=( BUGS CHANGES README TODO ) diff --git a/net-analyzer/rrdcollect/Manifest b/net-analyzer/rrdcollect/Manifest new file mode 100644 index 000000000000..12c93e9e1d5f --- /dev/null +++ b/net-analyzer/rrdcollect/Manifest @@ -0,0 +1 @@ +DIST rrdcollect-0.2.9.tar.gz 137397 BLAKE2B 5fa7e3c90f168c4839227f4578c0bb309c9e1d5ac440026b10aa5ea9f62ed23db63f20cd506c87fb6bf4b969e9aaa0a0a33e882818bc558e1e99432ce3e6e855 SHA512 5f01b93a469d32f095b501c3611d4e31d354025848aeffd913db9625d0186a3e7d394dae1a2383449836c37e758a39a3473710a1855411288659fa6ac249e10f diff --git a/net-analyzer/rrdcollect/files/rrdcollect-0.2.9-include.patch b/net-analyzer/rrdcollect/files/rrdcollect-0.2.9-include.patch new file mode 100644 index 000000000000..69827b28358f --- /dev/null +++ b/net-analyzer/rrdcollect/files/rrdcollect-0.2.9-include.patch @@ -0,0 +1,10 @@ +--- a/src/checkpid.c ++++ b/src/checkpid.c +@@ -20,6 +20,7 @@ + + #include "rrdcollect.h" + #include <fcntl.h> ++#include <sys/file.h> /* flock() */ + + /* lockfile in rrdcollect.pid */ + /* five digits+"\n\0" */ diff --git a/net-analyzer/rrdcollect/metadata.xml b/net-analyzer/rrdcollect/metadata.xml new file mode 100644 index 000000000000..8413fb82faa1 --- /dev/null +++ b/net-analyzer/rrdcollect/metadata.xml @@ -0,0 +1,16 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>netmon@gentoo.org</email> + <name>Gentoo network monitoring and analysis project</name> + </maintainer> + <use> + <flag name="exec">Enable exec:/// support</flag> + <flag name="librrd">Use the librrd library from <pkg>net-analyzer/rrdtool</pkg></flag> + </use> + <upstream> + <remote-id type="sourceforge">rrdcollect</remote-id> + </upstream> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/rrdcollect/rrdcollect-0.2.9.ebuild b/net-analyzer/rrdcollect/rrdcollect-0.2.9.ebuild new file mode 100644 index 000000000000..e8380ce1376f --- /dev/null +++ b/net-analyzer/rrdcollect/rrdcollect-0.2.9.ebuild @@ -0,0 +1,40 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +inherit eutils + +DESCRIPTION="Read system statistical data and feed it to RRDtool" +HOMEPAGE="http://rrdcollect.sourceforge.net/" +SRC_URI="mirror://sourceforge/rrdcollect/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~x86" +IUSE="exec librrd pcre" + +DEPEND=" + librrd? ( net-analyzer/rrdtool ) + pcre? ( dev-libs/libpcre ) +" +RDEPEND="${DEPEND}" + +src_prepare() { + epatch "${FILESDIR}"/${P}-include.patch +} + +src_configure() { + econf \ + $(use_enable exec) \ + $(use_with librrd) \ + $(use_with pcre libpcre) +} + +DOCS=( AUTHORS ChangeLog NEWS TODO ) + +src_install() { + default + docinto examples + dodoc doc/examples/* +} diff --git a/net-analyzer/rrdtool/Manifest b/net-analyzer/rrdtool/Manifest new file mode 100644 index 000000000000..2dca88add42c --- /dev/null +++ b/net-analyzer/rrdtool/Manifest @@ -0,0 +1,3 @@ +DIST rrdtool-1.6.0.tar.gz 2186538 BLAKE2B b56ef79b9d45a65cacd7c1d8da2158dcaaff3ebc2ffc0640081cdc2fa3ac643be1ce48a2cac60427a836dc3e457ddb042c95533d0ffbcdefa2978f5659150391 SHA512 45a8f16a2bda9d497c5f39de80236adb7a5bd054a14755c4d130f21cd6430bd0a76caef9632994be56fd1ea2364eb218687ea8ebf945a71ca411221c248f3ebd +DIST rrdtool-1.7.1.tar.gz 2881346 BLAKE2B e538c6ba3fb6726f0515ed655aa8d5e184f6d3066bb32e981b3254e41c53e29529698da5ef73f8365391180c76d15808d1d727a0834b8025893b01c3b9af8f46 SHA512 ee5c9ff234493442ccd9bfc7031700483011de3e05c01e026509b699cb0d7d3e286e2046357c5fff5807f3e709043c8f218b48b43f8b126a23e228a3927d7b14 +DIST rrdtool-1.7.2.tar.gz 2883737 BLAKE2B f3ff6cc4e325cdec42a6f9e67a1644f501c11edc47bc281df58c2e1d7be4c01767c35166f4301f68cf9c22dcd5c159bb51ee704a5e36776acdf166100122cebb SHA512 453230efc68aeb4a12842d20a9d246ba478a79c2f6bfd9693a91837c1c1136abe8af177be64fe29aa40bf84ccfce7f2f15296aefe095e89b8b62aef5a7623e29 diff --git a/net-analyzer/rrdtool/files/rrdcached.confd b/net-analyzer/rrdtool/files/rrdcached.confd new file mode 100644 index 000000000000..0463a7923461 --- /dev/null +++ b/net-analyzer/rrdtool/files/rrdcached.confd @@ -0,0 +1,8 @@ +RRCACHE_ARGS="-l unix:/var/run/rrdcached.sock -j /var/lib/rrdcached/journal/ -F -b /var/lib/rrdcached/db/ -B" + +USER="" +GROUP="" + +MODE="" + +MAXWAIT=30 diff --git a/net-analyzer/rrdtool/files/rrdcached.init b/net-analyzer/rrdtool/files/rrdcached.init new file mode 100644 index 000000000000..51c2cbb6e818 --- /dev/null +++ b/net-analyzer/rrdtool/files/rrdcached.init @@ -0,0 +1,13 @@ +#!/sbin/openrc-run +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +command="/usr/bin/rrdcached" +command_args="${RRCACHE_ARGS} -p /run/rrdcached.pid" +start_stop_daemon_args="--quiet" +description="RRDtool data caching daemon" + +depend() { + need localmount net + use logger +} diff --git a/net-analyzer/rrdtool/files/rrdtool-1.4.9-disable-rrd_graph-cgi.patch b/net-analyzer/rrdtool/files/rrdtool-1.4.9-disable-rrd_graph-cgi.patch new file mode 100644 index 000000000000..67f0ce2fb292 --- /dev/null +++ b/net-analyzer/rrdtool/files/rrdtool-1.4.9-disable-rrd_graph-cgi.patch @@ -0,0 +1,49 @@ +--- a/src/rrd_cgi.c ++++ b/src/rrd_cgi.c +@@ -56,6 +56,7 @@ + const char **); + + /* call rrd_graph and insert appropriate image tag */ ++#ifdef HAVE_RRD_GRAPH + char *drawgraph( + long, + const char **); +@@ -64,6 +65,7 @@ + char *drawprint( + long, + const char **); ++#endif /* HAVE_RRD_GRAPH */ + + /* pretty-print the <last></last> value for some.rrd via strftime() */ + char *printtimelast( +@@ -542,9 +544,13 @@ + } + parse(&buffer, i, "<RRD::GETVAR", rrdgetvar); + parse(&buffer, i, "<RRD::GOODFOR", rrdgoodfor); ++#ifdef HAVE_RRD_GRAPH + parse(&buffer, i, "<RRD::GRAPH", drawgraph); ++#endif /* HAVE_RRD_GRAPH */ + parse(&buffer, i, "<RRD::INCLUDE", includefile); ++#ifdef HAVE_RRD_GRAPH + parse(&buffer, i, "<RRD::PRINT", drawprint); ++#endif /* HAVE_RRD_GRAPH */ + parse(&buffer, i, "<RRD::SETCONSTVAR", rrdsetvarconst); + parse(&buffer, i, "<RRD::SETENV", rrdsetenv); + parse(&buffer, i, "<RRD::SETVAR", rrdsetvar); +@@ -929,7 +935,7 @@ + } + + +- ++#ifdef HAVE_RRD_GRAPH + char *drawgraph( + long argc, + const char **args) +@@ -961,6 +967,7 @@ + } + return NULL; + } ++#endif /* HAVE_RRD_GRAPH */ + + char *drawprint( + long argc, diff --git a/net-analyzer/rrdtool/files/rrdtool-1.4.9-disable-rrd_graph-perl.patch b/net-analyzer/rrdtool/files/rrdtool-1.4.9-disable-rrd_graph-perl.patch new file mode 100644 index 000000000000..c68ca24a3e2f --- /dev/null +++ b/net-analyzer/rrdtool/files/rrdtool-1.4.9-disable-rrd_graph-perl.patch @@ -0,0 +1,53 @@ +--- a/bindings/perl-shared/RRDs.xs ++++ b/bindings/perl-shared/RRDs.xs +@@ -189,6 +189,7 @@ + OUTPUT: + RETVAL + ++#ifdef HAVE_RRD_GRAPH + SV * + rrd_graph(...) + PROTOTYPE: @ +@@ -235,6 +236,8 @@ + PUSHs(sv_2mortal(newSViv(xsize))); + PUSHs(sv_2mortal(newSViv(ysize))); + ++#endif /* HAVE_RRD_GRAPH */ ++ + SV * + rrd_fetch(...) + PROTOTYPE: @ +@@ -313,6 +316,7 @@ + PUSHs(sv_2mortal(newSVuv(start_tmp))); + PUSHs(sv_2mortal(newSVuv(end_tmp))); + ++#ifdef HAVE_RRD_GRAPH + int + rrd_xport(...) + PROTOTYPE: @ +@@ -371,6 +375,8 @@ + PUSHs(sv_2mortal(newRV_noinc((SV*)names))); + PUSHs(sv_2mortal(newRV_noinc((SV*)retar))); + ++#endif /* HAVE_RRD_GRAPH */ ++ + SV* + rrd_info(...) + PROTOTYPE: @ +@@ -397,6 +403,7 @@ + OUTPUT: + RETVAL + ++#ifdef HAVE_RRD_GRAPH + SV* + rrd_graphv(...) + PROTOTYPE: @ +@@ -410,6 +417,8 @@ + OUTPUT: + RETVAL + ++#endif /* HAVE_RRD_GRAPH */ ++ + int + rrd_dump(...) + PROTOTYPE: @ diff --git a/net-analyzer/rrdtool/files/rrdtool-1.5.0_rc1-disable-rrd_graph-lua.patch b/net-analyzer/rrdtool/files/rrdtool-1.5.0_rc1-disable-rrd_graph-lua.patch new file mode 100644 index 000000000000..6b3a3abf26bb --- /dev/null +++ b/net-analyzer/rrdtool/files/rrdtool-1.5.0_rc1-disable-rrd_graph-lua.patch @@ -0,0 +1,12 @@ +--- a/bindings/lua/rrdlua.c ++++ b/bindings/lua/rrdlua.c +@@ -367,7 +367,9 @@ + #if defined(DINF) + {"info", lua_rrd_info}, + {"updatev", lua_rrd_updatev}, ++#ifdef HAVE_RRD_GRAPH + {"graphv", lua_rrd_graphv}, ++#endif /* HAVE_RRD_GRAPH */ + #endif + {NULL, NULL} + }; diff --git a/net-analyzer/rrdtool/files/rrdtool-1.5.0_rc1-disable-rrd_graph-python.patch b/net-analyzer/rrdtool/files/rrdtool-1.5.0_rc1-disable-rrd_graph-python.patch new file mode 100644 index 000000000000..db3daaf47345 --- /dev/null +++ b/net-analyzer/rrdtool/files/rrdtool-1.5.0_rc1-disable-rrd_graph-python.patch @@ -0,0 +1,38 @@ +--- a/bindings/python/rrdtoolmodule.c ++++ b/bindings/python/rrdtoolmodule.c +@@ -675,8 +676,6 @@ + return r; + } + +-#endif +- + static char PyRRD_dump__doc__[] = + "dump - dump an RRD to XML\n" + "[--header|-h {none,xsd,dtd}] [--no-header]file.rrd [file.xml]"; +@@ -704,6 +703,7 @@ + destroy_args(&argv); + return r; + } ++#endif /* HAVE_RRD_GRAPH */ + + /* List of methods defined in the module */ + #define meth(name, func, doc) {name, (PyCFunction)func, METH_VARARGS, doc} +@@ -717,14 +717,16 @@ + meth("last", PyRRD_last, PyRRD_last__doc__), + meth("resize", PyRRD_resize, PyRRD_resize__doc__), + meth("info", PyRRD_info, PyRRD_info__doc__), +-#ifdef HAVE_RRD_GRAPH ++#ifdef HAVE_RRD_GRAPH + meth("graph", PyRRD_graph, PyRRD_graph__doc__), + meth("graphv", PyRRD_graphv, PyRRD_graphv__doc__), + meth("xport", PyRRD_xport, PyRRD_xport__doc__), +-#endif ++#endif /* HAVE_RRD_GRAPH */ + meth("updatev", PyRRD_updatev, PyRRD_updatev__doc__), + meth("flushcached", PyRRD_flushcached, PyRRD_flushcached__doc__), ++#ifdef HAVE_RRD_GRAPH + meth("dump", PyRRD_dump, PyRRD_dump__doc__), ++#endif /* HAVE_RRD_GRAPH */ + {NULL, NULL, 0, NULL} + }; + diff --git a/net-analyzer/rrdtool/files/rrdtool-1.5.5-rrdrados.pod b/net-analyzer/rrdtool/files/rrdtool-1.5.5-rrdrados.pod new file mode 100644 index 000000000000..0c645548a202 --- /dev/null +++ b/net-analyzer/rrdtool/files/rrdtool-1.5.5-rrdrados.pod @@ -0,0 +1,68 @@ +=head1 NAME + +rrdrados - Creating, updating and retrieving RRD files from Ceph + +=head1 SYNOPSIS + +E<lt>rrdfileE<gt> = B<ceph//E<lt>nameE<gt>> + + +=head1 DESCRIPTION + +This module adds support for creating, updating and retrieving RRD files +directly from a Ceph cluster using librados. + +It adds a ceph// prefix to RRD file name which is used to instruct rrdtool to +operate on a file that is stored in Ceph. + +Currently the module expects to find the Ceph configuration file in the default +location at /etc/ceph/ceph.conf. By default it uses Ceph client ID "admin" and a +Ceph pool named "rrd". + + +=head1 ENVIRONMENT VARIABLES + +=over 4 + +=item B<CEPH_ID> + +Sets the Ceph Client ID to use when connecting. By default the client ID "admin" +is used. + +=item B<CEPH_POOL> + +Sets the name of the Ceph Pool to connect to. By default, the pool "rrd" is +used. + +=back + + +=head1 EXAMPLES + +B<Creating an RRD file on Ceph> + + rrdtool create ceph//temperature.rrd --step 300 \ + DS:temp:GAUGE:600:-273:5000 \ + RRA:AVERAGE:0.5:1:1200 \ + RRA:MIN:0.5:12:2400 \ + RRA:MAX:0.5:12:2400 \ + RRA:AVERAGE:0.5:12:2400 + + +B<Importing an existing RRD into Ceph> + + rrdtool dump existing.rrd | rrdtool restore - ceph//new.rrd + +Or you could also copy the RRD file directly into Ceph using the rados command +line utility. + + +B<Retrieving RRD data from Ceph> + + rrdtool fetch ceph//file.rrd AVERAGE + + +=head1 AUTHOR + +Simon Boulet E<lt>simon@nostalgeek.comE<gt> + diff --git a/net-analyzer/rrdtool/files/rrdtool-1.6.0-configure.ac.patch b/net-analyzer/rrdtool/files/rrdtool-1.6.0-configure.ac.patch new file mode 100644 index 000000000000..a0bee695b7ae --- /dev/null +++ b/net-analyzer/rrdtool/files/rrdtool-1.6.0-configure.ac.patch @@ -0,0 +1,25 @@ +--- a/configure.ac ++++ b/configure.ac +@@ -177,7 +177,7 @@ + AC_PROG_CPP + AC_PROG_CC + AM_PROG_CC_C_O +-AC_PROG_LIBTOOL ++LT_INIT + + dnl Try to detect/use GNU features + CFLAGS="$CFLAGS -D_GNU_SOURCE" +@@ -239,13 +239,6 @@ + AC_CHECK_FUNC(acos, , AC_CHECK_LIB(m, acos)) + AC_CHECK_FUNC(round, , AC_CHECK_LIB(m, round)) + +- +- +-dnl add pic flag in any case this makes sure all our code is relocatable +-eval `./libtool --config | grep pic_flag=` +-CFLAGS="$CFLAGS $pic_flag" +- +- + dnl Checks for library functions. + AC_FUNC_STRFTIME + AC_FUNC_VPRINTF diff --git a/net-analyzer/rrdtool/files/rrdtool-1.7.0-disable-rrd_graph-cgi.patch b/net-analyzer/rrdtool/files/rrdtool-1.7.0-disable-rrd_graph-cgi.patch new file mode 100644 index 000000000000..beb1ba794f22 --- /dev/null +++ b/net-analyzer/rrdtool/files/rrdtool-1.7.0-disable-rrd_graph-cgi.patch @@ -0,0 +1,49 @@ +--- a/src/rrd_cgi.c ++++ b/src/rrd_cgi.c +@@ -51,6 +51,7 @@ + const char **); + + /* call rrd_graph and insert appropriate image tag */ ++#ifdef HAVE_RRD_GRAPH + static char *drawgraph( + long, + const char **); +@@ -59,6 +60,7 @@ + static char *drawprint( + long, + const char **); ++#endif /* HAVE_RRD_GRAPH */ + + /* pretty-print the <last></last> value for some.rrd via strftime() */ + static char *printtimelast( +@@ -510,9 +512,13 @@ + } + parse(&buffer, i, "<RRD::GETVAR", rrdgetvar); + parse(&buffer, i, "<RRD::GOODFOR", rrdgoodfor); ++#ifdef HAVE_RRD_GRAPH + parse(&buffer, i, "<RRD::GRAPH", drawgraph); ++#endif /* HAVE_RRD_GRAPH */ + parse(&buffer, i, "<RRD::INCLUDE", includefile); ++#ifdef HAVE_RRD_GRAPH + parse(&buffer, i, "<RRD::PRINT", drawprint); ++#endif /* HAVE_RRD_GRAPH */ + parse(&buffer, i, "<RRD::SETCONSTVAR", rrdsetvarconst); + parse(&buffer, i, "<RRD::SETENV", rrdsetenv); + parse(&buffer, i, "<RRD::SETVAR", rrdsetvar); +@@ -900,7 +906,7 @@ + } + + +- ++#ifdef HAVE_RRD_GRAPH + static char *drawgraph( + long argc, + const char **args) +@@ -931,6 +937,7 @@ + } + return NULL; + } ++#endif /* HAVE_RRD_GRAPH */ + + static char *drawprint( + long argc, diff --git a/net-analyzer/rrdtool/files/rrdtool-1.7.1-configure.ac.patch b/net-analyzer/rrdtool/files/rrdtool-1.7.1-configure.ac.patch new file mode 100644 index 000000000000..1b65f959c95d --- /dev/null +++ b/net-analyzer/rrdtool/files/rrdtool-1.7.1-configure.ac.patch @@ -0,0 +1,12 @@ +--- a/configure.ac ++++ b/configure.ac +@@ -241,9 +241,6 @@ + + + +-dnl add pic flag in any case this makes sure all our code is relocatable +-dnl eval `./libtool --config | grep pic_flag=` +-dnl CFLAGS="$CFLAGS $pic_flag" + + + dnl Checks for library functions. diff --git a/net-analyzer/rrdtool/files/rrdtool-1.7.1-rrdcached.socket.patch b/net-analyzer/rrdtool/files/rrdtool-1.7.1-rrdcached.socket.patch new file mode 100644 index 000000000000..5dd214504419 --- /dev/null +++ b/net-analyzer/rrdtool/files/rrdtool-1.7.1-rrdcached.socket.patch @@ -0,0 +1,25 @@ +--- a/etc/Makefile.am ++++ b/etc/Makefile.am +@@ -3,6 +3,6 @@ EXTRA_DIST = rrdcached-default-redhat rrdcached-init-redhat rrdcached-default-ls + + if HAVE_SYSTEMD + systemdsystemunit_DATA = \ +- etc/rrdcached.socket \ +- etc/rrdcached.service ++ rrdcached.socket \ ++ rrdcached.service + endif +\ No newline at end of file +--- a/etc/Makefile.in ++++ b/etc/Makefile.in +@@ -368,8 +368,8 @@ EXTRA_DIST = rrdcached-default-redhat rrdcached-init-redhat rrdcached-default-ls + rrdcached.socket.in rrdcached.service.in + + @HAVE_SYSTEMD_TRUE@systemdsystemunit_DATA = \ +-@HAVE_SYSTEMD_TRUE@ etc/rrdcached.socket \ +-@HAVE_SYSTEMD_TRUE@ etc/rrdcached.service ++@HAVE_SYSTEMD_TRUE@ rrdcached.socket \ ++@HAVE_SYSTEMD_TRUE@ rrdcached.service + + all: all-am + diff --git a/net-analyzer/rrdtool/metadata.xml b/net-analyzer/rrdtool/metadata.xml new file mode 100644 index 000000000000..6a2ee89429cc --- /dev/null +++ b/net-analyzer/rrdtool/metadata.xml @@ -0,0 +1,14 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<maintainer type="project"> +<email>netmon@gentoo.org</email> +<name>Gentoo network monitoring and analysis project</name> +</maintainer> +<use> +<flag name="graph">Enable support for graphing functions</flag> +<flag name="rados">Enable support for librados from <pkg>sys-cluster/ceph</pkg></flag> +<flag name="rrdcgi">Build rrdcgi support</flag> +</use> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/rrdtool/rrdtool-1.6.0-r1.ebuild b/net-analyzer/rrdtool/rrdtool-1.6.0-r1.ebuild new file mode 100644 index 000000000000..f7fc1fd88c1b --- /dev/null +++ b/net-analyzer/rrdtool/rrdtool-1.6.0-r1.ebuild @@ -0,0 +1,185 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI="5" + +DISTUTILS_OPTIONAL=true +DISTUTILS_SINGLE_IMPL=true +GENTOO_DEPEND_ON_PERL=no +PYTHON_COMPAT=( python2_7 ) +inherit autotools eutils perl-module distutils-r1 flag-o-matic multilib + +MY_P=${P/_/-} + +DESCRIPTION="A system to store and display time-series data" +HOMEPAGE="https://oss.oetiker.ch/rrdtool/" +SRC_URI="https://oss.oetiker.ch/rrdtool/pub/${MY_P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0/8.0.0" +KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~mips ppc ppc64 s390 sparc x86 ~amd64-linux ~x86-linux ~x86-macos ~x86-solaris" +IUSE="dbi doc graph lua perl python rados rrdcgi ruby static-libs tcl tcpd" +REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" + +CDEPEND=" + >=dev-libs/glib-2.28.7:2[static-libs(+)?] + >=dev-libs/libxml2-2.7.8:2[static-libs(+)?] + dbi? ( dev-db/libdbi[static-libs(+)?] ) + graph? ( + >=media-libs/libpng-1.5.10:0=[static-libs(+)?] + >=x11-libs/cairo-1.10.2[svg,static-libs(+)?] + >=x11-libs/pango-1.28 + ) + lua? ( dev-lang/lua:*[deprecated] ) + perl? ( dev-lang/perl:= ) + python? ( ${PYTHON_DEPS} ) + rados? ( sys-cluster/ceph ) + tcl? ( dev-lang/tcl:0= ) + tcpd? ( sys-apps/tcp-wrappers ) +" + +DEPEND=" + ${CDEPEND} + sys-apps/groff + virtual/pkgconfig + virtual/awk +" +RDEPEND=" + ${CDEPEND} +" +PDEPEND=" + ruby? ( ~dev-ruby/rrdtool-bindings-${PV} ) +" +S=${WORKDIR}/${MY_P} + +python_compile() { + cd bindings/python || die + distutils-r1_python_compile +} + +python_install() { + cd bindings/python || die + distutils-r1_python_install +} + +pkg_setup() { + use python && python-single-r1_pkg_setup +} + +src_prepare() { + # At the next version bump, please see if you actually still need this + # before adding versions + cp "${FILESDIR}"/${PN}-1.5.5-rrdrados.pod doc/rrdrados.pod || die + + epatch \ + "${FILESDIR}"/${PN}-1.4.9-disable-rrd_graph-cgi.patch \ + "${FILESDIR}"/${PN}-1.4.9-disable-rrd_graph-perl.patch \ + "${FILESDIR}"/${PN}-1.5.0_rc1-disable-rrd_graph-lua.patch \ + "${FILESDIR}"/${PN}-1.5.0_rc1-disable-rrd_graph-python.patch \ + "${FILESDIR}"/${PN}-1.6.0-configure.ac.patch + + # bug 456810 + # no time to sleep + sed -i \ + -e 's|$LUA_CFLAGS|IGNORE_THIS_BAD_TEST|g' \ + -e 's|^sleep 1$||g' \ + -e '/^dnl.*png/s|^dnl||g' \ + configure.ac || die + + # Python bindings are built/installed manually + sed -i \ + -e '/^all-local:/s| @COMP_PYTHON@||' \ + bindings/Makefile.am || die + + if ! use graph; then + sed -i \ + -e '2s:rpn1::; 2s:rpn2::; 6s:create-with-source-4::;' \ + -e '7s:xport1::; 7s:dcounter1::; 7s:vformatter1::' \ + tests/Makefile.am || die + fi + + echo ${PV/_rc*/} >> VERSION || die + + export rd_cv_gcc_flag__Werror=no + + eautoreconf +} + +src_configure() { + filter-flags -ffast-math + + export RRDDOCDIR=${EPREFIX}/usr/share/doc/${PF} + + # to solve bug #260380 + [[ ${CHOST} == *-solaris* ]] && append-flags -D__EXTENSIONS__ + + # Stub configure.ac + local myconf=() + if ! use tcpd; then + myconf+=( "--disable-libwrap" ) + fi + if ! use dbi; then + myconf+=( "--disable-libdbi" ) + fi + if ! use rados; then + myconf+=( "--disable-librados" ) + fi + + econf \ + $(use_enable graph rrd_graph) \ + $(use_enable lua lua-site-install) \ + $(use_enable lua) \ + $(use_enable perl perl-site-install) \ + $(use_enable perl) \ + $(use_enable python) \ + $(use_enable rrdcgi) \ + $(use_enable static-libs static) \ + $(use_enable tcl) \ + $(use_with tcl tcllib "${EPREFIX}"/usr/$(get_libdir)) \ + --with-perl-options=INSTALLDIRS=vendor \ + --disable-ruby-site-install \ + --disable-ruby \ + ${myconf[@]} +} + +src_compile() { + default + + use python && distutils-r1_src_compile +} + +src_test() { + export LC_ALL=C + default +} + +src_install() { + default + + if ! use doc ; then + rm -rf "${ED}"usr/share/doc/${PF}/{html,txt} + fi + + if use !rrdcgi ; then + # uses rrdcgi, causes invalid shebang error in Prefix, useless + # without rrdcgi installed + rm -f "${ED}"usr/share/${PN}/examples/cgi-demo.cgi + fi + + if use perl ; then + perl_delete_localpod + perl_delete_packlist + fi + + dodoc CHANGES CONTRIBUTORS NEWS THREADS TODO + + find "${ED}"usr -name '*.la' -exec rm -f {} + + + keepdir /var/lib/rrdcached/journal/ + keepdir /var/lib/rrdcached/db/ + + newconfd "${FILESDIR}"/rrdcached.confd rrdcached + newinitd "${FILESDIR}"/rrdcached.init rrdcached + + use python && distutils-r1_src_install +} diff --git a/net-analyzer/rrdtool/rrdtool-1.7.1.ebuild b/net-analyzer/rrdtool/rrdtool-1.7.1.ebuild new file mode 100644 index 000000000000..748d2b72a576 --- /dev/null +++ b/net-analyzer/rrdtool/rrdtool-1.7.1.ebuild @@ -0,0 +1,188 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +DISTUTILS_OPTIONAL=true +DISTUTILS_SINGLE_IMPL=true +GENTOO_DEPEND_ON_PERL=no +PYTHON_COMPAT=( python3_6 ) +inherit autotools perl-module distutils-r1 flag-o-matic multilib + +MY_P=${P/_/-} + +DESCRIPTION="A system to store and display time-series data" +HOMEPAGE="https://oss.oetiker.ch/rrdtool/" +SRC_URI="https://oss.oetiker.ch/rrdtool/pub/${MY_P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0/8.0.0" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x86-macos ~x86-solaris" +IUSE="dbi doc graph lua perl python rados rrdcgi ruby static-libs tcl tcpd" +REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" + +CDEPEND=" + >=dev-libs/glib-2.28.7:2[static-libs(+)?] + >=dev-libs/libxml2-2.7.8:2[static-libs(+)?] + dbi? ( dev-db/libdbi[static-libs(+)?] ) + graph? ( + >=media-libs/libpng-1.5.10:0=[static-libs(+)?] + >=x11-libs/cairo-1.10.2[svg,static-libs(+)?] + >=x11-libs/pango-1.28 + ) + lua? ( dev-lang/lua:*[deprecated] ) + perl? ( dev-lang/perl:= ) + python? ( ${PYTHON_DEPS} ) + rados? ( sys-cluster/ceph ) + tcl? ( dev-lang/tcl:0= ) + tcpd? ( sys-apps/tcp-wrappers ) +" + +DEPEND=" + ${CDEPEND} + sys-apps/groff + virtual/pkgconfig + virtual/awk +" +RDEPEND=" + ${CDEPEND} +" +PDEPEND=" + ruby? ( ~dev-ruby/rrdtool-bindings-${PV} ) +" +PATCHES=( + "${FILESDIR}"/${PN}-1.4.9-disable-rrd_graph-perl.patch + "${FILESDIR}"/${PN}-1.7.0-disable-rrd_graph-cgi.patch + "${FILESDIR}"/${PN}-1.7.1-configure.ac.patch + "${FILESDIR}"/${PN}-1.7.1-rrdcached.socket.patch + +) +S=${WORKDIR}/${MY_P} + +python_compile() { + cd bindings/python || die + distutils-r1_python_compile +} + +python_install() { + cd bindings/python || die + distutils-r1_python_install +} + +pkg_setup() { + use python && python-single-r1_pkg_setup +} + +src_prepare() { + default + # At the next version bump, please see if you actually still need this + # before adding versions + if ! [ -f doc/rrdrados.pod ]; then + cp "${FILESDIR}"/${PN}-1.5.5-rrdrados.pod doc/rrdrados.pod + else + die "File already exists: doc/rrdrados.pod. Remove this code!" + fi + + # bug 456810 + # no time to sleep + sed -i \ + -e 's|$LUA_CFLAGS|IGNORE_THIS_BAD_TEST|g' \ + -e 's|^sleep 1$||g' \ + -e '/^dnl.*png/s|^dnl||g' \ + configure.ac || die + + # Python bindings are built/installed manually + sed -i \ + -e '/^all-local:/s| @COMP_PYTHON@||' \ + bindings/Makefile.am || die + + if ! use graph; then + sed -i \ + -e '2s:rpn1::; 2s:rpn2::; 6s:create-with-source-4::;' \ + -e '7s:xport1::; 7s:dcounter1::; 7s:vformatter1::' \ + tests/Makefile.am || die + fi + + export rd_cv_gcc_flag__Werror=no + + eautoreconf +} + +src_configure() { + filter-flags -ffast-math + + export RRDDOCDIR=${EPREFIX}/usr/share/doc/${PF} + + # to solve bug #260380 + [[ ${CHOST} == *-solaris* ]] && append-flags -D__EXTENSIONS__ + + # Stub configure.ac + local myconf=() + if ! use tcpd; then + myconf+=( "--disable-libwrap" ) + fi + if ! use dbi; then + myconf+=( "--disable-libdbi" ) + fi + if ! use rados; then + myconf+=( "--disable-librados" ) + fi + + econf \ + $(use_enable graph rrd_graph) \ + $(use_enable lua lua-site-install) \ + $(use_enable lua) \ + $(use_enable perl perl-site-install) \ + $(use_enable perl) \ + $(use_enable python) \ + $(use_enable rrdcgi) \ + $(use_enable static-libs static) \ + $(use_enable tcl) \ + $(use_with tcl tcllib "${EPREFIX}"/usr/$(get_libdir)) \ + --with-perl-options=INSTALLDIRS=vendor \ + --disable-ruby-site-install \ + --disable-ruby \ + ${myconf[@]} +} + +src_compile() { + default + + use python && distutils-r1_src_compile +} + +src_test() { + export LC_ALL=C + default +} + +src_install() { + default + + if ! use doc ; then + rm -rf "${ED}"usr/share/doc/${PF}/{html,txt} + fi + + if use !rrdcgi ; then + # uses rrdcgi, causes invalid shebang error in Prefix, useless + # without rrdcgi installed + rm -f "${ED}"usr/share/${PN}/examples/cgi-demo.cgi + fi + + if use perl ; then + perl_delete_localpod + perl_delete_packlist + fi + + dodoc CHANGES CONTRIBUTORS NEWS THREADS TODO + + find "${ED}"usr -name '*.la' -exec rm -f {} + + + keepdir /var/lib/rrdcached/journal/ + keepdir /var/lib/rrdcached/db/ + + newconfd "${FILESDIR}"/rrdcached.confd rrdcached + newinitd "${FILESDIR}"/rrdcached.init rrdcached + + use python && distutils-r1_src_install +} diff --git a/net-analyzer/rrdtool/rrdtool-1.7.2.ebuild b/net-analyzer/rrdtool/rrdtool-1.7.2.ebuild new file mode 100644 index 000000000000..95596dfc78ce --- /dev/null +++ b/net-analyzer/rrdtool/rrdtool-1.7.2.ebuild @@ -0,0 +1,186 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 +DISTUTILS_OPTIONAL=true +DISTUTILS_SINGLE_IMPL=true +GENTOO_DEPEND_ON_PERL=no +PYTHON_COMPAT=( python3_{6,7,8} ) +inherit autotools perl-module distutils-r1 flag-o-matic multilib + +MY_P=${P/_/-} + +DESCRIPTION="A system to store and display time-series data" +HOMEPAGE="https://oss.oetiker.ch/rrdtool/" +SRC_URI="https://oss.oetiker.ch/rrdtool/pub/${MY_P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0/8.0.0" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x86-macos ~x86-solaris" +IUSE="dbi doc graph lua perl python rados rrdcgi ruby static-libs tcl tcpd" +REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" + +CDEPEND=" + >=dev-libs/glib-2.28.7:2[static-libs(+)?] + >=dev-libs/libxml2-2.7.8:2[static-libs(+)?] + dbi? ( dev-db/libdbi[static-libs(+)?] ) + graph? ( + >=media-libs/libpng-1.5.10:0=[static-libs(+)?] + >=x11-libs/cairo-1.10.2[svg,static-libs(+)?] + >=x11-libs/pango-1.28 + ) + lua? ( dev-lang/lua:*[deprecated] ) + perl? ( dev-lang/perl:= ) + python? ( ${PYTHON_DEPS} ) + rados? ( sys-cluster/ceph ) + tcl? ( dev-lang/tcl:0= ) + tcpd? ( sys-apps/tcp-wrappers ) +" + +DEPEND=" + ${CDEPEND} + sys-apps/groff + virtual/pkgconfig + virtual/awk +" +RDEPEND=" + ${CDEPEND} +" +PDEPEND=" + ruby? ( ~dev-ruby/rrdtool-bindings-${PV} ) +" +PATCHES=( + "${FILESDIR}"/${PN}-1.4.9-disable-rrd_graph-perl.patch + "${FILESDIR}"/${PN}-1.7.0-disable-rrd_graph-cgi.patch + "${FILESDIR}"/${PN}-1.7.1-configure.ac.patch +) +S=${WORKDIR}/${MY_P} + +python_compile() { + cd bindings/python || die + distutils-r1_python_compile +} + +python_install() { + cd bindings/python || die + distutils-r1_python_install +} + +pkg_setup() { + use python && python-single-r1_pkg_setup +} + +src_prepare() { + default + # At the next version bump, please see if you actually still need this + # before adding versions + if ! [ -f doc/rrdrados.pod ]; then + cp "${FILESDIR}"/${PN}-1.5.5-rrdrados.pod doc/rrdrados.pod + else + die "File already exists: doc/rrdrados.pod. Remove this code!" + fi + + # bug 456810 + # no time to sleep + sed -i \ + -e 's|$LUA_CFLAGS|IGNORE_THIS_BAD_TEST|g' \ + -e 's|^sleep 1$||g' \ + -e '/^dnl.*png/s|^dnl||g' \ + configure.ac || die + + # Python bindings are built/installed manually + sed -i \ + -e '/^all-local:/s| @COMP_PYTHON@||' \ + bindings/Makefile.am || die + + if ! use graph; then + sed -i \ + -e '2s:rpn1::; 2s:rpn2::; 6s:create-with-source-4::;' \ + -e '7s:xport1::; 7s:dcounter1::; 7s:vformatter1::' \ + tests/Makefile.am || die + fi + + eautoreconf +} + +src_configure() { + export rd_cv_gcc_flag__Werror=no + export rd_cv_ms_async=ok + + filter-flags -ffast-math + + export RRDDOCDIR=${EPREFIX}/usr/share/doc/${PF} + + # to solve bug #260380 + [[ ${CHOST} == *-solaris* ]] && append-flags -D__EXTENSIONS__ + + # Stub configure.ac + local myconf=() + if ! use tcpd; then + myconf+=( "--disable-libwrap" ) + fi + if ! use dbi; then + myconf+=( "--disable-libdbi" ) + fi + if ! use rados; then + myconf+=( "--disable-librados" ) + fi + + econf \ + $(use_enable graph rrd_graph) \ + $(use_enable lua lua-site-install) \ + $(use_enable lua) \ + $(use_enable perl perl-site-install) \ + $(use_enable perl) \ + $(use_enable python) \ + $(use_enable rrdcgi) \ + $(use_enable static-libs static) \ + $(use_enable tcl) \ + $(use_with tcl tcllib "${EPREFIX}"/usr/$(get_libdir)) \ + --with-perl-options=INSTALLDIRS=vendor \ + --disable-ruby-site-install \ + --disable-ruby \ + ${myconf[@]} +} + +src_compile() { + default + + use python && distutils-r1_src_compile +} + +src_test() { + export LC_ALL=C + default +} + +src_install() { + default + + if ! use doc ; then + rm -rf "${ED}"usr/share/doc/${PF}/{html,txt} + fi + + if use !rrdcgi ; then + # uses rrdcgi, causes invalid shebang error in Prefix, useless + # without rrdcgi installed + rm -f "${ED}"usr/share/${PN}/examples/cgi-demo.cgi + fi + + if use perl ; then + perl_delete_localpod + perl_delete_packlist + fi + + dodoc CHANGES CONTRIBUTORS NEWS THREADS TODO + + find "${ED}"usr -name '*.la' -exec rm -f {} + + + keepdir /var/lib/rrdcached/journal/ + keepdir /var/lib/rrdcached/db/ + + newconfd "${FILESDIR}"/rrdcached.confd rrdcached + newinitd "${FILESDIR}"/rrdcached.init rrdcached + + use python && distutils-r1_src_install +} diff --git a/net-analyzer/rtpbreak/Manifest b/net-analyzer/rtpbreak/Manifest new file mode 100644 index 000000000000..9b0077ae3994 --- /dev/null +++ b/net-analyzer/rtpbreak/Manifest @@ -0,0 +1 @@ +DIST rtpbreak-1.3a.tgz 41355 BLAKE2B 8e0d91569a009bc67c13de2a3db5731b4e9f14717e0f3c9fd0d98593780def4aa9d6046c0f48e2f99280d4a235d37f9f7c86d7647803f2f4dce454fa303047a3 SHA512 abe0329f91a8c76d4fab5589d834e19615457fe1c5cdb410ce2f6fbf871b750cf917a92a979b92aaf5f0a2644fa4f4dc4ca7e53fb46d71c8fa016a7f41efe5ad diff --git a/net-analyzer/rtpbreak/files/rtpbreak-1.3a-limits.patch b/net-analyzer/rtpbreak/files/rtpbreak-1.3a-limits.patch new file mode 100644 index 000000000000..78cb5f9a5a78 --- /dev/null +++ b/net-analyzer/rtpbreak/files/rtpbreak-1.3a-limits.patch @@ -0,0 +1,10 @@ +--- rtpbreak-1.3a/src/common.h.orig 2009-02-05 14:49:50.000000000 +0100 ++++ rtpbreak-1.3a/src/common.h 2009-02-05 14:49:57.000000000 +0100 +@@ -30,6 +30,7 @@ + #include <stdio.h> + #include <string.h> + #include <errno.h> ++#include <limits.h> + + + /* const */ diff --git a/net-analyzer/rtpbreak/files/rtpbreak-1.3a-missing-headers.patch b/net-analyzer/rtpbreak/files/rtpbreak-1.3a-missing-headers.patch new file mode 100644 index 000000000000..8f9bb14e37cd --- /dev/null +++ b/net-analyzer/rtpbreak/files/rtpbreak-1.3a-missing-headers.patch @@ -0,0 +1,14 @@ +Fix build failure due to missing include of udp.h #351602 + +Patch by Kevin McCarthy <signals@gentoo.org> + +--- rtpbreak-1.3a.orig/src/main.c 2011-01-29 11:10:46.960653580 -0500 ++++ rtpbreak-1.3a/src/main.c 2011-01-29 11:15:15.833884433 -0500 +@@ -27,6 +27,7 @@ + #include <sys/stat.h> + #include <pwd.h> + #include <grp.h> ++#include <netinet/udp.h> + #include "queue.h" + #include "rtp.h" + #include "common.h" diff --git a/net-analyzer/rtpbreak/metadata.xml b/net-analyzer/rtpbreak/metadata.xml new file mode 100644 index 000000000000..d85b4252fc33 --- /dev/null +++ b/net-analyzer/rtpbreak/metadata.xml @@ -0,0 +1,6 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<!-- maintainer-needed --> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/rtpbreak/rtpbreak-1.3a-r1.ebuild b/net-analyzer/rtpbreak/rtpbreak-1.3a-r1.ebuild new file mode 100644 index 000000000000..c10b7bd76cc0 --- /dev/null +++ b/net-analyzer/rtpbreak/rtpbreak-1.3a-r1.ebuild @@ -0,0 +1,36 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +inherit eutils toolchain-funcs + +DESCRIPTION="Analyze any RTP session through heuristics over UDP network traffic" +HOMEPAGE="http://xenion.reactive-search.com/?page_id=7" +SRC_URI="http://xenion.antifork.org/rtpbreak/${P}.tgz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="" + +DEPEND="net-libs/libnet:1.1 + >=net-libs/libpcap-0.7" + +RDEPEND="${DEPEND}" + +src_prepare() { + # Use limits.h PATH_MAX + epatch "${FILESDIR}"/${P}-limits.patch \ + "${FILESDIR}"/${P}-missing-headers.patch +} + +src_compile() { + emake CC="$(tc-getCC)" CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}" +} + +src_install() { + dobin src/rtpbreak + dodoc CHANGELOG THANKS + dohtml -r doc +} diff --git a/net-analyzer/sancp/Manifest b/net-analyzer/sancp/Manifest new file mode 100644 index 000000000000..5334b6da520f --- /dev/null +++ b/net-analyzer/sancp/Manifest @@ -0,0 +1,5 @@ +DIST sancp-1.6.1.fix200511.a.patch 662 BLAKE2B d3d5114662f3904db4052d581b3a95f07f5a492b439958bd64149ca6f9aaf48f2d2d9cf2094500b9ab829b3a06358180893637ed6d3f502ef46f87dfe8527ccc SHA512 87662d9ea863a3a2468b7b64c81a191d34c81348eab9374245a73d3ed63cf2f25df54561f092f3713d516d9cc4eb553d4d7286fd920676a301e61669a023142e +DIST sancp-1.6.1.fix200511.b.patch 870 BLAKE2B 18ad38c37f11aa1c4804400db5475323db25e0c135d3478e9c81af3a0a3885f397521fdf9b58825216fdd16ec2e2616584f3dc9e175e76d64c7125a767b2c029 SHA512 a54bbec1ce3799f83c006f7375297bafee85b12a90361f1f5dbbf46c936193c7e0f1196483a2bdf560019e93ceffe9129b3c01322eedc397e5dfa3a1a6b76b81 +DIST sancp-1.6.1.fix200601.c.patch 3578 BLAKE2B 7c7e5ef0e1967d41f731d3c79f4273a4ebfc922159ada1940ba4635f6f82e63ed55faeffe53636d2c8fd96d57e1516211fff8852c73876d019fc13d59f4ace9d SHA512 3d15028d33e7dbddc74d8c6eefac6d66e357f024dca15afdfb8156b0cf969ab093c26baa43ebf7c1ac88f4275ef4bdc91c1cc69c5aa7b439a042ed966edea30f +DIST sancp-1.6.1.fix200606.d.patch 6847 BLAKE2B 2d3d2369738adef1ae5ea37cfcab5952be243af269574292e042e361d7d4d02174bbaea2769f5fa6bf802eea6ae9559a3b637ee4dbce1b53715f1e4b66f9df51 SHA512 474a69052a2b9642fdc59e28c0237852d49b7b05445f0ffbbd2ea3f01b70a44e10ee49fba6294b413a53afe50271aaf88f979f8c479fb4b464b3ba5a70534276 +DIST sancp-1.6.1.tar.gz 69986 BLAKE2B 66ed4f5817f1bc299edc66441eea97fa0deeb0fffb15aeb251e3b0351d35f1c25aa452b30e0ba3feb80d306929687448228d0b6ac96e8deaf16c83322b73916a SHA512 41c6b35a2e7295d3b8185b9cc556c56b285cae7542c7ace78e663e54cef8d470bfa2ee083d9837fa34cf5ad1e7c325fb838b00e4f776f5662cade7d61e07145c diff --git a/net-analyzer/sancp/files/sancp-1.6.1-compiler.patch b/net-analyzer/sancp/files/sancp-1.6.1-compiler.patch new file mode 100644 index 000000000000..d7816cbdd5de --- /dev/null +++ b/net-analyzer/sancp/files/sancp-1.6.1-compiler.patch @@ -0,0 +1,45 @@ +--- a/Makefile 2004-01-19 23:04:56.000000000 +0100 ++++ b/Makefile 2010-09-15 02:02:26.000000000 +0200 +@@ -1,26 +1,26 @@ + + # !!! Uncomment this CFLAGS for a small binary !!! +-CFLAGS = -O3 -s -I/usr/include/pcap -L/usr/lib/libpcap.so.0.6.2 ++CFLAGS += -I/usr/include/pcap -L/usr/lib/libpcap.so.0.6.2 + + # !!! or uncomment this CFLAGS for a large binary with symbols; use for debugging !!! + #CFLAGS = -O0 -g -I/usr/include/pcap -L/usr/lib/libpcap.so.0.6.2 + + final : sancp.cc Makefile +- if [ ! -f build_acl.o -o build_acl.cc -nt build_acl.o ]; then g++ -Wall $(CFLAGS) -c build_acl.cc -o build_acl.o; fi +- if [ ! -f misc_functs.o -o misc_functs.cc -nt misc_functs.o ]; then g++ -Wall $(CFLAGS) -c misc_functs.cc -o misc_functs.o; fi +- if [ ! -f outputFileHandle.o -o outputFileHandle.cc -nt outputFileHandle.o ]; then g++ -Wall $(CFLAGS) -c outputFileHandle.cc -o outputFileHandle.o; fi +- if [ ! -f apply_rule.o -o apply_rule.cc -nt apply_rule.o ]; then g++ -Wall $(CFLAGS) -c apply_rule.cc -o apply_rule.o; fi +- if [ ! -f decode.o -o decode.cc -nt decode.o ]; then g++ -Wall $(CFLAGS) -c decode.cc -o decode.o; fi +- if [ ! -f fileHandle.o -o fileHandle.cc -nt fileHandle.o ]; then g++ -Wall $(CFLAGS) -c fileHandle.cc -o fileHandle.o; fi +- if [ ! -f MemoryPool.o -o MemoryPool.cc -nt MemoryPool.o ]; then g++ -Wall $(CFLAGS) -c MemoryPool.cc -o MemoryPool.o; fi +- if [ ! -f pcapFileHandle.o -o pcapFileHandle.cc -nt pcapFileHandle.o ]; then g++ -Wall $(CFLAGS) -c pcapFileHandle.cc -o pcapFileHandle.o; fi +- if [ ! -f sancp.o -o sancp.cc -nt sancp.o ]; then g++ -Wall $(CFLAGS) -c sancp.cc -o sancp.o; fi +- if [ ! -f pcap_functions.o -o pcap_functions.c -nt pcap_functions.o ]; then gcc -Wall $(CFLAGS) -c pcap_functions.c -o pcap_functions.o; fi +- if [ ! -f help.o -o help.cc -nt help.o ]; then g++ -Wall $(CFLAGS) -c help.cc -o help.o ; fi +- if [ ! -f permissions.o -o permissions.cc -nt permissions.o ]; then g++ -Wall $(CFLAGS) -c permissions.cc -o permissions.o ; fi +- if [ ! -f check_packet.o -o check_packet.cc -nt check_packet.o ]; then g++ -Wall $(CFLAGS) -c check_packet.cc -o check_packet.o; fi +- if [ ! -f statefull_logging.o -o statefull_logging.cc -nt statefull_logging.o ]; then g++ -Wall $(CFLAGS) -c statefull_logging.cc -o statefull_logging.o ; fi +- g++ -Wall $(CFLAGS) -o sancp sancp.o misc_functs.o check_packet.o statefull_logging.o build_acl.o apply_rule.o decode.o pcap_functions.o pcapFileHandle.o fileHandle.o MemoryPool.o help.o permissions.o outputFileHandle.o -lpcap ++ if [ ! -f build_acl.o -o build_acl.cc -nt build_acl.o ]; then $(CXX) -Wall $(CFLAGS) -c build_acl.cc -o build_acl.o; fi ++ if [ ! -f misc_functs.o -o misc_functs.cc -nt misc_functs.o ]; then $(CXX) -Wall $(CFLAGS) -c misc_functs.cc -o misc_functs.o; fi ++ if [ ! -f outputFileHandle.o -o outputFileHandle.cc -nt outputFileHandle.o ]; then $(CXX) -Wall $(CFLAGS) -c outputFileHandle.cc -o outputFileHandle.o; fi ++ if [ ! -f apply_rule.o -o apply_rule.cc -nt apply_rule.o ]; then $(CXX) -Wall $(CFLAGS) -c apply_rule.cc -o apply_rule.o; fi ++ if [ ! -f decode.o -o decode.cc -nt decode.o ]; then $(CXX) -Wall $(CFLAGS) -c decode.cc -o decode.o; fi ++ if [ ! -f fileHandle.o -o fileHandle.cc -nt fileHandle.o ]; then $(CXX) -Wall $(CFLAGS) -c fileHandle.cc -o fileHandle.o; fi ++ if [ ! -f MemoryPool.o -o MemoryPool.cc -nt MemoryPool.o ]; then $(CXX) -Wall $(CFLAGS) -c MemoryPool.cc -o MemoryPool.o; fi ++ if [ ! -f pcapFileHandle.o -o pcapFileHandle.cc -nt pcapFileHandle.o ]; then $(CXX) -Wall $(CFLAGS) -c pcapFileHandle.cc -o pcapFileHandle.o; fi ++ if [ ! -f sancp.o -o sancp.cc -nt sancp.o ]; then $(CXX) -Wall $(CFLAGS) -c sancp.cc -o sancp.o; fi ++ if [ ! -f pcap_functions.o -o pcap_functions.c -nt pcap_functions.o ]; then $(CC) -Wall $(CFLAGS) -c pcap_functions.c -o pcap_functions.o; fi ++ if [ ! -f help.o -o help.cc -nt help.o ]; then $(CXX) -Wall $(CFLAGS) -c help.cc -o help.o ; fi ++ if [ ! -f permissions.o -o permissions.cc -nt permissions.o ]; then $(CXX) -Wall $(CFLAGS) -c permissions.cc -o permissions.o ; fi ++ if [ ! -f check_packet.o -o check_packet.cc -nt check_packet.o ]; then $(CXX) -Wall $(CFLAGS) -c check_packet.cc -o check_packet.o; fi ++ if [ ! -f statefull_logging.o -o statefull_logging.cc -nt statefull_logging.o ]; then $(CXX) -Wall $(CFLAGS) -c statefull_logging.cc -o statefull_logging.o ; fi ++ $(CXX) -Wall $(CFLAGS) $(LDFLAGS) -o sancp sancp.o misc_functs.o check_packet.o statefull_logging.o build_acl.o apply_rule.o decode.o pcap_functions.o pcapFileHandle.o fileHandle.o MemoryPool.o help.o permissions.o outputFileHandle.o -lpcap + + clean : + rm -f *.o sancp diff --git a/net-analyzer/sancp/files/sancp-1.6.1-gcc6.patch b/net-analyzer/sancp/files/sancp-1.6.1-gcc6.patch new file mode 100644 index 000000000000..e56d7114468e --- /dev/null +++ b/net-analyzer/sancp/files/sancp-1.6.1-gcc6.patch @@ -0,0 +1,26 @@ +--- a/pcapFileHandle.h ++++ b/pcapFileHandle.h +@@ -16,7 +16,12 @@ + + #define PCAP_HEADER_SIZE 24 + +-const char pcap_header[] = { 0xd4,0xc3,0xb2,0xa1,0x02,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x4e,0x00,0x00,0x01,0x00,0x00,0x00 }; ++const char pcap_header[] = { ++ (char) 0xd4,(char) 0xc3,(char) 0xb2,(char) 0xa1,(char) 0x02,(char) 0x00, ++ (char) 0x04,(char) 0x00,(char) 0x00,(char) 0x00,(char) 0x00,(char) 0x00, ++ (char) 0x00,(char) 0x00,(char) 0x00,(char) 0x00,(char) 0x20,(char) 0x4e, ++ (char) 0x00,(char) 0x00,(char) 0x01,(char) 0x00,(char) 0x00,(char) 0x00 ++}; + + class pcapFileHandle : public fileHandle { + +--- a/sancp.h ++++ b/sancp.h +@@ -223,7 +223,6 @@ + #define R_URG 0x20 + #define R_RES2 0x40 + #define R_RES1 0x80 +-#define max(i,j) (((i)>(j)) ? (i) : (j)) + #define SIZE_OF_CLASS_C 11 + + struct t_ports { diff --git a/net-analyzer/sancp/files/sancp.confd b/net-analyzer/sancp/files/sancp.confd new file mode 100644 index 000000000000..31cbef82ec1b --- /dev/null +++ b/net-analyzer/sancp/files/sancp.confd @@ -0,0 +1,15 @@ +# Config file for /etc/init.d/sancp +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +# Interface to listen on +IFACE="eth0" + +# Directory to log in +LOGDIR="/var/log/sancp" + +# Default config file +CONF="/etc/sancp/sancp.conf" + +# You could add more options :) +SANCP_OPTS="-d $LOGDIR/today -i $IFACE -c $CONF -u sancp -g sancp" diff --git a/net-analyzer/sancp/files/sancp.rc1 b/net-analyzer/sancp/files/sancp.rc1 new file mode 100644 index 000000000000..07745f675676 --- /dev/null +++ b/net-analyzer/sancp/files/sancp.rc1 @@ -0,0 +1,42 @@ +#!/sbin/openrc-run +# Copyright 1999-2005 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +today=$(date '+%Y-%m-%d') + +depend() { + need net +} +checkconfig() { + if [ ! -e /etc/sancp/sancp.conf ] ; then + eerror "You need an /etc/sancp/sancp.conf to run sancp" + return 1 + fi +} + +start() { + checkconfig || return 1 + + # Today's log directory + if [ ! -d $LOGDIR/$today ]; then + /bin/mkdir $LOGDIR/$today + /bin/rm -f $LOGDIR/today + fi + + # today/ directory :) + if [ ! -d $LOGDIR/today ]; then + /bin/ln -s $LOGDIR/$today $LOGDIR/today + fi + + ebegin "Starting sancp" + start-stop-daemon --start --quiet -m --pidfile /var/run/sancp.pid \ + --exec /usr/bin/sancp \ + -- ${SANCP_OPTS} > /var/log/sancp.log 2>&1 & + eend $? +} + +stop() { + ebegin "Stopping sancp" + start-stop-daemon --stop --quiet --pidfile /var/run/sancp.pid + eend $? +} diff --git a/net-analyzer/sancp/files/sguil_sancp.conf b/net-analyzer/sancp/files/sguil_sancp.conf new file mode 100644 index 000000000000..f559286e7bb3 --- /dev/null +++ b/net-analyzer/sancp/files/sguil_sancp.conf @@ -0,0 +1,69 @@ +# $Id: sancp.conf,v 1.1 2004/03/19 20:33:59 bamm Exp $ # +# +# This sancp.conf is distributed as part of sguil (http://sguil.sf.net). +# It's purpose is to define a default output that is compatible with table +# schema defined by sguil. Please read the README.sancp for more information +# +# sancp is copyrighted by John Curry and can be downloaded at: +# www.metre.net/sancp.html +# + +# SANCP VERSION 1.5.3 + +# Currently, sguil only supports the 'stats' output and we want it in +# timestamped fields +default stats tsfilename stats + +# Time in seconds we write a new file if expired cnxs are available +default flush_interval=30 +# This tells sancp to open new file handle, write, and close in one step +default burst_mode=enable + +# Default timeout: how many secs to wait after the last packet till we consider the cnx closed +default timeout=120 + +# Conforms with out sguil sancp table schema +format stats sancp_id,start_time_gmt,stop_time_gmt,duration,ip_proto,src_ip_decimal,src_port,dst_ip_decimal,dst_port,src_pkts,src_bytes,dst_pkts,dst_bytes,sflags,dflags + +# From here on you define what stats/cnxs/sessions/flows (whatever you +# want to call it) get logged. Please read the sancp documention for +# more information. Most of the below are examples of setting +# variables for complex rules. + +var ip 8 # ether proto 0x0800 # ip traffic + +# define some ip protocols + +var icmp 1 +var tcp 6 +var udp 17 + +# define some tcp protocols + +var http 80 +var https 443 +var smtp 25 +var dns 53 + +var HOME_NET 127.0.0.1 +#var WWW_NET 192.168.1.0/24 +#var MAIL_SERVER 192.168.1.2 +#var MAIL_SERVER2 192.168.1.3 + + +# Default output logging for each connection +# We don't use realtime or pcap logging at this point so we pass them +default realtime=pass +default pcap=pass + +# Here is where our "rules" start. We log all stats by default +# so this is defining exceptions. +# +# first six fields are required before rule options can be used +# +# eth_proto src_ip dst_ip ip_proto src_port dst_port +# + +# Here is an example if ignoring outbound HTTP stats. +#ip HOME_NET any tcp any http, stats pass +#ip HOME_NET any tcp any https, stats pass diff --git a/net-analyzer/sancp/metadata.xml b/net-analyzer/sancp/metadata.xml new file mode 100644 index 000000000000..3b4ae7ecf7ac --- /dev/null +++ b/net-analyzer/sancp/metadata.xml @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>netmon@gentoo.org</email> + <name>Gentoo network monitoring and analysis project</name> + </maintainer> + <use> + <flag name="sguil">Enable sguil (The Analyst Console for Network Security Monitoring) support</flag> + </use> + <upstream> + <remote-id type="sourceforge">sancp</remote-id> + </upstream> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/sancp/sancp-1.6.1-r4.ebuild b/net-analyzer/sancp/sancp-1.6.1-r4.ebuild new file mode 100644 index 000000000000..4f1bfd0b4e9f --- /dev/null +++ b/net-analyzer/sancp/sancp-1.6.1-r4.ebuild @@ -0,0 +1,69 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +inherit eutils toolchain-funcs user + +DESCRIPTION="collect network traffic statistics and store them in pcap format" +HOMEPAGE="http://www.metre.net/sancp.html" +SRC_URI=" + http://www.metre.net/files/${P}.tar.gz + http://sancp.sourceforge.net/${PN}-1.6.1.fix200511.a.patch + http://sancp.sourceforge.net/${PN}-1.6.1.fix200511.b.patch + http://sancp.sourceforge.net/${PN}-1.6.1.fix200601.c.patch + http://sancp.sourceforge.net/${PN}-1.6.1.fix200606.d.patch +" + +LICENSE="QPL GPL-2" + +SLOT="0" +KEYWORDS="~amd64 ~x86" + +IUSE="sguil" + +RDEPEND="net-libs/libpcap" +DEPEND="${RDEPEND}" + +pkg_setup() { + enewgroup sancp + enewuser sancp -1 -1 /dev/null sancp +} + +src_prepare() { + epatch "${DISTDIR}"/${PN}-1.6.1.fix200511.a.patch + epatch "${DISTDIR}"/${PN}-1.6.1.fix200511.b.patch + # bug 138337 + epatch "${DISTDIR}"/${PN}-1.6.1.fix200601.c.patch + epatch "${DISTDIR}"/${PN}-1.6.1.fix200606.d.patch + epatch "${FILESDIR}"/${P}-compiler.patch + epatch "${FILESDIR}"/${P}-gcc6.patch + + tc-export CXX CC +} + +src_install() { + keepdir /var/log/sancp/ + dodoc docs/CHANGES docs/fields.LIST docs/README docs/SETUP \ + "${FILESDIR}"/sguil_sancp.conf etc/sancp/sancp.conf + + insinto /etc/sancp + if use sguil ; then + newins "${FILESDIR}"/sguil_sancp.conf sancp.conf + else + doins etc/sancp/sancp.conf + fi + + dobin sancp + + newinitd "${FILESDIR}"/sancp.rc1 sancp + newconfd "${FILESDIR}"/sancp.confd sancp + if use sguil ; then + sed -i -e /^SANCP_OPTS/s:'sancp':"sguil":g \ + -e s:'-d $LOGDIR/today':"-d /var/lib/sguil/$(hostname)/sancp": \ + "${D}/etc/conf.d/sancp" + fi + + fowners sancp:sancp /var/log/sancp + fperms 0770 /var/log/sancp +} diff --git a/net-analyzer/sarg/Manifest b/net-analyzer/sarg/Manifest new file mode 100644 index 000000000000..46ce89cb0525 --- /dev/null +++ b/net-analyzer/sarg/Manifest @@ -0,0 +1 @@ +DIST sarg-2.4.0.tar.gz 1371812 BLAKE2B 4a07e97f5bdf36dc9ea867517f511dff4e2b501c01231c523778b283000bcf8e6eeb26e219c3d710551ad31f939a47453341b6a8a5575df1d8f3957461326675 SHA512 cb314c15379b01c1ad874e473fcc41664ed5a0dd492b8537d5f375e2c00d9e083679a01da5e3506775b7d66f2d43ba698864ffbd36f5e5e512ef58882148739b diff --git a/net-analyzer/sarg/files/sarg-2.3.10-config.patch b/net-analyzer/sarg/files/sarg-2.3.10-config.patch new file mode 100644 index 000000000000..cfbf103d5b2a --- /dev/null +++ b/net-analyzer/sarg/files/sarg-2.3.10-config.patch @@ -0,0 +1,94 @@ +--- a/log.c ++++ b/log.c +@@ -241,7 +241,7 @@ + strcpy(LogoTextColor,"#006699"); + strcpy(FontSize,"9px"); + strcpy(TempDir,"/tmp"); +- strcpy(OutputDir,"/var/www/html/squid-reports"); ++ strcpy(OutputDir,"/var/www/localhost/htdocs/squid-reports"); + AnonymousOutputFiles=false; + Ip2Name=false; + strcpy(DateFormat,"u"); +--- a/sarg-php/sarg-squidguard-block.php ++++ b/sarg-php/sarg-squidguard-block.php +@@ -26,8 +26,8 @@ + */ + + // Change to squidGuard and sarg config file paths +-$SargConf = "/usr/local/sarg/sarg.conf"; +-$squidGuardConf = "/usr/local/squidGuard/squidGuard.conf"; ++$SargConf = "/etc/sarg/sarg.conf"; ++$squidGuardConf = "/etc/squidGuard/squidGuard.conf"; + + global $SargConf; + global $dbhome; +@@ -37,7 +37,7 @@ + include_once("style.php"); + + $url = $_GET['url']; +-$squidGuard_conf = '/usr/local/squidGuard/squidGuard.conf'; ++$squidGuard_conf = '/etc/squidGuard/squidGuard.conf'; + + function parse_config($line,$clave) { + if (preg_match("/dbhome/i", $line)) { +--- a/sarg-php/sarg-block-it.php ++++ b/sarg-php/sarg-block-it.php +@@ -25,7 +25,7 @@ + * + */ + +-$filename = "/usr/local/squid/etc/block.txt"; ++$filename = "/etc/squid/etc/block.txt"; + + $url = $_GET['url']; + $url = $url."\n"; +--- a/htaccess ++++ b/htaccess +@@ -1,4 +1,4 @@ +-AuthUserFile /usr/local/sarg/passwd ++AuthUserFile /etc/sarg/passwd + AuthName "SARG, Squid Analysis Report Generator" + AuthType Basic + <Limit GET POST> +--- a/sarg.conf ++++ b/sarg.conf +@@ -4,7 +4,7 @@ + # Where is the access.log file + # sarg -l file + # +-#access_log /usr/local/squid/var/logs/access.log ++#access_log /var/log/squid/access.log + + # TAG: graphs yes|no + # Use graphics where is possible. +@@ -117,7 +117,7 @@ + # The reports will be saved in that directory + # sarg -o dir + # +-#output_dir /var/www/html/squid-reports ++#output_dir /var/www/localhost/htdocs/squid-reports + + # TAG: anonymous_output_files yes/no + # Use anonymous file and directory names in the report. If it is set to +@@ -545,7 +545,7 @@ + # Generate reports from SquidGuard logs. + # Use 'none' to disable. + # You can use sarg -L filename to use an alternate squidGuard log. +-# squidguard_conf /usr/local/squidGuard/squidGuard.conf ++# squidguard_conf /etc/squidGuard/squidGuard.conf + # + #squidguard_conf none + +--- a/user_limit_block ++++ b/user_limit_block +@@ -24,8 +24,8 @@ + # + # + +-conf="/usr/local/sarg/sarg.conf" +-squid_password_file="/usr/local/squid/etc/passwd" ++conf="/etc/sarg/sarg.conf" ++squid_password_file="/etc/squid/passwd" + tmp="/tmp/sarg_limit.$$" + + limit_file=`grep "per_user_limit" $conf|grep -v "#"|awk '{print $2}'` diff --git a/net-analyzer/sarg/files/sarg-2.3.11-Werror.patch b/net-analyzer/sarg/files/sarg-2.3.11-Werror.patch new file mode 100644 index 000000000000..035578793934 --- /dev/null +++ b/net-analyzer/sarg/files/sarg-2.3.11-Werror.patch @@ -0,0 +1,25 @@ +--- a/configure.ac ++++ b/configure.ac +@@ -46,18 +46,18 @@ + CFLAGS="${saved_CFLAGS}" + fi + +-AC_MSG_CHECKING([for implicit-function-declaration error flag in $CC]) ++AC_MSG_CHECKING([for implicit-function-declaration warning flag in $CC]) + saved_CFLAGS="${CFLAGS}" +-CFLAGS="${CFLAGS} -Werror=implicit-function-declaration" ++CFLAGS="${CFLAGS} -Wimplicit-function-declaration" + AC_COMPILE_IFELSE([AC_LANG_SOURCE([])],[have_implicit_function_declaration="yes"],[have_implicit_function_declaration="no"]) + AC_MSG_RESULT($have_implicit_function_declaration) + if test "$have_implicit_function_declaration" = "no" ; then + CFLAGS="${saved_CFLAGS}" + fi + +-AC_MSG_CHECKING([for format error flag in $CC]) ++AC_MSG_CHECKING([for format warning flag in $CC]) + saved_CFLAGS="${CFLAGS}" +-CFLAGS="${CFLAGS} -Werror=format" ++CFLAGS="${CFLAGS} -Wformat" + AC_COMPILE_IFELSE([AC_LANG_SOURCE([])],[have_error_format="yes"],[have_error_format="no"]) + AC_MSG_RESULT($have_error_format) + if test "$have_error_format" = "no" ; then diff --git a/net-analyzer/sarg/files/sarg-2.3.11-configure.patch b/net-analyzer/sarg/files/sarg-2.3.11-configure.patch new file mode 100644 index 000000000000..583bfeb0e8e1 --- /dev/null +++ b/net-analyzer/sarg/files/sarg-2.3.11-configure.patch @@ -0,0 +1,31 @@ +--- a/configure.ac ++++ b/configure.ac +@@ -2,6 +2,7 @@ + AC_INIT([sarg],[2.3.9]) + AC_CONFIG_SRCDIR([log.c]) + AC_CONFIG_AUX_DIR(cfgaux) ++AC_CONFIG_MACRO_DIR(m4) + + AC_CANONICAL_HOST + +@@ -26,6 +27,11 @@ + dnl C99 support is required to define LLONG_MAX (at least on CentOS 5.7) + AC_PROG_CC_C99 + ++dnl mkdir_p / MKDIR_P ++AC_PROG_MKDIR_P ++mkdir_p="$MKDIR_P" ++AC_SUBST(mkdir_p) ++ + # Report more warnings to improve code quality. + CFLAGS="${CFLAGS} -Wall -Wno-sign-compare" + +@@ -60,7 +66,7 @@ + + case "$host" in + *-solaris*) +- LDFLAGS="${LDFLAGS} -lsocket -lnsl" ++ LIBS="${LIBS} -lsocket -lnsl" + CFLAGS="-DSOLARIS ${CFLAGS}" + ;; + esac diff --git a/net-analyzer/sarg/files/sarg-2.3.11-format.patch b/net-analyzer/sarg/files/sarg-2.3.11-format.patch new file mode 100644 index 000000000000..f2dc7d39b1e8 --- /dev/null +++ b/net-analyzer/sarg/files/sarg-2.3.11-format.patch @@ -0,0 +1,36 @@ +--- a/report.c ++++ b/report.c +@@ -54,7 +54,7 @@ + char accsmart[MAXLEN]; + char crc2[MAXLEN/2 -1]; + char siteind[MAX_TRUNCATED_URL]; +- char arqtt[256]; ++ char arqtt[MAX_USER_FNAME_LEN * 2 + MAXLEN + 10]; + char *oldurltt=NULL; + char oldaccdiatt[11],oldacchoratt[9]; + char tmp3[MAXLEN]; +--- a/index.c ++++ b/index.c +@@ -89,9 +89,9 @@ + char monthdir[MAXLEN]; + char monthname1[9], monthname2[9]; + char nmonth[30]; +- char monthnum[10]; ++ char monthnum[15]; + char dayindex[MAXLEN]; +- char daynum[10]; ++ char daynum[15]; + char title[80]; + int yearsort[150]; + int nyears; +--- a/userinfo.c ++++ b/userinfo.c +@@ -67,7 +67,7 @@ + int skip; + int flen; + int count, clen; +- char cstr[9]; ++ char cstr[10]; + + last=NULL; + for (group=first_user_group ; group ; group=group->next) { diff --git a/net-analyzer/sarg/files/sarg-2.4.0-config.patch b/net-analyzer/sarg/files/sarg-2.4.0-config.patch new file mode 100644 index 000000000000..1168f98337d7 --- /dev/null +++ b/net-analyzer/sarg/files/sarg-2.4.0-config.patch @@ -0,0 +1,81 @@ +--- a/log.c ++++ b/log.c +@@ -151,7 +151,7 @@ + strcpy(FontSize,"9px"); + strcpy(TempDir,"/tmp"); + TempDirPath[0] = '\0'; +- strcpy(OutputDir,"/var/www/html/squid-reports"); ++ strcpy(OutputDir,"/var/www/localhost/htdocs/squid-reports"); + AnonymousOutputFiles=false; + Ip2Name=false; + DateFormat='u'; +--- a/htaccess ++++ b/htaccess +@@ -1,4 +1,4 @@ +-AuthUserFile /usr/local/sarg/passwd ++AuthUserFile /etc/sarg/passwd + AuthName "SARG, Squid Analysis Report Generator" + AuthType Basic + <Limit GET POST> +--- a/sarg.conf ++++ b/sarg.conf +@@ -17,7 +17,7 @@ + # If some files are passed on the command line with "sarg -l file" or + # "sarg file", the files listed here are ignored. + # +-#access_log /usr/local/squid/var/logs/access.log ++#access_log /var/log/squid/access.log + + # TAG: graphs yes|no + # Use graphics where is possible. +@@ -147,7 +147,7 @@ + # The reports will be saved in that directory + # sarg -o dir + # +-#output_dir /var/www/html/squid-reports ++#output_dir /var/www/localhost/htdocs/squid-reports + + # TAG: anonymous_output_files yes/no + # Use anonymous file and directory names in the report. If it is set to +@@ -632,7 +632,7 @@ + # Generate reports from SquidGuard logs. + # Use 'none' to disable. + # You can use sarg -L filename to use an alternate squidGuard log. +-# squidguard_conf /usr/local/squidGuard/squidGuard.conf ++# squidguard_conf /etc/squidGuard/squidGuard.conf + # + #squidguard_conf none + +--- a/user_limit_block ++++ b/user_limit_block +@@ -24,8 +24,8 @@ + # + # + +-conf="/usr/local/sarg/sarg.conf" +-squid_password_file="/usr/local/squid/etc/passwd" ++conf="/etc/sarg/sarg.conf" ++squid_password_file="/etc/squid/passwd" + tmp="/tmp/sarg_limit.$$" + + limit_file=`grep "per_user_limit" $conf|grep -v "#"|awk '{print $2}'` +--- a/sarg-php/config.php.inc ++++ b/sarg-php/config.php.inc +@@ -1,13 +1,13 @@ + <?php + + // Change to squidGuard and sarg config file paths +-$SargConf = "/usr/local/sarg/sarg.conf"; +-$squidGuardConf = "/usr/local/squidGuard/squidGuard.conf"; ++$SargConf = "/etc/sarg/sarg.conf"; ++$squidGuardConf = "/etc/squidGuard/squidGuard.conf"; + + // File where URL to block will be appended +-$DefaultSquidBlock = "/usr/local/squid/etc/block.txt"; ++$DefaultSquidBlock = "/etc/squid/etc/block.txt"; + + // Choose the locale you want to use to display messages (it must exist on your system) +-$language = "fr_BE.utf-8"; ++$language = "POSIX"; + + ?> diff --git a/net-analyzer/sarg/files/sarg-2.4.0-configure.patch b/net-analyzer/sarg/files/sarg-2.4.0-configure.patch new file mode 100644 index 000000000000..7ca44a6901f1 --- /dev/null +++ b/net-analyzer/sarg/files/sarg-2.4.0-configure.patch @@ -0,0 +1,43 @@ +--- a/configure.ac ++++ b/configure.ac +@@ -35,6 +35,11 @@ + dnl C99 support is required to define LLONG_MAX (at least on CentOS 5.7) + AC_PROG_CC_C99 + ++dnl mkdir_p / MKDIR_P ++AC_PROG_MKDIR_P ++mkdir_p="$MKDIR_P" ++AC_SUBST(mkdir_p) ++ + # Report more warnings to improve code quality. + CFLAGS="${CFLAGS} -Wall" + +@@ -50,23 +55,23 @@ + # Don't compare signs as it is a mess + CFLAGS="${CFLAGS} -Wno-sign-compare" + +-AC_MSG_CHECKING([for implicit-function-declaration error flag in $CC]) ++AC_MSG_CHECKING([for implicit-function-declaration warning flag in $CC]) + saved_CFLAGS="${CFLAGS}" +-CFLAGS="${CFLAGS} -Werror=implicit-function-declaration" ++CFLAGS="${CFLAGS} -Wimplicit-function-declaration" + AC_COMPILE_IFELSE([AC_LANG_SOURCE([])],[have_implicit_function_declaration="yes"],[have_implicit_function_declaration="no"]) + AC_MSG_RESULT($have_implicit_function_declaration) + AS_IF([test "$have_implicit_function_declaration" = "no"],[CFLAGS="${saved_CFLAGS}"]) + +-AC_MSG_CHECKING([for format error flag in $CC]) ++AC_MSG_CHECKING([for format warning flag in $CC]) + saved_CFLAGS="${CFLAGS}" +-CFLAGS="${CFLAGS} -Werror=format" ++CFLAGS="${CFLAGS} -Wformat" + AC_COMPILE_IFELSE([AC_LANG_SOURCE([])],[have_error_format="yes"],[have_error_format="no"]) + AC_MSG_RESULT($have_error_format) + AS_IF([test "$have_error_format" = "no"],[CFLAGS="${saved_CFLAGS}"]) + + case "$host" in + *-solaris*) +- LDFLAGS="${LDFLAGS} -lsocket -lnsl" ++ LIBS="${LIBS} -lsocket -lnsl" + CFLAGS="-DSOLARIS ${CFLAGS}" + ;; + esac diff --git a/net-analyzer/sarg/files/sarg-2.4.0-fabs.patch b/net-analyzer/sarg/files/sarg-2.4.0-fabs.patch new file mode 100644 index 000000000000..e9b73d88fb4a --- /dev/null +++ b/net-analyzer/sarg/files/sarg-2.4.0-fabs.patch @@ -0,0 +1,11 @@ +--- a/btree_cache.c ++++ b/btree_cache.c +@@ -268,7 +268,7 @@ + static struct bt *get_disbalanced_node(struct bt *node) + { + struct bt *rdn; +- if (fabs(node->balanceinfo) > 1) ++ if (abs(node->balanceinfo) > 1) + return node; + if (node->left) + { diff --git a/net-analyzer/sarg/files/sarg-2.4.0-format.patch b/net-analyzer/sarg/files/sarg-2.4.0-format.patch new file mode 100644 index 000000000000..686f659c1300 --- /dev/null +++ b/net-analyzer/sarg/files/sarg-2.4.0-format.patch @@ -0,0 +1,22 @@ +--- a/userinfo.c ++++ b/userinfo.c +@@ -78,7 +78,7 @@ + int skip; + int flen; + int count, clen; +- char cstr[9]; ++ char cstr[10]; + char filename[MAX_USER_FNAME_LEN]; + + if (!UserStrings) { +--- a/index.c ++++ b/index.c +@@ -535,7 +535,7 @@ + struct dirent *direntp; + char yearindex[MAXLEN]; + char yeardir[MAXLEN]; +- char yearnum[10]; ++ char yearnum[15]; + int yearsort[150]; + int nyears; + int year; diff --git a/net-analyzer/sarg/metadata.xml b/net-analyzer/sarg/metadata.xml new file mode 100644 index 000000000000..931b865753df --- /dev/null +++ b/net-analyzer/sarg/metadata.xml @@ -0,0 +1,19 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<maintainer type="project"> +<email>netmon@gentoo.org</email> +<name>Gentoo network monitoring and analysis project</name> +</maintainer> +<longdescription>Squid Analysis Report Generator is a tool that allow you to view where your users are going to on the Internet. Sarg provides many informations about Squid users activities: times, bytes, sites, etc...</longdescription> +<use> +<flag name="doublecheck">Make sarg double check the data it manipulates and output a warning if an error is found</flag> +<flag name="gd">Enable support for graphs in reports through <pkg>media-libs/gd</pkg></flag> +<flag name="glob">Disable to ignore wildcards in file names</flag> +<flag name="pcre">Enable support for regular expressions in the hostalias file through <pkg>dev-libs/libpcre</pkg></flag> +</use> +<upstream> +<remote-id type="sourceforge">sarg</remote-id> +</upstream> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/sarg/sarg-2.4.0.ebuild b/net-analyzer/sarg/sarg-2.4.0.ebuild new file mode 100644 index 000000000000..c2da09b5fa35 --- /dev/null +++ b/net-analyzer/sarg/sarg-2.4.0.ebuild @@ -0,0 +1,60 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +inherit autotools flag-o-matic + +DESCRIPTION="Squid Analysis Report Generator" +HOMEPAGE="https://sourceforge.net/projects/sarg/" +SRC_URI="mirror://sourceforge/${PN}/${P/_/-}.tar.gz" + +LICENSE="GPL-2" +KEYWORDS="amd64 ppc x86" +SLOT="0" +IUSE="bzip2 doublecheck +gd +glob ldap lzma pcre zlib" + +RDEPEND=" + bzip2? ( app-arch/bzip2 ) + gd? ( media-libs/gd[png,truetype] ) + ldap? ( net-nds/openldap ) + lzma? ( app-arch/xz-utils ) + pcre? ( dev-libs/libpcre ) + zlib? ( sys-libs/zlib ) +" +DEPEND=" + ${RDEPEND} +" +DOCS=( BETA-TESTERS CONTRIBUTORS DONATIONS README ChangeLog htaccess ) +PATCHES=( + "${FILESDIR}"/${PN}-2.4.0-config.patch + "${FILESDIR}"/${PN}-2.4.0-configure.patch + "${FILESDIR}"/${PN}-2.4.0-fabs.patch + "${FILESDIR}"/${PN}-2.4.0-format.patch +) +S=${WORKDIR}/${P/_/-} + +src_prepare() { + default + + eautoreconf +} + +src_configure() { + append-cflags -fcommon + econf \ + $(use_enable doublecheck) \ + $(use_with bzip2 bzlib) \ + $(use_with gd) \ + $(use_with glob) \ + $(use_with ldap) \ + $(use_with lzma liblzma) \ + $(use_with pcre) \ + $(use_with zlib) \ + --sysconfdir="${EPREFIX}/etc/sarg/" +} + +src_install() { + default + + dodoc documentation/* +} diff --git a/net-analyzer/sbd/Manifest b/net-analyzer/sbd/Manifest new file mode 100644 index 000000000000..06c30b3fe73d --- /dev/null +++ b/net-analyzer/sbd/Manifest @@ -0,0 +1 @@ +DIST sbd-1.37.tar.gz 83991 BLAKE2B 7dd0f1e3c428e9eed24ca513c99a242ec5bf2a147416b2a979335ff9c55b6d68ca8769ccd00e11637e0411c9537895fd2523a3f237be704d4540db5b4d12bbc9 SHA512 845f3eb20d3a6006f7afc9b60eecaa3049172b3fb2796058f18a13ddbfb7f2c9914bef45bd4f3557db814783717eae24fe13d46d22c65359ba3f816c6d52ea7c diff --git a/net-analyzer/sbd/metadata.xml b/net-analyzer/sbd/metadata.xml new file mode 100644 index 000000000000..f878628f97cd --- /dev/null +++ b/net-analyzer/sbd/metadata.xml @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>netmon@gentoo.org</email> + <name>Gentoo network monitoring and analysis project</name> + </maintainer> + <longdescription> +sbd is a Netcat-clone, designed to be portable and offer strong encryption. It +features AES-CBC-128 + HMAC-SHA1 encryption (by Christophe Devine), program +execution (-e option), choosing source port, continuous reconnection with delay, +and some other nice features. Only TCP/IP communication is supported. + </longdescription> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/sbd/sbd-1.37-r1.ebuild b/net-analyzer/sbd/sbd-1.37-r1.ebuild new file mode 100644 index 000000000000..514310c7e942 --- /dev/null +++ b/net-analyzer/sbd/sbd-1.37-r1.ebuild @@ -0,0 +1,33 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +inherit toolchain-funcs + +DESCRIPTION="Netcat-clone, designed to be portable and offer strong encryption" +HOMEPAGE="http://tigerteam.se/dl/sbd/" +SRC_URI="http://tigerteam.se/dl/sbd/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="amd64 ~hppa ~ppc x86" + +src_prepare() { + sed -i \ + -e '/ -o /{ s| $(UNIX_LDFLAGS) $(LDFLAGS)||g;s|$(CFLAGS)|& $(LDFLAGS)|g }' \ + Makefile || die +} + +src_compile() { + emake \ + CC="$(tc-getCC)" \ + CFLAGS="${CFLAGS}" \ + LDFLAGS="${LDFLAGS}" \ + unix +} + +src_install() { + dobin sbd + dodoc CHANGES README +} diff --git a/net-analyzer/scanlogd/Manifest b/net-analyzer/scanlogd/Manifest new file mode 100644 index 000000000000..a9a4cbfaab64 --- /dev/null +++ b/net-analyzer/scanlogd/Manifest @@ -0,0 +1 @@ +DIST scanlogd-2.2.7.tar.gz 11352 BLAKE2B 480e1ef78ac35ff04fb44961aa501f997786e20a3501f54f74b9e5761edba4736341d364a9a10772d795cb6025b88399bf3b56b0a980a0d2d0787f7a66eeeb22 SHA512 56238cb91a33524a9512914568984ed0d066eb84bea1c08551fbc4e02c9643a3f9535d59b364db00d538e4d9bcd9650ac24f2042584d3a9c639f99eb77ba1a7b diff --git a/net-analyzer/scanlogd/files/scanlogd-2.2.7-gentoo.patch b/net-analyzer/scanlogd/files/scanlogd-2.2.7-gentoo.patch new file mode 100644 index 000000000000..4d1d2f01c643 --- /dev/null +++ b/net-analyzer/scanlogd/files/scanlogd-2.2.7-gentoo.patch @@ -0,0 +1,21 @@ +--- a/Makefile ++++ b/Makefile +@@ -1,14 +1,11 @@ +-CC = gcc + LD = $(CC) + RM = rm -f +-CFLAGS = -Wall -O2 -fomit-frame-pointer +-LDFLAGS = -s + +-PCAP_H = -I/usr/include/pcap +-PCAP_L = -lpcap ++PCAP_H = $(shell pcap-config --cflags) ++PCAP_L = $(shell pcap-config --libs) + +-NIDS_H = -I/usr/local/include +-NIDS_L = -L/usr/local/lib -lnids -lnet -lpcap ++NIDS_H = -I/usr/include ++NIDS_L = -lnids + + PROJ = scanlogd + diff --git a/net-analyzer/scanlogd/files/scanlogd.rc b/net-analyzer/scanlogd/files/scanlogd.rc new file mode 100644 index 000000000000..ef600deb94f5 --- /dev/null +++ b/net-analyzer/scanlogd/files/scanlogd.rc @@ -0,0 +1,20 @@ +#!/sbin/openrc-run +# Copyright 1999-2004 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +depend() { + need net + use logger +} + +start() { + ebegin "Starting scanlogd" + start-stop-daemon --start --quiet --exec /usr/sbin/scanlogd + eend $? +} + +stop() { + ebegin "Stopping scanlogd" + start-stop-daemon --stop --quiet --exec /usr/sbin/scanlogd + eend $? +} diff --git a/net-analyzer/scanlogd/metadata.xml b/net-analyzer/scanlogd/metadata.xml new file mode 100644 index 000000000000..3ba608824724 --- /dev/null +++ b/net-analyzer/scanlogd/metadata.xml @@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<maintainer type="project"> +<email>netmon@gentoo.org</email> +<name>Gentoo network monitoring and analysis project</name> +</maintainer> +<use> +<flag name="nids">Use <pkg>net-libs/libnids</pkg> for packet capturing</flag> +<flag name="pcap">Use <pkg>net-libs/libpcap</pkg> for packet capturing</flag> +</use> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/scanlogd/scanlogd-2.2.7.ebuild b/net-analyzer/scanlogd/scanlogd-2.2.7.ebuild new file mode 100644 index 000000000000..b7c18a9d4cd0 --- /dev/null +++ b/net-analyzer/scanlogd/scanlogd-2.2.7.ebuild @@ -0,0 +1,46 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 +inherit eutils savedconfig toolchain-funcs user + +DESCRIPTION="a port scan detection tool" +SRC_URI="http://www.openwall.com/scanlogd/${P}.tar.gz" +HOMEPAGE="http://www.openwall.com/scanlogd/" + +LICENSE="scanlogd GPL-2" # GPL-2 for initscript +SLOT="0" +KEYWORDS="~amd64 ppc x86" +IUSE="+nids pcap" +REQUIRED_USE="?? ( nids pcap )" + +DEPEND=" + nids? ( net-libs/libnids ) + pcap? ( net-libs/libpcap ) +" +RDEPEND="${DEPEND}" + +src_prepare() { + epatch "${FILESDIR}"/${P}-gentoo.patch + restore_config params.h + tc-export CC +} + +src_compile() { + local target=linux + use nids && target=libnids + use pcap && target=libpcap + emake ${target} +} + +src_install() { + dosbin scanlogd + doman scanlogd.8 + newinitd "${FILESDIR}"/scanlogd.rc scanlogd + save_config params.h +} + +pkg_preinst() { + enewgroup scanlogd + enewuser scanlogd -1 -1 /dev/null scanlogd +} diff --git a/net-analyzer/scanssh/Manifest b/net-analyzer/scanssh/Manifest new file mode 100644 index 000000000000..c1452b7f0090 --- /dev/null +++ b/net-analyzer/scanssh/Manifest @@ -0,0 +1 @@ +DIST scanssh-2.1.tar.gz 111481 BLAKE2B 08ba8439cd02d597647f865fed68ef9eb32d63726f8d14bebe3b58a067b56eee70e01a1a7911ce69cf4466c0863d92d5d22e0202bb1cc60426ac283855438079 SHA512 1ddff6f8e51735bab28032c8d7cbb641ff0cd19a404a27ab489589ef1e30e3721dd486854eb4fef15368cc53f10c9c2650ffaf7fa7f767dc2202fcc5540ae59c diff --git a/net-analyzer/scanssh/files/scanssh-2.0-fix-warnings.diff b/net-analyzer/scanssh/files/scanssh-2.0-fix-warnings.diff new file mode 100644 index 000000000000..0ced6821efa9 --- /dev/null +++ b/net-analyzer/scanssh/files/scanssh-2.0-fix-warnings.diff @@ -0,0 +1,61 @@ +--- a/arc4random.c ++++ b/arc4random.c +@@ -1,5 +1,6 @@ + #include <sys/types.h> + #include <stdlib.h> ++#include <time.h> + + #include "config.h" + +--- a/interface.c ++++ b/interface.c +@@ -56,6 +56,13 @@ + + #include "interface.h" + ++#ifndef HAVE_STRLCPY ++ size_t strlcpy(char *, const char *, size_t); ++#endif ++#ifndef HAVE_STRLCAT ++ size_t strlcat(char *, const char *, size_t); ++#endif ++ + /* Prototypes */ + static int pcap_dloff(pcap_t *); + +--- a/md5.c ++++ b/md5.c +@@ -23,6 +23,7 @@ + copyright in any changes I have made; this code remains in the + public domain. */ + ++#include <string.h> + #include <sys/types.h> + + #ifdef HAVE_CONFIG_H +--- a/scanssh.c ++++ b/scanssh.c +@@ -78,6 +78,10 @@ + #define DNFPRINTF(y, x) + #endif + ++#ifndef HAVE_STRLCPY ++ size_t strlcpy(char *, const char *, size_t); ++#endif ++ + struct address_node { + TAILQ_ENTRY (address_node) an_next; + +--- a/xmalloc.c ++++ b/xmalloc.c +@@ -20,6 +20,10 @@ + + #include "config.h" + ++#ifndef HAVE_STRLCPY ++ size_t strlcpy(char *, const char *, size_t); ++#endif ++ + void * + xmalloc(size_t size) + { diff --git a/net-analyzer/scanssh/metadata.xml b/net-analyzer/scanssh/metadata.xml new file mode 100644 index 000000000000..1265aad9f0b0 --- /dev/null +++ b/net-analyzer/scanssh/metadata.xml @@ -0,0 +1,10 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<maintainer type="project"> + <email>netmon@gentoo.org</email> + <name>Gentoo network monitoring and analysis project</name> +</maintainer> +<longdescription>Scanssh protocol scanner - scans a list of addresses an networks for running SSH protocol servers and their version numbers.</longdescription> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/scanssh/scanssh-2.1-r1.ebuild b/net-analyzer/scanssh/scanssh-2.1-r1.ebuild new file mode 100644 index 000000000000..0aa7c1f944ad --- /dev/null +++ b/net-analyzer/scanssh/scanssh-2.1-r1.ebuild @@ -0,0 +1,38 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +DESCRIPTION="network scanner that gathers info on SSH protocols and versions" +HOMEPAGE="https://monkey.org/~provos/scanssh/" +SRC_URI="https://monkey.org/~provos/${P}.tar.gz" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~amd64 ~hppa ~ppc ~ppc64 ~sparc ~x86" + +DEPEND=" + dev-libs/libdnet + dev-libs/libevent:= + net-libs/libpcap +" +RDEPEND=" + ${DEPEND} +" +PATCHES=( + "${FILESDIR}"/${PN}-2.0-fix-warnings.diff +) + +src_prepare() { + default + touch configure +} + +src_compile() { + emake CFLAGS="${CFLAGS}" +} + +src_install() { + dobin scanssh + doman scanssh.1 +} diff --git a/net-analyzer/scanssh/scanssh-2.1.ebuild b/net-analyzer/scanssh/scanssh-2.1.ebuild new file mode 100644 index 000000000000..d154e29437a3 --- /dev/null +++ b/net-analyzer/scanssh/scanssh-2.1.ebuild @@ -0,0 +1,34 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 +inherit eutils + +DESCRIPTION="network scanner that gathers info on SSH protocols and versions" +HOMEPAGE="https://monkey.org/~provos/scanssh/" +SRC_URI="https://monkey.org/~provos/${P}.tar.gz" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="amd64 hppa ppc ~ppc64 sparc x86" + +DEPEND=" + dev-libs/libdnet + dev-libs/libevent + net-libs/libpcap +" +RDEPEND="${DEPEND}" + +src_prepare() { + epatch "${FILESDIR}"/${PN}-2.0-fix-warnings.diff + touch configure +} + +src_compile() { + emake CFLAGS="${CFLAGS}" +} + +src_install() { + dobin scanssh + doman scanssh.1 +} diff --git a/net-analyzer/scapy/Manifest b/net-analyzer/scapy/Manifest new file mode 100644 index 000000000000..386ca2e9f88a --- /dev/null +++ b/net-analyzer/scapy/Manifest @@ -0,0 +1,2 @@ +DIST scapy-2.4.2.tar.gz 3330071 BLAKE2B a40074594cd561b33d04364fba743fa5fe741b06b2ad8f8f9ebe9dfb0b9a3bc4f641cd16d99a4ba070fc0763d7cfeb8d3ecd056f162d509070cdd57d55d6ad9c SHA512 980f708a849ae26edca3eb6618a41668818c5883bca699f347f47a8964b3ee44a6ceefe4a12cb7d5fe6c13f5cbe2b7547938e53139f4ec9e6ef384e30c9bb6db +DIST scapy-2.4.3.tar.gz 2969754 BLAKE2B 83ab6500dbc0424b728253661f03391d450f77b19c0059b8a605a19f48b4ddd7344743310a5cb7c741fcf750876ba125daf883d04714981ff81ef4db97519ae0 SHA512 579e3f326f90e10b2839aee805949e14ecab9431f360ef75e60080a971653e1f48a240d812b8ace77754b01b07a2ddb8533d1e6b18ee8804280bf9b2c237cede diff --git a/net-analyzer/scapy/metadata.xml b/net-analyzer/scapy/metadata.xml new file mode 100644 index 000000000000..e1b696bf7176 --- /dev/null +++ b/net-analyzer/scapy/metadata.xml @@ -0,0 +1,16 @@ +<?xml version='1.0' encoding='UTF-8'?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>ikelos@gentoo.org</email> + <name>Mike Auty</name> + </maintainer> + <maintainer type="project"> + <email>netmon@gentoo.org</email> + <name>Gentoo network monitoring and analysis project</name> + </maintainer> + <upstream> + <remote-id type="github">secdev/scapy</remote-id> + </upstream> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/scapy/scapy-2.4.2.ebuild b/net-analyzer/scapy/scapy-2.4.2.ebuild new file mode 100644 index 000000000000..a9ccc7667e9d --- /dev/null +++ b/net-analyzer/scapy/scapy-2.4.2.ebuild @@ -0,0 +1,42 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 +PYTHON_COMPAT=( python{2_7,3_{6,7}} ) +inherit distutils-r1 readme.gentoo-r1 + +DESCRIPTION="A Python interactive packet manipulation program for mastering the network" +HOMEPAGE="https://scapy.net/ https://github.com/secdev/scapy" +SRC_URI="https://github.com/secdev/${PN}/archive/v${PV/_/}.tar.gz -> ${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" +RDEPEND=" + net-analyzer/tcpdump +" +S=${WORKDIR}/${P/_/} +DOC_CONTENTS=" +Scapy has optional support for the following packages: + + dev-python/cryptography + dev-python/gnuplot-py + dev-python/ipython + dev-python/pyx + media-gfx/graphviz + net-analyzer/tcpreplay + virtual/imagemagick-tools + + See also ""${EPREFIX}/usr/share/doc/${PF}/installation.rst"" +" + +src_prepare() { + echo ${PV/_/} > ${PN}/VERSION + distutils-r1_src_prepare +} + +src_install() { + distutils-r1_src_install + dodoc -r doc/${PN}/* + DISABLE_AUTOFORMATTING=plz readme.gentoo_create_doc +} diff --git a/net-analyzer/scapy/scapy-2.4.3.ebuild b/net-analyzer/scapy/scapy-2.4.3.ebuild new file mode 100644 index 000000000000..2b9cea9f0d1f --- /dev/null +++ b/net-analyzer/scapy/scapy-2.4.3.ebuild @@ -0,0 +1,42 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +PYTHON_COMPAT=( python3_{6,7} ) +inherit distutils-r1 readme.gentoo-r1 + +DESCRIPTION="A Python interactive packet manipulation program for mastering the network" +HOMEPAGE="https://scapy.net/ https://github.com/secdev/scapy" +SRC_URI="https://github.com/secdev/${PN}/archive/v${PV/_/}.tar.gz -> ${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="amd64 x86" +RDEPEND=" + net-analyzer/tcpdump +" +S=${WORKDIR}/${P/_/} +DOC_CONTENTS=" +Scapy has optional support for the following packages: + + dev-python/cryptography + dev-python/ipython + dev-python/matplotlib + dev-python/pyx + media-gfx/graphviz + net-analyzer/tcpreplay + virtual/imagemagick-tools + + See also ""${EPREFIX}/usr/share/doc/${PF}/installation.rst"" +" + +src_prepare() { + echo ${PV/_/} > ${PN}/VERSION + distutils-r1_src_prepare +} + +src_install() { + distutils-r1_src_install + dodoc -r doc/${PN}/* + DISABLE_AUTOFORMATTING=plz readme.gentoo_create_doc +} diff --git a/net-analyzer/scapy/scapy-9999.ebuild b/net-analyzer/scapy/scapy-9999.ebuild new file mode 100644 index 000000000000..3ed8c5033ab1 --- /dev/null +++ b/net-analyzer/scapy/scapy-9999.ebuild @@ -0,0 +1,42 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +PYTHON_COMPAT=( python3_{6,7} ) +inherit distutils-r1 git-r3 readme.gentoo-r1 + +DESCRIPTION="A Python interactive packet manipulation program for mastering the network" +HOMEPAGE="https://scapy.net/ https://github.com/secdev/scapy" +EGIT_REPO_URI="https://github.com/secdev/${PN}" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="" +RDEPEND=" + net-analyzer/tcpdump +" +S=${WORKDIR}/${P/_/} +DOC_CONTENTS=" +Scapy has optional support for the following packages: + + dev-python/cryptography + dev-python/ipython + dev-python/matplotlib + dev-python/pyx + media-gfx/graphviz + net-analyzer/tcpreplay + virtual/imagemagick-tools + + See also ""${EPREFIX}/usr/share/doc/${PF}/installation.rst"" +" + +src_prepare() { + echo ${PV/_/} > ${PN}/VERSION + distutils-r1_src_prepare +} + +src_install() { + distutils-r1_src_install + dodoc -r doc/${PN}/* + DISABLE_AUTOFORMATTING=plz readme.gentoo_create_doc +} diff --git a/net-analyzer/scli/Manifest b/net-analyzer/scli/Manifest new file mode 100644 index 000000000000..e4f019d7f606 --- /dev/null +++ b/net-analyzer/scli/Manifest @@ -0,0 +1 @@ +DIST scli-0.4.0.tar.gz 953401 BLAKE2B b6f3ccd1dbc69df882e3dbd73f8a686af76e370a5785cb475b9122a200cc9a01ae364d50fd391499cd88856ebb1e1a1869c8545b36eaecf73b45d46d47282b9b SHA512 ceb81e51049def64cb6f2428263709802380f7f712575e327a71d8cc120d284a7d9c57679d76e22cfcaf5b160d0d46af0cefa1133c56972b43002cb94f120dcc diff --git a/net-analyzer/scli/files/scli-0.4.0-configure.patch b/net-analyzer/scli/files/scli-0.4.0-configure.patch new file mode 100644 index 000000000000..d942da0adcc5 --- /dev/null +++ b/net-analyzer/scli/files/scli-0.4.0-configure.patch @@ -0,0 +1,44 @@ +--- a/configure.in ++++ b/configure.in +@@ -20,6 +20,8 @@ + AC_CHECK_PROG(SMIDUMP, smidump, smidump) + AC_SUBST(SMIDUMP) + ++PKG_PROG_PKG_CONFIG ++ + AC_DEFINE_UNQUOTED(SCLI_PLUGIN_PATH, "${pkglibdir}") + + AC_MSG_CHECKING([whether to enable -Wall]) +@@ -33,19 +35,24 @@ + + dnl Checks for libraries. + +-AM_PATH_GLIB_2_0(2.0.0, [], AC_MSG_ERROR(scli needs GLIB), gmodule) +-AM_PATH_GNET_2_0(2.0.0, [], AC_MSG_ERROR(scli needs GNET)) ++PKG_CHECK_MODULES(GLIB, glib-2.0 gmodule-2.0 gthread-2.0,[ ++ LIBS="$LIBS $GLIB_LIBS" ++ CPPFLAGS="$CPPFLAGS $GLIB_CFLAGS" ++ ], AC_MSG_ERROR(scli needs GLIB)) ++PKG_CHECK_MODULES(GNET, gnet-2.0 >= 2.0.0,[ ++ LIBS="$LIBS $GNET_LIBS" ++ CPPFLAGS="$CPPFLAGS $GNET_CFLAGS" ++ ], AC_MSG_ERROR(scli needs GNET)) + dnl AM_PATH_GLIB(1.2.0, [], AC_MSG_ERROR(scli needs GLIB), gmodule) + dnl AM_PATH_GTK(1.2.0, [], AC_MSG_ERROR(scli needs GTK)) +-AM_PATH_XML2(2.0.0, [], AC_MSG_ERROR(scli needs libxml2)) ++PKG_CHECK_MODULES(XML2, libxml-2.0 >= 2.0.0,[ ++ LIBS="$LIBS $XML2_LIBS" ++ CPPFLAGS="$CPPFLAGS $XML2_CFLAGS" ++ ], AC_MSG_ERROR(scli needs libxml2)) + PKG_CHECK_MODULES(GSNMP, gsnmp, have_gsnmp=true, have_gsnmp=false) + AC_SUBST(GSNMP_CFLAGS) + AC_SUBST(GSNMP_LIBS) +-AC_CHECK_LIB(ncurses, initscr, [], +- AC_CHECK_LIB(curses, initscr, [], +- AC_MSG_ERROR([scli requires curses functions; install curses first]) +- ) +-) ++PKG_CHECK_MODULES(ncurses,ncurses,LIBS="$LIBS $ncurses_LIBS",AC_MSG_ERROR([ncurses is required])) + AC_CHECK_LIB(readline, readline, [], + AC_MSG_ERROR([scli requires readline functions; install libreadline first]) + ) diff --git a/net-analyzer/scli/metadata.xml b/net-analyzer/scli/metadata.xml new file mode 100644 index 000000000000..6d60ca626dd5 --- /dev/null +++ b/net-analyzer/scli/metadata.xml @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>netmon@gentoo.org</email> + <name>Gentoo network monitoring and analysis project</name> + </maintainer> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/scli/scli-0.4.0-r1.ebuild b/net-analyzer/scli/scli-0.4.0-r1.ebuild new file mode 100644 index 000000000000..200f73836851 --- /dev/null +++ b/net-analyzer/scli/scli-0.4.0-r1.ebuild @@ -0,0 +1,35 @@ +# Copyright 1999-2018 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 +inherit autotools eutils + +DESCRIPTION="SNMP Command Line Interface" +HOMEPAGE="https://github.com/schoenw/scli" +SRC_URI="ftp://ftp.ibr.cs.tu-bs.de/pub/local/${PN}/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="amd64 x86 ~amd64-linux" + +RDEPEND=" + dev-libs/glib:2 + dev-libs/libxml2 + net-libs/gnet + net-libs/gsnmp + sys-libs/ncurses + sys-libs/readline + sys-libs/zlib +" +DEPEND=" + ${RDEPEND} + virtual/pkgconfig +" + +DOCS=( AUTHORS ChangeLog NEWS PORTING README TODO ) + +src_prepare() { + epatch "${FILESDIR}"/${P}-configure.patch + + eautoreconf +} diff --git a/net-analyzer/sec/Manifest b/net-analyzer/sec/Manifest new file mode 100644 index 000000000000..36b999b24a3f --- /dev/null +++ b/net-analyzer/sec/Manifest @@ -0,0 +1,4 @@ +DIST sec-2.7.6.tar.gz 121621 BLAKE2B 43dbccd05aa274459ba8746c8aba33bae0307929524a9ad77087a6c28305b2f0b7d34f9cb79b7503d2269b84524687b24441263ee99a7061c0e033e15e4b9f01 SHA512 9c050b89970663784f5c149d46c6c6ab941590ef4300ca09ea35b347b2eaa3bad12083bd6e619f25d5024a35de69e020c354b507ac49e3faef1013336ea2d5f5 +DIST sec-2.8.1.tar.gz 143700 BLAKE2B 4101883ccd947140546659c799f9641d496912f22e08debbae5bc9b8b65301ddfeb4c005a9885063c6381383d1f0581a7b96f56cf53bf2401438cfa6cf1755f0 SHA512 03c7acd1e1cfd6dc11143e0ff35758925ddc75e460987a91d5606564f0caa45afade497b8653ec2d8865cfcfab4d87743777eb104e1a16f79069cf61e17d0661 +DIST sec-2.8.2.tar.gz 144131 BLAKE2B d2c9e33be815c1e2321e94e2f679ca6eb6d272b4f68bbf575508c916293c39a36bb4e675a09986395fb34dcc04e356a0dcbf88d076f4c27f532337b4493138d9 SHA512 846a0671d5d774f74645e5e4f6d7a01c04079be19ea9b2ec9cb862fb48173dac0e1131981bb6e1fae525c74610dfdabc1535ff5818ae893bec35daab46e05c07 +DIST sec-2.8.3.tar.gz 144950 BLAKE2B 03e6f3077628a1e4221149875878642574ab00d87a0e601144b4c2f35f1d54cb937053a22d30ee7c5f13c4079e845dcccdf743a71a5afd75d2c46a34e4dadcf6 SHA512 9eba7db0dfa3661a3ef4e8aad3eeef1db710784f7a71131991a06918cc4f5634577b8bff3f00fcc1c5d998bf0c1e80efe88e1c1df3f5530b6ab4905ff00f2269 diff --git a/net-analyzer/sec/files/sec.conf.d b/net-analyzer/sec/files/sec.conf.d new file mode 100644 index 000000000000..a6d8b9c1fddc --- /dev/null +++ b/net-analyzer/sec/files/sec.conf.d @@ -0,0 +1,12 @@ +# configuration file for /etc/init.d/sec + +# flags to pass to sec (see 'sec --help') +SEC_FLAGS="" + +# Define a debug level (1..6) +DEBUG_LEVEL="4" + +# define where sec reads messages from for translating them +#INPUT_FILES="${INPUT_FILES} -input=/var/log/some.log" +#INPUT_FILES="${INPUT_FILES} -input=/tmp/other.file" +INPUT_FILES="-input=/var/log/messages" diff --git a/net-analyzer/sec/files/sec.init.d b/net-analyzer/sec/files/sec.init.d new file mode 100644 index 000000000000..252b23242648 --- /dev/null +++ b/net-analyzer/sec/files/sec.init.d @@ -0,0 +1,35 @@ +#!/sbin/openrc-run +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +depend() { + use logger +} + +checkconfig() { + if [ ! -e /etc/sec.conf ] ; then + eerror "You need an /etc/sec.conf config file to run sec" + return 1 + fi + return 0 +} + +start() { + checkconfig || return 1 + ebegin "Starting sec" + start-stop-daemon --start --quiet --interpreted --exec /usr/bin/sec -- \ + -pid=/run/sec.pid \ + -detach -log=/var/log/sec.log \ + -conf=/etc/sec.conf \ + ${INPUT_FILES} \ + -debug=${DEBUG_LEVEL} \ + ${SEC_FLAGS} > /dev/null 2>&1 + eend $? +} + +stop() { + ebegin "Stopping sec" + start-stop-daemon --stop --quiet --pidfile /run/sec.pid + eend $? +} + diff --git a/net-analyzer/sec/metadata.xml b/net-analyzer/sec/metadata.xml new file mode 100644 index 000000000000..e180b44d3f65 --- /dev/null +++ b/net-analyzer/sec/metadata.xml @@ -0,0 +1,13 @@ +<?xml version='1.0' encoding='UTF-8'?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>netmon@gentoo.org</email> + <name>Gentoo network monitoring and analysis project</name> + </maintainer> + <upstream> + <remote-id type="sourceforge">simple-evcorr</remote-id> + <remote-id type="github">simple-evcorr/sec</remote-id> + </upstream> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/sec/sec-2.7.6-r1.ebuild b/net-analyzer/sec/sec-2.7.6-r1.ebuild new file mode 100644 index 000000000000..9d01d54b1552 --- /dev/null +++ b/net-analyzer/sec/sec-2.7.6-r1.ebuild @@ -0,0 +1,27 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +DESCRIPTION="Simple Event Correlator" +HOMEPAGE="http://simple-evcorr.sourceforge.net/" +SRC_URI="mirror://sourceforge/simple-evcorr/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="amd64 ~ppc x86 ~amd64-linux" + +RDEPEND=">=dev-lang/perl-5.8.0" + +src_install() { + dobin sec + + dodoc ChangeLog README + docinto contrib + dodoc contrib/{itostream.c,convert.pl,swatch2sec.pl} + + newman sec.man sec.1 + + newinitd "${FILESDIR}"/sec.init.d sec + newconfd "${FILESDIR}"/sec.conf.d sec +} diff --git a/net-analyzer/sec/sec-2.8.1.ebuild b/net-analyzer/sec/sec-2.8.1.ebuild new file mode 100644 index 000000000000..8d81eebd4d02 --- /dev/null +++ b/net-analyzer/sec/sec-2.8.1.ebuild @@ -0,0 +1,27 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +DESCRIPTION="Simple Event Correlator" +HOMEPAGE="https://github.com/simple-evcorr/sec" +SRC_URI="https://github.com/simple-evcorr/sec/releases/download/${PV}/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~ppc ~x86 ~amd64-linux" + +RDEPEND=">=dev-lang/perl-5.8.0" + +src_install() { + dobin sec + + dodoc ChangeLog README + docinto contrib + dodoc contrib/{itostream.c,convert.pl,swatch2sec.pl} + + newman sec.man sec.1 + + newinitd "${FILESDIR}"/sec.init.d sec + newconfd "${FILESDIR}"/sec.conf.d sec +} diff --git a/net-analyzer/sec/sec-2.8.2.ebuild b/net-analyzer/sec/sec-2.8.2.ebuild new file mode 100644 index 000000000000..89e843baa33a --- /dev/null +++ b/net-analyzer/sec/sec-2.8.2.ebuild @@ -0,0 +1,27 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +DESCRIPTION="Simple Event Correlator" +HOMEPAGE="https://github.com/simple-evcorr/sec" +SRC_URI="https://github.com/simple-evcorr/sec/releases/download/${PV}/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~ppc ~x86 ~amd64-linux" + +RDEPEND=">=dev-lang/perl-5.8.0" + +src_install() { + dobin sec + + dodoc ChangeLog README + docinto contrib + dodoc contrib/{itostream.c,convert.pl,swatch2sec.pl} + + newman sec.man sec.1 + + newinitd "${FILESDIR}"/sec.init.d sec + newconfd "${FILESDIR}"/sec.conf.d sec +} diff --git a/net-analyzer/sec/sec-2.8.3.ebuild b/net-analyzer/sec/sec-2.8.3.ebuild new file mode 100644 index 000000000000..89e843baa33a --- /dev/null +++ b/net-analyzer/sec/sec-2.8.3.ebuild @@ -0,0 +1,27 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +DESCRIPTION="Simple Event Correlator" +HOMEPAGE="https://github.com/simple-evcorr/sec" +SRC_URI="https://github.com/simple-evcorr/sec/releases/download/${PV}/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~ppc ~x86 ~amd64-linux" + +RDEPEND=">=dev-lang/perl-5.8.0" + +src_install() { + dobin sec + + dodoc ChangeLog README + docinto contrib + dodoc contrib/{itostream.c,convert.pl,swatch2sec.pl} + + newman sec.man sec.1 + + newinitd "${FILESDIR}"/sec.init.d sec + newconfd "${FILESDIR}"/sec.conf.d sec +} diff --git a/net-analyzer/sflowtool/Manifest b/net-analyzer/sflowtool/Manifest new file mode 100644 index 000000000000..9814189753f5 --- /dev/null +++ b/net-analyzer/sflowtool/Manifest @@ -0,0 +1,4 @@ +DIST sflowtool-3.34.tar.gz 171613 BLAKE2B 70e55777253af2055f7de57da53bde8f63b6ee79fcd0db7545bbaabf024ea3baf933beb0a62c9a29b073b34f3471faf47ceaca6664d873fe5d91a3fe73b76f54 SHA512 4fd551fc1e03f68c886bf3effaab466c4470f1e3878ed5b94fd5152e81c076b56a6901df878edc95850522cf70458c6c9c4130c12ff071739b1da4725ae1e777 +DIST sflowtool-3.41.tar.gz 187119 BLAKE2B 3ba9d1baf8da4be14361ce82f7a783d7d1dde10264f123688703c4a41eb316d8d917f98150bb64562c3398f49a4a083e35b56402e8e8ea0a140406923bfe0519 SHA512 8758bb7f2ad17db1c8d8c943093edde72efbd4411f8acbba2b97717e447df0b9e771a33307b9fa090da6ca12ba2dac69fd72787795aa878ad3c5d4148100c57d +DIST sflowtool-5.02.tar.gz 192907 BLAKE2B 100745fb7f4eb4e40edf93e66a0f3fb26e2cdc26d2d3808d6bf5fa4a92d2b973e6fd8947f39a1695898abf647f4012cbb1577af281f8b51fc6d008ed4643986e SHA512 9b2369c8d30b9cdcd1cdfca29e2f8405ac8ea3bba22243ce62d708f943b726865fbf6ba2eee2f0e00e5df1d1b6fd4977f636bbdbe9676424183e1f973bd64dde +DIST sflowtool-5.04.tar.gz 187733 BLAKE2B 8298bbbf23d2ce30b5954a73fc8fed9e9e3510e77d80e02cff9fdab2330260cd3960db76ed7c1e9266b47f964e5724eb2fef9dd89514d9abbbf050df28e1e133 SHA512 611c3c23ed7a586997b1622b4d1c48eb0e0784a0667e5f7d17f2862c071ff5a34a55c6e537eba99e1c281d9ab870c95c805b764122b623520c81870d730b1688 diff --git a/net-analyzer/sflowtool/metadata.xml b/net-analyzer/sflowtool/metadata.xml new file mode 100644 index 000000000000..995b52c36005 --- /dev/null +++ b/net-analyzer/sflowtool/metadata.xml @@ -0,0 +1,12 @@ +<?xml version='1.0' encoding='UTF-8'?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>netmon@gentoo.org</email> + <name>Gentoo network monitoring and analysis project</name> + </maintainer> + <upstream> + <remote-id type="github">sflow/sflowtool</remote-id> + </upstream> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/sflowtool/sflowtool-3.34.ebuild b/net-analyzer/sflowtool/sflowtool-3.34.ebuild new file mode 100644 index 000000000000..96c9498e8607 --- /dev/null +++ b/net-analyzer/sflowtool/sflowtool-3.34.ebuild @@ -0,0 +1,19 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 +inherit flag-o-matic + +DESCRIPTION="sflowtool is a utility for collecting and processing sFlow data" +HOMEPAGE="http://www.inmon.com/technology/sflowTools.php" +SRC_URI="http://www.inmon.com/bin/${P}.tar.gz" + +LICENSE="inmon-sflow" +SLOT="0" +KEYWORDS="amd64 ppc x86" +IUSE="debug" + +src_prepare() { + append-cppflags -DSPOOFSOURCE + use debug && append-cppflags -DDEBUG +} diff --git a/net-analyzer/sflowtool/sflowtool-3.41.ebuild b/net-analyzer/sflowtool/sflowtool-3.41.ebuild new file mode 100644 index 000000000000..91200811c1aa --- /dev/null +++ b/net-analyzer/sflowtool/sflowtool-3.41.ebuild @@ -0,0 +1,25 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 +inherit flag-o-matic + +DESCRIPTION="sflowtool is a utility for collecting and processing sFlow data" +HOMEPAGE=" + http://www.inmon.com/technology/sflowTools.php + https://github.com/sflow/sflowtool +" +SRC_URI="https://github.com/sflow/${PN}/releases/download/v${PV}/${P}.tar.gz" + +LICENSE="inmon-sflow" +SLOT="0" +KEYWORDS="~amd64 ~ppc ~x86" +IUSE="debug" + +src_prepare() { + default + + append-cppflags -DSPOOFSOURCE + + use debug && append-cppflags -DDEBUG +} diff --git a/net-analyzer/sflowtool/sflowtool-5.02.ebuild b/net-analyzer/sflowtool/sflowtool-5.02.ebuild new file mode 100644 index 000000000000..820030971af1 --- /dev/null +++ b/net-analyzer/sflowtool/sflowtool-5.02.ebuild @@ -0,0 +1,24 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +inherit flag-o-matic + +DESCRIPTION="sflowtool is a utility for collecting and processing sFlow data" +HOMEPAGE=" + https://inmon.com/technology/sflowTools.php + https://github.com/sflow/sflowtool +" +SRC_URI="https://github.com/sflow/${PN}/releases/download/v${PV}/${P}.tar.gz" + +LICENSE="inmon-sflow" +SLOT="0" +KEYWORDS="~amd64 ~ppc ~x86" +IUSE="debug" + +src_configure() { + append-cppflags -DSPOOFSOURCE + use debug && append-cppflags -DDEBUG + + default +} diff --git a/net-analyzer/sflowtool/sflowtool-5.04.ebuild b/net-analyzer/sflowtool/sflowtool-5.04.ebuild new file mode 100644 index 000000000000..820030971af1 --- /dev/null +++ b/net-analyzer/sflowtool/sflowtool-5.04.ebuild @@ -0,0 +1,24 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +inherit flag-o-matic + +DESCRIPTION="sflowtool is a utility for collecting and processing sFlow data" +HOMEPAGE=" + https://inmon.com/technology/sflowTools.php + https://github.com/sflow/sflowtool +" +SRC_URI="https://github.com/sflow/${PN}/releases/download/v${PV}/${P}.tar.gz" + +LICENSE="inmon-sflow" +SLOT="0" +KEYWORDS="~amd64 ~ppc ~x86" +IUSE="debug" + +src_configure() { + append-cppflags -DSPOOFSOURCE + use debug && append-cppflags -DDEBUG + + default +} diff --git a/net-analyzer/sguil-client/Manifest b/net-analyzer/sguil-client/Manifest new file mode 100644 index 000000000000..469b080b1947 --- /dev/null +++ b/net-analyzer/sguil-client/Manifest @@ -0,0 +1,3 @@ +DIST sguil-0.9.0.tar.gz 464204 BLAKE2B 147b743fd8f70969ee560a3f6995775c40cfbaf543d8292f16aa6f02289edde54207a3cddb4969229e0a123dad2fb589eaef3bddb016e6ff408a3d9be4c7820d SHA512 3f300901d0f0260fbc950b4c7604e3dc3eeb2d088ff45171db84e2d58e281242bf3582eac51162968f1f3766961aec4d0a7af54e85773102ee643a52e879cfa6 +DIST sguil-1.0.0.tar.gz 892934 BLAKE2B 69459eed682d91a1b57ba08c141dd655dbbfaa0d9d2956e6a26065f1b6820307b0e0e4dcbcad89537eba7499aea38f81739c351246e3dd6c46cab46bdf0d054f SHA512 fc3007383f90c99a0ace3eeebac75864f9aa549676e784c7bf1d81222282e3a5a3d5290b121097ae3c027dee3dd35bbe8ac9dfede04dbd561edfd3948a0465ab +DIST sguil-client-0.8.0.tar.gz 216433 BLAKE2B 65403d7c0de38fd4c010129ee692ab4af6853299566e3ffc6ac9a7f4e64b781830dad41f76dcaf4567bf5f217c5bd59396040cf36017b0ecdac733bc02c179db SHA512 44e14273cb7506b89d3138a1c50160de99576e77d6d18e3cdab9f257a1d00d5a100c8d9790f6e93aea8312fab51d52260aedfaa00facf54107249686d93e09b3 diff --git a/net-analyzer/sguil-client/metadata.xml b/net-analyzer/sguil-client/metadata.xml new file mode 100644 index 000000000000..044ff6f7898b --- /dev/null +++ b/net-analyzer/sguil-client/metadata.xml @@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>netmon@gentoo.org</email> + <name>Gentoo network monitoring and analysis project</name> + </maintainer> + <upstream> + <remote-id type="github">bammv/sguil</remote-id> + <remote-id type="sourceforge">sguil</remote-id> + </upstream> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/sguil-client/sguil-client-0.8.0.ebuild b/net-analyzer/sguil-client/sguil-client-0.8.0.ebuild new file mode 100644 index 000000000000..486064c7fd78 --- /dev/null +++ b/net-analyzer/sguil-client/sguil-client-0.8.0.ebuild @@ -0,0 +1,49 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +inherit multilib + +MY_PV="${PV/_p/p}" +DESCRIPTION="GUI Console for sguil Network Security Monitoring" +HOMEPAGE="http://sguil.sf.net" +SRC_URI="mirror://sourceforge/sguil/sguil-client-${MY_PV}.tar.gz" + +LICENSE="QPL" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="ssl" + +RDEPEND=" + >=dev-lang/tcl-8.3:0=[-threads] + >=dev-lang/tk-8.3:0= + >=dev-tcltk/itcl-3.2 + >=dev-tcltk/tclx-8.3 + dev-tcltk/itk + dev-tcltk/iwidgets + dev-tcltk/tcllib + net-analyzer/wireshark + ssl? ( >=dev-tcltk/tls-1.4.1 ) +" + +S=${WORKDIR}/sguil-${MY_PV} + +src_prepare() { + sed -i \ + -e "/^set SGUILLIB /s:./lib:/usr/$(get_libdir)/sguil:" \ + -e '/^set ETHEREAL_PATH /s:/usr/sbin/ethereal:/usr/bin/wireshark:' \ + -e '/^set SERVERHOST /s:demo.sguil.net:localhost:' \ + -e '/^set MAILSERVER /s:mail.example.com:localhost:' \ + -e '/^set GPG_PATH /s:/usr/local/bin/gpg:/usr/bin/gpg:' \ + client/sguil.conf || die +} + +src_install() { + dobin client/sguil.tk + insinto /etc/sguil + doins client/sguil.conf + insinto "/usr/$(get_libdir)/sguil" + doins -r "${S}"/client/lib/* + dodoc doc/* +} diff --git a/net-analyzer/sguil-client/sguil-client-0.9.0.ebuild b/net-analyzer/sguil-client/sguil-client-0.9.0.ebuild new file mode 100644 index 000000000000..0eff0c582b96 --- /dev/null +++ b/net-analyzer/sguil-client/sguil-client-0.9.0.ebuild @@ -0,0 +1,47 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 +inherit multilib + +MY_PV="${PV/_p/p}" +DESCRIPTION="GUI Console for sguil Network Security Monitoring" +HOMEPAGE="http://sguil.sf.net" +SRC_URI="https://github.com/bammv/${PN/-client}/archive/v${PV}.tar.gz -> ${P/-client}.tar.gz" + +LICENSE="QPL" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="ssl" + +RDEPEND=" + >=dev-lang/tcl-8.3:0=[-threads] + >=dev-lang/tk-8.3:0= + >=dev-tcltk/itcl-3.2 + >=dev-tcltk/tclx-8.3 + dev-tcltk/itk + dev-tcltk/iwidgets + dev-tcltk/tcllib + net-analyzer/wireshark + ssl? ( >=dev-tcltk/tls-1.4.1 ) +" + +S=${WORKDIR}/sguil-${MY_PV} + +src_prepare() { + sed -i \ + -e "/^set SGUILLIB /s:./lib:/usr/$(get_libdir)/sguil:" \ + -e '/^set SERVERHOST /s:demo.sguil.net:localhost:' \ + -e '/^set MAILSERVER /s:mail.example.com:localhost:' \ + -e '/^set GPG_PATH /s:/usr/local/bin/gpg:/usr/bin/gpg:' \ + client/sguil.conf || die +} + +src_install() { + dobin client/sguil.tk + insinto /etc/sguil + doins client/sguil.conf + insinto "/usr/$(get_libdir)/sguil" + doins -r "${S}"/client/lib/* + dodoc doc/* +} diff --git a/net-analyzer/sguil-client/sguil-client-1.0.0.ebuild b/net-analyzer/sguil-client/sguil-client-1.0.0.ebuild new file mode 100644 index 000000000000..992c2a582baa --- /dev/null +++ b/net-analyzer/sguil-client/sguil-client-1.0.0.ebuild @@ -0,0 +1,46 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +MY_PV="${PV/_p/p}" +DESCRIPTION="GUI Console for sguil Network Security Monitoring" +HOMEPAGE="https://github.com/bammv/sguil" +SRC_URI="https://github.com/bammv/sguil/archive/v${PV}.tar.gz -> ${P/-client}.tar.gz" + +LICENSE="QPL" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="ssl" + +RDEPEND=" + >=dev-lang/tcl-8.3:0=[-threads] + >=dev-lang/tk-8.3:0= + >=dev-tcltk/itcl-3.2 + >=dev-tcltk/tclx-8.3 + dev-tcltk/itk + dev-tcltk/iwidgets + dev-tcltk/tcllib + net-analyzer/wireshark + ssl? ( >=dev-tcltk/tls-1.4.1 ) +" +S=${WORKDIR}/sguil-${MY_PV} + +src_prepare() { + default + sed -i \ + -e "/^set SGUILLIB /s:./lib:/usr/$(get_libdir)/sguil:" \ + -e '/^set SERVERHOST /s:demo.sguil.net:localhost:' \ + -e '/^set MAILSERVER /s:mail.example.com:localhost:' \ + -e '/^set GPG_PATH /s:/usr/local/bin/gpg:/usr/bin/gpg:' \ + client/sguil.conf || die +} + +src_install() { + dobin client/sguil.tk + insinto /etc/sguil + doins client/sguil.conf + insinto "/usr/$(get_libdir)/sguil" + doins -r "${S}"/client/lib/* + dodoc doc/* +} diff --git a/net-analyzer/sguil-sensor/Manifest b/net-analyzer/sguil-sensor/Manifest new file mode 100644 index 000000000000..c9b086c62dca --- /dev/null +++ b/net-analyzer/sguil-sensor/Manifest @@ -0,0 +1,3 @@ +DIST sguil-0.9.0.tar.gz 464204 BLAKE2B 147b743fd8f70969ee560a3f6995775c40cfbaf543d8292f16aa6f02289edde54207a3cddb4969229e0a123dad2fb589eaef3bddb016e6ff408a3d9be4c7820d SHA512 3f300901d0f0260fbc950b4c7604e3dc3eeb2d088ff45171db84e2d58e281242bf3582eac51162968f1f3766961aec4d0a7af54e85773102ee643a52e879cfa6 +DIST sguil-1.0.0.tar.gz 892934 BLAKE2B 69459eed682d91a1b57ba08c141dd655dbbfaa0d9d2956e6a26065f1b6820307b0e0e4dcbcad89537eba7499aea38f81739c351246e3dd6c46cab46bdf0d054f SHA512 fc3007383f90c99a0ace3eeebac75864f9aa549676e784c7bf1d81222282e3a5a3d5290b121097ae3c027dee3dd35bbe8ac9dfede04dbd561edfd3948a0465ab +DIST sguil-sensor-0.8.0.tar.gz 142829 BLAKE2B f753c1bf6a95ba7b12d3a91d2d6ddf506b9dfb09208d08ad5ffcea95210525f014c3807d3e79df10739b00466e5e10e88d2e2494cfbbbb7c7145f2800df62600 SHA512 9b90598f2a3fdcf8652ccb92123944ffbda61c00f131bc951b12a95002f84f555f8c63cc1235fd7bb90875d00edbecbda02750bcca3bba7d16e1b1a150eb74ae diff --git a/net-analyzer/sguil-sensor/files/log_packets.confd b/net-analyzer/sguil-sensor/files/log_packets.confd new file mode 100644 index 000000000000..93bdc772bff7 --- /dev/null +++ b/net-analyzer/sguil-sensor/files/log_packets.confd @@ -0,0 +1,18 @@ +# Config file for /etc/init.d/log_packets +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +# This tell snort which interface to listen on (any for every interface) +IFACE=eth1 + +# Make sure this matches your IFACE +PIDFILE=/run/sguil-log_packets_$IFACE.pid + +# You probably don't want to change this, but in case you do +LOGDIR="/var/lib/sguil" + +# Percentage of disk to try and maintain +MAX_DISK_USE=95 + +# This pulls in the options above +OPTIONS="-m 122 -u sguil -g sguil" diff --git a/net-analyzer/sguil-sensor/files/log_packets.initd b/net-analyzer/sguil-sensor/files/log_packets.initd new file mode 100644 index 000000000000..f372c82c905b --- /dev/null +++ b/net-analyzer/sguil-sensor/files/log_packets.initd @@ -0,0 +1,91 @@ +#!/sbin/openrc-run +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +extra_commands="cleandisk" + +LOG_DIR="${LOGDIR}/${HOSTNAME}/dailylogs" + +start() { + ebegin "Starting Log_packest" + if [ ! -x /usr/bin/snort ] + then + eerror "No snort - cannot start" + eend 1 + return 1 + fi + + if [ ! -d ${LOG_DIR} ] + then + mkdir -p ${LOG_DIR} + chmod 770 ${LOG_DIR} + fi + + today=$(date '+%Y-%m-%d') + + if [ ! -d "${LOG_DIR}/${today}" ] + then + mkdir "${LOG_DIR}/${today}" + chmod 770 "${LOG_DIR}/${today}" + chown root:sguil "${LOG_DIR}/${today}" + fi + start-stop-daemon --start --quiet -b -m --pidfile "${PIDFILE}" \ + --exec /usr/bin/snort \ + -- ${OPTIONS} -l "${LOG_DIR}/${today}" -b -i "${IFACE}" "${FILTER}" + real_cleandisk + eend $? +} + +stop() { + ebegin "Stopping Sensor Agent" + start-stop-daemon --stop --quiet --pidfile "${PIDFILE}" + eend $? +} + +cleandisk() { + ebegin "Cleaning Disk" + real_cleandisk + eend $? +} + +# This func checks the current space being used by LOG_DIR +# and rm's data as necessary. +real_cleandisk() { + einfo "Checking disk space (limited to ${MAX_DISK_USE}%)..." + # grep, awk, tr...woohoo! + CUR_USE=$(df -P ${LOG_DIR} | grep -v -i filesystem | awk '{print $5}' | tr -d %) + einfo " Current Disk Use: ${CUR_USE}%" + + if [ ${CUR_USE} -gt ${MAX_DISK_USE} ] + then + # If we are here then we passed our disk limit + # First find the oldest DIR + cd "${LOG_DIR}" + # Can't use -t on the ls since the mod time changes each time we + # delete a file. Good thing we use YYYY-MM-DD so we can sort. + OLDEST_DIR=$(ls | sort | head -n 1) + cd "${OLDEST_DIR}" + + OLDEST_FILE=$(ls -t | tail -n 1) + + if [ -f "${OLDEST_FILE}" ] + then + einfo " Removing file: ${OLDEST_DIR}/${OLDEST_FILE}" + rm -f "${OLDEST_FILE}" + else + einfo " Removing empty dir: ${OLDEST_DIR}" + cd .. + rm -rf "${OLDEST_DIR}" + fi + + # Run cleandisk again as rm'ing one file might been enough + # but we wait 5 secs in hopes any open writes are done. + sync + einfo " Waiting 5 secs for disk to sync..." + sleep 5 + real_cleandisk + else + einfo "Done." + fi +} + diff --git a/net-analyzer/sguil-sensor/files/sensor_agent.initd b/net-analyzer/sguil-sensor/files/sensor_agent.initd new file mode 100644 index 000000000000..08b45e511f8c --- /dev/null +++ b/net-analyzer/sguil-sensor/files/sensor_agent.initd @@ -0,0 +1,29 @@ +#!/sbin/openrc-run +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +depend() { + need net +} + +checkconfig() { + if [ ! -e /etc/sguil/sensor_agent.conf ] ; then + eerror "You need an /etc/snort/sensor_agent.conf to run the Sensor Agent" + return 1 + fi +} + +start() { + checkconfig || return 1 + ebegin "Starting Sensor Agent" + start-stop-daemon --start -c sguil --quiet --exec /usr/bin/sensor_agent.tcl \ + -- -D -c "/etc/sguil/sensor_agent.conf">/dev/null 2>&1 + eend $? +} + +stop() { + ebegin "Stopping Sensor Agent" + start-stop-daemon --stop --quiet --pidfile /run/sguil-sensor.pid + eend $? +} + diff --git a/net-analyzer/sguil-sensor/metadata.xml b/net-analyzer/sguil-sensor/metadata.xml new file mode 100644 index 000000000000..044ff6f7898b --- /dev/null +++ b/net-analyzer/sguil-sensor/metadata.xml @@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>netmon@gentoo.org</email> + <name>Gentoo network monitoring and analysis project</name> + </maintainer> + <upstream> + <remote-id type="github">bammv/sguil</remote-id> + <remote-id type="sourceforge">sguil</remote-id> + </upstream> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/sguil-sensor/sguil-sensor-0.8.0.ebuild b/net-analyzer/sguil-sensor/sguil-sensor-0.8.0.ebuild new file mode 100644 index 000000000000..2589f9861647 --- /dev/null +++ b/net-analyzer/sguil-sensor/sguil-sensor-0.8.0.ebuild @@ -0,0 +1,80 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +inherit user + +MY_PV="${PV/_p/p}" +DESCRIPTION="Sensor part of sguil Network Security Monitoring" +HOMEPAGE="http://sguil.sourceforge.net" +SRC_URI="mirror://sourceforge/sguil/sguil-sensor-${MY_PV}.tar.gz" + +LICENSE="GPL-2 QPL" +SLOT="0" +KEYWORDS="~x86" +IUSE="" + +RDEPEND=" + >=dev-lang/tcl-8.3:0=[-threads] + >=dev-tcltk/tclx-8.3 + >=net-analyzer/barnyard-0.2.0-r1 + >=net-analyzer/snort-2.4.1-r1 + dev-ml/pcre-ocaml + net-analyzer/sancp +" + +S="${WORKDIR}/sguil-${MY_PV}" + +pkg_setup() { + enewgroup sguil + enewuser sguil -1 -1 /var/lib/sguil sguil +} + +src_prepare() { + sed -i \ + -e "s:gateway:${HOSTNAME}:" \ + -e 's:/snort_data:/var/lib/sguil:' \ + -e 's:DAEMON 0:DAEMON 1:' \ + -e 's:DEBUG 1:DEBUG 0:g' \ + sensor/sensor_agent.conf || die + sed -i \ + -e 's:/run/sensor_agent.pid:/run/sguil-sensor.pid:' \ + sensor/sensor_agent.tcl || die +} + +src_install() { + dodoc doc/* + + dobin sensor/sensor_agent.tcl + + newinitd "${FILESDIR}/log_packets.initd" log_packets + newinitd "${FILESDIR}/sensor_agent.initd" sensor_agent + newconfd "${FILESDIR}/log_packets.confd" log_packets + insinto /etc/sguil + doins sensor/sensor_agent.conf + + # Create the directory structure + diropts -g sguil -o sguil + keepdir /var/lib/sguil /var/lib/sguil/archive \ + "/var/lib/sguil/${HOSTNAME}" \ + "/var/lib/sguil/${HOSTNAME}/portscans" \ + "/var/lib/sguil/${HOSTNAME}/ssn_logs" \ + "/var/lib/sguil/${HOSTNAME}/dailylogs" \ + "/var/lib/sguil/${HOSTNAME}/sancp" + +} + +pkg_postinst() { + elog + elog "You should check /etc/sguil/sensor_agent.conf and" + elog "/etc/init.d/logpackets and ensure that they are accurate" + elog "for your environment. They should work providing that you" + elog "are running the sensor on the same machine as the server." + elog "This ebuild assumes that you are running a single sensor" + elog "environment, if this is not the case then you must make sure" + elog "to modify /etc/sguil/sensor_agent.conf and change the HOSTNAME variable." + elog "You should crontab the /etc/init.d/log_packets script to restart" + elog "each hour." + elog +} diff --git a/net-analyzer/sguil-sensor/sguil-sensor-0.9.0.ebuild b/net-analyzer/sguil-sensor/sguil-sensor-0.9.0.ebuild new file mode 100644 index 000000000000..3235c34d475a --- /dev/null +++ b/net-analyzer/sguil-sensor/sguil-sensor-0.9.0.ebuild @@ -0,0 +1,80 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +inherit user + +MY_PV="${PV/_p/p}" +DESCRIPTION="Sensor part of sguil Network Security Monitoring" +HOMEPAGE="http://sguil.sourceforge.net" +SRC_URI="https://github.com/bammv/${PN/-sensor}/archive/v${PV}.tar.gz -> ${P/-sensor}.tar.gz" + +LICENSE="GPL-2 QPL" +SLOT="0" +KEYWORDS="~x86" +IUSE="" + +RDEPEND=" + >=dev-lang/tcl-8.3:0=[-threads] + >=dev-tcltk/tclx-8.3 + >=net-analyzer/barnyard-0.2.0-r1 + >=net-analyzer/snort-2.4.1-r1 + dev-ml/pcre-ocaml + net-analyzer/sancp +" + +S="${WORKDIR}/sguil-${MY_PV}" + +pkg_setup() { + enewgroup sguil + enewuser sguil -1 -1 /var/lib/sguil sguil +} + +src_prepare() { + sed -i \ + -e "s:gateway:${HOSTNAME}:" \ + -e 's:/snort_data:/var/lib/sguil:' \ + -e 's:DAEMON 0:DAEMON 1:' \ + -e 's:DEBUG 1:DEBUG 0:g' \ + sensor/sensor_agent.conf || die + sed -i \ + -e 's:/var/run/sensor_agent.pid:/run/sguil-sensor.pid:' \ + sensor/sensor_agent.tcl || die +} + +src_install() { + dodoc doc/* + + dobin sensor/sensor_agent.tcl + + newinitd "${FILESDIR}/log_packets.initd" log_packets + newinitd "${FILESDIR}/sensor_agent.initd" sensor_agent + newconfd "${FILESDIR}/log_packets.confd" log_packets + insinto /etc/sguil + doins sensor/sensor_agent.conf + + # Create the directory structure + diropts -g sguil -o sguil + keepdir /var/lib/sguil /var/lib/sguil/archive \ + "/var/lib/sguil/${HOSTNAME}" \ + "/var/lib/sguil/${HOSTNAME}/portscans" \ + "/var/lib/sguil/${HOSTNAME}/ssn_logs" \ + "/var/lib/sguil/${HOSTNAME}/dailylogs" \ + "/var/lib/sguil/${HOSTNAME}/sancp" + +} + +pkg_postinst() { + elog + elog "You should check /etc/sguil/sensor_agent.conf and" + elog "/etc/init.d/logpackets and ensure that they are accurate" + elog "for your environment. They should work providing that you" + elog "are running the sensor on the same machine as the server." + elog "This ebuild assumes that you are running a single sensor" + elog "environment, if this is not the case then you must make sure" + elog "to modify /etc/sguil/sensor_agent.conf and change the HOSTNAME variable." + elog "You should crontab the /etc/init.d/log_packets script to restart" + elog "each hour." + elog +} diff --git a/net-analyzer/sguil-sensor/sguil-sensor-1.0.0.ebuild b/net-analyzer/sguil-sensor/sguil-sensor-1.0.0.ebuild new file mode 100644 index 000000000000..f8dd087562e0 --- /dev/null +++ b/net-analyzer/sguil-sensor/sguil-sensor-1.0.0.ebuild @@ -0,0 +1,80 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +inherit user + +MY_PV="${PV/_p/p}" +DESCRIPTION="Sensor part of sguil Network Security Monitoring" +HOMEPAGE="https://github.com/bammv/sguil" +SRC_URI="https://github.com/bammv/sguil/archive/v${PV}.tar.gz -> ${P/-sensor}.tar.gz" + +LICENSE="GPL-2 QPL" +SLOT="0" +KEYWORDS="~x86" +IUSE="" + +RDEPEND=" + >=dev-lang/tcl-8.3:0=[-threads] + >=dev-tcltk/tclx-8.3 + >=net-analyzer/barnyard-0.2.0-r1 + >=net-analyzer/snort-2.4.1-r1 + dev-ml/pcre-ocaml + net-analyzer/sancp +" + +S="${WORKDIR}/sguil-${MY_PV}" + +pkg_setup() { + enewgroup sguil + enewuser sguil -1 -1 /var/lib/sguil sguil +} + +src_prepare() { + default + sed -i \ + -e "s:gateway:${HOSTNAME}:" \ + -e 's:/snort_data:/var/lib/sguil:' \ + -e 's:DAEMON 0:DAEMON 1:' \ + -e 's:DEBUG 1:DEBUG 0:g' \ + sensor/sensor_agent.conf || die + sed -i \ + -e 's:/var/run/sensor_agent.pid:/run/sguil-sensor.pid:' \ + sensor/sensor_agent.tcl || die +} + +src_install() { + dodoc doc/* + + dobin sensor/sensor_agent.tcl + + newinitd "${FILESDIR}/log_packets.initd" log_packets + newinitd "${FILESDIR}/sensor_agent.initd" sensor_agent + newconfd "${FILESDIR}/log_packets.confd" log_packets + insinto /etc/sguil + doins sensor/sensor_agent.conf + + # Create the directory structure + diropts -g sguil -o sguil + keepdir /var/lib/sguil /var/lib/sguil/archive \ + "/var/lib/sguil/${HOSTNAME}" \ + "/var/lib/sguil/${HOSTNAME}/portscans" \ + "/var/lib/sguil/${HOSTNAME}/ssn_logs" \ + "/var/lib/sguil/${HOSTNAME}/dailylogs" \ + "/var/lib/sguil/${HOSTNAME}/sancp" + +} + +pkg_postinst() { + elog + elog "You should check /etc/sguil/sensor_agent.conf and" + elog "/etc/init.d/logpackets and ensure that they are accurate" + elog "for your environment. They should work providing that you" + elog "are running the sensor on the same machine as the server." + elog "This ebuild assumes that you are running a single sensor" + elog "environment, if this is not the case then you must make sure" + elog "to modify /etc/sguil/sensor_agent.conf and change the HOSTNAME variable." + elog "You should crontab the /etc/init.d/log_packets script to restart" + elog "each hour." + elog +} diff --git a/net-analyzer/sguil-server/Manifest b/net-analyzer/sguil-server/Manifest new file mode 100644 index 000000000000..d7423a16252d --- /dev/null +++ b/net-analyzer/sguil-server/Manifest @@ -0,0 +1,3 @@ +DIST sguil-0.9.0.tar.gz 464204 BLAKE2B 147b743fd8f70969ee560a3f6995775c40cfbaf543d8292f16aa6f02289edde54207a3cddb4969229e0a123dad2fb589eaef3bddb016e6ff408a3d9be4c7820d SHA512 3f300901d0f0260fbc950b4c7604e3dc3eeb2d088ff45171db84e2d58e281242bf3582eac51162968f1f3766961aec4d0a7af54e85773102ee643a52e879cfa6 +DIST sguil-1.0.0.tar.gz 892934 BLAKE2B 69459eed682d91a1b57ba08c141dd655dbbfaa0d9d2956e6a26065f1b6820307b0e0e4dcbcad89537eba7499aea38f81739c351246e3dd6c46cab46bdf0d054f SHA512 fc3007383f90c99a0ace3eeebac75864f9aa549676e784c7bf1d81222282e3a5a3d5290b121097ae3c027dee3dd35bbe8ac9dfede04dbd561edfd3948a0465ab +DIST sguil-server-0.8.0.tar.gz 102236 BLAKE2B 15dfe03f79bba92486e12fa85a368e01005c8587abd7119ef5264c14efaf8f8861346c1744590316a2a40160d11b3042abe8456f911fee677d83846561a8ee70 SHA512 84161365579e3b4227314d9f61afad6ad220261525d7fc8016210a13ee607815eb33178bab026f8a217c43a42f2e623c41d579c5898f58207a18e31685426710 diff --git a/net-analyzer/sguil-server/files/sguild.confd b/net-analyzer/sguil-server/files/sguild.confd new file mode 100644 index 000000000000..216f6e60ad87 --- /dev/null +++ b/net-analyzer/sguil-server/files/sguild.confd @@ -0,0 +1,25 @@ +# Config file for /etc/init.d/sguild +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +#PATH to the sguild config (sguild.conf) file. +CONF=/etc/sguil/sguild.conf + +#PATH to the sguild config (autocat.conf) file. +AUTOCAT=/etc/sguil/autocat.conf + +#PATH to the sguild global queries (sguild.queries) file. +QUERIES=/etc/sguil/sguild.queries + +#PATH to the sguild users (sguild.users) file. +USERS=/etc/sguil/sguild.users + +#PATH to the sguild access file +ACCESS=/etc/sguil/sguild.access + +#Directory that contains sguild.pem and sguild.key +#Uncomment to enable openssl connectivity +#OPENSSLPATH="/etc/sguil/" + +#For any other options you wish to add +#EXTRA_SGUILD_OPTS= diff --git a/net-analyzer/sguil-server/files/sguild.initd b/net-analyzer/sguil-server/files/sguild.initd new file mode 100644 index 000000000000..e4fec500feb9 --- /dev/null +++ b/net-analyzer/sguil-server/files/sguild.initd @@ -0,0 +1,44 @@ +#!/sbin/openrc-run +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +[ -z "${CONF}" ] && CONF="/etc/sguil/sguild.conf" +[ -z "${AUTOCAT}" ] && AUTOCAT="/etc/sguil/autocat.conf" +[ -z "${QUERIES}" ] && QUERIES="/etc/sguil/sguild.queries" +[ -z "${USERS}" ] && USERS="/etc/sguil/sguild.users" +[ -z "${ACCESS}" ] && AUTOCAT="/etc/sguil/sguild.access" + +SGUILD_OPTS="-D -c ${CONF} -u ${USERS} -A ${ACCESS}" + +[ -n "${OPENSSLPATH}" ] && SGUILD_OPTS="${SGUILD_OPTS} -o -C ${OPENSSLPATH}" + +depend() { + need net + use mysql +} + +checkconfig() { + [ -f "${CONF}" ] || return 1 + [ -f "${AUTOCAT}" ] || return 1 + [ -f "${QUERIES}" ] || return 1 + [ -f "${USERS}" ] || return 1 + [ -f "${ACCESS}" ] || return 1 + if [ -n "${OPENSSLPATH}" ]; then + [ -f "${OPENSSLPATH}/sguild.key" ] || return 1 + [ -f "${OPENSSLPATH}/sguild.pem" ] || return 1 + fi +} + +start() { + checkconfig || return 1 + ebegin "Starting sguild" + start-stop-daemon --start --quiet -c sguil --exec /usr/bin/sguild \ + -- ${SGUILD_OPTS} ${EXTRA_SGUILD_OPTS} -D -P /run/sguild.pid + eend $? +} + +stop() { + ebegin "Stopping sguild" + start-stop-daemon --stop --quiet --pidfile /run/sguild.pid + eend $? +} diff --git a/net-analyzer/sguil-server/metadata.xml b/net-analyzer/sguil-server/metadata.xml new file mode 100644 index 000000000000..044ff6f7898b --- /dev/null +++ b/net-analyzer/sguil-server/metadata.xml @@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>netmon@gentoo.org</email> + <name>Gentoo network monitoring and analysis project</name> + </maintainer> + <upstream> + <remote-id type="github">bammv/sguil</remote-id> + <remote-id type="sourceforge">sguil</remote-id> + </upstream> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/sguil-server/sguil-server-0.8.0.ebuild b/net-analyzer/sguil-server/sguil-server-0.8.0.ebuild new file mode 100644 index 000000000000..916e85a177ae --- /dev/null +++ b/net-analyzer/sguil-server/sguil-server-0.8.0.ebuild @@ -0,0 +1,99 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +inherit multilib ssl-cert user + +MY_PV="${PV/_p/p}" +DESCRIPTION="Daemon for Sguil Network Security Monitoring" +HOMEPAGE="http://sguil.sourceforge.net" +SRC_URI="mirror://sourceforge/sguil/sguil-server-${MY_PV}.tar.gz" + +LICENSE="GPL-2 QPL" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="ssl" + +DEPEND=" + >=dev-lang/tcl-8.3:0=[-threads] + >=dev-tcltk/tclx-8.3 + dev-tcltk/tcllib + dev-tcltk/mysqltcl + ssl? ( >=dev-tcltk/tls-1.4.1 )" +RDEPEND="${DEPEND} + net-analyzer/p0f + net-analyzer/tcpflow + net-misc/openssh" + +S="${WORKDIR}/sguil-${MY_PV}" + +pkg_setup() { + enewgroup sguil + enewuser sguil -1 -1 /var/lib/sguil sguil +} + +src_prepare() { + sed -i \ + -e 's:DEBUG 2:DEBUG 1:' -e 's:DAEMON 0:DAEMON 1:' \ + -e 's:SGUILD_LIB_PATH ./lib:SGUILD_LIB_PATH /usr/lib/sguild:g' \ + -e 's:/sguild_data/rules:/var/lib/sguil/rules:g' \ + -e 's:/sguild_data/archive:/var/lib/sguil/archive:g' \ + -e 's:/usr/lib/sguild:/usr/'$(get_libdir)'/sguild:g' \ + server/sguild.conf || die +} + +src_install() { + dodoc server/sql_scripts/* + dodoc doc/CHANGES doc/OPENSSL.README doc/USAGE doc/INSTALL \ + doc/TODO doc/sguildb.dia + + insopts -m640 + insinto /etc/sguil + doins server/{sguild.email,sguild.users,sguild.conf,sguild.queries,sguild.access,autocat.conf} + + insinto /usr/$(get_libdir)/sguild + doins server/lib/* + dobin server/sguild + newinitd "${FILESDIR}/sguild.initd" sguild + newconfd "${FILESDIR}/sguild.confd" sguild + + if use ssl; then + sed -i -e "s/#OPENSSL/OPENSSL/" "${D}/etc/conf.d/sguild" + fi + + diropts -g sguil -o sguil + keepdir \ + /var/lib/sguil \ + /var/lib/sguil/archive \ + /var/lib/sguil/rules + +} + +pkg_postinst() { + if use ssl && ! [ -f "${ROOT}"/etc/sguil/sguild.key ]; then + install_cert /etc/sguil/sguild + fi + + chown -R sguil:sguil "${ROOT}"/etc/sguil/sguild.* + chown -R sguil:sguil "${ROOT}"/usr/lib/sguild + + if [ -d "${ROOT}"/etc/snort/rules ] ; then + ln -s /etc/snort/rules "${ROOT}"/var/lib/sguil/rules/${HOSTNAME} + fi + + elog + elog "Please customize the sguild configuration files in /etc/sguild before" + elog "trying to run the daemon. Additionally you will need to setup the" + elog "mysql database. See /usr/share/doc/${PF}/INSTALL.gz for information." + elog "Please note that it is STRONGLY recommended to mount a separate" + elog "filesystem at /var/lib/sguil for both space and performance reasons" + elog "as a large amount of data will be kept in the directory structure" + elog "underneath that top directory." + elog + elog "You should create the sguild db as per the install instructions in" + elog "/usr/share/doc/${PF}/ and use the appropriate" + elog "database setup script located in the same directory." + + elog +} diff --git a/net-analyzer/sguil-server/sguil-server-0.9.0.ebuild b/net-analyzer/sguil-server/sguil-server-0.9.0.ebuild new file mode 100644 index 000000000000..2e7c27e1fe29 --- /dev/null +++ b/net-analyzer/sguil-server/sguil-server-0.9.0.ebuild @@ -0,0 +1,99 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +inherit multilib ssl-cert user + +MY_PV="${PV/_p/p}" +DESCRIPTION="Daemon for Sguil Network Security Monitoring" +HOMEPAGE="http://sguil.sourceforge.net" +SRC_URI="https://github.com/bammv/${PN/-server}/archive/v${PV}.tar.gz -> ${P/-server}.tar.gz" + +LICENSE="GPL-2 QPL" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="ssl" + +DEPEND=" + >=dev-lang/tcl-8.3:0=[-threads] + >=dev-tcltk/tclx-8.3 + dev-tcltk/tcllib + dev-tcltk/mysqltcl + ssl? ( >=dev-tcltk/tls-1.4.1 )" +RDEPEND="${DEPEND} + net-analyzer/p0f + net-analyzer/tcpflow + net-misc/openssh" + +S="${WORKDIR}/sguil-${MY_PV}" + +pkg_setup() { + enewgroup sguil + enewuser sguil -1 -1 /var/lib/sguil sguil +} + +src_prepare() { + sed -i \ + -e 's:DEBUG 2:DEBUG 1:' -e 's:DAEMON 0:DAEMON 1:' \ + -e 's:SGUILD_LIB_PATH ./lib:SGUILD_LIB_PATH /usr/lib/sguild:g' \ + -e 's:/sguild_data/rules:/var/lib/sguil/rules:g' \ + -e 's:/sguild_data/archive:/var/lib/sguil/archive:g' \ + -e 's:/usr/lib/sguild:/usr/'$(get_libdir)'/sguild:g' \ + server/sguild.conf || die +} + +src_install() { + dodoc server/sql_scripts/* + dodoc doc/CHANGES doc/OPENSSL.README doc/USAGE doc/INSTALL \ + doc/TODO doc/sguildb.dia + + insopts -m640 + insinto /etc/sguil + doins server/{sguild.email,sguild.users,sguild.conf,sguild.queries,sguild.access,autocat.conf} + + insinto /usr/$(get_libdir)/sguild + doins server/lib/* + dobin server/sguild + newinitd "${FILESDIR}/sguild.initd" sguild + newconfd "${FILESDIR}/sguild.confd" sguild + + if use ssl; then + sed -i -e "s/#OPENSSL/OPENSSL/" "${D}/etc/conf.d/sguild" + fi + + diropts -g sguil -o sguil + keepdir \ + /var/lib/sguil \ + /var/lib/sguil/archive \ + /var/lib/sguil/rules + +} + +pkg_postinst() { + if use ssl && ! [ -f "${ROOT}"/etc/sguil/sguild.key ]; then + install_cert /etc/sguil/sguild + fi + + chown -R sguil:sguil "${ROOT}"/etc/sguil/sguild.* + chown -R sguil:sguil "${ROOT}"/usr/lib/sguild + + if [ -d "${ROOT}"/etc/snort/rules ] ; then + ln -s /etc/snort/rules "${ROOT}"/var/lib/sguil/rules/${HOSTNAME} + fi + + elog + elog "Please customize the sguild configuration files in /etc/sguild before" + elog "trying to run the daemon. Additionally you will need to setup the" + elog "mysql database. See /usr/share/doc/${PF}/INSTALL.gz for information." + elog "Please note that it is STRONGLY recommended to mount a separate" + elog "filesystem at /var/lib/sguil for both space and performance reasons" + elog "as a large amount of data will be kept in the directory structure" + elog "underneath that top directory." + elog + elog "You should create the sguild db as per the install instructions in" + elog "/usr/share/doc/${PF}/ and use the appropriate" + elog "database setup script located in the same directory." + + elog +} diff --git a/net-analyzer/sguil-server/sguil-server-1.0.0.ebuild b/net-analyzer/sguil-server/sguil-server-1.0.0.ebuild new file mode 100644 index 000000000000..08a35d0af331 --- /dev/null +++ b/net-analyzer/sguil-server/sguil-server-1.0.0.ebuild @@ -0,0 +1,101 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 +inherit ssl-cert user + +MY_PV="${PV/_p/p}" +DESCRIPTION="Daemon for Sguil Network Security Monitoring" +HOMEPAGE="https://github.com/bammv/sguil" +SRC_URI="https://github.com/bammv/sguil/archive/v${PV}.tar.gz -> ${P/-server}.tar.gz" + +LICENSE="GPL-2 QPL" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="ssl" + +DEPEND=" + >=dev-lang/tcl-8.3:0=[-threads] + >=dev-tcltk/tclx-8.3 + dev-tcltk/tcllib + dev-tcltk/mysqltcl + ssl? ( >=dev-tcltk/tls-1.4.1 ) +" +RDEPEND=" + ${DEPEND} + net-analyzer/p0f + net-analyzer/tcpflow + net-misc/openssh +" + +S="${WORKDIR}/sguil-${MY_PV}" + +pkg_setup() { + enewgroup sguil + enewuser sguil -1 -1 /var/lib/sguil sguil +} + +src_prepare() { + default + sed -i \ + -e 's:DEBUG 2:DEBUG 1:' -e 's:DAEMON 0:DAEMON 1:' \ + -e 's:SGUILD_LIB_PATH ./lib:SGUILD_LIB_PATH /usr/'$(get_libdir)'/sguild:g' \ + -e 's:/sguild_data/rules:/var/lib/sguil/rules:g' \ + -e 's:/sguild_data/archive:/var/lib/sguil/archive:g' \ + server/sguild.conf || die +} + +src_install() { + dodoc server/sql_scripts/* + dodoc doc/CHANGES doc/OPENSSL.README doc/USAGE doc/INSTALL \ + doc/TODO doc/sguildb.dia + + insopts -m640 + insinto /etc/sguil + doins server/{sguild.email,sguild.users,sguild.conf,sguild.queries,sguild.access,autocat.conf} + + insinto /usr/$(get_libdir)/sguild + doins server/lib/* + dobin server/sguild + newinitd "${FILESDIR}/sguild.initd" sguild + newconfd "${FILESDIR}/sguild.confd" sguild + + if use ssl; then + sed -i -e "s/#OPENSSL/OPENSSL/" "${D}/etc/conf.d/sguild" + fi + + diropts -g sguil -o sguil + keepdir \ + /var/lib/sguil \ + /var/lib/sguil/archive \ + /var/lib/sguil/rules + +} + +pkg_postinst() { + if use ssl && ! [ -f "${ROOT}"/etc/sguil/sguild.key ]; then + install_cert /etc/sguil/sguild + fi + + chown -R sguil:sguil "${ROOT}"/etc/sguil/sguild.* + chown -R sguil:sguil "${ROOT}"/usr/lib/sguild + + if [ -d "${ROOT}"/etc/snort/rules ] ; then + ln -s /etc/snort/rules "${ROOT}"/var/lib/sguil/rules/${HOSTNAME} + fi + + elog + elog "Please customize the sguild configuration files in /etc/sguild before" + elog "trying to run the daemon. Additionally you will need to setup the" + elog "mysql database. See /usr/share/doc/${PF}/INSTALL.gz for information." + elog "Please note that it is STRONGLY recommended to mount a separate" + elog "filesystem at /var/lib/sguil for both space and performance reasons" + elog "as a large amount of data will be kept in the directory structure" + elog "underneath that top directory." + elog + elog "You should create the sguild db as per the install instructions in" + elog "/usr/share/doc/${PF}/ and use the appropriate" + elog "database setup script located in the same directory." + + elog +} diff --git a/net-analyzer/sinfo/Manifest b/net-analyzer/sinfo/Manifest new file mode 100644 index 000000000000..444e1537c5e3 --- /dev/null +++ b/net-analyzer/sinfo/Manifest @@ -0,0 +1 @@ +DIST sinfo-0.0.48.tar.gz 703237 BLAKE2B b404aef3be802ecf00685b5fc36e8c53bdbfa7afcb4fe1f6339126c7d696ddcd19ea61cb611f94892cbf5ed12f50fe67f66a21c3727d9734d6d656e2b699c5c5 SHA512 9cbc790883dfd78970a5943599128f1af34a82362fa33e7d6f23d560806dce5955c45f7e82e79adcf7696166d1f39fd1856bae76087a3ba46d54e3e4963d4067 diff --git a/net-analyzer/sinfo/files/sinfo-0.0.47-tinfo.patch b/net-analyzer/sinfo/files/sinfo-0.0.47-tinfo.patch new file mode 100644 index 000000000000..939f05b627ad --- /dev/null +++ b/net-analyzer/sinfo/files/sinfo-0.0.47-tinfo.patch @@ -0,0 +1,14 @@ +--- a/configure.ac ++++ b/configure.ac +@@ -54,7 +54,10 @@ + [ AC_MSG_RESULT(CPUNO_ADJUST disabled) ] ) + + dnl ncurses useable? +-MP_WITH_CURSES ++PKG_CHECK_MODULES(ncurses,ncurses,[ ++ CURSES_LIB="$ncurses_LIBS" ++ AC_CHECK_HEADER([ncurses.h],AC_DEFINE(HAVE_NCURSES_H)], ++ AC_MSG_ERROR([ncurses not found]))) + AC_SUBST(CURSES_LIB) + + dnl check for use_default_colors() ... not available in ncurses << 4.x diff --git a/net-analyzer/sinfo/files/sinfo-0.0.48-acinclude.m4 b/net-analyzer/sinfo/files/sinfo-0.0.48-acinclude.m4 new file mode 100644 index 000000000000..b67f4346881d --- /dev/null +++ b/net-analyzer/sinfo/files/sinfo-0.0.48-acinclude.m4 @@ -0,0 +1,508 @@ +# generated automatically by aclocal 1.11.6 -*- Autoconf -*- + +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, +# 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, +# Inc. +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +# =========================================================================== +# http://www.gnu.org/software/autoconf-archive/ax_boost_base.html +# =========================================================================== +# +# SYNOPSIS +# +# AX_BOOST_BASE([MINIMUM-VERSION], [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) +# +# DESCRIPTION +# +# Test for the Boost C++ libraries of a particular version (or newer) +# +# If no path to the installed boost library is given the macro searchs +# under /usr, /usr/local, /opt and /opt/local and evaluates the +# $BOOST_ROOT environment variable. Further documentation is available at +# <http://randspringer.de/boost/index.html>. +# +# This macro calls: +# +# AC_SUBST(BOOST_CPPFLAGS) / AC_SUBST(BOOST_LDFLAGS) +# +# And sets: +# +# HAVE_BOOST +# +# LICENSE +# +# Copyright (c) 2008 Thomas Porschberg <thomas@randspringer.de> +# Copyright (c) 2009 Peter Adolphs +# +# Copying and distribution of this file, with or without modification, are +# permitted in any medium without royalty provided the copyright notice +# and this notice are preserved. This file is offered as-is, without any +# warranty. + +#serial 20 + +AC_DEFUN([AX_BOOST_BASE], +[ +AC_ARG_WITH([boost], + [AS_HELP_STRING([--with-boost@<:@=ARG@:>@], + [use Boost library from a standard location (ARG=yes), + from the specified location (ARG=<path>), + or disable it (ARG=no) + @<:@ARG=yes@:>@ ])], + [ + if test "$withval" = "no"; then + want_boost="no" + elif test "$withval" = "yes"; then + want_boost="yes" + ac_boost_path="" + else + want_boost="yes" + ac_boost_path="$withval" + fi + ], + [want_boost="yes"]) + + +AC_ARG_WITH([boost-libdir], + AS_HELP_STRING([--with-boost-libdir=LIB_DIR], + [Force given directory for boost libraries. Note that this will override library path detection, so use this parameter only if default library detection fails and you know exactly where your boost libraries are located.]), + [ + if test -d "$withval" + then + ac_boost_lib_path="$withval" + else + AC_MSG_ERROR(--with-boost-libdir expected directory name) + fi + ], + [ac_boost_lib_path=""] +) + +if test "x$want_boost" = "xyes"; then + boost_lib_version_req=ifelse([$1], ,1.20.0,$1) + boost_lib_version_req_shorten=`expr $boost_lib_version_req : '\([[0-9]]*\.[[0-9]]*\)'` + boost_lib_version_req_major=`expr $boost_lib_version_req : '\([[0-9]]*\)'` + boost_lib_version_req_minor=`expr $boost_lib_version_req : '[[0-9]]*\.\([[0-9]]*\)'` + boost_lib_version_req_sub_minor=`expr $boost_lib_version_req : '[[0-9]]*\.[[0-9]]*\.\([[0-9]]*\)'` + if test "x$boost_lib_version_req_sub_minor" = "x" ; then + boost_lib_version_req_sub_minor="0" + fi + WANT_BOOST_VERSION=`expr $boost_lib_version_req_major \* 100000 \+ $boost_lib_version_req_minor \* 100 \+ $boost_lib_version_req_sub_minor` + AC_MSG_CHECKING(for boostlib >= $boost_lib_version_req) + succeeded=no + + dnl On 64-bit systems check for system libraries in both lib64 and lib. + dnl The former is specified by FHS, but e.g. Debian does not adhere to + dnl this (as it rises problems for generic multi-arch support). + dnl The last entry in the list is chosen by default when no libraries + dnl are found, e.g. when only header-only libraries are installed! + libsubdirs="lib" + ax_arch=`uname -m` + if test $ax_arch = x86_64 -o $ax_arch = ppc64 -o $ax_arch = s390x -o $ax_arch = sparc64; then + libsubdirs="lib64 lib lib64" + fi + + dnl first we check the system location for boost libraries + dnl this location ist chosen if boost libraries are installed with the --layout=system option + dnl or if you install boost with RPM + if test "$ac_boost_path" != ""; then + BOOST_CPPFLAGS="-I$ac_boost_path/include" + for ac_boost_path_tmp in $libsubdirs; do + if test -d "$ac_boost_path"/"$ac_boost_path_tmp" ; then + BOOST_LDFLAGS="-L$ac_boost_path/$ac_boost_path_tmp" + break + fi + done + elif test "$cross_compiling" != yes; then + for ac_boost_path_tmp in /usr /usr/local /opt /opt/local ; do + if test -d "$ac_boost_path_tmp/include/boost" && test -r "$ac_boost_path_tmp/include/boost"; then + for libsubdir in $libsubdirs ; do + if ls "$ac_boost_path_tmp/$libsubdir/libboost_"* >/dev/null 2>&1 ; then break; fi + done + BOOST_LDFLAGS="-L$ac_boost_path_tmp/$libsubdir" + BOOST_CPPFLAGS="-I$ac_boost_path_tmp/include" + break; + fi + done + fi + + dnl overwrite ld flags if we have required special directory with + dnl --with-boost-libdir parameter + if test "$ac_boost_lib_path" != ""; then + BOOST_LDFLAGS="-L$ac_boost_lib_path" + fi + + CPPFLAGS_SAVED="$CPPFLAGS" + CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS" + export CPPFLAGS + + LDFLAGS_SAVED="$LDFLAGS" + LDFLAGS="$LDFLAGS $BOOST_LDFLAGS" + export LDFLAGS + + AC_REQUIRE([AC_PROG_CXX]) + AC_LANG_PUSH(C++) + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ + @%:@include <boost/version.hpp> + ]], [[ + #if BOOST_VERSION >= $WANT_BOOST_VERSION + // Everything is okay + #else + # error Boost version is too old + #endif + ]])],[ + AC_MSG_RESULT(yes) + succeeded=yes + found_system=yes + ],[ + ]) + AC_LANG_POP([C++]) + + + + dnl if we found no boost with system layout we search for boost libraries + dnl built and installed without the --layout=system option or for a staged(not installed) version + if test "x$succeeded" != "xyes"; then + _version=0 + if test "$ac_boost_path" != ""; then + if test -d "$ac_boost_path" && test -r "$ac_boost_path"; then + for i in `ls -d $ac_boost_path/include/boost-* 2>/dev/null`; do + _version_tmp=`echo $i | sed "s#$ac_boost_path##" | sed 's/\/include\/boost-//' | sed 's/_/./'` + V_CHECK=`expr $_version_tmp \> $_version` + if test "$V_CHECK" = "1" ; then + _version=$_version_tmp + fi + VERSION_UNDERSCORE=`echo $_version | sed 's/\./_/'` + BOOST_CPPFLAGS="-I$ac_boost_path/include/boost-$VERSION_UNDERSCORE" + done + fi + else + if test "$cross_compiling" != yes; then + for ac_boost_path in /usr /usr/local /opt /opt/local ; do + if test -d "$ac_boost_path" && test -r "$ac_boost_path"; then + for i in `ls -d $ac_boost_path/include/boost-* 2>/dev/null`; do + _version_tmp=`echo $i | sed "s#$ac_boost_path##" | sed 's/\/include\/boost-//' | sed 's/_/./'` + V_CHECK=`expr $_version_tmp \> $_version` + if test "$V_CHECK" = "1" ; then + _version=$_version_tmp + best_path=$ac_boost_path + fi + done + fi + done + + VERSION_UNDERSCORE=`echo $_version | sed 's/\./_/'` + BOOST_CPPFLAGS="-I$best_path/include/boost-$VERSION_UNDERSCORE" + if test "$ac_boost_lib_path" = ""; then + for libsubdir in $libsubdirs ; do + if ls "$best_path/$libsubdir/libboost_"* >/dev/null 2>&1 ; then break; fi + done + BOOST_LDFLAGS="-L$best_path/$libsubdir" + fi + fi + + if test "x$BOOST_ROOT" != "x"; then + for libsubdir in $libsubdirs ; do + if ls "$BOOST_ROOT/stage/$libsubdir/libboost_"* >/dev/null 2>&1 ; then break; fi + done + if test -d "$BOOST_ROOT" && test -r "$BOOST_ROOT" && test -d "$BOOST_ROOT/stage/$libsubdir" && test -r "$BOOST_ROOT/stage/$libsubdir"; then + version_dir=`expr //$BOOST_ROOT : '.*/\(.*\)'` + stage_version=`echo $version_dir | sed 's/boost_//' | sed 's/_/./g'` + stage_version_shorten=`expr $stage_version : '\([[0-9]]*\.[[0-9]]*\)'` + V_CHECK=`expr $stage_version_shorten \>\= $_version` + if test "$V_CHECK" = "1" -a "$ac_boost_lib_path" = "" ; then + AC_MSG_NOTICE(We will use a staged boost library from $BOOST_ROOT) + BOOST_CPPFLAGS="-I$BOOST_ROOT" + BOOST_LDFLAGS="-L$BOOST_ROOT/stage/$libsubdir" + fi + fi + fi + fi + + CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS" + export CPPFLAGS + LDFLAGS="$LDFLAGS $BOOST_LDFLAGS" + export LDFLAGS + + AC_LANG_PUSH(C++) + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ + @%:@include <boost/version.hpp> + ]], [[ + #if BOOST_VERSION >= $WANT_BOOST_VERSION + // Everything is okay + #else + # error Boost version is too old + #endif + ]])],[ + AC_MSG_RESULT(yes) + succeeded=yes + found_system=yes + ],[ + ]) + AC_LANG_POP([C++]) + fi + + if test "$succeeded" != "yes" ; then + if test "$_version" = "0" ; then + AC_MSG_NOTICE([[We could not detect the boost libraries (version $boost_lib_version_req_shorten or higher). If you have a staged boost library (still not installed) please specify \$BOOST_ROOT in your environment and do not give a PATH to --with-boost option. If you are sure you have boost installed, then check your version number looking in <boost/version.hpp>. See http://randspringer.de/boost for more documentation.]]) + else + AC_MSG_NOTICE([Your boost libraries seems to old (version $_version).]) + fi + # execute ACTION-IF-NOT-FOUND (if present): + ifelse([$3], , :, [$3]) + else + AC_SUBST(BOOST_CPPFLAGS) + AC_SUBST(BOOST_LDFLAGS) + AC_DEFINE(HAVE_BOOST,,[define if the Boost library is available]) + # execute ACTION-IF-FOUND (if present): + ifelse([$2], , :, [$2]) + fi + + CPPFLAGS="$CPPFLAGS_SAVED" + LDFLAGS="$LDFLAGS_SAVED" +fi + +]) + +# =========================================================================== +# http://www.gnu.org/software/autoconf-archive/ax_boost_signals.html +# =========================================================================== +# +# SYNOPSIS +# +# AX_BOOST_SIGNALS +# +# DESCRIPTION +# +# Test for Signals library from the Boost C++ libraries. The macro +# requires a preceding call to AX_BOOST_BASE. Further documentation is +# available at <http://randspringer.de/boost/index.html>. +# +# This macro calls: +# +# AC_SUBST(BOOST_SIGNALS_LIB) +# +# And sets: +# +# HAVE_BOOST_SIGNALS +# +# LICENSE +# +# Copyright (c) 2008 Thomas Porschberg <thomas@randspringer.de> +# Copyright (c) 2008 Michael Tindal +# +# Copying and distribution of this file, with or without modification, are +# permitted in any medium without royalty provided the copyright notice +# and this notice are preserved. This file is offered as-is, without any +# warranty. + +#serial 19 + +AC_DEFUN([AX_BOOST_SIGNALS], +[ + AC_ARG_WITH([boost-signals], + AS_HELP_STRING([--with-boost-signals@<:@=special-lib@:>@], + [use the Signals library from boost - it is possible to specify a certain library for the linker + e.g. --with-boost-signals=boost_signals-gcc-mt-d ]), + [ + if test "$withval" = "no"; then + want_boost="no" + elif test "$withval" = "yes"; then + want_boost="yes" + ax_boost_user_signals_lib="" + else + want_boost="yes" + ax_boost_user_signals_lib="$withval" + fi + ], + [want_boost="yes"] + ) + + if test "x$want_boost" = "xyes"; then + AC_REQUIRE([AC_PROG_CC]) + CPPFLAGS_SAVED="$CPPFLAGS" + CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS" + export CPPFLAGS + + LDFLAGS_SAVED="$LDFLAGS" + LDFLAGS="$LDFLAGS $BOOST_LDFLAGS" + export LDFLAGS + + AC_CACHE_CHECK(whether the Boost::Signals library is available, + ax_cv_boost_signals, + [AC_LANG_PUSH([C++]) + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[@%:@include <boost/signal.hpp> + ]], + [[boost::signal<void ()> sig; + return 0; + ]])], + ax_cv_boost_signals=yes, ax_cv_boost_signals=no) + AC_LANG_POP([C++]) + ]) + if test "x$ax_cv_boost_signals" = "xyes"; then + AC_DEFINE(HAVE_BOOST_SIGNALS,,[define if the Boost::Signals library is available]) + BOOSTLIBDIR=`echo $BOOST_LDFLAGS | sed -e 's/@<:@^\/@:>@*//'` + if test "x$ax_boost_user_signals_lib" = "x"; then + for libextension in `ls $BOOSTLIBDIR/libboost_signals*.so* $BOOSTLIBDIR/libboost_signals*.a* 2>/dev/null | sed 's,.*/,,' | sed -e 's;^lib\(boost_signals.*\)\.so.*$;\1;' -e 's;^lib\(boost_signals.*\)\.a*$;\1;'` ; do + ax_lib=${libextension} + AC_CHECK_LIB($ax_lib, exit, + [BOOST_SIGNALS_LIB="-l$ax_lib"; AC_SUBST(BOOST_SIGNALS_LIB) link_signals="yes"; break], + [link_signals="no"]) + done + if test "x$link_signals" != "xyes"; then + for libextension in `ls $BOOSTLIBDIR/boost_signals*.{dll,a}* 2>/dev/null | sed 's,.*/,,' | sed -e 's;^\(boost_signals.*\)\.dll.*$;\1;' -e 's;^\(boost_signals.*\)\.a*$;\1;'` ; do + ax_lib=${libextension} + AC_CHECK_LIB($ax_lib, exit, + [BOOST_SIGNALS_LIB="-l$ax_lib"; AC_SUBST(BOOST_SIGNALS_LIB) link_signals="yes"; break], + [link_signals="no"]) + done + fi + + else + for ax_lib in $ax_boost_user_signals_lib boost_signals-$ax_boost_user_signals_lib; do + AC_CHECK_LIB($ax_lib, main, + [BOOST_SIGNALS_LIB="-l$ax_lib"; AC_SUBST(BOOST_SIGNALS_LIB) link_signals="yes"; break], + [link_signals="no"]) + done + + fi + if test "x$ax_lib" = "x"; then + AC_MSG_ERROR(Could not find a version of the library!) + fi + if test "x$link_signals" != "xyes"; then + AC_MSG_ERROR(Could not link against $ax_lib !) + fi + fi + + CPPFLAGS="$CPPFLAGS_SAVED" + LDFLAGS="$LDFLAGS_SAVED" + fi +]) + +# =========================================================================== +# http://www.gnu.org/software/autoconf-archive/ax_boost_system.html +# =========================================================================== +# +# SYNOPSIS +# +# AX_BOOST_SYSTEM +# +# DESCRIPTION +# +# Test for System library from the Boost C++ libraries. The macro requires +# a preceding call to AX_BOOST_BASE. Further documentation is available at +# <http://randspringer.de/boost/index.html>. +# +# This macro calls: +# +# AC_SUBST(BOOST_SYSTEM_LIB) +# +# And sets: +# +# HAVE_BOOST_SYSTEM +# +# LICENSE +# +# Copyright (c) 2008 Thomas Porschberg <thomas@randspringer.de> +# Copyright (c) 2008 Michael Tindal +# Copyright (c) 2008 Daniel Casimiro <dan.casimiro@gmail.com> +# +# Copying and distribution of this file, with or without modification, are +# permitted in any medium without royalty provided the copyright notice +# and this notice are preserved. This file is offered as-is, without any +# warranty. + +#serial 14 + +AC_DEFUN([AX_BOOST_SYSTEM], +[ + AC_ARG_WITH([boost-system], + AS_HELP_STRING([--with-boost-system@<:@=special-lib@:>@], + [use the System library from boost - it is possible to specify a certain library for the linker + e.g. --with-boost-system=boost_system-gcc-mt ]), + [ + if test "$withval" = "no"; then + want_boost="no" + elif test "$withval" = "yes"; then + want_boost="yes" + ax_boost_user_system_lib="" + else + want_boost="yes" + ax_boost_user_system_lib="$withval" + fi + ], + [want_boost="yes"] + ) + + if test "x$want_boost" = "xyes"; then + AC_REQUIRE([AC_PROG_CC]) + AC_REQUIRE([AC_CANONICAL_BUILD]) + CPPFLAGS_SAVED="$CPPFLAGS" + CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS" + export CPPFLAGS + + LDFLAGS_SAVED="$LDFLAGS" + LDFLAGS="$LDFLAGS $BOOST_LDFLAGS" + export LDFLAGS + + AC_CACHE_CHECK(whether the Boost::System library is available, + ax_cv_boost_system, + [AC_LANG_PUSH([C++]) + CXXFLAGS_SAVE=$CXXFLAGS + + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[@%:@include <boost/system/error_code.hpp>]], + [[boost::system::system_category]])], + ax_cv_boost_system=yes, ax_cv_boost_system=no) + CXXFLAGS=$CXXFLAGS_SAVE + AC_LANG_POP([C++]) + ]) + if test "x$ax_cv_boost_system" = "xyes"; then + AC_SUBST(BOOST_CPPFLAGS) + + AC_DEFINE(HAVE_BOOST_SYSTEM,,[define if the Boost::System library is available]) + BOOSTLIBDIR=`echo $BOOST_LDFLAGS | sed -e 's/@<:@^\/@:>@*//'` + + LDFLAGS_SAVE=$LDFLAGS + if test "x$ax_boost_user_system_lib" = "x"; then + for libextension in `ls $BOOSTLIBDIR/libboost_system*.so* $BOOSTLIBDIR/libboost_system*.a* 2>/dev/null | sed 's,.*/,,' | sed -e 's;^lib\(boost_system.*\)\.so.*$;\1;' -e 's;^lib\(boost_system.*\)\.a*$;\1;'` ; do + ax_lib=${libextension} + AC_CHECK_LIB($ax_lib, exit, + [BOOST_SYSTEM_LIB="-l$ax_lib"; AC_SUBST(BOOST_SYSTEM_LIB) link_system="yes"; break], + [link_system="no"]) + done + if test "x$link_system" != "xyes"; then + for libextension in `ls $BOOSTLIBDIR/boost_system*.{dll,a}* 2>/dev/null | sed 's,.*/,,' | sed -e 's;^\(boost_system.*\)\.dll.*$;\1;' -e 's;^\(boost_system.*\)\.a*$;\1;'` ; do + ax_lib=${libextension} + AC_CHECK_LIB($ax_lib, exit, + [BOOST_SYSTEM_LIB="-l$ax_lib"; AC_SUBST(BOOST_SYSTEM_LIB) link_system="yes"; break], + [link_system="no"]) + done + fi + + else + for ax_lib in $ax_boost_user_system_lib boost_system-$ax_boost_user_system_lib; do + AC_CHECK_LIB($ax_lib, exit, + [BOOST_SYSTEM_LIB="-l$ax_lib"; AC_SUBST(BOOST_SYSTEM_LIB) link_system="yes"; break], + [link_system="no"]) + done + + fi + if test "x$ax_lib" = "x"; then + AC_MSG_ERROR(Could not find a version of the library!) + fi + if test "x$link_system" = "xno"; then + AC_MSG_ERROR(Could not link against $ax_lib !) + fi + fi + + CPPFLAGS="$CPPFLAGS_SAVED" + LDFLAGS="$LDFLAGS_SAVED" + fi +]) diff --git a/net-analyzer/sinfo/files/sinfo-0.0.48-gcc6.patch b/net-analyzer/sinfo/files/sinfo-0.0.48-gcc6.patch new file mode 100644 index 000000000000..0b8f4a347fe0 --- /dev/null +++ b/net-analyzer/sinfo/files/sinfo-0.0.48-gcc6.patch @@ -0,0 +1,24 @@ +Bug: https://bugs.gentoo.org/594990 + +--- a/libmessageio/tcpmessageserverconnection.cc ++++ b/libmessageio/tcpmessageserverconnection.cc +@@ -91,7 +91,7 @@ + } + + +-void TCPMessageServerConnection::queueAndSendMessageSlot(Message & message) ++void TCPMessageServerConnection::queueAndSendMessageSlot(const Message & message) + { + + if (sendQueue.size()<maxSendQueueSize) +--- a/libmessageio/tcpmessageserverconnection.h ++++ b/libmessageio/tcpmessageserverconnection.h +@@ -32,7 +32,7 @@ + void handleReadMessageSize(const boost::system::error_code& err, size_t length); + void handleReadMessage(const boost::system::error_code& err, size_t length); + +- void queueAndSendMessageSlot(Message & message); ++ void queueAndSendMessageSlot(const Message & message); + std::list<Message> sendQueue; + bool sendQueueCurrentlySending; + void startNewTransmission(); diff --git a/net-analyzer/sinfo/files/sinfod.confd b/net-analyzer/sinfo/files/sinfod.confd new file mode 100644 index 000000000000..c3b210b743dd --- /dev/null +++ b/net-analyzer/sinfo/files/sinfod.confd @@ -0,0 +1,4 @@ +# /etc/conf.d/sinfod: config file for /etc/init.d/sinfod + +# Various sinfod options +SINFOD_OPTS="--quiet" diff --git a/net-analyzer/sinfo/files/sinfod.initd b/net-analyzer/sinfo/files/sinfod.initd new file mode 100644 index 000000000000..20b9512bfe6b --- /dev/null +++ b/net-analyzer/sinfo/files/sinfod.initd @@ -0,0 +1,10 @@ +#!/sbin/openrc-run +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +command="/usr/sbin/${SVCNAME}" +command_args="${SINFOD_OPTS}" + +depend() { + need net +} diff --git a/net-analyzer/sinfo/metadata.xml b/net-analyzer/sinfo/metadata.xml new file mode 100644 index 000000000000..bd13a914477c --- /dev/null +++ b/net-analyzer/sinfo/metadata.xml @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<maintainer type="project"> + <email>netmon@gentoo.org</email> + <name>Gentoo network monitoring and analysis project</name> +</maintainer> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/sinfo/sinfo-0.0.48.ebuild b/net-analyzer/sinfo/sinfo-0.0.48.ebuild new file mode 100644 index 000000000000..441f23d854dd --- /dev/null +++ b/net-analyzer/sinfo/sinfo-0.0.48.ebuild @@ -0,0 +1,44 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 +inherit autotools eutils + +DESCRIPTION="A monitoring tool for networked computers" +HOMEPAGE="http://www.ant.uni-bremen.de/whomes/rinas/sinfo/" +SRC_URI="http://www.ant.uni-bremen.de/whomes/rinas/sinfo/download/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~arm ~x86" +IUSE="ipv6 static-libs" + +RDEPEND=" + !sys-cluster/slurm + dev-libs/boost + sys-libs/ncurses:= +" +DEPEND=" + ${RDEPEND} + virtual/pkgconfig +" + +src_prepare() { + cp "${FILESDIR}"/${P}-acinclude.m4 acinclude.m4 || die + epatch "${FILESDIR}"/${PN}-0.0.47-tinfo.patch + epatch "${FILESDIR}"/${P}-gcc6.patch + eautoreconf +} + +DOCS=( AUTHORS ChangeLog README ) + +src_configure() { + econf $(use_enable ipv6 IPv6) +} + +src_install() { + default + + newconfd "${FILESDIR}"/sinfod.confd sinfod + newinitd "${FILESDIR}"/sinfod.initd sinfod +} diff --git a/net-analyzer/siphon/Manifest b/net-analyzer/siphon/Manifest new file mode 100644 index 000000000000..edd6c0f118e9 --- /dev/null +++ b/net-analyzer/siphon/Manifest @@ -0,0 +1 @@ +DIST siphon-v.666.tar.gz 6951 BLAKE2B 8a37897aa52a73819a92422384252cac4cfecfacb4aedbb91af20592b6b831cd78af1dfc9f6da6f5d555c4d742fc9babe04ec446a3b0d214eab9b4cd0ea64883 SHA512 d355e80e7f102af13be9663d8e7cb28d3f3dc823d79192c287a5800e1239e4f37720b449a879605e5df0da1bb8accc3c70a605d94fc925788fe4a2e7bead650a diff --git a/net-analyzer/siphon/files/siphon-666-fno-common.patch b/net-analyzer/siphon/files/siphon-666-fno-common.patch new file mode 100644 index 000000000000..c3b1addf1b04 --- /dev/null +++ b/net-analyzer/siphon/files/siphon-666-fno-common.patch @@ -0,0 +1,22 @@ +--- a/main.c ++++ b/main.c +@@ -12,6 +12,9 @@ + + #include <siphon.h> + ++char *device, *logfile; ++int verbose, back; ++ + void usage (char *); + void title(void); + +--- a/siphon.h ++++ b/siphon.h +@@ -51,5 +51,5 @@ + void *parse (void *); + void *siphon_log(void *); + +-char *device, *logfile; +-int verbose, back; ++extern char *device, *logfile; ++extern int verbose, back; diff --git a/net-analyzer/siphon/files/siphon-666-gentoo.patch b/net-analyzer/siphon/files/siphon-666-gentoo.patch new file mode 100644 index 000000000000..eea6d93b802e --- /dev/null +++ b/net-analyzer/siphon/files/siphon-666-gentoo.patch @@ -0,0 +1,19 @@ +--- a/Makefile ++++ b/Makefile +@@ -1,6 +1,6 @@ + CC = gcc + CCFLAGS = -Wall -pthread -ggdb +-CFLAGS = -Wall -O2 -pthread -ggdb -I. ++CFLAGS += -pthread -Wall -I. + LIBS = -lpcap + OBJS = parse.o sniff.o main.o log.o + SRCS = ${OBJS:.o=.c} +@@ -9,7 +9,7 @@ + all: $(TARGET) + + $(TARGET): $(OBJS) +- $(CC) $(CCFLAGS) -o $(TARGET) $(OBJS) $(LIBS) ++ $(CC) $(CCFLAGS) $(LDFLAGS) -o $(TARGET) $(OBJS) $(LIBS) + + clean: + rm -f $(OBJS) *~ *.core core siphon diff --git a/net-analyzer/siphon/files/siphon-666-log.patch b/net-analyzer/siphon/files/siphon-666-log.patch new file mode 100644 index 000000000000..07d2de4d4d12 --- /dev/null +++ b/net-analyzer/siphon/files/siphon-666-log.patch @@ -0,0 +1,46 @@ +--- a/main.c ++++ b/main.c +@@ -98,7 +98,7 @@ + pti_parse.pti_pd[1] = pd_parse2log[1]; + + pthread_create (&parse_thread, NULL, (void *) parse, &pti_parse); +- pthread_create(&log_thread,NULL,(void *)log, (void *)pd_parse2log[0]); ++ pthread_create(&log_thread,NULL,(void *)siphon_log, (void *)pd_parse2log[0]); + pthread_create (&sniff_thread, NULL, (void *) sniff_network, + &pd_sniff2parse[1]); + +--- a/log.c ++++ b/log.c +@@ -19,7 +19,7 @@ + + int tag = 0; + +-void *log(void *pipe) ++void *siphon_log(void *pipe) + { + struct parse2log *info; + char hashed[100], buf[1024], *os, *proto = NULL, *df; +@@ -137,10 +137,10 @@ + FILE *osprints; + static char line[80], *oswin, *osttl, *osdf, *os, hexed[10]; + static int check = 0; +- osprints = fopen("osprints.conf","r"); ++ osprints = fopen("/etc/osprints.conf","r"); + + if(!osprints) { +- perror("Unable to find osprints.conf\n"); ++ perror("Unable to find /etc/osprints.conf\n"); + return "Unknown"; + } + +--- a/siphon.h ++++ b/siphon.h +@@ -49,7 +49,7 @@ + + void *sniff_network (void *); + void *parse (void *); +-void *log(void *); ++void *siphon_log(void *); + + char *device, *logfile; + int verbose, back; diff --git a/net-analyzer/siphon/metadata.xml b/net-analyzer/siphon/metadata.xml new file mode 100644 index 000000000000..bd13a914477c --- /dev/null +++ b/net-analyzer/siphon/metadata.xml @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<maintainer type="project"> + <email>netmon@gentoo.org</email> + <name>Gentoo network monitoring and analysis project</name> +</maintainer> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/siphon/siphon-666-r1.ebuild b/net-analyzer/siphon/siphon-666-r1.ebuild new file mode 100644 index 000000000000..dc691089fca8 --- /dev/null +++ b/net-analyzer/siphon/siphon-666-r1.ebuild @@ -0,0 +1,35 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 +inherit eutils toolchain-funcs + +MY_P=${PN}-v.${PV} + +DESCRIPTION="A portable passive network mapping suite" +HOMEPAGE="http://siphon.datanerds.net/" +SRC_URI="http://siphon.datanerds.net/${MY_P}.tar.gz" +LICENSE="BSD" +SLOT="0" +KEYWORDS="~amd64 ~ppc x86" + +DEPEND="net-libs/libpcap" +RDEPEND="${DEPEND}" + +S=${WORKDIR}/${MY_P} + +src_prepare() { + epatch "${FILESDIR}"/${P}-gentoo.patch + epatch "${FILESDIR}"/${P}-log.patch +} + +src_compile() { + emake CC="$(tc-getCC)" +} + +src_install() { + dobin ${PN} + insinto /etc + doins osprints.conf + dodoc README +} diff --git a/net-analyzer/siphon/siphon-666-r2.ebuild b/net-analyzer/siphon/siphon-666-r2.ebuild new file mode 100644 index 000000000000..7921c66b9a14 --- /dev/null +++ b/net-analyzer/siphon/siphon-666-r2.ebuild @@ -0,0 +1,34 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +inherit toolchain-funcs + +MY_P=${PN}-v.${PV} + +DESCRIPTION="A portable passive network mapping suite" +HOMEPAGE="http://siphon.datanerds.net/" +SRC_URI="http://siphon.datanerds.net/${MY_P}.tar.gz" +LICENSE="BSD" +SLOT="0" +KEYWORDS="~amd64 ~ppc ~x86" + +DEPEND="net-libs/libpcap" +RDEPEND="${DEPEND}" +S=${WORKDIR}/${MY_P} +PATCHES=( + "${FILESDIR}"/${P}-gentoo.patch + "${FILESDIR}"/${P}-log.patch + "${FILESDIR}"/${P}-fno-common.patch +) + +src_compile() { + emake CC="$(tc-getCC)" +} + +src_install() { + dobin ${PN} + insinto /etc + doins osprints.conf + dodoc README +} diff --git a/net-analyzer/slurm/Manifest b/net-analyzer/slurm/Manifest new file mode 100644 index 000000000000..33fb3260e5f1 --- /dev/null +++ b/net-analyzer/slurm/Manifest @@ -0,0 +1,2 @@ +DIST slurm-0.3.3.tar.gz 122839 BLAKE2B 2633ab72c6fa32c66a6573937241a3053644ea33ad43d6646a1f0b54e34367254f3185fea5ea7cd31fbd09d640bc56033e6b74ac74817ee4262511ee90a262f0 SHA512 67ffef9d0fc6239e2a742b2020a2a1fa913a6f0d681ffb7fd00611265e60b39f83b18cbd782ce841b6b39ed0db2c40cd6410d7f5d9408bf0eb0361b95949a8a3 +DIST slurm-0.4.3.tar.gz 36076 BLAKE2B 468dadfb7e338a7b11a2db8501763fa75e9f82af1c7411d132c6aec2e8426cbd1170fb9657a661dde35c77d6ad23497599affc9b36e583772950a2bf30715c20 SHA512 f55005e2e2acebf1b7be0f7106511f83123f4df30305d00495940220f99394ddd48193ee4985c91604f294487c181f6efebe9452137f7df5b9675d2c3388892f diff --git a/net-analyzer/slurm/files/slurm-0.3.3-gentoo.patch b/net-analyzer/slurm/files/slurm-0.3.3-gentoo.patch new file mode 100644 index 000000000000..bd97a10c1e81 --- /dev/null +++ b/net-analyzer/slurm/files/slurm-0.3.3-gentoo.patch @@ -0,0 +1,48 @@ +--- a/configure.in ++++ b/configure.in +@@ -40,31 +40,6 @@ + fi + AC_DEFINE(OSTYPE, ["${OSTYPE}"], [The operating system to build for]) + +-for cursespath in /usr/include/ncurses.h /usr/local/include/ncurses.h /usr/local/include/ncurses/ncurses.h /opt/include/ncurses.h /opt/include/curses.h /usr/include/curses.h /usr/local/include/curses.h /dev/null +-do +- test -f "${cursespath}" && break +-done +-case ${cursespath} in +- /usr/include/*) +- CFLAGS="$CFLAGS -I/usr/include" +- LDFLAGS="" +- ;; +- /usr/local/include/ncurses/*) +- CFLAGS="${CFLAGS} -I/usr/local/include/ncurses" +- LDFLAGS="-L/usr/local/lib" +- SOLLDFLAGS="-R/usr/local/lib" +- ;; +- /usr/local/include/*) +- CFLAGS="${CFLAGS} -I/usr/local/include" +- LDFLAGS="-L/usr/local/lib" +- SOLLDFLAGS="-R/usr/local/lib" +- ;; +- /opt/include/*) +- CFLAGS="${CFLAGS} -I/opt/include" +- LDFLAGS="-L/opt/lib" +- SOLLDFLAGS="-R/opt/lib" +- ;; +-esac + # add Slowlaris -R and libraries to LDFLAGS + if test ${OSTYPE} = "solaris" ; then + LDFLAGS="${LDFLAGS} ${SOLLDFLAGS} -lnsl -lsocket -lkstat" +@@ -74,7 +49,12 @@ + ncurses_support="no" + curses_support="no" + color_support="no" +-AC_CHECK_LIB(ncurses, use_default_colors, LDFLAGS="$LDFLAGS -lncurses"; CFLAGS="$CFLAGS -D_HAVE_NCURSES -D_HAVE_NCURSES_COLOR"; color_support="yes"; ncurses_support="yes", AC_CHECK_LIB(ncurses, use_default_colors, LDFLAGS="$LDFLAGS -lncurses"; CFLAGS="$CFLAGS -D_HAVE_NCURSES"; ncurses_support="yes"; echo "NO TRANSPARENCY SUPPORT in this ncurses lib", AC_CHECK_LIB(curses, initscr, LDFLAGS="$LDFLAGS -lcurses"; CFLAGS="$CFLAGS -D_HAVE_CURSES"; curses_support="yes"; echo "NO TRANSPARENCY SUPPORT in curses lib"))) ++PKG_CHECK_MODULES(ncurses,ncurses, ++ LIBS="$LIBS $ncurses_LIBS" ++ AC_DEFINE(HAVE_NCURSES, 1, [Define if we have ncurses]) ++ AC_DEFINE(HAVE_NCURSES_COLOR, 1, [We want color]) ++ color_support="yes"; ncurses_support="yes" ++ ,AC_MSG_ERROR([ncurses not found])) + + # disable color support on Solaris for now + if test ${OSTYPE} = "solaris" ; then diff --git a/net-analyzer/slurm/files/slurm-0.3.3-overflow.patch b/net-analyzer/slurm/files/slurm-0.3.3-overflow.patch new file mode 100644 index 000000000000..f9adc1d9bf71 --- /dev/null +++ b/net-analyzer/slurm/files/slurm-0.3.3-overflow.patch @@ -0,0 +1,17 @@ +--- a/src/linux.c ++++ b/src/linux.c +@@ -68,11 +68,11 @@ + + /* do not parse the first two lines as they only contain static garbage */ + fseek(proc_net_dev, 0, SEEK_SET); +- fgets(buffer, BUFSIZ-1, proc_net_dev); +- fgets(buffer, BUFSIZ-1, proc_net_dev); ++ fgets(buffer, BUFSIZE-1, proc_net_dev); ++ fgets(buffer, BUFSIZE-1, proc_net_dev); + + interfacefound = 0; +- while (fgets(buffer, BUFSIZ-1, proc_net_dev) != NULL) ++ while (fgets(buffer, BUFSIZE-1, proc_net_dev) != NULL) + { + /* find the device name and substitute ':' with '\0' */ + ptr = buffer; diff --git a/net-analyzer/slurm/files/slurm-0.3.3-theme.patch b/net-analyzer/slurm/files/slurm-0.3.3-theme.patch new file mode 100644 index 000000000000..131554ee57f7 --- /dev/null +++ b/net-analyzer/slurm/files/slurm-0.3.3-theme.patch @@ -0,0 +1,16 @@ +--- a/theme.c ++++ b/theme.c +@@ -70,13 +70,7 @@ + if ((f = fopen(filename, "r")) == NULL) + { + bzero(&filename, BUFSIZ); +-#ifdef __NetBSD__ +- snprintf(filename, BUFSIZ, "/usr/pkg/share/slurm/%s.theme", name); +-#elif __Debian__ + snprintf(filename, BUFSIZ, "/usr/share/slurm/%s.theme", name); +-#else +- snprintf(filename, BUFSIZ, "/usr/local/share/slurm/%s.theme", name); +-#endif + if ((f = fopen(filename, "r")) == NULL) + error(ERR_FATAL, "cannot find theme '%s'", name); + } diff --git a/net-analyzer/slurm/files/slurm-0.4.3-tinfo.patch b/net-analyzer/slurm/files/slurm-0.4.3-tinfo.patch new file mode 100644 index 000000000000..c1a1233f177b --- /dev/null +++ b/net-analyzer/slurm/files/slurm-0.4.3-tinfo.patch @@ -0,0 +1,11 @@ +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -25,7 +25,7 @@ + + add_executable(slurm ${SLURM_SOURCES}) + +-target_link_libraries(slurm ncurses) ++target_link_libraries(slurm ${CURSES_LIBRARY} ${CURSES_EXTRA_LIBRARY}) + + # install + install(TARGETS slurm DESTINATION bin) diff --git a/net-analyzer/slurm/files/slurm-0.4.3-version.patch b/net-analyzer/slurm/files/slurm-0.4.3-version.patch new file mode 100644 index 000000000000..2266cad19356 --- /dev/null +++ b/net-analyzer/slurm/files/slurm-0.4.3-version.patch @@ -0,0 +1,7 @@ +--- a/config.h ++++ b/config.h +@@ -1,2 +1,2 @@ +-#define PACKAGE_VERSION "0.4.3+git" +-#define VERSION "0.4.3+git" ++#define PACKAGE_VERSION "0.4.3" ++#define VERSION "0.4.3" diff --git a/net-analyzer/slurm/metadata.xml b/net-analyzer/slurm/metadata.xml new file mode 100644 index 000000000000..0f8be8e7b1ea --- /dev/null +++ b/net-analyzer/slurm/metadata.xml @@ -0,0 +1,12 @@ +<?xml version='1.0' encoding='UTF-8'?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>netmon@gentoo.org</email> + <name>Gentoo network monitoring and analysis project</name> + </maintainer> + <upstream> + <remote-id type="github">mattthias/slurm</remote-id> + </upstream> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/slurm/slurm-0.3.3-r2.ebuild b/net-analyzer/slurm/slurm-0.3.3-r2.ebuild new file mode 100644 index 000000000000..b8f2e06dde3e --- /dev/null +++ b/net-analyzer/slurm/slurm-0.3.3-r2.ebuild @@ -0,0 +1,37 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 +inherit autotools eutils + +DESCRIPTION="Realtime network interface monitor based on FreeBSD's pppstatus" +HOMEPAGE="http://www.wormulon.net/projects/slurm" +SRC_URI="http://www.wormulon.net/files/code/slurm/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="amd64 ~ppc ~sparc x86" + +RDEPEND="sys-libs/ncurses" +DEPEND=" + ${RDEPEND} + virtual/pkgconfig +" + +src_prepare() { + epatch \ + "${FILESDIR}"/${P}-gentoo.patch \ + "${FILESDIR}"/${P}-overflow.patch \ + "${FILESDIR}"/${P}-theme.patch + eautoreconf +} + +src_install() { + dobin slurm + + insinto /usr/share/${PN} + doins themes/*.theme + + doman slurm.1 + dodoc AUTHORS ChangeLog FAQ KEYS README THANKS THEMES.txt TODO +} diff --git a/net-analyzer/slurm/slurm-0.4.3.ebuild b/net-analyzer/slurm/slurm-0.4.3.ebuild new file mode 100644 index 000000000000..95641beb1b22 --- /dev/null +++ b/net-analyzer/slurm/slurm-0.4.3.ebuild @@ -0,0 +1,37 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 +inherit cmake-utils + +DESCRIPTION="Realtime network interface monitor based on FreeBSD's pppstatus" +HOMEPAGE="https://github.com/mattthias/slurm" +SRC_URI="https://github.com/mattthias/slurm/archive/upstream/${PN}.tar.gz -> ${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~ppc ~sparc ~x86" + +RDEPEND=" + sys-libs/ncurses:* +" +DEPEND=" + ${RDEPEND} +" +PATCHES=( + "${FILESDIR}"/${PN}-0.3.3-overflow.patch + "${FILESDIR}"/${P}-tinfo.patch + "${FILESDIR}"/${P}-version.patch +) +DOCS=( + AUTHORS + ChangeLog + FAQ + KEYS + README + THANKS + THEMES.txt + TODO +) + +S=${WORKDIR}/${PN}-upstream diff --git a/net-analyzer/smokeping/Manifest b/net-analyzer/smokeping/Manifest new file mode 100644 index 000000000000..518a916d5582 --- /dev/null +++ b/net-analyzer/smokeping/Manifest @@ -0,0 +1,3 @@ +DIST smokeping-2.6.9.tar.gz 427185 BLAKE2B 3b626d852542f5e9e616ce88a8fd2fd773036822f10f548a1cec242f5d420ec67d940ee49c08da99f7e0815921251cb474b103c8c12c364f90651a4e74e9abf3 SHA512 ab3cec15fd9f90510f902da7ce5bac5915558cac198cc88f0ce193a53a0158c9055e28c8c6671cc6653ac42ab51346e1eb19e537f1ab5c234fd498c6b777499d +DIST smokeping-2.7.2.tar.gz 4614968 BLAKE2B 7cf9f4bd47f3a5419549b0a62fbaca664b70d73af0d57dc005d32030e1e86556f5100d00ed43743aa2a3dffa59bbe00129309b473fc261a7dcdc6225d80a8921 SHA512 e912cdf7ec9af871b9a4a90d787bae04feb21e40c1259bb835eb25b098e03023d7424e53d344ed459f8423260b0eb311f4dd12824195da9647554943685f4d07 +DIST smokeping-2.7.3.tar.gz 6614710 BLAKE2B 7fa10c19487427a3092a1e5591422cb37f66a6eab86b8b43eebbc8af441d5426b99f3c7b54040660f6f150ade99b1ea2555b4fcd6f80d8306d6f86ac9f95974e SHA512 d46d61539ffdd9cac41391aa813364260f90f84443c328b1c9233ab6ba3a0c157861694614e6c33e18b153f6a6afc0769c5fc7752b3ab52f114d984e53232830 diff --git a/net-analyzer/smokeping/files/79_smokeping.conf b/net-analyzer/smokeping/files/79_smokeping.conf new file mode 100644 index 000000000000..1e9361ba501a --- /dev/null +++ b/net-analyzer/smokeping/files/79_smokeping.conf @@ -0,0 +1,15 @@ +### +### Setup the smokeping image cache and perl cgi script +### +<IfModule mod_alias.c> + Alias "/.simg/" "/var/lib/smokeping/.simg/" + <IfModule mod_perl.c> + <Directory "/var/lib/smokeping/.simg/"> + Options -Indexes MultiViews + AllowOverride None + Order deny,allow + Deny from all + Allow from 127.0.0.1 + </Directory> + </IfModule> +</IfModule> diff --git a/net-analyzer/smokeping/files/smokeping-2.6.9-pod.patch b/net-analyzer/smokeping/files/smokeping-2.6.9-pod.patch new file mode 100644 index 000000000000..81a1e053b4f8 --- /dev/null +++ b/net-analyzer/smokeping/files/smokeping-2.6.9-pod.patch @@ -0,0 +1,11 @@ +--- a/lib/Smokeping.pm ++++ b/lib/Smokeping.pm +@@ -2631,7 +2631,7 @@ + The base directory where SmokePing keeps the files related to the DYNAMIC function. + This directory must be writeable by the WWW server. It is also used for temporary + storage of slave polling results by the master in +-L<the master/slave mode|smokeping_master_slave>. ++L<the masterE<sol>slave mode|smokeping_master_slave>. + + If this variable is not specified, the value of C<datadir> will be used instead. + DOC diff --git a/net-analyzer/smokeping/files/smokeping.conf b/net-analyzer/smokeping/files/smokeping.conf new file mode 100644 index 000000000000..729726316fbd --- /dev/null +++ b/net-analyzer/smokeping/files/smokeping.conf @@ -0,0 +1 @@ +d /run/smokeping 0755 root root diff --git a/net-analyzer/smokeping/files/smokeping.init.3 b/net-analyzer/smokeping/files/smokeping.init.3 new file mode 100644 index 000000000000..2e5e35795b91 --- /dev/null +++ b/net-analyzer/smokeping/files/smokeping.init.3 @@ -0,0 +1,77 @@ +#!/sbin/openrc-run +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +extra_commands="${opts} dump reload restore" + +depend() { + need net + use dns +} + +checkconfig() { + if [ ! -f "/etc/smokeping/config" ] ; then + eerror "You need /etc/smokeping/config to run smokeping!" + return 1 + fi +} + +start() { + checkconfig || return 1 + + if [ ! -d /run/smokeping/ ]; then + mkdir /run/smokeping/ + fi + chown smokeping:smokeping /run/smokeping/ + + ebegin "Starting smokeping" + LC_ALL=C \ + start-stop-daemon --start --name smokeping \ + --pidfile /run/smokeping/smokeping.pid \ + --exec /usr/bin/smokeping \ + --user smokeping:smokeping + eend $? +} + +stop() { + ebegin "Stopping smokeping" + start-stop-daemon --stop \ + --pidfile /run/smokeping/smokeping.pid + eend $? +} + +reload() { + ebegin "Reloading smokeping" + /usr/bin/smokeping --reload 1>/dev/null 2>&1 + eend $? +} + +dump() { + ebegin "Dumping smokeping rrd files to XML for backup or upgrade use" + if service_started "${myservice}" ; then + eerror "You need to stop smokeping before dumping files!" + return 1 + fi + for f in `find /var/lib/smokeping -name '*.rrd' -print` ; do + f_xml=`dirname $f`/`basename $f .rrd`.xml + rrdtool dump "$f" > "${f_xml}" + chown root:0 "${f_xml}" + done + eend $? +} + +restore() { + ebegin "Restoring smokeping rrd files from XML dump files" + if service_started "${myservice}" ; then + eerror "You need to stop smokeping before restoring files!" + return 1 + fi + for f in `find /var/lib/smokeping -name '*.xml' -print` ; do + f_rrd=`dirname $f`/`basename $f .xml`.rrd + mv -f "${f_rrd}" "${f_rrd}.bak" + chown root:0 "${f_rrd}.bak" + rrdtool restore "$f" "${f_rrd}" + chown smokeping:smokeping "${f_rrd}" + done + eend $? +} diff --git a/net-analyzer/smokeping/files/smokeping.init.5 b/net-analyzer/smokeping/files/smokeping.init.5 new file mode 100644 index 000000000000..3c08c3fdc65e --- /dev/null +++ b/net-analyzer/smokeping/files/smokeping.init.5 @@ -0,0 +1,56 @@ +#!/sbin/openrc-run +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +command="/usr/bin/smokeping" +command_args="--nodaemon" +command_background="true" +command_user="smokeping:smokeping" +pidfile="/run/${RC_SVCNAME}.pid" +extra_started_commands="dump reload restore" +required_files="/etc/smokeping/config" + +depend() { + need net + use dns +} + +start_pre() { + export LC_ALL=C +} + +reload() { + ebegin "Reloading smokeping" + "${command}" --reload 2>&1 >/dev/null + eend $? +} + +dump() { + ebegin "Dumping smokeping rrd files to XML for backup or upgrade use" + if service_started "${myservice}" ; then + eerror "You need to stop smokeping before dumping files!" + return 1 + fi + for f in $(find /var/lib/smokeping -name '*.rrd' -print) ; do + f_xml=$(dirname $f)/$(basename $f .rrd).xml + rrdtool dump "$f" > "${f_xml}" + chown root:0 "${f_xml}" + done + eend $? +} + +restore() { + ebegin "Restoring smokeping rrd files from XML dump files" + if service_started "${myservice}" ; then + eerror "You need to stop smokeping before restoring files!" + return 1 + fi + for f in $(find /var/lib/smokeping -name '*.xml' -print) ; do + f_rrd=$(dirname $f)/$(basename $f .xml).rrd + mv -f "${f_rrd}" "${f_rrd}.bak" + chown root:0 "${f_rrd}.bak" + rrdtool restore "$f" "${f_rrd}" + chown smokeping:smokeping "${f_rrd}" + done + eend $? +} diff --git a/net-analyzer/smokeping/files/smokeping.service b/net-analyzer/smokeping/files/smokeping.service new file mode 100644 index 000000000000..2130aca23627 --- /dev/null +++ b/net-analyzer/smokeping/files/smokeping.service @@ -0,0 +1,10 @@ +[Unit] +Description=Latency Logging and Graphing System +After=network.target + +[Service] +ExecStart=/usr/bin/smokeping --nodaemon +ExecReload=/bin/kill -HUP $MAINPID + +[Install] +WantedBy=multi-user.target diff --git a/net-analyzer/smokeping/metadata.xml b/net-analyzer/smokeping/metadata.xml new file mode 100644 index 000000000000..0e89fb921b50 --- /dev/null +++ b/net-analyzer/smokeping/metadata.xml @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<maintainer type="project"> +<email>netmon@gentoo.org</email> +<name>Gentoo network monitoring and analysis project</name> +</maintainer> +<use> +<flag name="dig">Install <pkg>net-dns/bind-tools</pkg> for dig functionality</flag> +<flag name="echoping">Install <pkg>net-analyzer/echoping</pkg> for echoping functionality</flag> +<flag name="telnet">Install <pkg>dev-perl/Net-Telnet</pkg> for telnet functionality</flag> +<flag name="ssh">Install ssh functionality</flag> +</use> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/smokeping/smokeping-2.6.9-r1.ebuild b/net-analyzer/smokeping/smokeping-2.6.9-r1.ebuild new file mode 100644 index 000000000000..7a4eb1a16840 --- /dev/null +++ b/net-analyzer/smokeping/smokeping-2.6.9-r1.ebuild @@ -0,0 +1,144 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 +inherit eutils user systemd + +DESCRIPTION="A powerful latency measurement tool" +HOMEPAGE="https://oss.oetiker.ch/smokeping/" +SRC_URI="https://oss.oetiker.ch/smokeping/pub/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +# dropping hppa and sparc because of way too may dependencies not having +# keywords in those architectures. +KEYWORDS="amd64 x86" + +# removing fcgi useflag as the configure script can't avoid it without patching +IUSE="apache2 curl dig echoping ipv6 ldap radius ssh telnet" + +DEPEND=" + !apache2? ( virtual/httpd-cgi ) + apache2? ( + >=www-apache/mod_perl-2.0.1 + www-apache/mod_fcgid + ) + curl? ( >=net-misc/curl-7.21.4 ) + dig? ( net-dns/bind-tools ) + echoping? ( >=net-analyzer/echoping-6.0.2 ) + ipv6? ( >=dev-perl/Socket6-0.20 ) + ldap? ( dev-perl/perl-ldap ) + radius? ( dev-perl/Authen-Radius ) + ssh? ( dev-perl/Net-OpenSSH ) + telnet? ( dev-perl/Net-Telnet ) + dev-perl/CGI-Fast + >=dev-lang/perl-5.8.8-r8 + >=dev-perl/SNMP_Session-1.13 + >=net-analyzer/fping-2.4_beta2-r2[suid] + >=net-analyzer/rrdtool-1.2[graph,perl] + dev-perl/CGI-Session + dev-perl/Config-Grammar + dev-perl/Digest-HMAC + dev-perl/FCGI + dev-perl/IO-Socket-SSL + dev-perl/Net-DNS + dev-perl/libwww-perl + virtual/perl-libnet +" + +RDEPEND="${DEPEND}" + +pkg_setup() { + enewgroup smokeping + enewuser smokeping -1 -1 /var/lib/smokeping smokeping +} + +src_prepare() { + rm -r lib/{BER.pm,SNMP_Session.pm,SNMP_util.pm} # dev-perl/SNMP_Session + + epatch "${FILESDIR}"/${P}-pod.patch +} + +src_configure() { + econf \ + --sysconfdir=/etc/smokeping \ + --with-htdocs-dir=/var/www/localhost/smokeping +} + +src_compile() { + LC_ALL=C emake +} + +src_install() { + default + + newinitd "${FILESDIR}/${PN}.init.3" ${PN} + systemd_dotmpfilesd "${FILESDIR}"/"${PN}".conf + systemd_dounit "${FILESDIR}"/"${PN}".service + + mv "${D}/etc/smokeping/basepage.html.dist" "${D}/etc/smokeping/basepage.html" + mv "${D}/etc/smokeping/config.dist" "${D}/etc/smokeping/config" + mv "${D}/etc/smokeping/smokemail.dist" "${D}/etc/smokeping/smokemail" + mv "${D}/etc/smokeping/smokeping_secrets.dist" "${D}/etc/smokeping/smokeping_secrets" + mv "${D}/etc/smokeping/tmail.dist" "${D}/etc/smokeping/tmail" + + sed -i \ + -e '/^imgcache/{s:\(^imgcache[ \t]*=\).*:\1 /var/lib/smokeping/.simg:}' \ + -e '/^imgurl/{s:\(^imgurl[ \t]*=\).*:\1 ../.simg:}' \ + -e '/^datadir/{s:\(^datadir[ \t]*=\).*:\1 /var/lib/smokeping:}' \ + -e '/^piddir/{s:\(^piddir[ \t]*=\).*:\1 /run/smokeping:}' \ + -e '/^cgiurl/{s#\(^cgiurl[ \t]*=\).*#\1 http://some.place.xyz/perl/smokeping.pl#}' \ + -e '/^smokemail/{s:\(^smokemail[ \t]*=\).*:\1 /etc/smokeping/smokemail:}' \ + -e '/^tmail/{s:\(^tmail[ \t]*=\).*:\1 /etc/smokeping/tmail:}' \ + -e '/^secrets/{s:\(^secrets[ \t]*=\).*:\1 /etc/smokeping/smokeping_secrets:}' \ + -e '/^template/{s:\(^template[ \t]*=\).*:\1 /etc/smokeping/basepage.html:}' \ + "${D}/etc/${PN}/config" || die + + sed -i \ + -e '/^<script/{s:cropper/:/cropper/:}' \ + "${D}/etc/${PN}/basepage.html" || die + + sed -i \ + -e 's/$FindBin::Bin\/..\/etc\/config/\/etc\/smokeping\/config/g' \ + "${D}/usr/bin/smokeping" "${D}/usr/bin/smokeping_cgi" || die + + sed -i \ + -e 's:etc/config.dist:/etc/smokeping/config:' \ + "${D}/usr/bin/tSmoke" || die + + sed -i \ + -e 's:/usr/etc/config:/etc/smokeping/config:' \ + "${D}/var/www/localhost/smokeping/smokeping.fcgi.dist" || die + + dodir /var/www/localhost/cgi-bin + mv "${D}/var/www/localhost/smokeping/smokeping.fcgi.dist" \ + "${D}/var/www/localhost/cgi-bin/smokeping.fcgi" + + fperms 700 /etc/${PN}/smokeping_secrets + + if use apache2 ; then + insinto /etc/apache2/modules.d + doins "${FILESDIR}/79_${PN}.conf" + fi + + dodir /var/cache/smokeping + keepdir /var/cache/smokeping + + # Create the files in /var for rrd file storage + keepdir /var/lib/${PN}/.simg + fowners smokeping:smokeping /var/lib/${PN} + + if use apache2 ; then + fowners apache:apache /var/lib/${PN}/.simg + fowners -R apache:apache /var/www + else + fowners smokeping:smokeping /var/lib/${PN}/.simg + fi + + fperms 775 /var/lib/${PN} /var/lib/${PN}/.simg +} + +pkg_postinst() { + chown smokeping:smokeping "${ROOT}/var/lib/${PN}" + chmod 755 "${ROOT}/var/lib/${PN}" +} diff --git a/net-analyzer/smokeping/smokeping-2.7.2.ebuild b/net-analyzer/smokeping/smokeping-2.7.2.ebuild new file mode 100644 index 000000000000..973327b4df83 --- /dev/null +++ b/net-analyzer/smokeping/smokeping-2.7.2.ebuild @@ -0,0 +1,147 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 +inherit autotools eutils multilib user systemd + +DESCRIPTION="A powerful latency measurement tool" +HOMEPAGE="https://oss.oetiker.ch/smokeping/" +SRC_URI="https://oss.oetiker.ch/smokeping/pub/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" + +IUSE="apache2 curl dig echoping ipv6 radius" + +DEPEND=" + >=dev-lang/perl-5.8.8-r8 + >=dev-perl/SNMP_Session-1.13 + >=net-analyzer/fping-2.4_beta2-r2[suid] + >=net-analyzer/rrdtool-1.2[graph,perl] + dev-perl/CGI + dev-perl/CGI-Session + dev-perl/Config-Grammar + dev-perl/Digest-HMAC + dev-perl/FCGI + dev-perl/IO-Socket-SSL + dev-perl/IO-Tty + dev-perl/Net-DNS + dev-perl/Net-OpenSSH + dev-perl/Net-SNMP + dev-perl/Net-Telnet + dev-perl/libwww-perl + dev-perl/perl-ldap + virtual/perl-libnet + dev-perl/CGI-Fast + !apache2? ( virtual/httpd-cgi ) + apache2? ( + >=www-apache/mod_perl-2.0.1 + www-apache/mod_fcgid + ) + curl? ( >=net-misc/curl-7.21.4 ) + dig? ( net-dns/bind-tools ) + echoping? ( >=net-analyzer/echoping-6.0.2 ) + ipv6? ( >=dev-perl/Socket6-0.20 ) + radius? ( dev-perl/Authen-Radius ) +" + +RDEPEND="${DEPEND}" + +pkg_setup() { + enewgroup smokeping + enewuser smokeping -1 -1 /var/lib/smokeping smokeping +} + +src_prepare() { + default + + sed -i -e '/^SUBDIRS = / s|thirdparty||g' Makefile.am || die + sed -i -e '/^perllibdir = / s|= .*|= $(libdir)|g' lib/Makefile.am || die + rm -r lib/{BER.pm,SNMP_Session.pm,SNMP_util.pm} || die # dev-perl/SNMP_Session + echo ${PV} > VERSION + + eautoreconf +} + +src_configure() { + econf \ + --sysconfdir=/etc/smokeping \ + --with-htdocs-dir=/var/www/localhost/smokeping +} + +src_compile() { + LC_ALL=C emake +} + +src_install() { + dodir /usr/$(get_libdir) + default + + newinitd "${FILESDIR}"/${PN}.init.5 ${PN} + systemd_dotmpfilesd "${FILESDIR}"/"${PN}".conf + systemd_dounit "${FILESDIR}"/"${PN}".service + + mv "${D}/etc/smokeping/basepage.html.dist" "${D}/etc/smokeping/basepage.html" + mv "${D}/etc/smokeping/config.dist" "${D}/etc/smokeping/config" + mv "${D}/etc/smokeping/smokemail.dist" "${D}/etc/smokeping/smokemail" + mv "${D}/etc/smokeping/smokeping_secrets.dist" "${D}/etc/smokeping/smokeping_secrets" + mv "${D}/etc/smokeping/tmail.dist" "${D}/etc/smokeping/tmail" + + sed -i \ + -e '/^imgcache/{s:\(^imgcache[ \t]*=\).*:\1 /var/lib/smokeping/.simg:}' \ + -e '/^imgurl/{s:\(^imgurl[ \t]*=\).*:\1 ../.simg:}' \ + -e '/^datadir/{s:\(^datadir[ \t]*=\).*:\1 /var/lib/smokeping:}' \ + -e '/^piddir/{s:\(^piddir[ \t]*=\).*:\1 /run/smokeping:}' \ + -e '/^cgiurl/{s#\(^cgiurl[ \t]*=\).*#\1 http://some.place.xyz/perl/smokeping.pl#}' \ + -e '/^smokemail/{s:\(^smokemail[ \t]*=\).*:\1 /etc/smokeping/smokemail:}' \ + -e '/^tmail/{s:\(^tmail[ \t]*=\).*:\1 /etc/smokeping/tmail:}' \ + -e '/^secrets/{s:\(^secrets[ \t]*=\).*:\1 /etc/smokeping/smokeping_secrets:}' \ + -e '/^template/{s:\(^template[ \t]*=\).*:\1 /etc/smokeping/basepage.html:}' \ + "${D}/etc/${PN}/config" || die + + sed -i \ + -e '/^<script/{s:cropper/:/cropper/:}' \ + "${D}/etc/${PN}/basepage.html" || die + + sed -i \ + -e 's/$FindBin::RealBin\/..\/etc\/config/\/etc\/smokeping\/config/g' \ + "${D}/usr/bin/smokeping" "${D}/usr/bin/smokeping_cgi" || die + + sed -i \ + -e 's:etc/config.dist:/etc/smokeping/config:' \ + "${D}/usr/bin/tSmoke" || die + + sed -i \ + -e 's:/usr/etc/config:/etc/smokeping/config:' \ + "${D}/var/www/localhost/smokeping/smokeping.fcgi.dist" || die + + dodir /var/www/localhost/cgi-bin + mv "${D}/var/www/localhost/smokeping/smokeping.fcgi.dist" \ + "${D}/var/www/localhost/cgi-bin/smokeping.fcgi" + + fperms 700 /etc/${PN}/smokeping_secrets + + if use apache2 ; then + insinto /etc/apache2/modules.d + doins "${FILESDIR}/79_${PN}.conf" + fi + + # Create the files in /var for rrd file storage + keepdir /var/lib/${PN}/.simg + fowners smokeping:smokeping /var/lib/${PN} + + if use apache2 ; then + fowners apache:apache /var/lib/${PN}/.simg + fowners -R apache:apache /var/www + else + fowners smokeping:smokeping /var/lib/${PN}/.simg + fi + + fperms 775 /var/lib/${PN} /var/lib/${PN}/.simg +} + +pkg_postinst() { + chown smokeping:smokeping "${ROOT}/var/lib/${PN}" + chmod 755 "${ROOT}/var/lib/${PN}" +} diff --git a/net-analyzer/smokeping/smokeping-2.7.3.ebuild b/net-analyzer/smokeping/smokeping-2.7.3.ebuild new file mode 100644 index 000000000000..9dd531b20e11 --- /dev/null +++ b/net-analyzer/smokeping/smokeping-2.7.3.ebuild @@ -0,0 +1,147 @@ +# Copyright 1999-2018 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +inherit autotools eutils multilib user systemd + +DESCRIPTION="A powerful latency measurement tool" +HOMEPAGE="https://oss.oetiker.ch/smokeping/" +SRC_URI="https://oss.oetiker.ch/smokeping/pub/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" + +IUSE="apache2 curl dig echoping ipv6 radius" + +DEPEND=" + >=dev-lang/perl-5.8.8-r8 + >=dev-perl/SNMP_Session-1.13 + >=net-analyzer/fping-2.4_beta2-r2[suid] + >=net-analyzer/rrdtool-1.2[graph,perl] + dev-perl/CGI + dev-perl/CGI-Session + dev-perl/Config-Grammar + dev-perl/Digest-HMAC + dev-perl/FCGI + dev-perl/IO-Socket-SSL + dev-perl/IO-Tty + dev-perl/Net-DNS + dev-perl/Net-OpenSSH + dev-perl/Net-SNMP + dev-perl/Net-Telnet + dev-perl/libwww-perl + dev-perl/perl-ldap + virtual/perl-libnet + dev-perl/CGI-Fast + !apache2? ( virtual/httpd-cgi ) + apache2? ( + >=www-apache/mod_perl-2.0.1 + www-apache/mod_fcgid + ) + curl? ( >=net-misc/curl-7.21.4 ) + dig? ( net-dns/bind-tools ) + echoping? ( >=net-analyzer/echoping-6.0.2 ) + ipv6? ( >=dev-perl/Socket6-0.20 ) + radius? ( dev-perl/Authen-Radius ) +" + +RDEPEND="${DEPEND}" + +pkg_setup() { + enewgroup smokeping + enewuser smokeping -1 -1 /var/lib/smokeping smokeping +} + +src_prepare() { + default + + sed -i -e '/^SUBDIRS = / s|thirdparty||g' Makefile.am || die + sed -i -e '/^perllibdir = / s|= .*|= $(libdir)|g' lib/Makefile.am || die + rm -r lib/{BER.pm,SNMP_Session.pm,SNMP_util.pm} || die # dev-perl/SNMP_Session + echo ${PV} > VERSION + + eautoreconf +} + +src_configure() { + econf \ + --sysconfdir=/etc/smokeping \ + --with-htdocs-dir=/var/www/localhost/smokeping +} + +src_compile() { + LC_ALL=C emake +} + +src_install() { + dodir /usr/$(get_libdir) + default + + newinitd "${FILESDIR}"/${PN}.init.5 ${PN} + systemd_dotmpfilesd "${FILESDIR}"/"${PN}".conf + systemd_dounit "${FILESDIR}"/"${PN}".service + + mv "${D}/etc/smokeping/basepage.html.dist" "${D}/etc/smokeping/basepage.html" + mv "${D}/etc/smokeping/config.dist" "${D}/etc/smokeping/config" + mv "${D}/etc/smokeping/smokemail.dist" "${D}/etc/smokeping/smokemail" + mv "${D}/etc/smokeping/smokeping_secrets.dist" "${D}/etc/smokeping/smokeping_secrets" + mv "${D}/etc/smokeping/tmail.dist" "${D}/etc/smokeping/tmail" + + sed -i \ + -e '/^imgcache/{s:\(^imgcache[ \t]*=\).*:\1 /var/lib/smokeping/.simg:}' \ + -e '/^imgurl/{s:\(^imgurl[ \t]*=\).*:\1 ../.simg:}' \ + -e '/^datadir/{s:\(^datadir[ \t]*=\).*:\1 /var/lib/smokeping:}' \ + -e '/^piddir/{s:\(^piddir[ \t]*=\).*:\1 /run/smokeping:}' \ + -e '/^cgiurl/{s#\(^cgiurl[ \t]*=\).*#\1 http://some.place.xyz/perl/smokeping.pl#}' \ + -e '/^smokemail/{s:\(^smokemail[ \t]*=\).*:\1 /etc/smokeping/smokemail:}' \ + -e '/^tmail/{s:\(^tmail[ \t]*=\).*:\1 /etc/smokeping/tmail:}' \ + -e '/^secrets/{s:\(^secrets[ \t]*=\).*:\1 /etc/smokeping/smokeping_secrets:}' \ + -e '/^template/{s:\(^template[ \t]*=\).*:\1 /etc/smokeping/basepage.html:}' \ + "${D}/etc/${PN}/config" || die + + sed -i \ + -e '/^<script/{s:cropper/:/cropper/:}' \ + "${D}/etc/${PN}/basepage.html" || die + + sed -i \ + -e 's/$FindBin::RealBin\/..\/etc\/config/\/etc\/smokeping\/config/g' \ + "${D}/usr/bin/smokeping" "${D}/usr/bin/smokeping_cgi" || die + + sed -i \ + -e 's:etc/config.dist:/etc/smokeping/config:' \ + "${D}/usr/bin/tSmoke" || die + + sed -i \ + -e 's:/usr/etc/config:/etc/smokeping/config:' \ + "${D}/var/www/localhost/smokeping/smokeping.fcgi.dist" || die + + dodir /var/www/localhost/cgi-bin + mv "${D}/var/www/localhost/smokeping/smokeping.fcgi.dist" \ + "${D}/var/www/localhost/cgi-bin/smokeping.fcgi" + + fperms 700 /etc/${PN}/smokeping_secrets + + if use apache2 ; then + insinto /etc/apache2/modules.d + doins "${FILESDIR}/79_${PN}.conf" + fi + + # Create the files in /var for rrd file storage + keepdir /var/lib/${PN}/.simg + fowners smokeping:smokeping /var/lib/${PN} + + if use apache2 ; then + fowners apache:apache /var/lib/${PN}/.simg + fowners -R apache:apache /var/www + else + fowners smokeping:smokeping /var/lib/${PN}/.simg + fi + + fperms 775 /var/lib/${PN} /var/lib/${PN}/.simg +} + +pkg_postinst() { + chown smokeping:smokeping "${ROOT}/var/lib/${PN}" + chmod 755 "${ROOT}/var/lib/${PN}" +} diff --git a/net-analyzer/snallygaster/Manifest b/net-analyzer/snallygaster/Manifest new file mode 100644 index 000000000000..435a71356daa --- /dev/null +++ b/net-analyzer/snallygaster/Manifest @@ -0,0 +1 @@ +DIST snallygaster-0.0.6.tar.gz 22260 BLAKE2B 5f5f45678ee83922d477eb7356bf830a4ececbff6fc02bc21d2b714abf350c1b2643fb8134f330d8f54a4c58809b9de2671f46b728e631ac0a5f4996f87fd8e1 SHA512 abca663005e43948ef7c6516a3e85d1b1010811365f39a280b9c091490a8b4687fdaa1b0acbd29f5a84285fe16cd74398098eb9600b5ec41ec880d355cd0ddbd diff --git a/net-analyzer/snallygaster/metadata.xml b/net-analyzer/snallygaster/metadata.xml new file mode 100644 index 000000000000..f328a2753a4c --- /dev/null +++ b/net-analyzer/snallygaster/metadata.xml @@ -0,0 +1,6 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<maintainer type="person"><email>hanno@gentoo.org</email></maintainer> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/snallygaster/snallygaster-0.0.6.ebuild b/net-analyzer/snallygaster/snallygaster-0.0.6.ebuild new file mode 100644 index 000000000000..721aa4381322 --- /dev/null +++ b/net-analyzer/snallygaster/snallygaster-0.0.6.ebuild @@ -0,0 +1,21 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +PYTHON_COMPAT=( python3_{6,7,8} ) +DISTUTILS_SINGLE_IMPL=1 +inherit distutils-r1 + +DESCRIPTION="Finds file leaks and other security problems on HTTP servers" +HOMEPAGE="https://github.com/hannob/snallygaster" +SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz" + +LICENSE="CC0-1.0" +SLOT="0" +KEYWORDS="~amd64" + +DEPEND="dev-python/dnspython + dev-python/urllib3 + dev-python/beautifulsoup" +RDEPEND="${DEPEND}" +DOCS=( README.md TESTS.md ) diff --git a/net-analyzer/sngrep/Manifest b/net-analyzer/sngrep/Manifest new file mode 100644 index 000000000000..9f3afb299a48 --- /dev/null +++ b/net-analyzer/sngrep/Manifest @@ -0,0 +1,2 @@ +DIST sngrep-1.4.6.tar.gz 235721 BLAKE2B e01f2a1d83b9147b99196f7ff2e5562552b16badc2ca634e63b2e2f5955a5d0328c9fcdb841f42a950899511a81fffd8eb64169758dc319875e3052d4359de93 SHA512 25c67e26158b140bded775b217f313ad5a6268684f03d0b9875ddd423d7548b50fa9c358346330d3873984f456aefa9401c2b0fdd136dd95061e34da6530bcc3 +DIST sngrep-1.4.7.tar.gz 237978 BLAKE2B 30172748aeab2910e7fa13f35b447d7bd1688bb206576af6233c8c47405eb3fe93316cc72255169f19f3752e7fe3ada63c5c0bba0d9ab75706c1b0d3ac296474 SHA512 f414f9cc49b0c34cbbf5a77d285f12eb4091af3395953ed93dbe2f57d4ba3731d16c4b56c37e90744cf3784572975f485aed48cdd100898ffaee18e9a18943b1 diff --git a/net-analyzer/sngrep/files/sngrep-1.4.6-stdin.patch b/net-analyzer/sngrep/files/sngrep-1.4.6-stdin.patch new file mode 100644 index 000000000000..b61025d25b6e --- /dev/null +++ b/net-analyzer/sngrep/files/sngrep-1.4.6-stdin.patch @@ -0,0 +1,11 @@ +--- a/src/capture.c ++++ b/src/capture.c +@@ -191,7 +191,7 @@ + + // Reopen tty for ncurses after pcap have used stdin + if (!strncmp(infile, "/dev/stdin", 10)) { +- if (!(stdin = freopen("/dev/tty", "r", stdin))) { ++ if (!(fstdin = freopen("/dev/tty", "r", stdin))) { + fprintf(stderr, "Failed to reopen tty while using stdin for capture."); + return 1; + } diff --git a/net-analyzer/sngrep/files/sngrep-1.4.7-LDFLAGS.patch b/net-analyzer/sngrep/files/sngrep-1.4.7-LDFLAGS.patch new file mode 100644 index 000000000000..3e63dc245dab --- /dev/null +++ b/net-analyzer/sngrep/files/sngrep-1.4.7-LDFLAGS.patch @@ -0,0 +1,11 @@ +--- a/m4/sngrep.m4 ++++ b/m4/sngrep.m4 +@@ -44,7 +44,7 @@ + LIBS="$sngrep_config_script $LIBS " + sngrep_script_success=yes + ], []) +- LDFLAGS="$save_LDFLAGS" ++ LDFLAGS="$sngrep_save_LDFLAGS" + fi + if test "x$sngrep_script_success" = xno; then + [$5] diff --git a/net-analyzer/sngrep/files/sngrep-1.4.7-tinfo.patch b/net-analyzer/sngrep/files/sngrep-1.4.7-tinfo.patch new file mode 100644 index 000000000000..8a01eeb2560b --- /dev/null +++ b/net-analyzer/sngrep/files/sngrep-1.4.7-tinfo.patch @@ -0,0 +1,24 @@ +--- a/configure.ac ++++ b/configure.ac +@@ -74,6 +74,10 @@ + AC_CHECK_LIB([menuw], [new_item], [], [ + AC_MSG_ERROR([ You need to have ncurses menuw library installed to compile sngrep.]) + ]) ++ ++ AC_SEARCH_LIBS([keyname], [tinfow], [], [ ++ AC_MSG_ERROR([ You need to have ncurses tinfow library installed to compile sngrep.]) ++ ]) + ], [ + + # Ncurses without wide-character support +@@ -96,6 +100,10 @@ + AC_CHECK_LIB([menu], [new_item], [], [ + AC_MSG_ERROR([ You need to have ncurses menu library installed to compile sngrep.]) + ]) ++ ++ AC_SEARCH_LIBS([keyname], [tinfo], [], [ ++ AC_MSG_ERROR([ You need to have ncurses tinfo library installed to compile sngrep.]) ++ ]) + ]) + + #### diff --git a/net-analyzer/sngrep/metadata.xml b/net-analyzer/sngrep/metadata.xml new file mode 100644 index 000000000000..231336198b09 --- /dev/null +++ b/net-analyzer/sngrep/metadata.xml @@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<maintainer type="project"> +<email>netmon@gentoo.org</email> +</maintainer> +<use> +<flag name='eep'>Enable EEP packet send/receive support</flag> +<flag name='gnutls'>Use <pkg>net-libs/gnutls</pkg> to parse captured TLS packets</flag> +<flag name='openssl'>Use <pkg>dev-libs/openssl</pkg> to parse captured TLS packets</flag> +</use> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/sngrep/sngrep-1.4.6-r3.ebuild b/net-analyzer/sngrep/sngrep-1.4.6-r3.ebuild new file mode 100644 index 000000000000..b9f731a5e648 --- /dev/null +++ b/net-analyzer/sngrep/sngrep-1.4.6-r3.ebuild @@ -0,0 +1,44 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 +inherit autotools + +DESCRIPTION="Ncurses SIP Messages flow viewer" +HOMEPAGE="https://github.com/irontec/sngrep" +SRC_URI="https://github.com/irontec/sngrep/releases/download/v${PV}/${P}.tar.gz" + +LICENSE="GPL-3" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="eep gnutls ipv6 openssl pcre unicode" +REQUIRED_USE=" + gnutls? ( !openssl ) +" + +DEPEND=" + net-libs/libpcap + sys-libs/ncurses:0=[unicode?] + openssl? ( dev-libs/openssl:0= ) + gnutls? ( net-libs/gnutls ) +" +RDEPEND="${DEPEND}" +PATCHES=( + "${FILESDIR}"/${PN}-1.4.6-stdin.patch + "${FILESDIR}"/${PN}-1.4.7-tinfo.patch +) + +src_prepare() { + default + eautoreconf +} + +src_configure() { + econf \ + $(use_enable eep) \ + $(use_enable ipv6) \ + $(use_enable unicode) \ + $(use_with gnutls) \ + $(use_with openssl) \ + $(use_with pcre) +} diff --git a/net-analyzer/sngrep/sngrep-1.4.7.ebuild b/net-analyzer/sngrep/sngrep-1.4.7.ebuild new file mode 100644 index 000000000000..f021e73049e6 --- /dev/null +++ b/net-analyzer/sngrep/sngrep-1.4.7.ebuild @@ -0,0 +1,44 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +inherit autotools + +DESCRIPTION="Ncurses SIP Messages flow viewer" +HOMEPAGE="https://github.com/irontec/sngrep" +SRC_URI="https://github.com/irontec/sngrep/releases/download/v${PV}/${P}.tar.gz" + +LICENSE="GPL-3" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="eep gnutls ipv6 openssl pcre unicode" +REQUIRED_USE=" + gnutls? ( !openssl ) +" + +DEPEND=" + net-libs/libpcap + sys-libs/ncurses:0=[unicode?] + openssl? ( dev-libs/openssl:0= ) + gnutls? ( net-libs/gnutls ) +" +RDEPEND="${DEPEND}" +PATCHES=( + "${FILESDIR}"/${PN}-1.4.7-tinfo.patch + "${FILESDIR}"/${PN}-1.4.7-LDFLAGS.patch +) + +src_prepare() { + default + eautoreconf +} + +src_configure() { + econf \ + $(use_enable eep) \ + $(use_enable ipv6) \ + $(use_enable unicode) \ + $(use_with gnutls) \ + $(use_with openssl) \ + $(use_with pcre) +} diff --git a/net-analyzer/sniffit/Manifest b/net-analyzer/sniffit/Manifest new file mode 100644 index 000000000000..9d39cde27e18 --- /dev/null +++ b/net-analyzer/sniffit/Manifest @@ -0,0 +1,3 @@ +DIST sniffit-0.4.0.tar.gz 59640 BLAKE2B 0cb335e7fc308155d0b3b3163695745ba1b0b71f212341238074d80782d99b12ed3f4991eed766161bfb65aeffe8bbf5e8e71a987b431fd414ac34ab0be416ab SHA512 a31c39859ab308f3ad4bf2f32a61d0f419ed6ad5d1668efc79e996c4a99557e511fc0b36c21e30316cfa82217fb10fd16d4e3473f5f1fdd70cdeba959d643aab +DIST sniffit-0.5.tar.gz 60074 BLAKE2B 55d2a65da3801cab4e612a8d1a1770c00abfa44555779ee29dc7358d9636e0b2a3f1e291bc64234588089967510bff99f5a9831d8acc01dacb080d7341081372 SHA512 cf6f4a1d396d47e0fa51cb527e8f64cc4f9af5f83121728ce6cbfb6a11509899e52a6c01f0dd20b0d3b92a567991390d9a616151c9496d4f2d764608ef3542bc +DIST sniffit.0.3.7.beta.tar.gz 212419 BLAKE2B 938f4eb775cfd0c604ec107573b8e4bba93fc60b40428ae3894b008fa4eaee3c9bf1ef29daf28caef4f22c4574faf2c6a8e3e8c32b7f84d643b8364ab31412ab SHA512 b32d1f17d589ee1d1afc7986640a2b9f451cdb26ee2d077db1eaec1bb77ed353bbbb6a79bd25f915b3a40b7a279f9fc7855706150ec3a24f8937a152ac91b8d1 diff --git a/net-analyzer/sniffit/files/sniffit-0.3.7-gentoo.patch b/net-analyzer/sniffit/files/sniffit-0.3.7-gentoo.patch new file mode 100644 index 000000000000..c226b6f00d45 --- /dev/null +++ b/net-analyzer/sniffit/files/sniffit-0.3.7-gentoo.patch @@ -0,0 +1,31 @@ +--- a/Makefile.in ++++ b/Makefile.in +@@ -10,13 +10,13 @@ + LIBS = @LIBS@ + DEFS = @DEFS@ + OS_OPT = @OS_OPT@ +-OBJ_FLAG = -w -O2 -c +-OBJ_OPT = -I./libpcap -L./libpcap +-EXE_FLAG = -w -O2 -o sniffit +-EXE_OPT = -I./libpcap -L./libpcap -lpcap ++OBJ_FLAG = $(CFLAGS) -c ++OBJ_OPT = -I/usr/include/pcap -L/usr/lib ++EXE_FLAG = $(CFLAGS) $(LDFLAGS) -o sniffit ++EXE_OPT = -I/usr/include/pcap -lpcap + EXE_OBJ = sn_packets.o sn_generation.o sn_interface.o sn_cfgfile.o \ + sn_logfile.o sn_resolv.o +-DEP_FILES = sn_config.h ./libpcap/pcap.h sn_data.h sn_defines.h sn_plugins.h \ ++DEP_FILES = sn_config.h sn_data.h sn_defines.h sn_plugins.h \ + sn_analyse.c sn_conn_desc.c \ + sn_packets.o \ + sn_generation.o sn_interface.o sn_cfgfile.o sn_logfile.o \ +@@ -26,9 +26,7 @@ + @echo "Succesfull compilation..." + + sniffit: $(SNIFFIT) $(DEP_FILES) +- cd libpcap; make; cd .. + $(CC) $(EXE_FLAG) $(SNIFFIT) $(EXE_OBJ) $(EXE_OPT) $(LIBS) $(DEFS) $(OS_OPT) +- strip sniffit + + sn_cfgfile.o: sn_cfgfile.h sn_cfgfile.c sn_defines.h sn_structs.h sn_config.h + $(CC) $(OBJ_FLAG) sn_cfgfile.c $(OBJ_OPT) $(DEFS) diff --git a/net-analyzer/sniffit/files/sniffit-0.3.7-misc.patch b/net-analyzer/sniffit/files/sniffit-0.3.7-misc.patch new file mode 100644 index 000000000000..ff84cd7d2259 --- /dev/null +++ b/net-analyzer/sniffit/files/sniffit-0.3.7-misc.patch @@ -0,0 +1,120 @@ +--- a/sn_cfgfile.h ++++ b/sn_cfgfile.h +@@ -10,3 +10,4 @@ + void make_nr_dot (char *); + void interprete_line (char *); + void read_cfg_file (char *); ++char *strlower (char *); +--- a/sn_structs.h ++++ b/sn_structs.h +@@ -67,7 +67,7 @@ + struct snif_mask /* struct for mask */ + { + _32_bit source_ip, destination_ip; +- _32_bit short source_port, destination_port; ++ _32_bit source_port, destination_port; + }; + + /* (packet generation) */ +--- a/sn_analyse.c ++++ b/sn_analyse.c +@@ -1,6 +1,9 @@ + /* Analyse traffic for logging mode */ + /* - by: Brecht Claerhout */ + ++#include <stdlib.h> ++#include <string.h> ++ + const unsigned char *data; + memcpy(&tcphead,header,sizeof(struct TCP_header)); + +--- a/sn_cfgfile.c ++++ b/sn_cfgfile.c +@@ -3,6 +3,11 @@ + /* - improvements: Shudoh Kazuyuki */ + + #include <stdio.h> ++#include <stdlib.h> ++#include "sn_interface.h" ++#include <string.h> ++#include <ctype.h> ++#include <time.h> + #include <netdb.h> /* for getservbyname() */ + + #include "sn_config.h" +--- a/sn_conn_desc.c ++++ b/sn_conn_desc.c +@@ -1,6 +1,8 @@ + /* Connection description detection file */ + /* - by: Brecht Claerhout */ + ++#include <ctype.h> ++#include <string.h> + + /* Simple PORT BASED detection */ + +--- a/sn_generation.c ++++ b/sn_generation.c +@@ -6,12 +6,16 @@ + #ifdef INCLUDE_INTERFACE + #ifdef GENERATION + #include <unistd.h> ++#include <stdlib.h> ++#include <string.h> + #include <sys/socket.h> + #include <netinet/in.h> + #include "sn_curses.h" + #include "sn_defines.h" + #include "sn_structs.h" + #include "sn_generation.h" ++#include "sn_interface.h" /* input_field() */ ++#include "sn_packets.h" /* in_cksum() */ + + extern volatile int screen_busy; + +--- a/sniffit.0.3.7.c ++++ b/sniffit.0.3.7.c +@@ -4,6 +4,9 @@ + #include "sn_config.h" /* Config header file */ + + #include <unistd.h> ++#include <stdlib.h> ++#include <string.h> ++#include <ctype.h> + #include <signal.h> + #include <stdio.h> + #include <fcntl.h> +--- a/sn_interface.c ++++ b/sn_interface.c +@@ -6,6 +6,9 @@ + #ifdef INCLUDE_INTERFACE + #include <signal.h> + #include <unistd.h> ++#include <stdlib.h> ++#include <string.h> ++#include <ctype.h> + #include <sys/ipc.h> + #include <sys/shm.h> + #include "sn_curses.h" +--- a/sn_logfile.c ++++ b/sn_logfile.c +@@ -4,6 +4,9 @@ + #include "sn_config.h" + + #include <stdio.h> ++#include <stdlib.h> /* exit() */ ++#include <string.h> /* strcpy() */ ++#include <time.h> /* time() ctime() */ + #include <sys/stat.h> + #include <sys/time.h> + #include "sn_defines.h" +--- a/sn_packets.c ++++ b/sn_packets.c +@@ -5,6 +5,7 @@ + #include "sn_defines.h" + #include "sn_structs.h" + #include <netinet/in.h> ++#include <string.h> /* memcpy() strcpy() */ + + extern int PROTO_HEAD; + extern char NO_CHKSUM; diff --git a/net-analyzer/sniffit/files/sniffit-0.3.7-tinfo.patch b/net-analyzer/sniffit/files/sniffit-0.3.7-tinfo.patch new file mode 100644 index 000000000000..b82835049687 --- /dev/null +++ b/net-analyzer/sniffit/files/sniffit-0.3.7-tinfo.patch @@ -0,0 +1,38 @@ +--- a/configure.in ++++ b/configure.in +@@ -5,30 +5,15 @@ + + AC_INIT(sniffit.h) + +-dnl Config of libpcap +-AC_CONFIG_SUBDIRS(libpcap) +- + dnl Check the C compiler + AC_PROG_CC + + dnl Check NCURSES availability +-NCURSES_PATH=/usr/include:/usr/include/ncurses:/usr/include/curses:/usr/local/include:/usr/local/include/ncurses:/usr/local/include/curses:./:./ncurses.h +-ncurses_warn=0 +-AC_CHECK_LIB(ncurses,main,,ncurses_warn=1) +- +-AC_PATH_PROGS(NCURSES_LOCATION,ncurses.h,no,$NCURSES_PATH) +-if test "$NCURSES_LOCATION" != no; then +- echo "#include \"$NCURSES_LOCATION\"" >sn_curses.h +- AC_DEFINE(HAVE_NCURSES_H,1) +-else +- ncurses_warn=1 +-fi +- +-dnl Print warning for interactive mode +-if test $ncurses_warn -ne 0; then +- AC_MSG_WARN(Interactive mode (-i/-I) will NOT be supported.!) +- AC_MSG_WARN(Install ncurses!) +-fi ++PKG_CHECK_MODULES(ncurses,ncurses,main, ++ LIBS="$LIBS $ncurses_LIBS" ++ echo "#include <ncurses.h>" > sn_curses.h ++ AC_DEFINE(HAVE_NCURSES_H), ++ AC_MSG_ERROR([ncurses not found])) + + dnl Check Shared Memory support + AC_CHECK_FUNCS(shmget) diff --git a/net-analyzer/sniffit/files/sniffit-0.4.0-fno-common.patch b/net-analyzer/sniffit/files/sniffit-0.4.0-fno-common.patch new file mode 100644 index 000000000000..6a576acf1d2b --- /dev/null +++ b/net-analyzer/sniffit/files/sniffit-0.4.0-fno-common.patch @@ -0,0 +1,181 @@ +--- a/src/sn_data.h ++++ b/src/sn_data.h +@@ -101,7 +101,7 @@ + char IP[256]; + unsigned long SNIFLEN; /* bytes we need to snif */ + short DEST_PORT, SRC_PORT; /* destination port */ +-char non_printable, *logging_device; ++char non_printable; + + /**** Global data (packets) *************************************************/ + int PROTO_HEAD; /* Base Protocol head length (ethernet, PPP ,....) */ +@@ -147,43 +147,6 @@ + /**** Global data (plugins) *************************************************/ + char Plugin_Active[10]; + +-/**** Global data (interactive) *********************************************/ +-#ifdef INCLUDE_INTERFACE +- +-/**** shared memory pointers ************************************************/ +-char *SHARED, *connection_data, *timing, *running_connections, +- *logged_connections; +-int *LISTlength, *DATAlength, memory_id; +-unsigned int *TCP_nr_of_packets, *ICMP_nr_of_packets, *UDP_nr_of_packets; +-unsigned int *IP_nr_of_packets; +-unsigned long *TCP_bytes_in_packets, *UDP_bytes_in_packets; +-int *DESC_LEN; +- +-/**** data structures *******************************************************/ +-struct snif_mask *mask; +-struct shared_logged_conn *log_conn; +-FILE *log_dev_stream; +-struct stat log_dev_stat; +- +-volatile int LOGGING=0, screen_busy=0; +-char PACKET_INFO; +-int POINTpos=0, LISTpos=0; +-unsigned char COLOR_AVAIL=0; +- +-/**** screen **************************************************************/ +-int MASK_WINDOW_ROWS, MASK_WINDOW_COLS; +-int MAIN_WINDOW_ROWS, MAIN_WINDOW_COLS; +-int INFO_WINDOW_ROWS, INFO_WINDOW_COLS; +-int DATA_WINDOW_ROWS, DATA_WINDOW_COLS; +-int INFO_WINDOW_X, INFO_WINDOW_Y; +-int MASK_WINDOW_X, MASK_WINDOW_Y; +-int DATA_WINDOW_X, DATA_WINDOW_Y; +- +-WINDOW *menu_window; +-struct box_window data_box, main_box, mask_box, packets_box; +-int Pid=0; +-#endif +- + /* DEBUG section */ + #ifdef DEBUG + FILE *debug_dev; +--- a/src/sn_global.h ++++ b/src/sn_global.h +@@ -4,7 +4,6 @@ + /* currently some option data */ + + char SNIFMODE, DUMPMODE, PROTOCOLS, ASC, WILDCARD, CFG_FILE, NO_CHKSUM; +-char INTERACTIVE_EXTEND; + int LOGPARAM; + /* All option shit */ + +--- a/src/sn_interface.c ++++ b/src/sn_interface.c +@@ -18,37 +18,37 @@ + #include "sn_generation.h" + #include "sn_resolv.h" + +-/*** extern stuff ********/ +-extern char *SHARED, *connection_data, *timing, *running_connections, ++/*** global stuff ********/ ++char *SHARED, *connection_data, *timing, *running_connections, + *logged_connections; +-extern int *LISTlength, *DATAlength, memory_id; +-extern unsigned int *TCP_nr_of_packets, *ICMP_nr_of_packets, *UDP_nr_of_packets; unsigned int *IP_nr_of_packets; +-extern unsigned long *TCP_bytes_in_packets, *UDP_bytes_in_packets; +-extern int *DESC_LEN; /* For the connection desciption */ +- +-extern char INTERACTIVE_EXTEND; +- +-extern struct snif_mask *mask; +-extern struct shared_logged_conn *log_conn; +-extern FILE *log_dev_stream; +-extern struct stat log_dev_stat; +- +-extern volatile int LOGGING, screen_busy; +-extern char PACKET_INFO; +-extern int POINTpos, LISTpos; +-extern unsigned char COLOR_AVAIL; +- +-extern WINDOW *menu_window; +-extern struct box_window data_box, main_box, mask_box, packets_box; +-extern int Pid; +-extern char *logging_device; ++int *LISTlength, *DATAlength, memory_id; ++unsigned int *TCP_nr_of_packets, *ICMP_nr_of_packets, *UDP_nr_of_packets; unsigned int *IP_nr_of_packets; ++unsigned long *TCP_bytes_in_packets, *UDP_bytes_in_packets; ++int *DESC_LEN; /* For the connection desciption */ ++ ++char INTERACTIVE_EXTEND; ++ ++struct snif_mask *mask; ++struct shared_logged_conn *log_conn; ++FILE *log_dev_stream; ++struct stat log_dev_stat; ++ ++volatile int LOGGING, screen_busy; ++char PACKET_INFO; ++int POINTpos, LISTpos; ++unsigned char COLOR_AVAIL; ++ ++WINDOW *menu_window; ++struct box_window data_box, main_box, mask_box, packets_box; ++int Pid; ++char *logging_device; + + + /*** Screen Parameters ***/ +-extern int MASK_WINDOW_ROWS, MASK_WINDOW_COLS, MAIN_WINDOW_ROWS, MAIN_WINDOW_COLS; +-extern int INFO_WINDOW_ROWS, INFO_WINDOW_COLS, DATA_WINDOW_ROWS, DATA_WINDOW_COLS; +-extern int INFO_WINDOW_X, INFO_WINDOW_Y, MASK_WINDOW_X, MASK_WINDOW_Y; +-extern int DATA_WINDOW_X, DATA_WINDOW_Y; ++int MASK_WINDOW_ROWS, MASK_WINDOW_COLS, MAIN_WINDOW_ROWS, MAIN_WINDOW_COLS; ++int INFO_WINDOW_ROWS, INFO_WINDOW_COLS, DATA_WINDOW_ROWS, DATA_WINDOW_COLS; ++int INFO_WINDOW_X, INFO_WINDOW_Y, MASK_WINDOW_X, MASK_WINDOW_Y; ++int DATA_WINDOW_X, DATA_WINDOW_Y; + + + /*** Sreen operations ***/ +--- a/src/sn_interface.h ++++ b/src/sn_interface.h +@@ -1,9 +1,46 @@ + /* Sniffit Data File */ + ++#include <sys/types.h> ++#include <sys/stat.h> ++#include <unistd.h> + #include "pcap.h" + + typedef void (*sig_hand)(int ); /* sighandler_t gave errors, weird */ + ++/*** global stuff ********/ ++extern unsigned int *IP_nr_of_packets; ++extern char *SHARED, *connection_data, *timing, *running_connections, ++ *logged_connections; ++extern int *LISTlength, *DATAlength, memory_id; ++extern unsigned int *TCP_nr_of_packets, *ICMP_nr_of_packets, *UDP_nr_of_packets; ++extern unsigned int *IP_nr_of_packets; ++extern unsigned long *TCP_bytes_in_packets, *UDP_bytes_in_packets; ++extern int *DESC_LEN; /* For the connection desciption */ ++ ++extern char INTERACTIVE_EXTEND; ++ ++extern struct snif_mask *mask; ++extern struct shared_logged_conn *log_conn; ++extern FILE *log_dev_stream; ++extern struct stat log_dev_stat; ++ ++extern volatile int LOGGING, screen_busy; ++extern char PACKET_INFO; ++extern int POINTpos, LISTpos; ++extern unsigned char COLOR_AVAIL; ++ ++extern WINDOW *menu_window; ++extern struct box_window data_box, main_box, mask_box, packets_box; ++extern int Pid; ++extern char *logging_device; ++ ++ ++/*** Screen Parameters ***/ ++extern int MASK_WINDOW_ROWS, MASK_WINDOW_COLS, MAIN_WINDOW_ROWS, MAIN_WINDOW_COLS; ++extern int INFO_WINDOW_ROWS, INFO_WINDOW_COLS, DATA_WINDOW_ROWS, DATA_WINDOW_COLS; ++extern int INFO_WINDOW_X, INFO_WINDOW_Y, MASK_WINDOW_X, MASK_WINDOW_Y; ++extern int DATA_WINDOW_X, DATA_WINDOW_Y; ++ + int add_itemlist(char *, char *, char *); + void child_exit (void); + void clear_shared_mem(char); diff --git a/net-analyzer/sniffit/files/sniffit-0.4.0-tinfo.patch b/net-analyzer/sniffit/files/sniffit-0.4.0-tinfo.patch new file mode 100644 index 000000000000..85e266fb5d13 --- /dev/null +++ b/net-analyzer/sniffit/files/sniffit-0.4.0-tinfo.patch @@ -0,0 +1,12 @@ +--- a/configure.ac ++++ b/configure.ac +@@ -12,7 +12,8 @@ + AC_PROG_CC + + # Checks for libraries. +-AC_CHECK_LIB(ncurses, main, , [AC_MSG_ERROR([Couldn't find libncurses])]) ++AC_CHECK_LIB(ncurses, initscr, , [AC_MSG_ERROR([Couldn't find libncurses])]) ++AC_SEARCH_LIBS(keypad, tinfo, , [AC_MSG_ERROR([Couldn't find libncurses])]) + AC_CHECK_LIB(pcap, pcap_open_live, , [AC_MSG_ERROR([Couldn't find libpcap])]) + + # Checks for header files. diff --git a/net-analyzer/sniffit/metadata.xml b/net-analyzer/sniffit/metadata.xml new file mode 100644 index 000000000000..bd13a914477c --- /dev/null +++ b/net-analyzer/sniffit/metadata.xml @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<maintainer type="project"> + <email>netmon@gentoo.org</email> + <name>Gentoo network monitoring and analysis project</name> +</maintainer> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/sniffit/sniffit-0.3.7-r4.ebuild b/net-analyzer/sniffit/sniffit-0.3.7-r4.ebuild new file mode 100644 index 000000000000..7429554093a7 --- /dev/null +++ b/net-analyzer/sniffit/sniffit-0.3.7-r4.ebuild @@ -0,0 +1,40 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 +inherit autotools eutils toolchain-funcs + +MY_P="${P/-/.}.beta" +S="${WORKDIR}/${MY_P}" +DESCRIPTION="Interactive Packet Sniffer" +SRC_URI="http://reptile.rug.ac.be/~coder/${PN}/files/${MY_P}.tar.gz" +HOMEPAGE="http://reptile.rug.ac.be/~coder/sniffit/sniffit.html" + +RDEPEND=" + net-libs/libpcap + >=sys-libs/ncurses-5.2 +" +DEPEND=" + ${RDEPEND} + virtual/pkgconfig +" + +SLOT="0" +LICENSE="BSD" +KEYWORDS="amd64 ppc sparc x86" + +src_prepare() { + epatch \ + "${FILESDIR}"/${P}-gentoo.patch \ + "${FILESDIR}"/${P}-misc.patch \ + "${FILESDIR}"/${P}-tinfo.patch + eautoreconf + tc-export CC +} + +src_install() { + dosbin sniffit + + doman sniffit.5 sniffit.8 + dodoc README* PLUGIN-HOWTO BETA* HISTORY +} diff --git a/net-analyzer/sniffit/sniffit-0.4.0.ebuild b/net-analyzer/sniffit/sniffit-0.4.0.ebuild new file mode 100644 index 000000000000..6761ff0d80e0 --- /dev/null +++ b/net-analyzer/sniffit/sniffit-0.4.0.ebuild @@ -0,0 +1,30 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +inherit autotools + +DESCRIPTION="Interactive Packet Sniffer" +HOMEPAGE="https://github.com/resurrecting-open-source-projects/sniffit" +SRC_URI="https://github.com/resurrecting-open-source-projects/sniffit/archive/${P}.tar.gz" +SLOT="0" +LICENSE="BSD" +KEYWORDS="~amd64 ~ppc ~sparc ~x86" + +RDEPEND=" + net-libs/libpcap + >=sys-libs/ncurses-5.2 +" +DEPEND=" + ${RDEPEND} +" +PATCHES=( + "${FILESDIR}"/${PN}-0.4.0-fno-common.patch + "${FILESDIR}"/${PN}-0.4.0-tinfo.patch +) +S=${WORKDIR}/${PN}-${P} + +src_prepare() { + default + eautoreconf +} diff --git a/net-analyzer/sniffit/sniffit-0.5.ebuild b/net-analyzer/sniffit/sniffit-0.5.ebuild new file mode 100644 index 000000000000..a4e8e10f5060 --- /dev/null +++ b/net-analyzer/sniffit/sniffit-0.5.ebuild @@ -0,0 +1,29 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +inherit autotools + +DESCRIPTION="Interactive Packet Sniffer" +HOMEPAGE="https://github.com/resurrecting-open-source-projects/sniffit" +SRC_URI="https://github.com/resurrecting-open-source-projects/sniffit/archive/${P}.tar.gz" +SLOT="0" +LICENSE="BSD" +KEYWORDS="~amd64 ~ppc ~sparc ~x86" + +RDEPEND=" + net-libs/libpcap + >=sys-libs/ncurses-5.2 +" +DEPEND=" + ${RDEPEND} +" +PATCHES=( + "${FILESDIR}"/${PN}-0.4.0-tinfo.patch +) +S=${WORKDIR}/${PN}-${P} + +src_prepare() { + default + eautoreconf +} diff --git a/net-analyzer/snmpclitools/Manifest b/net-analyzer/snmpclitools/Manifest new file mode 100644 index 000000000000..b21a3514efb0 --- /dev/null +++ b/net-analyzer/snmpclitools/Manifest @@ -0,0 +1 @@ +DIST snmpclitools-0.6.4.tar.gz 50853 BLAKE2B 23b28395c1b4d376e4b39f8ebb6d9acf8329da8c9bd6403d0670236ed89a783c0145ceb3ed31a653055bc6fbde785f911e6eeb30f32a587b80878b26ea2a8ba1 SHA512 42c0905f65bc855f7f0089ee7e944543e29ca0ca5a8d7185f5fa877f9c97cae1f1952477e85c614db9785deabad1770f1a046c4e6e98a7832097581f8e14748c diff --git a/net-analyzer/snmpclitools/metadata.xml b/net-analyzer/snmpclitools/metadata.xml new file mode 100644 index 000000000000..cb36b9865ca3 --- /dev/null +++ b/net-analyzer/snmpclitools/metadata.xml @@ -0,0 +1,11 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<maintainer type="project"> +<email>python@gentoo.org</email> +</maintainer> +<maintainer type="project"> +<email>netmon@gentoo.org</email> +</maintainer> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/snmpclitools/snmpclitools-0.6.4.ebuild b/net-analyzer/snmpclitools/snmpclitools-0.6.4.ebuild new file mode 100644 index 000000000000..4e5827951210 --- /dev/null +++ b/net-analyzer/snmpclitools/snmpclitools-0.6.4.ebuild @@ -0,0 +1,23 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +PYTHON_COMPAT=( python3_{6,7} ) +inherit distutils-r1 + +DESCRIPTION="Pure-Python SNMP management tools, formerly pysnmp-apps" +HOMEPAGE="https://github.com/etingof/snmpclitools" +SRC_URI="https://github.com/etingof/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~amd64 ~x86" + +RDEPEND=" + !dev-python/pysnmp-apps + >=dev-python/pysnmp-4.2.2[${PYTHON_USEDEP}] + dev-python/pysnmp-mibs[${PYTHON_USEDEP}] +" +DEPEND=" + dev-python/setuptools[${PYTHON_USEDEP}] +" diff --git a/net-analyzer/snmptt/Manifest b/net-analyzer/snmptt/Manifest new file mode 100644 index 000000000000..d8088b076d33 --- /dev/null +++ b/net-analyzer/snmptt/Manifest @@ -0,0 +1 @@ +DIST snmptt_1.4.tgz 148504 BLAKE2B b49e51d0ec207f1250536010e6475649eeca1a89f85bf31e1a7545cae2fa6ac66951916932863543336bb63a8519f35e9c54e7c67bcd14a43ed7ce6d8d63876b SHA512 200ebe565766c15f85b9b9cbc178baeef740663efc951af4c790c4b28d27398c14a95c4b38306ec3503cefe9b86634d5f24ec5f2482694f07789e9025ea39a80 diff --git a/net-analyzer/snmptt/files/snmptt.initd-r1 b/net-analyzer/snmptt/files/snmptt.initd-r1 new file mode 100644 index 000000000000..02b8fea24895 --- /dev/null +++ b/net-analyzer/snmptt/files/snmptt.initd-r1 @@ -0,0 +1,19 @@ +#!/sbin/openrc-run +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +depend() { + need snmptrapd +} + +start() { + ebegin "Starting snmptt" + start-stop-daemon --start --pidfile /run/snmptt.pid --exec /usr/sbin/snmptt + eend +} + +stop() { + ebegin "Stopping snmptt" + start-stop-daemon --stop --pidfile /run/snmptt.pid + eend +} diff --git a/net-analyzer/snmptt/metadata.xml b/net-analyzer/snmptt/metadata.xml new file mode 100644 index 000000000000..62a1e0c94d9e --- /dev/null +++ b/net-analyzer/snmptt/metadata.xml @@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>netmon@gentoo.org</email> + <name>Gentoo network monitoring and analysis project</name> + </maintainer> + <longdescription>SNMP Trap Translator</longdescription> + <upstream> + <remote-id type="sourceforge">snmptt</remote-id> + </upstream> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/snmptt/snmptt-1.4.ebuild b/net-analyzer/snmptt/snmptt-1.4.ebuild new file mode 100644 index 000000000000..ed70054e6dc9 --- /dev/null +++ b/net-analyzer/snmptt/snmptt-1.4.ebuild @@ -0,0 +1,52 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +MY_P="${P/-/_}" + +DESCRIPTION="SNMP Trap Translator" +SRC_URI="mirror://sourceforge/snmptt/${MY_P}.tgz" +HOMEPAGE="http://www.snmptt.org/" +LICENSE="GPL-2" + +KEYWORDS="~amd64 ~ppc x86" +SLOT="0" +IUSE="mysql postgres" + +S="${WORKDIR}/${MY_P}" + +RDEPEND=" + dev-lang/perl + dev-perl/Config-IniFiles + net-analyzer/net-snmp + mysql? ( dev-perl/DBD-mysql ) + postgres? ( dev-perl/DBD-Pg ) +" + +src_prepare() { + # bug 105354, daemonize this thing + sed -i \ + -e 's:mode = standalone:mode = daemon:g' \ + -e '/pid_file/s:/var/run:/run:g' \ + snmptt.ini || die + + echo "traphandle default /usr/sbin/snmptt" >examples/snmptrapd.conf.sample +} + +src_install() { + into /usr + dosbin snmptt snmptthandler snmptt-net-snmp-test snmpttconvert \ + snmpttconvertmib + + insinto /etc/snmp + doins snmptt.ini examples/snmptt.conf.generic \ + examples/snmptrapd.conf.sample + newins examples/snmptt.conf.generic snmptt.conf + + dodoc BUGS ChangeLog README sample-trap + dohtml docs/faqs.html docs/index.html docs/layout1.css docs/snmptt.html \ + docs/snmpttconvert.html docs/snmpttconvertmib.html + + newinitd "${FILESDIR}"/snmptt.initd-r1 snmptt +} diff --git a/net-analyzer/snort/Manifest b/net-analyzer/snort/Manifest new file mode 100644 index 000000000000..40355ae3b650 --- /dev/null +++ b/net-analyzer/snort/Manifest @@ -0,0 +1,5 @@ +DIST snort-2.9.12.tar.gz 6456877 BLAKE2B af5584fe01caf9af2f2188e1362bd927a884354ddcb3026af514dddc1264b557691e1644d3c24e85c3b5b5f515dd9fccdd8d38ebc7c28d2f384fb822e27d8bb8 SHA512 6f759b321ca5496abf27c9e4f4fa003cd5167f8c8a160bf5f0b1aee1a93aa8d27de89b84bdf993a0bfb3a93c6315cb2bdbdc3fdb3b09b8d4d1d3c22b69c6783f +DIST snort-2.9.15.1.tar.gz 6618999 BLAKE2B d9f661b036afa2130d406f8bcfa8d33fca482983e0e4785218e08899104c9069809b089631940109ee31e8d197783d994c58417d94f4b5282702e51466f828fa SHA512 9940f5bcdcf04823f9cb5c3f8efda72f98f6a47bce9f40399dec9ec41d23a386c7f7e44861d82368de31546123b920f9fc617197bbf9c5e750724bf8b9e19590 +DIST snort-2.9.15.tar.gz 6704763 BLAKE2B adef13e3368dbbb9e023d79ec4f75c9652af8d26642b83f1f413e39faf966281b09713854e3a8aa385647b375102a667b10ee96d6f1cebb2f92c9fc7f29a2eb5 SHA512 21830dc4c9ce7b5bc96defa800f78de6ad24c1ab96dbeab0d79a7bf4298a81d6bdb4be8fd3bbec3b28b33aa7bb27cdc48a2a00b33c494f68d1649bc609928eea +DIST snort-2.9.16.tar.gz 6948498 BLAKE2B b089f1caef44cd5243c38eba44e7449b1111b397e42eb1722f64530206532edb413003e6af06d18bc6051ef1ce8cbcf42955d823a56abe061081e99c6492dea7 SHA512 7e4e772d351890cb6ad6db4210e1f302fbb600b3b25182800ffd7e73061a044c2cf6fa927e542a1d20cea4fa3eed522f022b394a9286ada7694309d0c8c3bb75 +DIST snort-2.9.8.3.tar.gz 6244304 BLAKE2B cb77c80dde0b5b32ba0fe36cd07e1f6f465127e4be207ba6cd3b7c7dff75f4537c86c6a88d744a924b99d0b4ac864add2c9111c63e51dc4c7dc23f8d19a6c792 SHA512 2f3dfe46e14a5106a02ca60b2d334549f4924ff916de0804b2b7792cdd31e104fbb454b4b932855b5f25a861698db0f8988844782b12b0e5fa132d88d4a7a687 diff --git a/net-analyzer/snort/files/snort-2.9.12-snort.pc.patch b/net-analyzer/snort/files/snort-2.9.12-snort.pc.patch new file mode 100644 index 000000000000..3608a71c6922 --- /dev/null +++ b/net-analyzer/snort/files/snort-2.9.12-snort.pc.patch @@ -0,0 +1,11 @@ +--- a/snort.pc.in ++++ b/snort.pc.in +@@ -12,6 +12,5 @@ Name: Snort + Description: Snort dynamic plugins/detection/rules + URL: www.snort.org + Version: @VERSION@ +-Libs: -L${libdir} -lcurl @LDFLAGS@ @LIBS@ +-Cflags: @CFLAGS@ @CPPFLAGS@ +- ++Libs: -L${libdir} -lcurl @LIBS@ ++Cflags: -I${includedir} @CPPFLAGS@ diff --git a/net-analyzer/snort/files/snort-2.9.15.1-fno-common.patch b/net-analyzer/snort/files/snort-2.9.15.1-fno-common.patch new file mode 100644 index 000000000000..9fe39933ddfe --- /dev/null +++ b/net-analyzer/snort/files/snort-2.9.15.1-fno-common.patch @@ -0,0 +1,106 @@ +--- a/src/preprocessors/Stream6/stream_paf.h ++++ b/src/preprocessors/Stream6/stream_paf.h +@@ -68,12 +68,14 @@ + uint16_t s5_paf_port_registration_all (void* pv, uint16_t port, bool c2s, bool flush); + uint16_t s5_paf_service_registration (void* pv, uint16_t service, bool c2s, bool flush); + +-enum FlushMode ++typedef enum + { + FLUSH_MODE_NORMAL = 0, + FLUSH_MODE_PRE_DISCARD, + FLUSH_MODE_DISCARD +-}FlushMode; ++} FlushMode_t; ++ ++extern FlushMode_t FlushMode; + + typedef struct { + void* user[MAX_PAF_USER]; // arbitrary user data +--- a/src/sfutil/util_jsnorm.h ++++ b/src/sfutil/util_jsnorm.h +@@ -42,5 +42,7 @@ + uint16_t alerts; + }JSState; + ++extern int hex_lookup[256]; ++ + int JSNormalizeDecode(char *, uint16_t , char *, uint16_t destlen, char **, int *, JSState *, uint8_t *); + void InitJSNormLookupTable(void); +--- a/src/preprocessors/spp_session.h ++++ b/src/preprocessors/spp_session.h +@@ -28,6 +28,8 @@ + #include "decode.h" + #include "session_common.h" + ++extern PreprocStats sessionPerfStats; ++ + /* list of function prototypes for this preprocessor */ + void SetupSessionManager(void); + void SessionReload(struct _SessionCache* lws_cache, uint32_t max_sessions, +--- a/src/preprocessors/spp_httpinspect.c ++++ b/src/preprocessors/spp_httpinspect.c +@@ -161,7 +161,6 @@ + MemPool *http_mempool = NULL; + MemPool *mime_decode_mempool = NULL; + MemPool *mime_log_mempool = NULL; +-int hex_lookup[256]; + int valid_lookup[256]; + + char** xffFields = NULL; +--- a/src/detection-plugins/sp_session.c ++++ b/src/detection-plugins/sp_session.c +@@ -80,7 +80,7 @@ + #include "snort.h" + #include "profiler.h" + #ifdef PERF_PROFILING +-PreprocStats sessionPerfStats; ++PreprocStats sp_sessionPerfStats; + extern PreprocStats ruleOTNEvalPerfStats; + #endif + +@@ -149,7 +149,7 @@ + /* map the keyword to an initialization/processing function */ + RegisterRuleOption("session", SessionInit, NULL, OPT_TYPE_LOGGING, NULL); + #ifdef PERF_PROFILING +- RegisterPreprocessorProfile("session", &sessionPerfStats, 3, &ruleOTNEvalPerfStats, NULL); ++ RegisterPreprocessorProfile("session", &sp_sessionPerfStats, 3, &ruleOTNEvalPerfStats, NULL); + #endif + DEBUG_WRAP(DebugMessage(DEBUG_PLUGIN, "Plugin: Session Setup\n");); + } +@@ -287,7 +287,7 @@ + FILE *session; /* session file ptr */ + PROFILE_VARS; + +- PREPROC_PROFILE_START(sessionPerfStats); ++ PREPROC_PROFILE_START(sp_sessionPerfStats); + + /* if there's data in this packet */ + if(p != NULL) +@@ -298,7 +298,7 @@ + + if(session == NULL) + { +- PREPROC_PROFILE_END(sessionPerfStats); ++ PREPROC_PROFILE_END(sp_sessionPerfStats); + return DETECTION_OPTION_MATCH; + } + +@@ -308,7 +308,7 @@ + } + } + +- PREPROC_PROFILE_END(sessionPerfStats); ++ PREPROC_PROFILE_END(sp_sessionPerfStats); + return DETECTION_OPTION_MATCH; + } + +--- a/src/detection-plugins/sp_session.h ++++ b/src/detection-plugins/sp_session.h +@@ -29,5 +29,6 @@ + void SetupSession(void); + uint32_t SessionHash(void *d); + int SessionCompare(void *l, void *r); ++extern PreprocStats sp_sessionPerfStats; + + #endif /* __SP_SESSION_H__ */ diff --git a/net-analyzer/snort/files/snort-2.9.8.3-no-implicit.patch b/net-analyzer/snort/files/snort-2.9.8.3-no-implicit.patch new file mode 100644 index 000000000000..7faf9a4aaa25 --- /dev/null +++ b/net-analyzer/snort/files/snort-2.9.8.3-no-implicit.patch @@ -0,0 +1,8 @@ +diff --git a/src/preprocessors/perf_indicators.c b/src/preprocessors/perf_indicators.c +index d859fe7..c183552 100755 +--- a/src/preprocessors/perf_indicators.c ++++ b/src/preprocessors/perf_indicators.c +@@ -25,2 +25,3 @@ + #include "perf_indicators.h" ++#include "cpuclock.h" /* get_ticks_per_usec */ + diff --git a/net-analyzer/snort/files/snort-2.9.8.3-rpc.patch b/net-analyzer/snort/files/snort-2.9.8.3-rpc.patch new file mode 100644 index 000000000000..51ee56d8410e --- /dev/null +++ b/net-analyzer/snort/files/snort-2.9.8.3-rpc.patch @@ -0,0 +1,26 @@ +diff -ruN snort-2.9.8.3.orig/configure.in snort-2.9.8.3/configure.in +--- snort-2.9.8.3.orig/configure.in 2016-04-26 10:08:28.000000000 -0000 ++++ snort-2.9.8.3/configure.in 2017-09-25 20:21:17.632003858 -0000 +@@ -187,6 +187,22 @@ + AC_CHECK_LIB(nsl, inet_ntoa) + fi + ++AC_ARG_WITH([libtirpc], ++ AS_HELP_STRING([--with-libtirpc], [Use libtirpc as RPC implementation (instead of sunrpc)]), ++ [], [ with_libtirpc=no ]) ++ ++AS_IF([test "x$with_libtirpc" != xno], ++ [PKG_CHECK_MODULES([TIRPC], ++ [libtirpc], ++ [extra_incl="$extra_incl $TIRPC_CFLAGS"; LIBS="$LIBS $TIRPC_LIBS";], ++ [AC_MSG_ERROR([libtirpc requested, but library not found.])] ++ )], ++ [AC_CHECK_HEADER(rpc/rpc.h, ++ [], ++ [AC_MSG_ERROR([sunrpc requested, but headers are not present.])] ++ )] ++) ++ + if test -z "$no_libsocket"; then + AC_CHECK_LIB(socket, socket) + fi diff --git a/net-analyzer/snort/files/snort.confd.2 b/net-analyzer/snort/files/snort.confd.2 new file mode 100644 index 000000000000..780c91052d1d --- /dev/null +++ b/net-analyzer/snort/files/snort.confd.2 @@ -0,0 +1,16 @@ +# Config file for /etc/init.d/snort + +# The following options are now set in your snort.conf file: +# config set_gid: +# config set_uid: +# config snaplen: +# config bpf_file: +# config logdir: + +# The only options that should be set here are SNORT_IFACE and SNORT_CONF. + +# This tell snort which interface to listen on (any for every interface) +SNORT_IFACE="eth1" + +# Probably not this either +SNORT_CONF="/etc/snort/snort.conf" diff --git a/net-analyzer/snort/files/snort.rc12 b/net-analyzer/snort/files/snort.rc12 new file mode 100644 index 000000000000..ad453c821fd2 --- /dev/null +++ b/net-analyzer/snort/files/snort.rc12 @@ -0,0 +1,60 @@ +#!/sbin/openrc-run +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +extra_commands="checkconfig" +extra_started_commands="reload" + +depend() { + need net + after mysql + after postgresql +} + +checkconfig() { + if [ ! -e ${SNORT_CONF} ] ; then + eerror "You need a configuration file to run snort" + eerror "There is an example config in /etc/snort/snort.conf.distrib" + return 1 + fi + if [ ! -d "/var/run/snort" ] ; then + checkpath -d /var/run/snort + fi +} + +start() { + checkconfig || return 1 + ebegin "Starting snort" + start-stop-daemon --start --quiet --exec /usr/bin/snort \ + -- --nolock-pidfile --pid-path /var/run/snort -D -i ${SNORT_IFACE} \ + -c ${SNORT_CONF} >/dev/null 2>&1 + eend $? +} + +stop() { + ebegin "Stopping snort" + start-stop-daemon --stop --quiet --pidfile /var/run/snort/snort_${SNORT_IFACE}.pid + # Snort needs a few seconds to fully shutdown + sleep 15 + eend $? +} + +reload() { + + local SNORT_PID="`cat /var/run/snort/snort_${SNORT_IFACE}.pid`" + local SNORT_USER="`ps -p ${SNORT_PID} --no-headers -o user`" + + if [ ! -f /var/run/snort/snort_${SNORT_IFACE}.pid ]; then + eerror "Snort isn't running" + return 1 + elif [ ${SNORT_USER} != root ]; then + eerror "Snort must be running as root for reload to work!" + return 1 + else + checkconfig || return 1 + ebegin "Reloading Snort" + start-stop-daemon --signal HUP --pidfile /var/run/snort/snort_${SNORT_IFACE}.pid + fi +} + + diff --git a/net-analyzer/snort/files/snort.tmpfiles b/net-analyzer/snort/files/snort.tmpfiles new file mode 100644 index 000000000000..5772f2fd1ad1 --- /dev/null +++ b/net-analyzer/snort/files/snort.tmpfiles @@ -0,0 +1 @@ +d /run/snort 0755 snort snort - diff --git a/net-analyzer/snort/files/snort_at.service b/net-analyzer/snort/files/snort_at.service new file mode 100644 index 000000000000..f764015c2192 --- /dev/null +++ b/net-analyzer/snort/files/snort_at.service @@ -0,0 +1,11 @@ +[Unit] +Description=Snort IDS system listening on '%I' + +[Service] +Type=simple +ExecStartPre=/usr/sbin/ip link set up dev %I +ExecStart=/usr/bin/snort --daq-dir /usr/lib/daq/ -A fast -b -p -u snort -g snort -c /etc/snort/snort.conf -i %I +ExecReload=/bin/kill -HUP $MAINPID + +[Install] +Alias=multi-user.target.wants/snort@%i.service diff --git a/net-analyzer/snort/metadata.xml b/net-analyzer/snort/metadata.xml new file mode 100644 index 000000000000..5e4b8eee0189 --- /dev/null +++ b/net-analyzer/snort/metadata.xml @@ -0,0 +1,111 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>patrick@gentoo.org</email> + <name>Patrick Lauer</name> + </maintainer> + <maintainer type="project"> + <email>netmon@gentoo.org</email> + <name>Gentoo network monitoring and analysis project</name> + </maintainer> + <longdescription> + Snort is an open source network intrusion prevention and detection + system (IDS/IPS) developed by Sourcefire. Combining the benefits of + signature, protocol, and anomaly-based inspection, Snort is the most + widely deployed IDS/IPS technology worldwide. With millions of downloads + and approximately 300,000 registered users, Snort has become the de facto + standard for IPS. + </longdescription> + <upstream> + <maintainer> + <email>snort-team@sourcefire.com</email> + <name>Snort Team</name> + </maintainer> + <changelog>http://www.snort.org/snort-downloads</changelog> + <doc>http://www.snort.org/docs</doc> + <bugs-to>http://www.snort.org/snort-downloads/submit-a-bug/</bugs-to> + </upstream> + <use> + <flag name="control-socket"> + Enables Snort's control socket. + </flag> + <flag name="file-inspect"> + Enables extended file inspection capabilities. + </flag> + <flag name="gre"> + Enable support for inspecting and processing Generic Routing + Encapsulation (GRE) packet headders. Only needed if you are + monitoring GRE tunnels. + </flag> + <flag name="high-availability"> + Enables high-availability state sharing. + </flag> + <flag name="inline-init-failopen"> + Enables support to allow traffic to pass (fail-open) through + inline deployments while snort is starting and not ready to begin + inspecting traffic. If this option is not enabled, network + traffic will not pass (fail-closed) until snort has fully started + and is ready to perform packet inspection. + </flag> + <flag name="linux-smp-stats"> + Enable accurate statistics reporting through /proc on systems with + multipule processors. + </flag> + <flag name="non-ether-decoders"> + Enable decoding of non-ethernet protocols such as TokenRing, FDDI, + IPX, etc. + </flag> + <flag name="open-appid"> + Enable OpenAppID, an open, application-focused detection language + and processing module for Snort that enables users to create, share, + and implement application detection. Requires <pkg>dev-lang/luajit</pkg>. + </flag> + <flag name="perfprofiling"> + Enables support for preprocessor and rule performance profiling + using the perfmonitor preprocessor. + </flag> + <flag name="ppm"> + Enables support for setting per rule or per packet latency limits. + Helps protect against introducing network latency with inline + deployments. + </flag> + <flag name="react"> + Enables support for the react rule keyword. Supports interception, + termination, and redirection of HTTP connections. + </flag> + <flag name="shared-rep"> + Enables the use of shared memory for the Reputation Preprocessor + (Only available on Linux systems) + </flag> + <flag name="side-channel"> + Enables Snort's the side channel. + </flag> + <flag name="sourcefire"> + Enables Sourcefire specific build options, which include + --enable-perfprofiling and --enable-ppm. + </flag> + <flag name="reload-error-restart"> + Enables support for completely restarting snort if an error is + detected durring a reload. + </flag> + <flag name="active-response"> + Enables support for automatically sending TCP resets and ICMP + unreachable messages to terminate connections. Used with inline + deployments. + </flag> + <flag name="flexresp3"> + Enables support for new flexable response preprocessor for enabling + connection tearing for inline deployments. Replaces flexresp and + flexresp2. + </flag> + <flag name="large-pcap-64bit"> + Allows Snort to read pcap files that are larger than 2 GB. ONLY + VALID FOR 64bit SYSTEMS! + </flag> + <flag name="libtirpc"> + Build against <pkg>net-libs/libtirpc</pkg> for RPC support + </flag> + </use> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/snort/snort-2.9.12.ebuild b/net-analyzer/snort/snort-2.9.12.ebuild new file mode 100644 index 000000000000..0a355d731945 --- /dev/null +++ b/net-analyzer/snort/snort-2.9.12.ebuild @@ -0,0 +1,258 @@ +# Copyright 1999-2018 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI="6" +inherit autotools user systemd tmpfiles multilib + +DESCRIPTION="The de facto standard for intrusion detection/prevention" +HOMEPAGE="https://www.snort.org" +SRC_URI="https://www.snort.org/downloads/archive/${PN}/${P}.tar.gz" +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~arm ~mips ~ppc ~ppc64 ~sparc ~x86" +IUSE="static +gre +ppm +perfprofiling ++non-ether-decoders control-socket file-inspect high-availability +shared-rep side-channel sourcefire linux-smp-stats inline-init-failopen ++threads debug +active-response reload-error-restart open-appid ++react +flexresp3 large-pcap-64bit selinux +libtirpc" + +DEPEND=">=net-libs/libpcap-1.3.0 + >=net-libs/daq-2.0.2 + >=dev-libs/libpcre-8.33 + dev-libs/libdnet + net-libs/libnsl:0= + sys-libs/zlib + !libtirpc? ( sys-libs/glibc[rpc(-)] ) + libtirpc? ( net-libs/libtirpc ) + open-appid? ( dev-lang/luajit:= ) +" + +RDEPEND="${DEPEND} + selinux? ( sec-policy/selinux-snort )" + +REQUIRED_USE="!kernel_linux? ( !shared-rep )" + +PATCHES=( + "${FILESDIR}"/${PN}-2.9.8.3-no-implicit.patch + "${FILESDIR}"/${PN}-2.9.8.3-rpc.patch + "${FILESDIR}"/${PN}-2.9.12-snort.pc.patch +) + +pkg_setup() { + # pre_inst() is a better place to put this + # but we need it here for the 'fowners' statements in src_install() + enewgroup snort + enewuser snort -1 -1 /dev/null snort + +} + +src_prepare() { + default + + # Multilib fix for the sf_engine + ebegin "Applying multilib fix" + sed -i -e 's|${exec_prefix}/lib|${exec_prefix}/'$(get_libdir)'|g' \ + "${WORKDIR}/${P}/src/dynamic-plugins/sf_engine/Makefile.am" \ + || die "sed for sf_engine failed" + + # Multilib fix for the curent set of dynamic-preprocessors + for i in file ftptelnet smtp ssh dns ssl dcerpc2 sdf imap pop sip reputation gtp modbus dnp3; do + sed -i -e 's|${exec_prefix}/lib|${exec_prefix}/'$(get_libdir)'|g' \ + "${WORKDIR}/${P}/src/dynamic-preprocessors/$i/Makefile.am" \ + || die "sed for $i failed." + done + eend + + mv configure.{in,ac} || die + + AT_M4DIR=m4 eautoreconf +} + +src_configure() { + econf \ + $(use_enable !static shared) \ + $(use_enable static) \ + $(use_enable static so-with-static-lib) \ + $(use_enable gre) \ + $(use_enable control-socket) \ + $(use_enable file-inspect) \ + $(use_enable high-availability ha) \ + $(use_enable non-ether-decoders) \ + $(use_enable shared-rep) \ + $(use_enable side-channel) \ + $(use_enable sourcefire) \ + $(use_enable ppm) \ + $(use_enable perfprofiling) \ + $(use_enable linux-smp-stats) \ + $(use_enable inline-init-failopen) \ + $(use_enable open-appid) \ + $(use_enable threads pthread) \ + $(use_enable debug) \ + $(use_enable debug debug-msgs) \ + $(use_enable debug corefiles) \ + $(use_enable !debug dlclose) \ + $(use_enable active-response) \ + $(use_enable reload-error-restart) \ + $(use_enable react) \ + $(use_enable flexresp3) \ + $(use_enable large-pcap-64bit large-pcap) \ + $(use_with libtirpc) \ + --enable-mpls \ + --enable-normalizer \ + --enable-reload \ + --enable-targetbased \ + --disable-build-dynamic-examples \ + --disable-profile \ + --disable-ppm-test \ + --disable-intel-soft-cpm \ + --disable-static-daq +} + +src_install() { + emake DESTDIR="${D}" install + + keepdir /var/log/snort \ + /etc/snort/rules \ + /etc/snort/so_rules \ + /usr/$(get_libdir)/snort_dynamicrules + + # config.log and build.log are needed by Sourcefire + # to trouble shoot build problems and bug reports so we are + # perserving them incase the user needs upstream support. + dodoc RELEASE.NOTES ChangeLog \ + doc/* \ + tools/u2boat/README.u2boat + + insinto /etc/snort + doins etc/attribute_table.dtd \ + etc/classification.config \ + etc/gen-msg.map \ + etc/reference.config \ + etc/threshold.conf \ + etc/unicode.map + + # We use snort.conf.distrib because the config file is complicated + # and the one shipped with snort can change drastically between versions. + # Users should migrate setting by hand and not with etc-update. + newins etc/snort.conf snort.conf.distrib + + # config.log and build.log are needed by Sourcefire + # to troubleshoot build problems and bug reports so we are + # preserving them incase the user needs upstream support. + if [ -f "${WORKDIR}/${PF}/config.log" ]; then + dodoc "${WORKDIR}/${PF}/config.log" + fi + if [ -f "${T}/build.log" ]; then + dodoc "${T}/build.log" + fi + + insinto /etc/snort/preproc_rules + doins preproc_rules/decoder.rules \ + preproc_rules/preprocessor.rules \ + preproc_rules/sensitive-data.rules + + fowners -R snort:snort \ + /var/log/snort \ + /etc/snort + + newinitd "${FILESDIR}/snort.rc12" snort + newconfd "${FILESDIR}/snort.confd.2" snort + systemd_newunit "${FILESDIR}/snort_at.service" "snort@.service" + + newtmpfiles "${FILESDIR}"/snort.tmpfiles snort.conf + + # Sourcefire uses Makefiles to install docs causing Bug #297190. + # This removes the unwanted doc directory and rogue Makefiles. + rm -rf "${ED%/}"/usr/share/doc/snort || die "Failed to remove SF doc directories" + rm "${ED%/}"/usr/share/doc/"${PF}"/Makefile* || die "Failed to remove doc make files" + + # Remove unneeded .la files (Bug #382863) + rm "${ED%/}"/usr/$(get_libdir)/snort_dynamicengine/libsf_engine.la || die + rm "${ED%/}"/usr/$(get_libdir)/snort_dynamicpreprocessor/libsf_*_preproc.la || die "Failed to remove libsf_?_preproc.la" + + # Set the correct lib path for dynamicengine, dynamicpreprocessor, and dynamicdetection + sed -i -e 's|/usr/local/lib|/usr/'$(get_libdir)'|g' \ + "${ED%/}/etc/snort/snort.conf.distrib" || die + + # Set the correct rule location in the config + sed -i -e 's|RULE_PATH ../rules|RULE_PATH /etc/snort/rules|g' \ + "${ED%/}/etc/snort/snort.conf.distrib" || die + + # Set the correct preprocessor/decoder rule location in the config + sed -i -e 's|PREPROC_RULE_PATH ../preproc_rules|PREPROC_RULE_PATH /etc/snort/preproc_rules|g' \ + "${ED%/}/etc/snort/snort.conf.distrib" || die + + # Enable the preprocessor/decoder rules + sed -i -e 's|^# include $PREPROC_RULE_PATH|include $PREPROC_RULE_PATH|g' \ + "${ED%/}/etc/snort/snort.conf.distrib" || die + + sed -i -e 's|^# dynamicdetection directory|dynamicdetection directory|g' \ + "${ED%/}/etc/snort/snort.conf.distrib" || die + + # Just some clean up of trailing /'s in the config + sed -i -e 's|snort_dynamicpreprocessor/$|snort_dynamicpreprocessor|g' \ + "${ED%/}/etc/snort/snort.conf.distrib" || die + + # Make it clear in the config where these are... + sed -i -e 's|^include classification.config|include /etc/snort/classification.config|g' \ + "${ED%/}/etc/snort/snort.conf.distrib" || die + + sed -i -e 's|^include reference.config|include /etc/snort/reference.config|g' \ + "${ED%/}/etc/snort/snort.conf.distrib" || die + + # Disable all rule files by default. + sed -i -e 's|^include $RULE_PATH|# include $RULE_PATH|g' \ + "${ED%}/etc/snort/snort.conf.distrib" || die + + # Set the configured DAQ to afpacket + sed -i -e 's|^# config daq: <type>|config daq: afpacket|g' \ + "${ED%}/etc/snort/snort.conf.distrib" || die + + # Set the location of the DAQ modules + sed -i -e 's|^# config daq_dir: <dir>|config daq_dir: /usr/'$(get_libdir)'/daq|g' \ + "${ED%}/etc/snort/snort.conf.distrib" || die + + # Set the DAQ mode to passive + sed -i -e 's|^# config daq_mode: <mode>|config daq_mode: passive|g' \ + "${ED%}/etc/snort/snort.conf.distrib" || die + + # Set snort to run as snort:snort + sed -i -e 's|^# config set_gid:|config set_gid: snort|g' \ + "${ED%/}/etc/snort/snort.conf.distrib" || die + sed -i -e 's|^# config set_uid:|config set_uid: snort|g' \ + "${ED%/}/etc/snort/snort.conf.distrib" || die + + # Set the default log dir + sed -i -e 's|^# config logdir:|config logdir: /var/log/snort/|g' \ + "${ED%/}/etc/snort/snort.conf.distrib" || die + + # Set the correct so_rule location in the config + sed -i -e 's|SO_RULE_PATH ../so_rules|SO_RULE_PATH /etc/snort/so_rules|g' \ + "${ED%/}/etc/snort/snort.conf.distrib" || die +} + +pkg_postinst() { + tmpfiles_process snort.conf + + einfo "There have been a number of improvements and new features" + einfo "added to ${P}. Please review the RELEASE.NOTES and" + einfo "ChangLog located in /usr/share/doc/${PF}." + einfo + elog "The Sourcefire Vulnerability Research Team (VRT) recommends that" + elog "users migrate their snort.conf customizations to the latest config" + elog "file released by the VRT. You can find the latest version of the" + elog "Snort config file in /etc/snort/snort.conf.distrib." + elog + elog "!! It is important that you migrate to this new snort.conf file !!" + elog + elog "This version of the ebuild includes an updated init.d file and" + elog "conf.d file that rely on options found in the latest Snort" + elog "config file provided by the VRT." + + if use debug; then + elog "You have the 'debug' USE flag enabled. If this has been done to" + elog "troubleshoot an issue by producing a core dump or a back trace," + elog "then you need to also ensure the FEATURES variable in make.conf" + elog "contains the 'nostrip' option." + fi +} diff --git a/net-analyzer/snort/snort-2.9.15.1.ebuild b/net-analyzer/snort/snort-2.9.15.1.ebuild new file mode 100644 index 000000000000..21bdbd512480 --- /dev/null +++ b/net-analyzer/snort/snort-2.9.15.1.ebuild @@ -0,0 +1,245 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +inherit autotools user systemd tmpfiles multilib + +DESCRIPTION="The de facto standard for intrusion detection/prevention" +HOMEPAGE="https://www.snort.org" +SRC_URI="https://www.snort.org/downloads/archive/${PN}/${P}.tar.gz" +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~arm ~mips ~ppc ~ppc64 ~sparc ~x86" +IUSE="static +gre +ppm +perfprofiling ++non-ether-decoders control-socket file-inspect high-availability +shared-rep side-channel sourcefire linux-smp-stats inline-init-failopen ++threads debug +active-response reload-error-restart open-appid ++react +flexresp3 large-pcap-64bit selinux +libtirpc" + +DEPEND=">=net-libs/libpcap-1.3.0 + >=net-libs/daq-2.0.2 + >=dev-libs/libpcre-8.33 + dev-libs/libdnet + net-libs/libnsl:0= + sys-libs/zlib + !libtirpc? ( sys-libs/glibc[rpc(-)] ) + libtirpc? ( net-libs/libtirpc ) + open-appid? ( dev-lang/luajit:= ) +" + +RDEPEND="${DEPEND} + selinux? ( sec-policy/selinux-snort )" + +REQUIRED_USE="!kernel_linux? ( !shared-rep )" + +PATCHES=( + "${FILESDIR}"/${PN}-2.9.8.3-no-implicit.patch + "${FILESDIR}"/${PN}-2.9.8.3-rpc.patch + "${FILESDIR}"/${PN}-2.9.12-snort.pc.patch + "${FILESDIR}"/${PN}-2.9.15.1-fno-common.patch +) + +pkg_setup() { + # pre_inst() is a better place to put this + # but we need it here for the 'fowners' statements in src_install() + enewgroup snort + enewuser snort -1 -1 /dev/null snort + +} + +src_prepare() { + default + + mv configure.{in,ac} || die + + AT_M4DIR=m4 eautoreconf +} + +src_configure() { + econf \ + $(use_enable !static shared) \ + $(use_enable static) \ + $(use_enable static so-with-static-lib) \ + $(use_enable gre) \ + $(use_enable control-socket) \ + $(use_enable file-inspect) \ + $(use_enable high-availability ha) \ + $(use_enable non-ether-decoders) \ + $(use_enable shared-rep) \ + $(use_enable side-channel) \ + $(use_enable sourcefire) \ + $(use_enable ppm) \ + $(use_enable perfprofiling) \ + $(use_enable linux-smp-stats) \ + $(use_enable inline-init-failopen) \ + $(use_enable open-appid) \ + $(use_enable threads pthread) \ + $(use_enable debug) \ + $(use_enable debug debug-msgs) \ + $(use_enable debug corefiles) \ + $(use_enable !debug dlclose) \ + $(use_enable active-response) \ + $(use_enable reload-error-restart) \ + $(use_enable react) \ + $(use_enable flexresp3) \ + $(use_enable large-pcap-64bit large-pcap) \ + $(use_with libtirpc) \ + --enable-mpls \ + --enable-normalizer \ + --enable-reload \ + --enable-targetbased \ + --disable-build-dynamic-examples \ + --disable-profile \ + --disable-ppm-test \ + --disable-intel-soft-cpm \ + --disable-static-daq +} + +src_install() { + default + + keepdir /var/log/snort \ + /etc/snort/rules \ + /etc/snort/so_rules \ + /usr/$(get_libdir)/snort_dynamicrules + + # config.log and build.log are needed by Sourcefire + # to trouble shoot build problems and bug reports so we are + # perserving them incase the user needs upstream support. + dodoc RELEASE.NOTES ChangeLog \ + doc/* \ + tools/u2boat/README.u2boat + + insinto /etc/snort + doins etc/attribute_table.dtd \ + etc/classification.config \ + etc/gen-msg.map \ + etc/reference.config \ + etc/threshold.conf \ + etc/unicode.map + + # We use snort.conf.distrib because the config file is complicated + # and the one shipped with snort can change drastically between versions. + # Users should migrate setting by hand and not with etc-update. + newins etc/snort.conf snort.conf.distrib + + # config.log and build.log are needed by Sourcefire + # to troubleshoot build problems and bug reports so we are + # preserving them incase the user needs upstream support. + if [ -f "${WORKDIR}/${PF}/config.log" ]; then + dodoc "${WORKDIR}/${PF}/config.log" + fi + if [ -f "${T}/build.log" ]; then + dodoc "${T}/build.log" + fi + + insinto /etc/snort/preproc_rules + doins preproc_rules/decoder.rules \ + preproc_rules/preprocessor.rules \ + preproc_rules/sensitive-data.rules + + fowners -R snort:snort \ + /var/log/snort \ + /etc/snort + + newinitd "${FILESDIR}/snort.rc12" snort + newconfd "${FILESDIR}/snort.confd.2" snort + systemd_newunit "${FILESDIR}/snort_at.service" "snort@.service" + + newtmpfiles "${FILESDIR}"/snort.tmpfiles snort.conf + + # Sourcefire uses Makefiles to install docs causing Bug #297190. + # This removes the unwanted doc directory and rogue Makefiles. + rm -rf "${ED}"/usr/share/doc/snort || die "Failed to remove SF doc directories" + rm "${ED}"/usr/share/doc/"${PF}"/Makefile* || die "Failed to remove doc make files" + + # Remove unneeded .la files (Bug #382863) + rm "${ED}"/usr/$(get_libdir)/snort_dynamicengine/libsf_engine.la || die + rm "${ED}"/usr/$(get_libdir)/snort_dynamicpreprocessor/libsf_*_preproc.la || die "Failed to remove libsf_?_preproc.la" + + # Set the correct lib path for dynamicengine, dynamicpreprocessor, and dynamicdetection + sed -i -e 's|/usr/local/lib|/usr/'$(get_libdir)'|g' \ + "${ED}/etc/snort/snort.conf.distrib" || die + + # Set the correct rule location in the config + sed -i -e 's|RULE_PATH ../rules|RULE_PATH /etc/snort/rules|g' \ + "${ED}/etc/snort/snort.conf.distrib" || die + + # Set the correct preprocessor/decoder rule location in the config + sed -i -e 's|PREPROC_RULE_PATH ../preproc_rules|PREPROC_RULE_PATH /etc/snort/preproc_rules|g' \ + "${ED}/etc/snort/snort.conf.distrib" || die + + # Enable the preprocessor/decoder rules + sed -i -e 's|^# include $PREPROC_RULE_PATH|include $PREPROC_RULE_PATH|g' \ + "${ED}/etc/snort/snort.conf.distrib" || die + + sed -i -e 's|^# dynamicdetection directory|dynamicdetection directory|g' \ + "${ED}/etc/snort/snort.conf.distrib" || die + + # Just some clean up of trailing /'s in the config + sed -i -e 's|snort_dynamicpreprocessor/$|snort_dynamicpreprocessor|g' \ + "${ED}/etc/snort/snort.conf.distrib" || die + + # Make it clear in the config where these are... + sed -i -e 's|^include classification.config|include /etc/snort/classification.config|g' \ + "${ED}/etc/snort/snort.conf.distrib" || die + + sed -i -e 's|^include reference.config|include /etc/snort/reference.config|g' \ + "${ED}/etc/snort/snort.conf.distrib" || die + + # Disable all rule files by default. + sed -i -e 's|^include $RULE_PATH|# include $RULE_PATH|g' \ + "${ED%}/etc/snort/snort.conf.distrib" || die + + # Set the configured DAQ to afpacket + sed -i -e 's|^# config daq: <type>|config daq: afpacket|g' \ + "${ED%}/etc/snort/snort.conf.distrib" || die + + # Set the location of the DAQ modules + sed -i -e 's|^# config daq_dir: <dir>|config daq_dir: /usr/'$(get_libdir)'/daq|g' \ + "${ED%}/etc/snort/snort.conf.distrib" || die + + # Set the DAQ mode to passive + sed -i -e 's|^# config daq_mode: <mode>|config daq_mode: passive|g' \ + "${ED%}/etc/snort/snort.conf.distrib" || die + + # Set snort to run as snort:snort + sed -i -e 's|^# config set_gid:|config set_gid: snort|g' \ + "${ED}/etc/snort/snort.conf.distrib" || die + sed -i -e 's|^# config set_uid:|config set_uid: snort|g' \ + "${ED}/etc/snort/snort.conf.distrib" || die + + # Set the default log dir + sed -i -e 's|^# config logdir:|config logdir: /var/log/snort/|g' \ + "${ED}/etc/snort/snort.conf.distrib" || die + + # Set the correct so_rule location in the config + sed -i -e 's|SO_RULE_PATH ../so_rules|SO_RULE_PATH /etc/snort/so_rules|g' \ + "${ED}/etc/snort/snort.conf.distrib" || die +} + +pkg_postinst() { + tmpfiles_process snort.conf + + einfo "There have been a number of improvements and new features" + einfo "added to ${P}. Please review the RELEASE.NOTES and" + einfo "ChangLog located in /usr/share/doc/${PF}." + einfo + elog "The Sourcefire Vulnerability Research Team (VRT) recommends that" + elog "users migrate their snort.conf customizations to the latest config" + elog "file released by the VRT. You can find the latest version of the" + elog "Snort config file in /etc/snort/snort.conf.distrib." + elog + elog "!! It is important that you migrate to this new snort.conf file !!" + elog + elog "This version of the ebuild includes an updated init.d file and" + elog "conf.d file that rely on options found in the latest Snort" + elog "config file provided by the VRT." + + if use debug; then + elog "You have the 'debug' USE flag enabled. If this has been done to" + elog "troubleshoot an issue by producing a core dump or a back trace," + elog "then you need to also ensure the FEATURES variable in make.conf" + elog "contains the 'nostrip' option." + fi +} diff --git a/net-analyzer/snort/snort-2.9.15.ebuild b/net-analyzer/snort/snort-2.9.15.ebuild new file mode 100644 index 000000000000..113430f103e6 --- /dev/null +++ b/net-analyzer/snort/snort-2.9.15.ebuild @@ -0,0 +1,258 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +inherit autotools user systemd tmpfiles multilib + +DESCRIPTION="The de facto standard for intrusion detection/prevention" +HOMEPAGE="https://www.snort.org" +SRC_URI="https://www.snort.org/downloads/archive/${PN}/${P}.tar.gz" +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~arm ~mips ~ppc ~ppc64 ~sparc ~x86" +IUSE="static +gre +ppm +perfprofiling ++non-ether-decoders control-socket file-inspect high-availability +shared-rep side-channel sourcefire linux-smp-stats inline-init-failopen ++threads debug +active-response reload-error-restart open-appid ++react +flexresp3 large-pcap-64bit selinux +libtirpc" + +DEPEND=">=net-libs/libpcap-1.3.0 + >=net-libs/daq-2.0.2 + >=dev-libs/libpcre-8.33 + dev-libs/libdnet + net-libs/libnsl:0= + sys-libs/zlib + !libtirpc? ( sys-libs/glibc[rpc(-)] ) + libtirpc? ( net-libs/libtirpc ) + open-appid? ( dev-lang/luajit:= ) +" + +RDEPEND="${DEPEND} + selinux? ( sec-policy/selinux-snort )" + +REQUIRED_USE="!kernel_linux? ( !shared-rep )" + +PATCHES=( + "${FILESDIR}"/${PN}-2.9.8.3-no-implicit.patch + "${FILESDIR}"/${PN}-2.9.8.3-rpc.patch + "${FILESDIR}"/${PN}-2.9.12-snort.pc.patch +) + +pkg_setup() { + # pre_inst() is a better place to put this + # but we need it here for the 'fowners' statements in src_install() + enewgroup snort + enewuser snort -1 -1 /dev/null snort + +} + +src_prepare() { + default + + # Multilib fix for the sf_engine + ebegin "Applying multilib fix" + sed -i -e 's|${exec_prefix}/lib|${exec_prefix}/'$(get_libdir)'|g' \ + "${WORKDIR}/${P}/src/dynamic-plugins/sf_engine/Makefile.am" \ + || die "sed for sf_engine failed" + + # Multilib fix for the curent set of dynamic-preprocessors + for i in file ftptelnet smtp ssh dns ssl dcerpc2 sdf imap pop sip reputation gtp modbus dnp3; do + sed -i -e 's|${exec_prefix}/lib|${exec_prefix}/'$(get_libdir)'|g' \ + "${WORKDIR}/${P}/src/dynamic-preprocessors/$i/Makefile.am" \ + || die "sed for $i failed." + done + eend + + mv configure.{in,ac} || die + + AT_M4DIR=m4 eautoreconf +} + +src_configure() { + econf \ + $(use_enable !static shared) \ + $(use_enable static) \ + $(use_enable static so-with-static-lib) \ + $(use_enable gre) \ + $(use_enable control-socket) \ + $(use_enable file-inspect) \ + $(use_enable high-availability ha) \ + $(use_enable non-ether-decoders) \ + $(use_enable shared-rep) \ + $(use_enable side-channel) \ + $(use_enable sourcefire) \ + $(use_enable ppm) \ + $(use_enable perfprofiling) \ + $(use_enable linux-smp-stats) \ + $(use_enable inline-init-failopen) \ + $(use_enable open-appid) \ + $(use_enable threads pthread) \ + $(use_enable debug) \ + $(use_enable debug debug-msgs) \ + $(use_enable debug corefiles) \ + $(use_enable !debug dlclose) \ + $(use_enable active-response) \ + $(use_enable reload-error-restart) \ + $(use_enable react) \ + $(use_enable flexresp3) \ + $(use_enable large-pcap-64bit large-pcap) \ + $(use_with libtirpc) \ + --enable-mpls \ + --enable-normalizer \ + --enable-reload \ + --enable-targetbased \ + --disable-build-dynamic-examples \ + --disable-profile \ + --disable-ppm-test \ + --disable-intel-soft-cpm \ + --disable-static-daq +} + +src_install() { + default + + keepdir /var/log/snort \ + /etc/snort/rules \ + /etc/snort/so_rules \ + /usr/$(get_libdir)/snort_dynamicrules + + # config.log and build.log are needed by Sourcefire + # to trouble shoot build problems and bug reports so we are + # perserving them incase the user needs upstream support. + dodoc RELEASE.NOTES ChangeLog \ + doc/* \ + tools/u2boat/README.u2boat + + insinto /etc/snort + doins etc/attribute_table.dtd \ + etc/classification.config \ + etc/gen-msg.map \ + etc/reference.config \ + etc/threshold.conf \ + etc/unicode.map + + # We use snort.conf.distrib because the config file is complicated + # and the one shipped with snort can change drastically between versions. + # Users should migrate setting by hand and not with etc-update. + newins etc/snort.conf snort.conf.distrib + + # config.log and build.log are needed by Sourcefire + # to troubleshoot build problems and bug reports so we are + # preserving them incase the user needs upstream support. + if [ -f "${WORKDIR}/${PF}/config.log" ]; then + dodoc "${WORKDIR}/${PF}/config.log" + fi + if [ -f "${T}/build.log" ]; then + dodoc "${T}/build.log" + fi + + insinto /etc/snort/preproc_rules + doins preproc_rules/decoder.rules \ + preproc_rules/preprocessor.rules \ + preproc_rules/sensitive-data.rules + + fowners -R snort:snort \ + /var/log/snort \ + /etc/snort + + newinitd "${FILESDIR}/snort.rc12" snort + newconfd "${FILESDIR}/snort.confd.2" snort + systemd_newunit "${FILESDIR}/snort_at.service" "snort@.service" + + newtmpfiles "${FILESDIR}"/snort.tmpfiles snort.conf + + # Sourcefire uses Makefiles to install docs causing Bug #297190. + # This removes the unwanted doc directory and rogue Makefiles. + rm -rf "${ED}"/usr/share/doc/snort || die "Failed to remove SF doc directories" + rm "${ED}"/usr/share/doc/"${PF}"/Makefile* || die "Failed to remove doc make files" + + # Remove unneeded .la files (Bug #382863) + rm "${ED}"/usr/$(get_libdir)/snort_dynamicengine/libsf_engine.la || die + rm "${ED}"/usr/$(get_libdir)/snort_dynamicpreprocessor/libsf_*_preproc.la || die "Failed to remove libsf_?_preproc.la" + + # Set the correct lib path for dynamicengine, dynamicpreprocessor, and dynamicdetection + sed -i -e 's|/usr/local/lib|/usr/'$(get_libdir)'|g' \ + "${ED}/etc/snort/snort.conf.distrib" || die + + # Set the correct rule location in the config + sed -i -e 's|RULE_PATH ../rules|RULE_PATH /etc/snort/rules|g' \ + "${ED}/etc/snort/snort.conf.distrib" || die + + # Set the correct preprocessor/decoder rule location in the config + sed -i -e 's|PREPROC_RULE_PATH ../preproc_rules|PREPROC_RULE_PATH /etc/snort/preproc_rules|g' \ + "${ED}/etc/snort/snort.conf.distrib" || die + + # Enable the preprocessor/decoder rules + sed -i -e 's|^# include $PREPROC_RULE_PATH|include $PREPROC_RULE_PATH|g' \ + "${ED}/etc/snort/snort.conf.distrib" || die + + sed -i -e 's|^# dynamicdetection directory|dynamicdetection directory|g' \ + "${ED}/etc/snort/snort.conf.distrib" || die + + # Just some clean up of trailing /'s in the config + sed -i -e 's|snort_dynamicpreprocessor/$|snort_dynamicpreprocessor|g' \ + "${ED}/etc/snort/snort.conf.distrib" || die + + # Make it clear in the config where these are... + sed -i -e 's|^include classification.config|include /etc/snort/classification.config|g' \ + "${ED}/etc/snort/snort.conf.distrib" || die + + sed -i -e 's|^include reference.config|include /etc/snort/reference.config|g' \ + "${ED}/etc/snort/snort.conf.distrib" || die + + # Disable all rule files by default. + sed -i -e 's|^include $RULE_PATH|# include $RULE_PATH|g' \ + "${ED%}/etc/snort/snort.conf.distrib" || die + + # Set the configured DAQ to afpacket + sed -i -e 's|^# config daq: <type>|config daq: afpacket|g' \ + "${ED%}/etc/snort/snort.conf.distrib" || die + + # Set the location of the DAQ modules + sed -i -e 's|^# config daq_dir: <dir>|config daq_dir: /usr/'$(get_libdir)'/daq|g' \ + "${ED%}/etc/snort/snort.conf.distrib" || die + + # Set the DAQ mode to passive + sed -i -e 's|^# config daq_mode: <mode>|config daq_mode: passive|g' \ + "${ED%}/etc/snort/snort.conf.distrib" || die + + # Set snort to run as snort:snort + sed -i -e 's|^# config set_gid:|config set_gid: snort|g' \ + "${ED}/etc/snort/snort.conf.distrib" || die + sed -i -e 's|^# config set_uid:|config set_uid: snort|g' \ + "${ED}/etc/snort/snort.conf.distrib" || die + + # Set the default log dir + sed -i -e 's|^# config logdir:|config logdir: /var/log/snort/|g' \ + "${ED}/etc/snort/snort.conf.distrib" || die + + # Set the correct so_rule location in the config + sed -i -e 's|SO_RULE_PATH ../so_rules|SO_RULE_PATH /etc/snort/so_rules|g' \ + "${ED}/etc/snort/snort.conf.distrib" || die +} + +pkg_postinst() { + tmpfiles_process snort.conf + + einfo "There have been a number of improvements and new features" + einfo "added to ${P}. Please review the RELEASE.NOTES and" + einfo "ChangLog located in /usr/share/doc/${PF}." + einfo + elog "The Sourcefire Vulnerability Research Team (VRT) recommends that" + elog "users migrate their snort.conf customizations to the latest config" + elog "file released by the VRT. You can find the latest version of the" + elog "Snort config file in /etc/snort/snort.conf.distrib." + elog + elog "!! It is important that you migrate to this new snort.conf file !!" + elog + elog "This version of the ebuild includes an updated init.d file and" + elog "conf.d file that rely on options found in the latest Snort" + elog "config file provided by the VRT." + + if use debug; then + elog "You have the 'debug' USE flag enabled. If this has been done to" + elog "troubleshoot an issue by producing a core dump or a back trace," + elog "then you need to also ensure the FEATURES variable in make.conf" + elog "contains the 'nostrip' option." + fi +} diff --git a/net-analyzer/snort/snort-2.9.16.ebuild b/net-analyzer/snort/snort-2.9.16.ebuild new file mode 100644 index 000000000000..6e7835a53107 --- /dev/null +++ b/net-analyzer/snort/snort-2.9.16.ebuild @@ -0,0 +1,245 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +inherit autotools user systemd tmpfiles multilib + +DESCRIPTION="The de facto standard for intrusion detection/prevention" +HOMEPAGE="https://www.snort.org" +SRC_URI="https://www.snort.org/downloads/archive/${PN}/${P}.tar.gz" +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~arm ~mips ~ppc ~ppc64 ~sparc ~x86" +IUSE="+active-response control-socket debug file-inspect +flexresp3 +gre +high-availability inline-init-failopen large-pcap-64bit +libtirpc +linux-smp-stats +non-ether-decoders open-appid +perfprofiling +ppm +react +reload-error-restart selinux shared-rep side-channel sourcefire static ++threads" + +DEPEND=">=net-libs/libpcap-1.3.0 + >=net-libs/daq-2.0.2 + >=dev-libs/libpcre-8.33 + dev-libs/libdnet + net-libs/libnsl:0= + sys-libs/zlib + !libtirpc? ( sys-libs/glibc[rpc(-)] ) + libtirpc? ( net-libs/libtirpc ) + open-appid? ( dev-lang/luajit:= ) +" + +RDEPEND="${DEPEND} + selinux? ( sec-policy/selinux-snort )" + +REQUIRED_USE="!kernel_linux? ( !shared-rep )" + +PATCHES=( + "${FILESDIR}"/${PN}-2.9.8.3-no-implicit.patch + "${FILESDIR}"/${PN}-2.9.8.3-rpc.patch + "${FILESDIR}"/${PN}-2.9.12-snort.pc.patch + "${FILESDIR}"/${PN}-2.9.15.1-fno-common.patch +) + +pkg_setup() { + # pre_inst() is a better place to put this + # but we need it here for the 'fowners' statements in src_install() + enewgroup snort + enewuser snort -1 -1 /dev/null snort + +} + +src_prepare() { + default + + mv configure.{in,ac} || die + + AT_M4DIR=m4 eautoreconf +} + +src_configure() { + econf \ + $(use_enable !static shared) \ + $(use_enable static) \ + $(use_enable static so-with-static-lib) \ + $(use_enable gre) \ + $(use_enable control-socket) \ + $(use_enable file-inspect) \ + $(use_enable high-availability ha) \ + $(use_enable non-ether-decoders) \ + $(use_enable shared-rep) \ + $(use_enable side-channel) \ + $(use_enable sourcefire) \ + $(use_enable ppm) \ + $(use_enable perfprofiling) \ + $(use_enable linux-smp-stats) \ + $(use_enable inline-init-failopen) \ + $(use_enable open-appid) \ + $(use_enable threads pthread) \ + $(use_enable debug) \ + $(use_enable debug debug-msgs) \ + $(use_enable debug corefiles) \ + $(use_enable !debug dlclose) \ + $(use_enable active-response) \ + $(use_enable reload-error-restart) \ + $(use_enable react) \ + $(use_enable flexresp3) \ + $(use_enable large-pcap-64bit large-pcap) \ + $(use_with libtirpc) \ + --enable-mpls \ + --enable-normalizer \ + --enable-reload \ + --enable-targetbased \ + --disable-build-dynamic-examples \ + --disable-profile \ + --disable-ppm-test \ + --disable-intel-soft-cpm \ + --disable-static-daq +} + +src_install() { + default + + keepdir /var/log/snort \ + /etc/snort/rules \ + /etc/snort/so_rules \ + /usr/$(get_libdir)/snort_dynamicrules + + # config.log and build.log are needed by Sourcefire + # to trouble shoot build problems and bug reports so we are + # perserving them incase the user needs upstream support. + dodoc RELEASE.NOTES ChangeLog \ + doc/* \ + tools/u2boat/README.u2boat + + insinto /etc/snort + doins etc/attribute_table.dtd \ + etc/classification.config \ + etc/gen-msg.map \ + etc/reference.config \ + etc/threshold.conf \ + etc/unicode.map + + # We use snort.conf.distrib because the config file is complicated + # and the one shipped with snort can change drastically between versions. + # Users should migrate setting by hand and not with etc-update. + newins etc/snort.conf snort.conf.distrib + + # config.log and build.log are needed by Sourcefire + # to troubleshoot build problems and bug reports so we are + # preserving them incase the user needs upstream support. + if [ -f "${WORKDIR}/${PF}/config.log" ]; then + dodoc "${WORKDIR}/${PF}/config.log" + fi + if [ -f "${T}/build.log" ]; then + dodoc "${T}/build.log" + fi + + insinto /etc/snort/preproc_rules + doins preproc_rules/decoder.rules \ + preproc_rules/preprocessor.rules \ + preproc_rules/sensitive-data.rules + + fowners -R snort:snort \ + /var/log/snort \ + /etc/snort + + newinitd "${FILESDIR}/snort.rc12" snort + newconfd "${FILESDIR}/snort.confd.2" snort + systemd_newunit "${FILESDIR}/snort_at.service" "snort@.service" + + newtmpfiles "${FILESDIR}"/snort.tmpfiles snort.conf + + # Sourcefire uses Makefiles to install docs causing Bug #297190. + # This removes the unwanted doc directory and rogue Makefiles. + rm -rf "${ED}"/usr/share/doc/snort || die "Failed to remove SF doc directories" + rm "${ED}"/usr/share/doc/"${PF}"/Makefile* || die "Failed to remove doc make files" + + # Remove unneeded .la files (Bug #382863) + rm "${ED}"/usr/$(get_libdir)/snort_dynamicengine/libsf_engine.la || die + rm "${ED}"/usr/$(get_libdir)/snort_dynamicpreprocessor/libsf_*_preproc.la || die "Failed to remove libsf_?_preproc.la" + + # Set the correct lib path for dynamicengine, dynamicpreprocessor, and dynamicdetection + sed -i -e 's|/usr/local/lib|/usr/'$(get_libdir)'|g' \ + "${ED}/etc/snort/snort.conf.distrib" || die + + # Set the correct rule location in the config + sed -i -e 's|RULE_PATH ../rules|RULE_PATH /etc/snort/rules|g' \ + "${ED}/etc/snort/snort.conf.distrib" || die + + # Set the correct preprocessor/decoder rule location in the config + sed -i -e 's|PREPROC_RULE_PATH ../preproc_rules|PREPROC_RULE_PATH /etc/snort/preproc_rules|g' \ + "${ED}/etc/snort/snort.conf.distrib" || die + + # Enable the preprocessor/decoder rules + sed -i -e 's|^# include $PREPROC_RULE_PATH|include $PREPROC_RULE_PATH|g' \ + "${ED}/etc/snort/snort.conf.distrib" || die + + sed -i -e 's|^# dynamicdetection directory|dynamicdetection directory|g' \ + "${ED}/etc/snort/snort.conf.distrib" || die + + # Just some clean up of trailing /'s in the config + sed -i -e 's|snort_dynamicpreprocessor/$|snort_dynamicpreprocessor|g' \ + "${ED}/etc/snort/snort.conf.distrib" || die + + # Make it clear in the config where these are... + sed -i -e 's|^include classification.config|include /etc/snort/classification.config|g' \ + "${ED}/etc/snort/snort.conf.distrib" || die + + sed -i -e 's|^include reference.config|include /etc/snort/reference.config|g' \ + "${ED}/etc/snort/snort.conf.distrib" || die + + # Disable all rule files by default. + sed -i -e 's|^include $RULE_PATH|# include $RULE_PATH|g' \ + "${ED%}/etc/snort/snort.conf.distrib" || die + + # Set the configured DAQ to afpacket + sed -i -e 's|^# config daq: <type>|config daq: afpacket|g' \ + "${ED%}/etc/snort/snort.conf.distrib" || die + + # Set the location of the DAQ modules + sed -i -e 's|^# config daq_dir: <dir>|config daq_dir: /usr/'$(get_libdir)'/daq|g' \ + "${ED%}/etc/snort/snort.conf.distrib" || die + + # Set the DAQ mode to passive + sed -i -e 's|^# config daq_mode: <mode>|config daq_mode: passive|g' \ + "${ED%}/etc/snort/snort.conf.distrib" || die + + # Set snort to run as snort:snort + sed -i -e 's|^# config set_gid:|config set_gid: snort|g' \ + "${ED}/etc/snort/snort.conf.distrib" || die + sed -i -e 's|^# config set_uid:|config set_uid: snort|g' \ + "${ED}/etc/snort/snort.conf.distrib" || die + + # Set the default log dir + sed -i -e 's|^# config logdir:|config logdir: /var/log/snort/|g' \ + "${ED}/etc/snort/snort.conf.distrib" || die + + # Set the correct so_rule location in the config + sed -i -e 's|SO_RULE_PATH ../so_rules|SO_RULE_PATH /etc/snort/so_rules|g' \ + "${ED}/etc/snort/snort.conf.distrib" || die +} + +pkg_postinst() { + tmpfiles_process snort.conf + + einfo "There have been a number of improvements and new features" + einfo "added to ${P}. Please review the RELEASE.NOTES and" + einfo "ChangLog located in /usr/share/doc/${PF}." + einfo + elog "The Sourcefire Vulnerability Research Team (VRT) recommends that" + elog "users migrate their snort.conf customizations to the latest config" + elog "file released by the VRT. You can find the latest version of the" + elog "Snort config file in /etc/snort/snort.conf.distrib." + elog + elog "!! It is important that you migrate to this new snort.conf file !!" + elog + elog "This version of the ebuild includes an updated init.d file and" + elog "conf.d file that rely on options found in the latest Snort" + elog "config file provided by the VRT." + + if use debug; then + elog "You have the 'debug' USE flag enabled. If this has been done to" + elog "troubleshoot an issue by producing a core dump or a back trace," + elog "then you need to also ensure the FEATURES variable in make.conf" + elog "contains the 'nostrip' option." + fi +} diff --git a/net-analyzer/snort/snort-2.9.8.3-r2.ebuild b/net-analyzer/snort/snort-2.9.8.3-r2.ebuild new file mode 100644 index 000000000000..2dc9971f77c8 --- /dev/null +++ b/net-analyzer/snort/snort-2.9.8.3-r2.ebuild @@ -0,0 +1,254 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 +inherit autotools multilib user + +DESCRIPTION="The de facto standard for intrusion detection/prevention" +HOMEPAGE="https://www.snort.org" +SRC_URI="https://www.snort.org/downloads/archive/${PN}/${P}.tar.gz" +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~arm ~mips ~ppc ~ppc64 ~sparc ~x86" +IUSE="static +gre +ppm +perfprofiling ++non-ether-decoders control-socket file-inspect high-availability +shared-rep side-channel sourcefire linux-smp-stats inline-init-failopen ++threads debug +active-response reload-error-restart ++react +flexresp3 large-pcap-64bit selinux +libtirpc" + +DEPEND=">=net-libs/libpcap-1.3.0 + >=net-libs/daq-2.0.2 + >=dev-libs/libpcre-8.33 + dev-libs/libdnet + net-libs/libnsl:0= + sys-libs/zlib + !libtirpc? ( sys-libs/glibc[rpc(-)] ) + libtirpc? ( net-libs/libtirpc ) +" + +RDEPEND="${DEPEND} + selinux? ( sec-policy/selinux-snort )" + +REQUIRED_USE="!kernel_linux? ( !shared-rep )" + +PATCHES=( + "${FILESDIR}"/${P}-no-implicit.patch + "${FILESDIR}"/${P}-rpc.patch +) + +pkg_setup() { + + # pre_inst() is a better place to put this + # but we need it here for the 'fowners' statements in src_install() + enewgroup snort + enewuser snort -1 -1 /dev/null snort + +} + +src_prepare() { + default + + # Multilib fix for the sf_engine + ebegin "Applying multilib fix" + sed -i -e 's|${exec_prefix}/lib|${exec_prefix}/'$(get_libdir)'|g' \ + "${WORKDIR}/${P}/src/dynamic-plugins/sf_engine/Makefile.am" \ + || die "sed for sf_engine failed" + + # Multilib fix for the curent set of dynamic-preprocessors + for i in file ftptelnet smtp ssh dns ssl dcerpc2 sdf imap pop sip reputation gtp modbus dnp3; do + sed -i -e 's|${exec_prefix}/lib|${exec_prefix}/'$(get_libdir)'|g' \ + "${WORKDIR}/${P}/src/dynamic-preprocessors/$i/Makefile.am" \ + || die "sed for $i failed." + done + eend + + AT_M4DIR=m4 eautoreconf +} + +src_configure() { + + econf \ + $(use_enable !static shared) \ + $(use_enable static) \ + $(use_enable static so-with-static-lib) \ + $(use_enable gre) \ + $(use_enable control-socket) \ + $(use_enable file-inspect) \ + $(use_enable high-availability ha) \ + $(use_enable non-ether-decoders) \ + $(use_enable shared-rep) \ + $(use_enable side-channel) \ + $(use_enable sourcefire) \ + $(use_enable ppm) \ + $(use_enable perfprofiling) \ + $(use_enable linux-smp-stats) \ + $(use_enable inline-init-failopen) \ + $(use_enable threads pthread) \ + $(use_enable debug) \ + $(use_enable debug debug-msgs) \ + $(use_enable debug corefiles) \ + $(use_enable !debug dlclose) \ + $(use_enable active-response) \ + $(use_enable reload-error-restart) \ + $(use_enable react) \ + $(use_enable flexresp3) \ + $(use_enable large-pcap-64bit large-pcap) \ + $(use_with libtirpc) \ + --enable-mpls \ + --enable-normalizer \ + --enable-reload \ + --enable-targetbased \ + --disable-build-dynamic-examples \ + --disable-profile \ + --disable-ppm-test \ + --disable-intel-soft-cpm \ + --disable-static-daq +} + +src_install() { + + emake DESTDIR="${D}" install + + dodir /var/log/snort \ + /var/run/snort \ + /etc/snort/rules \ + /etc/snort/so_rules \ + /usr/$(get_libdir)/snort_dynamicrules + + # config.log and build.log are needed by Sourcefire + # to trouble shoot build problems and bug reports so we are + # perserving them incase the user needs upstream support. + dodoc RELEASE.NOTES ChangeLog \ + doc/* \ + tools/u2boat/README.u2boat + + insinto /etc/snort + doins etc/attribute_table.dtd \ + etc/classification.config \ + etc/gen-msg.map \ + etc/reference.config \ + etc/threshold.conf \ + etc/unicode.map + + # We use snort.conf.distrib because the config file is complicated + # and the one shipped with snort can change drastically between versions. + # Users should migrate setting by hand and not with etc-update. + newins etc/snort.conf snort.conf.distrib + + # config.log and build.log are needed by Sourcefire + # to troubleshoot build problems and bug reports so we are + # preserving them incase the user needs upstream support. + if [ -f "${WORKDIR}/${PF}/config.log" ]; then + dodoc "${WORKDIR}/${PF}/config.log" + fi + if [ -f "${T}/build.log" ]; then + dodoc "${T}/build.log" + fi + + insinto /etc/snort/preproc_rules + doins preproc_rules/decoder.rules \ + preproc_rules/preprocessor.rules \ + preproc_rules/sensitive-data.rules + + fowners -R snort:snort \ + /var/log/snort \ + /var/run/snort \ + /etc/snort + + newinitd "${FILESDIR}/snort.rc12" snort + newconfd "${FILESDIR}/snort.confd.2" snort + + # Sourcefire uses Makefiles to install docs causing Bug #297190. + # This removes the unwanted doc directory and rogue Makefiles. + rm -rf "${D}"usr/share/doc/snort || die "Failed to remove SF doc directories" + rm "${D}"usr/share/doc/"${PF}"/Makefile* || die "Failed to remove doc make files" + + # Remove unneeded .la files (Bug #382863) + rm "${D}"usr/$(get_libdir)/snort_dynamicengine/libsf_engine.la || die + rm "${D}"usr/$(get_libdir)/snort_dynamicpreprocessor/libsf_*_preproc.la || die "Failed to remove libsf_?_preproc.la" + + # Set the correct lib path for dynamicengine, dynamicpreprocessor, and dynamicdetection + sed -i -e 's|/usr/local/lib|/usr/'$(get_libdir)'|g' \ + "${D}etc/snort/snort.conf.distrib" || die + + # Set the correct rule location in the config + sed -i -e 's|RULE_PATH ../rules|RULE_PATH /etc/snort/rules|g' \ + "${D}etc/snort/snort.conf.distrib" || die + + # Set the correct preprocessor/decoder rule location in the config + sed -i -e 's|PREPROC_RULE_PATH ../preproc_rules|PREPROC_RULE_PATH /etc/snort/preproc_rules|g' \ + "${D}etc/snort/snort.conf.distrib" || die + + # Enable the preprocessor/decoder rules + sed -i -e 's|^# include $PREPROC_RULE_PATH|include $PREPROC_RULE_PATH|g' \ + "${D}etc/snort/snort.conf.distrib" || die + + sed -i -e 's|^# dynamicdetection directory|dynamicdetection directory|g' \ + "${D}etc/snort/snort.conf.distrib" || die + + # Just some clean up of trailing /'s in the config + sed -i -e 's|snort_dynamicpreprocessor/$|snort_dynamicpreprocessor|g' \ + "${D}etc/snort/snort.conf.distrib" || die + + # Make it clear in the config where these are... + sed -i -e 's|^include classification.config|include /etc/snort/classification.config|g' \ + "${D}etc/snort/snort.conf.distrib" || die + + sed -i -e 's|^include reference.config|include /etc/snort/reference.config|g' \ + "${D}etc/snort/snort.conf.distrib" || die + + # Disable all rule files by default. + sed -i -e 's|^include $RULE_PATH|# include $RULE_PATH|g' \ + "${D}etc/snort/snort.conf.distrib" || die + + # Set the configured DAQ to afpacket + sed -i -e 's|^# config daq: <type>|config daq: afpacket|g' \ + "${D}etc/snort/snort.conf.distrib" || die + + # Set the location of the DAQ modules + sed -i -e 's|^# config daq_dir: <dir>|config daq_dir: /usr/'$(get_libdir)'/daq|g' \ + "${D}etc/snort/snort.conf.distrib" || die + + # Set the DAQ mode to passive + sed -i -e 's|^# config daq_mode: <mode>|config daq_mode: passive|g' \ + "${D}etc/snort/snort.conf.distrib" || die + + # Set snort to run as snort:snort + sed -i -e 's|^# config set_gid:|config set_gid: snort|g' \ + "${D}etc/snort/snort.conf.distrib" || die + sed -i -e 's|^# config set_uid:|config set_uid: snort|g' \ + "${D}etc/snort/snort.conf.distrib" || die + + # Set the default log dir + sed -i -e 's|^# config logdir:|config logdir: /var/log/snort/|g' \ + "${D}etc/snort/snort.conf.distrib" || die + + # Set the correct so_rule location in the config + sed -i -e 's|SO_RULE_PATH ../so_rules|SO_RULE_PATH /etc/snort/so_rules|g' \ + "${D}etc/snort/snort.conf.distrib" || die +} + +pkg_postinst() { + + einfo "There have been a number of improvements and new features" + einfo "added to ${P}. Please review the RELEASE.NOTES and" + einfo "ChangLog located in /usr/share/doc/${PF}." + einfo + elog "The Sourcefire Vulnerability Research Team (VRT) recommends that" + elog "users migrate their snort.conf customizations to the latest config" + elog "file released by the VRT. You can find the latest version of the" + elog "Snort config file in /etc/snort/snort.conf.distrib." + elog + elog "!! It is important that you migrate to this new snort.conf file !!" + elog + elog "This version of the ebuild includes an updated init.d file and" + elog "conf.d file that rely on options found in the latest Snort" + elog "config file provided by the VRT." + + if use debug; then + elog "You have the 'debug' USE flag enabled. If this has been done to" + elog "troubleshoot an issue by producing a core dump or a back trace," + elog "then you need to also ensure the FEATURES variable in make.conf" + elog "contains the 'nostrip' option." + fi +} diff --git a/net-analyzer/snortalog/Manifest b/net-analyzer/snortalog/Manifest new file mode 100644 index 000000000000..2229e562f202 --- /dev/null +++ b/net-analyzer/snortalog/Manifest @@ -0,0 +1 @@ +DIST snortalog_v2.4.3.tar 1324032 BLAKE2B dae81fe861c7d85ce5fce63ffe773cccb8b643654a861e1b9cc91db22e5683c4a5d2c83ee6a1895386777c600b004978f91e3ed8a333397139bfe6f9644a79ce SHA512 b4b8558865ae4d1ef932114f2a2fb5af7fb069f1b587955d9d489a31635e890fb0ed36ebcde19322ab0c0cae49734da08602e283bd731c769de527abf7d74d06 diff --git a/net-analyzer/snortalog/metadata.xml b/net-analyzer/snortalog/metadata.xml new file mode 100644 index 000000000000..bd13a914477c --- /dev/null +++ b/net-analyzer/snortalog/metadata.xml @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<maintainer type="project"> + <email>netmon@gentoo.org</email> + <name>Gentoo network monitoring and analysis project</name> +</maintainer> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/snortalog/snortalog-2.4.3-r1.ebuild b/net-analyzer/snortalog/snortalog-2.4.3-r1.ebuild new file mode 100644 index 000000000000..18e2cd14b905 --- /dev/null +++ b/net-analyzer/snortalog/snortalog-2.4.3-r1.ebuild @@ -0,0 +1,57 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 +inherit eutils + +MY_P="${PN}_v${PV}" + +DESCRIPTION="a powerful perl script that summarizes snort logs" +HOMEPAGE="http://jeremy.chartier.free.fr/snortalog/" +SRC_URI="http://jeremy.chartier.free.fr/snortalog/downloads/${PN}/${MY_P}.tar" +LICENSE="GPL-2" +SLOT="0" + +KEYWORDS="~amd64 ~arm ~ppc ~sparc ~x86" +IUSE="tk" + +RDEPEND=" + dev-lang/perl[ithreads] + dev-perl/GDGraph + dev-perl/HTML-HTMLDoc + virtual/perl-DB_File + virtual/perl-Getopt-Long + tk? ( dev-perl/Tk ) +" + +S=${WORKDIR} + +src_prepare() { + edos2unix $(find conf/ modules/ -type f) ${PN}.* CHANGES + + # fix paths, erroneous can access message + sed -i \ + -e "s:\(modules/\):/usr/lib/snortalog/${PV}/\1:g" \ + -e 's:\($domains_file = "\)conf/\(domains\)\(".*\):\1/etc/snortalog/\2\3:' \ + -e 's:\($rules_file = "\)conf/\(rules\)\(".*\):\1/etc/snortalog/\2\3:' \ + -e 's:\($picts_dir ="\)picts\(".*\):\1/etc/snortalog/picts\2:' \ + -e 's:\($hw_file = "\)conf/\(hw\)\(".*\):\1/etc/snortalog/\2\3:' \ + -e 's:\($lang_file ="\)conf/\(lang\)\(".*\):\1/etc/snortalog/\2\3:' \ + -e 's:Can access:Cannot access:' \ + snortalog.pl || die +} + +src_install() { + dobin snortalog.pl + + insinto /etc/snortalog + doins conf/{domains,hw,lang,rules} + + insinto /etc/snortalog/picts + doins picts/* + + insinto /usr/lib/snortalog/${PV}/modules + doins -r modules/* + + dodoc CHANGES doc/snortalog_v2.2.1.pdf +} diff --git a/net-analyzer/snortsam/Manifest b/net-analyzer/snortsam/Manifest new file mode 100644 index 000000000000..e341252bae98 --- /dev/null +++ b/net-analyzer/snortsam/Manifest @@ -0,0 +1 @@ +DIST snortsam-src-2.70.tar.gz 1971624 BLAKE2B 10f26afb8addffb52db099e0c376a9adb884b625503233b72203070cadc79a688c7a6950014759d6fb58c8844899482057d9701e9eaa5e9d12066f10e88d6421 SHA512 e0b6d53dfc0963e5a0012e25c1cd15f76263cc0d0158f6a50eab3876f1ae40c47eeafb7309113d27f1ca92d5491a19e32748c3bf51754be9320346ebbf26e5b1 diff --git a/net-analyzer/snortsam/files/snortsam-2.70-gentoo.patch b/net-analyzer/snortsam/files/snortsam-2.70-gentoo.patch new file mode 100644 index 000000000000..f2d8fd330d33 --- /dev/null +++ b/net-analyzer/snortsam/files/snortsam-2.70-gentoo.patch @@ -0,0 +1,140 @@ + makesnortsam.sh | 66 +++++++++++++++++++++------------------------------------ + 1 file changed, 24 insertions(+), 42 deletions(-) + +diff --git a/makesnortsam.sh b/makesnortsam.sh +index 64c6eb6..37f66c9 100644 +--- a/makesnortsam.sh ++++ b/makesnortsam.sh +@@ -36,8 +36,7 @@ SSP_OBSD_SRC="ssp_pf.c ssp_pf2.c" + SSP_BSD_SRC="ssp_ipf.c ssp_ipfw2.c ssp_pf2.c" + SSP_SUNOS_SRC="ssp_ipf.c" + +-CFLAGS="-O2 -D${systype}" +-LDFLAGS= ++CFLAGS=" ${CFLAGS} -D${systype}" + + # OS specific flags + LINUX_CFLAGS= +@@ -72,23 +71,23 @@ case "$1" in + + case "${systype}" in + Linux*) +- gcc ${CFLAGS} ${LINUX_CFLAGS} ${OPSEC_CFLAGS} ${LDFLAGS} ${LINUX_LDFLAGS} ${OPSEC_LDFLAGS} ${OPSEC_LIBS} \ +- ${SSP_GENERIC_SRC} ${SSP_LINUX_SRC} -o ${SNORTSAM} ++ ${CC} ${CFLAGS} ${LINUX_CFLAGS} ${OPSEC_CFLAGS} ${LDFLAGS} \ ++ ${SSP_GENERIC_SRC} ${SSP_LINUX_SRC} -o ${SNORTSAM} ${LINUX_LDFLAGS} ${OPSEC_LDFLAGS} ${OPSEC_LIBS} + ;; + + OpenBSD*) +- #gcc ${CFLAGS} ${OBSD_CFLAGS} ${OPSEC_CFLAGS} ${LDFLAGS} ${OBSD_LDFLAGS} ${OPSEC_LIBS} /usr/lib/libnsl.a -o ${SNORTSAM} +- gcc ${CFLAGS} ${OBSD_CFLAGS} ${OPSEC_CFLAGS} ${LDFLAGS} ${OBSD_LDFLAGS} ${OPSEC_LDFLAGS} ${OPSEC_LIBS} \ ++ #${CC} ${CFLAGS} ${OBSD_CFLAGS} ${OPSEC_CFLAGS} ${LDFLAGS} ${OBSD_LDFLAGS} ${OPSEC_LIBS} /usr/lib/libnsl.a -o ${SNORTSAM} ++ ${CC} ${CFLAGS} ${OBSD_CFLAGS} ${OPSEC_CFLAGS} ${LDFLAGS} ${OBSD_LDFLAGS} ${OPSEC_LDFLAGS} ${OPSEC_LIBS} \ + ${SSP_GENERIC_SRC} ${SSP_OBSD_SRC} -o ${SNORTSAM} + ;; + + *BSD*) +- gcc ${CFLAGS} ${BSD_CFLAGS} ${OPSEC_CFLAGS} ${LDFLAGS} ${BSD_LDFLAGS} ${OPSEC_LDFLAGS} ${OPSEC_LIBS} \ ++ ${CC} ${CFLAGS} ${BSD_CFLAGS} ${OPSEC_CFLAGS} ${LDFLAGS} ${BSD_LDFLAGS} ${OPSEC_LDFLAGS} ${OPSEC_LIBS} \ + ${SSP_GENERIC_SRC} ${SSP_BSD_SRC} -o ${SNORTSAM} + ;; + + SunOS*) +- gcc ${CFLAGS} ${SUNOS_CFLAGS} ${OPSEC_SUNOS_CFLAGS} ${LDFLAGS} ${SUNOS_LDFLAGS} ${OPSEC_SUNOS_LDFLAGS} \ ++ ${CC} ${CFLAGS} ${SUNOS_CFLAGS} ${OPSEC_SUNOS_CFLAGS} ${LDFLAGS} ${SUNOS_LDFLAGS} ${OPSEC_SUNOS_LDFLAGS} \ + ${SSP_GENERIC_SRC} ${SSP_SUNOS_SRC} -o ${SNORTSAM} + ;; + esac +@@ -104,23 +103,23 @@ case "$1" in + + case "${systype}" in + Linux*) +- gcc ${CFLAGS} ${LINUX_CFLAGS} ${OPSEC_CFLAGS} ${LDFLAGS} ${LINUX_LDFLAGS} ${OPSEC_LDFLAGS} ${OPSEC_LIBS} \ ++ ${CC} ${CFLAGS} ${LINUX_CFLAGS} ${OPSEC_CFLAGS} ${LDFLAGS} ${LINUX_LDFLAGS} ${OPSEC_LDFLAGS} ${OPSEC_LIBS} \ + ${SSP_GENERIC_SRC} ${SSP_LINUX_SRC} -o ${SNORTSAM} + ;; + + OpenBSD*) +- #gcc ${CFLAGS} ${OBSD_CFLAGS} ${OPSEC_CFLAGS} ${LDFLAGS} ${OBSD_LDFLAGS} ${OPSEC_LIBS} /usr/lib/libnsl.a -o ${SNORTSAM} +- gcc ${CFLAGS} ${OBSD_CFLAGS} ${OPSEC_CFLAGS} ${LDFLAGS} ${OBSD_LDFLAGS} ${OPSEC_LDFLAGS} ${OPSEC_LIBS} \ ++ #${CC} ${CFLAGS} ${OBSD_CFLAGS} ${OPSEC_CFLAGS} ${LDFLAGS} ${OBSD_LDFLAGS} ${OPSEC_LIBS} /usr/lib/libnsl.a -o ${SNORTSAM} ++ ${CC} ${CFLAGS} ${OBSD_CFLAGS} ${OPSEC_CFLAGS} ${LDFLAGS} ${OBSD_LDFLAGS} ${OPSEC_LDFLAGS} ${OPSEC_LIBS} \ + ${SSP_GENERIC_SRC} ${SSP_OBSD_SRC} -o ${SNORTSAM} + ;; + + *BSD*) +- gcc ${CFLAGS} ${BSD_CFLAGS} ${OPSEC_CFLAGS} ${LDFLAGS} ${BSD_LDFLAGS} ${OPSEC_LDFLAGS} ${OPSEC_LIBS} \ ++ ${CC} ${CFLAGS} ${BSD_CFLAGS} ${OPSEC_CFLAGS} ${LDFLAGS} ${BSD_LDFLAGS} ${OPSEC_LDFLAGS} ${OPSEC_LIBS} \ + ${SSP_GENERIC_SRC} ${SSP_BSD_SRC} -o ${SNORTSAM} + ;; + + SunOS*) +- gcc ${CFLAGS} ${SUNOS_CFLAGS} ${OPSEC_SUNOS_CFLAGS} ${LDFLAGS} ${SUNOS_LDFLAGS} ${OPSEC_SUNOS_LDFLAGS} \ ++ ${CC} ${CFLAGS} ${SUNOS_CFLAGS} ${OPSEC_SUNOS_CFLAGS} ${LDFLAGS} ${SUNOS_LDFLAGS} ${OPSEC_SUNOS_LDFLAGS} \ + ${SSP_GENERIC_SRC} ${SSP_SUNOS_SRC} -o ${SNORTSAM} + ;; + esac +@@ -152,10 +151,10 @@ case "$1" in + rm -f ${SAMTOOL}-debug + + case "${systype}" in +- Linux*) gcc ${CFLAGS} ${LINUX_CFLAGS} ${LDFLAGS} ${LINUX_LDFLAGS} ${SAMTOOL_SRC} -o ${SAMTOOL} ;; +- OpenBSD*) gcc ${CFLAGS} ${OBSD_CFLAGS} ${LDFLAGS} ${OBSD_LDFLAGS} ${SAMTOOL_SRC} -o ${SAMTOOL} ;; +- *BSD*) gcc ${CFLAGS} ${BSD_CFLAGS} ${LDFLAGS} ${BSD_LDFLAGS} ${SAMTOOL_SRC} -o ${SAMTOOL} ;; +- SunOS) gcc ${CFLAGS} ${SUNOS_CFLAGS} ${LDFLAGS} ${SUNOS_LDFLAGS} ${SAMTOOL_SRC} -o ${SAMTOOL} ;; ++ Linux*) echo ${CC} ${CFLAGS} ${LINUX_CFLAGS} ${LDFLAGS} ${LINUX_LDFLAGS} ${SAMTOOL_SRC} -o ${SAMTOOL} ; ${CC} ${CFLAGS} ${LINUX_CFLAGS} ${LINUX_LDFLAGS} ${SAMTOOL_SRC} -o ${SAMTOOL} ; [ $? = 0 ] || exit 1;; ++ OpenBSD*) echo ${CC} ${CFLAGS} ${OBSD_CFLAGS} ${LDFLAGS} ${OBSD_LDFLAGS} ${SAMTOOL_SRC} -o ${SAMTOOL} ; ${CC} ${CFLAGS} ${OBSD_CFLAGS} ${OBSD_LDFLAGS} ${SAMTOOL_SRC} -o ${SAMTOOL} ; [ $? = 0 ] || exit 1;; ++ *BSD*) echo ${CC} ${CFLAGS} ${BSD_CFLAGS} ${LDFLAGS} ${BSD_LDFLAGS} ${SAMTOOL_SRC} -o ${SAMTOOL} ; ${CC} ${CFLAGS} ${BSD_CFLAGS} ${BSD_LDFLAGS} ${SAMTOOL_SRC} -o ${SAMTOOL} ; [ $? = 0 ] || exit 1;; ++ SunOS) echo ${CC} ${CFLAGS} ${SUNOS_CFLAGS} ${LDFLAGS} ${SUNOS_LDFLAGS} ${SAMTOOL_SRC} -o ${SAMTOOL} ; ${CC} ${CFLAGS} ${SUNOS_CFLAGS} $${SUNOS_LDFLAGS} ${SAMTOOL_SRC} -o ${SAMTOOL} ; [ $? = 0 ] || exit 1;; + esac + + echo "-------------------------------------------------------------------------------" +@@ -167,10 +166,10 @@ case "$1" in + SAMTOOL="${SAMTOOL}-debug" + + case "${systype}" in +- Linux*) gcc ${CFLAGS} ${LINUX_CFLAGS} ${LDFLAGS} ${LINUX_LDFLAGS} ${SAMTOOL_SRC} -o ${SAMTOOL} ;; +- OpenBSD*) gcc ${CFLAGS} ${OBSD_CFLAGS} ${LDFLAGS} ${OBSD_LDFLAGS} ${SAMTOOL_SRC} -o ${SAMTOOL} ;; +- *BSD*) gcc ${CFLAGS} ${BSD_CFLAGS} ${LDFLAGS} ${BSD_LDFLAGS} ${SAMTOOL_SRC} -o ${SAMTOOL} ;; +- SunOS) gcc ${CFLAGS} ${SUNOS_CFLAGS} ${LDFLAGS} ${SUNOS_LDFLAGS} ${SAMTOOL_SRC} -o ${SAMTOOL} ;; ++ Linux*) echo ${CC} ${CFLAGS} ${LINUX_CFLAGS} ${LDFLAGS} ${SAMTOOL_SRC} -o ${SAMTOOL} ${LINUX_LDFLAGS}; ${CC} ${CFLAGS} ${LINUX_CFLAGS} ${LINUX_LDFLAGS} ${SAMTOOL_SRC} -o ${SAMTOOL} ${LINUX_LDFLAGS}; [ $? = 0 ] || exit 1;; ++ OpenBSD*) echo ${CC} ${CFLAGS} ${OBSD_CFLAGS} ${LDFLAGS} ${OBSD_LDFLAGS} ${SAMTOOL_SRC} -o ${SAMTOOL} ; ${CC} ${CFLAGS} ${OBSD_CFLAGS} ${OBSD_LDFLAGS} ${SAMTOOL_SRC} -o ${SAMTOOL} ; [ $? = 0 ] || exit 1;; ++ *BSD*) echo ${CC} ${CFLAGS} ${BSD_CFLAGS} ${LDFLAGS} ${BSD_LDFLAGS} ${SAMTOOL_SRC} -o ${SAMTOOL} ; ${CC} ${CFLAGS} ${BSD_CFLAGS} ${BSD_LDFLAGS} ${SAMTOOL_SRC} -o ${SAMTOOL} ; [ $? = 0 ] || exit 1;; ++ SunOS) echo ${CC} ${CFLAGS} ${SUNOS_CFLAGS} ${LDFLAGS} ${SUNOS_LDFLAGS} ${SAMTOOL_SRC} -o ${SAMTOOL} ; ${CC} ${CFLAGS} ${SUNOS_CFLAGS} ${SUNOS_LDFLAGS} ${SAMTOOL_SRC} -o ${SAMTOOL} ; [ $? = 0 ] || exit 1;; + esac + cd .. + ;; +@@ -186,29 +185,12 @@ case "$1" in + rm -f ${SNORTSAM}-debug + + case "${systype}" in +- Linux*) gcc ${CFLAGS} ${LINUX_CFLAGS} ${LDFLAGS} ${LINUX_LDFLAGS} ${SSP_GENERIC_SRC} ${SSP_LINUX_SRC} -o ${SNORTSAM} ;; +- OpenBSD*) gcc ${CFLAGS} ${OBSD_CFLAGS} ${LDFLAGS} ${OBSD_LDFLAGS} ${SSP_GENERIC_SRC} ${SSP_OBSD_SRC} -o ${SNORTSAM} ;; +- *BSD*) gcc ${CFLAGS} ${BSD_CFLAGS} ${LDFLAGS} ${BSD_LDFLAGS} ${SSP_GENERIC_SRC} ${SSP_BSD_SRC} -o ${SNORTSAM} ;; +- SunOS*) gcc ${CFLAGS} ${SUNOS_CFLAGS} ${LDFLAGS} ${SUNOS_LDFLAGS} ${SSP_GENERIC_SRC} ${SSP_SUNOS_SRC} -o ${SNORTSAM} ;; ++ Linux*) echo ${CC} ${CFLAGS} ${LINUX_CFLAGS} ${LDFLAGS} ${SSP_GENERIC_SRC} ${SSP_LINUX_SRC} ${LDFLAGS} -o ${SNORTSAM} ${LINUX_LDFLAGS}; ${CC} ${CFLAGS} ${LINUX_CFLAGS} ${LDFLAGS} ${SSP_GENERIC_SRC} ${SSP_LINUX_SRC} -o ${SNORTSAM} ${LINUX_LDFLAGS}; [ $? = 0 ] || exit 1;; ++ OpenBSD*) echo ${CC} ${CFLAGS} ${OBSD_CFLAGS} ${LDFLAGS} ${OBSD_LDFLAGS} ${SSP_GENERIC_SRC} ${SSP_OBSD_SRC} ${LDFLAGS} -o ${SNORTSAM} ; ${CC} ${CFLAGS} ${LDFLAGS} ${OBSD_CFLAGS} ${OBSD_LDFLAGS} ${SSP_GENERIC_SRC} ${SSP_OBSD_SRC} -o ${SNORTSAM} ; [ $? = 0 ] || exit 1;; ++ *BSD*) echo ${CC} ${CFLAGS} ${BSD_CFLAGS} ${LDFLAGS} ${BSD_LDFLAGS} ${SSP_GENERIC_SRC} ${SSP_BSD_SRC} -o ${SNORTSAM} ; ${CC} ${CFLAGS} ${LDFLAGS} ${BSD_CFLAGS} ${BSD_LDFLAGS} ${SSP_GENERIC_SRC} ${SSP_BSD_SRC} -o ${SNORTSAM} ; [ $? = 0 ] || exit 1;; ++ SunOS*) echo ${CC} ${CFLAGS} ${SUNOS_CFLAGS} ${LDFLAGS} ${SUNOS_LDFLAGS} ${SSP_GENERIC_SRC} ${SSP_SUNOS_SRC}-o ${SNORTSAM} ; ${CC} ${CFLAGS} ${LDFLAGS} ${SUNOS_CFLAGS} ${SUNOS_LDFLAGS} ${SSP_GENERIC_SRC} ${SSP_SUNOS_SRC} -o ${SNORTSAM} ; [ $? = 0 ] || exit 1;; + esac + +- +- echo "-------------------------------------------------------------------------------" +- echo "Building SnortSam (debug)" +- echo "-------------------------------------------------------------------------------" +- +- rm -f *.o +- CFLAGS="${CFLAGS} -DFWSAMDEBUG" +- SNORTSAM="${SNORTSAM}-debug" +- +- case "${systype}" in +- Linux*) gcc ${CFLAGS} ${LINUX_CFLAGS} ${LDFLAGS} ${LINUX_LDFLAGS} ${SSP_GENERIC_SRC} ${SSP_LINUX_SRC} -o ${SNORTSAM} ;; +- OpenBSD*) gcc ${CFLAGS} ${OBSD_CFLAGS} ${LDFLAGS} ${OBSD_LDFLAGS} ${SSP_GENERIC_SRC} ${SSP_OBSD_SRC} -o ${SNORTSAM} ;; +- *BSD*) gcc ${CFLAGS} ${BSD_CFLAGS} ${LDFLAGS} ${BSD_LDFLAGS} ${SSP_GENERIC_SRC} ${SSP_BSD_SRC} -o ${SNORTSAM} ;; +- SunOS*) gcc ${CFLAGS} ${SUNOS_CFLAGS} ${LDFLAGS} ${SUNOS_LDFLAGS} ${SSP_GENERIC_SRC} ${SSP_SUNOS_SRC} -o ${SNORTSAM} ;; +- +- esac +- cd .. + ;; + esac + diff --git a/net-analyzer/snortsam/metadata.xml b/net-analyzer/snortsam/metadata.xml new file mode 100644 index 000000000000..71bc908f2b2a --- /dev/null +++ b/net-analyzer/snortsam/metadata.xml @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>netmon@gentoo.org</email> + <name>Gentoo network monitoring and analysis project</name> + </maintainer> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/snortsam/snortsam-2.70.ebuild b/net-analyzer/snortsam/snortsam-2.70.ebuild new file mode 100644 index 000000000000..800c7f6f08ec --- /dev/null +++ b/net-analyzer/snortsam/snortsam-2.70.ebuild @@ -0,0 +1,45 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +inherit eutils flag-o-matic toolchain-funcs vcs-clean + +DESCRIPTION="Snort plugin that allows automated blocking of IP addresses on several firewalls" +HOMEPAGE="http://www.snortsam.net/" +SRC_URI="http://www.snortsam.net/files/snortsam/${PN}-src-${PV}.tar.gz" + +LICENSE="BSD-2" +SLOT="0" +KEYWORDS="~alpha amd64 ppc ppc64 sparc x86" +IUSE="debug" + +S=${WORKDIR}/${PN} + +src_prepare() { + epatch "${FILESDIR}"/${P}-gentoo.patch + ecvs_clean +} + +src_configure() { + use debug && append-cflags -DFWSAMDEBUG + tc-export CC +} + +src_compile() { + sh makesnortsam.sh || die +} + +src_install() { + dobin snortsam + find "${S}" -depth -type f -name "*.asc" -exec rm -f {} \; + dodoc docs/* conf/* +} + +pkg_postinst() { + echo + elog "To use snortsam with snort, you'll have to compile snort with USE=snortsam." + elog "Read the INSTALL file to configure snort for snortsam, and configure" + elog "snortsam for your particular firewall." + echo +} diff --git a/net-analyzer/softflowd/Manifest b/net-analyzer/softflowd/Manifest new file mode 100644 index 000000000000..2b86455b2393 --- /dev/null +++ b/net-analyzer/softflowd/Manifest @@ -0,0 +1 @@ +DIST softflowd-0.9.9.tar.gz 91939 BLAKE2B 97ef29e5f450f6896d9448359080a64dbe66d4edf031ff7e2b0e8500e9b781b983de6448b8a1d846d4c8c939269004998a090b0b7e7a9367c9c961e0118b8d59 SHA512 4d579c2a087c0f3cd4d2020bcfbddf9dab73254e40678b3509c93bec212bf8b5692f76bfb4e766577e431ff508f0bce0a2cf326184f192e3c5dc8ddf38514dbd diff --git a/net-analyzer/softflowd/files/softflowd-0.9.9-_GNU_SOURCE.patch b/net-analyzer/softflowd/files/softflowd-0.9.9-_GNU_SOURCE.patch new file mode 100644 index 000000000000..cb4844803e00 --- /dev/null +++ b/net-analyzer/softflowd/files/softflowd-0.9.9-_GNU_SOURCE.patch @@ -0,0 +1,13 @@ +setresuid and setresgid need _GNU_SOURCE which clashes with _BSD_SOURCE + +--- a/configure.ac ++++ b/configure.ac +@@ -87,7 +87,7 @@ + AC_SEARCH_LIBS(socket, socket) + AC_CHECK_LIB(pcap, pcap_open_live) + +-AC_CHECK_FUNCS(closefrom daemon setresuid setreuid setresgid setgid strlcpy strlcat) ++AC_CHECK_FUNCS(closefrom daemon setreuid setgid strlcpy strlcat) + + AC_CHECK_TYPES([u_int64_t, int64_t, uint64_t, u_int32_t, int32_t, uint32_t]) + AC_CHECK_TYPES([u_int16_t, int16_t, uint16_t, u_int8_t, int8_t, uint8_t]) diff --git a/net-analyzer/softflowd/files/softflowd-0.9.9-no-strip.patch b/net-analyzer/softflowd/files/softflowd-0.9.9-no-strip.patch new file mode 100644 index 000000000000..c48603a7f491 --- /dev/null +++ b/net-analyzer/softflowd/files/softflowd-0.9.9-no-strip.patch @@ -0,0 +1,12 @@ +--- a/Makefile.in ++++ b/Makefile.in +@@ -52,7 +52,7 @@ + $(srcdir)/mkinstalldirs $(DESTDIR)$(sbindir) + [ -d $(DESTDIR)$(mandir)/man8 ] || \ + $(srcdir)/mkinstalldirs $(DESTDIR)$(mandir)/man8 +- $(INSTALL) -m 0755 -s softflowd $(DESTDIR)$(sbindir)/softflowd +- $(INSTALL) -m 0755 -s softflowctl $(DESTDIR)$(sbindir)/softflowctl ++ $(INSTALL) -m 0755 softflowd $(DESTDIR)$(sbindir)/softflowd ++ $(INSTALL) -m 0755 softflowctl $(DESTDIR)$(sbindir)/softflowctl + $(INSTALL) -m 0644 softflowd.8 $(DESTDIR)$(mandir)/man8/softflowd.8 + $(INSTALL) -m 0644 softflowctl.8 $(DESTDIR)$(mandir)/man8/softflowctl.8 diff --git a/net-analyzer/softflowd/files/softflowd.confd b/net-analyzer/softflowd/files/softflowd.confd new file mode 100644 index 000000000000..dc1a36c874cd --- /dev/null +++ b/net-analyzer/softflowd/files/softflowd.confd @@ -0,0 +1,9 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# Copy conf file to softflowd.interface + +# SOFTFLOWD_COLLECTOR=host:port +# SOFTFLOWD_TIMEOUTS="maxlife=600" +# SOFTFLOWD_MAXFLOWS=17000 +# SOFTFLOWD_EXTRA= +# SOFTFLOWD_INTERFACE_IDX= diff --git a/net-analyzer/softflowd/files/softflowd.initd b/net-analyzer/softflowd/files/softflowd.initd new file mode 100644 index 000000000000..c0c2a831c629 --- /dev/null +++ b/net-analyzer/softflowd/files/softflowd.initd @@ -0,0 +1,53 @@ +#!/sbin/openrc-run +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +depend() { + need net +} + +softflowd_checkconfig() { + SOFTFLOWD_INTERFACE=${SVCNAME#*.} + if [ ${SOFTFLOWD_INTERFACE} = ${SVCNAME} ]; then + eerror "You have to create an init script for each interface:" + eerror "ln -s softflowd /etc/init.d/softflowd.eth0" + return 1 + fi + + if [ -z "${SOFTFLOWD_COLLECTOR}" ]; then + eerror "Specify the host and port that the accounting datagrams are to be" + eerror "sent to in /etc/conf.d/${SVCNAME}." + eerror "Example: SOFTFLOWD_COLLECTOR=collector.example.com:9995" + return 1 + fi + SOFTFLOWD_PIDFILE="/var/run/softflowd.${SOFTFLOWD_INTERFACE}.pid" + SOFTFLOWD_CTLFILE="/var/run/softflowd.${SOFTFLOWD_INTERFACE}.ctl" +} + + +start() { + softflowd_checkconfig || return 1 + + ebegin "Starting softflowd on interface ${SOFTFLOWD_INTERFACE}" + iface_arg=${SOFTFLOWD_INTERFACE} + [ -n "${SOFTFLOWD_INTERFACE_IDX}" ] && iface_arg="${SOFTFLOWD_INTERFACE_IDX}:${iface_arg}" + start-stop-daemon --start \ + --exec /usr/sbin/softflowd \ + -- -i "${iface_arg}" \ + -n "${SOFTFLOWD_COLLECTOR}" \ + -p "${SOFTFLOWD_PIDFILE}" \ + -c "${SOFTFLOWD_CTLFILE}" \ + -t "${SOFTFLOWD_TIMEOUTS-maxlife=600}" \ + -m "${SOFTFLOWD_MAXFLOWS-17000}" \ + ${SOFTFLOWD_EXTRA} + eend $? +} + +stop() { + softflowd_checkconfig || return 1 + + ebegin "Stopping softflowd on interface ${SOFTFLOWD_INTERFACE}" + # use softflowd's own way to shut it down + /usr/sbin/softflowctl -c ${SOFTFLOWD_CTLFILE} shutdown + eend $? +} diff --git a/net-analyzer/softflowd/metadata.xml b/net-analyzer/softflowd/metadata.xml new file mode 100644 index 000000000000..1fb8187ec9c8 --- /dev/null +++ b/net-analyzer/softflowd/metadata.xml @@ -0,0 +1,12 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<maintainer type="project"> +<email>netmon@gentoo.org</email> +<name>Gentoo network monitoring and analysis project</name> +</maintainer> +<upstream> +<remote-id type="google-code">softflowd</remote-id> +</upstream> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/softflowd/softflowd-0.9.9-r1.ebuild b/net-analyzer/softflowd/softflowd-0.9.9-r1.ebuild new file mode 100644 index 000000000000..cb7d09e3425e --- /dev/null +++ b/net-analyzer/softflowd/softflowd-0.9.9-r1.ebuild @@ -0,0 +1,32 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 +inherit autotools eutils + +DESCRIPTION="flow-based network traffic analyser capable of Cisco NetFlow data export" +HOMEPAGE="http://www.mindrot.org/projects/softflowd/" +SRC_URI="https://softflowd.googlecode.com/files/${P}.tar.gz" + +LICENSE="BSD GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" + +DEPEND="net-libs/libpcap" +RDEPEND="${DEPEND}" + +src_prepare() { + epatch "${FILESDIR}"/${P}-no-strip.patch + epatch "${FILESDIR}"/${P}-_GNU_SOURCE.patch + eautoreconf +} + +src_install() { + default + + docinto examples + dodoc collector.pl + + newinitd "${FILESDIR}"/${PN}.initd ${PN} + newconfd "${FILESDIR}"/${PN}.confd ${PN} +} diff --git a/net-analyzer/speedtest-cli/Manifest b/net-analyzer/speedtest-cli/Manifest new file mode 100644 index 000000000000..2b0f8f42b33c --- /dev/null +++ b/net-analyzer/speedtest-cli/Manifest @@ -0,0 +1 @@ +DIST speedtest-cli-2.1.1.tar.gz 24380 BLAKE2B ea6f5fc3127246ad4cf90dee4b53529fa9f3b9b9558c9ebb92661380663a5e5950490e91cda97f9207b26c23464026b91c8faa50ef5a515b817b0f84fcb2e13b SHA512 afc1fc0264d5124efe5afc9b0583b2b37ae50eac229e6971656a906b9a7a78d44158485d5c2e44c3430694fd7355926f578a54a196cc9b9baf6cfbc357a789d1 diff --git a/net-analyzer/speedtest-cli/speedtest-cli-2.1.1.ebuild b/net-analyzer/speedtest-cli/speedtest-cli-2.1.1.ebuild new file mode 100644 index 000000000000..3e6301cf17bf --- /dev/null +++ b/net-analyzer/speedtest-cli/speedtest-cli-2.1.1.ebuild @@ -0,0 +1,27 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +PYTHON_COMPAT=( python{2_7,3_5,3_6,3_7} ) + +inherit distutils-r1 + +DESCRIPTION="Command line interface for testing internet bandwidth using speedtest.net" +HOMEPAGE="https://github.com/sivel/speedtest-cli" +SRC_URI="https://github.com/sivel/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="Apache-2.0" +SLOT="0" +KEYWORDS="amd64 ~arm ~arm64 ~ppc ~ppc64 x86" +IUSE="" + +DEPEND="dev-python/setuptools[${PYTHON_USEDEP}]" +RDEPEND="${DEPEND}" + +DOCS=( CONTRIBUTING.md README.rst ) + +python_install_all() { + doman ${PN}.1 + distutils-r1_python_install_all +} diff --git a/net-analyzer/sqlninja/Manifest b/net-analyzer/sqlninja/Manifest new file mode 100644 index 000000000000..a5105289778d --- /dev/null +++ b/net-analyzer/sqlninja/Manifest @@ -0,0 +1 @@ +DIST sqlninja-0.2.6-r1.tgz 454841 BLAKE2B c8fc4932c4bffe03e873126801c75dbf9961b97979ff1fd1530aca5f0d132513f62de2516e1649f57955c0ef5ca723b52cd4f9c6e89b27df63b978b0aaf42745 SHA512 18f6c8f0f1eca59d9ce6df80267f1f6bf45d151dfcd395b32d349119e1480389ba28f057778349b4276d480f60c41ca03578a1ca9c4e246f3fcb63653bc6ccf9 diff --git a/net-analyzer/sqlninja/files/sqlninja b/net-analyzer/sqlninja/files/sqlninja new file mode 100644 index 000000000000..bb0f9e18b747 --- /dev/null +++ b/net-analyzer/sqlninja/files/sqlninja @@ -0,0 +1,4 @@ +#!/bin/sh + +cd /usr/lib/sqlninja/ +./sqlninja $@ diff --git a/net-analyzer/sqlninja/metadata.xml b/net-analyzer/sqlninja/metadata.xml new file mode 100644 index 000000000000..d0f1251b2b7a --- /dev/null +++ b/net-analyzer/sqlninja/metadata.xml @@ -0,0 +1,12 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>netmon@gentoo.org</email> + <name>Gentoo network monitoring and analysis project</name> + </maintainer> + <upstream> + <remote-id type="sourceforge">sqlninja</remote-id> + </upstream> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/sqlninja/sqlninja-0.2.6_p1-r1.ebuild b/net-analyzer/sqlninja/sqlninja-0.2.6_p1-r1.ebuild new file mode 100644 index 000000000000..a4283bd9f1ac --- /dev/null +++ b/net-analyzer/sqlninja/sqlninja-0.2.6_p1-r1.ebuild @@ -0,0 +1,55 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 +inherit versionator + +MY_PV="$(replace_version_separator 3 '-')" +MY_PV="${MY_PV/p/r}" +MY_P="${PN}-${MY_PV}" + +DESCRIPTION="A SQL Server injection & takeover tool" +HOMEPAGE="http://sqlninja.sourceforge.net/" +SRC_URI="mirror://sourceforge/${PN}/${MY_P}.tgz" +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="doc" + +RESTRICT="mirror" + +RDEPEND=" + dev-lang/perl + dev-perl/IO-Socket-SSL + dev-perl/List-MoreUtils + dev-perl/Net-DNS + dev-perl/Net-Pcap + dev-perl/Net-RawIP + dev-perl/NetPacket +" + +S="${WORKDIR}/${MY_P}" + +src_install() { + dodoc sqlninja-howto.html ChangeLog README + + if use doc; then + dodoc -r sources + docompress -x /usr/share/doc/"${P}"/sources + fi + + insinto /etc/"${PN}" + doins sqlninja.conf.example + + rm -r sources sqlninja-howto.html ChangeLog README LICENSE || die + rm -r apps || die + rm sqlninja.conf.example || die + + dodir /usr/lib/"${PN}" + insinto /usr/lib/"${PN}" + exeinto /usr/lib/"${PN}" + doins -r * + + doexe sqlninja + dosbin "${FILESDIR}"/"${PN}" +} diff --git a/net-analyzer/squid-graph/Manifest b/net-analyzer/squid-graph/Manifest new file mode 100644 index 000000000000..bdc0dc6484a3 --- /dev/null +++ b/net-analyzer/squid-graph/Manifest @@ -0,0 +1 @@ +DIST squid-graph-3.2.tar.gz 20066 BLAKE2B 16c4b9621ad45eefe7be8c83d7339fb832516241e8eb17c7f0906b6dc7cddf06b2ed32d00e84ab390f95f7a57798f7af75a36af940605ce186513c09611c2152 SHA512 ab2529b0b67fb6549dd0837f2208ae712460ad19876baee8000a51c91ab31c464b83b360dfc93690ad6f4b3feb969cc95ca38a179ddefb6e0aa54b0cff866bfd diff --git a/net-analyzer/squid-graph/metadata.xml b/net-analyzer/squid-graph/metadata.xml new file mode 100644 index 000000000000..b6f85c70cc31 --- /dev/null +++ b/net-analyzer/squid-graph/metadata.xml @@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>netmon@gentoo.org</email> + <name>Gentoo network monitoring and analysis project</name> + </maintainer> + <longdescription>Squid logfile analyzer and traffic grapher</longdescription> + <upstream> + <remote-id type="sourceforge">squid-graph</remote-id> + </upstream> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/squid-graph/squid-graph-3.2-r1.ebuild b/net-analyzer/squid-graph/squid-graph-3.2-r1.ebuild new file mode 100644 index 000000000000..4c5d34c145d1 --- /dev/null +++ b/net-analyzer/squid-graph/squid-graph-3.2-r1.ebuild @@ -0,0 +1,22 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 +inherit eutils + +DESCRIPTION="Squid logfile analyzer and traffic grapher" +HOMEPAGE="http://squid-graph.sourceforge.net/" +LICENSE="GPL-2" +SRC_URI="mirror://sourceforge/squid-graph/${P}.tar.gz" + +SLOT="0" +KEYWORDS="~amd64 ~ppc ~x86" + +RDEPEND="dev-perl/GD[png]" + +S=${WORKDIR}/${PN} + +src_install() { + dobin apacheconv generate.cgi squid-graph timeconv + dodoc README +} diff --git a/net-analyzer/squidsites/Manifest b/net-analyzer/squidsites/Manifest new file mode 100644 index 000000000000..38f3f59f65d7 --- /dev/null +++ b/net-analyzer/squidsites/Manifest @@ -0,0 +1 @@ +DIST squidsites-1.01.tar.gz 23646 BLAKE2B 89f236c83cbaffd6671c3d22b51c8325e8224259b2902a6b3d70f5bfd3bd4bd5391434ae4672d7c57165636ba4263da397ed187c3f2bdfe7f3d62512e0e5faff SHA512 ecd6caf4ffbb531de1de85b2d8548e4256603909b1d1bc8c368516b644298803bc0cf3036a370ad679a763b94494bd755043df8a806dcca16990024c515cfed9 diff --git a/net-analyzer/squidsites/files/squidsites-1.01-format-security.patch b/net-analyzer/squidsites/files/squidsites-1.01-format-security.patch new file mode 100644 index 000000000000..3dd72203c309 --- /dev/null +++ b/net-analyzer/squidsites/files/squidsites-1.01-format-security.patch @@ -0,0 +1,11 @@ +--- a/src/squidsites.c ++++ b/src/squidsites.c +@@ -286,7 +286,7 @@ + static
+ void print_help()
+ {
+- fprintf( stderr, help_message );
++ fprintf( stderr, "%s\n", help_message );
+ } /* print_help */
+
+
diff --git a/net-analyzer/squidsites/metadata.xml b/net-analyzer/squidsites/metadata.xml new file mode 100644 index 000000000000..bd13a914477c --- /dev/null +++ b/net-analyzer/squidsites/metadata.xml @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<maintainer type="project"> + <email>netmon@gentoo.org</email> + <name>Gentoo network monitoring and analysis project</name> +</maintainer> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/squidsites/squidsites-1.01-r2.ebuild b/net-analyzer/squidsites/squidsites-1.01-r2.ebuild new file mode 100644 index 000000000000..01f56bf30cc3 --- /dev/null +++ b/net-analyzer/squidsites/squidsites-1.01-r2.ebuild @@ -0,0 +1,33 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +inherit eutils toolchain-funcs + +DESCRIPTION="A tool that parses Squid access log file and generates a report of the most visited sites" +LICENSE="GPL-2" +HOMEPAGE="http://www.stefanopassiglia.com/misc.htm" +SRC_URI="http://www.stefanopassiglia.com/downloads/${P}.tar.gz" +SLOT="1" +KEYWORDS="amd64 ppc x86" + +S="${WORKDIR}/src" + +src_prepare() { + # Respect CFLAGS + sed -i Makefile \ + -e '/^CCFLAGS=/s|-g| $(CFLAGS) $(LDFLAGS)|' \ + || die + epatch "${FILESDIR}"/${P}-format-security.patch +} + +src_compile() { + emake CC="$(tc-getCC)" +} + +src_install() { + cd "${WORKDIR}" || die + dobin src/squidsites + dodoc Authors Bugs ChangeLog GNU-Manifesto.html README +} diff --git a/net-analyzer/squidview/Manifest b/net-analyzer/squidview/Manifest new file mode 100644 index 000000000000..f1e76b0e0fbb --- /dev/null +++ b/net-analyzer/squidview/Manifest @@ -0,0 +1 @@ +DIST squidview-0.86.tar.gz 129911 BLAKE2B 8a514728508c2739aa619d1a481beddd6783e61ccad1252ee6f6a8052fe87bf0edbf23eac19761aac275a370092af45b981ae201a1e4a7b47168941ba642f128 SHA512 c020799e149a4884525b832a21ce990b90da5d3e1caac240913a37b8559bac4e3402b8f5732c3728308ecbea0a56a9e4b764ec7f36b15727c000d6d9e25a57a6 diff --git a/net-analyzer/squidview/files/squidview-0.86-tinfo.patch b/net-analyzer/squidview/files/squidview-0.86-tinfo.patch new file mode 100644 index 000000000000..7dd536c5f81f --- /dev/null +++ b/net-analyzer/squidview/files/squidview-0.86-tinfo.patch @@ -0,0 +1,43 @@ +--- a/configure.in ++++ b/configure.in +@@ -1,23 +1,9 @@ +-AC_DEFUN([CURSES_TEST], +-[ +-if test "x$sv_curses" = xno; then +- sv_test=$1 +- sv_pass="no" +- AC_MSG_CHECKING([name is $sv_test]) +- LIBS="-l$sv_test" +- AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <curses.h>], [initscr();])], +- [sv_pass="yes"]) +- AC_MSG_RESULT([$sv_pass]) +- test "$sv_pass" = yes && sv_curses=$sv_test +- unset LIBS +-fi +-]) +- + AC_INIT(squidview.cpp) + AM_CONFIG_HEADER(config.h) + AM_INIT_AUTOMAKE(squidview,0.86) + AC_PROG_CXX + AC_PROG_INSTALL ++PKG_PROG_PKG_CONFIG + + AC_CHECK_HEADERS(curses.h, signal.h sys/time.h sys/types.h sys/stat.h \ + unistd.h fcntl.h time.h stdlib.h math.h stdio.h,, \ +@@ -28,14 +14,7 @@ + AC_CHECK_HEADER(vector,,AC_MSG_ERROR(C++ STL vector class missing)) + AC_CHECK_HEADER(algorithm,,AC_MSG_ERROR(C++ STL algorithm class missing)) + +-AC_MSG_NOTICE([Checking curses library name]) +-sv_curses=no +-CURSES_TEST(ncurses) +-CURSES_TEST(curses) +-if test "x$sv_curses" = xno; then +- AC_MSG_ERROR([No suitable curses found]) +-fi +-AC_CHECK_LIB($sv_curses, wgetch,,AC_MSG_ERROR([Curses support is not complete?])) ++PKG_CHECK_MODULES([NCURSES],[ncurses],LIBS="$LIBS $NCURSES_LIBS",AC_MSG_ERROR([No suitable curses found])) + + AC_MSG_CHECKING([large file support]) + sv_large="no" diff --git a/net-analyzer/squidview/metadata.xml b/net-analyzer/squidview/metadata.xml new file mode 100644 index 000000000000..d85b4252fc33 --- /dev/null +++ b/net-analyzer/squidview/metadata.xml @@ -0,0 +1,6 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<!-- maintainer-needed --> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/squidview/squidview-0.86.ebuild b/net-analyzer/squidview/squidview-0.86.ebuild new file mode 100644 index 000000000000..4ee7ee30ad0e --- /dev/null +++ b/net-analyzer/squidview/squidview-0.86.ebuild @@ -0,0 +1,32 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +inherit autotools + +DESCRIPTION="Interactive console program to analyse squid logs" +HOMEPAGE="http://www.rillion.net/squidview/" +SRC_URI="http://www.rillion.net/squidview/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64" + +RDEPEND=" + sys-libs/ncurses +" +DEPEND=" + ${RDEPEND} + virtual/pkgconfig +" +DOCS=( + AUTHORS BUGS ChangeLog HOWTO README +) +PATCHES=( + "${FILESDIR}"/${PN}-0.86-tinfo.patch +) + +src_prepare() { + default + eautoreconf +} diff --git a/net-analyzer/ssldump/Manifest b/net-analyzer/ssldump/Manifest new file mode 100644 index 000000000000..850d7518accc --- /dev/null +++ b/net-analyzer/ssldump/Manifest @@ -0,0 +1 @@ +DIST ssldump-0.9b3.tar.gz 137435 BLAKE2B e42eeac4daa99a62537ac7ee5152428664fed40256ec10f7c61621f9bbd06476d280af1a6c517eaff253058e3720a282e88604b2f1de0c7ad1b5328597879449 SHA512 ea81558a243950ab43354c9f33c0a4feae0ae859bc2bd6e6b58838a01f4a1e7a6447f2a9ab1fa40bbe8dbd6c3630c489c17fc9c066cacfddfb64269b0cd5090a diff --git a/net-analyzer/ssldump/files/ssldump-0.9-DLT_LINUX_SLL.patch b/net-analyzer/ssldump/files/ssldump-0.9-DLT_LINUX_SLL.patch new file mode 100644 index 000000000000..9a58c6369929 --- /dev/null +++ b/net-analyzer/ssldump/files/ssldump-0.9-DLT_LINUX_SLL.patch @@ -0,0 +1,13 @@ +--- a/base/pcap-snoop.c ++++ b/base/pcap-snoop.c +@@ -157,6 +157,10 @@ + return; + + break; ++ case DLT_LINUX_SLL: ++ data+=16; ++ len-=16; ++ break; + } + network_process_packet(n,&hdr->ts,data,len); + } diff --git a/net-analyzer/ssldump/files/ssldump-0.9-configure-dylib.patch b/net-analyzer/ssldump/files/ssldump-0.9-configure-dylib.patch new file mode 100644 index 000000000000..941350e8c789 --- /dev/null +++ b/net-analyzer/ssldump/files/ssldump-0.9-configure-dylib.patch @@ -0,0 +1,28 @@ +--- a/configure.in ++++ b/configure.in +@@ -102,14 +102,13 @@ + AC_MSG_CHECKING(for PCAP library) + ac_found_pcap_lib_dir="no" + for dir in $ac_pcap_lib_dir; do +- if test -f $dir/libpcap.a; then ++ if test -f $dir/libpcap.so -o -f $dir/libpcap.dylib; then + dnl Ok, we think we've found them, but check that they +- dnl actually ontain the right functions ++ dnl actually contain the right functions + save_LIBS=$LIBS +- save_LDFLAGS=$LDFLAGS + LIBS="-lpcap $LIBS" + if test "$dir" != "/usr/lib"; then +- LDFLAGS="-L$dir $LDFLAGS" ++ LIBS="-L$dir $LIBS" + fi + AC_TRY_LINK_FUNC(pcap_open_live,ac_linked_libpcap="true", + ac_linked_libpcap="false"); +@@ -118,7 +117,6 @@ + break + fi + LIBS=$save_LIBS +- LDFLAGS=$save_LDFLAGS + fi + done + diff --git a/net-analyzer/ssldump/files/ssldump-0.9-declaration.patch b/net-analyzer/ssldump/files/ssldump-0.9-declaration.patch new file mode 100644 index 000000000000..836b52c84ab2 --- /dev/null +++ b/net-analyzer/ssldump/files/ssldump-0.9-declaration.patch @@ -0,0 +1,11 @@ +--- a/ssl/ssl_rec.h ++++ b/ssl/ssl_rec.h +@@ -54,6 +54,8 @@ + SSL_CipherSuite *cs,UCHAR *mk,UCHAR *sk,UCHAR *iv)); + int ssl_decode_rec_data PROTO_LIST((ssl_obj *ssl,ssl_rec_decoder *d, + int ct,int version,UCHAR *in,int inl,UCHAR *out,int *outl)); ++int ssl3_check_mac(ssl_rec_decoder *d, int ct, int ver, UCHAR *data, ++ UINT4 datalen, UCHAR *mac); + + #endif + diff --git a/net-analyzer/ssldump/files/ssldump-0.9-includes.patch b/net-analyzer/ssldump/files/ssldump-0.9-includes.patch new file mode 100644 index 000000000000..8ca06dcef449 --- /dev/null +++ b/net-analyzer/ssldump/files/ssldump-0.9-includes.patch @@ -0,0 +1,30 @@ +--- a/common/lib/r_assoc.c ++++ b/common/lib/r_assoc.c +@@ -57,6 +57,7 @@ + static char *RCSSTRING="$Id$"; + + #include <r_common.h> ++#include <string.h> /* memcpy() memcmp() */ + #include "r_assoc.h" + + typedef struct r_assoc_el_ { +--- a/common/lib/r_bitfield.c ++++ b/common/lib/r_bitfield.c +@@ -11,6 +11,7 @@ + static char *RCSSTRING="$Id$"; + + #include <r_common.h> ++#include <string.h> /* memcpy() memset() */ + #include "r_bitfield.h" + + int r_bitfield_create(setp,size) +--- a/common/lib/r_data.c ++++ b/common/lib/r_data.c +@@ -47,6 +47,7 @@ + static char *RCSSTRING="$Id$"; + + #include <r_common.h> ++#include <string.h> /* memcmp() memcpy() memset() */ + #include <r_data.h> + + int r_data_create(dp,d,l) diff --git a/net-analyzer/ssldump/files/ssldump-0.9-libpcap-header.patch b/net-analyzer/ssldump/files/ssldump-0.9-libpcap-header.patch new file mode 100644 index 000000000000..a9a724658ccf --- /dev/null +++ b/net-analyzer/ssldump/files/ssldump-0.9-libpcap-header.patch @@ -0,0 +1,10 @@ +--- a/base/pcap-snoop.c ++++ b/base/pcap-snoop.c +@@ -49,7 +49,6 @@ + + #include <pcap.h> + #include <unistd.h> +-#include <net/bpf.h> + #ifndef _WIN32 + #include <sys/param.h> + #endif diff --git a/net-analyzer/ssldump/files/ssldump-0.9-openssl-0.9.8.compile-fix.patch b/net-analyzer/ssldump/files/ssldump-0.9-openssl-0.9.8.compile-fix.patch new file mode 100644 index 000000000000..2ce16d54f168 --- /dev/null +++ b/net-analyzer/ssldump/files/ssldump-0.9-openssl-0.9.8.compile-fix.patch @@ -0,0 +1,18 @@ +--- a/ssl/ssldecode.c ++++ b/ssl/ssldecode.c +@@ -51,6 +51,7 @@ + #include <openssl/ssl.h> + #include <openssl/hmac.h> + #include <openssl/evp.h> ++#include <openssl/md5.h> + #include <openssl/x509v3.h> + #endif + #include "ssldecode.h" +@@ -131,6 +132,7 @@ + ssl_decode_ctx *d=0; + int r,_status; + ++ SSL_library_init(); + SSLeay_add_all_algorithms(); + if(!(d=(ssl_decode_ctx *)malloc(sizeof(ssl_decode_ctx)))) + ABORT(R_NO_MEMORY); diff --git a/net-analyzer/ssldump/files/ssldump-0.9-prefix-fix.patch b/net-analyzer/ssldump/files/ssldump-0.9-prefix-fix.patch new file mode 100644 index 000000000000..74d7ddcd6f68 --- /dev/null +++ b/net-analyzer/ssldump/files/ssldump-0.9-prefix-fix.patch @@ -0,0 +1,22 @@ +eliminates unused variable ROOT, which disturbs ld from Prefix. Bug #414335 + +--- a/Makefile.in ++++ b/Makefile.in +@@ -46,13 +46,12 @@ BINDIR=@sbindir@ + MANDIR=@mandir@ + RM=rm -f + +-ROOT=./ +-ANALYZE_SRCDIR=$(ROOT)base/ ++ANALYZE_SRCDIR=base/ + COMMONDIR=common/ + COMMON_LIB_SRCDIR=$(COMMONDIR)lib/ +-ANALYZE_NULL_SRCDIR=$(ROOT)null/ +-ANALYZE_SSL_SRCDIR=$(ROOT)ssl/ +-ANALYZE_RECORD_SRCDIR=$(ROOT)@RECORD_MOD@/ ++ANALYZE_NULL_SRCDIR=null/ ++ANALYZE_SSL_SRCDIR=ssl/ ++ANALYZE_RECORD_SRCDIR=@RECORD_MOD@/ + include rules.mk + + include $(COMMON_LIB_SRCDIR)/targets.mk diff --git a/net-analyzer/ssldump/metadata.xml b/net-analyzer/ssldump/metadata.xml new file mode 100644 index 000000000000..e37087b59796 --- /dev/null +++ b/net-analyzer/ssldump/metadata.xml @@ -0,0 +1,12 @@ +<?xml version='1.0' encoding='UTF-8'?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>netmon@gentoo.org</email> + <name>Gentoo network monitoring and analysis project</name> + </maintainer> + <upstream> + <remote-id type="sourceforge">downloads</remote-id> + </upstream> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/ssldump/ssldump-0.9_beta3.ebuild b/net-analyzer/ssldump/ssldump-0.9_beta3.ebuild new file mode 100644 index 000000000000..0f7107da7d0b --- /dev/null +++ b/net-analyzer/ssldump/ssldump-0.9_beta3.ebuild @@ -0,0 +1,66 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +AUTOTOOLS_IN_SOURCE_BUILD=1 +AUTOTOOLS_AUTORECONF=1 +inherit autotools eutils toolchain-funcs + +MY_PV=${PV/_beta/b} +MY_P=${PN}-${MY_PV} + +DESCRIPTION="An SSLv3/TLS network protocol analyzer" +HOMEPAGE="http://ssldump.sourceforge.net/" +SRC_URI=" + http://downloads.sourceforge.net/project/${PN}/${PN}/${MY_PV}/${MY_P}.tar.gz +" + +LICENSE="openssl" +SLOT="0" +KEYWORDS="amd64 ~arm ppc sparc x86 ~amd64-linux ~x86-linux ~ppc-macos" +IUSE="ssl" + +RDEPEND=" + net-libs/libpcap + ssl? ( >=dev-libs/openssl-1:0= ) +" +DEPEND=" + ${RDEPEND} +" + +S=${WORKDIR}/${MY_P} + +PATCHES=( + "${FILESDIR}"/${PN}-0.9-libpcap-header.patch + "${FILESDIR}"/${PN}-0.9-configure-dylib.patch + "${FILESDIR}"/${PN}-0.9-openssl-0.9.8.compile-fix.patch + "${FILESDIR}"/${PN}-0.9-DLT_LINUX_SLL.patch + "${FILESDIR}"/${PN}-0.9-prefix-fix.patch + "${FILESDIR}"/${PN}-0.9-declaration.patch + "${FILESDIR}"/${PN}-0.9-includes.patch +) + +src_prepare() { + default + + eapply_user + + eautoreconf +} + +src_configure() { + tc-export CC + + econf \ + --with-pcap-inc="${EPREFIX}/usr/include" \ + --with-pcap-lib="${EPREFIX}/usr/$(get_libdir)" \ + $(usex ssl --with-openssl-inc="${EPREFIX}/usr/include" '--without-openssl') \ + $(usex ssl --with-openssl-lib="${EPREFIX}/usr/$(get_libdir)" '--without-openssl') +} + +src_install() { + dosbin ssldump + doman ssldump.1 + dodoc ChangeLog CREDITS README +} diff --git a/net-analyzer/sslscan/Manifest b/net-analyzer/sslscan/Manifest new file mode 100644 index 000000000000..8d3a954d335d --- /dev/null +++ b/net-analyzer/sslscan/Manifest @@ -0,0 +1,4 @@ +DIST sslscan-1.11.12-rbsec-openssl.tar.gz 5523256 BLAKE2B d8f5aa8bf748310fe1186ec9ab74ecc33425d6fa3db709d94516780d4efadbdd9cf6358798796704dfeb4032ec615298f3b67c8150e314f1e79a4d826c2589b7 SHA512 9bfdac0b6dcbb9e932ef41db9753f7298cf38ddc18731386968289114fd5ed10d81e95523d557b42b431377638d2f62fb710189e7d944ba89979fe5e3437fd3f +DIST sslscan-1.11.12-rbsec.tar.gz 56346 BLAKE2B 0079a4be50c037c02bc716341315e0a2164742f270a54fa616ba223b5ecc56bdfa9cec3bc495cd57d4d20cdb4331c622bb78b705f2516fcff228306bb1e5c6ff SHA512 e667cc50f0ec71343b73ca11871a1a53aa9f255c671f16b7c5f33093125a1e60d6e7945e7bd7296f4a71aa6837c823dc939e18982f3e3f831acc061ead9e7ebb +DIST sslscan-1.11.13-rbsec-openssl.tar.gz 5523256 BLAKE2B d8f5aa8bf748310fe1186ec9ab74ecc33425d6fa3db709d94516780d4efadbdd9cf6358798796704dfeb4032ec615298f3b67c8150e314f1e79a4d826c2589b7 SHA512 9bfdac0b6dcbb9e932ef41db9753f7298cf38ddc18731386968289114fd5ed10d81e95523d557b42b431377638d2f62fb710189e7d944ba89979fe5e3437fd3f +DIST sslscan-1.11.13-rbsec.tar.gz 57006 BLAKE2B ea5e2754f5a8218ee1f3aba26e7efe2394fa87b79137955705edc4600d67139f2641ac7b4e7a92f7273878f5b150e3e1b159114c833dc180049688563cf5095b SHA512 51477e5b29a2fc87e2d6c8d76430eeb2a6feb388d47392938b9e2c572acc5926534a19dc249080a066256a1a6cbfe08b162e9f3839386c86116352e5eb57c544 diff --git a/net-analyzer/sslscan/metadata.xml b/net-analyzer/sslscan/metadata.xml new file mode 100644 index 000000000000..2d8c5846f488 --- /dev/null +++ b/net-analyzer/sslscan/metadata.xml @@ -0,0 +1,11 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>graaff@gentoo.org</email> + </maintainer> + <upstream> + <remote-id type="github">rbsec/sslscan</remote-id> + </upstream> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/sslscan/sslscan-1.11.12.ebuild b/net-analyzer/sslscan/sslscan-1.11.12.ebuild new file mode 100644 index 000000000000..6d30e8c8c250 --- /dev/null +++ b/net-analyzer/sslscan/sslscan-1.11.12.ebuild @@ -0,0 +1,52 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +# Upstream now builds against the openssl 1.0.x fork by PeterMosmans +MOSMANS_OPENSSL_COMMIT=c9ba19c8b7fd131137373dbd1fccd6a8bb0628be + +inherit eutils toolchain-funcs + +DESCRIPTION="Fast SSL configuration scanner" +HOMEPAGE="https://github.com/rbsec/sslscan" +MY_FORK="rbsec" +SRC_URI="https://github.com/${MY_FORK}/${PN}/archive/${PV}-${MY_FORK}.tar.gz -> ${P}-${MY_FORK}.tar.gz + static? ( https://github.com/PeterMosmans/openssl/archive/${MOSMANS_OPENSSL_COMMIT}.tar.gz -> ${P}-${MY_FORK}-openssl.tar.gz )" + +LICENSE="GPL-3" +SLOT="0" +KEYWORDS="amd64 x86" +IUSE="libressl +static" + +DEPEND="libressl? ( dev-libs/libressl )" +RDEPEND="${DEPEND}" + +S="${WORKDIR}/${P}-${MY_FORK}" + +src_prepare() { + if use static; then + ln -s ../openssl-${MOSMANS_OPENSSL_COMMIT} openssl || die + touch .openssl_is_fresh || die + + sed -i -e '/openssl\/.git/,/fi/d' \ + -e '/openssl test/d' Makefile || die + + fi + + default +} + +src_compile() { + if use static; then + emake static + else + emake + fi +} + +src_install() { + DESTDIR="${D}" emake install + + dodoc Changelog README.md +} diff --git a/net-analyzer/sslscan/sslscan-1.11.13-r1.ebuild b/net-analyzer/sslscan/sslscan-1.11.13-r1.ebuild new file mode 100644 index 000000000000..dfa4053fb25f --- /dev/null +++ b/net-analyzer/sslscan/sslscan-1.11.13-r1.ebuild @@ -0,0 +1,45 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +# Upstream now builds against the openssl 1.0.x fork by PeterMosmans +MOSMANS_OPENSSL_COMMIT=c9ba19c8b7fd131137373dbd1fccd6a8bb0628be + +inherit eutils toolchain-funcs + +DESCRIPTION="Fast SSL configuration scanner" +HOMEPAGE="https://github.com/rbsec/sslscan" +MY_FORK="rbsec" +SRC_URI="https://github.com/${MY_FORK}/${PN}/archive/${PV}-${MY_FORK}.tar.gz -> ${P}-${MY_FORK}.tar.gz + https://github.com/PeterMosmans/openssl/archive/${MOSMANS_OPENSSL_COMMIT}.tar.gz -> ${P}-${MY_FORK}-openssl.tar.gz" + +LICENSE="GPL-3" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="" + +DEPEND="" +RDEPEND="${DEPEND}" + +S="${WORKDIR}/${P}-${MY_FORK}" + +src_prepare() { + ln -s ../openssl-${MOSMANS_OPENSSL_COMMIT} openssl || die + touch .openssl_is_fresh || die + + sed -i -e '/openssl\/.git/,/fi/d' \ + -e '/openssl test/d' Makefile || die + + default +} + +src_compile() { + emake static +} + +src_install() { + DESTDIR="${D}" emake install + + dodoc Changelog README.md +} diff --git a/net-analyzer/sslscan/sslscan-1.11.13.ebuild b/net-analyzer/sslscan/sslscan-1.11.13.ebuild new file mode 100644 index 000000000000..0a071a7e55af --- /dev/null +++ b/net-analyzer/sslscan/sslscan-1.11.13.ebuild @@ -0,0 +1,52 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +# Upstream now builds against the openssl 1.0.x fork by PeterMosmans +MOSMANS_OPENSSL_COMMIT=c9ba19c8b7fd131137373dbd1fccd6a8bb0628be + +inherit eutils toolchain-funcs + +DESCRIPTION="Fast SSL configuration scanner" +HOMEPAGE="https://github.com/rbsec/sslscan" +MY_FORK="rbsec" +SRC_URI="https://github.com/${MY_FORK}/${PN}/archive/${PV}-${MY_FORK}.tar.gz -> ${P}-${MY_FORK}.tar.gz + static? ( https://github.com/PeterMosmans/openssl/archive/${MOSMANS_OPENSSL_COMMIT}.tar.gz -> ${P}-${MY_FORK}-openssl.tar.gz )" + +LICENSE="GPL-3" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="libressl +static" + +DEPEND="libressl? ( dev-libs/libressl )" +RDEPEND="${DEPEND}" + +S="${WORKDIR}/${P}-${MY_FORK}" + +src_prepare() { + if use static; then + ln -s ../openssl-${MOSMANS_OPENSSL_COMMIT} openssl || die + touch .openssl_is_fresh || die + + sed -i -e '/openssl\/.git/,/fi/d' \ + -e '/openssl test/d' Makefile || die + + fi + + default +} + +src_compile() { + if use static; then + emake static + else + emake + fi +} + +src_install() { + DESTDIR="${D}" emake install + + dodoc Changelog README.md +} diff --git a/net-analyzer/sslsplit/Manifest b/net-analyzer/sslsplit/Manifest new file mode 100644 index 000000000000..c06f6601455f --- /dev/null +++ b/net-analyzer/sslsplit/Manifest @@ -0,0 +1,2 @@ +DIST sslsplit-0.5.4.tar.gz 1750390 BLAKE2B 4ab9014c91938397c469bdc49dd307c47375047f018a5caaf8b32eb84596d2fbe623702349dc85776071363b2167c6ee8918604c6bf2843d357ffe64df36bb1b SHA512 5220cbf26a2d5201c4b36207ec52b290f95002c6d5a4d828868d163cff528095add8b333ecb844b86b4e83f62934aa840f80d3838d00997acd50b6e30cee7aed +DIST sslsplit-0.5.5.tar.gz 1846850 BLAKE2B b223491c480070dd9718804f0ceb8fec9fe519cf0d189fd9bf9cc4dce5ae00d93227dca42349b42d2b82c62d0d92c451442670f6eae2f8d2beedef437907299b SHA512 f236f1ccce8bdb4a09659551defd73b73fbf660ceedace6ffbbb687c1de4488f74a23274b53a67e7001dfcdbd0ede7270ba8261feab633a25ae9f57cce468f39 diff --git a/net-analyzer/sslsplit/files/sslsplit-0.5.4-install.patch b/net-analyzer/sslsplit/files/sslsplit-0.5.4-install.patch new file mode 100644 index 000000000000..65959f3e1090 --- /dev/null +++ b/net-analyzer/sslsplit/files/sslsplit-0.5.4-install.patch @@ -0,0 +1,26 @@ +diff --git a/GNUmakefile b/GNUmakefile +index ebdcf0a..02cb4b7 100644 +--- a/GNUmakefile ++++ b/GNUmakefile +@@ -519,21 +519,12 @@ $(TARGET).conf.5: $(TARGET).conf.5.in $(MKFS) FORCE + + install: $(TARGET) $(TARGET).conf $(TARGET).1 $(TARGET).conf.5 + test -d $(DESTDIR)$(PREFIX)/bin || $(MKDIR) -p $(DESTDIR)$(PREFIX)/bin +- test -d $(DESTDIR)$(PREFIX)/$(TARGET) || \ +- $(MKDIR) -p $(DESTDIR)$(PREFIX)/sslsplit + test -d $(DESTDIR)$(PREFIX)/$(MANDIR)/man1 || \ + $(MKDIR) -p $(DESTDIR)$(PREFIX)/$(MANDIR)/man1 + test -d $(DESTDIR)$(PREFIX)/$(MANDIR)/man5 || \ + $(MKDIR) -p $(DESTDIR)$(PREFIX)/$(MANDIR)/man5 +- test -d $(DESTDIR)/var/log/$(TARGET) || \ +- $(MKDIR) -p $(DESTDIR)/var/log/$(TARGET) +- test -d $(DESTDIR)/var/run/$(TARGET) || \ +- $(MKDIR) -p $(DESTDIR)/var/run/$(TARGET) + $(INSTALL) $(BINOWNERFLAGS) -m $(BINMODE) \ + $(TARGET) $(DESTDIR)$(PREFIX)/bin/ +- $(INSTALL) $(CNFOWNERFLAGS) -m $(CNFMODE) \ +- $(TARGET).conf \ +- $(DESTDIR)$(PREFIX)/$(TARGET)/$(TARGET).conf.sample + $(INSTALL) $(MANOWNERFLAGS) -m $(MANMODE) \ + $(TARGET).1 $(DESTDIR)$(PREFIX)/$(MANDIR)/man1/ + $(INSTALL) $(MANOWNERFLAGS) -m $(MANMODE) \ diff --git a/net-analyzer/sslsplit/metadata.xml b/net-analyzer/sslsplit/metadata.xml new file mode 100644 index 000000000000..c0031ac051cc --- /dev/null +++ b/net-analyzer/sslsplit/metadata.xml @@ -0,0 +1,26 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>arkamar@atlas.cz</email> + <name>Petr Vaněk</name> + </maintainer> + <maintainer type="project"> + <email>proxy-maint@gentoo.org</email> + <name>Proxy Maintainers</name> + </maintainer> + <longdescription lang="en"> + SSLsplit is a tool for man-in-the-middle attacks against SSL/TLS + encrypted network connections. It is intended to be useful for network + forensics, application security analysis and penetration testing. + </longdescription> + <upstream> + <maintainer status="active"> + <email>daniel@roe.ch</email> + <name>Daniel Roethlisberger</name> + </maintainer> + <bugs-to>https://github.com/droe/sslsplit/issues</bugs-to> + <remote-id type="github">droe/sslsplit</remote-id> + </upstream> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/sslsplit/sslsplit-0.5.4.ebuild b/net-analyzer/sslsplit/sslsplit-0.5.4.ebuild new file mode 100644 index 000000000000..f75310908600 --- /dev/null +++ b/net-analyzer/sslsplit/sslsplit-0.5.4.ebuild @@ -0,0 +1,52 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit flag-o-matic + +DESCRIPTION="Transparent SSL/TLS interception" +HOMEPAGE="https://www.roe.ch/SSLsplit" + +LICENSE="BSD-2" +SLOT="0" +IUSE="elibc_musl test" +RESTRICT="!test? ( test )" + +if [[ ${PV} == *9999 ]] ; then + inherit git-r3 + EGIT_REPO_URI="https://github.com/droe/${PN}" + EGIT_BRANCH="develop" +else + SRC_URI="https://github.com/droe/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz" + KEYWORDS="~amd64 ~x86" +fi + +RDEPEND=" + dev-libs/libevent[ssl,threads] + dev-libs/openssl:0= + net-libs/libnet:1.1 + net-libs/libpcap + elibc_musl? ( sys-libs/fts-standalone )" +DEPEND="${RDEPEND} + test? ( dev-libs/check )" +BDEPEND="virtual/pkgconfig" + +PATCHES=( + "${FILESDIR}/${P}-install.patch" +) + +src_prepare() { + default + + use elibc_musl && append-libs "-lfts" + + sed -i -e 's/-D_FORTIFY_SOURCE=2 //g' \ + -e 's/\<FEATURES\>/SSLSPLIT_FEATURES/g' GNUmakefile || die + sed -i '/opts_suite/d' main.t.c || die +} + +src_install() { + emake DESTDIR="${D}" PREFIX="${EPREFIX}/usr" install + dodoc AUTHORS.md NEWS.md README.md sslsplit.conf +} diff --git a/net-analyzer/sslsplit/sslsplit-0.5.5.ebuild b/net-analyzer/sslsplit/sslsplit-0.5.5.ebuild new file mode 100644 index 000000000000..355f76bc4381 --- /dev/null +++ b/net-analyzer/sslsplit/sslsplit-0.5.5.ebuild @@ -0,0 +1,48 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit flag-o-matic + +DESCRIPTION="Transparent SSL/TLS interception" +HOMEPAGE="https://www.roe.ch/SSLsplit" + +LICENSE="BSD-2" +SLOT="0" +IUSE="elibc_musl test" +RESTRICT="!test? ( test )" + +if [[ ${PV} == *9999 ]] ; then + inherit git-r3 + EGIT_REPO_URI="https://github.com/droe/${PN}" + EGIT_BRANCH="develop" +else + SRC_URI="https://github.com/droe/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz" + KEYWORDS="~amd64 ~x86" +fi + +RDEPEND=" + dev-libs/libevent[ssl,threads] + dev-libs/openssl:0= + net-libs/libnet:1.1 + net-libs/libpcap + elibc_musl? ( sys-libs/fts-standalone )" +DEPEND="${RDEPEND} + test? ( dev-libs/check )" +BDEPEND="virtual/pkgconfig" + +src_prepare() { + default + + use elibc_musl && append-libs "-lfts" + + sed -i -e 's/-D_FORTIFY_SOURCE=2 //g' \ + -e 's/\<FEATURES\>/SSLSPLIT_FEATURES/g' GNUmakefile || die + sed -i '/opts_suite/d' main.t.c || die +} + +src_install() { + emake DESTDIR="${D}" PREFIX="${EPREFIX}/usr" SYSCONFDIR="${EPREFIX}/etc" install + dodoc AUTHORS.md NEWS.md README.md +} diff --git a/net-analyzer/sslsplit/sslsplit-9999.ebuild b/net-analyzer/sslsplit/sslsplit-9999.ebuild new file mode 100644 index 000000000000..355f76bc4381 --- /dev/null +++ b/net-analyzer/sslsplit/sslsplit-9999.ebuild @@ -0,0 +1,48 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit flag-o-matic + +DESCRIPTION="Transparent SSL/TLS interception" +HOMEPAGE="https://www.roe.ch/SSLsplit" + +LICENSE="BSD-2" +SLOT="0" +IUSE="elibc_musl test" +RESTRICT="!test? ( test )" + +if [[ ${PV} == *9999 ]] ; then + inherit git-r3 + EGIT_REPO_URI="https://github.com/droe/${PN}" + EGIT_BRANCH="develop" +else + SRC_URI="https://github.com/droe/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz" + KEYWORDS="~amd64 ~x86" +fi + +RDEPEND=" + dev-libs/libevent[ssl,threads] + dev-libs/openssl:0= + net-libs/libnet:1.1 + net-libs/libpcap + elibc_musl? ( sys-libs/fts-standalone )" +DEPEND="${RDEPEND} + test? ( dev-libs/check )" +BDEPEND="virtual/pkgconfig" + +src_prepare() { + default + + use elibc_musl && append-libs "-lfts" + + sed -i -e 's/-D_FORTIFY_SOURCE=2 //g' \ + -e 's/\<FEATURES\>/SSLSPLIT_FEATURES/g' GNUmakefile || die + sed -i '/opts_suite/d' main.t.c || die +} + +src_install() { + emake DESTDIR="${D}" PREFIX="${EPREFIX}/usr" SYSCONFDIR="${EPREFIX}/etc" install + dodoc AUTHORS.md NEWS.md README.md +} diff --git a/net-analyzer/ssmping/Manifest b/net-analyzer/ssmping/Manifest new file mode 100644 index 000000000000..852881e4703c --- /dev/null +++ b/net-analyzer/ssmping/Manifest @@ -0,0 +1 @@ +DIST ssmping-0.9.1.tar.gz 16863 BLAKE2B f3ebb2940197feb8f280369d3d217c8335c64265e001d24b6e75b10dff5df0fced29b005267eb57abfd8b6aa41c2071aba69a766a85877aefe3c765134ae1454 SHA512 7929b43867f29ac7f93298820149fd326d8540187a59e4f28f226e1c0dbfcdc60dc3da437de250e4082a2d6bd845ae9e619bf3b592b824dd8d529bf093cdedff diff --git a/net-analyzer/ssmping/files/ssmping-0.9-build.patch b/net-analyzer/ssmping/files/ssmping-0.9-build.patch new file mode 100644 index 000000000000..586819ca0dd5 --- /dev/null +++ b/net-analyzer/ssmping/files/ssmping-0.9-build.patch @@ -0,0 +1,23 @@ +fixup build errors/warnings + +http://bugs.gentoo.org/240750 + +--- a/Makefile ++++ b/Makefile +@@ -1,4 +1,5 @@ + PREFIX ?= /usr/local ++CPPFLAGS += -D_GNU_SOURCE + + all: ssmping asmping ssmpingd mcfirst + +--- a/ssmping.c ++++ b/ssmping.c +@@ -22,7 +22,7 @@ + uint16_t size; + uint32_t intface; + struct sockaddr_storage name, ucaddr, mcaddr, grpaddr; +- size_t namelen; ++ socklen_t namelen; + #ifdef WIN32 + WORD wVersionRequested; + WSADATA wsaData; diff --git a/net-analyzer/ssmping/metadata.xml b/net-analyzer/ssmping/metadata.xml new file mode 100644 index 000000000000..ebd85ca07a22 --- /dev/null +++ b/net-analyzer/ssmping/metadata.xml @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<maintainer type="project"> + <email>netmon@gentoo.org</email> + <name>Gentoo network monitoring and analysis project</name> +</maintainer> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/ssmping/ssmping-0.9.1.ebuild b/net-analyzer/ssmping/ssmping-0.9.1.ebuild new file mode 100644 index 000000000000..a9dc609c45f5 --- /dev/null +++ b/net-analyzer/ssmping/ssmping-0.9.1.ebuild @@ -0,0 +1,23 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 +inherit eutils toolchain-funcs + +DESCRIPTION="Tool for testing multicast connectivity" +HOMEPAGE="http://www.venaas.no/multicast/ssmping/" +LICENSE="public-domain" +SRC_URI="http://www.venaas.no/multicast/ssmping/${P}.tar.gz" +SLOT="0" +KEYWORDS="amd64 x86" + +src_prepare() { + epatch "${FILESDIR}"/${PN}-0.9-build.patch + tc-export CC +} + +src_install() { + dobin ssmping asmping mcfirst + dosbin ssmpingd + doman ssmping.1 asmping.1 mcfirst.1 +} diff --git a/net-analyzer/suricata/Manifest b/net-analyzer/suricata/Manifest new file mode 100644 index 000000000000..b4800d771b42 --- /dev/null +++ b/net-analyzer/suricata/Manifest @@ -0,0 +1 @@ +DIST suricata-5.0.3.tar.gz 23744731 BLAKE2B 51dfd6fb8a1208e4999999f178f679f2b3cf6a2632a659fb5b58baa747da64fb37a1c9345b51b2bb3f5c33f9a3fc9208ab52cb6e8dc6ddb38b7c19124f7345ca SHA512 4e0ad2ae33537cb074d549b3cc162c5ed115605cb142a96cbf66d1341799eaad96b307fd6ad4679e344e51d00065b3573bfb26bd60468f12addb144b112e4f72 diff --git a/net-analyzer/suricata/files/suricata-5.0.1-conf b/net-analyzer/suricata/files/suricata-5.0.1-conf new file mode 100644 index 000000000000..7f22113dbf0d --- /dev/null +++ b/net-analyzer/suricata/files/suricata-5.0.1-conf @@ -0,0 +1,62 @@ +# Config file for /etc/init.d/suricata* + +# Where config files are stored. Default: + +# SURICATA_DIR="/etc/suricata" + +# Pass options to each suricata service. +# +# You can launch more than one service at the same time with different options. +# This can be useful in a multi-queue gateway, for example. +# You can expand on the Suricata inline example found at: +# http://suricata.readthedocs.io/en/latest/setting-up-ipsinline-for-linux.html +# Instead of configuring iptables to send traffic to just one queue, you can configure it to "load balance" +# on several queues. You can then have a Suricata instance processing traffic for each queue. +# This should help improve performance on the gateway/firewall. +# +# Suppose you configured iptables to use queues 0 and 1 named q0 and q1. You can now do the following: +# ln -s /etc/init.d/suricata /etc/init.d/suricata.q0 +# ln -s /etc/init.d/suricata /etc/init.d/suricata.q1 +# cp /etc/suricata/suricata.yaml /etc/suricata/suricata-q0.yaml +# cp /etc/suricata/suricata.yaml /etc/suricata/suricata-q1.yaml +# +# Edit both suricata-q{0,1}.yaml files and set values accordingly. +# You can override these yaml config file names with SURICATA_CONF* below (optional). +# This allows you to use the same yaml config file for multiple instances as long as you override +# sensible options such as the log file paths. +# SURICATA_CONF_q0="suricata-queues.yaml" +# SURICATA_CONF_q1="suricata-queues.yaml" +# SURICATA_CONF="suricata.yaml" + +# You can define the options here: +# NB: avoid using -l, -c, --user, --group and setting logging.outputs.1.file.filename as the init script will try to set them for you. + +# SURICATA_OPTS_q0="-q 0" +# SURICATA_OPTS_q1="-q 1" + +# If you want to use ${SURICATA_DIR}/suricata.yaml and start the service with /etc/init.d/suricata +# then you can set: + +SURICATA_OPTS="--af-packet" + +# Log paths listed here will be created by the init script and will override the log path +# set in the yaml file, if present. +# SURICATA_LOG_FILE_q0="/var/log/suricata/q0/suricata.log" +# SURICATA_LOG_FILE_q1="/var/log/suricata/q1/suricata.log" +# SURICATA_LOG_FILE="/var/log/suricata/suricata.log" + +# Run as user/group. +# Do not define if you want to run as root or as the user defined in the yaml config file (run-as). +# The ebuild should have created the dedicated user/group suricata:suricata for you to specify here below. +# SURICATA_USER_q0="suricata" +# SURICATA_GROUP_q0="suricata" +# SURICATA_USER_q1="suricata" +# SURICATA_GROUP_q1="suricata" +# SURICATA_USER="suricata" +# SURICATA_GROUP="suricata" + +# Suricata processes can take a long time to shut down. +# If necessary, adjust timeout in seconds to be used when calling stop from the init script. +# Examples: +# SURICATA_MAX_WAIT_ON_STOP="300" +# SURICATA_MAX_WAIT_ON_STOP="SIGTERM/30" diff --git a/net-analyzer/suricata/files/suricata-5.0.1-init b/net-analyzer/suricata/files/suricata-5.0.1-init new file mode 100644 index 000000000000..89f92803cedf --- /dev/null +++ b/net-analyzer/suricata/files/suricata-5.0.1-init @@ -0,0 +1,147 @@ +#!/sbin/openrc-run +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +SURICATA_BIN=/usr/bin/suricata +SURICATA_DIR=${SURICATA_DIR:-/etc/suricata} +SURICATA=${SVCNAME#*.} +SURICATAID=$(shell_var "${SURICATA}") +if [ -n "${SURICATA}" ] && [ ${SVCNAME} != "suricata" ]; then + eval SURICATACONF=\$SURICATA_CONF_${SURICATAID} + [ ${#SURICATACONF} -eq 0 ] && SURICATACONF="${SURICATA_DIR}/suricata-${SURICATA}.yaml" || SURICATACONF="${SURICATA_DIR}/${SURICATACONF}" + SURICATAPID="/run/suricata/suricata.${SURICATA}.pid" + eval SURICATAOPTS=\$SURICATA_OPTS_${SURICATAID} + eval SURICATALOGPATH=\$SURICATA_LOG_FILE_${SURICATAID} + eval SURICATAUSER=\$SURICATA_USER_${SURICATAID} + eval SURICATAGROUP=\$SURICATA_GROUP_${SURICATAID} +else + SURICATACONF=${SURICATA_CONF} + [ ${#SURICATACONF} -eq 0 ] && SURICATACONF="${SURICATA_DIR}/suricata.yaml" || SURICATACONF="${SURICATA_DIR}/${SURICATACONF}" + SURICATAPID="/run/suricata/suricata.pid" + SURICATAOPTS=${SURICATA_OPTS} + SURICATALOGPATH=${SURICATA_LOG_FILE} + SURICATAUSER=${SURICATA_USER} + SURICATAGROUP=${SURICATA_GROUP} +fi +SURICATAUSER=${SURICATAUSER:-${SURICATA_USER}} +SURICATAGROUP=${SURICATAGROUP:-${SURICATA_GROUP}} +[ -e ${SURICATACONF} ] && SURICATAOPTS="-c ${SURICATACONF} ${SURICATAOPTS}" +[[ -z "${SURICATA_MAX_WAIT_ON_STOP// }" ]] || SURICATA_RETRY="--retry ${SURICATA_MAX_WAIT_ON_STOP}" + +description="Suricata IDS/IPS" +extra_commands="checkconfig dump" +description_checkconfig="Check config for ${SVCNAME}" +description_dump="List all config values that can be used with --set" +extra_started_commands="reload relog" +description_reload="Live rule and config reload" +description_relog="Close and re-open all log files" + +depend() { + need net + after mysql + after postgresql +} + +checkconfig() { + if [ ! -d "/run/suricata" ] ; then + checkpath -d /run/suricata + fi + if [ ${#SURICATALOGPATH} -gt 0 ]; then + SURICATALOGFILE=$( basename ${SURICATALOGPATH} ) + SURICATALOGFILE=${SURICATALOGFILE:-suricata.log} + SURICATALOGPATH=$( dirname ${SURICATALOGPATH} ) + if [ ! -d "${SURICATALOGPATH}" ] ; then + checkpath -d "${SURICATALOGPATH}" + fi + if [ ${#SURICATAUSER} -gt 0 ] && [ ${#SURICATAGROUP} -gt 0 ] && [ -e "${SURICATALOGPATH}" ]; then + chown ${SURICATAUSER}:${SURICATAGROUP} "${SURICATALOGPATH}" || return 1 + chown ${SURICATAUSER}:${SURICATAGROUP} "${SURICATALOGPATH}"/* >/dev/null 2>&1 3>&1 + fi + SURICATAOPTS="${SURICATAOPTS} --set logging.outputs.1.file.filename=${SURICATALOGPATH}/${SURICATALOGFILE}" + SURICATALOGPATH="-l ${SURICATALOGPATH}" + fi + if [ ! -e ${SURICATACONF} ] ; then + einfo "The configuration file ${SURICATACONF} was not found." + einfo "If this is OK then make sure you set enough options for ${SVCNAME} in /etc/conf.d/suricata." + einfo "Take a look at the suricata arguments --set and --dump-config." + fi + if [ ${#SURICATAUSER} -gt 0 ] && [ ${#SURICATAGROUP} -gt 0 ]; then + einfo "${SVCNAME} will run as user ${SURICATAUSER}:${SURICATAGROUP}." + SURICATAOPTS="${SURICATAOPTS} --user=${SURICATAUSER} --group=${SURICATAGROUP}" + fi +} + +initpidinfo() { + [ -e ${SURICATAPID} ] && SUR_PID="$(cat ${SURICATAPID})" + if [ ${#SUR_PID} -gt 0 ]; then + SUR_PID_CHECK="$(ps -eo pid | grep -c ${SUR_PID})" + SUR_USER="$(ps -p ${SUR_PID} --no-headers -o user)" + fi +} + +checkpidinfo() { + initpidinfo + if [ ! -e ${SURICATAPID} ]; then + eerror "${SVCNAME} isn't running" + return 1 + elif [ ${#SUR_PID} -eq 0 ] || [ $((SUR_PID_CHECK)) -ne 1 ]; then + eerror "Could not determine PID of ${SVCNAME}! Did the service crash?" + return 1 + elif [ ${#SUR_USER} -eq 0 ]; then + eerror "Unable to determine user running ${SVCNAME}!" + return 1 + elif [ "x${SUR_USER}" != "xroot" ]; then + ewarn "${SVCNAME} may need to be running as root or as a priviledged user for the extra commands reload and relog to work." + fi +} + +start() { + checkconfig || return 1 + ebegin "Starting ${SVCNAME}" + start-stop-daemon --start --quiet --exec ${SURICATA_BIN} \ + -- --pidfile ${SURICATAPID} -D ${SURICATAOPTS} ${SURICATALOGPATH} >/dev/null 2>&1 + local SUR_EXIT=$? + if [ $((SUR_EXIT)) -ne 0 ]; then + einfo "Could not start ${SURICATA_BIN} with:" + einfo "--pidfile ${SURICATAPID} -D ${SURICATAOPTS} ${SURICATALOGPATH}" + einfo "Exit code ${SUR_EXIT}" + fi + eend ${SUR_EXIT} +} + +stop() { + ebegin "Stopping ${SVCNAME}" + start-stop-daemon --stop ${SURICATA_RETRY} --quiet --pidfile ${SURICATAPID} >/dev/null 2>&1 + eend $? +} + +reload() { + checkpidinfo || return 1 + checkconfig || return 1 + ebegin "Sending USR2 signal to ${SVCNAME} to perform a live rule and config reload." + if [ ${#SURICATAUSER} -gt 0 ] && [ ${#SURICATAGROUP} -gt 0 ]; then + start-stop-daemon --user ${SURICATAUSER} --group ${SURICATAGROUP} --signal USR2 --pidfile ${SURICATAPID} + else + start-stop-daemon --signal USR2 --pidfile ${SURICATAPID} + fi + eend $? +} + +relog() { + checkpidinfo || return 1 + checkconfig || return 1 + ebegin "Sending HUP signal to ${SVCNAME} to close and re-open all log files." + if [ ${#SURICATAUSER} -gt 0 ] && [ ${#SURICATAGROUP} -gt 0 ]; then + start-stop-daemon --user ${SURICATAUSER} --group ${SURICATAGROUP} --signal HUP --pidfile ${SURICATAPID} + else + start-stop-daemon --signal HUP --pidfile ${SURICATAPID} + fi + eend $? +} + +dump() { + checkconfig || return 1 + ebegin "Dumping ${SVCNAME} config values and quitting." + ${SURICATA_BIN} --dump-config --pidfile ${SURICATAPID} ${SURICATAOPTS} ${SURICATALOGPATH} + eend $? +} diff --git a/net-analyzer/suricata/files/suricata-5.0.1_configure-no-lz4-automagic.patch b/net-analyzer/suricata/files/suricata-5.0.1_configure-no-lz4-automagic.patch new file mode 100644 index 000000000000..5efce46f6d9f --- /dev/null +++ b/net-analyzer/suricata/files/suricata-5.0.1_configure-no-lz4-automagic.patch @@ -0,0 +1,23 @@ +--- a/configure.ac ++++ b/configure.ac +@@ -2292,7 +2292,11 @@ + fi + + # Check for lz4 +-enable_liblz4="yes" ++AC_ARG_ENABLE(lz4, ++ AS_HELP_STRING([--enable-lz4], [Enable compressed pcap logging using liblz4]), ++ [enable_liblz4=$enableval], ++ [enable_liblz4=yes]) ++if test "x$enable_liblz4" != "xno"; then + AC_CHECK_LIB(lz4, LZ4F_createCompressionContext, , enable_liblz4="no") + + if test "$enable_liblz4" = "no"; then +@@ -2306,6 +2310,7 @@ + echo " yum install lz4-devel" + echo + fi ++fi + + # get cache line size + AC_PATH_PROG(HAVE_GETCONF_CMD, getconf, "no") diff --git a/net-analyzer/suricata/files/suricata-5.0.1_default-config.patch b/net-analyzer/suricata/files/suricata-5.0.1_default-config.patch new file mode 100644 index 000000000000..ef1b1f63ad4f --- /dev/null +++ b/net-analyzer/suricata/files/suricata-5.0.1_default-config.patch @@ -0,0 +1,27 @@ +--- a/suricata.yaml.in ++++ b/suricata.yaml.in +@@ -203,8 +203,9 @@ + # https://suricata.readthedocs.io/en/latest/output/eve/eve-json-output.html#dns-v1-format + + # As of Suricata 5.0, version 2 of the eve dns output +- # format is the default. +- #version: 2 ++ # format is the default - but the daemon produces a warning to that effect ++ # at start-up if this isn't explicitly set. ++ version: 2 + + # Enable/disable this logger. Default: enabled. + #enabled: yes +@@ -978,9 +979,9 @@ + ## + + # Run suricata as user and group. +-#run-as: +-# user: suri +-# group: suri ++run-as: ++ user: suricata ++ group: suricata + + # Some logging module will use that name in event as identifier. The default + # value is the hostname diff --git a/net-analyzer/suricata/files/suricata.service b/net-analyzer/suricata/files/suricata.service new file mode 100644 index 000000000000..1fb056957ec5 --- /dev/null +++ b/net-analyzer/suricata/files/suricata.service @@ -0,0 +1,19 @@ +[Unit] +Description=Suricata IDS/IDP daemon +After=network.target +Requires=network.target +Documentation=man:suricata(8) man:suricatasc(8) +Documentation=https://suricata.readthedocs.io/ + +[Service] +Environment=OPTIONS='-c /etc/suricata/suricata.yaml --af-packet' +PIDFile=/run/suricata/suricata.pid +ExecStart=/usr/bin/suricata --pidfile /run/suricata/suricata.pid $OPTIONS +ExecReload=/bin/kill -HUP $MAINPID +ExecStop=/bin/kill $MAINPID +PrivateTmp=yes +ProtectHome=yes + +[Install] +WantedBy=multi-user.target + diff --git a/net-analyzer/suricata/files/suricata.tmpfiles b/net-analyzer/suricata/files/suricata.tmpfiles new file mode 100644 index 000000000000..a6e784cc37c7 --- /dev/null +++ b/net-analyzer/suricata/files/suricata.tmpfiles @@ -0,0 +1 @@ +d /run/suricata - - - - diff --git a/net-analyzer/suricata/metadata.xml b/net-analyzer/suricata/metadata.xml new file mode 100644 index 000000000000..7fa27fd02702 --- /dev/null +++ b/net-analyzer/suricata/metadata.xml @@ -0,0 +1,22 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>marecki@gentoo.org</email> + <name>Marek Szuba</name> + </maintainer> + <use> + <flag name="af-packet">Enable AF_PACKET support</flag> + <flag name="bpf">Enable support for eBPF (as well as XDP if supported by the kernel and the NIC driver) + for low-level, high-speed packet processing</flag> + <flag name="control-socket">Enable unix socket</flag> + <flag name="cuda">Enable NVIDIA Cuda computations support</flag> + <flag name="detection">Enable detection modules</flag> + <flag name="logrotate">Install logrotate rule</flag> + <flag name="lz4">Enable support for compressed pcap logging using the LZ4 algorithm</flag> + <flag name="nflog">Enable libnetfilter_log support</flag> + <flag name="nfqueue">Enable NFQUEUE support for inline IDP</flag> + <flag name="redis">Enable Redis support</flag> + </use> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/suricata/suricata-5.0.3.ebuild b/net-analyzer/suricata/suricata-5.0.3.ebuild new file mode 100644 index 000000000000..c1f707b13422 --- /dev/null +++ b/net-analyzer/suricata/suricata-5.0.3.ebuild @@ -0,0 +1,197 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +PYTHON_COMPAT=( python3_{6,7,8} ) + +inherit autotools flag-o-matic linux-info python-single-r1 systemd + +DESCRIPTION="High performance Network IDS, IPS and Network Security Monitoring engine" +HOMEPAGE="https://suricata-ids.org/" +SRC_URI="https://www.openinfosecfoundation.org/download/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="+af-packet bpf control-socket cuda debug +detection geoip hardened logrotate lua luajit lz4 nflog +nfqueue redis systemd test" + +RESTRICT="!test? ( test )" + +REQUIRED_USE="${PYTHON_REQUIRED_USE} + ?? ( lua luajit ) + bpf? ( af-packet )" + +RDEPEND="${PYTHON_DEPS} + acct-group/suricata + acct-user/suricata + dev-libs/jansson + dev-libs/libpcre + dev-libs/libyaml + net-libs/libnet:* + net-libs/libnfnetlink + dev-libs/nspr + dev-libs/nss + $(python_gen_cond_dep ' + dev-python/pyyaml[${PYTHON_USEDEP}] + ') + >=net-libs/libhtp-0.5.33 + net-libs/libpcap + sys-apps/file + sys-libs/libcap-ng + bpf? ( >=dev-libs/libbpf-0.0.6 ) + cuda? ( dev-util/nvidia-cuda-toolkit ) + geoip? ( dev-libs/libmaxminddb ) + logrotate? ( app-admin/logrotate ) + lua? ( dev-lang/lua:* ) + luajit? ( dev-lang/luajit:* ) + lz4? ( app-arch/lz4 ) + nflog? ( net-libs/libnetfilter_log ) + nfqueue? ( net-libs/libnetfilter_queue ) + redis? ( dev-libs/hiredis )" +DEPEND="${RDEPEND} + >=sys-devel/autoconf-2.69-r5 + virtual/rust" + +PATCHES=( + "${FILESDIR}/${PN}-5.0.1_configure-no-lz4-automagic.patch" + "${FILESDIR}/${PN}-5.0.1_default-config.patch" +) + +pkg_pretend() { + if use bpf && use kernel_linux; then + if kernel_is -lt 4 15; then + ewarn "Kernel 4.15 or newer is necessary to use all XDP features like the CPU redirect map" + fi + + CONFIG_CHECK="~XDP_SOCKETS" + ERROR_XDP_SOCKETS="CONFIG_XDP_SOCKETS is not set, making it impossible for Suricata will to load XDP programs. " + ERROR_XDP_SOCKETS+="Other eBPF features should work normally." + check_extra_config + fi +} + +src_prepare() { + default + sed -ie 's/docdir =.*/docdir = ${datarootdir}\/doc\/'${PF}'\//' "${S}/doc/Makefile.am" || die + eautoreconf +} + +src_configure() { + local myeconfargs=( + "--localstatedir=/var" \ + "--runstatedir=/run" \ + "--enable-non-bundled-htp" \ + "--enable-gccmarch-native=no" \ + "--enable-python" \ + $(use_enable af-packet) \ + $(use_enable bpf ebpf) \ + $(use_enable control-socket unix-socket) \ + $(use_enable cuda) \ + $(use_enable detection) \ + $(use_enable geoip) \ + $(use_enable hardened gccprotect) \ + $(use_enable hardened pie) \ + $(use_enable lua) \ + $(use_enable luajit) \ + $(use_enable lz4) \ + $(use_enable nflog) \ + $(use_enable nfqueue) \ + $(use_enable redis hiredis) \ + $(use_enable test unittests) \ + "--disable-coccinelle" + ) + + if use debug; then + myeconfargs+=( $(use_enable debug) ) + # so we can get a backtrace according to "reporting bugs" on upstream web site + CFLAGS="-ggdb -O0" econf ${myeconfargs[@]} + else + econf ${myeconfargs[@]} + fi +} + +src_install() { + emake DESTDIR="${D}" install + python_optimize + + if use bpf; then + rm -f ebpf/Makefile.{am,in} + dodoc -r ebpf/ + keepdir /usr/libexec/suricata/ebpf + fi + + insinto "/etc/${PN}" + doins etc/{classification,reference}.config threshold.config suricata.yaml + + keepdir "/var/lib/${PN}/rules" "/var/lib/${PN}/update" + keepdir "/var/log/${PN}" + + fowners -R ${PN}: "/var/lib/${PN}" "/var/log/${PN}" "/etc/${PN}" + fperms 750 "/var/lib/${PN}" "/var/log/${PN}" "/etc/${PN}" + fperms 2750 "/var/lib/${PN}/rules" "/var/lib/${PN}/update" + + newinitd "${FILESDIR}/${PN}-5.0.1-init" ${PN} + newconfd "${FILESDIR}/${PN}-5.0.1-conf" ${PN} + systemd_dounit "${FILESDIR}"/${PN}.service + systemd_newtmpfilesd "${FILESDIR}"/${PN}.tmpfiles ${PN}.conf + + if use logrotate; then + insopts -m0644 + insinto /etc/logrotate.d + newins etc/${PN}.logrotate ${PN} + fi +} + +pkg_postinst() { + elog "" + if use systemd; then + elog "Suricata requires either the mode of operation (e.g. --af-packet) or the interface to listen on (e.g. -i eth0)" + elog "to be specified on the command line. The provided systemd unit launches Suricata in af-packet mode and relies" + elog "on file configuration to specify interfaces, should you prefer to run it differently you will have to customise" + elog "said unit. The simplest way of doing it is to override the Environment=OPTIONS='...' line using a .conf file" + elog "placed in the directory ${EPREFIX}/etc/systemd/system/suricata.service.d/ ." + elog "For details, see the section on drop-in directories in systemd.unit(5)." + else + elog "The ${PN} init script expects to find the path to the configuration" + elog "file as well as extra options in /etc/conf.d." + elog "" + elog "To create more than one ${PN} service, simply create a new .yaml file for it" + elog "then create a symlink to the init script from a link called" + elog "${PN}.foo - like so" + elog " cd /etc/${PN}" + elog " ${EDITOR##*/} suricata-foo.yaml" + elog " cd /etc/init.d" + elog " ln -s ${PN} ${PN}.foo" + elog "Then edit /etc/conf.d/${PN} and make sure you specify sensible options for foo." + elog "" + elog "You can create as many ${PN}.foo* services as you wish." + fi + + if use bpf; then + elog "" + elog "eBPF/XDP files must be compiled (using sys-devel/clang[llvm_targets_BPF]) before use" + elog "because their configuration is hard-coded. You can find the default ones in" + elog " ${EPREFIX}/usr/share/doc/${PF}/ebpf" + elog "and the common location for eBPF bytecode is" + elog " ${EPREFIX}/usr/libexec/${PN}" + elog "For more information, see https://${PN}.readthedocs.io/en/${P}/capture-hardware/ebpf-xdp.html" + fi + + if use debug; then + elog "" + elog "You have enabled the debug USE flag. Please read this link to report bugs upstream:" + elog "https://redmine.openinfosecfoundation.org/projects/suricata/wiki/Reporting_Bugs" + elog "You need to also ensure the FEATURES variable in make.conf contains the" + elog "'nostrip' option to produce useful core dumps or back traces." + fi + + elog "" + elog "To download and install an initial set of rules, run:" + elog " emerge --config =${CATEGORY}/${PF}" + elog "" +} + +pkg_config() { + suricata-update +} diff --git a/net-analyzer/symon/Manifest b/net-analyzer/symon/Manifest new file mode 100644 index 000000000000..c8e4c0f69a7c --- /dev/null +++ b/net-analyzer/symon/Manifest @@ -0,0 +1,2 @@ +DIST symon-2.87.tar.gz 107607 BLAKE2B 44f42ceff818c0643b02f59715ddc9b886e480233cc63c0c29f6a234b7c510d5e175a964b1cd3fadbf9b3d95642d79f947921e88b979f71650a81798acea7429 SHA512 8fce5cf2312f1d7ba78f693da2df9fea3bbeacae0c1b65f79c5f2444fcf07e07b11a5a7229ba762ac47ce484429a42f37bcbcc9e001fce0e5813a0dffd57a953 +DIST symon-2.88.tar.gz 110149 BLAKE2B 918ecf6c87a363e85ce67f9890b2ff6d326f14f896cb85ee6e501b962cb4e476b8fab9d6a96857e63e34aa2ebd2036fbb507c52d74b66b59ff7d77c7bc571474 SHA512 d2079caefcde4cf017460560826c7bf9e97aee9dcce886cd0a85d671bdad877c513889c9b7cd67844dbb4161ce6b6e6f99709475dd2591141f1bc61ee11e8173 diff --git a/net-analyzer/symon/files/symon-init.d b/net-analyzer/symon/files/symon-init.d new file mode 100644 index 000000000000..3d48b793e597 --- /dev/null +++ b/net-analyzer/symon/files/symon-init.d @@ -0,0 +1,32 @@ +#!/sbin/openrc-run +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the 2-clause BSD license + +extra_started_commands="reload" + +depend() { + after bootmisc + need localmount net + use logger +} + +reload() { + ebegin "Reloading symon" + start-stop-daemon \ + --pidfile /run/symon.pid \ + --exec /usr/sbin/symon \ + --signal HUP + eend $? +} + +start() { + ebegin "Starting symon" + start-stop-daemon --start --exec /usr/sbin/symon -- -u + eend $? +} + +stop() { + ebegin "Stopping symon" + start-stop-daemon --stop --pidfile /run/symon.pid + eend $? +} diff --git a/net-analyzer/symon/files/symon.conf b/net-analyzer/symon/files/symon.conf new file mode 100644 index 000000000000..920662185e58 --- /dev/null +++ b/net-analyzer/symon/files/symon.conf @@ -0,0 +1,14 @@ +# +# Demo configuration for symon. See symon(8) for BNF. +# + +monitor { cpu(0), mem, + if(lo), +# cpuiow(0), +# sensor(fan0), sensor(in0), sensor(temp0), +# if(eth0), if(eth1), if(eth2), +# df(sda), +# smart(sda), +# io(hda), io(hdb), io(hdc), io(hdd) + io(sda) +} stream to 127.0.0.1 2100 diff --git a/net-analyzer/symon/files/symux-init.d b/net-analyzer/symon/files/symux-init.d new file mode 100644 index 000000000000..452d4581b807 --- /dev/null +++ b/net-analyzer/symon/files/symux-init.d @@ -0,0 +1,32 @@ +#!/sbin/openrc-run +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the 2-clause BSD license + +extra_started_commands="reload" + +depend() { + after bootmisc + need localmount net + use logger +} + +reload() { + ebegin "Reloading symux" + start-stop-daemon \ + --pidfile /run/symux.pid \ + --exec /usr/sbin/symux \ + --signal HUP + eend $? +} + +start() { + ebegin "Starting symux" + start-stop-daemon --start --exec /usr/sbin/symux + eend $? +} + +stop() { + ebegin "Stopping symux" + start-stop-daemon --stop --pidfile /run/symux.pid + eend $? +} diff --git a/net-analyzer/symon/files/symux.conf b/net-analyzer/symon/files/symux.conf new file mode 100644 index 000000000000..fa0ed50631d7 --- /dev/null +++ b/net-analyzer/symon/files/symux.conf @@ -0,0 +1,35 @@ +# +# Demo symux configuration. See symux(8) for BNF. +# + +mux 127.0.0.1 2100 + +source 127.0.0.1 { + accept { cpu(0), mem, + if(lo), +# cpuiow(0), +# sensor(fan0), sensor(in0), sensor(temp0), +# if(eth0), if(eth1), if(eth2), +# df(sda), +# smart(sda), +# io(hda), io(hdb), io(hdc), io(hdd) + io(sda) + } + datadir "/var/lib/symon/rrds/localhost" +} + +# an example showing the write directive +# +# source 10.0.0.2 { +# accept { cpu(0), mem, if(eth0), if(eth1), +# if(lo), if(eth2), io(sda) +# } +# +# write cpu(0) in "/var/lib/symon/rrds/<host>/cpu0.rrd" +# write mem in "/var/lib/symon/rrds/<host>/mem.rrd" +# write if(eth0) in "/var/lib/symon/rrds/<host>/if_eth0.rrd" +# write if(eth1) in "/var/lib/symon/rrds/<host>/if_eth1.rrd" +# write if(lo) in "/var/lib/symon/rrds/<host>/if_lo.rrd" +# write if(eth2) in "/var/lib/symon/rrds/<host>/if_eth2.rrd" +# write io(sda) in "/var/lib/symon/rrds/<host>/io_sda.rrd" +# } diff --git a/net-analyzer/symon/metadata.xml b/net-analyzer/symon/metadata.xml new file mode 100644 index 000000000000..773a6d7b2221 --- /dev/null +++ b/net-analyzer/symon/metadata.xml @@ -0,0 +1,16 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>netmon@gentoo.org</email> + <name>Gentoo network monitoring and analysis project</name> + </maintainer> + <use> + <flag name="perl">Enables a generic perl symux client</flag> + <flag name="symon">Enables the system monitor. Offers no functionality + but monitoring and forwarding of measured data</flag> + <flag name="symux">Enables the multiplexer which stores incoming symon + streams on disk in RRD (<pkg>net-analyzer/rrdtool</pkg>) files</flag> + </use> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/symon/symon-2.87.ebuild b/net-analyzer/symon/symon-2.87.ebuild new file mode 100644 index 000000000000..45cfd03c95d2 --- /dev/null +++ b/net-analyzer/symon/symon-2.87.ebuild @@ -0,0 +1,106 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 +inherit eutils perl-module toolchain-funcs + +DESCRIPTION="Performance and information monitoring tool" +HOMEPAGE="https://wpd.home.xs4all.nl/symon/" +SRC_URI="https://wpd.home.xs4all.nl/symon/philes/${P}.tar.gz" + +LICENSE="BSD-2" +SLOT="0" +KEYWORDS="~amd64 ~sparc ~x86" +IUSE="perl +symon symux" + +RDEPEND="perl? ( dev-lang/perl ) + symux? ( net-analyzer/rrdtool )" +DEPEND="${RDEPEND} + sys-devel/pmake" + +S=${WORKDIR}/${PN} + +# Deletes the directory passed as an argument from the internal pmake +# variable SUBDIR. +zap_subdir() { + sed -i "/^SUBDIR/s|$1||" Makefile || die +} + +pkg_setup() { + use symon && USE_SYMON=1 && return + + if ! use perl && ! use symon && ! use symux; then + ewarn "You have all available USE flags disabled. Therefore, only the" + ewarn "system monitor will be emerged. Please, enable at least one USE" + ewarn "flag to avoid this message." + USE_SYMON=1 + fi +} + +src_prepare() { + sed -i \ + -e '/^[ \t]*${CC}.*\${LIBS}/s:\${CC}:$(CC) $(LDFLAGS):' \ + sym*/Makefile || die +} + +src_configure() { + # Do some sed magic in accordance with the USE flags. + use perl && [[ -z ${USE_SYMON} ]] && ! use symux && zap_subdir lib + ! use perl && zap_subdir client + ! use symux && zap_subdir symux + [[ -z ${USE_SYMON} ]] && zap_subdir symon +} + +src_compile() { + pmake CC="$(tc-getCC)" CFLAGS+="${CFLAGS}" STRIP=true || die "pmake failed" +} + +src_install() { + if [[ -n ${USE_SYMON} ]]; then + insinto /etc + doins "${FILESDIR}"/symon.conf + + newinitd "${FILESDIR}"/symon-init.d symon + + dodoc CHANGELOG HACKERS TODO + + doman symon/symon.8 + dosbin symon/symon + fi + + if use perl; then + dobin client/getsymonitem.pl + + perl_set_version + insinto ${VENDOR_LIB} + doins client/SymuxClient.pm + fi + + if use symux; then + insinto /etc + doins "${FILESDIR}"/symux.conf + + newinitd "${FILESDIR}"/symux-init.d symux + + doman symux/symux.8 + dosbin symux/symux + + dodir /usr/share/symon + insinto /usr/share/symon + doins symux/c_smrrds.sh + fperms a+x /usr/share/symon/c_smrrds.sh + + dodir /var/lib/symon/rrds/localhost + fi +} + +pkg_postinst() { + if use symux; then + elog "The RRDs files can be obtained by running" + elog "/usr/share/symon/c_smrrds.sh all." + elog "For information about migrating RRDs from a previous" + elog "symux version read the LEGACY FORMATS section of symux(8)." + elog "To view the rrdtool pictures of the stored data, emerge" + elog "net-analyzer/syweb." + fi +} diff --git a/net-analyzer/symon/symon-2.88.ebuild b/net-analyzer/symon/symon-2.88.ebuild new file mode 100644 index 000000000000..0250b6eec39b --- /dev/null +++ b/net-analyzer/symon/symon-2.88.ebuild @@ -0,0 +1,105 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 +inherit eutils perl-module toolchain-funcs + +DESCRIPTION="Performance and information monitoring tool" +HOMEPAGE="https://wpd.home.xs4all.nl/symon/" +SRC_URI="https://wpd.home.xs4all.nl/symon/philes/${P}.tar.gz" + +LICENSE="BSD-2" +SLOT="0" +KEYWORDS="~amd64 ~sparc ~x86" +IUSE="perl +symon symux" +REQUIRED_USE=" + || ( perl symon symux ) +" + +RDEPEND=" + perl? ( dev-lang/perl ) + symux? ( net-analyzer/rrdtool ) +" +DEPEND=" + ${RDEPEND} + sys-devel/pmake +" + +S=${WORKDIR}/${PN} + +# Deletes the directory passed as an argument from the internal pmake +# variable SUBDIR. +zap_subdir() { + sed -i "/^SUBDIR/s|$1||" Makefile || die +} + +src_prepare() { + default + + sed -i \ + -e '/^[ \t]*${CC}.*\${LIBS}/s:\${CC}:$(CC) $(LDFLAGS):' \ + sym*/Makefile || die +} + +src_configure() { + use symon && USE_SYMON=1 + # Do some sed magic in accordance with the USE flags. + use perl && [[ -z ${USE_SYMON} ]] && ! use symux && zap_subdir lib + ! use perl && zap_subdir client + ! use symux && zap_subdir symux + [[ -z ${USE_SYMON} ]] && zap_subdir symon +} + +src_compile() { + pmake CC="$(tc-getCC)" CFLAGS+="${CFLAGS}" STRIP=true || die +} + +src_install() { + if [[ -n ${USE_SYMON} ]]; then + insinto /etc + doins "${FILESDIR}"/symon.conf + + newinitd "${FILESDIR}"/symon-init.d symon + + dodoc CHANGELOG HACKERS TODO + + doman symon/symon.8 + dosbin symon/symon + fi + + if use perl; then + dobin client/getsymonitem.pl + + perl_set_version + insinto ${VENDOR_LIB} + doins client/SymuxClient.pm + fi + + if use symux; then + insinto /etc + doins "${FILESDIR}"/symux.conf + + newinitd "${FILESDIR}"/symux-init.d symux + + doman symux/symux.8 + dosbin symux/symux + + dodir /usr/share/symon + insinto /usr/share/symon + doins symux/c_smrrds.sh + fperms a+x /usr/share/symon/c_smrrds.sh + + dodir /var/lib/symon/rrds/localhost + fi +} + +pkg_postinst() { + if use symux; then + elog "The RRDs files can be obtained by running" + elog "/usr/share/symon/c_smrrds.sh all." + elog "For information about migrating RRDs from a previous" + elog "symux version read the LEGACY FORMATS section of symux(8)." + elog "To view the rrdtool pictures of the stored data, emerge" + elog "net-analyzer/syweb." + fi +} diff --git a/net-analyzer/synscan/Manifest b/net-analyzer/synscan/Manifest new file mode 100644 index 000000000000..1c2ae2fe5d31 --- /dev/null +++ b/net-analyzer/synscan/Manifest @@ -0,0 +1,2 @@ +DIST synscan-5.01.tar.gz 61440 BLAKE2B c32984108e7bf618816f29f034d120e322e25816b8aef6aa4a80920bb0555223706c1f916f96f64be7015bedcf4b22c55fb59a54b53ffe03d85575871832e503 SHA512 6a090ceed5ca0766b63a82fee468459a47cc2bbd97c120d0e0b8708f5ce154116d988a42ff29a9b6fa5fd6d699064b1df0e263795c4dcef0f619797289db88fc +DIST synscan-5.02.tar.gz 60651 BLAKE2B 0ad083d6751234b60ec0428cb3752ba1207a5be5e305a0d26950343c7a7f0572aa9ad5cb16831d862ac43c35a051514bd8fefce4abadbf4c120e4e9add7fa433 SHA512 40ec616e169d0d4150e2213fbdcb985e55dcceefef521b0bf85d8964f5b82892b8abeffcbe9c5e38314c22b86553dae56fb082d546e83efa65755a4d345ea7b0 diff --git a/net-analyzer/synscan/files/synscan-5.01-build.patch b/net-analyzer/synscan/files/synscan-5.01-build.patch new file mode 100644 index 000000000000..79cf6943e185 --- /dev/null +++ b/net-analyzer/synscan/files/synscan-5.01-build.patch @@ -0,0 +1,79 @@ +diff -ur synscan-5.01.orig/configure.in synscan-5.01/configure.in +--- synscan-5.01.orig/configure.in 2009-03-31 23:22:46.000000000 +0300 ++++ synscan-5.01/configure.in 2010-06-14 00:31:06.000000000 +0300 +@@ -49,7 +49,7 @@ + owd=`pwd` + if cd $withval; then withval=`pwd`; cd $owd; fi + CFLAGS="$CFLAGS -I$withval -I$withval/bpf" +- LDFLAGS="$LDFLAGS -L$withval -lpcap" ++ LIBS="$LIBS -L$withval -lpcap" + else + AC_ERROR(pcap.h or libpcap.a not found in $withval) + fi +@@ -57,12 +57,12 @@ + esac ], + [ if test -f ${prefix}/include/pcap.h; then + CFLAGS="$CFLAGS -I${prefix}/include" +- LDFLAGS="$LDFLAGS -L${prefix}/lib -lpcap" ++ LIBS="$LIBS -L${prefix}/lib -lpcap" + elif test -f /usr/include/pcap/pcap.h; then + CFLAGS="$CFLAGS -I/usr/include/pcap" +- LDFLAGS="$LDFLAGS -lpcap" ++ LIBS="$LIBS -lpcap" + elif test -f /usr/include/pcap.h; then +- LDFLAGS="$LDFLAGS -lpcap" ++ LIBS="$LIBS -lpcap" + else + AC_MSG_RESULT(no) + AC_ERROR(libpcap not found) +@@ -73,12 +73,15 @@ + ## + ## Check of getoptlong + ## +-AC_CHECK_FUNCS([getopt_long],, +- AC_CHECK_LIB([gnugetopt], getopt_long, +- [ LDFLAGS="$LDFLAGS -lgnugetopt"; +- AC_DEFINE([HAVE_GETOPT_LONG])] +- ) +-) ++ac_cv_have_getopt_long="no" ++AC_CHECK_FUNCS([getopt_long], ++ [ac_cv_have_getopt_long="yes"], ++ [AC_CHECK_LIB([gnugetopt], [getopt_long], ++ [ac_cv_have_getopt_long="yes" ++ LIBS="${LIBS} -lgnugetopt"])]) ++if test "$ac_cv_have_getopt_long" != "no"; then ++ AC_DEFINE([HAVE_GETOPT_LONG]) ++fi + + ## + ## Output files +diff -ur synscan-5.01.orig/Makefile.in synscan-5.01/Makefile.in +--- synscan-5.01.orig/Makefile.in 2009-03-31 23:22:28.000000000 +0300 ++++ synscan-5.01/Makefile.in 2010-06-14 00:32:19.000000000 +0300 +@@ -5,7 +5,7 @@ + + CC = @CC@ + CFLAGS=@CFLAGS@ @DEFS@ -Wall +-LDFLAGS = @LDFLAGS@ ++LIBS = @LIBS@ + + OBJS_MINIMAL = \ + common.o net.o obuf.o +@@ -56,13 +56,13 @@ + solaris-sparc-gcc: + $(MAKE) $(PROJ) \ + CFLAGS="$(CFLAGS) -DBSD_COMP -DSOLARIS" \ +- LDFLAGS="$(LDFLAGS) -lsocket -lresolv -lnsl" ++ LIBS="$(LIBS) -lsocket -lresolv -lnsl" + + synscan: synscan.c synscan.h ${OBJS} +- ${CC} ${CFLAGS} $< ${OBJS} ${LDFLAGS} -o synscan ++ ${CC} ${LDFLAGS} ${CFLAGS} $< ${OBJS} ${LIBS} -o synscan + + sslog: sslog.c ${OBJS} +- ${CC} ${CFLAGS} $< ${OBJS} ${LDFLAGS} -o sslog ++ ${CC} ${LDFLAGS} ${CFLAGS} $< ${OBJS} ${LIBS} -o sslog + + install: + mkdir -p -m 755 ${bindir} diff --git a/net-analyzer/synscan/files/synscan-5.02-destdir.patch b/net-analyzer/synscan/files/synscan-5.02-destdir.patch new file mode 100644 index 000000000000..920bf65c1ed6 --- /dev/null +++ b/net-analyzer/synscan/files/synscan-5.02-destdir.patch @@ -0,0 +1,15 @@ +--- a/Makefile.in 2011-02-21 23:05:20.000000000 +0200 ++++ b/Makefile.in 2019-03-20 18:28:46.812472904 +0300 +@@ -65,10 +65,8 @@ + ${CC} ${LDFLAGS} ${CFLAGS} $< ${OBJS} ${LIBS} -o sslog + + install: +- mkdir -p -m 755 ${bindir} +- strip synscan +- strip sslog +- @INSTALL_PROGRAM@ synscan sslog ${bindir} ++ mkdir -p -m 755 $(DESTDIR)${bindir} ++ @INSTALL_PROGRAM@ synscan sslog $(DESTDIR)${bindir} + + clean: + rm -f ${PROJ} ${OBJS} core *.core diff --git a/net-analyzer/synscan/metadata.xml b/net-analyzer/synscan/metadata.xml new file mode 100644 index 000000000000..3d4429370ed8 --- /dev/null +++ b/net-analyzer/synscan/metadata.xml @@ -0,0 +1,6 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <!-- maintainer-needed --> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/synscan/synscan-5.01.ebuild b/net-analyzer/synscan/synscan-5.01.ebuild new file mode 100644 index 000000000000..14cfdbfae4c4 --- /dev/null +++ b/net-analyzer/synscan/synscan-5.01.ebuild @@ -0,0 +1,35 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 +inherit autotools eutils + +DESCRIPTION="A fast asynchronous half-open TCP portscanner" +HOMEPAGE="http://www.digit-labs.org/files/tools/synscan/" +SRC_URI="http://www.digit-labs.org/files/tools/${PN}/releases/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="amd64 x86" +IUSE="kernel_FreeBSD kernel_linux" + +RDEPEND="net-libs/libpcap" +DEPEND="${RDEPEND}" + +src_prepare() { + epatch "${FILESDIR}"/${P}-build.patch + eautoconf +} + +src_compile() { + local _target + use kernel_FreeBSD && _target=freebsd + use kernel_linux && _target=linux + + emake ${_target} +} + +src_install() { + dobin synscan sslog + dodoc AUTHORS README +} diff --git a/net-analyzer/synscan/synscan-5.02.ebuild b/net-analyzer/synscan/synscan-5.02.ebuild new file mode 100644 index 000000000000..734a7d101fba --- /dev/null +++ b/net-analyzer/synscan/synscan-5.02.ebuild @@ -0,0 +1,39 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +inherit autotools eutils + +DESCRIPTION="A fast asynchronous half-open TCP portscanner" +HOMEPAGE="http://www.digit-labs.org/files/tools/synscan/" +SRC_URI="http://www.digit-labs.org/files/tools/${PN}/releases/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="kernel_FreeBSD kernel_linux" + +RDEPEND="net-libs/libpcap" +DEPEND="${RDEPEND}" + +PATCHES=( + "${FILESDIR}/${P}-destdir.patch" +) + +src_prepare() { + default + mv "$S"/configure.in "$S"/configure.ac || die + eautoconf +} + +src_configure() { + econf --prefix="${EPREFIX}"/usr +} + +src_compile() { + local _target + use kernel_FreeBSD && _target=freebsd + use kernel_linux && _target=linux + + emake ${_target} +} diff --git a/net-analyzer/syweb/Manifest b/net-analyzer/syweb/Manifest new file mode 100644 index 000000000000..578e04176939 --- /dev/null +++ b/net-analyzer/syweb/Manifest @@ -0,0 +1 @@ +DIST syweb-0.65.tar.gz 37052 BLAKE2B 502bee5e78bdfd309780dd7414616eec99982b3c203039aff645842fc6538396180dabcc9953a70f4bc7c7326fb28c11dc5bd4fd17b8e5c409a8424203b61a88 SHA512 ca4a4ad6f48dc4ff32c11979d6f34ae6f87462fd295780cdef6609ca425d21698ff43e2c5ffbf43a1f1ecccef4718891992160d1fbc1325726c474d113f824b2 diff --git a/net-analyzer/syweb/files/postinstall-en.txt b/net-analyzer/syweb/files/postinstall-en.txt new file mode 100644 index 000000000000..291d66d4e381 --- /dev/null +++ b/net-analyzer/syweb/files/postinstall-en.txt @@ -0,0 +1,8 @@ +Test your syweb installation by pointing your browser to the URL +http://${VHOST_HOSTNAME}/${VHOST_APPDIR}/configtest.php + +If you don't want any user interaction, move index_noui.php to index.php. + +syweb expects a <host>/*.rrd style directory structure under +/var/lib/symon/rrds. Customize ${MY_INSTALLDIR}/setup.inc +if this is incorrect for your setup. diff --git a/net-analyzer/syweb/files/reconfig b/net-analyzer/syweb/files/reconfig new file mode 100644 index 000000000000..79324cc1c7d0 --- /dev/null +++ b/net-analyzer/syweb/files/reconfig @@ -0,0 +1,20 @@ +#!/bin/bash + +die() { + echo "#####" + echo $1 + echo "#####" + exit 1 +} + +sed_var() { + sed -i "/\\$symon['$1']/s|=.*|='$2';|" "${MY_INSTALLDIR}"/setup.inc \ + || die "sed $1 failed" +} + +[[ $1 == "clean" ]] && exit 0 + +sed_var rrdtool_path /usr/bin/rrdtool +sed_var cache_dir "${VHOST_ROOT}"/syweb/cache +sed_var host_tree /var/lib/symon/rrds +sed_var layout_dir "${VHOST_ROOT}"/syweb diff --git a/net-analyzer/syweb/metadata.xml b/net-analyzer/syweb/metadata.xml new file mode 100644 index 000000000000..6d60ca626dd5 --- /dev/null +++ b/net-analyzer/syweb/metadata.xml @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>netmon@gentoo.org</email> + <name>Gentoo network monitoring and analysis project</name> + </maintainer> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/syweb/syweb-0.65.ebuild b/net-analyzer/syweb/syweb-0.65.ebuild new file mode 100644 index 000000000000..da3bdcae2f6d --- /dev/null +++ b/net-analyzer/syweb/syweb-0.65.ebuild @@ -0,0 +1,42 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +WEBAPP_MANUAL_SLOT="yes" +inherit webapp + +DESCRIPTION="Web frontend to symon" +HOMEPAGE="http://www.xs4all.nl/~wpd/symon/" +SRC_URI="http://www.xs4all.nl/~wpd/symon/philes/${P}.tar.gz" + +LICENSE="BSD-2" +SLOT="0" +KEYWORDS="~amd64 ~sparc ~x86" + +RDEPEND="virtual/httpd-php + net-analyzer/rrdtool" + +need_httpd_cgi + +S=${WORKDIR}/${PN} + +src_install() { + webapp_src_preinst + + dodoc CHANGELOG README + docinto layouts + dodoc symon/*.layout + + dodir "${MY_HOSTROOTDIR}"/syweb/cache + insinto "${MY_HOSTROOTDIR}"/syweb + doins symon/hifn_test.layout + webapp_serverowned "${MY_HOSTROOTDIR}"/syweb/cache + insinto "${MY_HTDOCSDIR}" + doins -r htdocs/syweb/* + webapp_configfile "${MY_HTDOCSDIR}"/setup.inc + webapp_postinst_txt en "${FILESDIR}"/postinstall-en.txt + webapp_hook_script "${FILESDIR}"/reconfig + + webapp_src_install +} diff --git a/net-analyzer/tcpdump/Manifest b/net-analyzer/tcpdump/Manifest new file mode 100644 index 000000000000..96c3fad37e23 --- /dev/null +++ b/net-analyzer/tcpdump/Manifest @@ -0,0 +1 @@ +DIST tcpdump-4.9.3.tar.gz 2333119 BLAKE2B 21e13fc40d98cfac0bbd5513580cf98313df1f8fea24c48f045f70d494aea3e75230b8481049660c109f9179015c3164f3e3b31acc76c0bfb1f2da5039f1834e SHA512 3aec673f78b996a4df884b1240e5d0a26a2ca81ee7aca8a2e6d50255bb53476e008a5ced4409e278a956710d8a4d31d85bbb800c9f1aab92b0b1046b59292a22 diff --git a/net-analyzer/tcpdump/files/tcpdump-9999-libdir.patch b/net-analyzer/tcpdump/files/tcpdump-9999-libdir.patch new file mode 100644 index 000000000000..852ea6b6c132 --- /dev/null +++ b/net-analyzer/tcpdump/files/tcpdump-9999-libdir.patch @@ -0,0 +1,19 @@ +--- a/configure.ac ++++ b/configure.ac +@@ -371,7 +371,7 @@ + + if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then + if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then +- LIBS="-L$ipv6libdir -l$ipv6lib $LIBS" ++ LIBS="-l$ipv6lib $LIBS" + echo "You have $ipv6lib library, using it" + else + if test "$ipv6trylibc" = "yes"; then +@@ -891,7 +891,6 @@ + # at the front of the header and library search path. + # + CFLAGS="-I$withval/include $CFLAGS" +- LIBS="-L$withval/lib $LIBS" + fi + ],[ + # diff --git a/net-analyzer/tcpdump/metadata.xml b/net-analyzer/tcpdump/metadata.xml new file mode 100644 index 000000000000..cd0ac51ce150 --- /dev/null +++ b/net-analyzer/tcpdump/metadata.xml @@ -0,0 +1,17 @@ +<?xml version='1.0' encoding='UTF-8'?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>netmon@gentoo.org</email> + <name>Gentoo network monitoring and analysis project</name> + </maintainer> + <use> + <flag name="smi">Build with <pkg>net-libs/libsmi</pkg> to load MIBs on the fly to decode SNMP packets</flag> + <flag name="drop-root">Drop privileges to tcpdump:tcpdump when run as root</flag> + </use> + <upstream> + <remote-id type="cpe">cpe:/a:tcpdump:tcpdump</remote-id> + <remote-id type="github">the-tcpdump-group/tcpdump</remote-id> + </upstream> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/tcpdump/tcpdump-4.9.3-r1.ebuild b/net-analyzer/tcpdump/tcpdump-4.9.3-r1.ebuild new file mode 100644 index 000000000000..8374b080d4e2 --- /dev/null +++ b/net-analyzer/tcpdump/tcpdump-4.9.3-r1.ebuild @@ -0,0 +1,91 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +inherit flag-o-matic toolchain-funcs user + +DESCRIPTION="A Tool for network monitoring and data acquisition" +HOMEPAGE=" + https://www.tcpdump.org/ + https://github.com/the-tcpdump-group/tcpdump +" +SRC_URI=" + https://www.tcpdump.org/release/${P}.tar.gz +" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux" +IUSE="+drop-root libressl smi ssl samba suid test" +RESTRICT="!test? ( test )" + +RDEPEND=" + drop-root? ( sys-libs/libcap-ng ) + net-libs/libpcap + smi? ( net-libs/libsmi ) + ssl? ( + !libressl? ( >=dev-libs/openssl-0.9.6m:0= ) + libressl? ( dev-libs/libressl:= ) + ) +" +DEPEND=" + ${RDEPEND} + drop-root? ( virtual/pkgconfig ) + test? ( + >=net-libs/libpcap-1.9.1 + dev-lang/perl + ) +" + +pkg_setup() { + if use drop-root || use suid; then + enewgroup tcpdump + enewuser tcpdump -1 -1 -1 tcpdump + fi +} + +src_configure() { + if use drop-root; then + append-cppflags -DHAVE_CAP_NG_H + export LIBS=$( $(tc-getPKG_CONFIG) --libs libcap-ng ) + fi + + econf \ + $(use_enable samba smb) \ + $(use_with drop-root chroot '') \ + $(use_with smi) \ + $(use_with ssl crypto "${ESYSROOT}/usr") \ + $(usex drop-root "--with-user=tcpdump" "") +} + +src_test() { + if [[ ${EUID} -ne 0 ]] || ! use drop-root; then + emake check + else + ewarn "If you want to run the test suite, make sure you either" + ewarn "set FEATURES=userpriv or set USE=-drop-root" + fi +} + +src_install() { + dosbin tcpdump + doman tcpdump.1 + dodoc *.awk + dodoc CHANGES CREDITS README.md + + if use suid; then + fowners root:tcpdump /usr/sbin/tcpdump + fperms 4110 /usr/sbin/tcpdump + fi +} + +pkg_preinst() { + if use drop-root || use suid; then + enewgroup tcpdump + enewuser tcpdump -1 -1 -1 tcpdump + fi +} + +pkg_postinst() { + use suid && elog "To let normal users run tcpdump add them into tcpdump group." +} diff --git a/net-analyzer/tcpdump/tcpdump-4.9.3.ebuild b/net-analyzer/tcpdump/tcpdump-4.9.3.ebuild new file mode 100644 index 000000000000..3731233ad947 --- /dev/null +++ b/net-analyzer/tcpdump/tcpdump-4.9.3.ebuild @@ -0,0 +1,92 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +inherit flag-o-matic toolchain-funcs user + +DESCRIPTION="A Tool for network monitoring and data acquisition" +HOMEPAGE=" + https://www.tcpdump.org/ + https://github.com/the-tcpdump-group/tcpdump +" +SRC_URI=" + https://www.tcpdump.org/release/${P}.tar.gz +" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~mips ppc ppc64 s390 sparc x86 ~amd64-linux ~x86-linux" +IUSE="+drop-root libressl smi ssl samba suid test" +RESTRICT="!test? ( test )" + +RDEPEND=" + drop-root? ( sys-libs/libcap-ng ) + net-libs/libpcap + smi? ( net-libs/libsmi ) + ssl? ( + !libressl? ( >=dev-libs/openssl-0.9.6m:0= ) + libressl? ( dev-libs/libressl:= ) + ) +" +DEPEND=" + ${RDEPEND} + drop-root? ( virtual/pkgconfig ) + test? ( + >=net-libs/libpcap-1.9.1 + dev-lang/perl + app-arch/sharutils + ) +" + +pkg_setup() { + if use drop-root || use suid; then + enewgroup tcpdump + enewuser tcpdump -1 -1 -1 tcpdump + fi +} + +src_configure() { + if use drop-root; then + append-cppflags -DHAVE_CAP_NG_H + export LIBS=$( $(tc-getPKG_CONFIG) --libs libcap-ng ) + fi + + econf \ + $(use_enable samba smb) \ + $(use_with drop-root chroot '') \ + $(use_with smi) \ + $(use_with ssl crypto "${ESYSROOT}/usr") \ + $(usex drop-root "--with-user=tcpdump" "") +} + +src_test() { + if [[ ${EUID} -ne 0 ]] || ! use drop-root; then + emake check + else + ewarn "If you want to run the test suite, make sure you either" + ewarn "set FEATURES=userpriv or set USE=-drop-root" + fi +} + +src_install() { + dosbin tcpdump + doman tcpdump.1 + dodoc *.awk + dodoc CHANGES CREDITS README.md + + if use suid; then + fowners root:tcpdump /usr/sbin/tcpdump + fperms 4110 /usr/sbin/tcpdump + fi +} + +pkg_preinst() { + if use drop-root || use suid; then + enewgroup tcpdump + enewuser tcpdump -1 -1 -1 tcpdump + fi +} + +pkg_postinst() { + use suid && elog "To let normal users run tcpdump add them into tcpdump group." +} diff --git a/net-analyzer/tcpdump/tcpdump-9999.ebuild b/net-analyzer/tcpdump/tcpdump-9999.ebuild new file mode 100644 index 000000000000..ac642f4be7b4 --- /dev/null +++ b/net-analyzer/tcpdump/tcpdump-9999.ebuild @@ -0,0 +1,107 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +inherit flag-o-matic toolchain-funcs user + +DESCRIPTION="A Tool for network monitoring and data acquisition" +EGIT_REPO_URI="https://github.com/the-tcpdump-group/tcpdump" +HOMEPAGE=" + https://www.tcpdump.org/ + https://github.com/the-tcpdump-group/tcpdump +" + +LICENSE="BSD" +SLOT="0" +IUSE="+drop-root libressl smi ssl samba suid test" +RESTRICT="!test? ( test )" +if [[ ${PV} == "9999" ]] ; then + inherit git-r3 + KEYWORDS="" +else + SRC_URI="https://github.com/the-${PN}-group/${PN}/archive/${P}.tar.gz" + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux" +fi + +RDEPEND=" + drop-root? ( sys-libs/libcap-ng ) + net-libs/libpcap + smi? ( net-libs/libsmi ) + ssl? ( + !libressl? ( >=dev-libs/openssl-0.9.6m:0= ) + libressl? ( dev-libs/libressl:= ) + ) +" +DEPEND=" + ${RDEPEND} + drop-root? ( virtual/pkgconfig ) + test? ( + >=net-libs/libpcap-1.9.1 + dev-lang/perl + ) +" +PATCHES=( + "${FILESDIR}"/${PN}-9999-libdir.patch +) + +pkg_setup() { + if use drop-root || use suid; then + enewgroup tcpdump + enewuser tcpdump -1 -1 -1 tcpdump + fi +} + +src_prepare() { + default + + sed -i -e '/^eapon1/d;' tests/TESTLIST || die + + # bug 630394 + sed -i -e '/^nbns-valgrind/d' tests/TESTLIST || die +} + +src_configure() { + if use drop-root; then + append-cppflags -DHAVE_CAP_NG_H + export LIBS=$( $(tc-getPKG_CONFIG) --libs libcap-ng ) + fi + + econf \ + $(use_enable samba smb) \ + $(use_with drop-root chroot '') \ + $(use_with smi) \ + $(use_with ssl crypto "${ESYSROOT}/usr") \ + $(usex drop-root "--with-user=tcpdump" "") +} + +src_test() { + if [[ ${EUID} -ne 0 ]] || ! use drop-root; then + emake check + else + ewarn "If you want to run the test suite, make sure you either" + ewarn "set FEATURES=userpriv or set USE=-drop-root" + fi +} + +src_install() { + dosbin tcpdump + doman tcpdump.1 + dodoc *.awk + dodoc CHANGES CREDITS README.md + + if use suid; then + fowners root:tcpdump /usr/sbin/tcpdump + fperms 4110 /usr/sbin/tcpdump + fi +} + +pkg_preinst() { + if use drop-root || use suid; then + enewgroup tcpdump + enewuser tcpdump -1 -1 -1 tcpdump + fi +} + +pkg_postinst() { + use suid && elog "To let normal users run tcpdump add them into tcpdump group." +} diff --git a/net-analyzer/tcpflow/Manifest b/net-analyzer/tcpflow/Manifest new file mode 100644 index 000000000000..fb353514e5a1 --- /dev/null +++ b/net-analyzer/tcpflow/Manifest @@ -0,0 +1,3 @@ +DIST be13_api-20170924.tar.gz 75724 BLAKE2B a5257346b9c0740d9758543fe7772c960e1941735abefe4d24d347631b35d1511fde8eb5a58dbb2824c54e78ee0d686a2549ceea2c1dc91e05ef92899c8b3c2d SHA512 5bf0d28f23df9436304245ccbdbf4af5b0f65e62b92e3039cfb9a70fe2056aa90dcce906db02f3df83fcf2a415c8a46f0f75468d48e13b15673d11c447a4c9c4 +DIST dfxml-20170921.tar.gz 163616 BLAKE2B 17214d15596a136efb2afc7246ee0f5696620b5aac7c2d78e37764f51487ff816de5a7c0f59e7484d358a8cd8eab34841716970cd859f0ce868ac29c8532754c SHA512 0885947aaf8efe639c13324413ef0cca49750027b48b434f226fb9fbfba494e84e245da879dc0d77b46bddc27798f7f5df12590fce47b096683034bbc61280e1 +DIST tcpflow-1.5.2.tar.gz 788545 BLAKE2B b3995cf0f4bedce207dcac19de3d57920231cab75df030da1cf93fb815999de602fd1e3f0955c82effff88f9a3945a891c3b3f0e08449cf366de4bb8269a6452 SHA512 e060779c78f79ba6efdf5f9d8ff490823ff06051a7089247b8155c03f487776fa1896e487e8dca1d5842b617fc5d9056e043f01ac3276edeec1d394ed24bc7e9 diff --git a/net-analyzer/tcpflow/files/tcpflow-1.5.0_alpha-libcapng.patch b/net-analyzer/tcpflow/files/tcpflow-1.5.0_alpha-libcapng.patch new file mode 100644 index 000000000000..b56144324c09 --- /dev/null +++ b/net-analyzer/tcpflow/files/tcpflow-1.5.0_alpha-libcapng.patch @@ -0,0 +1,13 @@ +--- a/src/tcpflow.cpp ++++ b/src/tcpflow.cpp +@@ -30,6 +30,10 @@ + #include <grp.h> + #endif + ++#ifdef HAVE_CAP_NG_H ++#include <cap-ng.h> ++#endif ++ + /* bring in inet_ntop if it is not present */ + #define ETH_ALEN 6 + #ifndef HAVE_INET_NTOP diff --git a/net-analyzer/tcpflow/files/tcpflow-1.5.2-gentoo.patch b/net-analyzer/tcpflow/files/tcpflow-1.5.2-gentoo.patch new file mode 100644 index 000000000000..de0864004a0c --- /dev/null +++ b/net-analyzer/tcpflow/files/tcpflow-1.5.2-gentoo.patch @@ -0,0 +1,61 @@ +--- a/configure.ac ++++ b/configure.ac +@@ -30,7 +30,6 @@ + AC_PROG_INSTALL + + m4_include([m4/slg_searchdirs.m4]) +-m4_include([m4/slg_gcc_all_warnings.m4]) + + + # use C++11 mode if available; HAVE_CXX11 is defined in config.h if so. Don't +@@ -402,7 +402,12 @@ + AC_CHECK_HEADERS(cap-ng.h) + fi + +- ++################################################################ ++# http-parser ++ ++AC_CHECK_LIB(http_parser,http_parser_init,, ++ AC_MSG_ERROR([http-parser library not installed])) ++AC_CHECK_HEADERS(http_parser.h) + + ################################################################ + # Specify our other headers +--- a/src/Makefile.am ++++ b/src/Makefile.am +@@ -90,20 +90,12 @@ + scan_netviz.cpp \ + pcap_writer.h \ + iptree.h \ +- http-parser/http_parser.c \ +- http-parser/http_parser.h \ + mime_map.cpp \ + mime_map.h + + EXTRA_DIST =\ + inet_ntop.c \ + inet_ntop.h \ +- http-parser/AUTHORS \ +- http-parser/CONTRIBUTIONS \ +- http-parser/LICENSE-MIT \ +- http-parser/Makefile \ +- http-parser/README.md \ +- http-parser/http_parser.gyp \ + wifipcap/README.txt \ + wifipcap/TimeVal.cpp \ + wifipcap/TimeVal.h \ +--- a/src/scan_http.cpp ++++ b/src/scan_http.cpp +@@ -11,7 +11,11 @@ + #include "tcpip.h" + #include "tcpdemux.h" + ++#ifdef HAVE_HTTP_PARSER_H ++#include "http_parser.h" ++#else + #include "http-parser/http_parser.h" ++#endif + + #include "mime_map.h" + diff --git a/net-analyzer/tcpflow/metadata.xml b/net-analyzer/tcpflow/metadata.xml new file mode 100644 index 000000000000..011452d2596a --- /dev/null +++ b/net-analyzer/tcpflow/metadata.xml @@ -0,0 +1,12 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>netmon@gentoo.org</email> + <name>Gentoo network monitoring and analysis project</name> + </maintainer> + <upstream> + <remote-id type="github">simsong/tcpflow</remote-id> + </upstream> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/tcpflow/tcpflow-1.5.2-r1.ebuild b/net-analyzer/tcpflow/tcpflow-1.5.2-r1.ebuild new file mode 100644 index 000000000000..1b29c9fe64b0 --- /dev/null +++ b/net-analyzer/tcpflow/tcpflow-1.5.2-r1.ebuild @@ -0,0 +1,60 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +PYTHON_COMPAT=( python2_7 ) +inherit autotools flag-o-matic python-single-r1 + +DESCRIPTION="A tool for monitoring, capturing and storing TCP connections flows" +HOMEPAGE="https://github.com/simsong/tcpflow" +SRC_URI=" + https://api.github.com/repos/simsong/be13_api/tarball/c81521d768bb78499c069fcd7c47adc8eee0350c -> be13_api-20170924.tar.gz + https://api.github.com/repos/simsong/dfxml/tarball/7d11eaa7da8d31f588ce8aecb4b4f5e7e8169ba6 -> dfxml-20170921.tar.gz + https://dev.gentoo.org/~jer/be13_api-20170924.tar.gz + https://dev.gentoo.org/~jer/dfxml-20170921.tar.gz + https://github.com/simsong/${PN}/archive/${P/_/}.tar.gz +" + +LICENSE="GPL-3" +KEYWORDS="amd64 ~arm ppc x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos" +SLOT="0" +IUSE="cairo test" +REQUIRED_USE="${PYTHON_REQUIRED_USE}" +RESTRICT="!test? ( test )" + +RDEPEND=" + ${PYTHON_DEPS} + dev-db/sqlite + dev-libs/boost:= + dev-libs/openssl:= + net-libs/http-parser:= + net-libs/libpcap + sys-libs/libcap-ng + sys-libs/zlib:= + cairo? ( + x11-libs/cairo + ) +" +DEPEND=" + ${RDEPEND} + test? ( sys-apps/coreutils ) +" +S=${WORKDIR}/${PN}-${P/_/} +PATCHES=( + "${FILESDIR}"/${PN}-1.5.0_alpha-libcapng.patch + "${FILESDIR}"/${PN}-1.5.2-gentoo.patch +) + +src_prepare() { + mv "${WORKDIR}"/simsong-dfxml-7d11eaa/* src/dfxml/ || die + mv "${WORKDIR}"/simsong-be13_api-c81521d/* src/be13_api/ || die + + default + + eautoreconf +} + +src_configure() { + append-cxxflags -fpermissive + econf $(usex cairo --enable-cairo=true --enable-cairo=false) +} diff --git a/net-analyzer/tcping/Manifest b/net-analyzer/tcping/Manifest new file mode 100644 index 000000000000..93156ec4abf3 --- /dev/null +++ b/net-analyzer/tcping/Manifest @@ -0,0 +1,2 @@ +DIST tcping-1.3.5.tar.gz 5889 BLAKE2B 8636d1fa4ff65eb14c8fe3c8d6e5b31740b84f0ccc1517b8b35ac613ace3be4b7584b6b7ccd5cf7737c7b7fea678d8d85ac54c00186ce79920dd1756c8c66fd3 SHA512 729360cd1f820ec7c68e2c64365caf60daace8c486c64fe96a88d1037b9818dd27603408962842b74d0db1ee2306ef68522f3f3369c1390e4554929297de760d +DIST tcping-1.3.6.tar.gz 3329 BLAKE2B cd69e259d930532810bf3b19d22db981d644051e472d6356e442df2074ebd6fe675b62540190f465127bdcd0c248f329b3e5c167a6c4408acfef029297b5e181 SHA512 74c65f292d6521dfbf8784ae9e1988a12ad224c81f6575ada1cae55b079cf9c13707be52cb9147abe02c8787ebbedb0d9fca1f2c27fb57c32eea5817c7042992 diff --git a/net-analyzer/tcping/metadata.xml b/net-analyzer/tcping/metadata.xml new file mode 100644 index 000000000000..1187eec024f1 --- /dev/null +++ b/net-analyzer/tcping/metadata.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<maintainer type='project'> +<email>netmon@gentoo.org</email> +</maintainer> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/tcping/tcping-1.3.5-r1.ebuild b/net-analyzer/tcping/tcping-1.3.5-r1.ebuild new file mode 100644 index 000000000000..956a3556561e --- /dev/null +++ b/net-analyzer/tcping/tcping-1.3.5-r1.ebuild @@ -0,0 +1,28 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +inherit toolchain-funcs + +DESCRIPTION="Ping implementation that uses the TCP protocol" +HOMEPAGE="https://github.com/mkirchner/tcping" +SRC_URI="https://web.archive.org/web/20160316191549/http://linuxco.de/tcping/tcping-1.3.5.tar.gz" + +LICENSE="LGPL-3" +SLOT="0" +KEYWORDS="~amd64 ~x86" + +src_prepare() { + default + sed -e '/^CC=/s:=:?=:' \ + -e '/^CCFLAGS/s:=:+=:' \ + -e 's/$(CCFLAGS)/$(CCFLAGS) $(LDFLAGS)/' \ + -i Makefile || die + tc-export CC + export CCFLAGS="${CFLAGS}" +} + +src_install() { + dobin tcping + dodoc README +} diff --git a/net-analyzer/tcping/tcping-1.3.6.ebuild b/net-analyzer/tcping/tcping-1.3.6.ebuild new file mode 100644 index 000000000000..ac21b008725e --- /dev/null +++ b/net-analyzer/tcping/tcping-1.3.6.ebuild @@ -0,0 +1,28 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +inherit toolchain-funcs + +DESCRIPTION="Check if a desired port is reachable via TCP" +HOMEPAGE="https://github.com/mkirchner/tcping" +SRC_URI="https://github.com/mkirchner/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="MIT-with-advertising" +SLOT="0" +KEYWORDS="~amd64 ~x86" + +src_prepare() { + default + sed -e '/^CC=/s:=:?=:' \ + -e '/^CCFLAGS/s:=:+=:' \ + -e 's/$(CCFLAGS)/$(CCFLAGS) $(LDFLAGS)/' \ + -i Makefile || die + tc-export CC + export CCFLAGS="${CFLAGS}" +} + +src_install() { + dobin tcping + dodoc README +} diff --git a/net-analyzer/tcpreen/Manifest b/net-analyzer/tcpreen/Manifest new file mode 100644 index 000000000000..d3ab49a82e1f --- /dev/null +++ b/net-analyzer/tcpreen/Manifest @@ -0,0 +1 @@ +DIST tcpreen-1.4.4.tar.bz2 187979 BLAKE2B ef76c7757c5e630a8b0019ede74314bdf7b0e1e48af00091c8b1a28075499b1e0411b5a7ff8bd01bd54ebb347dfc2169b5efe54d36ef12e6ce31f54c4d278d70 SHA512 94496bbb21218b5acc9e76dd4377f92e35b17e03a2d10a7c42177ba5ccbb6aea1b0b54f49d52c5a97456f8cf77685e1c90c27773f4237c33e95f648d4258b786 diff --git a/net-analyzer/tcpreen/files/tcpreen-1.4.4-literal-suffix.patch b/net-analyzer/tcpreen/files/tcpreen-1.4.4-literal-suffix.patch new file mode 100644 index 000000000000..1808a54f8875 --- /dev/null +++ b/net-analyzer/tcpreen/files/tcpreen-1.4.4-literal-suffix.patch @@ -0,0 +1,13 @@ +--- a/src/main.cpp ++++ b/src/main.cpp +@@ -108,8 +108,8 @@ + # define VERSION "unknown version" + #endif + puts ( +-"TCP re-engineering tool "VERSION" ("PACKAGE_HOST")\n" +-" built "__DATE__" on "PACKAGE_BUILD_HOSTNAME" ("PACKAGE_BUILD")\n" ++"TCP re-engineering tool " VERSION " (" PACKAGE_HOST ")\n" ++" built " __DATE__ " on " PACKAGE_BUILD_HOSTNAME " (" PACKAGE_BUILD ")\n" + "Copyright (C) 2002-2004 Remi Denis-Courmont"); + puts (_( + "This is free software; see the source for copying conditions.\n" diff --git a/net-analyzer/tcpreen/metadata.xml b/net-analyzer/tcpreen/metadata.xml new file mode 100644 index 000000000000..bd13a914477c --- /dev/null +++ b/net-analyzer/tcpreen/metadata.xml @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<maintainer type="project"> + <email>netmon@gentoo.org</email> + <name>Gentoo network monitoring and analysis project</name> +</maintainer> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/tcpreen/tcpreen-1.4.4.ebuild b/net-analyzer/tcpreen/tcpreen-1.4.4.ebuild new file mode 100644 index 000000000000..3aa79a2d98df --- /dev/null +++ b/net-analyzer/tcpreen/tcpreen-1.4.4.ebuild @@ -0,0 +1,29 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 +inherit toolchain-funcs + +DESCRIPTION="TCP network re-engineering tool" +HOMEPAGE="https://www.remlab.net/tcpreen/" +SRC_URI="https://www.remlab.net/files/${PN}/stable/${P}.tar.bz2" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="amd64 ~ppc x86" +IUSE="nls" +DEPEND=" + nls? ( sys-devel/gettext ) +" +DOCS=( AUTHORS NEWS README THANKS TODO ) +PATCHES=( + "${FILESDIR}"/${P}-literal-suffix.patch +) + +src_configure() { + econf $(use_enable nls) +} + +src_compile() { + emake AR="$(tc-getAR)" +} diff --git a/net-analyzer/tcpreplay/Manifest b/net-analyzer/tcpreplay/Manifest new file mode 100644 index 000000000000..14ed293b4aec --- /dev/null +++ b/net-analyzer/tcpreplay/Manifest @@ -0,0 +1,2 @@ +DIST tcpreplay-4.3.2.tar.xz 747268 BLAKE2B 27cad902785975f9c7fbfb8abef24ae95fbc8812e0a4fabd3b1ecf74bb9f0a99cdb0c37db72c433296d3cebba89d0bbc90e944195e585bf2d1c2d93ef234c4f6 SHA512 641dd636d9c5c30637d0103f8b21da3ce234f9e3ed7ab4d2b20d004fc4a14301672dcd678b2d5e0eb90d55a97bcb0c4c67f31c790a5aa3c509a92d1142c5b7b9 +DIST tcpreplay-4.3.3.tar.xz 748220 BLAKE2B 2de09f75e6bb6035fc25f34f41d9ce2ccbb961d7464a9a6dae16ec417d629e4819593fd781d95075293ffa3a3db7c4a50ae8667c4e7d07c0b425361027c8df06 SHA512 110d7768a176d2126766829466a209cdd983afcf0c988f7e128baa5057b3ac1dc918fcaeb168a2e6654429100a146afcbdafcda8c3d67adf6b17892a48689a02 diff --git a/net-analyzer/tcpreplay/files/tcpreplay-4.3.0-enable-pcap_findalldevs.patch b/net-analyzer/tcpreplay/files/tcpreplay-4.3.0-enable-pcap_findalldevs.patch new file mode 100644 index 000000000000..6c4d2c02dc0a --- /dev/null +++ b/net-analyzer/tcpreplay/files/tcpreplay-4.3.0-enable-pcap_findalldevs.patch @@ -0,0 +1,11 @@ +--- a/configure.ac ++++ b/configure.ac +@@ -1499,6 +1499,8 @@ + AC_MSG_WARN(Unable to do tests when cross-compiling) + fi + ++disable_pcap_findalldevs=no ++ + dnl Allows user to choose which nic to use for testing purposes + AC_ARG_WITH(testnic, + AC_HELP_STRING([--with-testnic=NIC], [Select which network card to use for testing]), diff --git a/net-analyzer/tcpreplay/metadata.xml b/net-analyzer/tcpreplay/metadata.xml new file mode 100644 index 000000000000..ea03fcc3101b --- /dev/null +++ b/net-analyzer/tcpreplay/metadata.xml @@ -0,0 +1,25 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>netmon@gentoo.org</email> + <name>Gentoo network monitoring and analysis project</name> + </maintainer> + <longdescription> + Tcpreplay is a suite of utilities for UNIX systems for editing and replaying + network traffic which was previously captured by tools like tcpdump and + ethereal/wireshark. The goal of tcpreplay is to provide the means for + providing reliable and repeatible means for testing a variety of network + devices such as switches, router, firewalls, network intrusion detection and + prevention systems (IDS and IPS). + </longdescription> + <use> + <flag name="pcapnav">Enable if you want the jump to byte offset feature via <pkg>net-libs/libpcapnav</pkg></flag> + <flag name="tcpdump">Use <pkg>net-analyzer/tcpdump</pkg> for packet decoding feature </flag> + </use> + <upstream> + <remote-id type="github">appneta/tcpreplay</remote-id> + <remote-id type="sourceforge">tcpreplay</remote-id> + </upstream> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/tcpreplay/tcpreplay-4.3.2.ebuild b/net-analyzer/tcpreplay/tcpreplay-4.3.2.ebuild new file mode 100644 index 000000000000..a5ce8388372c --- /dev/null +++ b/net-analyzer/tcpreplay/tcpreplay-4.3.2.ebuild @@ -0,0 +1,74 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +inherit autotools flag-o-matic + +DESCRIPTION="utilities for editing and replaying previously captured network traffic" +HOMEPAGE="http://tcpreplay.appneta.com/ https://github.com/appneta/tcpreplay" +LICENSE="BSD GPL-3" +SRC_URI="https://github.com/appneta/${PN}/releases/download/v${PV}/${P}.tar.xz" + +SLOT="0" +KEYWORDS="amd64 ~arm ~sparc x86" +IUSE="debug pcapnav +tcpdump" + +DEPEND=" + >=sys-devel/autogen-5.18.4[libopts] + dev-libs/libdnet + >=net-libs/libpcap-0.9 + tcpdump? ( net-analyzer/tcpdump ) + pcapnav? ( net-libs/libpcapnav ) +" +RDEPEND="${DEPEND}" + +DOCS=( + docs/{CHANGELOG,CREDIT,HACKING,TODO} +) +PATCHES=( + "${FILESDIR}"/${PN}-4.3.0-enable-pcap_findalldevs.patch +) + +S=${WORKDIR}/${P/_/-} + +src_prepare() { + default + + sed -i \ + -e 's|#include <dnet.h>|#include <dnet/eth.h>|g' \ + src/common/sendpacket.c || die + sed -i \ + -e 's|@\([A-Z_]*\)@|$(\1)|g' \ + -e '/tcpliveplay_CFLAGS/s|$| $(LDNETINC)|g' \ + -e '/tcpliveplay_LDADD/s|$| $(LDNETLIB)|g' \ + src/Makefile.am || die + + eautoreconf +} + +src_configure() { + # By default it uses static linking. Avoid that, bug 252940 + econf \ + $(use_enable debug) \ + $(use_with pcapnav pcapnav-config /usr/bin/pcapnav-config) \ + $(use_with tcpdump tcpdump /usr/sbin/tcpdump) \ + --enable-dynamic-link \ + --enable-local-libopts \ + --enable-shared \ + --with-libdnet \ + --with-testnic2=lo \ + --with-testnic=lo +} + +src_test() { + if [[ ! ${EUID} -eq 0 ]]; then + ewarn "Some tests were disabled due to FEATURES=userpriv" + ewarn "To run all tests issue the following command as root:" + ewarn " # make -C ${S}/test" + emake -j1 -C test tcpprep + else + emake -j1 test || { + ewarn "Note that some tests require eth0 iface to be up." ; + die "self test failed - see ${S}/test/test.log" ; } + fi +} diff --git a/net-analyzer/tcpreplay/tcpreplay-4.3.3.ebuild b/net-analyzer/tcpreplay/tcpreplay-4.3.3.ebuild new file mode 100644 index 000000000000..d27b84b1c383 --- /dev/null +++ b/net-analyzer/tcpreplay/tcpreplay-4.3.3.ebuild @@ -0,0 +1,74 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +inherit autotools flag-o-matic + +DESCRIPTION="utilities for editing and replaying previously captured network traffic" +HOMEPAGE="http://tcpreplay.appneta.com/ https://github.com/appneta/tcpreplay" +LICENSE="BSD GPL-3" +SRC_URI="https://github.com/appneta/${PN}/releases/download/v${PV}/${P}.tar.xz" + +SLOT="0" +KEYWORDS="~amd64 ~arm ~sparc ~x86" +IUSE="debug pcapnav +tcpdump" + +DEPEND=" + >=sys-devel/autogen-5.18.4[libopts] + dev-libs/libdnet + >=net-libs/libpcap-0.9 + tcpdump? ( net-analyzer/tcpdump ) + pcapnav? ( net-libs/libpcapnav ) +" +RDEPEND="${DEPEND}" + +DOCS=( + docs/{CHANGELOG,CREDIT,HACKING,TODO} +) +PATCHES=( + "${FILESDIR}"/${PN}-4.3.0-enable-pcap_findalldevs.patch +) + +S=${WORKDIR}/${P/_/-} + +src_prepare() { + default + + sed -i \ + -e 's|#include <dnet.h>|#include <dnet/eth.h>|g' \ + src/common/sendpacket.c || die + sed -i \ + -e 's|@\([A-Z_]*\)@|$(\1)|g' \ + -e '/tcpliveplay_CFLAGS/s|$| $(LDNETINC)|g' \ + -e '/tcpliveplay_LDADD/s|$| $(LDNETLIB)|g' \ + src/Makefile.am || die + + eautoreconf +} + +src_configure() { + # By default it uses static linking. Avoid that, bug 252940 + econf \ + $(use_enable debug) \ + $(use_with pcapnav pcapnav-config /usr/bin/pcapnav-config) \ + $(use_with tcpdump tcpdump /usr/sbin/tcpdump) \ + --enable-dynamic-link \ + --enable-local-libopts \ + --enable-shared \ + --with-libdnet \ + --with-testnic2=lo \ + --with-testnic=lo +} + +src_test() { + if [[ ! ${EUID} -eq 0 ]]; then + ewarn "Some tests were disabled due to FEATURES=userpriv" + ewarn "To run all tests issue the following command as root:" + ewarn " # make -C ${S}/test" + emake -j1 -C test tcpprep + else + emake -j1 test || { + ewarn "Note that some tests require eth0 iface to be up." ; + die "self test failed - see ${S}/test/test.log" ; } + fi +} diff --git a/net-analyzer/tcpreplay/tcpreplay-999999.ebuild b/net-analyzer/tcpreplay/tcpreplay-999999.ebuild new file mode 100644 index 000000000000..9e2776949df2 --- /dev/null +++ b/net-analyzer/tcpreplay/tcpreplay-999999.ebuild @@ -0,0 +1,73 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +inherit autotools flag-o-matic git-r3 + +DESCRIPTION="utilities for editing and replaying previously captured network traffic" +HOMEPAGE="http://tcpreplay.appneta.com/ https://github.com/appneta/tcpreplay" +LICENSE="BSD GPL-3" +EGIT_REPO_URI="https://github.com/appneta/tcpreplay" + +SLOT="0" +KEYWORDS="" +IUSE="debug pcapnav +tcpdump" + +DEPEND=" + >=sys-devel/autogen-5.18.4[libopts] + dev-libs/libdnet + >=net-libs/libpcap-0.9 + tcpdump? ( net-analyzer/tcpdump ) + pcapnav? ( net-libs/libpcapnav ) +" +RDEPEND="${DEPEND}" +DOCS=( + docs/{CHANGELOG,CREDIT,HACKING,TODO} +) +PATCHES=( + "${FILESDIR}"/${PN}-4.3.0-enable-pcap_findalldevs.patch +) + +S=${WORKDIR}/${P/_/-} + +src_prepare() { + default + + sed -i \ + -e 's|#include <dnet.h>|#include <dnet/eth.h>|g' \ + src/common/sendpacket.c || die + sed -i \ + -e 's|@\([A-Z_]*\)@|$(\1)|g' \ + -e '/tcpliveplay_CFLAGS/s|$| $(LDNETINC)|g' \ + -e '/tcpliveplay_LDADD/s|$| $(LDNETLIB)|g' \ + src/Makefile.am || die + + eautoreconf +} + +src_configure() { + # By default it uses static linking. Avoid that, bug 252940 + econf \ + $(use_enable debug) \ + $(use_with pcapnav pcapnav-config /usr/bin/pcapnav-config) \ + $(use_with tcpdump tcpdump /usr/sbin/tcpdump) \ + --disable-local-libopts \ + --enable-dynamic-link \ + --enable-shared \ + --with-libdnet \ + --with-testnic2=lo \ + --with-testnic=lo +} + +src_test() { + if [[ ! ${EUID} -eq 0 ]]; then + ewarn "Some tests will be disabled due to FEATURES=userpriv" + ewarn "To run all tests issue the following command as root:" + ewarn " # make -C ${S}/test" + emake -j1 -C test tcpprep + else + emake -j1 test || { + ewarn "Note that some tests require eth0 iface to be up." ; + die "self test failed - see ${S}/test/test.log" ; } + fi +} diff --git a/net-analyzer/tcpslice/Manifest b/net-analyzer/tcpslice/Manifest new file mode 100644 index 000000000000..41ade7a38751 --- /dev/null +++ b/net-analyzer/tcpslice/Manifest @@ -0,0 +1,2 @@ +DIST tcpslice_1.2a3-4.debian.tar.gz 5784 BLAKE2B c85beab03b494984d721ca64fb75ccb29746dee4184e4daecf2703e80f3b3d3e4330b911831960caa17d631a4760a21d17368cd7017e61c05766fd1f50c66e0e SHA512 43a0ad5811c84639be0c6d162ea92101e73240e9689e4b647ee060697382062ec0e22dcb951ca000e05bac829455b7aa37f8dd73c5b1dd87f55e6d61a8a9b59b +DIST tcpslice_1.2a3.orig.tar.gz 76879 BLAKE2B 38b20ef09c2c0fc2c956c421d131ce27748bea684bb459da13f0d29b008a4561b7f61381cfbdb9c1dbdf53478c55b412efa9af689d5425f7fbfc9f0ee32016d5 SHA512 04e12d592807022c78eb4941580ed103995680c69af885bb8f13828a12ec570f7fe93c34c1b20a01d3d99f445d5da17a1fcfbe25b2e3b41abe28304c034654c5 diff --git a/net-analyzer/tcpslice/files/tcpslice-1.2a_p3-exit.patch b/net-analyzer/tcpslice/files/tcpslice-1.2a_p3-exit.patch new file mode 100644 index 000000000000..befcfdc9defe --- /dev/null +++ b/net-analyzer/tcpslice/files/tcpslice-1.2a_p3-exit.patch @@ -0,0 +1,10 @@ +--- a/util.c ++++ b/util.c +@@ -25,6 +25,7 @@ + #endif + + #include <sys/types.h> ++#include <stdlib.h> /* exit() */ + + #include <stdio.h> + #if __STDC__ diff --git a/net-analyzer/tcpslice/metadata.xml b/net-analyzer/tcpslice/metadata.xml new file mode 100644 index 000000000000..abe14b7378de --- /dev/null +++ b/net-analyzer/tcpslice/metadata.xml @@ -0,0 +1,12 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>netmon@gentoo.org</email> + <name>Gentoo network monitoring and analysis project</name> + </maintainer> + <upstream> + <remote-id type="github">the-tcpdump-group/tcpslice</remote-id> + </upstream> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/tcpslice/tcpslice-1.2a_p3-r1.ebuild b/net-analyzer/tcpslice/tcpslice-1.2a_p3-r1.ebuild new file mode 100644 index 000000000000..706c33979464 --- /dev/null +++ b/net-analyzer/tcpslice/tcpslice-1.2a_p3-r1.ebuild @@ -0,0 +1,33 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 +inherit autotools eutils + +MY_P="${PN}_${PV/_p/}" + +DESCRIPTION="Extract and concatenate portions of pcap files" +HOMEPAGE="http://www.tcpdump.org/ https://github.com/the-tcpdump-group/tcpslice" +LICENSE="BSD" +SLOT="0" +SRC_URI="mirror://debian/pool/main/t/${PN}/${MY_P}.orig.tar.gz + mirror://debian/pool/main/t/${PN}/${MY_P}-4.debian.tar.gz" +KEYWORDS="~amd64 ~ppc x86" + +RDEPEND="net-libs/libpcap" +DEPEND="${RDEPEND}" + +S="${WORKDIR}/${MY_P/_/-}" + +src_prepare() { + epatch \ + "${WORKDIR}"/debian/patches/[0-]* \ + "${FILESDIR}"/${P}-exit.patch + eautoreconf +} + +src_install() { + dosbin tcpslice + doman tcpslice.1 + dodoc README +} diff --git a/net-analyzer/tcpslice/tcpslice-1.2a_p3_p4.ebuild b/net-analyzer/tcpslice/tcpslice-1.2a_p3_p4.ebuild new file mode 100644 index 000000000000..c348b112eb35 --- /dev/null +++ b/net-analyzer/tcpslice/tcpslice-1.2a_p3_p4.ebuild @@ -0,0 +1,40 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +inherit autotools flag-o-matic + +MY_P="${PN}_$(ver_cut 1).$(ver_cut 2-3)$(ver_cut 5)" + +DESCRIPTION="Extract and concatenate portions of pcap files" +HOMEPAGE="http://www.tcpdump.org/ https://github.com/the-tcpdump-group/tcpslice" +LICENSE="BSD" +SLOT="0" +SRC_URI=" + mirror://debian/pool/main/${PN:0:1}/${PN}/${MY_P}.orig.tar.gz + mirror://debian/pool/main/${PN:0:1}/${PN}/${MY_P}-$(ver_cut 7).debian.tar.gz +" +KEYWORDS="~amd64 ~ppc ~x86" + +RDEPEND=" + net-libs/libpcap +" +DEPEND=" + ${RDEPEND} +" +S=${WORKDIR}/${MY_P/_/-} + +src_prepare() { + eapply \ + "${WORKDIR}"/debian/patches/[0-]* \ + "${FILESDIR}"/${PN}-1.2a_p3-exit.patch + eapply_user + sed -i -e 's|ifndef lint|if 0|g' *.c || die + eautoconf +} + +src_install() { + dosbin tcpslice + doman tcpslice.1 + dodoc README +} diff --git a/net-analyzer/tcpstat/Manifest b/net-analyzer/tcpstat/Manifest new file mode 100644 index 000000000000..1f36deb47008 --- /dev/null +++ b/net-analyzer/tcpstat/Manifest @@ -0,0 +1,2 @@ +DIST tcpstat-1.5.tar.gz 93102 BLAKE2B 39a570fe6176fda0e8a6539417ece268183a1ebed6fa956b8ec5556b8bbd2508829e7d0861ef39b551bd6070df70cfdaf3dbf694a42ad00be4ea0f3e5c757ce5 SHA512 f1399365e754e4d9e19657c455a580294a7b4002a0d02ff05791a45574dcb1d0e75dc492157ef595066502b1553702481c67b20ad24267a50d7293766c39a5ab +DIST tcpstat_1.5-8.debian.tar.xz 7844 BLAKE2B d74e3fd6a274d5e4e0963741bcfe870cfa300281706f965ac1c61ab7e6eb9aa2ea06566649fb3ae8d6071464cfa4bc037e58f64bf32f71ad8b3006976a515417 SHA512 f54546a9191feddc5410c7abb6764533ce89de4bd93fdc480e1a8f7473b405ca914482e6b950ead39d78d235caf093aaa663c683df346417070b97fc3e4f5c41 diff --git a/net-analyzer/tcpstat/files/tcpstat-1.5-_DEFAULT_SOURCE.patch b/net-analyzer/tcpstat/files/tcpstat-1.5-_DEFAULT_SOURCE.patch new file mode 100644 index 000000000000..e3e0df933d5c --- /dev/null +++ b/net-analyzer/tcpstat/files/tcpstat-1.5-_DEFAULT_SOURCE.patch @@ -0,0 +1,11 @@ +--- a/configure.in ++++ b/configure.in +@@ -68,7 +68,7 @@ + case $my_build_os in + aix*) AC_DEFINE(AIX_STRANGENESS, 1, [ defined on AIX systems. ]) ;; + osf1*) AC_DEFINE(TRU64_STRANGENESS, 1, [ defined on OSF systems. ]) ;; +- linux*) AC_DEFINE(_BSD_SOURCE, 1, [ defined usually on linux systems ] ) ;; ++ linux*) AC_DEFINE(_DEFAULT_SOURCE, 1, [ defined usually on linux systems ] ) ;; + bsd/os*) ;; + freebsd*) ;; + sunos*) ;; diff --git a/net-analyzer/tcpstat/files/tcpstat-1.5-db.patch b/net-analyzer/tcpstat/files/tcpstat-1.5-db.patch new file mode 100644 index 000000000000..88e668e1a4a5 --- /dev/null +++ b/net-analyzer/tcpstat/files/tcpstat-1.5-db.patch @@ -0,0 +1,165 @@ +--- a/configure.in ++++ b/configure.in +@@ -84,15 +84,26 @@ + dnl ####################### + dnl Checks for header files + dnl ####################### + AC_HEADER_STDC + AC_HEADER_SYS_WAIT +-AC_CHECK_HEADERS(sys/time.h sys/stat.h unistd.h strings.h fcntl.h netinet/ip6.h) ++AC_CHECK_HEADERS(sys/time.h sys/stat.h unistd.h strings.h fcntl.h) + + dnl BSD/OS Seems to not have a good ethernet header, so we gotta wing it + AC_CHECK_HEADERS(net/if.h net/ethernet.h netinet/if_ether.h net/ppp_defs.h) + ++AC_ARG_ENABLE( ipv6, [ AC_HELP_STRING([--enable-ipv6], [s use IPv6?]) ], ip6=$enableval ) ++if test "$ip6" = "yes" ++then ++ AC_CHECK_HEADER(netinet/ip6.h, , [AC_MSG_ERROR([I couldn't find netinet/ip6.h though you asked for ipv6 support.])] ) ++elif test "$ip6" != "no" ++then ++ AC_CHECK_HEADER(netinet/ip6.h) ++ ++fi ++ ++ + dnl ############################################################# + dnl Checks for typedefs, structures, and compiler characteristics + dnl ############################################################# + AC_C_CONST + AC_TYPE_SIZE_T +@@ -147,34 +158,11 @@ + If you already have... then please rerun configure with the option + --with-pcap-lib=DIR + with "DIR" being where libpcap is found.]) + ]) + +-dnl look for dbopen for tcpprof +-TCPPROF="" +-LD_TCPPROF="" +-AC_CHECK_LIB(c, dbopen, [ TCPPROF=tcpprof ], [ +- AC_CHECK_LIB(db1, dbopen, [ +- TCPPROF=tcpprof +- LD_TCPPROF="-ldb1" +- AC_DEFINE(USE_DB1_LIBRARY, 1, [ Use the sleepycat DB library. ]) +- ], [ +- AC_MSG_WARN([ +- +- *** WARNING *** +- I couldn't locate the Berkeley DB library. The extra utility +- "tcpprof" will not be built. THIS IS OK!!! "tcpstat" will +- continue to be built as if this never happened. +- +- If you wish to use the extra "tcpprof" program, please install +- the Berkeley DB library from: +- ftp://ftp.cs.berkeley.edu/ucb/4bsd/db.tar.gz +- ]) +- ]) +-]) + AC_SUBST(TCPPROF) +-AC_SUBST(LD_TCPPROF) + AC_SUBST(MATHLIB) + + AC_CONFIG_FILES([ + Makefile + doc/Makefile +--- a/lib/process.c ++++ b/lib/process.c +@@ -230,12 +230,12 @@ + * calls a user function pointing to the data + * + * XXX: filter is not used. capture_seconds also isn't, but snoop is + * always read from a file. + */ +-int get_snoop_data(char *fname, char *filter, int flags, +- Double capture_seconds, void (*hook)(packet_data *, void **), ++int get_snoop_data(char *fname, char *filter __attribute__((unused)), int flags, ++ Double capture_seconds __attribute__((unused)), void (*hook)(packet_data *, void **), + void **args) { + + u_char *packet; + int fd, len, blen, ret = 0; + struct snoop_file_header fh; +--- a/lib/tcpseq.c ++++ b/lib/tcpseq.c +@@ -54,11 +54,10 @@ + u_char flags; + struct tcpseq_ha test_ha; + struct tcphdr *tp = NULL; + struct ip *ip; + #ifdef INET6 +- int is_ip6 = 0; + struct ip6_hdr *ip6; + + ip6 = (struct ip6_hdr *) &pd->data.ip6.hdr; + if (is_ip6_packet(pd)) + tp= &(pd->data.ip6.body.tcphdr); +--- a/src/catpcap.c ++++ b/src/catpcap.c +@@ -50,11 +50,11 @@ + if (c == ' ') return c; + if ((u_char)c > 0xa1 && SHOW_HIGH_BIT) return c; + return '.'; + } + +-void proc_pcap(u_char *user, const struct pcap_pkthdr *h, const u_char *p) { ++void proc_pcap(u_char *user __attribute__((unused)), const struct pcap_pkthdr *h, const u_char *p) { + u_int length = h->caplen, i, j, k, step; + u_char *r, *s; + char c; + + r = (u_char *)p; +@@ -90,11 +90,11 @@ + } + /* + * process_file() takes the output of tcpdump, saves packets, and displays + * statistics + */ +-void process_file(char *fname, u_int unused) { ++void process_file(char *fname, u_int unused __attribute__((unused))) { + int run = 1, i; + pcap_t *pd; + char ebuf[PCAP_ERRBUF_SIZE]; + struct bpf_program bpf_prog; + +--- a/src/dump.c ++++ b/src/dump.c +@@ -37,21 +37,21 @@ + char filterexpr[BUF_SIZ] = ""; + int get_tcp_flags = 0; + int what_to_show = 0; + int packet_number = 0; + +-void my_hook(packet_data *pd, void **args) { ++void my_hook(packet_data *pd) { + printf("PACKET NUMBER: %d\n", ++packet_number); + print_packet(pd, what_to_show); + printf("-------------------\n"); + } + + /* + * process_file() takes the output of tcpdump, saves packets, and displays + * statistics + */ +-void process_file(char *fname, u_int unused) { ++void process_file(char *fname, u_int unused __attribute__((unused))) { + get_dump_data(fname, filterexpr, get_tcp_flags, + -1.0, my_hook, NULL); + } + + int parse_show_types(char *in) { +--- a/src/tcpstat.c ++++ b/src/tcpstat.c +@@ -421,11 +421,11 @@ + } + + /* + * process_file() gets the data, and then displays the statistics + */ +-void process_file(char *fname, u_int unused) { ++void process_file(char *fname, u_int unused __attribute__((unused))) { + void *argv[2]; + statistics stats; + Double x; + + signal(SIGUSR1, catch_signal); diff --git a/net-analyzer/tcpstat/files/tcpstat-1.5_p8-_DEFAULT_SOURCE.patch b/net-analyzer/tcpstat/files/tcpstat-1.5_p8-_DEFAULT_SOURCE.patch new file mode 100644 index 000000000000..3ea38d7bac02 --- /dev/null +++ b/net-analyzer/tcpstat/files/tcpstat-1.5_p8-_DEFAULT_SOURCE.patch @@ -0,0 +1,11 @@ +--- a/configure.in ++++ b/configure.in +@@ -68,7 +68,7 @@ + case $my_build_os in + aix*) AC_DEFINE(AIX_STRANGENESS, 1, [ defined on AIX systems. ]) ;; + osf1*) AC_DEFINE(TRU64_STRANGENESS, 1, [ defined on OSF systems. ]) ;; +- linux*) AC_DEFINE(_BSD_SOURCE, 1, [ defined usually on linux systems ] ) ;; ++ linux*) AC_DEFINE(_DEFAULT_SOURCE, 1, [ defined usually on linux systems ] ) ;; + gnu/kfreebsd*) AC_DEFINE(_BSD_SOURCE, 1, [ defined usually on debian kfreebsd systems ] ) ;; + bsd/os*) ;; + freebsd*) ;; diff --git a/net-analyzer/tcpstat/files/tcpstat-1.5_p8-ipv6.patch b/net-analyzer/tcpstat/files/tcpstat-1.5_p8-ipv6.patch new file mode 100644 index 000000000000..f26268f7a93f --- /dev/null +++ b/net-analyzer/tcpstat/files/tcpstat-1.5_p8-ipv6.patch @@ -0,0 +1,30 @@ +--- a/configure.in ++++ b/configure.in +@@ -84,15 +84,26 @@ + dnl ####################### + dnl Checks for header files + dnl ####################### + AC_HEADER_STDC + AC_HEADER_SYS_WAIT +-AC_CHECK_HEADERS(sys/time.h sys/stat.h unistd.h strings.h fcntl.h netinet/ip6.h) ++AC_CHECK_HEADERS(sys/time.h sys/stat.h unistd.h strings.h fcntl.h) + + dnl BSD/OS Seems to not have a good ethernet header, so we gotta wing it + AC_CHECK_HEADERS(net/if.h net/ethernet.h netinet/if_ether.h net/ppp_defs.h) + ++AC_ARG_ENABLE( ipv6, [ AC_HELP_STRING([--enable-ipv6], [s use IPv6?]) ], ip6=$enableval ) ++if test "$ip6" = "yes" ++then ++ AC_CHECK_HEADER(netinet/ip6.h, , [AC_MSG_ERROR([I couldn't find netinet/ip6.h though you asked for ipv6 support.])] ) ++elif test "$ip6" != "no" ++then ++ AC_CHECK_HEADER(netinet/ip6.h) ++ ++fi ++ ++ + dnl ############################################################# + dnl Checks for typedefs, structures, and compiler characteristics + dnl ############################################################# + AC_C_CONST + AC_TYPE_SIZE_T diff --git a/net-analyzer/tcpstat/files/tcpstat-1.5_p8-libpcap.patch b/net-analyzer/tcpstat/files/tcpstat-1.5_p8-libpcap.patch new file mode 100644 index 000000000000..54554890416a --- /dev/null +++ b/net-analyzer/tcpstat/files/tcpstat-1.5_p8-libpcap.patch @@ -0,0 +1,11 @@ +--- a/configure.in ++++ b/configure.in +@@ -47,7 +47,7 @@ + fi + done + else +- LDFLAGS=" -L${with_pcap_lib} "${LDFLAGS} ++ LDFLAGS="${with_pcap_lib} "${LDFLAGS} + fi + + AC_ARG_ENABLE(fdesc, diff --git a/net-analyzer/tcpstat/files/tcpstat-1.5_p8-off-by-one.patch b/net-analyzer/tcpstat/files/tcpstat-1.5_p8-off-by-one.patch new file mode 100644 index 000000000000..4029ddb7d407 --- /dev/null +++ b/net-analyzer/tcpstat/files/tcpstat-1.5_p8-off-by-one.patch @@ -0,0 +1,50 @@ +--- a/src/catpcap.c ++++ b/src/catpcap.c +@@ -156,10 +156,10 @@ + return Usage(1, argv[0]); + break; + case 'f': +- strncpy(filterexpr, optarg, BUF_SIZ); ++ strncpy(filterexpr, optarg, BUF_SIZ - 1); + break; + case 'r': +- strncpy(filename, optarg, BUF_SIZ); ++ strncpy(filename, optarg, BUF_SIZ - 1); + break; + default: + return Usage(1, argv[0]); +--- a/src/dump.c ++++ b/src/dump.c +@@ -109,10 +109,10 @@ + get_tcp_flags |= GET_TCPD_COUNT_LINKSIZE; + break; + case 'f': +- strncpy(filterexpr, optarg, BUF_SIZ); ++ strncpy(filterexpr, optarg, BUF_SIZ - 1); + break; + case 'r': +- strncpy(filename, optarg, BUF_SIZ); ++ strncpy(filename, optarg, BUF_SIZ - 1); + break; + case 's': + what_to_show |= parse_show_types(optarg); +--- a/src/tcpprof.c ++++ b/src/tcpprof.c +@@ -126,14 +126,14 @@ + src_dest_split = 1; + break; + case 'f': +- strncpy(filterexpr, optarg, BUF_SIZ); ++ strncpy(filterexpr, optarg, BUF_SIZ - 1); + break; + case 'i': +- strncpy(filename, optarg, BUF_SIZ); ++ strncpy(filename, optarg, BUF_SIZ - 1); + flags |= GET_TCPD_DO_LIVE; + break; + case 'r': +- strncpy(filename, optarg, BUF_SIZ); ++ strncpy(filename, optarg, BUF_SIZ - 1); + flags &= ~GET_TCPD_DO_LIVE; + break; + case 'n': diff --git a/net-analyzer/tcpstat/files/tcpstat-1.5_p8-unused.patch b/net-analyzer/tcpstat/files/tcpstat-1.5_p8-unused.patch new file mode 100644 index 000000000000..c255f52dbe85 --- /dev/null +++ b/net-analyzer/tcpstat/files/tcpstat-1.5_p8-unused.patch @@ -0,0 +1,99 @@ +--- a/lib/process.c ++++ b/lib/process.c +@@ -230,12 +230,12 @@ + * calls a user function pointing to the data + * + * XXX: filter is not used. capture_seconds also isn't, but snoop is + * always read from a file. + */ +-int get_snoop_data(char *fname, char *filter, int flags, +- Double capture_seconds, void (*hook)(packet_data *, void **), ++int get_snoop_data(char *fname, char *filter __attribute__((unused)), int flags, ++ Double capture_seconds __attribute__((unused)), void (*hook)(packet_data *, void **), + void **args) { + + u_char *packet; + int fd, len, blen, ret = 0; + struct snoop_file_header fh; +--- a/lib/tcpseq.c ++++ b/lib/tcpseq.c +@@ -54,11 +54,10 @@ + u_char flags; + struct tcpseq_ha test_ha; + struct tcphdr *tp = NULL; + struct ip *ip; + #ifdef INET6 +- int is_ip6 = 0; + struct ip6_hdr *ip6; + + ip6 = (struct ip6_hdr *) &pd->data.ip6.hdr; + if (is_ip6_packet(pd)) + tp= &(pd->data.ip6.body.tcphdr); +--- a/src/catpcap.c ++++ b/src/catpcap.c +@@ -52,13 +52,12 @@ + return '.'; + } + +-void proc_pcap(u_char *user, const struct pcap_pkthdr *h, const u_char *p) { ++void proc_pcap(u_char *user __attribute__((unused)), const struct pcap_pkthdr *h, const u_char *p) { + u_int length = h->caplen, i, j, k, step; +- u_char *r, *s; ++ u_char *r; + char c; + + r = (u_char *)p; +- s = (u_char *)p; + step = 22; + printf("%u: %lu.%.6lu, caplen %u, len %u\n", + p_number++, +@@ -92,7 +91,7 @@ + * process_file() takes the output of tcpdump, saves packets, and displays + * statistics + */ +-void process_file(char *fname, u_int unused) { ++void process_file(char *fname, u_int unused __attribute__((unused))) { + int run = 1, i; + pcap_t *pd; + char ebuf[PCAP_ERRBUF_SIZE]; +--- a/src/dump.c ++++ b/src/dump.c +@@ -37,21 +37,21 @@ + char filterexpr[BUF_SIZ] = ""; + int get_tcp_flags = 0; + int what_to_show = 0; + int packet_number = 0; + +-void my_hook(packet_data *pd, void **args) { ++void my_hook(packet_data *pd) { + printf("PACKET NUMBER: %d\n", ++packet_number); + print_packet(pd, what_to_show); + printf("-------------------\n"); + } + + /* + * process_file() takes the output of tcpdump, saves packets, and displays + * statistics + */ +-void process_file(char *fname, u_int unused) { ++void process_file(char *fname, u_int unused __attribute__((unused))) { + get_dump_data(fname, filterexpr, get_tcp_flags, + -1.0, my_hook, NULL); + } + + int parse_show_types(char *in) { +--- a/src/tcpstat.c ++++ b/src/tcpstat.c +@@ -421,11 +421,11 @@ + } + + /* + * process_file() gets the data, and then displays the statistics + */ +-void process_file(char *fname, u_int unused) { ++void process_file(char *fname, u_int unused __attribute__((unused))) { + void *argv[2]; + statistics stats; + Double x; + + signal(SIGUSR1, catch_signal); diff --git a/net-analyzer/tcpstat/metadata.xml b/net-analyzer/tcpstat/metadata.xml new file mode 100644 index 000000000000..bd13a914477c --- /dev/null +++ b/net-analyzer/tcpstat/metadata.xml @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<maintainer type="project"> + <email>netmon@gentoo.org</email> + <name>Gentoo network monitoring and analysis project</name> +</maintainer> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/tcpstat/tcpstat-1.5-r3.ebuild b/net-analyzer/tcpstat/tcpstat-1.5-r3.ebuild new file mode 100644 index 000000000000..ce12a85db51b --- /dev/null +++ b/net-analyzer/tcpstat/tcpstat-1.5-r3.ebuild @@ -0,0 +1,45 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +inherit autotools flag-o-matic toolchain-funcs + +DESCRIPTION="Reports network interface statistics" +HOMEPAGE="https://www.frenchfries.net/paul/tcpstat/" +SRC_URI="https://www.frenchfries.net/paul/tcpstat/${P}.tar.gz" + +LICENSE="BSD-2" +SLOT="0" +KEYWORDS="amd64 ~ppc ppc64 sparc x86" +IUSE="ipv6" + +DEPEND=" + net-libs/libpcap +" +RDEPEND=" + ${DEPEND} +" +DOCS=( AUTHORS ChangeLog NEWS README doc/Tips_and_Tricks.txt ) +PATCHES=( + "${FILESDIR}"/${P}-db.patch + "${FILESDIR}"/${P}-_DEFAULT_SOURCE.patch +) + +src_prepare() { + default + eautoreconf +} + +src_configure() { + append-cflags -Wall -Wextra + econf \ + $(use_enable ipv6) \ + --with-pcap-include='' \ + --with-pcap-lib="$( $(tc-getPKG_CONFIG) --libs libpcap)" +} + +src_install() { + default + dobin src/{catpcap,packetdump} + newdoc src/README README.src +} diff --git a/net-analyzer/tcpstat/tcpstat-1.5_p8.ebuild b/net-analyzer/tcpstat/tcpstat-1.5_p8.ebuild new file mode 100644 index 000000000000..a7ffbe9723e3 --- /dev/null +++ b/net-analyzer/tcpstat/tcpstat-1.5_p8.ebuild @@ -0,0 +1,59 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +inherit autotools flag-o-matic toolchain-funcs + +DESCRIPTION="Reports network interface statistics" +HOMEPAGE="https://www.frenchfries.net/paul/tcpstat/" +SRC_URI=" + https://www.frenchfries.net/paul/tcpstat/${P/_p*}.tar.gz + mirror://debian/pool/main/${PN:0:1}/${PN}/${PN}_${PV/_p*}-$(ver_cut 4).debian.tar.xz +" + +LICENSE="BSD-2" +SLOT="0" +KEYWORDS="~amd64 ~ppc ~ppc64 ~sparc ~x86" +IUSE="ipv6" + +DEPEND=" + net-libs/libpcap + sys-libs/db:* +" +RDEPEND=" + ${DEPEND} +" +DOCS=( AUTHORS ChangeLog NEWS README doc/Tips_and_Tricks.txt ) +PATCHES=( + "${FILESDIR}"/${P}-_DEFAULT_SOURCE.patch + "${FILESDIR}"/${P}-ipv6.patch + "${FILESDIR}"/${P}-libpcap.patch + "${FILESDIR}"/${P}-off-by-one.patch + "${FILESDIR}"/${P}-unused.patch +) +S=${WORKDIR}/${P/_p*} + +src_prepare() { + eapply $( + for patch in $(cat "${WORKDIR}"/debian/patches/series) + do echo "${WORKDIR}"/debian/patches/${patch} + done + ) ${PATCHES[@]} + eapply_user + + eautoreconf +} + +src_configure() { + append-cflags -Wall -Wextra + econf \ + $(use_enable ipv6) \ + --with-pcap-include='' \ + --with-pcap-lib="$( $(tc-getPKG_CONFIG) --libs libpcap)" +} + +src_install() { + default + dobin src/{catpcap,packetdump} + newdoc src/README README.src +} diff --git a/net-analyzer/tcptrace/Manifest b/net-analyzer/tcptrace/Manifest new file mode 100644 index 000000000000..38a5487049c3 --- /dev/null +++ b/net-analyzer/tcptrace/Manifest @@ -0,0 +1,3 @@ +DIST tcptrace-6.6.7.tar.gz 3773308 BLAKE2B cae5816cb25c33f71c316d14de3c18ff26f0e7452375a962b88c4818ca7c43425e7298e788bd8cb43f2e22ac7dc9b89ed1921b7bd70d0e8befab3ee791453fb1 SHA512 3638770c342aea6c71aa556e758ed22e1fd44730f6c652cf82d3861eb1c31b186952c660071bd1df45020b80eaf9dd090a4ff58c979cc907eb8154dcb7b9b432 +DIST tcptrace_6.6.7-4.1.diff.gz 29161 BLAKE2B 83768d0a6f14525f20b484421181078a3cf7ac3adeada3cf02a7441530593632743c6e515dd8738f5a4692422d97f4eb718dda076a234489096a10defb97dd5f SHA512 2f6dfeb8e15faa0151bdbb18194587e51de040f63117eb1b469a826091d5c1e5eb41a306bdc94e89ce993d0d04ec31324e5f7eea0a1a52852e07ee80006b2087 +DIST tcptrace_6.6.7-5.debian.tar.xz 6236 BLAKE2B 21d35b625fdc7b94c29b2be595ac39488578f08c53e5dde98953bbebaa2d8d96de968b746dd107ea78365a77f1fe7aa5abfeb3aeef4473c9020587f93066000c SHA512 6265d0bfb25f256c8f356cda731c48f869fe3e9d9504ed6afd0e98a3c2caf5dbcff73373c338be111712713b9a501fae886bb06723796103bac4dec5d8fcfaf6 diff --git a/net-analyzer/tcptrace/files/tcptrace-6.6.7-_DEFAULT_SOURCE.patch b/net-analyzer/tcptrace/files/tcptrace-6.6.7-_DEFAULT_SOURCE.patch new file mode 100644 index 000000000000..4513f5100498 --- /dev/null +++ b/net-analyzer/tcptrace/files/tcptrace-6.6.7-_DEFAULT_SOURCE.patch @@ -0,0 +1,14 @@ +--- a/configure.in ++++ b/configure.in +@@ -93,9 +93,9 @@ + *cygwin*) V_PCAP_LDLIBS="-lwpcap"; + esac + +-dnl define _BSD_SOURCE for libc-2 ++dnl define _DEFAULT_SOURCE for libc-2 + if [[ -f /lib/libc-2* ]]; then +- V_DEFINES="$V_DEFINES -D_BSD_SOURCE" ++ V_DEFINES="$V_DEFINES -D_DEFAULT_SOURCE" + fi + + AC_SUBST(V_CCOPT) diff --git a/net-analyzer/tcptrace/files/tcptrace-6.6.7-cross-compile.patch b/net-analyzer/tcptrace/files/tcptrace-6.6.7-cross-compile.patch new file mode 100644 index 000000000000..a5b9ba0c009b --- /dev/null +++ b/net-analyzer/tcptrace/files/tcptrace-6.6.7-cross-compile.patch @@ -0,0 +1,50 @@ +--- a/configure.in ++++ b/configure.in +@@ -3,8 +3,6 @@ + + AC_CANONICAL_SYSTEM + +-AC_LBL_C_INIT(V_CCOPT, V_INCLS) +- + dnl Checks for programs. + AC_PROG_CC + AC_PROG_MAKE_SET +@@ -43,13 +41,12 @@ + dnl check for the IPv6 routines inet_pton + AC_CHECK_FUNCS(inet_pton) + +-AC_MSG_CHECKING(how to print unsigned long long) +-AC_SUBST(FS_ULL) + dnl AC_TRY_RUN is a test program that performs a run-time test to find out + dnl the correct syntax to print unsigned long long ints in printf stmts. + dnl If strcmp returns 0, we are on an enironment that uses %llu, otherwise + dnl we are on a MacOSX environment that uses %qu +-AC_TRY_RUN([ ++AC_CACHE_CHECK([how to print unsigned long long], ac_cv_unsigned_long_long_printf_format, ++ [AC_TRY_RUN([ + #include <stdio.h> + + #define NIX "%llu" +@@ -63,11 +60,17 @@ + exit (0); + else + exit (1); +-}], +-AC_DEFINE(USE_LLU) +-AC_MSG_RESULT(%llu), +-AC_MSG_RESULT(%qu), +-AC_MSG_ERROR(can not run test program while cross compiling)) ++} ++ ], ++ ac_cv_unsigned_long_long_printf_format=%llu, ++ ac_cv_unsigned_long_long_printf_format=%qu, ++ [AS_ECHO_N(["cross-comiling, assuming "])] ++ ac_cv_unsigned_long_long_printf_format=%llu ++ )] ++) ++AS_IF([test $ac_cv_unsigned_long_long_printf_format = %llu], ++ AC_DEFINE(USE_LLU) ++) + + dnl Grab standard includes under weird Linux versions + dnl case "$target_os" in diff --git a/net-analyzer/tcptrace/metadata.xml b/net-analyzer/tcptrace/metadata.xml new file mode 100644 index 000000000000..bd13a914477c --- /dev/null +++ b/net-analyzer/tcptrace/metadata.xml @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<maintainer type="project"> + <email>netmon@gentoo.org</email> + <name>Gentoo network monitoring and analysis project</name> +</maintainer> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/tcptrace/tcptrace-6.6.7_p4_p1.ebuild b/net-analyzer/tcptrace/tcptrace-6.6.7_p4_p1.ebuild new file mode 100644 index 000000000000..9e42190df0b0 --- /dev/null +++ b/net-analyzer/tcptrace/tcptrace-6.6.7_p4_p1.ebuild @@ -0,0 +1,63 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 +inherit autotools eutils flag-o-matic versionator + +TT_DEB_MAJOR=$(get_version_component_range 4) +TT_DEB_MAJOR=${TT_DEB_MAJOR/p} +TT_DEB_MINOR=$(get_version_component_range 5) +TT_DEB_MINOR=${TT_DEB_MINOR/p} +TT_VER=$(get_version_component_range 1-3) + +DESCRIPTION="A Tool for analyzing network packet dumps" +HOMEPAGE="http://www.tcptrace.org/" +SRC_URI=" + http://www.tcptrace.org/download/${PN}-${TT_VER}.tar.gz + http://www.tcptrace.org/download/old/6.6/${PN}-${TT_VER}.tar.gz + mirror://debian/pool/main/t/${PN}/${PN}_${TT_VER}-${TT_DEB_MAJOR}.${TT_DEB_MINOR}.diff.gz +" + +SLOT="0" +LICENSE="GPL-2" +KEYWORDS="amd64 ~ppc ppc64 x86" + +DEPEND=" + net-libs/libpcap +" +RDEPEND=" + ${DEPEND} +" + +S=${WORKDIR}/${PN}-${TT_VER} + +src_prepare() { + eapply "${FILESDIR}"/${PN}-${TT_VER}-cross-compile.patch + eapply "${WORKDIR}"/${PN}_${TT_VER}-${TT_DEB_MAJOR}.${TT_DEB_MINOR}.diff + + eapply_user + + append-cppflags -D_DEFAULT_SOURCE + + eautoreconf +} + +src_compile() { + emake CCOPT="${CFLAGS}" +} + +src_install() { + dobin tcptrace xpl2gpl + + newman tcptrace.man tcptrace.1 + dodoc CHANGES COPYRIGHT FAQ README* THANKS WWW +} + +pkg_postinst() { + if ! has_version ${CATEGORY}/${PN}; then + elog "Note: tcptrace outputs its graphs in the xpl (xplot)" + elog "format. Since xplot is unavailable, you will have to" + elog "use the included xpl2gpl utility to convert it to" + elog "the gnuplot format." + fi +} diff --git a/net-analyzer/tcptrace/tcptrace-6.6.7_p5.ebuild b/net-analyzer/tcptrace/tcptrace-6.6.7_p5.ebuild new file mode 100644 index 000000000000..acb7c415420a --- /dev/null +++ b/net-analyzer/tcptrace/tcptrace-6.6.7_p5.ebuild @@ -0,0 +1,58 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +inherit autotools + +DESCRIPTION="A Tool for analyzing network packet dumps" +HOMEPAGE="http://www.tcptrace.org/" +SRC_URI=" + http://www.tcptrace.org/download/${P/_p*}.tar.gz + http://www.tcptrace.org/download/old/6.6/${P/_p*}.tar.gz + mirror://debian/pool/main/t/${PN}/${PN}_${PV/_p*}-${PV/*_p}.debian.tar.xz +" + +SLOT="0" +LICENSE="GPL-2" +KEYWORDS="~amd64 ~ppc ~ppc64 ~x86" + +DEPEND=" + net-libs/libpcap +" +RDEPEND=" + ${DEPEND} +" +PATCHES=( + "${FILESDIR}"/${P/_p*}-cross-compile.patch + "${FILESDIR}"/${P/_p*}-_DEFAULT_SOURCE.patch +) +S=${WORKDIR}/${P/_p*} + +src_prepare() { + default + + eapply \ + $(awk '{ print "'"${WORKDIR}"'/debian/patches/" $0; }' < "${WORKDIR}"/debian/patches/series) + + eautoreconf +} + +src_compile() { + emake CCOPT="${CFLAGS}" +} + +src_install() { + dobin tcptrace xpl2gpl + + newman tcptrace.man tcptrace.1 + dodoc CHANGES COPYRIGHT FAQ README* THANKS WWW +} + +pkg_postinst() { + if ! has_version ${CATEGORY}/${PN}; then + elog "Note: tcptrace outputs its graphs in the xpl (xplot)" + elog "format. Since xplot is unavailable, you will have to" + elog "use the included xpl2gpl utility to convert it to" + elog "the gnuplot format." + fi +} diff --git a/net-analyzer/tcptraceroute/Manifest b/net-analyzer/tcptraceroute/Manifest new file mode 100644 index 000000000000..c35620493f05 --- /dev/null +++ b/net-analyzer/tcptraceroute/Manifest @@ -0,0 +1 @@ +DIST tcptraceroute-1.5_beta7.tar.gz 119059 BLAKE2B e2d627c7fa96439e77be7d2fb5d57e0b92451367c95022876895fcbebdc0adf8c78b262e41ecb8a2696e8377e9862b45f2139cb8ca9d92a696d9a0dc319d4a64 SHA512 ad5588e62a56f1b5fa851b68280a88e66a900777fe4fd67587262245cd9da17b536b7dc972abe540fc124a93ac76abcabbc55bc32f9f8ee872d5df57b08f7222 diff --git a/net-analyzer/tcptraceroute/files/tcptraceroute-1.5_beta7-cross-compile-checks.patch b/net-analyzer/tcptraceroute/files/tcptraceroute-1.5_beta7-cross-compile-checks.patch new file mode 100644 index 000000000000..469f57d4add7 --- /dev/null +++ b/net-analyzer/tcptraceroute/files/tcptraceroute-1.5_beta7-cross-compile-checks.patch @@ -0,0 +1,62 @@ +--- a/configure.ac ++++ b/configure.ac +@@ -148,11 +148,9 @@ + + # Is this Solaris? + AC_MSG_CHECKING(for Solaris) +-AC_RUN_IFELSE([AC_LANG_PROGRAM( [], [ +-#if defined (__SVR4) && defined (__sun) +- exit(0); +-#else +- exit(-1); ++AC_COMPILE_IFELSE([AC_LANG_PROGRAM( [], [ ++#if ! ( defined (__SVR4) && defined (__sun) ) ++#error "Not Solaris" + #endif + ]) + ],[ +@@ -165,11 +163,9 @@ + + # Is this BSDI? + AC_MSG_CHECKING(for BSDI) +-AC_RUN_IFELSE([AC_LANG_PROGRAM( [], [ +-#if defined (__bsdi__) +- exit(0); +-#else +- exit(-1); ++AC_COMPILE_IFELSE([AC_LANG_PROGRAM( [], [ ++#if ! defined (__bsdi__) ++#error "Not BSDI" + #endif + ]) + ],[ +@@ -182,11 +178,9 @@ + + # Is this NetBSD? + AC_MSG_CHECKING(for NetBSD) +-AC_RUN_IFELSE([AC_LANG_PROGRAM( [], [ +-#if defined (__NetBSD__) +- exit(0); +-#else +- exit(-1); ++AC_COMPILE_IFELSE([AC_LANG_PROGRAM( [], [ ++#if ! defined (__NetBSD__) ++#error "Not NetBSD"; + #endif + ]) + ],[ +@@ -199,11 +193,9 @@ + + # Is this MacOS X? + AC_MSG_CHECKING(for MacOS X) +-AC_RUN_IFELSE([AC_LANG_PROGRAM( [], [ +-#if defined (__APPLE__) && defined (__MACH__) +- exit(0); +-#else +- exit(-1); ++AC_COMPILE_IFELSE([AC_LANG_PROGRAM( [], [ ++#if ! ( defined (__APPLE__) && defined (__MACH__) ) ++#error "Not Mac OS X" + #endif + ]) + ],[ diff --git a/net-analyzer/tcptraceroute/metadata.xml b/net-analyzer/tcptraceroute/metadata.xml new file mode 100644 index 000000000000..90e157a4db60 --- /dev/null +++ b/net-analyzer/tcptraceroute/metadata.xml @@ -0,0 +1,12 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>netmon@gentoo.org</email> + <name>Gentoo network monitoring and analysis project</name> + </maintainer> + <upstream> + <remote-id type="github">mct/tcptraceroute</remote-id> + </upstream> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/tcptraceroute/tcptraceroute-1.5_beta7-r2.ebuild b/net-analyzer/tcptraceroute/tcptraceroute-1.5_beta7-r2.ebuild new file mode 100644 index 000000000000..f5b06925a972 --- /dev/null +++ b/net-analyzer/tcptraceroute/tcptraceroute-1.5_beta7-r2.ebuild @@ -0,0 +1,40 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 +inherit autotools eutils + +MY_P=${P/_beta/beta} + +DESCRIPTION="tcptraceroute is a traceroute implementation using TCP packets" +HOMEPAGE="https://github.com/mct/tcptraceroute" +SRC_URI="https://codeload.github.com/mct/${PN}/tar.gz/${MY_P} -> ${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha amd64 ~arm hppa ~ia64 ppc ppc64 sparc x86 ~amd64-linux ~x86-linux" + +DEPEND=" + net-libs/libnet:1.1 + net-libs/libpcap +" +RDEPEND="${DEPEND}" + +# michael.toren.net is no longer available +RESTRICT="test" + +S=${WORKDIR}/${PN}-${MY_P} + +src_prepare() { + epatch "${FILESDIR}"/${P}-cross-compile-checks.patch + eautoreconf +} + +src_install() { + dosbin tcptraceroute + fowners root:wheel /usr/sbin/tcptraceroute + fperms 4710 /usr/sbin/tcptraceroute + doman tcptraceroute.1 + dodoc examples.txt README ChangeLog + dohtml tcptraceroute.1.html +} diff --git a/net-analyzer/tcptrack/Manifest b/net-analyzer/tcptrack/Manifest new file mode 100644 index 000000000000..d72887a93fe3 --- /dev/null +++ b/net-analyzer/tcptrack/Manifest @@ -0,0 +1 @@ +DIST tcptrack-1.4.2.tar.gz 120569 BLAKE2B f6693225de09a9e9b1bf8984c328b54833a39ff87551119c0eca5197cb1a28de182205499e11c6e04fb63f04ad17188d46b2fb2ca6ff0a73a8ba404e5826db47 SHA512 a15e22b2d7cc144b2f3c662b6e289fe28b538188d234b262d801d4212027446534c9981ef9f2a48125657fa87a367c748a9d98e86b5f38f865a47dd24d478f89 diff --git a/net-analyzer/tcptrack/files/tcptrack-1.4.2-tinfo.patch b/net-analyzer/tcptrack/files/tcptrack-1.4.2-tinfo.patch new file mode 100644 index 000000000000..fe23b48221ec --- /dev/null +++ b/net-analyzer/tcptrack/files/tcptrack-1.4.2-tinfo.patch @@ -0,0 +1,11 @@ +--- a/configure.in ++++ b/configure.in +@@ -26,7 +26,7 @@ + AC_CHECK_LIB(socket,gethostbyname) + AC_CHECK_LIB(nsl,gethostbyname) + AC_CHECK_LIB(nsl,inet_addr) +-AC_CHECK_LIB(ncurses, initscr) ++PKG_CHECK_MODULES(ncurses,ncurses,LIBS="$LIBS $ncurses_LIBS",AC_MSG_ERROR([ncurses is required])) + AC_CHECK_LIB(pcap, pcap_open_live) + AC_CHECK_LIB(pthread, pthread_create) + AC_CHECK_LIB(rt, nanosleep) diff --git a/net-analyzer/tcptrack/metadata.xml b/net-analyzer/tcptrack/metadata.xml new file mode 100644 index 000000000000..bd13a914477c --- /dev/null +++ b/net-analyzer/tcptrack/metadata.xml @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<maintainer type="project"> + <email>netmon@gentoo.org</email> + <name>Gentoo network monitoring and analysis project</name> +</maintainer> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/tcptrack/tcptrack-1.4.2.ebuild b/net-analyzer/tcptrack/tcptrack-1.4.2.ebuild new file mode 100644 index 000000000000..235ac5dff8d2 --- /dev/null +++ b/net-analyzer/tcptrack/tcptrack-1.4.2.ebuild @@ -0,0 +1,28 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 +inherit autotools eutils + +DESCRIPTION="Passive per-connection tcp bandwidth monitor" +HOMEPAGE="http://www.rhythm.cx/~steve/devel/tcptrack/" +SRC_URI="http://www.rhythm.cx/~steve/devel/tcptrack/release/${PV}/source/${P}.tar.gz" + +LICENSE="LGPL-2.1" +SLOT="0" +KEYWORDS="~amd64 ~ppc x86" + +DEPEND=" + net-libs/libpcap + sys-libs/ncurses +" +RDEPEND=" + ${DEPEND} + virtual/pkgconfig +" + +src_prepare() { + epatch "${FILESDIR}"/${P}-tinfo.patch + sed -i src/Makefile.am -e 's| -Werror||g' || die + eautoreconf +} diff --git a/net-analyzer/telegraf/Manifest b/net-analyzer/telegraf/Manifest new file mode 100644 index 000000000000..2ab9ba3fa0b0 --- /dev/null +++ b/net-analyzer/telegraf/Manifest @@ -0,0 +1,212 @@ +DIST github.com-Azure-go-autorest-1f7cd6cfe0adea687ad44a512dfe76140f804318.tar.gz 118485 BLAKE2B af45364ae0cffabcb3764e2a404a259b85b1eb64bd056240f7c1029f5dd1988a975646834d043f450463903021758ad83ea05724648a176159ae6b872e91c8cd SHA512 27846dddbee560f02991e99f4d213a38415a08b18e1a47314eb6e6525f38eb71ac531493bdbb2e2639dc2c5f4f2c464afd799a504a5b8047c7f4bab46c2cac09 +DIST github.com-GoogleCloudPlatform-google-cloud-go-c728a003b238b26cef9ab6753a5dc424b331c3ad.tar.gz 1794432 BLAKE2B 4e784865d117c2cd3e875dfdafd63ec2567179efecf3268da4038e7bdf65d8ce812a0aafce00898531f61b773d6751806c20b8c736a68891b4bb6a004c20eef1 SHA512 87c3db99c87af834e556a651fb25789dbf9b9b2297d60236cc25c46fcbbcb22ed0536f002765de88051dac23f81c2d10e6584df5e00783c797dd24d6821c67d6 +DIST github.com-Microsoft-ApplicationInsights-Go-d2df5d440eda5372f24fcac03839a64d6cb5f7e5.tar.gz 51031 BLAKE2B 8dbd6bd9a74e878e0a9cbe75785a671700b1d4a4480af5e88d540584fcebeeecd92c210c48cacc2fa3de37851bcbaf3db22aa9c3a5a02a554450c5a01f2f2485 SHA512 7a0d82b582f0a5ee793479865d7af4b9fff58e631f84d80665396ba8a83ec98b0f0358c864cc6795d05c5d1a06d9664031b189e2e50d2c6b6a00a3bee45b6030 +DIST github.com-Microsoft-go-winio-a6d595ae73cf27a1b8fc32930668708f45ce1c85.tar.gz 79423 BLAKE2B 8de3be319fa8a6af9781701aa973911c96bf9e9d5771cf1ed84f43d3b5af15416178fb323054b6269ae71b8b2627577f247544ef2e67277df47bc2c675c8843b SHA512 481e45fbeed1ae8f1656d31a069ed02855d98503be4e7f8d00055a4409eb3ea030ddfa63cd3b9e8db09e53f760c64f8313cf03fcd64c7f9534d433ab50daae51 +DIST github.com-Microsoft-go-winio-ce2922f643c8fd76b46cadc7f404a06282678b34.tar.gz 67431 BLAKE2B ee5d72b2ce6bad4d7f753a1fd4aa9c8715b90400f6ea3e6f091c18c959504027d7077b2903d4bfb18f41ed9885af1e56e7ef16cbca0545760e5edb58d12847ec SHA512 ee5020a00ec765d1a71d7b548497fe6c7cdc053b6d5d9adfc0955eca2d6fd3232b64c1a00ffe3346612eb23427b13eae298ef80b4786cdb2bbcd859de62badb4 +DIST github.com-Shopify-sarama-3b1b38866a79f06deddf0487d5c27ba0697ccd65.tar.gz 141370 BLAKE2B e291afcbb0d903bd6a2c16b4baf529c46d39c1c16cb410b7314f66b4b9c31e9feafbd7763d79232128f836fa9024a776d17378adf9205da632a9d10c798e8cca SHA512 45e71fa70a6296f88b1b71f27ede68a9b9eb20b0ead4c704fc54adcb24e01b96d07c4f5f9d9fbdbcb71ced865d19660f3852d74b43ba26e2826baf303f8ad705 +DIST github.com-Shopify-sarama-a6144ae922fd99dd0ea5046c8137acfb7fab0914.tar.gz 170978 BLAKE2B c1847e193abf447699ae50d31c8f0c73c798a047217752ee6799da8e0988e7ea2d7e9d083623bd5e637a358c33a6c05c549fd3d0c97a3fab1c805f3234de59b7 SHA512 0ef24203f88d89e40cec508025a480ec2daf5d2b3186d7f5acf0a6c8b51da82f4a62638bdb9341dc93e262e0e2cc85f15656643288d884e2da12e99226f41a3d +DIST github.com-Sirupsen-logrus-61e43dc76f7ee59a82bdf3d71033dc12bea4c77d.tar.gz 25127 BLAKE2B 490fc2c87ea6471ebd094b43f37dc568ed38cf44be0d66ceb6ab37e22d6ce4a001a2f61820ecd171545c2f24489705bf38cbea129bcffb7a663f06bd456d1fa0 SHA512 ac8b2606945a50398736eb257762798662d7894cd71a7c6f52811a43bccfe920ae0b8ca1c6a03f91f114e6d09b85b262322b49b40ae1c7c77b21a962425079ab +DIST github.com-StackExchange-wmi-5d049714c4a64225c3c79a7cf7d02f7fb5b96338.tar.gz 11236 BLAKE2B 823d78d8f875feb77830e8e9c69e7c7efb54b2077e8048572764207ebab93388c29fda2a75e30e3a54cb93a55687838bcb2f4c9fe592e149ab44ae6d5de5db02 SHA512 b9f1d7579eb128b0ee4397366b373a4a015712ad6414af18528d4d43dbad2ef0809ea051d0b5880a760065bd8296286e051cacca1ce5832f449d775087f0c1d0 +DIST github.com-StackExchange-wmi-f3e2bae1e0cb5aef83e319133eabfee30013a4a5.tar.gz 6835 BLAKE2B 4d38c8389973f3cee2346354096923c1e3dbdab9db6fe6eb86b18cbfa3158fec069b124e04f2b87ecc84bb3cb1de7d27065c0427d2ba618da0e9f91ed274c212 SHA512 d432d6ea5330db910942aef22f416d78efe03dc034f8449df4aa86026cf9c97c1e8e43987425f6b713f1a57b6d930994ad97aa13809996c4d22dea6d4d4cc314 +DIST github.com-aerospike-aerospike-client-go-1dc8cf203d24cd454e71ce40ab4cd0bf3112df90.tar.gz 230591 BLAKE2B 9015081f41d2b738d7edc89dc188730353c2a50cf9999411899c9e81c6077fab2ffc93df8dafb2e7c5e2683f556c87ab7176d0458c834228b6d98de601e2ed2e SHA512 f42d984dc5ef3ac63756ef7a5c01a140b9fc6c8803e286c66baab9f4736f8452240a2e4c3c56a94e20d6e49ff955d3328cd0beddfd150bcea755135047d457bd +DIST github.com-aerospike-aerospike-client-go-95e1ad7791bdbca44707fedbb29be42024900d9c.tar.gz 209254 BLAKE2B 62f74fae376ad21326bfc7d984db3f4b88bb47bee1dfae12444784687f4b67bbc81645ddd42c1989be8dcbe169c589051e2d18a6d7b82b1a6a199e8463b7763f SHA512 a173bd06445d45e64d34fbcbf7736c7dbe58045d2b20dc9d3f3759b5ba33dc7bba3c4bcf3d226fd06f0c151cad7cb11645f0996f0b814386a0e7ab50ccc30fdf +DIST github.com-alecthomas-kingpin-947dcec5ba9c011838740e680966fd7087a71d0d.tar.gz 44386 BLAKE2B 6bdff266da6f9b96cd8c3c04e0a09333ba3435228f3bcd1cb65372dc8ff9955524179ef5f122998925fb3d91b536598b5312eda41418082771c4a9c16bbbb2c0 SHA512 e143600cb6591aeb6f4bea461f866fdfb5563778d1c472d27c2d37db50bed74de6e3874c204795aea0a8132b4d6511795bce25e689f74400b0254288d11fdaef +DIST github.com-alecthomas-template-a0175ee3bccc567396460bf5acd36800cb10c49c.tar.gz 55291 BLAKE2B fbd48545b6a5809d210629ca3aeb03c366051601d5b2f7718f79a96ec18fa09f18922c1a3ffcbac3abcd9b8955871b5bb4c71c23a1839cf7f17d8372bc3478fe SHA512 5ca546170725c3bdd4d9b27ca3976d6dc6376be8db685e6e26cfaef4a51560f78702b7babbe5ed0b2d934d0c32867bc69b11ae757071dc143a4453e6e7ffabdf +DIST github.com-alecthomas-units-2efee857e7cfd4f3d0138cc3cbb1b4966962b93a.tar.gz 3442 BLAKE2B bb3a4acac34764b249cbec5f21fd260ab6dea6810183d12e13943657037903b874a209686b6913e8529a578cec4fb364adad475577c28456bf92add7f5ac9498 SHA512 855f15eeb83bdc16981694f522aa1e200a3857ed11ae87fca9b0cc70734eac76f5082bc3ed92f843b818da14b58dc921dbb1aed4ea35de056c087a64b7e25fe4 +DIST github.com-amir-raidman-1ccc43bfb9c93cb401a4025e49c64ba71e5e668b.tar.gz 6584 BLAKE2B 9a77fbed7d39d6a06a17f2d17ec664f883df668e4f14513e79ee1789e5771e16c8b8ff87f60fbb7006bd33e8cfd1af5f5dd68ce8bbd55dbe22dde3b42cdb321b SHA512 9ef07792b0d8a6e9d43f0061cde0a8bf072e3df35f01a6ba27293061cd9b52964bbeb3c9172d1147d379dd8d07ebec2137360ccf38297b04b57e69685c6eb998 +DIST github.com-amir-raidman-c74861fe6a7bb8ede0a010ce4485bdbb4fc4c985.tar.gz 6591 BLAKE2B 7fde57e3264ad140c4f153be833cdd767b4bebf4a857b82d0de0cdc4d6615b69eda11c3e8bedad8ae64dfd7f62b895dfcdac3445e3d9047a67981f3148cf5f6d SHA512 fe97f600a25d1d8341953b2e58b58dd1664d5cde5d39a7a14e04799fc9035ca66654b1de52a82be729a289b21419791558eb71910f43bcb9af797456710bc383 +DIST github.com-apache-thrift-4aaa92ece8503a6da9bc6701604f69acf2b99d07.tar.gz 2557988 BLAKE2B 41bd5325d9058225a5839485c67fa0d083d27ebe61ee332348848a0df362f190cf508d7993ee407ff514fffc4e7da8f488fced01695a8f6831e610c4a1007438 SHA512 a2d07f458e2249e1a0213be9aaae6b85e7ab69678b4ea2d5bed75b66657d364c9fe542a7b678546d60b27078582791ec59ea4f59f566dad58cc5ea8c60d65654 +DIST github.com-apache-thrift-f2867c24984aa53edec54a138c03db934221bdea.tar.gz 2916311 BLAKE2B 6b0944fb0942c271ba097525eba10fc2dcefea0064a5b46f5ed2ef6ae063a13fd06b4cdaa7f12c91eeb5e9a3d27ae3bf301eb4fcdcc750f392b60d4fb22cd0b5 SHA512 1a8a0cd26ca8514e9b7e09e1aa9d913b70aad8206384029cf852fca9a45dd7c3e5f20fdca84e5db688561784556410f6057acf542575fea0e5dce8b03e4d5a48 +DIST github.com-aws-aws-sdk-go-bf8067ceb6e7f51e150c218972dccfeeed892b85.tar.gz 9019902 BLAKE2B f85d28f2398af1f6deb22310419a66fa6c762413ca40f10e9afb7e8dfe83a46ce3fbcd88cb5de17d543366df47f28dcc3b97e2548485ca672e5ca2b6c279781b SHA512 c78192b79cf34fc7313ca6248b35f3b214cf4e001aa40a71b6f6f0d408aafa568ed1cc877d6f6dcfe0536896fa7cc617384dbe63009fb8c4eb8b38be7c078bec +DIST github.com-aws-aws-sdk-go-c861d27d0304a79f727e9a8a4e2ac1e74602fdc0.tar.gz 6859427 BLAKE2B e57030e7ddd23ec8e062eee9a9b655c7cb691700f1c62ef1a5b0a92f905a1885ae77b44af8fb4e30120459de5597aab66ce0234a535d5211c3b1ae723d3aa547 SHA512 3686b29ec19de99f5c7202ac8690fcbb492e9abcb7ada354ac558b1b9654e81e6826ee3067cf7f541a6f0e25a5c0e071ddfa1aaaa7f980c06f990859992f2218 +DIST github.com-beorn7-perks-3a771d992973f24aa725d07868b467d1ddfceafb.tar.gz 10800 BLAKE2B 5487155a4d010af70b6ea2625d10ae03b6642507902d7dc168edb5d7cf0efa1777b248d0df34ed1a2564950b12613256c1c6ce1d8c9723cc34977ed883b21c8d SHA512 c6aa5df262ab607c0a5f64372fc2fec1ddda9e5624e9d9a22cdd1bc11822c99736d88bdf5e3fc6050217b5084548417cb2926c3940e156da9397d828d59ce277 +DIST github.com-beorn7-perks-4c0e84591b9aa9e6dcfdf3e020114cd81f89d5f9.tar.gz 10593 BLAKE2B 057738aefe26d3d42ba1bc0906675403512a7bab1161bc1015f6d833296778f2236cb2b99bbebd5c7db2384634fef62d2afbfc8dd59bfb1320bc6184105aa437 SHA512 ecac8d361b4695b1fc32a9aaf9e0785201d1bebbf270226540e2c3fe193ad21f4fe8aed4e01937bd1e7273ca394455ca6fd7cf29418710f279cbb8eb92939e32 +DIST github.com-bsm-sarama-cluster-abf039439f66c1ce78017f560b490612552f6472.tar.gz 22134 BLAKE2B 9cdceb4334eeb28362c574036cdfe6bc270930fafdaddb47c10fd629e650d9cc2f8a4984699897629064549fb8b5f069b345ca3aa7ffa1f058718c7e8575c88f SHA512 a7b1516d7a617d5bae2f0148b4f1c6f38f949a80f679bbc5ef27842b92270f5f3d3e3cb1b7a707f89bcafe11ad3f0061d5cb47ac03b980a3a430c1b6d7fc67f6 +DIST github.com-bsm-sarama-cluster-cf455bc755fe41ac9bb2861e7a961833d9c2ecc3.tar.gz 22553 BLAKE2B a3f225becfed01f5a093534ba7fe88efd3a5bb98f2a88b97db72acf5558fb7b54bfc5a2bfd2f2ba7cd6ad1b9d67ebd713db8827086329c11214d200fac3e7b47 SHA512 e6719c4a37244cc8b25a27e51feda64afb6eddccddfdd91290bbc0b60099b77379aba6fffc4c4318a2d279d157dbc3e2eb0462beeeb8e1aaee4de39415edd6e8 +DIST github.com-cenkalti-backoff-2ea60e5f094469f9e65adb9cd103795b73ae743e.tar.gz 8626 BLAKE2B a0d63dddc908f19f3fa6f3ef93efa6451ba3d16672b8fbd7bf216771c640c31b5108fabd19aca5629afc11e2c1216e2b8fe41db2e7d2e42fdabc9f9bdd5af350 SHA512 0f3318068b7ea39957e8f0d218babc395fb344d574ce66ceec584f887575b0ec41f67a407bf749b4224d12ef20d4f01436478b44802473c1dbd08c115ea62e14 +DIST github.com-cenkalti-backoff-b02f2bbce11d7ea6b97f282ef1771b0fe2f65ef3.tar.gz 6958 BLAKE2B 167cf39e313c76eeee19bf95ef9a1593cd983e04735d50c24355a0b9c8828c8004250f8e9d5d6b714b84d488e11f5ca4a7f7c6a3f8dcc7a5e1bd45d0f71b3edb SHA512 31904daa591594b0297afbcd99c2cfff7441ed8a1aac0de40b7bfa78622a1fefe672522315f26f583098ea9db23de7d902e801a369a83770566463eaaf12a175 +DIST github.com-census-ecosystem-opencensus-go-exporter-stackdriver-2b93072101d466aa4120b3c23c2e1b08af01541c.tar.gz 5184517 BLAKE2B 4445e2b7606520a84f4b236f6de54c18c4cee0a57a145ab50f990dd2a690f224baa1757e338207b10756a2f0887f192e922d61244a448081dc7c4b5b094c3a7d SHA512 e45aa8880957a627b8f398f87cfb60e1c7c2e8cb322899d55f544e9173a96660543432d2c382ae3263ab83a67118ec305a8076a0755a6eeb9ab0fe90ad330744 +DIST github.com-census-instrumentation-opencensus-go-79993219becaa7e29e3b60cb67f5b8e82dee11d6.tar.gz 188031 BLAKE2B 6410a5b2e358cdd0fbb8a68ad9ccdf3e27138de129ea4a0fdf49038e844b473b0efa3e1aa7a4f09b362349c0ec86bc96e050893f3cba8ac6a18bb6293b3cebdd SHA512 f97265ca88f2826751bdba9a83597028aa5bef65cca6a39de1593030e50a3f73cc653b881406ab8ef87d88ca30cbb6d8a37bf32e75b093dcff9d236c3d573873 +DIST github.com-cloudfoundry-clock-02e53af36e6c978af692887ed449b74026d76fec.tar.gz 8352 BLAKE2B ddb2b4cc238b52cc39852e100f7450bf97fe358231951a86844a5079a6310c3f5d729311e18f9ed85dbab5089a563ef17ca098adfa8993d9f0e6d177ff9ac464 SHA512 3abec5c46831abf5e1b18acea6933cc0cf6a8da6a0b6af200172ee1f6cfac529448c291d11ec21d1647b226140c9da0a7164930cf913790ad1ece9c058862e47 +DIST github.com-collectd-go-collectd-2ce144541b8903101fb8f1483cc0497a68798122.tar.gz 39616 BLAKE2B db86cbb25478c4e581488e463d48503dce3dafca6a3a8450e79089a975cf75c1cb5e87adea9007775243eb84a5e78ff093878e627b460cfcac60037008a2cdd9 SHA512 d692043922de0661b8bbf0e72866d6cdc16560ee6ab852a926edc77c1a4fc7830623b6471a05fd26269d6b7724bbd4dd9014302ecfe479addf142b945cb11487 +DIST github.com-couchbase-go-couchbase-16db1f1fe037412f12738fa4d8448c549c4edd77.tar.gz 80066 BLAKE2B 42ed47abc61976607719f87b1ee90bc3f37c3297c8c747f795c09e406e179ab0ea21e3566a09d8ee167d18b8b95acef76a231b179dc5f1b26fcd7e773935aedd SHA512 13fdf5290ead5e927d6bdb8a55250b75aa05708697eb7fac0c5ac0b9f220ff1e5f5f391f1a0d662c1d1aeb4b10c8627c7e4db5c4e3ec9f2699e4ac8e91972e9c +DIST github.com-couchbase-go-couchbase-bfe555a140d53dc1adf390f1a1d4b0fd4ceadb28.tar.gz 74563 BLAKE2B 2795db925b046efea5a79e96cd0c49b254a2f18eaf34cf659dffd1bf3bbd7fba820717bc65dfeaafdd6711f29cbe511ae534b5a076977d976a989b7f74e4eb23 SHA512 e2dcc40a483df2f321bbe449c85d68e42fa694697f7bbc78505ab63f0588104c91ab09595d23270b6c011fb6fe26db37d6eb63d421178cc2f9a92282e281f122 +DIST github.com-couchbase-gomemcached-0da75df145308b9a4e6704d762ca9d9b77752efc.tar.gz 39732 BLAKE2B 07851cd9d5f0e474f5dd45685ff3b360a5f785dd09e329d3e1d691db01f7c02226d896c760b45b25824a12d46e3bd9e1da93a6902d40083be62a064ea4c815c3 SHA512 cce17d904402e45ef2f36d324f53b8b325e85f2975e73d732728a7c80aafe3cad169f1c072edce6475cf26f0f8a5c468a3718e4ecacaee779656e066f0a515d5 +DIST github.com-couchbase-gomemcached-4a25d2f4e1dea9ea7dd76dfd943407abf9b07d29.tar.gz 31063 BLAKE2B 1448b4c68b0c2b7ca7d1c851820a51415436da3395210a7338ea4bc29fae426e8db7332b3d33429cc2e1d4f6f1590569720b4327a27ed78175335d89e6026146 SHA512 1ab837f46ca83374ff6a3577ea6095f1062427f9d12c9e82e94deb53630de84edbadee5142baff58050df4edbc5edc9a8e59efd48038fa9543650b8591ee39f4 +DIST github.com-couchbase-goutils-5823a0cbaaa9008406021dc5daf80125ea30bba6.tar.gz 8514 BLAKE2B ca139ff49eefe4df49da8296874881bcc5bc34e31de461bce1db71e34d5b8c399c153519d0d6f46831f7fc4814bfa394e26def66a7ea203e8b9016a3c83339c4 SHA512 ac9b0b643e12edeeaead60d6ad83bf4a14cc24c256ad63d4284954bfa54547f103495c924614db9d283339602bf54be4c519b952808437994a65c5be30743f49 +DIST github.com-couchbase-goutils-e865a1461c8ac0032bd37e2d4dab3289faea3873.tar.gz 12120 BLAKE2B ec04863aba2ca17da03428f4d63426ce4b9c4bec2981a3dc75b26b1001c0062dd72273a5cbeab001591b1d52d11d49def2e799297b245a8d175dacac84858784 SHA512 849f51102104d6c764eba5cf4746fbfa32289b6121089700880df264cf8c806e6e3122260fb6b3d63519fe0565f4ed1b61e0c83dac67aa3f31381e59c6a01149 +DIST github.com-davecgh-go-spew-346938d642f2ec3594ed81d874461961cd0faa76.tar.gz 42402 BLAKE2B e12d244274de239df8b72a2f020ed1f21a2dd2ebaf0448a431a9ec9d9d91a7face3f24936f3359fde39247c03c5aa5a61d2cc81bdf6bb668338cd81097bdfe7f SHA512 80b9f535dd85685cfd346b3c7f946fbc8b44d0537b7a3b7827103237a85f718fee2059067a7e1f21db13322f0d3ed1f7c44c36b451b8a6b5a0f6cf4e4db6553b +DIST github.com-denisenkom-go-mssqldb-1eb28afdf9b6e56cf673badd47545f844fe81103.tar.gz 494653 BLAKE2B 26ee26ec208e9ebf9c422a56c73cd0b4927fc2b0ec51b8fcaff70a3ec3729017f2c246133ea1f8dc5dcd1df57fc3dd079ad46b91a94be2447c8dabc1d3eba6ac SHA512 c3444b03f534a4b0d799b7ff26e17dc83cff28b9df5b1f6c1f1bb69aba7dd0e96cd293f39868cae0b51abe12e4b773e038043ad53ca103d882a7baa59d91a6dc +DIST github.com-dgrijalva-jwt-go-06ea1031745cb8b3dab3f6a236daf2b0aa468b7e.tar.gz 36975 BLAKE2B 8d6ae74ef5b5a07af42a81a6902cbb0dd73054a7c678f35bfc6397d7f9abd79e79204f1eb4aa46cb42f1314122c2a84134d6cdc22cdd987d1040d056143730a7 SHA512 4a46ca539ec70e5e8352621cba3b1da20ba3799bf7615b1842991471f812cb4877dc053e915def3d70120170cf9c6c25b5bfdbfaab92e0537835ad66f52cf732 +DIST github.com-dgrijalva-jwt-go-dbeaa9332f19a944acb5736b4456cfcc02140e29.tar.gz 34023 BLAKE2B 7afe737200300a7f05970a5d8b945a9f75e685ad3a17caabd8c4ef5d6c8916a4b743c17ad91a5947c4e63483d825ba00fb8d972a7c06557aa4b71326a24b7089 SHA512 f6b60a99250c37e9e3d983eab48dcb2f000415a7df3015f9ea2d1ed5e4f16e38bcc631f71dee30740f8b05faa3b2695144cd2de46ca487dadabc2eebf108d807 +DIST github.com-dimchansky-utfbom-6c6132ff69f0f6c088739067407b5d32c52e1d0f.tar.gz 8261 BLAKE2B 37171fb74a3a89a4f8707fca7ed05bd9ccac517722c383d2d6bc9abcaed0dd1dde5b129c799f2e81de67ee85039840aa1ff1e32f5dd8138da5f01322c104ee84 SHA512 80cabb8b8e3b420adee1701655429d72d6741652d41dd5f0ccb54983fb3fc8b30ca1e6522e99b0ca602d0478f18aa98be74442626bb3faafd9e90260f430964e +DIST github.com-docker-distribution-edc3ab29cdff8694dd6feb85cfeb4b5f1b38ed9c.tar.gz 1769777 BLAKE2B 235216295ebfcf61e6fe3cd8f81ac66a0bfd9a67da6b8c6ead4c778e0fcd7ecb519bbb67711d502f5f253a4e98604fba3b055458931ab7a03b4d61fb380c8169 SHA512 05caa27ac0c8e16c7a7c1d0de0f3c0f560be51d0bf5f487f370a0b99971f88e3134448a2fd34af694f124f60515ce38923686ca4fedc8141c5bf4d74f85b0141 +DIST github.com-docker-docker-ed7b6428c133e7c59404251a09b7d6b02fa83cc2.tar.gz 7349111 BLAKE2B 5bef0acc62648953a158da9e4bfc51f191c76abefa1012ddd55bc26706b156fcb7d551404cf92ba812b81f44c9356c1aeba0c466255b6374832d1ce46db9d0c4 SHA512 fd13b9ce6fdbddd19d890d039561a558da23c8b2fdb4df746d346884dfd6cbc60c06c05d303bfbc6ff8ea2ef5ca144d49a88e9168c9f7d985f0985eb3acd4c95 +DIST github.com-docker-docker-f5ec1e2936dcbe7b5001c2b817188b095c700c27.tar.gz 7785640 BLAKE2B 64f137c9d8d781ddfac41651c01d0453c83ade6cc6bbdf36cd64f0080fc7b4c166d1655945b57701292d337938dc6624e2deed9fefd054e2053162ca7aac0d3b SHA512 ea0444b07d0fdbc7e88ea0a967861ac26ae8a33ae1113d8e32620b838ac5508e186017552454cd7f54676bd34f239324a72d976b94cdf997c8c2b666d6146c69 +DIST github.com-docker-go-connections-3ede32e2033de7505e6500d6c868c2b9ed9f169d.tar.gz 29802 BLAKE2B 60514b59195e988e236db3bac4e3a75991ee24d2e4fc404f60d6dbc332479d91564e30d7f3e8080bc251aaf532be47f242b2ee06c6c44668d14f52db9985d96d SHA512 67e1b3bdda441127e2aa72a3d7552e9a9477324db35d706c0ea84fa37953ad50b4770eb49c6cb56b9765ff57f9a47e8313941d29527224cbf587a6856d0762ca +DIST github.com-docker-go-connections-990a1a1a70b0da4c4cb70e117971a4f0babfbf1a.tar.gz 21638 BLAKE2B 078a0e1b9dc7cc80d36d41144edc772f72da9ea4ad498c615e6cfece24363e5481b54fcf0ba061121faf32118141d5671611b815a697d865f03e485912cec6f7 SHA512 08df73a0178f5da2042fc13b4ecc72fbc4e83aed984da74b6082ac7718dab1014c27a9ee4b556d53da8dd3c5afed8c8ca62441d46f5c1c39f7f6690f44c480ed +DIST github.com-docker-go-units-47565b4f722fb6ceae66b95f853feed578a4a51c.tar.gz 11225 BLAKE2B 2ffbe3d6877bed76f7b91f3d1aba481f5143d7f1b0703ae1fb4798cd09fb1c6a0c07572a40659c1604f12087aedc5c9e342903f22b71dbfdb6c17f3a85898c29 SHA512 e83bbe0227e6c27d1562cb858b678bcd26a89430b7d829b38d5dd8c441fc28da7e969b23cd1a3dbb5ecb5f68cf078e6e0958a971428e0260b4b3c2c16a3ea15e +DIST github.com-docker-libnetwork-d7b61745d16675c9f548b19f06fda80d422a74f0.tar.gz 2725037 BLAKE2B 7614de4ebae6868caa8d84b2b8c569573af60bda0a599c6d842b3423a60bbf8849f51287589c9404295cbf5da9badd22c9b2e56b77c9d68778becd031c39a958 SHA512 dbae386bb01f65547ad94a5742a83e6aa15ea7306ac8ed8c77d98c624d031ad9a0ada6eb57b48aa13fc636e0ee47fb00ce83c930ef69c6f04ff3143af559d779 +DIST github.com-eapache-go-resiliency-b86b1ec0dd4209a588dc1285cdd471e73525c0b3.tar.gz 9581 BLAKE2B 85ff289383893cd9c5a0dd6a49c6b1d519f8808aa22a79fe60e6a4a747daaf21d00bcb66ff40ce197cff029d4f8657746e05e88dbec52eaa01b7a75995770c84 SHA512 eb180b57409e85e6299f4276ea98f0fc390d2ffc67d1f371f5675cebe25d9e50fe8bbd4d5dfd11e960817f5ae42e0790e4dd7264946efd8c42680514976d6fda +DIST github.com-eapache-go-resiliency-ea41b0fad31007accc7f806884dcdf3da98b79ce.tar.gz 9875 BLAKE2B 20c62c28e7ba1b2db02b1817e3340791a3ae8b4715702a86d24d6ce9dd7b506a2a6b269dc63d68271f9fcc4c17674eb7701088e1eb8111869178a8ede25f8a21 SHA512 4e258a2a67208384aa48f54064eaf63e9e62502aca87e06442b1ce0c123202f278afa505608bdaacc6e47707bc9d8bbdf6205791f52c3c458cc9e69b485107c7 +DIST github.com-eapache-go-xerial-snappy-040cc1a32f578808623071247fdbd5cc43f37f5f.tar.gz 6678 BLAKE2B bf85ef01896a7b64677ba227cf75708da9c2210eb7cc243eb42c8ea89c472d8cb03999bc5c9d1acded002f0093744200f061477614974a4440b873dd84a9a74d SHA512 41f406db3571e640f0f4ee14878988cc7a9a7e012814cf83e3da4d96e17e5fc48d3824120534980e0050dad03571c2b9c54de953612a2c5bcb08cacc01bef9f8 +DIST github.com-eapache-go-xerial-snappy-bb955e01b9346ac19dc29eb16586c90ded99a98c.tar.gz 4098 BLAKE2B 81ca12d160ecbf83856080839df3ce2f500106bfc5a0be73f8f2f415c7fa98556fb9c1ef3d2243d8bebaf7fe0e26adb356191dfb12e0726c65bdc56cc4db89dd SHA512 2c3547cb00a1c606f2006412931360f17d7eb1a56e3bf764941cadc899f98098d49b74d1a54abe2195bbaa16ee1530a9654ebd19306466a411b392e43408fd63 +DIST github.com-eapache-queue-44cc805cf13205b55f69e14bcb69867d1ae92f98.tar.gz 3504 BLAKE2B 3e0149532ffb89b5bd6ff3c53689e659f6d4bb9eec5d6b50b8afce2c56fcabfc4e3b3ccb5fe0a2b86adf5a758c1acb36ab733efc1dd10adaf47e4a80d594c88f SHA512 5641abf798c2e238885f692262d5b6932c41c770f9a2a6806c764a31a14e14b99eccc59d3571a83919aaeaa619fe1f8e5e492d245c6d6d41fdc03c45d2b69670 +DIST github.com-eclipse-paho.mqtt.golang-36d01c2b4cbeb3d2a12063e4880ce30800af9560.tar.gz 69531 BLAKE2B 6e925b822832a1e0d2e412cb6358bd604071c86069c04e76e90b93023f61f976b6107f72ac23f401357fb6b4f3a202d6a0d2bfe8c29a074d15241dcd83c70bfd SHA512 04a4c579c00fd1e650006dfdf5df160915b2d0f60ded558a01b75c26b5192fbf2986c8dbce8dce2fdae3e45be002f73e4f72172e86feec762d713db9c878dbfe +DIST github.com-eclipse-paho.mqtt.golang-d4f545eb108a2d19f9b1a735689dbfb719bc21fb.tar.gz 66660 BLAKE2B dc2bda173e612925a54661581226f90059104de6810556517cb7edbe1cafbf232c0acdad293a4293dcfb0c24d755e8e29d8464690b3c71a08b3ffc5c47322d04 SHA512 97231deee501309fad3d462d0325e007a24b297e75a2a6df93354a3ad2a716badb9f0129649f8efe8b673f4f220fc953127c9b0dd2582fea246d5836f10d37ff +DIST github.com-fatih-pool-010e0b745d12eaf8426c95f9c3924d81dd0b668f.tar.gz 4998 BLAKE2B dbb6d34fe885d0067074de82be81ba11b09fa611a7a7637703329f5c5254ae20c59a130b3d08d58138d9d0eb3d665e7bf608efb567b061163d446e26d7546ddb SHA512 2f09663bb4e7529e0969675ecc374f634d385b0d791c3f02e3c9c6ad1a5f471f0e7b59be5975a32487019807aec5504adfe63400192ae4f96bc9d850d84ceac1 +DIST github.com-fatih-pool-6e328e67893eb46323ad06f0e92cb9536babbabc.tar.gz 4879 BLAKE2B f2a9ceb7a5cfbf5c97f4e36501ad0d3398e12b84c27d24703270af8d5f923674d129b239789df23bf852ce99cc088fbc7c2ebd65f4fc2dd442efab4e86432d03 SHA512 e2c189b201faba0547b28c1a5aad21b83435a6dbd917c6d473f9b20e76162b4a669d0d7f082a67bf49b00622b568425937e706bb786d9c3a0907e794979b0d04 +DIST github.com-fsnotify-fsnotify-a8a77c9133d2d6fd8334f3260d06f60e8d80a5fb.tar.gz 28484 BLAKE2B c3b970c1327735b7b04c0eaa47fa0b75b98418124fc39ce9942c1886151f4f4a1aee3fb17f689fd3840b5fe43752253c2b40b0345f2c1a4d7d9b7141d4e94d2d SHA512 32a5c8757310a7f28f9cba4db45d1222aee6435c70d86284b5997088a6c12d2e8bc807aba88bc067069ffb39f18db9304b8133521e05d690e01566f568d8624e +DIST github.com-fsnotify-fsnotify-c2828203cd70a50dcccfb2761f8b1f8ceef9a8e9.tar.gz 31164 BLAKE2B 8ed43520ed7df3f52585b41358e2c89c55cd9bcea78affbf76d11cb2d3660e2de63d2debd91cd4da7c1a1fde3afac1086e616ab632460389cd4f10cc633a3e81 SHA512 809a90dcfbf565d335514257b577150a367e16ef871e2f44584a13fe3bc3ac87cbd789f7c7882a76cf7a7c546740c6552ec7382b4a6d18c4f0e845bcc3a7b0c8 +DIST github.com-go-asn1-ber-asn1-ber-379148ca0225df7a432012b8df0355c2a2063ac0.tar.gz 12439 BLAKE2B d49535fe09010e4c4b824d012079f0dc80ea6b6509bdaddf82f59e13920e2594cba07129499f6e6c933d39e5bc8590d856b51626972e5b42bc63cd3edaf1e1cb SHA512 472e259cd7aaf4c6270a85b7ade4392218a51c6309b1203c0aa7770bd431c0c8365c1e588bf15bf67e5298c9b7ad821d83dc97f11361bf623df28a0bb33c484a +DIST github.com-go-asn1-ber-asn1-ber-4e86f4367175e39f69d9358a5f17b4dda270378d.tar.gz 12329 BLAKE2B 2863e7dc689c46de8bedba9216ef9a9489b81d267475891e6113438e17e272b04278d1c8199281af6a9daa9e9eaecbe8cf26f2c8b130906c9c9e62c12eb4b2d4 SHA512 fbba36ee6fd0d33558d4f13b6327a1385bde914c1c40954da19039bb55dc10d0166a1dd7a8650cb9776f2aad6f03ad110fd550a49e9c934446d23cd8eb3279fb +DIST github.com-go-ini-ini-358ee7663966325963d4e8b2e1fbd570c5195153.tar.gz 34504 BLAKE2B 7c8d8552e126baa82bf9c9cc15061fbc275a730bd86ac66728328ed3fc9a457f901e864938c8a30696ccbd37c5a1504f638b96e19d5ad2af91263eb6e58be357 SHA512 47923f499ef8f3e75c3a6dcfc0e94524955f3ebfd4eba65c999bab2f89b234de5c86aef356e07043bc7cf22249c1d891b14affe9d0b1791abaa43a4a5a70fea5 +DIST github.com-go-ini-ini-9144852efba7c4daf409943ee90767da62d55438.tar.gz 32715 BLAKE2B a1aa4dbb8a77fbf6a4f1abb6a06156ae23c221077d500bc304c921d9b11dfcdfce2191e4f6d9fc94fb0f1213c53d3135b0b530ec5070a3d3fa38b81b0f843757 SHA512 ec5d6e814b34c948e2b7acb0d79f481e2d3ac4c7be79e99f6eab8f3ecf014bce35271d9a630c8dedd8c8d61fef81d90c942e08243bc33619dd140b85c06338cd +DIST github.com-go-ldap-ldap-8168ee085ee43257585e50c6441aadf54ecb2c9f.tar.gz 35732 BLAKE2B 8676f22542449d6de2b15eab088377696df3bb01daadb3f52a111fc8f87dc1ab62ccfe6f25fa0687bd161271a8564d092ec5ca10680cdcc09d6710a9f1ab48bc SHA512 892476cb567338cff9a2c46699f9b2ed85a2e9951e222f190733cb17d4c7c15be709256235f3c8d0bcac9cf2a46133eaa593051acfa204b27b2595349210c635 +DIST github.com-go-ldap-ldap-bb7a9ca6e4fbc2129e3db588a34bc970ffe811a9.tar.gz 36405 BLAKE2B 9d246e5f7504ea880405318643dccc141b3c9fa97dfa9ca5de5f8c21d68debbe1ea6d0d40e87181694835e33bfa05696e62764b28312ef8a43e89d4c262d8ea6 SHA512 b065f966d14c216a9e4e6f58a3f17d63f952c8ce25ffe464774c6f8cc69676f2e786afec2d253eb2efe223dc3502b284cbd34465cf18b74c621073ca20dd5ffb +DIST github.com-go-logfmt-logfmt-390ab7935ee28ec6b286364bba9b4dd6410cb3d5.tar.gz 11549 BLAKE2B 19c5b90e9c8161cab97798f105c31e7f80fa4e3eb0df42b70b64dec03da057d37884c96ac849a1ae07d75ad5240ecbb48860fd306c5c3555b69ad5d499656ea2 SHA512 9d67369c83385dbba9f7d7af7b33d2beb1739d996dd1f887057f98d7c2538bb6686f71155652f67f09dc4d850dd9fa6a9c8b8ab4f646c5f1b0f6547bfbfc2f92 +DIST github.com-go-mgo-mgo-3f83fa5005286a7fe593b055f0d7771a7dce4655.tar.gz 376880 BLAKE2B 800038e0870d8b943604bc5edf9ba566d20fed75f445834801955a19da6add891f96cbf5e19a93d520d90ccc4e9da911ab02cccb710fee67b3fe60e4409a717f SHA512 f0e7948d4672d29d3d0a741961ff8a75d30c556e157698118a32de10e2af8eb2ae6a61feea1c93aff313596d285a048a70dae7339c66760ebb91a1aecfb05845 +DIST github.com-go-mgo-mgo-9856a29383ce1c59f308dd1cf0363a79b5bef6b5.tar.gz 376888 BLAKE2B c7a56c91b149f4a9465a3bbcd3dde6e5e05936c64eeedb20bb0beac3f8e49f5594db30b74f0a276e782fc49d0c38863b845984ca5968890971778af9af41b3d4 SHA512 5f9a56a750ac6bdf70f7d879f988d744fd94d85de2dfdbef9e40e69384e36fea558a0abcf7c28fe9f1dac4df2d9d1b042fb1c9a55308539766cbd26b2a38d482 +DIST github.com-go-ole-go-ole-a41e3c4b706f6ae8dfbff342b06e40fa4d2d0506.tar.gz 51315 BLAKE2B 305b69a9ea950a496fa0479629a7a681ffd7cbe86742d94946dc6890a55b35c4c30a7317cdc336d3de372d980a60787e54b6334575a9b21b2abb00a7d99a8aaa SHA512 907c608344085cd0883a48e81ab7b366d79b70966d345541a030c827c372abbefe5b5fa4743f4d7911fc25d925c01e624d9205d6d43780294e2f99509e466b66 +DIST github.com-go-ole-go-ole-be49f7c07711fcb603cff39e1de7c67926dc0ba7.tar.gz 50568 BLAKE2B 21a9357584b08c97154907b8708916f4ee773adc6fcbcea55f5561d27392f56b698a8dbad5a47874f8b52fe5a952973a712d32c00327d9e880abcb095ee20762 SHA512 1e299650a92bfbccf88c54b6df3e0611e9d6e1ab549a0226d69aa84e1bd6ff1d6d486e6b6b5e4dc92f1d5dd292104f1970acedf2ba9f7f2eca2d9f7ac0ce7530 +DIST github.com-go-redis-redis-83fb42932f6145ce52df09860384a4653d2d332a.tar.gz 79768 BLAKE2B aa45f2cf3a78015375d827b2fd9c5c3a199914c5788f2d021de09a010e853a3bcf81f213a5743b33fdaf4357aef730d629c982afdc21d7dd1863d6f8f82b842e SHA512 653d700a5d53d843aa5e517253876973b2dda4f95740da4ea0df8c0af89e836c9c04e25554ec9c3cfa4d2103d009f953624008e7b00990c5021aaf7f04ffe61f +DIST github.com-go-sql-driver-mysql-2e00b5cd70399450106cec6431c2e2ce3cae5034.tar.gz 59901 BLAKE2B 75e2b9addf9cdfd5196f2f2716e62146fbab00f20b54ddfe7b847143d1009f2007d5b97a1e916a63c48e6d500e5f206f8134ffd872f0d81733a58548935bd85f SHA512 2289e238aa27509ba0024481384bb622736eb4e498e0982a595f8f5ff81a3dddca2ee7a49e4ace7512de2eae79d2ea0d72eefea19ee090b4412e862ce17660a8 +DIST github.com-go-sql-driver-mysql-d523deb1b23d913de5bdada721a6071e71283618.tar.gz 82956 BLAKE2B b8012edb9b6143be0da8fe6e25d9a3db8dba32366cfeaa5db8ef4c4aed48a5daf8cc5281ae75061feeb82cbed51471454fb22085b91609fe2d0d84b5ba2f47c1 SHA512 749db46ce9860da193045098000810efab954448812bf6ff9e82d958c107c1dd10926148dd7ef4f7f9c565ba2203b2b41878bb074afd4376ae6c84fa46cd4ff8 +DIST github.com-go-tomb-tomb-dd632973f1e7218eb1089048e0798ec9ae7dceb8.tar.gz 3633 BLAKE2B 2a534367618bbe36a99fd681725951e3d85d51e4e09178fbf4dc17a13f430276d12329f8a1ea59e22a555b2c8ac82253b6727e646dd1acabe3c5d945466954aa SHA512 4d566a0f57513f11666fa43c3b991d2356007db54df4f38b97b9719d623b123a6a8a5ed02d14b5d6020fe39162bb3247a7ee1e4054493ff89a4de2cbbe156e89 +DIST github.com-go-yaml-yaml-4c78c975fe7c825c6d1466c42be594d1d6f3aba6.tar.gz 60827 BLAKE2B 3af244685ebd6846ce1120a31ef7e6c54b3b4e47be7c92a7251a1e626e875999b6e201dc99f773a60a90768e4dd885af67bc5bdb3802d327cc80894b392385df SHA512 7b02a88190835a9ed9ee099d4f8b244fad74575fd896fed4d780bfc94b0b16a6cfcee73b5afd993f2f55e66a5d25acabab24b6cb042280e5aa1eaced56da0e5b +DIST github.com-go-yaml-yaml-5420a8b6744d3b0345ab293f6fcba19c978f1183.tar.gz 70322 BLAKE2B e4284bbc1825c0e78cf2818091d2d25c581fd5da86d66eb8f91877b8a92f62400962391efb911ff33ffbe3db1de432a892dcc3670f96710fdb7c2cb191309697 SHA512 a5c4cbfc12e932f161c827537ad8366d8c003f40c3959c39bba9b6032e3d381516998a046429ef0980072b717dab0ab1df6b1ef24a43e66e1bf4bda176302b49 +DIST github.com-gobwas-glob-5ccd90ef52e1e632236f7326478d4faa74f99438.tar.gz 25955 BLAKE2B d6c9b20f80800396ebc3eba2b08ad48522d297bd0da90ed32d6ea2ea4e575e9feea112513332a3c55bbeae2569770433466536698084e787127866efaf0d25c2 SHA512 e5767898e8aaeff59219e0a0578586b63717d5c8507c74ecb813e8e8a7b02470b10df0452cc378c7f0a4b9bec030be22deb3c3ce7c5ae88fd739271cf05e36ad +DIST github.com-gobwas-glob-bea32b9cd2d6f55753d94a28e959b13f0244797a.tar.gz 25066 BLAKE2B 3560652d11e0048723a132111e168249bec29c10b2102c921763ca3db29d4981c39bca78a2665455e32fac1281baf843ea7308345de5b4ecad1b5553651fa8d0 SHA512 f4df44130776dba33d4b3879be4de1900815eb6320ec588781e180864dbfa827514b36dd74c1a310442c4fe0a0642a91b79b216541ac433efd87747641eced6c +DIST github.com-gogo-protobuf-636bf0302bc95575d69441b25a2603156ffdddf1.tar.gz 1869095 BLAKE2B 519d4e2a9973edd74093ef63628def02c2f9a89bd6554f07499e691cdff1a595abcca23bff81d5b92b375327545c01dd2807ffbcdb74c75607a4e7623638fc98 SHA512 f78b2f44ae3b90e12f3374d9be41d186b9478a0d24f5086d5dde0618db4ba093c4fc707a1b32a1db7009efc639024f198696a4b99e2c1782a949bc5f9a3e885a +DIST github.com-gogo-protobuf-7b6c6391c4ff245962047fc1e2c6e08b1cdfa0e8.tar.gz 2457526 BLAKE2B 0bf30d4796425fb74891e69f3ad825c21475bb1ae9ab432e3283184787199b31115dfbca6e3afa4bd88eed5c86a916d632f964581dea021c1d93f1d6288106f2 SHA512 ccff6a1eb46eb4e893e80088a13a5b2eee3be63fa8357f9a1feff260af1501b1fef36f4318044993cbded9c225f1555044109389dd4a542b7e229d0d0898f3b2 +DIST github.com-golang-appengine-b1f26356af11148e710935ed1ac8a7f5702c7612.tar.gz 302797 BLAKE2B 45f8cbed2aa2120f8f82aa21a9f3bdf3009d729ef879c8054188312182ee937d6060d5f95cb246405bc4f8de92d95a65205744922495b91a12625af8e39e81cb SHA512 fd833262e344fd866b2c9f69461f5ea71a14478da293361daa539e5f1ecfa5021441354e50ef636579666081668b322a867be6d493bb273a4162b93f2a170455 +DIST github.com-golang-crypto-a2144134853fc9a27a7b1e3eb4f19f1a76df13c9.tar.gz 1617611 BLAKE2B dda7ccdb3288f715c690a61c5b2a6a4aaaf636d8b12379ae09dda8901ef84c8761eaa0da664bc965e6a6b25961b71ff571e00184eea4add3455a175022e1b546 SHA512 4c38f7f4dd8a61ece0faf7b1399cc7adb5e445c59190ef42bf953a8872c0e52bdf6afdf2b2bbd921e76917385f67308377b6d6bddf8466e6c363994155bd5948 +DIST github.com-golang-crypto-dc137beb6cce2043eb6b5f223ab8bf51c32459f4.tar.gz 1306030 BLAKE2B d504e9205dc7532b6735d97d2c761bf19bdf1ac2677f32515c298502e65d03287333af9458d9052b14ac520733dfd5c31d824c007bf68d20dbc0a9607dc64de1 SHA512 17d6ec6de00372b4c7ebc19a6d17410ac4da431f226a61b7a0e11e5fa3d0ec33b3baa99488b5e5f9fb2662313d0d6d9dc6bb5044499b8efe9c3c55718415491c +DIST github.com-golang-net-a680a1efc54dd51c040b3b5ce4939ea3cf2ea0d1.tar.gz 964430 BLAKE2B 0bfffcb7969c3f77ba87a04e6ee7ae68b265f73cf87fe9e7e580641b1c657001e8449443fdc08d9f37805e1be19b0722d7d08eb4968a289a4013a7c2718d4ddc SHA512 f8028e92d0908f265e3366ae87ba9a3cbad6028f1dd26abde1c51b4b1b3d1e982a1b4db6831bfc15a429a2f1505d149cd192d1d6d9dae9a6ae1f40408a6a654f +DIST github.com-golang-net-f2499483f923065a842d38eb4c7f1927e6fc6e6d.tar.gz 768453 BLAKE2B d65875956c833884b408e2515ba032ecf2138153e4ca71821fd48aea6603312a8a5c68a6212676cdd09255d19785aa4552c867383b157368b0dbf42e7f5b157e SHA512 ad0b00afcfd95101939ec307eb6413f638797ce464cd13c4b5810032f633538be297bb30a785bde7623da8eeb6007814f0531572acd67b1b5c5ce0aa1de819cf +DIST github.com-golang-oauth2-d2e6202438beef2727060aa7cabdd924d92ebfd9.tar.gz 43155 BLAKE2B e4455c5b5ed4cb05ebd3ca1fcf453ab6a0818c7a9b3b7b3151ce51778118f240041f3e27107bd81152576ed3b669103a020f06a5185f6f8c7d246fb47b9d416d SHA512 bf4e293ea8687854f8f5eaf3bf1fc127f5a0faa6d97f69f7891d9716348b583fc4b20ebfb6f527ace295e704cf4b12eeb8764ffe53fb0e2e973f11c7b8d5c650 +DIST github.com-golang-protobuf-8ee79997227bf9b34611aee7946ae64735e6fd93.tar.gz 245349 BLAKE2B a0d22b7082457695943afbfd1a8fa64f4aa1c4e26ba793e46d0234f1491775299bb9e554bb425e2dca6ffdbc7a93257b9ed9475082b9ad2b8721719d666712eb SHA512 2961830ee5655aa456a6a38abf304bd242869568f4dd8e527dcf7118badffc037f85db43807cc6ec68a7cc40459e0e277e646df7798cc217cc8f94e9f5782d09 +DIST github.com-golang-protobuf-b4deda0973fb4c70b50d226b1af49f3da59f5265.tar.gz 325072 BLAKE2B bfd31df93d9f3452fe440fa1d8070a8361ac127b620cceb1e63cd71b2e7c744c9324a9388cd07264a243ca7195a8874c73a13651b0d66a69a5d81a4898019d09 SHA512 3fd4fb54d58943fd20b040913a7276f1ce69f7caec9cdd760da3a71ac469479dbf52a74f83e4e9c13282cf553ac109048cf047532cd331393b0881ab08684a98 +DIST github.com-golang-snappy-2e65f85255dbc3072edf28d6b5b8efc472979f5a.tar.gz 62611 BLAKE2B 70e476136c4ab621c38e1335a61673fba0fa085dbfadef480b75d06b1d6759abda7db2566938a9af1112302217af87f015fa9be2c28c1e9a80288158ac28cf18 SHA512 3f0be750c0e40266a4c621c5bbcf4fccf574350a6d1bef00ed9c64492767ef77073a17401115c5dee30e61570cc50ff433c17a3fa9c0bec7b3d2a7b9db4483f0 +DIST github.com-golang-snappy-7db9049039a047d955fe8c19b83c8ff5abd765c7.tar.gz 62082 BLAKE2B 9d54c5fc6331498a2a5f39e498b4be5e6a5401baac89604c13c6ae51dfd98b1c6ecc06b3599b490cde1f698fbbc58339eb613ca28ac3353a922f0b52abf05756 SHA512 ea9a2c789339d3622d20ba7863056ee6a64f53fd5f44c0ca9a75b06f1631160f3f8954fe54538e5a89145b6ac164f388d301bb1c160c25b16f25c895e2c9899f +DIST github.com-golang-sys-739734461d1c916b6c72a63d7efda2b27edb369f.tar.gz 721157 BLAKE2B a78916105f6c59222db0a03862f33c144cfb2965279c2106618ccd61ed65b43a1b164e47d44f49ed81317cf8dfb886049c225df580d03e6a3d3fa9b24b5ef9df SHA512 fe73054e5faa53c518304965703d35538218950ea90aadddba4b21dd6979cf0a576da83ff66edf51d3c507f388874d56e22c93e67d59ffee7d1571ece793203b +DIST github.com-golang-sys-ac767d655b305d4e9612f5f6e33120b9176c4ad4.tar.gz 982222 BLAKE2B 2a44257a019bbfbe512c92a1cae87f3c47eb84141a555fa91b3bda1d8c1875430f297624701f24e7b5251cf317b5ac0eb97d1a7390c14df2735a1a7aaa5cf8bd SHA512 5c99ea8cd842a56380f19c08c24d4476c490f76c87083825db00b40ef24f29c2bb24eb695513895cc8151b98b8b9449db12489e59b6faa528cf81294026ed6b6 +DIST github.com-golang-text-506f9d5c962f284575e88337e7d9296d27e729d3.tar.gz 4529172 BLAKE2B 9afdf1edc0e31d2a1744d85e42f075eacb3b784d21d732022d6e5bfdba95a75a5d56711050e96aa954a290ebee0f602cfa08bf66c4d427db86ee9813a2bd8925 SHA512 301be86bc78e711046b3a1e5dedfbe53729a4ab72830beb9246617e4699a979669d6659102fdb2eea27d98784ebb3bea3f360d55ec589c7c0d601a9e4756a5f3 +DIST github.com-golang-text-f21a4dfb5e38f5895301dc265a8def02365cc3d0.tar.gz 6104978 BLAKE2B d8fde4e6ebb493541a73eeaf273b02f37ffd2dd83ade91ae37c16d19c719a017e3e22b9927bccefeb2f29c703f784dadc12bc616d2a7005352ce3e21a59a9357 SHA512 582eeaf7e65e1ba4ec7bb18f7b429984b3566dc6e5cab3c88910c5d66c0d0fbaf900daa26cd5a0e708cadb695501e2557016d138150b1084ebc8a37ea02a40e5 +DIST github.com-google-go-cmp-3af367b6b30c263d47e8895973edcca9a49cf029.tar.gz 57938 BLAKE2B a10efa5d85685480d114cbb963f62caeee730fcc65ee4214d7fc2730d343708c0448947ea6bddda53cd4e02908cb0e7c665829b72a5c40646d01eff2438b8bc2 SHA512 9b4e5d4a2f224863a41e68ed7ab45356a44da0a176b51493a5c59c19239e2311d734304a1fbf60569d6efd6fb190d09f5dee0672314ad6dcc68d179b61defef9 +DIST github.com-google-go-cmp-f94e52cad91c65a63acc1e75d4be223ea22e99bc.tar.gz 55190 BLAKE2B 96192c137d06707b736f948a3ebef8fe596eb6fb8126ae6fb31875f1c683c06bbb9d3f6c01f67764556f04b09af16a040c36d2f7fbfd562366b77381d6749c3b SHA512 908c0df04a7db9127a67f74af83ea4ae00e5661cff66e8aa033b6bcd8ba9df70ad6a90c2d6b1c3372cf62f6890837abdfaaacdbc4318905f9e72f2b8dba15485 +DIST github.com-google-go-genproto-fedd2861243fd1a8152376292b921b394c7bef7e.tar.gz 2093876 BLAKE2B 1677b947d29629b176212b51c56f0ce0cae918f9c37c35f7e5aac121114cbf6dbbe81881df94c272242bf49d51ae125ca6ecea98294cecd253ffae6c1e3d0f52 SHA512 81079873a66d3e2bff33e7fdbd64a63f086db110bbdf89dc0520e7646d29d78b1990abd1725c2b2fd3eb3203c271bd0b0b85e0583ee42769df708cdce69530ad +DIST github.com-google-uuid-064e2069ce9c359c118179501254f67d7d37ba24.tar.gz 12733 BLAKE2B fb29066f37f5f7d6aa5c7e0cf4a90b9b16de012d809034aaaf10ed4a43b5941e68c8925fe991ce5b25fde56995e8e66317fcab2caf97a722b12cc03825190488 SHA512 d3c2b411793681cf5b55438e3ba23512b6edbc48677c2efdbaea02d226519690525aba848cfde45205dafa39fda9f2868960b39f744aec80222b61dc42b77da7 +DIST github.com-googleapis-gax-go-317e0006254c44a0ac427cc52a0e083ff0b9622f.tar.gz 6194 BLAKE2B 1989ec7d4037c79b9bff29517e710003c52930e43f80f6c3afffa88a97ae4dffa073122326b7544cef3e86d72025707a5f888e6df0d934bb629078fa7aaaa821 SHA512 880d9a46a9ed3814546049f50b71824f9b59bd89dfc8c8d0d2710a69eef5036f70a553495c72783d9d8336d05a6caf89bcecc2be2f5ad2667d1380d4ad8ac2e3 +DIST github.com-googleapis-google-api-go-client-19ff8768a5c0b8e46ea281065664787eefc24121.tar.gz 9556400 BLAKE2B 5f6a7d36aef23f605759f1edd6d0c1ea3a4e997cee69e0be40352a5903675ae5efa530fdccddfa3dacd94386d4123b487e6cb1078984ed16114eccd0249e96f2 SHA512 8ffe18134e23cae721c1cb52ff7b4421715505bbb8bfdfd8135b0ba9a87b2ccd1e5b85656394c1fe3a1e515d00fbbd80b9d757c963d42398cb50390f7acec160 +DIST github.com-gorethink-gorethink-7ab832f7b65573104a555d84a27992ae9ea1f659.tar.gz 276321 BLAKE2B e12a4077d72f2f0dac7bdb374498ca91acbe0ebb6d2937cfec31db99b3420315f241125d4b5b027d2da8bce754a5e7d4221840843c7272414343c046487f9029 SHA512 21b4df7644cf280d072f9abb8a099b2ff19548be6b80e13ce089d2fd052459084ac10c1b40233ac8d0ebd865f9d0f1db99e30c9cf01f2983acc26990c7274102 +DIST github.com-gorethink-gorethink-7f5bdfd858bb064d80559b2a32b86669c5de5d3b.tar.gz 277174 BLAKE2B ce301454d8a63c3848d386885123044621bb7f6c2e941eb550332d72bfae04997831e73986d2eb4a017014a5f62acfb1e912cc0c0deda072943c88aa980ad6b6 SHA512 f6213bd6e8d07733cc207b07582543bef1d82e613e1d1cc3ac7efb69da22cf70209184220055eb1dfede530e54cdddefdfb5532aca0e35da114907a2cab21687 +DIST github.com-gorilla-context-08b5f424b9271eedf6f9f0ce86cb9396ed337a42.tar.gz 4578 BLAKE2B 21223f052ee73eb2e6b3c20f705f7470f6d1d528f8cf99ca9b62cbce84b8a97aa951f0dc768ef7e5234b8e1e11d08c8b2ac6a12350722742ef1164988bd8ccfc SHA512 12bc7a9c828c450e1b2734273d7791dacb50ba0056922b63e73f96878a2b6ceeb8718caf71421c099d38991954030601b72b30d930e222af161eb3d39bd94ea2 +DIST github.com-gorilla-mux-392c28fe23e1c45ddba891b0320b3b5df220beea.tar.gz 27866 BLAKE2B 2cab1558f5c4d6c298ffc63257deafdec390220d965185cc9fc3bd6c30f49fb59f30d3a4b93741e52b284d70e152f02178045fb89f0c3795779b346e9929456b SHA512 6f2f0727b5e7e62ff51a5c1ebd7fe0790571172010b5c14adc7e1ebe5b74a4cbad37ecdf6e9cd76b0eeac6d4372b887907376100436bafa06377f1c9e03cce59 +DIST github.com-gorilla-mux-e3702bed27f0d39777b0b37b664b6280e8ef8fbf.tar.gz 38111 BLAKE2B 67c8a01011e5b6ccfd96b71c09eb677a7b997e50cee9ce3d19ac089ba1eef2e1d0b7a561071d28dbf313df2792ca6d321ce257eff2e48f708ef0180f026b2d11 SHA512 0659510f74d26810b1be9435fb980f58e01b6343a158f8f86734a7790f3f6e5a4cee333479e2c1b77ae19c26e00ec160f02c8be451fccb021d7e44a83ea0aa2a +DIST github.com-grpc-grpc-go-168a6198bcb0ef175f7dacec0b8691fc141dc9b8.tar.gz 495224 BLAKE2B 5556204bde86a7056b47e17aa057499d4d20a346943cb3c6c1de88abb86617afabcfecb4d18dafac3ad4639d85e500365e82d4aed7e1d49b9cbef1ed4db51afa SHA512 cce1598393f91cc511961ac894d606cd695ac274142116f0bc1cc360a25c46510804fa27e193db3ffba0544970be1514a43a4ee3d8df76646794b79d01ec19b5 +DIST github.com-hailocab-go-hostpool-e80d13ce29ede4452c43dea11e79b9bc8a15b478.tar.gz 7027 BLAKE2B 6857f6b8ab2e3d3ee2cb30503778931b560384d55e529c99df328804922c967edd93c9818622f86f5277f5ab5c055eadca23815110aa90c216a22a510e584fda SHA512 c006f41ead9e8e0a85a15a7e82e3c02dc251841e14d417fed776f4facccb7ca85d0ea8f8eb7d23332ab5061e31870759c0b214163fde683b6b9439682042997e +DIST github.com-hashicorp-consul-39f93f011e591c842acc8053a7f5972aa6e592fd.tar.gz 14832820 BLAKE2B 6c60b4a54a1ee17eb4521ab3c750bdee8e917d0249e72647a05207f3b846a271689b1a4762fa0b8f435031ac5d3b1ed5c4d3a811f9b36eae744673285ad94ada SHA512 db667c39e9679a9ff902f31157a95c30a474cd388200571a237f70202e35c5b78b5b3c07acaf536c218cf1bfccdc48f36b75a6347908ae4746cfa61655d4179a +DIST github.com-hashicorp-consul-63d2fc68239b996096a1c55a0d4b400ea4c2583f.tar.gz 5027123 BLAKE2B ccd76226e81cef368a69eb79d6f74247ced5d058d5520d6a4d3449d170dd644b9296f42af61dafe6e81cb877bc3738f0239e14d3ed725d3e2e502d5e922251a1 SHA512 73fb050f4ae50bd8eac040a0157574824aec4157f6c4527682b1d9759be4bdbed3ecf39ceb6f2ba3843230e9ceff4d33e261ee56ed7def66c71d67585b8634ac +DIST github.com-hashicorp-go-cleanhttp-d5fe4b57a186c716b0e00b8c301cbd9b4182694d.tar.gz 8013 BLAKE2B cdc755ebc4b23c6a82470c9269e388429bf81357f3eed8b27587b508747eb46b3f2b803efb0d13f8cc7df5b18eab1905d8c2cce64661acbc59d48c3d1375d580 SHA512 b782750269060a7ce7e15199fd440584b4f71cc60c7f39922cd7ba09dec4a17bc2b97c017d589b212cf4790df2baf28cc5633fcbbf81604df134ebec3d1ebbb4 +DIST github.com-hashicorp-go-rootcerts-6bb64b370b90e7ef1fa532be9e591a81c3493e00.tar.gz 11602 BLAKE2B 062c74e0d24d88106e64b9296f0827ac2e9ee3d11824c3a9f26ad4bf88a43284f46a6baaf738b071e15ef31200bb6df134181efc8e63a18b64d0af2d11bafc4c SHA512 46344ed3a666f78a4adf6a978e940be080f2619a476d025f2805c7e7a663f3fd85d26f5549aa02e3030ff43cc260d0dc3c78a5624d8545e5ab599290c73c0f39 +DIST github.com-hashicorp-serf-d6574a5bb1226678d7010325fb6c985db20ee458.tar.gz 1446430 BLAKE2B 9ca21732b529a5086aa239bd0eee88a6fd3615e1d69cf4b8cad848e1fd861bcb6f0457a2083d97b7e2ffc7d4c9a8c83ae239ce5cc106cbe3793a51b45dd1592a SHA512 31ce02bf02a9b6dba82a9cda4a816be2b1cfdb304ef1739af5d37fa702162c802d36e32e115cf985588df908b7e52d70c2f1384e68fbf924190c1dac220d085a +DIST github.com-influxdata-go-syslog-eecd51df3ad85464a2bab9b7d3a45bc1e299059e.tar.gz 105184 BLAKE2B 91c3ef440bdcef520c12262d24efc25ee1aac881c5da30046f78c938024d8296b75c9f8a8eca773370ab409088b8f862b80f3c5f96f902857b3926f0737d82ee SHA512 9373151efefef9abec874b79eacbdd0d218ce11662d353c3c8a5155baf44121a8fe18b652a116ddb5ff2401511c171ace7973b7c9b25b0d9c23188a31e078b2a +DIST github.com-influxdata-tail-a395bf99fe07c233f41fba0735fa2b13b58588ea.tar.gz 38156 BLAKE2B d4d58b09c4348743583d3f51101e75a9ba2cbabf68a888448e4f8d03059da6e18a45ff476f55ece01be517d76eec56daec19987ca10e6563bc135c08d0f25637 SHA512 fbbf6dd993e2fea9f0b5680dde8e71225ed05553399dfc0f3997646bdf9ef7a7d547dccbf48c54b18181f992b98aaa3a4d229b4a785c43fe61da7c6e23874b00 +DIST github.com-influxdata-tail-c43482518d410361b6c383d7aebce33d0471d7bc.tar.gz 38193 BLAKE2B 0f6897c7d93549412ae8e615253cb7b5662477207b754b5fd4947b9027e24d3777d2e46da18d6641a29e4a7a894f410c498e7d71ee9e7ca85da264a2ed508ac6 SHA512 c5194630564620cc860aaa1b2aa333731a54c1ccecef8f73c723b1e808ce33c86ec12b846adb746f1d8110ce5fa98b5fefd2331e69e840a212a89424781640d0 +DIST github.com-influxdata-toml-2a2e3012f7cfbef64091cc79776311e65dfa211b.tar.gz 34658 BLAKE2B 9a12af23ef2bd7279f33a1d4f5f4801898ca46675861234694e04d4f44859932883c04cffb395a60a3131949ff7237ccc25719fd3952311de43ec11d3fb312d0 SHA512 afb0cb4bd9f8a995f0354ed03774dfe3414c00608ab3cb28661e2e34d42a9e8341a4c7c0efe98b3fdacfe097d143f2ed94562e84f202b239b6376a2badea5612 +DIST github.com-influxdata-toml-5d1d907f22ead1cd47adde17ceec5bda9cacaf8f.tar.gz 34616 BLAKE2B ee4e675c5602a919a4a5fe01e9a70d2c9ce9efbb9350377aa2851b2cdf3499f5615336cd538a8611b5fd5f6315de081eff980628d4a65707f735bc7aa09fd7da SHA512 ab37be1fcd5fd63df37f51bfd2a51949f3b3740bb006e3e786008aa5877be440f185f67be39709a8ac8aa6a44f515b162fb318a8cf29da77925c6943e37ddab1 +DIST github.com-influxdata-wlog-7c63b0a71ef8300adc255344d275e10e5c3a71ec.tar.gz 2720 BLAKE2B 30b034d4e560f7cdd9f99d1f1a7a0bfdccb58692e5b78f083f9e828352e88cf5a21ecbb20882d36b273aa41a9f447637e74e621944dd790129bf39401288afbe SHA512 40e5e310ed371fe0c43bb15d926b44a5ff1fb4d79b39864ff957e2d45fb1d509c542098ad701f5b5ccdcd000ab52d03eebdf81296122255b3709125dade4d9f3 +DIST github.com-jackc-pgx-63f58fd32edb5684b9e9f4cfaac847c6b42b3917.tar.gz 178235 BLAKE2B 3ebbc4e93e4b3a88dfad9d0986ab2705f9e3ed25fe5401e983652aa75df22185f86b72a20d17f5019264a908109e5466800bd5259cc4a453683ce1aa8cf68dbc SHA512 532d8379b951a33e47011f5d60ea0ad4f028054c0d44f29d179bebba19a5c1da37c6ce615e5c20ea575824138907f47c45219527a1d925b2b055155358a14fef +DIST github.com-jackc-pgx-da3231b0b66e2e74cdb779f1d46c5e958ba8be27.tar.gz 187396 BLAKE2B 6f65acd50ac2ed6409f0d5849245b9c2f75b848287b5a4fb85bb5e6a2e95d5e25a4bdd42e7423a684c02b0459d6475d6ee03d185fbd8f5ff4a5624ddd352c616 SHA512 70a672b4e23a79675a40d187d3b26de1126af3d7b39bbb8c46b9fc0a0c939bb849ae1a9884645b4edd8a7d98aea5f9ef7becbc2ba04b232f248d6e3051f170b3 +DIST github.com-jmespath-go-jmespath-0b12d6b5.tar.gz 48285 BLAKE2B 3dd3d6729fef9fa3f5f7aa09fb9114267202a90d5beb44f996406f9a45c02a281d8a1eae3f5125d03ff267b9eee874b6415891fad21bfaf4e3d7e09125d90419 SHA512 e5c1e322b1f9506edcc1f1bb4efc2d3a6fa440abff16fa3557f4ecb3e82b0be1cb9511712d3ece32e7c247c58ea3aa07197bab0ae2e7aef262aa97adf83dc253 +DIST github.com-jmespath-go-jmespath-bd40a432e4c76585ef6b72d3fd96fb9b6dc7b68d.tar.gz 48281 BLAKE2B faf0626c889aa412c439c5e81b001f7605ee6010f5ff4614933c4c1b43e00af605f221dd1a85977a930b65aea385944ec6ae9ef787a47f67159a3852dc2dd340 SHA512 55d78af08f936ed24ca8dfbbc20176f6b3145bb5ff68da9be47ca8be106b99d79364efd1d7044f605396729c1fcc9948bef233520bb3b8ebcbc5cb999579d05a +DIST github.com-kardianos-osext-ae77be60afb1dcacde03767a8c37337fad28ac14.tar.gz 4860 BLAKE2B 8f5958f711e86899267876fa27d534a34e8d48d07eddb14a82cdad1bd4056e525e74e41161be398e7da9c8c4bf7e03a1dd90e897bda7463dd7c425a20b94c8f3 SHA512 924fb47d68a300e7a17e67259c1ca6f395c23a2d630cabccdcea7ff76a9087597b317c2cdc9cecc42d885ce1e8faab338539f210681f02c695657d7b17039bc7 +DIST github.com-kardianos-osext-c2c54e542fb797ad986b31721e1baedf214ca413.tar.gz 4725 BLAKE2B 6987a7b1fa546260189b272f6650fa738499230e08c9140ece62f1d9c4d65db7be10b37784b742ce15764aab51c43df99e9f2b61ef038ba4048482bf442d1c37 SHA512 178531aa30f0d67c452ffa247845a66f92a9831a5a96e67a2ad7102bd38edbdffba5277c3338e84960ced5cc2923534210bbf8787422fdd3035a6c6dd8d8dc93 +DIST github.com-kardianos-service-615a14ed75099c9eaac6949e22ac2341bf9d3197.tar.gz 16622 BLAKE2B 77b144ab1d7aa1250b8f35548d7b6285724f1a9b6a741097841650d2fd10dd39add968a75241e3c9a02fdae52334e225d639e319fad81dbf06feb192983a7571 SHA512 079b67f5f11ff0d4d4b22d3b415aa5c052e8f1f086adfd371d8a34eead2f8aabb73fc15e2fc1f6b6c1dc59f49a12801d6cb750d5a43a115877dd395fdaaf8948 +DIST github.com-kardianos-service-6d3a0ee7d3425d9d835debc51a0ca1ffa28f4893.tar.gz 15922 BLAKE2B 7a6b29b75214b95a49830d498d1dddd09610c46a9dbf30cc55dd16452137843c54fffa467050e5a3942cf3aee286b3478d306d08962a8dbc6eb20e91a8fcef9f SHA512 5c801f4bacd1e27e06b0a74dc6cea3a580a4cdd399b458839c801426ed9752e9d7ca6bfba10c396b32d79026a302ca3df2990f2909d6c5aa7d5bee80dc3cb14b +DIST github.com-kballard-go-shellquote-95032a82bc518f77982ea72343cc1ade730072f0.tar.gz 4327 BLAKE2B ca31068aeb60ebea4568901fe91de1aedb6842533c98a9b2cfe2a989d6f0a3dc76cb113989c84acae934150f599173af186b7886661ba94a549dedd3508b3cf5 SHA512 6fc381005c055aff7e451145bd2dd5a20591481b416d2d94c1c05ddcfac84c76e3915046d86073f3ace97ddb38eeb6e8a925825ca4629f1687b7f274809d9c83 +DIST github.com-kballard-go-shellquote-d8ec1a69a250a17bb0e419c386eac1f3711dc142.tar.gz 4202 BLAKE2B 8f40c6208af2312edc64666aac781b429199d6a02a5d6efcf30550557760b648d19f178978eea6fa5075cb62fb35fba45deeb97516eef18fb1d2f3523193d9b0 SHA512 ec09244c4cfda891e4978573fd427972d2a85e48ac66b91736b2a5d158f5e6b511e83294e813fb867cee7e8fe05341b429de857c6b7ff5b4f8581722de66529a +DIST github.com-kr-logfmt-b84e30acd515aadc4b783ad4ff83aff3299bdfe0.tar.gz 6414 BLAKE2B b0d633853512aeafdede7ca3d4fafc0f94d250c2705e9d3978397731f5d6797e3e37df5f7dfb0e7462d3b539b0fb9ef80235d232bbac5da3c9a22571b2a509d2 SHA512 852c5952a322eaca5b43c5d9162d7e83032dc9ec4c48b4d5086221bfd965783f70487591899a4ad2e752ec66081bf839ba104bdbaa3fae638b1c0ad6fa63172b +DIST github.com-mailru-easyjson-efc7eb8984d6655c26b5c9d2e65c024e5767c37c.tar.gz 74245 BLAKE2B 2399117b6dc83eca81f2216eb263c896ff5d324a3f592b84fb7056da7634065ca79087d47d8ce165e801b0c3409e5124d6b794ee807b39b722bf75d21de29910 SHA512 84d8e7f2aa5d70487f35dd8db71b3a13cd01a24a32f663ecf2fa76e789ad5700c76d83dc54958a1dcafc8fe764064258759940f3883f18fe65fdca3ad4107f71 +DIST github.com-matttproud-golang_protobuf_extensions-c12348ce28de40eed0136aa2b644d0ee0650e56c.tar.gz 37215 BLAKE2B b3b007f925a4a1c1862c8cbe34c5cd225dfa610ad8c56b5328e6920a44b507680daeea97209370bd6b259654d0ca5791f4bcc54b8bd8970b9aaf994eada16d4f SHA512 2f78290d1448cfc041d10210092d6da6f3df2b9b6c16ff730750e976e450dafe2645ba945319a0a3064c88f9c18652c69c0e0cf69d8931c08d23ffe65a8cc07d +DIST github.com-miekg-dns-5a2b9fab83ff0f8bfc99684bd5f43a37abe560f1.tar.gz 2522486 BLAKE2B eb77d61519b72d059e7058fd4064edef049f523e04d84374cfc1f05b419ec258c7d38bd039e4e89287c572cf989a4cc91b1e163ea25d33db8b5b48e27b73532b SHA512 1f1e140de386daff78612cf66fa4083a42be91221b09cda8e81cd614566202b704f9ce9bbdb1afa7049eb539c4b888517f29e746aa4f8e259f04937c9d00ce5e +DIST github.com-miekg-dns-99f84ae56e75126dd77e5de4fae2ea034a468ca1.tar.gz 170747 BLAKE2B c89f7b33be4cc560387eb4d81cf19fe7e73632c3683a48a9d39084e5f8710ee334e8510525ede01ac160a034b91a08c80a289a803813af8b374150085108c4ca SHA512 5f6ee2f3c7d120a5eebb40515fcc0fbf27e465c24c464f95756a7a959b61b1c5bc598a5a8aabbab96e5a9a34b745365b1da88fe59a2411c72b7a2e193138b2c9 +DIST github.com-mitchellh-go-homedir-3864e76763d94a6df2f9960b16a20a33da9f9a66.tar.gz 3174 BLAKE2B d48095240a966184f05e8cc555f437cf7a20a43ecec22baeee3eefe6b7357ca551cbaca7ba878da51c420357ead39d9afed3511f61142c622964b40047e9bc2a SHA512 1e670fb90aaea6dc6bdfe86aba9fcd9692d38176604b9e960aac08f9bb9c836bebe9559807530641cf8a64a9a74de571afd59284de8441ce148405f4198cfcdb +DIST github.com-mitchellh-mapstructure-d0303fe809921458f417bcf828397a65db30a7e4.tar.gz 15563 BLAKE2B 18413ac854e81ae19576dd7be5d6e2c09bdb6ec8c2c72770ccf1c3a4bca1d7c4f03065a94fc966a22800102c6aeafc43438c50aa8bd88785849316f2d8a5226b SHA512 f4a77684d2919f48c274df444525772e0714d600fa64523cbe0598ff6294e0806d7ce7cddd34b87b852526c0d7ddf9ac2b65e38ade9de8b86d7cf04165886287 +DIST github.com-mitchellh-mapstructure-f15292f7a699fcc1a38a80977f80a046874ba8ac.tar.gz 18797 BLAKE2B 6ed634b5d0e7a4fc586f30bfc5b4c5767e3f17d5fc61e51fea9bd2840bb1707256998cabf64f9deb08b9cd12a3d903f188d7850be0fd9f99f6a25279cfeac8d6 SHA512 36dbf10aff4ba4ce64f4a6a6d83842304b0c4610ab13b0d6d1a10f618775b5cd67714ba50580fb37708cf3e36c3d6253281bd98882000a72fac7c8f50fbc6f21 +DIST github.com-multiplay-go-ts3-07477f49b8dfa3ada231afc7b7b17617d42afe8e.tar.gz 14599 BLAKE2B 34c80983a5f2901ab06914458bbd06dab07b82265daeb8aac4551ad2b207dd1ec0acb2e24fe105afe9e4dc39bdf70ffc66a865b3b00eba0a3cf473de5bbce0cc SHA512 e3af204913206ecc47bc47c45ff0280caff5e8b50b16b36f572ae7de068607962139b59ecc37d0d88b99080c22b19603878a864f82bf75ba8140e22efaf250cf +DIST github.com-multiplay-go-ts3-d0d44555495c8776880a17e439399e715a4ef319.tar.gz 16536 BLAKE2B 9448f9665eef35ada25a9545796226ebf9823f6bc8da506fe1512c4df6fc7dc2cdeadd61a51d1f4f5631f2a839aeeb6b375de7ae182d5814bc5bc9b84d3899b5 SHA512 0803b6c78d4d50c1cb220ba1d575cc69d4dbbf1537539f5d27ee4dda40ca1ed39e6758bea3a0e745365e67a7b477a9e1071b1d4294144fa89dbe66e55677df9b +DIST github.com-naoina-go-stringutil-6b638e95a32d0c1131db0e7fe83775cbea4a0d0b.tar.gz 6142 BLAKE2B 0d210f98f23ebf6f0a4ce27341aa204018d26f2bda017694cb856b6dac2fabe9865369ff80c73bed4801f4cc6c1c2fd7a6567835b80e42ce20a46cff296f6426 SHA512 cef5fa3926a464cfc655345d429644f1082211b003de64e4f2de5809fbee68c4935c2474ad502b56112132149c87a66c9cc353523c526359bf46bdfe0a766fbd +DIST github.com-nats-io-gnatsd-6608e9ac3be979dcb0614b772cc86a87b71acaa3.tar.gz 362095 BLAKE2B b78271ce401998eeb075b0eb365b1f23a3e16d6a08075ca8c97cbaa576e0997ea39905d23d627afb8de3ed68b725c3cc12158a54558faa73d92f9fed449f4691 SHA512 942508ebed3b5ae8a291588f59aa5dd4c70da8b022ce27424045dae504604865f048c1f34cb195ee5839df25b60a3306bcb1a1359514a7ebcbbe3653deba04b8 +DIST github.com-nats-io-go-nats-062418ea1c2181f52dc0f954f6204370519a868b.tar.gz 100264 BLAKE2B 50001e442608abb02d22af11e01d14a2c94a192b41dee6e16c9ad385a2caa5cca505126f1e070d7c4499709c4c2e076f9385d289b6af898b1c8a70a8adc8c3b9 SHA512 d4deae5b279f076c783985f1428b143ca90fcdf4e543551a059979def542812fc0cf71432ee3d2d254db372ba446ffa3dfdcba5e98c61b95993e9aee675607fa +DIST github.com-nats-io-go-nats-ea9585611a4ab58a205b9b125ebd74c389a6b898.tar.gz 82096 BLAKE2B a6e36320c2ce772120b8eefe76a343785fcdff5e8f8ae382cf978a2376458a2ab2bdb7ac06923fd609ab61d9e4666c977d1bc774ae019cdaefec991dfdd030cf SHA512 7490c5dc832a18410a60b64b931452d840d422a469c3540d89e1579692211a1599eaa6e372bc9cf7c2827109b35d65d661a0546b4fb989e5dfd5d8f3b2d1343c +DIST github.com-nats-io-nats-ea9585611a4ab58a205b9b125ebd74c389a6b898.tar.gz 82096 BLAKE2B a6e36320c2ce772120b8eefe76a343785fcdff5e8f8ae382cf978a2376458a2ab2bdb7ac06923fd609ab61d9e4666c977d1bc774ae019cdaefec991dfdd030cf SHA512 7490c5dc832a18410a60b64b931452d840d422a469c3540d89e1579692211a1599eaa6e372bc9cf7c2827109b35d65d661a0546b4fb989e5dfd5d8f3b2d1343c +DIST github.com-nats-io-nuid-289cccf02c178dc782430d534e3c1f5b72af807f.tar.gz 4011 BLAKE2B 2972e86d5df8ce662e6f7a987830621c58d7c8ee16afe8fbbac53c5df5857f8d821c069ae9a4552ce298286ab7899319935a0e804f9d8f1b4575f347d8358ff0 SHA512 cc5cc701c66d4d72c4e479a912beb07bef1f32eea76f5efa86e7a62b69cabaf71c5d4ff382d42de2f1e49c8618d76d0c0dbee2ef6f8b745a7f69e33223dfa4e7 +DIST github.com-nsqio-go-nsq-eee57a3ac4174c55924125bb15eeeda8cffb6e6f.tar.gz 44818 BLAKE2B ab4e74b319f50708ecf95365873bf3b49a940716af731acf5467b845b5a9c92e9ccc8312f3ae54c3f63738101582448ad4d9293a2e9a1174f06376b1a3f7350a SHA512 93aa5fae0b51e8149728523df0393a12f8387b0c08417acaf3224b3ce61265f96bdfc5296a4add19f7eda5e5a2e4896830f959e1b30c299eacfc24dafa80d501 +DIST github.com-olivere-elastic-3113f9b9ad37509fe5f8a0e5e91c96fdc4435e26.tar.gz 282703 BLAKE2B 6b42a133004daee2f667565da80f91520943c499ba8fe221af8cfb0fc461532d22aaa8c6040f1e2d6e94bf3679ebe4b412c5bf5e5521a541803268de92f085ae SHA512 b0c8af12cb0f407b7e5fdd3b8cdb2fc117aaaa96c2b0a5bf6661f897b3964f25532d1ca4ea88aa3622f497ca97a0702fa8bd2f41d52c3f81c5b7900eeadf4163 +DIST github.com-olivere-elastic-52741dc2ce53629cbe1e673869040d886cba2cd5.tar.gz 309228 BLAKE2B ea5eff42cf212d4f6c785545cc2eba1074d605a5148267ebd30d229a86a8a8887dd85d1ca2c75e8e6f95d33a2d02dc9c0c92e3ea0c7e256265146c4b31106368 SHA512 9ca7f4e4dfc316b9d319b33f2c4c48daae4aba60162625a1cc2b72a2ff10418d7cbcf51e0dc22f663878032de16e55d6290faf164e07f2daefa80ae6e3301beb +DIST github.com-opencontainers-go-digest-279bed98673dd5bef374d3b6e4b09e2af76183bf.tar.gz 19205 BLAKE2B 752148dc0119bbfe1c956fe157b205e25fc4cadc71289bff0b3c4fe12a6ad5d8e555d0d782df33172a3619f022ab2b698c1671eb05b0ecc9e500e9829584ce46 SHA512 2a3f4eae058d7379be5495f2b253990dbb59bbc394b5cc2adb948be41e1e4cab76efe388eb9ccc1cb30cb51e0a9d9cb07357b6e24d07afdd52aa08a77ec8e01f +DIST github.com-opencontainers-image-spec-d60099175f88c47cd379c4738d158884749ed235.tar.gz 138697 BLAKE2B cb138a1a060f2a57dba4fe80b6eee332a8e44cea2ebd9a612fda14bbce15811ec3b3145e5d9b40cf5dabecd6c3e3400a3a14d1fc58c717153b6c4458982a5ba4 SHA512 01ea314a0e5529994c8afb5a4a2a3ec58342746b94a2bd357212e448be30e8dc580d9dfee0da7f53a68461125819ff55b6a7e073c18f8d22219919b218988d34 +DIST github.com-opencontainers-runc-89ab7f2ccc1e45ddf6485eaa802c35dcf321dfc8.tar.gz 535810 BLAKE2B 20f22f434220f37a6e6b845953d38fb333e3425ea62ab404b836129bf491583b26b02f9a5cb079129d7e9af4d721afa41bee631459036c7e0443e13cb49556cb SHA512 a57eaa9f9272015ec3260341da0d3114a258d770d38fc32b115fa40ed5cfefb5a6ea94bab3c35a6cb683b94d52d7aa9f741c8f3a7b6f9f13f5d02b6fa7774602 +DIST github.com-opentracing-contrib-go-observer-a52f2342449246d5bcc273e65cbdcfa5f7d6c63c.tar.gz 6147 BLAKE2B 65337406aa23a734adb0e6ae1095b8ac25870fcb4a35076dcebbf4e5aecac655dcd7f2b3bd497cac2ef8e1063229527b702df48b8b30e97f776bd500f58f9671 SHA512 054c9c08cab440af3d77c86635b69d3d57e5c9c788486e5eaf3300508d6167a1190618ee55003cb95d943d468e94ac2392a26e9f8665aeac479910979dd31755 +DIST github.com-opentracing-opentracing-go-06f47b42c792fef2796e9681353e1d908c417827.tar.gz 24493 BLAKE2B 8e871a0ce28f8384dc17b5cc307a63c2dc5769730bb7c12000a89631311def9ad03eeb7de1a52eb58053761bfe3948fd01f4e1716b57695412459f666013a871 SHA512 632f168b37066ebaa92b93d93cca227b55121c68eea472fac6874157842e7e22bbf8f84811ecb450ad14da44503e86075cdf0aca4303b88f676b234589ad6418 +DIST github.com-opentracing-opentracing-go-1949ddbfd147afd4d964a9f00b24eb291e0e7c38.tar.gz 24070 BLAKE2B c69d6de528457d95129a0d652372349a928533cb456c93d8be06ed0ed91587c71634da4800d75b92be3bcf3f959d3afdaa6aa7942535c14dab4dc1200fa2bcf8 SHA512 805abab86f21c206b56b565f427c039c78822e268a6296d89825f50e144f294ba6c1e34ba6bf3f4345dfd7b28d69d16229b07ce16ea7b0404c413de96134f0a5 +DIST github.com-openzipkin-zipkin-go-opentracing-1cafbdfde94fbf2b373534764e0863aa3bd0bf7b.tar.gz 61620 BLAKE2B b8608c91155010a2071779bd075f698e8f2548ab3d5c818403f9c414c5c9b4a20cf22b46fc361b0f88a22159fb894f28f9b0e9bc5c69f4d2c2d0959f80ec965b SHA512 47735260f1732f4f0bfc8e5227c5f06c054878d26581be64a65593cbc0e907fe0d6585fa0df58bb3920a96ebf32b7efe64ca89613b5d802acef56a0e8c639380 +DIST github.com-openzipkin-zipkin-go-opentracing-26cf9707480e6b90e5eff22cf0bbf05319154232.tar.gz 62532 BLAKE2B a1c1775062f1832a093069bc69f64dacc683dd72ce872a1cd5fd99b7ea69dd1e6c13a1d479eee00171bf10dc45fac16f8d9a8abf763ec9a8b89305d672591e53 SHA512 da9c5f1220818cbcbaa370277412319706ccf506853c738313bc97aed6f84b4f313b5d13aef5225f10241740e004846b4df4fbb5e831f3cfc820ac5b6b542c99 +DIST github.com-pierrec-lz4-1958fd8fff7f115e79725b1288e0b878b3e06b00.tar.gz 3555076 BLAKE2B 2eec2b9cf97c7fb2961cf873f15bb368da45691c32a242848ed8db839b461caa96d8cd93ce3e434cb52f2ddf84583f8f856595fb6bbbc07df1b86166482b96dc SHA512 b70cf3a555b72d8fc4479a09616c6090405386c9270b84028825cd5635d4d007cd797ab0fa1743e0aeddbfdfbf7546f9d15b17f411103c7206f8f4bac810912c +DIST github.com-pierrec-lz4-5c9560bfa9ace2bf86080bf40d46b34ae44604df.tar.gz 2638854 BLAKE2B a5f10226d5175404a9709a831f8eeed05ebaa8309379f384b0eedf34b67da90e99d2a73434cc355b2b554c1cf4b8ab542f7b0790b83e77633bde8d1e14c9cff7 SHA512 c30d947cb3769ccc0d8d2c34305074078c8ea3989b0fbe367c14bdc83329ac686ca4629ca246e7bc70986fa9388f781a013475837a897e82987a202fd12dd566 +DIST github.com-pierrec-xxHash-5a004441f897722c627870a981d02b29924215fa.tar.gz 6112 BLAKE2B 41c8bd119d1582afe388e16ddb8c606b7999c241807a2bb41c9a9127323fc6c4e69ec863cfe27e6391d80488bb394fb7ce479880d6660ed83c997ab2cf13a056 SHA512 7aab1fcdf17faac932b67c6df42556feec6037f51c9e710f2c56909970f36110391a4649635277acbfce2d710ef7d1176b8ddf145fb51594d4e5dea542aad397 +DIST github.com-pkg-errors-645ef00459ed84a119197bfb8d8205042c6df63d.tar.gz 11345 BLAKE2B 9f25872e040b5e0602e658fa728e93a300c00ed1064966370e1b676eea6a94d6bca491b2f6c33a9f2c4d1c522a3ceee540aede2dc638eed238de8485500821e9 SHA512 fa82643f622150b44b198451c1e41e042fd7ceefad9d68e32238d48c9a29c6fb14780fca9d9a7dec660365062d4089c638196960fac056b685e7543410774228 +DIST github.com-pmezard-go-difflib-792786c7400a136282c1664665ae0a8db921c6c2.tar.gz 11399 BLAKE2B ac265a73d47b98740a067a2aa94f46aacb520e11795994109152feee990f6c4d6a97478333ef703543c38f997b11d0c7ea007326710804f881bca34a559651c3 SHA512 5f7a1a04981834f0e4cebf8b31c7070718c45ef549d8770b69c45c35c68417ac44b205057253a20cebd66db26c58cef6878d6832919b8a3e1283bc3d2af45df1 +DIST github.com-prometheus-client_golang-c317fb74746eac4fc65fe3909195f4cf67c5562a.tar.gz 83229 BLAKE2B e85b4eda68ab9d653a3a34fdd177d1b74b765044391f457f5436ca6c872c2fa85ea4e3fc5afd0aaa4faaf44651c859a27c4ccd1359ff82f68b7accbdac82ba2c SHA512 aa5945e00e9bd182cc016722a754b531662402a7e620549c97ad5cf24dfaf603911d585a35bd7da63cbde033b7a64181c179724f4dc167b12d537fada4df80ae +DIST github.com-prometheus-client_golang-c5b7fccd204277076155f10851dad72b76a49317.tar.gz 75589 BLAKE2B b739cbfdbdc070aeae55f25d263ae74fa07cb4af0b8d7b9504ccb954c4df7c8bd40f6e2392f16f63cb0f3f41c282e16655ab0d04ffddab241e3472cb6ef04faa SHA512 5fe34c1cbd9aee1d1e50424aec83a1e72d834b25208e35c1af8b30519f6db26a6d54adeacf40006f4d04539c1d2e8f577641c8d796314cd71e9b87b20847b2d7 +DIST github.com-prometheus-client_model-5c3871d89910bfb32f5fcab2aa4b9ec68e65a99f.tar.gz 57195 BLAKE2B 08fa9bf28957a15e543e2d86e5a19fc302f7ef5284796d6dec24c182ce7a3889a5bbe53d58fc018cabbd0bc717b36533043c3ccb3e3355d8434fa7e3dd399b50 SHA512 e44828e3790282e088bedd5c8786948192beb5061e8dedd4f0b2508e31f641569c2c2a7e3899c2eebf4aac0c0fb3a22fc9172e0460fa2372fa876e23807d23b8 +DIST github.com-prometheus-client_model-fa8ad6fec33561be4280a8f0514318c79d7f6cb6.tar.gz 54855 BLAKE2B 2a7fd47a9e1dbc794f5de84d5ee3512b282f5f94d044dd9b471ab5ad138ebf2940c4441e6b4d89404f3443f0ba466fdab8fcf58c92d9c85798f23b5a0c57a6fd SHA512 9d4d52142888edff091f23496aad70ab2924dff3a27930cb6df81c5452ca897b9d61eff74fbd092372ecb4bb005b4d362ea6b0602e1764ea4f2a30e23048a81d +DIST github.com-prometheus-common-7600349dcfe1abd18d72d3a1770870d9800a7801.tar.gz 77798 BLAKE2B 3e8daf72d7ca8d702898349617c48a62d4dd7cc5ebeb65bd63d38978f5d8f05e6d0f02237e1fe285630da198aba90783e27eee69ac6a06f90e1a7be3fad50b4c SHA512 bdf0b2f818f9df4685ec7536a7478cb86ab8a8297081c618d92b14bc0296c2c66c9ccb403b2f4af42a7fed769f3ce2020082e2e983e3f2668e14776a6d26828b +DIST github.com-prometheus-common-dd2f054febf4a6c00f2343686efb775948a8bff4.tar.gz 59072 BLAKE2B 1c93ed6c724d8b537f867f85242c600f003838df7aee8547c8029eddaaa067ac85a63c1486f4376dfd919cfec77ce471bf88966d52e6b40d234237546c6adba3 SHA512 c5184258aae6c7c89b7cdb54dfefee3488e86b6ce7534e48b295e925f9918438e187b6e2e9f121f46e132d51f0b9dd603ff2f8c88855e23eeba39dc6b157dc4a +DIST github.com-prometheus-procfs-1878d9fbb537119d24b21ca07effd591627cd160.tar.gz 24846 BLAKE2B 4f061ca5b3677b6c002824b7b119e451ea95bbb7ff938fab308156c0d289c8addc53b1228340fc1d02710d9f233fb1974a28654b67fc34e8e20aeddf22d2be3b SHA512 3029cbf9b7ff78251964defc3bb537883def3cf810bb06755447c819b7b042d897f3a93f0d9f6096dac07bcd304a75c358cb81477c84802091d0c6540adc67b7 +DIST github.com-prometheus-procfs-ae68e2d4c00fed4943b5f6698d504a5fe083da8a.tar.gz 57831 BLAKE2B e4583c8ef91a8780a4d0341325a205ee509ce61474e8da838f54c9ca651674cd0c368828fd3794121243c707c5e64f523d2483ae205e55b308620acd42e06bd7 SHA512 4362bae6cfe60b839e0b75ff3ae23a608a3e809aabb0460db48ba1b4dd300d6185b0dfc94e2877c60d8ae939a45608ddf09f298afdc0f5d8565a07d3cd942554 +DIST github.com-rcrowley-go-metrics-1f30fe9094a513ce4c700b9a54458bbb0c96996c.tar.gz 34843 BLAKE2B 9b7cb47d600f677b38fad805dba6f52439c84731ab7677ea179befbc6c77ce99ebb17c4dfd3d2e666895c373fe27b63212887be33d6cc17c05c57efdb466a68d SHA512 4b0390ffd6ed18dd8fa01f3379a4cfafad299ee6977b099a61114a478ff1e57020d9d616fdb75c4d2fd0bdf4a8fd8d21d7b91cd66886eed2a73761b7075eee51 +DIST github.com-rcrowley-go-metrics-e2704e165165ec55d062f5919b4b29494e9fa790.tar.gz 36765 BLAKE2B 6db2db27a22ea746e3b419adb4f8653dcf3517ee36e67eb5885d034babf71ebde2c61bfd2f6feb4213519382c12a29c5245c7961968140fc3b0f6e7697c9c16b SHA512 fe44cccac75cef2c9dac051fbf413420029e8316379e027b32114141cf00d370b0e72fcc05f26b18f35736b843fcf770b7587c81e31ab4521e317220050379ff +DIST github.com-samuel-go-zookeeper-1d7be4effb13d2d908342d349d71a284a7542693.tar.gz 32130 BLAKE2B 71edb2b08cce57314388c49cf5f13b65981e078890f348da4731dcc0f47d1894a42d0ef571007a5663082328538c78d51ad0b6aa46c4bd5f9622d2aaf6ea7425 SHA512 5a661d1a3d534875110e9bef59ce7395ae087112a10521092f9d42f59d7d01050a5acc1501473950ab2df3ceb78b4bd5ac3cf91fc2eccaee10ee8b163343c7b2 +DIST github.com-samuel-go-zookeeper-c4fab1ac1bec58281ad0667dc3f0907a9476ac47.tar.gz 37110 BLAKE2B 4c32afe54c27ed1532a50d386217bec3b477ceba3744bb415f906c5b0301db172289455a6631659e98b4600175ad391d09f7c60532bdc5754761a177482be37f SHA512 3dab581a699336979b7be6b9792a877eee9e9fe39157b0774e38831735e1148b522617d246c7c1d146cb8c6dd3faba20cb72b94e9bd85e532f11d20f97e755d9 +DIST github.com-satori-go.uuid-5bf94b69c6b68ee1b541973bb8e1144db23a194b.tar.gz 7605 BLAKE2B 2af1051b30423891093bc2652db9c96d67d0955c7e20d27a390e53b6dca4233266182489b6160d6429dede0cf86e83ef5f2f284e61126cb76e66838329b4326a SHA512 ce66fa5f54cb373e76a92258ba4b907ded9f4163469b2e949d608df4737b10e2e428ee973c7f8ae0a997f67d5b04f34e1d05ad60c2388fbd9bceeab8877bb8e9 +DIST github.com-satori-go.uuid-f58768cc1a7a7e77a3bd49e98cdd21419399b6a3.tar.gz 8292 BLAKE2B 7969a5837c0155661feb9113e44b146be87d2ea163bb045e57b194bf3f3957e641a7ce1c1e2fe1c363b5df48c46257ccdf8665ac36dd5a0d3174179b2734d5ea SHA512 7d2cb0674f523a19ca3f1564ad9b8b363f4b8c1a0eddc848f9ae927696d3408d8aaf6e9149816be4d3f8e9e996dcda025223aba7dfe63e8f87f8bc822a5ce6a2 +DIST github.com-shirou-gopsutil-384a55110aa5ae052eb93ea94940548c1e305a99.tar.gz 107137 BLAKE2B df3554441aeaa9864255d4a32c43ba20c17471af8b9af941c896b6ddaa991af0769c8c7455e06ec1999ec6e72d60c3823d5b97a9491a7795b8cb1aa6156a6815 SHA512 bf6ccdfedefd1ffe8422192fd5cc7bc76799e3fd5ee21c12fed08ab137add08e77157436387c92cb521634568668571d17b36068970593d51130cf42b4dd86ee +DIST github.com-shirou-gopsutil-8048a2e9c5773235122027dd585cf821b2af1249.tar.gz 110546 BLAKE2B 21a2d62fa98364d20c6aea586896d429a1b09fd367d9e9100ef4824acca8f6bcd8235dc7e88381125cbd382feed21518a7041300512aafc86e36abb24a7e7720 SHA512 cc49ce2875c8e3075108b91e12a7d4afee9a80da65745e32ac268401e95d5279bec27b42b7b87bb2705e190afe28c7553046e62c3ece455e323124002bf8f75a +DIST github.com-shirou-w32-3c9377fc6748f222729a8270fe2775d149a249ad.tar.gz 44339 BLAKE2B 864d60f85ff24f5a65e070722aad15bbbfe0fcee14f899b7761c1e836035b40f345fadd7ec6411b19ef8176f6ad00e4310d5598fab3e880ab139177cba97fdc3 SHA512 8ae5334c457276b39e94f3f9f286dffa9036a5e1be7127a155dbd737ecf6bd134c8efbebbe5ea913b7f1d9105e0e90b86ef4585676877641e9c156547758dcef +DIST github.com-shirou-w32-bb4de0191aa41b5507caa14b0650cdbddcd9280b.tar.gz 44378 BLAKE2B 2393a3a3bffd7e19db1a12d394abfc16c5f37b4c559793a819f29039db4a2de67be00986e9351f0d1cd6eb99ebe5becc4cbe69ec7d85b89637f8622ccd957489 SHA512 ded412374afa9afd363b972fb08b62d732d0f3e127848461ff924a106d27bf22a466331c89e547df3e8af50d5097923932c9e697645c9d29147b0bccc74a46c1 +DIST github.com-sirupsen-logrus-c155da19408a8799da419ed3eeb0cb5db0ad5dbc.tar.gz 28758 BLAKE2B e34b383cbbddcadd99692609c9c20f94182735fc9879c0391947d0bc540df05cae7570230103a75a1e031fe8e30d1a4796eb17c80b4fba4a6d79bb999932205f SHA512 8f4f0bc4f4cd02f26f1ab39857e0e8120feab8ae3bb44b570e5d269b0c716d4028b824b04ad3923dc3e5a82b64c757e462ff74c71875677fd4fd276bd5b40926 +DIST github.com-soniah-gosnmp-5ad50dc75ab389f8a1c9f8a67d3a1cd85f67ed15.tar.gz 42429 BLAKE2B 8b09338bea760784895fb4bd850e046baa88075ba2537c2ef7070ecc9d1a97365ce0c05601468cda844ee7e16df5b309b0967632e11422e16960a61e4473d8ea SHA512 df9da3793b12a2354b215489b258899d142a08d776279045b10c31ff9b0f8efb883d89d4f12fc5c76d46df45c316314438654e9777e25fe6617895436e42e9ca +DIST github.com-soniah-gosnmp-96b86229e9b3ffb4b954144cdc7f98fe3ee1003f.tar.gz 48054 BLAKE2B 33874390743d3a3b63298d331153c7c7aeba358bd7248bf746a287e400520fda57e64569428abb97fdcff415c11426aed36b6220ed574bb778c95668037d28b7 SHA512 9be123ac9e8e39504d70ce2534ede2e06c9e59d140d88c9361b04f3655ca42802fbc017a76b20bbb0cb022110afe105663a0098d457e996c356dd0c0fb07fc18 +DIST github.com-streadway-amqp-63795daa9a446c920826655f26ba31c81c860fd6.tar.gz 82926 BLAKE2B c83546b406081445f568903f98a682f74ba0e77d940d40caf488195713b6841a97905f415b286ef2a9fb642d2353a13a6658c2a3ec035e9bbe8361ab2a090a06 SHA512 2bdd05b728ff3be1f2192652756518e53b741ff7b359e74286e20faeac8423f80244c89927c1b4f1417b46fcc5bec4d6f8dd20ce9eb327d5a45ef513e48affcc +DIST github.com-streadway-amqp-e5adc2ada8b8efff032bf61173a233d143e9318e.tar.gz 85554 BLAKE2B a0f86ad59b5d29f4ade89f8e5d730ab09b5c15702ab9aaf202c7443e191516b2b317e543c6ec70f614a2c8dc273cd514cffbf0e19998fe1bcdc5d5b994779d24 SHA512 3b53c11f5d2e06cd48e58070b549c00d7c257c9cf300cc6ca9f7849df910787d8e193b003aa870ab981b0285b2f1927cd98010eb8a3dd49011459a0c407f3b36 +DIST github.com-stretchr-objx-1a9d0bb9f541897e62256577b352fdbc1fb4fd94.tar.gz 24009 BLAKE2B 55d77ee7460d4f777b3db315731a1ede311d3f6c22690143ebf17430890e0c343e64889098fb0d1145fae8caf920c6773571fb984684fa1edbac2b98e2b196b5 SHA512 c03858d1afea33ef4607c4dcd8da143b550bf5897c2567ceb7baa1b0caf81f4223ae1e0fd931b8ca8719ebc5e43c611aa5da7e5129d962573e422265e30b7f17 +DIST github.com-stretchr-objx-477a77ecc69700c7cdeb1fa9e129548e1c1c393c.tar.gz 75983 BLAKE2B 905b11298532bac35b3188b06dce111516bfb9f015d3e9b9d306e462bae917f522fb0ad944af31a86dbd24dd12f4974744d2a4bc9de1aca9501faf1359de5161 SHA512 319f08ca080465da0cfc530c435534e7744c78d1f7fee0d012d460589532b3256744b7c5f914b80488ab121ace026e565b167afdd0f926d1b984b1aa77b62285 +DIST github.com-stretchr-testify-4d4bfba8f1d1027c4fdbe371823030df51419987.tar.gz 85717 BLAKE2B c625bf222562e2fd66fd6723d81eba4be4414ab07a833bf12d19c1a413ed292ecbfe0bca3181784dd20ce2150cf41d2e8f7ea37b5187a0f2ebb9e2d0f63de7c4 SHA512 77bd69de4404288e110b11ce2f7c635e4111680a988f9d58fef82d8f3c8bea8aafc84747cf95183ec9b1b62b0241c4412ccd0e7a6f21db493e901de1d8772550 +DIST github.com-stretchr-testify-f35b8ab0b5a2cef36673838d662e249dd9c94686.tar.gz 101953 BLAKE2B 17c689b1113d3fc3e2fa1a3bcf3b0f55abd50d2799e5c57d26e04951badf8367fc7e8222ecbe036ee64b0a07524567bcd3e40266be407c3c561367474c6306e5 SHA512 36a556457ba481a24247bd97f0adf7e1b1c90e6ee1495755ee12bf774df3228c42d72d7051312bc0ed7a7b2d9e7a20b4b521c9fbb3e065ba10f6b0320a67df30 +DIST github.com-tidwall-gjson-f123b340873a0084cb27267eddd8ff615115fbff.tar.gz 40320 BLAKE2B a3a12aab47428c8309f0bda9b987aa3c37d4f20798cdaa214aa2f206533bfa4e44d879d5bb59e6f455682b333c44efb63843d3919958cf072d7cb137884ead1f SHA512 d633ecacb0f8a75ef8593c0f2e40a359b4d8dfa1733880cb7b3e63ac3cc2140a72495534c676cce0a96f94329d40516215b4cd5223e4b5752ad0ea025f006de3 +DIST github.com-tidwall-match-1731857f09b1f38450e2c12409748407822dc6be.tar.gz 4277 BLAKE2B fbb192bdf4f895f50cb305b62730b401ddc8f18c2c82bbb13d6963b1780afb9ce4a52f29375112aa6c3bb635742ba35e6711ed50ac0fc198217867772ebd7cad SHA512 e0828721a5cb51a4b638d2b485b80947910a4c057bb771ed9dc4781e9f2394d36a541c32dd75697547255ed547f218621b3aec72c2ffcf5ec9d56d10b68288f7 +DIST github.com-vishvananda-netlink-b2de5d10e38ecce8607e6b438b6d174f389a004e.tar.gz 108114 BLAKE2B a1d90a4d50c8596b33b51d7f82219bb368876cfc4d521548d3cc1c236e41e396bf97a241d9285688d76a09a2b6e3e0d01b1d24a8adc419b9dff35dd2b48e0048 SHA512 081d970d2f073e11130a18686981ab7eefaabdd25e8e1b8877c9bc1a13e5afd6ca6b3a69e2c722647c0d466cd53c4430ecc686b8935ac693af69c31c577cb9d4 +DIST github.com-vishvananda-netns-13995c7128ccc8e51e9a6bd2b551020a27180abd.tar.gz 7861 BLAKE2B f46ba34aebb326026e6482e208821ffb6aad1ea10a3fca65120d647b9eb73aecb3023757d799acc248916a9c79f13f0f9e8bc9644e205b185e14d132499aaf06 SHA512 82f70298ed3a458dd44f4d30d9e3a8d4033bdab55dfa7a56ea2557e743d5ea5a5bea254a48cccbef14bc35ebc031d894fd3a7f3a0eaa7a0e1036499ea836a3b6 +DIST github.com-vjeantet-grok-ce01e59abcf6fbc9833b7deb5e4b8ee1769bcc53.tar.gz 25832 BLAKE2B 0478a7024bb9814377350f8f2421507e1577af56283bdd0134d794310bda77b628a62e8ae95844bf615f8b2206061061accf7e52a052c9cdee99bcce7d40171e SHA512 ddf1bfa23c15fc2b6ef101e3d04101fc8bf823bce9fc33ddf20d995888a50f00531b221524a1f792fbc69aa47d5d6593566ccd4e233a8e7fd8d37e6075820793 +DIST github.com-vjeantet-grok-d73e972b60935c7fec0b4ffbc904ed39ecaf7efe.tar.gz 25776 BLAKE2B 41623a6fb359758ba14ed27dc311051635ae8ba64f27fa8eacb057cefb6702fd0396c3ec6b0869de84c7bbf8cd48610325639401c06c38d61693cc9d20855307 SHA512 96da8eaaee89a2d7040f93cd8ad09c66c960b16e2627ae920811c4dfbe4df061f355662cb428a19a1b533f942ce0112b83294e35f2ebaaf937a11db5b509b840 +DIST github.com-vmware-govmomi-e3a01f9611c32b2362366434bcd671516e78955d.tar.gz 952458 BLAKE2B 7dfe37f6a3e13b15266c76f7b5e83805d57a9671406eef7ab691af2f54ac843201665f588e34537f1a6952a4d878c7465858a044dca20404e9660fe20b831038 SHA512 dd6854f00ff209695865cd7e188b0542c9f1c164f34288454d6e265428a100dfbcf519f086ec2523f4951f596a43d4d18d6edb1b883df2a333028deb158d74b3 +DIST github.com-wvanbergen-kafka-bc265fedb9ff5b5c5d3c0fdcef4a819b3523d3ee.tar.gz 16356 BLAKE2B 439bdd2d92347c4de1e9c13bee4f602ccda3ad9320dae51ad6f2bc9bc8136355e5a0f6dc569f0c5df7c328c981ef1da81324bbbf3a1b5cb4a14c2ed1089c5e77 SHA512 4026f9afb500f6a3f77413682d140ef03839995790cf99fc4065ee1411fb220c43301d7a72e6f1bc1e4cf6c0d20fc5eee69520770a07345f82bab34c73235630 +DIST github.com-wvanbergen-kafka-e2edea948ddfee841ea9a263b32ccca15f7d6c2f.tar.gz 16364 BLAKE2B 65ac8d6de5554a723a21bb6897880052ede741ce1e66c3722ff95f2772f6a6e57a3f0e86637554b70343d1a34a4963e5653ee63e2e3a3c06b2f146b0046671fe SHA512 61781e997bbf84f8842c16ae86b325c23aefb610403bbd93b77a74541f00d23149e39d69c1c4d24938bd61d6288eff732bcc14307b03114d041a5f37bc099b65 +DIST github.com-wvanbergen-kazoo-go-968957352185472eacb69215fa3dbfcfdbac1096.tar.gz 13302 BLAKE2B 27ffba23d1846a3360a89b37b8b8adbd7294e3dec11ff70fe6ea8e3e48103e55779fd6a6ff6c9646df24f2a24f109e152dffe996faed950dfb041a29a9e745cd SHA512 7ab52a44284a37f1b1b02cc91217f70296868417e0527e90655908b120a12f69af51cd194da057bf26784c3bd1a633ab1cda780397e04b9a8914eeada47ffd1d +DIST github.com-wvanbergen-kazoo-go-f72d8611297a7cf105da904c04198ad701a60101.tar.gz 17590 BLAKE2B 229694e1dee57bf76bbe58d06667eb119aa2fec34aa6f6b495d0ba39085378393b7157f60c5d319f947890ac1f26938771614fac9f060fac5754859eacf8dcd9 SHA512 f51fbbe84a053e8a88188b389497bd4af0e45ff0f7236fb8ea3074c457b66f7bff4080eccb854ffc7e1a3fe31e4f3276d6327450a8465909030a0fe087bfcc6b +DIST github.com-yuin-gopher-lua-46796da1b0b4794e1e341883a399f12cc7574b55.tar.gz 149759 BLAKE2B f182ad2096559c0069a8179f3b2bd3225cf1528290152e79aee1e827754135ffdeb5484174eda09762d758c9d790457a0262224c0162a5c82b5c13e06e16be5d SHA512 bc6d08287146e9a20cf22dc0ec4cca02003ce53a6a0609475aeb3319bb83e8bf9394d408ba9b25f347c4bb6d2fb817680746e0c7dab13a3c7351cf7d2119560f +DIST github.com-yuin-gopher-lua-66c871e454fcf10251c61bf8eff02d0978cae75a.tar.gz 148862 BLAKE2B b22c654322c0ba9722b7f10411fcc03e97dcbd937c6446e30b0ffebc63a4ddae5b3c86aebb2dd537f1b9e25aef57fec5a2966ebb76aa586f73e25eb1c7b2378b SHA512 8a57a8a180b684c1263bab7b98339554b0efc95a73fc3ac558ff9177f0a09f0bc41b24285c96dce6a114031b0166a384c2a8e9d169dbb3c643c9017dcc8d0c18 +DIST github.com-zensqlmonitor-go-mssqldb-ffe5510c6fa5e15e6d983210ab501c815b56b363.tar.gz 450131 BLAKE2B 6d9ced571d0db14cbd3223449734757e4b5c797cbdfdf10725f2d3cb7867093608a7fd3ca1a2c5398848c92090269b8d35f504de439ce2ca6b482ac8180697c9 SHA512 52ed5b9e8399f00a83c0a50f8fdd0ab5419005159aa5ef80c5d8ab76c37f319e1c4d3e0bd5e0ba25006fa790d3756d2788baf30b2ef79b1f86b001d64a702820 +DIST telegraf-1.10.4-vendor.tar.gz 69744868 BLAKE2B 97123bb14b89d28519c73426491189a9245450c72bd59e6745a76c61730a730cd5b2c59c7f205c0dfd058b3d5fce4d331a3e39ecc1a5da1ac439c8946e634fab SHA512 53f5bc9fc60ccae3a9549ab38cb4b558a331524351b70b83deb483090a45edf8868856c1311893d9d8e091e649769ccb580bb32cc46a16da1deb8390704a6c84 +DIST telegraf-1.10.4.tar.gz 1372505 BLAKE2B f3064cd71b1b6f9a8aae8e5425813386bd6d4e4f06c2e95f35c09d055aef6b811867bb1fe1724e88311f82e8214a1c7ae23a0b5ab8461cfa6b0adebe3b86cb28 SHA512 7e6c27bb5b94382f00f48ce98906f7e505abe734b47e29c2c07f245c2c5c12c522eb3f59be2773bfea78316b7b808d0d425d07fa7c247af7cd280a041759cc34 +DIST telegraf-1.11.5-vendor.tar.gz 70214304 BLAKE2B 64cfaa9f207835e043f5df002d140d572a95dc58b9310c860fc682f8cc3a02c77f8d2035576d296d89c3da30ebca2e6e3ce27b514419a60d6a82f3b9645bae3a SHA512 00e143110126c18bbe45ad0b14e6e688030c3f15366ae0e59ac157b49090644cbf96a4b95fa46eaa3fbbd1eb68c09c3747172585a42f65876e0d78a505b07363 +DIST telegraf-1.11.5.tar.gz 1471311 BLAKE2B 7c5b7c2b835ee8c943baf01bb3515fb724b10b04682254e0fd501c7f066fe67a4ef18c0d3442b676448ccb8cd0430099e56ad0cc3970eee3f9d80d540271f4df SHA512 1e6001981693e4612ba34a680f1c3349c2f203d8ba2983f3841fad08b68251a942beef6cc462cb64b95eba1412ea6a35a863ff9426270896c50c83e6f177ca5d +DIST telegraf-1.12.1-vendor.tar.gz 128021524 BLAKE2B f4db3e4d2998959c850a82ea77c1c02c5195e6bd5eef4d55521bbaa0e3355b21554e1a179585d57d8fce1fd061d8f157fddb2dde5091c15062811902c014b835 SHA512 2a501d9456a3a130a4202e87e2c0b44c9b2d5fefca12601f0a3fea6073c97fb7b40dd86546fe291b740b38ecf57843fff18a6f4280482af915b3be9e7270b597 +DIST telegraf-1.12.1.tar.gz 1561005 BLAKE2B 997e3deddc13acb6c0af41d5f622353facfd1c09e76640965c8ebe447e06a7cf5bb25753b8c67b2c7c1af7c3d50f787acc23e5b5a45253db943031a130c33d39 SHA512 8018d48482ec1cdada9d57bb6b8068a0758d58908a4c88deb089645282fde662191bd356e0081178b0e7bc1be6bb19cb2c29bba0039398b7d64f53de9fbf87d6 +DIST telegraf-1.13.3-vendor.tar.gz 142151740 BLAKE2B 9068835a6b75721732998ed50f23a6e6e90d92eee32c3ff1bb07fb19942e6f808289b459b34a6b83920c323c00063a91d2bb2e38d457a7a512b43715bc7d7dc0 SHA512 db56f4ecf1802a21405ae7db80281b5155b6f4922dd8e49aa48b554ff3bf179810fae3de3f6ea0e6ee661683e0e9f0536919fd912ea3de827f7c85aa314fff36 +DIST telegraf-1.13.3.tar.gz 1640358 BLAKE2B eda968676b42ddfd1f447326463feaabe0860425ea1688ccf19a248f652ec4828c5cae1c302a7129a62a6557eb2c0a206476bfc7082a89d4bffcd3113bad0e81 SHA512 ac71f054ffccf5f1d27db6e68989a2440b975087f91cce487b58df2bd6984378d86fb992f7a7f11aabf7b20937258d05893b74fb5d6f83a8db8449e80cf1d2fd +DIST telegraf-1.5.3.tar.gz 911976 BLAKE2B 3e67a037eb22be88de700131f15120faa13b7a9bd8404f76c29376e3e4da630d84767fd8cbff45b3e14e6ce836dcc68a2a87b462eb91d398d57370c1112879c0 SHA512 48e80a4f3f00b5c18f584e28836c36abd7b7f9bacb33dd90ff569dbdc0a5bf69e29d38ae2d74a9c14ee6dc3400dda91e586dd31bc11522257c2206efb3e93348 +DIST telegraf-1.8.3.tar.gz 1205303 BLAKE2B 60579cca57863362cb4003f8da4326cef0d1bc4986d07d38f4b594556736ad79e0363098df41c13a2d10bbeeccce20fabcd0b07c7e187cbeecb5c561008d587e SHA512 367069b3578529307d5fa6eb14eabf78a44743d75e5df7c3860b35de212b5809c54cd1a7c791076137f60096d227774b4d5206606cd3fad08594721b4b49de4e diff --git a/net-analyzer/telegraf/files/telegraf.confd b/net-analyzer/telegraf/files/telegraf.confd new file mode 100644 index 000000000000..a643f8f3fd9a --- /dev/null +++ b/net-analyzer/telegraf/files/telegraf.confd @@ -0,0 +1,2 @@ +# Add any extra options to pass to telegraf to this setting. +#telegraf_opts="" diff --git a/net-analyzer/telegraf/files/telegraf.rc b/net-analyzer/telegraf/files/telegraf.rc new file mode 100644 index 000000000000..96e8a482f035 --- /dev/null +++ b/net-analyzer/telegraf/files/telegraf.rc @@ -0,0 +1,18 @@ +#!/sbin/openrc-run + +configdir="/etc/telegraf/telegraf.d" +configfile="/etc/telegraf/telegraf.conf" +error_log="${logfile:-/var/log/telegraf/telegraf.log}" +command=/usr/bin/telegraf +command_args="-config ${configfile} -config-directory ${configdir} + ${telegraf_opts}" +command_background=yes +command_user=telegraf:telegraf +make_pidfile=yes +pidfile=/var/run/telegraf.pid + +reload() { + ebegin "Reloading ${RC_SVCNAME}" + start-stop-daemon --signal HUP --pidfile "${PIDFILE}" + eend $? +} diff --git a/net-analyzer/telegraf/metadata.xml b/net-analyzer/telegraf/metadata.xml new file mode 100644 index 000000000000..6d75cd979e32 --- /dev/null +++ b/net-analyzer/telegraf/metadata.xml @@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>williamh@gentoo.org</email> + <name>William Hubbs</name> + </maintainer> + <longdescription lang="en"> + Telegraf is an agent written in Go for collecting, processing, + aggregating and writing metrics. + </longdescription> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/telegraf/telegraf-1.10.4.ebuild b/net-analyzer/telegraf/telegraf-1.10.4.ebuild new file mode 100644 index 000000000000..ed1cb6058ca1 --- /dev/null +++ b/net-analyzer/telegraf/telegraf-1.10.4.ebuild @@ -0,0 +1,61 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +EGO_PN=github.com/influxdata/telegraf + +inherit systemd user + +MY_PV="${PV/_rc/-rc.}" +COMMIT=3548ce47 +DESCRIPTION="The plugin-driven server agent for collecting & reporting metrics." +HOMEPAGE="https://github.com/influxdata/telegraf" +VENDOR_URI="https://dev.gentoo.org/~williamh/dist/${P}-vendor.tar.gz" +SRC_URI="https://github.com/influxdata/telegraf/archive/${MY_PV}.tar.gz -> ${P}.tar.gz + ${VENDOR_URI}" + +LICENSE="MIT" +SLOT="0" +KEYWORDS="~amd64" + +RESTRICT="strip" + +DEPEND="dev-lang/go" + +pkg_setup() { + enewgroup telegraf + enewuser telegraf -1 -1 -1 telegraf +} + +src_prepare() { + default + ln -s ../vendor +} + +src_compile() { + echo module ${EGO_PN} > go.mod + set -- env GO111MODULE=on go build -mod vendor -v -x -o telegraf \ + -ldflags="-X main.commit=${COMMIT} -X main.version=${PV}" \ + cmd/telegraf/telegraf.go + echo "$@" + "$@" || die +} + +src_install() { + dobin telegraf + insinto /etc/telegraf + doins etc/telegraf.conf + keepdir /etc/telegraf/telegraf.d + + insinto /etc/logrotate.d + doins etc/logrotate.d/telegraf + +systemd_dounit scripts/telegraf.service + newconfd "${FILESDIR}"/telegraf.confd telegraf + newinitd "${FILESDIR}"/telegraf.rc telegraf + + dodoc -r docs/* + + keepdir /var/log/telegraf + fowners telegraf:telegraf /var/log/telegraf +} diff --git a/net-analyzer/telegraf/telegraf-1.11.5.ebuild b/net-analyzer/telegraf/telegraf-1.11.5.ebuild new file mode 100644 index 000000000000..b7f0834d1562 --- /dev/null +++ b/net-analyzer/telegraf/telegraf-1.11.5.ebuild @@ -0,0 +1,60 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +EGO_PN=github.com/influxdata/telegraf + +inherit systemd user + +MY_PV="${PV/_rc/-rc.}" +COMMIT=0ea49ea9 +DESCRIPTION="The plugin-driven server agent for collecting & reporting metrics." +HOMEPAGE="https://github.com/influxdata/telegraf" +SRC_URI="https://github.com/influxdata/telegraf/archive/${MY_PV}.tar.gz -> ${P}.tar.gz + https://dev.gentoo.org/~williamh/dist/${P}-vendor.tar.gz" + +LICENSE="MIT" +SLOT="0" +KEYWORDS="~amd64" + +RESTRICT="strip" + +DEPEND="dev-lang/go" + +pkg_setup() { + enewgroup telegraf + enewuser telegraf -1 -1 -1 telegraf +} + +src_prepare() { + default + mv ../vendor . +} + +src_compile() { + echo module ${EGO_PN} > go.mod + set -- env GO111MODULE=on go build -mod vendor -v -x -o telegraf \ + -ldflags="-X main.commit=${COMMIT} -X main.version=${PV}" \ + cmd/telegraf/telegraf.go + echo "$@" + "$@" || die +} + +src_install() { + dobin telegraf + insinto /etc/telegraf + doins etc/telegraf.conf + keepdir /etc/telegraf/telegraf.d + + insinto /etc/logrotate.d + doins etc/logrotate.d/telegraf + +systemd_dounit scripts/telegraf.service + newconfd "${FILESDIR}"/telegraf.confd telegraf + newinitd "${FILESDIR}"/telegraf.rc telegraf + + dodoc -r docs/* + + keepdir /var/log/telegraf + fowners telegraf:telegraf /var/log/telegraf +} diff --git a/net-analyzer/telegraf/telegraf-1.12.1.ebuild b/net-analyzer/telegraf/telegraf-1.12.1.ebuild new file mode 100644 index 000000000000..2a16e0960f79 --- /dev/null +++ b/net-analyzer/telegraf/telegraf-1.12.1.ebuild @@ -0,0 +1,60 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +EGO_PN=github.com/influxdata/telegraf + +inherit systemd user + +MY_PV="${PV/_rc/-rc.}" +COMMIT=8de41160 +DESCRIPTION="The plugin-driven server agent for collecting & reporting metrics." +HOMEPAGE="https://github.com/influxdata/telegraf" +SRC_URI="https://github.com/influxdata/telegraf/archive/${MY_PV}.tar.gz -> ${P}.tar.gz + https://dev.gentoo.org/~williamh/dist/${P}-vendor.tar.gz" + +LICENSE="MIT" +SLOT="0" +KEYWORDS="~amd64" + +RESTRICT="strip" + +DEPEND="dev-lang/go" + +pkg_setup() { + enewgroup telegraf + enewuser telegraf -1 -1 -1 telegraf +} + +src_prepare() { + default + mv ../vendor . +} + +src_compile() { + echo module ${EGO_PN} > go.mod + set -- env GO111MODULE=on go build -mod vendor -v -x -o telegraf \ + -ldflags="-X main.commit=${COMMIT} -X main.version=${PV}" \ + cmd/telegraf/telegraf.go + echo "$@" + "$@" || die +} + +src_install() { + dobin telegraf + insinto /etc/telegraf + doins etc/telegraf.conf + keepdir /etc/telegraf/telegraf.d + + insinto /etc/logrotate.d + doins etc/logrotate.d/telegraf + +systemd_dounit scripts/telegraf.service + newconfd "${FILESDIR}"/telegraf.confd telegraf + newinitd "${FILESDIR}"/telegraf.rc telegraf + + dodoc -r docs/* + + keepdir /var/log/telegraf + fowners telegraf:telegraf /var/log/telegraf +} diff --git a/net-analyzer/telegraf/telegraf-1.13.3.ebuild b/net-analyzer/telegraf/telegraf-1.13.3.ebuild new file mode 100644 index 000000000000..264ae05a70d3 --- /dev/null +++ b/net-analyzer/telegraf/telegraf-1.13.3.ebuild @@ -0,0 +1,59 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +EGO_PN=github.com/influxdata/telegraf + +inherit systemd + +MY_PV="${PV/_rc/-rc.}" +COMMIT=da364558 + +DESCRIPTION="The plugin-driven server agent for collecting & reporting metrics." +HOMEPAGE="https://github.com/influxdata/telegraf" +SRC_URI="https://github.com/influxdata/telegraf/archive/${MY_PV}.tar.gz -> ${P}.tar.gz + https://dev.gentoo.org/~williamh/dist/${P}-vendor.tar.gz" + +LICENSE="MIT" +SLOT="0" +KEYWORDS="~amd64" + +RESTRICT="strip" + +BDEPEND="dev-lang/go" +DEPEND="acct-group/telegraf + acct-user/telegraf" + RDEPEND="${DEPEND}" + +src_prepare() { + default + mv ../vendor . +} + +src_compile() { + echo module ${EGO_PN} > go.mod + set -- env GO111MODULE=on go build -mod vendor -v -x -o telegraf \ + -ldflags="-X main.commit=${COMMIT} -X main.version=${PV}" \ + cmd/telegraf/telegraf.go + echo "$@" + "$@" || die +} + +src_install() { + dobin telegraf + insinto /etc/telegraf + doins etc/telegraf.conf + keepdir /etc/telegraf/telegraf.d + + insinto /etc/logrotate.d + doins etc/logrotate.d/telegraf + +systemd_dounit scripts/telegraf.service + newconfd "${FILESDIR}"/telegraf.confd telegraf + newinitd "${FILESDIR}"/telegraf.rc telegraf + + dodoc -r docs/* + + keepdir /var/log/telegraf + fowners telegraf:telegraf /var/log/telegraf +} diff --git a/net-analyzer/telegraf/telegraf-1.5.3.ebuild b/net-analyzer/telegraf/telegraf-1.5.3.ebuild new file mode 100644 index 000000000000..ce6ec9900039 --- /dev/null +++ b/net-analyzer/telegraf/telegraf-1.5.3.ebuild @@ -0,0 +1,149 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +EGO_PN="github.com/influxdata/telegraf" +EGO_VENDOR=( + "collectd.org 2ce144541b8903101fb8f1483cc0497a68798122 github.com/collectd/go-collectd" + "github.com/aerospike/aerospike-client-go 95e1ad7791bdbca44707fedbb29be42024900d9c" + "github.com/amir/raidman c74861fe6a7bb8ede0a010ce4485bdbb4fc4c985" + "github.com/apache/thrift 4aaa92ece8503a6da9bc6701604f69acf2b99d07" + "github.com/aws/aws-sdk-go c861d27d0304a79f727e9a8a4e2ac1e74602fdc0" + "github.com/beorn7/perks 4c0e84591b9aa9e6dcfdf3e020114cd81f89d5f9" + "github.com/bsm/sarama-cluster abf039439f66c1ce78017f560b490612552f6472" + "github.com/cenkalti/backoff b02f2bbce11d7ea6b97f282ef1771b0fe2f65ef3" + "github.com/couchbase/go-couchbase bfe555a140d53dc1adf390f1a1d4b0fd4ceadb28" + "github.com/couchbase/gomemcached 4a25d2f4e1dea9ea7dd76dfd943407abf9b07d29" + "github.com/couchbase/goutils 5823a0cbaaa9008406021dc5daf80125ea30bba6" + "github.com/davecgh/go-spew 346938d642f2ec3594ed81d874461961cd0faa76" + "github.com/dgrijalva/jwt-go dbeaa9332f19a944acb5736b4456cfcc02140e29" + "github.com/docker/docker f5ec1e2936dcbe7b5001c2b817188b095c700c27" + "github.com/docker/go-connections 990a1a1a70b0da4c4cb70e117971a4f0babfbf1a" + "github.com/eapache/go-resiliency b86b1ec0dd4209a588dc1285cdd471e73525c0b3" + "github.com/eapache/go-xerial-snappy bb955e01b9346ac19dc29eb16586c90ded99a98c" + "github.com/eapache/queue 44cc805cf13205b55f69e14bcb69867d1ae92f98" + "github.com/eclipse/paho.mqtt.golang d4f545eb108a2d19f9b1a735689dbfb719bc21fb" + "github.com/go-logfmt/logfmt 390ab7935ee28ec6b286364bba9b4dd6410cb3d5" + "github.com/go-sql-driver/mysql 2e00b5cd70399450106cec6431c2e2ce3cae5034" + "github.com/gobwas/glob bea32b9cd2d6f55753d94a28e959b13f0244797a" + "github.com/go-ini/ini 9144852efba7c4daf409943ee90767da62d55438" + "github.com/gogo/protobuf 7b6c6391c4ff245962047fc1e2c6e08b1cdfa0e8" + "github.com/golang/protobuf 8ee79997227bf9b34611aee7946ae64735e6fd93" + "github.com/golang/snappy 7db9049039a047d955fe8c19b83c8ff5abd765c7" + "github.com/go-ole/go-ole be49f7c07711fcb603cff39e1de7c67926dc0ba7" + "github.com/google/go-cmp f94e52cad91c65a63acc1e75d4be223ea22e99bc" + "github.com/gorilla/mux 392c28fe23e1c45ddba891b0320b3b5df220beea" + "github.com/go-sql-driver/mysql 2e00b5cd70399450106cec6431c2e2ce3cae5034" + "github.com/hailocab/go-hostpool e80d13ce29ede4452c43dea11e79b9bc8a15b478" + "github.com/hashicorp/consul 63d2fc68239b996096a1c55a0d4b400ea4c2583f" + "github.com/influxdata/tail a395bf99fe07c233f41fba0735fa2b13b58588ea" + "github.com/influxdata/toml 5d1d907f22ead1cd47adde17ceec5bda9cacaf8f" + "github.com/influxdata/wlog 7c63b0a71ef8300adc255344d275e10e5c3a71ec" + "github.com/jackc/pgx 63f58fd32edb5684b9e9f4cfaac847c6b42b3917" + "github.com/jmespath/go-jmespath bd40a432e4c76585ef6b72d3fd96fb9b6dc7b68d" + "github.com/kardianos/osext c2c54e542fb797ad986b31721e1baedf214ca413" + "github.com/kardianos/service 6d3a0ee7d3425d9d835debc51a0ca1ffa28f4893" + "github.com/kballard/go-shellquote d8ec1a69a250a17bb0e419c386eac1f3711dc142" + "github.com/matttproud/golang_protobuf_extensions c12348ce28de40eed0136aa2b644d0ee0650e56c" + "github.com/Microsoft/go-winio ce2922f643c8fd76b46cadc7f404a06282678b34" + "github.com/miekg/dns 99f84ae56e75126dd77e5de4fae2ea034a468ca1" + "github.com/mitchellh/mapstructure d0303fe809921458f417bcf828397a65db30a7e4" + "github.com/multiplay/go-ts3 07477f49b8dfa3ada231afc7b7b17617d42afe8e" + "github.com/naoina/go-stringutil 6b638e95a32d0c1131db0e7fe83775cbea4a0d0b" + "github.com/nats-io/go-nats ea9585611a4ab58a205b9b125ebd74c389a6b898" + "github.com/nats-io/nats ea9585611a4ab58a205b9b125ebd74c389a6b898" + "github.com/nats-io/nuid 289cccf02c178dc782430d534e3c1f5b72af807f" + "github.com/nsqio/go-nsq eee57a3ac4174c55924125bb15eeeda8cffb6e6f" + "github.com/opencontainers/runc 89ab7f2ccc1e45ddf6485eaa802c35dcf321dfc8" + "github.com/opentracing-contrib/go-observer a52f2342449246d5bcc273e65cbdcfa5f7d6c63c" + "github.com/opentracing/opentracing-go 06f47b42c792fef2796e9681353e1d908c417827" + "github.com/openzipkin/zipkin-go-opentracing 1cafbdfde94fbf2b373534764e0863aa3bd0bf7b" + "github.com/pierrec/lz4 5c9560bfa9ace2bf86080bf40d46b34ae44604df" + "github.com/pierrec/xxHash 5a004441f897722c627870a981d02b29924215fa" + "github.com/pkg/errors 645ef00459ed84a119197bfb8d8205042c6df63d" + "github.com/pmezard/go-difflib 792786c7400a136282c1664665ae0a8db921c6c2" + "github.com/prometheus/client_golang c317fb74746eac4fc65fe3909195f4cf67c5562a" + "github.com/prometheus/client_model fa8ad6fec33561be4280a8f0514318c79d7f6cb6" + "github.com/prometheus/common dd2f054febf4a6c00f2343686efb775948a8bff4" + "github.com/prometheus/procfs 1878d9fbb537119d24b21ca07effd591627cd160" + "github.com/rcrowley/go-metrics 1f30fe9094a513ce4c700b9a54458bbb0c96996c" + "github.com/samuel/go-zookeeper 1d7be4effb13d2d908342d349d71a284a7542693" + "github.com/satori/go.uuid 5bf94b69c6b68ee1b541973bb8e1144db23a194b" + "github.com/shirou/gopsutil 384a55110aa5ae052eb93ea94940548c1e305a99" + "github.com/shirou/w32 3c9377fc6748f222729a8270fe2775d149a249ad" + "github.com/Shopify/sarama 3b1b38866a79f06deddf0487d5c27ba0697ccd65" + "github.com/Sirupsen/logrus 61e43dc76f7ee59a82bdf3d71033dc12bea4c77d" + "github.com/soniah/gosnmp 5ad50dc75ab389f8a1c9f8a67d3a1cd85f67ed15" + "github.com/StackExchange/wmi f3e2bae1e0cb5aef83e319133eabfee30013a4a5" + "github.com/streadway/amqp 63795daa9a446c920826655f26ba31c81c860fd6" + "github.com/stretchr/objx 1a9d0bb9f541897e62256577b352fdbc1fb4fd94" + "github.com/stretchr/testify 4d4bfba8f1d1027c4fdbe371823030df51419987" + "github.com/vjeantet/grok d73e972b60935c7fec0b4ffbc904ed39ecaf7efe" + "github.com/wvanbergen/kafka bc265fedb9ff5b5c5d3c0fdcef4a819b3523d3ee" + "github.com/wvanbergen/kazoo-go 968957352185472eacb69215fa3dbfcfdbac1096" + "github.com/yuin/gopher-lua 66c871e454fcf10251c61bf8eff02d0978cae75a" + "github.com/zensqlmonitor/go-mssqldb ffe5510c6fa5e15e6d983210ab501c815b56b363" + "golang.org/x/crypto dc137beb6cce2043eb6b5f223ab8bf51c32459f4 github.com/golang/crypto" + "golang.org/x/net f2499483f923065a842d38eb4c7f1927e6fc6e6d github.com/golang/net" + "golang.org/x/sys 739734461d1c916b6c72a63d7efda2b27edb369f github.com/golang/sys" + "golang.org/x/text 506f9d5c962f284575e88337e7d9296d27e729d3 github.com/golang/text" + "gopkg.in/asn1-ber.v1 4e86f4367175e39f69d9358a5f17b4dda270378d github.com/go-asn1-ber/asn1-ber" + "gopkg.in/fatih/pool.v2 6e328e67893eb46323ad06f0e92cb9536babbabc github.com/fatih/pool" + "gopkg.in/fsnotify.v1 a8a77c9133d2d6fd8334f3260d06f60e8d80a5fb github.com/fsnotify/fsnotify" + "gopkg.in/gorethink/gorethink.v3 7ab832f7b65573104a555d84a27992ae9ea1f659 github.com/gorethink/gorethink" + "gopkg.in/ldap.v2 8168ee085ee43257585e50c6441aadf54ecb2c9f github.com/go-ldap/ldap" + "gopkg.in/mgo.v2 3f83fa5005286a7fe593b055f0d7771a7dce4655 github.com/go-mgo/mgo" + "gopkg.in/olivere/elastic.v5 3113f9b9ad37509fe5f8a0e5e91c96fdc4435e26 github.com/olivere/elastic" + "gopkg.in/tomb.v1 dd632973f1e7218eb1089048e0798ec9ae7dceb8 github.com/go-tomb/tomb" + "gopkg.in/yaml.v2 4c78c975fe7c825c6d1466c42be594d1d6f3aba6 github.com/go-yaml/yaml" +) + +inherit golang-build golang-vcs-snapshot systemd user + +MY_PV="${PV/_rc/-rc.}" + +DESCRIPTION="The plugin-driven server agent for collecting & reporting metrics." +HOMEPAGE="https://github.com/influxdata/telegraf" +SRC_URI="https://${EGO_PN}/archive/${MY_PV}.tar.gz -> ${P}.tar.gz + ${EGO_VENDOR_URI}" + +LICENSE="MIT" +SLOT="0" +KEYWORDS="~amd64" + +pkg_setup() { + enewgroup telegraf + enewuser telegraf -1 -1 -1 telegraf +} + +src_compile() { + pushd "src/${EGO_PN}" || die + pwd + find -iname telegraf.go + set -- env GOPATH="${S}" go build -i -v -work -x -o telegraf \ + cmd/telegraf/telegraf.go + echo "$@" + "$@" || die + popd || die +} + +src_install() { + pushd "src/${EGO_PN}" || die + dobin telegraf + insinto /etc/telegraf + doins etc/telegraf.conf + keepdir /etc/telegraf/telegraf.d + + insinto /etc/logrotate.d + doins etc/logrotate.d/telegraf + +systemd_dounit scripts/telegraf.service + newconfd "${FILESDIR}"/telegraf.confd telegraf + newinitd "${FILESDIR}"/telegraf.rc telegraf + + dodoc -r docs/* + + keepdir /var/log/telegraf + fowners telegraf:telegraf /var/log/telegraf +} diff --git a/net-analyzer/telegraf/telegraf-1.8.3.ebuild b/net-analyzer/telegraf/telegraf-1.8.3.ebuild new file mode 100644 index 000000000000..7b33cbd377a8 --- /dev/null +++ b/net-analyzer/telegraf/telegraf-1.8.3.ebuild @@ -0,0 +1,182 @@ +# Copyright 1999-2018 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +EGO_PN="github.com/influxdata/telegraf" +EGO_VENDOR=( + "cloud.google.com/go c728a003b238b26cef9ab6753a5dc424b331c3ad github.com/GoogleCloudPlatform/google-cloud-go" + "code.cloudfoundry.org/clock 02e53af36e6c978af692887ed449b74026d76fec github.com/cloudfoundry/clock" + "collectd.org 2ce144541b8903101fb8f1483cc0497a68798122 github.com/collectd/go-collectd" + "contrib.go.opencensus.io/exporter/stackdriver 2b93072101d466aa4120b3c23c2e1b08af01541c github.com/census-ecosystem/opencensus-go-exporter-stackdriver" + "github.com/aerospike/aerospike-client-go 1dc8cf203d24cd454e71ce40ab4cd0bf3112df90" + "github.com/alecthomas/template a0175ee3bccc567396460bf5acd36800cb10c49c" + "github.com/alecthomas/units 2efee857e7cfd4f3d0138cc3cbb1b4966962b93a" + "github.com/amir/raidman 1ccc43bfb9c93cb401a4025e49c64ba71e5e668b" + "github.com/apache/thrift f2867c24984aa53edec54a138c03db934221bdea" + "github.com/aws/aws-sdk-go bf8067ceb6e7f51e150c218972dccfeeed892b85" + "github.com/Azure/go-autorest 1f7cd6cfe0adea687ad44a512dfe76140f804318" + "github.com/beorn7/perks 3a771d992973f24aa725d07868b467d1ddfceafb" + "github.com/bsm/sarama-cluster cf455bc755fe41ac9bb2861e7a961833d9c2ecc3" + "github.com/cenkalti/backoff 2ea60e5f094469f9e65adb9cd103795b73ae743e" + "github.com/couchbase/go-couchbase 16db1f1fe037412f12738fa4d8448c549c4edd77" + "github.com/couchbase/gomemcached 0da75df145308b9a4e6704d762ca9d9b77752efc" + "github.com/couchbase/goutils e865a1461c8ac0032bd37e2d4dab3289faea3873" + "github.com/davecgh/go-spew 346938d642f2ec3594ed81d874461961cd0faa76" + "github.com/denisenkom/go-mssqldb 1eb28afdf9b6e56cf673badd47545f844fe81103" + "github.com/dgrijalva/jwt-go 06ea1031745cb8b3dab3f6a236daf2b0aa468b7e" + "github.com/dimchansky/utfbom 6c6132ff69f0f6c088739067407b5d32c52e1d0f" + "github.com/docker/distribution edc3ab29cdff8694dd6feb85cfeb4b5f1b38ed9c" + "github.com/docker/docker ed7b6428c133e7c59404251a09b7d6b02fa83cc2" + "github.com/docker/go-connections 3ede32e2033de7505e6500d6c868c2b9ed9f169d" + "github.com/docker/go-units 47565b4f722fb6ceae66b95f853feed578a4a51c" + "github.com/docker/libnetwork d7b61745d16675c9f548b19f06fda80d422a74f0" + "github.com/eapache/go-resiliency ea41b0fad31007accc7f806884dcdf3da98b79ce" + "github.com/eapache/go-xerial-snappy 040cc1a32f578808623071247fdbd5cc43f37f5f" + "github.com/eapache/queue 44cc805cf13205b55f69e14bcb69867d1ae92f98" + "github.com/eclipse/paho.mqtt.golang 36d01c2b4cbeb3d2a12063e4880ce30800af9560" + "github.com/gobwas/glob 5ccd90ef52e1e632236f7326478d4faa74f99438" + "github.com/gogo/protobuf 636bf0302bc95575d69441b25a2603156ffdddf1" + "github.com/go-ini/ini 358ee7663966325963d4e8b2e1fbd570c5195153" + "github.com/golang/protobuf b4deda0973fb4c70b50d226b1af49f3da59f5265" + "github.com/golang/snappy 2e65f85255dbc3072edf28d6b5b8efc472979f5a" + "github.com/go-logfmt/logfmt 390ab7935ee28ec6b286364bba9b4dd6410cb3d5" + "github.com/googleapis/gax-go 317e0006254c44a0ac427cc52a0e083ff0b9622f" + "github.com/google/go-cmp 3af367b6b30c263d47e8895973edcca9a49cf029" + "github.com/google/uuid 064e2069ce9c359c118179501254f67d7d37ba24" + "github.com/go-ole/go-ole a41e3c4b706f6ae8dfbff342b06e40fa4d2d0506" + "github.com/go-redis/redis 83fb42932f6145ce52df09860384a4653d2d332a" + "github.com/gorilla/context 08b5f424b9271eedf6f9f0ce86cb9396ed337a42" + "github.com/gorilla/mux e3702bed27f0d39777b0b37b664b6280e8ef8fbf" + "github.com/go-sql-driver/mysql d523deb1b23d913de5bdada721a6071e71283618" + "github.com/hailocab/go-hostpool e80d13ce29ede4452c43dea11e79b9bc8a15b478" + "github.com/hashicorp/consul 39f93f011e591c842acc8053a7f5972aa6e592fd" + "github.com/hashicorp/go-cleanhttp d5fe4b57a186c716b0e00b8c301cbd9b4182694d" + "github.com/hashicorp/go-rootcerts 6bb64b370b90e7ef1fa532be9e591a81c3493e00" + "github.com/hashicorp/serf d6574a5bb1226678d7010325fb6c985db20ee458" + "github.com/influxdata/go-syslog eecd51df3ad85464a2bab9b7d3a45bc1e299059e" + "github.com/influxdata/tail c43482518d410361b6c383d7aebce33d0471d7bc" + "github.com/influxdata/toml 2a2e3012f7cfbef64091cc79776311e65dfa211b" + "github.com/influxdata/wlog 7c63b0a71ef8300adc255344d275e10e5c3a71ec" + "github.com/jackc/pgx da3231b0b66e2e74cdb779f1d46c5e958ba8be27" + "github.com/jmespath/go-jmespath 0b12d6b5" + "github.com/kardianos/osext ae77be60afb1dcacde03767a8c37337fad28ac14" + "github.com/kardianos/service 615a14ed75099c9eaac6949e22ac2341bf9d3197" + "github.com/kballard/go-shellquote 95032a82bc518f77982ea72343cc1ade730072f0" + "github.com/kr/logfmt b84e30acd515aadc4b783ad4ff83aff3299bdfe0" + "github.com/mailru/easyjson efc7eb8984d6655c26b5c9d2e65c024e5767c37c" + "github.com/matttproud/golang_protobuf_extensions c12348ce28de40eed0136aa2b644d0ee0650e56c" + "github.com/Microsoft/ApplicationInsights-Go d2df5d440eda5372f24fcac03839a64d6cb5f7e5" + "github.com/Microsoft/go-winio a6d595ae73cf27a1b8fc32930668708f45ce1c85" + "github.com/miekg/dns 5a2b9fab83ff0f8bfc99684bd5f43a37abe560f1" + "github.com/mitchellh/go-homedir 3864e76763d94a6df2f9960b16a20a33da9f9a66" + "github.com/mitchellh/mapstructure f15292f7a699fcc1a38a80977f80a046874ba8ac" + "github.com/multiplay/go-ts3 d0d44555495c8776880a17e439399e715a4ef319" + "github.com/naoina/go-stringutil 6b638e95a32d0c1131db0e7fe83775cbea4a0d0b" + "github.com/nats-io/gnatsd 6608e9ac3be979dcb0614b772cc86a87b71acaa3" + "github.com/nats-io/go-nats 062418ea1c2181f52dc0f954f6204370519a868b" + "github.com/nats-io/nuid 289cccf02c178dc782430d534e3c1f5b72af807f" + "github.com/nsqio/go-nsq eee57a3ac4174c55924125bb15eeeda8cffb6e6f" + "github.com/opencontainers/go-digest 279bed98673dd5bef374d3b6e4b09e2af76183bf" + "github.com/opencontainers/image-spec d60099175f88c47cd379c4738d158884749ed235" + "github.com/opentracing-contrib/go-observer a52f2342449246d5bcc273e65cbdcfa5f7d6c63c" + "github.com/opentracing/opentracing-go 1949ddbfd147afd4d964a9f00b24eb291e0e7c38" + "github.com/openzipkin/zipkin-go-opentracing 26cf9707480e6b90e5eff22cf0bbf05319154232" + "github.com/pierrec/lz4 1958fd8fff7f115e79725b1288e0b878b3e06b00" + "github.com/pkg/errors 645ef00459ed84a119197bfb8d8205042c6df63d" + "github.com/pmezard/go-difflib 792786c7400a136282c1664665ae0a8db921c6c2" + "github.com/prometheus/client_golang c5b7fccd204277076155f10851dad72b76a49317" + "github.com/prometheus/client_model 5c3871d89910bfb32f5fcab2aa4b9ec68e65a99f" + "github.com/prometheus/common 7600349dcfe1abd18d72d3a1770870d9800a7801" + "github.com/prometheus/procfs ae68e2d4c00fed4943b5f6698d504a5fe083da8a" + "github.com/rcrowley/go-metrics e2704e165165ec55d062f5919b4b29494e9fa790" + "github.com/samuel/go-zookeeper c4fab1ac1bec58281ad0667dc3f0907a9476ac47" + "github.com/satori/go.uuid f58768cc1a7a7e77a3bd49e98cdd21419399b6a3" + "github.com/shirou/gopsutil 8048a2e9c5773235122027dd585cf821b2af1249" + "github.com/shirou/w32 bb4de0191aa41b5507caa14b0650cdbddcd9280b" + "github.com/Shopify/sarama a6144ae922fd99dd0ea5046c8137acfb7fab0914" + "github.com/sirupsen/logrus c155da19408a8799da419ed3eeb0cb5db0ad5dbc" + "github.com/soniah/gosnmp 96b86229e9b3ffb4b954144cdc7f98fe3ee1003f" + "github.com/StackExchange/wmi 5d049714c4a64225c3c79a7cf7d02f7fb5b96338" + "github.com/streadway/amqp e5adc2ada8b8efff032bf61173a233d143e9318e" + "github.com/stretchr/objx 477a77ecc69700c7cdeb1fa9e129548e1c1c393c" + "github.com/stretchr/testify f35b8ab0b5a2cef36673838d662e249dd9c94686" + "github.com/tidwall/gjson f123b340873a0084cb27267eddd8ff615115fbff" + "github.com/tidwall/match 1731857f09b1f38450e2c12409748407822dc6be" + "github.com/vishvananda/netlink b2de5d10e38ecce8607e6b438b6d174f389a004e" + "github.com/vishvananda/netns 13995c7128ccc8e51e9a6bd2b551020a27180abd" + "github.com/vjeantet/grok ce01e59abcf6fbc9833b7deb5e4b8ee1769bcc53" + "github.com/vmware/govmomi e3a01f9611c32b2362366434bcd671516e78955d" + "github.com/wvanbergen/kafka e2edea948ddfee841ea9a263b32ccca15f7d6c2f" + "github.com/wvanbergen/kazoo-go f72d8611297a7cf105da904c04198ad701a60101" + "github.com/yuin/gopher-lua 46796da1b0b4794e1e341883a399f12cc7574b55" + "golang.org/x/crypto a2144134853fc9a27a7b1e3eb4f19f1a76df13c9 github.com/golang/crypto" + "golang.org/x/net a680a1efc54dd51c040b3b5ce4939ea3cf2ea0d1 github.com/golang/net" + "golang.org/x/oauth2 d2e6202438beef2727060aa7cabdd924d92ebfd9 github.com/golang/oauth2" + "golang.org/x/sys ac767d655b305d4e9612f5f6e33120b9176c4ad4 github.com/golang/sys" + "golang.org/x/text f21a4dfb5e38f5895301dc265a8def02365cc3d0 github.com/golang/text" + "google.golang.org/api 19ff8768a5c0b8e46ea281065664787eefc24121 github.com/googleapis/google-api-go-client" + "google.golang.org/appengine b1f26356af11148e710935ed1ac8a7f5702c7612 github.com/golang/appengine" + "google.golang.org/genproto fedd2861243fd1a8152376292b921b394c7bef7e github.com/google/go-genproto" + "google.golang.org/grpc 168a6198bcb0ef175f7dacec0b8691fc141dc9b8 github.com/grpc/grpc-go" + "go.opencensus.io 79993219becaa7e29e3b60cb67f5b8e82dee11d6 github.com/census-instrumentation/opencensus-go" + "gopkg.in/alecthomas/kingpin.v2 947dcec5ba9c011838740e680966fd7087a71d0d github.com/alecthomas/kingpin" + "gopkg.in/asn1-ber.v1 379148ca0225df7a432012b8df0355c2a2063ac0 github.com/go-asn1-ber/asn1-ber" + "gopkg.in/fatih/pool.v2 010e0b745d12eaf8426c95f9c3924d81dd0b668f github.com/fatih/pool" + "gopkg.in/fsnotify.v1 c2828203cd70a50dcccfb2761f8b1f8ceef9a8e9 github.com/fsnotify/fsnotify" + "gopkg.in/gorethink/gorethink.v3 7f5bdfd858bb064d80559b2a32b86669c5de5d3b github.com/gorethink/gorethink" + "gopkg.in/ldap.v2 bb7a9ca6e4fbc2129e3db588a34bc970ffe811a9 github.com/go-ldap/ldap" + "gopkg.in/mgo.v2 9856a29383ce1c59f308dd1cf0363a79b5bef6b5 github.com/go-mgo/mgo" + "gopkg.in/olivere/elastic.v5 52741dc2ce53629cbe1e673869040d886cba2cd5 github.com/olivere/elastic" + "gopkg.in/tomb.v1 dd632973f1e7218eb1089048e0798ec9ae7dceb8 github.com/go-tomb/tomb" + "gopkg.in/yaml.v2 5420a8b6744d3b0345ab293f6fcba19c978f1183 github.com/go-yaml/yaml" + ) + +inherit golang-build golang-vcs-snapshot systemd user + +MY_PV="${PV/_rc/-rc.}" + +DESCRIPTION="The plugin-driven server agent for collecting & reporting metrics." +HOMEPAGE="https://github.com/influxdata/telegraf" +SRC_URI="https://${EGO_PN}/archive/${MY_PV}.tar.gz -> ${P}.tar.gz + ${EGO_VENDOR_URI}" + +LICENSE="MIT" +SLOT="0" +KEYWORDS="~amd64" + +pkg_setup() { + enewgroup telegraf + enewuser telegraf -1 -1 -1 telegraf +} + +src_compile() { + pushd "src/${EGO_PN}" || die + pwd + find -iname telegraf.go + set -- env GOPATH="${S}" go build -i -v -work -x -o telegraf \ + cmd/telegraf/telegraf.go + echo "$@" + "$@" || die + popd || die +} + +src_install() { + pushd "src/${EGO_PN}" || die + dobin telegraf + insinto /etc/telegraf + doins etc/telegraf.conf + keepdir /etc/telegraf/telegraf.d + + insinto /etc/logrotate.d + doins etc/logrotate.d/telegraf + +systemd_dounit scripts/telegraf.service + newconfd "${FILESDIR}"/telegraf.confd telegraf + newinitd "${FILESDIR}"/telegraf.rc telegraf + + dodoc -r docs/* + + keepdir /var/log/telegraf + fowners telegraf:telegraf /var/log/telegraf +} diff --git a/net-analyzer/testssl/Manifest b/net-analyzer/testssl/Manifest new file mode 100644 index 000000000000..8cf37a4bddad --- /dev/null +++ b/net-analyzer/testssl/Manifest @@ -0,0 +1,3 @@ +DIST testssl-3.0.1.tar.gz 9207908 BLAKE2B 0c7c43b306866fa79718027ce9db3a894a4344f714a4318578f4d9dc79b09e1beba1f69f7f25e75ece6811e1394479a29e021697c30f160a0d9f3f291d4792c5 SHA512 e081c6bb24c45cb197b57403cfd4f384459ce2c0d0f0ccd2fa0f68d61429ba9bf4a351efd2b0febbadaca7b1f5825c338d8b03f59ea4cbe8467358ee92cdc715 +DIST testssl-3.0.2.tar.gz 9208016 BLAKE2B cacb21f34d769f3e255d1db01bf197c0dcb0dc619c09d8153b65ef1ce5daaddb0b43ba698c765de1993023992a101ca6a5cde66da098e3eba3e81df81b3cc824 SHA512 ad886d556d6682bc99d45a9719abf6ee00f4e0f763795a79e46e0495bc355ede56204b6f1fb0db19311e42913990b57016fb6a4adb7414bb7283d847c19e9fb2 +DIST testssl-3.0.tar.gz 9207778 BLAKE2B 56f13cb58bc930e0c70ef1ff4734dd7e363f362397ebe354c446f1fd6e73a0774a6eb84326a405a5aab224b058754e03fcecda254617eee2fde4d9566ada4e15 SHA512 a5e65d3145bc422cf03b49087cc24cadca367206a06dda61d114b0a6afd7c4921204e23cdc3ade2f5d7e9ce4adf17b54691b9d33d46b75b296111663e9cf063a diff --git a/net-analyzer/testssl/metadata.xml b/net-analyzer/testssl/metadata.xml new file mode 100644 index 000000000000..0f81b2d123ef --- /dev/null +++ b/net-analyzer/testssl/metadata.xml @@ -0,0 +1,14 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>kensington@gentoo.org</email> + </maintainer> + <use> + <flag name="bundled-openssl">Install precompiled versions of OpenSSL for greater testing coverage</flag> + </use> + <upstream> + <remote-id type="github">drwetter/testssl.sh</remote-id> + </upstream> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/testssl/testssl-3.0.1.ebuild b/net-analyzer/testssl/testssl-3.0.1.ebuild new file mode 100644 index 000000000000..8a2472e4e275 --- /dev/null +++ b/net-analyzer/testssl/testssl-3.0.1.ebuild @@ -0,0 +1,74 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +MY_PN="${PN}.sh" +MY_PV="${PV/_p/-}" + +DESCRIPTION="Tool to check TLS/SSL cipher support" +HOMEPAGE="https://testssl.sh/" +SRC_URI="https://github.com/drwetter/${MY_PN}/archive/${MY_PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="GPL-2 bundled-openssl? ( openssl )" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="bundled-openssl kerberos" + +RDEPEND=" + app-shells/bash[net] + net-dns/bind-tools + sys-apps/util-linux + sys-libs/ncurses:0 + sys-process/procps + bundled-openssl? ( + kerberos? ( + sys-libs/zlib + virtual/krb5 + ) + ) + !bundled-openssl? ( dev-libs/openssl:0 ) +" + +S=${WORKDIR}/${MY_PN}-${MY_PV} + +QA_PREBUILT="opt/${PN}/*" + +pkg_setup() { + if use amd64; then + if use kerberos; then + BUNDLED_OPENSSL="openssl.Linux.x86_64.krb5" + else + BUNDLED_OPENSSL="openssl.Linux.x86_64" + fi + elif use x86; then + BUNDLED_OPENSSL="openssl.Linux.i686" + fi +} + +src_prepare() { + default + sed -i ${PN}.sh \ + -e 's|TESTSSL_INSTALL_DIR="${TESTSSL_INSTALL_DIR:-""}"|TESTSSL_INSTALL_DIR="/"|' \ + -e 's|$TESTSSL_INSTALL_DIR/etc/|&testssl/|g' || die + + if use bundled-openssl; then + sed -i ${PN}.sh \ + -e "/find_openssl_binary()/a OPENSSL=\"/opt/${PN}/${BUNDLED_OPENSSL}\"" || die + fi +} + +src_install() { + dodoc CHANGELOG.md CREDITS.md Readme.md + dodoc openssl-iana.mapping.html + + dobin ${PN}.sh + + insinto /etc/${PN} + doins etc/* + + if use bundled-openssl; then + exeinto /opt/${PN} + use amd64 && doexe bin/${BUNDLED_OPENSSL} + fi +} diff --git a/net-analyzer/testssl/testssl-3.0.2.ebuild b/net-analyzer/testssl/testssl-3.0.2.ebuild new file mode 100644 index 000000000000..8a2472e4e275 --- /dev/null +++ b/net-analyzer/testssl/testssl-3.0.2.ebuild @@ -0,0 +1,74 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +MY_PN="${PN}.sh" +MY_PV="${PV/_p/-}" + +DESCRIPTION="Tool to check TLS/SSL cipher support" +HOMEPAGE="https://testssl.sh/" +SRC_URI="https://github.com/drwetter/${MY_PN}/archive/${MY_PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="GPL-2 bundled-openssl? ( openssl )" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="bundled-openssl kerberos" + +RDEPEND=" + app-shells/bash[net] + net-dns/bind-tools + sys-apps/util-linux + sys-libs/ncurses:0 + sys-process/procps + bundled-openssl? ( + kerberos? ( + sys-libs/zlib + virtual/krb5 + ) + ) + !bundled-openssl? ( dev-libs/openssl:0 ) +" + +S=${WORKDIR}/${MY_PN}-${MY_PV} + +QA_PREBUILT="opt/${PN}/*" + +pkg_setup() { + if use amd64; then + if use kerberos; then + BUNDLED_OPENSSL="openssl.Linux.x86_64.krb5" + else + BUNDLED_OPENSSL="openssl.Linux.x86_64" + fi + elif use x86; then + BUNDLED_OPENSSL="openssl.Linux.i686" + fi +} + +src_prepare() { + default + sed -i ${PN}.sh \ + -e 's|TESTSSL_INSTALL_DIR="${TESTSSL_INSTALL_DIR:-""}"|TESTSSL_INSTALL_DIR="/"|' \ + -e 's|$TESTSSL_INSTALL_DIR/etc/|&testssl/|g' || die + + if use bundled-openssl; then + sed -i ${PN}.sh \ + -e "/find_openssl_binary()/a OPENSSL=\"/opt/${PN}/${BUNDLED_OPENSSL}\"" || die + fi +} + +src_install() { + dodoc CHANGELOG.md CREDITS.md Readme.md + dodoc openssl-iana.mapping.html + + dobin ${PN}.sh + + insinto /etc/${PN} + doins etc/* + + if use bundled-openssl; then + exeinto /opt/${PN} + use amd64 && doexe bin/${BUNDLED_OPENSSL} + fi +} diff --git a/net-analyzer/testssl/testssl-3.0.ebuild b/net-analyzer/testssl/testssl-3.0.ebuild new file mode 100644 index 000000000000..f8845bdafb9c --- /dev/null +++ b/net-analyzer/testssl/testssl-3.0.ebuild @@ -0,0 +1,74 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +MY_PN="${PN}.sh" +MY_PV="${PV/_p/-}" + +DESCRIPTION="Tool to check TLS/SSL cipher support" +HOMEPAGE="https://testssl.sh/" +SRC_URI="https://github.com/drwetter/${MY_PN}/archive/${MY_PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="GPL-2 bundled-openssl? ( openssl )" +SLOT="0" +KEYWORDS="amd64 x86" +IUSE="bundled-openssl kerberos" + +RDEPEND=" + app-shells/bash[net] + net-dns/bind-tools + sys-apps/util-linux + sys-libs/ncurses:0 + sys-process/procps + bundled-openssl? ( + kerberos? ( + sys-libs/zlib + virtual/krb5 + ) + ) + !bundled-openssl? ( dev-libs/openssl:0 ) +" + +S=${WORKDIR}/${MY_PN}-${MY_PV} + +QA_PREBUILT="opt/${PN}/*" + +pkg_setup() { + if use amd64; then + if use kerberos; then + BUNDLED_OPENSSL="openssl.Linux.x86_64.krb5" + else + BUNDLED_OPENSSL="openssl.Linux.x86_64" + fi + elif use x86; then + BUNDLED_OPENSSL="openssl.Linux.i686" + fi +} + +src_prepare() { + default + sed -i ${PN}.sh \ + -e 's|TESTSSL_INSTALL_DIR="${TESTSSL_INSTALL_DIR:-""}"|TESTSSL_INSTALL_DIR="/"|' \ + -e 's|$TESTSSL_INSTALL_DIR/etc/|&testssl/|g' || die + + if use bundled-openssl; then + sed -i ${PN}.sh \ + -e "/find_openssl_binary()/a OPENSSL=\"/opt/${PN}/${BUNDLED_OPENSSL}\"" || die + fi +} + +src_install() { + dodoc CHANGELOG.md CREDITS.md Readme.md + dodoc openssl-iana.mapping.html + + dobin ${PN}.sh + + insinto /etc/${PN} + doins etc/* + + if use bundled-openssl; then + exeinto /opt/${PN} + use amd64 && doexe bin/${BUNDLED_OPENSSL} + fi +} diff --git a/net-analyzer/thc-ipv6/Manifest b/net-analyzer/thc-ipv6/Manifest new file mode 100644 index 000000000000..2d19bb77271b --- /dev/null +++ b/net-analyzer/thc-ipv6/Manifest @@ -0,0 +1 @@ +DIST thc-ipv6-3.2.tar.gz 1595453 BLAKE2B f1bb1cdc31f4cf4d067b39997ca3cc2d6d8c15e7a8c585c7c494f03e229fccbcd65677e382a65f0e650d79278f5ede89173db1cdf313ade7c48dff1566856afa SHA512 648db4618ebb83572e2e318cdbb284fe96a86adf335f7dd9b26fd010c76d12e9137ed7367207c66c93c1961c868d3917d706db9f597289ac47ea3f9b83c03441 diff --git a/net-analyzer/thc-ipv6/files/thc-ipv6-3.2-stdint.patch b/net-analyzer/thc-ipv6/files/thc-ipv6-3.2-stdint.patch new file mode 100644 index 000000000000..7873563b2377 --- /dev/null +++ b/net-analyzer/thc-ipv6/files/thc-ipv6-3.2-stdint.patch @@ -0,0 +1,10 @@ +--- thc-ipv6-3.2/dnsrevenum6.c ++++ thc-ipv6-3.2/dnsrevenum6.c +@@ -17,6 +17,7 @@ + + #include <stdio.h> + #include <stdlib.h> ++#include <stdint.h> + #include <string.h> + #include <strings.h> + #include <string.h> diff --git a/net-analyzer/thc-ipv6/metadata.xml b/net-analyzer/thc-ipv6/metadata.xml new file mode 100644 index 000000000000..d85b4252fc33 --- /dev/null +++ b/net-analyzer/thc-ipv6/metadata.xml @@ -0,0 +1,6 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<!-- maintainer-needed --> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/thc-ipv6/thc-ipv6-3.2-r1.ebuild b/net-analyzer/thc-ipv6/thc-ipv6-3.2-r1.ebuild new file mode 100644 index 000000000000..71f98da3f733 --- /dev/null +++ b/net-analyzer/thc-ipv6/thc-ipv6-3.2-r1.ebuild @@ -0,0 +1,54 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 +[[ ${PV} == *9999 ]] && SCM="git-r3" +EGIT_REPO_URI="https://github.com/vanhauser-thc/thc-ipv6.git" +EGIT_BRANCH=master + +inherit eutils toolchain-funcs ${SCM} + +DESCRIPTION="complete tool set to attack the inherent protocol weaknesses of IPV6 and ICMP6" +HOMEPAGE="https://www.thc.org/thc-ipv6/" +LICENSE="AGPL-3 openssl" +SLOT="0" +IUSE="ssl" + +if [[ ${PV} != *9999 ]]; then + SRC_URI="https://github.com/vanhauser-thc/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz" + KEYWORDS="~amd64 ~x86" +fi + +DEPEND="net-libs/libpcap + net-libs/libnetfilter_queue + ssl? ( dev-libs/openssl:0= )" +RDEPEND="${DEPEND}" + +PATCHES=( "${FILESDIR}/${PN}-3.2-stdint.patch" ) + +src_unpack() { + if [[ ${PV} != *9999 ]]; then + default_src_unpack + else + git-r3_src_unpack + fi +} + +src_prepare() { + sed -e '/^CFLAGS=/s,CFLAGS=,CFLAGS?=,' \ + -i Makefile || die + if ! use ssl ; then + sed -e '/^HAVE_SSL/s:^:#:' \ + -i Makefile + fi + default +} + +src_compile() { + emake CC="$(tc-getCC)" +} + +src_install() { + emake DESTDIR="${D}" PREFIX="/usr" STRIP="true" install + dodoc CHANGES HOWTO-INJECT README +} diff --git a/net-analyzer/thc-ipv6/thc-ipv6-9999.ebuild b/net-analyzer/thc-ipv6/thc-ipv6-9999.ebuild new file mode 100644 index 000000000000..71f98da3f733 --- /dev/null +++ b/net-analyzer/thc-ipv6/thc-ipv6-9999.ebuild @@ -0,0 +1,54 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 +[[ ${PV} == *9999 ]] && SCM="git-r3" +EGIT_REPO_URI="https://github.com/vanhauser-thc/thc-ipv6.git" +EGIT_BRANCH=master + +inherit eutils toolchain-funcs ${SCM} + +DESCRIPTION="complete tool set to attack the inherent protocol weaknesses of IPV6 and ICMP6" +HOMEPAGE="https://www.thc.org/thc-ipv6/" +LICENSE="AGPL-3 openssl" +SLOT="0" +IUSE="ssl" + +if [[ ${PV} != *9999 ]]; then + SRC_URI="https://github.com/vanhauser-thc/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz" + KEYWORDS="~amd64 ~x86" +fi + +DEPEND="net-libs/libpcap + net-libs/libnetfilter_queue + ssl? ( dev-libs/openssl:0= )" +RDEPEND="${DEPEND}" + +PATCHES=( "${FILESDIR}/${PN}-3.2-stdint.patch" ) + +src_unpack() { + if [[ ${PV} != *9999 ]]; then + default_src_unpack + else + git-r3_src_unpack + fi +} + +src_prepare() { + sed -e '/^CFLAGS=/s,CFLAGS=,CFLAGS?=,' \ + -i Makefile || die + if ! use ssl ; then + sed -e '/^HAVE_SSL/s:^:#:' \ + -i Makefile + fi + default +} + +src_compile() { + emake CC="$(tc-getCC)" +} + +src_install() { + emake DESTDIR="${D}" PREFIX="/usr" STRIP="true" install + dodoc CHANGES HOWTO-INJECT README +} diff --git a/net-analyzer/thcrut/Manifest b/net-analyzer/thcrut/Manifest new file mode 100644 index 000000000000..2c53d56971d0 --- /dev/null +++ b/net-analyzer/thcrut/Manifest @@ -0,0 +1 @@ +DIST thcrut-1.2.5.tar.gz 667929 BLAKE2B c7b5f252006ab06a6886efe82a6d9438df3fe3c61b277bc725f2d8a7ba7f86488b89e0254dfa53f16b5f14f9e0f58bb247e6697db10f1e5e87625322ae633ae4 SHA512 cbef051f0e668e57e13cd3435c109c01aac66a31d5c7a6a1b60a7767fb740d50489c9caefeb8a188d803d5ee3a22e5b7cedf425462a9424ace2dbc2dfe0dda39 diff --git a/net-analyzer/thcrut/files/thcrut-1.2.5-configure.patch b/net-analyzer/thcrut/files/thcrut-1.2.5-configure.patch new file mode 100644 index 000000000000..daa069e22afd --- /dev/null +++ b/net-analyzer/thcrut/files/thcrut-1.2.5-configure.patch @@ -0,0 +1,42 @@ +--- a/configure.in ++++ b/configure.in +@@ -153,10 +153,8 @@ + dnl libnet_init_packet only available in < libnet-1.1.x + dnl AC_CHECK_LIB(net, libnet_init_packet,, AC_MSG_ERROR(We need libnet. + dnl Get libnet from http://www.packetfactory.net or try --with-[[libs,includes]]=DIR)) +-AC_CHECK_LIB(net, libnet_init_packet, [NET=yes], [NET=no]) ++AC_CHECK_LIB(net-1.0, libnet_init_packet, [NET=yes], [NET=no]) + if test x"$NET" = x"no" -o x"$DIST" = x"yes"; then +- AC_CONFIG_SUBDIRS(Libnet-1.0.2a) +- THCRUT_SUBDIRS="$THCRUT_SUBDIRS Libnet-1.0.2a" + CPPFLAGS="-I../Libnet-1.0.2a/include ${CPPFLAGS}" + LDFLAGS="-L../Libnet-1.0.2a/src ${LDFLAGS}" + PRG_LIBNET_CONFIG_CFLAGS="../Libnet-1.0.2a/libnet-config --cflags --defines | tr '\n' ' '" +@@ -164,14 +162,12 @@ + dnl CFLAGS="`${srcdir}/Libnet-1.0.2a/libnet-config --cflags --defines | tr '\n' ' '` $CFLAGS" + dnl LIBS="`${srcdir}/Libnet-1.0.2a/libnet-config --libs` $LIBS" + else +- CFLAGS="`libnet-config --cflags --defines | tr '\n' ' '` $CFLAGS" +- LIBS="`libnet-config --libs` $LIBS" ++ CFLAGS="`libnet-1.0-config --cflags --defines | tr '\n' ' '` $CFLAGS" ++ LIBS="`libnet-1.0-config --libs` $LIBS" + fi + + AC_CHECK_LIB(pcre, pcre_compile, [PCRE=yes], [PCRE=no]) + if test x"$PCRE" = x"no" -o x"$DIST" = x"yes"; then +- AC_CONFIG_SUBDIRS(pcre-3.9) +- THCRUT_SUBDIRS="$THCRUT_SUBDIRS pcre-3.9" + CPPFLAGS="-I../pcre-3.9 ${CPPFLAGS}" + LDFLAGS="-L../pcre-3.9 ${LDFLAGS}" + PRG_PCRE_CONFIG_CFLAGS="../pcre-3.9/pcre-config --cflags" +@@ -199,8 +195,8 @@ + AC_OUTPUT(Makefile src/Makefile) + + dnl Just to show the correct values... +-CFLAGS="`${srcdir}/pcre-3.9/pcre-config --cflags` `${srcdir}/Libnet-1.0.2a/libnet-config --cflags --defines | tr '\n' ' '` $CFLAGS" +-LIBS="`${srcdir}/pcre-3.9/pcre-config --libs` `${srcdir}/Libnet-1.0.2a/libnet-config --libs` $LIBS" ++CFLAGS="`${srcdir}/pcre-3.9/pcre-config --cflags` `libnet-config --cflags --defines | tr '\n' ' '` $CFLAGS" ++LIBS="`${srcdir}/pcre-3.9/pcre-config --libs` `libnet-config --libs` $LIBS" + + echo "THCrut has been configured with the following options:" + echo " User binaries: $B" diff --git a/net-analyzer/thcrut/files/thcrut-1.2.5-flags.patch b/net-analyzer/thcrut/files/thcrut-1.2.5-flags.patch new file mode 100644 index 000000000000..0a6bcaf4ebce --- /dev/null +++ b/net-analyzer/thcrut/files/thcrut-1.2.5-flags.patch @@ -0,0 +1,11 @@ +--- a/configure.in ++++ b/configure.in +@@ -23,7 +23,7 @@ + dnl + dnl Use these compiler flags if we have gcc. + dnl +-if test $ac_cv_prog_gcc = yes; then ++if test $ac_cv_prog_gcc_not_on_gentoo = yes; then + CCOPTS='-O2 -Wall' + CFLAGS="$CCOPTS" + fi diff --git a/net-analyzer/thcrut/files/thcrut-1.2.5-fno-common.patch b/net-analyzer/thcrut/files/thcrut-1.2.5-fno-common.patch new file mode 100644 index 000000000000..a934048f341e --- /dev/null +++ b/net-analyzer/thcrut/files/thcrut-1.2.5-fno-common.patch @@ -0,0 +1,20 @@ +--- a/src/discover_dispatch.c ++++ b/src/discover_dispatch.c +@@ -81,7 +81,6 @@ + + unsigned short ip_tcp_sync_chksum; + unsigned short ip_tcp_fp_chksum; +-struct sockaddr_in ip_tcp_sync_addr; + static dispatch_func_recv_t dispatch_funcs[] = { + dis_recvdummy, + dis_recv, +--- a/src/discover_main.c ++++ b/src/discover_main.c +@@ -22,7 +22,6 @@ + extern struct _opt opt; + extern char ip_tcp_sync[]; + +-struct sockaddr_in ip_tcp_sync_addr; + int rawsox; + + #define DFL_HOSTS_PARALLEL (5000) diff --git a/net-analyzer/thcrut/files/thcrut-1.2.5-libnet.patch b/net-analyzer/thcrut/files/thcrut-1.2.5-libnet.patch new file mode 100644 index 000000000000..87488c8c5196 --- /dev/null +++ b/net-analyzer/thcrut/files/thcrut-1.2.5-libnet.patch @@ -0,0 +1,65 @@ +--- a/src/arp_main.c ++++ b/src/arp_main.c +@@ -18 +18 @@ +-#include <libnet.h> ++#include <libnet-1.0.h> +--- a/src/arpg.c ++++ b/src/arpg.c +@@ -12 +12 @@ +-#include <libnet.h> ++#include <libnet-1.0.h> +--- a/src/dhcp_main.c ++++ b/src/dhcp_main.c +@@ -14 +14 @@ +-#include <libnet.h> ++#include <libnet-1.0.h> +--- a/src/discover_dispatch.c ++++ b/src/discover_dispatch.c +@@ -10 +10 @@ +-#include <libnet.h> ++#include <libnet-1.0.h> +--- a/src/discover_main.c ++++ b/src/discover_main.c +@@ -8 +8 @@ +-#include <libnet.h> ++#include <libnet-1.0.h> +--- a/src/fp.h ++++ b/src/fp.h +@@ -10 +10 @@ +-#include <libnet.h> ++#include <libnet-1.0.h> +--- a/src/icmp_main.c ++++ b/src/icmp_main.c +@@ -14 +14 @@ +-#include <libnet.h> ++#include <libnet-1.0.h> +--- a/src/network_raw.c ++++ b/src/network_raw.c +@@ -10 +10 @@ +-#include <libnet.h> ++#include <libnet-1.0.h> +--- a/src/packets.c ++++ b/src/packets.c +@@ -6 +6 @@ +-#include <libnet.h> ++#include <libnet-1.0.h> +--- a/src/thcrut.c ++++ b/src/thcrut.c +@@ -87 +87 @@ +-#include <libnet.h> ++#include <libnet-1.0.h> +--- a/src/thcrut.h ++++ b/src/thcrut.h +@@ -7 +7 @@ +-#include <libnet.h> ++#include <libnet-1.0.h> +--- a/src/thcrut_libnet.c ++++ b/src/thcrut_libnet.c +@@ -5 +5 @@ +-#include <libnet.h> ++#include <libnet-1.0.h> +--- a/src/thcrut_libnet.h ++++ b/src/thcrut_libnet.h +@@ -5 +5 @@ +-#include <libnet.h> ++#include <libnet-1.0.h> diff --git a/net-analyzer/thcrut/metadata.xml b/net-analyzer/thcrut/metadata.xml new file mode 100644 index 000000000000..bd13a914477c --- /dev/null +++ b/net-analyzer/thcrut/metadata.xml @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<maintainer type="project"> + <email>netmon@gentoo.org</email> + <name>Gentoo network monitoring and analysis project</name> +</maintainer> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/thcrut/thcrut-1.2.5-r1.ebuild b/net-analyzer/thcrut/thcrut-1.2.5-r1.ebuild new file mode 100644 index 000000000000..fef8c3f8e44e --- /dev/null +++ b/net-analyzer/thcrut/thcrut-1.2.5-r1.ebuild @@ -0,0 +1,29 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 +inherit autotools eutils + +DESCRIPTION="Network discovery and fingerprinting tool" +HOMEPAGE="http://www.thc.org/thc-rut/" +SRC_URI="https://github.com/vanhauser-thc/THC-Archive/raw/master/Tools/${P}.tar.gz" + +LICENSE="free-noncomm PCRE GPL-1+" +SLOT="0" +KEYWORDS="amd64 ~ppc sparc x86" + +DEPEND=" + dev-libs/libpcre + net-libs/libnet:1.0 + net-libs/libpcap +" + +src_prepare() { + rm -r Libnet-1.0.2a pcre-3.9 || die + epatch \ + "${FILESDIR}"/${P}-libnet.patch \ + "${FILESDIR}"/${P}-configure.patch + eautoreconf +} + +DOCS=( ChangeLog FAQ README TODO thcrutlogo.txt ) diff --git a/net-analyzer/thcrut/thcrut-1.2.5-r2.ebuild b/net-analyzer/thcrut/thcrut-1.2.5-r2.ebuild new file mode 100644 index 000000000000..3e5ea0999a81 --- /dev/null +++ b/net-analyzer/thcrut/thcrut-1.2.5-r2.ebuild @@ -0,0 +1,35 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +inherit autotools + +DESCRIPTION="Network discovery and fingerprinting tool" +HOMEPAGE="http://www.thc.org/thc-rut/" +SRC_URI="https://github.com/vanhauser-thc/THC-Archive/raw/master/Tools/${P}.tar.gz" + +LICENSE="free-noncomm PCRE GPL-1+" +SLOT="0" +KEYWORDS="~amd64 ~ppc ~sparc ~x86" + +DEPEND=" + dev-libs/libpcre + net-libs/libnet:1.0 + net-libs/libpcap +" +RDEPEND=" + ${DEPEND} +" +DOCS=( ChangeLog FAQ README TODO thcrutlogo.txt ) +PATCHES=( + "${FILESDIR}"/${P}-configure.patch + "${FILESDIR}"/${P}-flags.patch + "${FILESDIR}"/${P}-fno-common.patch + "${FILESDIR}"/${P}-libnet.patch +) + +src_prepare() { + rm -r Libnet-1.0.2a pcre-3.9 || die + default + eautoreconf +} diff --git a/net-analyzer/thrulay/Manifest b/net-analyzer/thrulay/Manifest new file mode 100644 index 000000000000..39970ea4d158 --- /dev/null +++ b/net-analyzer/thrulay/Manifest @@ -0,0 +1 @@ +DIST thrulay-0.9.tar.gz 370312 BLAKE2B fdcbc0785ccc61bb85454d878f46bef97c346dd8c8a54591c993940615a8047b24fad00ffca5c3db6d7c1303b42c67f45b828e899564d7c920cc83924e3a18c2 SHA512 9655ef37f6ef3ba51a2fadacf08978fb1c284af6b571dbf76c44e5582bf705bec08170b3b2cc69512b8327485dfd3f758ed2addf510a075558aea70eb4779a6f diff --git a/net-analyzer/thrulay/files/thrulayd-conf.d b/net-analyzer/thrulay/files/thrulayd-conf.d new file mode 100644 index 000000000000..a1350488a714 --- /dev/null +++ b/net-analyzer/thrulay/files/thrulayd-conf.d @@ -0,0 +1,8 @@ +# Copyright 1999-2004 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +# The default window size is 4194304 bytes +#THRULAYD_WINDOW="4194304" + +# By default, thrulayd will listen on 5003/tcp +#THRULAYD_PORT="5003" diff --git a/net-analyzer/thrulay/files/thrulayd-init.d b/net-analyzer/thrulay/files/thrulayd-init.d new file mode 100644 index 000000000000..8fa9f4bc6ba5 --- /dev/null +++ b/net-analyzer/thrulay/files/thrulayd-init.d @@ -0,0 +1,21 @@ +#!/sbin/openrc-run +# Copyright 1999-2004 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +depend() { + use net +} + +start() { + [ -n "${THRULAYD_WINDOW}" ] && THRULAYD_OPTS="${THRULAYD_OPTS} -w${THRULAYD_WINDOW}" + [ -n "${THRULAYD_PORT}" ] && THRULAYD_OPTS="${THRULAYD_OPTS} -p${THRULAYD_PORT}" + ebegin "Starting thrulayd" + start-stop-daemon --start --quiet --exec /usr/sbin/thrulayd -- ${THRULAYD_OPTS} + eend $? +} + +stop() { + ebegin "Stopping thrulayd" + start-stop-daemon --stop --quiet --exec /usr/sbin/thrulayd + eend $? +} diff --git a/net-analyzer/thrulay/metadata.xml b/net-analyzer/thrulay/metadata.xml new file mode 100644 index 000000000000..b99b97f230ff --- /dev/null +++ b/net-analyzer/thrulay/metadata.xml @@ -0,0 +1,11 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>robbat2@gentoo.org</email> + </maintainer> + <upstream> + <remote-id type="sourceforge">thrulay</remote-id> + </upstream> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/thrulay/thrulay-0.9-r1.ebuild b/net-analyzer/thrulay/thrulay-0.9-r1.ebuild new file mode 100644 index 000000000000..388b9ba4e265 --- /dev/null +++ b/net-analyzer/thrulay/thrulay-0.9-r1.ebuild @@ -0,0 +1,40 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit autotools + +DESCRIPTION="Measure the capacity of a network by sending a bulk TCP stream over it" +HOMEPAGE="http://www.internet2.edu/~shalunov/thrulay/" +SRC_URI=" + http://www.internet2.edu/~shalunov/thrulay/${P}.tar.gz + mirror://sourceforge/${PN}/${P}.tar.gz" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="amd64 ppc x86" + +src_prepare() { + default + + echo 'thrulay thrulayd: libthrulay.la' >> src/Makefile.am || die + eautoreconf +} + +src_configure() { + econf --disable-static +} + +src_install() { + default + + dodoc doc/thrulay-protocol.txt + doman doc/thrulay*.[1-8] + + newinitd "${FILESDIR}"/thrulayd-init.d thrulayd + newconfd "${FILESDIR}"/thrulayd-conf.d thrulayd + + # no static archives + find "${D}" -name '*.la' -delete || die +} diff --git a/net-analyzer/tleds/Manifest b/net-analyzer/tleds/Manifest new file mode 100644 index 000000000000..875d0ad7c6d7 --- /dev/null +++ b/net-analyzer/tleds/Manifest @@ -0,0 +1,2 @@ +DIST tleds-1.05beta10.tgz 28640 BLAKE2B d51104cc4f6341e383582edbb65bd4e7057807fbca33fe9c6d6daca519f804c6e5170c547b6a42e629d000eb3243c0c64e6ab0517293f12b34744b7eca8b19b0 SHA512 661ac8749c85ce20ffc2851a62ee7691e6cddf3700f4a388465bbdf2faa117d8bd6e316541bc5e2fa81d18f74d47bdd78010b8490124f39b6a1c085c4d345d3a +DIST tleds-1.05beta11.patch.bz2 5540 BLAKE2B 91da2fbcd339be7d313645f63b3daf9404a82a9678e1f562aae357ed16c6d3d47d8d38f021cf367b0038987e8a5d667cf650c4ca5e2184cdb1f4f1c1f67b1b45 SHA512 8c6e5b28e055fd546af97244230560cb22d7def65a8c16e0257d9f41b789394f744a056a95bf7d9f6fb9dcf8ab0bcacfc8fce7c91d0e8be798ae2af4817ce1a4 diff --git a/net-analyzer/tleds/files/tleds-1.05_beta11-gentoo.patch b/net-analyzer/tleds/files/tleds-1.05_beta11-gentoo.patch new file mode 100644 index 000000000000..96e6e3d21d45 --- /dev/null +++ b/net-analyzer/tleds/files/tleds-1.05_beta11-gentoo.patch @@ -0,0 +1,53 @@ +--- a/Changes ++++ b/Changes +@@ -1,4 +1,7 @@ + VERSION DATE WHAT WAS FIXED OR WHAT WAS/IS NEW ++ ++ 2 Jul 2002 2.4/2.5 patch ++ + 1.05b11 7 Mar 2002 Support for multiple interfaces + + 1.05b7 2 Apr 1998 Keeps LEDs deattached also after VT is reset if run +--- a/tleds.c ++++ b/tleds.c +@@ -43,16 +43,6 @@ + #define VERSION "1.05beta11" + #define MYNAME "tleds" + +-/* Supported kernel version */ +-/* If you want to compile for Linux 2.1.x add -DKERNEL2_1 to gcc options. */ +-/* Currently kernel v2.1.97 is "tested", older v2.1.x kernels may not work */ +-#ifdef KERNEL2_1 +-#undef KERNEL2_1 +-#define KERNEL2_0 0 +-#else +-#define KERNEL2_0 1 +-#endif +- + /* If you don't want X stuff. */ + #ifdef NO_X_SUPPORT + #define REMOVE_X_CODE 1 +--- a/Makefile ++++ b/Makefile +@@ -9,18 +9,18 @@ + + # For 2.1.x kernels, you have to include -DKERNEL2_1 option for gcc + +-GCCOPTS = -D_GNU_SOURCE -O3 -Wall ++GCCOPTS = -D_GNU_SOURCE $(CFLAGS) $(LDFLAGS) -Wall + + # The first one is if you want to include X code + xtleds: tleds.c Makefile + # Making xtleds +- gcc $(GCCOPTS) -o xtleds tleds.c -I /usr/X11R6/include/ -L /usr/X11R6/lib/ -lX11 ++ $(CC) $(GCCOPTS) -o xtleds tleds.c -I /usr/include/ -L /usr/lib/ -lX11 + + # This second one works only when started in VT. Check the REMOVE_X_CODE + # in the source code. + tleds: tleds.c Makefile + # Making tleds +- gcc -DNO_X_SUPPORT $(GCCOPTS) -o tleds tleds.c ++ $(CC) -DNO_X_SUPPORT $(GCCOPTS) -o tleds tleds.c + + help: + # make help - this. diff --git a/net-analyzer/tleds/files/tleds.conf.d b/net-analyzer/tleds/files/tleds.conf.d new file mode 100644 index 000000000000..477408d30ed0 --- /dev/null +++ b/net-analyzer/tleds/files/tleds.conf.d @@ -0,0 +1,6 @@ +# Copyright 2003-2004 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +IFACE="eth0" +DELAY=50 +EXTRA_OPTS="" diff --git a/net-analyzer/tleds/files/tleds.init.d b/net-analyzer/tleds/files/tleds.init.d new file mode 100644 index 000000000000..9815c3b8a621 --- /dev/null +++ b/net-analyzer/tleds/files/tleds.init.d @@ -0,0 +1,21 @@ +#!/sbin/openrc-run +# Copyright 1999-2004 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + + +depend() { + need net +} + +start() { + ebegin "Starting tleds" + /usr/sbin/tleds -d ${DELAY} ${IFACE} ${EXTRA_OPTS} > /dev/null + eend $? +} + +stop() { + ebegin "Stopping tleds" + /usr/sbin/tleds -k > /dev/null + eend $? +} + diff --git a/net-analyzer/tleds/metadata.xml b/net-analyzer/tleds/metadata.xml new file mode 100644 index 000000000000..bd13a914477c --- /dev/null +++ b/net-analyzer/tleds/metadata.xml @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<maintainer type="project"> + <email>netmon@gentoo.org</email> + <name>Gentoo network monitoring and analysis project</name> +</maintainer> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/tleds/tleds-1.05_beta11-r2.ebuild b/net-analyzer/tleds/tleds-1.05_beta11-r2.ebuild new file mode 100644 index 000000000000..56abdfd1f3cd --- /dev/null +++ b/net-analyzer/tleds/tleds-1.05_beta11-r2.ebuild @@ -0,0 +1,44 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 +inherit eutils toolchain-funcs + +MY_P="${P/_/}" +S="${WORKDIR}/${MY_P/eta11/}" +DESCRIPTION="Blinks keyboard LEDs indicating outgoing and incoming network packets on selected network interface" +HOMEPAGE="http://www.hut.fi/~jlohikos/tleds_orig.html" +SRC_URI=" + http://www.hut.fi/~jlohikos/tleds/public/${MY_P/11/10}.tgz + http://www.hut.fi/~jlohikos/tleds/public/${MY_P}.patch.bz2 +" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="amd64 ~ppc x86" +IUSE="X" + +DEPEND="X? ( x11-libs/libX11 )" +RDEPEND="${DEPEND}" + +src_prepare() { + # code patches + epatch \ + "${WORKDIR}"/${MY_P}.patch \ + "${FILESDIR}"/${P}-gentoo.patch +} + +src_compile() { + emake CC=$(tc-getCC) $(usex X all tleds) +} + +src_install() { + dosbin tleds + use X && dosbin xtleds + + doman tleds.1 + dodoc README Changes + + newinitd "${FILESDIR}"/tleds.init.d tleds + newconfd "${FILESDIR}"/tleds.conf.d tleds +} diff --git a/net-analyzer/tptest/Manifest b/net-analyzer/tptest/Manifest new file mode 100644 index 000000000000..612d7fb052a5 --- /dev/null +++ b/net-analyzer/tptest/Manifest @@ -0,0 +1 @@ +DIST tptest-3.1.7.tar.gz 313801 BLAKE2B cf4cc6e1e76dbaee8925d9432335ec0a28fcf790dba5c85568ea538fe442c55c8a3ad7ac4fbf4cb1c4ed967cc18dab50212ab26915232bd7fc284dc4e6f0278b SHA512 c78fdbc561adbe109be9fc45a2dbd5c452235525ac4d5f24e39fd8824825fd02c35853411c3f4ae1870f98b576df37f3f1f1266de7c40edcb8f35c69b9063c59 diff --git a/net-analyzer/tptest/files/tptest-3.1.7-getstatsfromlinevuln.patch b/net-analyzer/tptest/files/tptest-3.1.7-getstatsfromlinevuln.patch new file mode 100644 index 000000000000..4b7fd209f9e4 --- /dev/null +++ b/net-analyzer/tptest/files/tptest-3.1.7-getstatsfromlinevuln.patch @@ -0,0 +1,150 @@ +--- a/engine/tpcommon.c ++++ b/engine/tpcommon.c +@@ -37,6 +37,8 @@ + #include <stdio.h> + #include <string.h> + #include <stdarg.h> ++#include <stdlib.h> ++#include <stddef.h> + + #ifdef UNIX + #include <sys/time.h> +@@ -194,68 +196,76 @@ done: + + + // Fill a tpStats structure with the contents from a STATS line +-int GetStatsFromLine(char *line, TPStats *s) ++int GetStatsFromLine(const char *line, TPStats *s) + { + char valBuf[30]; ++ char * stats_ptr = NULL; + + if (strncmp(line, "STATS ", 6) != 0) + return -1; +- memset(valBuf, 0, 30); ++ memset(valBuf, 0, sizeof(valBuf)); ++ stats_ptr = ((char *)line)+6; + +- if (CopyTagField(valBuf, 29, line+6, "majorv")) +- s->MajorVersion = atoi(valBuf); +- if (CopyTagField(valBuf, 29, line+6, "minorv")) +- s->MinorVersion = atoi(valBuf); +- if (CopyTagField(valBuf, 29, line+6, "pktssent")) +- s->PktsSent = atoi(valBuf); +- if (CopyTagField(valBuf, 29, line+6, "pktsunsent")) +- s->PktsUnSent = atoi(valBuf); +- if (CopyTagField(valBuf, 29, line+6, "pktsrcvd")) +- s->PktsRecvd = atoi(valBuf); +- if (CopyTagField(valBuf, 29, line+6, "bytessent")) ++ if (CopyTagField(valBuf, sizeof(valBuf)-1, stats_ptr, "majorv")) ++ s->MajorVersion = (USHORT) strtoul(valBuf,NULL,10); ++ if (CopyTagField(valBuf, sizeof(valBuf)-1, stats_ptr, "minorv")) ++ s->MinorVersion = (USHORT) strtoul(valBuf,NULL,10); ++ if (CopyTagField(valBuf, sizeof(valBuf)-1, stats_ptr, "pktssent")) ++ s->PktsSent = (UINT32) strtoul(valBuf,NULL,10); ++ if (CopyTagField(valBuf, sizeof(valBuf)-1, stats_ptr, "pktsunsent")) ++ s->PktsUnSent = (UINT32) strtoul(valBuf,NULL,10); ++ if (CopyTagField(valBuf, sizeof(valBuf)-1, stats_ptr, "pktsrcvd")) ++ s->PktsRecvd = (UINT32) strtoul(valBuf,NULL,10); ++ if (CopyTagField(valBuf, sizeof(valBuf)-1, stats_ptr, "bytessent")) + sscanf(valBuf, "%" LONG_LONG_PREFIX "d", &(s->BytesSent)); +- if (CopyTagField(valBuf, 29, line+6, "bytesrcvd")) ++ if (CopyTagField(valBuf, sizeof(valBuf)-1, stats_ptr, "bytesrcvd")) + sscanf(valBuf, "%" LONG_LONG_PREFIX "d", &(s->BytesRecvd)); +- if (CopyTagField(valBuf, 29, line+6, "maxrtt")) +- s->MaxRoundtrip = atoi(valBuf); +- if (CopyTagField(valBuf, 29, line+6, "minrtt")) +- s->MinRoundtrip = atoi(valBuf); +- if (CopyTagField(valBuf, 29, line+6, "oocount")) +- s->ooCount = atoi(valBuf); +- +- if (CopyTagField(valBuf, 29, line+6, "txstart_s")) +- s->StartSend.tv_sec = atoi(valBuf); +- if (CopyTagField(valBuf, 29, line+6, "txstart_us")) +- s->StartSend.tv_usec = atoi(valBuf); +- +- if (CopyTagField(valBuf, 29, line+6, "txstop_s")) +- s->StopSend.tv_sec = atoi(valBuf); +- if (CopyTagField(valBuf, 29, line+6, "txstop_us")) +- s->StopSend.tv_usec = atoi(valBuf); +- +- if (CopyTagField(valBuf, 29, line+6, "rxstart_s")) +- s->StartRecv.tv_sec = atoi(valBuf); +- if (CopyTagField(valBuf, 29, line+6, "rxstart_us")) +- s->StartRecv.tv_usec = atoi(valBuf); +- +- if (CopyTagField(valBuf, 29, line+6, "rxstop_s")) +- s->StopRecv.tv_sec = atoi(valBuf); +- if (CopyTagField(valBuf, 29, line+6, "rxstop_us")) +- s->StopRecv.tv_usec = atoi(valBuf); +- +- if (CopyTagField(valBuf, 29, line+6, "totrtt")) +- s->TotalRoundtrip = atoi(valBuf); +- if (CopyTagField(valBuf, 29, line+6, "nortt")) +- s->nRoundtrips = atoi(valBuf); +- +- if (CopyTagField(valBuf, 101, line + 6, "email")) +- strcpy(s->email, valBuf); ++ if (CopyTagField(valBuf, sizeof(valBuf)-1, stats_ptr, "maxrtt")) ++ s->MaxRoundtrip = (UINT32) strtoul(valBuf,NULL,10); ++ if (CopyTagField(valBuf, sizeof(valBuf)-1, stats_ptr, "minrtt")) ++ s->MinRoundtrip = (UINT32) strtoul(valBuf,NULL,10); ++ if (CopyTagField(valBuf, sizeof(valBuf)-1, stats_ptr, "oocount")) ++ s->ooCount = (UINT32) strtoul(valBuf,NULL,10); ++ ++ if (CopyTagField(valBuf, sizeof(valBuf)-1, stats_ptr, "txstart_s")) ++ s->StartSend.tv_sec = strtol(valBuf,NULL,10); ++ if (CopyTagField(valBuf, sizeof(valBuf)-1, stats_ptr, "txstart_us")) ++ s->StartSend.tv_usec = strtol(valBuf,NULL,10); ++ ++ if (CopyTagField(valBuf, sizeof(valBuf)-1, stats_ptr, "txstop_s")) ++ s->StopSend.tv_sec = strtol(valBuf,NULL,10); ++ if (CopyTagField(valBuf, sizeof(valBuf)-1, stats_ptr, "txstop_us")) ++ s->StopSend.tv_usec = strtol(valBuf,NULL,10); ++ ++ if (CopyTagField(valBuf, sizeof(valBuf)-1, stats_ptr, "rxstart_s")) ++ s->StartRecv.tv_sec = strtol(valBuf,NULL,10); ++ if (CopyTagField(valBuf, sizeof(valBuf)-1, stats_ptr, "rxstart_us")) ++ s->StartRecv.tv_usec = strtol(valBuf,NULL,10); ++ ++ if (CopyTagField(valBuf, sizeof(valBuf)-1, stats_ptr, "rxstop_s")) ++ s->StopRecv.tv_sec = strtol(valBuf,NULL,10); ++ if (CopyTagField(valBuf, sizeof(valBuf)-1, stats_ptr, "rxstop_us")) ++ s->StopRecv.tv_usec = strtol(valBuf,NULL,10); ++ ++ if (CopyTagField(valBuf, sizeof(valBuf)-1, stats_ptr, "totrtt")) ++ s->TotalRoundtrip = (UINT32) strtoul(valBuf,NULL,10); ++ if (CopyTagField(valBuf, sizeof(valBuf)-1, stats_ptr, "nortt")) ++ s->nRoundtrips = (UINT32) strtoul(valBuf,NULL,10); ++ ++ if (CopyTagField(valBuf, sizeof(valBuf)-1, stats_ptr, "email")) ++ { ++ strncpy(s->email, valBuf, sizeof(s->email)); ++ s->email[sizeof(s->email)-1] = '\0'; ++ } + +- if (CopyTagField(valBuf, 101, line + 6, "pwd")) +- strcpy(s->pwd, valBuf); ++ if (CopyTagField(valBuf, sizeof(valBuf)-1, stats_ptr, "pwd")) ++ { ++ strncpy(s->pwd, valBuf, sizeof(s->pwd)); ++ s->pwd[sizeof(s->pwd)-1] = '\0'; ++ } + ++ stats_ptr = NULL; + return 0; +- + } + + +--- a/engine/tpcommon.h ++++ b/engine/tpcommon.h +@@ -43,7 +43,7 @@ int SameTag(char *s1, char *s2); + int CopyTagField(char *destp, int destSize, char *srcp, char *pname); + int GetSessionFromLine(char *, TPEngine *); + char * CreateSessionLine(TPEngine *, char *); +-int GetStatsFromLine(char *, TPStats *); ++int GetStatsFromLine(const char *, TPStats *); + char * CreateLineFromStats(TPStats *, char *); + int ReplyCode(char *); + void TVAddUSec(struct timeval *, int); diff --git a/net-analyzer/tptest/metadata.xml b/net-analyzer/tptest/metadata.xml new file mode 100644 index 000000000000..3d25f05bf068 --- /dev/null +++ b/net-analyzer/tptest/metadata.xml @@ -0,0 +1,12 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>netmon@gentoo.org</email> + <name>Gentoo network monitoring and analysis project</name> + </maintainer> + <upstream> + <remote-id type="sourceforge">tptest</remote-id> + </upstream> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/tptest/tptest-3.1.7-r2.ebuild b/net-analyzer/tptest/tptest-3.1.7-r2.ebuild new file mode 100644 index 000000000000..709ad3a89a3e --- /dev/null +++ b/net-analyzer/tptest/tptest-3.1.7-r2.ebuild @@ -0,0 +1,42 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 +inherit toolchain-funcs eutils + +MY_PV="${PV/./_}" + +DESCRIPTION="Internet bandwidth tester" +HOMEPAGE="http://tptest.sourceforge.net/" +SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz" +LICENSE="GPL-2" +SLOT="0" + +KEYWORDS="amd64 ppc sparc x86" + +src_prepare() { + sed -i apps/unix/{client,server}/Makefile \ + -e "s:^CFLAGS[[:space:]]*=:CFLAGS+=:" \ + || die + epatch "${FILESDIR}/${PN}-3.1.7-getstatsfromlinevuln.patch" + cp -f os-dep/unix/* . + cp -f engine/* . +} + +src_compile() { + emake -C apps/unix/client \ + CC=$(tc-getCC) \ + LDFLAGS="${LDFLAGS}" + + emake -C apps/unix/server \ + CC=$(tc-getCC) \ + LDFLAGS="${LDFLAGS}" +} + +src_install() { + dobin apps/unix/client/tptestclient + dosbin apps/unix/server/tptestserver + + insinto /etc + doins apps/unix/server/tptest.conf +} diff --git a/net-analyzer/tracebox/Manifest b/net-analyzer/tracebox/Manifest new file mode 100644 index 000000000000..8d01e9c4c253 --- /dev/null +++ b/net-analyzer/tracebox/Manifest @@ -0,0 +1 @@ +DIST tracebox-0.2.tar.gz 27954 BLAKE2B 57f4e36c727ebbb19161a6b4c887b64fdd362b033e09116f2e602a01737f19f10e6d0378296e70f683a5b8d53a57dae032e67098dd5989bb094daf3a3382a5d5 SHA512 15bfaede7e4828c14efbf7395f3d1c681b672b47157c370f4fe92d5d306ccc8e3e061107c3d36a505d732451d67ea146c21c299e6e826205725ab12680ee773e diff --git a/net-analyzer/tracebox/files/tracebox-0.2-deps.patch b/net-analyzer/tracebox/files/tracebox-0.2-deps.patch new file mode 100644 index 000000000000..f6c748a410cd --- /dev/null +++ b/net-analyzer/tracebox/files/tracebox-0.2-deps.patch @@ -0,0 +1,30 @@ +--- a/configure.ac ++++ b/configure.ac +@@ -32,15 +32,11 @@ + ]) + ]) + +-# Make sure libcrafter build a static library by adding the --disable-shared +-# argument to the configure script. +-ac_configure_args_pre="$ac_configure_args" +-ac_configure_args_post="$ac_configure_args --disable-shared" +-ac_configure_args="$ac_configure_args_post" ++# check for libcrafter ++PKG_CHECK_MODULES(crafter, crafter, LIBS="$LIBS $crafter_LIBS",AC_MSG_ERROR([libcrafter is required])) + +-AC_CONFIG_COMMANDS_PRE([ac_configure_args="$ac_configure_args_pre"]) +-AC_CONFIG_COMMANDS_POST([ac_configure_args="$ac_configure_args_post"]) +-AC_CONFIG_SUBDIRS(noinst/libcrafter/libcrafter) ++# check for libpcap ++AC_CHECK_LIB(pcap,pcap_open_offline,LIBS="$LIBS -lpcap",AC_MSG_ERROR([libpcap is required])) + + # Enable click submodule + AS_IF([test "x$enable_tests" = "xyes"], [ +@@ -50,7 +46,6 @@ + + AC_CONFIG_COMMANDS_PRE([ac_configure_args="$ac_configure_args_pre"]) + AC_CONFIG_COMMANDS_POST([ac_configure_args="$ac_configure_args_post"]) +- AC_CONFIG_SUBDIRS(tests/tools/click) + + AC_PATH_PROG([FAKEROOT], [fakeroot]) + AS_IF([test -z "$FAKEROOT"], [ diff --git a/net-analyzer/tracebox/metadata.xml b/net-analyzer/tracebox/metadata.xml new file mode 100644 index 000000000000..45d2e44f84ee --- /dev/null +++ b/net-analyzer/tracebox/metadata.xml @@ -0,0 +1,12 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>netmon@gentoo.org</email> + <name>Gentoo network monitoring and analysis project</name> + </maintainer> + <upstream> + <remote-id type="github">tracebox/tracebox</remote-id> + </upstream> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/tracebox/tracebox-0.2.ebuild b/net-analyzer/tracebox/tracebox-0.2.ebuild new file mode 100644 index 000000000000..6713366d9482 --- /dev/null +++ b/net-analyzer/tracebox/tracebox-0.2.ebuild @@ -0,0 +1,50 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 +inherit autotools eutils + +DESCRIPTION="A Middlebox Detection Tool" +HOMEPAGE="http://www.tracebox.org/" +SRC_URI="https://github.com/${PN}/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" + +RDEPEND=" + dev-lang/lua + net-libs/libcrafter + net-libs/libpcap +" +DEPEND=" + ${RDEPEND} + virtual/pkgconfig +" + +RESTRICT="test" + +src_prepare() { + epatch "${FILESDIR}"/${P}-deps.patch + + sed -i -e '/SUBDIRS/s|noinst||g' Makefile.am || die + sed -i -e '/DIST_SUBDIRS.*libcrafter/d' noinst/Makefile.am || die + + sed -i \ + -e '/[[:graph:]]*libcrafter[[:graph:]]*/d' \ + -e '/dist_bin_SCRIPTS/d' \ + src/${PN}/Makefile.am \ + || die + + sed -i \ + -e 's|"crafter.h"|<crafter.h>|g' \ + src/${PN}/PacketModification.h \ + src/${PN}/PartialHeader.h \ + src/${PN}/script.h \ + src/${PN}/${PN}.h \ + || die + + rm README.md || die + + eautoreconf +} diff --git a/net-analyzer/traceproto/Manifest b/net-analyzer/traceproto/Manifest new file mode 100644 index 000000000000..3efe3bd3c373 --- /dev/null +++ b/net-analyzer/traceproto/Manifest @@ -0,0 +1 @@ +DIST traceproto-1.1.2beta1.tar.gz 192288 BLAKE2B 6b122fe84a3a2581792256c6be7a5ccdb2b42da923ff70fc2ec07956d2a95fdf882e381954b0b6e5de27e06bc713a40a9abb5bbac52ac796f34b6ec337790843 SHA512 e7c99fd0ccc6a8e21901d538b9a05ff26807afdd749ab53e958722ad7fa54c27545c95e4bc390a6a06130e7a123f8fa4c7f794ca7b25180a4d3ca5044d1e7364 diff --git a/net-analyzer/traceproto/files/traceproto-1.1.2_beta1-tinfo.patch b/net-analyzer/traceproto/files/traceproto-1.1.2_beta1-tinfo.patch new file mode 100644 index 000000000000..383daaefd78b --- /dev/null +++ b/net-analyzer/traceproto/files/traceproto-1.1.2_beta1-tinfo.patch @@ -0,0 +1,17 @@ +--- a/configure.ac ++++ b/configure.ac +@@ -182,9 +182,11 @@ + AC_CHECK_LIB(pcap, pcap_open_live, , AC_MSG_ERROR([ERROR - pcap check failed])) + AC_CHECK_LIB(net, libnet_init, , AC_MSG_ERROR([ERROR - libnet check failed])) + AC_CHECK_LIB(cap, cap_init, , AC_MSG_WARN([libcap check failed])) +-AC_CHECK_LIB(ncurses, initscr, , AC_MSG_WARN([ncurses check failed])) +-AC_CHECK_LIB(curses, initscr, , AC_MSG_WARN([curses check failed])) +-AC_CHECK_LIB(termcap, tgetent) ++PKG_CHECK_MODULES(ncurses,ncurses, ++ LIBS="$LIBS $ncurses_LIBS" ++ AC_DEFINE([HAVE_NCURSES_H], 1, [We have ncurses headers]) ++ AC_DEFINE([HAVE_LIBNCURSES], 1, [We have ncurses libraries]), ++ AC_MSG_ERROR([ncurses check failed])) + if test "x$dmalloc_test" = "xyes"; then + AC_CHECK_LIB(dmalloc, malloc, ,AC_MSG_RESULT([dmalloc unavailable])) + fi diff --git a/net-analyzer/traceproto/metadata.xml b/net-analyzer/traceproto/metadata.xml new file mode 100644 index 000000000000..c1873a9ba105 --- /dev/null +++ b/net-analyzer/traceproto/metadata.xml @@ -0,0 +1,12 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>netmon@gentoo.org</email> + <name>Gentoo network monitoring and analysis project</name> + </maintainer> + <upstream> + <remote-id type="sourceforge">traceproto</remote-id> + </upstream> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/traceproto/traceproto-1.1.2_beta1.ebuild b/net-analyzer/traceproto/traceproto-1.1.2_beta1.ebuild new file mode 100644 index 000000000000..15e52604060b --- /dev/null +++ b/net-analyzer/traceproto/traceproto-1.1.2_beta1.ebuild @@ -0,0 +1,41 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 +inherit eutils autotools + +MY_PV=${PV/_/} + +DESCRIPTION="A traceroute-like utility that sends packets based on protocol" +HOMEPAGE="http://traceproto.sourceforge.net/" +SRC_URI="mirror://gentoo/${PN}-${MY_PV}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~ppc x86" +IUSE="debug" + +RDEPEND=" + net-libs/libnet:1.1 + net-libs/libpcap + sys-libs/ncurses + debug? ( dev-libs/dmalloc ) +" +DEPEND=" + ${RDEPEND} + app-doc/doxygen[dot] + virtual/pkgconfig +" + +S=${WORKDIR}/${PN}-${MY_PV} + +DOCS=( AUTHORS ChangeLog NEWS README TODO ) + +src_prepare() { + epatch "${FILESDIR}"/${P}-tinfo.patch + eautoreconf +} + +src_configure() { + econf $(use_enable debug dmalloc) +} diff --git a/net-analyzer/traceroute-nanog/Manifest b/net-analyzer/traceroute-nanog/Manifest new file mode 100644 index 000000000000..354b4b7c5d13 --- /dev/null +++ b/net-analyzer/traceroute-nanog/Manifest @@ -0,0 +1,2 @@ +DIST traceroute-nanog_6.4.2-1.diff.gz 18417 BLAKE2B eec999aae1e728e9c255715042ee7be66bc32c19eff3ab32b85fecd281032d24eea27fa19d27793d9820b61539791ed82b0a0a7845636970a8d2433d0e3ba40a SHA512 62c2df3db292ab263a2d076689b80ff156bd4a3b4f604974ad8210a700bee80055e21165909eeff138d03570ffe4a44b983ed0cf5ba0c6a914af1928ae82038e +DIST traceroute-nanog_6.4.2.orig.tar.gz 34429 BLAKE2B 427a7af1f65271b1b4f46522d76da00628e1c6b877b576ff571dc09d7c1bd0232abd626296b46a16785cccaf091b086ea61b5081035572b846e04fff97d0dafb SHA512 1cd4c98404e7b25b2c1f1e4018fc1774f09822df8e597022c7b31b9cf20ce3c5649fd90337c62c65d163fb9c896bd9e19277febb5312d4afe347eac328c6e304 diff --git a/net-analyzer/traceroute-nanog/metadata.xml b/net-analyzer/traceroute-nanog/metadata.xml new file mode 100644 index 000000000000..bd13a914477c --- /dev/null +++ b/net-analyzer/traceroute-nanog/metadata.xml @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<maintainer type="project"> + <email>netmon@gentoo.org</email> + <name>Gentoo network monitoring and analysis project</name> +</maintainer> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/traceroute-nanog/traceroute-nanog-6.4.2-r1.ebuild b/net-analyzer/traceroute-nanog/traceroute-nanog-6.4.2-r1.ebuild new file mode 100644 index 000000000000..5dc3aa31866e --- /dev/null +++ b/net-analyzer/traceroute-nanog/traceroute-nanog-6.4.2-r1.ebuild @@ -0,0 +1,39 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +inherit eutils toolchain-funcs + +MY_P="${PN}_${PV}" +DEB_PL="1" +DESCRIPTION="Traceroute with AS lookup, TOS support, MTU discovery and other features" +HOMEPAGE="http://packages.debian.org/traceroute-nanog" +SRC_URI=" + https://dev.gentoo.org/~jer/${MY_P}.orig.tar.gz + https://dev.gentoo.org/~jer/${MY_P}-${DEB_PL}.diff.gz +" +RESTRICT="mirror" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="amd64 ~arm ~ppc x86" + +S="${S}.orig" + +src_prepare() { + EPATCH_SUFFIX="dpatch" epatch \ + "${WORKDIR}/${MY_P}-${DEB_PL}.diff" \ + "${WORKDIR}/${P}.orig/${P}/debian/patches/" +} + +src_compile() { + $(tc-getCC) traceroute.c -o ${PN} ${CFLAGS} -DSTRING ${LDFLAGS} -lresolv -lm \ + || die +} + +src_install() { + dosbin traceroute-nanog + dodoc 0_readme.txt faq.txt + newman ${P}/debian/traceroute-nanog.genuine.8 traceroute-nanog.8 +} diff --git a/net-analyzer/traceroute-nanog/traceroute-nanog-6.4.2_p1.ebuild b/net-analyzer/traceroute-nanog/traceroute-nanog-6.4.2_p1.ebuild new file mode 100644 index 000000000000..d5cb034bcf01 --- /dev/null +++ b/net-analyzer/traceroute-nanog/traceroute-nanog-6.4.2_p1.ebuild @@ -0,0 +1,44 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +inherit toolchain-funcs + +DEB_PL="1" +DESCRIPTION="Traceroute with AS lookup, TOS support, MTU discovery and other features" +HOMEPAGE="https://wiki.gentoo.org/wiki/No_homepage" +SRC_URI=" + https://dev.gentoo.org/~jer/${PN}_${PV/_p*}.orig.tar.gz + https://dev.gentoo.org/~jer/${PN}_${PV/_p*}-${PV/*_p}.diff.gz +" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~amd64 ~arm ~ppc ~x86" + +S=${WORKDIR}/${P/_p*}.orig + +src_prepare() { + eapply "${WORKDIR}"/${PN}_${PV/_p*}-${PV/*_p}.diff + + eapply \ + $( + for i in $( cat "${S}"/debian/patches/00list ) + do + echo "${S}"/debian/patches/$i.dpatch + done + ) + + eapply_user +} + +src_compile() { + $(tc-getCC) traceroute.c -o ${PN} ${CFLAGS} -DSTRING ${LDFLAGS} -lresolv -lm \ + || die +} + +src_install() { + dosbin traceroute-nanog + dodoc 0_readme.txt faq.txt + newman "${S}"/debian/traceroute-nanog.genuine.8 traceroute-nanog.8 +} diff --git a/net-analyzer/traceroute/Manifest b/net-analyzer/traceroute/Manifest new file mode 100644 index 000000000000..5105dae9abdc --- /dev/null +++ b/net-analyzer/traceroute/Manifest @@ -0,0 +1 @@ +DIST traceroute-2.1.0.tar.gz 71460 BLAKE2B 4c2126fa98625d525d0a1b0075d16a6ff37836e18d2ce8319f58c89bfa22a6a5e3bbe2ded22fa98d5128c7bb58578327db08120a5b78c1c4ff5673dcc0dea7e6 SHA512 3578007c734091ea0c906637c03fd133a8b0154fbf2e6b5c0c881184947918196bc03aeaf872d3bd53777b9b771cba5cf97f73fb5916bb53b75037f429b40ed3 diff --git a/net-analyzer/traceroute/metadata.xml b/net-analyzer/traceroute/metadata.xml new file mode 100644 index 000000000000..d0d36a2faea1 --- /dev/null +++ b/net-analyzer/traceroute/metadata.xml @@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>netmon@gentoo.org</email> + <name>Gentoo network monitoring and analysis project</name> + </maintainer> + <longdescription>Utility to trace the route of IP packets</longdescription> + <upstream> + <remote-id type="sourceforge">traceroute</remote-id> + </upstream> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/traceroute/traceroute-2.1.0.ebuild b/net-analyzer/traceroute/traceroute-2.1.0.ebuild new file mode 100644 index 000000000000..03a922b734d2 --- /dev/null +++ b/net-analyzer/traceroute/traceroute-2.1.0.ebuild @@ -0,0 +1,32 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +inherit flag-o-matic toolchain-funcs + +DESCRIPTION="Utility to trace the route of IP packets" +HOMEPAGE="http://traceroute.sourceforge.net/" +SRC_URI="mirror://sourceforge/traceroute/${P}.tar.gz" + +LICENSE="GPL-2 LGPL-2.1" +SLOT="0" +KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 s390 sparc x86 ~amd64-linux ~x86-linux" +IUSE="static" + +RDEPEND="!<net-misc/iputils-20121221-r1 + !net-misc/iputils[traceroute6]" + +src_compile() { + use static && append-ldflags -static + append-ldflags -L../libsupp #432116 + tc-export AR CC RANLIB + emake env=yes +} + +src_install() { + emake DESTDIR="${D}" prefix="${EPREFIX}/usr" install + dodoc ChangeLog CREDITS README TODO + dosym traceroute /usr/bin/traceroute6 + dosym traceroute.8 /usr/share/man/man8/traceroute6.8 +} diff --git a/net-analyzer/trafshow/Manifest b/net-analyzer/trafshow/Manifest new file mode 100644 index 000000000000..1df135f65b1d --- /dev/null +++ b/net-analyzer/trafshow/Manifest @@ -0,0 +1 @@ +DIST trafshow-5.2.3.tgz 142615 BLAKE2B c13ee7c39d598dc78e58b65b49a439ecc9e5630a24f78d2bc5a8ec39fc6aa15c084a291f8e932027108176e7aeeebbf5fb7e2380a64718273e67073869b7d5e9 SHA512 9ea57c319cb177de2d29eaf2a09c06f0bd7efcfc3e50d5fa5cc18f193c6dfc0109d4388ccbaee7bf2db37b5418fc0f4b6ce47a5558b652ecf9e891a813ef8540 diff --git a/net-analyzer/trafshow/files/trafshow-5.2.3-gcc44.patch b/net-analyzer/trafshow/files/trafshow-5.2.3-gcc44.patch new file mode 100644 index 000000000000..02424fe1203a --- /dev/null +++ b/net-analyzer/trafshow/files/trafshow-5.2.3-gcc44.patch @@ -0,0 +1,11 @@ +--- a/session.c ++++ b/session.c +@@ -40,7 +40,7 @@ + #define ASYNC_MODE FNDELAY + #elif O_ASYNC + #define ASYNC_MODE O_ASYNC +-#elif ++#else + #error the fcntl argument to turn ON/OFF non-blocking I/O is unknown + #endif + diff --git a/net-analyzer/trafshow/files/trafshow-5.2.3-gentoo.patch b/net-analyzer/trafshow/files/trafshow-5.2.3-gentoo.patch new file mode 100644 index 000000000000..95d342a603a4 --- /dev/null +++ b/net-analyzer/trafshow/files/trafshow-5.2.3-gentoo.patch @@ -0,0 +1,15 @@ +--- a/Makefile.in ++++ b/Makefile.in +@@ -73,9 +73,9 @@ + @echo 'char compiled[] = "$(CC) $(CFLAGS) $(LIBS)";' >> $@ + + install: +- ./install-sh -c -s -m 555 -o bin -g bin $(PROG) $(BINDEST)/$(PROG) +- ./install-sh -c -m 444 -o bin -g bin $(PROG).1 $(MANDEST)/man1/$(PROG).1 +- [ -f /etc/$(PROG) ] || ./install-sh -c -m 444 .trafshow /etc/$(PROG) ++ ./install-sh -c -m 755 -o root -g root $(PROG) $(DESTDIR)$(BINDEST)/$(PROG) ++ ./install-sh -c -m 644 -o root -g root $(PROG).1 $(DESTDIR)$(MANDEST)/man1/$(PROG).1 ++ [ -f $(DESTDIR)/etc/$(PROG) ] || ./install-sh -c -o root -m 644 .trafshow $(DESTDIR)/etc/$(PROG) + + clean: + rm -f $(CLEANFILES) diff --git a/net-analyzer/trafshow/files/trafshow-5.2.3-tinfo.patch b/net-analyzer/trafshow/files/trafshow-5.2.3-tinfo.patch new file mode 100644 index 000000000000..0fd4985794d8 --- /dev/null +++ b/net-analyzer/trafshow/files/trafshow-5.2.3-tinfo.patch @@ -0,0 +1,75 @@ +--- a/configure.in ++++ b/configure.in +@@ -23,6 +23,9 @@ + AC_PROG_CC + AC_PROG_YACC + AC_PROG_LEX ++ ++PKG_PROG_PKG_CONFIG ++ + AC_REQUIRE_CPP + AC_AIX + ACX_PTHREAD(, AC_MSG_ERROR(cannot find pthread; see the INSTALL notes)) +@@ -51,7 +54,7 @@ + ) + ) + if test "$ac_cv_type_in_addr_t" != yes; then +- AC_DEFINE_UNQUOTED(in_addr_t, $ac_cv_type_in_addr_t) ++ AC_DEFINE_UNQUOTED([in_addr_t], [$ac_cv_type_in_addr_t], [addr_t]) + fi + + AC_CACHE_CHECK(for socklen_t, ac_cv_type_socklen_t, +@@ -65,7 +68,7 @@ + ) + ) + if test "$ac_cv_type_socklen_t" != yes; then +- AC_DEFINE_UNQUOTED(socklen_t, $ac_cv_type_socklen_t) ++ AC_DEFINE_UNQUOTED([socklen_t], [$ac_cv_type_socklen_t], [socklen_t]) + fi + + AC_CACHE_CHECK(for struct sockaddr_storage, ac_cv_sockaddr_storage, +@@ -79,7 +82,7 @@ + ) + ) + if test "$ac_cv_sockaddr_storage" != no; then +- AC_DEFINE(HAVE_SOCKADDR_STORAGE) ++ AC_DEFINE(HAVE_SOCKADDR_STORAGE, 1, [have sockaddr_storage]) + fi + + AC_CACHE_CHECK(for struct ether_addr, ac_cv_ether_addr, +@@ -94,7 +97,7 @@ + ) + ) + if test "$ac_cv_ether_addr" != no; then +- AC_DEFINE(HAVE_ETHER_ADDR) ++ AC_DEFINE(HAVE_ETHER_ADDR, 1, [have ether_addr]) + fi + + dnl Check for network system libraries. +@@ -144,20 +147,21 @@ + case "$ac_cv_have_curses" in + + slang) +- AC_DEFINE(HAVE_SLCURSES) +- AC_DEFINE(HAVE_HAS_COLORS) ++ AC_DEFINE(HAVE_SLCURSES, 1, [have slcurses]) ++ AC_DEFINE(HAVE_HAS_COLORS, 1, [have colors]) + ;; + ncurses) +- AC_DEFINE(HAVE_NCURSES) ++ PKG_CHECK_MODULES(ncurses,ncurses, [LIBS="$LIBS $ncurses_LIBS"], [ncurses not found]) ++ AC_DEFINE(HAVE_NCURSES, 1, [have ncurses]) + AC_CHECK_FUNCS(has_colors) + ;; + n_curses) + CFLAGS="-I/usr/include/ncurses $CFLAGS" +- AC_DEFINE(HAVE_NCURSES) ++ AC_DEFINE(HAVE_NCURSES, 1, [have n_curses]) + AC_CHECK_FUNCS(has_colors) + ;; + curses) +- AC_DEFINE(HAVE_CURSES) ++ AC_DEFINE(HAVE_CURSES, 1, [have curses]) + AC_CHECK_FUNCS(has_colors) + ;; + *) diff --git a/net-analyzer/trafshow/metadata.xml b/net-analyzer/trafshow/metadata.xml new file mode 100644 index 000000000000..bd13a914477c --- /dev/null +++ b/net-analyzer/trafshow/metadata.xml @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<maintainer type="project"> + <email>netmon@gentoo.org</email> + <name>Gentoo network monitoring and analysis project</name> +</maintainer> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/trafshow/trafshow-5.2.3.ebuild b/net-analyzer/trafshow/trafshow-5.2.3.ebuild new file mode 100644 index 000000000000..9cde85d61f47 --- /dev/null +++ b/net-analyzer/trafshow/trafshow-5.2.3.ebuild @@ -0,0 +1,39 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 +inherit autotools eutils + +DESCRIPTION="Full screen visualization of the network traffic" +HOMEPAGE="http://soft.risp.ru/trafshow/index_en.shtml" +SRC_URI="ftp://ftp.nsk.su/pub/RinetSoftware/${P}.tgz" + +LICENSE="BSD" +SLOT="3" +KEYWORDS="amd64 hppa ~ppc ppc64 sparc x86" +IUSE="slang" + +DEPEND=" + net-libs/libpcap + !slang? ( sys-libs/ncurses ) + slang? ( >=sys-libs/slang-1.4 ) +" + +src_prepare() { + cat /usr/share/aclocal/pkg.m4 >> aclocal.m4 || die + epatch \ + "${FILESDIR}"/${P}-gcc44.patch \ + "${FILESDIR}"/${P}-gentoo.patch \ + "${FILESDIR}"/${P}-tinfo.patch + eautoreconf +} + +src_configure() { + if ! use slang; then + # No command-line option so pre-cache instead + export ac_cv_have_curses=ncurses + export LIBS=-lncurses + fi + + econf +} diff --git a/net-analyzer/tsung/Manifest b/net-analyzer/tsung/Manifest new file mode 100644 index 000000000000..4846012062ba --- /dev/null +++ b/net-analyzer/tsung/Manifest @@ -0,0 +1 @@ +DIST tsung-1.7.0.tar.gz 1572265 BLAKE2B 8227e14106943071e7a3759b2bd06a92af55889ecf22b1a74432fd2f6d03196a9e321d16f1e291dcd71d4af560f4f2b38193326a9a87fec671dcda23ab0ecb1b SHA512 67490a95fb54f5196ae0302190190a6b8e79bbeba9a7c1932d83a949504489d4cc3ce048380c0cb09c6cae4c1e203d52de9ea0e2f4e7c3d7438b836aef532dac diff --git a/net-analyzer/tsung/metadata.xml b/net-analyzer/tsung/metadata.xml new file mode 100644 index 000000000000..aaa006abab08 --- /dev/null +++ b/net-analyzer/tsung/metadata.xml @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>patrick@gentoo.org</email> + <name>Patrick Lauer</name> + </maintainer> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/tsung/tsung-1.7.0.ebuild b/net-analyzer/tsung/tsung-1.7.0.ebuild new file mode 100644 index 000000000000..80940ea2f4aa --- /dev/null +++ b/net-analyzer/tsung/tsung-1.7.0.ebuild @@ -0,0 +1,38 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI="6" + +# Seems to be misconfigured +RESTRICT="test" + +inherit eutils + +DESCRIPTION="Erlang's multi-protocol distributed load testing tool" +HOMEPAGE="http://tsung.erlang-projects.org/" +SRC_URI="http://tsung.erlang-projects.org/dist/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="gnuplot" + +DEPEND="dev-lang/erlang" +RDEPEND=" + gnuplot? ( + sci-visualization/gnuplot + dev-perl/Template-Toolkit + ) + ${DEPEND} +" +src_configure() { + ./configure --prefix="/usr" || die "econf failed" +} + +src_compile() { + emake +} + +src_install() { + emake -j1 DESTDIR="${D}" install +} diff --git a/net-analyzer/ttcp/Manifest b/net-analyzer/ttcp/Manifest new file mode 100644 index 000000000000..58725aa7cb8a --- /dev/null +++ b/net-analyzer/ttcp/Manifest @@ -0,0 +1,2 @@ +DIST ttcp-1.12.c 23690 BLAKE2B 972869da1e2e945702e6852648166eefae224b39715ef8495526ec7cd33cdb1e69fa10bb356a96e701f8b597c547b3090956320f947a02f1fad0b12d027b7e32 SHA512 8fc800b05fcf3590d15a87983ac7abc3646c6d4a89f7cc6b91e495066a90a6ce21f7bd7b6ab21e09f07bfa20c39bdc7bcec479449d7cd2b88639dc6cca4a432e +DIST ttcp-1.12.tar.bz2 8086 BLAKE2B 42ec3d82d56ef28527c096be7b6ea568997f0028ebf51811974fec8c444a39785996b0a51eedff6cec6c53f215e4300a3dee91e45f54dbe979d1d1c42e792ab1 SHA512 2218f801a04964dcc684bac2957f892569e4458eb7770e26d4ac5a9a5beebb16b9191cacd8e60cceee306b8fe53000248b52457cb679a3d12ad4308bb0066dbb diff --git a/net-analyzer/ttcp/metadata.xml b/net-analyzer/ttcp/metadata.xml new file mode 100644 index 000000000000..bd13a914477c --- /dev/null +++ b/net-analyzer/ttcp/metadata.xml @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<maintainer type="project"> + <email>netmon@gentoo.org</email> + <name>Gentoo network monitoring and analysis project</name> +</maintainer> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/ttcp/ttcp-1.12-r2.ebuild b/net-analyzer/ttcp/ttcp-1.12-r2.ebuild new file mode 100644 index 000000000000..49e46e02dbd4 --- /dev/null +++ b/net-analyzer/ttcp/ttcp-1.12-r2.ebuild @@ -0,0 +1,26 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 +inherit toolchain-funcs + +DESCRIPTION="Tool to test TCP and UDP throughput" +HOMEPAGE=" + http://ftp.arl.mil/~mike/ttcp.html + http://www.netcore.fi/pekkas/linux/ipv6/ +" +LICENSE="public-domain" +SLOT="0" +KEYWORDS="~amd64 ~hppa ~mips ~ppc ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos" +SRC_URI=" + mirror://gentoo/${P}.tar.bz2 + https://dev.gentoo.org/~jer/${P}.c +" +src_compile() { + $(tc-getCC) ${CFLAGS} ${LDFLAGS} -o ${PN} "${DISTDIR}"/${P}.c || die +} + +src_install() { + dobin ${PN} + newman sgi-${PN}.1 ${PN}.1 +} diff --git a/net-analyzer/upnpscan/Manifest b/net-analyzer/upnpscan/Manifest new file mode 100644 index 000000000000..4f7ee07f89ca --- /dev/null +++ b/net-analyzer/upnpscan/Manifest @@ -0,0 +1 @@ +DIST upnpscan-v0.4-src.tgz 309011 BLAKE2B e7cb466d67d32aae72b6ee69d9d08124bedea23b0b5d8ba8bb0d0463364b358930c87b0d7bd4dec40e998a28887bb7df315b3590168c51167e4d70a928a7eb2d SHA512 d7791afdc6d3f318a1a29486485ab5f71a1a32159a2212164c763748a047c8243e3017afc887e9394ae78ffc2412091ed590a714c4a482b44792ae8a835e095e diff --git a/net-analyzer/upnpscan/files/upnpscan-0.4-r2-cflags.patch b/net-analyzer/upnpscan/files/upnpscan-0.4-r2-cflags.patch new file mode 100644 index 000000000000..46be9888ec7c --- /dev/null +++ b/net-analyzer/upnpscan/files/upnpscan-0.4-r2-cflags.patch @@ -0,0 +1,51 @@ +--- a/configure.in 2005-06-23 17:02:57.000000000 +0200 ++++ b/configure.in 2010-11-01 04:44:44.000000000 +0100 +@@ -8,12 +8,10 @@ + AM_CONFIG_HEADER(config.h) + + AC_ISC_POSIX +-CFLAGS="" + AC_SUBST(CFLAGS) + AC_PROG_CC + AM_PROG_CC_STDC + AC_HEADER_STDC +-AM_PROG_LIBTOOL + + dnl Checks for programs. + +--- a/Makefile.am 2005-06-23 12:32:13.000000000 +0200 ++++ b/Makefile.am 2010-11-01 04:46:41.000000000 +0100 +@@ -5,20 +5,6 @@ + + SUBDIRS = src + +-upnpscandocdir = ${prefix}/doc/upnpscan +-upnpscandoc_DATA = \ +- README\ +- COPYING\ +- AUTHORS\ +- ChangeLog\ +- INSTALL\ +- NEWS\ +- TODO +- +-EXTRA_DIST = $(upnpscandoc_DATA) +- +- +- + # Copy all the spec files. Of cource, only one is actually used. + dist-hook: + for specfile in *.spec; do \ +--- a/src/Makefile.am 2005-06-21 22:57:32.000000000 +0200 ++++ b/src/Makefile.am 2010-11-01 04:53:22.000000000 +0100 +@@ -7,10 +7,6 @@ + INCLUDES =\ + -I../include + +-AM_CFLAGS =\ +- -Wall\ +- -g +- + bin_PROGRAMS = upnpscan + + upnpscan_SOURCES = \ diff --git a/net-analyzer/upnpscan/metadata.xml b/net-analyzer/upnpscan/metadata.xml new file mode 100644 index 000000000000..e5083bf36b26 --- /dev/null +++ b/net-analyzer/upnpscan/metadata.xml @@ -0,0 +1,14 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<maintainer type="project"> + <email>netmon@gentoo.org</email> + <name>Gentoo network monitoring and analysis project</name> +</maintainer> +<longdescription> +A tool that scans the LAN or a given address range for UPnP capable +devices. This is done by sending M-SEARCH discovery packets to either +the UPnP multicast address or to the specified ip range. +</longdescription> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/upnpscan/upnpscan-0.4-r3.ebuild b/net-analyzer/upnpscan/upnpscan-0.4-r3.ebuild new file mode 100644 index 000000000000..91839f3352c1 --- /dev/null +++ b/net-analyzer/upnpscan/upnpscan-0.4-r3.ebuild @@ -0,0 +1,23 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +AUTOTOOLS_AUTORECONF=1 +AUTOTOOLS_IN_SOURCE_BUILD=1 + +inherit autotools-utils + +DESCRIPTION="Scans the network for UPNP capable devices" +HOMEPAGE="http://www.cqure.net/wp/upnpscan/" +SRC_URI="http://www.cqure.net/tools/${PN}-v${PV}-src.tgz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="amd64 x86" + +S=${WORKDIR}/${PN} + +DOCS=( AUTHORS ChangeLog NEWS README TODO ) + +PATCHES=( "${FILESDIR}"/${P}-r2-cflags.patch ) diff --git a/net-analyzer/vnstat/Manifest b/net-analyzer/vnstat/Manifest new file mode 100644 index 000000000000..7902b33ad434 --- /dev/null +++ b/net-analyzer/vnstat/Manifest @@ -0,0 +1,4 @@ +DIST vnstat-1.17.tar.gz 238397 BLAKE2B 73aaffda3c91a1146b1d6a21f637272be227a15a7964aad90fb76c407c5f7fb0085e6f9f54408e8ebc667475c15f260d701c5924737f20921ebc0a35affd52be SHA512 c9c119a89054dacdc15026c766a20d88336d7689dd4264530d0347fcc58f3cbfc806b271e0f83e76c3b4a31ab793a628ee7d7b696943da919ee4cd2fdb481cc3 +DIST vnstat-2.4.tar.gz 270907 BLAKE2B 4666c39c05cb0bd2a89db7e57bfd72b542ccda02ba09a9da6097b58957141042a5e63a2ee4863bb61b686b3e4c374a690d798398136760699755187fdca5e27c SHA512 e2f23b375a6afcd9e51770769c741d3a5fc139aec22e535bc98da09e4a6677a0c820fb04727a79f23569be29f031e9ee897b6d569146c42ed917f5f83399b7b6 +DIST vnstat-2.5.tar.gz 274765 BLAKE2B 65117717d5522ce17e40f05f62d0328f74f5cc3ab42353c93b7a2af0e74df1d36b3a64dd778cd4def2985120bfbc6e1cf8e83a7615ef236ea1af1dbd8d898965 SHA512 5f44f2ee7fa4bdaf0cfd48b35927ec590f5344cc497b5e02a999ece40e53812a7bf725cf1ddaf08c7316bf83ed567f370a72f00b279553cb1d06dfec26c3c1c8 +DIST vnstat-2.6.tar.gz 275751 BLAKE2B 7351b265d66e42d1e5450dae6f5eaa973a9cdc171b865689540b5838ddeb2629da968bc2ba655cb6ff909227a859f0334900a1597c78b772124a993343a4cf23 SHA512 1a62fc9c2379b050208945e85bad04f602a0f2c71e6bd069d241c1df77c76ec6258948fc3fdf633b15c52665782cae4f995a916103d330bfb46cab0291d3a1ea diff --git a/net-analyzer/vnstat/files/vnstat-2.2-conf.patch b/net-analyzer/vnstat/files/vnstat-2.2-conf.patch new file mode 100644 index 000000000000..7bea5d8ffe97 --- /dev/null +++ b/net-analyzer/vnstat/files/vnstat-2.2-conf.patch @@ -0,0 +1,11 @@ +--- a/cfg/vnstat.conf ++++ b/cfg/vnstat.conf +@@ -143,7 +143,7 @@ + LogFile "/var/log/vnstat/vnstat.log" + + # file used as daemon pid / lock file +-PidFile "/var/run/vnstat/vnstat.pid" ++PidFile "/run/vnstat/vnstat.pid" + + # 1 = 64-bit, 0 = 32-bit, -1 = old style logic, -2 = automatic detection + 64bitInterfaceCounters -2 diff --git a/net-analyzer/vnstat/files/vnstat-2.2-drop-root.patch b/net-analyzer/vnstat/files/vnstat-2.2-drop-root.patch new file mode 100644 index 000000000000..2ed3ec1404a4 --- /dev/null +++ b/net-analyzer/vnstat/files/vnstat-2.2-drop-root.patch @@ -0,0 +1,15 @@ +--- a/cfg/vnstat.conf ++++ b/cfg/vnstat.conf +@@ -69,10 +69,10 @@ + ## + + # switch to given user when started as root (leave empty to disable) +-DaemonUser "" ++DaemonUser "vnstat" + + # switch to given group when started as root (leave empty to disable) +-DaemonGroup "" ++DaemonGroup "vnstat" + + # try to detect interface maximum bandwidth, 0 = disable feature + # MaxBandwidth will be used as fallback value when enabled diff --git a/net-analyzer/vnstat/files/vnstat-2.2-run.patch b/net-analyzer/vnstat/files/vnstat-2.2-run.patch new file mode 100644 index 000000000000..bb9222b5fe2f --- /dev/null +++ b/net-analyzer/vnstat/files/vnstat-2.2-run.patch @@ -0,0 +1,11 @@ +--- a/src/common.h ++++ b/src/common.h +@@ -229,7 +229,7 @@ + #define CREATEDIRS 1 + #define UPDATEFILEOWNER 1 + #define LOGFILE "/var/log/vnstat/vnstat.log" +-#define PIDFILE "/var/run/vnstat/vnstat.pid" ++#define PIDFILE "/run/vnstat/vnstat.pid" + #define IS64BIT -2 + + /* no transparency by default */ diff --git a/net-analyzer/vnstat/files/vnstat.cron b/net-analyzer/vnstat/files/vnstat.cron new file mode 100644 index 000000000000..690681327688 --- /dev/null +++ b/net-analyzer/vnstat/files/vnstat.cron @@ -0,0 +1,9 @@ +#!/bin/bash + +# run vnstat if installed and at least one database exists + +# Uncomment the following to enable + +#if [ -x /usr/bin/vnstat ] && [ `ls /var/lib/vnstat/ | wc -l` -ge 1 ] ; then +# exec /usr/bin/vnstat -u +#fi diff --git a/net-analyzer/vnstat/files/vnstat.cron-r1 b/net-analyzer/vnstat/files/vnstat.cron-r1 new file mode 100644 index 000000000000..178133675c6f --- /dev/null +++ b/net-analyzer/vnstat/files/vnstat.cron-r1 @@ -0,0 +1,7 @@ +#!/bin/bash + +# run vnstat if installed and at least one database exists + +if [ -x /usr/bin/vnstat ] && [ `ls /var/lib/vnstat/ | wc -l` -ge 1 ] ; then + exec /usr/bin/vnstat -u +fi diff --git a/net-analyzer/vnstat/files/vnstatd.confd b/net-analyzer/vnstat/files/vnstatd.confd new file mode 100644 index 000000000000..17901419aacb --- /dev/null +++ b/net-analyzer/vnstat/files/vnstatd.confd @@ -0,0 +1,7 @@ +# /etc/conf.d/vnstatd: config file for /etc/init.d/vnstatd + +# Adjust scheduling priority on vnstatd (default: 0) +#VNSTATD_NICELEVEL="0" + +# Pass extra options to vnstatd +#VNSTATD_EXTRAOPTS="--config /etc/vnstat.conf" diff --git a/net-analyzer/vnstat/files/vnstatd.confd-r1 b/net-analyzer/vnstat/files/vnstatd.confd-r1 new file mode 100644 index 000000000000..33edf3560ee8 --- /dev/null +++ b/net-analyzer/vnstat/files/vnstatd.confd-r1 @@ -0,0 +1,18 @@ +# /etc/conf.d/vnstatd: config file for /etc/init.d/vnstatd + +# Configuration file +VNSTATD_CONFIGFILE="/etc/vnstat.conf" + +# PID file +VNSTATD_PIDFILE="/run/vnstat/vnstatd.pid" + +# Options to vnstatd +# See vnstatd(8) for more details +# Notes: +# * Do not specify another PIDFILE but use the variable above to change the location +# * Do not specify another CONFIGFILE but use the variable above to change the location +VNSTATD_OPTS="" + +# Wait x milliseconds after starting and check that daemon is still running. +# See start-stop-daemon(8) for more details +SSD_STARTWAIT=500 diff --git a/net-analyzer/vnstat/files/vnstatd.initd-r1 b/net-analyzer/vnstat/files/vnstatd.initd-r1 new file mode 100644 index 000000000000..a8d61efe0f2a --- /dev/null +++ b/net-analyzer/vnstat/files/vnstatd.initd-r1 @@ -0,0 +1,37 @@ +#!/sbin/openrc-run +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +extra_started_commands="reload" + +depend() { + use net +} + +VNSTATD_PIDFILE="${VNSTATD_PIDFILE:-/run/vnstatd/vnstatd.pid}" + +start() { + ebegin "Starting vnstatd" + checkpath -q -d -m 755 -o vnstat:vnstat /run/vnstatd + checkpath -q -d -m 755 -o vnstat:vnstat /var/lib/vnstat + start-stop-daemon --start --quiet \ + --pidfile "${VNSTATD_PIDFILE}" \ + --user vnstat --group vnstat \ + --nicelevel ${VNSTATD_NICELEVEL:-0} \ + --exec /usr/bin/vnstatd -- \ + -d ${VNSTATD_EXTRAOPTS} -p ${VNSTATD_PIDFILE} + eend $? +} + +stop() { + ebegin "Stopping vnstatd" + start-stop-daemon --stop --quiet \ + --pidfile "${VNSTATD_PIDFILE}" + eend $? +} + +reload() { + ebegin "Reloading vnstatd configuration" + kill -HUP $(cat "${VNSTATD_PIDFILE}") 2>&1 >/dev/null + eend $? +} diff --git a/net-analyzer/vnstat/files/vnstatd.initd-r2 b/net-analyzer/vnstat/files/vnstatd.initd-r2 new file mode 100644 index 000000000000..2b4a9336c2a5 --- /dev/null +++ b/net-analyzer/vnstat/files/vnstatd.initd-r2 @@ -0,0 +1,29 @@ +#!/sbin/openrc-run +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +extra_started_commands="reload" + +VNSTATD_CONFIGFILE=${VNSTATD_CONFIGFILE:-"/etc/vnstat.conf"} +VNSTATD_PIDFILE=${VNSTATD_PIDFILE:-"/run/vnstat/vnstatd.pid"} + +pidfile="${VNSTATD_PIDFILE}" +command="/usr/bin/vnstatd" +command_args="${VNSTATD_OPTS} --daemon --config \"${VNSTATD_CONFIGFILE}\" --pidfile \"${pidfile}\"" +start_stop_daemon_args="--wait ${SSD_STARTWAIT:-500}" +name="vnStat daemon" + +description="vnstatd updates vnStat databases." +description_reload="Reload ${name}'s configuration" + +required_files="${VNSTATD_CONFIGFILE}" + +start_pre() { + checkpath --directory --mode 0775 --owner vnstat:vnstat $(dirname "${pidfile}") +} + +reload() { + ebegin "Reloading ${name} configuration" + start-stop-daemon --signal HUP --pidfile "${pidfile}" + eend $? +} diff --git a/net-analyzer/vnstat/files/vnstatd.systemd b/net-analyzer/vnstat/files/vnstatd.systemd new file mode 100644 index 000000000000..51b079c5a9fb --- /dev/null +++ b/net-analyzer/vnstat/files/vnstatd.systemd @@ -0,0 +1,11 @@ +[Unit] +Description=vnStat network traffic monitor +Documentation=man:vnstatd(1) man:vnstat(1) man:vnstat.conf(5) +After=network-online.target + +[Service] +ExecStart=/usr/bin/vnstatd --nodaemon +ExecReload=/bin/kill -HUP $MAINPID + +[Install] +WantedBy=multi-user.target diff --git a/net-analyzer/vnstat/files/vnstatd.tmpfile b/net-analyzer/vnstat/files/vnstatd.tmpfile new file mode 100644 index 000000000000..36ecf2259495 --- /dev/null +++ b/net-analyzer/vnstat/files/vnstatd.tmpfile @@ -0,0 +1 @@ +d /run/vnstat 0775 vnstat vnstat - diff --git a/net-analyzer/vnstat/metadata.xml b/net-analyzer/vnstat/metadata.xml new file mode 100644 index 000000000000..b6985255d80e --- /dev/null +++ b/net-analyzer/vnstat/metadata.xml @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>netmon@gentoo.org</email> + <name>Gentoo network monitoring and analysis project</name> + </maintainer> +<longdescription> + vnStat is a network traffic monitor for Linux that keeps a log of daily + network traffic for the selected interface(s). vnStat isn't a packet sniffer. + The traffic information is analyzed from the /proc filesystem. That way vnStat + can be used even without root permissions. +</longdescription> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/vnstat/vnstat-1.17.ebuild b/net-analyzer/vnstat/vnstat-1.17.ebuild new file mode 100644 index 000000000000..d48e9aa70bab --- /dev/null +++ b/net-analyzer/vnstat/vnstat-1.17.ebuild @@ -0,0 +1,72 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 +inherit toolchain-funcs user + +DESCRIPTION="Console-based network traffic monitor that keeps statistics of network usage" +HOMEPAGE="https://humdi.net/vnstat/" +SRC_URI="https://humdi.net/vnstat/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="amd64 arm hppa ppc ppc64 sparc x86" +IUSE="gd selinux test" +RESTRICT="!test? ( test )" + +COMMON_DEPEND=" + gd? ( media-libs/gd[png] ) +" +DEPEND=" + ${COMMON_DEPEND} + test? ( dev-libs/check ) +" +RDEPEND=" + ${COMMON_DEPEND} + selinux? ( sec-policy/selinux-vnstatd ) +" + +pkg_setup() { + enewgroup vnstat + enewuser vnstat -1 -1 /dev/null vnstat +} + +src_prepare() { + default + + tc-export CC + + sed -i \ + -e 's|vnstat[.]log|vnstatd.log|' \ + -e 's|vnstat[.]pid|vnstatd/vnstatd.pid|' \ + -e 's|/var/run|/run|' \ + cfg/${PN}.conf || die + sed -i \ + -e '/PIDFILE/s|/var/run|/run|' \ + src/common.h || die +} + +src_compile() { + emake ${PN} ${PN}d $(usex gd ${PN}i '') +} + +src_install() { + use gd && dobin vnstati + dobin vnstat vnstatd + + exeinto /etc/cron.hourly + newexe "${FILESDIR}"/vnstat.cron vnstat + + insinto /etc + doins cfg/vnstat.conf + fowners root:vnstat /etc/vnstat.conf + + newconfd "${FILESDIR}"/vnstatd.confd vnstatd + newinitd "${FILESDIR}"/vnstatd.initd-r1 vnstatd + + use gd && doman man/vnstati.1 + doman man/vnstat.1 man/vnstatd.1 + + newdoc INSTALL README.setup + dodoc CHANGES README UPGRADE FAQ examples/vnstat.cgi +} diff --git a/net-analyzer/vnstat/vnstat-2.4.ebuild b/net-analyzer/vnstat/vnstat-2.4.ebuild new file mode 100644 index 000000000000..3c08307f0cf8 --- /dev/null +++ b/net-analyzer/vnstat/vnstat-2.4.ebuild @@ -0,0 +1,69 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +inherit systemd user + +DESCRIPTION="Console-based network traffic monitor that keeps statistics of network usage" +HOMEPAGE="https://humdi.net/vnstat/" +SRC_URI="https://humdi.net/vnstat/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~arm ~hppa ~ppc ~ppc64 ~sparc ~x86" +IUSE="gd selinux test" +RESTRICT="!test? ( test )" + +COMMON_DEPEND=" + dev-db/sqlite + gd? ( media-libs/gd[png] ) +" +DEPEND=" + ${COMMON_DEPEND} + test? ( dev-libs/check ) +" +RDEPEND=" + ${COMMON_DEPEND} + selinux? ( sec-policy/selinux-vnstatd ) +" +PATCHES=( + "${FILESDIR}"/${PN}-2.2-conf.patch + "${FILESDIR}"/${PN}-2.2-drop-root.patch + "${FILESDIR}"/${PN}-2.2-run.patch +) + +pkg_setup() { + enewgroup vnstat + enewuser vnstat -1 -1 /var/lib/vnstat vnstat +} + +src_compile() { + emake ${PN} ${PN}d $(usex gd ${PN}i '') +} + +src_install() { + use gd && dobin vnstati + dobin vnstat vnstatd + + exeinto /usr/share/${PN} + newexe "${FILESDIR}"/vnstat.cron-r1 vnstat.cron + + insinto /etc + doins cfg/vnstat.conf + fowners root:vnstat /etc/vnstat.conf + + keepdir /var/lib/vnstat + fowners vnstat:vnstat /var/lib/vnstat + + newconfd "${FILESDIR}"/vnstatd.confd-r1 vnstatd + newinitd "${FILESDIR}"/vnstatd.initd-r2 vnstatd + + systemd_newunit "${FILESDIR}"/vnstatd.systemd vnstatd.service + systemd_newtmpfilesd "${FILESDIR}"/vnstatd.tmpfile vnstatd.conf + + use gd && doman man/vnstati.1 + doman man/vnstat.1 man/vnstatd.8 + + newdoc INSTALL README.setup + dodoc CHANGES README UPGRADE FAQ examples/vnstat.cgi +} diff --git a/net-analyzer/vnstat/vnstat-2.5.ebuild b/net-analyzer/vnstat/vnstat-2.5.ebuild new file mode 100644 index 000000000000..12983f11d965 --- /dev/null +++ b/net-analyzer/vnstat/vnstat-2.5.ebuild @@ -0,0 +1,69 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +inherit systemd user + +DESCRIPTION="Console-based network traffic monitor that keeps statistics of network usage" +HOMEPAGE="https://humdi.net/vnstat/" +SRC_URI="https://humdi.net/vnstat/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~arm ~hppa ~ppc ~ppc64 ~sparc ~x86" +IUSE="gd selinux test" +RESTRICT="!test? ( test )" + +COMMON_DEPEND=" + dev-db/sqlite + gd? ( media-libs/gd[png] ) +" +DEPEND=" + ${COMMON_DEPEND} + test? ( dev-libs/check ) +" +RDEPEND=" + ${COMMON_DEPEND} + selinux? ( sec-policy/selinux-vnstatd ) +" +PATCHES=( + "${FILESDIR}"/${PN}-2.2-conf.patch + "${FILESDIR}"/${PN}-2.2-drop-root.patch + "${FILESDIR}"/${PN}-2.2-run.patch +) + +pkg_setup() { + enewgroup vnstat + enewuser vnstat -1 -1 /var/lib/vnstat vnstat +} + +src_compile() { + emake ${PN} ${PN}d $(usex gd ${PN}i '') +} + +src_install() { + use gd && dobin vnstati + dobin vnstat vnstatd + + exeinto /usr/share/${PN} + newexe "${FILESDIR}"/vnstat.cron-r1 vnstat.cron + + insinto /etc + doins cfg/vnstat.conf + fowners root:vnstat /etc/vnstat.conf + + keepdir /var/lib/vnstat + fowners vnstat:vnstat /var/lib/vnstat + + newconfd "${FILESDIR}"/vnstatd.confd-r1 vnstatd + newinitd "${FILESDIR}"/vnstatd.initd-r2 vnstatd + + systemd_newunit "${FILESDIR}"/vnstatd.systemd vnstatd.service + systemd_newtmpfilesd "${FILESDIR}"/vnstatd.tmpfile vnstatd.conf + + use gd && doman man/vnstati.1 + doman man/vnstat.1 man/vnstatd.8 + + newdoc INSTALL README.setup + dodoc CHANGES README UPGRADE FAQ examples/vnstat.cgi +} diff --git a/net-analyzer/vnstat/vnstat-2.6.ebuild b/net-analyzer/vnstat/vnstat-2.6.ebuild new file mode 100644 index 000000000000..12983f11d965 --- /dev/null +++ b/net-analyzer/vnstat/vnstat-2.6.ebuild @@ -0,0 +1,69 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +inherit systemd user + +DESCRIPTION="Console-based network traffic monitor that keeps statistics of network usage" +HOMEPAGE="https://humdi.net/vnstat/" +SRC_URI="https://humdi.net/vnstat/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~arm ~hppa ~ppc ~ppc64 ~sparc ~x86" +IUSE="gd selinux test" +RESTRICT="!test? ( test )" + +COMMON_DEPEND=" + dev-db/sqlite + gd? ( media-libs/gd[png] ) +" +DEPEND=" + ${COMMON_DEPEND} + test? ( dev-libs/check ) +" +RDEPEND=" + ${COMMON_DEPEND} + selinux? ( sec-policy/selinux-vnstatd ) +" +PATCHES=( + "${FILESDIR}"/${PN}-2.2-conf.patch + "${FILESDIR}"/${PN}-2.2-drop-root.patch + "${FILESDIR}"/${PN}-2.2-run.patch +) + +pkg_setup() { + enewgroup vnstat + enewuser vnstat -1 -1 /var/lib/vnstat vnstat +} + +src_compile() { + emake ${PN} ${PN}d $(usex gd ${PN}i '') +} + +src_install() { + use gd && dobin vnstati + dobin vnstat vnstatd + + exeinto /usr/share/${PN} + newexe "${FILESDIR}"/vnstat.cron-r1 vnstat.cron + + insinto /etc + doins cfg/vnstat.conf + fowners root:vnstat /etc/vnstat.conf + + keepdir /var/lib/vnstat + fowners vnstat:vnstat /var/lib/vnstat + + newconfd "${FILESDIR}"/vnstatd.confd-r1 vnstatd + newinitd "${FILESDIR}"/vnstatd.initd-r2 vnstatd + + systemd_newunit "${FILESDIR}"/vnstatd.systemd vnstatd.service + systemd_newtmpfilesd "${FILESDIR}"/vnstatd.tmpfile vnstatd.conf + + use gd && doman man/vnstati.1 + doman man/vnstat.1 man/vnstatd.8 + + newdoc INSTALL README.setup + dodoc CHANGES README UPGRADE FAQ examples/vnstat.cgi +} diff --git a/net-analyzer/vnstat/vnstat-9999.ebuild b/net-analyzer/vnstat/vnstat-9999.ebuild new file mode 100644 index 000000000000..7299c18fe077 --- /dev/null +++ b/net-analyzer/vnstat/vnstat-9999.ebuild @@ -0,0 +1,69 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +inherit git-r3 systemd user + +DESCRIPTION="Console-based network traffic monitor that keeps statistics of network usage" +HOMEPAGE="https://humdi.net/vnstat/" +EGIT_REPO_URI="https://github.com/vergoh/vnstat" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="" +IUSE="gd selinux test" +RESTRICT="!test? ( test )" + +COMMON_DEPEND=" + dev-db/sqlite + gd? ( media-libs/gd[png] ) +" +DEPEND=" + ${COMMON_DEPEND} + test? ( dev-libs/check ) +" +RDEPEND=" + ${COMMON_DEPEND} + selinux? ( sec-policy/selinux-vnstatd ) +" +PATCHES=( + "${FILESDIR}"/${PN}-2.2-conf.patch + "${FILESDIR}"/${PN}-2.2-drop-root.patch + "${FILESDIR}"/${PN}-2.2-run.patch +) + +pkg_setup() { + enewgroup vnstat + enewuser vnstat -1 -1 /var/lib/vnstat vnstat +} + +src_compile() { + emake ${PN} ${PN}d $(usex gd ${PN}i '') +} + +src_install() { + use gd && dobin vnstati + dobin vnstat vnstatd + + exeinto /usr/share/${PN} + newexe "${FILESDIR}"/vnstat.cron-r1 vnstat.cron + + insinto /etc + doins cfg/vnstat.conf + fowners root:vnstat /etc/vnstat.conf + + keepdir /var/lib/vnstat + fowners vnstat:vnstat /var/lib/vnstat + + newconfd "${FILESDIR}"/vnstatd.confd-r1 vnstatd + newinitd "${FILESDIR}"/vnstatd.initd-r2 vnstatd + + systemd_newunit "${FILESDIR}"/vnstatd.systemd vnstatd.service + systemd_newtmpfilesd "${FILESDIR}"/vnstatd.tmpfile vnstatd.conf + + use gd && doman man/vnstati.1 + doman man/vnstat.1 man/vnstatd.1 + + newdoc INSTALL.md README.setup + dodoc CHANGES README.md UPGRADE.md FAQ examples/vnstat.cgi +} diff --git a/net-analyzer/wapiti/Manifest b/net-analyzer/wapiti/Manifest new file mode 100644 index 000000000000..9ead88d6c3ae --- /dev/null +++ b/net-analyzer/wapiti/Manifest @@ -0,0 +1 @@ +DIST wapiti3-3.0.3.tar.gz 553259 BLAKE2B c31a1ce3e367c7b85141b0a83c9617a901f01753ebcc56142092d475bf3d540fac6d4e529fc87f5919c962303451787db9e1f8872a5e70a646ff48c1b076139e SHA512 ed135a97ee0c2431fa15d87888eca424db389e9e54b1426e0efe7a83299ee110cb9895916c5f5f3690a99f81034e8ad0d97e3e432b2d478b89a3ba14534ddb96 diff --git a/net-analyzer/wapiti/metadata.xml b/net-analyzer/wapiti/metadata.xml new file mode 100644 index 000000000000..6709ac178947 --- /dev/null +++ b/net-analyzer/wapiti/metadata.xml @@ -0,0 +1,21 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>voyageur@gentoo.org</email> + <name>Bernard Cafarelli</name> + </maintainer> + <longdescription>Wapiti allows you to audit the security of your web applications. + +It performs black-box scans, i.e. it does not study the source code of the application but will scans the webpages of the deployed webapp, looking for scripts and forms where it can inject data. + +Once it gets this list, Wapiti acts like a fuzzer, injecting payloads to see if a script is vulnerable.</longdescription> + <upstream> + <remote-id type="sourceforge">wapiti</remote-id> + </upstream> + <use> + <flag name="kerberos">Support Kerberos authentication</flag> + <flag name="ntlm">Support NTLM authentication</flag> + </use> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/wapiti/wapiti-3.0.3.ebuild b/net-analyzer/wapiti/wapiti-3.0.3.ebuild new file mode 100644 index 000000000000..b74bc61781ce --- /dev/null +++ b/net-analyzer/wapiti/wapiti-3.0.3.ebuild @@ -0,0 +1,35 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +PYTHON_COMPAT=( python3_{6,7,8} ) +PYTHON_REQ_USE='xml' + +inherit distutils-r1 + +MY_P=${PN}3-${PV} +DESCRIPTION="Web-application vulnerability scanner" +HOMEPAGE="http://wapiti.sourceforge.net/" +SRC_URI="mirror://sourceforge/${PN}/${MY_P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="kerberos ntlm" + +RDEPEND="dev-python/beautifulsoup:4[${PYTHON_USEDEP}] + dev-python/lxml[${PYTHON_USEDEP}] + dev-python/mako[${PYTHON_USEDEP}] + >=dev-python/requests-1.2.3[${PYTHON_USEDEP}] + dev-python/tld[${PYTHON_USEDEP}] + dev-python/yaswfp[${PYTHON_USEDEP}] + kerberos? ( dev-python/requests-kerberos[${PYTHON_USEDEP}] ) + ntlm? ( dev-python/requests-ntlm[${PYTHON_USEDEP}] )" + +S=${WORKDIR}/${MY_P} + +python_prepare_all() { + sed -e 's/"pytest-runner"//' -i setup.py || die + distutils-r1_python_prepare_all +} diff --git a/net-analyzer/wapiti/wapiti-9999.ebuild b/net-analyzer/wapiti/wapiti-9999.ebuild new file mode 100644 index 000000000000..ef1480dd21ea --- /dev/null +++ b/net-analyzer/wapiti/wapiti-9999.ebuild @@ -0,0 +1,35 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +PYTHON_COMPAT=( python3_{6,7,8} ) +PYTHON_REQ_USE='xml' + +inherit distutils-r1 git-r3 + +DESCRIPTION="Web-application vulnerability scanner" +HOMEPAGE="http://wapiti.sourceforge.net/" +EGIT_REPO_URI="https://git.code.sf.net/p/wapiti/git wapiti-git" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="" +IUSE="kerberos ntlm" + +RDEPEND="dev-python/beautifulsoup:4[${PYTHON_USEDEP}] + dev-python/lxml[${PYTHON_USEDEP}] + dev-python/mako[${PYTHON_USEDEP}] + >=dev-python/requests-1.2.3[${PYTHON_USEDEP}] + dev-python/tld[${PYTHON_USEDEP}] + dev-python/yaswfp[${PYTHON_USEDEP}] + kerberos? ( dev-python/requests-kerberos[${PYTHON_USEDEP}] ) + ntlm? ( dev-python/requests-ntlm[${PYTHON_USEDEP}] )" + +distutils_enable_tests pytest +BDEPEND+=" test? ( dev-python/responses[${PYTHON_USEDEP}] )" + +python_prepare_all() { + sed -e 's/"pytest-runner"//' -i setup.py || die + distutils-r1_python_prepare_all +} diff --git a/net-analyzer/webfuzzer/Manifest b/net-analyzer/webfuzzer/Manifest new file mode 100644 index 000000000000..345e53946815 --- /dev/null +++ b/net-analyzer/webfuzzer/Manifest @@ -0,0 +1 @@ +DIST webfuzzer-0.2.0.tar.gz 29664 BLAKE2B 38c03f826c99887d8e8531a19634b250a73dad5cfa92386a033015c354739ba403c90faf9b0e99ac705ecd42cafe564d11edff9bdb71b9c4b29c048cbe64c1cc SHA512 7cb858178dd11e7b6020f2b0db1092462401aab552af6bdb8b8c95c018bd35572a981338226def07dc45ed8f0b5a0b282ad681e9d86bec14d14ffd623518082e diff --git a/net-analyzer/webfuzzer/files/webfuzzer-0.2.0-flags.patch b/net-analyzer/webfuzzer/files/webfuzzer-0.2.0-flags.patch new file mode 100644 index 000000000000..9c40ecf167f7 --- /dev/null +++ b/net-analyzer/webfuzzer/files/webfuzzer-0.2.0-flags.patch @@ -0,0 +1,24 @@ +--- a/Makefile ++++ b/Makefile +@@ -2,7 +2,7 @@ + # Makefile for Webfuzzer (c) gunzip + # + +-CFLAGS=-g -O3 -Wall -DCOLORS ++CFLAGS+= -Wall -DCOLORS + CC=gcc + LIBS=-lsocket -lnsl -lresolv + MOBJS=util.o getpost.o header.o parseform.o hash.o network.o parselinks.o cookies.o webfuzzer.o +@@ -13,10 +13,10 @@ + default: webfuzzer + + webfuzzer: main.c $(MOBJS) +- $(CC) $(CFLAGS) -o webfuzzer main.c $(MOBJS) ++ $(CC) $(CFLAGS) $(LDFLAGS) -o webfuzzer main.c $(MOBJS) + + sunos: main.c $(MOBJS) +- $(CC) $(CFLAGS) -o webfuzzer main.c $(MOBJS) $(LIBS) ++ $(CC) $(CFLAGS) $(LDFLAGS) -o webfuzzer main.c $(MOBJS) $(LIBS) + + clean: + rm -rf *.o webfuzzer core diff --git a/net-analyzer/webfuzzer/files/webfuzzer-0.2.0-fno-common.patch b/net-analyzer/webfuzzer/files/webfuzzer-0.2.0-fno-common.patch new file mode 100644 index 000000000000..ca40c4ee4f81 --- /dev/null +++ b/net-analyzer/webfuzzer/files/webfuzzer-0.2.0-fno-common.patch @@ -0,0 +1,37 @@ +--- a/webfuzzer.h ++++ b/webfuzzer.h +@@ -30,11 +30,11 @@ + /** + ** GLOBAL HASHTABLES + **/ +-struct node * HTlinks[ HT_SIZE ]; +-struct node * HTforms[ HT_SIZE ]; +-struct node * HTusers[ HT_SIZE ]; +-struct node * HTtools[ HT_SIZE ]; +-struct node * HTcookies[ HT_SIZE ]; ++extern struct node * HTlinks[ HT_SIZE ]; ++extern struct node * HTforms[ HT_SIZE ]; ++extern struct node * HTusers[ HT_SIZE ]; ++extern struct node * HTtools[ HT_SIZE ]; ++extern struct node * HTcookies[ HT_SIZE ]; + + #define VERSION "0.2.0" + #define BANNER GREEN "Webfuzzer " DEF VERSION " (c) gunzip" +--- a/webfuzzer.c ++++ b/webfuzzer.c +@@ -29,6 +29,15 @@ + #include "technic.h" + + /** ++ ** GLOBAL HASHTABLES ++ **/ ++struct node * HTlinks[ HT_SIZE ]; ++struct node * HTforms[ HT_SIZE ]; ++struct node * HTusers[ HT_SIZE ]; ++struct node * HTtools[ HT_SIZE ]; ++struct node * HTcookies[ HT_SIZE ]; ++ ++/** + ** PROTOTYPES + **/ + diff --git a/net-analyzer/webfuzzer/metadata.xml b/net-analyzer/webfuzzer/metadata.xml new file mode 100644 index 000000000000..bd13a914477c --- /dev/null +++ b/net-analyzer/webfuzzer/metadata.xml @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<maintainer type="project"> + <email>netmon@gentoo.org</email> + <name>Gentoo network monitoring and analysis project</name> +</maintainer> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/webfuzzer/webfuzzer-0.2.0-r1.ebuild b/net-analyzer/webfuzzer/webfuzzer-0.2.0-r1.ebuild new file mode 100644 index 000000000000..6b40638cf0bc --- /dev/null +++ b/net-analyzer/webfuzzer/webfuzzer-0.2.0-r1.ebuild @@ -0,0 +1,31 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 +inherit eutils toolchain-funcs + +DESCRIPTION="Poor man's web vulnerability scanner" +HOMEPAGE="http://gunzip.altervista.org/g.php?f=projects" +SRC_URI="http://gunzip.altervista.org/webfuzzer/webfuzzer-${PV}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" + +S=${WORKDIR}/devel + +src_prepare() { + sed -i Makefile \ + -e 's|CFLAGS=-g -O3|CFLAGS+=|' \ + -e 's| -o | $(LDFLAGS)&|g' \ + || die +} + +src_compile() { + emake CC=$(tc-getCC) +} + +src_install() { + dodoc CHANGES README TODO + dobin webfuzzer +} diff --git a/net-analyzer/webfuzzer/webfuzzer-0.2.0-r2.ebuild b/net-analyzer/webfuzzer/webfuzzer-0.2.0-r2.ebuild new file mode 100644 index 000000000000..66622a2b52db --- /dev/null +++ b/net-analyzer/webfuzzer/webfuzzer-0.2.0-r2.ebuild @@ -0,0 +1,28 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +inherit toolchain-funcs + +DESCRIPTION="Poor man's web vulnerability scanner" +HOMEPAGE="http://gunzip.altervista.org/g.php?f=projects" +SRC_URI="http://gunzip.altervista.org/webfuzzer/webfuzzer-${PV}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" + +S=${WORKDIR}/devel +PATCHES=( + "${FILESDIR}"/${P}-flags.patch + "${FILESDIR}"/${P}-fno-common.patch +) + +src_compile() { + emake CC=$(tc-getCC) +} + +src_install() { + dodoc CHANGES README TODO + dobin webfuzzer +} diff --git a/net-analyzer/wireshark/Manifest b/net-analyzer/wireshark/Manifest new file mode 100644 index 000000000000..31d6a5d49be6 --- /dev/null +++ b/net-analyzer/wireshark/Manifest @@ -0,0 +1 @@ +DIST wireshark-3.2.4.tar.xz 31580440 BLAKE2B c40c19fde09726192119efe358892157d17e28ab87afa9a5b91203e11d3079b718d8e200522294886613d63d19283198de1256561eaf83436742db3898019e89 SHA512 67d20a248c0f4e63a58fd3a4191ede75542e9cfd09b0baa5c0016f72a435527d8f95d34f2d35ef1957c1a9c66844d530162379bfcf9e51b64d0d220b381cb097 diff --git a/net-analyzer/wireshark/files/wireshark-2.4-androiddump.patch b/net-analyzer/wireshark/files/wireshark-2.4-androiddump.patch new file mode 100644 index 000000000000..2272ef891c27 --- /dev/null +++ b/net-analyzer/wireshark/files/wireshark-2.4-androiddump.patch @@ -0,0 +1,27 @@ +--- a/extcap/androiddump.c ++++ b/extcap/androiddump.c +@@ -438,13 +438,13 @@ + pcap = pcap_open_dead_with_tstamp_precision(encap, PACKET_LENGTH, PCAP_TSTAMP_PRECISION_NANO); + extcap_dumper.dumper.pcap = pcap_dump_open(pcap, fifo); + if (!extcap_dumper.dumper.pcap) { +- g_warning("Can't open %s for saving packets: %s", pcap_geterr(pcap)); ++ g_warning("Can't open %s for saving packets: %s", fifo, pcap_geterr(pcap)); + pcap_close(pcap); + exit(EXIT_CODE_CANNOT_SAVE_LIBPCAP_DUMP); + } + extcap_dumper.encap = encap; + if (pcap_dump_flush(extcap_dumper.dumper.pcap) == -1) { +- g_warning("Write to %s failed: %s", g_strerror(errno)); ++ g_warning("Write to %s failed: %s", fifo, g_strerror(errno)); + } + #else + wtap_dump_params params = WTAP_DUMP_PARAMS_INIT; +@@ -480,7 +480,7 @@ + + pcap_dump((u_char *) extcap_dumper.dumper.pcap, &pcap_header, buffer); + if (pcap_dump_flush(extcap_dumper.dumper.pcap) == -1) { +- g_warning("Write to %s failed: %s", g_strerror(errno)); ++ g_warning("Write to %s failed: %s", fifo, g_strerror(errno)); + } + #else + int err = 0; diff --git a/net-analyzer/wireshark/files/wireshark-2.6.0-redhat.patch b/net-analyzer/wireshark/files/wireshark-2.6.0-redhat.patch new file mode 100644 index 000000000000..fe17609bf619 --- /dev/null +++ b/net-analyzer/wireshark/files/wireshark-2.6.0-redhat.patch @@ -0,0 +1,11 @@ +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -3019,7 +3019,7 @@ + + endif() + +-if(CMAKE_SYSTEM_NAME STREQUAL "Linux") ++if(CMAKE_SYSTEM_NAME STREQUAL "Red Hat") + find_program(RPMBUILD_EXECUTABLE rpmbuild) + find_program(GIT_EXECUTABLE git) + endif() diff --git a/net-analyzer/wireshark/files/wireshark-2.9.0-tfshark-libm.patch b/net-analyzer/wireshark/files/wireshark-2.9.0-tfshark-libm.patch new file mode 100644 index 000000000000..40082c435010 --- /dev/null +++ b/net-analyzer/wireshark/files/wireshark-2.9.0-tfshark-libm.patch @@ -0,0 +1,10 @@ +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -2314,6 +2314,7 @@ + + if(BUILD_tfshark) + set(tfshark_LIBS ++ m + ui + wiretap + epan diff --git a/net-analyzer/wireshark/files/wireshark-99999999-androiddump-wsutil.patch b/net-analyzer/wireshark/files/wireshark-99999999-androiddump-wsutil.patch new file mode 100644 index 000000000000..3d3a2a9c9323 --- /dev/null +++ b/net-analyzer/wireshark/files/wireshark-99999999-androiddump-wsutil.patch @@ -0,0 +1,19 @@ +--- a/extcap/CMakeLists.txt ++++ b/extcap/CMakeLists.txt +@@ -91,6 +91,8 @@ if(BUILD_androiddump) + if(HAVE_LIBPCAP) + set(androiddump_LIBS + ui ++ wiretap ++ wsutil + ${GLIB2_LIBRARIES} + ${WIN_WS2_32_LIBRARY} + $<$<BOOL:${PCAP_FOUND}>:pcap::pcap> +@@ -102,6 +104,7 @@ if(BUILD_androiddump) + set(androiddump_LIBS + ui + wiretap ++ wsutil + ${GLIB2_LIBRARIES} + ${ZLIB_LIBRARIES} + ${CMAKE_DL_LIBS} diff --git a/net-analyzer/wireshark/files/wireshark-99999999-qtsvg.patch b/net-analyzer/wireshark/files/wireshark-99999999-qtsvg.patch new file mode 100644 index 000000000000..8cff4bdd0752 --- /dev/null +++ b/net-analyzer/wireshark/files/wireshark-99999999-qtsvg.patch @@ -0,0 +1,10 @@ +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -1058,7 +1058,6 @@ + Qt5LinguistTools + Qt5Multimedia + Qt5PrintSupport +- Qt5Svg + Qt5Widgets + ) + if(APPLE) diff --git a/net-analyzer/wireshark/files/wireshark-99999999-ui-needs-wiretap.patch b/net-analyzer/wireshark/files/wireshark-99999999-ui-needs-wiretap.patch new file mode 100644 index 000000000000..c0bfc3acd5a6 --- /dev/null +++ b/net-analyzer/wireshark/files/wireshark-99999999-ui-needs-wiretap.patch @@ -0,0 +1,11 @@ +--- a/ui/CMakeLists.txt ++++ b/ui/CMakeLists.txt +@@ -76,6 +76,8 @@ + + add_library(ui STATIC ${UI_SRC}) + ++set(ui_LIBS wiretap) ++ + set_target_properties(ui PROPERTIES + LINK_FLAGS "${WS_LINK_FLAGS}" + FOLDER "UI" diff --git a/net-analyzer/wireshark/metadata.xml b/net-analyzer/wireshark/metadata.xml new file mode 100644 index 000000000000..e1ba93f43b65 --- /dev/null +++ b/net-analyzer/wireshark/metadata.xml @@ -0,0 +1,64 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<maintainer type="project"> +<email>netmon@gentoo.org</email> +<name>Gentoo network monitoring and analysis project</name> +</maintainer> +<longdescription> +Wireshark is the world's foremost network protocol analyzer, and is the de +facto (and often de jure) standard across many industries and educational +institutions. Wireshark has a rich feature set which includes 1) deep +inspection of hundreds of protocols, with more being added all the time, 2) +live capture and offline analysis, 3) standard three-pane packet browser, 4) +captured network data can be browsed via a GUI, or via the TTY-mode TShark +utility, 5) the most powerful display filters in the industry, 6) rich VoIP +analysis, 7) read/write many different capture file formats: tcpdump (libpcap), +Catapult DCT2000, Cisco Secure IDS iplog, Microsoft Network Monitor, Network +General Sniffer® (compressed and uncompressed), Sniffer® Pro, and NetXray®, +Network Instruments Observer, Novell LANalyzer, RADCOM WAN/LAN Analyzer, +Shomiti/Finisar Surveyor, Tektronix K12xx, Visual Networks Visual UpTime, +WildPackets EtherPeek/TokenPeek/AiroPeek, and many others, 8) capture files +compressed with gzip can be decompressed on the fly, 9) live data can be read +from Ethernet, IEEE 802.11, PPP/HDLC, ATM, Bluetooth, USB, Token Ring, Frame +Relay, FDDI, and others, 10) decryption support for many protocols, including +IPsec, ISAKMP, Kerberos, SNMPv3, SSL/TLS, WEP, and WPA/WPA2, 11) coloring rules +can be applied to the packet list for quick, intuitive analysis, 12) output can +be exported to XML, PostScript®, CSV, or plain text. +</longdescription> +<use> +<flag name="androiddump">Install androiddump, an extcap interface to capture from Android devices</flag> +<flag name="bcg729">Use <pkg>media-libs/bcg729</pkg> for G.729 codec support in RTP Player</flag> +<flag name="brotli">Use <pkg>app-arch/brotli</pkg> for compression/decompression</flag> +<flag name="capinfos">Install capinfos, to print information about capture files</flag> +<flag name="captype">Install captype, to print the file types of capture files</flag> +<flag name="ciscodump">Install ciscodump, extcap interface to capture from a remote Cisco router</flag> +<flag name="dftest">Install dftest, to display filter byte-code, for debugging dfilter routines</flag> +<flag name="dpauxmon">Install dpauxmon, an external capture interface (extcap) that captures DisplayPort AUX channel data from linux kernel drivers</flag> +<flag name="dumpcap">Install dumpcap, to dump network traffic from inside wireshark</flag> +<flag name="editcap">Install editcap, to edit and/or translate the format of capture files</flag> +<flag name="http2">Use <pkg>net-libs/nghttp2</pkg> for HTTP/2 support</flag> +<flag name="libxml2">Use <pkg>dev-libs/libxml2</pkg> for handling XML configuration in dissectors</flag> +<flag name="maxminddb">Use <pkg>dev-libs/libmaxminddb</pkg> for IP address geolocation</flag> +<flag name="mergecap">Install mergecap, to merge two or more capture files into one</flag> +<flag name="minizip">Build with zip file compression support</flag> +<flag name="netlink">Use <pkg>dev-libs/libnl</pkg></flag> +<flag name="pcap">Use <pkg>net-libs/libpcap</pkg> for network packet capturing (build dumpcap, rawshark)</flag> +<flag name="plugin-ifdemo">Install plugin interface demo</flag> +<flag name="plugins">Install plugins</flag> +<flag name="randpkt">Install randpkt, a utility for creating pcap trace files full of random packets</flag> +<flag name="randpktdump">Install randpktdump, an extcap interface to provide access to the random packet generator (randpkt)</flag> +<flag name="reordercap">Install reordercap, to reorder input file by timestamp into output file</flag> +<flag name="sbc">Use <pkg>media-libs/sbc</pkg> for playing back SBC encoded packets</flag> +<flag name="sdjournal">Install sdjournal, an extcap that captures systemd journal entries</flag> +<flag name="sharkd">Install sharkd, the daemon variant of wireshark</flag> +<flag name="smi">Use <pkg>net-libs/libsmi</pkg> to resolve numeric OIDs into human readable format</flag> +<flag name="spandsp">Use <pkg>media-libs/spandsp</pkg> for for G.722 and G.726 codec support in the RTP Player</flag> +<flag name="sshdump">Install sshdump, an extcap interface to capture from a remote host through SSH</flag> +<flag name="text2pcap">Install text2pcap, to generate a capture file from an ASCII hexdump of packets</flag> +<flag name="tfshark">Install tfshark, a terminal-based version of the FileShark capability</flag> +<flag name="tshark">Install tshark, to dump and analyzer network traffic from the command line</flag> +<flag name="udpdump">Install udpdump, to get packets exported from a source (like a network device or a GSMTAP producer) that are dumped to a pcap file</flag> +</use> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/wireshark/wireshark-3.2.4.ebuild b/net-analyzer/wireshark/wireshark-3.2.4.ebuild new file mode 100644 index 000000000000..33ae5ea2b3f8 --- /dev/null +++ b/net-analyzer/wireshark/wireshark-3.2.4.ebuild @@ -0,0 +1,261 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +PYTHON_COMPAT=( python3_{6,7} ) +inherit fcaps flag-o-matic multilib python-any-r1 qmake-utils user xdg-utils cmake + +DESCRIPTION="A network protocol analyzer formerly known as ethereal" +HOMEPAGE="https://www.wireshark.org/" +SRC_URI="https://www.wireshark.org/download/src/all-versions/${P/_/}.tar.xz" +LICENSE="GPL-2" + +SLOT="0/${PV}" +KEYWORDS="~alpha amd64 arm ~arm64 ~hppa ~ia64 ppc64 x86" +IUSE=" + androiddump bcg729 brotli +capinfos +captype ciscodump +dftest doc dpauxmon + +dumpcap +editcap http2 kerberos libxml2 lua lz4 maxminddb +mergecap + +minizip +netlink +plugins plugin-ifdemo +pcap +qt5 +randpkt +randpktdump + +reordercap sbc selinux +sharkd smi snappy spandsp sshdump ssl sdjournal + test +text2pcap tfshark +tshark +udpdump zlib +zstd +" +S=${WORKDIR}/${P/_/} + +CDEPEND=" + >=dev-libs/glib-2.32:2 + >=net-dns/c-ares-1.5 + dev-libs/libgcrypt:0 + bcg729? ( media-libs/bcg729 ) + brotli? ( app-arch/brotli ) + ciscodump? ( >=net-libs/libssh-0.6 ) + filecaps? ( sys-libs/libcap ) + http2? ( net-libs/nghttp2 ) + kerberos? ( virtual/krb5 ) + libxml2? ( dev-libs/libxml2 ) + lua? ( >=dev-lang/lua-5.1:* ) + lz4? ( app-arch/lz4 ) + maxminddb? ( dev-libs/libmaxminddb ) + minizip? ( sys-libs/zlib[minizip] ) + netlink? ( dev-libs/libnl:3 ) + pcap? ( net-libs/libpcap ) + qt5? ( + dev-qt/qtcore:5 + dev-qt/qtgui:5 + dev-qt/qtmultimedia:5 + dev-qt/qtprintsupport:5 + dev-qt/qtwidgets:5 + x11-misc/xdg-utils + ) + sbc? ( media-libs/sbc ) + sdjournal? ( sys-apps/systemd ) + smi? ( net-libs/libsmi ) + snappy? ( app-arch/snappy ) + spandsp? ( media-libs/spandsp ) + sshdump? ( >=net-libs/libssh-0.6 ) + ssl? ( net-libs/gnutls:= ) + zlib? ( sys-libs/zlib ) + zstd? ( app-arch/zstd ) +" +# We need perl for `pod2html`. The rest of the perl stuff is to block older +# and broken installs. #455122 +DEPEND=" + ${CDEPEND} + ${PYTHON_DEPS} +" +BDEPEND=" + dev-lang/perl + sys-devel/bison + sys-devel/flex + virtual/pkgconfig + doc? ( + app-doc/doxygen + dev-ruby/asciidoctor + ) + qt5? ( + dev-qt/linguist-tools:5 + ) + test? ( + dev-python/pytest + dev-python/pytest-xdist + ) +" +RDEPEND=" + ${CDEPEND} + qt5? ( virtual/freedesktop-icon-theme ) + selinux? ( sec-policy/selinux-wireshark ) +" +REQUIRED_USE=" + plugin-ifdemo? ( plugins ) +" +RESTRICT="test" +PATCHES=( + "${FILESDIR}"/${PN}-2.4-androiddump.patch + "${FILESDIR}"/${PN}-2.6.0-redhat.patch + "${FILESDIR}"/${PN}-2.9.0-tfshark-libm.patch + "${FILESDIR}"/${PN}-99999999-androiddump-wsutil.patch + "${FILESDIR}"/${PN}-99999999-qtsvg.patch + "${FILESDIR}"/${PN}-99999999-ui-needs-wiretap.patch +) + +pkg_setup() { + enewgroup wireshark +} + +src_configure() { + local mycmakeargs + + # Workaround bug #213705. If krb5-config --libs has -lcrypto then pass + # --with-ssl to ./configure. (Mimics code from acinclude.m4). + if use kerberos; then + case $(krb5-config --libs) in + *-lcrypto*) + ewarn "Kerberos was built with ssl support: linkage with openssl is enabled." + ewarn "Note there are annoying license incompatibilities between the OpenSSL" + ewarn "license and the GPL, so do your check before distributing such package." + mycmakeargs+=( -DENABLE_GNUTLS=$(usex ssl) ) + ;; + esac + fi + + if use qt5; then + export QT_MIN_VERSION=5.3.0 + append-cxxflags -fPIC -DPIC + fi + + python_setup + + mycmakeargs+=( + $(use androiddump && use pcap && echo -DEXTCAP_ANDROIDDUMP_LIBPCAP=yes) + $(usex qt5 LRELEASE=$(qt5_get_bindir)/lrelease '') + $(usex qt5 MOC=$(qt5_get_bindir)/moc '') + $(usex qt5 RCC=$(qt5_get_bindir)/rcc '') + $(usex qt5 UIC=$(qt5_get_bindir)/uic '') + -DBUILD_androiddump=$(usex androiddump) + -DBUILD_capinfos=$(usex capinfos) + -DBUILD_captype=$(usex captype) + -DBUILD_ciscodump=$(usex ciscodump) + -DBUILD_dftest=$(usex dftest) + -DBUILD_dpauxmon=$(usex dpauxmon) + -DBUILD_dumpcap=$(usex dumpcap) + -DBUILD_editcap=$(usex editcap) + -DBUILD_mergecap=$(usex mergecap) + -DBUILD_mmdbresolve=$(usex maxminddb) + -DBUILD_randpkt=$(usex randpkt) + -DBUILD_randpktdump=$(usex randpktdump) + -DBUILD_reordercap=$(usex reordercap) + -DBUILD_sdjournal=$(usex sdjournal) + -DBUILD_sharkd=$(usex sharkd) + -DBUILD_sshdump=$(usex sshdump) + -DBUILD_text2pcap=$(usex text2pcap) + -DBUILD_tfshark=$(usex tfshark) + -DBUILD_tshark=$(usex tshark) + -DBUILD_udpdump=$(usex udpdump) + -DBUILD_wireshark=$(usex qt5) + -DCMAKE_INSTALL_DOCDIR="${EROOT}/usr/share/doc/${PF}" + -DDISABLE_WERROR=yes + -DENABLE_BCG729=$(usex bcg729) + -DENABLE_BROTLI=$(usex brotli) + -DENABLE_CAP=$(usex filecaps caps) + -DENABLE_GNUTLS=$(usex ssl) + -DENABLE_KERBEROS=$(usex kerberos) + -DENABLE_LIBXML2=$(usex libxml2) + -DENABLE_LUA=$(usex lua) + -DENABLE_LZ4=$(usex lz4) + -DENABLE_MINIZIP=$(usex minizip) + -DENABLE_NETLINK=$(usex netlink) + -DENABLE_NGHTTP2=$(usex http2) + -DENABLE_PCAP=$(usex pcap) + -DENABLE_PLUGINS=$(usex plugins) + -DENABLE_PLUGIN_IFDEMO=$(usex plugin-ifdemo) + -DENABLE_SBC=$(usex sbc) + -DENABLE_SMI=$(usex smi) + -DENABLE_SNAPPY=$(usex snappy) + -DENABLE_SPANDSP=$(usex spandsp) + -DENABLE_ZLIB=$(usex zlib) + -DENABLE_ZSTD=$(usex zstd) + ) + + cmake_src_configure +} + +src_test() { + cmake_build test-programs + + myctestargs=( --disable-capture --skip-missing-programs=all --verbose ) + cmake_src_test +} + +src_install() { + cmake_src_install + + # FAQ is not required as is installed from help/faq.txt + dodoc AUTHORS ChangeLog NEWS README* doc/randpkt.txt doc/README* + + # install headers + insinto /usr/include/wireshark + doins ws_diag_control.h ws_symbol_export.h \ + "${BUILD_DIR}"/config.h "${BUILD_DIR}"/version.h + + local dir dirs=( + epan + epan/crypt + epan/dfilter + epan/dissectors + epan/ftypes + epan/wmem + wiretap + wsutil + ) + for dir in "${dirs[@]}" + do + insinto /usr/include/wireshark/${dir} + doins ${dir}/*.h + done + + #with the above this really shouldn't be needed, but things may be looking + # in wiretap/ instead of wireshark/wiretap/ + insinto /usr/include/wiretap + doins wiretap/wtap.h + + if use qt5; then + local s + for s in 16 32 48 64 128 256 512 1024; do + insinto /usr/share/icons/hicolor/${s}x${s}/apps + newins image/wsicon${s}.png wireshark.png + done + for s in 16 24 32 48 64 128 256 ; do + insinto /usr/share/icons/hicolor/${s}x${s}/mimetypes + newins image/WiresharkDoc-${s}.png application-vnd.tcpdump.pcap.png + done + fi + + if [[ -d "${D}"/usr/share/appdata ]]; then + rm -r "${D}"/usr/share/appdata || die + fi +} + +pkg_postinst() { + xdg_desktop_database_update + xdg_icon_cache_update + xdg_mimeinfo_database_update + + # Add group for users allowed to sniff. + enewgroup wireshark + chgrp wireshark "${EROOT}"/usr/bin/dumpcap + + if use dumpcap && use pcap; then + fcaps -o 0 -g wireshark -m 4710 -M 0710 \ + cap_dac_read_search,cap_net_raw,cap_net_admin \ + "${EROOT}"/usr/bin/dumpcap + fi + + ewarn "NOTE: To capture traffic with wireshark as normal user you have to" + ewarn "add yourself to the wireshark group. This security measure ensures" + ewarn "that only trusted users are allowed to sniff your traffic." +} + +pkg_postrm() { + xdg_desktop_database_update + xdg_icon_cache_update + xdg_mimeinfo_database_update +} diff --git a/net-analyzer/wireshark/wireshark-99999999.ebuild b/net-analyzer/wireshark/wireshark-99999999.ebuild new file mode 100644 index 000000000000..0fca7d964220 --- /dev/null +++ b/net-analyzer/wireshark/wireshark-99999999.ebuild @@ -0,0 +1,254 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +PYTHON_COMPAT=( python3_{6,7} ) +inherit fcaps flag-o-matic git-r3 multilib python-any-r1 qmake-utils user xdg-utils cmake + +DESCRIPTION="A network protocol analyzer formerly known as ethereal" +HOMEPAGE="https://www.wireshark.org/" +EGIT_REPO_URI="https://code.wireshark.org/review/wireshark" +LICENSE="GPL-2" + +SLOT="0/${PV}" +KEYWORDS="" +IUSE=" + androiddump bcg729 brotli +capinfos +captype ciscodump +dftest doc dpauxmon + +dumpcap +editcap http2 kerberos libxml2 lua lz4 maxminddb +mergecap + +minizip +netlink +plugins plugin-ifdemo +pcap +qt5 +randpkt +randpktdump + +reordercap sbc selinux +sharkd smi snappy spandsp sshdump ssl sdjournal + test +text2pcap tfshark +tshark +udpdump zlib +" +S=${WORKDIR}/${P/_/} + +CDEPEND=" + >=dev-libs/glib-2.32:2 + >=net-dns/c-ares-1.5 + dev-libs/libgcrypt:0 + bcg729? ( media-libs/bcg729 ) + brotli? ( app-arch/brotli ) + ciscodump? ( >=net-libs/libssh-0.6 ) + filecaps? ( sys-libs/libcap ) + http2? ( net-libs/nghttp2 ) + kerberos? ( virtual/krb5 ) + libxml2? ( dev-libs/libxml2 ) + lua? ( >=dev-lang/lua-5.1:* ) + lz4? ( app-arch/lz4 ) + maxminddb? ( dev-libs/libmaxminddb ) + minizip? ( sys-libs/zlib[minizip] ) + netlink? ( dev-libs/libnl:3 ) + pcap? ( net-libs/libpcap ) + qt5? ( + dev-qt/qtcore:5 + dev-qt/qtgui:5 + dev-qt/qtmultimedia:5 + dev-qt/qtprintsupport:5 + dev-qt/qtwidgets:5 + x11-misc/xdg-utils + ) + sbc? ( media-libs/sbc ) + sdjournal? ( sys-apps/systemd ) + smi? ( net-libs/libsmi ) + snappy? ( app-arch/snappy ) + spandsp? ( media-libs/spandsp ) + sshdump? ( >=net-libs/libssh-0.6 ) + ssl? ( net-libs/gnutls:= ) + zlib? ( sys-libs/zlib ) +" +# We need perl for `pod2html`. The rest of the perl stuff is to block older +# and broken installs. #455122 +DEPEND=" + ${CDEPEND} + ${PYTHON_DEPS} +" +BDEPEND=" + dev-lang/perl + sys-devel/bison + sys-devel/flex + virtual/pkgconfig + doc? ( + app-doc/doxygen + dev-ruby/asciidoctor + ) + qt5? ( + dev-qt/linguist-tools:5 + ) + test? ( + dev-python/pytest + dev-python/pytest-xdist + ) +" +RDEPEND=" + ${CDEPEND} + qt5? ( virtual/freedesktop-icon-theme ) + selinux? ( sec-policy/selinux-wireshark ) +" +REQUIRED_USE=" + plugin-ifdemo? ( plugins ) +" +PATCHES=( + "${FILESDIR}"/${PN}-2.6.0-redhat.patch + "${FILESDIR}"/${PN}-99999999-ui-needs-wiretap.patch +) + +pkg_setup() { + enewgroup wireshark +} + +src_configure() { + local mycmakeargs + + # Workaround bug #213705. If krb5-config --libs has -lcrypto then pass + # --with-ssl to ./configure. (Mimics code from acinclude.m4). + if use kerberos; then + case $(krb5-config --libs) in + *-lcrypto*) + ewarn "Kerberos was built with ssl support: linkage with openssl is enabled." + ewarn "Note there are annoying license incompatibilities between the OpenSSL" + ewarn "license and the GPL, so do your check before distributing such package." + mycmakeargs+=( -DENABLE_GNUTLS=$(usex ssl) ) + ;; + esac + fi + + if use qt5; then + export QT_MIN_VERSION=5.3.0 + append-cxxflags -fPIC -DPIC + fi + + python_setup + + mycmakeargs+=( + $(use androiddump && use pcap && echo -DEXTCAP_ANDROIDDUMP_LIBPCAP=yes) + $(usex qt5 LRELEASE=$(qt5_get_bindir)/lrelease '') + $(usex qt5 MOC=$(qt5_get_bindir)/moc '') + $(usex qt5 RCC=$(qt5_get_bindir)/rcc '') + $(usex qt5 UIC=$(qt5_get_bindir)/uic '') + -DBUILD_androiddump=$(usex androiddump) + -DBUILD_capinfos=$(usex capinfos) + -DBUILD_captype=$(usex captype) + -DBUILD_ciscodump=$(usex ciscodump) + -DBUILD_dftest=$(usex dftest) + -DBUILD_dpauxmon=$(usex dpauxmon) + -DBUILD_dumpcap=$(usex dumpcap) + -DBUILD_editcap=$(usex editcap) + -DBUILD_mergecap=$(usex mergecap) + -DBUILD_mmdbresolve=$(usex maxminddb) + -DBUILD_randpkt=$(usex randpkt) + -DBUILD_randpktdump=$(usex randpktdump) + -DBUILD_reordercap=$(usex reordercap) + -DBUILD_sdjournal=$(usex sdjournal) + -DBUILD_sharkd=$(usex sharkd) + -DBUILD_sshdump=$(usex sshdump) + -DBUILD_text2pcap=$(usex text2pcap) + -DBUILD_tfshark=$(usex tfshark) + -DBUILD_tshark=$(usex tshark) + -DBUILD_udpdump=$(usex udpdump) + -DBUILD_wireshark=$(usex qt5) + -DCMAKE_INSTALL_DOCDIR="${EROOT}/usr/share/doc/${PF}" + -DDISABLE_WERROR=yes + -DENABLE_BCG729=$(usex bcg729) + -DENABLE_BROTLI=$(usex brotli) + -DENABLE_CAP=$(usex filecaps caps) + -DENABLE_GNUTLS=$(usex ssl) + -DENABLE_KERBEROS=$(usex kerberos) + -DENABLE_LIBXML2=$(usex libxml2) + -DENABLE_LUA=$(usex lua) + -DENABLE_LZ4=$(usex lz4) + -DENABLE_MINIZIP=$(usex minizip) + -DENABLE_NETLINK=$(usex netlink) + -DENABLE_NGHTTP2=$(usex http2) + -DENABLE_PCAP=$(usex pcap) + -DENABLE_PLUGINS=$(usex plugins) + -DENABLE_PLUGIN_IFDEMO=$(usex plugin-ifdemo) + -DENABLE_SBC=$(usex sbc) + -DENABLE_SMI=$(usex smi) + -DENABLE_SNAPPY=$(usex snappy) + -DENABLE_SPANDSP=$(usex spandsp) + -DENABLE_ZLIB=$(usex zlib) + ) + + cmake_src_configure +} + +src_test() { + cmake_build test-programs + + myctestargs=( --disable-capture --skip-missing-programs=all --verbose ) + cmake_src_test +} + +src_install() { + cmake_src_install + + # FAQ is not required as is installed from help/faq.txt + dodoc AUTHORS ChangeLog NEWS README* doc/randpkt.txt doc/README* + + # install headers + insinto /usr/include/wireshark + doins ws_diag_control.h ws_symbol_export.h \ + "${BUILD_DIR}"/config.h "${BUILD_DIR}"/version.h + + local dir dirs=( + epan + epan/crypt + epan/dfilter + epan/dissectors + epan/ftypes + epan/wmem + wiretap + wsutil + ) + for dir in "${dirs[@]}" + do + insinto /usr/include/wireshark/${dir} + doins ${dir}/*.h + done + + #with the above this really shouldn't be needed, but things may be looking + # in wiretap/ instead of wireshark/wiretap/ + insinto /usr/include/wiretap + doins wiretap/wtap.h + + if use qt5; then + local s + for s in 16 32 48 64 128 256 512 1024; do + insinto /usr/share/icons/hicolor/${s}x${s}/apps + newins image/wsicon${s}.png wireshark.png + done + for s in 16 24 32 48 64 128 256 ; do + insinto /usr/share/icons/hicolor/${s}x${s}/mimetypes + newins image/WiresharkDoc-${s}.png application-vnd.tcpdump.pcap.png + done + fi + + if [[ -d "${D}"/usr/share/appdata ]]; then + rm -r "${D}"/usr/share/appdata || die + fi +} + +pkg_postinst() { + xdg_desktop_database_update + xdg_icon_cache_update + xdg_mimeinfo_database_update + + # Add group for users allowed to sniff. + enewgroup wireshark + chgrp wireshark "${EROOT}"/usr/bin/dumpcap + + if use dumpcap && use pcap; then + fcaps -o 0 -g wireshark -m 4710 -M 0710 \ + cap_dac_read_search,cap_net_raw,cap_net_admin \ + "${EROOT}"/usr/bin/dumpcap + fi + + ewarn "NOTE: To capture traffic with wireshark as normal user you have to" + ewarn "add yourself to the wireshark group. This security measure ensures" + ewarn "that only trusted users are allowed to sniff your traffic." +} + +pkg_postrm() { + xdg_desktop_database_update + xdg_icon_cache_update + xdg_mimeinfo_database_update +} diff --git a/net-analyzer/xnetload/Manifest b/net-analyzer/xnetload/Manifest new file mode 100644 index 000000000000..015029559317 --- /dev/null +++ b/net-analyzer/xnetload/Manifest @@ -0,0 +1 @@ +DIST xnetload-1.11.3.tar.gz 24551 BLAKE2B f23ebc6609a2824f2b60aa045f505422df87ed21e622e4267f850f2d5954b312019d68a9738512e92f30e7f1745886743a82d3f08fcae1e1adff3acf4294ec6b SHA512 2008102c132ee96b12251b7c2475efcae7926bb16ba032f75d6be42650785fb707bed3696586369c04bb0e9434ee7854de585e7a015f1a15037a7f30c86036b7 diff --git a/net-analyzer/xnetload/metadata.xml b/net-analyzer/xnetload/metadata.xml new file mode 100644 index 000000000000..bd13a914477c --- /dev/null +++ b/net-analyzer/xnetload/metadata.xml @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<maintainer type="project"> + <email>netmon@gentoo.org</email> + <name>Gentoo network monitoring and analysis project</name> +</maintainer> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/xnetload/xnetload-1.11.3-r1.ebuild b/net-analyzer/xnetload/xnetload-1.11.3-r1.ebuild new file mode 100644 index 000000000000..d1caa9933a52 --- /dev/null +++ b/net-analyzer/xnetload/xnetload-1.11.3-r1.ebuild @@ -0,0 +1,41 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 +inherit toolchain-funcs + +DESCRIPTION="displays a count and a graph of the traffic over a specified network connection" +LICENSE="GPL-2" +HOMEPAGE="http://www.xs4all.nl/~rsmith/software/" +SRC_URI="http://www.xs4all.nl/~rsmith/software/${P}.tar.gz" + +SLOT="0" +KEYWORDS="amd64 ppc ppc64 sparc x86" + +DEPEND=" + x11-libs/libX11 + x11-libs/libXt + x11-libs/libXaw +" +RDEPEND="${DEPEND}" + +src_prepare() { + sed -i \ + -e 's:CFLAGS = -pipe -O2 -Wall:CFLAGS += -Wall:' \ + -e 's:LFLAGS = -s -pipe:LFLAGS = $(LDFLAGS):' \ + -e 's:gcc -MM:$(CC) -MM:' \ + -e 's:/usr/X11R6:/usr:g' \ + Makefile || die +} + +src_compile() { + emake CC="$(tc-getCC)" +} + +src_install() { + dobin xnetload + doman xnetload.1 + dodoc ChangeLog README + insinto /usr/share/X11/app-defaults/ + doins XNetload +} diff --git a/net-analyzer/xprobe/Manifest b/net-analyzer/xprobe/Manifest new file mode 100644 index 000000000000..ac7fe80043b4 --- /dev/null +++ b/net-analyzer/xprobe/Manifest @@ -0,0 +1 @@ +DIST xprobe2-0.3.tar.gz 533636 BLAKE2B 1f106a3c08bfc6e205731a2e8c64f7e9f2e52caba38374ab7980fcae95113b6790297a59f5d4d6ad8e09d2145b68801403472b07690ff27b42dec8c6b7d97895 SHA512 fd499ada22be5df3e01630948cb72d1a9e648e0c7bfaf2a688386a61c67bb36a326a9e2f3f2b9960a6a49128343010aafe8a3f04ec05e89420a1384215e41f21 diff --git a/net-analyzer/xprobe/files/xprobe-0.3-gcc43.patch b/net-analyzer/xprobe/files/xprobe-0.3-gcc43.patch new file mode 100644 index 000000000000..1175631b9a16 --- /dev/null +++ b/net-analyzer/xprobe/files/xprobe-0.3-gcc43.patch @@ -0,0 +1,29 @@ +--- a/libs-external/USI++/src/ip.cc ++++ b/libs-external/USI++/src/ip.cc +@@ -13,6 +13,7 @@ + #include "usi++/ip.h" + + #include "config.h" ++#include <cstdlib> + #include <iostream> + #include <string.h> + #include <errno.h> +--- a/libs-external/USI++/src/misc.cc ++++ b/libs-external/USI++/src/misc.cc +@@ -1,5 +1,6 @@ + #include "usi++/usi++" + #include "usi++/usi-structs.h" ++#include <cstdlib> + #include <string.h> + #include <unistd.h> + #include <sys/ioctl.h> +--- a/libs-external/USI++/usi++/tcp.h ++++ b/libs-external/USI++/usi++/tcp.h +@@ -15,6 +15,7 @@ + #include "usi-structs.h" + #include "datalink.h" + #include "ip.h" ++#include <cstring> + + namespace usipp { + diff --git a/net-analyzer/xprobe/metadata.xml b/net-analyzer/xprobe/metadata.xml new file mode 100644 index 000000000000..17fb95aef49c --- /dev/null +++ b/net-analyzer/xprobe/metadata.xml @@ -0,0 +1,18 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>netmon@gentoo.org</email> + <name>Gentoo network monitoring and analysis project</name> + </maintainer> + <longdescription> +Active OS fingerprinting tool. This is the new xprobe, called xprobe2, due to +xprobe1 being obsoleted. xprobe2 has a different approach to OS fingerprinting. +xprobe2 relies on fuzzy signature matching, probabilistic guesses, multiple +matches simultaneously, and a signature database. +</longdescription> + <upstream> + <remote-id type="sourceforge">xprobe</remote-id> + </upstream> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/xprobe/xprobe-0.3.ebuild b/net-analyzer/xprobe/xprobe-0.3.ebuild new file mode 100644 index 000000000000..fd60ee96cc6d --- /dev/null +++ b/net-analyzer/xprobe/xprobe-0.3.ebuild @@ -0,0 +1,30 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 +inherit eutils + +MY_P=${PN}2-${PV} + +DESCRIPTION="Active OS fingerprinting tool - this is Xprobe2" +HOMEPAGE="http://sys-security.com/blog/xprobe2" +SRC_URI="mirror://sourceforge/${PN}/${MY_P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~ppc ~sparc x86" + +DEPEND="net-libs/libpcap" +RDEPEND="${DEPEND}" + +S=${WORKDIR}/${MY_P} + +src_prepare() { + epatch "${FILESDIR}"/${P}-gcc43.patch + sed -i -e 's:strip:true:' src/Makefile.in || die +} + +src_install() { + default + dodoc AUTHORS CHANGELOG CREDITS README TODO docs/*.{txt,pdf} +} diff --git a/net-analyzer/yersinia/Manifest b/net-analyzer/yersinia/Manifest new file mode 100644 index 000000000000..3795e6db1ced --- /dev/null +++ b/net-analyzer/yersinia/Manifest @@ -0,0 +1,2 @@ +DIST yersinia-0.7.3.tar.gz 378124 BLAKE2B 032015045cd5683c8853504bd821ebb3decbeaeea933a14983eec6498de33db79771ddeb08934c6ddf82db620aba89c84ac8c369af25e7bc19d820395ba68b57 SHA512 60a1b58e6d76448e9332656645b468a6aa66afa0f45ea4b70a929651194a294b9b559bbe5fbacaeb475126e7ac248cd97c29f3177e5080286b2f551f1400d339 +DIST yersinia-0.8.2.tar.gz 387889 BLAKE2B 67fe92b9cd1253874c61fa38c8e89e023f7d0ec3b83fe3001b5bc203d4033e36cb94b453ed56426b34d942036a143bd135f247466425337478f292797a433652 SHA512 2c7c89f19b6791150c472a6066b6ffaf9ac5b3d1a3d2e6a27f91293bba9a0f72d147266731e5e2670e4bf7e67ccf04b6e353071ca42d3d281b25126c9bfcb1dd diff --git a/net-analyzer/yersinia/files/yersinia-0.7.1-no-ncurses.patch b/net-analyzer/yersinia/files/yersinia-0.7.1-no-ncurses.patch new file mode 100644 index 000000000000..96036dd629e9 --- /dev/null +++ b/net-analyzer/yersinia/files/yersinia-0.7.1-no-ncurses.patch @@ -0,0 +1,13 @@ +--- a/src/terminal.c ++++ b/src/terminal.c +@@ -190,7 +190,9 @@ + #endif + + pthread_mutex_destroy(&terms->admin_listen_th.finished); ++#ifdef HAS_CURSES + pthread_mutex_destroy(&terms->gui_th.finished); ++#endif + pthread_mutex_destroy(&terms->pcap_listen_th.finished); + pthread_mutex_destroy(&terms->uptime_th.finished); + + diff --git a/net-analyzer/yersinia/files/yersinia-0.7.3-tinfo.patch b/net-analyzer/yersinia/files/yersinia-0.7.3-tinfo.patch new file mode 100644 index 000000000000..8a58d01d33c6 --- /dev/null +++ b/net-analyzer/yersinia/files/yersinia-0.7.3-tinfo.patch @@ -0,0 +1,27 @@ +--- a/configure.in ++++ b/configure.in +@@ -467,6 +467,7 @@ + AC_DEFINE(HAVE_REMOTE_ADMIN) + fi + ++PKG_CHECK_MODULES(ncurses,ncurses) + + dnl Curses detection: Munged from Midnight Commander's configure.in + dnl +@@ -616,6 +617,16 @@ + AC_DEFINE(USE_NCURSES) + AC_DEFINE(HAS_CURSES) + has_curses=true ++ else ++ if test "$ncurses_LIBS" ; then ++ CURSES_LIBS="$ncurses_LIBS" ++ CURSES_INCLUDEDIR="$ncurses_CFLAGS" ++ search_ncurses=false ++ screen_manager="ncurses" ++ AC_DEFINE(USE_NCURSES) ++ AC_DEFINE(HAS_CURSES) ++ has_curses=true ++ fi + fi + ) + diff --git a/net-analyzer/yersinia/files/yersinia-9999-tinfo.patch b/net-analyzer/yersinia/files/yersinia-9999-tinfo.patch new file mode 100644 index 000000000000..b5bf566c107d --- /dev/null +++ b/net-analyzer/yersinia/files/yersinia-9999-tinfo.patch @@ -0,0 +1,27 @@ +--- a/configure.ac ++++ b/configure.ac +@@ -467,6 +467,7 @@ + AC_DEFINE(HAVE_REMOTE_ADMIN) + fi + ++PKG_CHECK_MODULES(ncurses,ncurses) + + dnl Curses detection: Munged from Midnight Commander's configure.in + dnl +@@ -616,6 +617,16 @@ + AC_DEFINE(USE_NCURSES) + AC_DEFINE(HAS_CURSES) + has_curses=true ++ else ++ if test "$ncurses_LIBS" ; then ++ CURSES_LIBS="$ncurses_LIBS" ++ CURSES_INCLUDEDIR="$ncurses_CFLAGS" ++ search_ncurses=false ++ screen_manager="ncurses" ++ AC_DEFINE(USE_NCURSES) ++ AC_DEFINE(HAS_CURSES) ++ has_curses=true ++ fi + fi + ) + diff --git a/net-analyzer/yersinia/metadata.xml b/net-analyzer/yersinia/metadata.xml new file mode 100644 index 000000000000..5b03147e00d1 --- /dev/null +++ b/net-analyzer/yersinia/metadata.xml @@ -0,0 +1,14 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<maintainer type="project"> + <email>netmon@gentoo.org</email> + <name>Gentoo network monitoring and analysis project</name> +</maintainer> +<longdescription> +Yersinia is a network tool designed to take advantage of some weakeness +in different network protocols. It intends to be a solid framework for +analyzing and testing the deployed networks and systems. +</longdescription> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/yersinia/yersinia-0.7.3.ebuild b/net-analyzer/yersinia/yersinia-0.7.3.ebuild new file mode 100644 index 000000000000..bc346d8cf0d3 --- /dev/null +++ b/net-analyzer/yersinia/yersinia-0.7.3.ebuild @@ -0,0 +1,53 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 +inherit autotools eutils + +DESCRIPTION="A layer 2 attack framework" +HOMEPAGE="http://www.yersinia.net/" +SRC_URI="http://www.yersinia.net/download/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="amd64 x86" +IUSE="gtk ncurses" + +RDEPEND=" + ncurses? ( >=sys-libs/ncurses-5.5 ) + gtk? ( =x11-libs/gtk+-2* ) + >=net-libs/libnet-1.1.2 + >=net-libs/libpcap-0.9.4 +" +DEPEND=" + virtual/pkgconfig + ${RDEPEND} +" + +DOCS=( AUTHORS ChangeLog FAQ README THANKS TODO ) + +S="${WORKDIR}" + +src_prepare() { + epatch "${FILESDIR}"/${PN}-0.7.1-no-ncurses.patch + epatch "${FILESDIR}"/${PN}-0.7.3-tinfo.patch + + if ! use gtk; then + #bug #514802 + sed -i -e '/AM_GLIB_GNU_GETTEXT/d' configure.in || die + fi + + eautoreconf +} + +src_configure() { + econf \ + --enable-admin \ + --with-pcap-includes=/usr/include \ + $(use_with ncurses) \ + $(use_enable gtk) +} + +src_compile() { + emake CFLAGS="${CFLAGS}" +} diff --git a/net-analyzer/yersinia/yersinia-0.8.2.ebuild b/net-analyzer/yersinia/yersinia-0.8.2.ebuild new file mode 100644 index 000000000000..669aa0df2290 --- /dev/null +++ b/net-analyzer/yersinia/yersinia-0.8.2.ebuild @@ -0,0 +1,59 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 +inherit autotools flag-o-matic + +DESCRIPTION="A framework for layer 2 attacks" +HOMEPAGE="http://www.yersinia.net/" +SRC_URI="https://github.com/tomac/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="gtk ncurses" + +RDEPEND=" + ncurses? ( >=sys-libs/ncurses-5.5:= ) + gtk? ( + dev-libs/glib:2 + x11-libs/gdk-pixbuf + =x11-libs/gtk+-2* + ) + >=net-libs/libnet-1.1.2 + >=net-libs/libpcap-0.9.4 +" +DEPEND=" + virtual/pkgconfig + ${RDEPEND} +" +DOCS=( AUTHORS ChangeLog FAQ README THANKS TODO ) +PATCHES=( + "${FILESDIR}"/${PN}-0.7.1-no-ncurses.patch + "${FILESDIR}"/${PN}-0.7.3-tinfo.patch +) + +src_prepare() { + default + + if ! use gtk; then + #bug #514802 + sed -i -e '/AM_GLIB_GNU_GETTEXT/d' configure.in || die + fi + + eautoreconf +} + +src_configure() { + append-cflags -fcommon + + econf \ + --enable-admin \ + --with-pcap-includes=/usr/include \ + $(use_with ncurses) \ + $(use_enable gtk) +} + +src_compile() { + emake CFLAGS="${CFLAGS}" +} diff --git a/net-analyzer/yersinia/yersinia-9999.ebuild b/net-analyzer/yersinia/yersinia-9999.ebuild new file mode 100644 index 000000000000..f2825d6f6f13 --- /dev/null +++ b/net-analyzer/yersinia/yersinia-9999.ebuild @@ -0,0 +1,59 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +inherit autotools flag-o-matic git-r3 + +DESCRIPTION="A framework for layer 2 attacks" +HOMEPAGE="https://github.com/tomac/yersinia" +EGIT_REPO_URI="https://github.com/tomac/yersinia" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="" +IUSE="gtk ncurses" + +RDEPEND=" + ncurses? ( >=sys-libs/ncurses-5.5:= ) + gtk? ( + dev-libs/glib:2 + x11-libs/gdk-pixbuf + =x11-libs/gtk+-2* + ) + >=net-libs/libnet-1.1.2 + >=net-libs/libpcap-0.9.4 +" +DEPEND=" + virtual/pkgconfig + ${RDEPEND} +" +DOCS=( AUTHORS ChangeLog FAQ README THANKS TODO ) +PATCHES=( + "${FILESDIR}"/${PN}-0.7.1-no-ncurses.patch + "${FILESDIR}"/${PN}-9999-tinfo.patch +) + +src_prepare() { + default + + if ! use gtk; then + #bug #514802 + sed -i -e '/AM_GLIB_GNU_GETTEXT/d' configure.in || die + fi + + eautoreconf +} + +src_configure() { + append-cflags -fcommon + + econf \ + --enable-admin \ + --with-pcap-includes=/usr/include \ + $(use_with ncurses) \ + $(use_enable gtk) +} + +src_compile() { + emake CFLAGS="${CFLAGS}" +} diff --git a/net-analyzer/zabbix/Manifest b/net-analyzer/zabbix/Manifest new file mode 100644 index 000000000000..9909011d7cae --- /dev/null +++ b/net-analyzer/zabbix/Manifest @@ -0,0 +1,7 @@ +DIST zabbix-3.0.31.tar.gz 14698394 BLAKE2B b8b5f94fe7fe08385b1b358c628b2047b437e6068dab8c3dbdab03e55e95e27f1b77ede4a1a57c4f79bf4a629d9dc5671bd144c002ace7c915f2fed382ac13b2 SHA512 35fec45667cdf217c2be21a164181f92f8f11ef9bcfb0c8dad914726e7c436bae5f8a97aebc3af82499e37125f4d1896ef74ad061a1ee3cbb674562c22a832b1 +DIST zabbix-4.0.20.tar.gz 17215217 BLAKE2B 144b334e78b121d0ba01b285590a6d354ed54be8dcebc12216b51f9829dba98c76d122bb329efbf67931237636fe178ecf5dfd141954fe37d1063c24c3c6dcda SHA512 5f761ba8bd3eac67de9f8d3614ebf437a6a4cdad8f0bf961c8b4cbe39f13bafe64bdb58b6ba56f1a27304ebdaa32109447bd3328fd3e2fcc1aacde056fb1d5dd +DIST zabbix-4.0.21.tar.gz 17300931 BLAKE2B c4063b4f8f58191837e48c1cf27be1cc0c2e020813724b236490e8f73c73404d55c34247cb145bd4fbad3537398a4a061e2de350c8f81f1c2ea5d1ff2cc9edeb SHA512 d5eac5474dcad005466200868fa4fab86abdd41eb9cf49bf6e7f52ae1e9fab82757d5a96f373154edd275bfa22461a8f7f2bbf70b419b2918e8dcf872818aa76 +DIST zabbix-4.4.8.tar.gz 19457802 BLAKE2B 4cc566b744d500c5f3a95eeaebe5418ff58cf3852318f474991706b0f81d1a9b0a1b3793e3e28b99fc45f4a6bfb9281c4d42acb5bb8fc49c37802d3c245dd853 SHA512 bd850d4ec8f30b9bcd531d84606c900692be5b91424cb06f66cde24ed4634a93d25476010e4387b51933406c2552a611e2e7ec4691b57ca6c38fc874c4b1aef1 +DIST zabbix-4.4.9.tar.gz 19562839 BLAKE2B 04737c2b49eb1091359336339f2d2ad43c7d2df2aa6995f56fa91864beea95081f1b7981eff9aba2b9e75fc8208bdabeb57cc947c37a334ccd7dd6d91b908e3b SHA512 41ad54a57c7b4bfe467bb0dca16dabc609427b723aa0cbc988575f828fe8edcfbebda0a201a944f37e028afd9002da48bb6e32806dd215df9716e797926dea01 +DIST zabbix-5.0.0.tar.gz 18519888 BLAKE2B 028fc41d4ce250c558130a631aaf385b0a944885a820f63aa3052738f767092ce71dfd65e52750dd61276b6171caa739eee5a5dea0002828a12035cc51a6f2d7 SHA512 056aee99d19def2f673813e29bb7869fa7906abe6956fddbeac359195167abe06add21ef08baf68a5ad6e256323a797e604cdd7828f34be2762daf7b31923984 +DIST zabbix-5.0.1.tar.gz 18623104 BLAKE2B 3f2afcbf22f306e007ee1550de2bbd4c31b481b892bf490b21de22de96f66a568e0eaefe187400d1850f66bd10e622bd90e821974e61c3d750d86b8a6f2e5601 SHA512 66d16d6c8e0bac235b23bab9d6f5f5c29d96b508fd4834c16f82b7ca33591e36e44cd982e918c1c4736331d3f8c93535616c64be5596724842b1af5621508490 diff --git a/net-analyzer/zabbix/files/zabbix-3.0.30-mysql8.patch b/net-analyzer/zabbix/files/zabbix-3.0.30-mysql8.patch new file mode 100644 index 000000000000..7c3694a776ee --- /dev/null +++ b/net-analyzer/zabbix/files/zabbix-3.0.30-mysql8.patch @@ -0,0 +1,17 @@ +diff --git a/src/libs/zbxdb/db.c b/src/libs/zbxdb/db.c +index a65b9c4..e011c51 100644 +--- a/src/libs/zbxdb/db.c ++++ b/src/libs/zbxdb/db.c +@@ -285,7 +285,11 @@ int zbx_db_connect(char *host, char *user, char *password, char *dbname, char *d + #if defined(HAVE_IBM_DB2) + char *connect = NULL; + #elif defined(HAVE_MYSQL) +- my_bool mysql_reconnect = 1; ++#if LIBMYSQL_VERSION_ID >= 80000 /* my_bool type is removed in MySQL 8.0 */ ++ bool mysql_reconnect = 1; ++#else ++ my_bool mysql_reconnect = 1; ++#endif + #elif defined(HAVE_ORACLE) + char *connect = NULL; + sword err = OCI_SUCCESS; diff --git a/net-analyzer/zabbix/files/zabbix-3.0.30-security-disable-PidFile.patch b/net-analyzer/zabbix/files/zabbix-3.0.30-security-disable-PidFile.patch new file mode 100644 index 000000000000..e0fd74de51c7 --- /dev/null +++ b/net-analyzer/zabbix/files/zabbix-3.0.30-security-disable-PidFile.patch @@ -0,0 +1,49 @@ +diff --git a/conf/zabbix_agentd.conf b/conf/zabbix_agentd.conf +index b73bd45..c10daca 100644 +--- a/conf/zabbix_agentd.conf ++++ b/conf/zabbix_agentd.conf +@@ -5,6 +5,7 @@ + + ### Option: PidFile + # Name of PID file. ++# THIS PARAMETER IS IGNORED IN GENTOO FOR SECURITY REASONS (https://bugs.gentoo.org/629884) + # + # Mandatory: no + # Default: +diff --git a/conf/zabbix_proxy.conf b/conf/zabbix_proxy.conf +index 082f14e..de0284d 100644 +--- a/conf/zabbix_proxy.conf ++++ b/conf/zabbix_proxy.conf +@@ -109,6 +109,7 @@ LogFile=/tmp/zabbix_proxy.log + + ### Option: PidFile + # Name of PID file. ++# THIS PARAMETER IS IGNORED IN GENTOO FOR SECURITY REASONS (https://bugs.gentoo.org/629884) + # + # Mandatory: no + # Default: +diff --git a/conf/zabbix_server.conf b/conf/zabbix_server.conf +index 9f754ca..3999196 100644 +--- a/conf/zabbix_server.conf ++++ b/conf/zabbix_server.conf +@@ -62,6 +62,7 @@ LogFile=/tmp/zabbix_server.log + + ### Option: PidFile + # Name of PID file. ++# THIS PARAMETER IS IGNORED IN GENTOO FOR SECURITY REASONS (https://bugs.gentoo.org/629884) + # + # Mandatory: no + # Default: +diff --git a/src/libs/zbxnix/pid.c b/src/libs/zbxnix/pid.c +index baa8415..04c7e0c 100644 +--- a/src/libs/zbxnix/pid.c ++++ b/src/libs/zbxnix/pid.c +@@ -26,6 +26,8 @@ static int fdpid = -1; + + int create_pid_file(const char *pidfile) + { ++ return SUCCEED; ++ + int fd; + zbx_stat_t buf; + struct flock fl; diff --git a/net-analyzer/zabbix/files/zabbix-4.0.18-modulepathfix.patch b/net-analyzer/zabbix/files/zabbix-4.0.18-modulepathfix.patch new file mode 100644 index 000000000000..c0d1650fb85c --- /dev/null +++ b/net-analyzer/zabbix/files/zabbix-4.0.18-modulepathfix.patch @@ -0,0 +1,11 @@ +--- zabbix-4.0.1/configure 2018-10-29 10:36:05.000000000 -0700 ++++ zfx/configure 2018-11-07 16:59:28.015968345 -0800 +@@ -12510,7 +12510,7 @@ + CURL_SSL_CERT_LOCATION="${datadir}/zabbix/ssl/certs" + CURL_SSL_KEY_LOCATION="${datadir}/zabbix/ssl/keys" + +-LOAD_MODULE_PATH="${libdir}/modules" ++LOAD_MODULE_PATH="${libdir}/zabbix" + + + diff --git a/net-analyzer/zabbix/files/zabbix-agentd.init b/net-analyzer/zabbix/files/zabbix-agentd.init new file mode 100644 index 000000000000..e2433ff8f6e9 --- /dev/null +++ b/net-analyzer/zabbix/files/zabbix-agentd.init @@ -0,0 +1,20 @@ +#!/sbin/openrc-run +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +command="/usr/sbin/zabbix_agentd" +command_args="--foreground --config /etc/zabbix/zabbix_agentd.conf" +command_background="true" +command_user="zabbix:zabbix" +pidfile="/run/${RC_SVCNAME}.pid" + +depend() { + need net + provide zabbix-agent + use zabbix-server +} + +start_pre() { + checkpath -q -d -m 0750 -o root:zabbix /etc/zabbix + checkpath -q -f -m 0640 -o root:zabbix /etc/zabbix/*.conf +} diff --git a/net-analyzer/zabbix/files/zabbix-agentd.service b/net-analyzer/zabbix/files/zabbix-agentd.service new file mode 100644 index 000000000000..dc13089e0cf5 --- /dev/null +++ b/net-analyzer/zabbix/files/zabbix-agentd.service @@ -0,0 +1,12 @@ +[Unit] +Description=Zabbix agent +Documentation=https://zabbix.com/manuals +After=network.target network-online.target + +[Service] +User=zabbix +Group=zabbix +ExecStart=/usr/sbin/zabbix_agentd --foreground --config /etc/zabbix/zabbix_agentd.conf + +[Install] +WantedBy=multi-user.target diff --git a/net-analyzer/zabbix/files/zabbix-agentd.tmpfiles b/net-analyzer/zabbix/files/zabbix-agentd.tmpfiles new file mode 100644 index 000000000000..56471bb42c0a --- /dev/null +++ b/net-analyzer/zabbix/files/zabbix-agentd.tmpfiles @@ -0,0 +1 @@ +d /run/zabbix 0755 zabbix zabbix - diff --git a/net-analyzer/zabbix/files/zabbix-jmx-proxy.conf b/net-analyzer/zabbix/files/zabbix-jmx-proxy.conf new file mode 100644 index 000000000000..6aa3cf96f84d --- /dev/null +++ b/net-analyzer/zabbix/files/zabbix-jmx-proxy.conf @@ -0,0 +1,12 @@ +# Configuration variables for the zabbix jmx proxy + + +# LISTEN_IP="0.0.0.0" +# LISTEN_PORT=10052 +# START_POLLERS=5 +# TIMEOUT=3 + +# uncomment to enable remote monitoring of the standard JMX objects on the Zabbix Java Gateway itself +# JAVA_OPTIONS="$JAVA_OPTIONS -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=12345 +# -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false" + diff --git a/net-analyzer/zabbix/files/zabbix-jmx-proxy.init b/net-analyzer/zabbix/files/zabbix-jmx-proxy.init new file mode 100644 index 000000000000..5722814173e8 --- /dev/null +++ b/net-analyzer/zabbix/files/zabbix-jmx-proxy.init @@ -0,0 +1,33 @@ +#!/sbin/openrc-run + +LISTEN_IP=${LISTEN_IP:-127.0.0.1} +LISTEN_PORT=${LISTEN_PORT:-10052} +START_POLLERS=${START_POLLERS:-5} +TIMEOUT=${TIMEOUT:-3} + +PID_FILE="/run/zabbix-jmx-proxy" + + +start() { + ZABBIX_OPTIONS="-Dzabbix.pidFile=$PID_FILE \ + -Dzabbix.listenIP=$LISTEN_IP \ + -Dzabbix.listenPort=$LISTEN_PORT \ + -Dzabbix.startPollers=$START_POLLERS \ + -Dzabbix.timeout=$TIMEOUT \ + -Dsun.rmi.transport.tcp.responseTimeout=${TIMEOUT}000" + + JAVA_OPTIONS="-server $JAVA_OPTIONS -Dlogback.configurationFile=logback-console.xml" + + cd /opt/zabbix_java + + CLASSPATH="lib" + for jar in lib/*.jar bin/*.jar; do + CLASSPATH="$CLASSPATH:$jar" + done + + start-stop-daemon -m --background --pidfile $PID_FILE -- java $JAVA_OPTIONS -classpath $CLASSPATH $ZABBIX_OPTIONS com.zabbix.gateway.JavaGateway +} + +stop() { + start-stop-daemon --stop --pidfile $PID_FILE +} diff --git a/net-analyzer/zabbix/files/zabbix-proxy.init b/net-analyzer/zabbix/files/zabbix-proxy.init new file mode 100644 index 000000000000..8347b481fffb --- /dev/null +++ b/net-analyzer/zabbix/files/zabbix-proxy.init @@ -0,0 +1,20 @@ +#!/sbin/openrc-run +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +command="/usr/sbin/zabbix_proxy" +command_args="--foreground --config /etc/zabbix/zabbix_proxy.conf" +command_background="true" +command_user="zabbix:zabbix" +pidfile="/run/${RC_SVCNAME}.pid" + +depend() { + need net + provide zabbix-proxy +} + +start_pre() { + checkpath -q -d -m 0750 -o root:zabbix /etc/zabbix + checkpath -q -f -m 0640 -o root:zabbix /etc/zabbix/*.conf +} + diff --git a/net-analyzer/zabbix/files/zabbix-proxy.service b/net-analyzer/zabbix/files/zabbix-proxy.service new file mode 100644 index 000000000000..78b07be05062 --- /dev/null +++ b/net-analyzer/zabbix/files/zabbix-proxy.service @@ -0,0 +1,12 @@ +[Unit] +Description=Zabbix proxy +Documentation=https://zabbix.com/manuals +After=network.target network-online.target + +[Service] +User=zabbix +Group=zabbix +ExecStart=/usr/sbin/zabbix_proxy --foreground --config /etc/zabbix/zabbix_proxy.conf + +[Install] +WantedBy=multi-user.target diff --git a/net-analyzer/zabbix/files/zabbix-proxy.tmpfiles b/net-analyzer/zabbix/files/zabbix-proxy.tmpfiles new file mode 100644 index 000000000000..56471bb42c0a --- /dev/null +++ b/net-analyzer/zabbix/files/zabbix-proxy.tmpfiles @@ -0,0 +1 @@ +d /run/zabbix 0755 zabbix zabbix - diff --git a/net-analyzer/zabbix/files/zabbix-server.init b/net-analyzer/zabbix/files/zabbix-server.init new file mode 100644 index 000000000000..b0bf752abaf7 --- /dev/null +++ b/net-analyzer/zabbix/files/zabbix-server.init @@ -0,0 +1,19 @@ +#!/sbin/openrc-run +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +command="/usr/sbin/zabbix_server" +command_args="--foreground --config /etc/zabbix/zabbix_server.conf" +command_background="true" +command_user="zabbix:zabbix" +pidfile="/run/${RC_SVCNAME}.pid" + +depend() { + need net + use mysql postgresql +} + +start_pre() { + checkpath -q -d -m 0750 -o root:zabbix /etc/zabbix + checkpath -q -f -m 0640 -o root:zabbix /etc/zabbix/*.conf +} diff --git a/net-analyzer/zabbix/files/zabbix-server.service b/net-analyzer/zabbix/files/zabbix-server.service new file mode 100644 index 000000000000..a7bdc0d1e06d --- /dev/null +++ b/net-analyzer/zabbix/files/zabbix-server.service @@ -0,0 +1,15 @@ +[Unit] +Description=Zabbix server +Documentation=https://zabbix.com/manuals +After=syslog.target syslog.service network.target network-online.target postgresql.service +After=postgresql-9.6.service postgresql-10.service +After=postgresql-11.service postgresql-12.service + + +[Service] +User=zabbix +Group=zabbix +ExecStart=/usr/sbin/zabbix_server --foreground --config /etc/zabbix/zabbix_server.conf + +[Install] +WantedBy=multi-user.target diff --git a/net-analyzer/zabbix/files/zabbix-server.tmpfiles b/net-analyzer/zabbix/files/zabbix-server.tmpfiles new file mode 100644 index 000000000000..56471bb42c0a --- /dev/null +++ b/net-analyzer/zabbix/files/zabbix-server.tmpfiles @@ -0,0 +1 @@ +d /run/zabbix 0755 zabbix zabbix - diff --git a/net-analyzer/zabbix/metadata.xml b/net-analyzer/zabbix/metadata.xml new file mode 100644 index 000000000000..cb9bc5ba4425 --- /dev/null +++ b/net-analyzer/zabbix/metadata.xml @@ -0,0 +1,36 @@ +<?xml version='1.0' encoding='UTF-8'?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>fordfrog@gentoo.org</email> + <name>Miroslav Šulc</name> + </maintainer> + <maintainer type="person"> + <email>patrick@gentoo.org</email> + <name>Patrick Lauer</name> + </maintainer> + <maintainer type="person"> + <email>alicef@gentoo.org</email> + <name>Alice Ferrazzi</name> + </maintainer> + <longdescription> +ZABBIX is software for monitoring of your applications, network and servers. +ZABBIX supports both polling and trapping techniques to collect data from +monitored hosts. A flexible notification mechanism allows easy and quickly +configure different types of notifications for pre-defined events. + </longdescription> + <use> + <flag name="agent">Enable zabbix agent (for to-be-monitored machines)</flag> + <flag name="frontend">Enable zabbix web frontend</flag> + <flag name="ipv6">Turn on support of IPv6</flag> + <flag name="proxy">Enable proxy support</flag> + <flag name="openipmi">Enable openipmi things</flag> + <flag name="server">Enable zabbix server</flag> + <flag name="ssh">SSH v2 based checks</flag> + <flag name="odbc">Enable Database Monitor and use UnixODBC Library by default</flag> + <flag name="static">Build statically linked binaries</flag> + <flag name="java">Enable Zabbix Java JMX Management Gateway</flag> + <flag name="libxml2">Use libxml2 client library</flag> + </use> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/zabbix/zabbix-3.0.31.ebuild b/net-analyzer/zabbix/zabbix-3.0.31.ebuild new file mode 100644 index 000000000000..ca1bbd3d9498 --- /dev/null +++ b/net-analyzer/zabbix/zabbix-3.0.31.ebuild @@ -0,0 +1,350 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +# needed to make webapp-config dep optional +WEBAPP_OPTIONAL="yes" +inherit flag-o-matic webapp java-pkg-opt-2 user systemd toolchain-funcs + +DESCRIPTION="ZABBIX is software for monitoring of your applications, network and servers" +HOMEPAGE="https://www.zabbix.com/" +MY_P=${P/_/} +MY_PV=${PV/_/} +SRC_URI="https://cdn.zabbix.com/stable/${PV}/${P}.tar.gz" +LICENSE="GPL-2" +SLOT="0" +WEBAPP_MANUAL_SLOT="yes" +KEYWORDS="amd64 x86" +IUSE="+agent java curl frontend ipv6 xmpp ldap libxml2 mysql openipmi oracle +postgres proxy server ssh ssl snmp sqlite odbc static" +REQUIRED_USE="|| ( agent frontend proxy server ) + proxy? ( ^^ ( mysql oracle postgres sqlite odbc ) ) + server? ( ^^ ( mysql oracle postgres odbc ) ) + static? ( !oracle !snmp )" + +COMMON_DEPEND=" + curl? ( net-misc/curl ) + java? ( >=virtual/jdk-1.8:* ) + ldap? ( + =dev-libs/cyrus-sasl-2* + net-libs/gnutls + net-nds/openldap + ) + libxml2? ( dev-libs/libxml2 ) + mysql? ( dev-db/mysql-connector-c ) + odbc? ( dev-db/unixODBC ) + openipmi? ( sys-libs/openipmi ) + oracle? ( dev-db/oracle-instantclient-basic ) + postgres? ( dev-db/postgresql:* ) + proxy? ( sys-libs/zlib ) + server? ( + dev-libs/libevent + sys-libs/zlib + ) + snmp? ( net-analyzer/net-snmp ) + sqlite? ( dev-db/sqlite ) + ssh? ( net-libs/libssh2 ) + ssl? ( dev-libs/openssl:=[-bindist] ) + xmpp? ( dev-libs/iksemel ) +" + +RDEPEND="${COMMON_DEPEND} + java? ( >=virtual/jre-1.8:* ) + mysql? ( virtual/mysql ) + proxy? ( net-analyzer/fping[suid] ) + server? ( + app-admin/webapp-config + dev-libs/libevent + dev-libs/libpcre + net-analyzer/fping[suid] + ) + frontend? ( + app-admin/webapp-config + dev-lang/php:*[bcmath,ctype,sockets,gd,truetype,xml,session,xmlreader,xmlwriter,nls,sysvipc,unicode] + media-libs/gd[png] + virtual/httpd-php:* + mysql? ( dev-lang/php[mysqli] ) + odbc? ( dev-lang/php[odbc] ) + oracle? ( dev-lang/php[oci8-instant-client] ) + postgres? ( dev-lang/php[postgres] ) + sqlite? ( dev-lang/php[sqlite] ) + ) +" +DEPEND="${COMMON_DEPEND} + static? ( + curl? ( net-misc/curl[static-libs] ) + ldap? ( + =dev-libs/cyrus-sasl-2*[static-libs] + net-libs/gnutls[static-libs] + net-nds/openldap[static-libs] + ) + libxml2? ( dev-libs/libxml2[static-libs] ) + mysql? ( dev-db/mysql-connector-c[static-libs] ) + odbc? ( dev-db/unixODBC[static-libs] ) + postgres? ( dev-db/postgresql:*[static-libs] ) + sqlite? ( dev-db/sqlite[static-libs] ) + ssh? ( net-libs/libssh2 ) + ) +" +BDEPEND=" + virtual/pkgconfig +" + +PATCHES=( + "${FILESDIR}/${PN}-3.0.30-security-disable-PidFile.patch" + "${FILESDIR}/${PN}-3.0.30-mysql8.patch" +) + +S=${WORKDIR}/${MY_P} + +ZABBIXJAVA_BASE="opt/zabbix_java" + +pkg_setup() { + if use oracle; then + if [ -z "${ORACLE_HOME}" ]; then + eerror + eerror "The environment variable ORACLE_HOME must be set" + eerror "and point to the correct location." + eerror "It looks like you don't have Oracle installed." + eerror + die "Environment variable ORACLE_HOME is not set" + fi + if has_version 'dev-db/oracle-instantclient-basic'; then + ewarn + ewarn "Please ensure you have a full install of the Oracle client." + ewarn "dev-db/oracle-instantclient* is NOT sufficient." + ewarn + fi + fi + + if use frontend; then + webapp_pkg_setup + fi + + enewgroup zabbix + enewuser zabbix -1 -1 /var/lib/zabbix/home zabbix + + java-pkg-opt-2_pkg_setup +} + +src_prepare() { + default +} + +src_configure() { + econf \ + $(use_enable agent) \ + $(use_enable ipv6) \ + $(use_enable java) \ + $(use_enable proxy) \ + $(use_enable server) \ + $(use_enable static) \ + $(use_with curl libcurl) \ + $(use_with ldap) \ + $(use_with libxml2) \ + $(use_with mysql) \ + $(use_with odbc unixodbc) \ + $(use_with openipmi openipmi) \ + $(use_with oracle) \ + $(use_with postgres postgresql) \ + $(use_with snmp net-snmp) \ + $(use_with sqlite sqlite3) \ + $(use_with ssh ssh2) \ + $(use_with ssl openssl) \ + $(use_with xmpp jabber) +} + +src_compile() { + if [ -f Makefile ] || [ -f GNUmakefile ] || [ -f makefile ]; then + emake AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" + fi +} + +src_install() { + local dirs=( + /etc/zabbix + /var/lib/zabbix + /var/lib/zabbix/home + /var/lib/zabbix/scripts + /var/lib/zabbix/alertscripts + /var/lib/zabbix/externalscripts + /var/log/zabbix + ) + + for dir in "${dirs[@]}"; do + dodir "${dir}" + keepdir "${dir}" + done + + if use server; then + insinto /etc/zabbix + doins "${S}"/conf/zabbix_server.conf + fperms 0640 /etc/zabbix/zabbix_server.conf + fowners root:zabbix /etc/zabbix/zabbix_server.conf + + newinitd "${FILESDIR}"/zabbix-server.init zabbix-server + + dosbin src/zabbix_server/zabbix_server + + insinto /usr/share/zabbix + doins -r "${S}"/database/ + + systemd_dounit "${FILESDIR}"/zabbix-server.service + systemd_newtmpfilesd "${FILESDIR}"/zabbix-server.tmpfiles zabbix-server.conf + fi + + if use proxy; then + insinto /etc/zabbix + doins "${S}"/conf/zabbix_proxy.conf + fperms 0640 /etc/zabbix/zabbix_proxy.conf + fowners root:zabbix /etc/zabbix/zabbix_proxy.conf + + newinitd "${FILESDIR}"/zabbix-proxy.init zabbix-proxy + + dosbin src/zabbix_proxy/zabbix_proxy + + insinto /usr/share/zabbix + doins -r "${S}"/database/ + + systemd_dounit "${FILESDIR}"/zabbix-proxy.service + systemd_newtmpfilesd "${FILESDIR}"/zabbix-proxy.tmpfiles zabbix-proxy.conf + fi + + if use agent; then + insinto /etc/zabbix + doins "${S}"/conf/zabbix_agentd.conf + fperms 0640 /etc/zabbix/zabbix_agentd.conf + fowners root:zabbix /etc/zabbix/zabbix_agentd.conf + + newinitd "${FILESDIR}"/zabbix-agentd.init zabbix-agentd + + dosbin src/zabbix_agent/zabbix_agentd + dobin \ + src/zabbix_sender/zabbix_sender \ + src/zabbix_get/zabbix_get + + systemd_dounit "${FILESDIR}"/zabbix-agentd.service + systemd_newtmpfilesd "${FILESDIR}"/zabbix-agentd.tmpfiles zabbix-agentd.conf + fi + + fowners root:zabbix /etc/zabbix + fowners zabbix:zabbix \ + /var/lib/zabbix \ + /var/lib/zabbix/home \ + /var/lib/zabbix/scripts \ + /var/lib/zabbix/alertscripts \ + /var/lib/zabbix/externalscripts \ + /var/log/zabbix + fperms 0750 \ + /etc/zabbix \ + /var/lib/zabbix \ + /var/lib/zabbix/home \ + /var/lib/zabbix/scripts \ + /var/lib/zabbix/alertscripts \ + /var/lib/zabbix/externalscripts \ + /var/log/zabbix + + dodoc README INSTALL NEWS ChangeLog \ + conf/zabbix_agentd.conf \ + conf/zabbix_proxy.conf \ + conf/zabbix_agentd/userparameter_examples.conf \ + conf/zabbix_agentd/userparameter_mysql.conf \ + conf/zabbix_server.conf + + if use frontend; then + webapp_src_preinst + cp -R frontends/php/* "${D}/${MY_HTDOCSDIR}" + webapp_configfile \ + "${MY_HTDOCSDIR}"/include/db.inc.php \ + "${MY_HTDOCSDIR}"/include/config.inc.php + webapp_src_install + fi + + if use java; then + dodir \ + /${ZABBIXJAVA_BASE} \ + /${ZABBIXJAVA_BASE}/bin \ + /${ZABBIXJAVA_BASE}/lib + keepdir /${ZABBIXJAVA_BASE} + exeinto /${ZABBIXJAVA_BASE}/bin + doexe src/zabbix_java/bin/zabbix-java-gateway-${MY_PV}.jar + exeinto /${ZABBIXJAVA_BASE}/lib + doexe \ + src/zabbix_java/lib/logback-classic-0.9.27.jar \ + src/zabbix_java/lib/logback-console.xml \ + src/zabbix_java/lib/logback-core-0.9.27.jar \ + src/zabbix_java/lib/logback.xml \ + src/zabbix_java/lib/android-json-4.3_r3.1.jar \ + src/zabbix_java/lib/slf4j-api-1.6.1.jar + newinitd "${FILESDIR}"/zabbix-jmx-proxy.init zabbix-jmx-proxy + newconfd "${FILESDIR}"/zabbix-jmx-proxy.conf zabbix-jmx-proxy + fi +} + +pkg_postinst() { + if use server || use proxy ; then + elog + elog "You may need to configure your database for Zabbix" + elog "if you have not already done so." + elog + + zabbix_homedir=$(egethome zabbix) + if [ -n "${zabbix_homedir}" ] && \ + [ "${zabbix_homedir}" != "/var/lib/zabbix/home" ]; then + ewarn + ewarn "The user 'zabbix' should have his homedir changed" + ewarn "to /var/lib/zabbix/home if you want to use" + ewarn "custom alert scripts." + ewarn + ewarn "A real homedir might be needed for configfiles" + ewarn "for custom alert scripts (e.g. ~/.sendxmpprc when" + ewarn "using sendxmpp for Jabber alerts)." + ewarn + ewarn "To change the homedir use:" + ewarn " usermod -d /var/lib/zabbix/home zabbix" + ewarn + fi + fi + + if use server; then + elog + elog "For distributed monitoring you have to run:" + elog + elog "zabbix_server -n <nodeid>" + elog + elog "This will convert database data for use with Node ID" + elog "and also adds a local node." + elog + fi + + elog "--" + elog + elog "You may need to add these lines to /etc/services:" + elog + elog "zabbix-agent 10050/tcp Zabbix Agent" + elog "zabbix-agent 10050/udp Zabbix Agent" + elog "zabbix-trapper 10051/tcp Zabbix Trapper" + elog "zabbix-trapper 10051/udp Zabbix Trapper" + elog + + if use server || use proxy ; then + # check for fping + fping_perms=$(stat -c %a /usr/sbin/fping 2>/dev/null) + case "${fping_perms}" in + 4[157][157][157]) + ;; + *) + ewarn + ewarn "If you want to use the checks 'icmpping' and 'icmppingsec'," + ewarn "you have to make /usr/sbin/fping setuid root and executable" + ewarn "by everyone. Run the following command to fix it:" + ewarn + ewarn " chmod u=rwsx,g=rx,o=rx /usr/sbin/fping" + ewarn + ewarn "Please be aware that this might impose a security risk," + ewarn "depending on the code quality of fping." + ewarn + ;; + esac + fi +} diff --git a/net-analyzer/zabbix/zabbix-4.0.20.ebuild b/net-analyzer/zabbix/zabbix-4.0.20.ebuild new file mode 100644 index 000000000000..a6e36395a53c --- /dev/null +++ b/net-analyzer/zabbix/zabbix-4.0.20.ebuild @@ -0,0 +1,350 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +# needed to make webapp-config dep optional +WEBAPP_OPTIONAL="yes" +inherit flag-o-matic webapp java-pkg-opt-2 user systemd toolchain-funcs + +DESCRIPTION="ZABBIX is software for monitoring of your applications, network and servers" +HOMEPAGE="https://www.zabbix.com/" +MY_P=${P/_/} +MY_PV=${PV/_/} +SRC_URI="https://cdn.zabbix.com/stable/${PV}/${P}.tar.gz" +LICENSE="GPL-2" +SLOT="0" +WEBAPP_MANUAL_SLOT="yes" +KEYWORDS="amd64 x86" +IUSE="+agent java curl frontend ipv6 xmpp ldap libxml2 mysql openipmi oracle +postgres proxy server ssh ssl snmp sqlite odbc static" +REQUIRED_USE="|| ( agent frontend proxy server ) + proxy? ( ^^ ( mysql oracle postgres sqlite odbc ) ) + server? ( ^^ ( mysql oracle postgres odbc ) ) + static? ( !oracle !snmp )" + +COMMON_DEPEND=" + curl? ( net-misc/curl ) + java? ( >=virtual/jdk-1.8:* ) + ldap? ( + =dev-libs/cyrus-sasl-2* + net-libs/gnutls + net-nds/openldap + ) + libxml2? ( dev-libs/libxml2 ) + mysql? ( dev-db/mysql-connector-c ) + odbc? ( dev-db/unixODBC ) + openipmi? ( sys-libs/openipmi ) + oracle? ( dev-db/oracle-instantclient-basic ) + postgres? ( dev-db/postgresql:* ) + proxy? ( sys-libs/zlib ) + server? ( + dev-libs/libevent + sys-libs/zlib + ) + snmp? ( net-analyzer/net-snmp ) + sqlite? ( dev-db/sqlite ) + ssh? ( net-libs/libssh2 ) + ssl? ( dev-libs/openssl:=[-bindist] ) + xmpp? ( dev-libs/iksemel ) +" + +RDEPEND="${COMMON_DEPEND} + java? ( >=virtual/jre-1.8:* ) + mysql? ( virtual/mysql ) + proxy? ( net-analyzer/fping[suid] ) + server? ( + app-admin/webapp-config + dev-libs/libevent + dev-libs/libpcre + net-analyzer/fping[suid] + ) + frontend? ( + app-admin/webapp-config + dev-lang/php:*[bcmath,ctype,sockets,gd,truetype,xml,session,xmlreader,xmlwriter,nls,sysvipc,unicode] + media-libs/gd[png] + virtual/httpd-php:* + mysql? ( dev-lang/php[mysqli] ) + odbc? ( dev-lang/php[odbc] ) + oracle? ( dev-lang/php[oci8-instant-client] ) + postgres? ( dev-lang/php[postgres] ) + sqlite? ( dev-lang/php[sqlite] ) + ) +" +DEPEND="${COMMON_DEPEND} + static? ( + curl? ( net-misc/curl[static-libs] ) + ldap? ( + =dev-libs/cyrus-sasl-2*[static-libs] + net-libs/gnutls[static-libs] + net-nds/openldap[static-libs] + ) + libxml2? ( dev-libs/libxml2[static-libs] ) + mysql? ( dev-db/mysql-connector-c[static-libs] ) + odbc? ( dev-db/unixODBC[static-libs] ) + postgres? ( dev-db/postgresql:*[static-libs] ) + sqlite? ( dev-db/sqlite[static-libs] ) + ssh? ( net-libs/libssh2 ) + ) +" +BDEPEND=" + virtual/pkgconfig +" + +PATCHES=( + "${FILESDIR}/${PN}-4.0.18-modulepathfix.patch" + "${FILESDIR}/${PN}-3.0.30-security-disable-PidFile.patch" +) + +S=${WORKDIR}/${MY_P} + +ZABBIXJAVA_BASE="opt/zabbix_java" + +pkg_setup() { + if use oracle; then + if [ -z "${ORACLE_HOME}" ]; then + eerror + eerror "The environment variable ORACLE_HOME must be set" + eerror "and point to the correct location." + eerror "It looks like you don't have Oracle installed." + eerror + die "Environment variable ORACLE_HOME is not set" + fi + if has_version 'dev-db/oracle-instantclient-basic'; then + ewarn + ewarn "Please ensure you have a full install of the Oracle client." + ewarn "dev-db/oracle-instantclient* is NOT sufficient." + ewarn + fi + fi + + if use frontend; then + webapp_pkg_setup + fi + + enewgroup zabbix + enewuser zabbix -1 -1 /var/lib/zabbix/home zabbix + + java-pkg-opt-2_pkg_setup +} + +src_prepare() { + default +} + +src_configure() { + econf \ + $(use_enable agent) \ + $(use_enable ipv6) \ + $(use_enable java) \ + $(use_enable proxy) \ + $(use_enable server) \ + $(use_enable static) \ + $(use_with curl libcurl) \ + $(use_with ldap) \ + $(use_with libxml2) \ + $(use_with mysql) \ + $(use_with odbc unixodbc) \ + $(use_with openipmi openipmi) \ + $(use_with oracle) \ + $(use_with postgres postgresql) \ + $(use_with snmp net-snmp) \ + $(use_with sqlite sqlite3) \ + $(use_with ssh ssh2) \ + $(use_with ssl openssl) \ + $(use_with xmpp jabber) +} + +src_compile() { + if [ -f Makefile ] || [ -f GNUmakefile ] || [ -f makefile ]; then + emake AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" + fi +} + +src_install() { + local dirs=( + /etc/zabbix + /var/lib/zabbix + /var/lib/zabbix/home + /var/lib/zabbix/scripts + /var/lib/zabbix/alertscripts + /var/lib/zabbix/externalscripts + /var/log/zabbix + ) + + for dir in "${dirs[@]}"; do + dodir "${dir}" + keepdir "${dir}" + done + + if use server; then + insinto /etc/zabbix + doins "${S}"/conf/zabbix_server.conf + fperms 0640 /etc/zabbix/zabbix_server.conf + fowners root:zabbix /etc/zabbix/zabbix_server.conf + + newinitd "${FILESDIR}"/zabbix-server.init zabbix-server + + dosbin src/zabbix_server/zabbix_server + + insinto /usr/share/zabbix + doins -r "${S}"/database/ + + systemd_dounit "${FILESDIR}"/zabbix-server.service + systemd_newtmpfilesd "${FILESDIR}"/zabbix-server.tmpfiles zabbix-server.conf + fi + + if use proxy; then + insinto /etc/zabbix + doins "${S}"/conf/zabbix_proxy.conf + fperms 0640 /etc/zabbix/zabbix_proxy.conf + fowners root:zabbix /etc/zabbix/zabbix_proxy.conf + + newinitd "${FILESDIR}"/zabbix-proxy.init zabbix-proxy + + dosbin src/zabbix_proxy/zabbix_proxy + + insinto /usr/share/zabbix + doins -r "${S}"/database/ + + systemd_dounit "${FILESDIR}"/zabbix-proxy.service + systemd_newtmpfilesd "${FILESDIR}"/zabbix-proxy.tmpfiles zabbix-proxy.conf + fi + + if use agent; then + insinto /etc/zabbix + doins "${S}"/conf/zabbix_agentd.conf + fperms 0640 /etc/zabbix/zabbix_agentd.conf + fowners root:zabbix /etc/zabbix/zabbix_agentd.conf + + newinitd "${FILESDIR}"/zabbix-agentd.init zabbix-agentd + + dosbin src/zabbix_agent/zabbix_agentd + dobin \ + src/zabbix_sender/zabbix_sender \ + src/zabbix_get/zabbix_get + + systemd_dounit "${FILESDIR}"/zabbix-agentd.service + systemd_newtmpfilesd "${FILESDIR}"/zabbix-agentd.tmpfiles zabbix-agentd.conf + fi + + fowners root:zabbix /etc/zabbix + fowners zabbix:zabbix \ + /var/lib/zabbix \ + /var/lib/zabbix/home \ + /var/lib/zabbix/scripts \ + /var/lib/zabbix/alertscripts \ + /var/lib/zabbix/externalscripts \ + /var/log/zabbix + fperms 0750 \ + /etc/zabbix \ + /var/lib/zabbix \ + /var/lib/zabbix/home \ + /var/lib/zabbix/scripts \ + /var/lib/zabbix/alertscripts \ + /var/lib/zabbix/externalscripts \ + /var/log/zabbix + + dodoc README INSTALL NEWS ChangeLog \ + conf/zabbix_agentd.conf \ + conf/zabbix_proxy.conf \ + conf/zabbix_agentd/userparameter_examples.conf \ + conf/zabbix_agentd/userparameter_mysql.conf \ + conf/zabbix_server.conf + + if use frontend; then + webapp_src_preinst + cp -R frontends/php/* "${D}/${MY_HTDOCSDIR}" + webapp_configfile \ + "${MY_HTDOCSDIR}"/include/db.inc.php \ + "${MY_HTDOCSDIR}"/include/config.inc.php + webapp_src_install + fi + + if use java; then + dodir \ + /${ZABBIXJAVA_BASE} \ + /${ZABBIXJAVA_BASE}/bin \ + /${ZABBIXJAVA_BASE}/lib + keepdir /${ZABBIXJAVA_BASE} + exeinto /${ZABBIXJAVA_BASE}/bin + doexe src/zabbix_java/bin/zabbix-java-gateway-${MY_PV}.jar + exeinto /${ZABBIXJAVA_BASE}/lib + doexe \ + src/zabbix_java/lib/logback-classic-0.9.27.jar \ + src/zabbix_java/lib/logback-console.xml \ + src/zabbix_java/lib/logback-core-0.9.27.jar \ + src/zabbix_java/lib/logback.xml \ + src/zabbix_java/lib/android-json-4.3_r3.1.jar \ + src/zabbix_java/lib/slf4j-api-1.6.1.jar + newinitd "${FILESDIR}"/zabbix-jmx-proxy.init zabbix-jmx-proxy + newconfd "${FILESDIR}"/zabbix-jmx-proxy.conf zabbix-jmx-proxy + fi +} + +pkg_postinst() { + if use server || use proxy ; then + elog + elog "You may need to configure your database for Zabbix" + elog "if you have not already done so." + elog + + zabbix_homedir=$(egethome zabbix) + if [ -n "${zabbix_homedir}" ] && \ + [ "${zabbix_homedir}" != "/var/lib/zabbix/home" ]; then + ewarn + ewarn "The user 'zabbix' should have his homedir changed" + ewarn "to /var/lib/zabbix/home if you want to use" + ewarn "custom alert scripts." + ewarn + ewarn "A real homedir might be needed for configfiles" + ewarn "for custom alert scripts (e.g. ~/.sendxmpprc when" + ewarn "using sendxmpp for Jabber alerts)." + ewarn + ewarn "To change the homedir use:" + ewarn " usermod -d /var/lib/zabbix/home zabbix" + ewarn + fi + fi + + if use server; then + elog + elog "For distributed monitoring you have to run:" + elog + elog "zabbix_server -n <nodeid>" + elog + elog "This will convert database data for use with Node ID" + elog "and also adds a local node." + elog + fi + + elog "--" + elog + elog "You may need to add these lines to /etc/services:" + elog + elog "zabbix-agent 10050/tcp Zabbix Agent" + elog "zabbix-agent 10050/udp Zabbix Agent" + elog "zabbix-trapper 10051/tcp Zabbix Trapper" + elog "zabbix-trapper 10051/udp Zabbix Trapper" + elog + + if use server || use proxy ; then + # check for fping + fping_perms=$(stat -c %a /usr/sbin/fping 2>/dev/null) + case "${fping_perms}" in + 4[157][157][157]) + ;; + *) + ewarn + ewarn "If you want to use the checks 'icmpping' and 'icmppingsec'," + ewarn "you have to make /usr/sbin/fping setuid root and executable" + ewarn "by everyone. Run the following command to fix it:" + ewarn + ewarn " chmod u=rwsx,g=rx,o=rx /usr/sbin/fping" + ewarn + ewarn "Please be aware that this might impose a security risk," + ewarn "depending on the code quality of fping." + ewarn + ;; + esac + fi +} diff --git a/net-analyzer/zabbix/zabbix-4.0.21.ebuild b/net-analyzer/zabbix/zabbix-4.0.21.ebuild new file mode 100644 index 000000000000..844a2e68741e --- /dev/null +++ b/net-analyzer/zabbix/zabbix-4.0.21.ebuild @@ -0,0 +1,350 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +# needed to make webapp-config dep optional +WEBAPP_OPTIONAL="yes" +inherit flag-o-matic webapp java-pkg-opt-2 user systemd toolchain-funcs + +DESCRIPTION="ZABBIX is software for monitoring of your applications, network and servers" +HOMEPAGE="https://www.zabbix.com/" +MY_P=${P/_/} +MY_PV=${PV/_/} +SRC_URI="https://cdn.zabbix.com/${PN}/sources/stable/4.0/${P}.tar.gz" +LICENSE="GPL-2" +SLOT="0" +WEBAPP_MANUAL_SLOT="yes" +KEYWORDS="~amd64 ~x86" +IUSE="+agent java curl frontend ipv6 xmpp ldap libxml2 mysql openipmi oracle +postgres proxy server ssh ssl snmp sqlite odbc static" +REQUIRED_USE="|| ( agent frontend proxy server ) + proxy? ( ^^ ( mysql oracle postgres sqlite odbc ) ) + server? ( ^^ ( mysql oracle postgres odbc ) ) + static? ( !oracle !snmp )" + +COMMON_DEPEND=" + curl? ( net-misc/curl ) + java? ( >=virtual/jdk-1.8:* ) + ldap? ( + =dev-libs/cyrus-sasl-2* + net-libs/gnutls + net-nds/openldap + ) + libxml2? ( dev-libs/libxml2 ) + mysql? ( dev-db/mysql-connector-c ) + odbc? ( dev-db/unixODBC ) + openipmi? ( sys-libs/openipmi ) + oracle? ( dev-db/oracle-instantclient-basic ) + postgres? ( dev-db/postgresql:* ) + proxy? ( sys-libs/zlib ) + server? ( + dev-libs/libevent + sys-libs/zlib + ) + snmp? ( net-analyzer/net-snmp ) + sqlite? ( dev-db/sqlite ) + ssh? ( net-libs/libssh2 ) + ssl? ( dev-libs/openssl:=[-bindist] ) + xmpp? ( dev-libs/iksemel ) +" + +RDEPEND="${COMMON_DEPEND} + java? ( >=virtual/jre-1.8:* ) + mysql? ( virtual/mysql ) + proxy? ( net-analyzer/fping[suid] ) + server? ( + app-admin/webapp-config + dev-libs/libevent + dev-libs/libpcre + net-analyzer/fping[suid] + ) + frontend? ( + app-admin/webapp-config + dev-lang/php:*[bcmath,ctype,sockets,gd,truetype,xml,session,xmlreader,xmlwriter,nls,sysvipc,unicode] + media-libs/gd[png] + virtual/httpd-php:* + mysql? ( dev-lang/php[mysqli] ) + odbc? ( dev-lang/php[odbc] ) + oracle? ( dev-lang/php[oci8-instant-client] ) + postgres? ( dev-lang/php[postgres] ) + sqlite? ( dev-lang/php[sqlite] ) + ) +" +DEPEND="${COMMON_DEPEND} + static? ( + curl? ( net-misc/curl[static-libs] ) + ldap? ( + =dev-libs/cyrus-sasl-2*[static-libs] + net-libs/gnutls[static-libs] + net-nds/openldap[static-libs] + ) + libxml2? ( dev-libs/libxml2[static-libs] ) + mysql? ( dev-db/mysql-connector-c[static-libs] ) + odbc? ( dev-db/unixODBC[static-libs] ) + postgres? ( dev-db/postgresql:*[static-libs] ) + sqlite? ( dev-db/sqlite[static-libs] ) + ssh? ( net-libs/libssh2 ) + ) +" +BDEPEND=" + virtual/pkgconfig +" + +PATCHES=( + "${FILESDIR}/${PN}-4.0.18-modulepathfix.patch" + "${FILESDIR}/${PN}-3.0.30-security-disable-PidFile.patch" +) + +S=${WORKDIR}/${MY_P} + +ZABBIXJAVA_BASE="opt/zabbix_java" + +pkg_setup() { + if use oracle; then + if [ -z "${ORACLE_HOME}" ]; then + eerror + eerror "The environment variable ORACLE_HOME must be set" + eerror "and point to the correct location." + eerror "It looks like you don't have Oracle installed." + eerror + die "Environment variable ORACLE_HOME is not set" + fi + if has_version 'dev-db/oracle-instantclient-basic'; then + ewarn + ewarn "Please ensure you have a full install of the Oracle client." + ewarn "dev-db/oracle-instantclient* is NOT sufficient." + ewarn + fi + fi + + if use frontend; then + webapp_pkg_setup + fi + + enewgroup zabbix + enewuser zabbix -1 -1 /var/lib/zabbix/home zabbix + + java-pkg-opt-2_pkg_setup +} + +src_prepare() { + default +} + +src_configure() { + econf \ + $(use_enable agent) \ + $(use_enable ipv6) \ + $(use_enable java) \ + $(use_enable proxy) \ + $(use_enable server) \ + $(use_enable static) \ + $(use_with curl libcurl) \ + $(use_with ldap) \ + $(use_with libxml2) \ + $(use_with mysql) \ + $(use_with odbc unixodbc) \ + $(use_with openipmi openipmi) \ + $(use_with oracle) \ + $(use_with postgres postgresql) \ + $(use_with snmp net-snmp) \ + $(use_with sqlite sqlite3) \ + $(use_with ssh ssh2) \ + $(use_with ssl openssl) \ + $(use_with xmpp jabber) +} + +src_compile() { + if [ -f Makefile ] || [ -f GNUmakefile ] || [ -f makefile ]; then + emake AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" + fi +} + +src_install() { + local dirs=( + /etc/zabbix + /var/lib/zabbix + /var/lib/zabbix/home + /var/lib/zabbix/scripts + /var/lib/zabbix/alertscripts + /var/lib/zabbix/externalscripts + /var/log/zabbix + ) + + for dir in "${dirs[@]}"; do + dodir "${dir}" + keepdir "${dir}" + done + + if use server; then + insinto /etc/zabbix + doins "${S}"/conf/zabbix_server.conf + fperms 0640 /etc/zabbix/zabbix_server.conf + fowners root:zabbix /etc/zabbix/zabbix_server.conf + + newinitd "${FILESDIR}"/zabbix-server.init zabbix-server + + dosbin src/zabbix_server/zabbix_server + + insinto /usr/share/zabbix + doins -r "${S}"/database/ + + systemd_dounit "${FILESDIR}"/zabbix-server.service + systemd_newtmpfilesd "${FILESDIR}"/zabbix-server.tmpfiles zabbix-server.conf + fi + + if use proxy; then + insinto /etc/zabbix + doins "${S}"/conf/zabbix_proxy.conf + fperms 0640 /etc/zabbix/zabbix_proxy.conf + fowners root:zabbix /etc/zabbix/zabbix_proxy.conf + + newinitd "${FILESDIR}"/zabbix-proxy.init zabbix-proxy + + dosbin src/zabbix_proxy/zabbix_proxy + + insinto /usr/share/zabbix + doins -r "${S}"/database/ + + systemd_dounit "${FILESDIR}"/zabbix-proxy.service + systemd_newtmpfilesd "${FILESDIR}"/zabbix-proxy.tmpfiles zabbix-proxy.conf + fi + + if use agent; then + insinto /etc/zabbix + doins "${S}"/conf/zabbix_agentd.conf + fperms 0640 /etc/zabbix/zabbix_agentd.conf + fowners root:zabbix /etc/zabbix/zabbix_agentd.conf + + newinitd "${FILESDIR}"/zabbix-agentd.init zabbix-agentd + + dosbin src/zabbix_agent/zabbix_agentd + dobin \ + src/zabbix_sender/zabbix_sender \ + src/zabbix_get/zabbix_get + + systemd_dounit "${FILESDIR}"/zabbix-agentd.service + systemd_newtmpfilesd "${FILESDIR}"/zabbix-agentd.tmpfiles zabbix-agentd.conf + fi + + fowners root:zabbix /etc/zabbix + fowners zabbix:zabbix \ + /var/lib/zabbix \ + /var/lib/zabbix/home \ + /var/lib/zabbix/scripts \ + /var/lib/zabbix/alertscripts \ + /var/lib/zabbix/externalscripts \ + /var/log/zabbix + fperms 0750 \ + /etc/zabbix \ + /var/lib/zabbix \ + /var/lib/zabbix/home \ + /var/lib/zabbix/scripts \ + /var/lib/zabbix/alertscripts \ + /var/lib/zabbix/externalscripts \ + /var/log/zabbix + + dodoc README INSTALL NEWS ChangeLog \ + conf/zabbix_agentd.conf \ + conf/zabbix_proxy.conf \ + conf/zabbix_agentd/userparameter_examples.conf \ + conf/zabbix_agentd/userparameter_mysql.conf \ + conf/zabbix_server.conf + + if use frontend; then + webapp_src_preinst + cp -R frontends/php/* "${D}/${MY_HTDOCSDIR}" + webapp_configfile \ + "${MY_HTDOCSDIR}"/include/db.inc.php \ + "${MY_HTDOCSDIR}"/include/config.inc.php + webapp_src_install + fi + + if use java; then + dodir \ + /${ZABBIXJAVA_BASE} \ + /${ZABBIXJAVA_BASE}/bin \ + /${ZABBIXJAVA_BASE}/lib + keepdir /${ZABBIXJAVA_BASE} + exeinto /${ZABBIXJAVA_BASE}/bin + doexe src/zabbix_java/bin/zabbix-java-gateway-${MY_PV}.jar + exeinto /${ZABBIXJAVA_BASE}/lib + doexe \ + src/zabbix_java/lib/logback-classic-0.9.27.jar \ + src/zabbix_java/lib/logback-console.xml \ + src/zabbix_java/lib/logback-core-0.9.27.jar \ + src/zabbix_java/lib/logback.xml \ + src/zabbix_java/lib/android-json-4.3_r3.1.jar \ + src/zabbix_java/lib/slf4j-api-1.6.1.jar + newinitd "${FILESDIR}"/zabbix-jmx-proxy.init zabbix-jmx-proxy + newconfd "${FILESDIR}"/zabbix-jmx-proxy.conf zabbix-jmx-proxy + fi +} + +pkg_postinst() { + if use server || use proxy ; then + elog + elog "You may need to configure your database for Zabbix" + elog "if you have not already done so." + elog + + zabbix_homedir=$(egethome zabbix) + if [ -n "${zabbix_homedir}" ] && \ + [ "${zabbix_homedir}" != "/var/lib/zabbix/home" ]; then + ewarn + ewarn "The user 'zabbix' should have his homedir changed" + ewarn "to /var/lib/zabbix/home if you want to use" + ewarn "custom alert scripts." + ewarn + ewarn "A real homedir might be needed for configfiles" + ewarn "for custom alert scripts (e.g. ~/.sendxmpprc when" + ewarn "using sendxmpp for Jabber alerts)." + ewarn + ewarn "To change the homedir use:" + ewarn " usermod -d /var/lib/zabbix/home zabbix" + ewarn + fi + fi + + if use server; then + elog + elog "For distributed monitoring you have to run:" + elog + elog "zabbix_server -n <nodeid>" + elog + elog "This will convert database data for use with Node ID" + elog "and also adds a local node." + elog + fi + + elog "--" + elog + elog "You may need to add these lines to /etc/services:" + elog + elog "zabbix-agent 10050/tcp Zabbix Agent" + elog "zabbix-agent 10050/udp Zabbix Agent" + elog "zabbix-trapper 10051/tcp Zabbix Trapper" + elog "zabbix-trapper 10051/udp Zabbix Trapper" + elog + + if use server || use proxy ; then + # check for fping + fping_perms=$(stat -c %a /usr/sbin/fping 2>/dev/null) + case "${fping_perms}" in + 4[157][157][157]) + ;; + *) + ewarn + ewarn "If you want to use the checks 'icmpping' and 'icmppingsec'," + ewarn "you have to make /usr/sbin/fping setuid root and executable" + ewarn "by everyone. Run the following command to fix it:" + ewarn + ewarn " chmod u=rwsx,g=rx,o=rx /usr/sbin/fping" + ewarn + ewarn "Please be aware that this might impose a security risk," + ewarn "depending on the code quality of fping." + ewarn + ;; + esac + fi +} diff --git a/net-analyzer/zabbix/zabbix-4.4.8.ebuild b/net-analyzer/zabbix/zabbix-4.4.8.ebuild new file mode 100644 index 000000000000..4ac5203ab7b3 --- /dev/null +++ b/net-analyzer/zabbix/zabbix-4.4.8.ebuild @@ -0,0 +1,347 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +# needed to make webapp-config dep optional +WEBAPP_OPTIONAL="yes" +inherit flag-o-matic webapp java-pkg-opt-2 user systemd toolchain-funcs + +DESCRIPTION="ZABBIX is software for monitoring of your applications, network and servers" +HOMEPAGE="https://www.zabbix.com/" +MY_P=${P/_/} +MY_PV=${PV/_/} +SRC_URI="https://cdn.zabbix.com/stable/${PV}/${P}.tar.gz" +LICENSE="GPL-2" +SLOT="0" +WEBAPP_MANUAL_SLOT="yes" +KEYWORDS="amd64 x86" +IUSE="+agent java curl frontend ipv6 ldap libxml2 mysql openipmi oracle +postgres proxy server ssh ssl snmp sqlite odbc static" +REQUIRED_USE="|| ( agent frontend proxy server ) + proxy? ( ^^ ( mysql oracle postgres sqlite odbc ) ) + server? ( ^^ ( mysql oracle postgres odbc ) ) + static? ( !oracle !snmp )" + +COMMON_DEPEND=" + curl? ( net-misc/curl ) + java? ( >=virtual/jdk-1.8:* ) + ldap? ( + =dev-libs/cyrus-sasl-2* + net-libs/gnutls + net-nds/openldap + ) + libxml2? ( dev-libs/libxml2 ) + mysql? ( dev-db/mysql-connector-c ) + odbc? ( dev-db/unixODBC ) + openipmi? ( sys-libs/openipmi ) + oracle? ( dev-db/oracle-instantclient-basic ) + postgres? ( dev-db/postgresql:* ) + proxy? ( sys-libs/zlib ) + server? ( + dev-libs/libevent + sys-libs/zlib + ) + snmp? ( net-analyzer/net-snmp ) + sqlite? ( dev-db/sqlite ) + ssh? ( net-libs/libssh2 ) + ssl? ( dev-libs/openssl:=[-bindist] ) +" + +RDEPEND="${COMMON_DEPEND} + java? ( >=virtual/jre-1.8:* ) + mysql? ( virtual/mysql ) + proxy? ( net-analyzer/fping[suid] ) + server? ( + app-admin/webapp-config + dev-libs/libevent + dev-libs/libpcre + net-analyzer/fping[suid] + ) + frontend? ( + app-admin/webapp-config + dev-lang/php:*[bcmath,ctype,sockets,gd,truetype,xml,session,xmlreader,xmlwriter,nls,sysvipc,unicode] + media-libs/gd[png] + virtual/httpd-php:* + mysql? ( dev-lang/php[mysqli] ) + odbc? ( dev-lang/php[odbc] ) + oracle? ( dev-lang/php[oci8-instant-client] ) + postgres? ( dev-lang/php[postgres] ) + sqlite? ( dev-lang/php[sqlite] ) + ) +" +DEPEND="${COMMON_DEPEND} + static? ( + curl? ( net-misc/curl[static-libs] ) + ldap? ( + =dev-libs/cyrus-sasl-2*[static-libs] + net-libs/gnutls[static-libs] + net-nds/openldap[static-libs] + ) + libxml2? ( dev-libs/libxml2[static-libs] ) + mysql? ( dev-db/mysql-connector-c[static-libs] ) + odbc? ( dev-db/unixODBC[static-libs] ) + postgres? ( dev-db/postgresql:*[static-libs] ) + sqlite? ( dev-db/sqlite[static-libs] ) + ssh? ( net-libs/libssh2 ) + ) +" +BDEPEND=" + virtual/pkgconfig +" + +PATCHES=( + "${FILESDIR}/${PN}-4.0.18-modulepathfix.patch" + "${FILESDIR}/${PN}-3.0.30-security-disable-PidFile.patch" +) + +S=${WORKDIR}/${MY_P} + +ZABBIXJAVA_BASE="opt/zabbix_java" + +pkg_setup() { + if use oracle; then + if [ -z "${ORACLE_HOME}" ]; then + eerror + eerror "The environment variable ORACLE_HOME must be set" + eerror "and point to the correct location." + eerror "It looks like you don't have Oracle installed." + eerror + die "Environment variable ORACLE_HOME is not set" + fi + if has_version 'dev-db/oracle-instantclient-basic'; then + ewarn + ewarn "Please ensure you have a full install of the Oracle client." + ewarn "dev-db/oracle-instantclient* is NOT sufficient." + ewarn + fi + fi + + if use frontend; then + webapp_pkg_setup + fi + + enewgroup zabbix + enewuser zabbix -1 -1 /var/lib/zabbix/home zabbix + + java-pkg-opt-2_pkg_setup +} + +src_prepare() { + default +} + +src_configure() { + econf \ + $(use_enable agent) \ + $(use_enable ipv6) \ + $(use_enable java) \ + $(use_enable proxy) \ + $(use_enable server) \ + $(use_enable static) \ + $(use_with curl libcurl) \ + $(use_with ldap) \ + $(use_with libxml2) \ + $(use_with mysql) \ + $(use_with odbc unixodbc) \ + $(use_with openipmi openipmi) \ + $(use_with oracle) \ + $(use_with postgres postgresql) \ + $(use_with snmp net-snmp) \ + $(use_with sqlite sqlite3) \ + $(use_with ssh ssh2) \ + $(use_with ssl openssl) +} + +src_compile() { + if [ -f Makefile ] || [ -f GNUmakefile ] || [ -f makefile ]; then + emake AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" + fi +} + +src_install() { + local dirs=( + /etc/zabbix + /var/lib/zabbix + /var/lib/zabbix/home + /var/lib/zabbix/scripts + /var/lib/zabbix/alertscripts + /var/lib/zabbix/externalscripts + /var/log/zabbix + ) + + for dir in "${dirs[@]}"; do + dodir "${dir}" + keepdir "${dir}" + done + + if use server; then + insinto /etc/zabbix + doins "${S}"/conf/zabbix_server.conf + fperms 0640 /etc/zabbix/zabbix_server.conf + fowners root:zabbix /etc/zabbix/zabbix_server.conf + + newinitd "${FILESDIR}"/zabbix-server.init zabbix-server + + dosbin src/zabbix_server/zabbix_server + + insinto /usr/share/zabbix + doins -r "${S}"/database/ + + systemd_dounit "${FILESDIR}"/zabbix-server.service + systemd_newtmpfilesd "${FILESDIR}"/zabbix-server.tmpfiles zabbix-server.conf + fi + + if use proxy; then + insinto /etc/zabbix + doins "${S}"/conf/zabbix_proxy.conf + fperms 0640 /etc/zabbix/zabbix_proxy.conf + fowners root:zabbix /etc/zabbix/zabbix_proxy.conf + + newinitd "${FILESDIR}"/zabbix-proxy.init zabbix-proxy + + dosbin src/zabbix_proxy/zabbix_proxy + + insinto /usr/share/zabbix + doins -r "${S}"/database/ + + systemd_dounit "${FILESDIR}"/zabbix-proxy.service + systemd_newtmpfilesd "${FILESDIR}"/zabbix-proxy.tmpfiles zabbix-proxy.conf + fi + + if use agent; then + insinto /etc/zabbix + doins "${S}"/conf/zabbix_agentd.conf + fperms 0640 /etc/zabbix/zabbix_agentd.conf + fowners root:zabbix /etc/zabbix/zabbix_agentd.conf + + newinitd "${FILESDIR}"/zabbix-agentd.init zabbix-agentd + + dosbin src/zabbix_agent/zabbix_agentd + dobin \ + src/zabbix_sender/zabbix_sender \ + src/zabbix_get/zabbix_get + + systemd_dounit "${FILESDIR}"/zabbix-agentd.service + systemd_newtmpfilesd "${FILESDIR}"/zabbix-agentd.tmpfiles zabbix-agentd.conf + fi + + fowners root:zabbix /etc/zabbix + fowners zabbix:zabbix \ + /var/lib/zabbix \ + /var/lib/zabbix/home \ + /var/lib/zabbix/scripts \ + /var/lib/zabbix/alertscripts \ + /var/lib/zabbix/externalscripts \ + /var/log/zabbix + fperms 0750 \ + /etc/zabbix \ + /var/lib/zabbix \ + /var/lib/zabbix/home \ + /var/lib/zabbix/scripts \ + /var/lib/zabbix/alertscripts \ + /var/lib/zabbix/externalscripts \ + /var/log/zabbix + + dodoc README INSTALL NEWS ChangeLog \ + conf/zabbix_agentd.conf \ + conf/zabbix_proxy.conf \ + conf/zabbix_agentd/userparameter_examples.conf \ + conf/zabbix_agentd/userparameter_mysql.conf \ + conf/zabbix_server.conf + + if use frontend; then + webapp_src_preinst + cp -R frontends/php/* "${D}/${MY_HTDOCSDIR}" + webapp_configfile \ + "${MY_HTDOCSDIR}"/include/db.inc.php \ + "${MY_HTDOCSDIR}"/include/config.inc.php + webapp_src_install + fi + + if use java; then + dodir \ + /${ZABBIXJAVA_BASE} \ + /${ZABBIXJAVA_BASE}/bin \ + /${ZABBIXJAVA_BASE}/lib + keepdir /${ZABBIXJAVA_BASE} + exeinto /${ZABBIXJAVA_BASE}/bin + doexe src/zabbix_java/bin/zabbix-java-gateway-${MY_PV}.jar + exeinto /${ZABBIXJAVA_BASE}/lib + doexe \ + src/zabbix_java/lib/logback-classic-0.9.27.jar \ + src/zabbix_java/lib/logback-console.xml \ + src/zabbix_java/lib/logback-core-0.9.27.jar \ + src/zabbix_java/lib/logback.xml \ + src/zabbix_java/lib/android-json-4.3_r3.1.jar \ + src/zabbix_java/lib/slf4j-api-1.6.1.jar + newinitd "${FILESDIR}"/zabbix-jmx-proxy.init zabbix-jmx-proxy + newconfd "${FILESDIR}"/zabbix-jmx-proxy.conf zabbix-jmx-proxy + fi +} + +pkg_postinst() { + if use server || use proxy ; then + elog + elog "You may need to configure your database for Zabbix" + elog "if you have not already done so." + elog + + zabbix_homedir=$(egethome zabbix) + if [ -n "${zabbix_homedir}" ] && \ + [ "${zabbix_homedir}" != "/var/lib/zabbix/home" ]; then + ewarn + ewarn "The user 'zabbix' should have his homedir changed" + ewarn "to /var/lib/zabbix/home if you want to use" + ewarn "custom alert scripts." + ewarn + ewarn "A real homedir might be needed for configfiles" + ewarn "for custom alert scripts." + ewarn + ewarn "To change the homedir use:" + ewarn " usermod -d /var/lib/zabbix/home zabbix" + ewarn + fi + fi + + if use server; then + elog + elog "For distributed monitoring you have to run:" + elog + elog "zabbix_server -n <nodeid>" + elog + elog "This will convert database data for use with Node ID" + elog "and also adds a local node." + elog + fi + + elog "--" + elog + elog "You may need to add these lines to /etc/services:" + elog + elog "zabbix-agent 10050/tcp Zabbix Agent" + elog "zabbix-agent 10050/udp Zabbix Agent" + elog "zabbix-trapper 10051/tcp Zabbix Trapper" + elog "zabbix-trapper 10051/udp Zabbix Trapper" + elog + + if use server || use proxy ; then + # check for fping + fping_perms=$(stat -c %a /usr/sbin/fping 2>/dev/null) + case "${fping_perms}" in + 4[157][157][157]) + ;; + *) + ewarn + ewarn "If you want to use the checks 'icmpping' and 'icmppingsec'," + ewarn "you have to make /usr/sbin/fping setuid root and executable" + ewarn "by everyone. Run the following command to fix it:" + ewarn + ewarn " chmod u=rwsx,g=rx,o=rx /usr/sbin/fping" + ewarn + ewarn "Please be aware that this might impose a security risk," + ewarn "depending on the code quality of fping." + ewarn + ;; + esac + fi +} diff --git a/net-analyzer/zabbix/zabbix-4.4.9.ebuild b/net-analyzer/zabbix/zabbix-4.4.9.ebuild new file mode 100644 index 000000000000..3d4726270762 --- /dev/null +++ b/net-analyzer/zabbix/zabbix-4.4.9.ebuild @@ -0,0 +1,347 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +# needed to make webapp-config dep optional +WEBAPP_OPTIONAL="yes" +inherit flag-o-matic webapp java-pkg-opt-2 user systemd toolchain-funcs + +DESCRIPTION="ZABBIX is software for monitoring of your applications, network and servers" +HOMEPAGE="https://www.zabbix.com/" +MY_P=${P/_/} +MY_PV=${PV/_/} +SRC_URI="https://cdn.zabbix.com/${PN}/sources/stable/4.4/${P}.tar.gz" +LICENSE="GPL-2" +SLOT="0" +WEBAPP_MANUAL_SLOT="yes" +KEYWORDS="~amd64 ~x86" +IUSE="+agent java curl frontend ipv6 ldap libxml2 mysql openipmi oracle +postgres proxy server ssh ssl snmp sqlite odbc static" +REQUIRED_USE="|| ( agent frontend proxy server ) + proxy? ( ^^ ( mysql oracle postgres sqlite odbc ) ) + server? ( ^^ ( mysql oracle postgres odbc ) ) + static? ( !oracle !snmp )" + +COMMON_DEPEND=" + curl? ( net-misc/curl ) + java? ( >=virtual/jdk-1.8:* ) + ldap? ( + =dev-libs/cyrus-sasl-2* + net-libs/gnutls + net-nds/openldap + ) + libxml2? ( dev-libs/libxml2 ) + mysql? ( dev-db/mysql-connector-c ) + odbc? ( dev-db/unixODBC ) + openipmi? ( sys-libs/openipmi ) + oracle? ( dev-db/oracle-instantclient-basic ) + postgres? ( dev-db/postgresql:* ) + proxy? ( sys-libs/zlib ) + server? ( + dev-libs/libevent + sys-libs/zlib + ) + snmp? ( net-analyzer/net-snmp ) + sqlite? ( dev-db/sqlite ) + ssh? ( net-libs/libssh2 ) + ssl? ( dev-libs/openssl:=[-bindist] ) +" + +RDEPEND="${COMMON_DEPEND} + java? ( >=virtual/jre-1.8:* ) + mysql? ( virtual/mysql ) + proxy? ( net-analyzer/fping[suid] ) + server? ( + app-admin/webapp-config + dev-libs/libevent + dev-libs/libpcre + net-analyzer/fping[suid] + ) + frontend? ( + app-admin/webapp-config + dev-lang/php:*[bcmath,ctype,sockets,gd,truetype,xml,session,xmlreader,xmlwriter,nls,sysvipc,unicode] + media-libs/gd[png] + virtual/httpd-php:* + mysql? ( dev-lang/php[mysqli] ) + odbc? ( dev-lang/php[odbc] ) + oracle? ( dev-lang/php[oci8-instant-client] ) + postgres? ( dev-lang/php[postgres] ) + sqlite? ( dev-lang/php[sqlite] ) + ) +" +DEPEND="${COMMON_DEPEND} + static? ( + curl? ( net-misc/curl[static-libs] ) + ldap? ( + =dev-libs/cyrus-sasl-2*[static-libs] + net-libs/gnutls[static-libs] + net-nds/openldap[static-libs] + ) + libxml2? ( dev-libs/libxml2[static-libs] ) + mysql? ( dev-db/mysql-connector-c[static-libs] ) + odbc? ( dev-db/unixODBC[static-libs] ) + postgres? ( dev-db/postgresql:*[static-libs] ) + sqlite? ( dev-db/sqlite[static-libs] ) + ssh? ( net-libs/libssh2 ) + ) +" +BDEPEND=" + virtual/pkgconfig +" + +PATCHES=( + "${FILESDIR}/${PN}-4.0.18-modulepathfix.patch" + "${FILESDIR}/${PN}-3.0.30-security-disable-PidFile.patch" +) + +S=${WORKDIR}/${MY_P} + +ZABBIXJAVA_BASE="opt/zabbix_java" + +pkg_setup() { + if use oracle; then + if [ -z "${ORACLE_HOME}" ]; then + eerror + eerror "The environment variable ORACLE_HOME must be set" + eerror "and point to the correct location." + eerror "It looks like you don't have Oracle installed." + eerror + die "Environment variable ORACLE_HOME is not set" + fi + if has_version 'dev-db/oracle-instantclient-basic'; then + ewarn + ewarn "Please ensure you have a full install of the Oracle client." + ewarn "dev-db/oracle-instantclient* is NOT sufficient." + ewarn + fi + fi + + if use frontend; then + webapp_pkg_setup + fi + + enewgroup zabbix + enewuser zabbix -1 -1 /var/lib/zabbix/home zabbix + + java-pkg-opt-2_pkg_setup +} + +src_prepare() { + default +} + +src_configure() { + econf \ + $(use_enable agent) \ + $(use_enable ipv6) \ + $(use_enable java) \ + $(use_enable proxy) \ + $(use_enable server) \ + $(use_enable static) \ + $(use_with curl libcurl) \ + $(use_with ldap) \ + $(use_with libxml2) \ + $(use_with mysql) \ + $(use_with odbc unixodbc) \ + $(use_with openipmi openipmi) \ + $(use_with oracle) \ + $(use_with postgres postgresql) \ + $(use_with snmp net-snmp) \ + $(use_with sqlite sqlite3) \ + $(use_with ssh ssh2) \ + $(use_with ssl openssl) +} + +src_compile() { + if [ -f Makefile ] || [ -f GNUmakefile ] || [ -f makefile ]; then + emake AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" + fi +} + +src_install() { + local dirs=( + /etc/zabbix + /var/lib/zabbix + /var/lib/zabbix/home + /var/lib/zabbix/scripts + /var/lib/zabbix/alertscripts + /var/lib/zabbix/externalscripts + /var/log/zabbix + ) + + for dir in "${dirs[@]}"; do + dodir "${dir}" + keepdir "${dir}" + done + + if use server; then + insinto /etc/zabbix + doins "${S}"/conf/zabbix_server.conf + fperms 0640 /etc/zabbix/zabbix_server.conf + fowners root:zabbix /etc/zabbix/zabbix_server.conf + + newinitd "${FILESDIR}"/zabbix-server.init zabbix-server + + dosbin src/zabbix_server/zabbix_server + + insinto /usr/share/zabbix + doins -r "${S}"/database/ + + systemd_dounit "${FILESDIR}"/zabbix-server.service + systemd_newtmpfilesd "${FILESDIR}"/zabbix-server.tmpfiles zabbix-server.conf + fi + + if use proxy; then + insinto /etc/zabbix + doins "${S}"/conf/zabbix_proxy.conf + fperms 0640 /etc/zabbix/zabbix_proxy.conf + fowners root:zabbix /etc/zabbix/zabbix_proxy.conf + + newinitd "${FILESDIR}"/zabbix-proxy.init zabbix-proxy + + dosbin src/zabbix_proxy/zabbix_proxy + + insinto /usr/share/zabbix + doins -r "${S}"/database/ + + systemd_dounit "${FILESDIR}"/zabbix-proxy.service + systemd_newtmpfilesd "${FILESDIR}"/zabbix-proxy.tmpfiles zabbix-proxy.conf + fi + + if use agent; then + insinto /etc/zabbix + doins "${S}"/conf/zabbix_agentd.conf + fperms 0640 /etc/zabbix/zabbix_agentd.conf + fowners root:zabbix /etc/zabbix/zabbix_agentd.conf + + newinitd "${FILESDIR}"/zabbix-agentd.init zabbix-agentd + + dosbin src/zabbix_agent/zabbix_agentd + dobin \ + src/zabbix_sender/zabbix_sender \ + src/zabbix_get/zabbix_get + + systemd_dounit "${FILESDIR}"/zabbix-agentd.service + systemd_newtmpfilesd "${FILESDIR}"/zabbix-agentd.tmpfiles zabbix-agentd.conf + fi + + fowners root:zabbix /etc/zabbix + fowners zabbix:zabbix \ + /var/lib/zabbix \ + /var/lib/zabbix/home \ + /var/lib/zabbix/scripts \ + /var/lib/zabbix/alertscripts \ + /var/lib/zabbix/externalscripts \ + /var/log/zabbix + fperms 0750 \ + /etc/zabbix \ + /var/lib/zabbix \ + /var/lib/zabbix/home \ + /var/lib/zabbix/scripts \ + /var/lib/zabbix/alertscripts \ + /var/lib/zabbix/externalscripts \ + /var/log/zabbix + + dodoc README INSTALL NEWS ChangeLog \ + conf/zabbix_agentd.conf \ + conf/zabbix_proxy.conf \ + conf/zabbix_agentd/userparameter_examples.conf \ + conf/zabbix_agentd/userparameter_mysql.conf \ + conf/zabbix_server.conf + + if use frontend; then + webapp_src_preinst + cp -R frontends/php/* "${D}/${MY_HTDOCSDIR}" + webapp_configfile \ + "${MY_HTDOCSDIR}"/include/db.inc.php \ + "${MY_HTDOCSDIR}"/include/config.inc.php + webapp_src_install + fi + + if use java; then + dodir \ + /${ZABBIXJAVA_BASE} \ + /${ZABBIXJAVA_BASE}/bin \ + /${ZABBIXJAVA_BASE}/lib + keepdir /${ZABBIXJAVA_BASE} + exeinto /${ZABBIXJAVA_BASE}/bin + doexe src/zabbix_java/bin/zabbix-java-gateway-${MY_PV}.jar + exeinto /${ZABBIXJAVA_BASE}/lib + doexe \ + src/zabbix_java/lib/logback-classic-0.9.27.jar \ + src/zabbix_java/lib/logback-console.xml \ + src/zabbix_java/lib/logback-core-0.9.27.jar \ + src/zabbix_java/lib/logback.xml \ + src/zabbix_java/lib/android-json-4.3_r3.1.jar \ + src/zabbix_java/lib/slf4j-api-1.6.1.jar + newinitd "${FILESDIR}"/zabbix-jmx-proxy.init zabbix-jmx-proxy + newconfd "${FILESDIR}"/zabbix-jmx-proxy.conf zabbix-jmx-proxy + fi +} + +pkg_postinst() { + if use server || use proxy ; then + elog + elog "You may need to configure your database for Zabbix" + elog "if you have not already done so." + elog + + zabbix_homedir=$(egethome zabbix) + if [ -n "${zabbix_homedir}" ] && \ + [ "${zabbix_homedir}" != "/var/lib/zabbix/home" ]; then + ewarn + ewarn "The user 'zabbix' should have his homedir changed" + ewarn "to /var/lib/zabbix/home if you want to use" + ewarn "custom alert scripts." + ewarn + ewarn "A real homedir might be needed for configfiles" + ewarn "for custom alert scripts." + ewarn + ewarn "To change the homedir use:" + ewarn " usermod -d /var/lib/zabbix/home zabbix" + ewarn + fi + fi + + if use server; then + elog + elog "For distributed monitoring you have to run:" + elog + elog "zabbix_server -n <nodeid>" + elog + elog "This will convert database data for use with Node ID" + elog "and also adds a local node." + elog + fi + + elog "--" + elog + elog "You may need to add these lines to /etc/services:" + elog + elog "zabbix-agent 10050/tcp Zabbix Agent" + elog "zabbix-agent 10050/udp Zabbix Agent" + elog "zabbix-trapper 10051/tcp Zabbix Trapper" + elog "zabbix-trapper 10051/udp Zabbix Trapper" + elog + + if use server || use proxy ; then + # check for fping + fping_perms=$(stat -c %a /usr/sbin/fping 2>/dev/null) + case "${fping_perms}" in + 4[157][157][157]) + ;; + *) + ewarn + ewarn "If you want to use the checks 'icmpping' and 'icmppingsec'," + ewarn "you have to make /usr/sbin/fping setuid root and executable" + ewarn "by everyone. Run the following command to fix it:" + ewarn + ewarn " chmod u=rwsx,g=rx,o=rx /usr/sbin/fping" + ewarn + ewarn "Please be aware that this might impose a security risk," + ewarn "depending on the code quality of fping." + ewarn + ;; + esac + fi +} diff --git a/net-analyzer/zabbix/zabbix-5.0.0.ebuild b/net-analyzer/zabbix/zabbix-5.0.0.ebuild new file mode 100644 index 000000000000..c105a7d5d7ea --- /dev/null +++ b/net-analyzer/zabbix/zabbix-5.0.0.ebuild @@ -0,0 +1,347 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +# needed to make webapp-config dep optional +WEBAPP_OPTIONAL="yes" +inherit flag-o-matic webapp java-pkg-opt-2 user systemd toolchain-funcs + +DESCRIPTION="ZABBIX is software for monitoring of your applications, network and servers" +HOMEPAGE="https://www.zabbix.com/" +MY_P=${P/_/} +MY_PV=${PV/_/} +SRC_URI="https://cdn.zabbix.com/${PN}/sources/stable/$(ver_cut 1-2)/${P}.tar.gz" +LICENSE="GPL-2" +SLOT="0" +WEBAPP_MANUAL_SLOT="yes" +KEYWORDS="amd64 x86" +IUSE="+agent java curl frontend ipv6 ldap libxml2 mysql openipmi oracle +postgres proxy server ssh ssl snmp sqlite odbc static" +REQUIRED_USE="|| ( agent frontend proxy server ) + proxy? ( ^^ ( mysql oracle postgres sqlite odbc ) ) + server? ( ^^ ( mysql oracle postgres odbc ) ) + static? ( !oracle !snmp )" + +COMMON_DEPEND=" + curl? ( net-misc/curl ) + java? ( >=virtual/jdk-1.8:* ) + ldap? ( + =dev-libs/cyrus-sasl-2* + net-libs/gnutls + net-nds/openldap + ) + libxml2? ( dev-libs/libxml2 ) + mysql? ( dev-db/mysql-connector-c ) + odbc? ( dev-db/unixODBC ) + openipmi? ( sys-libs/openipmi ) + oracle? ( dev-db/oracle-instantclient-basic ) + postgres? ( dev-db/postgresql:* ) + proxy? ( sys-libs/zlib ) + server? ( + dev-libs/libevent + sys-libs/zlib + ) + snmp? ( net-analyzer/net-snmp ) + sqlite? ( dev-db/sqlite ) + ssh? ( net-libs/libssh2 ) + ssl? ( dev-libs/openssl:=[-bindist] ) +" + +RDEPEND="${COMMON_DEPEND} + java? ( >=virtual/jre-1.8:* ) + mysql? ( virtual/mysql ) + proxy? ( net-analyzer/fping[suid] ) + server? ( + app-admin/webapp-config + dev-libs/libevent + dev-libs/libpcre + net-analyzer/fping[suid] + ) + frontend? ( + app-admin/webapp-config + dev-lang/php:*[bcmath,ctype,sockets,gd,truetype,xml,session,xmlreader,xmlwriter,nls,sysvipc,unicode] + media-libs/gd[png] + virtual/httpd-php:* + mysql? ( dev-lang/php[mysqli] ) + odbc? ( dev-lang/php[odbc] ) + oracle? ( dev-lang/php[oci8-instant-client] ) + postgres? ( dev-lang/php[postgres] ) + sqlite? ( dev-lang/php[sqlite] ) + ) +" +DEPEND="${COMMON_DEPEND} + static? ( + curl? ( net-misc/curl[static-libs] ) + ldap? ( + =dev-libs/cyrus-sasl-2*[static-libs] + net-libs/gnutls[static-libs] + net-nds/openldap[static-libs] + ) + libxml2? ( dev-libs/libxml2[static-libs] ) + mysql? ( dev-db/mysql-connector-c[static-libs] ) + odbc? ( dev-db/unixODBC[static-libs] ) + postgres? ( dev-db/postgresql:*[static-libs] ) + sqlite? ( dev-db/sqlite[static-libs] ) + ssh? ( net-libs/libssh2 ) + ) +" +BDEPEND=" + virtual/pkgconfig +" + +PATCHES=( + "${FILESDIR}/${PN}-4.0.18-modulepathfix.patch" + "${FILESDIR}/${PN}-3.0.30-security-disable-PidFile.patch" +) + +S=${WORKDIR}/${MY_P} + +ZABBIXJAVA_BASE="opt/zabbix_java" + +pkg_setup() { + if use oracle; then + if [ -z "${ORACLE_HOME}" ]; then + eerror + eerror "The environment variable ORACLE_HOME must be set" + eerror "and point to the correct location." + eerror "It looks like you don't have Oracle installed." + eerror + die "Environment variable ORACLE_HOME is not set" + fi + if has_version 'dev-db/oracle-instantclient-basic'; then + ewarn + ewarn "Please ensure you have a full install of the Oracle client." + ewarn "dev-db/oracle-instantclient* is NOT sufficient." + ewarn + fi + fi + + if use frontend; then + webapp_pkg_setup + fi + + enewgroup zabbix + enewuser zabbix -1 -1 /var/lib/zabbix/home zabbix + + java-pkg-opt-2_pkg_setup +} + +src_prepare() { + default +} + +src_configure() { + econf \ + $(use_enable agent) \ + $(use_enable ipv6) \ + $(use_enable java) \ + $(use_enable proxy) \ + $(use_enable server) \ + $(use_enable static) \ + $(use_with curl libcurl) \ + $(use_with ldap) \ + $(use_with libxml2) \ + $(use_with mysql) \ + $(use_with odbc unixodbc) \ + $(use_with openipmi openipmi) \ + $(use_with oracle) \ + $(use_with postgres postgresql) \ + $(use_with snmp net-snmp) \ + $(use_with sqlite sqlite3) \ + $(use_with ssh ssh2) \ + $(use_with ssl openssl) +} + +src_compile() { + if [ -f Makefile ] || [ -f GNUmakefile ] || [ -f makefile ]; then + emake AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" + fi +} + +src_install() { + local dirs=( + /etc/zabbix + /var/lib/zabbix + /var/lib/zabbix/home + /var/lib/zabbix/scripts + /var/lib/zabbix/alertscripts + /var/lib/zabbix/externalscripts + /var/log/zabbix + ) + + for dir in "${dirs[@]}"; do + dodir "${dir}" + keepdir "${dir}" + done + + if use server; then + insinto /etc/zabbix + doins "${S}"/conf/zabbix_server.conf + fperms 0640 /etc/zabbix/zabbix_server.conf + fowners root:zabbix /etc/zabbix/zabbix_server.conf + + newinitd "${FILESDIR}"/zabbix-server.init zabbix-server + + dosbin src/zabbix_server/zabbix_server + + insinto /usr/share/zabbix + doins -r "${S}"/database/ + + systemd_dounit "${FILESDIR}"/zabbix-server.service + systemd_newtmpfilesd "${FILESDIR}"/zabbix-server.tmpfiles zabbix-server.conf + fi + + if use proxy; then + insinto /etc/zabbix + doins "${S}"/conf/zabbix_proxy.conf + fperms 0640 /etc/zabbix/zabbix_proxy.conf + fowners root:zabbix /etc/zabbix/zabbix_proxy.conf + + newinitd "${FILESDIR}"/zabbix-proxy.init zabbix-proxy + + dosbin src/zabbix_proxy/zabbix_proxy + + insinto /usr/share/zabbix + doins -r "${S}"/database/ + + systemd_dounit "${FILESDIR}"/zabbix-proxy.service + systemd_newtmpfilesd "${FILESDIR}"/zabbix-proxy.tmpfiles zabbix-proxy.conf + fi + + if use agent; then + insinto /etc/zabbix + doins "${S}"/conf/zabbix_agentd.conf + fperms 0640 /etc/zabbix/zabbix_agentd.conf + fowners root:zabbix /etc/zabbix/zabbix_agentd.conf + + newinitd "${FILESDIR}"/zabbix-agentd.init zabbix-agentd + + dosbin src/zabbix_agent/zabbix_agentd + dobin \ + src/zabbix_sender/zabbix_sender \ + src/zabbix_get/zabbix_get + + systemd_dounit "${FILESDIR}"/zabbix-agentd.service + systemd_newtmpfilesd "${FILESDIR}"/zabbix-agentd.tmpfiles zabbix-agentd.conf + fi + + fowners root:zabbix /etc/zabbix + fowners zabbix:zabbix \ + /var/lib/zabbix \ + /var/lib/zabbix/home \ + /var/lib/zabbix/scripts \ + /var/lib/zabbix/alertscripts \ + /var/lib/zabbix/externalscripts \ + /var/log/zabbix + fperms 0750 \ + /etc/zabbix \ + /var/lib/zabbix \ + /var/lib/zabbix/home \ + /var/lib/zabbix/scripts \ + /var/lib/zabbix/alertscripts \ + /var/lib/zabbix/externalscripts \ + /var/log/zabbix + + dodoc README INSTALL NEWS ChangeLog \ + conf/zabbix_agentd.conf \ + conf/zabbix_proxy.conf \ + conf/zabbix_agentd/userparameter_examples.conf \ + conf/zabbix_agentd/userparameter_mysql.conf \ + conf/zabbix_server.conf + + if use frontend; then + webapp_src_preinst + cp -R ui/* "${D}/${MY_HTDOCSDIR}" + webapp_configfile \ + "${MY_HTDOCSDIR}"/include/db.inc.php \ + "${MY_HTDOCSDIR}"/include/config.inc.php + webapp_src_install + fi + + if use java; then + dodir \ + /${ZABBIXJAVA_BASE} \ + /${ZABBIXJAVA_BASE}/bin \ + /${ZABBIXJAVA_BASE}/lib + keepdir /${ZABBIXJAVA_BASE} + exeinto /${ZABBIXJAVA_BASE}/bin + doexe src/zabbix_java/bin/zabbix-java-gateway-${MY_PV}.jar + exeinto /${ZABBIXJAVA_BASE}/lib + doexe \ + src/zabbix_java/lib/logback-classic-0.9.27.jar \ + src/zabbix_java/lib/logback-console.xml \ + src/zabbix_java/lib/logback-core-0.9.27.jar \ + src/zabbix_java/lib/logback.xml \ + src/zabbix_java/lib/android-json-4.3_r3.1.jar \ + src/zabbix_java/lib/slf4j-api-1.6.1.jar + newinitd "${FILESDIR}"/zabbix-jmx-proxy.init zabbix-jmx-proxy + newconfd "${FILESDIR}"/zabbix-jmx-proxy.conf zabbix-jmx-proxy + fi +} + +pkg_postinst() { + if use server || use proxy ; then + elog + elog "You may need to configure your database for Zabbix" + elog "if you have not already done so." + elog + + zabbix_homedir=$(egethome zabbix) + if [ -n "${zabbix_homedir}" ] && \ + [ "${zabbix_homedir}" != "/var/lib/zabbix/home" ]; then + ewarn + ewarn "The user 'zabbix' should have his homedir changed" + ewarn "to /var/lib/zabbix/home if you want to use" + ewarn "custom alert scripts." + ewarn + ewarn "A real homedir might be needed for configfiles" + ewarn "for custom alert scripts." + ewarn + ewarn "To change the homedir use:" + ewarn " usermod -d /var/lib/zabbix/home zabbix" + ewarn + fi + fi + + if use server; then + elog + elog "For distributed monitoring you have to run:" + elog + elog "zabbix_server -n <nodeid>" + elog + elog "This will convert database data for use with Node ID" + elog "and also adds a local node." + elog + fi + + elog "--" + elog + elog "You may need to add these lines to /etc/services:" + elog + elog "zabbix-agent 10050/tcp Zabbix Agent" + elog "zabbix-agent 10050/udp Zabbix Agent" + elog "zabbix-trapper 10051/tcp Zabbix Trapper" + elog "zabbix-trapper 10051/udp Zabbix Trapper" + elog + + if use server || use proxy ; then + # check for fping + fping_perms=$(stat -c %a /usr/sbin/fping 2>/dev/null) + case "${fping_perms}" in + 4[157][157][157]) + ;; + *) + ewarn + ewarn "If you want to use the checks 'icmpping' and 'icmppingsec'," + ewarn "you have to make /usr/sbin/fping setuid root and executable" + ewarn "by everyone. Run the following command to fix it:" + ewarn + ewarn " chmod u=rwsx,g=rx,o=rx /usr/sbin/fping" + ewarn + ewarn "Please be aware that this might impose a security risk," + ewarn "depending on the code quality of fping." + ewarn + ;; + esac + fi +} diff --git a/net-analyzer/zabbix/zabbix-5.0.1.ebuild b/net-analyzer/zabbix/zabbix-5.0.1.ebuild new file mode 100644 index 000000000000..e393d4a24eba --- /dev/null +++ b/net-analyzer/zabbix/zabbix-5.0.1.ebuild @@ -0,0 +1,347 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +# needed to make webapp-config dep optional +WEBAPP_OPTIONAL="yes" +inherit flag-o-matic webapp java-pkg-opt-2 user systemd toolchain-funcs + +DESCRIPTION="ZABBIX is software for monitoring of your applications, network and servers" +HOMEPAGE="https://www.zabbix.com/" +MY_P=${P/_/} +MY_PV=${PV/_/} +SRC_URI="https://cdn.zabbix.com/${PN}/sources/stable/$(ver_cut 1-2)/${P}.tar.gz" +LICENSE="GPL-2" +SLOT="0" +WEBAPP_MANUAL_SLOT="yes" +KEYWORDS="~amd64 ~x86" +IUSE="+agent java curl frontend ipv6 ldap libxml2 mysql openipmi oracle +postgres proxy server ssh ssl snmp sqlite odbc static" +REQUIRED_USE="|| ( agent frontend proxy server ) + proxy? ( ^^ ( mysql oracle postgres sqlite odbc ) ) + server? ( ^^ ( mysql oracle postgres odbc ) ) + static? ( !oracle !snmp )" + +COMMON_DEPEND=" + curl? ( net-misc/curl ) + java? ( >=virtual/jdk-1.8:* ) + ldap? ( + =dev-libs/cyrus-sasl-2* + net-libs/gnutls + net-nds/openldap + ) + libxml2? ( dev-libs/libxml2 ) + mysql? ( dev-db/mysql-connector-c ) + odbc? ( dev-db/unixODBC ) + openipmi? ( sys-libs/openipmi ) + oracle? ( dev-db/oracle-instantclient-basic ) + postgres? ( dev-db/postgresql:* ) + proxy? ( sys-libs/zlib ) + server? ( + dev-libs/libevent + sys-libs/zlib + ) + snmp? ( net-analyzer/net-snmp ) + sqlite? ( dev-db/sqlite ) + ssh? ( net-libs/libssh2 ) + ssl? ( dev-libs/openssl:=[-bindist] ) +" + +RDEPEND="${COMMON_DEPEND} + java? ( >=virtual/jre-1.8:* ) + mysql? ( virtual/mysql ) + proxy? ( net-analyzer/fping[suid] ) + server? ( + app-admin/webapp-config + dev-libs/libevent + dev-libs/libpcre + net-analyzer/fping[suid] + ) + frontend? ( + app-admin/webapp-config + dev-lang/php:*[bcmath,ctype,sockets,gd,truetype,xml,session,xmlreader,xmlwriter,nls,sysvipc,unicode] + media-libs/gd[png] + virtual/httpd-php:* + mysql? ( dev-lang/php[mysqli] ) + odbc? ( dev-lang/php[odbc] ) + oracle? ( dev-lang/php[oci8-instant-client] ) + postgres? ( dev-lang/php[postgres] ) + sqlite? ( dev-lang/php[sqlite] ) + ) +" +DEPEND="${COMMON_DEPEND} + static? ( + curl? ( net-misc/curl[static-libs] ) + ldap? ( + =dev-libs/cyrus-sasl-2*[static-libs] + net-libs/gnutls[static-libs] + net-nds/openldap[static-libs] + ) + libxml2? ( dev-libs/libxml2[static-libs] ) + mysql? ( dev-db/mysql-connector-c[static-libs] ) + odbc? ( dev-db/unixODBC[static-libs] ) + postgres? ( dev-db/postgresql:*[static-libs] ) + sqlite? ( dev-db/sqlite[static-libs] ) + ssh? ( net-libs/libssh2 ) + ) +" +BDEPEND=" + virtual/pkgconfig +" + +PATCHES=( + "${FILESDIR}/${PN}-4.0.18-modulepathfix.patch" + "${FILESDIR}/${PN}-3.0.30-security-disable-PidFile.patch" +) + +S=${WORKDIR}/${MY_P} + +ZABBIXJAVA_BASE="opt/zabbix_java" + +pkg_setup() { + if use oracle; then + if [ -z "${ORACLE_HOME}" ]; then + eerror + eerror "The environment variable ORACLE_HOME must be set" + eerror "and point to the correct location." + eerror "It looks like you don't have Oracle installed." + eerror + die "Environment variable ORACLE_HOME is not set" + fi + if has_version 'dev-db/oracle-instantclient-basic'; then + ewarn + ewarn "Please ensure you have a full install of the Oracle client." + ewarn "dev-db/oracle-instantclient* is NOT sufficient." + ewarn + fi + fi + + if use frontend; then + webapp_pkg_setup + fi + + enewgroup zabbix + enewuser zabbix -1 -1 /var/lib/zabbix/home zabbix + + java-pkg-opt-2_pkg_setup +} + +src_prepare() { + default +} + +src_configure() { + econf \ + $(use_enable agent) \ + $(use_enable ipv6) \ + $(use_enable java) \ + $(use_enable proxy) \ + $(use_enable server) \ + $(use_enable static) \ + $(use_with curl libcurl) \ + $(use_with ldap) \ + $(use_with libxml2) \ + $(use_with mysql) \ + $(use_with odbc unixodbc) \ + $(use_with openipmi openipmi) \ + $(use_with oracle) \ + $(use_with postgres postgresql) \ + $(use_with snmp net-snmp) \ + $(use_with sqlite sqlite3) \ + $(use_with ssh ssh2) \ + $(use_with ssl openssl) +} + +src_compile() { + if [ -f Makefile ] || [ -f GNUmakefile ] || [ -f makefile ]; then + emake AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" + fi +} + +src_install() { + local dirs=( + /etc/zabbix + /var/lib/zabbix + /var/lib/zabbix/home + /var/lib/zabbix/scripts + /var/lib/zabbix/alertscripts + /var/lib/zabbix/externalscripts + /var/log/zabbix + ) + + for dir in "${dirs[@]}"; do + dodir "${dir}" + keepdir "${dir}" + done + + if use server; then + insinto /etc/zabbix + doins "${S}"/conf/zabbix_server.conf + fperms 0640 /etc/zabbix/zabbix_server.conf + fowners root:zabbix /etc/zabbix/zabbix_server.conf + + newinitd "${FILESDIR}"/zabbix-server.init zabbix-server + + dosbin src/zabbix_server/zabbix_server + + insinto /usr/share/zabbix + doins -r "${S}"/database/ + + systemd_dounit "${FILESDIR}"/zabbix-server.service + systemd_newtmpfilesd "${FILESDIR}"/zabbix-server.tmpfiles zabbix-server.conf + fi + + if use proxy; then + insinto /etc/zabbix + doins "${S}"/conf/zabbix_proxy.conf + fperms 0640 /etc/zabbix/zabbix_proxy.conf + fowners root:zabbix /etc/zabbix/zabbix_proxy.conf + + newinitd "${FILESDIR}"/zabbix-proxy.init zabbix-proxy + + dosbin src/zabbix_proxy/zabbix_proxy + + insinto /usr/share/zabbix + doins -r "${S}"/database/ + + systemd_dounit "${FILESDIR}"/zabbix-proxy.service + systemd_newtmpfilesd "${FILESDIR}"/zabbix-proxy.tmpfiles zabbix-proxy.conf + fi + + if use agent; then + insinto /etc/zabbix + doins "${S}"/conf/zabbix_agentd.conf + fperms 0640 /etc/zabbix/zabbix_agentd.conf + fowners root:zabbix /etc/zabbix/zabbix_agentd.conf + + newinitd "${FILESDIR}"/zabbix-agentd.init zabbix-agentd + + dosbin src/zabbix_agent/zabbix_agentd + dobin \ + src/zabbix_sender/zabbix_sender \ + src/zabbix_get/zabbix_get + + systemd_dounit "${FILESDIR}"/zabbix-agentd.service + systemd_newtmpfilesd "${FILESDIR}"/zabbix-agentd.tmpfiles zabbix-agentd.conf + fi + + fowners root:zabbix /etc/zabbix + fowners zabbix:zabbix \ + /var/lib/zabbix \ + /var/lib/zabbix/home \ + /var/lib/zabbix/scripts \ + /var/lib/zabbix/alertscripts \ + /var/lib/zabbix/externalscripts \ + /var/log/zabbix + fperms 0750 \ + /etc/zabbix \ + /var/lib/zabbix \ + /var/lib/zabbix/home \ + /var/lib/zabbix/scripts \ + /var/lib/zabbix/alertscripts \ + /var/lib/zabbix/externalscripts \ + /var/log/zabbix + + dodoc README INSTALL NEWS ChangeLog \ + conf/zabbix_agentd.conf \ + conf/zabbix_proxy.conf \ + conf/zabbix_agentd/userparameter_examples.conf \ + conf/zabbix_agentd/userparameter_mysql.conf \ + conf/zabbix_server.conf + + if use frontend; then + webapp_src_preinst + cp -R ui/* "${D}/${MY_HTDOCSDIR}" + webapp_configfile \ + "${MY_HTDOCSDIR}"/include/db.inc.php \ + "${MY_HTDOCSDIR}"/include/config.inc.php + webapp_src_install + fi + + if use java; then + dodir \ + /${ZABBIXJAVA_BASE} \ + /${ZABBIXJAVA_BASE}/bin \ + /${ZABBIXJAVA_BASE}/lib + keepdir /${ZABBIXJAVA_BASE} + exeinto /${ZABBIXJAVA_BASE}/bin + doexe src/zabbix_java/bin/zabbix-java-gateway-${MY_PV}.jar + exeinto /${ZABBIXJAVA_BASE}/lib + doexe \ + src/zabbix_java/lib/logback-classic-0.9.27.jar \ + src/zabbix_java/lib/logback-console.xml \ + src/zabbix_java/lib/logback-core-0.9.27.jar \ + src/zabbix_java/lib/logback.xml \ + src/zabbix_java/lib/android-json-4.3_r3.1.jar \ + src/zabbix_java/lib/slf4j-api-1.6.1.jar + newinitd "${FILESDIR}"/zabbix-jmx-proxy.init zabbix-jmx-proxy + newconfd "${FILESDIR}"/zabbix-jmx-proxy.conf zabbix-jmx-proxy + fi +} + +pkg_postinst() { + if use server || use proxy ; then + elog + elog "You may need to configure your database for Zabbix" + elog "if you have not already done so." + elog + + zabbix_homedir=$(egethome zabbix) + if [ -n "${zabbix_homedir}" ] && \ + [ "${zabbix_homedir}" != "/var/lib/zabbix/home" ]; then + ewarn + ewarn "The user 'zabbix' should have his homedir changed" + ewarn "to /var/lib/zabbix/home if you want to use" + ewarn "custom alert scripts." + ewarn + ewarn "A real homedir might be needed for configfiles" + ewarn "for custom alert scripts." + ewarn + ewarn "To change the homedir use:" + ewarn " usermod -d /var/lib/zabbix/home zabbix" + ewarn + fi + fi + + if use server; then + elog + elog "For distributed monitoring you have to run:" + elog + elog "zabbix_server -n <nodeid>" + elog + elog "This will convert database data for use with Node ID" + elog "and also adds a local node." + elog + fi + + elog "--" + elog + elog "You may need to add these lines to /etc/services:" + elog + elog "zabbix-agent 10050/tcp Zabbix Agent" + elog "zabbix-agent 10050/udp Zabbix Agent" + elog "zabbix-trapper 10051/tcp Zabbix Trapper" + elog "zabbix-trapper 10051/udp Zabbix Trapper" + elog + + if use server || use proxy ; then + # check for fping + fping_perms=$(stat -c %a /usr/sbin/fping 2>/dev/null) + case "${fping_perms}" in + 4[157][157][157]) + ;; + *) + ewarn + ewarn "If you want to use the checks 'icmpping' and 'icmppingsec'," + ewarn "you have to make /usr/sbin/fping setuid root and executable" + ewarn "by everyone. Run the following command to fix it:" + ewarn + ewarn " chmod u=rwsx,g=rx,o=rx /usr/sbin/fping" + ewarn + ewarn "Please be aware that this might impose a security risk," + ewarn "depending on the code quality of fping." + ewarn + ;; + esac + fi +} diff --git a/net-analyzer/zmap/Manifest b/net-analyzer/zmap/Manifest new file mode 100644 index 000000000000..c31ac5b49776 --- /dev/null +++ b/net-analyzer/zmap/Manifest @@ -0,0 +1 @@ +DIST zmap-2.1.1.tar.gz 131689 BLAKE2B c4bcea835b080dca879c227691230ad135d1822db0b81245ea60963b0a78ac71fd64df7ddca5d5a762c3d7dc67f2d689fd9d0d13e0ee9be21033de75c61ebd1f SHA512 9d62dceff77fa20ff5945516b0766340366175947130bb844f19c11dac7676e658bcdedd6be29ffc945706aa3cdc0e4ac207bd127b618592769a4d3e75892857 diff --git a/net-analyzer/zmap/metadata.xml b/net-analyzer/zmap/metadata.xml new file mode 100644 index 000000000000..2a7e46f164d3 --- /dev/null +++ b/net-analyzer/zmap/metadata.xml @@ -0,0 +1,31 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>jlec@gentoo.org</email> + </maintainer> + <longdescription> +ZMap is an open-source network scanner that enables researchers to easily +perform Internet-wide network studies. With a single machine and a well +provisioned network uplink, ZMap is capable of performing a complete scan of +the IPv4 address space in under 45 minutes, approaching the theoretical limit +of gigabit Ethernet. + +ZMap can be used to study protocol adoption over time, monitor service +availability, and help us better understand large systems distributed +across the Internet. + </longdescription> + <use> + <flag name="json">Add support to store results JSON based</flag> + <flag name="mongo"> + Add support for storing in a mongo DB via <pkg>dev-db/mongodb</pkg> + </flag> + <flag name="redis"> + Add support for storing in a redis DB via <pkg>dev-libs/hiredis</pkg> + </flag> + </use> + <upstream> + <remote-id type="github">zmap/zmap</remote-id> + </upstream> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/zmap/zmap-2.1.1.ebuild b/net-analyzer/zmap/zmap-2.1.1.ebuild new file mode 100644 index 000000000000..bab11e96bbfc --- /dev/null +++ b/net-analyzer/zmap/zmap-2.1.1.ebuild @@ -0,0 +1,46 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +inherit cmake-utils fcaps + +DESCRIPTION="Fast network scanner designed for Internet-wide network surveys" +HOMEPAGE="https://zmap.io/" +SRC_URI="https://github.com/${PN}/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" + +SLOT="0" +LICENSE="Apache-2.0" +KEYWORDS="~amd64 ~arm ~x86" +IUSE="json mongo redis" + +RDEPEND=" + dev-libs/gmp:0 + net-libs/libpcap + dev-libs/json-c:= + mongo? ( dev-db/mongodb ) + redis? ( dev-libs/hiredis )" +DEPEND="${RDEPEND} + dev-util/gengetopt + sys-devel/flex + dev-util/byacc" + +src_prepare() { + sed \ + -e '/ggo/s:CMAKE_CURRENT_SOURCE_DIR}:CMAKE_BINARY_DIR}/src:g' \ + -i src/CMakeLists.txt || die + cmake-utils_src_prepare +} + +src_configure() { + local mycmakeargs=( + -DENABLE_DEVELOPMENT=OFF + -DENABLE_HARDENING=OFF + -DWITH_WERROR=OFF + -DWITH_mongo="$(usex mongo)" + -DWITH_redis="$(usex redis)" + ) + cmake-utils_src_configure +} + +FILECAPS=( cap_net_raw=ep usr/sbin/zmap ) diff --git a/net-analyzer/zmap/zmap-9999.ebuild b/net-analyzer/zmap/zmap-9999.ebuild new file mode 100644 index 000000000000..eaed24c6933d --- /dev/null +++ b/net-analyzer/zmap/zmap-9999.ebuild @@ -0,0 +1,41 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +inherit cmake-utils fcaps git-r3 + +DESCRIPTION="Fast network scanner designed for Internet-wide network surveys" +HOMEPAGE="https://zmap.io/" +SRC_URI="" +EGIT_REPO_URI="https://github.com/${PN}/${PN}.git" + +SLOT="0" +LICENSE="Apache-2.0" +KEYWORDS="" +IUSE="mongo redis" + +RDEPEND=" + dev-libs/gmp:0 + net-libs/libpcap + dev-libs/json-c:= + mongo? ( dev-db/mongodb ) + redis? ( dev-libs/hiredis )" +DEPEND="${RDEPEND} + dev-util/gengetopt + sys-devel/flex + dev-util/byacc +" + +src_configure() { + local mycmakeargs=( + -DENABLE_DEVELOPMENT=OFF + -DENABLE_HARDENING=OFF + -DWITH_WERROR=OFF + -DWITH_mongo="$(usex mongo)" + -DWITH_redis="$(usex redis)" + ) + cmake-utils_src_configure +} + +FILECAPS=( cap_net_raw=ep usr/sbin/zmap ) diff --git a/net-analyzer/zniper/Manifest b/net-analyzer/zniper/Manifest new file mode 100644 index 000000000000..f7032d535abf --- /dev/null +++ b/net-analyzer/zniper/Manifest @@ -0,0 +1 @@ +DIST zniper-1.0.tgz 20324 BLAKE2B ac13d55e6b59128a0336a27b73b356800d7cc4f1aea82997aee967f26b33e05f62e740ae034bea54ffb15109e3841fe503591d631be843f123466e941461037b SHA512 052683628c8094c402fd042b6329ca799bab594debf35c4e8b4f422e58b67f1acba8b40b335e519f1d2f1baca6c716be40718fd1089020a86c97c011da7003d1 diff --git a/net-analyzer/zniper/metadata.xml b/net-analyzer/zniper/metadata.xml new file mode 100644 index 000000000000..bd13a914477c --- /dev/null +++ b/net-analyzer/zniper/metadata.xml @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<maintainer type="project"> + <email>netmon@gentoo.org</email> + <name>Gentoo network monitoring and analysis project</name> +</maintainer> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/net-analyzer/zniper/zniper-1.0-r1.ebuild b/net-analyzer/zniper/zniper-1.0-r1.ebuild new file mode 100644 index 000000000000..dae03274def1 --- /dev/null +++ b/net-analyzer/zniper/zniper-1.0-r1.ebuild @@ -0,0 +1,45 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 +inherit toolchain-funcs + +DESCRIPTION="Displays and kill active TCP connections seen by the selected interface" +HOMEPAGE="http://www.signedness.org/tools/" +SRC_URI="https://dev.gentoo.org/~jer/${P}.tgz" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="amd64 x86" + +DEPEND=" + net-libs/libpcap + sys-libs/ncurses +" +RDEPEND=" + ${DEPEND} + virtual/pkgconfig +" + +S=${WORKDIR}/"zniper" + +src_prepare() { + sed -i \ + -e 's| -o | $(LDFLAGS)&|g' \ + -e 's|@make|@$(MAKE)|g' \ + -e 's|-lncurses|$(shell $(PKG_CONFIG) --libs ncurses)|g' \ + Makefile || die + tc-export PKG_CONFIG +} + +src_compile() { + emake \ + CC=$(tc-getCC) \ + CFLAGS="${CFLAGS}" \ + linux_x86 +} + +src_install() { + dobin zniper + doman zniper.1 +} |
