Skip to Content.
Sympa Menu

sm-commit - [SM-Commit] PERFORCE change 78112 by Jason Flatt for review

sm-commit AT lists.ibiblio.org

Subject: Source Mage code commit list

List archive

Chronological Thread  
  • From: Perforce Review Daemon <p4review AT smee.org>
  • To: "Andrew Stitt" <a AT t.armory.com>, "Arjan Bouter" <abouter AT sourcemage.org>, "SM-Commit Daemon" <sm-commit AT lists.ibiblio.org>, "duane_malcolm" <d.malcolm AT auckland.ac.nz>, "Ethan Grammatikidis" <eekee AT eekee.is-a-geek.org>, "Gareth Clay" <gareth AT caffeinefuelled.co.uk>, "Ladislav Hagara" <ladislav.hagara AT unob.cz>, "Maurizio Boriani" <baux AT member.fsf.org>, "Pieter Lenaerts" <e-type AT sourcemage.org>, "Pol Vinogradov" <vin.public AT gmail.com>, "Robin Cook" <rcook AT wyrms.net>, "Seth Woolley" <seth AT swoolley.homeip.net>, "Unet" <unet AT sourcemage.org>, "vladimir_marek" <vlmarek AT volny.cz>
  • Subject: [SM-Commit] PERFORCE change 78112 by Jason Flatt for review
  • Date: Thu, 20 Apr 2006 15:55:00 +0100 (BST)

Change 78112 by jason_flatt@jason-jason on 2006/04/20 15:53:51

* DETAILS: Re-added SOURCE_GPG as I was wrong about the previous
change.
* PREPARE, CONFIGURE, INSTALL: Added a check to see if Drupal is
already installed and to not ask first time configuration
questions if it is.

Affected files ...

... //sgl/grimoires/devel/collab/drupal/CONFIGURE#5 edit
... //sgl/grimoires/devel/collab/drupal/DETAILS#9 edit
... //sgl/grimoires/devel/collab/drupal/HISTORY#10 edit
... //sgl/grimoires/devel/collab/drupal/INSTALL#5 edit
... //sgl/grimoires/devel/collab/drupal/PREPARE#2 edit
... //sgl/grimoires/devel/collab/drupal/drupal-4.6.6.tar.gz.sig#1 add

Differences ...

==== //sgl/grimoires/devel/collab/drupal/CONFIGURE#5 (xtext) ====

@@ -8,40 +8,43 @@
mysql
\
postgresql
&&

-persistent_add DRUPAL_CREATEDB DRUPAL_CONFIGURE
&&
+if [ "${DRUPAL_INSTALLED}" == "n" ]
+then
+ persistent_add DRUPAL_CREATEDB DRUPAL_CONFIGURE
&&

-message "${MESSAGE_COLOR}The MySQL daemon needs to be running to create the
database${DEFAULT_COLOR}" &&
-if query "Create the Drupal database?" n
-then
- DRUPAL_CREATEDB="y"
-else
- DRUPAL_CREATEDB="n"
-fi
&&
+ message "${MESSAGE_COLOR}The MySQL daemon needs to be running to create
the database${DEFAULT_COLOR}" &&
+ if query "Create the Drupal database?" n
+ then
+ DRUPAL_CREATEDB="y"
+ else
+ DRUPAL_CREATEDB="n"
+ fi
&&

-if query "Update the Drupal configuration file?" n
-then
- DRUPAL_CONFIGURE="y"
-else
- DRUPAL_CONFIGURE="n"
-fi
&&
+ if query "Update the Drupal configuration file?" n
+ then
+ DRUPAL_CONFIGURE="y"
+ else
+ DRUPAL_CONFIGURE="n"
+ fi
&&

-if [ "${DRUPAL_CREATEDB}" == "y" ] || [ "${DRUPAL_CONFIGURE}" ==
"y" ]; then
- config_query_string DRUPAL_DATABASE_NAME
\
- "What database name do you wish to use for the
database?" \
- "drupal"
&&
+ if [ "${DRUPAL_CREATEDB}" == "y" ] || [ "${DRUPAL_CONFIGURE}" ==
"y" ]; then
+ config_query_string DRUPAL_DATABASE_NAME
\
+ "What database name do you wish to use for the
database?" \
+ "drupal"
&&

- config_query_string DRUPAL_DATABASE_USER
\
- "What user name do you wish to use for the database?"
\
- "nobody"
&&
+ config_query_string DRUPAL_DATABASE_USER
\
+ "What user name do you wish to use for the
database?" \
+ "nobody"
&&

- config_query_string DRUPAL_DATABASE_HOST
\
- "What host name do you wish to use for the database?"
\
- "localhost"
&&
+ config_query_string DRUPAL_DATABASE_HOST
\
+ "What host name do you wish to use for the
database?" \
+ "localhost"
&&

- config_query_string DRUPAL_DATABASE_PASSWORD
\
- "What password do you wish to use for the database?
-Allowed characters include letters, digits, and any of the following:
--_!#$%^&*()+={}[]|<>;:?,.~
-"
\
- "password"
+ config_query_string DRUPAL_DATABASE_PASSWORD
\
+ "What password do you wish to use for the database?
+ Allowed characters include letters, digits, and any of the following:
+ -_!#$%^&*()+={}[]|<>;:?,.~
+ "
\
+ "password"
+ fi
fi

==== //sgl/grimoires/devel/collab/drupal/DETAILS#9 (xtext) ====

@@ -5,7 +5,7 @@
SOURCE_DIRECTORY=$BUILD_DIRECTORY/$SPELL-$VERSION
SOURCE_URL[0]=http://drupal.org/files/projects/$SOURCE
WEB_SITE=http://www.drupal.org/
- SOURCE_IGNORE=volatile
+ SOURCE_GPG="gurus.gpg:$SOURCE.sig"
LICENSE[0]=GPL
BUILD_API=2
DOCS="*.txt"

==== //sgl/grimoires/devel/collab/drupal/HISTORY#10 (text) ====

@@ -1,3 +1,10 @@
+2006-04-20 Jason Flatt <jflatt AT sourcemage.org>
+ * DETAILS: Re-added SOURCE_GPG as I was wrong about the previous
+ change.
+ * PREPARE, CONFIGURE, INSTALL: Added a check to see if Drupal is
+ already installed and to not ask first time configuration
+ questions if it is.
+
2006-03-14 Jason Flatt <jflatt AT sourcemage.org>
* DETAILS: Security update to 4.6.6 (http://drupal.org/security).
Changed SOURCE_GPG to SOURCE_IGNORE, as the tarball is updated

==== //sgl/grimoires/devel/collab/drupal/INSTALL#5 (xtext) ====

@@ -1,45 +1,47 @@
-install_www_files ./ ${INSTALL_ROOT}${DRUPAL_INSTALL_PATH}/${SPELL}
&&
+install_www_files ./ ${INSTALL_ROOT}${DRUPAL_INSTALL_PATH}/${SPELL}
&&

-if [ "${DRUPAL_CREATEDB}" == "y" ]; then
- case "${DRUPAL_DATABASE_ENGINE}" in
- mysql)
- message "${MESSAGE_COLOR}Creating MySQL database...${DEFAULT_COLOR}"
- mysqladmin create ${DRUPAL_DATABASE_NAME}
&&
- echo "GRANT ALL PRIVILEGES ON ${DRUPAL_DATABASE_NAME}.*
\
- TO ${DRUPAL_DATABASE_USER}@${DRUPAL_DATABASE_HOST} IDENTIFIED BY
'${DRUPAL_DATABASE_PASSWORD}'; \
- flush privileges;
\
- \q " | mysql ${DRUPAL_DATABASE_NAME}
&&
- #
- # Return true as this will fail if the database already exists
- #
- mysql ${DRUPAL_DATABASE_NAME} < database/database.mysql || true
- ;;
+if [ "${DRUPAL_INSTALLED}" == "n" ]; then
+ if [ "${DRUPAL_CREATEDB}" == "y" ]; then
+ case "${DRUPAL_DATABASE_ENGINE}" in
+ mysql)
+ message "${MESSAGE_COLOR}Creating MySQL database...${DEFAULT_COLOR}"
+ mysqladmin create ${DRUPAL_DATABASE_NAME}
&&
+ echo "GRANT ALL PRIVILEGES ON ${DRUPAL_DATABASE_NAME}.*
\
+ TO ${DRUPAL_DATABASE_USER}@${DRUPAL_DATABASE_HOST} IDENTIFIED
BY '${DRUPAL_DATABASE_PASSWORD}'; \
+ flush privileges;
\
+ \q " | mysql ${DRUPAL_DATABASE_NAME}
&&
+ #
+ # Return true as this will fail if the database already exists
+ #
+ mysql ${DRUPAL_DATABASE_NAME} < database/database.mysql || true
+ ;;

- postgresql)
- message "${MESSAGE_COLOR}Creating PostgreSQL
database...${DEFAULT_COLOR}"
- source /etc/sysconfig/postgresql
&&
- su ${USER} -c "createdb ${DRUPAL_DATABASE_NAME}"
&&
- echo "GRANT ALL PRIVILEGES ON ${DRUPAL_DATABASE_NAME}.*
\
- TO ${DRUPAL_DATABASE_USER}@${DRUPAL_DATABASE_HOST} IDENTIFIED BY
'${DRUPAL_DATABASE_PASSWORD}'; \
- flush privileges;
\
- \q " | su ${USER} -c "psql ${DRUPAL_DATABASE_NAME}"
&&
- #
- # Return true as this will fail if the database already exists
- #
- su ${USER} -c "psql ${DRUPAL_DATABASE_NAME} -f
database/database.pgsql" || true
- ;;
- esac
-fi
&&
+ postgresql)
+ message "${MESSAGE_COLOR}Creating PostgreSQL
database...${DEFAULT_COLOR}"
+ source /etc/sysconfig/postgresql
&&
+ su ${USER} -c "createdb ${DRUPAL_DATABASE_NAME}"
&&
+ echo "GRANT ALL PRIVILEGES ON ${DRUPAL_DATABASE_NAME}.*
\
+ TO ${DRUPAL_DATABASE_USER}@${DRUPAL_DATABASE_HOST} IDENTIFIED
BY '${DRUPAL_DATABASE_PASSWORD}'; \
+ flush privileges;
\
+ \q " | su ${USER} -c "psql ${DRUPAL_DATABASE_NAME}"
&&
+ #
+ # Return true as this will fail if the database already exists
+ #
+ su ${USER} -c "psql ${DRUPAL_DATABASE_NAME} -f
database/database.pgsql" || true
+ ;;
+ esac
+ fi
&&

-if [ "${DRUPAL_CONFIGURE}" == "y" ]; then
- # Update the sites/default/settings.php configuration file
- # The database connection string
- sedit
"s|username:password@localhost/database|${DRUPAL_DATABASE_USER}:${DRUPAL_DATABASE_PASSWORD}@${DRUPAL_DATABASE_HOST}/${DRUPAL_DATABASE_NAME}|"
${INSTALL_ROOT}/${DRUPAL_INSTALL_PATH}/${SPELL}/sites/default/settings.php
&&
+ if [ "${DRUPAL_CONFIGURE}" == "y" ]; then
+ # Update the sites/default/settings.php configuration file
+ # The database connection string
+ sedit
"s|username:password@localhost/database|${DRUPAL_DATABASE_USER}:${DRUPAL_DATABASE_PASSWORD}@${DRUPAL_DATABASE_HOST}/${DRUPAL_DATABASE_NAME}|"
${INSTALL_ROOT}/${DRUPAL_INSTALL_PATH}/${SPELL}/sites/default/settings.php
&&

- # The base URL string
- sedit "s|http://localhost|http://localhost/${SPELL}|"
${INSTALL_ROOT}/${DRUPAL_INSTALL_PATH}/${SPELL}/sites/default/settings.php &&
+ # The base URL string
+ sedit "s|http://localhost|http://localhost/${SPELL}|"
${INSTALL_ROOT}/${DRUPAL_INSTALL_PATH}/${SPELL}/sites/default/settings.php &&

- mkdir ${INSTALL_ROOT}/${DRUPAL_INSTALL_PATH}/${SPELL}/files
-fi
&&
+ mkdir ${INSTALL_ROOT}/${DRUPAL_INSTALL_PATH}/${SPELL}/files
+ fi
&&

-chown -R www-data:www-data ${INSTALL_ROOT}/${DRUPAL_INSTALL_PATH}/${SPELL}
+ chown -R www-data:www-data
${INSTALL_ROOT}/${DRUPAL_INSTALL_PATH}/${SPELL}
+fi

==== //sgl/grimoires/devel/collab/drupal/PREPARE#2 (xtext) ====

@@ -1,5 +1,5 @@
message ""
-message "Please make sure you have backed up your data and configuration
files before continuing with this installation."
+message "${WARNING_COLOR}Please make sure you have backed up your data and
configuration files before continuing with this installation."
message ""
message "Consider this to be your official warning.${DEFAULT_COLOR}"
message ""
@@ -7,4 +7,12 @@
if ! query "Are you comfortable with continuing the install?" n
then
return 1
+fi &&
+
+persistent_add DRUPAL_INSTALLED &&
+if spell_ok ${SPELL}
+then
+ DRUPAL_INSTALLED="y"
+else
+ DRUPAL_INSTALLED="n"
fi



  • [SM-Commit] PERFORCE change 78112 by Jason Flatt for review, Perforce Review Daemon, 04/20/2006

Archive powered by MHonArc 2.6.24.

Top of Page