# HG changeset patch # User Michael Schloh von Bennewitz # Date 1346171685 -7200 # Node ID 175768f4868bc933858cecabe15f1d04f853d813 # Parent d7167d2b16f495a60c839e4cfcd5178efd61cb61 Modernize packaging, correct database filename, and introduce MTA logic. diff -r d7167d2b16f4 -r 175768f4868b arpwatch/arpwatch.spec --- a/arpwatch/arpwatch.spec Tue Aug 28 18:34:40 2012 +0200 +++ b/arpwatch/arpwatch.spec Tue Aug 28 18:34:45 2012 +0200 @@ -1,6 +1,6 @@ ## ## arpwatch.spec -- OpenPKG RPM Specification -## Copyright (c) 2009 Michael Schloh von Bennewitz +## Copyright (c) 2012 Michael Schloh von Bennewitz ## ## Permission to use, copy, modify, and distribute this software for ## any purpose with or without fee is hereby granted, provided that @@ -21,7 +21,6 @@ ## SUCH DAMAGE. ## - # package information Name: arpwatch Summary: Ethernet Address Monitor Program @@ -33,28 +32,25 @@ Group: Network License: GPL Version: 2.1a15 -Release: 20090106 +Release: 20120800 # package options %option with_fsl yes # list of sources -Source0: ftp://ftp.ee.lbl.gov/arpwatch.tar.gz +Source0: ftp://ftp.ee.lbl.gov/arpwatch-%{version}.tar.gz Source1: rc.arpwatch Source2: fsl.arpwatch Patch0: arpwatch.patch # build information -Prefix: %{l_prefix} -BuildRoot: %{l_buildroot} -BuildPreReq: OpenPKG, openpkg >= 20040130, libpcap, make -PreReq: OpenPKG, openpkg >= 20040130, libpcap +BuildPreReq: OpenPKG, openpkg >= 20100101, libpcap, make +PreReq: OpenPKG, openpkg >= 20100101, libpcap +PreReq: MTA %if "%{with_fsl}" == "yes" BuildPreReq: fsl >= 1.2.0 PreReq: fsl >= 1.2.0 %endif -AutoReq: no -AutoReqProv: no %description The arpwatch daemon monitors ethernet or fddi activity @@ -63,19 +59,13 @@ %track prog arpwatch = { - disabled - comment = "msvb: tracking is disabled as sources are unversioned" version = %{version} url = ftp://ftp.ee.lbl.gov/ - regex = arpwatch-\.tar\.gz + regex = arpwatch-(__VER__)\.tar\.gz } %prep %setup -q - - # before patching, correct unconsistent file modes - chmod u+w * - %patch -p0 # supply more detailed file path information @@ -96,6 +86,7 @@ CPPFLAGS="%{l_cppflags}" \ LDFLAGS="%{l_ldflags} %{l_fsl_ldflags}" \ LIBS="%{l_fsl_libs} $loclibs" \ + V_SENDMAIL=%{l_prefix}/sbin/sendmail \ ./configure \ --prefix=%{l_prefix} \ --localstatedir=%{l_prefix}/var/arpwatch/run @@ -104,9 +95,6 @@ %{l_make} %{l_mflags -O} %install - # remove previously existing installations - rm -rf $RPM_BUILD_ROOT - # create installation hierarchy %{l_shtool} mkdir -f -p -m 755 \ $RPM_BUILD_ROOT%{l_prefix}/sbin \ @@ -137,7 +125,6 @@ %files -f files %clean - rm -rf $RPM_BUILD_ROOT %pre # before upgrading package, record runtime status and stop service @@ -150,7 +137,7 @@ if [ $1 -eq 1 ]; then # after installing package, generate initial arp database %{l_shtool} install -c -o %{l_musr} -g %{l_mgrp} -m 644 \ - %{_builddir}/arpwatch-%{version}/arp.dat \ + %{_builddir}/arpwatch-%{version}/ethercodes.dat \ $RPM_INSTALL_PREFIX/var/arpwatch/run/ # after installing package, announce security provision lo0 diff -r d7167d2b16f4 -r 175768f4868b arpwatch/rc.arpwatch --- a/arpwatch/rc.arpwatch Tue Aug 28 18:34:40 2012 +0200 +++ b/arpwatch/rc.arpwatch Tue Aug 28 18:34:45 2012 +0200 @@ -10,8 +10,8 @@ arpwatch_log_numfiles="10" arpwatch_log_minsize="1M" arpwatch_log_complevel="9" - arpwatch_iface="-i lo0" - arpwatch_ipnet="-n 127.0.0.0/8" + arpwatch_iface="lo0" + arpwatch_ipnet="127.0.0.0/8" %common arpwatch_pidfile="@l_prefix@/var/arpwatch/run/arpwatch.pid" @@ -34,8 +34,8 @@ rcService arpwatch enable yes || exit 0 rcService arpwatch active yes && exit 0 @l_prefix@/sbin/arpwatch \ - $arpwatch_iface \ - $arpwatch_ipnet \ + -i $arpwatch_iface \ + -n $arpwatch_ipnet \ >$arpwatch_pidfile 2>&1 %stop -u @l_susr@