Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] Duplicity B2 backend python dep b2sdk not available
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
Punchcutter
Guru
Guru


Joined: 11 Feb 2007
Posts: 363

PostPosted: Tue Oct 18, 2022 3:52 am    Post subject: [SOLVED] Duplicity B2 backend python dep b2sdk not available Reply with quote

Hi.... I would like to use duplicity for backup to Backblaze B2, which I am just beginning to experiment with. This must be a rare thing for Gentoo (at least power)users because it is broken, seemingly for quite a few years, and this is because a dependency is missing: b2sdk, which does not seem to be packaged for portage.

I found this bug report, which apparently contains an ebuild offered by the reporter to fix the problem.

But it also seems that I could install pip, which is not currently there, and install the dependency library that way, directly into my system python.

What would be the best way to solve this? I'm sympathetic to the idea that it might be bad practice to "contaminate" one's system python with libraries required for a single user app, but I'm not sure how to go about setting up a separate python just for this purpose, or if I would even want to. OTOH, I'm not familiar/comfortable with the mechanism for taking a random ebuild which is not part of the portage tree and building it into my system, or if it might be bad security practice to do so with an ebuild of uncertain origin.

Any advice much appreciated.


Last edited by Punchcutter on Wed Oct 19, 2022 5:07 am; edited 1 time in total
Back to top
View user's profile Send private message
Phoenix591
Guru
Guru


Joined: 17 Sep 2007
Posts: 495

PostPosted: Tue Oct 18, 2022 8:04 am    Post subject: Reply with quote

You're in luck: a more recent ebuild is already in Guru (like Arch's AUR)

To easily add the Guru repository
Code:
emerge eselect-repository
eselect repository enable guru


To avoid accidentally getting upgrades/other packages from guru, you may add "*/*::guru" to /etc/portage/package.mask and then add "dev-python/b2sdk::guru" to /etc/portage/package.unmask
Back to top
View user's profile Send private message
Genone
Retired Dev
Retired Dev


Joined: 14 Mar 2003
Posts: 9618
Location: beyond the rim

PostPosted: Tue Oct 18, 2022 8:04 am    Post subject: Reply with quote

Well, pip supports installing packages into a virtual environment instead of the system installation, so that sounds like the easiest option if you don't want to setup a local ebuild repository (requires a little effort to setup though).
The ebuild in the bug report isn't anything special, basically does the same thing as pip (doesn't contain any actual code, simply uses the standard eclass for python packages). Don't know anything about the involved packages themselves though.
Back to top
View user's profile Send private message
Punchcutter
Guru
Guru


Joined: 11 Feb 2007
Posts: 363

PostPosted: Wed Oct 19, 2022 5:06 am    Post subject: Reply with quote

Thanks for the ideas... I decided to go with Guru, and everything's working now. There were a few more things that needed to be done, beyond Phoenix591's instructions:
Code:
sudo emerge --sync guru
then add the following to /etc/portage/package.accept_keywords:
Code:
dev-python/b2sdk ~amd64
dev-python/logfury ~amd64
then of course
Code:
sudo emerge -a dev-python/b2sdk

I think I hit all the points and didn't miss anything. What I actually went through was a bit more complicated, with fits and starts. Without the keywording of logfury, emerge for some reason automatically chose an older version of b2sdk to try to build, which raised other issues, like the fact that it wanted python 3.9 rather than my current 3.10. But I noticed that the newer/current version of b2sdk was there, and tried forcing emerge to build it with =, which then led me to see that logfury was needed and simply needed to be keyworded.
Back to top
View user's profile Send private message
Hu
Administrator
Administrator


Joined: 06 Mar 2007
Posts: 22912

PostPosted: Wed Oct 19, 2022 12:39 pm    Post subject: Reply with quote

Testing versions of packages are allowed to depend on other testing versions. When you tried to enable b2sdk testing alone, it had an unsatisfied dependency on logfury testing, so Portage picked the older b2sdk that would accept the stable logfury.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum