From a6f0348bf48c027c3933b7ea457404af7920ec30 Mon Sep 17 00:00:00 2001 From: Leonid Plyushch Date: Sat, 2 Mar 2019 14:52:59 +0200 Subject: [PATCH] radare2: fix path to /bin/sh and /usr/bin/diff --- packages/radare2/build.sh | 1 + packages/radare2/libr-util-diff.c.patch | 12 ++++++++++++ packages/radare2/libr-util-sandbox.c.patch | 12 ++++++++++++ 3 files changed, 25 insertions(+) create mode 100644 packages/radare2/libr-util-diff.c.patch create mode 100644 packages/radare2/libr-util-sandbox.c.patch diff --git a/packages/radare2/build.sh b/packages/radare2/build.sh index b37c4f3cb..936c8a776 100644 --- a/packages/radare2/build.sh +++ b/packages/radare2/build.sh @@ -2,6 +2,7 @@ TERMUX_PKG_HOMEPAGE=https://rada.re TERMUX_PKG_DESCRIPTION="Advanced Hexadecimal Editor" TERMUX_PKG_LICENSE="GPL-3.0" TERMUX_PKG_VERSION=3.3.0 +TERMUX_PKG_REVISION=1 TERMUX_PKG_SHA256=3c092bdf8676d7d49537926258c50557bca98d7d669babfed6113ff82c403bcb TERMUX_PKG_SRCURL=https://github.com/radare/radare2/archive/$TERMUX_PKG_VERSION.tar.gz TERMUX_PKG_DEPENDS="libuv" diff --git a/packages/radare2/libr-util-diff.c.patch b/packages/radare2/libr-util-diff.c.patch new file mode 100644 index 000000000..054e2fbd9 --- /dev/null +++ b/packages/radare2/libr-util-diff.c.patch @@ -0,0 +1,12 @@ +diff -uNr radare2-3.2.1/libr/util/diff.c radare2-3.2.1.mod/libr/util/diff.c +--- radare2-3.2.1/libr/util/diff.c 2019-01-08 18:14:43.000000000 +0200 ++++ radare2-3.2.1.mod/libr/util/diff.c 2019-03-02 03:17:18.566391827 +0200 +@@ -145,7 +145,7 @@ + char* err = NULL; + char* out = NULL; + int out_len; +- (void)r_sys_cmd_str_full ("/usr/bin/diff -u .a .b", NULL, &out, &out_len, &err); ++ (void)r_sys_cmd_str_full ("@TERMUX_PREFIX@/bin/diff -u .a .b", NULL, &out, &out_len, &err); + r_file_rm (".a"); + r_file_rm (".b"); + free (err); diff --git a/packages/radare2/libr-util-sandbox.c.patch b/packages/radare2/libr-util-sandbox.c.patch new file mode 100644 index 000000000..87a057a9a --- /dev/null +++ b/packages/radare2/libr-util-sandbox.c.patch @@ -0,0 +1,12 @@ +diff -uNr radare2-3.2.1/libr/util/sandbox.c radare2-3.2.1.mod/libr/util/sandbox.c +--- radare2-3.2.1/libr/util/sandbox.c 2019-01-08 18:14:43.000000000 +0200 ++++ radare2-3.2.1.mod/libr/util/sandbox.c 2019-03-02 02:42:52.796061199 +0200 +@@ -154,7 +154,7 @@ + return system (x); + #endif + } +- return execl ("/bin/sh", "sh", "-c", x, (const char*)NULL); ++ return execl ("@TERMUX_PREFIX@/bin/sh", "sh", "-c", x, (const char*)NULL); + #else + #include + if (n && !strchr (x, '|')) {