summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHerman van Rink2017-10-19 11:39:55 +0200
committerHerman van Rink2017-10-19 11:39:55 +0200
commitbd49caf91405e861d2037f0baa3aba47c63313a7 (patch)
treee09d5e7d8fc4efb70b5b76b64f5b79a45297f906
parentb98bb01a9e3a7ac87ab7799027c8368ecc0de1dc (diff)
parent147ded4f5258e151cf783d69b2efa60227a1202b (diff)
Issue #2917310 by helmo, yangg: Fix cluster-slave package
-rw-r--r--.gitlab-ci.yml17
-rw-r--r--debian/aegir3-cluster-slave.postinst11
-rw-r--r--debian/control2
-rwxr-xr-xscripts/ci-aegir-dev-install-apt-debian9-cluster-slave.sh38
4 files changed, 65 insertions, 3 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index b59b583..5600c41 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -137,6 +137,23 @@ test:ubuntu-artful-aegir3-apt:
script: "scripts/ci-aegir-dev-install-apt-ubuntu-artful.sh"
+
+test:debian-stretch-aegir3-cluster-slave-apt:
+ stage: test
+ image: debian:stretch
+ allow_failure: false
+ dependencies:
+ - build:deb
+
+ before_script:
+ - apt-get update
+ # Avoid ERROR: invoke-rc.d: policy-rc.d denied execution of start.
+ - echo "#!/bin/sh" > /usr/sbin/policy-rc.d
+ - echo "exit 0" >> /usr/sbin/policy-rc.d
+ - apt-get install --yes sudo curl
+
+ script: "scripts/ci-aegir-dev-install-apt-debian9-cluster-slave.sh"
+
test:behat:
stage: test
image: aegir/hostmaster:packaging_base
diff --git a/debian/aegir3-cluster-slave.postinst b/debian/aegir3-cluster-slave.postinst
index 448e31a..840e242 100644
--- a/debian/aegir3-cluster-slave.postinst
+++ b/debian/aegir3-cluster-slave.postinst
@@ -41,7 +41,7 @@ case "$1" in
adduser --quiet aegir www-data
if [ -d /etc/sudoers.d ]; then
- ucf --debconf-ok /usr/share/doc/aegir-cluster-slave2/examples/example.sudoers /etc/sudoers.d/aegir
+ ucf --debconf-ok /usr/share/doc/aegir3-cluster-slave/examples/example.sudoers /etc/sudoers.d/aegir
ucfr aegir-provision /etc/sudoers.d/aegir
chmod 440 /etc/sudoers.d/aegir
else
@@ -54,7 +54,14 @@ case "$1" in
# make sure we have apache configs settled in, for remote headless aegir servers
touch $VARLIB/config/apache.conf
chown aegir:aegir "$VARLIB/config/apache.conf"
- ln -sf $VARLIB/config/apache.conf /etc/apache2/conf.d/aegir.conf
+ if [ -d /etc/apache2/conf-enabled ]; then
+ # Apache 2.4
+ ln -sf $VARLIB/config/apache.conf /etc/apache2/conf-enabled/aegir.conf
+ else
+ # Apache 2.2
+ ln -sf $VARLIB/config/apache.conf /etc/apache2/conf.d/aegir.conf
+ fi
+
a2enmod ssl rewrite
apache2ctl graceful
diff --git a/debian/control b/debian/control
index af4f11d..1e86f42 100644
--- a/debian/control
+++ b/debian/control
@@ -73,7 +73,7 @@ Depends: ${misc:Depends}, php5-mysql | php7.0-mysql | php7.1-mysql, sudo, apache
Recommends: php5-gd | php7.0-gd | php7.1-gd, php5 | php7.0 | php7.1
Conflicts: aegir-cluster-slave, aegir-cluster-slave2, aegir2-cluster-slave, aegir3
Replaces: aegir-cluster-slave, aegir-cluster-slave2, aegir2-cluster-slave
-Description: web frontend for the Aegir hosting system
+Description: mass Drupal hosting system - slave backend
Configuration of lightweight slave servers for the Aegir "pack"
clustering system.
.
diff --git a/scripts/ci-aegir-dev-install-apt-debian9-cluster-slave.sh b/scripts/ci-aegir-dev-install-apt-debian9-cluster-slave.sh
new file mode 100755
index 0000000..741cfbd
--- /dev/null
+++ b/scripts/ci-aegir-dev-install-apt-debian9-cluster-slave.sh
@@ -0,0 +1,38 @@
+#
+# Install Aegir debian packages located in the 'build/' directory.
+# These are provided by the GitLab CI build stage.
+#
+# This script is tuned for Debian 9 - Stretch.
+#
+
+echo "[CI] Updating APT"
+sudo apt-get update
+
+echo "[CI] Setting debconf settings"
+echo "debconf debconf/frontend select Noninteractive" | sudo debconf-set-selections
+
+
+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
+
+set -x
+echo "[CI] Pre-installing dependencies"
+sudo apt-get install --yes php7.0-mysql php7.0-cli
+
+
+echo "[CI] Installing .deb files .. will fail on missing packages"
+sudo DPKG_DEBUG=developer dpkg --install build/aegir3-cluster-slave_*.deb
+
+echo "[CI] Installing remaining packages and configuring our debs"
+sudo apt-get install --fix-broken --yes
+
+
+