From 2548d2dfe0add1c22297c0156c86a531a69ab6a0 Mon Sep 17 00:00:00 2001 From: Maniack Crudelis Date: Tue, 19 Dec 2017 18:13:23 +0100 Subject: [PATCH 01/22] [enh] Fix is_public in lowercase or uppercase. --- scripts/upgrade | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/upgrade b/scripts/upgrade index c6fca67..0c7ba55 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -25,10 +25,10 @@ final_path=$(ynh_app_setting_get $app final_path) #================================================= # Fix is_public as a boolean value -if [ "$is_public" = "Yes" ]; then +if [ "$is_public,," = "yes" ]; then ynh_app_setting_set $app is_public 1 is_public=1 -elif [ "$is_public" = "No" ]; then +elif [ "$is_public,," = "no" ]; then ynh_app_setting_set $app is_public 0 is_public=0 fi From 517a45a64ffc857424f9b0e99428f3bb047d4bc4 Mon Sep 17 00:00:00 2001 From: Maniack Crudelis Date: Tue, 19 Dec 2017 18:16:52 +0100 Subject: [PATCH 02/22] A little bit too quick... --- scripts/upgrade | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/upgrade b/scripts/upgrade index 0c7ba55..09f377d 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -25,10 +25,10 @@ final_path=$(ynh_app_setting_get $app final_path) #================================================= # Fix is_public as a boolean value -if [ "$is_public,," = "yes" ]; then +if [ "${is_public,,}" = "yes" ]; then ynh_app_setting_set $app is_public 1 is_public=1 -elif [ "$is_public,," = "no" ]; then +elif [ "${is_public,,}" = "no" ]; then ynh_app_setting_set $app is_public 0 is_public=0 fi From 71cca248137a550294af091dec92319095344c98 Mon Sep 17 00:00:00 2001 From: Maniack Crudelis Date: Thu, 8 Mar 2018 17:10:43 +0100 Subject: [PATCH 03/22] Fix stretch --- scripts/install | 2 +- scripts/restore | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/install b/scripts/install index b068236..41d6a96 100644 --- a/scripts/install +++ b/scripts/install @@ -55,7 +55,7 @@ ynh_app_setting_set $app is_public $is_public # INSTALL DEPENDENCIES #================================================= -ynh_install_app_dependencies git build-essential libxslt-dev python-dev python-virtualenv virtualenv python-pybabel zlib1g-dev libffi-dev libssl-dev python-lxml uwsgi uwsgi-plugin-python +ynh_install_app_dependencies git build-essential libxslt-dev python-dev python-virtualenv virtualenv python-babel zlib1g-dev libffi-dev libssl-dev python-lxml uwsgi uwsgi-plugin-python #================================================= # NGINX CONFIGURATION diff --git a/scripts/restore b/scripts/restore index ddbe66f..ca97673 100755 --- a/scripts/restore +++ b/scripts/restore @@ -59,7 +59,7 @@ ynh_restore_file "$final_path" # INSTALL DEPENDENCIES #================================================= -ynh_install_app_dependencies libxslt-dev virtualenv python-pybabel zlib1g-dev libffi-dev libssl-dev python-lxml uwsgi uwsgi-plugin-python +ynh_install_app_dependencies libxslt-dev virtualenv python-babel zlib1g-dev libffi-dev libssl-dev python-lxml uwsgi uwsgi-plugin-python #================================================= # RECREATE OF THE DEDICATED USER From 5644b54ade1c1c56a7cf40e61802f9c6350f6061 Mon Sep 17 00:00:00 2001 From: Maniack Crudelis Date: Wed, 11 Apr 2018 20:44:17 +0200 Subject: [PATCH 04/22] Add upgrade from a previous commit --- check_process | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/check_process b/check_process index a04343b..245e252 100644 --- a/check_process +++ b/check_process @@ -11,6 +11,7 @@ setup_private=1 setup_public=1 upgrade=1 + upgrade=1 from_commit=f59da0dcbc1f35f98fbe32001e0a695171328001 backup_restore=1 multi_instance=0 incorrect_path=1 @@ -31,3 +32,7 @@ ;;; Options Email= Notification=none +;;; Upgrade options + ; commit=f59da0dcbc1f35f98fbe32001e0a695171328001 + name=Fix install and upgrade + manifest_arg=domain=DOMAIN&path=PATH&is_public=1& From 96dbbbedad06416ac4acc7c87c44bc123479d7f0 Mon Sep 17 00:00:00 2001 From: Maniack Crudelis Date: Tue, 24 Apr 2018 16:34:43 +0200 Subject: [PATCH 05/22] Fix upgrade --- scripts/install | 2 +- scripts/upgrade | 5 ++-- sources/extra_files/app/requirements-ynh.txt | 30 +++++++++++--------- 3 files changed, 21 insertions(+), 16 deletions(-) diff --git a/scripts/install b/scripts/install index 41d6a96..530ed8e 100644 --- a/scripts/install +++ b/scripts/install @@ -94,7 +94,7 @@ ynh_setup_source "$final_path" #================================================= virtualenv --system-site-packages "$final_path" -bash -c "source $final_path/bin/activate && pip install -U pip setuptools && pip install --requirement $final_path/requirements-ynh.txt" +bash -c "source $final_path/bin/activate && pip install -U setuptools && pip install --requirement $final_path/requirements-ynh.txt" #================================================= # CONFIGURE SEARX diff --git a/scripts/upgrade b/scripts/upgrade index 09f377d..2a9c462 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -96,9 +96,10 @@ ynh_system_user_create $app # UPGRADE SEARX IN ITS VIRTUALENV #================================================= -rm -r $final_path/lib/python2.7/site-packages/{pip,setuptools} $final_path/lib/python2.7/site-packages/setuptools-* $final_path/lib/python2.7/site-packages/pip-* +rm -r $final_path/lib/python2.7/site-packages/setuptools $final_path/lib/python2.7/site-packages/setuptools-* +rm -rf $final_path/lib/python2.7/site-packages/pip $final_path/lib/python2.7/site-packages/pip-* virtualenv --system-site-packages "$final_path" -bash -c "source $final_path/bin/activate && pip install -U pip setuptools && pip install --requirement $final_path/requirements-ynh.txt --upgrade" +bash -c "source $final_path/bin/activate && pip install -U setuptools && pip install --requirement $final_path/requirements-ynh.txt --upgrade" #================================================= # CONFIGURE SEARX diff --git a/sources/extra_files/app/requirements-ynh.txt b/sources/extra_files/app/requirements-ynh.txt index a821ba1..d0a8eef 100644 --- a/sources/extra_files/app/requirements-ynh.txt +++ b/sources/extra_files/app/requirements-ynh.txt @@ -1,14 +1,18 @@ -certifi==2016.9.26 -flask==0.12 -flask-babel==0.11.1 -# lxml==3.7.1 -markupsafe==0.23 -ndg-httpsclient==0.4.2 -pyasn1==0.1.9 -pyasn1-modules==0.0.8 +# Have a look to https://github.com/asciimoo/searx/blob/master/requirements.txt for each upgrade of Searx +certifi==2017.11.5 +flask==0.12.2 +flask-babel==0.11.2 +# lxml==4.1.1 +idna==2.5 pygments==2.1.3 -pyopenssl==16.2.0 -python-dateutil==2.5.3 -pyyaml==3.11 -requests[socks]==2.12.4 -cffi>=1.6 \ No newline at end of file +pyopenssl==17.4.0 +python-dateutil==2.6.1 +pyyaml==3.12 +requests[socks]==2.18.4 + +# Additionnals requirements +markupsafe>=0.23 +ndg-httpsclient>=0.4.2 +pyasn1>=0.1.9 +pyasn1-modules>=0.0.8 +cffi>=1.6 From 284b2973ef750b08bc6b8085a64fc4cfd5fd39c1 Mon Sep 17 00:00:00 2001 From: Maniack Crudelis Date: Tue, 24 Apr 2018 16:39:09 +0200 Subject: [PATCH 06/22] Fix upgrade from --- scripts/upgrade | 1 - 1 file changed, 1 deletion(-) diff --git a/scripts/upgrade b/scripts/upgrade index 2a9c462..d481d50 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -97,7 +97,6 @@ ynh_system_user_create $app #================================================= rm -r $final_path/lib/python2.7/site-packages/setuptools $final_path/lib/python2.7/site-packages/setuptools-* -rm -rf $final_path/lib/python2.7/site-packages/pip $final_path/lib/python2.7/site-packages/pip-* virtualenv --system-site-packages "$final_path" bash -c "source $final_path/bin/activate && pip install -U setuptools && pip install --requirement $final_path/requirements-ynh.txt --upgrade" From 268a3a680983038b95b6497bbe5371202e729e7d Mon Sep 17 00:00:00 2001 From: Maniack Crudelis Date: Tue, 24 Apr 2018 16:41:05 +0200 Subject: [PATCH 07/22] Upgrade to 0.14.0 --- conf/app.src | 4 ++-- manifest.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/conf/app.src b/conf/app.src index 1442969..ae5cbd3 100644 --- a/conf/app.src +++ b/conf/app.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://github.com/asciimoo/searx/archive/v0.13.1.tar.gz -SOURCE_SUM=aefa314c7d6d75a2f76cf1aa1e8002d1 +SOURCE_URL=https://github.com/asciimoo/searx/archive/v0.14.0.tar.gz +SOURCE_SUM=002c7f9ceeafc5ada2f1fd30b5d5f6c9 SOURCE_SUM_PRG=md5sum SOURCE_FORMAT=tar.gz SOURCE_IN_SUBDIR=true diff --git a/manifest.json b/manifest.json index e168c92..91c6e16 100644 --- a/manifest.json +++ b/manifest.json @@ -7,7 +7,7 @@ "fr": "Un méta-moteur de recherche respectueux de la vie privée et bidouillable", "de": "Eine Meta-Suchmaschine, die den Privatsphäre wahrt und 'hackable' ist." }, - "version": "0.13.1-1", + "version": "0.14.0-2", "url": "https://asciimoo.github.io/searx/", "license": "AGPLv3", "maintainer": { From 5741b38ed7cfc0bb354815cee9704161799cb1e5 Mon Sep 17 00:00:00 2001 From: Maniack Crudelis Date: Mon, 30 Apr 2018 11:24:10 +0200 Subject: [PATCH 08/22] Update version number --- manifest.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.json b/manifest.json index 91c6e16..9811956 100644 --- a/manifest.json +++ b/manifest.json @@ -7,7 +7,7 @@ "fr": "Un méta-moteur de recherche respectueux de la vie privée et bidouillable", "de": "Eine Meta-Suchmaschine, die den Privatsphäre wahrt und 'hackable' ist." }, - "version": "0.14.0-2", + "version": "0.14.0~ynh1", "url": "https://asciimoo.github.io/searx/", "license": "AGPLv3", "maintainer": { From 60bd920a2a6dcf727a8728488fe1f7eebc4817fc Mon Sep 17 00:00:00 2001 From: Maniack Crudelis Date: Fri, 11 May 2018 22:59:18 +0200 Subject: [PATCH 09/22] Add ynh_check_starting --- scripts/_common.sh | 56 ++++++++++++++++++++++++++++++++++++++++++++++ scripts/install | 9 +++++++- scripts/restore | 22 +++++++++++------- scripts/upgrade | 10 +++++++-- 4 files changed, 86 insertions(+), 11 deletions(-) create mode 100644 scripts/_common.sh diff --git a/scripts/_common.sh b/scripts/_common.sh new file mode 100644 index 0000000..7160957 --- /dev/null +++ b/scripts/_common.sh @@ -0,0 +1,56 @@ +#!/bin/bash + +#================================================= +# EXPERIMENTAL HELPERS +#================================================= + +# Start or restart a service and follow its booting +# +# usage: ynh_check_starting "Line to match" [Log file] [Timeout] [Service name] +# +# | arg: Line to match - The line to find in the log to attest the service have finished to boot. +# | arg: Log file - The log file to watch +# | arg: Timeout - The maximum time to wait before ending the watching. Defaut 300 seconds. +# | arg: Service name +# /var/log/$app/$app.log will be used if no other log is defined. +ynh_check_starting () { + local line_to_match="$1" + local app_log="${2:-/var/log/$service_name/$service_name.log}" + local timeout=${3:-300} + local service_name="${4:-$app}" + + ynh_clean_check_starting () { + # Stop the execution of tail. + kill -s 15 $pid_tail 2>&1 + ynh_secure_remove "$templog" 2>&1 + } + + echo "Starting of $service_name" >&2 + systemctl stop $service_name + local templog="$(mktemp)" + # Following the starting of the app in its log + tail -F -n0 "$app_log" > "$templog" & + # Get the PID of the tail command + local pid_tail=$! + systemctl start $service_name + + local i=0 + for i in `seq 1 $timeout` + do + # Read the log until the sentence is found, that means the app finished to start. Or run until the timeout + if grep --quiet "$line_to_match" "$templog" + then + echo "The service $service_name has correctly started." >&2 + break + fi + echo -n "." >&2 + sleep 1 + done + if [ $i -eq $timeout ] + then + echo "The service $service_name didn't fully started before the timeout." >&2 + fi + + echo "" + ynh_clean_check_starting +} diff --git a/scripts/install b/scripts/install index 530ed8e..adc65ea 100644 --- a/scripts/install +++ b/scripts/install @@ -6,7 +6,7 @@ # IMPORT GENERIC HELPERS #================================================= -# source _common.sh +source _common.sh source /usr/share/yunohost/helpers #================================================= @@ -138,6 +138,13 @@ systemctl restart uwsgi # Ajoute le service au monitoring de Yunohost. yunohost service add uwsgi --log "/var/log/uwsgi/app/$app.log" +#================================================= +# CHECK SEARX STARTING +#================================================= + +# Wait for searx to be fully started +ynh_check_starting "spawned uWSGI master process" "/var/log/uwsgi/app/$app.log" "300" "uwsgi" + #================================================= # GENERIC FINALISATION #================================================= diff --git a/scripts/restore b/scripts/restore index ca97673..a460b93 100755 --- a/scripts/restore +++ b/scripts/restore @@ -13,12 +13,12 @@ set -eu # IMPORT GENERIC HELPERS #================================================= -# if [ ! -e _common.sh ]; then -# # Rapatrie le fichier de fonctions si il n'est pas dans le dossier courant -# cp ../settings/scripts/_common.sh ./_common.sh -# chmod a+rx _common.sh -# fi -# source _common.sh +if [ ! -e _common.sh ]; then + # Rapatrie le fichier de fonctions si il n'est pas dans le dossier courant + cp ../settings/scripts/_common.sh ./_common.sh + chmod a+rx _common.sh +fi +source _common.sh source /usr/share/yunohost/helpers #================================================= @@ -86,8 +86,14 @@ ln -s /etc/uwsgi/apps-available/$app.ini /etc/uwsgi/apps-enabled/$app.ini #================================================= # GENERIC FINALISATION #================================================= -# RELOAD NGINX AND UWSGI +# RELOAD NGINX #================================================= -systemctl restart uwsgi systemctl reload nginx + +#================================================= +# CHECK SEARX STARTING +#================================================= + +# Wait for searx to be fully started +ynh_check_starting "spawned uWSGI master process" "/var/log/uwsgi/app/$app.log" "300" "uwsgi" diff --git a/scripts/upgrade b/scripts/upgrade index d481d50..59ac2de 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -6,7 +6,7 @@ # IMPORT GENERIC HELPERS #================================================= -# source _common.sh +source _common.sh source /usr/share/yunohost/helpers #================================================= @@ -134,7 +134,13 @@ chown $app: --recursive "$final_path" cp ../conf/searx.ini /etc/uwsgi/apps-available/$app.ini ynh_replace_string "__APP__" "$app" /etc/uwsgi/apps-available/$app.ini ynh_replace_string "__FINALPATH__" "$final_path" /etc/uwsgi/apps-available/$app.ini -systemctl restart uwsgi + +#================================================= +# CHECK SEARX STARTING +#================================================= + +# Wait for searx to be fully started +ynh_check_starting "spawned uWSGI master process" "/var/log/uwsgi/app/$app.log" "300" "uwsgi" #================================================= # SETUP SSOWAT From 03c2b3102f7378f26e2d943305b0628a42ab4cd2 Mon Sep 17 00:00:00 2001 From: Maniack Crudelis Date: Wed, 23 May 2018 11:51:07 +0200 Subject: [PATCH 10/22] PR template ## Problem - *The template is hardly used by contributors unless they're part of Apps group.* ## Solution - *Add an automatic template for all PR* ## PR Status Could be reviewed and tested. ## Validation --- *Minor decision* - [ ] **Code review** : - [ ] **Approval (LGTM)** : - [ ] **Approval (LGTM)** : When the PR is mark as ready to merge, you have to wait for 3 days before really merge it. --- pull_request_template.md | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 pull_request_template.md diff --git a/pull_request_template.md b/pull_request_template.md new file mode 100644 index 0000000..91aa307 --- /dev/null +++ b/pull_request_template.md @@ -0,0 +1,23 @@ +## Problem +- *Description of why you made this PR* + +## Solution +- *And how you fix that* + +## PR Status +*Obviously, you should really check these affirmations* +Work finished. Package_check, basic tests and upgrade from last version OK. +Could be reviewed and tested. + +## Validation +--- +*Minor decision* +- **Upgrade previous version** : +- [ ] **Code review** : +- [ ] **Approval (LGTM)** : +- [ ] **Approval (LGTM)** : +- **CI succeeded** : +[![Build Status](https://ci-apps-dev.yunohost.org/jenkins/job/searx_ynh%20-BRANCH-%20(Official)/badge/icon)](https://ci-apps-dev.yunohost.org/jenkins/job/searx_ynh%20-BRANCH-%20(Official)/) *Please replace '-BRANCH-' in this link for a PR from a local branch.* +or +[![Build Status](https://ci-apps-dev.yunohost.org/jenkins/job/searx_ynh%20PR-NUM-%20(Official_fork)/badge/icon)](https://ci-apps-dev.yunohost.org/jenkins/job/searx_ynh%20PR-NUM-%20(Official_fork)/) *Replace '-NUM-' by the PR number in this link for a PR from a forked repository.* +When the PR is mark as ready to merge, you have to wait for 3 days before really merge it. From c0130d0a40bf5e94f1d2f0bed5a8f1aa057fa6db Mon Sep 17 00:00:00 2001 From: Maniack Crudelis Date: Wed, 23 May 2018 12:45:32 +0200 Subject: [PATCH 11/22] Add checkboxes for status --- pull_request_template.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/pull_request_template.md b/pull_request_template.md index 91aa307..2f48c04 100644 --- a/pull_request_template.md +++ b/pull_request_template.md @@ -5,9 +5,11 @@ - *And how you fix that* ## PR Status -*Obviously, you should really check these affirmations* -Work finished. Package_check, basic tests and upgrade from last version OK. -Could be reviewed and tested. +- [ ] Work finished. +- [ ] Tested with Package_check. +- [ ] Fix or enhancement tested. +- [ ] Upgrade from last version tested. +- [ ] Can be reviewed and tested. ## Validation --- From 22d624093c497ba0c5c057ff249c941ed67ab952 Mon Sep 17 00:00:00 2001 From: JimboJoe Date: Wed, 23 May 2018 13:40:38 +0200 Subject: [PATCH 12/22] Typo fix --- pull_request_template.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pull_request_template.md b/pull_request_template.md index 2f48c04..82fcea3 100644 --- a/pull_request_template.md +++ b/pull_request_template.md @@ -22,4 +22,4 @@ [![Build Status](https://ci-apps-dev.yunohost.org/jenkins/job/searx_ynh%20-BRANCH-%20(Official)/badge/icon)](https://ci-apps-dev.yunohost.org/jenkins/job/searx_ynh%20-BRANCH-%20(Official)/) *Please replace '-BRANCH-' in this link for a PR from a local branch.* or [![Build Status](https://ci-apps-dev.yunohost.org/jenkins/job/searx_ynh%20PR-NUM-%20(Official_fork)/badge/icon)](https://ci-apps-dev.yunohost.org/jenkins/job/searx_ynh%20PR-NUM-%20(Official_fork)/) *Replace '-NUM-' by the PR number in this link for a PR from a forked repository.* -When the PR is mark as ready to merge, you have to wait for 3 days before really merge it. +When the PR is marked as ready to merge, you have to wait for 3 days before really merging it. From 70954ec24c4dc11bc499fc6cda68b397ec0a22d8 Mon Sep 17 00:00:00 2001 From: Maniack Crudelis Date: Wed, 23 May 2018 17:53:30 +0200 Subject: [PATCH 13/22] Replace work by code. --- pull_request_template.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pull_request_template.md b/pull_request_template.md index 82fcea3..5f38ab0 100644 --- a/pull_request_template.md +++ b/pull_request_template.md @@ -5,7 +5,7 @@ - *And how you fix that* ## PR Status -- [ ] Work finished. +- [ ] Code finished. - [ ] Tested with Package_check. - [ ] Fix or enhancement tested. - [ ] Upgrade from last version tested. From be5dc7943b22a99a6a2e9187ab2a489f9ec2d353 Mon Sep 17 00:00:00 2001 From: Maniack Crudelis Date: Mon, 28 May 2018 00:30:42 +0200 Subject: [PATCH 14/22] Minor fixes --- manifest.json | 2 +- scripts/backup | 14 +++++++------- scripts/restore | 16 ++++++++-------- scripts/upgrade | 6 ++++++ 4 files changed, 22 insertions(+), 16 deletions(-) diff --git a/manifest.json b/manifest.json index 9811956..62e6426 100644 --- a/manifest.json +++ b/manifest.json @@ -9,7 +9,7 @@ }, "version": "0.14.0~ynh1", "url": "https://asciimoo.github.io/searx/", - "license": "AGPLv3", + "license": "AGPL-3.0-or-later", "maintainer": { "name": "opi", "email": "opi@zeropi.net" diff --git a/scripts/backup b/scripts/backup index 96afb05..5d586f6 100755 --- a/scripts/backup +++ b/scripts/backup @@ -2,13 +2,6 @@ #================================================= # GENERIC STARTING -#================================================= -# MANAGE FAILURE OF THE SCRIPT -#================================================= - -# Exit on command errors and treat unset variables as an error -set -eu - #================================================= # IMPORT GENERIC HELPERS #================================================= @@ -21,6 +14,13 @@ set -eu # source _common.sh source /usr/share/yunohost/helpers +#================================================= +# MANAGE SCRIPT FAILURE +#================================================= + +# Exit if an error occurs during the execution of the script +ynh_abort_if_errors + #================================================= # LOAD SETTINGS #================================================= diff --git a/scripts/restore b/scripts/restore index ca97673..ef5f712 100755 --- a/scripts/restore +++ b/scripts/restore @@ -2,13 +2,6 @@ #================================================= # GENERIC STARTING -#================================================= -# MANAGE FAILURE OF THE SCRIPT -#================================================= - -# Exit on command errors and treat unset variables as an error -set -eu - #================================================= # IMPORT GENERIC HELPERS #================================================= @@ -21,6 +14,13 @@ set -eu # source _common.sh source /usr/share/yunohost/helpers +#================================================= +# MANAGE SCRIPT FAILURE +#================================================= + +# Exit if an error occurs during the execution of the script +ynh_abort_if_errors + #================================================= # LOAD SETTINGS #================================================= @@ -59,7 +59,7 @@ ynh_restore_file "$final_path" # INSTALL DEPENDENCIES #================================================= -ynh_install_app_dependencies libxslt-dev virtualenv python-babel zlib1g-dev libffi-dev libssl-dev python-lxml uwsgi uwsgi-plugin-python +ynh_install_app_dependencies git build-essential libxslt-dev python-dev python-virtualenv virtualenv python-pybabel zlib1g-dev libffi-dev libssl-dev python-lxml uwsgi uwsgi-plugin-python #================================================= # RECREATE OF THE DEDICATED USER diff --git a/scripts/upgrade b/scripts/upgrade index d481d50..70762eb 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -58,6 +58,12 @@ path_url=$(ynh_normalize_url_path $path_url) #================================================= # STANDARD UPGRADE STEPS +#================================================= +# UPGRADE DEPENDENCIES +#================================================= + +ynh_install_app_dependencies git build-essential libxslt-dev python-dev python-virtualenv virtualenv python-pybabel zlib1g-dev libffi-dev libssl-dev python-lxml uwsgi uwsgi-plugin-python + #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE #================================================= From af8c610ab453ac3306d5bef799a5e5e9b69f6ca1 Mon Sep 17 00:00:00 2001 From: triller Date: Sun, 24 Jun 2018 02:59:14 +0100 Subject: [PATCH 15/22] Fixes missing python-pybabel dependency --- scripts/install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/install b/scripts/install index b068236..41d6a96 100644 --- a/scripts/install +++ b/scripts/install @@ -55,7 +55,7 @@ ynh_app_setting_set $app is_public $is_public # INSTALL DEPENDENCIES #================================================= -ynh_install_app_dependencies git build-essential libxslt-dev python-dev python-virtualenv virtualenv python-pybabel zlib1g-dev libffi-dev libssl-dev python-lxml uwsgi uwsgi-plugin-python +ynh_install_app_dependencies git build-essential libxslt-dev python-dev python-virtualenv virtualenv python-babel zlib1g-dev libffi-dev libssl-dev python-lxml uwsgi uwsgi-plugin-python #================================================= # NGINX CONFIGURATION From 398f2e814b3f64eead0f8e01f8d298511c4b5183 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josu=C3=A9=20Tille?= Date: Thu, 28 Jun 2018 18:12:07 +0200 Subject: [PATCH 16/22] Fix uwsgi config --- conf/searx.ini | 2 ++ 1 file changed, 2 insertions(+) diff --git a/conf/searx.ini b/conf/searx.ini index 8329d22..5b503d4 100644 --- a/conf/searx.ini +++ b/conf/searx.ini @@ -13,6 +13,8 @@ chmod-socket = 666 single-interpreter = true master = true plugin = python +lazy-apps = true +enable-threads = true # Application base folder base = __FINALPATH__ From c0dbddc1a092f066f821eed3584a8b757737e917 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josu=C3=A9=20Tille?= Date: Thu, 28 Jun 2018 18:20:07 +0200 Subject: [PATCH 17/22] Use python-babel everythere --- scripts/restore | 2 +- scripts/upgrade | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/restore b/scripts/restore index 9c6c739..9929ea4 100755 --- a/scripts/restore +++ b/scripts/restore @@ -59,7 +59,7 @@ ynh_restore_file "$final_path" # INSTALL DEPENDENCIES #================================================= -ynh_install_app_dependencies git build-essential libxslt-dev python-dev python-virtualenv virtualenv python-pybabel zlib1g-dev libffi-dev libssl-dev python-lxml uwsgi uwsgi-plugin-python +ynh_install_app_dependencies git build-essential libxslt-dev python-dev python-virtualenv virtualenv python-babel zlib1g-dev libffi-dev libssl-dev python-lxml uwsgi uwsgi-plugin-python #================================================= # RECREATE OF THE DEDICATED USER diff --git a/scripts/upgrade b/scripts/upgrade index 761b049..eaff8cc 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -62,7 +62,7 @@ path_url=$(ynh_normalize_url_path $path_url) # UPGRADE DEPENDENCIES #================================================= -ynh_install_app_dependencies git build-essential libxslt-dev python-dev python-virtualenv virtualenv python-pybabel zlib1g-dev libffi-dev libssl-dev python-lxml uwsgi uwsgi-plugin-python +ynh_install_app_dependencies git build-essential libxslt-dev python-dev python-virtualenv virtualenv python-babel zlib1g-dev libffi-dev libssl-dev python-lxml uwsgi uwsgi-plugin-python #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE From 64a9c54ca3ed259a227ed082062cfbabb6baed11 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josu=C3=A9=20Tille?= Date: Fri, 29 Jun 2018 08:12:42 +0200 Subject: [PATCH 18/22] Use an other commit for upgrade in CI --- check_process | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/check_process b/check_process index 245e252..f76a92e 100644 --- a/check_process +++ b/check_process @@ -11,7 +11,7 @@ setup_private=1 setup_public=1 upgrade=1 - upgrade=1 from_commit=f59da0dcbc1f35f98fbe32001e0a695171328001 + upgrade=1 from_commit=0bc4b329402773653e4a70adf6a397c5cefea947 backup_restore=1 multi_instance=0 incorrect_path=1 @@ -33,6 +33,6 @@ Email= Notification=none ;;; Upgrade options - ; commit=f59da0dcbc1f35f98fbe32001e0a695171328001 + ; commit=0bc4b329402773653e4a70adf6a397c5cefea947 name=Fix install and upgrade manifest_arg=domain=DOMAIN&path=PATH&is_public=1& From f96d7b0732eeb491b3c806581429b8a8f9eb7594 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josu=C3=A9=20Tille?= Date: Thu, 28 Jun 2018 19:34:06 +0200 Subject: [PATCH 19/22] Fix tile --- conf/nginx.conf | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/conf/nginx.conf b/conf/nginx.conf index f963f89..f68e6b5 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -4,15 +4,12 @@ location __PATH__ { if ($scheme = http) { rewrite ^ https://$server_name$request_uri? permanent; } - try_files $uri @searx; -} -location @searx { uwsgi_param SCRIPT_NAME '__PATH_NO_ROOT__'; include uwsgi_params; uwsgi_modifier1 30; uwsgi_pass unix:///run/uwsgi/app/searx/socket; -} -# Include SSOWAT user panel. -include conf.d/yunohost_panel.conf.inc; + # Include SSOWAT user panel. + include conf.d/yunohost_panel.conf.inc; +} From 46ea345c0861fed806a581df1dd8ff53c3ae3054 Mon Sep 17 00:00:00 2001 From: Maniack Crudelis Date: Fri, 29 Jun 2018 19:21:14 +0200 Subject: [PATCH 20/22] Split pip install commands --- scripts/install | 4 +++- scripts/upgrade | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/scripts/install b/scripts/install index adc65ea..32f2498 100644 --- a/scripts/install +++ b/scripts/install @@ -94,7 +94,9 @@ ynh_setup_source "$final_path" #================================================= virtualenv --system-site-packages "$final_path" -bash -c "source $final_path/bin/activate && pip install -U setuptools && pip install --requirement $final_path/requirements-ynh.txt" +set +u; source $final_path/bin/activate; set -u +pip install -U setuptools +pip install --requirement $final_path/requirements-ynh.txt #================================================= # CONFIGURE SEARX diff --git a/scripts/upgrade b/scripts/upgrade index eaff8cc..b71f771 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -104,7 +104,9 @@ ynh_system_user_create $app rm -r $final_path/lib/python2.7/site-packages/setuptools $final_path/lib/python2.7/site-packages/setuptools-* virtualenv --system-site-packages "$final_path" -bash -c "source $final_path/bin/activate && pip install -U setuptools && pip install --requirement $final_path/requirements-ynh.txt --upgrade" +set +u; source $final_path/bin/activate; set -u +pip install -U setuptools +pip install --requirement $final_path/requirements-ynh.txt --upgrade #================================================= # CONFIGURE SEARX From 79b3f60c5140b77fa1cb336e910ddb6e612506c5 Mon Sep 17 00:00:00 2001 From: Maniack Crudelis Date: Fri, 29 Jun 2018 19:31:53 +0200 Subject: [PATCH 21/22] Clear commit name --- check_process | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/check_process b/check_process index f76a92e..0f80e58 100644 --- a/check_process +++ b/check_process @@ -34,5 +34,5 @@ Email= Notification=none ;;; Upgrade options ; commit=0bc4b329402773653e4a70adf6a397c5cefea947 - name=Fix install and upgrade + name=Fix dependances for stretch, from old_version_for_CI_1 branch manifest_arg=domain=DOMAIN&path=PATH&is_public=1& From 00172223ac4de384f841c6122bfde172b2fdede7 Mon Sep 17 00:00:00 2001 From: JimboJoe Date: Wed, 4 Jul 2018 20:53:50 +0200 Subject: [PATCH 22/22] Cleaner _common.sh sourcing in restore script --- scripts/restore | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/scripts/restore b/scripts/restore index 9929ea4..413aa02 100755 --- a/scripts/restore +++ b/scripts/restore @@ -6,12 +6,7 @@ # IMPORT GENERIC HELPERS #================================================= -if [ ! -e _common.sh ]; then - # Rapatrie le fichier de fonctions si il n'est pas dans le dossier courant - cp ../settings/scripts/_common.sh ./_common.sh - chmod a+rx _common.sh -fi -source _common.sh +source ../settings/scripts/_common.sh source /usr/share/yunohost/helpers #=================================================