commit:     24cb3b704bad79a16a3d91151bc8c42be1205a09
Author:     Mario Haustein <mario.haustein <AT> hrz <DOT> tu-chemnitz <DOT> de>
AuthorDate: Wed Apr  6 19:51:22 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Mon May 16 05:23:03 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=24cb3b70

app-forensics/yara: fix tests

Closes: https://bugs.gentoo.org/836790
Package-Manager: Portage-3.0.30, Repoman-3.0.3
Signed-off-by: Mario Haustein <mario.haustein <AT> hrz.tu-chemnitz.de>
Signed-off-by: Sam James <sam <AT> gentoo.org>

 app-forensics/yara/files/yara-4.2.0-test.patch                | 11 +++++++++++
 .../yara/{yara-4.2.0.ebuild => yara-4.2.0-r1.ebuild}          |  2 ++
 2 files changed, 13 insertions(+)

diff --git a/app-forensics/yara/files/yara-4.2.0-test.patch 
b/app-forensics/yara/files/yara-4.2.0-test.patch
new file mode 100644
index 000000000000..7072ad7478ac
--- /dev/null
+++ b/app-forensics/yara/files/yara-4.2.0-test.patch
@@ -0,0 +1,11 @@
+--- a/tests/test-rules.c
++++ b/tests/test-rules.c
+@@ -3061,7 +3061,7 @@ void test_process_scan()
+     exit(EXIT_FAILURE);
+   }
+ 
+-  spawn("/bin/sh", "-c", "VAR='Hello, world!'; sleep 600; true");
++  spawn("/bin/sh", "-c", "VAR='Hello, world!'; sleep 600& PID=\$!; trap 
\"kill \$PID\" EXIT; wait; true");
+ 
+   counters.rules_matching = 0;
+   counters.rules_not_matching = 0;

diff --git a/app-forensics/yara/yara-4.2.0.ebuild 
b/app-forensics/yara/yara-4.2.0-r1.ebuild
similarity index 96%
rename from app-forensics/yara/yara-4.2.0.ebuild
rename to app-forensics/yara/yara-4.2.0-r1.ebuild
index 8bac51561719..d0e0619bf1e1 100644
--- a/app-forensics/yara/yara-4.2.0.ebuild
+++ b/app-forensics/yara/yara-4.2.0-r1.ebuild
@@ -26,6 +26,8 @@ DEPEND="
 RDEPEND="${DEPEND}"
 PDEPEND="python? ( =dev-python/yara-python-$(ver_cut 1)* )"
 
+PATCHES=( "${FILESDIR}/${P}-test.patch" )
+
 src_prepare() {
        default
        eautoreconf

Reply via email to