? 553230.patch
Index: INSTALL.txt
===================================================================
RCS file: /cvs/drupal-contrib/contributions/profiles/hostmaster/INSTALL.txt,v
retrieving revision 1.30
diff -r1.30 INSTALL.txt
4c4
< single-server Aegir Drupal provisionning system. 
---
> single-server Aegir Drupal provisionning system.
8,9c8,25
< Aegir 0.2 requirements
< ======================
---
> Aegir requirements
> ==================
> 
> This section describes what is expected of the servers Aegir is running
> on.
> 
> Aegir must run some UNIX flavour because the majority of functionality
> in this system occurs in the back-end, through command line scripting.
> There are also several features (such as symlinks), that are not
> available to users on Windows. There are no plans currently to add
> windows support.
> 
> The level of access required to be able to configure this system is
> very far beyond what is commonly available to users with shared hosting.
> 
> Following instructions will provide example commands for a Debian-like
> distribution. They are assumed to be run as root user. Prefix them with
> sudo if you are working with a privileges user instead of root.
11,12d26
< This section describes what is expected of the servers Aegir is
< running on.
24,29d37
< That webserver should probably run some UNIX flavour because the
< majority of functionality in this system occurs in the back-end,
< through command line scripting. There are also several features (such
< as symlinks), that are not available to users on Windows. There are no
< plans currently to add windows support.
< 
32a41
> 
43,44d51
< MySQL server
< ------------
46,48c53,66
< You will require a MySQL server, obviously. It is preferable to use a
< dedicated server since Aegir will create MySQL users, since it will
< require a "root" MySQL user.
---
> Database server
> ---------------
> 
> You will require a database server, obviously. Aegir currently only 
> supports MySQL. It is preferable to use a dedicated server since Aegir 
> will create database users and will require a privileged user.
> 
> New sites database names and users will have the form `site_$nid`, where
> $nid is the node id of the site being created (Aegir create sites as
> nodes).
> 
> Shell commands::
>  apt-get install mysql-server
> 
53,59c71,76
< Aegir requires an MTA (Mail Transfer Agent) installed on your
< webserver in order to be able to install a new site to your new
< platform. If you don't have an MTA you the site installation will fail
< with message like "could not send email." Additional messages will
< show that site has been removed because of this problem. To remedy the
< situation simply install an MTA like sendmail, postfix, or exim and do
< the minimal configuration.  On Debian-based systems do:
---
> Aegir requires an MTA (Mail Transfer Agent) installed on your webserver
> in order to be able to install new sites to your new platform. If you
> don't have an MTA you the site installation will fail with message like
> "could not send email". Additional messages will show that site has been
> removed because of this problem. To remedy the situation simply install
> an MTA like sendmail, postfix, or exim and do the minimal configuration.
62,64c79
<  sudo apt-get install postfix
<     
< Once that is done you should be able to install a site to the new platform. 
---
>  apt-get install postfix
66,67d80
< Other requirements
< ------------------
69,71c82,121
< * never run drush as root. aegir is designed to be ran as its own user.
< * the "aegir directory" (/var/aegir) *must* be the home directory of
<   that user (the "aegir user", below)
---
> Aegir user
> ----------
> 
> The provision framework of Aegir requires that the scripts run as a 
> non-root system account, to ensure that it can correctly set the file
> permissions on the hosted files. 
> 
> Also to ensure that the file permissions of the hosted sites are
> always as safe as can be, and especially to make sure that the web
> server does not have the ability to modify the code of the site, the
> configured system account needs to be a member of the web server group,
> in order to be able to correctly set the file permissions.
> 
> More detailed instructions on this topic will be given later in the web 
> installation wizard.
> 
> This document assumes the Aegir user is `aegir`, its home directory is
> `/var/aegir` and the webserver group is `www-data`. You can choose
> another username if desired.
> 
> In addition we will create a directory layout for Aegir configuration
> and backups.
> 
> Shell commands::
>  adduser --system --home /var/aegir --ingroup www-data aegir
>  mkdir -p /var/aegir/config/vhost.d
>  mkdir -p /var/aegir/backups
>  chmod -R 0700 /var/aegir/{config,backups}
>  chown -R aegir /var/aegir/*
> 
> 
> CVS commands
> ------------
> 
> If you want to install Aegir from CVS you will need to install `cvs`
> command in the server system.
> 
> Shell commands::
>  apt-get install cvs
> 
73,74c123,124
< Aegir 0.2 installation instructions
< ===================================
---
> Aegir installation instructions
> ===============================
80,82c130,158
< This document assumes the Aegir home is in /var/aegir, adapt as desired,
< but make sure that the user you create (as suggested in the install
< wizard) has this directory configured as its home directory.
---
> You can choose to install Aegir from CVS or by using drush. Checking out
> Aegir's code from CVS allows you to easily update to future newer
> versions. If you prefer drush, make sure the versions reported in the
> output seem right.
> 
> Installation instructions presents you in each step both
> alternative instructions to checkout from CVS or download with drush 
> each component of Aegir. Be warned that in the hours following a new
> release, drush will not catch up the correct versions.
> 
> All instructions and in general all commands must be run as aegir user,
> so all permissions are always set correctly.
> 
> To become aegir user depends on your system configuration: if you have
> root password (usually debian) or alternatively you have a privileged
> user with sudo (usually ubuntu).
> 
> If you have root password::
>  su -c "su -s /bin/bash aegir"
> 
> If you have sudo privileges::
>  sudo -u aegir bash
> 
> Aditionally to make following instructions generic and not dependant on
> a concrete Drupal or Aegir version. We will use bash environment
> variables for this. So current Drupal is 6.13 and Aegir release
> is 0.3-RC3.
> You should replace following command for current versions at the time
> you are reading this document.
84,85c160,162
< Checking out the code
< ---------------------
---
> Shell commands::
>   export DRUPAL_DIR=/var/aegir/drupal-6.13
>   export AEGIR_TAG=DRUPAL-6--0-3-RC3
87,88d163
< This assumes you have installed CVS. Those commands should be ran as the
< aegir user and assume it can write to /var/aegir.
89a165,166
> Installing drush 2.0
> --------------------
91,93c168,172
< Shell commands::
<  export CVSROOT=:pserver:anonymous:anonymous@cvs.drupal.org:/cvs/drupal
<  mkdir /var/aegir
---
> At the time this document is being written current drush stable version
> is 2.0. Perhaps a newer version does exist and this document is not
> updated yet.
> 
> Shell commands for cvs::
94a174
>  export CVSROOT=:pserver:anonymous:anonymous@cvs.drupal.org:/cvs/drupal
97,111c177,244
<  cd .drush && /var/aegir/drush/drush.php dl provision
<  cd ../
<  /var/aegir/drush/drush.php dl drupal
<  cd drupal-6.*
<  cvs co -d profiles/hostmaster -rDRUPAL-6--0-3 contributions/profiles/hostmaster
<  cd profiles/hostmaster
<  /var/aegir/drush/drush.php dl hosting install_profile_api 
< 
< We still use CVS to checkout the hostmaster profile because drush has
< problems downloading profiles: http://drupal.org/node/500324
< 
< The above should install version 2.1 of install_profile_api and the
< proper versions (0.3) of the hosting, hostmaster and provision
< projets. Make sure the versions reported by drush in the output seem
< right.
---
> 
> Shell commands for package download::
>  cd /var/aegir
>  wget http://ftp.drupal.org/files/projects/drush-All-Versions-2.0.tar.gz
>  tar -xvzf drush-All-Versions-2.0.tar.gz
>  mkdir .drush
> 
> Aditionally we will export another envorinment variable for the purpose
> of referencing drush executable in a shorter way.
> 
> Shell commands::
>   export DRUSH=/var/aegir/drush/drush.php
> 
> 
> Downloading provision framework
> -------------------------------
> 
> The provision framework is not a drupal module but a drush extension. So
> it must be placed in `/var/aegir/.drush` for drush to be able to find it.
> 
> Shell commands for cvs::
>  cvs co -d .drush/provision -r$AEGIR_TAG contributions/modules/provision
> 
> Shell commands for drush::
>  $DRUSH dl provision --destination=.drush
> 
> 
> Installing drupal
> -----------------
> 
> Drush is able to download latest version of Drupal. Be sure that the
> downloaded version is the same you put in $DRUPAL_DIR in above.
> 
> Shell commands::
>  $DRUSH dl drupal
>  cd $DRUPAL_DIR
> 
> 
> Installing hostmaster profile
> -----------------------------
> 
> Shell commands for cvs::
>  cvs co -d profiles/hostmaster -r$AEGIR_TAG contributions/profiles/hostmaster
>  
> Shell commands for drush::
>  $DRUSH dl --destination=./profiles hostmaster
> 
> 
> Installing hosting module
> -------------------------
> 
> Shell commands for cvs::
>  cvs co -d profiles/hostmaster/modules/hosting -r$AEGIR_TAG contributions/modules/hosting
> 
> Shell commands for drush::
>  mkdir profiles/hostmaster/modules
>  $DRUSH dl --destination=./profiles/hostmaster/modules hosting
> 
> 
> Installing install_profile_api module
> -------------------------------------
> 
> Hostmaster profile depends on Install Profile API module version 2.1. 
> Following command will force to download correct version.
> 
> Shell commands:
>   $DRUSH dl --destination=./profiles/hostmaster/modules install_profile_api-6.x-2.1
> 
116,117c249,254
< Aegir now has its own theme which you can use. It is also suggested
< that you install admin_menu to ease administration.
---
> Aegir has its own theme which you can use. Theme is called Eldir. It is
> also suggested that you install admin_menu to ease administration.
> 
> 
> Installing Eldir theme
> ~~~~~~~~~~~~~~~~~~~~~~
119,123c256,265
< Note that now your drush installation should be up and running so you
< can start using it to download modules directly. This is how
< admin_menu is installed below. The theme is installed using CVS
< because the release may not yet be available when you read this
< document.
---
> Shell commands for cvs::
>  cvs co -d profiles/hostmaster/modules/hosting -r$AEGIR_TAG contributions/themes/eldir
>  
> Shell commands for drush::
>  mkdir profiles/hostmaster/themes
>  $DRUSH dl --destination=$DRUPAL_DIR/profiles/hostmaster/themes eldir
> 
> 
> Installing Admin menu module
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
126,127c268,269
<  cd drupal-6.*/profiles/hostmaster
<  /var/aegir/drush/drush.php dl eldir admin_menu
---
>  $DRUSH dl --destination=$DRUPAL_DIR/profiles/hostmaster/modules admin_menu
> 
132,140c274,297
< Those instructions assume you are running Debian specific and
< installing aegir in http://aegir.example.com. If you are running
< another system you basically need to:
< 
<  1. create a directory for Aegir configs
<  2. activate the mod_rewrite engine
<  3. include the Aegir apache configurations in Apache
<  4. create a base configuration file for Aegir in /var/aegir/config/vhost.d/aegir.example.com
<  5. restart apache
---
> Those instructions assume you are installing aegir in http://aegir.example.com
> If you are running another non-Debian system you basically need to:
> 
>  1. create a virtual host for Aegir in /var/aegir/config/vhost.d/aegir.example.com
>  2. include the Aegir apache configurations in Apache
>  3. activate the mod_rewrite engine
>  4. restart apache
> 
> Note some of those instructions must be run as a privileged user (root)
> instead of Aegir's user.
> 
> 
> Creating Aegir's virtualhost
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> 
> Hostmaster provides an example virtualhost for apache. Copy it to Aegir's
> virtual hosts directory and modify it to suit your needs, particularly 
> the path leading to the Drupal core ($DRUPAL_DIR in the examples above).
> 
> That virtual host is a special one that includes a NameVirtualHost 
> directive for *:80. Debian uses to provide such a directive in 
> /etc/apache2/ports.conf. Other distributions may include it directly in
> httpd.conf. If your apache server already include such a directive, you
> may comment it out in Aegir's main virtualhost.
142d298
< So this needs to be ran as root too.
145,146c301,319
<  cd /var/aegir
<  mkdir -p config/vhost.d/
---
>  cp profiles/hostmaster/apache2.conf.txt ../config/vhost.d/aegir.example.com
>  # edit and configure
> 
> 
> Configuring Aegir in Apache
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~
> 
> Aegir VirtualHosts for Apache are stored at `/var/aegir/config/vhost.d`
> (if you have not changed default locations). So Apache must be instruct
> to read configurations from there. In Debian systems each configuration
> file located at `/etc/apache2/conf.d` is read on inilialization. If you
> are using another system, you can put `Include /var/aegir/config/vhost.d`
> in a file inside /etc/httpd/conf.d/ or directly at the end of httpd.conf.
> 
> Aditionally rewrite module must be enabled and apache restarted.
> 
> Following commands are to be run as root.
> 
> Shell commands::
149,150d321
<  echo "NameVirtualHost *:80" >> /etc/apache2/conf.d/aegir
<  cp drupal-6.*/profiles/hostmaster/apache2.conf.txt config/vhost.d/aegir.example.com
153,155d323
< You MUST modify the config/vhost.d/aegir.example.com to suit your
< needs (particularly the path leading to the Drupal core
< (/var/aegir/drupal-6.* in the example above).
165,174c333,342
< /var/aegir/drupal-6.13
< /var/aegir/drupal-6.13/profiles/hostmaster
< /var/aegir/drupal-6.13/profiles/hostmaster/modules/hosting
< /var/aegir/drupal-6.13/profiles/hostmaster/modules/install_profile_api
< /var/aegir/drupal-6.13/profiles/hostmaster/themes/eldir
< /var/aegir/drupal-6.13/sites/aegir.example.com
< /var/aegir/config/vhost.d
< /var/aegir/backups
< /var/aegir/drush/drush.php
< /var/aegir/.drush/provision
---
> `/var/aegir/drupal-6.x`
> `/var/aegir/drupal-6.x/profiles/hostmaster`
> `/var/aegir/drupal-6.x/profiles/hostmaster/modules/hosting`
> `/var/aegir/drupal-6.x/profiles/hostmaster/modules/install_profile_api`
> `/var/aegir/drupal-6.x/profiles/hostmaster/themes/eldir`
> `/var/aegir/drupal-6.x/sites/aegir.example.com`
> `/var/aegir/config/vhost.d`
> `/var/aegir/backups`
> `/var/aegir/drush/drush.php`
> `/var/aegir/.drush/provision`
177c345
< package works out of /usr/bin/drush and that's fine), but you are
---
> package works out of `/usr/bin/drush` and that's fine), but you are
180a349
> 
193a363,379
> 
> DNS Configuration
> -----------------
> 
> Configuring DNS is up to you. Currently Aegir does nothing with DNS. 
> 
> As a help trick, if you are installing Aegir in local to try ant test
> it, you can do local DNS by adding entries to file /etc/hosts. First
> line of this file looks like:
> 
> `127.0.0.1  localhost your-machine-name`
> 
> Simply add all domains you want to this line. Ej:
> 
> `127.0.0.1  localhost your-machine-name aegir.example.com other1 other2`
> 
> 
197,200c383,390
< Now you are ready to install the first Drupal using this installation
< profile. Point your browser to http://aegir.example.com/ , assuming
< DNS is properly configured to point to your webserver, otherwise you
< may want to try http://localhost/ .
---
> We are almost ready to install the first Drupal using this installation
> profile. The installer is going to complain about the missing
> settings.php.
> 
> It is recommended that you create the aegir site as a real site in the 
> sites/ directory. The following commands will create this site directory
> and create the settings.php and files directory with the appropriate 
> permissions to proceed through the installer.
202,203c392
< The installer is going to complain about the missing settings.php. It
< is recommended that you create the aegir site as a real site.
---
> Run these commands as the aegir user.
206,211c395,404
<  mkdir drupal-6.*/sites/aegir.example.com
<  chmod a+w drupal-6.*/sites/aegir.example.com/settings.php
< 
< Select the hostmaster install profile, enter the database credentials
< you setup above and then the installer will prompt you to secure the
< permissions on the settings.php file again:
---
>  mkdir sites/aegir.example.com
>  cp sites/default/default.settings.php sites/aegir.example.com/settings.php
>  chmod g+w sites/aegir.example.com/settings.php
>  mkdir sites/aegir.example.com/files
>  chmod 2770 sites/aegir.example.com/files
> 
> Now point your browser to `http://aegir.example.com/`, select the
> hostmaster install profile, enter the database credentials you setup 
> above and then the installer will prompt you to secure the permissions
> on the settings.php file again:
214c407,408
<  chmod a-w /var/aegir/drupal-6.*/sites/aegir.example.com/settings.php
---
>  chmod a-w sites/aegir.example.com/settings.php
> 
223a418
> 
227c422
< To deploy new platforms to provisions site to, you simply need to
---
> To deploy new platforms to provision sites to, you simply need to
233,234c428,430
<  cd /var/aegir
<  ./drush/drush.php dl drupal
---
>  cd ..
>  $DRUSH dl drupal-5.x
>  $DRUSH dl drupal-7.x
236d431
< Use "drush dl drupal-5.x" to get the latest release of the 5.x branch.
Index: hostmaster.forms.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/profiles/hostmaster/hostmaster.forms.inc,v
retrieving revision 1.5
diff -r1.5 hostmaster.forms.inc
34c34
< 
---
> /*
56c56
< 
---
> */
