On Fri, 20 Jul 2018 10:25:47 -0400 Tom Lane <[email protected]> wrote:
> Victor Wagner <[email protected]> writes: > > I've discovered that in the branch REL_11_STABLE there is shell > > script src/bin/pg_upgrade/test.sh which doesn't work under Solaris > > 10. (it uses $(command) syntax with is not compatible with original > > Solaris /bin/sh) > > Please send a patch. Most of us do not have access to old shells Here it goes. Previous letter was written before fixed tests were completed, because this old machine is slow. > we could test this on. (The oldest machine I have, and it's old > enough to vote, does run that script ... I doubt very many other > developers have anything older.) > > regards, tom lane
commit efb0bbcefeccd826ba951ac31057689e752b79d0 Author: Victor Wagner <[email protected]> Date: Fri Jul 20 16:06:50 2018 +0300 Fixed incompatibility of src/bin/pg_upgrade/test.sh with solaris /bin/sh diff --git a/src/bin/pg_upgrade/test.sh b/src/bin/pg_upgrade/test.sh index 45ccd8fa66..775dd5729d 100644 --- a/src/bin/pg_upgrade/test.sh +++ b/src/bin/pg_upgrade/test.sh @@ -234,7 +234,7 @@ pg_upgrade $PG_UPGRADE_OPTS -d "${PGDATA}.old" -D "${PGDATA}" -b "$oldbindir" -B # Windows hosts don't support Unix-y permissions. case $testhost in MINGW*) ;; - *) if [ $(find ${PGDATA} -type f ! -perm 640 | wc -l) -ne 0 ]; then + *) if [ `find ${PGDATA} -type f ! -perm 640 | wc -l` -ne 0 ]; then echo "files in PGDATA with permission != 640"; exit 1; fi ;; @@ -242,7 +242,7 @@ esac case $testhost in MINGW*) ;; - *) if [ $(find ${PGDATA} -type d ! -perm 750 | wc -l) -ne 0 ]; then + *) if [ `find ${PGDATA} -type d ! -perm 750 | wc -l` -ne 0 ]; then echo "directories in PGDATA with permission != 750"; exit 1; fi ;;
