Files
termux-packages/packages/postgresql/0000-fix-hardcoded-paths.patch
termux-pacman-bot e077f0a00a bump(main/postgresql): 16.1 (#18567)
* Remove no-hard-link.patch
  See eb64ceac7e

* Enable contrib tablefunc

* Enable more make parallel builds

* Fix libxml build issue
2023-11-29 02:35:05 +00:00

92 lines
2.4 KiB
Diff

--- a/contrib/pg_trgm/trgm_regexp.c
+++ b/contrib/pg_trgm/trgm_regexp.c
@@ -2193,7 +2193,7 @@
{
/* dot -Tpng -o /tmp/source.png < /tmp/source.gv */
- FILE *fp = fopen("/tmp/source.gv", "w");
+ FILE *fp = fopen("@TERMUX_PREFIX@/tmp/source.gv", "w");
fprintf(fp, "%s", buf.data);
fclose(fp);
@@ -2255,7 +2255,7 @@
{
/* dot -Tpng -o /tmp/transformed.png < /tmp/transformed.gv */
- FILE *fp = fopen("/tmp/transformed.gv", "w");
+ FILE *fp = fopen("@TERMUX_PREFIX@/tmp/transformed.gv", "w");
fprintf(fp, "%s", buf.data);
fclose(fp);
@@ -2346,7 +2346,7 @@
{
/* dot -Tpng -o /tmp/packed.png < /tmp/packed.gv */
- FILE *fp = fopen("/tmp/packed.gv", "w");
+ FILE *fp = fopen("@TERMUX_PREFIX@/tmp/packed.gv", "w");
fprintf(fp, "%s", buf.data);
fclose(fp);
--- a/src/bin/pg_ctl/pg_ctl.c
+++ b/src/bin/pg_ctl/pg_ctl.c
@@ -494,7 +494,7 @@
cmd = psprintf("exec \"%s\" %s%s < \"%s\" 2>&1",
exec_path, pgdata_opt, post_opts, DEVNULL);
- (void) execl("/bin/sh", "/bin/sh", "-c", cmd, (char *) NULL);
+ (void) execl("@TERMUX_PREFIX@/bin/sh", "@TERMUX_PREFIX@/bin/sh", "-c", cmd, (char *) NULL);
/* exec failed */
write_stderr(_("%s: could not start server: %s\n"),
--- a/src/bin/pg_upgrade/check.c
+++ b/src/bin/pg_upgrade/check.c
@@ -481,7 +481,7 @@
#ifndef WIN32
/* add shebang header */
- fprintf(script, "#!/bin/sh\n\n");
+ fprintf(script, "#!@TERMUX_PREFIX@/bin/sh\n\n");
#endif
/* delete old cluster's default tablespace */
--- a/src/bin/psql/command.c
+++ b/src/bin/psql/command.c
@@ -3978,7 +3978,7 @@
if (result == -1)
pg_log_error("could not start editor \"%s\"", editorName);
else if (result == 127)
- pg_log_error("could not start /bin/sh");
+ pg_log_error("could not start @TERMUX_PREFIX@/bin/sh");
free(sys);
return result == 0;
@@ -4020,7 +4020,7 @@
const char *tmpdir = getenv("TMPDIR");
if (!tmpdir)
- tmpdir = "/tmp";
+ tmpdir = "@TERMUX_PREFIX@/tmp";
#else
char tmpdir[MAXPGPATH];
int ret;
@@ -5087,7 +5087,7 @@
#ifndef WIN32
-#define DEFAULT_SHELL "/bin/sh"
+#define DEFAULT_SHELL "@TERMUX_PREFIX@/bin/sh"
#else
/*
* CMD.EXE is in different places in different Win32 releases so we
--- a/src/include/pg_config_manual.h
+++ b/src/include/pg_config_manual.h
@@ -206,7 +206,7 @@
* support them yet.
*/
#ifndef WIN32
-#define DEFAULT_PGSOCKET_DIR "/tmp"
+#define DEFAULT_PGSOCKET_DIR "@TERMUX_PREFIX@/tmp"
#else
#define DEFAULT_PGSOCKET_DIR ""
#endif