[SM-Commit] GIT changes to master grimoire by Remko van der Vossen (7fc283b2d654ad2bd93252ae24cddb0a0ae33f2c)

Remko van der Vossen scm at sourcemage.org
Thu Jul 17 08:29:09 EDT 2008


GIT changes to master grimoire by Remko van der Vossen <wich at stack.nl>:

 database/postgresql/CONFIGURE |   15 +++++++++++++++
 database/postgresql/FINAL     |   12 ++++++++++++
 database/postgresql/HISTORY   |    9 +++++++++
 database/postgresql/INSTALL   |   16 +---------------
 4 files changed, 37 insertions(+), 15 deletions(-)

New commits:
commit 2baf49533f8ac4fc3fcf73cf658f5c750157a54f
Author: Remko van der Vossen <wich at stack.nl>
Commit: Remko van der Vossen <wich at stack.nl>

    postgresql: warn user about makeing a full dump when upgrading, moved
        informational messages to FINAL so that they appear after staging.

diff --git a/database/postgresql/CONFIGURE b/database/postgresql/CONFIGURE
new file mode 100755
index 0000000..9aea02e
--- /dev/null
+++ b/database/postgresql/CONFIGURE
@@ -0,0 +1,15 @@
+if spell_ok $SPELL && [[ $(installed_version $SPELL) != $VERSION ]]; then
+  message "${PROBLEM_COLOR}" &&
+  message "You are about to upgrade (downgrade) your PostgreSQL installation, please" &&
+  message "be aware that a database repository will only work with a specific version" &&
+  message "of PostgreSQL. You need to make a dump of your entire database system, create" &&
+  message "a new repository with the new PostgreSQL version and import your dump. You" &&
+  message "should not continue with this upgrade (downgrade) if you do not have a dump" &&
+  message "of your database system. If you need help creating a dump of your database" &&
+  message "system see the PostgreSQL HOWTO (http://wiki.sourcemage.org/HOWTO-Postgresql)" &&
+  message "for instructions." &&
+  message "${DEFAULT_COLOR}" &&
+  if ! query "Do you wish to upgrade PostgreSQL now?" n; then
+    return 1
+  fi
+fi
diff --git a/database/postgresql/FINAL b/database/postgresql/FINAL
new file mode 100755
index 0000000..b9ced55
--- /dev/null
+++ b/database/postgresql/FINAL
@@ -0,0 +1,12 @@
+if is_depends_enabled $SPELL openssl; then
+  message "${MESSAGE_COLOR}" &&
+  message "Please place server key and certificate files server.key and server.crt into" &&
+  message "the database repository (/var/lib/postgres/data by default). See more about" &&
+  message "it at http://www.postgresql.org/docs/8.3/static/ssl-tcp.html" &&
+  message "${DEFAULT_COLOR}"
+fi &&
+
+message "${MESSAGE_COLOR}" &&
+message "See the PostgreSQL HOWTO at http://wiki.sourcemage.org/HOWTO-Postgresql if you" &&
+message "need help setting up PostgreSQL." &&
+message "${DEFAULT_COLOR}"
diff --git a/database/postgresql/HISTORY b/database/postgresql/HISTORY
index 9ee54cd..06d8434 100644
--- a/database/postgresql/HISTORY
+++ b/database/postgresql/HISTORY
@@ -1,3 +1,12 @@
+2008-07-17 Remko van der Vossen <wich at sourcemage.org>
+	* CONFIGURE: Warn the user they need to have a dump of their database
+	  system when upgrading (downgrading) and query the user whether they
+	  want to continue casting.
+	* INSTALL, FINAL: Moved messages to FINAL so that they will appear after
+	  staging the install into the system, otherwise the messages just get
+	  lost in the stream of text scrolling by when staged install is
+	  enabled. Changed the messages to refer to the HOWTO on the wiki.
+
 2008-07-16 Remko van der Vossen <wich at sourcemage.org>
 	* init.d/postgresql: Added a reload option
 
diff --git a/database/postgresql/INSTALL b/database/postgresql/INSTALL
index dbc2d97..9b3cb53 100755
--- a/database/postgresql/INSTALL
+++ b/database/postgresql/INSTALL
@@ -12,18 +12,4 @@ if is_depends_enabled $SPELL libxml2; then
 fi &&
 
 touch $INSTALL_ROOT/var/log/postgres &&
-chown postgres:postgres $INSTALL_ROOT/var/log/postgres &&
-
-if is_depends_enabled $SPELL openssl; then
-  message "${MESSAGE_COLOR}"
-  message "Please place server key and certificate files server.key "
-  message "and server.crt into /var/lib/postgres/data (by default). See more about"
-  message "it at http://www.postgresql.org/docs/8.3/static/ssl-tcp.html"
-  message "${DEFAULT_COLOR}"
-fi &&
-
-message "${MESSAGE_COLOR}"
-message "Don't forget to set up your database path."
-message "http://www.postgresql.org/docs/8.3/interactive/runtime-config-file-locations.html"
-message "Our initscripts have it as /var/lib/postgresql/data by default"
-message "${DEFAULT_COLOR}"
+chown postgres:postgres $INSTALL_ROOT/var/log/postgres



More information about the SM-Commit mailing list