Hi,

Here are 2 patches against current CVS to fix a couple of
problems I found building and testing on Solaris.

Firstly genbki.sh had a couple of call to sed using the syntax
"sed <command>" which results in sed reporting a garbled command.

I have changed this to "sed -e '<command>'" which keeps sed happy.

Secondly run_check.sh needed a couple of changes.

One to fix it's handling of a pre-existing LD_LIBRARY_PATH. (Which
I needed to use to point the executables at the location of libz.so)

One to allow the call to "initdb" to find the correct template files
etc.

Keith.
Sun, 9 Jul 2000 13:40:25 +0100 (BST)
Keith Parks <emkxp01@middleton-top.co.uk>
initdb and runcheck problems (Latest CVS)
Keith Parks writes:

> Here are 2 patches against current CVS to fix a couple of
> problems I found building and testing on Solaris.

Done.


-- 
Peter Eisentraut                  Sernanders vï¿½g 10:115
peter_e@gmx.net                   75262 Uppsala
http://yi.org/peter-e/            Sweden


Sun, 9 Jul 2000 15:20:19 +0200 (CEST)
Peter Eisentraut <peter_e@gmx.net>
Re: initdb and runcheck problems (Latest CVS)
I have done the sed -e change, and Peter has done the LD_PATH change.

> Hi,
> 
> Here are 2 patches against current CVS to fix a couple of
> problems I found building and testing on Solaris.
> 
> Firstly genbki.sh had a couple of call to sed using the syntax
> "sed <command>" which results in sed reporting a garbled command.
> 
> I have changed this to "sed -e '<command>'" which keeps sed happy.
> 
> Secondly run_check.sh needed a couple of changes.
> 
> One to fix it's handling of a pre-existing LD_LIBRARY_PATH. (Which
> I needed to use to point the executables at the location of libz.so)
> 
> One to allow the call to "initdb" to find the correct template files
> etc.
> 
> Keith.
Content-Description: genbki.patch

> *** src/backend/catalog/genbki.sh.orig	Thu Jul  6 22:33:22 2000
> --- src/backend/catalog/genbki.sh	Sun Jul  9 09:00:01 2000
> ***************
> *** 45,57 ****
>               INCLUDE_DIR="$2"
>               shift;;
>           -I*)
> !             INCLUDE_DIR=`echo $1 | sed s/^-I//`
>               ;;
>           -o)
>               OUTPUT_PREFIX="$2"
>               shift;;
>           -o*)
> !             OUTPUT_PREFIX=`echo $1 | sed s/^-o//`
>               ;;
>           --help)
>               echo "$CMDNAME generates system catalog bootstrapping files."
> --- 45,57 ----
>               INCLUDE_DIR="$2"
>               shift;;
>           -I*)
> !             INCLUDE_DIR=`echo $1 | sed -e 's/^-I//'`
>               ;;
>           -o)
>               OUTPUT_PREFIX="$2"
>               shift;;
>           -o*)
> !             OUTPUT_PREFIX=`echo $1 | sed -e 's/^-o//'`
>               ;;
>           --help)
>               echo "$CMDNAME generates system catalog bootstrapping files."
Content-Description: run_check.patch

> *** src/test/regress/run_check.sh.orig	Sun Jul  9 10:58:16 2000
> --- src/test/regress/run_check.sh	Sun Jul  9 12:58:47 2000
> ***************
> *** 24,29 ****
> --- 24,30 ----
>   PGDATA="$CHKDIR/data"
>   LIBDIR="$CHKDIR/lib"
>   BINDIR="$CHKDIR/bin"
> + SHAREDIR="$CHKDIR/share"
>   LOGDIR="$CHKDIR/log"
>   TIMDIR="$CHKDIR/timestamp"
>   PGPORT="65432"
> ***************
> *** 43,49 ****
>   # otherwise feel free to cover your platform here as well.
>   if [ "$LD_LIBRARY_PATH" ]; then
>   	old_LD_LIBRARY_PATH="$LD_LIBRARY_PATH"
> ! 	LD_LIBRARY_PATH="$LIBDIR:$LD_LIBARY_PATH"
>   else
>   	LD_LIBRARY_PATH="$LIBDIR"
>   fi
> --- 44,50 ----
>   # otherwise feel free to cover your platform here as well.
>   if [ "$LD_LIBRARY_PATH" ]; then
>   	old_LD_LIBRARY_PATH="$LD_LIBRARY_PATH"
> ! 	LD_LIBRARY_PATH="$LIBDIR:$old_LD_LIBRARY_PATH"
>   else
>   	LD_LIBRARY_PATH="$LIBDIR"
>   fi
> ***************
> *** 187,193 ****
>   # Run initdb to initialize a database system in ./tmp_check
>   # ----------
>   echo "=============== Initializing check database instance   ================"
> ! initdb -D $PGDATA --noclean >$LOGDIR/initdb.log 2>&1
>   
>   if [ $? -ne 0 ]
>   then
> --- 188,194 ----
>   # Run initdb to initialize a database system in ./tmp_check
>   # ----------
>   echo "=============== Initializing check database instance   ================"
> ! initdb -D $PGDATA -L $SHAREDIR --noclean >$LOGDIR/initdb.log 2>&1
>   
>   if [ $? -ne 0 ]
>   then


-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026

Sun, 9 Jul 2000 12:38:12 -0400 (EDT)
Bruce Momjian <pgman@candle.pha.pa.us>
Re: initdb and runcheck problems (Latest CVS)
I take that back.  Peter applied both.

> Hi,
> 
> Here are 2 patches against current CVS to fix a couple of
> problems I found building and testing on Solaris.
> 
> Firstly genbki.sh had a couple of call to sed using the syntax
> "sed <command>" which results in sed reporting a garbled command.
> 
> I have changed this to "sed -e '<command>'" which keeps sed happy.
> 
> Secondly run_check.sh needed a couple of changes.
> 
> One to fix it's handling of a pre-existing LD_LIBRARY_PATH. (Which
> I needed to use to point the executables at the location of libz.so)
> 
> One to allow the call to "initdb" to find the correct template files
> etc.
> 
> Keith.
Content-Description: genbki.patch

> *** src/backend/catalog/genbki.sh.orig	Thu Jul  6 22:33:22 2000
> --- src/backend/catalog/genbki.sh	Sun Jul  9 09:00:01 2000
> ***************
> *** 45,57 ****
>               INCLUDE_DIR="$2"
>               shift;;
>           -I*)
> !             INCLUDE_DIR=`echo $1 | sed s/^-I//`
>               ;;
>           -o)
>               OUTPUT_PREFIX="$2"
>               shift;;
>           -o*)
> !             OUTPUT_PREFIX=`echo $1 | sed s/^-o//`
>               ;;
>           --help)
>               echo "$CMDNAME generates system catalog bootstrapping files."
> --- 45,57 ----
>               INCLUDE_DIR="$2"
>               shift;;
>           -I*)
> !             INCLUDE_DIR=`echo $1 | sed -e 's/^-I//'`
>               ;;
>           -o)
>               OUTPUT_PREFIX="$2"
>               shift;;
>           -o*)
> !             OUTPUT_PREFIX=`echo $1 | sed -e 's/^-o//'`
>               ;;
>           --help)
>               echo "$CMDNAME generates system catalog bootstrapping files."
Content-Description: run_check.patch

> *** src/test/regress/run_check.sh.orig	Sun Jul  9 10:58:16 2000
> --- src/test/regress/run_check.sh	Sun Jul  9 12:58:47 2000
> ***************
> *** 24,29 ****
> --- 24,30 ----
>   PGDATA="$CHKDIR/data"
>   LIBDIR="$CHKDIR/lib"
>   BINDIR="$CHKDIR/bin"
> + SHAREDIR="$CHKDIR/share"
>   LOGDIR="$CHKDIR/log"
>   TIMDIR="$CHKDIR/timestamp"
>   PGPORT="65432"
> ***************
> *** 43,49 ****
>   # otherwise feel free to cover your platform here as well.
>   if [ "$LD_LIBRARY_PATH" ]; then
>   	old_LD_LIBRARY_PATH="$LD_LIBRARY_PATH"
> ! 	LD_LIBRARY_PATH="$LIBDIR:$LD_LIBARY_PATH"
>   else
>   	LD_LIBRARY_PATH="$LIBDIR"
>   fi
> --- 44,50 ----
>   # otherwise feel free to cover your platform here as well.
>   if [ "$LD_LIBRARY_PATH" ]; then
>   	old_LD_LIBRARY_PATH="$LD_LIBRARY_PATH"
> ! 	LD_LIBRARY_PATH="$LIBDIR:$old_LD_LIBRARY_PATH"
>   else
>   	LD_LIBRARY_PATH="$LIBDIR"
>   fi
> ***************
> *** 187,193 ****
>   # Run initdb to initialize a database system in ./tmp_check
>   # ----------
>   echo "=============== Initializing check database instance   ================"
> ! initdb -D $PGDATA --noclean >$LOGDIR/initdb.log 2>&1
>   
>   if [ $? -ne 0 ]
>   then
> --- 188,194 ----
>   # Run initdb to initialize a database system in ./tmp_check
>   # ----------
>   echo "=============== Initializing check database instance   ================"
> ! initdb -D $PGDATA -L $SHAREDIR --noclean >$LOGDIR/initdb.log 2>&1
>   
>   if [ $? -ne 0 ]
>   then


-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026

Sun, 9 Jul 2000 12:38:42 -0400 (EDT)
Bruce Momjian <pgman@candle.pha.pa.us>
Re: initdb and runcheck problems (Latest CVS)