|
|
1c6a1b |
%global _vararpwatch %{_localstatedir}/lib/arpwatch
|
|
|
1c6a1b |
%global _hardened_build 1
|
|
|
1c6a1b |
|
|
|
1c6a1b |
Name: arpwatch
|
|
|
1c6a1b |
Epoch: 14
|
|
|
1c6a1b |
Version: 2.1a15
|
|
|
1c6a1b |
Release: 42%{?dist}
|
|
|
1c6a1b |
Summary: Network monitoring tools for tracking IP addresses on a network
|
|
|
1c6a1b |
Group: Applications/System
|
|
|
1c6a1b |
License: BSD with advertising
|
|
|
1c6a1b |
URL: http://ee.lbl.gov/
|
|
|
1c6a1b |
Requires(pre): shadow-utils
|
|
|
1c6a1b |
Requires(post): systemd
|
|
|
1c6a1b |
Requires(preun): systemd
|
|
|
1c6a1b |
Requires(postun): systemd
|
|
|
1c6a1b |
Requires: /usr/sbin/sendmail
|
|
|
1c6a1b |
BuildRequires: /usr/sbin/sendmail libpcap-devel perl-interpreter systemd
|
|
|
1c6a1b |
|
|
|
1c6a1b |
Source0: ftp://ftp.ee.lbl.gov/arpwatch-%{version}.tar.gz
|
|
|
1c6a1b |
Source1: arpwatch.service
|
|
|
1c6a1b |
# created by:
|
|
|
1c6a1b |
# wget -O- http://standards.ieee.org/regauth/oui/oui.txt | \
|
|
|
1c6a1b |
# iconv -f iso8859-1 -t utf8 | massagevendor | bzip2
|
|
|
1c6a1b |
Source3: ethercodes-20110707.dat.bz2
|
|
|
1c6a1b |
Patch1: arpwatch-2.1a4-fhs.patch
|
|
|
1c6a1b |
Patch2: arpwatch-2.1a10-man.patch
|
|
|
1c6a1b |
Patch3: arpwatch-drop.patch
|
|
|
1c6a1b |
Patch4: arpwatch-drop-man.patch
|
|
|
1c6a1b |
Patch5: arpwatch-addr.patch
|
|
|
1c6a1b |
Patch6: arpwatch-dir-man.patch
|
|
|
1c6a1b |
Patch7: arpwatch-scripts.patch
|
|
|
1c6a1b |
Patch8: arpwatch-2.1a15-nolocalpcap.patch
|
|
|
1c6a1b |
Patch9: arpwatch-2.1a15-bogon.patch
|
|
|
1c6a1b |
Patch10: arpwatch-2.1a15-extraman.patch
|
|
|
1c6a1b |
Patch11: arpwatch-exitcode.patch
|
|
|
1c6a1b |
Patch12: arpwatch-2.1a15-dropgroup.patch
|
|
|
1c6a1b |
Patch13: arpwatch-2.1a15-devlookup.patch
|
|
|
1c6a1b |
Patch14: arpwatch-2.1a15-lookupiselect.patch
|
|
|
1c6a1b |
Patch16: arpwatch-201301-ethcodes.patch
|
|
|
1c6a1b |
Patch17: arpwatch-pie.patch
|
|
|
1c6a1b |
Patch18: arpwatch-aarch64.patch
|
|
|
1c6a1b |
Patch19: arpwatch-promisc.patch
|
|
|
1c6a1b |
|
|
|
1c6a1b |
%description
|
|
|
1c6a1b |
The arpwatch package contains arpwatch and arpsnmp. Arpwatch and
|
|
|
1c6a1b |
arpsnmp are both network monitoring tools. Both utilities monitor
|
|
|
1c6a1b |
Ethernet or FDDI network traffic and build databases of Ethernet/IP
|
|
|
1c6a1b |
address pairs, and can report certain changes via email.
|
|
|
1c6a1b |
|
|
|
1c6a1b |
Install the arpwatch package if you need networking monitoring devices
|
|
|
1c6a1b |
which will automatically keep track of the IP addresses on your
|
|
|
1c6a1b |
network.
|
|
|
1c6a1b |
|
|
|
1c6a1b |
%prep
|
|
|
1c6a1b |
%setup -q
|
|
|
1c6a1b |
|
|
|
1c6a1b |
%patch1 -p1 -b .fhs
|
|
|
1c6a1b |
%patch2 -p1 -b .arpsnmpman
|
|
|
1c6a1b |
%patch3 -p1 -b .droproot
|
|
|
1c6a1b |
%patch4 -p0 -b .droprootman
|
|
|
1c6a1b |
%patch5 -p1 -b .mailuser
|
|
|
1c6a1b |
%patch6 -p1 -b .dirman
|
|
|
1c6a1b |
%patch7 -p1 -b .scripts
|
|
|
1c6a1b |
%patch8 -p1 -b .nolocalpcap
|
|
|
1c6a1b |
%patch9 -p1 -b .bogon
|
|
|
1c6a1b |
%patch10 -p1 -b .extraman
|
|
|
1c6a1b |
%patch11 -p1 -b .exitcode
|
|
|
1c6a1b |
%patch12 -p1 -b .dropgroup
|
|
|
1c6a1b |
%patch13 -p1 -b .devlookup
|
|
|
1c6a1b |
%patch14 -p1 -b .iselect
|
|
|
1c6a1b |
%patch16 -p1 -b .ethcode
|
|
|
1c6a1b |
%patch17 -p1 -b .pie
|
|
|
1c6a1b |
%patch18 -p1 -b .aarch64
|
|
|
1c6a1b |
%patch19 -p1 -b .promisc
|
|
|
1c6a1b |
|
|
|
1c6a1b |
%build
|
|
|
1c6a1b |
%configure
|
|
|
1c6a1b |
make ARPDIR=%{_vararpwatch}
|
|
|
1c6a1b |
|
|
|
1c6a1b |
%install
|
|
|
1c6a1b |
|
|
|
1c6a1b |
mkdir -p $RPM_BUILD_ROOT%{_mandir}/man8
|
|
|
1c6a1b |
mkdir -p $RPM_BUILD_ROOT%{_sbindir}
|
|
|
1c6a1b |
mkdir -p $RPM_BUILD_ROOT%{_vararpwatch}
|
|
|
1c6a1b |
mkdir -p $RPM_BUILD_ROOT%{_unitdir}
|
|
|
1c6a1b |
touch $RPM_BUILD_ROOT%{_vararpwatch}/arp.dat-
|
|
|
1c6a1b |
make DESTDIR=$RPM_BUILD_ROOT install install-man
|
|
|
1c6a1b |
|
|
|
1c6a1b |
# prepare awk scripts
|
|
|
1c6a1b |
perl -pi -e "s/\'/\'\\\'\'/g" *.awk
|
|
|
1c6a1b |
|
|
|
1c6a1b |
# and embed them
|
|
|
1c6a1b |
for i in arp2ethers massagevendor massagevendor-old; do
|
|
|
1c6a1b |
cp -f $i $RPM_BUILD_ROOT%{_sbindir}
|
|
|
1c6a1b |
for j in *.awk; do
|
|
|
1c6a1b |
sed "s/-f\ *\(\<$j\>\)/\'\1\n\' /g" \
|
|
|
1c6a1b |
< $RPM_BUILD_ROOT%{_sbindir}/$i \
|
|
|
1c6a1b |
| sed "s/$j\$//;tx;b;:x;r$j" \
|
|
|
1c6a1b |
> $RPM_BUILD_ROOT%{_sbindir}/$i.x
|
|
|
1c6a1b |
mv -f $RPM_BUILD_ROOT%{_sbindir}/$i{.x,}
|
|
|
1c6a1b |
done
|
|
|
1c6a1b |
chmod 755 $RPM_BUILD_ROOT%{_sbindir}/$i
|
|
|
1c6a1b |
done
|
|
|
1c6a1b |
|
|
|
1c6a1b |
install -p -m644 *.dat $RPM_BUILD_ROOT%{_vararpwatch}
|
|
|
1c6a1b |
install -p -m644 %{SOURCE1} $RPM_BUILD_ROOT%{_unitdir}/arpwatch.service
|
|
|
1c6a1b |
install -p -m644 %{SOURCE3} $RPM_BUILD_ROOT%{_vararpwatch}/ethercodes.dat.bz2
|
|
|
1c6a1b |
bzip2 -df $RPM_BUILD_ROOT%{_vararpwatch}/ethercodes.dat.bz2
|
|
|
1c6a1b |
|
|
|
1c6a1b |
rm -f $RPM_BUILD_ROOT%{_sbindir}/massagevendor-old
|
|
|
1c6a1b |
|
|
|
1c6a1b |
%post
|
|
|
1c6a1b |
%systemd_post arpwatch.service
|
|
|
1c6a1b |
|
|
|
1c6a1b |
%pre
|
|
|
1c6a1b |
if ! getent group arpwatch &> /dev/null; then
|
|
|
1c6a1b |
getent group pcap 2> /dev/null | grep -q 77 &&
|
|
|
1c6a1b |
/usr/sbin/groupmod -n arpwatch pcap 2> /dev/null ||
|
|
|
1c6a1b |
/usr/sbin/groupadd -g 77 arpwatch 2> /dev/null
|
|
|
1c6a1b |
fi
|
|
|
1c6a1b |
if ! getent passwd arpwatch &> /dev/null; then
|
|
|
1c6a1b |
getent passwd pcap 2> /dev/null | grep -q 77 &&
|
|
|
1c6a1b |
/usr/sbin/usermod -l arpwatch -g 77 \
|
|
|
1c6a1b |
-d %{_vararpwatch} pcap 2> /dev/null ||
|
|
|
1c6a1b |
/usr/sbin/useradd -u 77 -g 77 -s /sbin/nologin \
|
|
|
1c6a1b |
-M -r -d %{_vararpwatch} arpwatch 2> /dev/null
|
|
|
1c6a1b |
fi
|
|
|
1c6a1b |
:
|
|
|
1c6a1b |
|
|
|
1c6a1b |
%postun
|
|
|
1c6a1b |
%systemd_postun_with_restart arpwatch.service
|
|
|
1c6a1b |
|
|
|
1c6a1b |
%preun
|
|
|
1c6a1b |
%systemd_preun arpwatch.service
|
|
|
1c6a1b |
|
|
|
1c6a1b |
%files
|
|
|
1c6a1b |
%doc README CHANGES arpfetch
|
|
|
1c6a1b |
%{_sbindir}/arpwatch
|
|
|
1c6a1b |
%{_sbindir}/arpsnmp
|
|
|
1c6a1b |
%{_sbindir}/arp2ethers
|
|
|
1c6a1b |
%{_sbindir}/massagevendor
|
|
|
1c6a1b |
%{_mandir}/man8/*.8*
|
|
|
1c6a1b |
%{_unitdir}/arpwatch.service
|
|
|
1c6a1b |
%attr(1775,-,arpwatch) %dir %{_vararpwatch}
|
|
|
1c6a1b |
%attr(0644,arpwatch,arpwatch) %verify(not md5 size mtime) %config(noreplace) %{_vararpwatch}/arp.dat
|
|
|
1c6a1b |
%attr(0644,arpwatch,arpwatch) %verify(not md5 size mtime) %config(noreplace) %{_vararpwatch}/arp.dat-
|
|
|
1c6a1b |
%attr(0600,arpwatch,arpwatch) %verify(not md5 size mtime) %ghost %{_vararpwatch}/arp.dat.new
|
|
|
1c6a1b |
%attr(0644,-,arpwatch) %verify(not md5 size mtime) %config(noreplace) %{_vararpwatch}/ethercodes.dat
|
|
|
1c6a1b |
|
|
|
1c6a1b |
%changelog
|
|
|
1c6a1b |
* Mon Mar 5 2018 Jan Synáček <jsynacek@redhat.com> - 14:2.1a15-42
|
|
|
1c6a1b |
- make sure arpwatch starts after network devices are up (#1551431)
|
|
|
1c6a1b |
|
|
|
1c6a1b |
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 14:2.1a15-41
|
|
|
1c6a1b |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
|
|
|
1c6a1b |
|
|
|
1c6a1b |
* Wed Aug 02 2017 Fedora Release Engineering <releng@fedoraproject.org> - 14:2.1a15-40
|
|
|
1c6a1b |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
|
|
|
1c6a1b |
|
|
|
1c6a1b |
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 14:2.1a15-39
|
|
|
1c6a1b |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
|
|
|
1c6a1b |
|
|
|
1c6a1b |
* Mon Feb 20 2017 Jan Synáček <jsynacek@redhat.com> - 14:2.1a15-38
|
|
|
1c6a1b |
- fix FTBFS (#1423238)
|
|
|
1c6a1b |
|
|
|
1c6a1b |
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 14:2.1a15-37
|
|
|
1c6a1b |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
|
|
|
1c6a1b |
|
|
|
1c6a1b |
* Wed Feb 03 2016 Fedora Release Engineering <releng@fedoraproject.org> - 14:2.1a15-36
|
|
|
1c6a1b |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
|
|
|
1c6a1b |
|
|
|
1c6a1b |
* Tue Jan 26 2016 Jan Synáček <jsynacek@redhat.com> - 14:2.1a15-35
|
|
|
1c6a1b |
- fix arpwatch buffer overflow (#1301880)
|
|
|
1c6a1b |
- add -p option that disables promiscuous mode (#1301853)
|
|
|
1c6a1b |
|
|
|
1c6a1b |
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 14:2.1a15-34
|
|
|
1c6a1b |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
|
|
|
1c6a1b |
|
|
|
1c6a1b |
* Fri Aug 15 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 14:2.1a15-33
|
|
|
1c6a1b |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
|
|
|
1c6a1b |
|
|
|
1c6a1b |
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 14:2.1a15-32
|
|
|
1c6a1b |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
|
|
|
1c6a1b |
|
|
|
1c6a1b |
* Mon Feb 3 2014 Jan Synáček <jsynacek@redhat.com> 14:2.1a15-31
|
|
|
1c6a1b |
- reference documentation in the service file
|
|
|
1c6a1b |
- remove redundant sysconfig-related stuff
|
|
|
1c6a1b |
|
|
|
1c6a1b |
* Sun Aug 4 2013 Peter Robinson <pbrobinson@fedoraproject.org> 14:2.1a15-30
|
|
|
1c6a1b |
- Fix FTBFS
|
|
|
1c6a1b |
|
|
|
1c6a1b |
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 14:2.1a15-29
|
|
|
1c6a1b |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
|
|
|
1c6a1b |
|
|
|
1c6a1b |
* Tue Apr 23 2013 Jan Synáček <jsynacek@redhat.com> 14:2.1a15-28
|
|
|
1c6a1b |
- harden the package (#954336)
|
|
|
1c6a1b |
- support aarch64 (#925027)
|
|
|
1c6a1b |
|
|
|
1c6a1b |
* Wed Feb 13 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 14:2.1a15-27
|
|
|
1c6a1b |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
|
|
|
1c6a1b |
|
|
|
1c6a1b |
* Thu Jan 17 2013 Ales Ledvinka <aledvink@redhat.com> - 14:2.1a15-26
|
|
|
1c6a1b |
- fix permissions related to collected database
|
|
|
1c6a1b |
- update ethcodes defaults to current public IEEE OUI-32
|
|
|
1c6a1b |
|
|
|
1c6a1b |
* Mon Oct 15 2012 Ales Ledvinka <aledvink@redhat.com> - 14:2.1a15-25
|
|
|
1c6a1b |
- fix -i with invalid interface specified (#842660)
|
|
|
1c6a1b |
|
|
|
1c6a1b |
* Mon Oct 15 2012 Ales Ledvinka <aledvink@redhat.com> - 14:2.1a15-24
|
|
|
1c6a1b |
- fix devlookup to start with -i interface specified (#842660)
|
|
|
1c6a1b |
|
|
|
1c6a1b |
* Wed Aug 22 2012 Jan Synáček <jsynacek@redhat.com> - 14:2.1a15-23
|
|
|
1c6a1b |
- Add system-rpm macros (#850032)
|
|
|
1c6a1b |
|
|
|
1c6a1b |
* Tue Jul 24 2012 Jan Synáček <jsynacek@redhat.com> - 14:2.1a15-22
|
|
|
1c6a1b |
- add devlookup patch: search for suitable default interface, if -i is not
|
|
|
1c6a1b |
specified (#842660)
|
|
|
1c6a1b |
|
|
|
1c6a1b |
* Thu Jul 19 2012 Jan Synáček <jsynacek@redhat.com> - 14:2.1a15-21
|
|
|
1c6a1b |
- make spec slightly more fedora-review-friendly
|
|
|
1c6a1b |
|
|
|
1c6a1b |
* Wed Jul 18 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 14:2.1a15-21
|
|
|
1c6a1b |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
|
|
|
1c6a1b |
|
|
|
1c6a1b |
* Thu May 31 2012 Aleš Ledvinka <aledvink@redhat.com> 14:2.1a15-20
|
|
|
1c6a1b |
- fix supplementary group list (#825328) (CVE-2012-2653)
|
|
|
1c6a1b |
|
|
|
1c6a1b |
* Thu Jan 19 2012 Jan Synáček <jsynacek@redhat.com> 14:2.1a15-19
|
|
|
1c6a1b |
- Turn on PrivateTmp=true in service file (#782477)
|
|
|
1c6a1b |
|
|
|
1c6a1b |
* Thu Jan 05 2012 Jan Synáček <jsynacek@redhat.com> 14:2.1a15-18
|
|
|
1c6a1b |
- Rebuilt for GCC 4.7
|
|
|
1c6a1b |
|
|
|
1c6a1b |
* Fri Jul 08 2011 Miroslav Lichvar <mlichvar@redhat.com> 14:2.1a15-17
|
|
|
1c6a1b |
- exit with zero error code (#699285)
|
|
|
1c6a1b |
- change service type to forking (#699285)
|
|
|
1c6a1b |
|
|
|
1c6a1b |
* Thu Jul 07 2011 Miroslav Lichvar <mlichvar@redhat.com> 14:2.1a15-16
|
|
|
1c6a1b |
- replace SysV init script with systemd service (#699285)
|
|
|
1c6a1b |
- update ethercodes.dat
|
|
|
1c6a1b |
|
|
|
1c6a1b |
* Mon Mar 28 2011 Miroslav Lichvar <mlichvar@redhat.com> 14:2.1a15-15
|
|
|
1c6a1b |
- update ethercodes.dat (#690948)
|
|
|
1c6a1b |
|
|
|
1c6a1b |
* Mon Feb 07 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 14:2.1a15-14
|
|
|
1c6a1b |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
|
|
|
1c6a1b |
|
|
|
1c6a1b |
* Tue Mar 30 2010 Miroslav Lichvar <mlichvar@redhat.com> 14:2.1a15-13
|
|
|
1c6a1b |
- update ethercodes.dat (#577552)
|
|
|
1c6a1b |
- mark ethercodes.dat as noreplace
|
|
|
1c6a1b |
- fix init script LSB compliance
|
|
|
1c6a1b |
- include Debian arp2ethers and massagevendor man pages (#526160)
|
|
|
1c6a1b |
- don't include massagevendor-old script anymore
|
|
|
1c6a1b |
|
|
|
1c6a1b |
* Wed Sep 02 2009 Miroslav Lichvar <mlichvar@redhat.com> 14:2.1a15-12
|
|
|
1c6a1b |
- update ethercodes.dat
|
|
|
1c6a1b |
|
|
|
1c6a1b |
* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 14:2.1a15-11
|
|
|
1c6a1b |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
|
|
|
1c6a1b |
|
|
|
1c6a1b |
* Mon Feb 23 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 14:2.1a15-10
|
|
|
1c6a1b |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
|
|
|
1c6a1b |
|
|
|
1c6a1b |
* Tue Sep 16 2008 Miroslav Lichvar <mlichvar@redhat.com> 14:2.1a15-9
|
|
|
1c6a1b |
- update ethercodes.dat (#462364)
|
|
|
1c6a1b |
|
|
|
1c6a1b |
* Tue Feb 19 2008 Fedora Release Engineering <rel-eng@fedoraproject.org> - 14:2.1a15-8
|
|
|
1c6a1b |
- Autorebuild for GCC 4.3
|
|
|
1c6a1b |
|
|
|
1c6a1b |
* Wed Aug 22 2007 Miroslav Lichvar <mlichvar@redhat.com> 14:2.1a15-7
|
|
|
1c6a1b |
- rebuild
|
|
|
1c6a1b |
|
|
|
1c6a1b |
* Thu Aug 09 2007 Miroslav Lichvar <mlichvar@redhat.com> 14:2.1a15-6
|
|
|
1c6a1b |
- improve init script (#246869)
|
|
|
1c6a1b |
- allow -n 0/32 to disable reporting bogons from 0.0.0.0 (#244606)
|
|
|
1c6a1b |
- update license tag
|
|
|
1c6a1b |
- update ethercodes.dat
|
|
|
1c6a1b |
|
|
|
1c6a1b |
* Wed Jun 13 2007 Miroslav Lichvar <mlichvar@redhat.com> 14:2.1a15-5
|
|
|
1c6a1b |
- update ethercodes.dat
|
|
|
1c6a1b |
|
|
|
1c6a1b |
* Thu May 24 2007 Miroslav Lichvar <mlichvar@redhat.com> 14:2.1a15-4
|
|
|
1c6a1b |
- fix return codes in init script (#237781)
|
|
|
1c6a1b |
|
|
|
1c6a1b |
* Mon Jan 15 2007 Miroslav Lichvar <mlichvar@redhat.com> 14:2.1a15-3
|
|
|
1c6a1b |
- rename pcap user to arpwatch
|
|
|
1c6a1b |
|
|
|
1c6a1b |
* Tue Nov 28 2006 Miroslav Lichvar <mlichvar@redhat.com> 14:2.1a15-2
|
|
|
1c6a1b |
- split from tcpdump package (#193657)
|
|
|
1c6a1b |
- update to 2.1a15
|
|
|
1c6a1b |
- clean up files in /var
|
|
|
1c6a1b |
- force linking with system libpcap
|