From 56f20f2ea6e2d38d854dfb029797bcb538bdddb5 Mon Sep 17 00:00:00 2001 From: Leonid Pliushch Date: Sat, 2 Mar 2019 14:52:37 +0200 Subject: [PATCH] libbz2: fix hardcoded paths (/bin/rm /tmp) --- packages/libbz2/build.sh | 2 +- packages/libbz2/fix-paths.patch | 21 +++++++++++++++++++++ 2 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 packages/libbz2/fix-paths.patch diff --git a/packages/libbz2/build.sh b/packages/libbz2/build.sh index d4e24f60a..c9b58398a 100644 --- a/packages/libbz2/build.sh +++ b/packages/libbz2/build.sh @@ -2,7 +2,7 @@ TERMUX_PKG_HOMEPAGE=http://www.bzip.org/ TERMUX_PKG_DESCRIPTION="BZ2 format compression library" TERMUX_PKG_LICENSE="BSD" TERMUX_PKG_VERSION=1.0.6 -TERMUX_PKG_REVISION=1 +TERMUX_PKG_REVISION=2 TERMUX_PKG_SHA256=4bbea71ae30a0e5a8ddcee8da750bc978a479ba11e04498d082fa65c2f8c1ad5 TERMUX_PKG_SRCURL=https://fossies.org/linux/misc/bzip2-${TERMUX_PKG_VERSION}.tar.xz TERMUX_PKG_EXTRA_MAKE_ARGS="PREFIX=$TERMUX_PREFIX" diff --git a/packages/libbz2/fix-paths.patch b/packages/libbz2/fix-paths.patch new file mode 100644 index 000000000..36490b1a8 --- /dev/null +++ b/packages/libbz2/fix-paths.patch @@ -0,0 +1,21 @@ +diff -uNr bzip2-1.0.6/bzdiff bzip2-1.0.6.mod/bzdiff +--- bzip2-1.0.6/bzdiff 2007-01-03 04:00:55.000000000 +0200 ++++ bzip2-1.0.6.mod/bzdiff 2019-03-01 20:44:12.401418675 +0200 +@@ -37,7 +37,7 @@ + echo "Usage: $prog [${comp}_options] file [file]" + exit 1 + fi +-tmp=`mktemp ${TMPDIR:-/tmp}/bzdiff.XXXXXXXXXX` || { ++tmp=`mktemp ${TMPDIR:-@TERMUX_PREFIX@/tmp}/bzdiff.XXXXXXXXXX` || { + echo 'cannot create a temporary file' >&2 + exit 1 + } +@@ -56,7 +56,7 @@ + bzip2 -cdfq "$2" > $tmp + bzip2 -cdfq "$1" | $comp $OPTIONS - $tmp + STAT="$?" +- /bin/rm -f $tmp;; ++ rm -f $tmp;; + + *) bzip2 -cdfq "$1" | $comp $OPTIONS - "$2" + STAT="$?";;