From 71fc90a0cce3d6c7abee4c23fcc0579d88d7b1de Mon Sep 17 00:00:00 2001 From: VirtuBox Date: Tue, 27 Oct 2020 10:41:00 +0100 Subject: [PATCH 1/8] WordOps install fix --- install | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/install b/install index f7ce8df..50d0211 100755 --- a/install +++ b/install @@ -437,6 +437,7 @@ wo_install() { cd /usr/local/lib/python3."$python_ver"/dist-packages || exit 1 fi python3 -m pip uninstall -yq wo wordops ee + cd || exit 1 if [ -d /opt/wo/lib/python3."$python_ver"/site-packages/apt ]; then source /opt/wo/bin/activate python3 -m pip install -U pip setuptools wheel @@ -473,6 +474,10 @@ wo_install() { rm -rf /usr/local/bin/wo /usr/local/lib/python3."$python_ver"/dist-packages/{etc,usr} ln -s /opt/wo/bin/wo /usr/local/bin/ deactivate + if ! { /usr/local/bin/wo >/dev/null 2>&1; }; then + python3 -m venv --system-site-packages /opt/wo + fi + } # Clone Github repository if it doesn't exist From 440272118e1f11303b119b9b4c4d7a11cb6e8fa5 Mon Sep 17 00:00:00 2001 From: VirtuBox Date: Tue, 27 Oct 2020 11:05:07 +0100 Subject: [PATCH 2/8] Add Github Action CI --- .github/workflows/main.yml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 .github/workflows/main.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..c1ef529 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,26 @@ +name: CI + +on: [push] + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - name: Prepare VM + run: | + unset LANG + sudo apt update -qq + sudo LC_ALL=C.UTF-8 add-apt-repository ppa:ondrej/php -y + sudo rm -rf /etc/mysql /var/lib/mysql + sudo apt-get purge --option=Dpkg::options::=--force-all --assume-yes graphviz* redis* php* mysql* + sudo apt-get install -qq git python3-setuptools python3-dev python3-apt python3-wheel python3-pip ccze tree + sudo apt-get -qq autoremove --purge + sudo python3 setup.py sdist bdist_wheel + sudo bash -c 'echo -e "[user]\n\tname = abc\n\temail = root@localhost.com" > $HOME/.gitconfig' + - name: Install WordOps + run: sudo timeout 1800 bash install --travis + - name: Run tests + run: sudo timeout 1800 bash tests/travis.sh --actions From 518d687ec14e7fd869172b1be291ee4d935c4904 Mon Sep 17 00:00:00 2001 From: VirtuBox Date: Tue, 27 Oct 2020 11:17:18 +0100 Subject: [PATCH 3/8] Fix typo --- install | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/install b/install index 50d0211..073ae6d 100755 --- a/install +++ b/install @@ -207,14 +207,14 @@ wo_install_dep() { wo_linux_distro=$(lsb_release -is) if [ "$wo_linux_distro" == "Ubuntu" ]; then # install dependencies - apt-get -option=Dpkg::options::=--force-confmiss --option=Dpkg::options::=--force-confold --assume-yes install \ + apt-get --option=Dpkg::options::=--force-confmiss --option=Dpkg::options::=--force-confold --assume-yes install \ build-essential curl gzip python3-pip python3-apt python3-venv gcc python3-dev sqlite3 git tar software-properties-common pigz \ gnupg2 cron ccze rsync apt-transport-https tree haveged ufw unattended-upgrades tzdata ntp zstd idn \ python3-distutils-extra libapt-pkg-dev >/dev/null 2>&1 curl -sL https://download.opensuse.org/repositories/home:/virtubox:/WordOps/xUbuntu_18.04/Release.key | apt-key add - else # install dependencies - apt-get -option=Dpkg::options::=--force-confmiss --option=Dpkg::options::=--force-confold --assume-yes install \ + apt-get --option=Dpkg::options::=--force-confmiss --option=Dpkg::options::=--force-confold --assume-yes install \ build-essential curl gzip dirmngr sudo python3-pip python3-apt python3-venv gcc python3-dev ca-certificates sqlite3 git tar \ software-properties-common pigz apt-transport-https gnupg2 cron ccze rsync tree haveged ufw unattended-upgrades tzdata ntp zstd idn \ python3-distutils-extra libapt-pkg-dev >/dev/null 2>&1 From 3624548251fa6541b060b64586dbb934ee29be5f Mon Sep 17 00:00:00 2001 From: VirtuBox Date: Tue, 27 Oct 2020 11:25:14 +0100 Subject: [PATCH 4/8] Enable MariaDB service after upgrade --- wo/cli/plugins/stack_migrate.py | 1 + 1 file changed, 1 insertion(+) diff --git a/wo/cli/plugins/stack_migrate.py b/wo/cli/plugins/stack_migrate.py index be084a0..bcfcb8c 100644 --- a/wo/cli/plugins/stack_migrate.py +++ b/wo/cli/plugins/stack_migrate.py @@ -59,6 +59,7 @@ class WOStackMigrateController(CementBaseController): WOFileUtils.create_symlink( self, ['/etc/mysql/mariadb.cnf', '/etc/mysql/my.cnf']) WOShellExec.cmd_exec(self, 'systemctl daemon-reload') + WOShellExec.cmd_exec(self, 'systemctl enable mariadb') post_pref(self, WOVar.wo_mysql, []) @expose(hide=True) From f65a2044e463d3c3bc29223299b5f396372ae260 Mon Sep 17 00:00:00 2001 From: VirtuBox Date: Tue, 27 Oct 2020 11:26:55 +0100 Subject: [PATCH 5/8] Enable travis only on master --- .travis.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index b1049ae..7261850 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,7 +2,8 @@ language: shell jobs: include: - - os: linux + - if: branch = master + os: linux dist: xenial - if: branch = master os: linux From 159bf51778eb53a621bf9782836b05024952b820 Mon Sep 17 00:00:00 2001 From: VirtuBox Date: Tue, 27 Oct 2020 11:44:32 +0100 Subject: [PATCH 6/8] Improve Github actions --- .github/workflows/main.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index c1ef529..b183400 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,11 +1,14 @@ name: CI -on: [push] +on: [push, pull_request] jobs: build: + strategy: + matrix: + platform: [ubuntu-20.04, ubuntu-18.04, ubuntu-16.04] - runs-on: ubuntu-latest + runs-on: ${{ matrix.platform }} steps: - uses: actions/checkout@v2 From 46c8dd7dd9b843f1fb151b50588266909e6d6779 Mon Sep 17 00:00:00 2001 From: VirtuBox Date: Tue, 27 Oct 2020 11:49:21 +0100 Subject: [PATCH 7/8] Ready for release --- CHANGELOG.md | 7 +++++++ install | 2 +- setup.py | 2 +- wo/core/variables.py | 2 +- 4 files changed, 10 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 107d91a..7aca5e5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,13 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), ### v3.9.x - [Unreleased] +#### v3.13.2 - 2020-10-27 + +#### Fixed + +- WordOps install issues on some servers +- MariaDB systemd service not fully enabled after upgrade + #### v3.13.1 - 2020-10-26 #### Fixed diff --git a/install b/install index 073ae6d..b8e3e2c 100755 --- a/install +++ b/install @@ -9,7 +9,7 @@ # ------------------------------------------------------------------------- # wget -qO wo wops.cc && sudo -E bash wo # ------------------------------------------------------------------------- -# Version 3.13.1 - 2020-10-26 +# Version 3.13.2 - 2020-10-27 # ------------------------------------------------------------------------- # CONTENTS diff --git a/setup.py b/setup.py index 05d08f0..1de363f 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.13.1', + version='3.13.2', description='An essential toolset that eases server administration', long_description=LONG, long_description_content_type='text/markdown', diff --git a/wo/core/variables.py b/wo/core/variables.py index bc46051..40ae6d9 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.13.1" + wo_version = "3.13.2" # WordOps packages versions wo_wp_cli = "2.4.0" wo_adminer = "4.7.5" From 8330cb0c9dccc6600d307f4bfa103affb592984f Mon Sep 17 00:00:00 2001 From: VirtuBox Date: Tue, 27 Oct 2020 12:26:07 +0100 Subject: [PATCH 8/8] Fix Github actions --- tests/travis.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/travis.sh b/tests/travis.sh index d0e825e..1584965 100644 --- a/tests/travis.sh +++ b/tests/travis.sh @@ -31,7 +31,11 @@ exit_script() { echo -e "${CGREEN}#############################################${CEND}" echo -e ' stack install ' echo -e "${CGREEN}#############################################${CEND}" +if [ "$wo_distro" != "xenial" ]; then stack_list='nginx php php73 php74 mysql redis fail2ban clamav proftpd netdata phpmyadmin composer dashboard extplorer adminer redis sendmail phpredisadmin mysqltuner utils ufw ngxblocker cheat nanorc' +else +stack_list='nginx php php73 php74 mysql redis fail2ban clamav proftpd netdata phpmyadmin composer dashboard extplorer adminer redis phpredisadmin mysqltuner utils ufw ngxblocker cheat nanorc' +fi for stack in $stack_list; do echo -ne " Installing $stack [..]\r" if {