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

[fix] Bookworm install

This commit is contained in:
ljf (zamentur) 2024-04-10 23:29:40 +02:00 committed by GitHub
parent 2e90ff40c4
commit 21981d966d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 19 additions and 5 deletions

View file

@ -5,7 +5,7 @@ name = "Borg Server"
description.en = "Offer backup storage to a friend" description.en = "Offer backup storage to a friend"
description.fr = "Offrez un espace de stockage à un⋅e ami⋅e" description.fr = "Offrez un espace de stockage à un⋅e ami⋅e"
version = "1.2.6~ynh1" version = "1.2.8~ynh1"
maintainers = ["ljf"] maintainers = ["ljf"]
@ -61,4 +61,16 @@ ram.runtime = "50M"
[resources.permissions] [resources.permissions]
[resources.apt] [resources.apt]
packages = "python3-pip, python3-dev, libacl1-dev, libssl-dev, liblz4-dev, python3-jinja2, python3-setuptools, python3-venv, virtualenv, libfuse-dev, pkg-config" packages = [
"python3-pip",
"python3-dev",
"libacl1-dev",
"libssl-dev",
"liblz4-dev",
"python3-jinja2",
"python3-setuptools",
"python3-venv",
"virtualenv",
"libfuse3-dev",
"pkg-config",
]

View file

@ -1,6 +1,6 @@
#!/bin/bash #!/bin/bash
BORG_VERSION=1.2.6 BORG_VERSION=1.2.8
# Install borg with pip if borg is not here # Install borg with pip if borg is not here
install_borg_with_pip () { install_borg_with_pip () {
@ -9,9 +9,11 @@ install_borg_with_pip () {
fi fi
if [ ! -d /opt/borg-env ]; then if [ ! -d /opt/borg-env ]; then
python3 -m venv /opt/borg-env python3 -m venv /opt/borg-env
/opt/borg-env/bin/python /opt/borg-env/bin/pip install wheel /opt/borg-env/bin/python /opt/borg-env/bin/pip install pip -U
/opt/borg-env/bin/python /opt/borg-env/bin/pip install setuptools -U
/opt/borg-env/bin/python /opt/borg-env/bin/pip install wheel -U
ynh_print_info --message="Installing/compiling borg, this may take some time..." ynh_print_info --message="Installing/compiling borg, this may take some time..."
/opt/borg-env/bin/python /opt/borg-env/bin/pip install borgbackup[fuse]==$BORG_VERSION /opt/borg-env/bin/python /opt/borg-env/bin/pip install borgbackup[pyfuse3]==$BORG_VERSION
echo "#!/bin/bash echo "#!/bin/bash
/opt/borg-env/bin/python /opt/borg-env/bin/borg \"\$@\"" > /usr/local/bin/borg /opt/borg-env/bin/python /opt/borg-env/bin/borg \"\$@\"" > /usr/local/bin/borg
touch "/opt/borg-env/$(ynh_get_debian_release)" touch "/opt/borg-env/$(ynh_get_debian_release)"