diff options
author | Armin Kuster <akuster808@gmail.com> | 2019-02-04 11:11:42 -0800 |
---|---|---|
committer | Armin Kuster <akuster808@gmail.com> | 2019-02-11 18:00:54 -0800 |
commit | 0e8ac771a0a7c26db9685d9897fe56fbabaca9dd (patch) | |
tree | 2db5f4563b0696ea3d188dd11441f3697a124545 | |
parent | 5e7b4a96ad9c711d7bd4c6be9845705cb5248418 (diff) | |
download | meta-security-0e8ac771a0a7c26db9685d9897fe56fbabaca9dd.tar.gz |
scapy: restore ptest by going to github directly
The pypi package removed the tests so
go to the git repo directly.
Signed-off-by: Armin Kuster <akuster808@gmail.com>
-rw-r--r-- | recipes-security/scapy/files/run-ptest | 4 | ||||
-rw-r--r-- | recipes-security/scapy/python-scapy.inc | 13 | ||||
-rw-r--r-- | recipes-security/scapy/python-scapy_2.4.2.bb | 2 | ||||
-rw-r--r-- | recipes-security/scapy/python3-scapy_2.4.2.bb | 3 |
4 files changed, 19 insertions, 3 deletions
diff --git a/recipes-security/scapy/files/run-ptest b/recipes-security/scapy/files/run-ptest new file mode 100644 index 0000000..91b29f9 --- /dev/null +++ b/recipes-security/scapy/files/run-ptest | |||
@@ -0,0 +1,4 @@ | |||
1 | #!/bin/sh | ||
2 | UTscapy -t regression.uts -f text -l -C \ | ||
3 | -o @PTEST_PATH@/scapy_ptest_$(date +%Y%m%d-%H%M%S).log \ | ||
4 | 2>&1 | sed -e 's/^passed None/PASS:/' -e 's/^failed None/FAIL:/' | ||
diff --git a/recipes-security/scapy/python-scapy.inc b/recipes-security/scapy/python-scapy.inc index 43ef959..99f30a7 100644 --- a/recipes-security/scapy/python-scapy.inc +++ b/recipes-security/scapy/python-scapy.inc | |||
@@ -5,10 +5,12 @@ LICENSE = "GPLv2" | |||
5 | 5 | ||
6 | LIC_FILES_CHKSUM = "file://bin/scapy;beginline=9;endline=13;md5=1d5249872cc54cd4ca3d3879262d0c69" | 6 | LIC_FILES_CHKSUM = "file://bin/scapy;beginline=9;endline=13;md5=1d5249872cc54cd4ca3d3879262d0c69" |
7 | 7 | ||
8 | SRC_URI[md5sum] = "e6a03d8c924a6bbde1e86fc58bd2b9d6" | 8 | S = "${WORKDIR}/git" |
9 | SRC_URI[sha256sum] = "1baa048936207ceb1a4281a0e1e3b4317667c754872a0bb4734c5213c468e86a" | ||
10 | 9 | ||
11 | inherit pypi | 10 | SRCREV = "bad14cb1a5aee29f8107fbe8ad008d4645f14da7" |
11 | SRC_URI = "git://github.com/secdev/scapy.git" | ||
12 | |||
13 | inherit ptest | ||
12 | 14 | ||
13 | do_install_append() { | 15 | do_install_append() { |
14 | if [ "${PYTHON_PN}" = "python3" ]; then | 16 | if [ "${PYTHON_PN}" = "python3" ]; then |
@@ -17,6 +19,11 @@ do_install_append() { | |||
17 | fi | 19 | fi |
18 | } | 20 | } |
19 | 21 | ||
22 | do_install_ptest() { | ||
23 | install -m 0644 ${S}/test/regression.uts ${D}${PTEST_PATH} | ||
24 | sed -i 's,@PTEST_PATH@,${PTEST_PATH},' ${D}${PTEST_PATH}/run-ptest | ||
25 | } | ||
26 | |||
20 | RDEPENDS_${PN} = "tcpdump ${PYTHON_PN}-compression ${PYTHON_PN}-cryptography ${PYTHON_PN}-netclient \ | 27 | RDEPENDS_${PN} = "tcpdump ${PYTHON_PN}-compression ${PYTHON_PN}-cryptography ${PYTHON_PN}-netclient \ |
21 | ${PYTHON_PN}-netserver ${PYTHON_PN}-pydoc ${PYTHON_PN}-pkgutil ${PYTHON_PN}-shell \ | 28 | ${PYTHON_PN}-netserver ${PYTHON_PN}-pydoc ${PYTHON_PN}-pkgutil ${PYTHON_PN}-shell \ |
22 | ${PYTHON_PN}-threading ${PYTHON_PN}-numbers ${PYTHON_PN}-pycrypto" | 29 | ${PYTHON_PN}-threading ${PYTHON_PN}-numbers ${PYTHON_PN}-pycrypto" |
diff --git a/recipes-security/scapy/python-scapy_2.4.2.bb b/recipes-security/scapy/python-scapy_2.4.2.bb index ea8764a..98db1fd 100644 --- a/recipes-security/scapy/python-scapy_2.4.2.bb +++ b/recipes-security/scapy/python-scapy_2.4.2.bb | |||
@@ -1,4 +1,6 @@ | |||
1 | inherit setuptools | 1 | inherit setuptools |
2 | require python-scapy.inc | 2 | require python-scapy.inc |
3 | 3 | ||
4 | SRC_URI += "file://run-ptest" | ||
5 | |||
4 | RDEPENDS_${PN} += "${PYTHON_PN}-subprocess" | 6 | RDEPENDS_${PN} += "${PYTHON_PN}-subprocess" |
diff --git a/recipes-security/scapy/python3-scapy_2.4.2.bb b/recipes-security/scapy/python3-scapy_2.4.2.bb index 34eb2a3..83c79f4 100644 --- a/recipes-security/scapy/python3-scapy_2.4.2.bb +++ b/recipes-security/scapy/python3-scapy_2.4.2.bb | |||
@@ -1,2 +1,5 @@ | |||
1 | inherit setuptools3 | 1 | inherit setuptools3 |
2 | require python-scapy.inc | 2 | require python-scapy.inc |
3 | |||
4 | SRC_URI += "file://run-ptest" | ||
5 | |||