From c0bcf5350acf069f99778112a7271457b5b166d8 Mon Sep 17 00:00:00 2001 From: Daniele Scasciafratte Date: Wed, 28 Oct 2020 12:35:45 +0100 Subject: [PATCH 01/14] fix #2290 --- tideways/provision.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tideways/provision.sh b/tideways/provision.sh index 2b8ab2b6..f1700cde 100755 --- a/tideways/provision.sh +++ b/tideways/provision.sh @@ -123,4 +123,8 @@ install_xhgui_frontend enable_tideways_by_site restart_php -echo " * Tideways and XHGui installed" +if [[ ! -f "/srv/www/default/xhgui/composer.lock" ]] + echo " * XHGUI installtion failed!" +else + echo " * Tideways and XHGui installed" +fi From ec874cd484a1b59671eaadeb213bca0f1a55c97d Mon Sep 17 00:00:00 2001 From: Daniele Scasciafratte Date: Wed, 28 Oct 2020 12:41:48 +0100 Subject: [PATCH 02/14] fix #2288 --- tideways/provision.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tideways/provision.sh b/tideways/provision.sh index f1700cde..fa5bdb9f 100755 --- a/tideways/provision.sh +++ b/tideways/provision.sh @@ -14,6 +14,9 @@ function fetch_tideways_repo() { function install_tideways_for_php_version() { version=$1 + if [[ ! $(command -v php-config$version) ]]; then + return + fi echo " * Installing Tideways for PHP ${version}" php_modules_path=$("php-config${version}" --extension-dir) echo " * Copying tideways files for PHP ${version}" From 1322da25403e804e7e73f016af55a45146e71bd3 Mon Sep 17 00:00:00 2001 From: Daniele Scasciafratte Date: Wed, 28 Oct 2020 12:46:07 +0100 Subject: [PATCH 03/14] Remove mongo depende or doesn't start --- tideways/provision.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/tideways/provision.sh b/tideways/provision.sh index fa5bdb9f..954d60b7 100755 --- a/tideways/provision.sh +++ b/tideways/provision.sh @@ -76,6 +76,7 @@ function install_xhgui_frontend() { cd /srv/www/default noroot git clone "https://github.com/perftools/xhgui.git" xhgui cd xhgui + composer remove alcaeus/mongo-php-adapter echo " * Installing xhgui" sudo php install.php else From 620f30790d27b110f37713f7675373d1874a933e Mon Sep 17 00:00:00 2001 From: Daniele Scasciafratte Date: Wed, 28 Oct 2020 12:54:27 +0100 Subject: [PATCH 04/14] fix #2261 --- tideways/provision.sh | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/tideways/provision.sh b/tideways/provision.sh index 954d60b7..6e360498 100755 --- a/tideways/provision.sh +++ b/tideways/provision.sh @@ -71,6 +71,13 @@ function restart_php() { function install_xhgui_frontend() { cp -f "${DIR}/nginx.conf" "/etc/nginx/custom-utilities/xhgui.conf" + declare -a packages=() + for version in "7.0" "7.1" "7.2" "7.3" "7.4"; do + if [[ $(command -v php$version) ]]; then + packages+=("php${version}-sqlite3") + fi + done + apt-get -y --allow-downgrades --allow-remove-essential --allow-change-held-packages -o Dpkg::Options::=--force-confdef -o Dpkg::Options::=--force-confnew install --fix-missing --fix-broken "${packages[@]}" if [[ ! -d "/srv/www/default/xhgui" ]]; then echo -e " * Git cloning xhgui from https://github.com/perftools/xhgui.git" cd /srv/www/default @@ -88,13 +95,6 @@ function install_xhgui_frontend() { cp -f "${DIR}/config.php" "/srv/www/default/xhgui/config/config.php" if [[ ! -d "/srv/www/default/php-profiler" ]]; then echo -e " * Installing php-profiler for Xhgui" - declare -a packages=() - for version in "7.0" "7.1" "7.2" "7.3" "7.4"; do - if [[ $(command -v php$version) ]]; then - packages+=("php${version}-sqlite3") - fi - done - apt-get -y --allow-downgrades --allow-remove-essential --allow-change-held-packages -o Dpkg::Options::=--force-confdef -o Dpkg::Options::=--force-confnew install --fix-missing --fix-broken "${packages[@]}" cd /srv/www/default noroot mkdir ./php-profiler && cd ./php-profiler echo " * Installing php-profiler" From 6168d72cd8a33be9952e61217c665299e795e695 Mon Sep 17 00:00:00 2001 From: Daniele Scasciafratte Date: Wed, 28 Oct 2020 14:31:15 +0100 Subject: [PATCH 05/14] Update tideways/provision.sh Co-authored-by: Tom J Nowell --- tideways/provision.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tideways/provision.sh b/tideways/provision.sh index 6e360498..99dcea89 100755 --- a/tideways/provision.sh +++ b/tideways/provision.sh @@ -128,7 +128,7 @@ enable_tideways_by_site restart_php if [[ ! -f "/srv/www/default/xhgui/composer.lock" ]] - echo " * XHGUI installtion failed!" + echo " * XHGUI installation failed!" else echo " * Tideways and XHGui installed" fi From 612a2c0fb9d0a5a381972613bbf5f179e50b058b Mon Sep 17 00:00:00 2001 From: Daniele Scasciafratte Date: Wed, 28 Oct 2020 14:32:39 +0100 Subject: [PATCH 06/14] added noroot on composer --- tideways/provision.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tideways/provision.sh b/tideways/provision.sh index 99dcea89..6a4b0043 100755 --- a/tideways/provision.sh +++ b/tideways/provision.sh @@ -83,7 +83,7 @@ function install_xhgui_frontend() { cd /srv/www/default noroot git clone "https://github.com/perftools/xhgui.git" xhgui cd xhgui - composer remove alcaeus/mongo-php-adapter + noroot composer remove alcaeus/mongo-php-adapter echo " * Installing xhgui" sudo php install.php else From 197c2409a2a9de6b6d70175593a7181bfada8dae Mon Sep 17 00:00:00 2001 From: Daniele Scasciafratte Date: Wed, 28 Oct 2020 17:53:19 +0100 Subject: [PATCH 07/14] Disable platform check --- tideways/provision.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tideways/provision.sh b/tideways/provision.sh index 6a4b0043..f94af142 100755 --- a/tideways/provision.sh +++ b/tideways/provision.sh @@ -83,7 +83,7 @@ function install_xhgui_frontend() { cd /srv/www/default noroot git clone "https://github.com/perftools/xhgui.git" xhgui cd xhgui - noroot composer remove alcaeus/mongo-php-adapter + noroot composer config platform-check false echo " * Installing xhgui" sudo php install.php else From ddcf0460583963fdd5729dc73c3019ea7153343e Mon Sep 17 00:00:00 2001 From: Daniele Scasciafratte Date: Wed, 28 Oct 2020 17:54:55 +0100 Subject: [PATCH 08/14] set release version in provisioner for xhgui --- tideways/provision.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tideways/provision.sh b/tideways/provision.sh index f94af142..5097cd05 100755 --- a/tideways/provision.sh +++ b/tideways/provision.sh @@ -81,7 +81,7 @@ function install_xhgui_frontend() { if [[ ! -d "/srv/www/default/xhgui" ]]; then echo -e " * Git cloning xhgui from https://github.com/perftools/xhgui.git" cd /srv/www/default - noroot git clone "https://github.com/perftools/xhgui.git" xhgui + noroot git clone -b 0.16.0 "https://github.com/perftools/xhgui.git" xhgui cd xhgui noroot composer config platform-check false echo " * Installing xhgui" From 5dab020a7f0787013779a9f7690051e5e376d40c Mon Sep 17 00:00:00 2001 From: Daniele Scasciafratte Date: Thu, 29 Oct 2020 15:05:20 +0100 Subject: [PATCH 09/14] refactor(apt): moved to function --- tideways/provision.sh | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/tideways/provision.sh b/tideways/provision.sh index 5097cd05..73b9e86b 100755 --- a/tideways/provision.sh +++ b/tideways/provision.sh @@ -69,8 +69,7 @@ function restart_php() { service nginx restart > /dev/null 2>&1 } -function install_xhgui_frontend() { - cp -f "${DIR}/nginx.conf" "/etc/nginx/custom-utilities/xhgui.conf" +function install_php_sqlite() { declare -a packages=() for version in "7.0" "7.1" "7.2" "7.3" "7.4"; do if [[ $(command -v php$version) ]]; then @@ -78,6 +77,10 @@ function install_xhgui_frontend() { fi done apt-get -y --allow-downgrades --allow-remove-essential --allow-change-held-packages -o Dpkg::Options::=--force-confdef -o Dpkg::Options::=--force-confnew install --fix-missing --fix-broken "${packages[@]}" +} + +function install_xhgui_frontend() { + cp -f "${DIR}/nginx.conf" "/etc/nginx/custom-utilities/xhgui.conf" if [[ ! -d "/srv/www/default/xhgui" ]]; then echo -e " * Git cloning xhgui from https://github.com/perftools/xhgui.git" cd /srv/www/default @@ -85,7 +88,7 @@ function install_xhgui_frontend() { cd xhgui noroot composer config platform-check false echo " * Installing xhgui" - sudo php install.php + php install.php else echo -e " * Updating xhgui..." cd /srv/www/default/xhgui @@ -123,6 +126,7 @@ function enable_tideways_by_site() { echo " * Installing Tideways & XHGui" fetch_tideways_repo check_tideways_php +install_php_sqlite install_xhgui_frontend enable_tideways_by_site restart_php From f9ec1ac717e03792d144deadb61cadde700e29c3 Mon Sep 17 00:00:00 2001 From: Daniele Scasciafratte Date: Thu, 29 Oct 2020 15:07:10 +0100 Subject: [PATCH 10/14] refactor(root): fixed noroot --- tideways/provision.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tideways/provision.sh b/tideways/provision.sh index 73b9e86b..2375d20d 100755 --- a/tideways/provision.sh +++ b/tideways/provision.sh @@ -88,7 +88,7 @@ function install_xhgui_frontend() { cd xhgui noroot composer config platform-check false echo " * Installing xhgui" - php install.php + noroot php install.php else echo -e " * Updating xhgui..." cd /srv/www/default/xhgui From 6c1c1b861182065cdb027c06a75100faa6d32836 Mon Sep 17 00:00:00 2001 From: Daniele Scasciafratte Date: Tue, 10 Nov 2020 13:54:21 +0100 Subject: [PATCH 11/14] bump xhgui version --- tideways/provision.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tideways/provision.sh b/tideways/provision.sh index 2375d20d..2cd97dda 100755 --- a/tideways/provision.sh +++ b/tideways/provision.sh @@ -84,7 +84,7 @@ function install_xhgui_frontend() { if [[ ! -d "/srv/www/default/xhgui" ]]; then echo -e " * Git cloning xhgui from https://github.com/perftools/xhgui.git" cd /srv/www/default - noroot git clone -b 0.16.0 "https://github.com/perftools/xhgui.git" xhgui + noroot git clone -b 0.16.2 "https://github.com/perftools/xhgui.git" xhgui cd xhgui noroot composer config platform-check false echo " * Installing xhgui" From 7af65add26b8f1db597599af09cb8e9e1dd735bf Mon Sep 17 00:00:00 2001 From: Daniele Scasciafratte Date: Tue, 10 Nov 2020 14:50:16 +0100 Subject: [PATCH 12/14] bugfix for bash --- tideways/provision.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tideways/provision.sh b/tideways/provision.sh index 2cd97dda..df30a9e0 100755 --- a/tideways/provision.sh +++ b/tideways/provision.sh @@ -131,7 +131,7 @@ install_xhgui_frontend enable_tideways_by_site restart_php -if [[ ! -f "/srv/www/default/xhgui/composer.lock" ]] +if [[ ! -f "/srv/www/default/xhgui/composer.lock" ]]; then echo " * XHGUI installation failed!" else echo " * Tideways and XHGui installed" From ddf7705c3c6ad958d45421cc4411f5ef7b67053e Mon Sep 17 00:00:00 2001 From: Daniele Scasciafratte Date: Tue, 10 Nov 2020 14:57:28 +0100 Subject: [PATCH 13/14] fix on updating --- tideways/provision.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/tideways/provision.sh b/tideways/provision.sh index df30a9e0..815a4708 100755 --- a/tideways/provision.sh +++ b/tideways/provision.sh @@ -84,15 +84,14 @@ function install_xhgui_frontend() { if [[ ! -d "/srv/www/default/xhgui" ]]; then echo -e " * Git cloning xhgui from https://github.com/perftools/xhgui.git" cd /srv/www/default - noroot git clone -b 0.16.2 "https://github.com/perftools/xhgui.git" xhgui + noroot git clone -b 0.16.3 "https://github.com/perftools/xhgui.git" xhgui cd xhgui - noroot composer config platform-check false echo " * Installing xhgui" noroot php install.php else echo -e " * Updating xhgui..." cd /srv/www/default/xhgui - noroot git pull --rebase origin master > /dev/null 2>&1 + noroot git pull --rebase origin --onto 0.16.3 > /dev/null 2>&1 noroot composer update --prefer-dist > /dev/null 2>&1 fi cp -f "${DIR}/config.php" "/srv/www/default/xhgui/config/config.php" From 6170305583fdd9628c4ebc84203e10b34291c9e7 Mon Sep 17 00:00:00 2001 From: Daniele Scasciafratte Date: Tue, 10 Nov 2020 14:58:50 +0100 Subject: [PATCH 14/14] fixed git command --- tideways/provision.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tideways/provision.sh b/tideways/provision.sh index 815a4708..ad408158 100755 --- a/tideways/provision.sh +++ b/tideways/provision.sh @@ -91,7 +91,7 @@ function install_xhgui_frontend() { else echo -e " * Updating xhgui..." cd /srv/www/default/xhgui - noroot git pull --rebase origin --onto 0.16.3 > /dev/null 2>&1 + noroot git rebase origin --onto 0.16.3 > /dev/null 2>&1 noroot composer update --prefer-dist > /dev/null 2>&1 fi cp -f "${DIR}/config.php" "/srv/www/default/xhgui/config/config.php"