update to latest upstream release (2.3.1)

- Update to 2.3.1
- Remove upstreamed patch
- Some spec fixes
- Thanks to Athmane Madjoudj for the patch
This commit is contained in:
Sven Lankes 2015-12-26 11:53:18 +01:00
parent 8a0aaac992
commit 2c737a096c
3 changed files with 31 additions and 20 deletions

1
.gitignore vendored
View File

@ -1,2 +1,3 @@
scapy-2.0.0.10.tar.gz
/scapy-2.2.0.tar.gz
/scapy-2.3.1.zip

View File

@ -1,23 +1,18 @@
%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
Name: scapy
Version: 2.2.0
Release: 6%{?dist}
Version: 2.3.1
Release: 1%{?dist}
Summary: Interactive packet manipulation tool and network scanner
Group: Applications/Internet
License: GPLv2
URL: http://www.secdev.org/projects/scapy/
Source0: http://www.secdev.org/projects/scapy/files/scapy-%{version}.tar.gz
# http://bb.secdev.org/scapy/commits/3bd59a1a75ff4a96e3f549840d27fe707d9f7b8c/raw/
Patch0: scapy-2.2.0-subprocess-import.patch
Source0: http://www.secdev.org/projects/scapy/files/scapy-%{version}.zip
# https://bitbucket.org/secdev/scapy/pull-request/80
Patch1: scapy-2.2.0-xdg-open.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Patch0: scapy-2.2.0-xdg-open.patch
BuildArch: noarch
BuildRequires: python >= 2.5
BuildRequires: python-devel >= 2.5
BuildRequires: python2-devel >= 2.5
Requires: python >= 2.5
@ -28,32 +23,47 @@ a wide number of protocols, send them over the wire, capture them, match
requests and replies, and much more.
%prep
%setup -q -n scapy-%{version}
# setup assumes tar file while it's a zip
rm -rf %{_builddir}/%{name}-%{version}/
unzip %{SOURCE0}
%setup -T -D
%patch0 -p1
%patch1 -p1
%build
%{__python} setup.py build
%install
%{__rm} -rf %{buildroot}
%{__install} -Dp -m0644 doc/scapy.1.gz %{buildroot}%{_mandir}/man1/scapy.1.gz
%{__python} setup.py install -O1 --skip-build --root %{buildroot}
%{__rm} -f %{buildroot}%{python_sitelib}/*egg-info/requires.txt
%{__rm} -f %{buildroot}%{python2_sitelib}/*egg-info/requires.txt
# Remove shebang
for Files in %{buildroot}%{python2_sitelib}/scapy/contrib/*.py %{buildroot}%{python2_sitelib}/scapy/pipetool.py %{buildroot}%{python2_sitelib}/scapy/layers/inet6.py %{buildroot}%{python2_sitelib}/scapy/tools/check_asdis.py; do
%{__sed} -i.orig -e 1d ${Files}
touch -r ${Files}.orig ${Files}
%{__rm} ${Files}.orig
done
%clean
%{__rm} -rf %{buildroot}
%check
#TODO: Need to fix/remove slow/failed test
#cd test/
#./run_tests
%files
%defattr(-,root,root,-)
%doc %{_mandir}/man1/scapy.1*
%{_bindir}/scapy
%{_bindir}/UTscapy
%{python_sitelib}/scapy/*
%{python_sitelib}/scapy-*.egg-info
%{python2_sitelib}/scapy/*
%{python2_sitelib}/scapy-*.egg-info
%changelog
* Sat Dec 26 2015 Sven Lankes <athmane@fedoraproject.org> - 2.3.1-1
- update to latest upstream release (2.3.1)
- Update to 2.3.1
- Remove upstreamed patch
- Some spec fixes
- Thanks to Athmane Madjoudj for the patch
* Fri Jun 19 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.2.0-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild

View File

@ -1 +1 @@
406990bd8da1f4958b354b4b6fc4b3eb scapy-2.2.0.tar.gz
46f4ef88b676daebd3053bbd2ee16425 scapy-2.3.1.zip