Bug 242346 - net-mgmt/arpwatch: Update to 3.0
Summary: net-mgmt/arpwatch: Update to 3.0
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Craig Leres
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-12-01 22:49 UTC by Craig Leres
Modified: 2019-12-15 18:51 UTC (History)
2 users (show)

See Also:
pi: maintainer-feedback+


Attachments
patch (23.78 KB, patch)
2019-12-01 22:50 UTC, Craig Leres
no flags Details | Diff
revised patch (23.75 KB, patch)
2019-12-01 23:07 UTC, Craig Leres
no flags Details | Diff
copy of upstream rc.d script for reference (1.71 KB, text/plain)
2019-12-03 18:25 UTC, Craig Leres
no flags Details
revised revised patch (24.08 KB, patch)
2019-12-04 02:49 UTC, Craig Leres
leres: maintainer-approval?
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Craig Leres freebsd_committer 2019-12-01 22:49:50 UTC
Update to 3.0. Update MASTER_SITES.  Add options for DEBUG (build
with debugging support), ETHERCODES (install ethercodes.dat
optionally), and ZEROPAD (zero pad displayed ethernet addresses by
default).

Notable changes since 2.1a15:

    - Add -Z (zero pad) and -C (compact) flags to arpwatch and
      arpsnmp to allow run time selection of zero padded or compact
      ethernet addresses in arp.dat.

    - Check for I/O errors when writing new arp.dat file.

    - Add a FreeBSD rc.d startup script.

    - Escape unprintable hostnames in arp.dat to avoid corruption.

    - Added the -x flag which is like -n but excludes cidrs. Code
      contributed by Roman Ivanov (awant13@gmail.com).

    - Incorporated other fixes and patches with a lot of help from
      Kurt Jaeger (pi@FreeBSD.org).

    - Speed up arp.dat parsing by increasing the size of the hash
      table.

    - Control watcher/watchee from the command line (-w/W flags).
Comment 1 Craig Leres freebsd_committer 2019-12-01 22:50:17 UTC
Created attachment 209580 [details]
patch
Comment 2 Craig Leres freebsd_committer 2019-12-01 23:07:53 UTC
Created attachment 209581 [details]
revised patch

Fix some leakage from my build environment
Comment 3 Kurt Jaeger freebsd_committer 2019-12-02 16:01:03 UTC
Looks fine, maintainer approval+.
Comment 4 Matthew Seaman freebsd_committer 2019-12-03 06:52:30 UTC
(In reply to Craig Leres from comment #2)

The rc script has some odd echo commands:

```
-arpwatch_precmd() {
-    case ${arpwatch_interfaces} in
-        '')
-	    echo prcmd    <<<----***
-	    if [ ! -e "${arpwatch_dir}/arp.dat" ]; then
-		if [ -e "${arpwatch_dir}/arp.dat-" ]; then
```

```
-case ${arpwatch_interfaces} in
-    '')  
-	 echo 'meuh'     <<<----***
-         run_rc_command "$1"
-    ;;
```

Looks pretty good to me otherwise, although I've only read through the diff, not tried anything.

Hmmm... so the '-m' flag and possibly others are local additions to the port.  Any chance of getting those incorporated upstream?
Comment 5 Craig Leres freebsd_committer 2019-12-03 18:24:32 UTC
(In reply to Matthew Seaman from comment #4)
The rc script you see in the diff's is being removed from the port because upstream (i.e. me) now has one bundled with arpwatch. I'll attach a copy of the bundled script for reference.

In 2009 I added -w watcher (and -W watchee) flags to arpwatch. I didn't research when it was added but the port current has a patch that adds -m watcher. My plan is to create a new patch to add -m that gives a deprecation warning when used and add something to pkg-message about the new flag. And then remove the patch in six months or so.
Comment 6 Craig Leres freebsd_committer 2019-12-03 18:25:51 UTC
Created attachment 209664 [details]
copy of upstream rc.d script for reference
Comment 7 Craig Leres freebsd_committer 2019-12-04 02:49:21 UTC
Created attachment 209676 [details]
revised revised patch

Here is a version of the patch that adds back the -m flag as an alias for -w with a deprecation warning. It also adds a deprecation warning to pkg-message.
Comment 8 Matthew Seaman freebsd_committer 2019-12-04 06:52:11 UTC
(In reply to Craig Leres from comment #5)

Yes.  That was a complete fail at reading the patch on my part.  I never could get my head round the diff-of-diffs thing.

If you're the upstream author of arpwatch, wouldn't it make sense for you to be the port maintainer as well?

Anyhow, the latest iteration of the update LGTM.
Comment 9 Craig Leres freebsd_committer 2019-12-06 00:08:15 UTC
(In reply to Matthew Seaman from comment #8)
I wouldn't say no if Kurt wanted me to take over maintainership. That said he's been doing a great job of keeping the port updated and usable.

I'll wait to commit util Kurt has a chance to look at the bundled rc.d script and give maintainer approval to the revised patchset.
Comment 10 Kurt Jaeger freebsd_committer 2019-12-14 09:25:54 UTC
Please commit, and include a maintainer change from pi@ to leres@ 8-)

I tested it with the old -m, this did not work, but I can live with that. Others
might be more troubled by the change, but we can't fix everything...
Comment 11 commit-hook freebsd_committer 2019-12-15 18:49:44 UTC
A commit references this bug:

Author: leres
Date: Sun Dec 15 18:49:29 UTC 2019
New revision: 520189
URL: https://svnweb.freebsd.org/changeset/ports/520189

Log:
  net-mgmt/arpwatch: Update to 3.0. Update MASTER_SITES. Add options
  for DEBUG (build with debugging support), ETHERCODES (install
  ethercodes.dat optionally), and ZEROPAD (zero pad displayed ethernet
  addresses by default).

  Take maintainership as per pi@ in the PR.

  Notable changes since 2.1a15:

      - Add -Z (zero pad) and -C (compact) flags to arpwatch and
        arpsnmp to allow run time selection of zero padded or compact
        ethernet addresses in arp.dat.

      - Check for I/O errors when writing new arp.dat file.

      - Add a FreeBSD rc.d startup script.

      - Escape unprintable hostnames in arp.dat to avoid corruption.

      - Added the -x flag which is like -n but excludes cidrs. Code
        contributed by Roman Ivanov (awant13@gmail.com).

      - Incorporated other fixes and patches with a lot of help from
        Kurt Jaeger (pi@FreeBSD.org).

      - Speed up arp.dat parsing by increasing the size of the hash
        table.

      - Control watcher/watchee from the command line (-w/W flags).

  PR:		242346
  Approved by:	pi (maintainer), ler (mentor, implicit)

Changes:
  head/net-mgmt/arpwatch/Makefile
  head/net-mgmt/arpwatch/distinfo
  head/net-mgmt/arpwatch/files/patch-Makefile.in
  head/net-mgmt/arpwatch/files/patch-arpsnmp.8
  head/net-mgmt/arpwatch/files/patch-arpsnmp.c
  head/net-mgmt/arpwatch/files/patch-arpwatch.8
  head/net-mgmt/arpwatch/files/patch-arpwatch.c
  head/net-mgmt/arpwatch/files/patch-configure
  head/net-mgmt/arpwatch/files/patch-db.c
  head/net-mgmt/arpwatch/files/patch-dns.c
  head/net-mgmt/arpwatch/files/patch-report.c
  head/net-mgmt/arpwatch/files/patch-util.c
  head/net-mgmt/arpwatch/files/patch-util.h
  head/net-mgmt/arpwatch/files/pkg-message.in
  head/net-mgmt/arpwatch/pkg-descr
  head/net-mgmt/arpwatch/pkg-plist
Comment 12 Craig Leres freebsd_committer 2019-12-15 18:51:55 UTC
(In reply to Kurt Jaeger from comment #10)
I re-tested the -m flag added in the patch and it worked ok for me.