Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 1458602
Summary: | ecryptfs-utils: Proper packaging of python part, e.g. rename and add subpackage(s) for python[2|3] | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Raphael Groner <projects.rg> | ||||||
Component: | ecryptfs-utils | Assignee: | Lumír Balhar <lbalhar> | ||||||
Status: | CLOSED DUPLICATE | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | ||||||
Severity: | low | Docs Contact: | |||||||
Priority: | medium | ||||||||
Version: | rawhide | CC: | esandeen, h.reindl, lbalhar, mhlavink, mhroncok, projects.rg, pviktori | ||||||
Target Milestone: | --- | Keywords: | FutureFeature | ||||||
Target Release: | --- | ||||||||
Hardware: | Unspecified | ||||||||
OS: | Unspecified | ||||||||
Whiteboard: | PatchNeeded | ||||||||
Fixed In Version: | Doc Type: | If docs needed, set a value | |||||||
Doc Text: | Story Points: | --- | |||||||
Clone Of: | Environment: | ||||||||
Last Closed: | 2018-09-11 20:50:47 UTC | Type: | Bug | ||||||
Regression: | --- | Mount Type: | --- | ||||||
Documentation: | --- | CRM: | |||||||
Verified Versions: | Category: | --- | |||||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||
Cloudforms Team: | --- | Target Upstream Version: | |||||||
Embargoed: | |||||||||
Bug Depends On: | 533920 | ||||||||
Bug Blocks: | 1285816, 1322027 | ||||||||
Attachments: |
|
Description
Raphael Groner
2017-06-04 20:09:52 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 27 development cycle. Changing version to '27'. Ping? Any news here? not a high priority atm. If you (or anyone else) prepare the patch, I'll commit it. There's a bug in configure to let it fail with detection of right python3 environment. Have to investigate. Bug #533920 indicates a general issue with automake and python3. Work in progress: https://src.fedoraproject.org/rpms/ecryptfs-utils/pull-request/1 what about accept that python is crap when it takes that long to port code while PHP7 was released many years after python3 and in the meantime every serious project is wrking on 7.0/7.1/7.2 do we have to expect the same b*****t with python3? since GNOME3 did not learn anything from KDE4 i doubt that things become better - just port code relevant for distributions to a serious programming language which don't break anything left and right every few years Lumír, could you look at ecryptfs when you get some time? ecryptfs-utils is using some pregenerated code [0], which was apparently generated by SWIG 1.3.31. Current Fedora has SWIG 3.0.12. Try removing these files (in %prep, after pushd %{name}-%{version}): rm src/libecryptfs-swig/libecryptfs.py rm src/libecryptfs-swig/libecryptfs_wrap.c I'm afraid the rabbit hole goes further down from there, though. [0] https://fedoraproject.org/wiki/Packaging:Guidelines#Use_of_pregenerated_code I managed to port Python part of ecryptfs-utils with the code generated by Swig to Python 3 compatible form. Package with Python subpackages builds correctly. Is there anybody who can give me a simple example of usage of python modules? I cannot find any documentation of usage so I am not able to test it. @lbalhar Thanks for your hard work. As there are no usable python tests available, my suggestion would be: Should we write some unit tests for the API of the legacy (python2) module and try run them also against python3? If it works, we could send all as a proposed patch to upstream. (In reply to Raphael Groner from comment #11) > @lbalhar Thanks for your hard work. > > As there are no usable python tests available, my suggestion would be: > Should we write some unit tests for the API of the legacy (python2) module > and try run them also against python3? If it works, we could send all as a > proposed patch to upstream. That's a great idea. The problem is that I have no idea how to use neither ecryptfs nor ecryptfs-utils and its Python module. So I am not the one who can write tests. There are only three functions to test: - binary_data ecryptfs_passphrase_blob(char *salt, char *passphrase); - binary_data ecryptfs_passphrase_sig_from_blob(char *blob); - int ecryptfs_add_blob_to_keyring(char *blob, char *sig); Moreover, the usage is kinda hacky, because ecryptfs-utils contains dash in the name and it doesn't contain __init__.py file. That means that you have to alter PYTHONPATH to be able to import libecryptfs. Python code in /usr/lib contains only import machinery to import mentioned functions from /usr/lib64 so you have to have both folders in PYTHONPATH. Python 2: # PYTHONPATH=/usr/lib/python2.7/site-packages/ecryptfs-utils/:/usr/lib64/python2.7/site-packages/ecryptfs-utils/ python2 >>> from libecryptfs import * >>> ecryptfs_passphrase_blob('a', 'b') '\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\n\x00\x00\x00\x00\x00\x00\x00@\x00\x00\x00\x02\x00\x00\x00\xf2u\x1ft\x02\x11\n+7f\xc8\x92W\xfby\xc7~)\xfe\x8en\xe0\xaab2_l\xf8h\x04\x0f\x03\x172V\xb8\xcc#1m\xaa\x1cF\xfb+\x976Q*\xa7%<\xc5\x08\xbd\xa5\xa3?kG\xb8\xee}\xbdc38554026c2b4843\x00a\x00\x00\x00\x0b\x00\x00\x00\x00\x00\x00' >>> ecryptfs_passphrase_sig_from_blob('a') 'm\xd73\x00\x01\x00\x00\x00re\x00\x00\x07\x00\x00\x00\x00' >>> ecryptfs_add_blob_to_keyring('a', 'b') -1 Python 3: # PYTHONPATH=/usr/lib/python3.6/site-packages/ecryptfs-utils/:/usr/lib64/python3.6/site-packages/ecryptfs-utils/ python3 >>> from libecryptfs import * >>> ecryptfs_passphrase_blob('a', 'b') b'\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\n\x00\x00\x00\x00\x00\x00\x00@\x00\x00\x00\x02\x00\x00\x00\xd9\xa1\xa3\xdc:\xf9\x17x\xbb\x07\xa8/#o\x9d\x1cC\x9b,\xd7\xf9\xe8\x93c\xf0(\xb7eU\xa1\xba\x90\x05\xb8r\xacU\xc5\x14v\x86\xd7\x07\x10\x13\xb5\xc6q\x1fBU2\xde\xd3\x87\xdbs\x13\x1a\x07\xf4\x19\xb3qca877d3d98c7d4d0\x00a\x007\xfa\xf7\x7f\x00\x00\x00\x00\x00' >>> ecryptfs_passphrase_sig_from_blob('a') b'y the completer f' >>> ecryptfs_add_blob_to_keyring('a', 'b') -1 It seems that it works but Python 3 produces different results. And that's it. I cannot verify the results or set an algorithm for testing because I don't know ecryptfs well enough. Here is the scratch build with python3 subpackage: https://koji.fedoraproject.org/koji/taskinfo?taskID=27318396 Could you please help me? Created attachment 1452610 [details]
source code patch
Created attachment 1452611 [details]
specfile patch
I've added patches for source code and specfile. I've also sent a help request to ecryptfs mailing list. Will see if we find somebody who can help us with tests. Reviewed both provided suggested patches, they look good to me and do not seem to break any existing functionality. Unfortunately, I did not find any time to provide some (promised) tests as source code, let's continue to wait even longer for any help. Link to my ML post: https://www.spinics.net/lists/ecryptfs/msg01026.html We have now FTBFS in rawhide, see bug #1603860. Lumir, could you enhance my PR with your patches? https://src.fedoraproject.org/rpms/ecryptfs-utils/pull-request/1 I don't know how can I add some commits to your pull request. I think that we just need to apply my patches from here in %prep and test the resulting package. Could you please do that or should I open a new pull request with mentioned changes? Why don't we just drop the python subpackage entirely and call it a day? https://fedoraproject.org/wiki/Changes/Mass_Python_2_Package_Removal Well, as there's obviously nearly zero interest for the python part incl. upstream, I'm +1 for dropping the subpackage. We should still add a comment into the spec file why we dropped. This turns into a bug about to expect no good compatibility with further version of python, so I'll remove RFE and generally adjust the title of this bug. Lumir, thanks anyways for your work. But I guess any downstream patch is the wrong way to go here. In the hope you can agree. When upstream can provide any official compatibility with python3 in future, then we could readd a python subpackage. I agree. Providing working, compatible and tested source code for packages is not our responsibility. Feel free to create a new PR where you remove python subpackage. It might be better to use %bcond to disable them and add some comments so it would be easier to enable it back. If you have some time, please prepare mentioned PR and I'll do a review. Otherwise, I'll do it when I'll have some free cycles. Removal of python2 subpackage is requested in bug #1627433. *** This bug has been marked as a duplicate of bug 1627433 *** |