[Lunar-commits] r16499 - in moonbase/branches/submissions/new: . postgresql postgresql/init.d

Dennis Veatch stumbles at lunar-linux.org
Fri Sep 16 10:01:30 UTC 2005


Author: stumbles
Date: 2005-09-16 10:01:26 +0000 (Fri, 16 Sep 2005)
New Revision: 16499

Added:
   moonbase/branches/submissions/new/postgresql/
   moonbase/branches/submissions/new/postgresql/BUILD
   moonbase/branches/submissions/new/postgresql/CONFIGURE
   moonbase/branches/submissions/new/postgresql/DEPENDS
   moonbase/branches/submissions/new/postgresql/DETAILS
   moonbase/branches/submissions/new/postgresql/POST_INSTALL
   moonbase/branches/submissions/new/postgresql/init.d/
   moonbase/branches/submissions/new/postgresql/init.d/postgresql
Log:

Some changes to the build and adding an /etc/init.d



Added: moonbase/branches/submissions/new/postgresql/BUILD
===================================================================
--- moonbase/branches/submissions/new/postgresql/BUILD	2005-09-16 03:55:10 UTC (rev 16498)
+++ moonbase/branches/submissions/new/postgresql/BUILD	2005-09-16 10:01:26 UTC (rev 16499)
@@ -0,0 +1,18 @@
+(
+
+  ./configure  --prefix=/usr              \
+               --includedir=/usr/include  \
+               --libdir=/usr/lib          \
+               --enable-integer-datetimes \
+	       $OPTS                      &&
+  
+  default_make                &&                                 
+
+# This gives postgresql some additional things like text search, some dbase related utils 
+# to name a few. See /usr/share/doc/postgresql/contrib for more info.
+
+  cd contrib                  &&
+  make all                    &&
+  make install 
+
+) > $C_FIFO 2>&1


Property changes on: moonbase/branches/submissions/new/postgresql/BUILD
___________________________________________________________________
Name: svn:executable
   + *

Added: moonbase/branches/submissions/new/postgresql/CONFIGURE
===================================================================
--- moonbase/branches/submissions/new/postgresql/CONFIGURE	2005-09-16 03:55:10 UTC (rev 16498)
+++ moonbase/branches/submissions/new/postgresql/CONFIGURE	2005-09-16 10:01:26 UTC (rev 16499)
@@ -0,0 +1,9 @@
+
+ if [ -f /var/lib/pgsql/data/PG_VERSION ]
+    then
+ if [ `cat /var/lib/pgsql/data/PG_VERSION` != '8.0' ]
+    then
+    printf "${PROBLEM_COLOR}A pre 8.0 version of the database was found.\nYou need to upgrade the data format to 8.0.\nRefer to the INSTALL file located in the tarball\nfor the upgrade procedure.\nThe install will not continue.""${DEFAULT_COLOR}"
+   exit 1
+   fi
+ fi


Property changes on: moonbase/branches/submissions/new/postgresql/CONFIGURE
___________________________________________________________________
Name: svn:executable
   + *

Added: moonbase/branches/submissions/new/postgresql/DEPENDS
===================================================================
--- moonbase/branches/submissions/new/postgresql/DEPENDS	2005-09-16 03:55:10 UTC (rev 16498)
+++ moonbase/branches/submissions/new/postgresql/DEPENDS	2005-09-16 10:01:26 UTC (rev 16499)
@@ -0,0 +1,7 @@
+depends  ncurses  &&
+
+optional_depends "openssl"  "--with-openssl"  ""  "for SSL connections"            &&
+optional_depends "tcl" "--with-tcl" "" "for portable scripting"                    &&
+optional_depends "perl" "--with-perl" "" "for general purpose programming"         &&
+optional_depends "Python" "--with-python" "" "for object oriented programming"     &&
+optional_depends "Linux-PAM" "--with-pam" "" "for user authentication"


Property changes on: moonbase/branches/submissions/new/postgresql/DEPENDS
___________________________________________________________________
Name: svn:executable
   + *

Added: moonbase/branches/submissions/new/postgresql/DETAILS
===================================================================
--- moonbase/branches/submissions/new/postgresql/DETAILS	2005-09-16 03:55:10 UTC (rev 16498)
+++ moonbase/branches/submissions/new/postgresql/DETAILS	2005-09-16 10:01:26 UTC (rev 16499)
@@ -0,0 +1,52 @@
+          MODULE=postgresql
+         VERSION=8.0.3
+          SOURCE=$MODULE-$VERSION.tar.bz2
+   SOURCE_URL[0]=ftp://ftp.at.postgresql.org/db/www.postgresql.org/pub/source/v${VERSION}/
+   SOURCE_URL[1]=ftp://ftp.be.postgresql.org/postgresql/source/v${VERSION}/
+   SOURCE_URL[2]=ftp://ftp.br.postgresql.org/pub/PostgreSQL/source/v${VERSION}/
+   SOURCE_URL[3]=ftp://ftp3.ca.postgresql.org/pub/source/v${VERSION}/
+   SOURCE_URL[4]=ftp://ftp.cl.postgresql.org/pub/GNU/pgsql/source/v${VERSION}/
+   SOURCE_URL[5]=ftp://ftp2.cr.postgresql.org/pub/Unix/postgres/source/v${VERSION}/
+   SOURCE_URL[6]=ftp://ftp2.cz.postgresql.org/pub/postgresql/source/v${VERSION}/
+   SOURCE_URL[7]=ftp://ftp.dk.postgresql.org/mirrors/postgresql/source/v${VERSION}/
+   SOURCE_URL[8]=ftp://ftp2.dk.postgresql.org/pub/PostgreSQL/source/v${VERSION}/
+   SOURCE_URL[9]=ftp://ftp.ee.postgresql.org/mirrors/postgresql/source/v${VERSION}/
+  SOURCE_URL[10]=ftp://ftp.fr.postgresql.org/source/v${VERSION}/
+  SOURCE_URL[11]=ftp://ftp2.fr.postgresql.org/postgresql/source/v${VERSION}/
+  SOURCE_URL[12]=ftp://ftp.de.postgresql.org/mirror/postgresql/source/v${VERSION}/
+  SOURCE_URL[13]=ftp://ftp2.de.postgresql.org/pub/comp/os/unix/database/postgresql/source/v${VERSION}/
+  SOURCE_URL[14]=ftp://ftp3.de.postgresql.org/pub/Mirrors/ftp.postgresql.org/source/v${VERSION}/
+  SOURCE_URL[15]=ftp://ftp2.is.postgresql.org/pub/postgresql/source/v${VERSION}/
+  SOURCE_URL[16]=ftp://ftp.ie.postgresql.org/mirrors/ftp.postgresql.org/pub/source/v${VERSION}/
+  SOURCE_URL[17]=ftp://ftp2.ie.postgresql.org/mirrors/ftp.postgresql.org/source/v${VERSION}/
+  SOURCE_URL[18]=ftp://ftp6.jp.postgresql.org/postgresql/source/v${VERSION}/
+  SOURCE_URL[19]=ftp://ftp.kr.postgresql.org/mirror/database/postgresql/source/v${VERSION}/
+  SOURCE_URL[20]=ftp://ftp4.nl.postgresql.org/postgresql.zeelandnet.nl/source/v${VERSION}/
+  SOURCE_URL[21]=ftp://ftp.no.postgresql.org/pub/databases/postgresql/source/v${VERSION}/
+  SOURCE_URL[22]=ftp://ftp7.pl.postgresql.org/pub/mirror/ftp.postgresql.org/source/v${VERSION}/
+  SOURCE_URL[23]=ftp://ftp.pt.postgresql.org/vsource/${VERSION}/
+  SOURCE_URL[24]=ftp://ftp6.ro.postgresql.org/pub/mirrors/ftp.postgresql.org/source/v${VERSION}/
+  SOURCE_URL[25]=ftp://ftp.ru.postgresql.org/pub/unix/database/pgsql/source/v${VERSION}/
+  SOURCE_URL[26]=ftp://ftp3.ru.postgresql.org/pub/mirror/postgresql/pub/source/v${VERSION}/
+  SOURCE_URL[27]=ftp://ftp.za.postgresql.org:80/source/v${VERSION}/
+  SOURCE_URL[28]=ftp://ftp5.es.postgresql.org/mirror/postgresql/source/v${VERSION}/
+  SOURCE_URL[29]=ftp://ftp2.ch.postgresql.org/mirror/postgresql/source/v${VERSION}/
+  SOURCE_URL[30]=ftp://ftp5.tw.postgresql.org/pub/Unix/Database/PostgreSQL/source/v${VERSION}/
+  SOURCE_URL[31]=ftp://ftp.tr.postgresql.org/pub/SQL/postgresql/source/v${VERSION}/
+  SOURCE_URL[32]=ftp://ftp5.us.postgresql.org/pub/PostgreSQL/source/v${VERSION}/
+  SOURCE_URL[33]=ftp://ftp8.us.postgresql.org/pub/pgsql/source/v${VERSION}/
+  SOURCE_URL[34]=ftp://ftp9.us.postgresql.org/pub/mirrors/postgresql/source/v${VERSION}/
+  SOURCE_URL[35]=ftp://ftp10.us.postgresql.org/pub/postgresql/source/v${VERSION}/
+  SOURCE_URL[36]=ftp://ftp15.us.postgresql.org/source/v${VERSION}/
+      SOURCE_VFY=sha1:45f9a739e414e617d1e5f43779046546ee1a0d3a
+        WEB_SITE=http://www.postgresql.org
+         ENTERED=20011113
+         UPDATED=20050803
+           FUZZY=off
+           SHORT="postgresql is a sophisticated Object-Relational DBMS"
+
+cat << EOF
+PostgreSQL is a sophsticated Object-Relational DBMS, supporting almost
+all SQL constructs, including subselects, trasactions and user defined
+types and functions.
+EOF


Property changes on: moonbase/branches/submissions/new/postgresql/DETAILS
___________________________________________________________________
Name: svn:executable
   + *

Added: moonbase/branches/submissions/new/postgresql/POST_INSTALL
===================================================================
--- moonbase/branches/submissions/new/postgresql/POST_INSTALL	2005-09-16 03:55:10 UTC (rev 16498)
+++ moonbase/branches/submissions/new/postgresql/POST_INSTALL	2005-09-16 10:01:26 UTC (rev 16499)
@@ -0,0 +1,34 @@
+# Time to initialize the database
+PGDATA=/var/lib/pgsql/data
+INITDB=/usr/bin/initdb
+PGHBA=/var/lib/pgsql/data/pg_hba.conf
+POSTGRESQL=/var/lib/pgsql/data/postgresql.conf
+
+# Let's make the default postgresql super user.
+
+if [ 'grep postgres /etc/passwd' != 'postgres' ]
+     then
+     add_priv_user postgres           \
+                    -d /var/lib/pgsql \
+                    -s /bin/bash      \
+                    -g postgres 
+     fi
+
+if [ ! -d $PGDATA ]
+     then
+     mkdir -p $PGDATA
+     chown postgres.postgres $PGDATA
+     chmod go-rwx $PGDATA
+     su postgres -c "$INITDB --pgdata=$PGDATA" # > /dev/null 2>&1"
+     printf "Or run /etc/init.d/postgresql start\n"
+     fi
+# Done with database init.
+
+if [ ! -e /etc/init.d/postgresql ]
+     then 
+     cp $SCRIPT_DIRECTORY/posgtresql/init.d/postgresql
+     fi
+      
+if  module_installed  DBD-Pg;  then  lin DBD-Pg;   fi
+if  module_installed  php;     then  lin -c php;   fi
+if  module_installed  php5;    then  lin -c php5;  fi


Property changes on: moonbase/branches/submissions/new/postgresql/POST_INSTALL
___________________________________________________________________
Name: svn:executable
   + *

Added: moonbase/branches/submissions/new/postgresql/init.d/postgresql
===================================================================
--- moonbase/branches/submissions/new/postgresql/init.d/postgresql	2005-09-16 03:55:10 UTC (rev 16498)
+++ moonbase/branches/submissions/new/postgresql/init.d/postgresql	2005-09-16 10:01:26 UTC (rev 16499)
@@ -0,0 +1,100 @@
+#!  /bin/bash
+
+# chkconfig: 2345 98 02
+# description: PostgreSQL RDBMS
+
+# This is an example of a start/stop script for SysV-style init, such
+# as is used on Linux systems.  You should edit some of the variables
+# and maybe the 'echo' commands.
+#
+# Place this file at /etc/init.d/postgresql (or
+# /etc/rc.d/init.d/postgresql) and make symlinks to
+#   /etc/rc.d/rc0.d/K02postgresql
+#   /etc/rc.d/rc1.d/K02postgresql
+#   /etc/rc.d/rc2.d/K02postgresql
+#   /etc/rc.d/rc3.d/S98postgresql
+#   /etc/rc.d/rc4.d/S98postgresql
+#   /etc/rc.d/rc5.d/S98postgresql
+# Or, if you have chkconfig, simply:
+# chkconfig --add postgresql
+#
+# Proper init scripts on Linux systems normally require setting lock
+# and pid files under /var/run as well as reacting to network
+# settings, so you should treat this with care.
+
+# Original author:  Ryan Kirkpatrick <pgsql at rkirkpat.net>
+
+# $PostgreSQL: pgsql/contrib/start-scripts/linux,v 1.7 2004/10/01 18:30:21 tgl Exp $
+
+## EDIT FROM HERE
+
+# Data directory
+PGDATA=/var/lib/pgsql/data
+
+# Who to run the postmaster as, usually "postgres".  (NOT "root")
+PGUSER=postgres
+
+# Where to keep a log file
+PGLOG=$PGDATA/serverlog
+
+## STOP EDITING HERE
+
+# Check for echo -n vs echo \c
+if echo '\c' | grep -s c >/dev/null 2>&1 ; then
+    ECHO_N="echo -n"
+    ECHO_C=""
+else
+    ECHO_N="echo"
+    ECHO_C='\c'
+fi
+
+# The path that is to be used for the script
+PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
+
+# What to use to start up the postmaster (we do NOT use pg_ctl for this,
+# as it adds no value and can cause the postmaster to misrecognize a stale
+# lock file)
+DAEMON=/usr/bin/postmaster
+
+# What to use to shut down the postmaster
+PGCTL=/usr/bin/pg_ctl
+
+set -e
+
+# Only start if we can find the postmaster.
+test -x $DAEMON || exit 0
+
+# Parse command line parameters.
+case $1 in
+  start)
+	$ECHO_N "Starting PostgreSQL: "$ECHO_C
+	su - $PGUSER -c "$DAEMON -D '$PGDATA' &" >>$PGLOG 2>&1
+	echo "ok"
+	;;
+  stop)
+	echo -n "Stopping PostgreSQL: "
+	su - $PGUSER -c "$PGCTL stop -D '$PGDATA' -s -m fast"
+	echo "ok"
+	;;
+  restart)
+	echo -n "Restarting PostgreSQL: "
+	su - $PGUSER -c "$PGCTL stop -D '$PGDATA' -s -m fast -w"
+	su - $PGUSER -c "$DAEMON -D '$PGDATA' &" >>$PGLOG 2>&1
+	echo "ok"
+	;;
+  reload)
+        echo -n "Reload PostgreSQL: "
+        su - $PGUSER -c "$PGCTL reload -D '$PGDATA' -s"
+        echo "ok"
+        ;;
+  status)
+	su - $PGUSER -c "$PGCTL status -D '$PGDATA'"
+	;;
+  *)
+	# Print help
+	echo "Usage: $0 {start|stop|restart|reload|status}" 1>&2
+	exit 1
+	;;
+esac
+
+exit 0


Property changes on: moonbase/branches/submissions/new/postgresql/init.d/postgresql
___________________________________________________________________
Name: svn:executable
   + *



More information about the Lunar-commits mailing list