tcpdump/tcpdump.spec

136 lines
3.6 KiB
RPMSpec
Raw Normal View History

2019-12-25 16:08:42 +08:00
Name: tcpdump
Epoch: 14
2022-03-21 16:15:07 +08:00
Version: 4.99.1
2022-12-15 02:30:42 +00:00
Release: 5
2019-12-25 16:08:42 +08:00
Summary: A network traffic monitoring tool
License: BSD with advertising
URL: http://www.tcpdump.org
Source0: http://www.tcpdump.org/release/tcpdump-%{version}.tar.gz
2022-03-21 16:15:07 +08:00
Source1: ftp://ftp.ee.lbl.gov/tcpslice-1.3.tar.gz
2019-12-25 16:08:42 +08:00
Source2: http://www.tcpdump.org/release/tcpdump-%{version}.tar.gz.sig
2022-03-21 16:15:07 +08:00
Patch0: backport-0002-Use-getnameinfo-instead-of-gethostbyaddr.patch
Patch1: backport-0003-Drop-root-priviledges-before-opening-first-savefile-.patch
Patch2: backport-0007-Introduce-nn-option.patch
Patch3: backport-0009-Change-n-flag-to-nn-in-TESTonce.patch
Patch4: backport-0090-Set-SA_RESTART-non-lethal-signals-avoid-corrupting-binary-pcap-output.patch
2022-12-15 02:30:42 +00:00
Patch5: tcpdump-Add-sw64-architecture.patch
2019-12-25 16:08:42 +08:00
Requires(pre): shadow-utils
BuildRequires: automake openssl-devel libpcap-devel git-core gcc
2022-03-21 16:15:07 +08:00
%define tcpslice_dir tcpslice-1.3
2019-09-30 11:18:11 -04:00
%description
2019-12-25 16:08:42 +08:00
Tcpdump is a command-line tool for monitoring network traffic.
Tcpdump can capture and display the packet headers on a particular
network interface or on all interfaces. Tcpdump can display all of
the packet headers, or just the ones that match particular criteria.
2019-09-30 11:18:11 -04:00
2019-12-25 16:08:42 +08:00
Install tcpdump if you need a program to monitor network traffic.
2019-09-30 11:18:11 -04:00
2019-12-25 16:08:42 +08:00
%package help
Summary: Help documents for tcpdump
%description help
2019-09-30 11:18:11 -04:00
Man pages and other related help documents for tcpdump.
%prep
2019-12-25 16:08:42 +08:00
%autosetup -a 1 -S git
2019-09-30 11:18:11 -04:00
%build
2019-12-25 16:08:42 +08:00
export CFLAGS="$RPM_OPT_FLAGS $(getconf LFS_CFLAGS) -fno-strict-aliasing"
pushd %{tcpslice_dir}
# update config.{guess,sub}
2019-09-30 11:18:11 -04:00
automake -a -f 2> /dev/null || :
%configure
2019-12-25 16:08:42 +08:00
make %{?_smp_mflags}
2019-09-30 11:18:11 -04:00
popd
%configure --with-crypto --with-user=tcpdump --without-smi
2019-12-25 16:08:42 +08:00
make %{?_smp_mflags}
2019-09-30 11:18:11 -04:00
%install
2019-12-25 16:08:42 +08:00
mkdir -p ${RPM_BUILD_ROOT}%{_libdir}
mkdir -p ${RPM_BUILD_ROOT}%{_mandir}/man8
mkdir -p ${RPM_BUILD_ROOT}%{_sbindir}
2019-09-30 11:18:11 -04:00
2019-12-25 16:08:42 +08:00
pushd %{tcpslice_dir}
install -m755 tcpslice ${RPM_BUILD_ROOT}%{_sbindir}
install -m644 tcpslice.1 ${RPM_BUILD_ROOT}%{_mandir}/man8/tcpslice.8
2019-09-30 11:18:11 -04:00
popd
2019-12-25 16:08:42 +08:00
install -m755 tcpdump ${RPM_BUILD_ROOT}%{_sbindir}
install -m644 tcpdump.1 ${RPM_BUILD_ROOT}%{_mandir}/man8/tcpdump.8
2019-09-30 11:18:11 -04:00
2019-12-25 16:08:42 +08:00
# fix section numbers
sed -i 's/\(\.TH[a-zA-Z ]*\)[1-9]\(.*\)/\18\2/' \
${RPM_BUILD_ROOT}%{_mandir}/man8/*
2019-09-30 11:18:11 -04:00
%pre
/usr/sbin/groupadd -g 72 tcpdump 2> /dev/null
2019-12-25 16:08:42 +08:00
/usr/sbin/useradd -u 72 -g 72 -s /sbin/nologin -M -r \
-d / tcpdump 2> /dev/null
2019-09-30 11:18:11 -04:00
exit 0
2022-06-11 15:33:00 +08:00
%check
make check
2019-09-30 11:18:11 -04:00
%files
2019-12-25 16:08:42 +08:00
%doc README.md CHANGES CREDITS
2019-09-30 11:18:11 -04:00
%license LICENSE
2019-12-25 16:08:42 +08:00
%{_sbindir}/tcpdump
%{_sbindir}/tcpslice
2019-09-30 11:18:11 -04:00
%files help
2019-12-25 16:08:42 +08:00
%{_mandir}/man8/tcpslice.8*
%{_mandir}/man8/tcpdump.8*
2019-09-30 11:18:11 -04:00
%changelog
2022-12-15 02:30:42 +00:00
* Thu Dec 15 2022 xinghe <xinghe2@h-partners.com> - 14:4.99.1-5
- Type:feature
- CVE:NA
- SUG:NA
- DESC:Add sw64 architecture
* Wed Aug 31 2022 gaihuiying <eaglegai@163.com> - 14:4.99.1-4
- Type:bugfix
- CVE:NA
- SUG:NA
- DESC:fix git warning when rpmbuild -ba compiling
* Wed Aug 17 2022 zhangqiang <zhangqiang@kylinos.cn> - 14:4.99.1-3
- Type:bugfix
- CVE:NA
- SUG:NA
- DESC:Set SA_RESTART on non-lethal signals (REQ_INFO, FLUSH_PCAP) to avoid corrupting binary pcap output
2022-06-11 15:33:00 +08:00
* Sat Jun 11 2022 gaihuiying <eaglegai@163.com> - 4.99.1-2
- Type:bugfix
- CVE:NA
- SUG:NA
- DESC:enable make check
2022-03-21 16:15:07 +08:00
* Mon Mar 21 2022 yanglu<yanglu72@h-partners.com> - 4.99.1-1
- Type:requirements
- ID:NA
- SUG:NA
- DESC:update tcpdump to 4.99.1
2020-12-18 14:49:23 +08:00
* Fri Dec 18 2020 seuzw <930zhaowei@163.com> - 4.9.3-4
- Type:CVE
- ID:CVE-2020-8037
- SUG:NA
- DESC:fix CVE-2020-8037
2019-12-31 17:23:43 +08:00
* Tue Dec 31 2019 openEuler Buildteam <buildteam@openeuler.org> - 4.9.3-3
- Type:bugfix
- ID:NA
- SUG:NA
- DESC:optimization the spec
2019-12-25 16:08:42 +08:00
* Sat Dec 21 2019 openEuler Buildteam <buildteam@openeuler.org> - 4.9.3-2
2019-09-30 11:18:11 -04:00
- Package init