mirror of
https://github.com/YunoHost-Apps/searx_ynh.git
synced 2024-09-03 20:16:30 +02:00
Fix upgrade process, stretch support and linter
This commit is contained in:
parent
d522d8dd49
commit
a24e66e7d2
5 changed files with 48 additions and 8 deletions
|
@ -7,15 +7,15 @@
|
||||||
"fr": "Un méta-moteur de recherche respectueux de la vie privée et bidouillable",
|
"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."
|
"de": "Eine Meta-Suchmaschine, die den Privatsphäre wahrt und 'hackable' ist."
|
||||||
},
|
},
|
||||||
"version": "0.13.1-1",
|
"version": "0.13.1~ynh1",
|
||||||
"url": "https://asciimoo.github.io/searx/",
|
"url": "https://asciimoo.github.io/searx/",
|
||||||
"license": "AGPLv3",
|
"license": "AGPL-3.0-or-later",
|
||||||
"maintainer": {
|
"maintainer": {
|
||||||
"name": "opi",
|
"name": "opi",
|
||||||
"email": "opi@zeropi.net"
|
"email": "opi@zeropi.net"
|
||||||
},
|
},
|
||||||
"requirements": {
|
"requirements": {
|
||||||
"yunohost": ">= 2.7.2"
|
"yunohost": ">= 2.7.12"
|
||||||
},
|
},
|
||||||
"multi_instance": false,
|
"multi_instance": false,
|
||||||
"services": [
|
"services": [
|
||||||
|
|
|
@ -21,6 +21,13 @@ set -eu
|
||||||
# source _common.sh
|
# source _common.sh
|
||||||
source /usr/share/yunohost/helpers
|
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
|
# LOAD SETTINGS
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -55,7 +55,7 @@ ynh_app_setting_set $app is_public $is_public
|
||||||
# INSTALL DEPENDENCIES
|
# 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 zlib1g-dev libffi-dev libssl-dev uwsgi uwsgi-plugin-python
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# NGINX CONFIGURATION
|
# NGINX CONFIGURATION
|
||||||
|
@ -93,8 +93,17 @@ ynh_setup_source "$final_path"
|
||||||
# INSTALL SEARX IN A VIRTUALENV
|
# INSTALL SEARX IN A VIRTUALENV
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
virtualenv --system-site-packages "$final_path"
|
virtualenv "$final_path"
|
||||||
bash -c "source $final_path/bin/activate && pip install -U pip setuptools && pip install --requirement $final_path/requirements-ynh.txt"
|
#run source in a 'sub shell'
|
||||||
|
(
|
||||||
|
set +o nounset
|
||||||
|
source "$final_path/bin/activate"
|
||||||
|
set -o nounset
|
||||||
|
pip install --upgrade pip
|
||||||
|
pip install --upgrade setuptools
|
||||||
|
pip install --requirement "$final_path/requirements-ynh.txt"
|
||||||
|
pip install lxml babel
|
||||||
|
)
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# CONFIGURE SEARX
|
# CONFIGURE SEARX
|
||||||
|
|
|
@ -21,6 +21,13 @@ set -eu
|
||||||
# source _common.sh
|
# source _common.sh
|
||||||
source /usr/share/yunohost/helpers
|
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
|
# LOAD SETTINGS
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -58,6 +58,12 @@ path_url=$(ynh_normalize_url_path $path_url)
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# STANDARD UPGRADE STEPS
|
# STANDARD UPGRADE STEPS
|
||||||
|
#=================================================
|
||||||
|
# INSTALL DEPENDENCIES
|
||||||
|
#=================================================
|
||||||
|
|
||||||
|
ynh_install_app_dependencies git build-essential libxslt-dev python-dev python-virtualenv virtualenv zlib1g-dev libffi-dev libssl-dev uwsgi uwsgi-plugin-python
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# DOWNLOAD, CHECK AND UNPACK SOURCE
|
# DOWNLOAD, CHECK AND UNPACK SOURCE
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -97,8 +103,19 @@ ynh_system_user_create $app
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
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/{pip,setuptools} $final_path/lib/python2.7/site-packages/setuptools-* $final_path/lib/python2.7/site-packages/pip-*
|
||||||
virtualenv --system-site-packages "$final_path"
|
virtualenv "$final_path"
|
||||||
bash -c "source $final_path/bin/activate && pip install -U pip setuptools && pip install --requirement $final_path/requirements-ynh.txt --upgrade"
|
|
||||||
|
#run source in a 'sub shell'
|
||||||
|
(
|
||||||
|
set +o nounset
|
||||||
|
source "$final_path/bin/activate"
|
||||||
|
set -o nounset
|
||||||
|
pip install --upgrade pip
|
||||||
|
pip install --upgrade setuptools
|
||||||
|
pip install --requirement "$final_path/requirements-ynh.txt"
|
||||||
|
pip install lxml babel
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# CONFIGURE SEARX
|
# CONFIGURE SEARX
|
||||||
|
|
Loading…
Add table
Reference in a new issue