Since update to 168, borgbackup doesn’t work any more. Reinstall doesn’t help.
[root@ipfire ~]# borg
Traceback (most recent call last):
File "/usr/bin/borg", line 33, in <module>
sys.exit(load_entry_point('borgbackup==1.2.0', 'console_scripts', 'borg')())
File "/usr/bin/borg", line 22, in importlib_load_entry_point
for entry_point in distribution(dist_name).entry_points
File "/usr/lib/python3.10/importlib/metadata/__init__.py", line 919, in distribution
return Distribution.from_name(distribution_name)
File "/usr/lib/python3.10/importlib/metadata/__init__.py", line 518, in from_name
raise PackageNotFoundError(name)
importlib.metadata.PackageNotFoundError: No package metadata was found for borgbackup
[root@ipfire ~]#
Thanks for highlighting this. It looks like an additional execution dependency has been added of importlib-metadata.
I will create a patch to add that package as a dependency for borgbackup. It will end up in CU170 as CU169 will close very shortly.
I had a look through the borgbackup changelog for 1.2.0 onwards and the only line I found was
pypi metadata: alpha → beta
and this line was listed under the Other Changes section for version 1.2.0b4
The final full release version of 1.2.0 doesn’t mention it at all.
I also just checked the build log file for borgbackup and metadata is not mentioned at all. I thought at first maybe it had flagged it up but I missed it as the build was successful.
After some searching I have found that importlib .metadata is a function available in python itself and that the message means that it was unable to find any metadata for the program borgbackup. What I don’t understand at the moment is what causes that. The importlib-metadata python module that I mentioned is a third party alternative to using what python natively can do, so it is not a missing dependency for execution, or at least not an immediately obvious one.
I have found other programs getting the same message but so far none of those situations gives any obvious clue what the problem in borgbackup is. There were no search results for the error message when borgbackup is mentioned. I have not found the error message in the borgbackup git repository open or closed issues.
I will look at setting up a vm and trying to figure out how to setup borgbackup on it to see if I can then debug it on the vm.
I confirm the effect on borgbackup installed on a vm system. I could not get anymore details on what is happening via any debugging attempts.
However further searching found reports on reddit of the same error message with borgbackup on SUSE. The report there says that the problem was solved by the 1.2.1 release of borgbackup.
I will build that next version and do a test install of the package and see if that will then start successfully. If it does then I will submit a patch to update borgbackup to that 1.2.1 version.
Further searching has found that Arch Linux have the python-msgpack as a required dependency. As it was not flagged up during the build this would suggest that it is a dependency for running borgbackup.
So I will test how the existing version 1.2.0 works if python-msgpack is installed.
The Arch Linux 1.2.0 version of borgbackup runs the borg -h command with no problem so the problem is not simply the version of borgbackup.
The bug has been fixed and the version in Core Update 169 Testing is working for me. I was able to create a repo and carry out some backups and do an export-tar to get an archive of the backups.
Is it possible for you to test out with the Testing version to confirm the fix is working for you or will you wait till it is released in the stable version?
In case someone stumbles upon this and is experiencing the same behavoir. At first it didn’t work for me after the upgrade. I skipped core168 because of this error. So i upgraded from core167 to core169 and got the same error message. I removed borgbackup and python3-msgpack
python3-msgpack gets automatically installed as a dependency
After that the borg command is working fine
EDIT: Seems like there is also an issue with Borg mount since a few core updates.
I reverted my VM snapshot to core167. So the mount problem is not related to this one.
See: Borgbackup: no module named llfuse