Index: head/net-mgmt/arpwatch/Makefile =================================================================== --- head/net-mgmt/arpwatch/Makefile (revision 530850) +++ head/net-mgmt/arpwatch/Makefile (revision 530851) @@ -1,62 +1,59 @@ # Created by: Brian Somers # $FreeBSD$ PORTNAME= arpwatch -PORTVERSION= 3.0 -PORTREVISION= 3 +PORTVERSION= 3.1 CATEGORIES= net-mgmt MASTER_SITES= https://ee.lbl.gov/downloads/arpwatch/ \ LOCAL/leres/arpwatch MAINTAINER= leres@FreeBSD.org COMMENT= Monitor arp & rarp requests LICENSE= BSD3CLAUSE BUILD_DEPENDS= ${LOCALBASE}/include/pcap.h:net/libpcap RUN_DEPENDS= ${LOCALBASE}/include/pcap.h:net/libpcap USES= python:run GNU_CONFIGURE= yes SUB_FILES= pkg-message -OPTIONS_DEFINE= DEBUG ETHERCODES ZEROPAD -OPTIONS_DEFAULT=ETHERCODES ZEROPAD +OPTIONS_DEFINE= DEBUG ZEROPAD +OPTIONS_DEFAULT=ZEROPAD OPTIONS_SUB= yes -ETHERCODES_DESC=install ethercodes.dat ZEROPAD_DESC= zero pad displayed ethernet addresses by default .include .if ${PORT_OPTIONS:MDEBUG} CONFIGURE_ARGS+= --disable-optimization .endif .if ${PORT_OPTIONS:MZEROPAD} CONFIGURE_ARGS+= --enable-zeropad .endif .ifdef ARPDIR MAKE_ARGS= ARPDIR=${ARPDIR} .endif post-install: ${MKDIR} ${STAGEDIR}${PREFIX}/arpwatch .for F in d.awk duplicates.awk euppertolower.awk e.awk p.awk ${INSTALL_DATA} ${WRKSRC}/${F} ${STAGEDIR}${PREFIX}/arpwatch .endfor ${INSTALL_SCRIPT} ${WRKSRC}/arp2ethers ${STAGEDIR}${PREFIX}/arpwatch ${INSTALL_SCRIPT} ${WRKSRC}/massagevendor.py \ ${STAGEDIR}${PREFIX}/arpwatch/massagevendor -.if ${PORT_OPTIONS:METHERCODES} - ${INSTALL_DATA} ${WRKSRC}/ethercodes.dat ${STAGEDIR}${PREFIX}/arpwatch -.endif + ${INSTALL_SCRIPT} ${WRKSRC}/update-ethercodes.sh \ + ${STAGEDIR}${PREFIX}/arpwatch/update-ethercodes post-configure: ${REINPLACE_CMD} -e "/^LIBS *=/s,-lpcap,${LOCALBASE}/lib/libpcap.so.1," \ ${WRKSRC}/Makefile .include Index: head/net-mgmt/arpwatch/distinfo =================================================================== --- head/net-mgmt/arpwatch/distinfo (revision 530850) +++ head/net-mgmt/arpwatch/distinfo (revision 530851) @@ -1,3 +1,3 @@ -TIMESTAMP = 1575239752 -SHA256 (arpwatch-3.0.tar.gz) = 82e137e104aca8b1280f5cca0ebe61b978f10eadcbb4c4802c181522ad02b25b -SIZE (arpwatch-3.0.tar.gz) = 407879 +TIMESTAMP = 1586134129 +SHA256 (arpwatch-3.1.tar.gz) = ee1d15d9a07952c0c017908b9dbfd5ac988fed0058c3cc4fa6c13e0be36f3a9f +SIZE (arpwatch-3.1.tar.gz) = 117196 Index: head/net-mgmt/arpwatch/files/patch-massagevendor.py.in =================================================================== --- head/net-mgmt/arpwatch/files/patch-massagevendor.py.in (revision 530850) +++ head/net-mgmt/arpwatch/files/patch-massagevendor.py.in (nonexistent) @@ -1,40 +0,0 @@ ---- massagevendor.py.in.orig 2019-12-26 22:30:49 UTC -+++ massagevendor.py.in -@@ -1,6 +1,6 @@ - #!@PYTHON@ - """massagevendor - convert IEEE oui.csv to ethercodes.dat format""" --# @(#) $Id: massagevendor.py.in 1505 2019-11-30 18:35:23Z leres $ (LBL) -+# @(#) $Id: massagevendor.py.in 1516 2019-12-26 22:28:17Z leres $ (LBL) - # - # Copyright (c) 2000, 2004, 2009, 2010, 2013, 2015, 2016, 2019 - # The Regents of the University of California. All rights reserved. -@@ -35,6 +35,8 @@ - # into ethercodes.dat format. - # - -+from __future__ import print_function -+ - import argparse - import csv - import os -@@ -63,7 +65,10 @@ def process(f): - tup = [x[1:] if x[0] == '0' else x for x in tup] - vendor = ':'.join(tup) - -- company = row[2].encode('utf-8').decode('ascii', 'ignore') -+ company = row[2] -+ if sys.version_info[0] < 3: -+ company = unicode(company, 'utf-8') -+ company = company.encode('utf-8').decode('ascii', 'ignore') - - lines.append('%s\t%s' % (vendor, company)) - -@@ -88,7 +93,7 @@ def main(argv=None): - # os.environ[pathstr] = '%s:%s' % (localsbin, os.environ[pathstr]) - - PROG = os.path.basename(argv[0]) -- version = '$Revision: 1505 $'.strip('$').rstrip() -+ version = '$Revision: 1516 $'.strip('$').rstrip() - - parser = argparse.ArgumentParser( - formatter_class=argparse.RawTextHelpFormatter) Property changes on: head/net-mgmt/arpwatch/files/patch-massagevendor.py.in ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/net-mgmt/arpwatch/files/patch-arpwatch.sh.in =================================================================== --- head/net-mgmt/arpwatch/files/patch-arpwatch.sh.in (revision 530850) +++ head/net-mgmt/arpwatch/files/patch-arpwatch.sh.in (nonexistent) @@ -1,12 +0,0 @@ ---- arpwatch.sh.in.orig 2014-07-25 18:42:17 UTC -+++ arpwatch.sh.in -@@ -47,7 +47,8 @@ arpwatch_precmd() - if [ $cmd == start ]; then - prep_datfile ${fn} - fi -- eval options=\$arpwatch_${interface}_options -+ ltr ${interface} . _ _interface -+ eval options=\$arpwatch_${_interface}_options - command_args="-i ${interface} -f ${fn} -P ${pidfile} ${options}" - } - Property changes on: head/net-mgmt/arpwatch/files/patch-arpwatch.sh.in ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/net-mgmt/arpwatch/files/pkg-message.in =================================================================== --- head/net-mgmt/arpwatch/files/pkg-message.in (revision 530850) +++ head/net-mgmt/arpwatch/files/pkg-message.in (revision 530851) @@ -1,18 +1,16 @@ [ { type: install message: < ethercodes.dat - rm oui.csv + %%PREFIX%%/arpwatch/update-ethercodes -You might also want to disable the ETHERCODES option when building -to avoid clobbering ethercodes.dat on update or reinstall. +Here's a example crontab entry to update it every night: + + 00 0 * * * root sleep `jot -r 1 0 600` ; %%PREFIX%%/arpwatch/update-ethercodes The -m flag is deprecated. If you are using the -m watcher flag, please switch to -w. EOM } ] Index: head/net-mgmt/arpwatch/pkg-plist =================================================================== --- head/net-mgmt/arpwatch/pkg-plist (revision 530850) +++ head/net-mgmt/arpwatch/pkg-plist (revision 530851) @@ -1,16 +1,16 @@ arpwatch/arp2ethers arpwatch/d.awk arpwatch/duplicates.awk arpwatch/e.awk -%%ETHERCODES%%arpwatch/ethercodes.dat arpwatch/euppertolower.awk arpwatch/massagevendor arpwatch/p.awk +arpwatch/update-ethercodes etc/rc.d/arpwatch man/man8/arpsnmp.8.gz man/man8/arpwatch.8.gz sbin/arpsnmp sbin/arpwatch @postexec test -f %D/arpwatch/arp.dat || touch %D/arpwatch/arp.dat @preunexec test -f %D/arpwatch/arp.dat && test -s %D/arpwatch/arp.dat || rm -f %D/arpwatch/arp.dat @dir(,operator,0755) arpwatch