From 5b1202c4a565678833f169956062a7dd01e59c1e Mon Sep 17 00:00:00 2001 From: Andrea Claudi Date: Fri, 23 Jun 2023 19:39:14 +0200 Subject: [PATCH] scapy-2.5.0-1.el9 --- .gitignore | 1 + .scapy.metadata | 2 ++ scapy-2.2.0-subprocess-import.patch | 18 ----------------- scapy-2.2.0-xdg-open.patch | 24 ---------------------- scapy-2.4.3-ethertypes.patch | 23 --------------------- scapy-2.4.3-libc.patch | 12 ----------- scapy.spec | 31 ++++++++++------------------- sources | 1 + 8 files changed, 14 insertions(+), 98 deletions(-) create mode 100644 .scapy.metadata delete mode 100644 scapy-2.2.0-subprocess-import.patch delete mode 100644 scapy-2.2.0-xdg-open.patch delete mode 100644 scapy-2.4.3-ethertypes.patch delete mode 100644 scapy-2.4.3-libc.patch diff --git a/.gitignore b/.gitignore index a108030..53e93d7 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,4 @@ scapy-2.0.0.10.tar.gz /scapy-2.4.0.tar.gz /scapy-2.4.3.tar.gz /scapy-2.4.4.tar.gz +/scapy-2.5.0.tar.gz diff --git a/.scapy.metadata b/.scapy.metadata new file mode 100644 index 0000000..ca96a3f --- /dev/null +++ b/.scapy.metadata @@ -0,0 +1,2 @@ +9bd34442e7feca4f37e928c7723d6180694f3bc8 scapy-2.4.4.tar.gz +255a85fdef42b7cd9dd1fec25b6b3ba633289335 scapy-2.5.0.tar.gz diff --git a/scapy-2.2.0-subprocess-import.patch b/scapy-2.2.0-subprocess-import.patch deleted file mode 100644 index e3a82b1..0000000 --- a/scapy-2.2.0-subprocess-import.patch +++ /dev/null @@ -1,18 +0,0 @@ -# HG changeset patch -# User Jean-Michel -# Date 1400096697 -7200 -# Node ID 3bd59a1a75ff4a96e3f549840d27fe707d9f7b8c -# Parent 6dd464d5ac302325e9e06f9ee2cf1d8e81637554 -Adding missing import for psdump() and pdfdump() methods - -diff --git a/scapy/packet.py b/scapy/packet.py ---- a/scapy/packet.py -+++ b/scapy/packet.py -@@ -15,6 +15,7 @@ - from volatile import VolatileValue - from utils import import_hexcap,tex_escape,colgen,get_temp_file - from error import Scapy_Exception,log_runtime -+import subprocess - - try: - import pyx diff --git a/scapy-2.2.0-xdg-open.patch b/scapy-2.2.0-xdg-open.patch deleted file mode 100644 index 8edfde2..0000000 --- a/scapy-2.2.0-xdg-open.patch +++ /dev/null @@ -1,24 +0,0 @@ -# HG changeset patch -# User Lubomir Rintel -# Date 1411237938 -7200 -# Node ID 0ce553161b799e9dc91f63de73dfdb0f50360056 -# Parent ac04713bb61839a3476b72118e3d1c3ce5c81e86 -Do not default to acroread and gv - -They are not very likely to be present nowadays. Default to user's preferred -application instead. - -diff --git a/scapy/config.py b/scapy/config.py ---- a/scapy/config.py -+++ b/scapy/config.py -@@ -56,8 +56,8 @@ - - - class ProgPath(ConfClass): -- pdfreader = "acroread" -- psreader = "gv" -+ pdfreader = "xdg-open" -+ psreader = "xdg-open" - dot = "dot" - display = "display" - tcpdump = "tcpdump" diff --git a/scapy-2.4.3-ethertypes.patch b/scapy-2.4.3-ethertypes.patch deleted file mode 100644 index c61a1a2..0000000 --- a/scapy-2.4.3-ethertypes.patch +++ /dev/null @@ -1,23 +0,0 @@ -https://github.com/secdev/scapy/commit/0c3d5e417bbd923c4729d15572c3d693d58aff81.patch -From 0c3d5e417bbd923c4729d15572c3d693d58aff81 Mon Sep 17 00:00:00 2001 -From: Gabriel -Date: Wed, 21 Aug 2019 18:18:14 +0800 -Subject: [PATCH] Small Python 2 fix - ---- - scapy/tools/generate_ethertypes.py | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/scapy/tools/generate_ethertypes.py b/scapy/tools/generate_ethertypes.py -index 5bc5cdf98..47c38c4f9 100644 ---- a/scapy/tools/generate_ethertypes.py -+++ b/scapy/tools/generate_ethertypes.py -@@ -20,7 +20,7 @@ - with urllib.request.urlopen(URL) as stream: - DATA = stream.read() - --reg = rb".*ETHERTYPE_([^\s]+)\s.0x([0-9A-Fa-f]+).*\/\*(.*)\*\/" -+reg = br".*ETHERTYPE_([^\s]+)\s.0x([0-9A-Fa-f]+).*\/\*(.*)\*\/" - COMPILED = b"""# - # Ethernet frame types - # This file describes some of the various Ethernet diff --git a/scapy-2.4.3-libc.patch b/scapy-2.4.3-libc.patch deleted file mode 100644 index a2ac61b..0000000 --- a/scapy-2.4.3-libc.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -u --recursive scapy-2.4.3-vanilla/scapy/arch/bpf/core.py scapy-2.4.3/scapy/arch/bpf/core.py ---- scapy-2.4.3-vanilla/scapy/arch/bpf/core.py 2019-08-04 11:12:30.000000000 -0500 -+++ scapy-2.4.3/scapy/arch/bpf/core.py 2021-03-11 13:30:35.033061720 -0600 -@@ -28,7 +28,7 @@ - - # ctypes definitions - --LIBC = cdll.LoadLibrary(find_library("libc")) -+LIBC = cdll.LoadLibrary(find_library("c")) - LIBC.ioctl.argtypes = [c_int, c_ulong, c_char_p] - LIBC.ioctl.restype = c_int - diff --git a/scapy.spec b/scapy.spec index fa6b453..451c9f9 100644 --- a/scapy.spec +++ b/scapy.spec @@ -1,20 +1,11 @@ Name: scapy -Version: 2.4.4 -Release: 5%{?dist} +Version: 2.5.0 +Release: 1%{?dist} Summary: Interactive packet manipulation tool and network scanner -%global gituser secdev -%global gitname scapy -%global commit 95ba5b8504152a1f820bbe679ccf03668cb5118f -%global shortcommit %(c=%{commit}; echo ${c:0:7}) - License: GPLv2 URL: http://www.secdev.org/projects/scapy/ -# https://github.com/secdev/scapy/releases -# https://bitbucket.org/secdev/scapy/pull-request/80 -# https://scapy.readthedocs.io/en/latest/introduction.html -Source0: https://github.com/%{gituser}/%{gitname}/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz -Patch1: scapy-2.4.3-libc.patch +Source0: https://github.com/secdev/scapy/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz %global common_desc %{expand: Scapy is a powerful interactive packet manipulation program built on top @@ -163,12 +154,10 @@ rm -f %{buildroot}%{python2_sitelib}/*egg-info/requires.txt # Rename the executables mv -f %{buildroot}%{_bindir}/scapy %{buildroot}%{_bindir}/scapy2 -mv -f %{buildroot}%{_bindir}/UTscapy %{buildroot}%{_bindir}/UTscapy2 %if ! 0%{?with_python3} # Link the default to the py2 version of executables if py3 not built ln -s %{_bindir}/scapy2 %{buildroot}%{_bindir}/scapy -ln -s %{_bindir}/UTscapy2 %{buildroot}%{_bindir}/UTscapy %endif %endif @@ -178,11 +167,9 @@ rm -f %{buildroot}%{python3_sitelib}/*egg-info/requires.txt # Rename the executables mv -f %{buildroot}%{_bindir}/scapy %{buildroot}%{_bindir}/scapy3 -mv -f %{buildroot}%{_bindir}/UTscapy %{buildroot}%{_bindir}/UTscapy3 # Link the default to the python3 version of executables ln -s %{_bindir}/scapy3 %{buildroot}%{_bindir}/scapy -ln -s %{_bindir}/UTscapy3 %{buildroot}%{_bindir}/UTscapy %endif @@ -201,10 +188,8 @@ ln -s %{_bindir}/UTscapy3 %{buildroot}%{_bindir}/UTscapy %if ! 0%{?with_python3} %doc %{_mandir}/man1/scapy.1* %{_bindir}/scapy -%{_bindir}/UTscapy %endif %{_bindir}/scapy2 -%{_bindir}/UTscapy2 %{python2_sitelib}/scapy/ %{python2_sitelib}/scapy-*.egg-info %endif @@ -216,11 +201,10 @@ ln -s %{_bindir}/UTscapy3 %{buildroot}%{_bindir}/UTscapy %license LICENSE %doc %{_mandir}/man1/scapy.1* %{_bindir}/scapy -%{_bindir}/UTscapy %{_bindir}/scapy3 -%{_bindir}/UTscapy3 %{python3_sitelib}/scapy/ %{python3_sitelib}/scapy-*.egg-info +%exclude %{python3_sitelib}/test %endif @@ -231,11 +215,16 @@ ln -s %{_bindir}/UTscapy3 %{buildroot}%{_bindir}/UTscapy %changelog +* Fri Jun 23 2023 Andrea Claudi - 2.5.0-1.el9 +- Don't package scapy tests (Andrea Claudi) +- Fix scapy compliance with pep-0440 (Andrea Claudi) [2162667] +- New version 2.5.0 (Andrea Claudi) [RHEL-657] + * Tue Aug 10 2021 Mohan Boddu - 2.4.4-5 - Rebuilt for IMA sigs, glibc 2.34, aarch64 flags Related: rhbz#1991688 -* Fri Jul 23 2021 Andrea Claudi - [2.4.4-4.el9] +* Fri Jul 23 2021 Andrea Claudi - 2.4.4-4.el9 - Don't build scapy-doc package on rhel (Andrea Claudi) [1973720] - Enable gating test on RHEL9 (Jianwen Ji) [1974642] diff --git a/sources b/sources index 823fecd..acb3899 100644 --- a/sources +++ b/sources @@ -1 +1,2 @@ SHA512 (scapy-2.4.4.tar.gz) = d6078901839157b3f3d63c304f43f88a41b9bd2fb32cc917624c12fe822818d02256d6661b5076689c0f59c51e4ab35195ddf555f0d1f6df95faac1c646ee8c6 +SHA512 (scapy-2.5.0.tar.gz) = 4e5cacff0bbf6fd991ea24f4680049d042082fae4b349c8082078e6f01b38c09bb5c8276bfba15d4a88a1eb5af92c505848ec98556b10eecbd803f134a5b244a