Commit e567ae3a authored by drumm's avatar drumm

Sync up to dev-services

parent c09f1b36
......@@ -171,10 +171,5 @@ To read :
Include /var/aegir/config/apache.conf
You will also need to create the following directories :
/var/aegir/config/platform.d
/var/aegir/config/apache.d
Now log into Aegir, and verify the hostmaster platform. This will generate
the correct apache.conf file and restart apache.
......@@ -20,7 +20,8 @@ function file_drush_init() {
}
function file_drush_exit() {
provision_service('file')->drush_exit();
// todo sync out to other servers
//provision_service('file')->sync();
}
class provisionService_file extends provisionService {
......@@ -449,10 +450,4 @@ class provisionService_file extends provisionService {
function _chgrp_recursive($path, $group) {
return $this->_call_recursive('chgrp', $path, $group);
}
/**
* Stub for extensions that need to happen on exit, like syncing out to anther server.
*/
function drush_exit() {
}
}
......@@ -22,12 +22,7 @@ endif;
LoadModule rewrite_module modules/mod_rewrite.so
</IfModule>
# virtual hosts
Include <?php print $config_path ?>/vhost.d/
# platforms
Include <?php print $config_path ?>/platform.d/
# other configuration, not touched by aegir
Include <?php print $config_path ?>/apache.d/
<?php print $extra_config; ?>
......@@ -139,7 +139,6 @@ fi
msg "Creating basic directory structure"
mkdir -p $AEGIR_HOME/config/vhost.d
mkdir -p $AEGIR_HOME/config/platform.d
mkdir -p $AEGIR_HOME/config/apache.d
mkdir -p $AEGIR_HOME/backups
chmod 0711 $AEGIR_HOME/config
chmod 0700 $AEGIR_HOME/backups
......@@ -212,12 +211,8 @@ NameVirtualHost *:80
LoadModule rewrite_module modules/mod_rewrite.so
</IfModule>
# virtual hosts
Include $AEGIR_HOME/config/vhost.d/
# platforms
Include $AEGIR_HOME/config/platform.d/
# other configuration, not touched by aegir
Include $AEGIR_HOME/config/apache.d/
EOF
fi
>>>>>>> master
......
......@@ -425,6 +425,10 @@ function provision_find_packages() {
$packages['profiles'][$profile] = _provision_find_packages('profiles', $profile);
}
// Iterate through the sites, finding site specific packages
foreach (drush_get_option('sites', array()) as $site) {
$packages['sites'][$site] = _provision_find_packages('sites', $site);
}
return $packages;
}
......@@ -477,11 +481,6 @@ function provision_drupal_system_map() {
$packages['profiles'][$profile]->status = 1;
foreach (_provision_system_query("module") as $module) {
$frags = explode("/", $module->filename);
// ignore site-specific modules
if ($frags[0] == 'sites' && $frags[1] != 'all') {
continue;
}
$info_file = sprintf("%s/%s.info", dirname($module->filename), $module->name);
$module->info = provision_parse_info_file($info_file);
......@@ -495,13 +494,7 @@ function provision_drupal_system_map() {
drush_log(dt("Found !count modules", array('!count' => sizeof($packages['modules']))));
// XXX: mostly a copy-paste from above
foreach (_provision_system_query("theme") as $theme) {
$frags = explode("/", $theme->filename);
// ignore site-specific themes
if ($frags[0] == 'sites' && $frags[1] != 'all') {
continue;
}
$info_file = sprintf("%s/%s.info", dirname($theme->filename), $theme->name);
$theme->info = provision_parse_info_file($info_file);
_provision_cvs_deploy($theme);
......@@ -558,7 +551,7 @@ function _provision_drupal_find_modules($scope, $key = '') {
$source = str_replace("\r\n", "\n", $source);
$source = str_replace("\r", "\n", $source);
$function_matches = array();
preg_match_all('!function\s*&?([a-zA-Z0-9_]+)_update_([0-9]+)\s*\(.*?\s*\{!', $source, $function_matches);
preg_match_all('!function\s*&?([a-zA-Z0-9_]+)_update_([0-9]+)\(.*?\s*\{!', $source, $function_matches);
if (sizeof($function_matches[0])) {
$schema_version = max($function_matches[2]);
......
#
# Apache/PHP/Drupal settings:
#
# Protect files and directories from prying eyes.
<FilesMatch "\.(engine|inc|info|install|module|profile|test|po|sh|.*sql|theme|tpl(\.php)?|xtmpl|svn-base)$|^(code-style\.pl|Entries.*|Repository|Root|Tag|Template|all-wcprops|entries|format)$">
Order allow,deny
</FilesMatch>
# Don't show directory listings for URLs which map to a directory.
Options -Indexes
# Follow symbolic links in this directory.
Options +FollowSymLinks
# Make Drupal handle any 404 errors.
ErrorDocument 404 /index.php
# Force simple error message for requests for non-existent favicon.ico.
<Files favicon.ico>
# There is no end quote below, for compatibility with Apache 1.3.
ErrorDocument 404 "The requested file favicon.ico was not found.
</Files>
# Set the default handler.
DirectoryIndex index.php
# Override PHP settings. More in sites/default/settings.php
# but the following cannot be changed at runtime.
# PHP 4, Apache 1.
<IfModule mod_php4.c>
php_value magic_quotes_gpc 0
php_value register_globals 0
php_value session.auto_start 0
php_value mbstring.http_input pass
php_value mbstring.http_output pass
php_value mbstring.encoding_translation 0
</IfModule>
# PHP 4, Apache 2.
<IfModule sapi_apache2.c>
php_value magic_quotes_gpc 0
php_value register_globals 0
php_value session.auto_start 0
php_value mbstring.http_input pass
php_value mbstring.http_output pass
php_value mbstring.encoding_translation 0
</IfModule>
# PHP 5, Apache 1 and 2.
<IfModule mod_php5.c>
php_value magic_quotes_gpc 0
php_value register_globals 0
php_value session.auto_start 0
php_value mbstring.http_input pass
php_value mbstring.http_output pass
php_value mbstring.encoding_translation 0
</IfModule>
# Requires mod_expires to be enabled.
<IfModule mod_expires.c>
# Enable expirations.
ExpiresActive On
# Cache all files for 2 weeks after access (A).
ExpiresDefault A1209600
<FilesMatch \.php$>
# Do not allow PHP scripts to be cached unless they explicitly send cache
# headers themselves. Otherwise all scripts would have to overwrite the
# headers set by mod_expires if they want another caching behavior. This may
# fail if an error occurs early in the bootstrap process, and it may cause
# problems if a non-Drupal PHP file is installed in a subdirectory.
ExpiresActive Off
</FilesMatch>
</IfModule>
# Various rewrite rules.
<IfModule mod_rewrite.c>
RewriteEngine on
# allow files to be accessed without /sites/fqdn/
RewriteRule ^files/(.*)$ /sites/%{HTTP_HOST}/files/$1 [L]
# Rewrite URLs of the form 'x' to the form 'index.php?q=x'.
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !=/favicon.ico
RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
</IfModule>
......@@ -88,14 +88,9 @@ function drush_provision_drupal_post_provision_verify($url = NULL) {
* @see hook_provision_apache_dir_config()
*/
function provision_drupal_provision_apache_dir_config($data = null) {
$htaccess = file_get_contents(drush_get_option('publish_path') . '/.htaccess');
$htaccess = file_get_contents(dirname(__FILE__) . "/provision_drupal_htaccess.tpl.php");
$htaccess .= <<<EOF
<IfModule mod_rewrite.c>
# allow files to be accessed without /sites/fqdn/
RewriteRule ^files/(.*)$ /sites/%{HTTP_HOST}/files/$1 [L]
</IfModule>
# Do not read the platform's .htaccess
AllowOverride none
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment