From 2c737a096c5c04975f1b19cc209d17b782e4da99 Mon Sep 17 00:00:00 2001 From: Sven Lankes Date: Sat, 26 Dec 2015 11:53:18 +0100 Subject: [PATCH] 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 --- .gitignore | 1 + scapy.spec | 48 +++++++++++++++++++++++++++++------------------- sources | 2 +- 3 files changed, 31 insertions(+), 20 deletions(-) diff --git a/.gitignore b/.gitignore index 725d742..b2190c7 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ scapy-2.0.0.10.tar.gz /scapy-2.2.0.tar.gz +/scapy-2.3.1.zip diff --git a/scapy.spec b/scapy.spec index 7eec2d1..3852279 100644 --- a/scapy.spec +++ b/scapy.spec @@ -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 - 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 - 2.2.0-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild diff --git a/sources b/sources index e4604d1..062e47b 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -406990bd8da1f4958b354b4b6fc4b3eb scapy-2.2.0.tar.gz +46f4ef88b676daebd3053bbd2ee16425 scapy-2.3.1.zip