Update to iftop 1.0pre2.

Better than what we have in tree, and upstream is practically dead.
Tested on amd64/ppc/sparc64.
From Brad, MAINTAINER timeout.
This commit is contained in:
landry 2012-07-16 08:49:38 +00:00
parent cbcacca97f
commit 3c6705d52c
4 changed files with 21 additions and 25 deletions

View File

@ -1,9 +1,8 @@
# $OpenBSD: Makefile,v 1.7 2012/01/26 08:03:57 ajacoutot Exp $
# $OpenBSD: Makefile,v 1.8 2012/07/16 08:49:38 landry Exp $
COMMENT = display bandwidth usage on an inteface
DISTNAME = iftop-0.17
REVISION = 2
DISTNAME = iftop-1.0pre2
CATEGORIES = net
HOMEPAGE = http://www.ex-parrot.com/~pdw/iftop/
@ -16,16 +15,12 @@ PERMIT_PACKAGE_FTP = Yes
PERMIT_DISTFILES_CDROM =Yes
PERMIT_DISTFILES_FTP = Yes
WANTLIB = c curses m pcap pthread
WANTLIB = c ncursesw m pcap pthread
MASTER_SITES = ${HOMEPAGE}download/
CONFIGURE_STYLE = gnu dest
USE_GROFF = Yes
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/iftop ${PREFIX}/bin
${INSTALL_MAN} ${WRKSRC}/iftop.8 ${PREFIX}/man/man8
CONFIGURE_STYLE = gnu
NO_REGRESS = Yes

View File

@ -1,5 +1,5 @@
MD5 (iftop-0.17.tar.gz) = BivI+zhWWAMZhXMm4Lh1LQ==
RMD160 (iftop-0.17.tar.gz) = ARH909K6BorNQdknnJh9ZpmEBzY=
SHA1 (iftop-0.17.tar.gz) = dc5q/IwL+FEniwoV5m9SOvkM/ak=
SHA256 (iftop-0.17.tar.gz) = 0DJUfHCDBxWf9f0N8j69PPp3mcMVNvoK6hggMYqODqw=
SIZE (iftop-0.17.tar.gz) = 160381
MD5 (iftop-1.0pre2.tar.gz) = /vUhpJ7AEiRY0CxkISrzxQ==
RMD160 (iftop-1.0pre2.tar.gz) = ARrEOVFOvdF9RBwdlyUSQhTxkqw=
SHA1 (iftop-1.0pre2.tar.gz) = 1NxHP4JjGSM02mKJtp4QKkrn354=
SHA256 (iftop-1.0pre2.tar.gz) = GxkwN7swGa+uiM2UyHRoqsSwRdgauBbtjS9IlxaxQCc=
SIZE (iftop-1.0pre2.tar.gz) = 172736

View File

@ -1,29 +1,30 @@
--- iftop.c.orig Thu Mar 31 13:08:05 2005
+++ iftop.c Mon Jan 26 22:48:19 2009
@@ -25,6 +25,8 @@
#include <signal.h>
--- iftop.c.orig Tue Oct 4 14:30:37 2011
+++ iftop.c Fri Jan 20 06:40:39 2012
@@ -28,6 +28,8 @@
#include <string.h>
#include <unistd.h>
#include <locale.h>
+#include <pwd.h>
+#include <err.h>
#include "iftop.h"
#include "addr_hash.h"
@@ -561,8 +563,12 @@ void packet_loop(void* ptr) {
@@ -763,10 +765,13 @@ void packet_loop(void* ptr) {
* Entry point. See usage(). */
int main(int argc, char **argv) {
pthread_t thread;
- struct sigaction sa = {};
+ struct passwd *pw;
+ if ((pw = getpwnam("_iftop")) == NULL) {
+ errx(1, "no such user: _iftop");
+ }
setlocale(LC_ALL, "");
+ if ((pw = getpwnam("_iftop")) == NULL)
+ errx(1, "no such user: _iftop");
+
/* TODO: tidy this up */
/* read command line options and config file */
config_init();
@@ -572,12 +578,16 @@ int main(int argc, char **argv) {
@@ -776,12 +781,16 @@ int main(int argc, char **argv) {
read_config(options.config_file, options.config_file_specified);
options_make();

View File

@ -1,5 +1,5 @@
@comment $OpenBSD: PLIST,v 1.3 2012/01/26 08:03:57 ajacoutot Exp $
@comment $OpenBSD: PLIST,v 1.4 2012/07/16 08:49:38 landry Exp $
@newgroup _iftop:615
@newuser _iftop:615:_iftop:daemon:iftop user:/nonexistent:/sbin/nologin
bin/iftop
@man man/man8/iftop.8
@bin sbin/iftop