YunoHost-Apps / borg_ynh

An experimental Borg implementation for YunoHost
https://www.borgbackup.org/
GNU Affero General Public License v3.0
19 stars 22 forks source link

Borg fails after migration to bullseye #128

Open fflorent opened 1 year ago

fflorent commented 1 year ago

Describe the bug

After migration from buster to bullseye, borg fails with this error:

[2022-07-20_00:27:38] Traceback (most recent call last):
[2022-07-20_00:27:38]   File "/opt/borg-env/bin/borg", line 6, in <module>
[2022-07-20_00:27:38]     from borg.archiver import main
[2022-07-20_00:27:38] ModuleNotFoundError: No module named 'borg'

Context

Steps to reproduce

Steps I guess:

Expected behavior

Borg should work.

Logs

[2022-07-20_00:27:38] Traceback (most recent call last):
[2022-07-20_00:27:38]   File "/opt/borg-env/bin/borg", line 6, in <module>
[2022-07-20_00:27:38]     from borg.archiver import main
[2022-07-20_00:27:38] ModuleNotFoundError: No module named 'borg'
fflorent commented 1 year ago

Workaround

Uninstalling and restoring the borg app solves the issue:

$ sudo yunohost backup create --name borg_bullseye --apps borg
$ sudo yunohost remove borg
$ sudo yunohost backup restore borg_bullseye --apps
zamentur commented 1 year ago

All python apps need to be force updated after the upgrade (it will be explain in the docs) It was already like this for stretch -> buster

xmgz commented 1 year ago

I've tried the python force "-F" to restore the app but failed and got uninstalled :(

then tried to clean install and also fails, with this log https://paste.yunohost.org/raw/qusapirozo

Warning:       [end of output]
Warning:   note: This error originates from a subprocess, and is likely not a problem with pip.
Warning: error: legacy-install-failure
Warning: × Encountered error while trying to install package.
Warning: ╰─> borgbackup
Warning: note: This is an issue with the package mentioned above, not pip.
Warning: hint: See above for output from the failure.
Error: Unable to install borg: An error occurred inside the app installation script
Info: The operation 'Install the 'borg' app' could not be completed. Please share the full log of this operation using the command 'yunohost log share 20220819-035336-app_install-borg' to get help
Warning: Here's an extract of the logs before the crash. It might help debugging the error:
Info: DEBUG -
Info: WARNING -       During handling of the above exception, another exception occurred:
Info: DEBUG -
Info: WARNING -       Traceback (most recent call last):
Info: WARNING -         File "<string>", line 2, in <module>
Info: WARNING -         File "<pip-setuptools-caller>", line 34, in <module>
Info: WARNING -         File "/tmp/pip-install-9ap2fmcz/borgbackup_a9d985cf045047d9b5b36910da0e31b1/setup.py", line 154, in <module>
Info: WARNING -           raise ImportError('The GIT version of Borg needs Cython. Install Cython or use a released version.')
Info: WARNING -       ImportError: The GIT version of Borg needs Cython. Install Cython or use a released version.
Info: WARNING -       [end of output]
Info: DEBUG -
Info: WARNING -   note: This error originates from a subprocess, and is likely not a problem with pip.
Info: WARNING - error: legacy-install-failure
Info: DEBUG -
Info: WARNING - × Encountered error while trying to install package.
Info: WARNING - ╰─> borgbackup
Info: DEBUG -
Info: WARNING - note: This is an issue with the package mentioned above, not pip.
Info: WARNING - hint: See above for output from the failure.
Info: DEBUG - + ynh_exit_properly
Warning: Removing the app following the installation failure...
Info: [++++++..............] > Removing dependencies...
Warning: Failed to stop borg.timer: Unit borg.timer not loaded.
Warning: Failed to disable unit: Unit file borg.timer does not exist.
Info: '/etc/systemd/system/borg.timer' wasn't deleted because it doesn't exist.
Info: '/usr/local/bin/backup-with-borg' wasn't deleted because it doesn't exist.
Info: '/etc/yunohost/hooks.d/backup_method/05-borg_app' wasn't deleted because it doesn't exist.
Info: '/usr/local/bin/borg' wasn't deleted because it doesn't exist.
Info: [####################] > Removal of borg completed
Error: The operation 'Install the 'borg' app' could not be completed. Please share the full log of this operation using the command 'yunohost log share 202208xx-xxxxx-app_install-borg' to get help
shukon commented 1 year ago

I have this issue with a fresh VPS and fresh Yunohost install directly on Debian 11, without any migration. More or less identical logs as the ones xmgz provided.