From 4d04e4191137c526575ff355ba08c6742da465b3 Mon Sep 17 00:00:00 2001 From: Tom J Nowell Date: Sun, 16 Jun 2024 11:54:39 +0100 Subject: [PATCH 01/15] begin the 3.14.0 cycle --- CHANGELOG.md | 2 ++ version | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 67a0d319d..1f45cb82d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,8 @@ permalink: /docs/en-US/changelog/ # Changelog +## 3.14 ( 2024 TBA ) + ## 3.13.1 ( 2024 June 16th ) ### Enhancements diff --git a/version b/version index c10780c62..f982feb41 100644 --- a/version +++ b/version @@ -1 +1 @@ -3.13.1 +3.14.0 From 8e59717844251c9d887a3a392b92a22f9c19e4c8 Mon Sep 17 00:00:00 2001 From: Tom J Nowell Date: Sun, 16 Jun 2024 11:58:05 +0100 Subject: [PATCH 02/15] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 130938dc9..056e592ee 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ [![Codacy Badge](https://api.codacy.com/project/badge/Grade/206b06167aaf48aab24422cd417e8afa)](https://www.codacy.com/gh/Varying-Vagrant-Vagrants/VVV?utm_source=github.com&utm_medium=referral&utm_content=Varying-Vagrant-Vagrants/VVV&utm_campaign=Badge_Grade) [![Average time to resolve an issue](http://isitmaintained.com/badge/resolution/varying-vagrant-vagrants/vvv.svg)](http://isitmaintained.com/project/varying-vagrant-vagrants/vvv "Average time to resolve an issue") [![Percentage of issues still open](http://isitmaintained.com/badge/open/varying-vagrant-vagrants/vvv.svg)](http://isitmaintained.com/project/varying-vagrant-vagrants/vvv "Percentage of issues still open") -VVV is a local developer environment, mainly aimed at [WordPress](https://wordpress.org) developers. It uses [Vagrant](https://www.vagrantup.com) and VirtualBox/Parallels/HyperV to create a linux server environment for building sites, and contributing to WordPress itself. +VVV is a local developer environment, mainly aimed at [WordPress](https://wordpress.org) developers. It uses [Vagrant](https://www.vagrantup.com) and Docker/VirtualBox/Parallels/HyperV to create a linux server environment for building sites, and contributing to WordPress itself. _VVV stands for Varying Vagrant Vagrants._ From 1ab0264f14e4d9b9b966f20325f54c2529906835 Mon Sep 17 00:00:00 2001 From: Tom J Nowell Date: Tue, 18 Jun 2024 15:19:38 +0100 Subject: [PATCH 03/15] if the dashboard folder is missing warn the user during provision --- provision/provision-dashboard.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/provision/provision-dashboard.sh b/provision/provision-dashboard.sh index 5af2f239b..8052ca137 100755 --- a/provision/provision-dashboard.sh +++ b/provision/provision-dashboard.sh @@ -6,6 +6,11 @@ REPO=$1 BRANCH=${2:-master} DIR="/srv/www/default/dashboard" +if [[ ! -f /srv/www/default/index.php ]]; then + vvv_warn " ! The dashboard loader index.hp file is missing!" + vvv_warn " Without this neither the default or custom dashboard will load, and you will get a HTTP 401 forbidden message. If you deleted your www folder, restore the www/default folder to fix this, 'git checkout www/default' might fix this for you." +fi + if [[ false != "dashboard" && false != "${REPO}" ]]; then noroot mkdir -p "${DIR}" # Clone or pull the resources repository From f1cb6b7cc11b72273267a6f6670732cb2228bac5 Mon Sep 17 00:00:00 2001 From: Tom J Nowell Date: Tue, 18 Jun 2024 15:20:09 +0100 Subject: [PATCH 04/15] added a missing dashboard HTML file --- .../core/nginx/default-pages/nodashboard.html | 88 +++++++++++++++++++ 1 file changed, 88 insertions(+) create mode 100644 provision/core/nginx/default-pages/nodashboard.html diff --git a/provision/core/nginx/default-pages/nodashboard.html b/provision/core/nginx/default-pages/nodashboard.html new file mode 100644 index 000000000..aba5893d1 --- /dev/null +++ b/provision/core/nginx/default-pages/nodashboard.html @@ -0,0 +1,88 @@ + + + + + Dashboard file missings + + + + +
+
+

The Dashboard Loader file is missing!

+

It looks like www/default/index.php is missing!

+

This file and the www/default folder are needed for dashboard and other parts of VVV to function. This includes tools such as xdebug info/phpmyadmin/etc.

+

You can fix this and restore the www/default folder with git checkout www/default.

+
+
+ 🚩 +
+
+ + From 89ffba0b0528a71a9c781533fe581fc9049d5b4f Mon Sep 17 00:00:00 2001 From: Tom J Nowell Date: Tue, 18 Jun 2024 15:20:33 +0100 Subject: [PATCH 05/15] when the default dashboard index.php is missing fallack to the nodashoard.html file --- provision/core/nginx/config/sites/default.conf | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/provision/core/nginx/config/sites/default.conf b/provision/core/nginx/config/sites/default.conf index 764552c27..57f708148 100644 --- a/provision/core/nginx/config/sites/default.conf +++ b/provision/core/nginx/config/sites/default.conf @@ -32,10 +32,17 @@ server { root /usr/share/nginx/html; } + location = /nodashboard.html { + ssi on; + internal; + auth_basic off; + root /usr/share/nginx/html; + } + include /etc/nginx/custom-dashboard-extensions/*.conf; location / { - index index.php; + index index.php /nodashboard.html; try_files $uri $uri/ /index.php$is_args$args; } From b1e77b2cf7ef6381e0b94cd1f391552264f632be Mon Sep 17 00:00:00 2001 From: Tom J Nowell Date: Tue, 18 Jun 2024 15:25:13 +0100 Subject: [PATCH 06/15] update changelog --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1f45cb82d..1dcc421ff 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,10 @@ permalink: /docs/en-US/changelog/ ## 3.14 ( 2024 TBA ) +### Enhancements + +* VVV now shows a missing dashboard page with help when `www/default/index.php` is accidentally deleted instead of a HTTP forbidden error ( #2714 ) + ## 3.13.1 ( 2024 June 16th ) ### Enhancements From edbb7f843414a8c659b06a107a5fbfef2185dda3 Mon Sep 17 00:00:00 2001 From: Tom J Nowell Date: Tue, 18 Jun 2024 15:42:12 +0100 Subject: [PATCH 07/15] Dont just default to docker, check if it is installed first then use parallels if thats present --- Vagrantfile | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff --git a/Vagrantfile b/Vagrantfile index ea506a906..057bccbca 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -40,6 +40,21 @@ def sudo_warnings # exit end + +def vvv_is_docker_present() + VagrantPlugins::DockerProvider::Driver.new.execute("docker", "version") + return true +rescue Vagrant::Errors::CommandUnavailable + return false +end + +def vvv_is_parallels_present() + VagrantPlugins::DockerProvider::Driver.new.execute("prctl", "version") + return true +rescue Vagrant::Errors::CommandUnavailable + return false +end + vagrant_dir = __dir__ show_logo = false branch_c = "\033[38;5;6m" # 111m" @@ -214,12 +229,16 @@ vvv_config['general'] = {} unless vvv_config['general'].is_a? Hash defaults = {} defaults['memory'] = 2048 -defaults['cores'] = 1 +defaults['cores'] = 2 defaults['provider'] = 'virtualbox' -# if Arm default to docker +# if Arm default to docker then parallels if Etc.uname[:version].include? 'ARM64' - defaults['provider'] = 'docker' + if vvv_is_docker_present() + defaults['provider'] = 'docker' + elsif vvv_is_parallels_present + defaults['provider'] = 'parallels' + end end # This should rarely be overridden, so it's not included in the config/default-config.yml file. From 26c2f310ed7c65342813fa70fcc3a14d97d2bbf6 Mon Sep 17 00:00:00 2001 From: Tom J Nowell Date: Tue, 18 Jun 2024 15:47:43 +0100 Subject: [PATCH 08/15] udpate changelog --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1f45cb82d..19c35bddd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,10 @@ permalink: /docs/en-US/changelog/ ## 3.14 ( 2024 TBA ) +### Bug Fixes + +* VVV will check if Docker is installed before defaulting to it on Arm64/Apple Silicon ( #2715 ) + ## 3.13.1 ( 2024 June 16th ) ### Enhancements From 321bd3fd4262c020090cac5fa4d0cf4bc6644032 Mon Sep 17 00:00:00 2001 From: Tom J Nowell Date: Tue, 18 Jun 2024 15:50:36 +0100 Subject: [PATCH 09/15] fix parallels check --- Vagrantfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Vagrantfile b/Vagrantfile index 057bccbca..6b405c9e4 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -236,7 +236,7 @@ defaults['provider'] = 'virtualbox' if Etc.uname[:version].include? 'ARM64' if vvv_is_docker_present() defaults['provider'] = 'docker' - elsif vvv_is_parallels_present + else defaults['provider'] = 'parallels' end end From 57c757cfa41a0601dfff628215f80530d99f9fc9 Mon Sep 17 00:00:00 2001 From: Tom J Nowell Date: Tue, 18 Jun 2024 15:57:44 +0100 Subject: [PATCH 10/15] Purge mysql packages when cleaning before GH Action tests --- .github/workflows/vvv-provisioning.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/vvv-provisioning.yml b/.github/workflows/vvv-provisioning.yml index 0ea2a8782..b2cdfa5e3 100644 --- a/.github/workflows/vvv-provisioning.yml +++ b/.github/workflows/vvv-provisioning.yml @@ -27,7 +27,7 @@ jobs: - name: Create Vagrant Like Environment run: | # uninstall pre installed packages (to test if extensions work) - sudo apt-get -q --autoremove --purge remove php* + sudo apt-get -q --autoremove --purge remove php* mysql* sudo apt-get -q autoclean # remove pre-installed composer From c2876a178117aabf867dd76a4a3179a548cc649e Mon Sep 17 00:00:00 2001 From: Tom J Nowell Date: Tue, 18 Jun 2024 16:07:21 +0100 Subject: [PATCH 11/15] update changelog with CI action tweaks --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2376c4c2b..bab683232 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,7 @@ permalink: /docs/en-US/changelog/ ### Bug Fixes * VVV will check if Docker is installed before defaulting to it on Arm64/Apple Silicon ( #2715 ) +* Fixed MySQL issues in GitHub Actions ( #2716 ) ## 3.13.1 ( 2024 June 16th ) From e43c3a05d97a60700b53dc3d6b5919d375514082 Mon Sep 17 00:00:00 2001 From: Tom J Nowell Date: Wed, 10 Jul 2024 16:35:13 +0100 Subject: [PATCH 12/15] Improve docker/parallels detection --- Vagrantfile | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/Vagrantfile b/Vagrantfile index 6b405c9e4..8c554b4dc 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -42,17 +42,13 @@ end def vvv_is_docker_present() - VagrantPlugins::DockerProvider::Driver.new.execute("docker", "version") - return true -rescue Vagrant::Errors::CommandUnavailable - return false + if system("docker version") + return true + end end def vvv_is_parallels_present() - VagrantPlugins::DockerProvider::Driver.new.execute("prctl", "version") - return true -rescue Vagrant::Errors::CommandUnavailable - return false + return Vagrant.has_plugin?("vagrant-parallels") end vagrant_dir = __dir__ From e10bc480339fe5ffb3a8893a5c89e3260131853a Mon Sep 17 00:00:00 2001 From: Tom J Nowell Date: Wed, 10 Jul 2024 16:45:48 +0100 Subject: [PATCH 13/15] avoid printing the docker version out in the splash --- Vagrantfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Vagrantfile b/Vagrantfile index 8c554b4dc..d1f7dc1cb 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -42,7 +42,7 @@ end def vvv_is_docker_present() - if system("docker version") + if `docker version` return true end end @@ -344,7 +344,7 @@ if show_logo when 'hyperv' provider_version = 'n/a' when 'docker' - provider_version = VagrantPlugins::DockerProvider::Driver.new.execute("docker", "-v").gsub("Docker version ", "") + provider_version = `docker -v`.gsub("Docker version ", "") else provider_version = '??' end From f3ff9fbd7798556941a291b20dda9159b86bb027 Mon Sep 17 00:00:00 2001 From: Tom J Nowell Date: Fri, 19 Jul 2024 14:54:52 +0100 Subject: [PATCH 14/15] Update CHANGELOG.md --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index bab683232..b2d669c2b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,7 +6,7 @@ permalink: /docs/en-US/changelog/ # Changelog -## 3.14 ( 2024 TBA ) +## 3.13.2 ( 2024 July 19th ) ### Enhancements From 15ea69e0cd2873684099bf02072ac9a8fb810ba6 Mon Sep 17 00:00:00 2001 From: Tom J Nowell Date: Fri, 19 Jul 2024 14:55:28 +0100 Subject: [PATCH 15/15] Update version to 3.13.2 --- version | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/version b/version index f982feb41..3e388a4ac 100644 --- a/version +++ b/version @@ -1 +1 @@ -3.14.0 +3.13.2