代码拉取完成,页面将自动刷新
同步操作将从 src-openEuler/arpwatch 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
%global _vararpwatch %{_localstatedir}/lib/arpwatch
%global _hardened_build 1
Name: arpwatch
Epoch: 14
Version: 2.1a15
Release: 47
Summary: Network monitoring tools for tracking IP addresses on a network
License: BSD with advertising
URL: http://ee.lbl.gov/
Source0: https://ee.lbl.gov/downloads/arpwatch/arpwatch-%{version}.tar.gz
Source1: arpwatch.service
Source2: ethercodes-20110707.dat.bz2
BuildRequires: libpcap-devel perl-interpreter systemd sendmail
BuildRequires: gcc
Requires(pre): shadow-utils
Requires(post): systemd
Requires(preun): systemd
Requires(postun): systemd
Requires: sendmail
# The following patches come from upstream
Patch0001: arpwatch-2.1a4-fhs.patch
Patch0002: arpwatch-2.1a10-man.patch
Patch0003: arpwatch-drop.patch
Patch0004: arpwatch-drop-man.patch
Patch0005: arpwatch-addr.patch
Patch0006: arpwatch-dir-man.patch
Patch0007: arpwatch-scripts.patch
Patch0008: arpwatch-2.1a15-nolocalpcap.patch
Patch0009: arpwatch-2.1a15-bogon.patch
Patch0010: arpwatch-2.1a15-extraman.patch
Patch0011: arpwatch-exitcode.patch
Patch0012: arpwatch-2.1a15-dropgroup.patch
Patch0013: arpwatch-2.1a15-devlookup.patch
Patch0014: arpwatch-2.1a15-lookupiselect.patch
Patch0015: arpwatch-201301-ethcodes.patch
Patch0016: arpwatch-pie.patch
Patch0017: arpwatch-aarch64.patch
Patch0018: arpwatch-promisc.patch
%description
The arpwatch package contains arpwatch and arpsnmp. Arpwatch and
arpsnmp are both network monitoring tools that monitor ethernet or
FDDI network traffic and maintain a database of ethernet/ip address
pairings.
%package help
Summary: arpwatch help and arpsnmp help
%description help
The arpwatch-help package provides the help manual function separately.
%prep
%autosetup -n %{name}-%{version} -p1
%build
%configure
%make_build ARPDIR=%{_vararpwatch}
%install
install -d $RPM_BUILD_ROOT%{_mandir}/man8
install -d $RPM_BUILD_ROOT%{_sbindir}
install -d $RPM_BUILD_ROOT%{_vararpwatch}
install -d $RPM_BUILD_ROOT%{_unitdir}
touch $RPM_BUILD_ROOT%{_vararpwatch}/arp.dat-
%make_install install-man
# prepare awk scripts
perl -pi -e "s/\'/\'\\\'\'/g" *.awk
# and embed them
for i in arp2ethers massagevendor massagevendor-old; do
cp -f $i $RPM_BUILD_ROOT%{_sbindir}
for j in *.awk; do
sed "s/-f\ *\(\<$j\>\)/\'\1\n\' /g" \
< $RPM_BUILD_ROOT%{_sbindir}/$i \
| sed "s/$j\$//;tx;b;:x;r$j" \
> $RPM_BUILD_ROOT%{_sbindir}/$i.x
mv -f $RPM_BUILD_ROOT%{_sbindir}/$i{.x,}
done
chmod 755 $RPM_BUILD_ROOT%{_sbindir}/$i
done
install -p -m644 *.dat $RPM_BUILD_ROOT%{_vararpwatch}
install -p -m644 %{SOURCE1} $RPM_BUILD_ROOT%{_unitdir}/arpwatch.service
install -p -m644 %{SOURCE2} $RPM_BUILD_ROOT%{_vararpwatch}/ethercodes.dat.bz2
bzip2 -df $RPM_BUILD_ROOT%{_vararpwatch}/ethercodes.dat.bz2
%pre
if ! getent group arpwatch &> /dev/null; then
getent group pcap 2> /dev/null | grep -q 77 &&
/usr/sbin/groupmod -n arpwatch pcap 2> /dev/null ||
/usr/sbin/groupadd -g 77 arpwatch 2> /dev/null
fi
if ! getent passwd arpwatch &> /dev/null; then
getent passwd pcap 2> /dev/null | grep -q 77 &&
/usr/sbin/usermod -l arpwatch -g 77 \
-d %{_vararpwatch} pcap 2> /dev/null ||
/usr/sbin/useradd -u 77 -g 77 -s /sbin/nologin \
-M -r -d %{_vararpwatch} arpwatch 2> /dev/null
fi
:
%preun
%systemd_preun arpwatch.service
%post
%systemd_post arpwatch.service
%postun
%systemd_postun_with_restart arpwatch.service
%files
%exclude %{_sbindir}/massagevendor-old
%doc README CHANGES arpfetch
%{_sbindir}/arpwatch
%{_sbindir}/arpsnmp
%{_sbindir}/arp2ethers
%{_sbindir}/massagevendor
%{_unitdir}/arpwatch.service
%attr(1775,-,arpwatch) %dir %{_vararpwatch}
%attr(0644,arpwatch,arpwatch) %verify(not md5 size mtime) %config(noreplace) %{_vararpwatch}/arp.dat
%attr(0644,arpwatch,arpwatch) %verify(not md5 size mtime) %config(noreplace) %{_vararpwatch}/arp.dat-
%attr(0600,arpwatch,arpwatch) %verify(not md5 size mtime) %ghost %{_vararpwatch}/arp.dat.new
%attr(0644,-,arpwatch) %verify(not md5 size mtime) %config(noreplace) %{_vararpwatch}/ethercodes.dat
%files help
%{_mandir}/man8/*.8*
%changelog
* Wed Jun 25 2021 lijingyuan <lijingyuan3@huawei.com> - 14:2.1a15-47
- Type:bugfix
- Id:NA
- SUG:NA
- DESC:Added the gcc dependency
* Thu Mar 25 2021 liulong <liulong20@huawei.com> - 14:2.1a15-46
- Type:bugfix
- Id:NA
- SUG:NA
- DESC:Modify the changelog description.
* Tue Dec 15 2020 xihaochen <xihaochen@huawei.com> - 14:2.1a15-45
- Type:requirements
- Id:NA
- SUG:NA
- DESC:remove sensitive keywords and update source url
* Fri Sep 06 2019 Alex Chao <zhaolei746@huawei.com> - 14:2.1a15-44
- Package init
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。