Merge pull request #432 from WordOps/updating-configuration

Release v3.14.2
This commit is contained in:
VirtuBox
2022-04-29 15:35:19 +02:00
committed by GitHub
6 changed files with 32 additions and 21 deletions

View File

@@ -8,6 +8,13 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
### v3.15.0 - [Unreleased] ### v3.15.0 - [Unreleased]
### v3.14.2 - 2022-04-29
#### Fixed
- Git unsafe directories issue
- WP_DEBUG variable in wp-config.php
### v3.14.1 - 2022-02-16 ### v3.14.1 - 2022-02-16
#### Fixed #### Fixed

24
install
View File

@@ -9,7 +9,7 @@
# ------------------------------------------------------------------------- # -------------------------------------------------------------------------
# wget -qO wo wops.cc && sudo -E bash wo # wget -qO wo wops.cc && sudo -E bash wo
# ------------------------------------------------------------------------- # -------------------------------------------------------------------------
# Version 3.14.1 - 2022-02-16 # Version 3.14.2 - 2022-04-29
# ------------------------------------------------------------------------- # -------------------------------------------------------------------------
# CONTENTS # CONTENTS
@@ -207,11 +207,12 @@ wo_install_dep() {
wo_linux_distro=$(lsb_release -is) wo_linux_distro=$(lsb_release -is)
if [ "$wo_linux_distro" == "Ubuntu" ]; then if [ "$wo_linux_distro" == "Ubuntu" ]; then
# install dependencies # install dependencies
add-apt-repository ppa:git-core/ppa -y
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 \ 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 \ gnupg2 cron ccze rsync apt-transport-https tree haveged ufw unattended-upgrades tzdata ntp zstd idn \
python3-distutils-extra libapt-pkg-dev bash-completion >/dev/null 2>&1 python3-distutils-extra libapt-pkg-dev bash-completion >/dev/null 2>&1
curl -sL https://build.opensuse.org/projects/home:virtubox/public_key | apt-key add - curl -sL https://build.opensuse.org/projects/home:virtubox/public_key | apt-key add -
else else
# install dependencies # 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 \
@@ -221,7 +222,7 @@ wo_install_dep() {
# add php repository gpg key # add php repository gpg key
[ -d /etc/apt/trusted.gpg.d ] && { wget -qO /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg; } [ -d /etc/apt/trusted.gpg.d ] && { wget -qO /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg; }
# add nginx repository gpg key # add nginx repository gpg key
curl -sL https://build.opensuse.org/projects/home:virtubox/public_key | apt-key add - curl -sL https://build.opensuse.org/projects/home:virtubox/public_key | apt-key add -
fi fi
locale-gen en locale-gen en
# enable unattended upgades # enable unattended upgades
@@ -471,7 +472,7 @@ wo_install() {
if [ "$wo_branch" = "master" ]; then if [ "$wo_branch" = "master" ]; then
python3 -m pip install -U wordops python3 -m pip install -U wordops
else else
python3 -m pip install -I "git+git://github.com/WordOps/WordOps.git@$wo_branch#egg=wordops" python3 -m pip install -I "git+https://github.com/WordOps/WordOps.git@$wo_branch#egg=wordops"
fi fi
local python_venv local python_venv
python_venv=$(python3 -c "import sys; print(sys.version_info[1])") python_venv=$(python3 -c "import sys; print(sys.version_info[1])")
@@ -481,7 +482,7 @@ wo_install() {
rm -rf /usr/local/bin/wo /usr/local/lib/python3."$python_venv"/dist-packages/{etc,usr} rm -rf /usr/local/bin/wo /usr/local/lib/python3."$python_venv"/dist-packages/{etc,usr}
ln -s /opt/wo/bin/wo /usr/local/bin/ ln -s /opt/wo/bin/wo /usr/local/bin/
deactivate deactivate
if [ ! -d /opt/wo/lib/python3."$python_ver"/site-packages/apt ];then if [ ! -d /opt/wo/lib/python3."$python_ver"/site-packages/apt ]; then
python3 -m venv --system-site-packages /opt/wo python3 -m venv --system-site-packages /opt/wo
fi fi
} }
@@ -528,7 +529,7 @@ wo_travis_install() {
fi fi
python3 -m pip install -U . python3 -m pip install -U .
else else
python3 -m pip install -U "git+git://github.com/WordOps/WordOps.git@$wo_branch#egg=wordops" python3 -m pip install -U "git+https://github.com/WordOps/WordOps.git@$wo_branch#egg=wordops"
fi fi
cp -rf /opt/wo/lib/python3."$python_ver"/site-packages/usr/* /usr/ cp -rf /opt/wo/lib/python3."$python_ver"/site-packages/usr/* /usr/
cp -rn /opt/wo/lib/python3."$python_ver"/site-packages/etc/* /etc/ cp -rn /opt/wo/lib/python3."$python_ver"/site-packages/etc/* /etc/
@@ -562,9 +563,9 @@ wo_upgrade_nginx() {
# add new Nginx repository # add new Nginx repository
if [ "$wo_distro_version" == "jessie" ]; then if [ "$wo_distro_version" == "jessie" ]; then
# import the respository key for updates # import the respository key for updates
curl -sL https://build.opensuse.org/projects/home:virtubox/public_key | apt-key add - curl -sL https://build.opensuse.org/projects/home:virtubox/public_key | apt-key add -
else else
curl -sL https://build.opensuse.org/projects/home:virtubox/public_key | apt-key add - curl -sL https://build.opensuse.org/projects/home:virtubox/public_key | apt-key add -
fi fi
# install new nginx package # install new nginx package
@@ -785,6 +786,12 @@ wo_php_fix() {
fi fi
} }
wo_git_secure_path() {
if ! grep -q "safe" ~/.gitconfig; then
echo -e "\n[safe]\n directory = *" >> ~/.gitconfig
fi
}
### ###
# 4 - WO MAIN SETUP # 4 - WO MAIN SETUP
### ###
@@ -851,6 +858,7 @@ else
_run secure_wo_db _run secure_wo_db
wo sync wo sync
_run wo_git_secure_path
if [ "$ee_migration" = "1" ]; then if [ "$ee_migration" = "1" ]; then
echo echo

View File

@@ -27,7 +27,7 @@ if os.geteuid() == 0:
os.makedirs('/var/lib/wo/tmp/') os.makedirs('/var/lib/wo/tmp/')
setup(name='wordops', setup(name='wordops',
version='3.14.1', version='3.14.2',
description='An essential toolset that eases server administration', description='An essential toolset that eases server administration',
long_description=LONG, long_description=LONG,
long_description_content_type='text/markdown', long_description_content_type='text/markdown',

View File

@@ -326,11 +326,8 @@ def setupwordpress(self, data, vhostonly=False):
data['wo_db_user'], data['wo_db_user'],
data['wo_db_host'] data['wo_db_host']
) + ) +
"--dbpass=\'{0}\' " "--dbpass=\'{0}\'\""
"--extra-php<<PHP \n" .format(data['wo_db_pass']),
"\n{1}\nPHP\""
.format(data['wo_db_pass'],
"\ndefine(\'WP_DEBUG\', false);"),
log=False log=False
): ):
pass pass
@@ -347,13 +344,12 @@ def setupwordpress(self, data, vhostonly=False):
.format(data['wo_db_name'], .format(data['wo_db_name'],
wo_wp_prefix, data['wo_db_host']) + wo_wp_prefix, data['wo_db_host']) +
"--dbuser=\'{0}\' --dbpass= " "--dbuser=\'{0}\' --dbpass= "
"--extra-php<<PHP \n {1} {2} {3} \nPHP\"" "--extra-php<<PHP \n {1} {2} \nPHP\""
.format(data['wo_db_user'], .format(data['wo_db_user'],
"\ndefine(\'WPMU_ACCEL_REDIRECT\'," "\ndefine(\'WPMU_ACCEL_REDIRECT\',"
" true);", " true);",
"\ndefine(\'CONCATENATE_SCRIPTS\'," "\ndefine(\'CONCATENATE_SCRIPTS\',"
" false);", " false);"))
"\n\ndefine(\'WP_DEBUG\', false);"))
try: try:
if WOShellExec.cmd_exec(self, "/bin/bash -c \"{0} --allow-root" if WOShellExec.cmd_exec(self, "/bin/bash -c \"{0} --allow-root"
.format(WOVar.wo_wpcli_path) + .format(WOVar.wo_wpcli_path) +
@@ -364,12 +360,11 @@ def setupwordpress(self, data, vhostonly=False):
data['wo_db_host']) + data['wo_db_host']) +
"--dbuser=\'{0}\' --dbpass=\'{1}\' " "--dbuser=\'{0}\' --dbpass=\'{1}\' "
"--extra-php<<PHP \n " "--extra-php<<PHP \n "
"\n{2} {3}\nPHP\"" "\n{2} \nPHP\""
.format(data['wo_db_user'], .format(data['wo_db_user'],
data['wo_db_pass'], data['wo_db_pass'],
"\ndefine(\'WPMU_ACCEL_REDIRECT\'," "\ndefine(\'WPMU_ACCEL_REDIRECT\',"
" true);", " true);"),
"\ndefine(\'WP_DEBUG\', false);"),
log=False log=False
): ):
pass pass

View File

@@ -29,6 +29,7 @@ class WOGit:
Log.debug(self, "{0}".format(e)) Log.debug(self, "{0}".format(e))
Log.error(self, "Unable to git init at {0}" Log.error(self, "Unable to git init at {0}"
.format(path)) .format(path))
status = wogit.status("-s") status = wogit.status("-s")
if len(status.splitlines()) > 0: if len(status.splitlines()) > 0:
try: try:

View File

@@ -14,7 +14,7 @@ class WOVar():
"""Intialization of core variables""" """Intialization of core variables"""
# WordOps version # WordOps version
wo_version = "3.14.1" wo_version = "3.14.2"
# WordOps packages versions # WordOps packages versions
wo_wp_cli = "2.6.0" wo_wp_cli = "2.6.0"
wo_adminer = "4.8.1" wo_adminer = "4.8.1"