coreutils: specify DEFAULT_TMPDIR with patch
https://github.com/termux/termux-packages/issues/5245#issuecomment-623992313
This commit is contained in:
parent
1ec1a8cff5
commit
d6db0bb10f
|
@ -2,6 +2,7 @@ TERMUX_PKG_HOMEPAGE=https://www.gnu.org/software/coreutils/
|
||||||
TERMUX_PKG_DESCRIPTION="Basic file, shell and text manipulation utilities from the GNU project"
|
TERMUX_PKG_DESCRIPTION="Basic file, shell and text manipulation utilities from the GNU project"
|
||||||
TERMUX_PKG_LICENSE="GPL-3.0"
|
TERMUX_PKG_LICENSE="GPL-3.0"
|
||||||
TERMUX_PKG_VERSION=8.32
|
TERMUX_PKG_VERSION=8.32
|
||||||
|
TERMUX_PKG_REVISION=1
|
||||||
TERMUX_PKG_SRCURL=https://mirrors.kernel.org/gnu/coreutils/coreutils-${TERMUX_PKG_VERSION}.tar.xz
|
TERMUX_PKG_SRCURL=https://mirrors.kernel.org/gnu/coreutils/coreutils-${TERMUX_PKG_VERSION}.tar.xz
|
||||||
TERMUX_PKG_SHA256=4458d8de7849df44ccab15e16b1548b285224dbba5f08fac070c1c0e0bcc4cfa
|
TERMUX_PKG_SHA256=4458d8de7849df44ccab15e16b1548b285224dbba5f08fac070c1c0e0bcc4cfa
|
||||||
TERMUX_PKG_DEPENDS="libandroid-support, libgmp, libiconv"
|
TERMUX_PKG_DEPENDS="libandroid-support, libgmp, libiconv"
|
||||||
|
@ -24,7 +25,6 @@ ac_cv_func_getpass=yes
|
||||||
"
|
"
|
||||||
|
|
||||||
termux_step_pre_configure() {
|
termux_step_pre_configure() {
|
||||||
CPPFLAGS+=" -DDEFAULT_TMPDIR=\\\"$TERMUX_PREFIX/tmp\\\""
|
|
||||||
CPPFLAGS+=" -D__USE_FORTIFY_LEVEL=0"
|
CPPFLAGS+=" -D__USE_FORTIFY_LEVEL=0"
|
||||||
|
|
||||||
# On device build is unsupported as it removes utility 'ln' (and maybe
|
# On device build is unsupported as it removes utility 'ln' (and maybe
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
diff -uNr coreutils-8.30/lib/getusershell.c coreutils-8.30.mod/lib/getusershell.c
|
diff -uNr coreutils-8.32/lib/getusershell.c coreutils-8.32.mod/lib/getusershell.c
|
||||||
--- coreutils-8.30/lib/getusershell.c 2018-05-14 07:20:31.000000000 +0300
|
--- coreutils-8.32/lib/getusershell.c 2020-01-01 16:14:23.000000000 +0200
|
||||||
+++ coreutils-8.30.mod/lib/getusershell.c 2019-03-01 20:16:36.731319198 +0200
|
+++ coreutils-8.32.mod/lib/getusershell.c 2020-05-05 14:13:10.980279936 +0300
|
||||||
@@ -56,7 +56,7 @@
|
@@ -56,7 +56,7 @@
|
||||||
static char const* const default_shells[] =
|
static char const* const default_shells[] =
|
||||||
{
|
{
|
||||||
|
@ -10,9 +10,9 @@ diff -uNr coreutils-8.30/lib/getusershell.c coreutils-8.30.mod/lib/getusershell.
|
||||||
};
|
};
|
||||||
|
|
||||||
/* Index of the next shell in 'default_shells' to return.
|
/* Index of the next shell in 'default_shells' to return.
|
||||||
diff -uNr coreutils-8.30/lib/tempname.c coreutils-8.30.mod/lib/tempname.c
|
diff -uNr coreutils-8.32/lib/tempname.c coreutils-8.32.mod/lib/tempname.c
|
||||||
--- coreutils-8.30/lib/tempname.c 2018-05-14 07:22:38.000000000 +0300
|
--- coreutils-8.32/lib/tempname.c 2020-01-01 16:19:26.000000000 +0200
|
||||||
+++ coreutils-8.30.mod/lib/tempname.c 2019-03-01 20:14:04.073892964 +0200
|
+++ coreutils-8.32.mod/lib/tempname.c 2020-05-05 14:13:10.984279966 +0300
|
||||||
@@ -33,7 +33,7 @@
|
@@ -33,7 +33,7 @@
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
@ -33,9 +33,9 @@ diff -uNr coreutils-8.30/lib/tempname.c coreutils-8.30.mod/lib/tempname.c
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
__set_errno (ENOENT);
|
__set_errno (ENOENT);
|
||||||
diff -uNr coreutils-8.30/src/mktemp.c coreutils-8.30.mod/src/mktemp.c
|
diff -uNr coreutils-8.32/src/mktemp.c coreutils-8.32.mod/src/mktemp.c
|
||||||
--- coreutils-8.30/src/mktemp.c 2018-05-14 07:20:24.000000000 +0300
|
--- coreutils-8.32/src/mktemp.c 2020-01-01 16:13:12.000000000 +0200
|
||||||
+++ coreutils-8.30.mod/src/mktemp.c 2019-03-01 20:12:37.923442265 +0200
|
+++ coreutils-8.32.mod/src/mktemp.c 2020-05-05 14:13:10.984279966 +0300
|
||||||
@@ -270,7 +270,7 @@
|
@@ -270,7 +270,7 @@
|
||||||
else if (dest_dir_arg && *dest_dir_arg)
|
else if (dest_dir_arg && *dest_dir_arg)
|
||||||
dest_dir = dest_dir_arg;
|
dest_dir = dest_dir_arg;
|
||||||
|
@ -54,22 +54,24 @@ diff -uNr coreutils-8.30/src/mktemp.c coreutils-8.30.mod/src/mktemp.c
|
||||||
}
|
}
|
||||||
if (IS_ABSOLUTE_FILE_NAME (template))
|
if (IS_ABSOLUTE_FILE_NAME (template))
|
||||||
die (EXIT_FAILURE, 0,
|
die (EXIT_FAILURE, 0,
|
||||||
diff -uNr coreutils-8.30/src/sort.c coreutils-8.30.mod/src/sort.c
|
diff -uNr coreutils-8.32/src/sort.c coreutils-8.32.mod/src/sort.c
|
||||||
--- coreutils-8.30/src/sort.c 2018-05-14 07:20:24.000000000 +0300
|
--- coreutils-8.32/src/sort.c 2020-01-01 16:33:34.000000000 +0200
|
||||||
+++ coreutils-8.30.mod/src/sort.c 2019-03-01 20:13:40.883773368 +0200
|
+++ coreutils-8.32.mod/src/sort.c 2020-05-05 14:14:09.200728018 +0300
|
||||||
@@ -105,7 +105,7 @@
|
@@ -92,9 +92,7 @@
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef DEFAULT_TMPDIR
|
#define UCHAR_LIM (UCHAR_MAX + 1)
|
||||||
|
|
||||||
|
-#ifndef DEFAULT_TMPDIR
|
||||||
-# define DEFAULT_TMPDIR "/tmp"
|
-# define DEFAULT_TMPDIR "/tmp"
|
||||||
+# define DEFAULT_TMPDIR "@TERMUX_PREFIX@/tmp"
|
-#endif
|
||||||
#endif
|
+#define DEFAULT_TMPDIR "@TERMUX_PREFIX@/tmp"
|
||||||
|
|
||||||
/* Maximum number of lines to merge every time a NODE is taken from
|
/* Maximum number of lines to merge every time a NODE is taken from
|
||||||
diff -uNr coreutils-8.30/src/split.c coreutils-8.30.mod/src/split.c
|
the merge queue. Node is at LEVEL in the binary merge tree,
|
||||||
--- coreutils-8.30/src/split.c 2018-05-14 07:20:24.000000000 +0300
|
diff -uNr coreutils-8.32/src/split.c coreutils-8.32.mod/src/split.c
|
||||||
+++ coreutils-8.30.mod/src/split.c 2019-03-01 20:15:52.004434545 +0200
|
--- coreutils-8.32/src/split.c 2020-01-01 16:13:12.000000000 +0200
|
||||||
@@ -481,7 +481,7 @@
|
+++ coreutils-8.32.mod/src/split.c 2020-05-05 14:13:10.984279966 +0300
|
||||||
|
@@ -482,7 +482,7 @@
|
||||||
pid_t child_pid;
|
pid_t child_pid;
|
||||||
char const *shell_prog = getenv ("SHELL");
|
char const *shell_prog = getenv ("SHELL");
|
||||||
if (shell_prog == NULL)
|
if (shell_prog == NULL)
|
||||||
|
@ -78,15 +80,17 @@ diff -uNr coreutils-8.30/src/split.c coreutils-8.30.mod/src/split.c
|
||||||
if (setenv ("FILE", name, 1) != 0)
|
if (setenv ("FILE", name, 1) != 0)
|
||||||
die (EXIT_FAILURE, errno,
|
die (EXIT_FAILURE, errno,
|
||||||
_("failed to set FILE environment variable"));
|
_("failed to set FILE environment variable"));
|
||||||
diff -uNr coreutils-8.30/src/tac.c coreutils-8.30.mod/src/tac.c
|
diff -uNr coreutils-8.32/src/tac.c coreutils-8.32.mod/src/tac.c
|
||||||
--- coreutils-8.30/src/tac.c 2018-05-14 07:20:24.000000000 +0300
|
--- coreutils-8.32/src/tac.c 2020-01-01 16:13:12.000000000 +0200
|
||||||
+++ coreutils-8.30.mod/src/tac.c 2019-03-01 20:13:29.470380749 +0200
|
+++ coreutils-8.32.mod/src/tac.c 2020-05-05 14:14:18.384798638 +0300
|
||||||
@@ -67,7 +67,7 @@
|
@@ -66,9 +66,7 @@
|
||||||
|
|
||||||
|
|
||||||
#ifndef DEFAULT_TMPDIR
|
|
||||||
-# define DEFAULT_TMPDIR "/tmp"
|
|
||||||
+# define DEFAULT_TMPDIR "@TERMUX_PREFIX@/tmp"
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
-#ifndef DEFAULT_TMPDIR
|
||||||
|
-# define DEFAULT_TMPDIR "/tmp"
|
||||||
|
-#endif
|
||||||
|
+#define DEFAULT_TMPDIR "@TERMUX_PREFIX@/tmp"
|
||||||
|
|
||||||
/* The number of bytes per atomic read. */
|
/* The number of bytes per atomic read. */
|
||||||
|
#define INITIAL_READSIZE 8192
|
||||||
|
|
Loading…
Reference in New Issue