commit: afc6e742621a943735788334705adaaa18b97a93 Author: Mario Haustein <mario.haustein <AT> hrz <DOT> tu-chemnitz <DOT> de> AuthorDate: Thu Jun 12 19:05:34 2025 +0000 Commit: Sam James <sam <AT> gentoo <DOT> org> CommitDate: Fri Jun 13 00:14:47 2025 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=afc6e742
app-forensics/yara-x: add 1.0.1 Signed-off-by: Mario Haustein <mario.haustein <AT> hrz.tu-chemnitz.de> Part-of: https://github.com/gentoo/gentoo/pull/42568 Signed-off-by: Sam James <sam <AT> gentoo.org> app-forensics/yara-x/Manifest | 2 + app-forensics/yara-x/yara-x-1.0.1.ebuild | 90 ++++++++++++++++++++++++++++++++ 2 files changed, 92 insertions(+) diff --git a/app-forensics/yara-x/Manifest b/app-forensics/yara-x/Manifest index 0acb2750c549..035b0403d0bb 100644 --- a/app-forensics/yara-x/Manifest +++ b/app-forensics/yara-x/Manifest @@ -2,6 +2,8 @@ DIST yara-x-0.13.0.tar.gz 44311891 BLAKE2B 03b154b5b8c79b80e54ff425d53c69e107823 DIST yara-x-0.14.0.tar.gz 44476699 BLAKE2B 6dbea06abac237eaf90375714fd28a5e32523b342943321ddab260ca84cda65167b2d07de330eff2c3d37f30bc2a52cbe141598d622c88a3f89c8a227fa6283a SHA512 ce66a38a1f6955bc79ed9ac2ec1b423bd2fc3f3dc1b13e75790394b8d7b5e9907d4edbc8ab860665ab09351b39ed11b813fdeacb972d988dea22d85f6490ee93 DIST yara-x-0.15.0.tar.gz 44484562 BLAKE2B 89c1fb866abfbc401abfebed4547264566aefa33d1af926d201389eb368be72fb674c6e8abe32f63bdb7f9a5567038a9ce55c1919591d0aa875e9cb1e2444623 SHA512 99118a5527f65cc1af98e2b7fc7479e2191f1b79a1c31cc63e4e1289b0fcab3e78a927ff22a1dfb8531ce3b40b900d53608e38f856a07d09cde5fd7285e7d03a DIST yara-x-1.0.0.tar.gz 44487168 BLAKE2B 4fa5ad1dd9847cce24dabc7746128781671cbb1ef12d6e8b848360e01a2dddf7cc1734d63aae649f1138b6d74f9a9eafab5523739f2c185d52df226af2dd85a9 SHA512 0da0367ee32a3442e2ded8099c5df36c4b74958d2b9a55f8747ff111a04a0e22eb87b8459c7b836e3e4f3dca2a44ed7dd5b74555e3b3e3673183cee47df8b4d6 +DIST yara-x-1.0.1-crates.tar.xz 45931352 BLAKE2B ac5fd2fca9834fbb58c58cfa85b7479a2bce59e2ca6571d835bb5665f29cf80fee9389cb567c3585b110006f0a7c265e7b4696cefdf6c38729aa7857b5d66632 SHA512 b7eee9de2790352ddcfacfb62772a35df10ea4d86fbf70506e3f2e0d14212e0722feb511a9aab7ff9bcca38be27d974ff77ec4509f99cc8d68c3233a5ee21781 +DIST yara-x-1.0.1.tar.gz 44491037 BLAKE2B 250de15ccc5de550b72b2cb1042c4cd3f5e0e7fd0a63139436826690f1c1f63ca4a64fbd082b52271510830903eca71605669381124d195d7770f659baff426d SHA512 8ba1f678dcb1d498b4574545f21d886aaf193debd7b7491dc57e9271b97232468b58f1dfbfa076207a3d3921672e45b58be30b7cb697ec621aeb9c355fec5b9d DIST yara-x-go-v0.14.0-crates.tar.xz 47078332 BLAKE2B 86ab66084f33bc36a1c3b10e1098d5733080b2313e67a77b44f9a404d7e95f0530d6a99096693148ba47e2e1146fb6c5e1126cfc80ebb33a6b596cfab73fe69d SHA512 84f1c8e62d16da65b3377a03fb5e2fd51b3c98705997ea5c6fa9a42477e5fe8f951a6e1eb46d58fa2438e193312ba5e3c53c9ad9cf9e30f16a04e62de25327bd DIST yara-x-go-v0.15.0-crates.tar.xz 45750356 BLAKE2B 8ba62e5d917bac88c8b3d2df20763225ef0dbfbb843b35659774deac21748b9014765165824b0b122a04ff302ea4b493d3644591affaa55c7462026329c56a5a SHA512 a086b089df9bb71ad96e4a343a521318a09ecf5defb34246c8c00ef4e0c2bf8c5315543fd7cddaed5a50e6d9203a060dce3e96b8f5caac7ca7238cde698497bb DIST yara-x-go-v1.0.0-crates.tar.xz 45931352 BLAKE2B ac5fd2fca9834fbb58c58cfa85b7479a2bce59e2ca6571d835bb5665f29cf80fee9389cb567c3585b110006f0a7c265e7b4696cefdf6c38729aa7857b5d66632 SHA512 b7eee9de2790352ddcfacfb62772a35df10ea4d86fbf70506e3f2e0d14212e0722feb511a9aab7ff9bcca38be27d974ff77ec4509f99cc8d68c3233a5ee21781 diff --git a/app-forensics/yara-x/yara-x-1.0.1.ebuild b/app-forensics/yara-x/yara-x-1.0.1.ebuild new file mode 100644 index 000000000000..844f9fdc1f09 --- /dev/null +++ b/app-forensics/yara-x/yara-x-1.0.1.ebuild @@ -0,0 +1,90 @@ +# Copyright 2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DISTUTILS_EXT=1 +DISTUTILS_USE_PEP517=maturin +DISTUTILS_OPTIONAL=1 +PYTHON_COMPAT=( python3_{10..13} ) + +CRATES="" + +inherit cargo distutils-r1 + +DESCRIPTION="A malware identification and classification tool" +HOMEPAGE="https://virustotal.github.io/yara-x/" +SRC_URI="https://github.com/VirusTotal/yara-x/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz" +SRC_URI+=" https://github.com/gentoo-crate-dist/${PN}/releases/download/v${PV}/${P}-crates.tar.xz" + +LICENSE="BSD" +# Dependent crate licenses +LICENSE+=" + Apache-2.0 Apache-2.0-with-LLVM-exceptions BSD CC0-1.0 EPL-2.0 ISC + MIT MPL-2.0 Unicode-3.0 Unicode-DFS-2016 WTFPL-2 ZLIB +" + +SLOT="0" +# Note: cranelift dependency only supports amd64, arm64, s390, and riscv64 as of 2025 +KEYWORDS="~amd64" +IUSE="python" +REQUIRED_USE=" + python? ( ${PYTHON_REQUIRED_USE} ) +" + +RDEPEND=" + python? ( ${PYTHON_DEPS} ) +" +BDEPEND=" + python? ( + ${PYTHON_DEPS} + ${DISTUTILS_DEPS} + ) +" + +wrap_python() { + local phase=$1 + shift + + if use python; then + pushd py >/dev/null || die + distutils-r1_${phase} "$@" + popd >/dev/null || die + fi +} + +# https://bugs.gentoo.org/933231, https://bugs.gentoo.org/933232 +QA_FLAGS_IGNORED="usr/bin/yr" + +pkg_setup() { + # https://bugs.gentoo.org/933233 + QA_SONAME="usr/$(get_libdir)/libyara_x.*\\.so usr/lib.*/py.*/site-packages/yara_x/yara_x.*\\.so" + + rust_pkg_setup +} + +src_prepare() { + default + wrap_python ${FUNCNAME} +} + +src_compile() { + cargo_src_compile --workspace + wrap_python ${FUNCNAME} +} + +python_test() { + epytest +} + +src_test() { + cargo_src_test + wrap_python ${FUNCNAME} +} + +src_install() { + dobin "$(cargo_target_dir)"/yr + dolib.so "$(cargo_target_dir)"/*.so + + wrap_python ${FUNCNAME} +}
