commit: 4c6c541c5b1c081ced6031d5f22097875010bf59 Author: Mario Haustein <mario.haustein <AT> hrz <DOT> tu-chemnitz <DOT> de> AuthorDate: Thu Jul 3 20:00:10 2025 +0000 Commit: Sam James <sam <AT> gentoo <DOT> org> CommitDate: Fri Jul 4 20:00:26 2025 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4c6c541c
app-forensics/yara-x: add 1.3.0 Signed-off-by: Mario Haustein <mario.haustein <AT> hrz.tu-chemnitz.de> Part-of: https://github.com/gentoo/gentoo/pull/42698 Closes: https://github.com/gentoo/gentoo/pull/42698 Signed-off-by: Sam James <sam <AT> gentoo.org> app-forensics/yara-x/Manifest | 2 + app-forensics/yara-x/yara-x-1.3.0.ebuild | 90 ++++++++++++++++++++++++++++++++ 2 files changed, 92 insertions(+) diff --git a/app-forensics/yara-x/Manifest b/app-forensics/yara-x/Manifest index 90af0e9b1fb6..895e48525eb8 100644 --- a/app-forensics/yara-x/Manifest +++ b/app-forensics/yara-x/Manifest @@ -5,6 +5,8 @@ DIST yara-x-1.0.1-crates.tar.xz 45931352 BLAKE2B ac5fd2fca9834fbb58c58cfa85b7479 DIST yara-x-1.0.1.tar.gz 44491037 BLAKE2B 250de15ccc5de550b72b2cb1042c4cd3f5e0e7fd0a63139436826690f1c1f63ca4a64fbd082b52271510830903eca71605669381124d195d7770f659baff426d SHA512 8ba1f678dcb1d498b4574545f21d886aaf193debd7b7491dc57e9271b97232468b58f1dfbfa076207a3d3921672e45b58be30b7cb697ec621aeb9c355fec5b9d DIST yara-x-1.1.0-crates.tar.xz 45931352 BLAKE2B ac5fd2fca9834fbb58c58cfa85b7479a2bce59e2ca6571d835bb5665f29cf80fee9389cb567c3585b110006f0a7c265e7b4696cefdf6c38729aa7857b5d66632 SHA512 b7eee9de2790352ddcfacfb62772a35df10ea4d86fbf70506e3f2e0d14212e0722feb511a9aab7ff9bcca38be27d974ff77ec4509f99cc8d68c3233a5ee21781 DIST yara-x-1.1.0.tar.gz 44499555 BLAKE2B 99d686bed2cb1a2f72b197e3e46881549e7b1d26f6c7f665e565e7ae485b7825deb258a40371f454c43f9ae6477c283f0359eb2b91f6cca63e52b5fe3210e5e8 SHA512 842e2c8c292fde5260645cd9016da831386210db858a4c6485248c314626028399aba1d322f4b9247486365ca4febd6851a59532bbbf07dcfdecadeb3e5e84e1 +DIST yara-x-1.3.0-crates.tar.xz 45877576 BLAKE2B f620fbb99531e78d4626dbe55067024e5fcd506800d1d1a37ce0c5506781e9cbc7892a4c5faf31666f3f4091c08fa826afe9d43a2614f20f9c634db60938a958 SHA512 2fe6b7a9143d542cce92f0ae8ea92214b23865995f75a872e24221c061f4f8eeb72b3aa4400f531d89a9be439cf8b02cb62502749bafa5174cc99bf7410542de +DIST yara-x-1.3.0.tar.gz 44546955 BLAKE2B b50abe6d6ded16a787ef6ed5ed756e37e194a52855a3924069e8b38d0c9572ced5cc23db9a403c1053e83fb44ab793dd400166b40b36c33fdd4ddb97988cdb74 SHA512 2099203f83ed6c94568a7ca29f8a5a4cf874d0014e8615f71b5fab9908d1d58d328cf7c9d037db0129ea486a849eac1c3e8c391417f728a0ef0a1737ffd581b3 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.3.0.ebuild b/app-forensics/yara-x/yara-x-1.3.0.ebuild new file mode 100644 index 000000000000..844f9fdc1f09 --- /dev/null +++ b/app-forensics/yara-x/yara-x-1.3.0.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} +}