84 lines
2.7 KiB
RPMSpec
84 lines
2.7 KiB
RPMSpec
|
|
Name: tcpdump
|
||
|
|
Epoch: 14
|
||
|
|
Version: 4.9.2
|
||
|
|
Release: 7
|
||
|
|
Summary: A powerful command-line packet analyzer and library for network traffic capture.
|
||
|
|
License: BSD with advertising
|
||
|
|
URL: http://www.tcpdump.org
|
||
|
|
Source0: http://www.tcpdump.org/release/%{name}-%{version}.tar.gz
|
||
|
|
Source1: ftp://ftp.ee.lbl.gov/tcpslice-1.2a3.tar.gz
|
||
|
|
|
||
|
|
Patch0001: 0001-icmp6-print-Reachable-Time-and-Retransmit-Time-from-.patch
|
||
|
|
Patch0002: 0002-Use-getnameinfo-instead-of-gethostbyaddr.patch
|
||
|
|
Patch0003: 0003-Drop-root-priviledges-before-opening-first-savefile-.patch
|
||
|
|
Patch0004: 0004-tcpslice-update-tcpslice-patch-to-1.2a3.patch
|
||
|
|
Patch0005: 0005-tcpslice-remove-unneeded-include.patch
|
||
|
|
Patch0006: 0006-tcpslice-don-t-test-the-pointer-but-pointee-for-NULL.patch
|
||
|
|
Patch0007: 0007-Introduce-nn-option.patch
|
||
|
|
Patch0008: 0008-Don-t-print-out-we-dropped-root-we-are-always-droppi.patch
|
||
|
|
Patch0009: 0009-Change-n-flag-to-nn-in-TESTonce.patch
|
||
|
|
Patch0010: 0010-Expect-miliseconds-instead-of-seconds-in-icmp-captur.patch
|
||
|
|
Patch0011: 0011-Evp-cipher-buffers.patch
|
||
|
|
Patch0012: 0012-Add-printing-support-for-vsockmon-devices.patch
|
||
|
|
|
||
|
|
BuildRequires: automake openssl-devel libpcap-devel git-core
|
||
|
|
Requires: shadow-utils
|
||
|
|
|
||
|
|
%description
|
||
|
|
Tcpdump is a common packet analyzer that runs under the command line.
|
||
|
|
It allows the user to captureand display TCP/IP and other packets being
|
||
|
|
transmitted or received over a network to which the computer is attached.
|
||
|
|
|
||
|
|
%package help
|
||
|
|
Summary: Help documents for tcpdump
|
||
|
|
|
||
|
|
%description help
|
||
|
|
Man pages and other related help documents for tcpdump.
|
||
|
|
|
||
|
|
%prep
|
||
|
|
%autosetup -n %{name}-%{version} -a 1 -S git
|
||
|
|
|
||
|
|
%build
|
||
|
|
export CFLAGS="%{optflags} $(getconf LFS_CFLAGS) -fno-strict-aliasing"
|
||
|
|
pushd tcpslice-1.2a3
|
||
|
|
automake -a -f 2> /dev/null || :
|
||
|
|
%configure
|
||
|
|
%make_build
|
||
|
|
popd
|
||
|
|
|
||
|
|
%configure --with-crypto --with-user=tcpdump --without-smi
|
||
|
|
%make_build
|
||
|
|
|
||
|
|
%install
|
||
|
|
install -d %{buildroot}%{_libdir} %{buildroot}%{_sbindir} %{buildroot}%{_mandir}/man8
|
||
|
|
|
||
|
|
pushd tcpslice-1.2a3
|
||
|
|
install -m755 tcpslice %{buildroot}%{_sbindir}
|
||
|
|
install -m644 tcpslice.1 %{buildroot}%{_mandir}/man8/tcpslice.8
|
||
|
|
popd
|
||
|
|
|
||
|
|
install -m755 tcpdump %{buildroot}%{_sbindir}
|
||
|
|
install -m644 tcpdump.1 %{buildroot}%{_mandir}/man8/tcpdump.8
|
||
|
|
|
||
|
|
sed -i 's/\(\.TH[a-zA-Z ]*\)[1-9]\(.*\)/\18\2/' %{buildroot}%{_mandir}/man8/*
|
||
|
|
|
||
|
|
%check
|
||
|
|
make check
|
||
|
|
|
||
|
|
%pre
|
||
|
|
/usr/sbin/groupadd -g 72 tcpdump 2> /dev/null
|
||
|
|
/usr/sbin/useradd -u 72 -g 72 -s /sbin/nologin -M -r -d / tcpdump 2> /dev/null
|
||
|
|
exit 0
|
||
|
|
|
||
|
|
%files
|
||
|
|
%license LICENSE
|
||
|
|
%{_sbindir}/tcp*
|
||
|
|
|
||
|
|
%files help
|
||
|
|
%doc README.md CHANGES CREDITS
|
||
|
|
%{_mandir}/man8/tcp*.8*
|
||
|
|
|
||
|
|
%changelog
|
||
|
|
* Fri Sep 20 2019 chenzhenyu <chenzhenyu13@huawei.com> - 14:4.9.2-7
|
||
|
|
- Package init
|