diff options
Diffstat (limited to 'dev-python/yara-python')
-rw-r--r-- | dev-python/yara-python/Manifest | 5 | ||||
-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 | ||||
-rw-r--r-- | dev-python/yara-python/yara-python-9999.ebuild | 3 |
4 files changed, 68 insertions, 2 deletions
diff --git a/dev-python/yara-python/Manifest b/dev-python/yara-python/Manifest index 53fda00e537e..1c2f928df3ce 100644 --- a/dev-python/yara-python/Manifest +++ b/dev-python/yara-python/Manifest @@ -1,4 +1,7 @@ +AUX yara-python-4.4.0-python3_12.patch 939 BLAKE2B 532e768fa1674c6c6203bf8c7b41a61cdfc5644cda082350e5ba46c896e0bd7122ffcbc280f067983b7c052d214cdb94dd3cec22b0bed45c21cf9ffd005bf671 SHA512 8d259ee3ded90d609aa81d6fd72c02f1089f7a4215a35cda4309b1f7805fbe448aa3eb796aaca183e30c3d5c48b7ffcd313db48d09f336690764108c0a6b7e56 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 EBUILD yara-python-4.3.1.ebuild 893 BLAKE2B fe311947cbbced2a61447bb00175b26f5810458c502661eabf1af0d17c26a84662b723d21d41b3ea1a9bcf3a4378214caf25ce18a9af7e924fa360bea9ea39b0 SHA512 efada550072625d7c0329c8ec7dca041ac6ffad3927f468ac225ccabd4f877ba8fb2e0cd46047dc099e511ea17b0f2ddc9160386e4645969eed4ddb6b989b5ad -EBUILD yara-python-9999.ebuild 895 BLAKE2B 357e1767c06b67b92e680ee57091ec81366e8975f6b0a43a6a5d7c96ead0c95544f2ec442dbc7547f67dd4da1e8f6e686d6e9d5e6bfb4796e8262b67a970ef97 SHA512 76e4e4fabbabcd87c11a6330a822142c2395c07081a2c839defcdf9aa87c5c3096f5d6b7530ec962fe738092556328798cda1f4d8232d2385164a2a9633ac745 +EBUILD yara-python-4.4.0.ebuild 962 BLAKE2B 32b594560701aeb7b7e6cf7cabdcfe85edf8e43f0096bd56257e26f7e6ee8bb9729cc7d863a51c718ac932ed42a0085214c3118792391cf0505862d93b9c9f5b SHA512 208d266bfbf432d02742d05f0a75a5a174e9576370c0d86f5e8983a39dcdd30e66d61f9b1805525f513c48fc03fdf9dcff575c7af495681b9e53e27783780b19 +EBUILD yara-python-9999.ebuild 912 BLAKE2B 3939e8490e8854e4e64880afb8b9338b05a3b2fb7b71d3b8468b45b4e19270e5ad898006188405ef24da7a42026f7d18a6468225686d85a9d67a31d9e345647e SHA512 78c27faf6554db4176aa524eb249a6eb2c0d63ecc08f07bd8ed7190c2016c986c1d9c2c0c9456b78bf13a6f18629e35c9480888ee3c63fc456e835504398ffa0 MISC metadata.xml 868 BLAKE2B 45f55060dbf7936f5004b8b6b9332ae01fbe8f25c008d6b272245ae3a21522ffdb1b3d11a338fdf31300aa274c4e24cd05ecdc62ad0b1e757188edf174c6e27e SHA512 ab67d86f6deb877d1f5a22ec36e381d7cdf62ec0634dbfd526ea2b58a5e4b9d6d6e2f06ead9cf7e8d4cff463bdd3486992350d94715d7b59c40c746ad9184e22 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}" +} diff --git a/dev-python/yara-python/yara-python-9999.ebuild b/dev-python/yara-python/yara-python-9999.ebuild index a4fa9fa8737f..053d1d779d51 100644 --- a/dev-python/yara-python/yara-python-9999.ebuild +++ b/dev-python/yara-python/yara-python-9999.ebuild @@ -4,7 +4,8 @@ EAPI=8 DISTUTILS_USE_PEP517=setuptools -PYTHON_COMPAT=( python3_{9..11} ) +DISTUTILS_EXT=1 +PYTHON_COMPAT=( python3_{10..12} ) inherit distutils-r1 DESCRIPTION="Python interface for a malware identification and classification tool" |