From 9571fd7d6a8ef102f0beab5d30eec98f92b65931 Mon Sep 17 00:00:00 2001 From: harshadyeola Date: Tue, 28 Jul 2015 13:25:39 +0530 Subject: [PATCH 1/6] Fix issue #593 --- install | 42 ++++++++++++++++++++++++++---------------- 1 file changed, 26 insertions(+), 16 deletions(-) diff --git a/install b/install index d1bb6a73..1d40e42c 100644 --- a/install +++ b/install @@ -280,8 +280,11 @@ function ee_update_latest() ee_lib_echo "Updating Nginx configuration, please wait..." # From version 3.1.10 we are using Suse builder for repository if [ "$ee_distro_version" == "precise" ]; then - if [ -f /etc/apt/sources.list.d/rtcamp-nginx-precise.list ]; then - rm -rf /etc/apt/sources.list.d/rtcamp-nginx-precise.list + grep -Hr 'http://download.opensuse.org/repositories/home:/rtCamp:/EasyEngine/Debian_8.0/ /' /etc/apt/sources.list.d/ &>> /dev/null + if [[ $? -ne 0 ]]; then + if [ -f /etc/apt/sources.list.d/rtcamp-nginx-precise.list ]; then + rm -rf /etc/apt/sources.list.d/rtcamp-nginx-precise.list + fi echo -e "\ndeb http://download.opensuse.org/repositories/home:/rtCamp:/EasyEngine/xUbuntu_12.04/ /" >> /etc/apt/sources.list.d/ee-repo.list gpg --keyserver "hkp://keys.gnupg.net" --recv-keys '3050AC3CD2AE6F03' gpg -a --export --armor '3050AC3CD2AE6F03' | apt-key add - @@ -291,10 +294,14 @@ function ee_update_latest() mv /etc/nginx/nginx.conf /etc/nginx/nginx.conf.old &>> /dev/null apt-get update apt-get -o Dpkg::Options::="--force-confmiss" -o Dpkg::Options::="--force-confold" -y install nginx-custom + fi elif [ "$ee_distro_version" == "trusty" ]; then - if [ -f /etc/apt/sources.list.d/rtcamp-nginx-trusty.list ]; then - rm -rf /etc/apt/sources.list.d/rtcamp-nginx-trusty.list + grep -Hr 'http://download.opensuse.org/repositories/home:/rtCamp:/EasyEngine/Debian_8.0/ /' /etc/apt/sources.list.d/ &>> /dev/null + if [[ $? -ne 0 ]]; then + if [ -f /etc/apt/sources.list.d/rtcamp-nginx-trusty.list ]; then + rm -rf /etc/apt/sources.list.d/rtcamp-nginx-trusty.list + fi echo -e "\ndeb http://download.opensuse.org/repositories/home:/rtCamp:/EasyEngine/xUbuntu_14.04/ /" >> /etc/apt/sources.list.d/ee-repo.list gpg --keyserver "hkp://keys.gnupg.net" --recv-keys '3050AC3CD2AE6F03' gpg -a --export --armor '3050AC3CD2AE6F03' | apt-key add - @@ -303,16 +310,17 @@ function ee_update_latest() fi mv /etc/nginx/nginx.conf /etc/nginx/nginx.conf.old &>> /dev/null apt-get update - apt-get -o Dpkg::Options::="--force-confmiss" -o Dpkg::Options::="--force-confold" -y install nginx-custom + apt-get -o Dpkg::Options::="--force-confmiss" -o Dpkg::Options::="--force-confold" -y install nginx-custom fi elif [ "$ee_distro_version" == "wheezy" ]; then - grep -Hr "deb http://packages.dotdeb.org wheezy all" /etc/apt/sources.list.d/ee-repo.list &>> /dev/null - if [ $? -eq 0 ] || [ -f /etc/apt/sources.list.d/dotdeb-wheezy.list ]; then - if [ -f /etc/apt/sources.list.d/dotdeb-wheezy.list ]; then - rm -rf /etc/apt/sources.list.d/dotdeb-wheezy.list - else - sed -i "/deb http:\/\/packages.dotdeb.org wheezy all/d" /etc/apt/sources.list.d/ee-repo.list &>> /dev/null - fi + grep -Hr 'http://download.opensuse.org/repositories/home:/rtCamp:/EasyEngine/Debian_8.0/ /' /etc/apt/sources.list.d/ &>> /dev/null + #grep -Hr "deb http://packages.dotdeb.org wheezy all" /etc/apt/sources.list.d/ee-repo.list &>> /dev/null + if [ $? -ne 0 ] || [ -f /etc/apt/sources.list.d/dotdeb-wheezy.list ]; then + # if [ -f /etc/apt/sources.list.d/dotdeb-wheezy.list ]; then + # rm -rf /etc/apt/sources.list.d/dotdeb-wheezy.list + # else + # sed -i "/deb http:\/\/packages.dotdeb.org wheezy all/d" /etc/apt/sources.list.d/ee-repo.list &>> /dev/null + # fi echo -e "deb http://download.opensuse.org/repositories/home:/rtCamp:/EasyEngine/Debian_7.0/ /" >> /etc/apt/sources.list.d/ee-repo.list gpg --keyserver "hkp://keys.gnupg.net" --recv-keys '3050AC3CD2AE6F03' gpg -a --export --armor '3050AC3CD2AE6F03' | apt-key add - @@ -325,11 +333,13 @@ function ee_update_latest() apt-get -o Dpkg::Options::="--force-confmiss" -o Dpkg::Options::="--force-confold" -y install nginx-custom fi elif [ "$ee_distro_version" == "jessie" ]; then - grep -Hr "deb http://packages.dotdeb.org jessie all" /etc/apt/sources.list.d/ee-repo.list &>> /dev/null - if [[ $? -eq 0 ]]; then - sed -i "/deb http:\/\/packages.dotdeb.org jessie all/d" /etc/apt/sources.list.d/ee-repo.list &>> /dev/null + + grep -Hr 'http://download.opensuse.org/repositories/home:/rtCamp:/EasyEngine/Debian_8.0/ /' /etc/apt/sources.list.d/ &>> /dev/null + #grep -Hr "deb http://packages.dotdeb.org jessie all" /etc/apt/sources.list.d/ee-repo.list &>> /dev/null + if [[ $? -ne 0 ]]; then + #sed -i "/deb http:\/\/packages.dotdeb.org jessie all/d" /etc/apt/sources.list.d/ee-repo.list &>> /dev/null echo -e "deb http://download.opensuse.org/repositories/home:/rtCamp:/EasyEngine/Debian_8.0/ /" >> /etc/apt/sources.list.d/ee-repo.list - gpg --keyserver "hkp://keys.gnupg.net" --recv-keys '3050AC3CD2AE6F03' + gpg --keyserver "hkp://pgp.mit.edu" --recv-keys '3050AC3CD2AE6F03' gpg -a --export --armor '3050AC3CD2AE6F03' | apt-key add - if [ -f /etc/nginx/conf.d/ee-nginx.conf ]; then mv /etc/nginx/conf.d/ee-nginx.conf /etc/nginx/conf.d/ee-nginx.conf.old &>> /dev/null From 5382f7445e21896497bb5d113f0175951c982abe Mon Sep 17 00:00:00 2001 From: harshadyeola Date: Tue, 28 Jul 2015 14:00:48 +0530 Subject: [PATCH 2/6] updated EasyEngine version --- ee/core/variables.py | 2 +- install | 2 +- setup.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ee/core/variables.py b/ee/core/variables.py index 5228b7b1..97f03890 100644 --- a/ee/core/variables.py +++ b/ee/core/variables.py @@ -12,7 +12,7 @@ class EEVariables(): """Intialization of core variables""" # EasyEngine version - ee_version = "3.3.2" + ee_version = "3.3.3" # EasyEngine packages versions ee_wp_cli = "0.19.2" diff --git a/install b/install index 1d40e42c..3d02dad0 100644 --- a/install +++ b/install @@ -48,7 +48,7 @@ fi # Define variables for later use ee_branch=$1 readonly ee_version_old="2.2.3" -readonly ee_version_new="3.3.2" +readonly ee_version_new="3.3.3" readonly ee_log_dir=/var/log/ee/ readonly ee_install_log=/var/log/ee/install.log readonly ee_linux_distro=$(lsb_release -i | awk '{print $3}') diff --git a/setup.py b/setup.py index 125f99b6..5850f80b 100644 --- a/setup.py +++ b/setup.py @@ -54,7 +54,7 @@ except Exception as e: os.system("git config --global user.email {0}".format(ee_email)) setup(name='ee', - version='3.3.2', + version='3.3.3', description=long_description, long_description=long_description, classifiers=[], From 57d4c10f1d749afb6dbfccb5d52894247f3e7573 Mon Sep 17 00:00:00 2001 From: harshadyeola Date: Tue, 28 Jul 2015 14:46:49 +0530 Subject: [PATCH 3/6] update key server --- install | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/install b/install index 3d02dad0..89852178 100644 --- a/install +++ b/install @@ -286,7 +286,7 @@ function ee_update_latest() rm -rf /etc/apt/sources.list.d/rtcamp-nginx-precise.list fi echo -e "\ndeb http://download.opensuse.org/repositories/home:/rtCamp:/EasyEngine/xUbuntu_12.04/ /" >> /etc/apt/sources.list.d/ee-repo.list - gpg --keyserver "hkp://keys.gnupg.net" --recv-keys '3050AC3CD2AE6F03' + gpg --keyserver "hkp://pgp.mit.edu" --recv-keys '3050AC3CD2AE6F03' gpg -a --export --armor '3050AC3CD2AE6F03' | apt-key add - if [ -f /etc/nginx/conf.d/ee-nginx.conf ]; then mv /etc/nginx/conf.d/ee-nginx.conf /etc/nginx/conf.d/ee-nginx.conf.old &>> /dev/null @@ -303,7 +303,7 @@ function ee_update_latest() rm -rf /etc/apt/sources.list.d/rtcamp-nginx-trusty.list fi echo -e "\ndeb http://download.opensuse.org/repositories/home:/rtCamp:/EasyEngine/xUbuntu_14.04/ /" >> /etc/apt/sources.list.d/ee-repo.list - gpg --keyserver "hkp://keys.gnupg.net" --recv-keys '3050AC3CD2AE6F03' + gpg --keyserver "hkp://pgp.mit.edu" --recv-keys '3050AC3CD2AE6F03' gpg -a --export --armor '3050AC3CD2AE6F03' | apt-key add - if [ -f /etc/nginx/conf.d/ee-nginx.conf ]; then mv /etc/nginx/conf.d/ee-nginx.conf /etc/nginx/conf.d/ee-nginx.conf.old &>> /dev/null @@ -315,14 +315,14 @@ function ee_update_latest() elif [ "$ee_distro_version" == "wheezy" ]; then grep -Hr 'http://download.opensuse.org/repositories/home:/rtCamp:/EasyEngine/Debian_8.0/ /' /etc/apt/sources.list.d/ &>> /dev/null #grep -Hr "deb http://packages.dotdeb.org wheezy all" /etc/apt/sources.list.d/ee-repo.list &>> /dev/null - if [ $? -ne 0 ] || [ -f /etc/apt/sources.list.d/dotdeb-wheezy.list ]; then + if [[ $? -ne 0 ]]; then # if [ -f /etc/apt/sources.list.d/dotdeb-wheezy.list ]; then # rm -rf /etc/apt/sources.list.d/dotdeb-wheezy.list # else # sed -i "/deb http:\/\/packages.dotdeb.org wheezy all/d" /etc/apt/sources.list.d/ee-repo.list &>> /dev/null # fi echo -e "deb http://download.opensuse.org/repositories/home:/rtCamp:/EasyEngine/Debian_7.0/ /" >> /etc/apt/sources.list.d/ee-repo.list - gpg --keyserver "hkp://keys.gnupg.net" --recv-keys '3050AC3CD2AE6F03' + gpg --keyserver "hkp://pgp.mit.edu" --recv-keys '3050AC3CD2AE6F03' gpg -a --export --armor '3050AC3CD2AE6F03' | apt-key add - if [ -f /etc/nginx/conf.d/ee-nginx.conf ]; then mv /etc/nginx/conf.d/ee-nginx.conf /etc/nginx/conf.d/ee-nginx.conf.old &>> /dev/null From a4113676364a2bc39b7d54b1161d904ec64f1208 Mon Sep 17 00:00:00 2001 From: harshadyeola Date: Tue, 28 Jul 2015 15:09:38 +0530 Subject: [PATCH 4/6] update repo check --- install | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/install b/install index 89852178..0810a3bf 100644 --- a/install +++ b/install @@ -280,7 +280,7 @@ function ee_update_latest() ee_lib_echo "Updating Nginx configuration, please wait..." # From version 3.1.10 we are using Suse builder for repository if [ "$ee_distro_version" == "precise" ]; then - grep -Hr 'http://download.opensuse.org/repositories/home:/rtCamp:/EasyEngine/Debian_8.0/ /' /etc/apt/sources.list.d/ &>> /dev/null + grep -Hr 'http://download.opensuse.org/repositories/home:/rtCamp:/EasyEngine/xUbuntu_12.04/ /' /etc/apt/sources.list.d/ &>> /dev/null if [[ $? -ne 0 ]]; then if [ -f /etc/apt/sources.list.d/rtcamp-nginx-precise.list ]; then rm -rf /etc/apt/sources.list.d/rtcamp-nginx-precise.list @@ -297,7 +297,7 @@ function ee_update_latest() fi elif [ "$ee_distro_version" == "trusty" ]; then - grep -Hr 'http://download.opensuse.org/repositories/home:/rtCamp:/EasyEngine/Debian_8.0/ /' /etc/apt/sources.list.d/ &>> /dev/null + grep -Hr 'http://download.opensuse.org/repositories/home:/rtCamp:/EasyEngine/xUbuntu_14.04/ /' /etc/apt/sources.list.d/ &>> /dev/null if [[ $? -ne 0 ]]; then if [ -f /etc/apt/sources.list.d/rtcamp-nginx-trusty.list ]; then rm -rf /etc/apt/sources.list.d/rtcamp-nginx-trusty.list @@ -313,7 +313,7 @@ function ee_update_latest() apt-get -o Dpkg::Options::="--force-confmiss" -o Dpkg::Options::="--force-confold" -y install nginx-custom fi elif [ "$ee_distro_version" == "wheezy" ]; then - grep -Hr 'http://download.opensuse.org/repositories/home:/rtCamp:/EasyEngine/Debian_8.0/ /' /etc/apt/sources.list.d/ &>> /dev/null + grep -Hr 'http://download.opensuse.org/repositories/home:/rtCamp:/EasyEngine/Debian_7.0/ /' /etc/apt/sources.list.d/ &>> /dev/null #grep -Hr "deb http://packages.dotdeb.org wheezy all" /etc/apt/sources.list.d/ee-repo.list &>> /dev/null if [[ $? -ne 0 ]]; then # if [ -f /etc/apt/sources.list.d/dotdeb-wheezy.list ]; then From ee2f951c5f75e4efcdfcf2c6ee3fe838c22883fe Mon Sep 17 00:00:00 2001 From: harshadyeola Date: Tue, 28 Jul 2015 16:10:02 +0530 Subject: [PATCH 5/6] fix for renamed nginx.conf and fastcgi_params --- install | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/install b/install index 0810a3bf..13c7c25f 100644 --- a/install +++ b/install @@ -415,6 +415,27 @@ function ee_update_latest() fi fi + # Fix for 3.3.2 renamed nginx.conf + nginx -V 2&>> /dev/null + if [[ $? -eq 0 ]]; then + nginx -t 2>&1 | grep 'open() "/etc/nginx/nginx.conf" failed' &>> /dev/null + if [[ $? -eq 0 ]]; then + if [ -f /etc/nginx/nginx.conf.old ]; then + if [ ! -f /etc/nginx/nginx.conf ]; then + cp /etc/nginx/nginx.conf.old /etc/nginx/nginx.conf + fi + fi + fi + # Fix for 3.3.2 renamed fastcgi_param + nginx -t 2>&1 | grep 'open() "/etc/nginx/fastcgi_params" failed' + if [[ $? -eq 0 ]]; then + if [ -f /etc/nginx/fastcgi_params.old ]; then + if [ ! -f /etc/nginx/fastcgi_params ]; then + cp /etc/nginx/fastcgi_params.old /etc/nginx/fastcgi_params + fi + fi + fi + fi } # Do git intialisation From 21fc03c8bd935d003334a0e02c9e6dc9aa36d8b2 Mon Sep 17 00:00:00 2001 From: harshadyeola Date: Tue, 28 Jul 2015 20:25:16 +0530 Subject: [PATCH 6/6] nginx check updated --- install | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/install b/install index 13c7c25f..2ea608e8 100644 --- a/install +++ b/install @@ -416,9 +416,9 @@ function ee_update_latest() fi # Fix for 3.3.2 renamed nginx.conf - nginx -V 2&>> /dev/null + nginx -V 2>&1 &>>/dev/null if [[ $? -eq 0 ]]; then - nginx -t 2>&1 | grep 'open() "/etc/nginx/nginx.conf" failed' &>> /dev/null + nginx -t 2>&1 | grep 'open() "/etc/nginx/nginx.conf" failed' &>>/dev/null if [[ $? -eq 0 ]]; then if [ -f /etc/nginx/nginx.conf.old ]; then if [ ! -f /etc/nginx/nginx.conf ]; then @@ -427,7 +427,7 @@ function ee_update_latest() fi fi # Fix for 3.3.2 renamed fastcgi_param - nginx -t 2>&1 | grep 'open() "/etc/nginx/fastcgi_params" failed' + nginx -t 2>&1 | grep 'open() "/etc/nginx/fastcgi_params" failed' &>>/dev/null if [[ $? -eq 0 ]]; then if [ -f /etc/nginx/fastcgi_params.old ]; then if [ ! -f /etc/nginx/fastcgi_params ]; then