From 7277d3e56545a44fbd4323da6019811a1faa6764 Mon Sep 17 00:00:00 2001 From: VirtuBox Date: Mon, 23 May 2022 13:48:00 +0200 Subject: [PATCH 1/7] Add support for Ubuntu 22.04 & Debian 11 --- install | 10 +++++++--- wo/core/variables.py | 10 +++++++--- 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/install b/install index 1203688..8d0f98a 100755 --- a/install +++ b/install @@ -9,7 +9,7 @@ # ------------------------------------------------------------------------- # wget -qO wo wops.cc && sudo -E bash wo # ------------------------------------------------------------------------- -# Version 3.14.2 - 2022-04-29 +# Version 3.15.0 - 2022-05-23 # ------------------------------------------------------------------------- # CONTENTS @@ -167,9 +167,9 @@ wo_check_distro() { wo_lib_echo_fail "Feel free to open a pull-request if you want to add support for another Linux distributions" exit 100 else - check_wo_linux_distro=$(lsb_release -sc | grep -E "xenial|bionic|jessie|stretch|buster|focal") + check_wo_linux_distro=$(lsb_release -sc | grep -E "bionic|stretch|buster|focal|jammy|bullseye") if [ -z "$check_wo_linux_distro" ]; then - wo_lib_echo_fail "WordOps (wo) only supports Ubuntu 16.04/18.04/20.04 LTS, Debian 9.x/10.x and Raspbian 9.x/10x.\n + wo_lib_echo_fail "WordOps (wo) only supports Ubuntu 18.04/20.04/22.04 LTS, Debian 10.x/11.x and Raspbian 10x./11.x \n You can bypass this warning by adding the flag --force to the install command" exit 100 fi @@ -455,6 +455,8 @@ wo_install() { if [ "$wo_linux_distro" = "Debian" ] || [ "$wo_linux_distro" = "Raspbian" ]; then if [ "$wo_distro_codename" = "stretch" ]; then python3 -m pip install git+https://salsa.debian.org/apt-team/python-apt.git@1.4.y#egg=python-apt + elif [ "$wo_distro_codename" = "bullseye" ]; then + python3 -m pip install git+https://salsa.debian.org/apt-team/python-apt.git@2.2.1#egg=python-apt else python3 -m pip install git+https://salsa.debian.org/apt-team/python-apt.git@1.8.4.y#egg=python-apt fi @@ -463,6 +465,8 @@ wo_install() { python3 -m pip install git+https://salsa.debian.org/apt-team/python-apt.git@2.0.0#egg=python-apt elif [ "$wo_distro_codename" = "bionic" ]; then python3 -m pip install git+https://salsa.debian.org/apt-team/python-apt.git@1.6.y#egg=python-apt + elif [ "$wo_distro_codename" = "jammy" ]; then + python3 -m pip install git+https://salsa.debian.org/apt-team/python-apt.git@2.2.1#egg=python-apt else python3 -m pip install git+https://salsa.debian.org/apt-team/python-apt.git@1.1.y-xenial#egg=python-apt fi diff --git a/wo/core/variables.py b/wo/core/variables.py index 8066caa..a3fc51b 100644 --- a/wo/core/variables.py +++ b/wo/core/variables.py @@ -14,7 +14,7 @@ class WOVar(): """Intialization of core variables""" # WordOps version - wo_version = "3.14.2" + wo_version = "3.15.0" # WordOps packages versions wo_wp_cli = "2.6.0" wo_adminer = "4.8.1" @@ -123,11 +123,15 @@ class WOVar(): wo_deb_repo = "Debian_9.0" elif wo_platform_codename == 'buster': wo_deb_repo = "Debian_10" + elif wo_platform_codename == 'bullseye': + wo_deb_repo = "Debian_11" elif wo_distro == 'raspbian': if wo_platform_codename == 'stretch': wo_deb_repo = "Raspbian_9.0" elif wo_platform_codename == 'buster': wo_deb_repo = "Raspbian_10" + elif wo_platform_codename == 'bullseye': + wo_deb_repo = "Raspbian_11" # debian/raspbian nginx repository wo_nginx_repo = ("deb http://download.opensuse.org" "/repositories/home:" @@ -171,7 +175,7 @@ class WOVar(): else: mariadb_ver = '10.3' else: - mariadb_ver = '10.5' + mariadb_ver = '10.6' wo_mysql = wo_mysql + ["mariadb-backup"] wo_mysql_client = ["mariadb-client", "python3-mysqldb"] @@ -183,7 +187,7 @@ class WOVar(): # APT repositories wo_mysql_repo = ("deb [arch=amd64,arm64,ppc64el] " "http://mariadb.mirrors.ovh.net/MariaDB/repo/" - "10.5/{distro} {codename} main" + "10.6/{distro} {codename} main" .format(distro=wo_distro, codename=wo_platform_codename)) if wo_distro == 'ubuntu': From 33321de2300f916898a09bc4108d817437913ca0 Mon Sep 17 00:00:00 2001 From: VirtuBox Date: Mon, 23 May 2022 16:10:39 +0200 Subject: [PATCH 2/7] Set back MariaDB 10.5 waiting for package for Ubuntu 22.04 --- wo/core/variables.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wo/core/variables.py b/wo/core/variables.py index a3fc51b..39bba81 100644 --- a/wo/core/variables.py +++ b/wo/core/variables.py @@ -175,7 +175,7 @@ class WOVar(): else: mariadb_ver = '10.3' else: - mariadb_ver = '10.6' + mariadb_ver = '10.5' wo_mysql = wo_mysql + ["mariadb-backup"] wo_mysql_client = ["mariadb-client", "python3-mysqldb"] @@ -187,7 +187,7 @@ class WOVar(): # APT repositories wo_mysql_repo = ("deb [arch=amd64,arm64,ppc64el] " "http://mariadb.mirrors.ovh.net/MariaDB/repo/" - "10.6/{distro} {codename} main" + "10.5/{distro} {codename} main" .format(distro=wo_distro, codename=wo_platform_codename)) if wo_distro == 'ubuntu': From bcf8a3e34cc9a6c4517829beadd486261d6d7bb4 Mon Sep 17 00:00:00 2001 From: VirtuBox Date: Thu, 21 Jul 2022 16:42:42 +0200 Subject: [PATCH 3/7] Fix netdata stack upgrade --- wo/cli/plugins/stack_upgrade.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wo/cli/plugins/stack_upgrade.py b/wo/cli/plugins/stack_upgrade.py index ee0ff5e..43293bf 100644 --- a/wo/cli/plugins/stack_upgrade.py +++ b/wo/cli/plugins/stack_upgrade.py @@ -204,7 +204,7 @@ class WOStackUpgradeController(CementBaseController): # detect static binaries install if os.path.isdir('/opt/netdata'): packages = packages + [[ - 'https://my-netdata.io/kickstart-static64.sh', + 'https://my-netdata.io/kickstart.sh', '/var/lib/wo/tmp/kickstart.sh', 'Netdata']] # detect install from source elif os.path.isdir('/etc/netdata'): From 0ffc52e0d5d0992b25090ab8b8af54f50eafe169 Mon Sep 17 00:00:00 2001 From: VirtuBox Date: Thu, 8 Sep 2022 20:49:35 +0200 Subject: [PATCH 4/7] Update to MariaDB 10.6 --- CHANGELOG.md | 13 ++++++++++++- README.md | 4 ++-- install | 2 +- setup.py | 2 +- wo/cli/plugins/stack_pref.py | 3 ++- wo/core/variables.py | 2 +- 6 files changed, 19 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f915e39..8a6a78e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,7 +6,18 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), ## Releases -### v3.15.0 - [Unreleased] +### v3.15.1 - [Unreleased] + +### v3.15.0 - 2022-05-26 + +#### Changed + +- New Nginx package based on latest Nginx stable release 1.20.2 +- Better Referrer-Policy ([PR #434](https://github.com/WordOps/WordOps/pull/434)) + +#### Fixed + +- `wo log reset --all` ([PR #438](https://github.com/WordOps/WordOps/pull/438)) ### v3.14.2 - 2022-04-29 diff --git a/README.md b/README.md index 418220c..1645fc1 100644 --- a/README.md +++ b/README.md @@ -41,8 +41,8 @@ - **Easy to install** : One step automated installer with migration from EasyEngine v3 support - **Fast deployment** : Fast and automated WordPress, Nginx, PHP, MySQL & Redis installation -- **Custom Nginx build** : Nginx 1.18.0 - TLS v1.3 Cloudflare HTTP/2 HPACK & Brotli support -- **Up-to-date** : PHP 7.2, 7.3, 7.4, 8.0 & 8.1 - MariaDB 10.5 & Redis 6.0 +- **Custom Nginx build** : Nginx 1.22.0 - TLS v1.3 Cloudflare HTTP/2 HPACK & Brotli support +- **Up-to-date** : PHP 7.2, 7.3, 7.4, 8.0 & 8.1 - MariaDB 10.6 & Redis 6.0 - **Secured** : Hardened WordPress security with strict Nginx location directives - **Powerful** : Optimized Nginx configurations with multiple cache backends support - **SSL** : Domain, Subdomain & Wildcard Let's Encrypt SSL certificates with DNS API support diff --git a/install b/install index 8d0f98a..dbdeef2 100755 --- a/install +++ b/install @@ -9,7 +9,7 @@ # ------------------------------------------------------------------------- # wget -qO wo wops.cc && sudo -E bash wo # ------------------------------------------------------------------------- -# Version 3.15.0 - 2022-05-23 +# Version 3.15.0 - 2022-05-26 # ------------------------------------------------------------------------- # CONTENTS diff --git a/setup.py b/setup.py index 5b8c0ad..ad2e311 100644 --- a/setup.py +++ b/setup.py @@ -27,7 +27,7 @@ if os.geteuid() == 0: os.makedirs('/var/lib/wo/tmp/') setup(name='wordops', - version='3.14.2', + version='3.15.0', description='An essential toolset that eases server administration', long_description=LONG, long_description_content_type='text/markdown', diff --git a/wo/cli/plugins/stack_pref.py b/wo/cli/plugins/stack_pref.py index 3d13abb..597c0d7 100644 --- a/wo/cli/plugins/stack_pref.py +++ b/wo/cli/plugins/stack_pref.py @@ -1279,7 +1279,8 @@ def post_pref(self, apt_packages, packages, upgrade=False): msg="Adding MySQL into Git") elif os.path.exists('/etc/mysql/conf.d/my.cnf'): if ((WOAptGet.is_installed( - self, 'mariadb-server-10.5')) and + self, + 'mariadb-server-{0}').format(WOVar.mariadb_ver)) and not (WOFileUtils.grepcheck( self, '/etc/mysql/conf.d/my.cnf', 'socket'))): try: diff --git a/wo/core/variables.py b/wo/core/variables.py index 39bba81..08d5c40 100644 --- a/wo/core/variables.py +++ b/wo/core/variables.py @@ -187,7 +187,7 @@ class WOVar(): # APT repositories wo_mysql_repo = ("deb [arch=amd64,arm64,ppc64el] " "http://mariadb.mirrors.ovh.net/MariaDB/repo/" - "10.5/{distro} {codename} main" + "10.6/{distro} {codename} main" .format(distro=wo_distro, codename=wo_platform_codename)) if wo_distro == 'ubuntu': From af2a42c434a4250ab9cec3515a1777b7f06eb670 Mon Sep 17 00:00:00 2001 From: VirtuBox Date: Thu, 8 Sep 2022 21:03:59 +0200 Subject: [PATCH 5/7] Remove useless conditions about old distro --- wo/cli/plugins/stack_pref.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/wo/cli/plugins/stack_pref.py b/wo/cli/plugins/stack_pref.py index 597c0d7..e2a9317 100644 --- a/wo/cli/plugins/stack_pref.py +++ b/wo/cli/plugins/stack_pref.py @@ -126,10 +126,6 @@ def pre_pref(self, apt_packages): if WOVar.wo_platform_codename == 'bionic': Log.debug(self, 'Adding ppa for nano') WORepo.add(self, ppa=WOVar.wo_ubuntu_backports) - elif WOVar.wo_platform_codename == 'xenial': - Log.debug(self, 'Adding ppa for nano') - WORepo.add_key(self, WOVar.wo_nginx_key) - WORepo.add(self, repo_url=WOVar.wo_extra_repo) else: if (not WOFileUtils.grepcheck( self, '/etc/apt/sources.list/wo-repo.list', @@ -2008,7 +2004,9 @@ def pre_stack(self): # use tcp_bbr congestion algorithm only on new kernels if (WOVar.wo_platform_codename == 'bionic' or WOVar.wo_platform_codename == 'focal' or - WOVar.wo_platform_codename == 'buster'): + WOVar.wo_platform_codename == 'buster' or + WOVar.wo_platform_codename == 'jammy' or + WOVar.wo_platform_codename == 'bullseye'): try: WOShellExec.cmd_exec( self, 'modprobe tcp_bbr') From 426fb7ce5283674e1bfd3309131865681fde7fe9 Mon Sep 17 00:00:00 2001 From: VirtuBox Date: Thu, 8 Sep 2022 21:18:42 +0200 Subject: [PATCH 6/7] Fix MariaDB conf --- wo/cli/plugins/stack_pref.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wo/cli/plugins/stack_pref.py b/wo/cli/plugins/stack_pref.py index e2a9317..0498800 100644 --- a/wo/cli/plugins/stack_pref.py +++ b/wo/cli/plugins/stack_pref.py @@ -1347,7 +1347,7 @@ def post_pref(self, apt_packages, packages, upgrade=False): # set innodb_buffer_pool_instances depending # on the amount of RAM - WOService.restart_service(self, 'mysql') + WOService.restart_service(self, 'mariadb') # WOFileUtils.mvfile(self, '/var/lib/mysql/ib_logfile0', # '/var/lib/mysql/ib_logfile0.bak') From 0b08eb1db89f0353dd2638e5b312f06561f0b29c Mon Sep 17 00:00:00 2001 From: VirtuBox Date: Fri, 9 Sep 2022 10:44:34 +0200 Subject: [PATCH 7/7] Fix MariaDB bind to localhost --- wo/cli/templates/my.mustache | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wo/cli/templates/my.mustache b/wo/cli/templates/my.mustache index 15300b9..9880026 100644 --- a/wo/cli/templates/my.mustache +++ b/wo/cli/templates/my.mustache @@ -45,7 +45,7 @@ skip-external-locking # # Instead of skip-networking the default is now to listen only on # localhost which is more compatible and is not less secure. -bind-address = ::ffff:127.0.0.1 +bind-address = localhost # # * Fine Tuning #