Skip to Content.
Sympa Menu

sm-commit - [SM-Commit] GIT changes to master grimoire by Vlad Glagolev (0b8f7b6e41ef7231b31cc5932035c6d9a3b08dff)

sm-commit AT lists.ibiblio.org

Subject: Source Mage code commit list

List archive

Chronological Thread  
  • From: Vlad Glagolev <scm AT sourcemage.org>
  • To: sm-commit AT lists.ibiblio.org
  • Subject: [SM-Commit] GIT changes to master grimoire by Vlad Glagolev (0b8f7b6e41ef7231b31cc5932035c6d9a3b08dff)
  • Date: Wed, 18 Jun 2008 21:08:34 -0500

GIT changes to master grimoire by Vlad Glagolev <stealth AT sourcemage.org>:

database/postgresql/BUILD | 13 ++++-
database/postgresql/DEPENDS | 27 +++++++++--
database/postgresql/DETAILS | 17 +++++--
database/postgresql/FINAL | 12 ++---
database/postgresql/HISTORY | 18 +++++++
database/postgresql/INSTALL | 46
+++++++++++---------
database/postgresql/PREPARE | 2
database/postgresql/PRE_BUILD | 12 ++---
database/postgresql/TRIGGERS | 1
database/postgresql/init.d/postgresql | 25 ++--------
database/postgresql/init.d/postgresql.conf | 2
database/postgresql/pgcluster-1.7.0rc7.patch.tar.gz | 0
dev/null |binary
13 files changed, 108 insertions(+), 67 deletions(-)

New commits:
commit 0b8f7b6e41ef7231b31cc5932035c6d9a3b08dff
Author: Vlad Glagolev <stealth AT sourcemage.org>
Commit: Vlad Glagolev <stealth AT sourcemage.org>

postgresql: small fixups, fixed some bugs, added missing deps, renewed
init.d script, cleaned up

diff --git a/database/postgresql/BUILD b/database/postgresql/BUILD
index 6597f2a..8ba6c6a 100755
--- a/database/postgresql/BUILD
+++ b/database/postgresql/BUILD
@@ -1,3 +1,5 @@
+create_account postgres &&
+
# -ffast-math breaks compiling. this brings no side-effects
CFLAGS=${CFLAGS/-ffast-math/} &&

@@ -12,6 +14,13 @@ CFLAGS=${CFLAGS/-ffast-math/} &&
--target=$HOST \
$OPTS &&

-make &&
+make &&
+
+# build cryptographic functions support by default
cd contrib/pgcrypto &&
-make
+make &&
+
+if is_depends_enabled $SPELL libxml2; then
+ cd ../xml2 &&
+ make
+fi
diff --git a/database/postgresql/DEPENDS b/database/postgresql/DEPENDS
index 4840229..ab40fe5 100755
--- a/database/postgresql/DEPENDS
+++ b/database/postgresql/DEPENDS
@@ -8,6 +8,11 @@ optional_depends tk \
"--without-tk" \
"for tk support" &&

+optional_depends readline \
+ "--with-readline" \
+ "--without-readline" \
+ "for Readline support" &&
+
optional_depends perl \
"--with-perl" \
"--without-perl" \
@@ -33,12 +38,24 @@ optional_depends unixodbc \
"--without-unixodbc" \
"for unixODBC support" &&

-optional_depends openldap \
- "--with-ldap" \
- "--without-ldap" \
- "for LDAP support" &&
+optional_depends openldap \
+ "--with-ldap" \
+ "--without-ldap" \
+ "for LDAP support" &&

optional_depends openssl \
"--with-openssl" \
"--without-openssl" \
- "for OpenSSL support"
+ "for OpenSSL support" &&
+
+optional_depends libxml2 \
+ "--with-libxml" \
+ "--without-libxml" \
+ "for XML/XSLT support" &&
+
+if is_depends_enabled $SPELL libxml2; then
+ optional_depends libxslt \
+ "--with-libxslt" \
+ "--without-libxslt" \
+ "for XSLT support"
+fi
diff --git a/database/postgresql/DETAILS b/database/postgresql/DETAILS
index a778113..42d734f 100755
--- a/database/postgresql/DETAILS
+++ b/database/postgresql/DETAILS
@@ -4,14 +4,21 @@
SOURCE=$SPELL-$VERSION.tar.bz2
SOURCE_DIRECTORY=$BUILD_DIRECTORY/$SPELL-$VERSION
SOURCE_URI=v$VERSION/$SOURCE
-
SOURCE_URL[0]=ftp://ftp9.us.postgresql.org/pub/mirrors/postgresql/source/$SOURCE_URI
-
SOURCE_URL[1]=ftp://ftp10.us.postgresql.org/pub/postgresql/source/$SOURCE_URI
-
SOURCE_URL[2]=ftp://ftp13.us.postgresql.org/mirror/postgresql/source/$SOURCE_URI
+
SOURCE_URL[0]=ftp://ftp9.us.postgresql.org/pub/mirrors/$SPELL/source/$SOURCE_URI
+ SOURCE_URL[1]=ftp://ftp10.us.postgresql.org/pub/$SPELL/source/$SOURCE_URI
+
SOURCE_URL[2]=ftp://ftp13.us.postgresql.org/mirror/$SPELL/source/$SOURCE_URI
SOURCE_URL[3]=ftp://ftp15.us.postgresql.org/$SOURCE_URI
+
+if [[ $PGSQL_CLUSTER == y ]]; then
+ CLUSTER_VERSION=1.9.0rc5
+ SOURCE2=pgcluster-$CLUSTER_VERSION-patch.tar.gz
+ SOURCE2_URL[0]=http://pgfoundry.org/frs/download.php/1706/$SOURCE2
+
SOURCE2_HASH=sha512:df328505fee683051642850bade5932595184d3af8db6d47663d8c6e5fec5dc62256390ead83a2fa719efe212f8a44350f57cb4f1361bde63b2227e5cc13e927
+fi
+
WEB_SITE=http://www.postgresql.org/
- DOCS=""
+ GATHER_DOCS=off
SECURITY_PATCH=5
- PATCHLEVEL=0
ENTERED=20011113
LICENSE[0]=BSD
KEYWORDS="database"
diff --git a/database/postgresql/FINAL b/database/postgresql/FINAL
index bbbe5aa..63c0a52 100755
--- a/database/postgresql/FINAL
+++ b/database/postgresql/FINAL
@@ -1,7 +1,7 @@
-if [ "$POSTGRES_BOOT" = "y" ]
-then echo
- echo "You need to run initdb and edit postgresql.conf manually."
- echo "The PGDATA directory defaults to /var/lib/postgres."
- echo "Logs are written to /var/log/postgres."
- echo
+if [[ ! -e /var/lib/postgres/postresql.conf ]]; then
+ message "${MESSAGE_COLOR}"
+ message "You need to run initdb and edit postgresql.conf manually."
+ message "The PGDATA directory defaults to /var/lib/postgres/data."
+ message "Logs are written to /var/log/postgres."
+ message "${DEFAULT_COLOR}"
fi
diff --git a/database/postgresql/HISTORY b/database/postgresql/HISTORY
index 7184201..7aeb808 100644
--- a/database/postgresql/HISTORY
+++ b/database/postgresql/HISTORY
@@ -1,3 +1,20 @@
+2008-06-19 Vlad Glagolev <stealth AT sourcemage.org>
+ * PREPARE, TRIGGERS, init.d/postgresql.conf: cleaned up
+ * DEPENDS: added optional deps: readline, libxml2 (with libxslt),
+ cleaned up
+ * BUILD: moved creation of account here, added xml2 installation,
added
+ useful comment
+ * PRE_BUILD: removed useless stuff, added correct patching if selected
+ * DETAILS: added GATHER_DOCS, removed DOCS="", use $SPELL, moved
+ pgcluster patch info there
+ * INSTALL: removed useless spaces, message vars, replaced mkdir with
+ more proper install, don't chmod -R 0700 if there's already an
+ existing db, use default_install, added xml2 installation
+ * FINAL: use correct messages instead of plain echo, fixed a path
+ * init.d/postgresql: restart() is useless, it's done automatically,
+ fixed `su' lines (taken from OpenBSD examples), removed useless
+ options (regarding to `pg_ctl --help')
+
2008-06-12 Ladislav Hagara <hgr AT vabo.cz>
* DETAILS: 8.3.3
* init.d/postgresql: updated
@@ -288,4 +305,3 @@
* added "make install-all-headers" line to BUILD script,
in order to install server side development headers, ie:
postgresql.h
-
diff --git a/database/postgresql/INSTALL b/database/postgresql/INSTALL
index e7146d6..a8ea273 100755
--- a/database/postgresql/INSTALL
+++ b/database/postgresql/INSTALL
@@ -1,21 +1,29 @@
- cd $SOURCE_DIRECTORY &&
- make install &&
- cd contrib/pgcrypto &&
- make install &&
-
- mkdir -p /var/lib/postgres/data &&
- touch /var/log/postgres &&
- chown -R postgres.postgres /var/lib/postgres /var/log/postgres &&
- chmod -R 0700 /var/lib/postgres &&
+cd $SOURCE_DIRECTORY &&
+default_install &&

- if echo "$OPTS" | grep -q "with-openssl" && ! [ -e
/var/lib/postgres/data/server.crt ]; then
- message "${MESSAGE_COLOR}Please place server key and certificate
files${DEFAULT_COLOR}"
- message "${MESSAGE_COLOR}server.key and server.crt into
/var/lib/postgres/data.${DEFAULT_COLOR}"
- message "${MESSAGE_COLOR}See spell apache2, script mksscert.sh, for
steps${DEFAULT_COLOR}"
- message "${MESSAGE_COLOR}to generate server certificate
file.${DEFAULT_COLOR}"
- message "${MESSAGE_COLOR}You can use the CA key and certificate
generated for${DEFAULT_COLOR}"
- message "${MESSAGE_COLOR}apache2, located in
/etc/httpd/ssl/ca-{key,certificate}.pem,${DEFAULT_COLOR}"
- message "${MESSAGE_COLOR}to sign the certificate for
PostgreSQL.${DEFAULT_COLOR}"
- fi
-# message "${PROBLEM_COLOR}PostgreSQL server will not start without a
certificate!${DEFAULT_COLOR}"
+cd contrib/pgcrypto &&
+default_install &&

+if is_depends_enabled $SPELL libxml2; then
+ cd ../xml2 &&
+ default_install
+fi &&
+
+if [[ ! -d /var/lib/postgres/data ]]; then
+ install -vm 755 -o postgres -g postgres -d /var/lib/postgres/data
+fi &&
+
+touch /var/log/postgres &&
+chown postgres:postgres /var/log/postgres &&
+
+if echo "$OPTS" | grep -q "with-openssl" && ! [[ -e
/var/lib/postgres/data/server.crt ]]; then
+ message "${MESSAGE_COLOR}"
+ message "Please place server key and certificate files"
+ message "server.key and server.crt into /var/lib/postgres/data."
+ message "See spell apache2, script mksscert.sh, for steps"
+ message "to generate server certificate file."
+ message "You can use the CA key and certificate generated for"
+ message "apache2, located in /etc/httpd/ssl/ca-{key,certificate}.pem,"
+ message "to sign the certificate for PostgreSQL."
+ message "${DEFAULT_COLOR}"
+fi
diff --git a/database/postgresql/PREPARE b/database/postgresql/PREPARE
index 4dd13d2..d13b666 100755
--- a/database/postgresql/PREPARE
+++ b/database/postgresql/PREPARE
@@ -1 +1 @@
-config_query PGSQL_CLUSTER 'Do you want to apply the PGCluster patch?' n
+config_query PGSQL_CLUSTER "Do you want to apply the PGCluster patch?" n
diff --git a/database/postgresql/PRE_BUILD b/database/postgresql/PRE_BUILD
index 1d2ff68..19291c9 100755
--- a/database/postgresql/PRE_BUILD
+++ b/database/postgresql/PRE_BUILD
@@ -1,7 +1,7 @@
-create_account postgres &&
-default_pre_build &&
-cd $SOURCE_DIRECTORY &&
-if [ "$PGSQL_CLUSTER" = "y" ]; then
- tar zxvf $SCRIPT_DIRECTORY/pgcluster-1.7.0rc7.patch.tar.gz &&
- patch -p1 < $SOURCE_DIRECTORY/pgcluster-1.7.0rc7.patch
+default_pre_build &&
+cd $SOURCE_DIRECTORY &&
+
+if [[ $PGSQL_CLUSTER == y ]]; then
+ verify_file 2 &&
+ zcat $SOURCE_CACHE/$SOURCE2 | patch -p1
fi
diff --git a/database/postgresql/TRIGGERS b/database/postgresql/TRIGGERS
index 189f788..b236201 100755
--- a/database/postgresql/TRIGGERS
+++ b/database/postgresql/TRIGGERS
@@ -1,4 +1,3 @@
-
if is_depends_enabled $SPELL linux-pam; then
on_cast linux-pam cast_self
fi
diff --git a/database/postgresql/init.d/postgresql
b/database/postgresql/init.d/postgresql
index f28fca0..8abac31 100644
--- a/database/postgresql/init.d/postgresql
+++ b/database/postgresql/init.d/postgresql
@@ -11,13 +11,13 @@ start()
{
echo "Starting postmaster..."
cd "$DBPATH" &&
- if [[ ! -z "$PORT" ]]; then
+ if [[ ! -z "$PORT" ]]; then
PGPORT="-p $PORT"
- fi &&
- if [[ ! "$LOGFILE" = 'syslog' ]]; then
+ fi &&
+ if [[ $LOGFILE != syslog ]]; then
PGLOG="-l $LOGFILE"
- fi &&
- su -s /bin/sh -m -c "pg_ctl start -D '$DBPATH' $PGLOG -p /usr/bin/postgres
-o '$PGPORT'" -l "$USER"
+ fi &&
+ su $USER -s /bin/sh -c "pg_ctl start -D $DBPATH $PGLOG -o '$PGPORT'"
evaluate_retval
}

@@ -25,19 +25,6 @@ stop()
{
echo "Stopping postmaster..."
cd "$DBPATH" &&
- su -s /bin/sh -c "pg_ctl stop -D '$DBPATH' -m fast" -l "$USER"
+ su $USER -s /bin/sh -c "pg_ctl stop -D $DBPATH -m fast"
evaluate_retval
}
-
-restart()
-{
- echo "Restarting postmaster..."
- stop
- start
-# cd "$DBPATH" &&
-# if [[ "$LOGFILE" = 'syslog' ]]; then
-# su -l "$USER" -s /bin/sh -c "pg_ctl restart -D '$DBPATH'"
-# else
-# su -l "$USER" -s /bin/sh -c "pg_ctl restart -D '$DBPATH' -l '$LOGFILE'"
-# fi
-}
diff --git a/database/postgresql/init.d/postgresql.conf
b/database/postgresql/init.d/postgresql.conf
index a2858e8..09429f0 100644
--- a/database/postgresql/init.d/postgresql.conf
+++ b/database/postgresql/init.d/postgresql.conf
@@ -1,4 +1,3 @@
-
# user postgresql starts under, doesn't change unless you add the user
yourself
USER=postgres

@@ -10,4 +9,3 @@ LOGFILE=/var/log/postgres

# Network TCP port to listen on, default is 5432
PORT=
-
diff --git a/database/postgresql/pgcluster-1.7.0rc7.patch.tar.gz
b/database/postgresql/pgcluster-1.7.0rc7.patch.tar.gz
deleted file mode 100644
index 77ea516..0000000
Binary files a/database/postgresql/pgcluster-1.7.0rc7.patch.tar.gz and
/dev/null differ



  • [SM-Commit] GIT changes to master grimoire by Vlad Glagolev (0b8f7b6e41ef7231b31cc5932035c6d9a3b08dff), Vlad Glagolev, 06/18/2008

Archive powered by MHonArc 2.6.24.

Top of Page