Blob Blame History Raw
Name: pcapdiff
Version: 0.1
Release:  8%{?dist}
Summary: Compares packet captures, detects forged, dropped or mangled packets

Group: Development/Languages
License: GPLv2+ and GPLv3+
URL: http://www.eff.org/testyourisp/pcapdiff/
Source0: http://www.eff.org/files/pcapdiff-%{version}.tar.gz
Source1: pcapdiff.py
Source2: printpackets
Patch0: pcapdiff-pcapdiff-noshebang.patch
Patch1: pcapdiff-printpackets-noshebang.patch
Patch2: pcapdiff-pcapdiff_helper-noshebang.patch

BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root%(%{__id_u} -n)
BuildArch: noarch
BuildRequires: python-devel
Requires: pcapy

%description
Pcapdiff is a tool developed by the EFF to compare two packet captures and
identify potentially forged, dropped, or mangled packets. Two technically-
inclined friends can set up packet captures (e.g. tcpdump or Wireshark) on
their own computers and produce network traffic between their two computers 
over the Internet. Later, they can run pcapdiff on the two packet capture 
files to identify suspicious packets for further investigation. See 
Detecting packet injection: a guide to observing packet spoofing by ISPs 
and EFF's Test Your ISP Project for more background.

%prep
%setup -qn pcapdiff

%patch0 -p0
%patch1 -p0
%patch2 -p0

%build


#fix encodings
#sed -i 's/\r//' LICENSE
#sed -i 's/\r//' README
#sed -i 's/\r//' pcapdiff.html
#iconv -f IBM850 -t UTF8 pcapdiff.html > pcapdiff.html.tmp
#mv pcapdiff.html.tmp pcapdiff.html


%install
rm -rf $RPM_BUILD_ROOT
install -D -m 755 -p %{SOURCE1} $RPM_BUILD_ROOT%{_bindir}/pcapdiff
install -D -m 644 -p pcapdiff.py $RPM_BUILD_ROOT%{_datadir}/pcapdiff/pcapdiff.py
install -D -m 755 -p %{SOURCE2} $RPM_BUILD_ROOT%{_bindir}/printpackets
install -D -m 644 -p printpackets.py $RPM_BUILD_ROOT%{_datadir}/pcapdiff/printpackets.py
install -D -m 644 -p pcapdiff_helper.py $RPM_BUILD_ROOT%{_datadir}/pcapdiff/pcapdiff_helper.py

%clean
rm -rf $RPM_BUILD_ROOT


%files
%defattr(-,root,root,-)
%doc README COPYING.2 COPYING.3
%{_bindir}/pcapdiff
%{_bindir}/printpackets
%dir %{_datadir}/pcapdiff/
%{_datadir}/pcapdiff/*.py
%{_datadir}/pcapdiff/*.pyc
%{_datadir}/pcapdiff/*.pyo

%changelog
* Wed Aug 11 2010 David Malcolm <dmalcolm@redhat.com> - 0.1-8
- recompiling .py files against Python 2.7 (rhbz#623344)

* Tue Mar 20 2010 Jon Ciesla <limb@jcomserv.net> - 0.1-7
- Fix for crash, BZ 557733.

* Sat Jul 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.1-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild

* Thu Feb 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.1-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild

* Mon Dec 01 2008 Ignacio Vazquez-Abrams <ivazqueznet+rpm@gmail.com> - 0.1-4
- Rebuild for Python 2.6

* Fri Feb 22 2008 Jon Ciesla <limb@jcomserv.net> - 0.1-3
- BZ 434582.

* Tue Dec 04 2007 Jon Ciesla <limb@jcomserv.net> - 0.1-2
- Added python-devel BR to fix .pyc/.pyo issue.

* Fri Nov 30 2007 Jon Ciesla <limb@jcomserv.net> - 0.1-1
- create.