From 668db3ed63a0dcb5762523268de5580a928f3c1a Mon Sep 17 00:00:00 2001 From: Fredrik Fornwall Date: Tue, 19 Apr 2016 17:03:45 -0400 Subject: [PATCH] parallel: Avoid using /tmp (fixes #221) --- packages/parallel/build.sh | 2 +- packages/parallel/parallel.patch | 18 ++++++++++++++++++ packages/parallel/sem.patch | 18 ++++++++++++++++++ 3 files changed, 37 insertions(+), 1 deletion(-) create mode 100644 packages/parallel/parallel.patch create mode 100644 packages/parallel/sem.patch diff --git a/packages/parallel/build.sh b/packages/parallel/build.sh index 15f86ad58..00279e13f 100644 --- a/packages/parallel/build.sh +++ b/packages/parallel/build.sh @@ -1,6 +1,6 @@ TERMUX_PKG_HOMEPAGE=http://www.gnu.org/software/parallel/ TERMUX_PKG_DESCRIPTION="GNU Parallel is a shell tool for executing jobs in parallel using one or more machines" -TERMUX_PKG_VERSION=20160222 +TERMUX_PKG_VERSION=20160322 TERMUX_PKG_SRCURL=http://ftp.gnu.org/gnu/parallel/parallel-${TERMUX_PKG_VERSION}.tar.bz2 TERMUX_PKG_DEPENDS="perl" TERMUX_PKG_PLATFORM_INDEPENDENT=yes diff --git a/packages/parallel/parallel.patch b/packages/parallel/parallel.patch new file mode 100644 index 000000000..fe1066805 --- /dev/null +++ b/packages/parallel/parallel.patch @@ -0,0 +1,18 @@ +diff -u -r ../parallel-20160222/src/parallel ./src/parallel +--- ../parallel-20160222/src/parallel 2016-02-21 16:24:56.000000000 -0500 ++++ ./src/parallel 2016-04-19 16:50:52.123488947 -0400 +@@ -1224,11 +1224,11 @@ + $Global::trim = 'n'; + $Global::max_jobs_running = 0; + $Global::job_already_run = ''; +- $ENV{'TMPDIR'} ||= "/tmp"; ++ $ENV{'TMPDIR'} ||= "@TERMUX_PREFIX@/tmp"; + if(not $ENV{HOME}) { + # $ENV{HOME} is sometimes not set if called from PHP +- ::warning("\$HOME not set. Using /tmp."); +- $ENV{HOME} = "/tmp"; ++ ::warning("\$HOME not set. Using @TERMUX_HOME@."); ++ $ENV{HOME} = "@TERMUX_HOME@"; + } + } + diff --git a/packages/parallel/sem.patch b/packages/parallel/sem.patch new file mode 100644 index 000000000..a6da3acf8 --- /dev/null +++ b/packages/parallel/sem.patch @@ -0,0 +1,18 @@ +diff -u -r ../parallel-20160222/src/sem ./src/sem +--- ../parallel-20160222/src/sem 2016-02-21 16:24:56.000000000 -0500 ++++ ./src/sem 2016-04-19 16:51:57.450434076 -0400 +@@ -1224,11 +1224,11 @@ + $Global::trim = 'n'; + $Global::max_jobs_running = 0; + $Global::job_already_run = ''; +- $ENV{'TMPDIR'} ||= "/tmp"; ++ $ENV{'TMPDIR'} ||= "@TERMUX_PREFIX@/tmp"; + if(not $ENV{HOME}) { + # $ENV{HOME} is sometimes not set if called from PHP +- ::warning("\$HOME not set. Using /tmp."); +- $ENV{HOME} = "/tmp"; ++ ::warning("\$HOME not set. Using @TERMUX_HOME@."); ++ $ENV{HOME} = "@TERMUX_HOME@"; + } + } +