[arch-commits] Commit in arpwatch/trunk (PKGBUILD ethercodes.dat.xz gen_ethercode.sh)

Sébastien Luttringer seblu at nymeria.archlinux.org
Wed Jul 31 01:11:50 UTC 2013


    Date: Wednesday, July 31, 2013 @ 03:11:49
  Author: seblu
Revision: 94833

upgpkg: arpwatch 2.1a15-12

- fix manpages installation
- write a ethercodes.dat generator from official OUI
- update ethercodes.dat with recent OUI

Added:
  arpwatch/trunk/ethercodes.dat.xz
  arpwatch/trunk/gen_ethercode.sh
Modified:
  arpwatch/trunk/PKGBUILD

-------------------+
 PKGBUILD          |   12 ++++++++----
 ethercodes.dat.xz |    1 +
 gen_ethercode.sh  |   32 ++++++++++++++++++++++++++++++++
 3 files changed, 41 insertions(+), 4 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2013-07-30 22:31:20 UTC (rev 94832)
+++ PKGBUILD	2013-07-31 01:11:49 UTC (rev 94833)
@@ -1,40 +1,44 @@
 # $Id$
 # Maintainer: Sergej Pupykin <pupykin.s+arch at gmail.com>
-# Contributor: Sergej Pupykin <pupykin.s+arch at gmail.com>
 # Contributor: Sébastien Luttringer
 
 pkgname=arpwatch
 pkgver=2.1a15
-pkgrel=11
+pkgrel=12
 pkgdesc='Ethernet/FDDI station activity monitor'
 arch=('i686' 'x86_64')
 url='ftp://ftp.ee.lbl.gov/'
 license=('BSD')
 depends=('libpcap' 'smtp-forwarder')
 source=("ftp://ftp.ee.lbl.gov/$pkgname-$pkgver.tar.gz"
+        'ethercodes.dat.xz'
         'LICENSE'
         "$pkgname.service")
 md5sums=('cebfeb99c4a7c2a6cee2564770415fe7'
+         '0a47a4e7a0f2ede5c8c7f22ec678fa72'
          '9359518c500562281e76cdb0b2fa9062'
          '43e2358ba0532da38e5296250a7fcfd8')
 
 prepare() {
   cd $pkgname-$pkgver
   # move arp database in /var/lib/arpwatch
+  # /var is used because arpwatch write its learned mac into this folder
   sed -i 's|ARPDIR = $(prefix)/arpwatch|ARPDIR = /var/lib/arpwatch|' Makefile.in
   # binary ownership to root
   sed -i 's/-\(o\|g\) bin/-\1 root/g' Makefile.in
+  # Update ethercodes with recent OUI. See gen_ethercodes.sh
+  cp -f "$srcdir/ethercodes.dat" ethercodes.dat
 }
 
 build() {
   cd $pkgname-$pkgver
   ./configure --prefix=/usr --mandir=/usr/share/man --sbindir=/usr/bin
-  make SENDMAIL=`which sendmail`
+  make SENDMAIL=/usr/bin/sendmail
 }
 
 package() {
   cd $pkgname-$pkgver
-  install -d -m 0755 "$pkgdir"/usr/{bin,share/man}
+  install -d -m 0755 "$pkgdir"/usr/{bin,share/man/man8}
   make DESTDIR="$pkgdir" install install-man
   # install ether prefix database
   install -Dm644 ethercodes.dat "$pkgdir/var/lib/$pkgname/ethercodes.dat"

Added: ethercodes.dat.xz
===================================================================
(Binary files differ)

Index: arpwatch/trunk/ethercodes.dat.xz
===================================================================
--- ethercodes.dat.xz	2013-07-30 22:31:20 UTC (rev 94832)
+++ ethercodes.dat.xz	2013-07-31 01:11:49 UTC (rev 94833)

Property changes on: arpwatch/trunk/ethercodes.dat.xz
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/x-xz
\ No newline at end of property
Added: gen_ethercode.sh
===================================================================
--- gen_ethercode.sh	                        (rev 0)
+++ gen_ethercode.sh	2013-07-31 01:11:49 UTC (rev 94833)
@@ -0,0 +1,32 @@
+#!/bin/bash
+
+# Copyright © 2013 Sébastien Luttringer
+
+# This script is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This script is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with this script.  If not, see <http://www.gnu.org/licenses/>.
+
+# Get and format official OUI
+wget -O- 'http://standards.ieee.org/regauth/oui/oui.txt' | \
+sed -nr 's/[ \t]+(..)-(..)-(..)[ \t]+\(hex\)[ \t]+(.*)/\L\1:\2:\3\E\t\4/p' > ethercodes.dat
+
+# Add private OUI
+cat >> ethercodes.dat <<EOF
+52:54:00	QEMU Virtual NIC
+b0:c4:20	Bochs Virtual NIC
+de:ad:ca	PearPC Virtual NIC
+00:ff:d1	Cooperative Linux virtual NIC
+EOF
+
+# Sort and compress
+sort ethercodes.dat | xz -9 > ethercodes.dat.xz
+rm ethercodes.dat


Property changes on: arpwatch/trunk/gen_ethercode.sh
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property



More information about the arch-commits mailing list