summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMario Haustein <mario.haustein@hrz.tu-chemnitz.de>2022-04-06 21:51:22 +0200
committerSam James <sam@gentoo.org>2022-05-16 05:23:03 +0000
commit24cb3b704bad79a16a3d91151bc8c42be1205a09 (patch)
treed09f279fb81a67ebcac2598c919047a45621b3ed
parentdev-db/sqlmap: add Python 3.8 (diff)
downloadgentoo-24cb3b704bad79a16a3d91151bc8c42be1205a09.tar.gz
gentoo-24cb3b704bad79a16a3d91151bc8c42be1205a09.tar.bz2
gentoo-24cb3b704bad79a16a3d91151bc8c42be1205a09.zip
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@hrz.tu-chemnitz.de> Signed-off-by: Sam James <sam@gentoo.org>
-rw-r--r--app-forensics/yara/files/yara-4.2.0-test.patch11
-rw-r--r--app-forensics/yara/yara-4.2.0-r1.ebuild (renamed from app-forensics/yara/yara-4.2.0.ebuild)2
2 files changed, 13 insertions, 0 deletions
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
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