加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
arpwatch.spec 3.78 KB
一键复制 编辑 原始数据 按行查看 历史
ICeeyou 提交于 2021-07-12 16:01 . update arpwatch.spec.
%if ! %{defined _fillupdir}
%define _fillupdir %{_localstatedir}/adm/fillup-templates
%endif
Name: arpwatch
Version: 2.1a15
Release: 0
Summary: Tool to keep track of Ethernet<->IP address pairings
License: BSD-3-Clause
Group: Productivity/Networking/Diagnostic
URL: http://www-nrg.ee.lbl.gov/nrg.html
Source: %{name}-%{version}.tar.gz
Source10: arpwatch@.service
Source11: sysconfig.arpwatch
Source12: arpwatch.service
Patch0: arpwatch-2.1a11-chrootbuild.diff
Patch1: arpwatch-no-source-zero.dif
Patch3: arpwatch-2.1a11-tokenring.diff
Patch4: arpwatch-2.1a11-hname-overflow.dif
Patch5: arpwatch-2.1a11-drop-privs-manpage.dif
Patch6: arpwatch-2.1a11-drop-privs.dif
Patch7: arpwatch-2.1a11-emailaddr.dif
Patch8: arpwatch-2.1a15-massagevendor.patch
Patch9: getnameinfo.patch
# PATCH-Fix-Upstream -- https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=625796#20 -- seife+obs@b1-systems.com
Patch10: 0001-Ignore-802.1Q-frames.patch
Patch11: report-iface.patch
Patch12: arpwatch-MAC.patch
Patch13: arpwatch-exit.patch
Patch14: arp2ethers.patch
BuildRequires: libpcap-devel
BuildRequires: postfix
BuildRequires: systemd-rpm-macros
Requires: arpwatch-ethercodes
Requires(post): fillup_prereq
Requires(post): coreutils
%description
Arpwatch keeps track of Ethernet and IP address pairings. It logs
activity to syslog and reports certain changes via e-mail.
%package ethercodes-build
Summary: Tool to create ethercodes.dat from IEEE.org meta data
Group: Productivity/Networking/Diagnostic
%description ethercodes-build
Tool and required files to create the ethercodes.dat file from the OUI
and company ID data as provided by IEEE.org. This package is only
needed if you want to build the arpwatch-ethercodes package.
%prep
%autosetup -p1
%build
%configure
%make_build ARPDIR=%{_localstatedir}/lib/arpwatch
%install
mkdir -p \
%{buildroot}/%{_tmpfilesdir} \
%{buildroot}/%{_sbindir} \
%{buildroot}/%{_datadir}/arpwatch \
%{buildroot}/%{_mandir}/man8 \
%{buildroot}%{_fillupdir}
%make_install
# ethercodes.dat is in the arpwatch-ethercodes package
rm -f %{buildroot}/%{_datadir}/arpwatch/ethercodes.dat
for file in massagevendor euppertolower.awk duplicates.awk p.awk; do
cp -p ${file} %{buildroot}/%{_datadir}/arpwatch
done
make DESTDIR=%{buildroot} install-man
install -Dm 0644 %{SOURCE10} %{buildroot}/%{_unitdir}/arpwatch@.service
install -Dm 0644 %{SOURCE12} %{buildroot}/%{_unitdir}/arpwatch.service
ln -s service %{buildroot}%{_sbindir}/rcarpwatch
install -Dm 0644 %{SOURCE11} \
%{buildroot}%{_fillupdir}/sysconfig.arpwatch
# own the database files
cat > %{buildroot}%{_tmpfilesdir}/arpwatch.conf <<EOF
# See tmpfiles.d(5) for details
d /var/lib/arpwatch - - - -
f /var/lib/arpwatch/arp.dat - - - -
EOF
mkdir %{buildroot}%{_bindir}
install -m 0755 arp2ethers %{buildroot}%{_bindir}
%pre
%service_add_pre arpwatch.service
%service_add_pre arpwatch@.service
%preun
%service_del_preun arpwatch.service
%service_del_preun arpwatch@.service
%post
%fillup_only
%tmpfiles_create %{_tmpfilesdir}/arpwatch.conf
%service_add_post arpwatch.service
%service_add_post arpwatch@.service
%postun
%service_del_postun arpwatch.service
%service_del_postun arpwatch@.service
%files
%{_unitdir}/arpwatch.service
%{_unitdir}/arpwatch@.service
%{_tmpfilesdir}/arpwatch.conf
%{_sbindir}/rcarpwatch
%{_sbindir}/arpsnmp
%{_sbindir}/arpwatch
%{_bindir}/arp2ethers
%ghost %dir %{_localstatedir}/lib/arpwatch
%ghost %{_localstatedir}/lib/arpwatch/arp.dat
%{_fillupdir}/sysconfig.arpwatch
%{_mandir}/man8/arpsnmp.8%{?ext_man}
%{_mandir}/man8/arpwatch.8%{?ext_man}
%doc CHANGES FILES README
%files ethercodes-build
%{_datadir}/arpwatch
%changelog
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化