Avoid non-POSIX cp flags
authorAndres Freund <andres@anarazel.de>
Fri, 25 Aug 2023 13:43:37 +0000 (06:43 -0700)
committerAndres Freund <andres@anarazel.de>
Fri, 25 Aug 2023 13:43:37 +0000 (06:43 -0700)
Commit 252dcb32 used cp -a, but apparently Solaris doesn't like that.  Use cp
-RPp instead.

Author: Thomas Munro <thomas.munro@gmail.com>
Reviewed-by: Daniel Gustafsson <daniel@yesql.se>
Discussion: https://postgr.es/m/CA+hUKGL10AoQVMMqgOJ8CTjoz9MLidD8ik2e8PibzLNMz0+aRg@mail.gmail.com

src/test/perl/PostgreSQL/Test/Cluster.pm
src/test/regress/pg_regress.c

index 426f94ff09c5adf6c8d77f14268dc1bcaecd8008..227c34ab4dbabbc29498b4a68277bb2bf3146ef3 100644 (file)
@@ -549,7 +549,7 @@ sub init
                }
                else
                {
-                       @copycmd = qw(cp -a);
+                       @copycmd = qw(cp -RPp);
                        $expected_exitcode = 0;
                }
 
index 06674141a31cd22f84979ced8f928bd64f0bb1ef..ec67588cf58f0f2357fe6cf82b43da6f574c7ed1 100644 (file)
@@ -2355,7 +2355,7 @@ regression_main(int argc, char *argv[],
                else
                {
 #ifndef WIN32
-                       const char *copycmd = "cp -a \"%s\" \"%s/data\"";
+                       const char *copycmd = "cp -RPp \"%s\" \"%s/data\"";
                        int                     expected_exitcode = 0;
 #else
                        const char *copycmd = "robocopy /E /NJS /NJH /NFL /NDL /NP \"%s\" \"%s/data\"";