pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/net/arpwatch Update to 2.1a13, from Geert Hendrickx an...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/f8e605ab5996
branches:  trunk
changeset: 503822:f8e605ab5996
user:      bouyer <bouyer%pkgsrc.org@localhost>
date:      Wed Nov 30 22:36:43 2005 +0000

description:
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

diffstat:

 net/arpwatch/Makefile          |  18 ++++++++++++------
 net/arpwatch/PLIST             |   6 ++++--
 net/arpwatch/distinfo          |  13 ++++++++-----
 net/arpwatch/files/arpwatch.sh |  17 +++++++++++++++++
 net/arpwatch/patches/patch-aa  |  14 +++++++-------
 net/arpwatch/patches/patch-ab  |  15 +++++++++++++++
 net/arpwatch/patches/patch-ac  |  39 +++++++++++++++++++++++++++++++++++++++
 net/arpwatch/patches/patch-ae  |  20 ++++++++++++++++++++
 8 files changed, 122 insertions(+), 20 deletions(-)

diffs (235 lines):

diff -r 1c307a3caaf6 -r f8e605ab5996 net/arpwatch/Makefile
--- a/net/arpwatch/Makefile     Wed Nov 30 21:07:14 2005 +0000
+++ b/net/arpwatch/Makefile     Wed Nov 30 22:36:43 2005 +0000
@@ -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@localhost
 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_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 @@
        ${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 -r 1c307a3caaf6 -r f8e605ab5996 net/arpwatch/PLIST
--- a/net/arpwatch/PLIST        Wed Nov 30 21:07:14 2005 +0000
+++ b/net/arpwatch/PLIST        Wed Nov 30 22:36:43 2005 +0000
@@ -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 -r 1c307a3caaf6 -r f8e605ab5996 net/arpwatch/distinfo
--- a/net/arpwatch/distinfo     Wed Nov 30 21:07:14 2005 +0000
+++ b/net/arpwatch/distinfo     Wed Nov 30 22:36:43 2005 +0000
@@ -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 -r 1c307a3caaf6 -r f8e605ab5996 net/arpwatch/files/arpwatch.sh
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/net/arpwatch/files/arpwatch.sh    Wed Nov 30 22:36:43 2005 +0000
@@ -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 -r 1c307a3caaf6 -r f8e605ab5996 net/arpwatch/patches/patch-aa
--- a/net/arpwatch/patches/patch-aa     Wed Nov 30 21:07:14 2005 +0000
+++ b/net/arpwatch/patches/patch-aa     Wed Nov 30 22:36:43 2005 +0000
@@ -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 -r 1c307a3caaf6 -r f8e605ab5996 net/arpwatch/patches/patch-ab
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/net/arpwatch/patches/patch-ab     Wed Nov 30 22:36:43 2005 +0000
@@ -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 -r 1c307a3caaf6 -r f8e605ab5996 net/arpwatch/patches/patch-ac
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/net/arpwatch/patches/patch-ac     Wed Nov 30 22:36:43 2005 +0000
@@ -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 -r 1c307a3caaf6 -r f8e605ab5996 net/arpwatch/patches/patch-ae
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/net/arpwatch/patches/patch-ae     Wed Nov 30 22:36:43 2005 +0000
@@ -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>";



Home | Main Index | Thread Index | Old Index