FS#54475 - [python2-py-bcrypt] py-bcrypt conflicts with python2-bcrypt

Attached to Project: Community Packages
Opened by Damjan Georgievski (damjan) - Friday, 16 June 2017, 14:02 GMT
Last edited by Eli Schwartz (eschwartz) - Monday, 19 March 2018, 05:34 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Johannes Löthberg (demize)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 2
Private No

Details

Both python2-py-bcrypt and python2-bcrypt have the same files in /usr/lib/python2.7/site-packages/bcrypt/ so they conflict
(also python-py-bcrypt and python-bcrypt).

python2-py-bcrypt is required by matrix-synapse
python2-bcrypt is required by python2-paramiko and by reference by ansible, duplicity etc.

python2-bcrypt has version 3.1.3 and seems actively maintained.
pybcrypt is 0.4 and last update has been in 2013.

Not sure if the apis are compatible, since I can't find docs about py-bcrypt,
curently I force installed the newer bcrypt, and synapse still starts and works (but I suspect it might fail when I change the password - I just don't remember the old password to do it).

I have no idea what a proper way to fix this would be - but I do use ansible and synapse on this same computer.
This task depends upon

Closed by  Eli Schwartz (eschwartz)
Monday, 19 March 2018, 05:34 GMT
Reason for closing:  Fixed
Additional comments about closing:  python-py-bcrypt removed from repos, nearly a year later I assume everyone upgraded even without a replaces.
Comment by Damjan Georgievski (damjan) - Friday, 16 June 2017, 14:04 GMT
ps.
/usr/bin/hash_password from synapse works with the python2-bcrypt-3.1.3 package installed.
Comment by Damjan Georgievski (damjan) - Friday, 16 June 2017, 16:49 GMT
ok, changing the password through Riot seems to work too with the python2-bcrypt-3.1.3 package installed.
Comment by David McInnis (daavve) - Tuesday, 04 July 2017, 21:15 GMT
Problem also seems to affect python-bcrypt & python-py-bcrypt

Packages (1) python-py-bcrypt-0.4-2
error: failed to commit transaction (conflicting files)
python-py-bcrypt: /usr/lib/python3.6/site-packages/bcrypt/__init__.py exists in filesystem
python-py-bcrypt: /usr/lib/python3.6/site-packages/bcrypt/__pycache__/__init__.cpython-36.pyc exists in filesystem


/usr/lib/python3.6/site-packages/bcrypt/__init__.py is owned by python-bcrypt 3.1.3-1
/usr/lib/python3.6/site-packages/bcrypt/__pycache__/__init__.cpython-36.pyc is owned by python-bcrypt 3.1.3-1
Comment by Damjan Georgievski (damjan) - Tuesday, 18 July 2017, 19:09 GMT
maybe matrix-synapse can vendorize this lib and not require the package?
Comment by Eli Schwartz (eschwartz) - Sunday, 23 July 2017, 04:35 GMT
It would be nice if the python{,2}-bcrypt package could get a replaces=python{,2}-py-bcrypt in order to make this more intuitive to users, since at the moment this still results in conflicting files errors -- from packages that were never installed from the AUR -- for users who are upgrading.
Comment by Stefan Majewsky (majewsky) - Sunday, 23 July 2017, 17:31 GMT
As a workaround, I upgraded matrix-synapse-0.22.1-1 to 0.22.1-2 by building and installing an otherwise empty package "upgrade-helper" with provides="python2-py-bcrypt=0.4", then

# pacman -R python2-py-bcrypt
# pacman -Sy matrix-synapse
# pacman -R upgrade-helper
Comment by Bruno Pagani (ArchangeGabriel) - Tuesday, 25 July 2017, 11:16 GMT
I second @eschwartz on that request, and I add that it’s even an issue with a repo package, matrix-synapse, as stated by @majewsky.
Comment by Sean Enck (enckse) - Monday, 31 July 2017, 14:40 GMT
I also created a package to workaround like Stefan

pkgname='synapse-workaround'
pkgver=1
pkgrel=1
arch=('x86_64')
provides=('python2-py-bcrypt=0.4')

package() {
echo "test"
}
Comment by Yardena Cohen (yardenac) - Friday, 11 August 2017, 15:43 GMT
Eli Schwartz has the answer: python{,2}-bcrypt needs a replaces=python{,2}-py-bcrypt

Until then, upgrading matrix-synapse isn't just "less intuitive" ... it's broken.

Loading...