From 25592202efbf360cc0e665685090c841f5685e69 Mon Sep 17 00:00:00 2001 From: Fredrik Fornwall Date: Thu, 22 Sep 2016 21:41:32 -0400 Subject: [PATCH] radare2: Fix building as root Building radare2 as root (as is done in docker) would break the system as an entry in /etc/ld.so.conf.d/ was pulling in cross-compiled libraries. --- packages/radare2/sys-ldconfig.sh.patch | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 packages/radare2/sys-ldconfig.sh.patch diff --git a/packages/radare2/sys-ldconfig.sh.patch b/packages/radare2/sys-ldconfig.sh.patch new file mode 100644 index 000000000..32a624ea5 --- /dev/null +++ b/packages/radare2/sys-ldconfig.sh.patch @@ -0,0 +1,21 @@ +diff -u -r ../radare2-0.10.5/sys/ldconfig.sh ./sys/ldconfig.sh +--- ../radare2-0.10.5/sys/ldconfig.sh 2016-08-16 19:28:34.000000000 -0400 ++++ ./sys/ldconfig.sh 2016-09-22 21:39:01.237872528 -0400 +@@ -1,15 +1,4 @@ + #!/bin/sh +-LD=/etc/ld.so.conf.d +-if test -w $LD ; then +- if type ldconfig > /dev/null 2>&1 ; then +- mkdir -p $LD +- P=$(awk -F= '/^LIBDIR/{print $2}' config-user.mk) +- D="$(dirname "$P")"/"$(basename "$P")" +- if [ /usr != "$D" ]; then +- echo "$P" > "$LD/radare.conf" +- # do not update symlinks to avoid r2 install issues +- ldconfig -X +- fi +- fi +-fi ++# Do not do anything that would break the system ++# if building as root and cross compiling. + exit 0