summaryrefslogtreecommitdiff
path: root/net-analyzer/ifstat
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /net-analyzer/ifstat
reinit the tree, so we can have metadata
Diffstat (limited to 'net-analyzer/ifstat')
-rw-r--r--net-analyzer/ifstat/Manifest7
-rw-r--r--net-analyzer/ifstat/files/ifstat-1.1-hardened.patch11
-rw-r--r--net-analyzer/ifstat/files/ifstat-1.1-make.patch122
-rw-r--r--net-analyzer/ifstat/ifstat-1.1-r2.ebuild31
-rw-r--r--net-analyzer/ifstat/metadata.xml15
5 files changed, 186 insertions, 0 deletions
diff --git a/net-analyzer/ifstat/Manifest b/net-analyzer/ifstat/Manifest
new file mode 100644
index 000000000000..3ef83e89c4e8
--- /dev/null
+++ b/net-analyzer/ifstat/Manifest
@@ -0,0 +1,7 @@
+AUX ifstat-1.1-hardened.patch 416 SHA256 22b1bdf05e08fdb5eef02cadb7a24cb6151b51a81c79e23e0185f47004c397e4 SHA512 64ff9119a6c492f0d011fcc0868425479b4b9bb8520b4f5e8323b106b9be555e763a9e73ef1e6833f652ebb51d048611d3504b26a94adebf5e21cd695c4417fc WHIRLPOOL c38c62cd68d53f454d6a2eea45b6be2c7428b4f41a6421910075b9a2041a444a33953f56d5ce06527abc16249ca1e7372d71d08a32bdedcdc5deaa762c5ddce4
+AUX ifstat-1.1-make.patch 4110 SHA256 39f9ed8be68feb08c62ca9f8aa435db1fa464b769b527f55b7d038cea4779cee SHA512 28b292b00b465a44344556c8f96bb237a0185ac176f0bea2374a0d6c03bc834997450c0c152a00a469f2a6837c3f60aa66cc85615d50cb5aeec1a379e155775a WHIRLPOOL 095572614e353fa647cf2f532f7c784f4241e2c307f3852e6ee7d443b79e06f56f2c619d67f68d0b2d2bc21a25a1121e26741529649b4bdb81d74ed2805dce23
+DIST ifstat-1.1.tar.gz 67920 SHA256 8599063b7c398f9cfef7a9ec699659b25b1c14d2bc0f535aed05ce32b7d9f507 SHA512 b1aef8e7b14cbf265e2d42277478fd12a565287f90f37b0a826ba3e7d29640df757c7d56f149e406bf5890663ed734b2c658c4f1e2b258ded3649f2fc3e9ac64 WHIRLPOOL 9db65eafd8306e0059dd08c34db4eb17dfcef1b32dd7b3bbad21501afc8aedf40a694367fde98d5204d4dcae4f915bb1f2f4301bc3eec3326c80e031097492ba
+EBUILD ifstat-1.1-r2.ebuild 678 SHA256 2a69c264a5368b3992925a6d0daf230f89b87f6e999ddecb5195541926ebd40c SHA512 e9ce902a81a8f5d713f698578affa6afae32597b909111565dc4d4ab0536b53aac6960180f1f8154323551d988b3744c1819a5a3d67f9ec9e0d0358412146935 WHIRLPOOL bf89f4c0a620f4c62ce1b7c811d10cd9afbfa9d7b9bb263d2038c5777631b79186d7de309234d40c831906afd612959e982451aad4e531f1cf6cfb4a215559a7
+MISC ChangeLog 2496 SHA256 84740446b41dd04c248213d1513da224d764649978052c1b3568a7248fe18206 SHA512 8edd06919c754d0304878f418cbc226e15663edf3ceb59c9ae7000b80550e70be681bbb5a7366511e5913d577e8eb8b1e4dfa5057b10cc9bb390f4855dc6767f WHIRLPOOL c8cef553cd00e1743a6da6775bbc3688647281cad3b38290f7fab587a15b8864474ee3014405bdff08295cde8de452a7504f620f68c5bfb716fc2e67889df719
+MISC ChangeLog-2015 4168 SHA256 de045499cec921fbe2a951ecbcc89b4f27946c44c564e7254107bf33e67de4f9 SHA512 ab64dfa069cf8e624606b03d349ce3864a0ee636ce278e6dbfc91b0e30806d3ae188c2ad63255fa75cbbea9f087aec292da616cfd2e5dbbc663e8b3a58a47d42 WHIRLPOOL 9d8d21b4c7c7d357d880b66d445b61f30f5881426e17dd8d1aa23811110a4610d4a7afddbf1068cda1c4657734948c54512605c0520ae0b8d582e10e826f30af
+MISC metadata.xml 491 SHA256 6d8332e02c852cbf52096a4d0137d1ebebdf1c78f8c4dd76934fe2901974a35d SHA512 8635cf579260c356913a3905758c92a7ae05edb211add2031311f2a2b1970da2bf02657c7071960ed7a5162124937a9f727050a609120847c88b5392a4a7a3e7 WHIRLPOOL 5a666a6c13afc4c1e848e0adf8850457b9e78fdd2501db40b85d36c8e6eceb70a6056e8c61309f4d62fc1fd287e048d5ff80ab55749771e685f191553cfbfca8
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..98a8a89c5741
--- /dev/null
+++ b/net-analyzer/ifstat/ifstat-1.1-r2.ebuild
@@ -0,0 +1,31 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=4
+inherit autotools eutils
+
+IUSE="snmp"
+
+DESCRIPTION="Network interface bandwidth usage, with support for snmp targets"
+SRC_URI="http://gael.roualland.free.fr/ifstat/${P}.tar.gz"
+HOMEPAGE="http://gael.roualland.free.fr/ifstat/"
+
+SLOT="0"
+LICENSE="GPL-2"
+KEYWORDS="~alpha amd64 hppa ~mips ppc ppc64 sparc x86"
+
+DEPEND="snmp? ( >=net-analyzer/net-snmp-5.0 )"
+RDEPEND="${DEPEND}"
+
+DOCS=( HISTORY README TODO )
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-make.patch
+ epatch "${FILESDIR}"/${P}-hardened.patch
+
+ 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..eb3a67f58626
--- /dev/null
+++ b/net-analyzer/ifstat/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>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>
+</pkgmetadata>