From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id E5FE815807A for ; Thu, 05 Jun 2025 21:22:40 +0000 (UTC) Received: from lists.gentoo.org (bobolink.gentoo.org [140.211.166.189]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) (Authenticated sender: relay-lists.gentoo.org@gentoo.org) by smtp.gentoo.org (Postfix) with ESMTPSA id D0C4F343196 for ; Thu, 05 Jun 2025 21:22:40 +0000 (UTC) Received: from bobolink.gentoo.org (localhost [127.0.0.1]) by bobolink.gentoo.org (Postfix) with ESMTP id CB5E91102BE; Thu, 05 Jun 2025 21:22:39 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by bobolink.gentoo.org (Postfix) with ESMTPS id C0A381102BE for ; Thu, 05 Jun 2025 21:22:39 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 74ACF340C15 for ; Thu, 05 Jun 2025 21:22:39 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 136C71439 for ; Thu, 05 Jun 2025 21:22:38 +0000 (UTC) From: "Sam James" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" Message-ID: <1749158495.6532ed58407b931714c6314322ddf7b6e1ac950e.sam@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: app-forensics/yara-x/ X-VCS-Repository: repo/gentoo X-VCS-Files: app-forensics/yara-x/Manifest app-forensics/yara-x/yara-x-1.0.0.ebuild X-VCS-Directories: app-forensics/yara-x/ X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: 6532ed58407b931714c6314322ddf7b6e1ac950e X-VCS-Branch: master Date: Thu, 05 Jun 2025 21:22:38 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 151cdd3d-29b4-4f20-9eff-bfa15075490e X-Archives-Hash: 295bbf3f89c93c310f6a4009af139eac commit: 6532ed58407b931714c6314322ddf7b6e1ac950e Author: Mario Haustein hrz tu-chemnitz de> AuthorDate: Thu Jun 5 04:18:04 2025 +0000 Commit: Sam James gentoo org> CommitDate: Thu Jun 5 21:21:35 2025 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6532ed58 app-forensics/yara-x: add 1.0.0 Signed-off-by: Mario Haustein hrz.tu-chemnitz.de> Part-of: https://github.com/gentoo/gentoo/pull/42451 Closes: https://github.com/gentoo/gentoo/pull/42451 Signed-off-by: Sam James gentoo.org> app-forensics/yara-x/Manifest | 2 + app-forensics/yara-x/yara-x-1.0.0.ebuild | 90 ++++++++++++++++++++++++++++++++ 2 files changed, 92 insertions(+) diff --git a/app-forensics/yara-x/Manifest b/app-forensics/yara-x/Manifest index 92be2836f2e4..0acb2750c549 100644 --- a/app-forensics/yara-x/Manifest +++ b/app-forensics/yara-x/Manifest @@ -1,6 +1,8 @@ DIST yara-x-0.13.0.tar.gz 44311891 BLAKE2B 03b154b5b8c79b80e54ff425d53c69e107823f2f101975b883e74d8b304e5f831d4c4021fcba516626369e91a2130b2d409e52c956d48bb11d616ffc73349cce SHA512 120fe66e52f9fcfe770ddfe686174e827f5459fcb50afe08a29a17bb545fd8b4aa08d695c0921f84d1d5a653213fe09b3f7adfa73f341fc50c6a1df75b7daefc 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-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 DIST yara-x-v0.13.0-crates.tar.xz 45269648 BLAKE2B d10294ee753c7017798d501472b0dfde0413325d6dfd4ba01c3cae8e3cefb71ce749efbaf9a2676871ac9ed6ba700e19230c563a092c1f9ca9bfc5f75e09c3ec SHA512 b4a5251e9720b2dfa0cc1a509e01641a8969628638fe511c9dcc6aa05d4bc405d6a06faa0b809db9f6201801e0ac34e54a546db348fe99f13b167ce6d7040132 diff --git a/app-forensics/yara-x/yara-x-1.0.0.ebuild b/app-forensics/yara-x/yara-x-1.0.0.ebuild new file mode 100644 index 000000000000..5cb50386f838 --- /dev/null +++ b/app-forensics/yara-x/yara-x-1.0.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/go/v${PV}/${PN}-go-v${PV}-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} +}