1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/synapse_ynh.git synced 2024-09-03 20:26:38 +02:00

Merge branch 'testing' into master

This commit is contained in:
lapineige 2019-01-10 18:44:34 +01:00 committed by GitHub
commit 0df73ab83c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 28 additions and 25 deletions

View file

@ -1,7 +1,7 @@
;; General ;; General
; Manifest ; Manifest
domain="domain.tld" (DOMAIN) domain="domain.tld" (DOMAIN)
path="/_matrix/client/#/login" (PATH) path="/_matrix/static/" (PATH)
is_public=1 (PUBLIC|public=1|private=0) is_public=1 (PUBLIC|public=1|private=0)
; Checks ; Checks
pkg_linter=1 pkg_linter=1

View file

@ -1,5 +1,5 @@
SOURCE_URL=https://github.com/YunoHost-Apps/synapse_python_build/releases/download/v0.33.9/matrix-synapse_0.33.9-jessie-bin1_armv7l.tar.gz SOURCE_URL=https://github.com/YunoHost-Apps/synapse_python_build/releases/download/v0.34.0/matrix-synapse_0.34.0-jessie-bin1_armv7l.tar.gz
SOURCE_SUM=ffa759ee9ae7aa0c96cc9c00a039df7e8f723dd81719bb603f2a535168a4e382 SOURCE_SUM=a2b86b39f359377281dc8c0e55565fd482a52ceb3c24e0a9befc4bb165e39575
# (Optional) Program to check the integrity (sha256sum, md5sum...) # (Optional) Program to check the integrity (sha256sum, md5sum...)
# default: sha256 # default: sha256
SOURCE_SUM_PRG=sha256sum SOURCE_SUM_PRG=sha256sum

View file

@ -0,0 +1 @@
dependances="coturn build-essential python3-dev libffi-dev python3-pip python3-setuptools sqlite3 libssl-dev python3-venv libxml2-dev libxslt1-dev python3-lxml libjpeg-dev libpq-dev postgresql acl"

View file

@ -92,8 +92,8 @@ ynh_app_setting_set $app cli_port $cli_port
# WARNING : theses command are used in INSTALL, UPGRADE, RESTORE # WARNING : theses command are used in INSTALL, UPGRADE, RESTORE
# For any update do it in all files # For any update do it in all files
ynh_install_app_dependencies coturn build-essential python2.7-dev libffi-dev python-pip python-setuptools sqlite3 libssl-dev python-virtualenv libxml2-dev libxslt1-dev python-lxml libjpeg-dev libpq-dev postgresql acl ynh_install_app_dependencies $dependances
pip install --upgrade virtualenv pip3 install --upgrade virtualenv
#================================================= #=================================================
# CREATE DEDICATED USER # CREATE DEDICATED USER
@ -138,7 +138,7 @@ then
ynh_setup_source $final_path/ "armv7_$(lsb_release --codename --short)" ynh_setup_source $final_path/ "armv7_$(lsb_release --codename --short)"
else else
# Install virtualenv if it don't exist # Install virtualenv if it don't exist
test -e $final_path/bin || virtualenv -p python2.7 $final_path test -e $final_path/bin/python3 || python3 -m venv $final_path
# Install synapse in virtualenv # Install synapse in virtualenv
PS1=${PS1:-} PS1=${PS1:-}
@ -147,17 +147,12 @@ else
# We set all necessary environement variable to create a python virtualenvironnement. # We set all necessary environement variable to create a python virtualenvironnement.
source $final_path/bin/activate source $final_path/bin/activate
pip install --upgrade pip pip3 install --upgrade pip
pip install --upgrade setuptools pip3 install --upgrade setuptools
pip install --upgrade cffi ndg-httpsclient psycopg2 lxml pip3 install --upgrade cffi ndg-httpsclient psycopg2 lxml
ynh_setup_source "/tmp" "python_source" ynh_setup_source "/tmp" "python_source"
pip install --upgrade "/tmp/synapse_source.tar.gz" pip3 install --upgrade "/tmp/synapse_source.tar.gz"
# Fix issue with msgpack see https://github.com/YunoHost-Apps/synapse_ynh/issues/29
test -e $final_path/lib/python2.7/site-packages/msgpack/__init__.py || (\
pip uninstall -y msgpack-python msgpack; \
pip install msgpack-python)
# This function was defined when we called "source $final_path/bin/activate". With this function we undo what "$final_path/bin/activate" does # This function was defined when we called "source $final_path/bin/activate". With this function we undo what "$final_path/bin/activate" does
deactivate deactivate

View file

@ -59,7 +59,7 @@ ynh_restore
# WARNING : theses command are used in INSTALL, UPGRADE, RESTORE # WARNING : theses command are used in INSTALL, UPGRADE, RESTORE
# For any update do it in all files # For any update do it in all files
ynh_install_app_dependencies coturn build-essential python2.7-dev libffi-dev python-pip python-setuptools sqlite3 libssl-dev python-virtualenv libxml2-dev libxslt1-dev python-lxml libjpeg-dev libpq-dev postgresql acl ynh_install_app_dependencies $dependances
pip install --upgrade virtualenv pip install --upgrade virtualenv
#================================================= #=================================================

View file

@ -74,12 +74,24 @@ fi
#================================================= #=================================================
# STANDARD UPGRADE STEPS # STANDARD UPGRADE STEPS
#=================================================
# INSTALL DEPENDENCIES
#=================================================
# WARNING : theses command are used in INSTALL, UPGRADE, RESTORE
# For any update do it in all files
ynh_install_app_dependencies $dependances
pip3 install --upgrade virtualenv
#================================================= #=================================================
# DOWNLOAD, CHECK AND UNPACK SOURCE # DOWNLOAD, CHECK AND UNPACK SOURCE
#================================================= #=================================================
# Install/upgrade synapse in virtualenv # Install/upgrade synapse in virtualenv
# Clean venv is it was on python2.7
test -e $final_path/bin/python3 || ynh_secure_remove $final_path
# WARNING : these commands are used in INSTALL, UPGRADE # WARNING : these commands are used in INSTALL, UPGRADE
# For any update do it in all files # For any update do it in all files
@ -88,7 +100,7 @@ then
ynh_setup_source $final_path/ "armv7_$(lsb_release --codename --short)" ynh_setup_source $final_path/ "armv7_$(lsb_release --codename --short)"
else else
# Install virtualenv if it don't exist # Install virtualenv if it don't exist
test -e $final_path/bin || virtualenv -p python2.7 $final_path test -e $final_path/bin/python3 || python3 -m venv $final_path
# Install synapse in virtualenv # Install synapse in virtualenv
PS1=${PS1:-} PS1=${PS1:-}
@ -97,17 +109,12 @@ else
# We set all necessary environement variable to create a python virtualenvironnement. # We set all necessary environement variable to create a python virtualenvironnement.
source $final_path/bin/activate source $final_path/bin/activate
pip install --upgrade setuptools pip3 install --upgrade setuptools
pip install --upgrade cffi ndg-httpsclient psycopg2 lxml pip3 install --upgrade cffi ndg-httpsclient psycopg2 lxml
# Download and check the checksum for the synapse source # Download and check the checksum for the synapse source
ynh_setup_source "/tmp" "python_source" ynh_setup_source "/tmp" "python_source"
pip install --upgrade "/tmp/synapse_source.tar.gz" pip3 install --upgrade "/tmp/synapse_source.tar.gz"
# Fix issue with msgpack see https://github.com/YunoHost-Apps/synapse_ynh/issues/29
test -e $final_path/lib/python2.7/site-packages/msgpack/__init__.py || (\
pip uninstall -y msgpack-python msgpack; \
pip install msgpack-python)
# This function was defined when we called "source $final_path/bin/activate". With this function we undo what "$final_path/bin/activate" does # This function was defined when we called "source $final_path/bin/activate". With this function we undo what "$final_path/bin/activate" does
deactivate deactivate