Compare commits
21 Commits
Author | SHA1 | Date |
---|---|---|
free | 11d1b35302 | |
free | dd9f87d2f2 | |
free | d98405e30b | |
free | b3a19cca79 | |
Maniack Crudelis | cd0438172f | |
Maniack Crudelis | 70954ec24c | |
JimboJoe | 22d624093c | |
Maniack Crudelis | c0130d0a40 | |
Maniack Crudelis | 03c2b3102f | |
JimboJoe | c4311b88db | |
Maniack Crudelis | 5741b38ed7 | |
Maniack Crudelis | 268a3a6809 | |
Maniack Crudelis | 284b2973ef | |
Maniack Crudelis | 96dbbbedad | |
Maniack Crudelis | e6c6766097 | |
Maniack Crudelis | 9db3d998b9 | |
Maniack Crudelis | 5644b54ade | |
Maniack Crudelis | 71cca24813 | |
Maniack Crudelis | e6e3134e2d | |
Maniack Crudelis | 517a45a64f | |
Maniack Crudelis | 2548d2dfe0 |
|
@ -11,6 +11,7 @@
|
||||||
setup_private=1
|
setup_private=1
|
||||||
setup_public=1
|
setup_public=1
|
||||||
upgrade=1
|
upgrade=1
|
||||||
|
upgrade=1 from_commit=f59da0dcbc1f35f98fbe32001e0a695171328001
|
||||||
backup_restore=1
|
backup_restore=1
|
||||||
multi_instance=0
|
multi_instance=0
|
||||||
incorrect_path=1
|
incorrect_path=1
|
||||||
|
@ -31,3 +32,7 @@
|
||||||
;;; Options
|
;;; Options
|
||||||
Email=
|
Email=
|
||||||
Notification=none
|
Notification=none
|
||||||
|
;;; Upgrade options
|
||||||
|
; commit=f59da0dcbc1f35f98fbe32001e0a695171328001
|
||||||
|
name=Fix install and upgrade
|
||||||
|
manifest_arg=domain=DOMAIN&path=PATH&is_public=1&
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
SOURCE_URL=https://github.com/asciimoo/searx/archive/v0.13.1.tar.gz
|
SOURCE_URL=https://github.com/asciimoo/searx/archive/v0.14.0.tar.gz
|
||||||
SOURCE_SUM=aefa314c7d6d75a2f76cf1aa1e8002d1
|
SOURCE_SUM=002c7f9ceeafc5ada2f1fd30b5d5f6c9
|
||||||
SOURCE_SUM_PRG=md5sum
|
SOURCE_SUM_PRG=md5sum
|
||||||
SOURCE_FORMAT=tar.gz
|
SOURCE_FORMAT=tar.gz
|
||||||
SOURCE_IN_SUBDIR=true
|
SOURCE_IN_SUBDIR=true
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
location __PATH__ {
|
location __PATH__ {
|
||||||
if ($scheme = http) {
|
if ($scheme = http) {
|
||||||
rewrite ^ https://$server_name$request_uri? permanent;
|
# rewrite ^ https://$server_name$request_uri? permanent;
|
||||||
}
|
}
|
||||||
try_files $uri @searx;
|
try_files $uri @searx;
|
||||||
}
|
}
|
||||||
|
@ -15,4 +15,4 @@ location @searx {
|
||||||
}
|
}
|
||||||
|
|
||||||
# Include SSOWAT user panel.
|
# Include SSOWAT user panel.
|
||||||
include conf.d/yunohost_panel.conf.inc;
|
#include conf.d/yunohost_panel.conf.inc;
|
||||||
|
|
|
@ -4,7 +4,7 @@ uid = __APP__
|
||||||
gid = __APP__
|
gid = __APP__
|
||||||
|
|
||||||
# Number of workers
|
# Number of workers
|
||||||
workers = 4
|
workers = 2
|
||||||
|
|
||||||
# The right granted on the created socket
|
# The right granted on the created socket
|
||||||
chmod-socket = 666
|
chmod-socket = 666
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
"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.14.0~ynh1",
|
||||||
"url": "https://asciimoo.github.io/searx/",
|
"url": "https://asciimoo.github.io/searx/",
|
||||||
"license": "AGPLv3",
|
"license": "AGPLv3",
|
||||||
"maintainer": {
|
"maintainer": {
|
||||||
|
|
|
@ -0,0 +1,25 @@
|
||||||
|
## Problem
|
||||||
|
- *Description of why you made this PR*
|
||||||
|
|
||||||
|
## Solution
|
||||||
|
- *And how you fix that*
|
||||||
|
|
||||||
|
## PR Status
|
||||||
|
- [ ] Code finished.
|
||||||
|
- [ ] Tested with Package_check.
|
||||||
|
- [ ] Fix or enhancement tested.
|
||||||
|
- [ ] Upgrade from last version tested.
|
||||||
|
- [ ] Can 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 marked as ready to merge, you have to wait for 3 days before really merging it.
|
|
@ -1,7 +1,8 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# GENERIC STARTING
|
#
|
||||||
|
GENERIC STARTING
|
||||||
#=================================================
|
#=================================================
|
||||||
# IMPORT GENERIC HELPERS
|
# IMPORT GENERIC HELPERS
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -55,7 +56,9 @@ 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 python-babel zlib1g-dev libffi-dev
|
||||||
|
libssl-dev python-lxml uwsgi uwsgi-plugin-python
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# NGINX CONFIGURATION
|
# NGINX CONFIGURATION
|
||||||
|
@ -64,11 +67,13 @@ ynh_install_app_dependencies git build-essential libxslt-dev python-dev python-v
|
||||||
ynh_add_nginx_config
|
ynh_add_nginx_config
|
||||||
if [ "$path_url" = "/" ]
|
if [ "$path_url" = "/" ]
|
||||||
then
|
then
|
||||||
ynh_replace_string "__PATH_NO_ROOT__" "" /etc/nginx/conf.d/$domain.d/$app.conf
|
ynh_replace_string "__PATH_NO_ROOT__" ""
|
||||||
|
/etc/nginx/conf.d/$domain.d/$app.conf
|
||||||
sed --in-place '/#noroot*/d' /etc/nginx/conf.d/$domain.d/$app.conf
|
sed --in-place '/#noroot*/d' /etc/nginx/conf.d/$domain.d/$app.conf
|
||||||
else
|
else
|
||||||
ynh_replace_string "#noroot" "" /etc/nginx/conf.d/$domain.d/$app.conf
|
ynh_replace_string "#noroot" "" /etc/nginx/conf.d/$domain.d/$app.conf
|
||||||
ynh_replace_string "__PATH_NO_ROOT__" "$path_url" /etc/nginx/conf.d/$domain.d/$app.conf
|
ynh_replace_string "__PATH_NO_ROOT__" "$path_url"
|
||||||
|
/etc/nginx/conf.d/$domain.d/$app.conf
|
||||||
fi
|
fi
|
||||||
ynh_store_file_checksum "/etc/nginx/conf.d/$domain.d/$app.conf"
|
ynh_store_file_checksum "/etc/nginx/conf.d/$domain.d/$app.conf"
|
||||||
|
|
||||||
|
@ -84,7 +89,8 @@ ynh_system_user_create $app
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
ynh_app_setting_set $app final_path $final_path
|
ynh_app_setting_set $app final_path $final_path
|
||||||
# Download, check integrity, uncompress and patch the source from app.src
|
# Download, check integrity, uncompress and patch the source from
|
||||||
|
app.src
|
||||||
ynh_setup_source "$final_path"
|
ynh_setup_source "$final_path"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -94,24 +100,30 @@ ynh_setup_source "$final_path"
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
virtualenv --system-site-packages "$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
|
# CONFIGURE SEARX
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
# Change instance name
|
# Change instance name
|
||||||
ynh_replace_string "instance_name : \"searx\"" "instance_name : \"YunoSearx\"" "$final_path/searx/settings.yml"
|
ynh_replace_string "instance_name : \"searx\"" "instance_name :
|
||||||
|
\"YunoSearx\"" "$final_path/searx/settings.yml"
|
||||||
|
|
||||||
# Generate a secret key
|
# Generate a secret key
|
||||||
ynh_replace_string "secret_key : \"ultrasecretkey\"" "secret_key : \"$(ynh_string_random)\"" "$final_path/searx/settings.yml"
|
ynh_replace_string "secret_key : \"ultrasecretkey\"" "secret_key :
|
||||||
|
\"$(ynh_string_random)\"" "$final_path/searx/settings.yml"
|
||||||
|
|
||||||
# Modify the base_url parameter, if it's installed in a subpath
|
# Modify the base_url parameter, if it's installed in a subpath
|
||||||
if [ "$path_url" != "/" ]
|
if [ "$path_url" != "/" ]
|
||||||
then
|
then
|
||||||
ynh_replace_string "base_url : False" "base_url : https://${domain}${path_url}/" "$final_path/searx/settings.yml"
|
ynh_replace_string "base_url : False" "base_url :
|
||||||
|
http://${domain}${path_url}/" "$final_path/searx/settings.yml"
|
||||||
else
|
else
|
||||||
ynh_replace_string "base_url : False" "base_url : False" "$final_path/searx/settings.yml"
|
ynh_replace_string "base_url : False" "base_url : False"
|
||||||
|
"$final_path/searx/settings.yml"
|
||||||
fi
|
fi
|
||||||
ynh_store_file_checksum "$final_path/searx/settings.yml"
|
ynh_store_file_checksum "$final_path/searx/settings.yml"
|
||||||
|
|
||||||
|
@ -127,8 +139,10 @@ chown $app: --recursive "$final_path"
|
||||||
|
|
||||||
cp ../conf/searx.ini /etc/uwsgi/apps-available/$app.ini
|
cp ../conf/searx.ini /etc/uwsgi/apps-available/$app.ini
|
||||||
ynh_replace_string "__APP__" "$app" /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
|
ynh_replace_string "__FINALPATH__" "$final_path"
|
||||||
ln -s /etc/uwsgi/apps-available/$app.ini /etc/uwsgi/apps-enabled/$app.ini
|
/etc/uwsgi/apps-available/$app.ini
|
||||||
|
ln -s /etc/uwsgi/apps-available/$app.ini
|
||||||
|
/etc/uwsgi/apps-enabled/$app.ini
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# ENABLE UWSGI SERVICE IN ADMIN PANEL
|
# ENABLE UWSGI SERVICE IN ADMIN PANEL
|
||||||
|
|
|
@ -59,7 +59,7 @@ ynh_restore_file "$final_path"
|
||||||
# INSTALL DEPENDENCIES
|
# 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
|
# RECREATE OF THE DEDICATED USER
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# GENERIC STARTING
|
#
|
||||||
|
GENERIC STARTING
|
||||||
#=================================================
|
#=================================================
|
||||||
# IMPORT GENERIC HELPERS
|
# IMPORT GENERIC HELPERS
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -25,10 +26,10 @@ final_path=$(ynh_app_setting_get $app final_path)
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
# Fix is_public as a boolean value
|
# 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
|
ynh_app_setting_set $app is_public 1
|
||||||
is_public=1
|
is_public=1
|
||||||
elif [ "$is_public" = "No" ]; then
|
elif [ "${is_public,,}" = "no" ]; then
|
||||||
ynh_app_setting_set $app is_public 0
|
ynh_app_setting_set $app is_public 0
|
||||||
is_public=0
|
is_public=0
|
||||||
fi
|
fi
|
||||||
|
@ -47,7 +48,8 @@ ynh_backup_before_upgrade # Backup the current version of the app
|
||||||
ynh_clean_setup () {
|
ynh_clean_setup () {
|
||||||
ynh_restore_upgradebackup # restore it if the upgrade fails
|
ynh_restore_upgradebackup # restore it if the upgrade fails
|
||||||
}
|
}
|
||||||
ynh_abort_if_errors # Exit if an error occurs during the execution of the script
|
ynh_abort_if_errors # Exit if an error occurs during the execution of
|
||||||
|
the script
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# CHECK THE PATH
|
# CHECK THE PATH
|
||||||
|
@ -65,7 +67,8 @@ path_url=$(ynh_normalize_url_path $path_url)
|
||||||
# Verify the checksum and backup the file if it's different
|
# Verify the checksum and backup the file if it's different
|
||||||
ynh_backup_if_checksum_is_different "$final_path/searx/settings.yml"
|
ynh_backup_if_checksum_is_different "$final_path/searx/settings.yml"
|
||||||
|
|
||||||
# Download, check integrity, uncompress and patch the source from app.src
|
# Download, check integrity, uncompress and patch the source from
|
||||||
|
app.src
|
||||||
ynh_setup_source "$final_path"
|
ynh_setup_source "$final_path"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -75,11 +78,13 @@ ynh_setup_source "$final_path"
|
||||||
ynh_add_nginx_config
|
ynh_add_nginx_config
|
||||||
if [ "$path_url" = "/" ]
|
if [ "$path_url" = "/" ]
|
||||||
then
|
then
|
||||||
ynh_replace_string "__PATH_NO_ROOT__" "" /etc/nginx/conf.d/$domain.d/$app.conf
|
ynh_replace_string "__PATH_NO_ROOT__" ""
|
||||||
|
/etc/nginx/conf.d/$domain.d/$app.conf
|
||||||
sed --in-place '/#noroot*/d' /etc/nginx/conf.d/$domain.d/$app.conf
|
sed --in-place '/#noroot*/d' /etc/nginx/conf.d/$domain.d/$app.conf
|
||||||
else
|
else
|
||||||
ynh_replace_string "#noroot" "" /etc/nginx/conf.d/$domain.d/$app.conf
|
ynh_replace_string "#noroot" "" /etc/nginx/conf.d/$domain.d/$app.conf
|
||||||
ynh_replace_string "__PATH_NO_ROOT__" "$path_url" /etc/nginx/conf.d/$domain.d/$app.conf
|
ynh_replace_string "__PATH_NO_ROOT__" "$path_url"
|
||||||
|
/etc/nginx/conf.d/$domain.d/$app.conf
|
||||||
fi
|
fi
|
||||||
ynh_store_file_checksum "/etc/nginx/conf.d/$domain.d/$app.conf"
|
ynh_store_file_checksum "/etc/nginx/conf.d/$domain.d/$app.conf"
|
||||||
|
|
||||||
|
@ -96,26 +101,33 @@ ynh_system_user_create $app
|
||||||
# UPGRADE SEARX IN ITS VIRTUALENV
|
# 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-*
|
||||||
virtualenv --system-site-packages "$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 --upgrade"
|
bash -c "source $final_path/bin/activate && pip install -U
|
||||||
|
setuptools && pip install --requirement
|
||||||
|
$final_path/requirements-ynh.txt --upgrade"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# CONFIGURE SEARX
|
# CONFIGURE SEARX
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
# Change instance name
|
# Change instance name
|
||||||
ynh_replace_string "instance_name : \"searx\"" "instance_name : \"YunoSearx\"" "$final_path/searx/settings.yml"
|
ynh_replace_string "instance_name : \"searx\"" "instance_name :
|
||||||
|
\"YunoSearx\"" "$final_path/searx/settings.yml"
|
||||||
|
|
||||||
# Generate a secret key
|
# Generate a secret key
|
||||||
ynh_replace_string "secret_key : \"ultrasecretkey\"" "secret_key : \"$(ynh_string_random)\"" "$final_path/searx/settings.yml"
|
ynh_replace_string "secret_key : \"ultrasecretkey\"" "secret_key :
|
||||||
|
\"$(ynh_string_random)\"" "$final_path/searx/settings.yml"
|
||||||
|
|
||||||
# Modify the base_url parameter, if it's installed in a subpath
|
# Modify the base_url parameter, if it's installed in a subpath
|
||||||
if [ "$path_url" != "/" ]
|
if [ "$path_url" != "/" ]
|
||||||
then
|
then
|
||||||
ynh_replace_string "base_url : False" "base_url : https://${domain}${path_url}/" "$final_path/searx/settings.yml"
|
ynh_replace_string "base_url : False" "base_url :
|
||||||
|
http://${domain}${path_url}/" "$final_path/searx/settings.yml"
|
||||||
else
|
else
|
||||||
ynh_replace_string "base_url : False" "base_url : False" "$final_path/searx/settings.yml"
|
ynh_replace_string "base_url : False" "base_url : False"
|
||||||
|
"$final_path/searx/settings.yml"
|
||||||
fi
|
fi
|
||||||
ynh_store_file_checksum "$final_path/searx/settings.yml"
|
ynh_store_file_checksum "$final_path/searx/settings.yml"
|
||||||
|
|
||||||
|
@ -133,7 +145,8 @@ chown $app: --recursive "$final_path"
|
||||||
|
|
||||||
cp ../conf/searx.ini /etc/uwsgi/apps-available/$app.ini
|
cp ../conf/searx.ini /etc/uwsgi/apps-available/$app.ini
|
||||||
ynh_replace_string "__APP__" "$app" /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
|
ynh_replace_string "__FINALPATH__" "$final_path"
|
||||||
|
/etc/uwsgi/apps-available/$app.ini
|
||||||
systemctl restart uwsgi
|
systemctl restart uwsgi
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -1,14 +1,18 @@
|
||||||
certifi==2016.9.26
|
# Have a look to https://github.com/asciimoo/searx/blob/master/requirements.txt for each upgrade of Searx
|
||||||
flask==0.12
|
certifi==2017.11.5
|
||||||
flask-babel==0.11.1
|
flask==0.12.2
|
||||||
# lxml==3.7.1
|
flask-babel==0.11.2
|
||||||
markupsafe==0.23
|
# lxml==4.1.1
|
||||||
ndg-httpsclient==0.4.2
|
idna==2.5
|
||||||
pyasn1==0.1.9
|
|
||||||
pyasn1-modules==0.0.8
|
|
||||||
pygments==2.1.3
|
pygments==2.1.3
|
||||||
pyopenssl==16.2.0
|
pyopenssl==17.4.0
|
||||||
python-dateutil==2.5.3
|
python-dateutil==2.6.1
|
||||||
pyyaml==3.11
|
pyyaml==3.12
|
||||||
requests[socks]==2.12.4
|
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
|
cffi>=1.6
|
Loading…
Reference in New Issue