[SM-Commit] PERFORCE change 78113 by Jason Flatt for review
Perforce Review Daemon
p4review at smee.org
Thu Apr 20 10:55:01 EDT 2006
Change 78113 by jason_flatt at jason-jason on 2006/04/20 15:54:37
* 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/test/collab/drupal/CONFIGURE#4 integrate
... //sgl/grimoires/test/collab/drupal/DETAILS#8 integrate
... //sgl/grimoires/test/collab/drupal/HISTORY#9 integrate
... //sgl/grimoires/test/collab/drupal/INSTALL#4 integrate
... //sgl/grimoires/test/collab/drupal/PREPARE#2 integrate
... //sgl/grimoires/test/collab/drupal/drupal-4.6.6.tar.gz.sig#1 branch
Differences ...
==== //sgl/grimoires/test/collab/drupal/CONFIGURE#4 (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/test/collab/drupal/DETAILS#8 (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/test/collab/drupal/HISTORY#9 (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/test/collab/drupal/INSTALL#4 (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 at 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 at 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/test/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
More information about the SM-Commit
mailing list