perl: Bump build revision after patch added
[termux-packages] / disabled-packages / postgresql / tempdir-fix.patch.old
CommitLineData
f8cb5237
VB
1diff -ruN src1/contrib/pg_trgm/trgm_regexp.c src/contrib/pg_trgm/trgm_regexp.c
2--- src1/contrib/pg_trgm/trgm_regexp.c 2017-01-24 09:07:07.582306509 +0530
3+++ src/contrib/pg_trgm/trgm_regexp.c 2017-01-24 09:08:42.581520771 +0530
4@@ -2078,8 +2078,8 @@
5 appendStringInfoString(&buf, "}\n");
6
7 {
8- /* dot -Tpng -o /tmp/source.png < /tmp/source.dot */
9- FILE *fp = fopen("/tmp/source.dot", "w");
10+ /* dot -Tpng -o /data/data/com.termux/files/usr/tmp/source.png < /data/data/com.termux/files/usr/tmp/source.dot */
11+ FILE *fp = fopen("/data/data/com.termux/files/usr/tmp/source.dot", "w");
12
13 fprintf(fp, "%s", buf.data);
14 fclose(fp);
15@@ -2140,8 +2140,8 @@
16 appendStringInfoString(&buf, "}\n");
17
18 {
19- /* dot -Tpng -o /tmp/transformed.png < /tmp/transformed.dot */
20- FILE *fp = fopen("/tmp/transformed.dot", "w");
21+ /* dot -Tpng -o /data/data/com.termux/files/usr/tmp/transformed.png < /data/data/com.termux/files/usr/tmp/transformed.dot */
22+ FILE *fp = fopen("/data/data/com.termux/files/usr/tmp/transformed.dot", "w");
23
24 fprintf(fp, "%s", buf.data);
25 fclose(fp);
26@@ -2231,8 +2231,8 @@
27 appendStringInfoString(&buf, "}\n");
28
29 {
30- /* dot -Tpng -o /tmp/packed.png < /tmp/packed.dot */
31- FILE *fp = fopen("/tmp/packed.dot", "w");
32+ /* dot -Tpng -o /data/data/com.termux/files/usr/tmp/packed.png < /data/data/com.termux/files/usr/tmp/packed.dot */
33+ FILE *fp = fopen("/data/data/com.termux/files/usr/tmp/packed.dot", "w");
34
35 fprintf(fp, "%s", buf.data);
36 fclose(fp);
37diff -ruN src1/doc/src/sgml/html/lo-funcs.html src/doc/src/sgml/html/lo-funcs.html
38--- src1/doc/src/sgml/html/lo-funcs.html 2017-01-24 09:07:07.685638972 +0530
39+++ src/doc/src/sgml/html/lo-funcs.html 2017-01-24 09:08:39.621544794 +0530
40@@ -320,7 +320,7 @@
41 INSERT INTO image (name, raster) -- same as above, but specify OID to use
42 VALUES ('beautiful image', lo_import('/etc/motd', 68583));
43
44-SELECT lo_export(image.raster, '/tmp/motd') FROM image
45+SELECT lo_export(image.raster, '/data/data/com.termux/files/usr/tmp/motd') FROM image
46 WHERE name = 'beautiful image';</PRE
47 ><P>
48 </P
49diff -ruN src1/doc/src/sgml/html/pgstandby.html src/doc/src/sgml/html/pgstandby.html
50--- src1/doc/src/sgml/html/pgstandby.html 2017-01-24 09:07:07.662305836 +0530
51+++ src/doc/src/sgml/html/pgstandby.html 2017-01-24 09:08:39.921542358 +0530
52@@ -494,7 +494,7 @@
53 when multiple servers exist on the same system; for example
54 <TT
55 CLASS="FILENAME"
56->/tmp/pgsql.trigger.5432</TT
57+>/data/data/com.termux/files/usr/tmp/pgsql.trigger.5432</TT
58 >.
59 </P
60 ></DD
61@@ -631,9 +631,9 @@
62 CLASS="PROGRAMLISTING"
63 >archive_command = 'cp %p .../archive/%f'
64
65-restore_command = 'pg_standby -d -s 2 -t /tmp/pgsql.trigger.5442 .../archive %f %p %r 2&#62;&#62;standby.log'
66+restore_command = 'pg_standby -d -s 2 -t /data/data/com.termux/files/usr/tmp/pgsql.trigger.5442 .../archive %f %p %r 2&#62;&#62;standby.log'
67
68-recovery_end_command = 'rm -f /tmp/pgsql.trigger.5442'</PRE
69+recovery_end_command = 'rm -f /data/data/com.termux/files/usr/tmp/pgsql.trigger.5442'</PRE
70 ><P>
71 where the archive directory is physically located on the standby server,
72 so that the <TT
73@@ -666,7 +666,7 @@
74 > stop waiting only when a trigger file called
75 <TT
76 CLASS="FILENAME"
77->/tmp/pgsql.trigger.5442</TT
78+>/data/data/com.termux/files/usr/tmp/pgsql.trigger.5442</TT
79 > appears,
80 and perform failover according to its content
81 </P
82diff -ruN src1/doc/src/sgml/html/plperl-trusted.html src/doc/src/sgml/html/plperl-trusted.html
83--- src1/doc/src/sgml/html/plperl-trusted.html 2017-01-24 09:07:07.695638888 +0530
84+++ src/doc/src/sgml/html/plperl-trusted.html 2017-01-24 09:08:39.861542845 +0530
85@@ -126,7 +126,7 @@
86 </P><PRE
87 CLASS="PROGRAMLISTING"
88 >CREATE FUNCTION badfunc() RETURNS integer AS $$
89- my $tmpfile = "/tmp/badfile";
90+ my $tmpfile = "/data/data/com.termux/files/usr/tmp/badfile";
91 open my $fh, '&gt;', $tmpfile
92 or elog(ERROR, qq{could not open the file "$tmpfile": $!});
93 print $fh "Testing writing to a file\n";
94diff -ruN src1/doc/src/sgml/html/preventing-server-spoofing.html src/doc/src/sgml/html/preventing-server-spoofing.html
95--- src1/doc/src/sgml/html/preventing-server-spoofing.html 2017-01-24 09:07:07.692305583 +0530
96+++ src/doc/src/sgml/html/preventing-server-spoofing.html 2017-01-24 09:08:41.148199067 +0530
97@@ -127,7 +127,7 @@
98 socket file and hence be vulnerable to spoofing, during operating system
99 startup create a symbolic link <TT
100 CLASS="FILENAME"
101->/tmp/.s.PGSQL.5432</TT
102+>/data/data/com.termux/files/usr/tmp/.s.PGSQL.5432</TT
103 > that points
104 to the relocated socket file. You also might need to modify your
105 <TT
106diff -ruN src1/doc/src/sgml/html/server-start.html src/doc/src/sgml/html/server-start.html
107--- src1/doc/src/sgml/html/server-start.html 2017-01-24 09:07:07.688972278 +0530
108+++ src/doc/src/sgml/html/server-start.html 2017-01-24 09:08:41.151532373 +0530
109@@ -607,7 +607,7 @@
110 CLASS="SCREEN"
111 >psql: could not connect to server: No such file or directory
112 Is the server running locally and accepting
113- connections on Unix domain socket "/tmp/.s.PGSQL.5432"?</PRE
114+ connections on Unix domain socket "/data/data/com.termux/files/usr/tmp/.s.PGSQL.5432"?</PRE
115 ><P>
116 </P
117 ><P
118diff -ruN src1/doc/src/sgml/html/tutorial-createdb.html src/doc/src/sgml/html/tutorial-createdb.html
119--- src1/doc/src/sgml/html/tutorial-createdb.html 2017-01-24 09:07:07.685638972 +0530
120+++ src/doc/src/sgml/html/tutorial-createdb.html 2017-01-24 09:08:39.284880862 +0530
121@@ -161,7 +161,7 @@
122 CLASS="SCREEN"
123 >createdb: could not connect to database postgres: could not connect to server: No such file or directory
124 Is the server running locally and accepting
125- connections on Unix domain socket "/tmp/.s.PGSQL.5432"?</PRE
126+ connections on Unix domain socket "/data/data/com.termux/files/usr/tmp/.s.PGSQL.5432"?</PRE
127 ><P>
128 This means that the server was not started, or it was not started
129 where <TT
130diff -ruN src1/doc/src/sgml/lobj.sgml src/doc/src/sgml/lobj.sgml
131--- src1/doc/src/sgml/lobj.sgml 2017-01-24 09:07:07.712305414 +0530
132+++ src/doc/src/sgml/lobj.sgml 2017-01-24 09:08:38.018224484 +0530
133@@ -624,7 +624,7 @@
134 INSERT INTO image (name, raster) -- same as above, but specify OID to use
135 VALUES ('beautiful image', lo_import('/etc/motd', 68583));
136
137-SELECT lo_export(image.raster, '/tmp/motd') FROM image
138+SELECT lo_export(image.raster, '/data/data/com.termux/files/usr/tmp/motd') FROM image
139 WHERE name = 'beautiful image';
140 </programlisting>
141 </para>
142diff -ruN src1/doc/src/sgml/man1/pg_standby.1 src/doc/src/sgml/man1/pg_standby.1
143--- src1/doc/src/sgml/man1/pg_standby.1 2017-01-24 09:07:07.605639646 +0530
144+++ src/doc/src/sgml/man1/pg_standby.1 2017-01-24 09:08:37.998224648 +0530
145@@ -159,7 +159,7 @@
146 \fB\-t\fR \fItriggerfile\fR
147 .RS 4
148 Specify a trigger file whose presence should cause failover\&. It is recommended that you use a structured file name to avoid confusion as to which server is being triggered when multiple servers exist on the same system; for example
149-/tmp/pgsql\&.trigger\&.5432\&.
150+/data/data/com.termux/files/usr/tmp/pgsql\&.trigger\&.5432\&.
151 .RE
152 .PP
153 \fB\-V\fR
154@@ -221,9 +221,9 @@
155 .nf
156 archive_command = \*(Aqcp %p \&.\&.\&./archive/%f\*(Aq
157
158-restore_command = \*(Aqpg_standby \-d \-s 2 \-t /tmp/pgsql\&.trigger\&.5442 \&.\&.\&./archive %f %p %r 2>>standby\&.log\*(Aq
159+restore_command = \*(Aqpg_standby \-d \-s 2 \-t /data/data/com.termux/files/usr/tmp/pgsql\&.trigger\&.5442 \&.\&.\&./archive %f %p %r 2>>standby\&.log\*(Aq
160
161-recovery_end_command = \*(Aqrm \-f /tmp/pgsql\&.trigger\&.5442\*(Aq
162+recovery_end_command = \*(Aqrm \-f /data/data/com.termux/files/usr/tmp/pgsql\&.trigger\&.5442\*(Aq
163 .fi
164 .if n \{\
165 .RE
166@@ -266,7 +266,7 @@
167 .IP \(bu 2.3
168 .\}
169 stop waiting only when a trigger file called
170-/tmp/pgsql\&.trigger\&.5442
171+/data/data/com.termux/files/usr/tmp/pgsql\&.trigger\&.5442
172 appears, and perform failover according to its content
173 .RE
174 .sp
175diff -ruN src1/doc/src/sgml/man1/psql.1 src/doc/src/sgml/man1/psql.1
176--- src1/doc/src/sgml/man1/psql.1 2017-01-24 09:07:07.602306341 +0530
177+++ src/doc/src/sgml/man1/psql.1 2017-01-24 09:08:37.954891666 +0530
178@@ -3397,7 +3397,7 @@
179 \fBTMPDIR\fR
180 .RS 4
181 Directory for storing temporary files\&. The default is
182-/tmp\&.
183+/data/data/com.termux/files/usr/tmp\&.
184 .RE
185 .PP
186 This utility, like most other
187diff -ruN src1/doc/src/sgml/pgstandby.sgml src/doc/src/sgml/pgstandby.sgml
188--- src1/doc/src/sgml/pgstandby.sgml 2017-01-24 09:07:07.592306425 +0530
189+++ src/doc/src/sgml/pgstandby.sgml 2017-01-24 09:08:38.534886954 +0530
190@@ -193,7 +193,7 @@
191 It is recommended that you use a structured file name to
192 avoid confusion as to which server is being triggered
193 when multiple servers exist on the same system; for example
194- <filename>/tmp/pgsql.trigger.5432</>.
195+ <filename>/data/data/com.termux/files/usr/tmp/pgsql.trigger.5432</>.
196 </para>
197 </listitem>
198 </varlistentry>
199@@ -271,9 +271,9 @@
200 <programlisting>
201 archive_command = 'cp %p .../archive/%f'
202
203-restore_command = 'pg_standby -d -s 2 -t /tmp/pgsql.trigger.5442 .../archive %f %p %r 2>>standby.log'
204+restore_command = 'pg_standby -d -s 2 -t /data/data/com.termux/files/usr/tmp/pgsql.trigger.5442 .../archive %f %p %r 2>>standby.log'
205
206-recovery_end_command = 'rm -f /tmp/pgsql.trigger.5442'
207+recovery_end_command = 'rm -f /data/data/com.termux/files/usr/tmp/pgsql.trigger.5442'
208 </programlisting>
209 where the archive directory is physically located on the standby server,
210 so that the <varname>archive_command</> is accessing it across NFS,
211@@ -293,7 +293,7 @@
212 <listitem>
213 <para>
214 stop waiting only when a trigger file called
215- <filename>/tmp/pgsql.trigger.5442</> appears,
216+ <filename>/data/data/com.termux/files/usr/tmp/pgsql.trigger.5442</> appears,
217 and perform failover according to its content
218 </para>
219 </listitem>
220diff -ruN src1/doc/src/sgml/plperl.sgml src/doc/src/sgml/plperl.sgml
221--- src1/doc/src/sgml/plperl.sgml 2017-01-24 09:07:07.695638888 +0530
222+++ src/doc/src/sgml/plperl.sgml 2017-01-24 09:08:41.468196470 +0530
223@@ -978,7 +978,7 @@
224 system operations are not allowed for security reasons:
225 <programlisting>
226 CREATE FUNCTION badfunc() RETURNS integer AS $$
227- my $tmpfile = "/tmp/badfile";
228+ my $tmpfile = "/data/data/com.termux/files/usr/tmp/badfile";
229 open my $fh, '&gt;', $tmpfile
230 or elog(ERROR, qq{could not open the file "$tmpfile": $!});
231 print $fh "Testing writing to a file\n";
232diff -ruN src1/doc/src/sgml/runtime.sgml src/doc/src/sgml/runtime.sgml
233--- src1/doc/src/sgml/runtime.sgml 2017-01-24 09:07:07.602306341 +0530
234+++ src/doc/src/sgml/runtime.sgml 2017-01-24 09:08:38.754885166 +0530
235@@ -559,7 +559,7 @@
236 <screen>
237 psql: could not connect to server: No such file or directory
238 Is the server running locally and accepting
239- connections on Unix domain socket "/tmp/.s.PGSQL.5432"?
240+ connections on Unix domain socket "/data/data/com.termux/files/usr/tmp/.s.PGSQL.5432"?
241 </screen>
242 </para>
243
244@@ -1934,7 +1934,7 @@
245 their own socket file in that directory. If you are concerned that
246 some applications might still reference <filename>/tmp</> for the
247 socket file and hence be vulnerable to spoofing, during operating system
248- startup create a symbolic link <filename>/tmp/.s.PGSQL.5432</> that points
249+ startup create a symbolic link <filename>/data/data/com.termux/files/usr/tmp/.s.PGSQL.5432</> that points
250 to the relocated socket file. You also might need to modify your
251 <filename>/tmp</> cleanup script to prevent removal of the symbolic link.
252 </para>
253diff -ruN src1/doc/src/sgml/start.sgml src/doc/src/sgml/start.sgml
254--- src1/doc/src/sgml/start.sgml 2017-01-24 09:07:07.712305414 +0530
255+++ src/doc/src/sgml/start.sgml 2017-01-24 09:08:38.011557873 +0530
256@@ -178,7 +178,7 @@
257 <screen>
258 createdb: could not connect to database postgres: could not connect to server: No such file or directory
259 Is the server running locally and accepting
260- connections on Unix domain socket "/tmp/.s.PGSQL.5432"?
261+ connections on Unix domain socket "/data/data/com.termux/files/usr/tmp/.s.PGSQL.5432"?
262 </screen>
263 This means that the server was not started, or it was not started
264 where <command>createdb</command> expected it. Again, check the
265diff -ruN src1/src/backend/utils/misc/postgresql.conf.sample src/src/backend/utils/misc/postgresql.conf.sample
266--- src1/src/backend/utils/misc/postgresql.conf.sample 2017-01-24 09:07:07.852304235 +0530
267+++ src/src/backend/utils/misc/postgresql.conf.sample 2017-01-24 09:08:31.664942842 +0530
268@@ -63,7 +63,7 @@
269 #port = 5432 # (change requires restart)
270 #max_connections = 100 # (change requires restart)
271 #superuser_reserved_connections = 3 # (change requires restart)
272-#unix_socket_directories = '/tmp' # comma-separated list of directories
273+#unix_socket_directories = '/data/data/com.termux/files/usr/tmp' # comma-separated list of directories
274 # (change requires restart)
275 #unix_socket_group = '' # (change requires restart)
276 #unix_socket_permissions = 0777 # begin with 0 to use octal notation
277diff -ruN src1/src/bin/initdb/initdb.c src/src/bin/initdb/initdb.c
278--- src1/src/bin/initdb/initdb.c 2017-01-24 09:07:07.792304741 +0530
279+++ src/src/bin/initdb/initdb.c 2017-01-24 09:08:32.981598786 +0530
280@@ -1225,7 +1225,7 @@
281 #else
282 snprintf(repltok, sizeof(repltok), "#unix_socket_directories = ''");
283 #endif
284- conflines = replace_token(conflines, "#unix_socket_directories = '/tmp'",
285+ conflines = replace_token(conflines, "#unix_socket_directories = '/data/data/com.termux/files/usr/tmp'",
286 repltok);
287
288 #if DEF_PGPORT != 5432
289diff -ruN src1/src/bin/pg_upgrade/test.sh src/src/bin/pg_upgrade/test.sh
290--- src1/src/bin/pg_upgrade/test.sh 2017-01-24 09:07:07.798971351 +0530
291+++ src/src/bin/pg_upgrade/test.sh 2017-01-24 09:08:33.101597808 +0530
292@@ -44,15 +44,15 @@
293 if [ "x$PGHOST" = x ]; then
294 {
295 dir=`(umask 077 &&
296- mktemp -d /tmp/pg_upgrade_check-XXXXXX) 2>/dev/null` &&
297+ mktemp -d /data/data/com.termux/files/usr/tmp/pg_upgrade_check-XXXXXX) 2>/dev/null` &&
298 [ -d "$dir" ]
299 } ||
300 {
301- dir=/tmp/pg_upgrade_check-$$-$RANDOM
302+ dir=/data/data/com.termux/files/usr/tmp/pg_upgrade_check-$$-$RANDOM
303 (umask 077 && mkdir "$dir")
304 } ||
305 {
306- echo "could not create socket temporary directory in \"/tmp\""
307+ echo "could not create socket temporary directory in \"/data/data/com.termux/files/usr/tmp\""
308 exit 1
309 }
310
311diff -ruN src1/src/bin/psql/command.c src/src/bin/psql/command.c
312--- src1/src/bin/psql/command.c 2017-01-24 09:07:07.802304657 +0530
313+++ src/src/bin/psql/command.c 2017-01-24 09:08:33.368262304 +0530
314@@ -2258,7 +2258,7 @@
315 const char *tmpdir = getenv("TMPDIR");
316
317 if (!tmpdir)
318- tmpdir = "/tmp";
319+ tmpdir = "/data/data/com.termux/files/usr/tmp";
320 #else
321 char tmpdir[MAXPGPATH];
322 int ret;
323diff -ruN src1/src/include/pg_config_manual.h src/src/include/pg_config_manual.h
324--- src1/src/include/pg_config_manual.h 2017-01-24 09:07:07.722305330 +0530
325+++ src/src/include/pg_config_manual.h 2017-01-24 09:08:36.941566569 +0530
326@@ -164,7 +164,7 @@
327 * here's where to twiddle it. You can also override this at runtime
328 * with the postmaster's -k switch.
329 */
330-#define DEFAULT_PGSOCKET_DIR "/tmp"
331+#define DEFAULT_PGSOCKET_DIR "/data/data/com.termux/files/usr/tmp"
332
333 /*
334 * This is the default event source for Windows event log.
335diff -ruN src1/src/pl/plperl/sql/plperl_end.sql src/src/pl/plperl/sql/plperl_end.sql
336--- src1/src/pl/plperl/sql/plperl_end.sql 2017-01-24 09:07:07.892303898 +0530
337+++ src/src/pl/plperl/sql/plperl_end.sql 2017-01-24 09:08:33.711592843 +0530
338@@ -5,7 +5,7 @@
339 -- Available here for manual developer testing.
340
341 DO $do$
342- my $testlog = "/tmp/pgplperl_test.log";
343+ my $testlog = "/data/data/com.termux/files/usr/tmp/pgplperl_test.log";
344
345 warn "Run test, then examine contents of $testlog (which must already exist)\n";
346 return unless -f $testlog;