net-analyzer/scapy: new package, add 2.6.1

Closes: #4322
Signed-off-by: Andreas Billmeier <b@edevau.net>
This commit is contained in:
Andreas Billmeier 2025-02-21 12:02:04 +01:00
parent 1bfe0eb0d8
commit 79f4714c12
Signed by: onkelbeh
GPG Key ID: E6DB12C8C550F3C0
4 changed files with 97 additions and 2 deletions

View File

@ -606,7 +606,7 @@ A daily compile test is run at Github with Python 3.9 to catch general faults. E
## Licenses
This repository itself is released under GPL-3 (like most Gentoo repositories), all work on the depending components under the licenses they came from. Perhaps you came here because I filed an issue at your component about a bad or missing license. It is easy to [assign a license](https://docs.github.com/en/communities/setting-up-your-project-for-healthy-contributions/adding-a-license-to-a-repository). During cleanups and license investigations I have been asked often which license to choose. I am not a lawyer, but I can offer the following table, counted over this repository, perhaps this helps your decision. If a package has more than one license listed, all of them are counted.
There are 2376 Ebuilds in total, 2362 of them have in total 2406 (43 different) licenses assigned.
There are 2377 Ebuilds in total, 2363 of them have in total 2407 (43 different) licenses assigned.
|License| Ebuilds using it|
|-------|-----|
@ -614,7 +614,7 @@ There are 2376 Ebuilds in total, 2362 of them have in total 2406 (43 different)
|Apache-2.0|557|
|GPL-3|149|
|BSD|127|
|GPL-2|28|
|GPL-2|29|
|LGPL-3|23|
|BSD-2|19|
|GPL-3+|17|

View File

@ -0,0 +1,3 @@
DIST scapy-2.6.1.gh.tar.gz 7048560 BLAKE2B 5c930c3aa2d0a4d545cf64f10abd3aa962755e3fb712ea1613c4f49b159202a55e5ffadc527d429118958bad6e93f9626084d3ee974caaa6cb1733f05080d3f2 SHA512 4ab02f5b9dfcf329ee4f4837655066227b1e162e695d6cbe84ada4e2ff44589462a9843b0f16699ec974dcf6e0a81af3c5b088ceac48a679e9591f4cec0eedc8
EBUILD scapy-2.6.1.ebuild 1813 BLAKE2B beaca653829796f138bff97e23e48b9954d76418b324b2538debcb73f24ffe9836d52de76a8c2e02cb3162fb392b8392421548abfebc75121422202abe7391c9 SHA512 2f73b687af5840c6f30daff49d4a4a67920fc2254a326518c41b9a8618065ec1c866268fb56db264fe3427c7a1a5bf98700b8f4799fcc39c60e89c5c601e3b53
MISC metadata.xml 378 BLAKE2B 74024f373ef94ec1f438112be26478554cc1bb48a4f1e92b83e9c1ebeaaecb3e8fcdb9c6da95549d9504fa7763eb4a4fa593656aebd2e558ffa8f4c6b0bbddb6 SHA512 f29378695cc72f21782d16f27ce780e2eef7893dcff2be326dfaeaa408ae6928e1768686ef4046a68308080108775f8d69d75beef06b8f1a36350144c07df1dc

View File

@ -0,0 +1,12 @@
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="project">
<email>b@edevau.net</email>
<name>Andreas Billmeier</name>
</maintainer>
<upstream>
<remote-id type="pypi">scapy</remote-id>
<remote-id type="github">secdev/scapy</remote-id>
</upstream>
</pkgmetadata>

View File

@ -0,0 +1,80 @@
# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
# See https://github.com/secdev/scapy/pull/3958#discussion_r1161302244 on next
# bump (>2.5.0)!
PYTHON_COMPAT=( python3_{11..13} )
DISTUTILS_USE_PEP517=
inherit distutils-r1 readme.gentoo-r1
DESCRIPTION="A Python interactive packet manipulation program for mastering the network"
HOMEPAGE="https://scapy.net/ https://github.com/secdev/scapy"
SRC_URI="https://github.com/secdev/${PN}/archive/v${PV}.tar.gz -> ${P}.gh.tar.gz"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="amd64 arm arm64 x86"
IUSE="test"
RESTRICT="!test? ( test )"
BDEPEND="
test? (
dev-python/mock[${PYTHON_USEDEP}]
dev-python/zstandard[${PYTHON_USEDEP}]
)
"
DOC_CONTENTS="
Scapy has optional support for the following packages:
dev-python/cryptography
dev-python/ipython
dev-python/matplotlib
dev-python/pyx
media-gfx/graphviz
net-analyzer/tcpdump
net-analyzer/tcpreplay
net-libs/libpcap
virtual/imagemagick-tools
See also ""${EPREFIX}/usr/share/doc/${PF}/installation.rst""
"
src_prepare() {
if ! [[ -f ${PN}/VERSION ]]; then
echo ${PV} > ${PN}/VERSION || die
else
die
fi
# Drop tests which need network
rm \
test/nmap.uts \
test/p0f.uts \
test/p0fv2.uts \
test/regression.uts \
test/scapy/layers/inet6.uts || die
# Timed out
rm test/tftp.uts || die
# Needs ipython
rm test/scapy/layers/dhcp.uts || die
# Import failure?
rm test/contrib/isotp_native_socket.uts test/contrib/isotpscan.uts || die
distutils-r1_src_prepare
}
python_test() {
# https://github.com/secdev/scapy/blob/master/tox.ini
"${EPYTHON}" -m scapy.tools.UTscapy -c ./test/configs/linux.utsc -N || die
}
src_install() {
distutils-r1_src_install
dodoc -r doc/${PN}/*
DISABLE_AUTOFORMATTING=1 readme.gentoo_create_doc
}