Borgbackup dependency broken?

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/", line 919, in distribution
    return Distribution.from_name(distribution_name)
  File "/usr/lib/python3.10/importlib/metadata/", line 518, in from_name
    raise PackageNotFoundError(name)
importlib.metadata.PackageNotFoundError: No package metadata was found for borgbackup
[root@ipfire ~]#

Hi @rclbrg

Welcome to the IPFire community.

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.

1 Like

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.

1 Like

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.

Have raised this issue as a bug in the IPFire bugzilla, referencing this forum thread.