scapy-2.6.1-1.el9
* Thu Dec 05 2024 Andrea Claudi <aclaudi@redhat.com> - 2.6.1-1.el9 - New version 2.6.1 (Andrea Claudi) [RHEL-71624] - Fix source link layer address for ipv6 neigh solicitation [RHEL-838] - Update spec file to ask tox only when building docs (not happening on Centos Stream and RHEL) Signed-off-by: Andrea Claudi <aclaudi@redhat.com>
This commit is contained in:
parent
9b1595d3ef
commit
9fbbf54ab1
1
.gitignore
vendored
1
.gitignore
vendored
@ -7,3 +7,4 @@ scapy-2.0.0.10.tar.gz
|
||||
/scapy-2.4.3.tar.gz
|
||||
/scapy-2.4.4.tar.gz
|
||||
/scapy-2.5.0.tar.gz
|
||||
/scapy-2.6.1.tar.gz
|
||||
|
||||
158
scapy-2.6.1-setup-py.patch
Normal file
158
scapy-2.6.1-setup-py.patch
Normal file
@ -0,0 +1,158 @@
|
||||
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 "<!-- ignore_ppi -->" 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",
|
||||
+ ]
|
||||
)
|
||||
24
scapy.spec
24
scapy.spec
@ -1,11 +1,12 @@
|
||||
Name: scapy
|
||||
Version: 2.5.0
|
||||
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
|
||||
@ -100,6 +101,14 @@ 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
|
||||
@ -130,14 +139,10 @@ done
|
||||
%endif
|
||||
|
||||
%if 0%{?with_doc}
|
||||
# the following commands are copied from tox.ini to avoid a dependency on tox
|
||||
pushd doc/scapy
|
||||
sphinx-apidoc-%python3_version -f --no-toc --separate --module-first --output-dir api ../../scapy ../../scapy/modules/ ../../scapy/libs/ ../../scapy/tools/ ../../scapy/arch/ ../../scapy/contrib/cansocket* ../../scapy/contrib/scada/* ../../scapy/all.py ../../scapy/layers/all.py
|
||||
%{python3} sphinx_apidoc_postprocess.py
|
||||
make html BUILDDIR=_build_doc SCAPY_APITREE=0 SPHINXBUILD=sphinx-build-%python3_version
|
||||
make -C doc/scapy html BUILDDIR=_build_doc SPHINXBUILD=sphinx-build-%python3_version
|
||||
|
||||
rm -f _build_doc/html/.buildinfo
|
||||
rm -f _build_doc/html/_static/_dummy
|
||||
rm -f doc/scapy/_build_doc/html/.buildinfo
|
||||
rm -f doc/scapy/_build_doc/html/_static/_dummy
|
||||
popd
|
||||
%endif
|
||||
|
||||
@ -215,6 +220,9 @@ ln -s %{_bindir}/scapy3 %{buildroot}%{_bindir}/scapy
|
||||
|
||||
|
||||
%changelog
|
||||
* Thu Dec 05 2024 Andrea Claudi <aclaudi@redhat.com> - 2.6.1-1.el9
|
||||
- New version 2.6.1 (Andrea Claudi) [RHEL-657]
|
||||
|
||||
* Fri Jun 23 2023 Andrea Claudi <aclaudi@redhat.com> - 2.5.0-1.el9
|
||||
- Don't package scapy tests (Andrea Claudi)
|
||||
- Fix scapy compliance with pep-0440 (Andrea Claudi) [2162667]
|
||||
|
||||
1
sources
1
sources
@ -1,2 +1,3 @@
|
||||
SHA512 (scapy-2.4.4.tar.gz) = d6078901839157b3f3d63c304f43f88a41b9bd2fb32cc917624c12fe822818d02256d6661b5076689c0f59c51e4ab35195ddf555f0d1f6df95faac1c646ee8c6
|
||||
SHA512 (scapy-2.5.0.tar.gz) = 4e5cacff0bbf6fd991ea24f4680049d042082fae4b349c8082078e6f01b38c09bb5c8276bfba15d4a88a1eb5af92c505848ec98556b10eecbd803f134a5b244a
|
||||
SHA512 (scapy-2.6.1.tar.gz) = 4ab02f5b9dfcf329ee4f4837655066227b1e162e695d6cbe84ada4e2ff44589462a9843b0f16699ec974dcf6e0a81af3c5b088ceac48a679e9591f4cec0eedc8
|
||||
|
||||
Loading…
Reference in New Issue
Block a user