Commit c1627370 authored by Jon Pugh's avatar Jon Pugh

Merge branch '7.x-3.x' into 7.x-3.x-devshop

parents 613f79da 3273bcf1
......@@ -125,6 +125,7 @@ publish:unstable-repo:
only:
- 7.x-3.x
- /^7\.x-3\.\d+\.x/
image: ruby:2.1
before_script:
......
......@@ -59,22 +59,25 @@ class Provision_Config_Drupal_Settings extends Provision_Config {
$backup_file = drush_get_option('backup_file');
$this->backup_in_progress = !empty($backup_file);
// Create a blank local.settings.php file if not exists.
// Create a blank local.settings.php file if not exists and option calls for this.
$local_settings = $this->site_path . '/local.settings.php';
$local_settings_blank = "<?php # local settings.php \n";
$local_description = 'Drupal local.settings.php file';
if (!provision_file()->exists($local_settings)->status()) {
if (!provision_file()->exists($local_settings)->status() &&
drush_get_option('provision_create_local_settings_file', TRUE)) {
provision_file()->file_put_contents($local_settings, $local_settings_blank)
->succeed('Generated blank ' . $local_description)
->fail('Could not generate ' . $local_description);
}
// Set permissions on local.settings.php.
provision_file()->chgrp($local_settings, $this->group)
->succeed('Changed group ownership of <code>@path</code> to @gid')
->fail('Could not change group ownership of <code>@path</code> to @gid');
provision_file()->chmod($local_settings, $this->mode | 0440)
->succeed('Changed permissions of <code>@path</code> to @perm')
->fail('Could not change permissions of <code>@path</code> to @perm');
// Set permissions on local.settings.php, if it exists.
if (provision_file()->exists($local_settings)->status()) {
provision_file()->chgrp($local_settings, $this->group)
->succeed('Changed group ownership of <code>@path</code> to @gid')
->fail('Could not change group ownership of <code>@path</code> to @gid');
provision_file()->chmod($local_settings, $this->mode | 0440)
->succeed('Changed permissions of <code>@path</code> to @perm')
->fail('Could not change permissions of <code>@path</code> to @perm');
}
}
}
......@@ -3,10 +3,14 @@
$script = <<SCRIPT
sudo apt-get update
sudo apt-get install --yes curl
echo "deb http://debian.aegirproject.org unstable main" | sudo tee -a /etc/apt/sources.list.d/aegir-unstable.list
curl http://debian.aegirproject.org/key.asc | sudo apt-key add -
sudo apt-get update
echo "debconf debconf/frontend select Noninteractive" | debconf-set-selections
#echo "debconf debconf/priority select critical" | debconf-set-selections
......
debian/aegir-archive-keyring.gpg usr/share/keyrings
......@@ -34,6 +34,7 @@ if [ -z "$RET" ]; then
db_set aegir/site `hostname -f`
fi
db_input low aegir/makefile || true
db_input low aegir/profile || true
db_input low aegir/working-copy || true
db_input low aegir/db_host || true
db_input low aegir/db_user || true
......
......@@ -41,6 +41,10 @@ case "$1" in
if [ ! -z "$RET" ]; then
FLAGS="$FLAGS --makefile='$RET'"
fi
db_get "aegir/profile"
if [ ! -z "$RET" ]; then
FLAGS="$FLAGS --profile='$RET'"
fi
db_get "aegir/webserver"
if [ ! -z "$RET" ]; then
if [ "$RET" = 'apache2' ]; then
......
......@@ -39,6 +39,14 @@ Description: Makefile used to create the platform:
.
If this is left empty, Aegir will use its internal makefile.
Template:aegir/profile
Type: string
Description: The install profile to use:
The profile parameter passed to hostmaster-install. Normally this is
hostmaster.
.
If this is left empty, Aegir will use its default.
Template:aegir/webserver
Type: select
Description: Webserver type to use:
......
aegir3-provision (3.11.2) testing; urgency=medium
* Version bump to get the Drupal core security update. 3.11.1 got stuck in our packaging system.
-- Herman van Rink <helmo@initfour.nl> Mon, 26 Jun 2017 21:36:53 +0200
aegir3-provision (3.11.1) unstable; urgency=medium
* Version bump to get the Drupal core security update.
-- Herman van Rink <helmo@initfour.nl> Mon, 26 Jun 2017 19:45:53 +0200
aegir3-provision (3.11) unstable; urgency=medium
* Many bugfixes and UI improvements, see http://aegir.readthedocs.org/en/3.x/release-notes/3.11
-- Herman van Rink <helmo@initfour.nl> Tue, 30 May 2017 13:45:14 +0200
aegir3-provision (3.11~beta3) unstable; urgency=medium
* Preparations for the 3.11 release, testing the GitLab build process.
* Many bugfixes and UI improvements, see http://aegir.readthedocs.org/en/3.x/release-notes/3.11
-- Herman van Rink <helmo@initfour.nl> Fri, 26 May 2017 10:13:19 +0200
aegir3-provision (3.11~beta2) unstable; urgency=medium
* Preparations for the 3.11 release, testing the GitLab build process.
......
Source: aegir3-provision
Section: admin
Priority: optional
Maintainer: Antoine Beaupré <anarcat@debian.org>
Maintainer: Herman van Rink <helmo@initfour.nl>
DM-Upload-Allowed: yes
Build-Depends: debhelper (>= 8)
Standards-Version: 3.9.2
......@@ -31,7 +31,6 @@ Description: mass Drupal hosting system - backend
Package: aegir3-hostmaster
Architecture: all
Depends: ${misc:Depends}, php5-mysql | php7.0-mysql, php5-gd | php7.0-gd, apache2 | nginx, libapache2-mod-php5 | libapache2-mod-php7.0 | php5-fpm | php7.0-fpm, aegir3-provision (>= ${source:Version}), git-core, unzip, lsb-base (>= 3.0-6)
Build-Depends: dh-systemd
Recommends: php5 | php7.0
Conflicts: aegir-hostmaster, aegir-hostmaster2, aegir2-hostmaster
Replaces: aegir-hostmaster, aegir-hostmaster2, aegir2-hostmaster
......@@ -56,6 +55,7 @@ Architecture: all
Depends: ${misc:Depends}, aegir3-provision (>= ${source:Version}), aegir3-hostmaster (>= ${source:Version})
Conflicts: aegir, aegir2
Replaces: aegir, aegir2
Suggests: aegir-archive-keyring
Description: mass Drupal hosting system
A set of contributed modules for Drupal that aims to solve the
problem of managing a large number of Drupal sites. It does this by
......@@ -87,3 +87,11 @@ Description: web frontend for the Aegir hosting system
connect via SSH to sync files and reload apache
* /etc/sudoers.d/aegir - allow aegir to restart apache
* /etc/apache2/conf.d/aegir.conf - load the aegir apache config
Package: aegir-archive-keyring
Architecture: all
Depends: ${misc:Depends}, gnupg2 | gnupg
Description: GnuPG archive keys for the Aegir hosting system
The Aegir project digitally signs its Release files. This package
contains the archive keys used for that.
With this package we can update these keys when they expire.
......@@ -7,7 +7,9 @@
%:
dh $@
override_dh_install:
override_dh_auto_install:
dh_auto_install
cp -r "$(CURDIR)/db/" "$(CURDIR)/http/" "$(CURDIR)/"*.make "$(CURDIR)/platform/" "$(CURDIR)/Provision/" "$(CURDIR)/Symfony/" "$(CURDIR)"/*.inc "$(CURDIR)"/*.php "$(CURDIR)"/*.info "$(CURDIR)/debian/aegir3-provision/usr/share/drush/commands/provision/"
# We need this nasty hack, because we added directories.
......@@ -20,32 +22,4 @@ override_dh_install:
override_dh_installinit:
dh_installinit --name=hosting-queued
DOMAIN?=$(shell hostname -f)
KEY?="-kjenkins@$(DOMAIN)"
# this builds a debian package based on what the current branches are
# this usually tests the latest release
jenkins-build-official:
git-buildpackage -b --git-upstream-branch=origin/upstream --git-debian-branch=origin/debian --git-ignore-branch -kjenkins@ci.aegirproject.org
# the version from the changelog, add the git hash
version=$(shell sed -ne 's/^[^(]*(\([^)]*\)).*/\1/;1p' debian/changelog)
commit=$(shell git log -n 1 --oneline | sed 's/ .*$$//')
# the version we're building with jenkins
jenkins_version=${version}+${BUILD_NUMBER}.${commit}
# debug for the above
show-version:
@echo ${version}
# this builds a debian package but first updates the branches to follow the latest 2.x branch
# this assumes you are on a "debian" branch (of course)
jenkins-build-auto:
dch -D unstable -v ${jenkins_version} "automatic jenkins build ${BUILD_TAG} for commit ${commit}"
git commit -m"dummy commit for jenkins ${BUILD_TAG} autobuild" debian/changelog
git-buildpackage -b ${KEY}
# helper to debug the above
show-jenkins-build-auto:
@echo would build version ${jenkins_version} with key ${KEY}
......@@ -6,8 +6,13 @@
function drush_provision_drupal_pre_provision_delete($backup_file = NULL) {
if (d()->type === 'site') {
drush_set_option('force', true, 'process');
drush_invoke("provision-backup", $backup_file);
drush_unset_option('force', 'process');
if (!empty($backup_file) && !strpos($backup_file, '/')) {
drush_set_error('PROVISION_DELETE_BACKUP_NAME_RELATIVE', dt('The passed backup name is a relative path, storing that in the site directory which is going to be deleted is probably not intended. Try an absolute name, or no name to let one be generated.'));
}
else {
drush_invoke("provision-backup", $backup_file);
drush_unset_option('force', 'process');
}
}
}
......
......@@ -13,9 +13,11 @@
* usage:
* $options['provision_backup_suffix'] = '.tar.bz2';
*
* provision_verify_platforms_before_migrate - When migrating many sites turning this off can save time, default TRUE.
* provision_verify_platforms_before_migrate
* When migrating many sites turning this off can save time, default TRUE.
*
* provision_backup_suffix - Method to set the compression used for backups... e.g. '.tar.bz2' or '.tar.', defaults to '.tar.gz'.
* provision_backup_suffix
* Method to set the compression used for backups... e.g. '.tar.bz2' or '.tar.', defaults to '.tar.gz'.
*
* provision_apache_conf_suffix
* Set to TRUE to generate apache vhost files with a .conf suffix, default FALSE.
......@@ -23,6 +25,8 @@
* WARNING: After turning this on you need to re-verify all your sites, then then servers,
* and then cleanup the old configfiles (those without the .conf suffix).
*
* provision_create_local_settings_file
* Create a site 'local.settings.php' file if one isn't found, default TRUE.
*/
/**
......
......@@ -6,17 +6,14 @@
#
sudo apt-get update
echo "debconf debconf/frontend select Noninteractive" | debconf-set-selections
#echo "debconf debconf/priority select critical" | debconf-set-selections
echo "debconf debconf/frontend select Noninteractive" | sudo debconf-set-selections
echo mysql-server-5.7 mysql-server/root_password password PASSWORD | debconf-set-selections
echo mysql-server-5.7 mysql-server/root_password_again password PASSWORD | debconf-set-selections
debconf-set-selections <<EOF
sudo debconf-set-selections <<EOF
aegir3-hostmaster aegir/db_password string PASSWORD
aegir3-hostmaster aegir/db_password seen true
aegir3-hostmaster aegir/db_user string root
aegir3-hostmaster aegir/db_user string aegir_root
aegir3-hostmaster aegir/db_host string localhost
aegir3-hostmaster aegir/email string aegir@example.com
aegir3-hostmaster aegir/site string aegir.example.com
......@@ -24,9 +21,10 @@ postfix postfix/main_mailer_type select Local only
EOF
sudo apt-get install --yes mysql-server phpi7.0-mysql php7.0-cli
set -x
sudo apt-get install --yes mariadb-server-10.1 php7.0-mysql php7.0-cli
sudo /usr/bin/mysql -e "GRANT ALL ON *.* TO 'aegir_root'@'localhost' IDENTIFIED BY 'PASSWORD' WITH GRANT OPTION"
sudo DPKG_DEBUG=developer dpkg --install build/aegir3_*.deb build/aegir3-provision*.deb build/aegir3-hostmaster*.deb
sudo apt-get install --fix-broken --yes
......
#
# Install Aegir debian packages located in the projects stable repository.
#
# This script is tuned for Debian 9 - Stretch
#
sudo apt-get install --yes curl
echo "deb http://debian.aegirproject.org stable main" | sudo tee -a /etc/apt/sources.list.d/aegir-stable.list
curl https://debian.aegirproject.org/key.asc | sudo apt-key add -
sudo apt-get update
echo "debconf debconf/frontend select Noninteractive" | sudo debconf-set-selections
sudo apt-get install --yes mariadb-server-10.1
sudo /usr/bin/mysql -e "GRANT ALL ON *.* TO 'aegir_root'@'localhost' IDENTIFIED BY 'PASSWORD' WITH GRANT OPTION"
sudo debconf-set-selections <<EOF
aegir3-hostmaster aegir/db_password string PASSWORD
aegir3-hostmaster aegir/db_password seen true
aegir3-hostmaster aegir/db_user string aegir_root
aegir3-hostmaster aegir/db_host string localhost
aegir3-hostmaster aegir/email string aegir@example.com
aegir3-hostmaster aegir/site string aegir.example.com
postfix postfix/main_mailer_type select Local only
EOF
# TODO: remove --allow-unauthenticated when https://www.drupal.org/node/2882620 is fixed
sudo DPKG_DEBUG=developer apt-get install --yes aegir3 --allow-unauthenticated
......@@ -52,15 +52,15 @@ The following operations will be done:
0. prompt you for a debian/changelog entry
1. change the makefile to download tarball
2. change the upgrade.sh.txt version
. change the .gitlab-ci.yml to build a release package
3. display the resulting diff
4. commit those changes to git
5. lay down the tag
6. revert the commit
7. clone fresh copies of hosting/hostmaster and eldir to lay down the tag
8. (optionally) push those changes
9. clone fresh copies of golden contrib to lay down the tag
10. (optionally) push those changes
3. change the .gitlab-ci.yml to build a release package
4. display the resulting diff
5. commit those changes to git
6. lay down the tag
7. revert the commit
8. clone fresh copies of hosting/hostmaster and eldir to lay down the tag
9. (optionally) push those changes
10. clone fresh copies of golden contrib to lay down the tag
11. (optionally) push those changes
The operation can be aborted before step 8. Don't forget that as
long as changes are not pushed upstream, this can all be reverted (see
......@@ -174,8 +174,14 @@ fi
# Golden Contrib
golden_contribs="hosting_civicrm hosting_git hosting_remote_import hosting_site_backup_manager hosting_tasks_extra"
echo =========
echo
echo Golden Contribs: $golden_contribs
echo
echo Cloning fresh copies...
echo
for shortname in $golden_contribs; do
rm -rf build-area/$shortname
git clone --branch $CURRENT_BRANCH `git config remote.origin.url | sed "s/provision/$shortname/"` build-area/$shortname
......@@ -185,10 +191,8 @@ for shortname in $golden_contribs; do
done
echo =========
echo
echo Golden Contribs: $golden_contribs
echo
# Can we push?
if prompt_yes_no "Push tags and commits for GOLDEN CONTRIB upstream? "; then
for shortname in $golden_contribs; do
......@@ -196,6 +200,6 @@ if prompt_yes_no "Push tags and commits for GOLDEN CONTRIB upstream? "; then
done
fi
if prompt_yes_no "Is GitLab finished building the release packages? Then we can push the revert commit. "; then
if prompt_yes_no "Is GitLab finished building the release packages? And is the release promoted to the stable channel? Then we can push the revert commit. "; then
git push origin
fi
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