diff options
author | Mario Haustein <mario.haustein@hrz.tu-chemnitz.de> | 2023-09-17 11:21:35 +0200 |
---|---|---|
committer | Sam James <sam@gentoo.org> | 2023-09-18 08:39:02 +0100 |
commit | b7eedfb301845df08ede76686c8d8cc327d01d89 (patch) | |
tree | 31d015783926f920d5576a453133bcd36b383f87 /dev-python/yara-python | |
parent | app-forensics/yara: sync live (diff) | |
download | gentoo-b7eedfb301845df08ede76686c8d8cc327d01d89.tar.gz gentoo-b7eedfb301845df08ede76686c8d8cc327d01d89.tar.bz2 gentoo-b7eedfb301845df08ede76686c8d8cc327d01d89.zip |
dev-python/yara-python: add 4.4.0
Signed-off-by: Mario Haustein <mario.haustein@hrz.tu-chemnitz.de>
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'dev-python/yara-python')
-rw-r--r-- | dev-python/yara-python/Manifest | 1 | ||||
-rw-r--r-- | dev-python/yara-python/files/yara-python-4.4.0-python3_12.patch | 17 | ||||
-rw-r--r-- | dev-python/yara-python/yara-python-4.4.0.ebuild | 45 |
3 files changed, 63 insertions, 0 deletions
diff --git a/dev-python/yara-python/Manifest b/dev-python/yara-python/Manifest index eb0fb2a1152d..4915913f7eb2 100644 --- a/dev-python/yara-python/Manifest +++ b/dev-python/yara-python/Manifest @@ -1 +1,2 @@ DIST yara-python-4.3.1.gh.tar.gz 37871 BLAKE2B d8b8eac6b12dc4c5c3362e8b5396fe9ff5a0b0557488ed94257ec2b7be813c870d39f78b53b3312b6b1100f4bdc81375ebf27cd21a569c5688503b81934c3881 SHA512 78cd53f756967ef79cc742acffaeea53631ee475c07efd1506eba7e0630b2e570ba03686da1fa3247c9339faa67daf6c372913731b73233626661c0a9f575e41 +DIST yara-python-4.4.0.gh.tar.gz 38072 BLAKE2B 748dab52e99e264c7d9eb0d7d4482fb76b29f8463f031cf20687e30ae792141633d12e6b3f20303c8ee99bcdaafa01a3df9f73aaf3dd722ad5da9820e6a4d39e SHA512 bc72c2f65e3fe3d7f94728565143b787df6cc63313a3e8b9f159a5cfc3c947f5233674a1213fd2c6454f6165b676da366319794f9fa7c695c43e5523c29a1432 diff --git a/dev-python/yara-python/files/yara-python-4.4.0-python3_12.patch b/dev-python/yara-python/files/yara-python-4.4.0-python3_12.patch new file mode 100644 index 000000000000..36bf1d60f686 --- /dev/null +++ b/dev-python/yara-python/files/yara-python-4.4.0-python3_12.patch @@ -0,0 +1,17 @@ +Upstream: https://github.com/VirusTotal/yara-python/pull/244 +From c00fd68cfb2f00c4bfe4ea6465a93af2d1d1a68f Mon Sep 17 00:00:00 2001 +From: Mario Haustein <mario.haustein@hrz.tu-chemnitz.de> +Date: Sat, 16 Sep 2023 17:35:36 +0200 +Subject: [PATCH] Fix unknown escape sequence + +--- a/tests.py ++++ b/tests.py +@@ -719,7 +719,7 @@ def testRE(self): + 'rule test { strings: $a = /[M-N]iss/ nocase condition: $a }', + 'rule test { strings: $a = /(Mi|ssi)ssippi/ nocase condition: $a }', + r'rule test { strings: $a = /ppi\tmi/ condition: $a }', +- 'rule test { strings: $a = /ppi\.mi/ condition: $a }', ++ r'rule test { strings: $a = /ppi\.mi/ condition: $a }', + 'rule test { strings: $a = /^mississippi/ fullword condition: $a }', + 'rule test { strings: $a = /mississippi.*mississippi$/s condition: $a }', + ], 'mississippi\tmississippi.mississippi\nmississippi') diff --git a/dev-python/yara-python/yara-python-4.4.0.ebuild b/dev-python/yara-python/yara-python-4.4.0.ebuild new file mode 100644 index 000000000000..8c4b6e7be136 --- /dev/null +++ b/dev-python/yara-python/yara-python-4.4.0.ebuild @@ -0,0 +1,45 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DISTUTILS_USE_PEP517=setuptools +DISTUTILS_EXT=1 +PYTHON_COMPAT=( python3_{10..12} ) +inherit distutils-r1 + +DESCRIPTION="Python interface for a malware identification and classification tool" +HOMEPAGE="https://github.com/VirusTotal/yara-python" + +if [[ ${PV} == "9999" ]]; then + inherit git-r3 + EGIT_REPO_URI="https://github.com/VirusTotal/yara-python.git" +else + SRC_URI="https://github.com/virustotal/yara-python/archive/v${PV}.tar.gz -> ${P}.gh.tar.gz" + KEYWORDS="~amd64 ~arm64 ~ppc64 ~x86" +fi + +LICENSE="Apache-2.0" +SLOT="0" + +RDEPEND=" + =app-forensics/yara-$(ver_cut 1-2)* +" +DEPEND="${RDEPEND}" + +PATCHES=( + "${FILESDIR}/${P}-python3_12.patch" +) + +distutils_enable_tests unittest + +python_configure_all() { + cat >> setup.cfg <<-EOF + [build_ext] + dynamic_linking = True + EOF +} + +python_test() { + "${EPYTHON}" tests.py || die "Tests fail with ${EPYTHON}" +} |