summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbouyer <bouyer@pkgsrc.org>2005-11-30 22:36:43 +0000
committerbouyer <bouyer@pkgsrc.org>2005-11-30 22:36:43 +0000
commit4d67338c9ed74e6baac5b7e4186ab18b05259d20 (patch)
tree25c6f9d2eda5db16210ea8e9b9459ed6e7b26c56
parent016f68cc287a02d9f2dfe07a9db9790e68d00d02 (diff)
downloadpkgsrc-4d67338c9ed74e6baac5b7e4186ab18b05259d20.tar.gz
Update to 2.1a13, from Geert Hendrickx and William Fletcher.
arpwatch changes: - Convert arp2ethers from csh to sh - updated ethercode.dat - misc minor bugfixes Changes from Geert Hendrickx: - move ethercodes.dat to share/arpwatch (from etc) - Use ${VARBASE:Q} instead of ${VARBASE} as suggested by pkglint - Use OWN_DIRS to note the admin about the stale db directory after deinstallation Changes from William Fletcher: - add a rc.d script - add a '-m' option to specify the recipient for email messages (still defaults to root) Fix pkg/32151 by Geert Hendrickx
-rw-r--r--net/arpwatch/Makefile18
-rw-r--r--net/arpwatch/PLIST6
-rw-r--r--net/arpwatch/distinfo13
-rw-r--r--net/arpwatch/files/arpwatch.sh17
-rw-r--r--net/arpwatch/patches/patch-aa14
-rw-r--r--net/arpwatch/patches/patch-ab15
-rw-r--r--net/arpwatch/patches/patch-ac39
-rw-r--r--net/arpwatch/patches/patch-ae20
8 files changed, 122 insertions, 20 deletions
diff --git a/net/arpwatch/Makefile b/net/arpwatch/Makefile
index 8971a09b976..052c599d156 100644
--- a/net/arpwatch/Makefile
+++ b/net/arpwatch/Makefile
@@ -1,21 +1,23 @@
-# $NetBSD: Makefile,v 1.24 2005/04/11 21:46:44 tv Exp $
+# $NetBSD: Makefile,v 1.25 2005/11/30 22:36:43 bouyer Exp $
#
-DISTNAME= arpwatch-2.1a11
-PKGREVISION= 2
+DISTNAME= arpwatch-2.1a13
CATEGORIES= net
MASTER_SITES= ftp://ftp.ee.lbl.gov/
MAINTAINER= bouyer@NetBSD.org
COMMENT= Monitor ARP activity on a network, maintaining a database
+USE_PKGINSTALL= YES
+RCD_SCRIPTS= arpwatch
+
GNU_CONFIGURE= yes
CFLAGS.Darwin+= -DBIND_8_COMPAT
LIBS+= ${BUILDLINK_LDADD.libpcap}
-MAKE_ENV+= VARBASE=${VARBASE}
-PLIST_SUBST+= VARBASE=${VARBASE}
+MAKE_ENV+= VARBASE=${VARBASE:Q}
+PLIST_SUBST+= VARBASE=${VARBASE:Q}
SUBST_CLASSES+= paths
SUBST_MESSAGE.paths= "Fixing hardcoded paths."
@@ -23,6 +25,9 @@ SUBST_STAGE.paths= post-patch
SUBST_FILES.paths= arpsnmp.8 arpwatch.8
SUBST_SED.paths= -e 's,/usr/operator/arpwatch,${VARBASE}/db/arpwatch,g'
+USE_PKGINSTALL= yes
+OWN_DIRS= ${VARBASE:Q}/db/arpwatch
+
pre-patch:
f=arpwatch.h; \
${MV} ${WRKSRC}/$$f ${WRKSRC}/$$f-prepatch; \
@@ -33,7 +38,8 @@ post-install:
${INSTALL_MAN} ${WRKSRC}/arpsnmp.8 ${PREFIX}/man/man8
@${INSTALL_DATA_DIR} ${VARBASE}/db/arpwatch
${TOUCH} ${VARBASE}/db/arpwatch/arp.dat
- ${INSTALL_DATA} ${WRKSRC}/ethercodes.dat ${PREFIX}/etc
+ ${INSTALL_DATA_DIR} ${PREFIX}/share/arpwatch
+ ${INSTALL_DATA} ${WRKSRC}/ethercodes.dat ${PREFIX}/share/arpwatch
.include "../../net/libpcap/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"
diff --git a/net/arpwatch/PLIST b/net/arpwatch/PLIST
index 83f7409d834..d49d8e4700c 100644
--- a/net/arpwatch/PLIST
+++ b/net/arpwatch/PLIST
@@ -1,8 +1,10 @@
-@comment $NetBSD: PLIST,v 1.3 2004/12/10 23:32:34 minskim Exp $
+@comment $NetBSD: PLIST,v 1.4 2005/11/30 22:36:43 bouyer Exp $
sbin/arpwatch
sbin/arpsnmp
-etc/ethercodes.dat
+share/arpwatch/ethercodes.dat
man/man8/arpwatch.8
man/man8/arpsnmp.8
+share/examples/rc.d/arpwatch
@exec ${MKDIR} ${VARBASE}/db/arpwatch
@exec /usr/bin/touch ${VARBASE}/db/arpwatch/arp.dat
+@dirrm share/arpwatch
diff --git a/net/arpwatch/distinfo b/net/arpwatch/distinfo
index 141115aced0..56a00e80a15 100644
--- a/net/arpwatch/distinfo
+++ b/net/arpwatch/distinfo
@@ -1,7 +1,10 @@
-$NetBSD: distinfo,v 1.7 2005/02/24 12:13:42 agc Exp $
+$NetBSD: distinfo,v 1.8 2005/11/30 22:36:43 bouyer Exp $
-SHA1 (arpwatch-2.1a11.tar.gz) = d14f9218928885ea9b502461259513a815809be7
-RMD160 (arpwatch-2.1a11.tar.gz) = e5932b488fbbe34926525e2795f31d2e8b3974dc
-Size (arpwatch-2.1a11.tar.gz) = 126550 bytes
-SHA1 (patch-aa) = f4cd576a1637086279ed76f440fe4fc670ae1b6c
+SHA1 (arpwatch-2.1a13.tar.gz) = 03d98e239405529f97b742f04d2a9b837b5da43a
+RMD160 (arpwatch-2.1a13.tar.gz) = 80b89d36d9c20e9d0ac272ba7b66494d2888a557
+Size (arpwatch-2.1a13.tar.gz) = 152779 bytes
+SHA1 (patch-aa) = 01d72e1342cdcf2c566a2c761743d4b71af5985c
+SHA1 (patch-ab) = 06a51f7958a4afddac2820886566e89b1b261093
+SHA1 (patch-ac) = 87dfb675a2eaf3c65e1e28dfe647fded229e04e9
SHA1 (patch-ad) = 0292675b4b48656575ad4429c98e1187962a1bef
+SHA1 (patch-ae) = 019f724d84054a775e6b81f93772831aea5e4db7
diff --git a/net/arpwatch/files/arpwatch.sh b/net/arpwatch/files/arpwatch.sh
new file mode 100644
index 00000000000..5650f9c8861
--- /dev/null
+++ b/net/arpwatch/files/arpwatch.sh
@@ -0,0 +1,17 @@
+#!@RCD_SCRIPTS_SHELL@
+#
+# $id$
+#
+
+# PROVIDE: arpwatch
+# REQUIRE: DAEMON
+# BEFORE: LOGIN
+
+. /etc/rc.subr
+
+name="arpwatch"
+rcvar=$name
+command="/usr/pkg/sbin/${name}"
+
+load_rc_config $name
+run_rc_command "$1"
diff --git a/net/arpwatch/patches/patch-aa b/net/arpwatch/patches/patch-aa
index 703e0ef1433..8cb79a4aa5e 100644
--- a/net/arpwatch/patches/patch-aa
+++ b/net/arpwatch/patches/patch-aa
@@ -1,30 +1,30 @@
-$NetBSD: patch-aa,v 1.5 2004/12/10 23:32:34 minskim Exp $
+$NetBSD: patch-aa,v 1.6 2005/11/30 22:36:43 bouyer Exp $
---- Makefile.in.orig Thu Jun 15 01:39:55 2000
+--- Makefile.in.orig 2000-06-15 02:39:55.000000000 +0200
+++ Makefile.in
-@@ -30,8 +30,10 @@
+@@ -30,8 +30,10 @@ exec_prefix = @exec_prefix@
BINDEST = @sbindir@
# Pathname of directory to install the man page
MANDEST = @mandir@
+# Pathname of directory to install ethernet vendor codes
-+ETCDEST = $(prefix)/etc
++SHAREDEST = $(prefix)/share/arpwatch
# Pathname of directory to install database file
-ARPDIR = $(prefix)/arpwatch
+ARPDIR = ${VARBASE}/db/arpwatch
# VPATH
srcdir = @srcdir@
-@@ -45,7 +47,8 @@
+@@ -45,7 +47,8 @@ CC = @CC@
PROG = arpwatch
CCOPT = @V_CCOPT@
INCLS = -I. @V_INCLS@
-DEFS = -DDEBUG @DEFS@ -DARPDIR=\"$(ARPDIR)\" -DPATH_SENDMAIL=\"$(SENDMAIL)\"
+DEFS = -DDEBUG @DEFS@ -DARPDIR=\"$(ARPDIR)\" -DPATH_SENDMAIL=\"$(SENDMAIL)\" \
-+ -DETHERCODES=\"$(ETCDEST)/ethercodes.dat\"
++ -DETHERCODES=\"$(SHAREDEST)/ethercodes.dat\"
# Standard CFLAGS
CFLAGS = $(CCOPT) $(DEFS) $(INCLS)
-@@ -110,8 +113,8 @@
+@@ -110,8 +113,8 @@ zap: zap.o intoa.o
$(CC) $(CFLAGS) -o $@ zap.o intoa.o -lutil
install: force
diff --git a/net/arpwatch/patches/patch-ab b/net/arpwatch/patches/patch-ab
new file mode 100644
index 00000000000..15b2b9fe00c
--- /dev/null
+++ b/net/arpwatch/patches/patch-ab
@@ -0,0 +1,15 @@
+--- arpwatch.8.orig 2005-10-25 12:51:51.000000000 +0200
++++ arpwatch.8 2005-10-25 12:52:40.000000000 +0200
+@@ -71,6 +71,12 @@
+ flag is used to override the default interface.
+ .LP
+ The
++.B -m
++flag specifies the address that will receive the emails.
++The default is
++.IR root .
++.LP
++The
+ .B -n
+ flag specifies additional local networks. This can be useful to
+ avoid "bogon" warnings when there is more than one network running
diff --git a/net/arpwatch/patches/patch-ac b/net/arpwatch/patches/patch-ac
new file mode 100644
index 00000000000..3bad1578533
--- /dev/null
+++ b/net/arpwatch/patches/patch-ac
@@ -0,0 +1,39 @@
+--- arpwatch.c.orig 2005-10-25 12:53:57.000000000 +0200
++++ arpwatch.c 2005-10-25 12:56:40.000000000 +0200
+@@ -107,6 +107,8 @@
+
+ char *prog;
+
++char *Watcher = NULL;
++
+ int can_checkpoint;
+ int swapped;
+ int nobogons;
+@@ -170,7 +172,7 @@
+ interface = NULL;
+ rfilename = NULL;
+ pd = NULL;
+- while ((op = getopt(argc, argv, "df:i:n:Nr:")) != EOF)
++ while ((op = getopt(argc, argv, "df:i:m:n:Nr:")) != EOF)
+ switch (op) {
+
+ case 'd':
+@@ -189,6 +191,10 @@
+ interface = optarg;
+ break;
+
++ case 'm':
++ Watcher = optarg;
++ break;
++
+ case 'n':
+ if (!addnet(optarg))
+ usage();
+@@ -751,6 +757,6 @@
+
+ (void)fprintf(stderr, "Version %s\n", version);
+ (void)fprintf(stderr, "usage: %s [-dN] [-f datafile] [-i interface]"
+- " [-n net[/width]] [-r file]\n", prog);
++ " [-m email] [-n net[/width]] [-r file]\n", prog);
+ exit(1);
+ }
diff --git a/net/arpwatch/patches/patch-ae b/net/arpwatch/patches/patch-ae
new file mode 100644
index 00000000000..e9449e7ea24
--- /dev/null
+++ b/net/arpwatch/patches/patch-ae
@@ -0,0 +1,20 @@
+--- report.c.orig 2000-10-01 01:41:10.000000000 +0200
++++ report.c 2005-10-25 13:07:21.000000000 +0200
+@@ -70,6 +70,8 @@
+
+ #define PLURAL(n) ((n) == 1 || (n) == -1 ? "" : "s")
+
++char *Watcher;
++
+ static int cdepth; /* number of outstanding children */
+
+ static char *fmtdate(time_t);
+@@ -240,7 +242,7 @@
+ register FILE *f;
+ char tempfile[64], cpu[64], os[64];
+ char *fmt = "%20s: %s\n";
+- char *watcher = WATCHER;
++ char *watcher = Watcher ? Watcher : WATCHER;
+ char *watchee = WATCHEE;
+ char *sendmail = PATH_SENDMAIL;
+ char *unknown = "<unknown>";