On Thu, Sep 12, 2013 at 08:25:00PM +0100, Ken Moffat wrote:
>  I've now got the postgresql testsuite working for a normal user,
> using the attached patch (based on gentoo, but simplified - they
> make one other change, which seems unnecessary, and use @SOCKETDIR@
> then sed that to /tmp after applying the patch.
> 
 Really attached, in case we come back to this method.

>  Bruce managed to get the tests working after su'ing to user
> postgres, but that doesn't work for me (details in the ticket).
> 
>  This is all because we now move the socket (and lock file) from
> /tmp to /run/postgresql.  We do that with a sed, but using sed on
> the first of the test files is likely to be error prone (a lot of
> other SYSTEMQUOTE lines don't get changed), so I'm inclined to
> patch. Which begs the question - should I convert the sed to a patch
> and include it all together, as e.g. -use_run- or leave this patch
> separate ?
> 
> ĸen
> -- 
> das eine Mal als Tragödie, dieses Mal als Farce
> -- 
> http://linuxfromscratch.org/mailman/listinfo/blfs-dev
> FAQ: http://www.linuxfromscratch.org/blfs/faq.html
> Unsubscribe: See the above information page

-- 
das eine Mal als Tragödie, dieses Mal als Farce
diff -Naur postgresql-9.3.0.orig/src/test/regress/pg_regress.c 
postgresql-9.3.0/src/test/regress/pg_regress.c
--- postgresql-9.3.0.orig/src/test/regress/pg_regress.c 2013-09-02 
21:53:17.000000000 +0100
+++ postgresql-9.3.0/src/test/regress/pg_regress.c      2013-09-12 
19:59:06.556296135 +0100
@@ -911,7 +911,7 @@
 
        /* And now we can build and execute the shell command */
        snprintf(psql_cmd, sizeof(psql_cmd),
-                        SYSTEMQUOTE "\"%s%spsql\" -X -c \"%s\" \"%s\"" 
SYSTEMQUOTE,
+                        SYSTEMQUOTE "\"%s%spsql\" -h /tmp -X -c \"%s\" \"%s\"" 
SYSTEMQUOTE,
                         psqldir ? psqldir : "",
                         psqldir ? "/" : "",
                         query_escaped,
@@ -2217,8 +2217,8 @@
                 * Check if there is a postmaster running already.
                 */
                snprintf(buf2, sizeof(buf2),
-                                SYSTEMQUOTE "\"%s/psql\" -X postgres <%s 2>%s" 
SYSTEMQUOTE,
-                                bindir, DEVNULL, DEVNULL);
+                                SYSTEMQUOTE "\"%s/psql\" -h /tmp -X postgres 
<%s 2>%s" SYSTEMQUOTE,
+                                psqldir, DEVNULL, DEVNULL);
 
                for (i = 0; i < 16; i++)
                {
@@ -2249,7 +2249,7 @@
                 */
                header(_("starting postmaster"));
                snprintf(buf, sizeof(buf),
-                                SYSTEMQUOTE "\"%s/postgres\" -D \"%s/data\" 
-F%s -c \"listen_addresses=%s\" > \"%s/log/postmaster.log\" 2>&1" SYSTEMQUOTE,
+                                SYSTEMQUOTE "\"%s/postgres\" -k /tmp -D 
\"%s/data\" -F%s -c \"listen_addresses=%s\" > \"%s/log/postmaster.log\" 2>&1" 
SYSTEMQUOTE,
                                 bindir, temp_install,
                                 debug ? " -d 5" : "",
                                 hostname ? hostname : "",
diff -Naur postgresql-9.3.0.orig/src/test/regress/pg_regress_main.c 
postgresql-9.3.0/src/test/regress/pg_regress_main.c
--- postgresql-9.3.0.orig/src/test/regress/pg_regress_main.c    2013-09-02 
21:53:17.000000000 +0100
+++ postgresql-9.3.0/src/test/regress/pg_regress_main.c 2013-09-12 
19:54:05.581161316 +0100
@@ -64,7 +64,7 @@
                                                   "%s ", launcher);
 
        snprintf(psql_cmd + offset, sizeof(psql_cmd) - offset,
-                        SYSTEMQUOTE "\"%s%spsql\" -X -a -q -d \"%s\" < \"%s\" 
> \"%s\" 2>&1" SYSTEMQUOTE,
+                        SYSTEMQUOTE "\"%s%spsql\" -h /tmp -X -a -q -d \"%s\" < 
\"%s\" > \"%s\" 2>&1" SYSTEMQUOTE,
                         psqldir ? psqldir : "",
                         psqldir ? "/" : "",
                         dblist->str,
-- 
http://linuxfromscratch.org/mailman/listinfo/blfs-dev
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page

Reply via email to