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

[enh] Pin the borg version to 1.1.10

This commit is contained in:
ljf 2019-05-21 17:05:24 +02:00
parent 2cb38b3183
commit 583f8c7c9d
4 changed files with 14 additions and 23 deletions

View file

@ -8,6 +8,17 @@ PKG_DIR=$(cd ../; pwd)
pkg_dependencies="python3-pip python3-dev libacl1-dev libssl-dev liblz4-dev python-jinja2"
# Install borg with pip if borg is not here
install_borg_with_pip () {
if [ ! -d /opt/borg-env ]; then
virtualenv --python=python3 /opt/borg-env
/opt/borg-env/bin/python /opt/borg-env/bin/pip install borgbackup=1.1.10
echo "#!/bin/bash
/opt/borg-env/bin/python /opt/borg-env/bin/borg \"\$@\"" > /usr/local/bin/borg
chmod u+x /usr/local/bin/borg
fi
}
#=================================================
# COMMON HELPERS
#=================================================

View file

@ -33,14 +33,7 @@ ynh_save_args ssh_user public_key quota
# INSTALL DEPENDENCIES
#=================================================
ynh_install_app_dependencies $pkg_dependencies
if [ ! -d /opt/borg-env ]; then
virtualenv --python=python3 /opt/borg-env
/opt/borg-env/bin/python /opt/borg-env/bin/pip install borgbackup
echo "#!/bin/bash
/opt/borg-env/bin/python /opt/borg-env/bin/borg \"\$@\"" > /usr/local/bin/borg
chmod u+x /usr/local/bin/borg
fi
install_borg_with_pip
#=================================================
# CREATE SSH USER USED BY BORG

View file

@ -35,14 +35,7 @@ export quota=$(ynh_app_setting_get $app quota)
# INSTALL DEPENDENCIES
#=================================================
ynh_install_app_dependencies $pkg_dependencies
if [ ! -d /opt/borg-env ]; then
virtualenv --python=python3 /opt/borg-env
/opt/borg-env/bin/python /opt/borg-env/bin/pip install borgbackup
echo "#!/bin/bash
/opt/borg-env/bin/python /opt/borg-env/bin/borg \"\$@\"" > /usr/local/bin/borg
chmod u+x /usr/local/bin/borg
fi
install_borg_with_pip
#=================================================
# CREATE SSH USER USED BY BORG

View file

@ -37,11 +37,5 @@ ynh_abort_if_errors
if is_stretch; then
ynh_remove_backports
if [ ! -d /opt/borg-env ]; then
virtualenv --python=python3 /opt/borg-env
/opt/borg-env/bin/python /opt/borg-env/bin/pip install borgbackup
echo "#!/bin/bash
/opt/borg-env/bin/python /opt/borg-env/bin/borg \"\$@\"" > /usr/local/bin/borg
chmod u+x /usr/local/bin/borg
fi
install_borg_with_pip
fi