2019-12-25 16:08:42 +08:00
|
|
|
Name: tcpdump
|
|
|
|
|
Epoch: 14
|
|
|
|
|
Version: 4.9.3
|
2020-12-18 14:49:23 +08:00
|
|
|
Release: 4
|
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
|
|
|
|
|
Source1: ftp://ftp.ee.lbl.gov/tcpslice-1.2a3.tar.gz
|
|
|
|
|
Source2: http://www.tcpdump.org/release/tcpdump-%{version}.tar.gz.sig
|
|
|
|
|
|
2020-12-18 14:49:23 +08:00
|
|
|
Patch0: 0002-Use-getnameinfo-instead-of-gethostbyaddr.patch
|
|
|
|
|
Patch1: 0003-Drop-root-priviledges-before-opening-first-savefile-.patch
|
|
|
|
|
Patch2: 0004-tcpslice-update-tcpslice-patch-to-1.2a3.patch
|
|
|
|
|
Patch3: 0005-tcpslice-remove-unneeded-include.patch
|
|
|
|
|
Patch4: 0006-tcpslice-don-t-test-the-pointer-but-pointee-for-NULL.patch
|
|
|
|
|
Patch5: 0007-Introduce-nn-option.patch
|
|
|
|
|
Patch6: 0009-Change-n-flag-to-nn-in-TESTonce.patch
|
|
|
|
|
Patch7: 0011-Evp-cipher-buffers.patch
|
|
|
|
|
Patch8: 0012-Add-printing-support-for-vsockmon-devices.patch
|
|
|
|
|
Patch9: CVE-2020-8037.patch
|
2019-12-25 16:08:42 +08:00
|
|
|
|
|
|
|
|
Requires(pre): shadow-utils
|
|
|
|
|
BuildRequires: automake openssl-devel libpcap-devel git-core gcc
|
|
|
|
|
|
|
|
|
|
%define tcpslice_dir tcpslice-1.2a3
|
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
|
|
|
|
|
|
|
|
|
|
%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
|
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
|