Fredrik Fornwall
6 years ago
committed by
GitHub
83 changed files with 2155 additions and 273 deletions
@ -0,0 +1,12 @@ |
|||||
|
diff -uNr busybox-1.30.1/util-linux/setarch.c busybox-1.30.1.mod/util-linux/setarch.c
|
||||
|
--- busybox-1.30.1/util-linux/setarch.c 2018-12-30 17:14:20.000000000 +0200
|
||||
|
+++ busybox-1.30.1.mod/util-linux/setarch.c 2019-03-02 14:06:38.150442254 +0200
|
||||
|
@@ -98,7 +98,7 @@
|
||||
|
|
||||
|
argv += optind; |
||||
|
if (!argv[0]) |
||||
|
- (--argv)[0] = (char*)"/bin/sh";
|
||||
|
+ (--argv)[0] = (char*)"@TERMUX_PREFIX@/bin/sh";
|
||||
|
|
||||
|
/* Try to execute the program */ |
||||
|
BB_EXECVP_or_die(argv); |
@ -0,0 +1,92 @@ |
|||||
|
diff -uNr coreutils-8.30/lib/getusershell.c coreutils-8.30.mod/lib/getusershell.c
|
||||
|
--- coreutils-8.30/lib/getusershell.c 2018-05-14 07:20:31.000000000 +0300
|
||||
|
+++ coreutils-8.30.mod/lib/getusershell.c 2019-03-01 20:16:36.731319198 +0200
|
||||
|
@@ -56,7 +56,7 @@
|
||||
|
static char const* const default_shells[] = |
||||
|
{ |
||||
|
ADDITIONAL_DEFAULT_SHELLS |
||||
|
- "/bin/sh", "/bin/csh", "/usr/bin/sh", "/usr/bin/csh", NULL
|
||||
|
+ "@TERMUX_PREFIX@/bin/sh", "@TERMUX_PREFIX@/bin/bash", "@TERMUX_PREFIX@/bin/ash", "@TERMUX_PREFIX@/bin/csh", NULL
|
||||
|
}; |
||||
|
|
||||
|
/* 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
|
||||
|
--- coreutils-8.30/lib/tempname.c 2018-05-14 07:22:38.000000000 +0300
|
||||
|
+++ coreutils-8.30.mod/lib/tempname.c 2019-03-01 20:14:04.073892964 +0200
|
||||
|
@@ -33,7 +33,7 @@
|
||||
|
|
||||
|
#include <stdio.h> |
||||
|
#ifndef P_tmpdir |
||||
|
-# define P_tmpdir "/tmp"
|
||||
|
+# define P_tmpdir "@TERMUX_PREFIX@/tmp"
|
||||
|
#endif |
||||
|
#ifndef TMP_MAX |
||||
|
# define TMP_MAX 238328 |
||||
|
@@ -149,8 +149,8 @@
|
||||
|
{ |
||||
|
if (direxists (P_tmpdir)) |
||||
|
dir = P_tmpdir; |
||||
|
- else if (strcmp (P_tmpdir, "/tmp") != 0 && direxists ("/tmp"))
|
||||
|
- dir = "/tmp";
|
||||
|
+ else if (strcmp (P_tmpdir, "@TERMUX_PREFIX@/tmp") != 0 && direxists ("@TERMUX_PREFIX@/tmp"))
|
||||
|
+ dir = "@TERMUX_PREFIX@/tmp";
|
||||
|
else |
||||
|
{ |
||||
|
__set_errno (ENOENT); |
||||
|
diff -uNr coreutils-8.30/src/mktemp.c coreutils-8.30.mod/src/mktemp.c
|
||||
|
--- coreutils-8.30/src/mktemp.c 2018-05-14 07:20:24.000000000 +0300
|
||||
|
+++ coreutils-8.30.mod/src/mktemp.c 2019-03-01 20:12:37.923442265 +0200
|
||||
|
@@ -270,7 +270,7 @@
|
||||
|
else if (dest_dir_arg && *dest_dir_arg) |
||||
|
dest_dir = dest_dir_arg; |
||||
|
else |
||||
|
- dest_dir = "/tmp";
|
||||
|
+ dest_dir = "@TERMUX_PREFIX@/tmp";
|
||||
|
|
||||
|
if (last_component (template) != template) |
||||
|
die (EXIT_FAILURE, 0, |
||||
|
@@ -284,7 +284,7 @@
|
||||
|
else |
||||
|
{ |
||||
|
char *env = getenv ("TMPDIR"); |
||||
|
- dest_dir = (env && *env ? env : "/tmp");
|
||||
|
+ dest_dir = (env && *env ? env : "@TERMUX_PREFIX@/tmp");
|
||||
|
} |
||||
|
if (IS_ABSOLUTE_FILE_NAME (template)) |
||||
|
die (EXIT_FAILURE, 0, |
||||
|
diff -uNr coreutils-8.30/src/sort.c coreutils-8.30.mod/src/sort.c
|
||||
|
--- coreutils-8.30/src/sort.c 2018-05-14 07:20:24.000000000 +0300
|
||||
|
+++ coreutils-8.30.mod/src/sort.c 2019-03-01 20:13:40.883773368 +0200
|
||||
|
@@ -105,7 +105,7 @@
|
||||
|
#endif |
||||
|
|
||||
|
#ifndef DEFAULT_TMPDIR |
||||
|
-# define DEFAULT_TMPDIR "/tmp"
|
||||
|
+# define DEFAULT_TMPDIR "@TERMUX_PREFIX@/tmp"
|
||||
|
#endif |
||||
|
|
||||
|
/* 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
|
||||
|
--- coreutils-8.30/src/split.c 2018-05-14 07:20:24.000000000 +0300
|
||||
|
+++ coreutils-8.30.mod/src/split.c 2019-03-01 20:15:52.004434545 +0200
|
||||
|
@@ -481,7 +481,7 @@
|
||||
|
pid_t child_pid; |
||||
|
char const *shell_prog = getenv ("SHELL"); |
||||
|
if (shell_prog == NULL) |
||||
|
- shell_prog = "/bin/sh";
|
||||
|
+ shell_prog = "@TERMUX_PREFIX@/bin/sh";
|
||||
|
if (setenv ("FILE", name, 1) != 0) |
||||
|
die (EXIT_FAILURE, errno, |
||||
|
_("failed to set FILE environment variable")); |
||||
|
diff -uNr coreutils-8.30/src/tac.c coreutils-8.30.mod/src/tac.c
|
||||
|
--- coreutils-8.30/src/tac.c 2018-05-14 07:20:24.000000000 +0300
|
||||
|
+++ coreutils-8.30.mod/src/tac.c 2019-03-01 20:13:29.470380749 +0200
|
||||
|
@@ -67,7 +67,7 @@
|
||||
|
|
||||
|
|
||||
|
#ifndef DEFAULT_TMPDIR |
||||
|
-# define DEFAULT_TMPDIR "/tmp"
|
||||
|
+# define DEFAULT_TMPDIR "@TERMUX_PREFIX@/tmp"
|
||||
|
#endif |
||||
|
|
||||
|
/* The number of bytes per atomic read. */ |
@ -1,21 +0,0 @@ |
|||||
diff -u -r ../coreutils-8.22/src/mktemp.c ./src/mktemp.c
|
|
||||
--- ../coreutils-8.22/src/mktemp.c 2013-12-04 15:48:30.000000000 +0100
|
|
||||
+++ ./src/mktemp.c 2014-06-03 11:31:58.351787119 +0200
|
|
||||
@@ -269,7 +269,7 @@
|
|
||||
else if (dest_dir_arg && *dest_dir_arg) |
|
||||
dest_dir = dest_dir_arg; |
|
||||
else |
|
||||
- dest_dir = "/tmp";
|
|
||||
+ dest_dir = "@TERMUX_PREFIX@/tmp";
|
|
||||
|
|
||||
if (last_component (template) != template) |
|
||||
error (EXIT_FAILURE, 0, |
|
||||
@@ -283,7 +283,7 @@
|
|
||||
else |
|
||||
{ |
|
||||
char *env = getenv ("TMPDIR"); |
|
||||
- dest_dir = (env && *env ? env : "/tmp");
|
|
||||
+ dest_dir = (env && *env ? env : "@TERMUX_PREFIX@/tmp");
|
|
||||
} |
|
||||
if (IS_ABSOLUTE_FILE_NAME (template)) |
|
||||
error (EXIT_FAILURE, 0, |
|
@ -0,0 +1,12 @@ |
|||||
|
diff -uNr bind-9.13.6/lib/irs/context.c bind-9.13.6.mod/lib/irs/context.c
|
||||
|
--- bind-9.13.6/lib/irs/context.c 2019-02-07 01:44:09.000000000 +0200
|
||||
|
+++ bind-9.13.6.mod/lib/irs/context.c 2019-03-02 02:39:12.188552664 +0200
|
||||
|
@@ -42,7 +42,7 @@
|
||||
|
|
||||
|
#ifndef DNS_CONF |
||||
|
/*% location of dns.conf */ |
||||
|
-#define DNS_CONF "/etc/dns.conf"
|
||||
|
+#define DNS_CONF "@TERMUX_PREFIX@/etc/dns.conf"
|
||||
|
#endif |
||||
|
|
||||
|
static bool thread_key_initialized = false; |
@ -0,0 +1,21 @@ |
|||||
|
diff -uNr ffmpeg-4.1.1/libavutil/file_open.c ffmpeg-4.1.1.mod/libavutil/file_open.c
|
||||
|
--- ffmpeg-4.1.1/libavutil/file_open.c 2019-02-09 22:56:02.000000000 +0200
|
||||
|
+++ ffmpeg-4.1.1.mod/libavutil/file_open.c 2019-03-02 01:54:58.775236751 +0200
|
||||
|
@@ -119,7 +119,7 @@
|
||||
|
#undef free |
||||
|
free(ptr); |
||||
|
#else |
||||
|
- size_t len = strlen(prefix) + 12; /* room for "/tmp/" and "XXXXXX\0" */
|
||||
|
+ size_t len = strlen(prefix) + strlen("@TERMUX_PREFIX@/tmp/") + 7; /* room for "@TERMUX_PREFIX@/tmp/" and "XXXXXX\0" */
|
||||
|
*filename = av_malloc(len); |
||||
|
#endif |
||||
|
/* -----common section-----*/ |
||||
|
@@ -136,7 +136,7 @@
|
||||
|
# endif |
||||
|
fd = open(*filename, O_RDWR | O_BINARY | O_CREAT | O_EXCL, 0600); |
||||
|
#else |
||||
|
- snprintf(*filename, len, "/tmp/%sXXXXXX", prefix);
|
||||
|
+ snprintf(*filename, len, "@TERMUX_PREFIX@/tmp/%sXXXXXX", prefix);
|
||||
|
fd = mkstemp(*filename); |
||||
|
#if defined(_WIN32) || defined (__ANDROID__) |
||||
|
if (fd < 0) { |
@ -0,0 +1,24 @@ |
|||||
|
diff -uNr file-5.35/src/compress.c file-5.35.mod/src/compress.c
|
||||
|
--- file-5.35/src/compress.c 2018-10-15 19:29:16.000000000 +0300
|
||||
|
+++ file-5.35.mod/src/compress.c 2019-03-02 01:49:14.754069208 +0200
|
||||
|
@@ -410,7 +410,7 @@
|
||||
|
ssize_t r; |
||||
|
int tfd; |
||||
|
|
||||
|
- (void)strlcpy(buf, "/tmp/file.XXXXXX", sizeof buf);
|
||||
|
+ (void)strlcpy(buf, "@TERMUX_PREFIX@/tmp/file.XXXXXX", sizeof buf);
|
||||
|
#ifndef HAVE_MKSTEMP |
||||
|
{ |
||||
|
char *ptr = mktemp(buf); |
||||
|
diff -uNr file-5.35/src/file.h file-5.35.mod/src/file.h
|
||||
|
--- file-5.35/src/file.h 2018-10-15 19:29:16.000000000 +0300
|
||||
|
+++ file-5.35.mod/src/file.h 2019-03-02 01:49:41.984157713 +0200
|
||||
|
@@ -79,7 +79,7 @@
|
||||
|
#define ENABLE_CONDITIONALS |
||||
|
|
||||
|
#ifndef MAGIC |
||||
|
-#define MAGIC "/etc/magic"
|
||||
|
+#define MAGIC "@TERMUX_PREFIX@/etc/magic"
|
||||
|
#endif |
||||
|
|
||||
|
#if defined(__EMX__) || defined (WIN32) |
@ -1,42 +0,0 @@ |
|||||
diff -u -r ../gnupg-2.1.22/dirmngr/dns.c ./dirmngr/dns.c
|
|
||||
--- ../gnupg-2.1.22/dirmngr/dns.c 2017-07-25 09:37:05.000000000 +0200
|
|
||||
+++ ./dirmngr/dns.c 2017-07-29 20:54:37.445647974 +0200
|
|
||||
@@ -5424,7 +5424,7 @@
|
|
||||
if (!(resconf = dns_resconf_open(&error))) |
|
||||
goto error; |
|
||||
|
|
||||
- if ((error = dns_resconf_loadpath(resconf, "/etc/resolv.conf"))) {
|
|
||||
+ if ((error = dns_resconf_loadpath(resconf, "@TERMUX_PREFIX@/etc/resolv.conf"))) {
|
|
||||
/* |
|
||||
* NOTE: Both the glibc and BIND9 resolvers ignore a missing |
|
||||
* /etc/resolv.conf, defaulting to a nameserver of |
|
||||
@@ -5436,7 +5436,7 @@
|
|
||||
goto error; |
|
||||
} |
|
||||
|
|
||||
- if ((error = dns_nssconf_loadpath(resconf, "/etc/nsswitch.conf"))) {
|
|
||||
+ if ((error = dns_nssconf_loadpath(resconf, "@TERMUX_PREFIX@/etc/nsswitch.conf"))) {
|
|
||||
if (error != ENOENT) |
|
||||
goto error; |
|
||||
} |
|
||||
@@ -10407,7 +10407,7 @@
|
|
||||
panic("dns_resconf_open: %s", dns_strerror(error)); |
|
||||
|
|
||||
if (!MAIN.resconf.count) |
|
||||
- MAIN.resconf.path[MAIN.resconf.count++] = "/etc/resolv.conf";
|
|
||||
+ MAIN.resconf.path[MAIN.resconf.count++] = "@TERMUX_PREFIX@/etc/resolv.conf";
|
|
||||
|
|
||||
for (i = 0; i < MAIN.resconf.count; i++) { |
|
||||
path = MAIN.resconf.path[i]; |
|
||||
diff -u -r ../gnupg-2.1.22/dirmngr/dns-stuff.c ./dirmngr/dns-stuff.c
|
|
||||
--- ../gnupg-2.1.22/dirmngr/dns-stuff.c 2017-05-25 20:24:30.000000000 +0200
|
|
||||
+++ ./dirmngr/dns-stuff.c 2017-07-29 20:54:00.414067929 +0200
|
|
||||
@@ -114,7 +114,7 @@
|
|
||||
#define DEFAULT_TIMEOUT 30 |
|
||||
|
|
||||
|
|
||||
-#define RESOLV_CONF_NAME "/etc/resolv.conf"
|
|
||||
+#define RESOLV_CONF_NAME "@TERMUX_PREFIX@/etc/resolv.conf"
|
|
||||
|
|
||||
/* Two flags to enable verbose and debug mode. */ |
|
||||
static int opt_verbose; |
|
@ -0,0 +1,240 @@ |
|||||
|
diff -uNr gnupg-2.2.13/dirmngr/certcache.c gnupg-2.2.13.mod/dirmngr/certcache.c
|
||||
|
--- gnupg-2.2.13/dirmngr/certcache.c 2018-04-25 13:38:04.000000000 +0300
|
||||
|
+++ gnupg-2.2.13.mod/dirmngr/certcache.c 2019-03-02 01:32:08.653821497 +0200
|
||||
|
@@ -674,11 +674,8 @@
|
||||
|
#ifdef DEFAULT_TRUST_STORE_FILE |
||||
|
{ DEFAULT_TRUST_STORE_FILE } |
||||
|
#else |
||||
|
- { "/etc/ssl/ca-bundle.pem" },
|
||||
|
- { "/etc/ssl/certs/ca-certificates.crt" },
|
||||
|
- { "/etc/pki/tls/cert.pem" },
|
||||
|
- { "/usr/local/share/certs/ca-root-nss.crt" },
|
||||
|
- { "/etc/ssl/cert.pem" }
|
||||
|
+ { "@TERMUX_PREFIX@/etc/tls/cert.pem" },
|
||||
|
+ { "@TERMUX_PREFIX@/etc/ssl/cert.pem" }
|
||||
|
#endif /*!DEFAULT_TRUST_STORE_FILE*/ |
||||
|
}; |
||||
|
int idx; |
||||
|
diff -uNr gnupg-2.2.13/dirmngr/dns.c gnupg-2.2.13.mod/dirmngr/dns.c
|
||||
|
--- gnupg-2.2.13/dirmngr/dns.c 2018-12-18 09:26:53.000000000 +0200
|
||||
|
+++ gnupg-2.2.13.mod/dirmngr/dns.c 2019-03-02 01:33:24.937449148 +0200
|
||||
|
@@ -5112,7 +5112,7 @@
|
||||
|
if (!(hosts = dns_hosts_open(&error))) |
||||
|
goto error; |
||||
|
|
||||
|
- if ((error = dns_hosts_loadpath(hosts, "/etc/hosts")))
|
||||
|
+ if ((error = dns_hosts_loadpath(hosts, "@TERMUX_PREFIX@/etc/hosts")))
|
||||
|
goto error; |
||||
|
|
||||
|
return hosts; |
||||
|
@@ -5428,7 +5428,7 @@
|
||||
|
if (!(resconf = dns_resconf_open(&error))) |
||||
|
goto error; |
||||
|
|
||||
|
- if ((error = dns_resconf_loadpath(resconf, "/etc/resolv.conf"))) {
|
||||
|
+ if ((error = dns_resconf_loadpath(resconf, "@TERMUX_PREFIX@/etc/resolv.conf"))) {
|
||||
|
/* |
||||
|
* NOTE: Both the glibc and BIND9 resolvers ignore a missing |
||||
|
* /etc/resolv.conf, defaulting to a nameserver of |
||||
|
@@ -5440,7 +5440,7 @@
|
||||
|
goto error; |
||||
|
} |
||||
|
|
||||
|
- if ((error = dns_nssconf_loadpath(resconf, "/etc/nsswitch.conf"))) {
|
||||
|
+ if ((error = dns_nssconf_loadpath(resconf, "@TERMUX_PREFIX@/etc/nsswitch.conf"))) {
|
||||
|
if (error != ENOENT) |
||||
|
goto error; |
||||
|
} |
||||
|
@@ -10436,7 +10436,7 @@
|
||||
|
panic("dns_resconf_open: %s", dns_strerror(error)); |
||||
|
|
||||
|
if (!MAIN.resconf.count) |
||||
|
- MAIN.resconf.path[MAIN.resconf.count++] = "/etc/resolv.conf";
|
||||
|
+ MAIN.resconf.path[MAIN.resconf.count++] = "@TERMUX_PREFIX@/etc/resolv.conf";
|
||||
|
|
||||
|
for (i = 0; i < MAIN.resconf.count; i++) { |
||||
|
path = MAIN.resconf.path[i]; |
||||
|
@@ -10485,11 +10485,11 @@
|
||||
|
return *hosts; |
||||
|
|
||||
|
if (!MAIN.hosts.count) { |
||||
|
- MAIN.hosts.path[MAIN.hosts.count++] = "/etc/hosts";
|
||||
|
+ MAIN.hosts.path[MAIN.hosts.count++] = "@TERMUX_PREFIX@/etc/hosts";
|
||||
|
|
||||
|
/* Explicitly test dns_hosts_local() */ |
||||
|
if (!(*hosts = dns_hosts_local(&error))) |
||||
|
- panic("%s: %s", "/etc/hosts", dns_strerror(error));
|
||||
|
+ panic("%s: %s", "@TERMUX_PREFIX@/etc/hosts", dns_strerror(error));
|
||||
|
|
||||
|
return *hosts; |
||||
|
} |
||||
|
diff -uNr gnupg-2.2.13/dirmngr/dns-stuff.c gnupg-2.2.13.mod/dirmngr/dns-stuff.c
|
||||
|
--- gnupg-2.2.13/dirmngr/dns-stuff.c 2018-07-03 12:54:26.000000000 +0300
|
||||
|
+++ gnupg-2.2.13.mod/dirmngr/dns-stuff.c 2019-03-02 01:32:38.027267980 +0200
|
||||
|
@@ -114,7 +114,7 @@
|
||||
|
#define DEFAULT_TIMEOUT 30 |
||||
|
|
||||
|
|
||||
|
-#define RESOLV_CONF_NAME "/etc/resolv.conf"
|
||||
|
+#define RESOLV_CONF_NAME "@TERMUX_PREFIX@/etc/resolv.conf"
|
||||
|
|
||||
|
/* Two flags to enable verbose and debug mode. */ |
||||
|
static int opt_verbose; |
||||
|
@@ -602,7 +602,7 @@
|
||||
|
derr = dns_hosts_loadpath (ld.hosts, hosts_path); |
||||
|
xfree (hosts_path); |
||||
|
#else |
||||
|
- derr = dns_hosts_loadpath (ld.hosts, "/etc/hosts");
|
||||
|
+ derr = dns_hosts_loadpath (ld.hosts, "@TERMUX_PREFIX@/etc/hosts");
|
||||
|
#endif |
||||
|
if (derr) |
||||
|
{ |
||||
|
diff -uNr gnupg-2.2.13/dirmngr/ks-engine-ldap.c gnupg-2.2.13.mod/dirmngr/ks-engine-ldap.c
|
||||
|
--- gnupg-2.2.13/dirmngr/ks-engine-ldap.c 2018-10-25 18:37:53.000000000 +0300
|
||||
|
+++ gnupg-2.2.13.mod/dirmngr/ks-engine-ldap.c 2019-03-02 01:32:08.667154882 +0200
|
||||
|
@@ -1947,9 +1947,9 @@
|
||||
|
|
||||
|
if (dump_modlist) |
||||
|
{ |
||||
|
- dump = es_fopen("/tmp/modlist.txt", "w");
|
||||
|
+ dump = es_fopen("@TERMUX_PREFIX@/tmp/modlist.txt", "w");
|
||||
|
if (! dump) |
||||
|
- log_error ("Failed to open /tmp/modlist.txt: %s\n",
|
||||
|
+ log_error ("Failed to open @TERMUX_PREFIX@/tmp/modlist.txt: %s\n",
|
||||
|
strerror (errno)); |
||||
|
|
||||
|
if (dump) |
||||
|
diff -uNr gnupg-2.2.13/g10/exec.c gnupg-2.2.13.mod/g10/exec.c
|
||||
|
--- gnupg-2.2.13/g10/exec.c 2017-08-28 13:22:54.000000000 +0300
|
||||
|
+++ gnupg-2.2.13.mod/g10/exec.c 2019-03-02 01:32:08.667154882 +0200
|
||||
|
@@ -180,7 +180,7 @@
|
||||
|
tmp="<Wimp$ScrapDir>.GnuPG"; |
||||
|
mkdir(tmp,0700); /* Error checks occur later on */ |
||||
|
#else |
||||
|
- tmp="/tmp";
|
||||
|
+ tmp="@TERMUX_PREFIX@/tmp";
|
||||
|
#endif |
||||
|
} |
||||
|
} |
||||
|
@@ -383,7 +383,7 @@
|
||||
|
char *shell=getenv("SHELL"); |
||||
|
|
||||
|
if(shell==NULL) |
||||
|
- shell="/bin/sh";
|
||||
|
+ shell="@TERMUX_PREFIX@/bin/sh";
|
||||
|
|
||||
|
/* I'm the child */ |
||||
|
|
||||
|
diff -uNr gnupg-2.2.13/g13/be-encfs.c gnupg-2.2.13.mod/g13/be-encfs.c
|
||||
|
--- gnupg-2.2.13/g13/be-encfs.c 2017-08-28 13:22:54.000000000 +0300
|
||||
|
+++ gnupg-2.2.13.mod/g13/be-encfs.c 2019-03-02 01:32:08.670488228 +0200
|
||||
|
@@ -410,7 +410,7 @@
|
||||
|
if (err) |
||||
|
goto leave; |
||||
|
|
||||
|
- mountpoint = xtrystrdup ("/tmp/.#g13_XXXXXX");
|
||||
|
+ mountpoint = xtrystrdup ("@TERMUX_PREFIX@/tmp/.#g13_XXXXXX");
|
||||
|
if (!mountpoint) |
||||
|
{ |
||||
|
err = gpg_error_from_syserror (); |
||||
|
@@ -420,7 +420,7 @@
|
||||
|
{ |
||||
|
err = gpg_error_from_syserror (); |
||||
|
log_error (_("can't create directory '%s': %s\n"), |
||||
|
- "/tmp/.#g13_XXXXXX", gpg_strerror (err));
|
||||
|
+ "@TERMUX_PREFIX@/tmp/.#g13_XXXXXX", gpg_strerror (err));
|
||||
|
goto leave; |
||||
|
} |
||||
|
|
||||
|
diff -uNr gnupg-2.2.13/g13/mount.c gnupg-2.2.13.mod/g13/mount.c
|
||||
|
--- gnupg-2.2.13/g13/mount.c 2017-08-28 13:22:54.000000000 +0300
|
||||
|
+++ gnupg-2.2.13.mod/g13/mount.c 2019-03-02 01:32:08.670488228 +0200
|
||||
|
@@ -82,14 +82,14 @@
|
||||
|
|
||||
|
if (!mountpoint) |
||||
|
{ |
||||
|
- mountpoint_buffer = xtrystrdup ("/tmp/g13-XXXXXX");
|
||||
|
+ mountpoint_buffer = xtrystrdup ("@TERMUX_PREFIX@/tmp/g13-XXXXXX");
|
||||
|
if (!mountpoint_buffer) |
||||
|
return gpg_error_from_syserror (); |
||||
|
if (!gnupg_mkdtemp (mountpoint_buffer)) |
||||
|
{ |
||||
|
err = gpg_error_from_syserror (); |
||||
|
log_error (_("can't create directory '%s': %s\n"), |
||||
|
- "/tmp/g13-XXXXXX", gpg_strerror (err));
|
||||
|
+ "@TERMUX_PREFIX@/tmp/g13-XXXXXX", gpg_strerror (err));
|
||||
|
xfree (mountpoint_buffer); |
||||
|
return err; |
||||
|
} |
||||
|
diff -uNr gnupg-2.2.13/scd/scdaemon.c gnupg-2.2.13.mod/scd/scdaemon.c
|
||||
|
--- gnupg-2.2.13/scd/scdaemon.c 2018-03-21 20:43:33.000000000 +0200
|
||||
|
+++ gnupg-2.2.13.mod/scd/scdaemon.c 2019-03-02 01:32:08.670488228 +0200
|
||||
|
@@ -766,10 +766,10 @@
|
||||
|
write. */ |
||||
|
if (allow_coredump) |
||||
|
{ |
||||
|
- if (chdir("/tmp"))
|
||||
|
- log_debug ("chdir to '/tmp' failed: %s\n", strerror (errno));
|
||||
|
+ if (chdir("@TERMUX_PREFIX@/tmp"))
|
||||
|
+ log_debug ("chdir to '@TERMUX_PREFIX@/tmp' failed: %s\n", strerror (errno));
|
||||
|
else |
||||
|
- log_debug ("changed working directory to '/tmp'\n");
|
||||
|
+ log_debug ("changed working directory to '@TERMUX_PREFIX@/tmp'\n");
|
||||
|
} |
||||
|
|
||||
|
/* In multi server mode we need to listen on an additional |
||||
|
diff -uNr gnupg-2.2.13/tests/gpgscm/ffi.c gnupg-2.2.13.mod/tests/gpgscm/ffi.c
|
||||
|
--- gnupg-2.2.13/tests/gpgscm/ffi.c 2017-08-28 13:22:54.000000000 +0300
|
||||
|
+++ gnupg-2.2.13.mod/tests/gpgscm/ffi.c 2019-03-02 01:32:08.673821575 +0200
|
||||
|
@@ -355,7 +355,7 @@
|
||||
|
FFI_RETURN_STRING (sc, "/temp"); |
||||
|
FFI_RETURN_STRING (sc, buffer); |
||||
|
#else |
||||
|
- FFI_RETURN_STRING (sc, "/tmp");
|
||||
|
+ FFI_RETURN_STRING (sc, "@TERMUX_PREFIX@/tmp");
|
||||
|
#endif |
||||
|
} |
||||
|
|
||||
|
diff -uNr gnupg-2.2.13/tools/addgnupghome gnupg-2.2.13.mod/tools/addgnupghome
|
||||
|
--- gnupg-2.2.13/tools/addgnupghome 2018-12-11 09:44:33.000000000 +0200
|
||||
|
+++ gnupg-2.2.13.mod/tools/addgnupghome 2019-03-02 01:32:08.673821575 +0200
|
||||
|
@@ -70,10 +70,10 @@
|
||||
|
return |
||||
|
fi |
||||
|
for f in $filelist; do |
||||
|
- if [ -d /etc/skel/.gnupg/$f ]; then
|
||||
|
+ if [ -d @TERMUX_PREFIX@/etc/skel/.gnupg/$f ]; then
|
||||
|
mkdir $f |
||||
|
else |
||||
|
- cp /etc/skel/.gnupg/$f $f
|
||||
|
+ cp @TERMUX_PREFIX@/etc/skel/.gnupg/$f $f
|
||||
|
fi |
||||
|
if ! chown $user $f ; then |
||||
|
error "error changing ownership of \`$f'" |
||||
|
@@ -102,11 +102,11 @@
|
||||
|
info "please note that only users from /etc/passwd are checked" |
||||
|
fi |
||||
|
|
||||
|
-if [ ! -d /etc/skel/.gnupg ]; then
|
||||
|
- error "skeleton directory \`/etc/skel/.gnupg' does not exist"
|
||||
|
+if [ ! -d @TERMUX_PREFIX@/etc/skel/.gnupg ]; then
|
||||
|
+ error "skeleton directory \`@TERMUX_PREFIX@/etc/skel/.gnupg' does not exist"
|
||||
|
exit 1 |
||||
|
fi |
||||
|
-cd "/etc/skel/.gnupg" || (error "error cd-ing to \`/etc/skel/.gnupg'"; exit 1)
|
||||
|
+cd "@TERMUX_PREFIX@/etc/skel/.gnupg" || (error "error cd-ing to \`@TERMUX_PREFIX@/etc/skel/.gnupg'"; exit 1)
|
||||
|
filelist=$(find . \( -type f -o -type d \) '!' -name '*~' '!' -name . -print) |
||||
|
|
||||
|
|
||||
|
diff -uNr gnupg-2.2.13/tools/symcryptrun.c gnupg-2.2.13.mod/tools/symcryptrun.c
|
||||
|
--- gnupg-2.2.13/tools/symcryptrun.c 2017-08-28 13:22:54.000000000 +0300
|
||||
|
+++ gnupg-2.2.13.mod/tools/symcryptrun.c 2019-03-02 01:32:08.673821575 +0200
|
||||
|
@@ -319,7 +319,7 @@
|
||||
|
|
||||
|
p = getenv ("TMPDIR"); |
||||
|
if (!p || !*p) |
||||
|
- p = "/tmp";
|
||||
|
+ p = "@TERMUX_PREFIX@/tmp";
|
||||
|
if (p[strlen (p) - 1] == '/') |
||||
|
name = xstrconcat (p, "gpg-XXXXXX", NULL); |
||||
|
else |
@ -1,12 +0,0 @@ |
|||||
diff -uNr gnupg-2.2.8/g10/exec.c gnupg-2.2.8.mod/g10/exec.c
|
|
||||
--- gnupg-2.2.8/g10/exec.c 2017-08-28 13:22:54.000000000 +0300
|
|
||||
+++ gnupg-2.2.8.mod/g10/exec.c 2018-06-19 19:08:38.918070875 +0300
|
|
||||
@@ -383,7 +383,7 @@
|
|
||||
char *shell=getenv("SHELL"); |
|
||||
|
|
||||
if(shell==NULL) |
|
||||
- shell="/bin/sh";
|
|
||||
+ shell="@TERMUX_PREFIX@/bin/sh";
|
|
||||
|
|
||||
/* I'm the child */ |
|
||||
|
|
@ -0,0 +1,12 @@ |
|||||
|
diff -uNr gzip-1.10/zdiff.in gzip-1.10.mod/zdiff.in
|
||||
|
--- gzip-1.10/zdiff.in 2018-03-31 06:55:32.000000000 +0300
|
||||
|
+++ gzip-1.10.mod/zdiff.in 2019-03-01 18:41:43.685032331 +0200
|
||||
|
@@ -119,7 +119,7 @@
|
||||
|
case $TMPDIR in |
||||
|
/ | /*/) ;; |
||||
|
/*) TMPDIR=$TMPDIR/;; |
||||
|
- *) TMPDIR=/tmp/;;
|
||||
|
+ *) TMPDIR=@TERMUX_PREFIX@/tmp/;;
|
||||
|
esac |
||||
|
if type mktemp >/dev/null 2>&1; then |
||||
|
tmp=`mktemp "${TMPDIR}zdiffXXXXXXXXX"` || |
@ -0,0 +1,12 @@ |
|||||
|
diff -uNr gzip-1.10/zgrep.in gzip-1.10.mod/zgrep.in
|
||||
|
--- gzip-1.10/zgrep.in 2018-03-31 06:55:32.000000000 +0300
|
||||
|
+++ gzip-1.10.mod/zgrep.in 2019-03-01 18:41:31.001645453 +0200
|
||||
|
@@ -136,7 +136,7 @@
|
||||
|
case $TMPDIR in |
||||
|
/ | /*/) ;; |
||||
|
/*) TMPDIR=$TMPDIR/;; |
||||
|
- *) TMPDIR=/tmp/;;
|
||||
|
+ *) TMPDIR=@TERMUX_PREFIX@/tmp/;;
|
||||
|
esac |
||||
|
if type mktemp >/dev/null 2>&1; then |
||||
|
pattmp=$(mktemp "${TMPDIR}zgrepXXXXXXXXX") || exit 2 |
@ -0,0 +1,42 @@ |
|||||
|
diff -uNr irssi-1.2.0/src/fe-common/core/fe-exec.c irssi-1.2.0.mod/src/fe-common/core/fe-exec.c
|
||||
|
--- irssi-1.2.0/src/fe-common/core/fe-exec.c 2019-02-11 19:27:58.000000000 +0200
|
||||
|
+++ irssi-1.2.0.mod/src/fe-common/core/fe-exec.c 2019-03-01 20:46:39.912473788 +0200
|
||||
|
@@ -281,7 +281,7 @@
|
||||
|
|
||||
|
static void process_exec(PROCESS_REC *rec, const char *cmd) |
||||
|
{ |
||||
|
- const char *shell_args[4] = { "/bin/sh", "-c", NULL, NULL };
|
||||
|
+ const char *shell_args[4] = { "@TERMUX_PREFIX@/bin/sh", "-c", NULL, NULL };
|
||||
|
char **args; |
||||
|
int in[2], out[2]; |
||||
|
int n; |
||||
|
@@ -339,7 +339,7 @@
|
||||
|
if (rec->shell) { |
||||
|
execvp(shell_args[0], (char **) shell_args); |
||||
|
|
||||
|
- fprintf(stderr, "Exec: /bin/sh: %s\n", g_strerror(errno));
|
||||
|
+ fprintf(stderr, "Exec: @TERMUX_PREFIX@/bin/sh: %s\n", g_strerror(errno));
|
||||
|
} else { |
||||
|
args = g_strsplit(cmd, " ", -1); |
||||
|
execvp(args[0], args); |
||||
|
diff -uNr irssi-1.2.0/src/fe-fuzz/fe-common/core/theme-load.c irssi-1.2.0.mod/src/fe-fuzz/fe-common/core/theme-load.c
|
||||
|
--- irssi-1.2.0/src/fe-fuzz/fe-common/core/theme-load.c 2019-02-11 19:27:58.000000000 +0200
|
||||
|
+++ irssi-1.2.0.mod/src/fe-fuzz/fe-common/core/theme-load.c 2019-03-01 20:47:09.179339329 +0200
|
||||
|
@@ -38,7 +38,7 @@
|
||||
|
int LLVMFuzzerInitialize(int *argc, char ***argv) { |
||||
|
core_register_options(); |
||||
|
fe_common_core_register_options(); |
||||
|
- char *irssi_argv[] = {*argv[0], "--home", "/tmp/irssi", NULL};
|
||||
|
+ char *irssi_argv[] = {*argv[0], "--home", "@TERMUX_PREFIX@/tmp/irssi", NULL};
|
||||
|
int irssi_argc = sizeof(irssi_argv) / sizeof(char *) - 1; |
||||
|
args_execute(irssi_argc, irssi_argv); |
||||
|
core_preinit((*argv)[0]); |
||||
|
@@ -52,7 +52,7 @@
|
||||
|
int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) { |
||||
|
gchar *copy = g_strndup((const gchar *)data, size); |
||||
|
|
||||
|
- FILE *fp = fopen("/tmp/irssi/fuzz.theme", "wb");
|
||||
|
+ FILE *fp = fopen("@TERMUX_PREFIX@/tmp/irssi/fuzz.theme", "wb");
|
||||
|
if (fp) { |
||||
|
fwrite(copy, strlen(copy), 1, fp); |
||||
|
fclose(fp); |
@ -0,0 +1,12 @@ |
|||||
|
diff -uNr libarchive-3.3.3/libarchive/archive_util.c libarchive-3.3.3.mod/libarchive/archive_util.c
|
||||
|
--- libarchive-3.3.3/libarchive/archive_util.c 2018-09-02 09:05:18.000000000 +0300
|
||||
|
+++ libarchive-3.3.3.mod/libarchive/archive_util.c 2019-03-02 02:14:39.252942170 +0200
|
||||
|
@@ -374,7 +374,7 @@
|
||||
|
#ifdef _PATH_TMP |
||||
|
tmp = _PATH_TMP; |
||||
|
#else |
||||
|
- tmp = "/tmp";
|
||||
|
+ tmp = "@TERMUX_PREFIX@/tmp";
|
||||
|
#endif |
||||
|
archive_strcpy(temppath, tmp); |
||||
|
if (temppath->s[temppath->length-1] != '/') |
@ -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="$?";; |
@ -0,0 +1,48 @@ |
|||||
|
diff -uNr db-6.2.32/lang/sql/generated/sqlite3.c db-6.2.32.mod/lang/sql/generated/sqlite3.c
|
||||
|
--- db-6.2.32/lang/sql/generated/sqlite3.c 2017-04-13 17:06:15.000000000 +0300
|
||||
|
+++ db-6.2.32.mod/lang/sql/generated/sqlite3.c 2019-03-02 02:06:14.891040820 +0200
|
||||
|
@@ -30788,9 +30788,9 @@
|
||||
|
0, |
||||
|
0, |
||||
|
0, |
||||
|
- "/var/tmp",
|
||||
|
- "/usr/tmp",
|
||||
|
- "/tmp",
|
||||
|
+ "@TERMUX_PREFIX@/var/tmp",
|
||||
|
+ "@TERMUX_PREFIX@/usr/tmp",
|
||||
|
+ "@TERMUX_PREFIX@/tmp",
|
||||
|
0 /* List terminator */ |
||||
|
}; |
||||
|
unsigned int i; |
||||
|
diff -uNr db-6.2.32/lang/sql/sqlite/src/os_unix.c db-6.2.32.mod/lang/sql/sqlite/src/os_unix.c
|
||||
|
--- db-6.2.32/lang/sql/sqlite/src/os_unix.c 2017-04-13 17:06:17.000000000 +0300
|
||||
|
+++ db-6.2.32.mod/lang/sql/sqlite/src/os_unix.c 2019-03-02 02:06:27.711088791 +0200
|
||||
|
@@ -5450,9 +5450,9 @@
|
||||
|
0, |
||||
|
0, |
||||
|
0, |
||||
|
- "/var/tmp",
|
||||
|
- "/usr/tmp",
|
||||
|
- "/tmp",
|
||||
|
+ "@TERMUX_PREFIX@/var/tmp",
|
||||
|
+ "@TERMUX_PREFIX@/usr/tmp",
|
||||
|
+ "@TERMUX_PREFIX@/tmp",
|
||||
|
0 /* List terminator */ |
||||
|
}; |
||||
|
unsigned int i; |
||||
|
diff -uNr db-6.2.32/src/os/os_tmpdir.c db-6.2.32.mod/src/os/os_tmpdir.c
|
||||
|
--- db-6.2.32/src/os/os_tmpdir.c 2017-04-13 17:06:21.000000000 +0300
|
||||
|
+++ db-6.2.32.mod/src/os/os_tmpdir.c 2019-03-02 02:06:03.557665103 +0200
|
||||
|
@@ -125,9 +125,9 @@
|
||||
|
DB_TEMP_DIRECTORY("C:/temp"); |
||||
|
DB_TEMP_DIRECTORY("C:/tmp"); |
||||
|
#else |
||||
|
- DB_TEMP_DIRECTORY("/var/tmp");
|
||||
|
- DB_TEMP_DIRECTORY("/usr/tmp");
|
||||
|
- DB_TEMP_DIRECTORY("/tmp");
|
||||
|
+ DB_TEMP_DIRECTORY("@TERMUX_PREFIX@/var/tmp");
|
||||
|
+ DB_TEMP_DIRECTORY("@TERMUX_PREFIX@/usr/tmp");
|
||||
|
+ DB_TEMP_DIRECTORY("@TERMUX_PREFIX@/tmp");
|
||||
|
#if defined(ANDROID) || defined(DB_ANDROID) |
||||
|
DB_TEMP_DIRECTORY("/cache"); |
||||
|
#endif |
@ -0,0 +1,145 @@ |
|||||
|
diff -uNr pulseaudio-12.2/src/Makefile.am pulseaudio-12.2.mod/src/Makefile.am
|
||||
|
--- pulseaudio-12.2/src/Makefile.am 2018-07-16 17:40:33.000000000 +0300
|
||||
|
+++ pulseaudio-12.2.mod/src/Makefile.am 2019-03-02 02:22:51.618146972 +0200
|
||||
|
@@ -1903,7 +1903,7 @@
|
||||
|
module_augment_properties_la_LDFLAGS = $(MODULE_LDFLAGS) |
||||
|
module_augment_properties_la_LIBADD = $(MODULE_LIBADD) |
||||
|
#module_augment_properties_la_CFLAGS = $(AM_CFLAGS) -DDESKTOPFILEDIR=\"$(datadir)/applications\" |
||||
|
-module_augment_properties_la_CFLAGS = $(AM_CFLAGS) -DDESKTOPFILEDIR=\"/usr/share/applications\" -DPA_MODULE_NAME=module_augment_properties
|
||||
|
+module_augment_properties_la_CFLAGS = $(AM_CFLAGS) -DDESKTOPFILEDIR=\"@TERMUX_PREFIX@/share/applications\" -DPA_MODULE_NAME=module_augment_properties
|
||||
|
|
||||
|
# Cork certain streams while others are active (e.g. cork music when phone streams appear) |
||||
|
module_role_cork_la_SOURCES = modules/module-role-cork.c \ |
||||
|
diff -uNr pulseaudio-12.2/src/Makefile.in pulseaudio-12.2.mod/src/Makefile.in
|
||||
|
--- pulseaudio-12.2/src/Makefile.in 2018-07-16 17:57:09.000000000 +0300
|
||||
|
+++ pulseaudio-12.2.mod/src/Makefile.in 2019-03-02 02:22:31.711404512 +0200
|
||||
|
@@ -4708,7 +4708,7 @@
|
||||
|
module_augment_properties_la_LDFLAGS = $(MODULE_LDFLAGS) |
||||
|
module_augment_properties_la_LIBADD = $(MODULE_LIBADD) |
||||
|
#module_augment_properties_la_CFLAGS = $(AM_CFLAGS) -DDESKTOPFILEDIR=\"$(datadir)/applications\" |
||||
|
-module_augment_properties_la_CFLAGS = $(AM_CFLAGS) -DDESKTOPFILEDIR=\"/usr/share/applications\" -DPA_MODULE_NAME=module_augment_properties
|
||||
|
+module_augment_properties_la_CFLAGS = $(AM_CFLAGS) -DDESKTOPFILEDIR=\"@TERMUX_PREFIX@/share/applications\" -DPA_MODULE_NAME=module_augment_properties
|
||||
|
|
||||
|
# Cork certain streams while others are active (e.g. cork music when phone streams appear) |
||||
|
module_role_cork_la_SOURCES = modules/module-role-cork.c \ |
||||
|
diff -uNr pulseaudio-12.2/src/modules/echo-cancel/module-echo-cancel.c pulseaudio-12.2.mod/src/modules/echo-cancel/module-echo-cancel.c
|
||||
|
--- pulseaudio-12.2/src/modules/echo-cancel/module-echo-cancel.c 2018-07-16 17:40:33.000000000 +0300
|
||||
|
+++ pulseaudio-12.2.mod/src/modules/echo-cancel/module-echo-cancel.c 2019-03-02 02:25:58.655526061 +0200
|
||||
|
@@ -2047,18 +2047,18 @@
|
||||
|
} |
||||
|
|
||||
|
if (u->save_aec) { |
||||
|
- pa_log("Creating AEC files in /tmp");
|
||||
|
- u->captured_file = fopen("/tmp/aec_rec.sw", "wb");
|
||||
|
+ pa_log("Creating AEC files in @TERMUX_PREFIX@/tmp");
|
||||
|
+ u->captured_file = fopen("@TERMUX_PREFIX@/tmp/aec_rec.sw", "wb");
|
||||
|
if (u->captured_file == NULL) |
||||
|
perror ("fopen failed"); |
||||
|
- u->played_file = fopen("/tmp/aec_play.sw", "wb");
|
||||
|
+ u->played_file = fopen("@TERMUX_PREFIX@/tmp/aec_play.sw", "wb");
|
||||
|
if (u->played_file == NULL) |
||||
|
perror ("fopen failed"); |
||||
|
- u->canceled_file = fopen("/tmp/aec_out.sw", "wb");
|
||||
|
+ u->canceled_file = fopen("@TERMUX_PREFIX@/tmp/aec_out.sw", "wb");
|
||||
|
if (u->canceled_file == NULL) |
||||
|
perror ("fopen failed"); |
||||
|
if (u->ec->params.drift_compensation) { |
||||
|
- u->drift_file = fopen("/tmp/aec_drift.txt", "w");
|
||||
|
+ u->drift_file = fopen("@TERMUX_PREFIX@/tmp/aec_drift.txt", "w");
|
||||
|
if (u->drift_file == NULL) |
||||
|
perror ("fopen failed"); |
||||
|
} |
||||
|
diff -uNr pulseaudio-12.2/src/modules/module-pipe-source.c pulseaudio-12.2.mod/src/modules/module-pipe-source.c
|
||||
|
--- pulseaudio-12.2/src/modules/module-pipe-source.c 2018-07-14 18:53:48.000000000 +0300
|
||||
|
+++ pulseaudio-12.2.mod/src/modules/module-pipe-source.c 2019-03-02 02:25:16.902033631 +0200
|
||||
|
@@ -59,7 +59,7 @@
|
||||
|
"channels=<number of channels> " |
||||
|
"channel_map=<channel map>"); |
||||
|
|
||||
|
-#define DEFAULT_FILE_NAME "/tmp/music.input"
|
||||
|
+#define DEFAULT_FILE_NAME "@TERMUX_PREFIX@/tmp/music.input"
|
||||
|
#define DEFAULT_SOURCE_NAME "fifo_input" |
||||
|
|
||||
|
struct userdata { |
||||
|
diff -uNr pulseaudio-12.2/src/modules/module-protocol-stub.c pulseaudio-12.2.mod/src/modules/module-protocol-stub.c
|
||||
|
--- pulseaudio-12.2/src/modules/module-protocol-stub.c 2018-07-13 22:06:15.000000000 +0300
|
||||
|
+++ pulseaudio-12.2.mod/src/modules/module-protocol-stub.c 2019-03-02 02:24:55.008616887 +0200
|
||||
|
@@ -301,9 +301,9 @@
|
||||
|
# if defined(USE_PROTOCOL_ESOUND) |
||||
|
|
||||
|
# if defined(USE_PER_USER_ESOUND_SOCKET) |
||||
|
- u->socket_path = pa_sprintf_malloc("/tmp/.esd-%lu/socket", (unsigned long) getuid());
|
||||
|
+ u->socket_path = pa_sprintf_malloc("@TERMUX_PREFIX@/tmp/.esd-%lu/socket", (unsigned long) getuid());
|
||||
|
# else |
||||
|
- u->socket_path = pa_xstrdup("/tmp/.esd/socket");
|
||||
|
+ u->socket_path = pa_xstrdup("@TERMUX_PREFIX@/tmp/.esd/socket");
|
||||
|
# endif |
||||
|
|
||||
|
/* This socket doesn't reside in our own runtime dir but in |
||||
|
diff -uNr pulseaudio-12.2/src/pulsecore/core-util.c pulseaudio-12.2.mod/src/pulsecore/core-util.c
|
||||
|
--- pulseaudio-12.2/src/pulsecore/core-util.c 2018-07-16 17:40:33.000000000 +0300
|
||||
|
+++ pulseaudio-12.2.mod/src/pulsecore/core-util.c 2019-03-02 02:21:18.667793155 +0200
|
||||
|
@@ -1834,7 +1834,7 @@
|
||||
|
* users, too. Since we need POSIX locking and UNIX sockets in |
||||
|
* this directory, we try XDG_RUNTIME_DIR first, and if that isn't |
||||
|
* set create a directory in $HOME and link it to a random subdir |
||||
|
- * in /tmp, if it was not explicitly configured. */
|
||||
|
+ * in @TERMUX_PREFIX@/tmp, if it was not explicitly configured. */
|
||||
|
|
||||
|
m = pa_in_system_mode() ? 0755U : 0700U; |
||||
|
|
||||
|
@@ -1907,7 +1907,7 @@
|
||||
|
|
||||
|
#ifdef HAVE_SYMLINK |
||||
|
/* Hmm, so the runtime directory didn't exist yet, so let's |
||||
|
- * create one in /tmp and symlink that to it */
|
||||
|
+ * create one in @TERMUX_PREFIX@/tmp and symlink that to it */
|
||||
|
|
||||
|
if (make_random_dir_and_link(0700, k) < 0) { |
||||
|
|
||||
|
@@ -3120,8 +3120,8 @@
|
||||
|
if ((f = pa_fopen_cloexec(PA_MACHINE_ID, "r")) || |
||||
|
(f = pa_fopen_cloexec(PA_MACHINE_ID_FALLBACK, "r")) || |
||||
|
#if !defined(OS_IS_WIN32) |
||||
|
- (f = pa_fopen_cloexec("/etc/machine-id", "r")) ||
|
||||
|
- (f = pa_fopen_cloexec("/var/lib/dbus/machine-id", "r"))
|
||||
|
+ (f = pa_fopen_cloexec("@TERMUX_PREFIX@/etc/machine-id", "r")) ||
|
||||
|
+ (f = pa_fopen_cloexec("@TERMUX_PREFIX@/var/lib/dbus/machine-id", "r"))
|
||||
|
#else |
||||
|
false |
||||
|
#endif |
||||
|
@@ -3468,7 +3468,7 @@
|
||||
|
pa_is_path_absolute(t)) |
||||
|
return t; |
||||
|
|
||||
|
- return "/tmp";
|
||||
|
+ return "@TERMUX_PREFIX@/tmp";
|
||||
|
} |
||||
|
|
||||
|
int pa_open_cloexec(const char *fn, int flags, mode_t mode) { |
||||
|
diff -uNr pulseaudio-12.2/src/pulsecore/esound.h pulseaudio-12.2.mod/src/pulsecore/esound.h
|
||||
|
--- pulseaudio-12.2/src/pulsecore/esound.h 2018-07-13 22:06:12.000000000 +0300
|
||||
|
+++ pulseaudio-12.2.mod/src/pulsecore/esound.h 2019-03-02 02:24:34.161870804 +0200
|
||||
|
@@ -23,8 +23,8 @@
|
||||
|
/* Most of the following is blatantly stolen from esound. */ |
||||
|
|
||||
|
/* path and name of the default EsounD domain socket */ |
||||
|
-#define ESD_UNIX_SOCKET_DIR "/tmp/.esd"
|
||||
|
-#define ESD_UNIX_SOCKET_NAME "/tmp/.esd/socket"
|
||||
|
+#define ESD_UNIX_SOCKET_DIR "@TERMUX_PREFIX@/tmp/.esd"
|
||||
|
+#define ESD_UNIX_SOCKET_NAME "@TERMUX_PREFIX@/tmp/.esd/socket"
|
||||
|
|
||||
|
/* length of the audio buffer size */ |
||||
|
#define ESD_BUF_SIZE (4 * 1024) |
||||
|
diff -uNr pulseaudio-12.2/src/pulsecore/shm.c pulseaudio-12.2.mod/src/pulsecore/shm.c
|
||||
|
--- pulseaudio-12.2/src/pulsecore/shm.c 2018-07-13 22:06:12.000000000 +0300
|
||||
|
+++ pulseaudio-12.2.mod/src/pulsecore/shm.c 2019-03-02 02:28:09.806025965 +0200
|
||||
|
@@ -67,7 +67,7 @@
|
||||
|
/* On Linux we know that the shared memory blocks are files in |
||||
|
* /dev/shm. We can use that information to list all blocks and |
||||
|
* cleanup unused ones */ |
||||
|
-#define SHM_PATH "/dev/shm/"
|
||||
|
+#define SHM_PATH "@TERMUX_PREFIX@/tmp/"
|
||||
|
#define SHM_ID_LEN 10 |
||||
|
#elif defined(__sun) |
||||
|
#define SHM_PATH "/tmp" |
@ -1,29 +0,0 @@ |
|||||
--- src/src/pulsecore/core-util.c.orig 2017-01-13 03:02:18.000000000 +0000
|
|
||||
+++ src/src/pulsecore/core-util.c 2017-03-06 22:31:51.321911880 +0000
|
|
||||
@@ -1812,7 +1812,7 @@
|
|
||||
* users, too. Since we need POSIX locking and UNIX sockets in |
|
||||
* this directory, we try XDG_RUNTIME_DIR first, and if that isn't |
|
||||
* set create a directory in $HOME and link it to a random subdir |
|
||||
- * in /tmp, if it was not explicitly configured. */
|
|
||||
+ * in @TERMUX_PREFIX@/tmp, if it was not explicitly configured. */
|
|
||||
|
|
||||
m = pa_in_system_mode() ? 0755U : 0700U; |
|
||||
|
|
||||
@@ -1885,7 +1885,7 @@
|
|
||||
|
|
||||
#ifdef HAVE_SYMLINK |
|
||||
/* Hmm, so the runtime directory didn't exist yet, so let's |
|
||||
- * create one in /tmp and symlink that to it */
|
|
||||
+ * create one in @TERMUX_PREFIX@/tmp and symlink that to it */
|
|
||||
|
|
||||
if (make_random_dir_and_link(0700, k) < 0) { |
|
||||
|
|
||||
@@ -3429,7 +3429,7 @@
|
|
||||
pa_is_path_absolute(t)) |
|
||||
return t; |
|
||||
|
|
||||
- return "/tmp";
|
|
||||
+ return "@TERMUX_PREFIX@/tmp";
|
|
||||
} |
|
||||
|
|
||||
int pa_open_cloexec(const char *fn, int flags, mode_t mode) { |
|
@ -0,0 +1,63 @@ |
|||||
|
diff -uNr libssh-0.8.6/examples/ssh_server_fork.c libssh-0.8.6.mod/examples/ssh_server_fork.c
|
||||
|
--- libssh-0.8.6/examples/ssh_server_fork.c 2018-12-24 09:35:54.000000000 +0200
|
||||
|
+++ libssh-0.8.6.mod/examples/ssh_server_fork.c 2019-03-02 13:54:01.710902660 +0200
|
||||
|
@@ -308,7 +308,7 @@
|
||||
|
if (login_tty(cdata->pty_slave) != 0) { |
||||
|
exit(1); |
||||
|
} |
||||
|
- execl("/bin/sh", "sh", mode, command, NULL);
|
||||
|
+ execl("@TERMUX_PREFIX@/bin/sh", "sh", mode, command, NULL);
|
||||
|
exit(0); |
||||
|
default: |
||||
|
close(cdata->pty_slave); |
||||
|
@@ -347,7 +347,7 @@
|
||||
|
close(out[1]); |
||||
|
close(err[1]); |
||||
|
/* exec the requested command. */ |
||||
|
- execl("/bin/sh", "sh", "-c", command, NULL);
|
||||
|
+ execl("@TERMUX_PREFIX@/bin/sh", "sh", "-c", command, NULL);
|
||||
|
exit(0); |
||||
|
} |
||||
|
|
||||
|
diff -uNr libssh-0.8.6/src/options.c libssh-0.8.6.mod/src/options.c
|
||||
|
--- libssh-0.8.6/src/options.c 2018-12-24 09:35:55.000000000 +0200
|
||||
|
+++ libssh-0.8.6.mod/src/options.c 2019-03-02 13:55:07.926515301 +0200
|
||||
|
@@ -622,7 +622,7 @@
|
||||
|
SAFE_FREE(session->opts.global_knownhosts); |
||||
|
if (v == NULL) { |
||||
|
session->opts.global_knownhosts = |
||||
|
- strdup("/etc/ssh/ssh_known_hosts");
|
||||
|
+ strdup("@TERMUX_PREFIX@/etc/ssh/ssh_known_hosts");
|
||||
|
if (session->opts.global_knownhosts == NULL) { |
||||
|
ssh_set_error_oom(session); |
||||
|
return -1; |
||||
|
@@ -1327,7 +1327,7 @@
|
||||
|
goto out; |
||||
|
} |
||||
|
if (filename == NULL) { |
||||
|
- r = ssh_config_parse_file(session, "/etc/ssh/ssh_config");
|
||||
|
+ r = ssh_config_parse_file(session, "@TERMUX_PREFIX@/etc/ssh/ssh_config");
|
||||
|
} |
||||
|
|
||||
|
out: |
||||
|
@@ -1366,7 +1366,7 @@
|
||||
|
session->opts.knownhosts = tmp; |
||||
|
|
||||
|
if (session->opts.global_knownhosts == NULL) { |
||||
|
- tmp = strdup("/etc/ssh/ssh_known_hosts");
|
||||
|
+ tmp = strdup("@TERMUX_PREFIX@/etc/ssh/ssh_known_hosts");
|
||||
|
} else { |
||||
|
tmp = ssh_path_expand_escape(session, session->opts.global_knownhosts); |
||||
|
} |
||||
|
diff -uNr libssh-0.8.6/src/socket.c libssh-0.8.6.mod/src/socket.c
|
||||
|
--- libssh-0.8.6/src/socket.c 2018-12-10 15:05:43.000000000 +0200
|
||||
|
+++ libssh-0.8.6.mod/src/socket.c 2019-03-02 13:54:24.269341523 +0200
|
||||
|
@@ -805,7 +805,7 @@
|
||||
|
* @param out output file descriptor |
||||
|
*/ |
||||
|
void ssh_execute_command(const char *command, socket_t in, socket_t out){ |
||||
|
- const char *args[]={"/bin/sh","-c",command,NULL};
|
||||
|
+ const char *args[]={"@TERMUX_PREFIX@/bin/sh","-c",command,NULL};
|
||||
|
/* redirect in and out to stdin, stdout and stderr */ |
||||
|
dup2(in, 0); |
||||
|
dup2(out,1); |
@ -1,12 +0,0 @@ |
|||||
diff -uNr libssh-0.7.5/src/options.c libssh-0.7.5.mod/src/options.c
|
|
||||
--- libssh-0.7.5/src/options.c 2017-04-13 17:33:04.000000000 +0300
|
|
||||
+++ libssh-0.7.5.mod/src/options.c 2017-09-12 11:16:10.212992453 +0300
|
|
||||
@@ -1232,7 +1232,7 @@
|
|
||||
goto out; |
|
||||
} |
|
||||
if (filename == NULL) { |
|
||||
- r = ssh_config_parse_file(session, "/etc/ssh/ssh_config");
|
|
||||
+ r = ssh_config_parse_file(session, "@TERMUX_PREFIX@/etc/ssh/ssh_config");
|
|
||||
} |
|
||||
|
|
||||
out: |
|
@ -0,0 +1,78 @@ |
|||||
|
diff -uNr lynx2.8.9rel.1/src/LYNews.c lynx2.8.9rel.1.mod/src/LYNews.c
|
||||
|
--- lynx2.8.9rel.1/src/LYNews.c 2018-03-18 20:51:02.000000000 +0200
|
||||
|
+++ lynx2.8.9rel.1.mod/src/LYNews.c 2019-03-01 22:04:51.671752655 +0200
|
||||
|
@@ -261,7 +261,7 @@
|
||||
|
StrAllocCat(cp, org); |
||||
|
} |
||||
|
#ifdef UNIX |
||||
|
- else if ((fp = fopen("/etc/organization", TXT_R)) != NULL) {
|
||||
|
+ else if ((fp = fopen("@TERMUX_PREFIX@/etc/organization", TXT_R)) != NULL) {
|
||||
|
char *buffer = 0; |
||||
|
|
||||
|
if (LYSafeGets(&buffer, fp) != NULL) { |
||||
|
diff -uNr lynx2.8.9rel.1/src/LYUtils.c lynx2.8.9rel.1.mod/src/LYUtils.c
|
||||
|
--- lynx2.8.9rel.1/src/LYUtils.c 2018-05-16 00:20:52.000000000 +0300
|
||||
|
+++ lynx2.8.9rel.1.mod/src/LYUtils.c 2019-03-01 22:05:42.915339501 +0200
|
||||
|
@@ -165,7 +165,7 @@
|
||||
|
#if defined(__FreeBSD__) || defined(__bsdi__) |
||||
|
#define UTMP_FILE _PATH_UTMP |
||||
|
#else |
||||
|
-#define UTMP_FILE "/etc/utmp"
|
||||
|
+#define UTMP_FILE "@TERMUX_PREFIX@/etc/utmp"
|
||||
|
#endif /* __FreeBSD__ || __bsdi__ */ |
||||
|
#endif /* !UTMP_FILE */ |
||||
|
|
||||
|
@@ -5185,7 +5185,7 @@
|
||||
|
/* |
||||
|
* Use /tmp; it should be writable. |
||||
|
*/ |
||||
|
- StrAllocCopy(HomeDir, "/tmp");
|
||||
|
+ StrAllocCopy(HomeDir, "@TERMUX_PREFIX@/tmp");
|
||||
|
} |
||||
|
#endif |
||||
|
#endif /* VMS */ |
||||
|
diff -uNr lynx2.8.9rel.1/WWW/Library/Implementation/HTFile.c lynx2.8.9rel.1.mod/WWW/Library/Implementation/HTFile.c
|
||||
|
--- lynx2.8.9rel.1/WWW/Library/Implementation/HTFile.c 2018-05-12 02:20:35.000000000 +0300
|
||||
|
+++ lynx2.8.9rel.1.mod/WWW/Library/Implementation/HTFile.c 2019-03-01 22:04:51.675086005 +0200
|
||||
|
@@ -145,7 +145,7 @@
|
||||
|
static const char *HTCacheRoot = "/WWW$SCRATCH"; /* Where to cache things */ |
||||
|
|
||||
|
#else |
||||
|
-static const char *HTCacheRoot = "/tmp/W3_Cache_"; /* Where to cache things */
|
||||
|
+static const char *HTCacheRoot = "@TERMUX_PREFIX@/tmp/W3_Cache_"; /* Where to cache things */
|
||||
|
#endif /* VMS */ |
||||
|
|
||||
|
static char s_no_suffix[] = "*"; |
||||
|
@@ -743,7 +743,7 @@
|
||||
|
home = LYGetEnv("HOME"); |
||||
|
#endif |
||||
|
if (home == NULL) |
||||
|
- home = "/tmp";
|
||||
|
+ home = "@TERMUX_PREFIX@/tmp";
|
||||
|
#endif /* VMS */ |
||||
|
HTSprintf0(&result, "%s/WWW/%s/%s%s", home, acc_method, host, path); |
||||
|
} else { |
||||
|
diff -uNr lynx2.8.9rel.1/WWW/Library/Implementation/HTFormat.c lynx2.8.9rel.1.mod/WWW/Library/Implementation/HTFormat.c
|
||||
|
--- lynx2.8.9rel.1/WWW/Library/Implementation/HTFormat.c 2018-05-12 01:18:24.000000000 +0300
|
||||
|
+++ lynx2.8.9rel.1.mod/WWW/Library/Implementation/HTFormat.c 2019-03-01 22:04:51.678419355 +0200
|
||||
|
@@ -27,7 +27,7 @@
|
||||
|
#ifdef NeXT |
||||
|
#define PRESENT_POSTSCRIPT "open %s; /bin/rm -f %s\n" |
||||
|
#else |
||||
|
-#define PRESENT_POSTSCRIPT "(ghostview %s ; /bin/rm -f %s)&\n"
|
||||
|
+#define PRESENT_POSTSCRIPT "(ghostview %s ; rm -f %s)&\n"
|
||||
|
/* Full pathname would be better! */ |
||||
|
#endif /* NeXT */ |
||||
|
#endif /* UNIX */ |
||||
|
diff -uNr lynx2.8.9rel.1/WWW/Library/Implementation/HTNews.c lynx2.8.9rel.1.mod/WWW/Library/Implementation/HTNews.c
|
||||
|
--- lynx2.8.9rel.1/WWW/Library/Implementation/HTNews.c 2018-02-26 02:28:40.000000000 +0200
|
||||
|
+++ lynx2.8.9rel.1.mod/WWW/Library/Implementation/HTNews.c 2019-03-01 22:04:51.681752704 +0200
|
||||
|
@@ -36,7 +36,7 @@
|
||||
|
#endif /* DEFAULT_NEWS_HOST */ |
||||
|
|
||||
|
#ifndef NEWS_SERVER_FILE |
||||
|
-#define NEWS_SERVER_FILE "/usr/local/lib/rn/server"
|
||||
|
+#define NEWS_SERVER_FILE "@TERMUX_PREFIX@/lib/rn/server"
|
||||
|
#endif /* NEWS_SERVER_FILE */ |
||||
|
|
||||
|
#ifndef NEWS_AUTH_FILE |
@ -1,12 +0,0 @@ |
|||||
diff -uNr lynx2.8.9dev.19/WWW/Library/Implementation/HTFormat.c lynx2.8.9dev.19.mod/WWW/Library/Implementation/HTFormat.c
|
|
||||
--- lynx2.8.9dev.19/WWW/Library/Implementation/HTFormat.c 2018-05-12 01:18:24.000000000 +0300
|
|
||||
+++ lynx2.8.9dev.19.mod/WWW/Library/Implementation/HTFormat.c 2018-06-19 19:42:26.744841948 +0300
|
|
||||
@@ -27,7 +27,7 @@
|
|
||||
#ifdef NeXT |
|
||||
#define PRESENT_POSTSCRIPT "open %s; /bin/rm -f %s\n" |
|
||||
#else |
|
||||
-#define PRESENT_POSTSCRIPT "(ghostview %s ; /bin/rm -f %s)&\n"
|
|
||||
+#define PRESENT_POSTSCRIPT "(ghostview %s ; rm -f %s)&\n"
|
|
||||
/* Full pathname would be better! */ |
|
||||
#endif /* NeXT */ |
|
||||
#endif /* UNIX */ |
|
@ -1,12 +0,0 @@ |
|||||
diff -uNr lynx2.8.9dev.19/src/LYUtils.c lynx2.8.9dev.19.mod/src/LYUtils.c
|
|
||||
--- lynx2.8.9dev.19/src/LYUtils.c 2018-05-16 00:20:52.000000000 +0300
|
|
||||
+++ lynx2.8.9dev.19.mod/src/LYUtils.c 2018-06-19 19:40:07.058168089 +0300
|
|
||||
@@ -5185,7 +5185,7 @@
|
|
||||
/* |
|
||||
* Use /tmp; it should be writable. |
|
||||
*/ |
|
||||
- StrAllocCopy(HomeDir, "/tmp");
|
|
||||
+ StrAllocCopy(HomeDir, "@TERMUX_PREFIX@/tmp");
|
|
||||
} |
|
||||
#endif |
|
||||
#endif /* VMS */ |
|
@ -0,0 +1,58 @@ |
|||||
|
diff -uNr m4-1.4.18/lib/spawni.c m4-1.4.18.mod/lib/spawni.c
|
||||
|
--- m4-1.4.18/lib/spawni.c 2016-12-31 15:54:42.000000000 +0200
|
||||
|
+++ m4-1.4.18.mod/lib/spawni.c 2019-03-01 20:54:18.601984363 +0200
|
||||
|
@@ -32,7 +32,7 @@
|
||||
|
#if _LIBC || HAVE_PATHS_H |
||||
|
# include <paths.h> |
||||
|
#else |
||||
|
-# define _PATH_BSHELL "/bin/sh"
|
||||
|
+# define _PATH_BSHELL "@TERMUX_PREFIX@/bin/sh"
|
||||
|
#endif |
||||
|
|
||||
|
#include <signal.h> |
||||
|
diff -uNr m4-1.4.18/lib/tempname.c m4-1.4.18.mod/lib/tempname.c
|
||||
|
--- m4-1.4.18/lib/tempname.c 2016-12-31 15:54:42.000000000 +0200
|
||||
|
+++ m4-1.4.18.mod/lib/tempname.c 2019-03-01 20:52:48.978132063 +0200
|
||||
|
@@ -32,7 +32,7 @@
|
||||
|
|
||||
|
#include <stdio.h> |
||||
|
#ifndef P_tmpdir |
||||
|
-# define P_tmpdir "/tmp"
|
||||
|
+# define P_tmpdir "@TERMUX_PREFIX@/tmp"
|
||||
|
#endif |
||||
|
#ifndef TMP_MAX |
||||
|
# define TMP_MAX 238328 |
||||
|
@@ -148,8 +148,8 @@
|
||||
|
{ |
||||
|
if (direxists (P_tmpdir)) |
||||
|
dir = P_tmpdir; |
||||
|
- else if (strcmp (P_tmpdir, "/tmp") != 0 && direxists ("/tmp"))
|
||||
|
- dir = "/tmp";
|
||||
|
+ else if (strcmp (P_tmpdir, "@TERMUX_PREFIX@/tmp") != 0 && direxists ("@TERMUX_PREFIX@/tmp"))
|
||||
|
+ dir = "@TERMUX_PREFIX@/tmp";
|
||||
|
else |
||||
|
{ |
||||
|
__set_errno (ENOENT); |
||||
|
diff -uNr m4-1.4.18/lib/tmpdir.c m4-1.4.18.mod/lib/tmpdir.c
|
||||
|
--- m4-1.4.18/lib/tmpdir.c 2016-12-31 15:54:42.000000000 +0200
|
||||
|
+++ m4-1.4.18.mod/lib/tmpdir.c 2019-03-01 20:53:16.521626327 +0200
|
||||
|
@@ -36,7 +36,7 @@
|
||||
|
# ifdef _P_tmpdir /* native Windows */ |
||||
|
# define P_tmpdir _P_tmpdir |
||||
|
# else |
||||
|
-# define P_tmpdir "/tmp"
|
||||
|
+# define P_tmpdir "@TERMUX_PREFIX@/tmp"
|
||||
|
# endif |
||||
|
#endif |
||||
|
|
||||
|
@@ -130,8 +130,8 @@
|
||||
|
#endif |
||||
|
if (direxists (P_tmpdir)) |
||||
|
dir = P_tmpdir; |
||||
|
- else if (strcmp (P_tmpdir, "/tmp") != 0 && direxists ("/tmp"))
|
||||
|
- dir = "/tmp";
|
||||
|
+ else if (strcmp (P_tmpdir, "@TERMUX_PREFIX@/tmp") != 0 && direxists ("@TERMUX_PREFIX@/tmp"))
|
||||
|
+ dir = "@TERMUX_PREFIX@/tmp";
|
||||
|
else |
||||
|
{ |
||||
|
__set_errno (ENOENT); |
@ -0,0 +1,33 @@ |
|||||
|
diff -uNr mathomatic-16.0.5/am.h mathomatic-16.0.5.mod/am.h
|
||||
|
--- mathomatic-16.0.5/am.h 2012-08-19 17:42:52.000000000 +0300
|
||||
|
+++ mathomatic-16.0.5.mod/am.h 2019-03-01 20:49:40.456989348 +0200
|
||||
|
@@ -57,7 +57,7 @@
|
||||
|
#define TEXT_ROWS STANDARD_SCREEN_ROWS /* number of lines per page in the symbolic math library */ |
||||
|
#define TEXT_COLUMNS STANDARD_SCREEN_COLUMNS /* default number of columns per page in the symbolic math library */ |
||||
|
|
||||
|
-#define TMP_FILE "/tmp/mathomatic.XXXXXX" /* temporary file template for mkstemp(3) */
|
||||
|
+#define TMP_FILE "@TERMUX_PREFIX@/tmp/mathomatic.XXXXXX" /* temporary file template for mkstemp(3) */
|
||||
|
|
||||
|
#define PROMPT_STR "-> " /* user interface main prompt strings, preceded by the current equation number */ |
||||
|
#define HTML_PROMPT_STR "−> " /* main prompt in HTML output mode, should be same number of columns as above */ |
||||
|
diff -uNr mathomatic-16.0.5/help.c mathomatic-16.0.5.mod/help.c
|
||||
|
--- mathomatic-16.0.5/help.c 2012-10-01 13:43:46.000000000 +0300
|
||||
|
+++ mathomatic-16.0.5.mod/help.c 2019-03-01 20:50:09.883839729 +0200
|
||||
|
@@ -612,7 +612,7 @@
|
||||
|
#else |
||||
|
cp1 = getenv("SHELL"); |
||||
|
if (cp1 == NULL) { |
||||
|
- cp1 = "/bin/sh";
|
||||
|
+ cp1 = "@TERMUX_PREFIX@/bin/sh";
|
||||
|
} |
||||
|
#endif |
||||
|
#if 0 |
||||
|
@@ -1157,7 +1157,7 @@
|
||||
|
} |
||||
|
if (cp[0] == '!') { |
||||
|
SP("A command preceded by an exclamation point (such as \"!ls\") is taken to"); |
||||
|
- SP("be a shell command and is passed unchanged to the shell (/bin/sh) when");
|
||||
|
+ SP("be a shell command and is passed unchanged to the shell (@TERMUX_PREFIX@/bin/sh) when");
|
||||
|
SP("Mathomatic is not in secure mode. \"!\" by itself invokes the default shell,"); |
||||
|
EP("which is specified in the SHELL environment variable.\n"); |
||||
|
|
@ -1,12 +0,0 @@ |
|||||
diff -uNr mathomatic-16.0.5/am.h mathomatic-16.0.5.mod/am.h
|
|
||||
--- mathomatic-16.0.5/am.h 2012-08-19 17:42:52.000000000 +0300
|
|
||||
+++ mathomatic-16.0.5.mod/am.h 2017-09-14 14:36:31.112860259 +0300
|
|
||||
@@ -57,7 +57,7 @@
|
|
||||
#define TEXT_ROWS STANDARD_SCREEN_ROWS /* number of lines per page in the symbolic math library */ |
|
||||
#define TEXT_COLUMNS STANDARD_SCREEN_COLUMNS /* default number of columns per page in the symbolic math library */ |
|
||||
|
|
||||
-#define TMP_FILE "/tmp/mathomatic.XXXXXX" /* temporary file template for mkstemp(3) */
|
|
||||
+#define TMP_FILE "@TERMUX_PREFIX@/tmp/mathomatic.XXXXXX" /* temporary file template for mkstemp(3) */
|
|
||||
|
|
||||
#define PROMPT_STR "-> " /* user interface main prompt strings, preceded by the current equation number */ |
|
||||
#define HTML_PROMPT_STR "−> " /* main prompt in HTML output mode, should be same number of columns as above */ |
|
@ -0,0 +1,14 @@ |
|||||
|
diff -uNr mosh-1.3.2/src/frontend/mosh-server.cc mosh-1.3.2.mod/src/frontend/mosh-server.cc
|
||||
|
--- mosh-1.3.2/src/frontend/mosh-server.cc 2017-07-23 00:14:53.000000000 +0300
|
||||
|
+++ mosh-1.3.2.mod/src/frontend/mosh-server.cc 2019-03-01 22:37:18.009498882 +0200
|
||||
|
@@ -562,8 +562,8 @@
|
||||
|
// this always happens. |
||||
|
// XXX Hackish knowledge of Ubuntu PAM configuration. |
||||
|
// But this seems less awful than build-time detection with autoconf. |
||||
|
- if (!print_motd("/run/motd.dynamic")) {
|
||||
|
- print_motd("/var/run/motd.dynamic");
|
||||
|
+ if (!print_motd("@TERMUX_PREFIX@/run/motd.dynamic")) {
|
||||
|
+ print_motd("@TERMUX_PREFIX@/var/run/motd.dynamic");
|
||||
|
} |
||||
|
// Always print traditional /etc/motd. |
||||
|
print_motd("/etc/motd"); |
@ -0,0 +1,12 @@ |
|||||
|
diff -uNr nano-3.2/src/files.c nano-3.2.mod/src/files.c
|
||||
|
--- nano-3.2/src/files.c 2018-11-05 21:04:46.000000000 +0200
|
||||
|
+++ nano-3.2.mod/src/files.c 2019-03-01 22:09:30.233108029 +0200
|
||||
|
@@ -1439,7 +1439,7 @@
|
||||
|
|
||||
|
/* if P_tmpdir is NULL, use /tmp. */ |
||||
|
if (full_tempdir == NULL) |
||||
|
- full_tempdir = mallocstrcpy(NULL, "/tmp/");
|
||||
|
+ full_tempdir = mallocstrcpy(NULL, "@TERMUX_PREFIX@/tmp/");
|
||||
|
|
||||
|
full_tempdir = charealloc(full_tempdir, strlen(full_tempdir) + 12); |
||||
|
strcat(full_tempdir, "nano.XXXXXX"); |
@ -0,0 +1,35 @@ |
|||||
|
diff -uNr ncurses-6.1-20181117/progs/tic.c ncurses-6.1-20181117.mod/progs/tic.c
|
||||
|
--- ncurses-6.1-20181117/progs/tic.c 2018-03-18 02:05:10.000000000 +0200
|
||||
|
+++ ncurses-6.1-20181117.mod/progs/tic.c 2019-03-01 20:40:56.193173489 +0200
|
||||
|
@@ -386,7 +386,7 @@
|
||||
|
{ |
||||
|
FILE *result = 0; |
||||
|
|
||||
|
- _nc_STRCPY(filename, "/tmp/XXXXXX", PATH_MAX);
|
||||
|
+ _nc_STRCPY(filename, "@TERMUX_PREFIX@/tmp/XXXXXX", PATH_MAX);
|
||||
|
#if HAVE_MKSTEMP |
||||
|
{ |
||||
|
int oldmask = (int) umask(077); |
||||
|
@@ -900,7 +900,7 @@
|
||||
|
} else { |
||||
|
if (infodump == TRUE) { |
||||
|
/* captoinfo's no-argument case */ |
||||
|
- source_file = "/etc/termcap";
|
||||
|
+ source_file = "@TERMUX_PREFIX@/etc/termcap";
|
||||
|
if ((termcap = getenv("TERMCAP")) != 0 |
||||
|
&& (namelst = make_namelist(getenv("TERM"))) != 0) { |
||||
|
if (access(termcap, F_OK) == 0) { |
||||
|
diff -uNr ncurses-6.1-20181117/progs/tset.c ncurses-6.1-20181117.mod/progs/tset.c
|
||||
|
--- ncurses-6.1-20181117/progs/tset.c 2017-10-08 03:01:29.000000000 +0300
|
||||
|
+++ ncurses-6.1-20181117.mod/progs/tset.c 2019-03-01 20:40:15.049476720 +0200
|
||||
|
@@ -566,8 +566,8 @@
|
||||
|
goto map; |
||||
|
} |
||||
|
#else |
||||
|
- if ((fp = fopen("/etc/ttytype", "r")) != 0
|
||||
|
- || (fp = fopen("/etc/ttys", "r")) != 0) {
|
||||
|
+ if ((fp = fopen("@TERMUX_PREFIX@/etc/ttytype", "r")) != 0
|
||||
|
+ || (fp = fopen("@TERMUX_PREFIX@/etc/ttys", "r")) != 0) {
|
||||
|
char buffer[BUFSIZ]; |
||||
|
char *s, *t, *d; |
||||
|
|
@ -1,12 +0,0 @@ |
|||||
diff -uNr ncurses-6.0-20170909/progs/tic.c ncurses-6.0-20170909.mod/progs/tic.c
|
|
||||
--- ncurses-6.0-20170909/progs/tic.c 2017-08-26 23:56:55.000000000 +0300
|
|
||||
+++ ncurses-6.0-20170909.mod/progs/tic.c 2017-09-14 15:45:21.992857305 +0300
|
|
||||
@@ -386,7 +386,7 @@
|
|
||||
{ |
|
||||
FILE *result = 0; |
|
||||
|
|
||||
- _nc_STRCPY(filename, "/tmp/XXXXXX", PATH_MAX);
|
|
||||
+ _nc_STRCPY(filename, "@TERMUX_PREFIX@/tmp/XXXXXX", PATH_MAX);
|
|
||||
#if HAVE_MKSTEMP |
|
||||
{ |
|
||||
int oldmask = (int) umask(077); |
|
@ -0,0 +1,21 @@ |
|||||
|
diff -uNr net-tools/arp.c net-tools.mod/arp.c
|
||||
|
--- net-tools/arp.c 2017-02-21 20:24:32.000000000 +0200
|
||||
|
+++ net-tools.mod/arp.c 2019-03-01 19:05:20.555355036 +0200
|
||||
|
@@ -644,7 +644,7 @@
|
||||
|
fprintf(stderr, _(" -i, --device specify network interface (e.g. eth0)\n")); |
||||
|
fprintf(stderr, _(" -D, --use-device read <hwaddr> from given device\n")); |
||||
|
fprintf(stderr, _(" -A, -p, --protocol specify protocol family\n")); |
||||
|
- fprintf(stderr, _(" -f, --file read new entries from file or from /etc/ethers\n\n"));
|
||||
|
+ fprintf(stderr, _(" -f, --file read new entries from file or from $PREFIX/etc/ethers\n\n"));
|
||||
|
|
||||
|
fprintf(stderr, _(" <HW>=Use '-H <hw>' to specify hardware address type. Default: %s\n"), DFLT_HW); |
||||
|
fprintf(stderr, _(" List of possible hardware types (which support ARP):\n")); |
||||
|
@@ -791,7 +791,7 @@
|
||||
|
break; |
||||
|
|
||||
|
case 2: /* process an EtherFile */ |
||||
|
- what = arp_file(argv[optind] ? argv[optind] : "/etc/ethers");
|
||||
|
+ what = arp_file(argv[optind] ? argv[optind] : "@TERMUX_PREFIX@/etc/ethers");
|
||||
|
break; |
||||
|
|
||||
|
case 3: /* delete an ARP entry from the cache */ |
@ -0,0 +1,12 @@ |
|||||
|
diff -uNr net-tools/lib/pathnames.h net-tools.mod/lib/pathnames.h
|
||||
|
--- net-tools/lib/pathnames.h 2017-02-21 20:24:32.000000000 +0200
|
||||
|
+++ net-tools.mod/lib/pathnames.h 2019-03-01 19:05:45.935478227 +0200
|
||||
|
@@ -47,7 +47,7 @@
|
||||
|
#define _PATH_PROCNET_IFINET6 "/proc/net/if_inet6" |
||||
|
#define _PATH_PROCNET_DEV "/proc/net/dev" |
||||
|
#define _PATH_PROCNET_RARP "/proc/net/rarp" |
||||
|
-#define _PATH_ETHERS "/etc/ethers"
|
||||
|
+#define _PATH_ETHERS "@TERMUX_PREFIX@/etc/ethers"
|
||||
|
#define _PATH_PROCNET_ROSE "/proc/net/rose" |
||||
|
#define _PATH_PROCNET_ROSE_NEIGH "/proc/net/rose_neigh" |
||||
|
#define _PATH_PROCNET_ROSE_NODES "/proc/net/rose_nodes" |
@ -0,0 +1,12 @@ |
|||||
|
diff -uNr net-tools/rarp.c net-tools.mod/rarp.c
|
||||
|
--- net-tools/rarp.c 2017-02-21 20:24:32.000000000 +0200
|
||||
|
+++ net-tools.mod/rarp.c 2019-03-01 19:06:09.028923071 +0200
|
||||
|
@@ -178,7 +178,7 @@
|
||||
|
fprintf(stderr, _("Usage: rarp -a list entries in cache.\n")); |
||||
|
fprintf(stderr, _(" rarp -d <hostname> delete entry from cache.\n")); |
||||
|
fprintf(stderr, _(" rarp [<HW>] -s <hostname> <hwaddr> add entry to cache.\n")); |
||||
|
- fprintf(stderr, _(" rarp -f add entries from /etc/ethers.\n"));
|
||||
|
+ fprintf(stderr, _(" rarp -f add entries from $PREFIX/etc/ethers.\n"));
|
||||
|
fprintf(stderr, _(" rarp -V display program version.\n\n")); |
||||
|
|
||||
|
fprintf(stderr, _(" <HW>=Use '-H <hw>' to specify hardware address type. Default: %s\n"), DFLT_HW); |
@ -0,0 +1,12 @@ |
|||||
|
diff -uNr net-tools/slattach.c net-tools.mod/slattach.c
|
||||
|
--- net-tools/slattach.c 2017-02-21 20:24:32.000000000 +0200
|
||||
|
+++ net-tools.mod/slattach.c 2019-03-01 21:54:06.558251056 +0200
|
||||
|
@@ -55,7 +55,7 @@
|
||||
|
#include "util.h" |
||||
|
|
||||
|
#ifndef _PATH_LOCKD |
||||
|
-#define _PATH_LOCKD "/var/lock" /* lock files */
|
||||
|
+#define _PATH_LOCKD "@TERMUX_PREFIX@/var/lock" /* lock files */
|
||||
|
#endif |
||||
|
#ifndef _UID_UUCP |
||||
|
#define _UID_UUCP "uucp" /* owns locks */ |
@ -0,0 +1,60 @@ |
|||||
|
diff -uNr newsboat-2.14.1/src/controller.cpp newsboat-2.14.1.mod/src/controller.cpp
|
||||
|
--- newsboat-2.14.1/src/controller.cpp 2019-02-10 18:07:09.000000000 +0200
|
||||
|
+++ newsboat-2.14.1.mod/src/controller.cpp 2019-03-01 21:52:00.350784451 +0200
|
||||
|
@@ -768,7 +768,7 @@
|
||||
|
} else { |
||||
|
snprintf(filename, |
||||
|
sizeof(filename), |
||||
|
- "/tmp/newsboat-article.XXXXXX");
|
||||
|
+ "@TERMUX_PREFIX@/tmp/newsboat-article.XXXXXX");
|
||||
|
} |
||||
|
int fd = mkstemp(filename); |
||||
|
if (fd != -1) { |
||||
|
diff -uNr newsboat-2.14.1/src/formaction.cpp newsboat-2.14.1.mod/src/formaction.cpp
|
||||
|
--- newsboat-2.14.1/src/formaction.cpp 2019-02-10 18:07:09.000000000 +0200
|
||||
|
+++ newsboat-2.14.1.mod/src/formaction.cpp 2019-03-01 21:51:38.197304516 +0200
|
||||
|
@@ -540,7 +540,7 @@
|
||||
|
return ""; |
||||
|
} else { |
||||
|
char* my_argv[4]; |
||||
|
- my_argv[0] = const_cast<char*>("/bin/sh");
|
||||
|
+ my_argv[0] = const_cast<char*>("@TERMUX_PREFIX@/bin/sh");
|
||||
|
my_argv[1] = const_cast<char*>("-c"); |
||||
|
my_argv[2] = const_cast<char*>(cmdline.c_str()); |
||||
|
my_argv[3] = nullptr; |
||||
|
diff -uNr newsboat-2.14.1/src/itemrenderer.cpp newsboat-2.14.1.mod/src/itemrenderer.cpp
|
||||
|
--- newsboat-2.14.1/src/itemrenderer.cpp 2019-02-10 18:07:09.000000000 +0200
|
||||
|
+++ newsboat-2.14.1.mod/src/itemrenderer.cpp 2019-03-01 21:51:38.200637872 +0200
|
||||
|
@@ -92,7 +92,7 @@
|
||||
|
rnd.render(source, lines, thelinks, url); |
||||
|
} else { |
||||
|
char* argv[4]; |
||||
|
- argv[0] = const_cast<char*>("/bin/sh");
|
||||
|
+ argv[0] = const_cast<char*>("@TERMUX_PREFIX@/bin/sh");
|
||||
|
argv[1] = const_cast<char*>("-c"); |
||||
|
argv[2] = const_cast<char*>(renderer.c_str()); |
||||
|
argv[3] = nullptr; |
||||
|
diff -uNr newsboat-2.14.1/src/pbcontroller.cpp newsboat-2.14.1.mod/src/pbcontroller.cpp
|
||||
|
--- newsboat-2.14.1/src/pbcontroller.cpp 2019-02-10 18:07:09.000000000 +0200
|
||||
|
+++ newsboat-2.14.1.mod/src/pbcontroller.cpp 2019-03-01 21:51:38.200637872 +0200
|
||||
|
@@ -281,7 +281,7 @@
|
||||
|
cfgparser.register_handler("reset-unread-on-update", &null_cah); |
||||
|
|
||||
|
try { |
||||
|
- cfgparser.parse("/etc/newsboat/config");
|
||||
|
+ cfgparser.parse("@TERMUX_PREFIX@/etc/newsboat/config");
|
||||
|
cfgparser.parse(config_file); |
||||
|
} catch (const ConfigException& ex) { |
||||
|
std::cout << ex.what() << std::endl; |
||||
|
diff -uNr newsboat-2.14.1/src/rssparser.cpp newsboat-2.14.1.mod/src/rssparser.cpp
|
||||
|
--- newsboat-2.14.1/src/rssparser.cpp 2019-02-10 18:07:09.000000000 +0200
|
||||
|
+++ newsboat-2.14.1.mod/src/rssparser.cpp 2019-03-01 21:51:38.203971227 +0200
|
||||
|
@@ -291,7 +291,7 @@
|
||||
|
{ |
||||
|
std::string buf = utils::retrieve_url(uri, cfgcont); |
||||
|
|
||||
|
- char* argv[4] = {const_cast<char*>("/bin/sh"),
|
||||
|
+ char* argv[4] = {const_cast<char*>("@TERMUX_PREFIX@/bin/sh"),
|
||||
|
const_cast<char*>("-c"), |
||||
|
const_cast<char*>(filter.c_str()), |
||||
|
nullptr}; |
@ -0,0 +1,90 @@ |
|||||
|
diff -uNr nmap-7.70/ncat/ncat_connect.c nmap-7.70.mod/ncat/ncat_connect.c
|
||||
|
--- nmap-7.70/ncat/ncat_connect.c 2018-01-28 23:18:17.000000000 +0200
|
||||
|
+++ nmap-7.70.mod/ncat/ncat_connect.c 2019-03-02 01:35:44.977992954 +0200
|
||||
|
@@ -1005,7 +1005,7 @@
|
||||
|
char *tmpdir = getenv("TMPDIR"); |
||||
|
size_t size=0, offset=0; |
||||
|
strbuf_sprintf(&tmp_name, &size, &offset, "%s/ncat.XXXXXX", |
||||
|
- tmpdir ? tmpdir : "/tmp");
|
||||
|
+ tmpdir ? tmpdir : "@TERMUX_PREFIX@/tmp");
|
||||
|
if (mkstemp(tmp_name) == -1) { |
||||
|
bye("Failed to create name for temporary DGRAM source Unix domain socket (mkstemp)."); |
||||
|
} |
||||
|
diff -uNr nmap-7.70/ncat/ncat_main.c nmap-7.70.mod/ncat/ncat_main.c
|
||||
|
--- nmap-7.70/ncat/ncat_main.c 2018-03-05 03:53:34.000000000 +0200
|
||||
|
+++ nmap-7.70.mod/ncat/ncat_main.c 2019-03-02 01:35:44.977992954 +0200
|
||||
|
@@ -999,8 +999,8 @@
|
||||
|
|
||||
|
#ifndef WIN32 |
||||
|
/* See if the shell is executable before we get deep into this */ |
||||
|
- if (o.execmode == EXEC_SHELL && access("/bin/sh", X_OK) == -1)
|
||||
|
- bye("/bin/sh is not executable, so `-c' won't work.");
|
||||
|
+ if (o.execmode == EXEC_SHELL && access("@TERMUX_PREFIX@/bin/sh", X_OK) == -1)
|
||||
|
+ bye("@TERMUX_PREFIX@/bin/sh is not executable, so `-c' won't work.");
|
||||
|
#endif |
||||
|
|
||||
|
if (targetaddrs->addr.storage.ss_family != AF_UNSPEC) { |
||||
|
diff -uNr nmap-7.70/ncat/ncat_posix.c nmap-7.70.mod/ncat/ncat_posix.c
|
||||
|
--- nmap-7.70/ncat/ncat_posix.c 2018-01-28 23:18:17.000000000 +0200
|
||||
|
+++ nmap-7.70.mod/ncat/ncat_posix.c 2019-03-02 01:35:44.981326300 +0200
|
||||
|
@@ -239,7 +239,7 @@
|
||||
|
char **cmdargs; |
||||
|
|
||||
|
case EXEC_SHELL: |
||||
|
- execl("/bin/sh", "sh", "-c", cmdexec, (void *) NULL);
|
||||
|
+ execl("@TERMUX_PREFIX@/bin/sh", "sh", "-c", cmdexec, (void *) NULL);
|
||||
|
break; |
||||
|
#ifdef HAVE_LUA |
||||
|
case EXEC_LUA: |
||||
|
diff -uNr nmap-7.70/nmap_dns.cc nmap-7.70.mod/nmap_dns.cc
|
||||
|
--- nmap-7.70/nmap_dns.cc 2018-01-28 23:18:17.000000000 +0200
|
||||
|
+++ nmap-7.70.mod/nmap_dns.cc 2019-03-02 01:35:44.981326300 +0200
|
||||
|
@@ -1016,9 +1016,9 @@
|
||||
|
char fmt[32]; |
||||
|
char ipaddr[INET6_ADDRSTRLEN+1]; |
||||
|
|
||||
|
- fp = fopen("/etc/resolv.conf", "r");
|
||||
|
+ fp = fopen("@TERMUX_PREFIX@/etc/resolv.conf", "r");
|
||||
|
if (fp == NULL) { |
||||
|
- if (firstrun) error("mass_dns: warning: Unable to open /etc/resolv.conf. Try using --system-dns or specify valid servers with --dns-servers");
|
||||
|
+ if (firstrun) error("mass_dns: warning: Unable to open $PREFIX/etc/resolv.conf. Try using --system-dns or specify valid servers with --dns-servers");
|
||||
|
return; |
||||
|
} |
||||
|
|
||||
|
@@ -1099,7 +1099,7 @@
|
||||
|
parse_etchosts(tpbuf); |
||||
|
|
||||
|
#else |
||||
|
- parse_etchosts("/etc/hosts");
|
||||
|
+ parse_etchosts("@TERMUX_PREFIX@/etc/hosts");
|
||||
|
#endif // WIN32 |
||||
|
} |
||||
|
|
||||
|
diff -uNr nmap-7.70/protocols.cc nmap-7.70.mod/protocols.cc
|
||||
|
--- nmap-7.70/protocols.cc 2018-01-28 23:18:17.000000000 +0200
|
||||
|
+++ nmap-7.70.mod/protocols.cc 2019-03-02 01:37:23.878379187 +0200
|
||||
|
@@ -156,8 +156,8 @@
|
||||
|
int res; |
||||
|
|
||||
|
if (nmap_fetchfile(filename, sizeof(filename), "nmap-protocols") != 1) { |
||||
|
- error("Unable to find nmap-protocols! Resorting to /etc/protocols");
|
||||
|
- strcpy(filename, "/etc/protocols");
|
||||
|
+ error("Unable to find nmap-protocols! Resorting to @TERMUX_PREFIX@/etc/protocols");
|
||||
|
+ strcpy(filename, "@TERMUX_PREFIX@/etc/protocols");
|
||||
|
} |
||||
|
|
||||
|
fp = fopen(filename, "r"); |
||||
|
diff -uNr nmap-7.70/services.cc nmap-7.70.mod/services.cc
|
||||
|
--- nmap-7.70/services.cc 2018-01-28 23:18:17.000000000 +0200
|
||||
|
+++ nmap-7.70.mod/services.cc 2019-03-02 01:36:46.291565552 +0200
|
||||
|
@@ -202,8 +202,8 @@
|
||||
|
|
||||
|
if (nmap_fetchfile(filename, sizeof(filename), "nmap-services") != 1) { |
||||
|
#ifndef WIN32 |
||||
|
- error("Unable to find nmap-services! Resorting to /etc/services");
|
||||
|
- strcpy(filename, "/etc/services");
|
||||
|
+ error("Unable to find nmap-services! Resorting to @TERMUX_PREFIX@/etc/services");
|
||||
|
+ strcpy(filename, "@TERMUX_PREFIX@/etc/services");
|
||||
|
#else |
||||
|
int len, wnt = GetVersion() < 0x80000000; |
||||
|
error("Unable to find nmap-services! Resorting to /etc/services"); |
@ -1,26 +0,0 @@ |
|||||
diff -u -r ../nmap-7.40/ncat/ncat_main.c ./ncat/ncat_main.c
|
|
||||
--- ../nmap-7.40/ncat/ncat_main.c 2016-12-14 01:12:23.000000000 +0100
|
|
||||
+++ ./ncat/ncat_main.c 2017-02-17 11:46:27.468844181 +0100
|
|
||||
@@ -965,8 +965,8 @@
|
|
||||
|
|
||||
#ifndef WIN32 |
|
||||
/* See if the shell is executable before we get deep into this */ |
|
||||
- if (o.execmode == EXEC_SHELL && access("/bin/sh", X_OK) == -1)
|
|
||||
- bye("/bin/sh is not executable, so `-c' won't work.");
|
|
||||
+ if (o.execmode == EXEC_SHELL && access("@TERMUX_PREFIX@/bin/sh", X_OK) == -1)
|
|
||||
+ bye("@TERMUX_PREFIX@/bin/sh is not executable, so `-c' won't work.");
|
|
||||
#endif |
|
||||
|
|
||||
if (targetss.storage.ss_family != AF_UNSPEC) { |
|
||||
diff -u -r ../nmap-7.40/ncat/ncat_posix.c ./ncat/ncat_posix.c
|
|
||||
--- ../nmap-7.40/ncat/ncat_posix.c 2016-12-14 01:12:23.000000000 +0100
|
|
||||
+++ ./ncat/ncat_posix.c 2017-02-17 11:47:09.716313620 +0100
|
|
||||
@@ -239,7 +239,7 @@
|
|
||||
char **cmdargs; |
|
||||
|
|
||||
case EXEC_SHELL: |
|
||||
- execl("/bin/sh", "sh", "-c", cmdexec, (void *) NULL);
|
|
||||
+ execl("@TERMUX_PREFIX@/bin/sh", "sh", "-c", cmdexec, (void *) NULL);
|
|
||||
break; |
|
||||
#ifdef HAVE_LUA |
|
||||
case EXEC_LUA: |
|
@ -1,15 +0,0 @@ |
|||||
diff -u -r ../nmap-7.01/nmap_dns.cc ./nmap_dns.cc
|
|
||||
--- ../nmap-7.01/nmap_dns.cc 2015-10-07 13:49:24.000000000 -0400
|
|
||||
+++ ./nmap_dns.cc 2015-12-15 18:49:27.994641597 -0500
|
|
||||
@@ -959,9 +959,9 @@
|
|
||||
char fmt[32]; |
|
||||
char ipaddr[INET6_ADDRSTRLEN+1]; |
|
||||
|
|
||||
- fp = fopen("/etc/resolv.conf", "r");
|
|
||||
+ fp = fopen("@TERMUX_PREFIX@/etc/resolv.conf", "r");
|
|
||||
if (fp == NULL) { |
|
||||
- if (firstrun) error("mass_dns: warning: Unable to open /etc/resolv.conf. Try using --system-dns or specify valid servers with --dns-servers");
|
|
||||
+ if (firstrun) error("mass_dns: warning: Unable to open $PREFIX/etc/resolv.conf. Try using --system-dns or specify valid servers with --dns-servers");
|
|
||||
return; |
|
||||
} |
|
||||
|
|
@ -0,0 +1,21 @@ |
|||||
|
diff -uNr openal-soft-1.18.2/Alc/alcConfig.c openal-soft-1.18.2.mod/Alc/alcConfig.c
|
||||
|
--- openal-soft-1.18.2/Alc/alcConfig.c 2017-09-24 16:41:50.000000000 +0300
|
||||
|
+++ openal-soft-1.18.2.mod/Alc/alcConfig.c 2019-03-02 02:17:37.066950410 +0200
|
||||
|
@@ -424,7 +424,7 @@
|
||||
|
al_string ppath; |
||||
|
FILE *f; |
||||
|
|
||||
|
- str = "/etc/openal/alsoft.conf";
|
||||
|
+ str = "@TERMUX_PREFIX@/etc/openal/alsoft.conf";
|
||||
|
|
||||
|
TRACE("Loading config %s...\n", str); |
||||
|
f = al_fopen(str, "r"); |
||||
|
@@ -435,7 +435,7 @@
|
||||
|
} |
||||
|
|
||||
|
if(!(str=getenv("XDG_CONFIG_DIRS")) || str[0] == 0) |
||||
|
- str = "/etc/xdg";
|
||||
|
+ str = "@TERMUX_PREFIX@/etc/xdg";
|
||||
|
strncpy(buffer, str, sizeof(buffer)-1); |
||||
|
buffer[sizeof(buffer)-1] = 0; |
||||
|
/* Go through the list in reverse, since "the order of base directories |
@ -0,0 +1,35 @@ |
|||||
|
diff -uNr patch-2.7.6/lib/tempname.c patch-2.7.6.mod/lib/tempname.c
|
||||
|
--- patch-2.7.6/lib/tempname.c 2018-02-03 14:41:53.000000000 +0200
|
||||
|
+++ patch-2.7.6.mod/lib/tempname.c 2019-03-01 18:34:47.353225515 +0200
|
||||
|
@@ -32,7 +32,7 @@
|
||||
|
|
||||
|
#include <stdio.h> |
||||
|
#ifndef P_tmpdir |
||||
|
-# define P_tmpdir "/tmp"
|
||||
|
+# define P_tmpdir "@TERMUX_PREFIX@/tmp"
|
||||
|
#endif |
||||
|
#ifndef TMP_MAX |
||||
|
# define TMP_MAX 238328 |
||||
|
@@ -147,8 +147,8 @@
|
||||
|
{ |
||||
|
if (direxists (P_tmpdir)) |
||||
|
dir = P_tmpdir; |
||||
|
- else if (strcmp (P_tmpdir, "/tmp") != 0 && direxists ("/tmp"))
|
||||
|
- dir = "/tmp";
|
||||
|
+ else if (strcmp (P_tmpdir, "@TERMUX_PREFIX@/tmp") != 0 && direxists ("@TERMUX_PREFIX@/tmp"))
|
||||
|
+ dir = "@TERMUX_PREFIX@/tmp";
|
||||
|
else |
||||
|
{ |
||||
|
__set_errno (ENOENT); |
||||
|
diff -uNr patch-2.7.6/src/util.c patch-2.7.6.mod/src/util.c
|
||||
|
--- patch-2.7.6/src/util.c 2018-02-03 14:41:49.000000000 +0200
|
||||
|
+++ patch-2.7.6.mod/src/util.c 2019-03-01 18:35:00.313283739 +0200
|
||||
|
@@ -1601,7 +1601,7 @@
|
||||
|
} |
||||
|
|
||||
|
#ifndef TMPDIR |
||||
|
-#define TMPDIR "/tmp"
|
||||
|
+#define TMPDIR "@TERMUX_PREFIX@/tmp"
|
||||
|
#endif |
||||
|
|
||||
|
struct try_safe_open_args |
@ -0,0 +1,12 @@ |
|||||
|
diff -uNr pinentry-1.1.0/pinentry/pinentry-emacs.c pinentry-1.1.0.mod/pinentry/pinentry-emacs.c
|
||||
|
--- pinentry-1.1.0/pinentry/pinentry-emacs.c 2017-12-03 18:13:05.000000000 +0200
|
||||
|
+++ pinentry-1.1.0.mod/pinentry/pinentry-emacs.c 2019-03-01 18:38:36.250899637 +0200
|
||||
|
@@ -134,7 +134,7 @@
|
||||
|
} |
||||
|
else |
||||
|
#endif |
||||
|
- tmpdir = "/tmp";
|
||||
|
+ tmpdir = "@TERMUX_PREFIX@/tmp";
|
||||
|
} |
||||
|
|
||||
|
socket_name_storage = malloc (strlen (tmpdir) |
@ -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); |
@ -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 <spawn.h> |
||||
|
if (n && !strchr (x, '|')) { |
@ -0,0 +1,12 @@ |
|||||
|
diff -uNr RHash-1.3.8/parse_cmdline.c RHash-1.3.8.mod/parse_cmdline.c
|
||||
|
--- RHash-1.3.8/parse_cmdline.c 2019-02-04 06:05:28.000000000 +0200
|
||||
|
+++ RHash-1.3.8.mod/parse_cmdline.c 2019-03-01 20:33:22.425704712 +0200
|
||||
|
@@ -547,7 +547,7 @@
|
||||
|
static const char* find_conf_file(void) |
||||
|
{ |
||||
|
#ifndef SYSCONFDIR |
||||
|
-# define SYSCONFDIR "/etc"
|
||||
|
+# define SYSCONFDIR "@TERMUX_PREFIX@/etc"
|
||||
|
#endif |
||||
|
#define CONFIG_FILENAME "rhashrc" |
||||
|
|
@ -0,0 +1,12 @@ |
|||||
|
diff -uNr rsync-3.1.3/rsync.h rsync-3.1.3.mod/rsync.h
|
||||
|
--- rsync-3.1.3/rsync.h 2018-01-15 20:58:31.000000000 +0200
|
||||
|
+++ rsync-3.1.3.mod/rsync.h 2019-03-01 22:40:29.926940976 +0200
|
||||
|
@@ -29,7 +29,7 @@
|
||||
|
/* RSYNCD_SYSCONF is now set in config.h */ |
||||
|
#define RSYNCD_USERCONF "rsyncd.conf" |
||||
|
|
||||
|
-#define DEFAULT_LOCK_FILE "/var/run/rsyncd.lock"
|
||||
|
+#define DEFAULT_LOCK_FILE "@TERMUX_PREFIX@/var/run/rsyncd.lock"
|
||||
|
#define URL_PREFIX "rsync://" |
||||
|
|
||||
|
#define SYMLINK_PREFIX "/rsyncd-munged/" /* This MUST have a trailing slash! */ |
@ -0,0 +1,35 @@ |
|||||
|
diff -uNr tar-1.31/gnu/tempname.c tar-1.31.mod/gnu/tempname.c
|
||||
|
--- tar-1.31/gnu/tempname.c 2019-01-02 20:16:01.000000000 +0200
|
||||
|
+++ tar-1.31.mod/gnu/tempname.c 2019-03-01 18:31:05.035530338 +0200
|
||||
|
@@ -32,7 +32,7 @@
|
||||
|
|
||||
|
#include <stdio.h> |
||||
|
#ifndef P_tmpdir |
||||
|
-# define P_tmpdir "/tmp"
|
||||
|
+# define P_tmpdir "@TERMUX_PREFIX@/tmp"
|
||||
|
#endif |
||||
|
#ifndef TMP_MAX |
||||
|
# define TMP_MAX 238328 |
||||
|
@@ -147,8 +147,8 @@
|
||||
|
{ |
||||
|
if (direxists (P_tmpdir)) |
||||
|
dir = P_tmpdir; |
||||
|
- else if (strcmp (P_tmpdir, "/tmp") != 0 && direxists ("/tmp"))
|
||||
|
- dir = "/tmp";
|
||||
|
+ else if (strcmp (P_tmpdir, "@TERMUX_PREFIX@/tmp") != 0 && direxists ("@TERMUX_PREFIX@/tmp"))
|
||||
|
+ dir = "@TERMUX_PREFIX@/tmp";
|
||||
|
else |
||||
|
{ |
||||
|
__set_errno (ENOENT); |
||||
|
diff -uNr tar-1.31/src/xheader.c tar-1.31.mod/src/xheader.c
|
||||
|
--- tar-1.31/src/xheader.c 2019-01-02 20:07:48.000000000 +0200
|
||||
|
+++ tar-1.31.mod/src/xheader.c 2019-03-01 18:31:18.538927987 +0200
|
||||
|
@@ -387,7 +387,7 @@
|
||||
|
size_t len; |
||||
|
const char *tmp = getenv ("TMPDIR"); |
||||
|
if (!tmp) |
||||
|
- tmp = "/tmp";
|
||||
|
+ tmp = "@TERMUX_PREFIX@/tmp";
|
||||
|
len = strlen (tmp) + sizeof (GLOBAL_HEADER_TEMPLATE); /* Includes nul */ |
||||
|
globexthdr_name = xmalloc (len); |
||||
|
strcpy(globexthdr_name, tmp); |
@ -0,0 +1,423 @@ |
|||||
|
diff -uNr util-linux-2.33.1/include/pathnames.h util-linux-2.33.1.mod/include/pathnames.h
|
||||
|
--- util-linux-2.33.1/include/pathnames.h 2019-01-08 15:58:25.324719638 +0200
|
||||
|
+++ util-linux-2.33.1.mod/include/pathnames.h 2019-03-02 01:26:11.465802555 +0200
|
||||
|
@@ -20,68 +20,58 @@
|
||||
|
|
||||
|
/* DEFPATHs from <paths.h> don't include /usr/local */ |
||||
|
#undef _PATH_DEFPATH |
||||
|
-
|
||||
|
-#ifdef USE_USRDIR_PATHS_ONLY
|
||||
|
-# define _PATH_DEFPATH "/usr/local/bin:/usr/bin"
|
||||
|
-#else
|
||||
|
-# define _PATH_DEFPATH "/usr/local/bin:/bin:/usr/bin"
|
||||
|
-#endif
|
||||
|
+#define _PATH_DEFPATH "@TERMUX_PREFIX@/bin:@TERMUX_PREFIX@/bin/applets"
|
||||
|
|
||||
|
#undef _PATH_DEFPATH_ROOT |
||||
|
-
|
||||
|
-#ifdef USE_USRDIR_PATHS_ONLY
|
||||
|
-# define _PATH_DEFPATH_ROOT "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin"
|
||||
|
-#else
|
||||
|
-# define _PATH_DEFPATH_ROOT "/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin"
|
||||
|
-#endif
|
||||
|
+#define _PATH_DEFPATH_ROOT "@TERMUX_PREFIX@/bin:@TERMUX_PREFIX@/bin/applets"
|
||||
|
|
||||
|
#define _PATH_HUSHLOGIN ".hushlogin" |
||||
|
-#define _PATH_HUSHLOGINS "/etc/hushlogins"
|
||||
|
+#define _PATH_HUSHLOGINS "@TERMUX_PREFIX@/etc/hushlogins"
|
||||
|
|
||||
|
-#define _PATH_NOLOGIN_TXT "/etc/nologin.txt"
|
||||
|
+#define _PATH_NOLOGIN_TXT "@TERMUX_PREFIX@/etc/nologin.txt"
|
||||
|
|
||||
|
#ifndef _PATH_MAILDIR |
||||
|
-# define _PATH_MAILDIR "/var/spool/mail"
|
||||
|
+# define _PATH_MAILDIR "@TERMUX_PREFIX@/var/spool/mail"
|
||||
|
#endif |
||||
|
-#define _PATH_MOTDFILE "/usr/share/misc/motd:/run/motd:/etc/motd"
|
||||
|
+#define _PATH_MOTDFILE "@TERMUX_PREFIX@/share/misc/motd:@TERMUX_PREFIX@/var/run/motd:@TERMUX_PREFIX@/etc/motd"
|
||||
|
#ifndef _PATH_NOLOGIN |
||||
|
-# define _PATH_NOLOGIN "/etc/nologin"
|
||||
|
+# define _PATH_NOLOGIN "@TERMUX_PREFIX@/etc/nologin"
|
||||
|
#endif |
||||
|
-#define _PATH_VAR_NOLOGIN "/var/run/nologin"
|
||||
|
+#define _PATH_VAR_NOLOGIN "@TERMUX_PREFIX@/var/run/nologin"
|
||||
|
|
||||
|
#ifndef _PATH_LOGIN |
||||
|
-# define _PATH_LOGIN "/bin/login"
|
||||
|
+# define _PATH_LOGIN "@TERMUX_PREFIX@/bin/login"
|
||||
|
#endif |
||||
|
-#define _PATH_SHUTDOWN "/sbin/shutdown"
|
||||
|
+#define _PATH_SHUTDOWN "@TERMUX_PREFIX@/bin/shutdown"
|
||||
|
|
||||
|
#define _PATH_TERMCOLORS_DIRNAME "terminal-colors.d" |
||||
|
-#define _PATH_TERMCOLORS_DIR "/etc/" _PATH_TERMCOLORS_DIRNAME
|
||||
|
+#define _PATH_TERMCOLORS_DIR "@TERMUX_PREFIX@/etc/" _PATH_TERMCOLORS_DIRNAME
|
||||
|
|
||||
|
/* login paths */ |
||||
|
-#define _PATH_PASSWD "/etc/passwd"
|
||||
|
-#define _PATH_GSHADOW "/etc/gshadow"
|
||||
|
-#define _PATH_GROUP "/etc/group"
|
||||
|
-#define _PATH_SHADOW_PASSWD "/etc/shadow"
|
||||
|
-#define _PATH_SHELLS "/etc/shells"
|
||||
|
+#define _PATH_PASSWD "@TERMUX_PREFIX@/etc/passwd"
|
||||
|
+#define _PATH_GSHADOW "@TERMUX_PREFIX@/etc/gshadow"
|
||||
|
+#define _PATH_GROUP "@TERMUX_PREFIX@/etc/group"
|
||||
|
+#define _PATH_SHADOW_PASSWD "@TERMUX_PREFIX@/etc/shadow"
|
||||
|
+#define _PATH_SHELLS "@TERMUX_PREFIX@/etc/shells"
|
||||
|
|
||||
|
#ifndef _PATH_BTMP |
||||
|
-# define _PATH_BTMP "/var/log/btmp"
|
||||
|
+# define _PATH_BTMP "@TERMUX_PREFIX@/var/log/btmp"
|
||||
|
#endif |
||||
|
|
||||
|
-#define _PATH_ISSUE "/etc/issue"
|
||||
|
+#define _PATH_ISSUE "@TERMUX_PREFIX@/etc/issue"
|
||||
|
#define _PATH_ISSUEDIR _PATH_ISSUE ".d" |
||||
|
|
||||
|
-#define _PATH_OS_RELEASE_ETC "/etc/os-release"
|
||||
|
-#define _PATH_OS_RELEASE_USR "/usr/lib/os-release"
|
||||
|
+#define _PATH_OS_RELEASE_ETC "@TERMUX_PREFIX@/etc/os-release"
|
||||
|
+#define _PATH_OS_RELEASE_USR "@TERMUX_PREFIX@/lib/os-release"
|
||||
|
#define _PATH_NUMLOCK_ON _PATH_RUNSTATEDIR "/numlock-on" |
||||
|
-#define _PATH_LOGINDEFS "/etc/login.defs"
|
||||
|
+#define _PATH_LOGINDEFS "@TERMUX_PREFIX@/etc/login.defs"
|
||||
|
|
||||
|
/* misc paths */ |
||||
|
-#define _PATH_WORDS "/usr/share/dict/words"
|
||||
|
-#define _PATH_WORDS_ALT "/usr/share/dict/web2"
|
||||
|
+#define _PATH_WORDS "@TERMUX_PREFIX@/share/dict/words"
|
||||
|
+#define _PATH_WORDS_ALT "@TERMUX_PREFIX@/share/dict/web2"
|
||||
|
|
||||
|
/* mount paths */ |
||||
|
-#define _PATH_FILESYSTEMS "/etc/filesystems"
|
||||
|
+#define _PATH_FILESYSTEMS "@TERMUX_PREFIX@/etc/filesystems"
|
||||
|
#define _PATH_PROC_SWAPS "/proc/swaps" |
||||
|
#define _PATH_PROC_FILESYSTEMS "/proc/filesystems" |
||||
|
#define _PATH_PROC_MOUNTS "/proc/mounts" |
||||
|
@@ -112,7 +102,7 @@
|
||||
|
# ifdef MOUNTED /* deprecated */ |
||||
|
# define _PATH_MOUNTED MOUNTED |
||||
|
# else |
||||
|
-# define _PATH_MOUNTED "/etc/mtab"
|
||||
|
+# define _PATH_MOUNTED "@TERMUX_PREFIX@/etc/mtab"
|
||||
|
# endif |
||||
|
#endif |
||||
|
|
||||
|
@@ -120,7 +110,7 @@
|
||||
|
# ifdef MNTTAB /* deprecated */ |
||||
|
# define _PATH_MNTTAB MNTTAB |
||||
|
# else |
||||
|
-# define _PATH_MNTTAB "/etc/fstab"
|
||||
|
+# define _PATH_MNTTAB "@TERMUX_PREFIX@/etc/fstab"
|
||||
|
# endif |
||||
|
#endif |
||||
|
|
||||
|
@@ -147,11 +137,7 @@
|
||||
|
#define _PATH_DEV_BYPARTUUID "/dev/disk/by-partuuid" |
||||
|
|
||||
|
/* hwclock paths */ |
||||
|
-#ifdef CONFIG_ADJTIME_PATH
|
||||
|
-# define _PATH_ADJTIME CONFIG_ADJTIME_PATH
|
||||
|
-#else
|
||||
|
-# define _PATH_ADJTIME "/etc/adjtime"
|
||||
|
-#endif
|
||||
|
+#define _PATH_ADJTIME "@TERMUX_PREFIX@/etc/adjtime"
|
||||
|
|
||||
|
#ifdef __ia64__ |
||||
|
# define _PATH_RTC_DEV "/dev/efirtc" |
||||
|
diff -uNr util-linux-2.33.1/lib/exec_shell.c util-linux-2.33.1.mod/lib/exec_shell.c
|
||||
|
--- util-linux-2.33.1/lib/exec_shell.c 2018-09-20 15:38:55.851404915 +0300
|
||||
|
+++ util-linux-2.33.1.mod/lib/exec_shell.c 2019-03-02 01:26:11.469135901 +0200
|
||||
|
@@ -28,7 +28,7 @@
|
||||
|
|
||||
|
#include "exec_shell.h" |
||||
|
|
||||
|
-#define DEFAULT_SHELL "/bin/sh"
|
||||
|
+#define DEFAULT_SHELL "@TERMUX_PREFIX@/bin/sh"
|
||||
|
|
||||
|
void __attribute__((__noreturn__)) exec_shell(void) |
||||
|
{ |
||||
|
diff -uNr util-linux-2.33.1/libblkid/src/blkidP.h util-linux-2.33.1.mod/libblkid/src/blkidP.h
|
||||
|
--- util-linux-2.33.1/libblkid/src/blkidP.h 2018-09-20 15:38:55.853404903 +0300
|
||||
|
+++ util-linux-2.33.1.mod/libblkid/src/blkidP.h 2019-03-02 01:26:11.469135901 +0200
|
||||
|
@@ -288,7 +288,7 @@
|
||||
|
#define BLKID_BIC_FL_CHANGED 0x0004 /* Cache has changed from disk */ |
||||
|
|
||||
|
/* config file */ |
||||
|
-#define BLKID_CONFIG_FILE "/etc/blkid.conf"
|
||||
|
+#define BLKID_CONFIG_FILE "@TERMUX_PREFIX@/etc/blkid.conf"
|
||||
|
|
||||
|
/* cache file on systemds with /run */ |
||||
|
#define BLKID_RUNTIME_TOPDIR "/run" |
||||
|
@@ -296,7 +296,7 @@
|
||||
|
#define BLKID_CACHE_FILE BLKID_RUNTIME_DIR "/blkid.tab" |
||||
|
|
||||
|
/* old systems */ |
||||
|
-#define BLKID_CACHE_FILE_OLD "/etc/blkid.tab"
|
||||
|
+#define BLKID_CACHE_FILE_OLD "@TERMUX_PREFIX@/etc/blkid.tab"
|
||||
|
|
||||
|
#define BLKID_PROBE_OK 0 |
||||
|
#define BLKID_PROBE_NONE 1 |
||||
|
diff -uNr util-linux-2.33.1/libblkid/src/topology/dm.c util-linux-2.33.1.mod/libblkid/src/topology/dm.c
|
||||
|
--- util-linux-2.33.1/libblkid/src/topology/dm.c 2018-09-20 15:38:55.856404884 +0300
|
||||
|
+++ util-linux-2.33.1.mod/libblkid/src/topology/dm.c 2019-03-02 01:27:49.282834302 +0200
|
||||
|
@@ -30,9 +30,8 @@
|
||||
|
const struct blkid_idmag *mag __attribute__((__unused__))) |
||||
|
{ |
||||
|
const char *paths[] = { |
||||
|
- "/usr/local/sbin/dmsetup",
|
||||
|
- "/usr/sbin/dmsetup",
|
||||
|
- "/sbin/dmsetup"
|
||||
|
+ "@TERMUX_PREFIX@/bin/dmsetup",
|
||||
|
+ "@TERMUX_PREFIX@/sbin/dmsetup"
|
||||
|
}; |
||||
|
int dmpipe[] = { -1, -1 }, stripes, stripesize; |
||||
|
const char *cmd = NULL; |
||||
|
diff -uNr util-linux-2.33.1/libblkid/src/topology/lvm.c util-linux-2.33.1.mod/libblkid/src/topology/lvm.c
|
||||
|
--- util-linux-2.33.1/libblkid/src/topology/lvm.c 2017-09-18 12:48:03.563891490 +0300
|
||||
|
+++ util-linux-2.33.1.mod/libblkid/src/topology/lvm.c 2019-03-02 01:28:56.036419326 +0200
|
||||
|
@@ -36,9 +36,8 @@
|
||||
|
const struct blkid_idmag *mag __attribute__((__unused__))) |
||||
|
{ |
||||
|
const char *paths[] = { |
||||
|
- "/usr/local/sbin/lvdisplay",
|
||||
|
- "/usr/sbin/lvdisplay",
|
||||
|
- "/sbin/lvdisplay"
|
||||
|
+ "@TERMUX_PREFIX@/bin/lvdisplay",
|
||||
|
+ "@TERMUX_PREFIX@/sbin/lvdisplay"
|
||||
|
}; |
||||
|
int lvpipe[] = { -1, -1 }, stripes = 0, stripesize = 0; |
||||
|
FILE *stream = NULL; |
||||
|
diff -uNr util-linux-2.33.1/libuuid/src/uuidd.h util-linux-2.33.1.mod/libuuid/src/uuidd.h
|
||||
|
--- util-linux-2.33.1/libuuid/src/uuidd.h 2018-06-04 10:57:02.806445781 +0300
|
||||
|
+++ util-linux-2.33.1.mod/libuuid/src/uuidd.h 2019-03-02 01:28:28.309647886 +0200
|
||||
|
@@ -38,7 +38,7 @@
|
||||
|
#define UUIDD_DIR _PATH_RUNSTATEDIR "/uuidd" |
||||
|
#define UUIDD_SOCKET_PATH UUIDD_DIR "/request" |
||||
|
#define UUIDD_PIDFILE_PATH UUIDD_DIR "/uuidd.pid" |
||||
|
-#define UUIDD_PATH "/usr/sbin/uuidd"
|
||||
|
+#define UUIDD_PATH "@TERMUX_PREFIX@/bin/uuidd"
|
||||
|
|
||||
|
#define UUIDD_OP_GETPID 0 |
||||
|
#define UUIDD_OP_GET_MAXOP 1 |
||||
|
diff -uNr util-linux-2.33.1/libuuid/src/uuidP.h util-linux-2.33.1.mod/libuuid/src/uuidP.h
|
||||
|
--- util-linux-2.33.1/libuuid/src/uuidP.h 2018-09-20 15:38:55.870404799 +0300
|
||||
|
+++ util-linux-2.33.1.mod/libuuid/src/uuidP.h 2019-03-02 01:29:29.103211342 +0200
|
||||
|
@@ -37,7 +37,7 @@
|
||||
|
|
||||
|
#include "uuid.h" |
||||
|
|
||||
|
-#define LIBUUID_CLOCK_FILE "/var/lib/libuuid/clock.txt"
|
||||
|
+#define LIBUUID_CLOCK_FILE "@TERMUX_PREFIX@/var/lib/libuuid/clock.txt"
|
||||
|
|
||||
|
/* |
||||
|
* Offset between 15-Oct-1582 and 1-Jan-70 |
||||
|
diff -uNr util-linux-2.33.1/login-utils/login.c util-linux-2.33.1.mod/login-utils/login.c
|
||||
|
--- util-linux-2.33.1/login-utils/login.c 2018-12-07 13:31:45.441532191 +0200
|
||||
|
+++ util-linux-2.33.1.mod/login-utils/login.c 2019-03-02 01:26:11.469135901 +0200
|
||||
|
@@ -1358,7 +1358,7 @@
|
||||
|
|
||||
|
strcpy(buff, "exec "); |
||||
|
strcat(buff, pwd->pw_shell); |
||||
|
- childArgv[childArgc++] = "/bin/sh";
|
||||
|
+ childArgv[childArgc++] = "@TERMUX_PREFIX@/bin/sh";
|
||||
|
childArgv[childArgc++] = "-sh"; |
||||
|
childArgv[childArgc++] = "-c"; |
||||
|
childArgv[childArgc++] = buff; |
||||
|
@@ -1377,7 +1377,7 @@
|
||||
|
|
||||
|
execvp(childArgv[0], childArgv + 1); |
||||
|
|
||||
|
- if (!strcmp(childArgv[0], "/bin/sh"))
|
||||
|
+ if (!strcmp(childArgv[0], "@TERMUX_PREFIX@/bin/sh"))
|
||||
|
warn(_("couldn't exec shell script")); |
||||
|
else |
||||
|
warn(_("no shell")); |
||||
|
diff -uNr util-linux-2.33.1/login-utils/su-common.c util-linux-2.33.1.mod/login-utils/su-common.c
|
||||
|
--- util-linux-2.33.1/login-utils/su-common.c 2018-12-07 13:31:45.441532191 +0200
|
||||
|
+++ util-linux-2.33.1.mod/login-utils/su-common.c 2019-03-02 01:26:11.472469247 +0200
|
||||
|
@@ -96,7 +96,7 @@
|
||||
|
#define is_pam_failure(_rc) ((_rc) != PAM_SUCCESS) |
||||
|
|
||||
|
/* The shell to run if none is given in the user's passwd entry. */ |
||||
|
-#define DEFAULT_SHELL "/bin/sh"
|
||||
|
+#define DEFAULT_SHELL "@TERMUX_PREFIX@/bin/sh"
|
||||
|
|
||||
|
/* The user to become if none is specified. */ |
||||
|
#define DEFAULT_USER "root" |
||||
|
diff -uNr util-linux-2.33.1/login-utils/sulogin.c util-linux-2.33.1.mod/login-utils/sulogin.c
|
||||
|
--- util-linux-2.33.1/login-utils/sulogin.c 2018-09-20 15:38:55.873404781 +0300
|
||||
|
+++ util-linux-2.33.1.mod/login-utils/sulogin.c 2019-03-02 01:26:11.475802592 +0200
|
||||
|
@@ -742,7 +742,7 @@
|
||||
|
if (pwd->pw_shell[0]) |
||||
|
su_shell = pwd->pw_shell; |
||||
|
else |
||||
|
- su_shell = "/bin/sh";
|
||||
|
+ su_shell = "@TERMUX_PREFIX@/bin/sh";
|
||||
|
} |
||||
|
if ((p = strrchr(su_shell, '/')) == NULL) |
||||
|
p = su_shell; |
||||
|
@@ -791,9 +791,9 @@
|
||||
|
execl(su_shell, shell, NULL); |
||||
|
warn(_("failed to execute %s"), su_shell); |
||||
|
|
||||
|
- xsetenv("SHELL", "/bin/sh", 1);
|
||||
|
- execl("/bin/sh", profile ? "-sh" : "sh", NULL);
|
||||
|
- warn(_("failed to execute %s"), "/bin/sh");
|
||||
|
+ xsetenv("SHELL", "@TERMUX_PREFIX@/bin/sh", 1);
|
||||
|
+ execl("@TERMUX_PREFIX@/bin/sh", profile ? "-sh" : "sh", NULL);
|
||||
|
+ warn(_("failed to execute %s"), "@TERMUX_PREFIX@/bin/sh");
|
||||
|
} |
||||
|
|
||||
|
static void usage(void) |
||||
|
diff -uNr util-linux-2.33.1/misc-utils/whereis.c util-linux-2.33.1.mod/misc-utils/whereis.c
|
||||
|
--- util-linux-2.33.1/misc-utils/whereis.c 2018-06-04 10:57:02.811445742 +0300
|
||||
|
+++ util-linux-2.33.1.mod/misc-utils/whereis.c 2019-03-02 01:26:11.475802592 +0200
|
||||
|
@@ -97,82 +97,23 @@
|
||||
|
}; |
||||
|
|
||||
|
static const char *bindirs[] = { |
||||
|
- "/usr/bin",
|
||||
|
- "/usr/sbin",
|
||||
|
-#if defined(MULTIARCHTRIPLET)
|
||||
|
- "/lib/" MULTIARCHTRIPLET,
|
||||
|
- "/usr/lib/" MULTIARCHTRIPLET,
|
||||
|
- "/usr/local/lib/" MULTIARCHTRIPLET,
|
||||
|
-#endif
|
||||
|
- "/usr/lib",
|
||||
|
- "/usr/lib64",
|
||||
|
- "/bin",
|
||||
|
+ "@TERMUX_PREFIX@/bin",
|
||||
|
+ "@TERMUX_PREFIX@/bin/applets",
|
||||
|
+ "@TERMUX_PREFIX@/libexec",
|
||||
|
"/sbin", |
||||
|
- "/etc",
|
||||
|
- "/usr/etc",
|
||||
|
- "/lib",
|
||||
|
- "/lib64",
|
||||
|
- "/usr/games",
|
||||
|
- "/usr/games/bin",
|
||||
|
- "/usr/games/lib",
|
||||
|
- "/usr/emacs/etc",
|
||||
|
- "/usr/lib/emacs/*/etc",
|
||||
|
- "/usr/TeX/bin",
|
||||
|
- "/usr/tex/bin",
|
||||
|
- "/usr/interviews/bin/LINUX",
|
||||
|
-
|
||||
|
- "/usr/X11R6/bin",
|
||||
|
- "/usr/X386/bin",
|
||||
|
- "/usr/bin/X11",
|
||||
|
- "/usr/X11/bin",
|
||||
|
- "/usr/X11R5/bin",
|
||||
|
-
|
||||
|
- "/usr/local/bin",
|
||||
|
- "/usr/local/sbin",
|
||||
|
- "/usr/local/etc",
|
||||
|
- "/usr/local/lib",
|
||||
|
- "/usr/local/games",
|
||||
|
- "/usr/local/games/bin",
|
||||
|
- "/usr/local/emacs/etc",
|
||||
|
- "/usr/local/TeX/bin",
|
||||
|
- "/usr/local/tex/bin",
|
||||
|
- "/usr/local/bin/X11",
|
||||
|
-
|
||||
|
- "/usr/contrib",
|
||||
|
- "/usr/hosts",
|
||||
|
- "/usr/include",
|
||||
|
-
|
||||
|
- "/usr/g++-include",
|
||||
|
-
|
||||
|
- "/usr/ucb",
|
||||
|
- "/usr/old",
|
||||
|
- "/usr/new",
|
||||
|
- "/usr/local",
|
||||
|
- "/usr/libexec",
|
||||
|
- "/usr/share",
|
||||
|
-
|
||||
|
- "/opt/*/bin",
|
||||
|
+ "/system/bin",
|
||||
|
+ "/system/xbin",
|
||||
|
NULL |
||||
|
}; |
||||
|
|
||||
|
static const char *mandirs[] = { |
||||
|
- "/usr/man/*",
|
||||
|
- "/usr/share/man/*",
|
||||
|
- "/usr/X386/man/*",
|
||||
|
- "/usr/X11/man/*",
|
||||
|
- "/usr/TeX/man/*",
|
||||
|
- "/usr/interviews/man/mann",
|
||||
|
- "/usr/share/info",
|
||||
|
+ "@TERMUX_PREFIX@/share/man/*",
|
||||
|
+ "@TERMUX_PREFIX@/share/info",
|
||||
|
NULL |
||||
|
}; |
||||
|
|
||||
|
static const char *srcdirs[] = { |
||||
|
- "/usr/src/*",
|
||||
|
- "/usr/src/lib/libc/*",
|
||||
|
- "/usr/src/lib/libc/net/*",
|
||||
|
- "/usr/src/ucb/pascal",
|
||||
|
- "/usr/src/ucb/pascal/utilities",
|
||||
|
- "/usr/src/undoc",
|
||||
|
+ "@TERMUX_PREFIX@/src",
|
||||
|
NULL |
||||
|
}; |
||||
|
|
||||
|
diff -uNr util-linux-2.33.1/sys-utils/setarch.c util-linux-2.33.1.mod/sys-utils/setarch.c
|
||||
|
--- util-linux-2.33.1/sys-utils/setarch.c 2019-01-04 12:19:16.258737400 +0200
|
||||
|
+++ util-linux-2.33.1.mod/sys-utils/setarch.c 2019-03-02 01:26:44.309257925 +0200
|
||||
|
@@ -315,7 +315,7 @@
|
||||
|
/* Don't use ifdef sparc here, we get "Unrecognized architecture" |
||||
|
* error message later if necessary */ |
||||
|
if (strcmp(arch, "sparc32bash") == 0) { |
||||
|
- shell = "/bin/bash";
|
||||
|
+ shell = "@TERMUX_PREFIX@/bin/bash";
|
||||
|
shell_arg = ""; |
||||
|
goto set_arch; |
||||
|
} |
||||
|
@@ -425,7 +425,7 @@
|
||||
|
verify_arch_domain(target, arch); |
||||
|
|
||||
|
if (!argc) { |
||||
|
- shell = "/bin/sh";
|
||||
|
+ shell = "@TERMUX_PREFIX@/bin/sh";
|
||||
|
shell_arg = "-sh"; |
||||
|
} |
||||
|
if (verbose) { |
||||
|
diff -uNr util-linux-2.33.1/sys-utils/setpriv.c util-linux-2.33.1.mod/sys-utils/setpriv.c
|
||||
|
--- util-linux-2.33.1/sys-utils/setpriv.c 2019-01-04 12:47:44.026147542 +0200
|
||||
|
+++ util-linux-2.33.1.mod/sys-utils/setpriv.c 2019-03-02 01:26:11.479135938 +0200
|
||||
|
@@ -58,7 +58,7 @@
|
||||
|
#define SETPRIV_EXIT_PRIVERR 127 /* how we exit when we fail to set privs */ |
||||
|
|
||||
|
/* The shell to set SHELL env.variable if none is given in the user's passwd entry. */ |
||||
|
-#define DEFAULT_SHELL "/bin/sh"
|
||||
|
+#define DEFAULT_SHELL "@TERMUX_PREFIX@/bin/sh"
|
||||
|
|
||||
|
static gid_t get_group(const char *s, const char *err); |
||||
|
|
||||
|
diff -uNr util-linux-2.33.1/text-utils/more.c util-linux-2.33.1.mod/text-utils/more.c
|
||||
|
--- util-linux-2.33.1/text-utils/more.c 2018-09-20 15:38:55.990404066 +0300
|
||||
|
+++ util-linux-2.33.1.mod/text-utils/more.c 2019-03-02 01:26:11.479135938 +0200
|
||||
|
@@ -1877,7 +1877,7 @@
|
||||
|
|
||||
|
} |
||||
|
if ((ctl->shell = getenv("SHELL")) == NULL) |
||||
|
- ctl->shell = "/bin/sh";
|
||||
|
+ ctl->shell = "@TERMUX_PREFIX@/bin/sh";
|
||||
|
} |
||||
|
ctl->no_tty_in = tcgetattr(STDIN_FILENO, &ctl->output_tty); |
||||
|
tcgetattr(STDERR_FILENO, &ctl->output_tty); |
||||
|
diff -uNr util-linux-2.33.1/text-utils/pg.c util-linux-2.33.1.mod/text-utils/pg.c
|
||||
|
--- util-linux-2.33.1/text-utils/pg.c 2018-06-04 10:57:02.900445049 +0300
|
||||
|
+++ util-linux-2.33.1.mod/text-utils/pg.c 2019-03-02 01:26:11.482469284 +0200
|
||||
|
@@ -1365,7 +1365,7 @@
|
||||
|
{ |
||||
|
const char *sh = getenv("SHELL"); |
||||
|
if (!sh) |
||||
|
- sh = "/bin/sh";
|
||||
|
+ sh = "@TERMUX_PREFIX@/bin/sh";
|
||||
|
if (!nobuf) |
||||
|
fclose(fbuf); |
||||
|
fclose(find); |
@ -0,0 +1,46 @@ |
|||||
|
diff -uNr wget-1.20.1/lib/tempname.c wget-1.20.1.mod/lib/tempname.c
|
||||
|
--- wget-1.20.1/lib/tempname.c 2018-12-26 22:08:19.000000000 +0200
|
||||
|
+++ wget-1.20.1.mod/lib/tempname.c 2019-03-01 18:28:01.751293299 +0200
|
||||
|
@@ -32,7 +32,7 @@
|
||||
|
|
||||
|
#include <stdio.h> |
||||
|
#ifndef P_tmpdir |
||||
|
-# define P_tmpdir "/tmp"
|
||||
|
+# define P_tmpdir "@TERMUX_PREFIX@/tmp"
|
||||
|
#endif |
||||
|
#ifndef TMP_MAX |
||||
|
# define TMP_MAX 238328 |
||||
|
@@ -147,8 +147,8 @@
|
||||
|
{ |
||||
|
if (direxists (P_tmpdir)) |
||||
|
dir = P_tmpdir; |
||||
|
- else if (strcmp (P_tmpdir, "/tmp") != 0 && direxists ("/tmp"))
|
||||
|
- dir = "/tmp";
|
||||
|
+ else if (strcmp (P_tmpdir, "@TERMUX_PREFIX@/tmp") != 0 && direxists ("@TERMUX_PREFIX@/tmp"))
|
||||
|
+ dir = "@TERMUX_PREFIX@/tmp";
|
||||
|
else |
||||
|
{ |
||||
|
__set_errno (ENOENT); |
||||
|
diff -uNr wget-1.20.1/lib/tmpdir.c wget-1.20.1.mod/lib/tmpdir.c
|
||||
|
--- wget-1.20.1/lib/tmpdir.c 2018-12-26 22:08:19.000000000 +0200
|
||||
|
+++ wget-1.20.1.mod/lib/tmpdir.c 2019-03-01 18:27:22.434424043 +0200
|
||||
|
@@ -36,7 +36,7 @@
|
||||
|
# ifdef _P_tmpdir /* native Windows */ |
||||
|
# define P_tmpdir _P_tmpdir |
||||
|
# else |
||||
|
-# define P_tmpdir "/tmp"
|
||||
|
+# define P_tmpdir "@TERMUX_PREFIX@/tmp"
|
||||
|
# endif |
||||
|
#endif |
||||
|
|
||||
|
@@ -130,8 +130,8 @@
|
||||
|
#endif |
||||
|
if (direxists (P_tmpdir)) |
||||
|
dir = P_tmpdir; |
||||
|
- else if (strcmp (P_tmpdir, "/tmp") != 0 && direxists ("/tmp"))
|
||||
|
- dir = "/tmp";
|
||||
|
+ else if (strcmp (P_tmpdir, "@TERMUX_PREFIX@/tmp") != 0 && direxists ("@TERMUX_PREFIX@/tmp"))
|
||||
|
+ dir = "@TERMUX_PREFIX@/tmp";
|
||||
|
else |
||||
|
{ |
||||
|
__set_errno (ENOENT); |
Loading…
Reference in new issue