Opened 16 years ago

Closed 16 years ago

Last modified 15 years ago

#16670 closed defect (fixed)

arpwatch ... incomplete installation

Reported by: mark@… Owned by: pmq@…
Priority: Normal Milestone:
Component: ports Version: 1.6.0
Keywords: Cc:
Port: arpwatch

Description

arpwatch should declare a dependancy for libpcap and therefore build this using MacPorts principles rather than just link to the default Apple installed library.

arpwatch should install the file ethercodes.dat into the same directory as arpwatch is installed ... /opt/local/sbin/

arpwatch should create a file arp.dat if that file does not already exist in the same directory as arpwatch is installed ... /opt/local/sbin/ This is expected according to the INSTALL file in the arpwatch-2.1a15 source code. arpwatch won't run without this file.

arpwatch should install the massagevendors script in /opt/local/sbin/ so that the user can at a later date update the ethercodes.dat file. massagevendors is supplied in the source code.

enhancement the install could also download (if possible) the current oui.txt from http://standards.ieee.org/regauth/oui/oui.txt and, using the massagevendor supplied script in the sourcecode, create an up-to-date ethercodes.dat (and install it in /opt/local/sbin/ replacing the source code supplied one.

Change History (14)

comment:1 Changed 16 years ago by blb@…

Owner: changed from macports-tickets@… to pmq@…
Port: arpwatch added

comment:2 Changed 16 years ago by pmq@…

  • Dependency on pcap: yes, this should be corrected.
  • ethercodes.dat in $prefix: this file has nothing to do there.
  • arp.dat: won't run? man touch? in $prefix furthermore?
  • massagevendors: ok.
  • oui.txt: IMO this is not MacPorts' job.

comment:3 in reply to:  2 Changed 16 years ago by mark@…

Replying to pmq@…:

  • Dependency on pcap: yes, this should be corrected.
  • ethercodes.dat in $prefix: this file has nothing to do there.
  • arp.dat: won't run? man touch? in $prefix furthermore?
  • massagevendors: ok.
  • oui.txt: IMO this is not MacPorts' job.

comment:4 Changed 16 years ago by mark@…

  • ok
  • putting ethercodes.dat in the same directory as where you run arpwatch from does let arpwatch find the file. Where else can it be put and be found/used?
  • no arp.dat file means that arpwatch doesn't run ... the INSTALL file in the source distribution says "Note that if you do not already have an arp.dat database file, the configure script will automatically create an empty one for you". And yes, the configure script tests for arp.dat then touches it to create it if not found. Again where else to put it other than the same directory that arpwatch is run from?
  • ok
  • ok but document how the user can download and generate an up-to-date version.

comment:5 Changed 16 years ago by pmq@…

Summary: aprwatch ... incomplete installationarpwatch ... incomplete installation

For the third point:

sudo arpwatch -d -f /opt/local/var/arpwatch/arp.dat -i en0

For the fifth point: the best thing is to install the README and other files.

comment:6 Changed 16 years ago by pmq@…

Fix for the first issue committed in r40317. Please test.

comment:7 Changed 16 years ago by mark@…

uninstalled the old build, and deleted my arp.dat & ethercodes.dat

sync'd MacPorts

it d/l'd and activated libpcap OK it then failed near the end of arpwatch

---> Building arpwatch with target all ---> Staging arpwatch into destroot Error: Target org.macports.destroot returned: shell command " cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_net_arpwatch/work/arpwatch-2.1a15" && make install install-man DESTDIR=/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_net_arpwatch/work/destroot " returned error 2 Command output: /usr/bin/install -m 555 -o bin -g bin arpwatch /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_net_arpwatch/work/destroot/opt/local/sbin install: bin: Invalid argument make: * [install] Error 67

Error: Status 1 encountered during processing.

comment:8 Changed 16 years ago by pmq@…

Could you clean and re-try?

comment:9 Changed 16 years ago by mark@…

OK done a sudo port clean --all all (takes ages)

now arpwatch installs without the Error as shown above.

but sudo arpwatch -d still doesn't work as arpwatch can't find a arp.dat file

creating one manually localhost:~ user$ cd /opt/local/sbin/ localhost:/opt/local/sbin user$ sudo touch arp.dat allows it to run

comment:10 Changed 16 years ago by pmq@…

Forget '-d', I just told you that so you could see the mails being prepared. The interesting switch is '-f'. See my previous example.

The previous commits fixed the linking with pcap, not the rest. The only remaining point for me is the ethercodes.dat one. All of the others are non-issues IMHO (see my previous explanations). I'll fix the ethercodes.dat one with a proper patch in the near future.

comment:11 Changed 16 years ago by pmq@…

Just committed r40428. Please test. If it's OK, then we have the following situation:

  • dependency on libpcap: done
  • ethercodes.dat: didn't use your suggestion, the file stays where it is but the code is patched to find it here. Same as Debian for that matter. Done.
  • arp.dat: I'm not in favor of creating the arp.dat file because this would replace on upgrade the one users have.
  • massagevendor: it'd be cool to have in ${prefix}/bin, but we'd need to patch it to find the awk scripts in ${prefix}/share, because I'm not for installing these in ${prefix}/bin. BTW, why are you suggesting sbin?
  • downloading the newest oui.txt: not MacPorts' job, besides it makes builds not reproducible.

So I consider the ticket corrected; tell me if you feel something more should be done.

comment:12 Changed 16 years ago by mark@…

Downloaded MacPorts base version 1.600

The MacPorts installation is not outdated and so was not updated selfupdate done! localhost:~ user$ sudo port uninstall arpwatch ---> Deactivating arpwatch 2.1a15_1 ---> Uninstalling arpwatch 2.1a15_1 localhost:~ user$ sudo port uninstall libpcap ---> Deactivating libpcap 0.9.8_0 ---> Uninstalling libpcap 0.9.8_0 localhost:~ user$ sudo port clean libpcap ---> Cleaning libpcap localhost:~ user$ sudo port clean arpwatch ---> Cleaning arpwatch localhost:~ user$ sudo port install arpwatch ---> Fetching libpcap ---> Attempting to fetch libpcap-0.9.8.tar.gz from http://www.tcpdump.org/release/ ---> Verifying checksum(s) for libpcap ---> Extracting libpcap ---> Applying patches to libpcap ---> Configuring libpcap ---> Building libpcap with target all ---> Staging libpcap into destroot ---> Installing libpcap 0.9.8_0 ---> Activating libpcap 0.9.8_0 ---> Cleaning libpcap ---> Fetching arpwatch ---> Attempting to fetch arpwatch-2.1a15.tar.gz from ftp://ftp.ee.lbl.gov ---> Verifying checksum(s) for arpwatch ---> Extracting arpwatch ---> Configuring arpwatch ---> Building arpwatch with target all ---> Staging arpwatch into destroot ---> Installing arpwatch 2.1a15_2 ---> Activating arpwatch 2.1a15_2 ---> Cleaning arpwatch localhost:~ user$

I'm only suggesting sbin because originally that's where everything else ended up needing to be put so as to be used by the program ... arp.dat ethercodes.dat ... If there's a better standard place to put it/them then fine. Ubuntu 8.04 also just piled all of them into the same directory.

I created a directory /opt/local/var/arpwatch and created (by touch) arp.dat in /opt/local/var/arpwatch/

arpwatch "sees" the ethercodes.dat file in the place the installation put it.

arpwatch seems happy.

So yes everything intended seems to have been done and works. Thank you.

comment:13 Changed 16 years ago by pmq@…

Resolution: fixed
Status: newclosed

OK closing.

comment:14 Changed 15 years ago by (none)

Milestone: Port Bugs

Milestone Port Bugs deleted

Note: See TracTickets for help on using tickets.