I get this error when trying to run Borg:
[root@ipfire BorgBackups] # borg init --encryption=none /mnt/ssd/BorgBackups/ipfireBU
You do not have a supported version of the msgpack python package installed. Terminating.
This should never happen as specific, supported versions are required by our setup.py.
Do not contact borgbackup support about this.
as a guess, this may be related to python msgpack being at 1.0.4 and Borg being at 1.2.0.
I think Borg needs to be at 1.2.1 (or later) to work with msgpack 1.0.4.
recommend searching for "msgpack".
Good catch. This might tell us how many users this package has :)
@Adolf: Would you like to pick this one up?
I will pick this up.
I was a bit surprised initially to see this bug because I know that borg requires a certain version of msgpack and usually test that borg works okay in my vm testbed systems after doing a version update.
I realised what happened here. I did the update of python to 3.10.8 and updated a huge number of python packages that were older at the same time. This went into CU172.
So msgpack was just one of something like 80 python packages and I forgot about testing msgpack with borg. Everything just built successfully and I stopped at that point, other than testing a fresh install of IPFire to test all the WUI pages.
Apologies for missing that and I will do an update of borg to put it back in line with the version status.
Good that someone caught this :-))
No worries. It happens.
What might be useful (and we have started doing this in some packages now) is adding a note to either LFS file so that next time, you will remember - or somebody else will see the note that there is a relationship between those two packages.
I built borgbackup-1.2.3 and installed the .ipfire package into my vm testbed and ran borg -V and got an error message.
Did the build a second time to ensure that there had not been any hiccup and the same error message occurred which was
-bash-5.2$ borg -V
Traceback (most recent call last):
File "/usr/bin/borg", line 33, in <module>
sys.exit(load_entry_point('borgbackup==1.2.3', 'console_scripts', 'borg')())
File "/usr/bin/borg", line 25, in importlib_load_entry_point
Checked the issues section of borgbackup Github and there is nothing there with a similar message.
Tried building borgbackup-1.2.2 and this worked normally after installing the .ipfire package.
Checked out the various python3 packages used for borgbackup and found python3-packaging has an updated version. python3-packaging is a required package for borgbackup but no specific version numbe3r is specified. I thought that maybe the newer borgbackup version might need a newer version of python3-packaging so I tried building borgbackup-1.2.3 with python-packaging-23.0 and installed both .ipfire packages in my vm testbed.
Based on the above I will do a final build again with borgbackup-1.2.2 and submit that as a patch while in parallel I try and figure out what needs to be changed for borgbackup-1.2.3 (maybe I need to raise it as an issue in the borgbackup Github issues section unless anyone else has any ideas why I am getting the above error message.
I tried running borg --debug but the error message was the same - no extra information.
found this (it might help):
Is there more than one ".egg-info" in a Borg directory on the ipfire device?
"The StopIteration occurs when importlib_load_entry_point fails to find the relevant package."
"It turns out where was a directory ".egg-info" in the package's directory, probably from a previous install."
the eggs I found:
[root@ipfire ~] # find / -iname "*egg-info*" 2>/dev/null
[root@ipfire ~] #
Thanks @Jon for the hint. That helped me find the solution.
The rootfile for borgbackup had the directory for the egg-info commented out so it is not removed when an uninstall is run.
For borgbackup-1.2.2 and earlier this made no difference as the code found the correct egg-info directory.
However in borgbackup-1.2.3 it no longer likes there being more than one egg-info directory even if the directory has the version number in the name and the old versions are empty.
Clearing all the old versions out enabled the 1.2.3 version to work correctly.
So patch created for the update. I have also made borgbackup specific versions of the pak files (install.sh etc) and have added a line to the install.sh file to remove all borgbackup egg-info directories before extracting the files into place.
Tested this with and without old egg-info directories and it works successfully. The old directories are removed and then the install puts in place only the current egg-info directory.
I also added comments to both borgbackup and python3-msgpack lfs files about the version requirements of borgbackup and did an update of the python3-packaging file.
Patch submitted to dev mailing list and patchwork.
Excellent! I am glad it helped. Thank you!
Patch has been committed into next.
Core Update 173 Testing released
Tested out borg list path-to-repo and it now works in CU173 Testing whereas it didn't in CU172
Also tested out the command that didn't work for @jon with CU172
borg init --encryption=none /mnt/ipfireBU
Confirmed that fix works.
All works A-OK! Yay! Thank you!
[root@ipfireAPU ~] # borg init -v --encryption=none /mnt/ssd/borgbackup1
Initializing repository at "/mnt/ssd/borgbackup1"
Encryption NOT enabled.
Use the "--encryption=repokey|keyfile" to enable encryption.
Synchronizing chunks cache...
Archives: 0, w/ cached Idx: 0, w/ outdated Idx: 0, w/o cached Idx: 0.
[root@ipfireAPU ~] # echo $?
[root@ipfireAPU ~] #
IPFire 2.27 (x86_64) - Core-Update 173 Development Build: master/fa2f6cb6