From b4ef670c45e1e2257c33b3e3ba597b1b586d6a1d Mon Sep 17 00:00:00 2001 From: eabdullin Date: Wed, 14 May 2025 15:29:01 +0000 Subject: [PATCH] import UBI scapy-2.6.1-1.el10 --- .gitignore | 2 +- .scapy.metadata | 1 - SOURCES/scapy-2.6.1-setup-py.patch | 158 ---------- SPECS/scapy.spec | 387 ------------------------ scapy.spec | 462 +++++++++++++++++++++++++++++ sources | 1 + 6 files changed, 464 insertions(+), 547 deletions(-) delete mode 100644 .scapy.metadata delete mode 100644 SOURCES/scapy-2.6.1-setup-py.patch delete mode 100644 SPECS/scapy.spec create mode 100644 scapy.spec create mode 100644 sources diff --git a/.gitignore b/.gitignore index 6bf22cf..7879ec8 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -SOURCES/scapy-2.6.1.tar.gz +scapy-2.6.1.tar.gz diff --git a/.scapy.metadata b/.scapy.metadata deleted file mode 100644 index a3f05e7..0000000 --- a/.scapy.metadata +++ /dev/null @@ -1 +0,0 @@ -9f35faf56a17641fa457972c8ca9723b38435e33 SOURCES/scapy-2.6.1.tar.gz diff --git a/SOURCES/scapy-2.6.1-setup-py.patch b/SOURCES/scapy-2.6.1-setup-py.patch deleted file mode 100644 index d53f4d4..0000000 --- a/SOURCES/scapy-2.6.1-setup-py.patch +++ /dev/null @@ -1,158 +0,0 @@ -diff -u --recursive scapy-2.6.1-vanilla/setup.py scapy-2.6.1/setup.py ---- scapy-2.6.1-vanilla/setup.py 2019-08-04 11:12:30.000000000 -0500 -+++ scapy-2.6.1/setup.py 2021-03-11 13:30:35.033061720 -0600 -@@ -1,28 +1,19 @@ - #! /usr/bin/env python - - """ --Setuptools setup file for Scapy. -+Distutils setup file for Scapy. - """ - --import io --import os --import sys -- --if sys.version_info[0] <= 2: -- raise OSError("Scapy no longer supports Python 2 ! Please use Scapy 2.5.0") -- - try: -- from setuptools import setup -- from setuptools.command.sdist import sdist -- from setuptools.command.build_py import build_py -+ from setuptools import setup, find_packages - except: - raise ImportError("setuptools is required to install scapy !") -+import io -+import os - - - def get_long_description(): -- """ -- Extract description from README.md, for PyPI's usage -- """ -+ """Extract description from README.md, for PyPI's usage""" - def process_ignore_tags(buffer): - return "\n".join( - x for x in buffer.split("\n") if "" not in x -@@ -38,52 +29,76 @@ - return None - - --# Note: why do we bother including a 'scapy/VERSION' file and doing our --# own versioning stuff, instead of using more standard methods? --# Because it's all garbage. -- --# If you remain fully standard, there's no way --# of adding the version dynamically, even less when using archives --# (currently, we're able to add the version anytime someone exports Scapy --# on github). -- --# If you use setuptools_scm, you'll be able to have the git tag set into --# the wheel (therefore the metadata), that you can then retrieve using --# importlib.metadata, BUT it breaks sdist (source packages), as those --# don't include metadata. -- -- --def _build_version(path): -- """ -- This adds the scapy/VERSION file when creating a sdist and a wheel -- """ -- fn = os.path.join(path, 'scapy', 'VERSION') -- with open(fn, 'w') as f: -- f.write(__import__('scapy').VERSION) -- -- --class SDist(sdist): -- """ -- Modified sdist to create scapy/VERSION file -- """ -- def make_release_tree(self, base_dir, *args, **kwargs): -- super(SDist, self).make_release_tree(base_dir, *args, **kwargs) -- # ensure there's a scapy/VERSION file -- _build_version(base_dir) -- -- --class BuildPy(build_py): -- """ -- Modified build_py to create scapy/VERSION file -- """ -- def build_package_data(self): -- super(BuildPy, self).build_package_data() -- # ensure there's a scapy/VERSION file -- _build_version(self.build_lib) -- -+# https://packaging.python.org/guides/distributing-packages-using-setuptools/ - setup( -- cmdclass={'sdist': SDist, 'build_py': BuildPy}, -+ name='scapy', -+ version=__import__('scapy').VERSION, -+ packages=find_packages(), - data_files=[('share/man/man1', ["doc/scapy.1"])], -+ package_data={ -+ 'scapy': ['VERSION'], -+ }, -+ # Build starting scripts automatically -+ entry_points={ -+ 'console_scripts': [ -+ 'scapy = scapy.main:interact' -+ ] -+ }, -+ python_requires='>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, <4', -+ # pip > 9 handles all the versioning -+ extras_require={ -+ 'basic': ["ipython"], -+ 'complete': [ -+ 'ipython', -+ 'pyx', -+ 'cryptography>=2.0', -+ 'matplotlib' -+ ], -+ 'docs': [ -+ 'sphinx>=3.0.0', -+ 'sphinx_rtd_theme>=0.4.3', -+ 'tox>=3.0.0' -+ ] -+ }, -+ # We use __file__ in scapy/__init__.py, therefore Scapy isn't zip safe -+ zip_safe=False, -+ -+ # Metadata -+ author='Philippe BIONDI', -+ author_email='phil(at)secdev.org', -+ maintainer='Pierre LALET, Gabriel POTTER, Guillaume VALADON', -+ description='Scapy: interactive packet manipulation tool', - long_description=get_long_description(), - long_description_content_type='text/markdown', -+ license='GPL-2.0-only', -+ url='https://scapy.net', -+ project_urls={ -+ 'Documentation': 'https://scapy.readthedocs.io', -+ 'Source Code': 'https://github.com/secdev/scapy/', -+ }, -+ download_url='https://github.com/secdev/scapy/tarball/master', -+ keywords=["network"], -+ classifiers=[ -+ "Development Status :: 5 - Production/Stable", -+ "Environment :: Console", -+ "Intended Audience :: Developers", -+ "Intended Audience :: Information Technology", -+ "Intended Audience :: Science/Research", -+ "Intended Audience :: System Administrators", -+ "Intended Audience :: Telecommunications Industry", -+ "License :: OSI Approved :: GNU General Public License v2 (GPLv2)", -+ "Programming Language :: Python :: 2", -+ "Programming Language :: Python :: 2.7", -+ "Programming Language :: Python :: 3", -+ "Programming Language :: Python :: 3.4", -+ "Programming Language :: Python :: 3.5", -+ "Programming Language :: Python :: 3.6", -+ "Programming Language :: Python :: 3.7", -+ "Programming Language :: Python :: 3.8", -+ "Programming Language :: Python :: 3.9", -+ "Programming Language :: Python :: 3.10", -+ "Topic :: Security", -+ "Topic :: System :: Networking", -+ "Topic :: System :: Networking :: Monitoring", -+ ] - ) diff --git a/SPECS/scapy.spec b/SPECS/scapy.spec deleted file mode 100644 index ebc571e..0000000 --- a/SPECS/scapy.spec +++ /dev/null @@ -1,387 +0,0 @@ -Name: scapy -Version: 2.6.1 -Release: 1%{?dist} -Summary: Interactive packet manipulation tool and network scanner - -License: GPLv2 -URL: http://www.secdev.org/projects/scapy/ -Source0: https://github.com/secdev/scapy/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz -Patch1: scapy-2.6.1-setup-py.patch - -%global common_desc %{expand: -Scapy is a powerful interactive packet manipulation program built on top -of the Python interpreter. It can be used to forge or decode packets of -a wide number of protocols, send them over the wire, capture them, match -requests and replies, and much more.} - - -# By default build with python3 subpackage -%bcond_without python3 - -# Build also the python2 package on releases up to fc31 and rhel8 -%if (0%{?fedora} && 0%{?fedora} <= 31 ) || ( 0%{?rhel} && 0%{?rhel} <= 8 ) -%bcond_without python2 -%else -%bcond_with python2 -%endif - -# Build the documentation only on Fedora due to cc-by-nc-sa license -%if 0%{?fedora} -%bcond_without doc -%else -%bcond_with doc -%endif - - - - -BuildArch: noarch - -BuildRequires: make -BuildRequires: sed - -%if 0%{?with_python2} -BuildRequires: python2-devel -BuildRequires: python2-setuptools -%endif - -%if 0%{?with_python3} -BuildRequires: python%{python3_pkgversion}-devel -BuildRequires: python%{python3_pkgversion}-setuptools -%endif - -# Recommends only supported on fedora and rhel8+ -%if (0%{?fedora}) || ( 0%{?rhel} && 0%{?rhel} >= 8 ) -Recommends: tcpdump -# Using database of manufactures /usr/share/wireshark/manuf -Recommends: wireshark-cli -%endif - -%description %{common_desc} - -%if 0%{?with_python2} -%package -n python2-%{name} -Summary: Interactive packet manipulation tool and network scanner - -%{?python_provide:%python_provide python2-%{name}} - -%if (0%{?fedora}) || ( 0%{?rhel} && 0%{?rhel} >= 8 ) -Recommends: python2-pyx -Recommends: python2-matplotlib -Recommends: ipython2 -%endif - -%description -n python2-%{name} -%{common_desc} - -%endif - - -%if 0%{?with_python3} -%package -n python%{python3_pkgversion}-%{name} -Summary: Interactive packet manipulation tool and network scanner - -%{?python_provide:%python_provide python%{python3_pkgversion}-%{name}} -Provides: %{name} = %{version}-%{release} - -%if (0%{?fedora}) || ( 0%{?rhel} && 0%{?rhel} >= 8 ) -Recommends: PyX -Recommends: python%{python3_pkgversion}-matplotlib -Recommends: ipython3 -%endif - -%description -n python%{python3_pkgversion}-%{name} -%{common_desc} -%endif - -%if 0%{?with_doc} -%package doc -Summary: Interactive packet manipulation tool and network scanner - -BuildRequires: python%{python3_pkgversion}-sphinx -BuildRequires: python%{python3_pkgversion}-sphinx_rtd_theme - -%if 0%{?with_python2} -BuildRequires: python2-tox -%endif - -%if 0%{?with_python3} -BuildRequires: python%{python3_pkgversion}-tox -%endif - -%description doc -%{common_desc} -%endif - - - -%prep -%autosetup -p 1 -n %{name}-%{version} - -# Remove shebang -# https://github.com/secdev/scapy/pull/2332 -SHEBANGS=$(find ./scapy -name '*.py' -print | xargs grep -l -e '^#!.*env python') -for FILE in $SHEBANGS ; do - sed -i.orig -e 1d "${FILE}" - touch -r "${FILE}.orig" "${FILE}" - rm "${FILE}.orig" -done - - - -%build -%if 0%{?with_python2} -%py2_build -%endif - -%if 0%{?with_python3} -%py3_build -%endif - -%if 0%{?with_doc} -make -C doc/scapy html BUILDDIR=_build_doc SPHINXBUILD=sphinx-build-%python3_version - -rm -f doc/scapy/_build_doc/html/.buildinfo -rm -f doc/scapy/_build_doc/html/_static/_dummy -popd -%endif - - - -%install -install -dp -m0755 %{buildroot}%{_mandir}/man1 -install -Dp -m0644 doc/scapy.1* %{buildroot}%{_mandir}/man1/ - -%if 0%{?with_python2} -%py2_install -rm -f %{buildroot}%{python2_sitelib}/*egg-info/requires.txt - - -# Rename the executables -mv -f %{buildroot}%{_bindir}/scapy %{buildroot}%{_bindir}/scapy2 - -%if ! 0%{?with_python3} -# Link the default to the py2 version of executables if py3 not built -ln -s %{_bindir}/scapy2 %{buildroot}%{_bindir}/scapy -%endif -%endif - -%if 0%{?with_python3} -%py3_install -rm -f %{buildroot}%{python3_sitelib}/*egg-info/requires.txt - -# Rename the executables -mv -f %{buildroot}%{_bindir}/scapy %{buildroot}%{_bindir}/scapy3 - -# Link the default to the python3 version of executables -ln -s %{_bindir}/scapy3 %{buildroot}%{_bindir}/scapy -%endif - - - -# check -# TODO: Need to fix/remove slow/failed test -# cd test/ -# ./run_tests_py2 || true -# ./run_tests_py3 || true - - - -%if 0%{?with_python2} -%files -n python2-%{name} -%license LICENSE -%if ! 0%{?with_python3} -%doc %{_mandir}/man1/scapy.1* -%{_bindir}/scapy -%endif -%{_bindir}/scapy2 -%{python2_sitelib}/scapy/ -%{python2_sitelib}/scapy-*.egg-info -%endif - - - -%if 0%{?with_python3} -%files -n python%{python3_pkgversion}-%{name} -%license LICENSE -%doc %{_mandir}/man1/scapy.1* -%{_bindir}/scapy -%{_bindir}/scapy3 -%{python3_sitelib}/scapy/ -%{python3_sitelib}/scapy-*.egg-info -%exclude %{python3_sitelib}/test -%endif - - -%if 0%{?with_doc} -%files doc -%doc doc/scapy/_build_doc/html -%endif - - -%changelog -* Thu Dec 05 2024 Andrea Claudi - 2.6.1-1.el9 -- New version 2.6.1 (Andrea Claudi) [RHEL-657] - -* 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 -- Don't build scapy-doc package on rhel (Andrea Claudi) [1973720] -- Enable gating test on RHEL9 (Jianwen Ji) [1974642] - -* Mon May 31 2021 Miro Hrončok - 2.4.4-3 -- Drop build dependency on tox -- Resolves: rhbz#1956399 - -* Fri Apr 16 2021 Mohan Boddu - 2.4.4-2 -- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937 - -* Fri Mar 12 2021 Michal Ambroz - 2.4.4-1 -- bump to 2.4.4 release - -* Thu Mar 11 2021 W. Michael Petullo - 2.4.3-8 -- Patch to fix loading libc.a; see https://bugs.python.org/issue42580 - -* Wed Jan 27 2021 Fedora Release Engineering - 2.4.3-7 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild - -* Wed Jul 29 2020 Fedora Release Engineering - 2.4.3-6 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild - -* Tue May 26 2020 Miro Hrončok - 2.4.3-5 -- Rebuilt for Python 3.9 - -* Thu Jan 30 2020 Fedora Release Engineering - 2.4.3-4 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild - -* Fri Nov 08 2019 Michal Ambroz - 2.4.3-3 -- remove colliding manpage from python2 package -- add license files -- add doc subpackage -- remove shebangs - -* Sun Oct 06 2019 Michal Ambroz - 2.4.3-2 -- change to recommended python build dependencies for EPEL7 - thanks Miro Hroncok - -* Thu Sep 26 2019 Michal Ambroz - 2.4.3-1 -- bump to 2.4.3 release -- change the python2 to conditional build to be able to keep one spec for all -- add Recommends for dependencies, except for EPEL7 - -* Fri Sep 20 2019 Miro Hrončok - 2.4.0-8 -- Subpackage python2-scapy has been removed - See https://fedoraproject.org/wiki/Changes/Mass_Python_2_Package_Removal - -* Mon Aug 19 2019 Miro Hrončok - 2.4.0-7 -- Rebuilt for Python 3.8 - -* Fri Jul 26 2019 Fedora Release Engineering - 2.4.0-6 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild - -* Sat Feb 02 2019 Fedora Release Engineering - 2.4.0-5 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild - -* Sat Jul 14 2018 Fedora Release Engineering - 2.4.0-4 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild - -* Tue Jun 19 2018 Miro Hrončok - 2.4.0-3 -- Rebuilt for Python 3.7 - -* Mon Apr 30 2018 Michal Ambroz - 2.4.0-2 -- disable the test for now - there is too many failing (network) tests - -* Mon Apr 30 2018 Michal Ambroz - 2.4.0-1 -- bump to 2.4.0 release - -* Fri Mar 9 2018 Michal Ambroz - 2.4.0-0.rc5.1 -- bump to upstream 2.4.0 release candidate 5 -- enable separate python3 and python2 build - -* Fri Feb 09 2018 Fedora Release Engineering - 2.3.3-4 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild - -* Wed Jan 31 2018 Iryna Shcherbina - 2.3.3-3 -- Update Python 2 dependency declarations to new packaging standards - (See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3) - -* Thu Jul 27 2017 Fedora Release Engineering - 2.3.3-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild - -* Tue May 23 2017 Michal Ambroz - 2.3.3-1 -- bump to upstream 2.3.3 - -* Sat Feb 11 2017 Fedora Release Engineering - 2.3.1-4 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild - -* Tue Jul 19 2016 Fedora Release Engineering - 2.3.1-3 -- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages - -* Thu Feb 04 2016 Fedora Release Engineering - 2.3.1-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild - -* 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 - -* Thu Oct 02 2014 Lubomir Rintel - 2.2.0-5 -- Fix psdump()/pdfdump() - -* Sun Jun 08 2014 Fedora Release Engineering - 2.2.0-4 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild - -* Sun Aug 04 2013 Fedora Release Engineering - 2.2.0-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild - -* Thu Feb 14 2013 Fedora Release Engineering - 2.2.0-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild - -* Sun Jul 22 2012 Sven Lankes - 2.2.0-1 -- Update to Scapy 2.2.0 -- Fixes rhbz #788659 - thanks to Thiébaud Weksteen - -* Sat Jul 21 2012 Fedora Release Engineering - 2.0.0.10-7 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild - -* Sat Jan 14 2012 Fedora Release Engineering - 2.0.0.10-6 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild - -* Wed Feb 09 2011 Fedora Release Engineering - 2.0.0.10-5 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild - -* Thu Jul 22 2010 David Malcolm - 2.0.0.10-4 -- Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild - -* Sun Jul 26 2009 Fedora Release Engineering - 2.0.0.10-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild - -* Wed Feb 25 2009 Fedora Release Engineering - 2.0.0.10-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild - -* Mon Dec 22 2008 Devan Goodwin 2.0.0.10-1 -- Update to Scapy 2.0.0.10. - -* Sun Dec 07 2008 Devan Goodwin 2.0.0.9-2 -- Update for Scapy 2.0.0.9. - -* Tue Jan 22 2008 Devan Goodwin 1.1.1-4 -- Switch to using rm macro. - -* Mon Jan 21 2008 Devan Goodwin 1.1.1-2 -- Spec file cleanup. - -* Fri Jan 18 2008 Devan Goodwin 1.1.1-1 -- Initial packaging for Fedora. - diff --git a/scapy.spec b/scapy.spec new file mode 100644 index 0000000..06c70a1 --- /dev/null +++ b/scapy.spec @@ -0,0 +1,462 @@ +## START: Set by rpmautospec +## (rpmautospec version 0.6.5) +## RPMAUTOSPEC: autochangelog +## END: Set by rpmautospec + +Name: scapy +Version: 2.6.1 +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: GPL-2.0-only +URL: https://scapy.net/ +#was http://www.secdev.org/projects/scapy/ +VCS: https://github.com/secdev/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 + +%global common_desc %{expand: +Scapy is a powerful interactive packet manipulation program built on top +of the Python interpreter. It can be used to forge or decode packets of +a wide number of protocols, send them over the wire, capture them, match +requests and replies, and much more.} + + +# By default build with python3 subpackage +%bcond_without python3 + +# Build also the python2 package on releases up to fc31 and rhel8 +%if (0%{?fedora} && 0%{?fedora} <= 31 ) || ( 0%{?rhel} && 0%{?rhel} <= 8 ) +%bcond_without python2 +%else +%bcond_with python2 +%endif + +# By default build the documentation only on Fedora due to cc-by-nc-sa license +%if 0%{?fedora} +%bcond_without doc +%else +%bcond_with doc +%endif + + + + +BuildArch: noarch + +BuildRequires: make +BuildRequires: sed + +%if %{with python2} +BuildRequires: python2-devel +BuildRequires: python2-setuptools +%if %{with doc} +BuildRequires: python2-tox +%endif +%endif + +%if %{with python3} +BuildRequires: python%{python3_pkgversion}-devel +BuildRequires: python%{python3_pkgversion}-setuptools +%if %{with doc} +BuildRequires: python%{python3_pkgversion}-tox +%endif +%endif + +# Recommends only supported on fedora and rhel8+ +%if (0%{?fedora}) || ( 0%{?rhel} && 0%{?rhel} >= 8 ) +Recommends: tcpdump +# Using database of manufactures /usr/share/wireshark/manuf +Recommends: wireshark-cli +%endif + +%description %{common_desc} + +%if %{with python2} +%package -n python2-%{name} +Summary: Interactive packet manipulation tool and network scanner + +%{?python_provide:%python_provide python2-%{name}} + +%if (0%{?fedora}) || ( 0%{?rhel} && 0%{?rhel} >= 8 ) +Recommends: python2-pyx +Recommends: python2-matplotlib +Recommends: ipython2 +%endif + +%description -n python2-%{name} +%{common_desc} + +%endif + + +%if %{with python3} +%package -n python%{python3_pkgversion}-%{name} +Summary: Interactive packet manipulation tool and network scanner + +%{?python_provide:%python_provide python%{python3_pkgversion}-%{name}} +Provides: %{name} = %{version}-%{release} + +%if (0%{?fedora}) || ( 0%{?rhel} && 0%{?rhel} >= 8 ) +Recommends: PyX +Recommends: python%{python3_pkgversion}-matplotlib +Recommends: ipython3 +%endif + +%description -n python%{python3_pkgversion}-%{name} +%{common_desc} +%endif + +%if %{with doc} +%package doc +Summary: Interactive packet manipulation tool and network scanner +License: CC-BY-NC-SA-2.5 + +BuildRequires: python%{python3_pkgversion}-sphinx +BuildRequires: python%{python3_pkgversion}-sphinx_rtd_theme + +%description doc +%{common_desc} +%endif + + + +%prep +%autosetup -p 1 -n %{name}-%{version} + +# Remove shebang +# https://github.com/secdev/scapy/pull/2332 +SHEBANGS=$(find ./scapy -name '*.py' -print | xargs grep -l -e '^#!.*env python') +for FILE in $SHEBANGS ; do + sed -i.orig -e 1d "${FILE}" + touch -r "${FILE}.orig" "${FILE}" + rm "${FILE}.orig" +done + + + +%build +%if %{with python2} +%py2_build +%endif + +%if %{with python3} +%py3_build +%endif + +%if %{with doc} +make -C doc/scapy html BUILDDIR=_build_doc SPHINXBUILD=sphinx-build-%python3_version + +rm -f doc/scapy/_build_doc/html/.buildinfo +rm -f doc/scapy/_build_doc/html/_static/_dummy +%endif + + + +%install +install -dp -m0755 %{buildroot}%{_mandir}/man1 +install -Dp -m0644 doc/scapy.1* %{buildroot}%{_mandir}/man1/ + +%if %{with python2} +%py2_install +rm -f %{buildroot}%{python2_sitelib}/*egg-info/requires.txt + + +# Rename the executables +mv -f %{buildroot}%{_bindir}/scapy %{buildroot}%{_bindir}/scapy2 + +%if ! %{with python3} +# Link the default to the py2 version of executables if py3 not built +ln -s %{_bindir}/scapy2 %{buildroot}%{_bindir}/scapy +%endif +%endif + +%if %{with python3} +%py3_install +rm -f %{buildroot}%{python3_sitelib}/*egg-info/requires.txt + +# Rename the executables +mv -f %{buildroot}%{_bindir}/scapy %{buildroot}%{_bindir}/scapy3 + +# Link the default to the python3 version of executables +ln -s %{_bindir}/scapy3 %{buildroot}%{_bindir}/scapy +%endif + + + +# check +# TODO: Need to fix/remove slow/failed test +# cd test/ +# ./run_tests_py2 || true +# ./run_tests_py3 || true + + + +%if %{with python2} +%files -n python2-%{name} +%license LICENSE +%if ! %{with python3} +%doc %{_mandir}/man1/scapy.1* +%{_bindir}/scapy +%endif +%{_bindir}/scapy2 +%{python2_sitelib}/scapy/ +%{python2_sitelib}/scapy-*.egg-info +%exclude %{python2_sitelib}/test/ +%endif + + + +%if %{with python3} +%files -n python%{python3_pkgversion}-%{name} +%license LICENSE +%doc %{_mandir}/man1/scapy.1* +%{_bindir}/scapy +%{_bindir}/scapy3 +%{python3_sitelib}/scapy/ +%{python3_sitelib}/scapy-*.egg-info +%exclude %{python3_sitelib}/test/ +%endif + + +%if %{with doc} +%files doc +%doc doc/scapy/_build_doc/html +%endif + + +%changelog +## START: Generated by rpmautospec +* Tue Jan 14 2025 Andrea Claudi - 2.6.1-1 +- scapy-2.6.1-1.el10 + +* Tue Oct 29 2024 Troy Dawson - 2.5.0-11 +- Bump release for October 2024 mass rebuild: + +* Mon Jun 24 2024 Troy Dawson - 2.5.0-10 +- Bump release for June 2024 mass rebuild + +* Thu Jun 06 2024 Li Shuang - 2.5.0-9 +- Enable gating test on RHEL10 + +* Sat Jan 27 2024 Fedora Release Engineering - 2.5.0-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Tue Nov 07 2023 Michal Ambroz - 2.5.0-7 +- cosmetics + +* Wed Oct 11 2023 Andrea Claudi - 2.5.0-6 +- Use SDPX license IDs + +* Sat Jul 22 2023 Fedora Release Engineering - 2.5.0-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild + +* Thu Jun 15 2023 Python Maint - 2.5.0-4 +- Rebuilt for Python 3.12 + +* Wed May 17 2023 Yaakov Selkowitz - 2.5.0-3 +- Disable docs by default in RHEL builds + +* Sat Jan 21 2023 Fedora Release Engineering - 2.5.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild + +* Mon Jan 02 2023 jonathanspw - 2.5.0-1 +- update to 2.5.0 rhbz#2156396 + +* Sat Jul 23 2022 Fedora Release Engineering - 2.4.5-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild + +* Mon Jun 13 2022 Python Maint - 2.4.5-6 +- Rebuilt for Python 3.11 + +* Sat Jan 22 2022 Fedora Release Engineering - 2.4.5-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild + +* Fri Jul 23 2021 Fedora Release Engineering - 2.4.5-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild + +* Fri Jun 04 2021 Python Maint - 2.4.5-3 +- Rebuilt for Python 3.10 + +* Tue Apr 20 2021 Michal Ambroz - 2.4.5-2 +- bump to 2.4.5 + +* Tue Apr 20 2021 Michal Ambroz - 2.4.5-1 +- bump to 2.4.5 + +* Fri Mar 12 2021 Michal Ambroz - 2.4.4-2 +- adding sources for 2.4.4 + +* Fri Mar 12 2021 Michal Ambroz - 2.4.4-1 +- bump to 2.4.4 + +* Thu Mar 11 2021 W. Michael Petullo - 2.4.3-14 +- Patch to fix loading libc.a; see https://bugs.python.org/issue42580 + +* Wed Jan 27 2021 Fedora Release Engineering - 2.4.3-13 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + +* Mon Jan 11 2021 Tom Stellard - 2.4.3-12 +- Add BuildRequires: make + +* Wed Jul 29 2020 Fedora Release Engineering - 2.4.3-11 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + +* Tue May 26 2020 Miro Hrončok - 2.4.3-10 +- Rebuilt for Python 3.9 + +* Thu Jan 30 2020 Fedora Release Engineering - 2.4.3-9 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + +* Sat Nov 09 2019 rpmbuild - 2.4.3-8 +- fix doc generation + +* Fri Nov 08 2019 rpmbuild - 2.4.3-7 +- remove colliding manpage from python2 package - add license files - add + doc subpackage - remove shebangs + +* Sun Oct 06 2019 rpmbuild - 2.4.3-6 +- switch to recommended python build dependencies + +* Mon Sep 30 2019 rpmbuild - 2.4.3-5 +- forgot another "Recommends" in the subpackages + +* Mon Sep 30 2019 rpmbuild - 2.4.3-4 +- "Recommends" not available in RHEL7 + +* Thu Sep 26 2019 rpmbuild - 2.4.3-3 +- fix wrong branch for python2 package + +* Thu Sep 26 2019 rpmbuild - 2.4.3-2 +- bump to 2.4.3 + +* Thu Sep 26 2019 rpmbuild - 2.4.3-1 +- bump to 2.4.3, one spec for all branches + +* Fri Sep 20 2019 Miro Hrončok - 2.4.0-11 +- Subpackage python2-scapy has been removed + +* Mon Aug 19 2019 Miro Hrončok - 2.4.0-10 +- Rebuilt for Python 3.8 + +* Fri Jul 26 2019 Fedora Release Engineering - 2.4.0-9 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + +* Sat Feb 02 2019 Fedora Release Engineering - 2.4.0-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + +* Mon Jan 28 2019 Igor Gnatenko - 2.4.0-7 +- Remove obsolete Group tag + +* Sat Jul 14 2018 Fedora Release Engineering - 2.4.0-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild + +* Tue Jun 19 2018 Miro Hrončok - 2.4.0-5 +- Rebuilt for Python 3.7 + +* Mon Apr 30 2018 Michal Ambroz - 2.4.0-4 +- disable the tests for now due to big number of failing (network) tests + +* Mon Apr 30 2018 Michal Ambroz - 2.4.0-3 +- Bump to 2.4.0 release + +* Sun Mar 11 2018 Michal Ambroz - 2.4.0-2 +- fix python3 build requirements + +* Sun Mar 11 2018 Michal Ambroz - 2.4.0-1 +- bump to 2.4.0 release candidate 5, enable separate python2 and python3 + builds + +* Fri Feb 09 2018 Fedora Release Engineering - 2.3.3-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild + +* Wed Jan 31 2018 Iryna Shcherbina - 2.3.3-3 +- Update Python 2 dependency declarations to new packaging standards + +* Thu Jul 27 2017 Fedora Release Engineering - 2.3.3-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + +* Sat Jun 17 2017 Michal Ambroz - 2.3.3-1 +- bump to 2.3.3 + +* Sat Feb 11 2017 Fedora Release Engineering - 2.3.1-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild + +* Tue Jul 19 2016 Fedora Release Engineering - 2.3.1-3 +- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_ + Packages + +* Thu Feb 04 2016 Fedora Release Engineering - 2.3.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild + +* 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 Dennis Gilmore - 2.2.0-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild + +* Thu Oct 02 2014 Lubomir Rintel - 2.2.0-5 +- Fix psdump()/pdfdump() + +* Sun Jun 08 2014 Dennis Gilmore - 2.2.0-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild + +* Sun Aug 04 2013 Dennis Gilmore - 2.2.0-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild + +* Thu Feb 14 2013 Dennis Gilmore - 2.2.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild + +* Sun Jul 22 2012 Sven Lankes - 2.2.0-1 +- Update to Scapy 2.2.0 +- Fixes rhbz #788659 - thanks to Thiébaud Weksteen + +* Sat Jul 21 2012 Dennis Gilmore - 2.0.0.10-9 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild + +* Sat Jan 14 2012 Dennis Gilmore - 2.0.0.10-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild + +* Wed Feb 09 2011 Dennis Gilmore - 2.0.0.10-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild + +* Thu Jul 29 2010 Fedora Release Engineering - 2.0.0.10-6 +- dist-git conversion + +* Thu Jul 22 2010 dmalcolm - 2.0.0.10-5 +- Rebuilt for + https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild + +* Wed Nov 25 2009 Bill Nottingham - 2.0.0.10-4 +- Fix typo that causes a failure to update the common directory. (releng + #2781) + +* Mon Jul 27 2009 Jesse Keating - 2.0.0.10-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild + +* Wed Feb 25 2009 Jesse Keating - 2.0.0.10-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild + +* Mon Dec 22 2008 Devan Goodwin - 2.0.0.10-1 +- Update scapy to 2.0.0.10 in devel. + +* Mon Dec 22 2008 Devan Goodwin - 2.0.0.9-2 +- Update scapy to 2.0.0.9 in F-9 and rawhide. + +* Sun Dec 21 2008 Devan Goodwin - 2.0.0.9-1 +- Update scapy to 2.0.0.9 in devel. + +* Wed Jan 23 2008 Devan Goodwin - 1.1.1-1 +- Importing scapy SRPM. +## END: Generated by rpmautospec diff --git a/sources b/sources new file mode 100644 index 0000000..1dada2d --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (scapy-2.6.1.tar.gz) = 4ab02f5b9dfcf329ee4f4837655066227b1e162e695d6cbe84ada4e2ff44589462a9843b0f16699ec974dcf6e0a81af3c5b088ceac48a679e9591f4cec0eedc8