FS#55931 - [cryptsetup] Request: use --enable-python --with-python_version=3.6
Attached to Project:
Arch Linux
Opened by brent saner (sanerb) - Monday, 09 October 2017, 12:31 GMT
Last edited by Toolybird (Toolybird) - Sunday, 11 June 2023, 00:44 GMT
Opened by brent saner (sanerb) - Monday, 09 October 2017, 12:31 GMT
Last edited by Toolybird (Toolybird) - Sunday, 11 June 2023, 00:44 GMT
|
Details
Description:
Sorry, Christian; another one for ya. (i hope i don't seem ungrateful; you're a busy guy and you do good work.) Cryptsetup also offers python bindings. unfortunately we can't build bindings for both (like we can with the proposed fix for #55930) in one go but i'd imagine if we had to choose, 3.6 would be the ideal. (otherwise i suppose you could copy the source tree and build twice, but that seems silly since python 2 EOLs in 3 years anyways). tested, patch attached. Additional info: More configure line links for reference: * python enable section: ** https://gitlab.com/cryptsetup/cryptsetup/blob/master/configure.ac#L464 * python version specification: ** https://gitlab.com/cryptsetup/cryptsetup/blob/master/configure.ac#L469 Steps to reproduce: N/A patch confirmed working: >>> import pycryptsetup >>> pycryptsetup.C pycryptsetup.CRYPT_ACTIVE pycryptsetup.CRYPT_DEBUG_ALL pycryptsetup.CRYPT_INACTIVE pycryptsetup.CRYPT_LOG_DEBUG pycryptsetup.CRYPT_LOG_NORMAL pycryptsetup.CryptSetup( pycryptsetup.CRYPT_BUSY pycryptsetup.CRYPT_DEBUG_NONE pycryptsetup.CRYPT_INVALID pycryptsetup.CRYPT_LOG_ERROR pycryptsetup.CRYPT_LOG_VERBOSE |
This task depends upon
Closed by Toolybird (Toolybird)
Sunday, 11 June 2023, 00:44 GMT
Reason for closing: Won't implement
Additional comments about closing: python bindings were removed by upstream. See comments
Sunday, 11 June 2023, 00:44 GMT
Reason for closing: Won't implement
Additional comments about closing: python bindings were removed by upstream. See comments
but as for cryptsetup, i'm not so sure; all I could find related to DBUS cryptsetup implementation was via udisks:
http://storaged.org/doc/udisks2-api/latest/gdbus-org.freedesktop.UDisks2.Encrypted.html
http://storaged.org/doc/udisks2-api/2.6.5/gdbus-org.freedesktop.UDisks2.Block.html
i'm not seeing anything in the actual DBUS API, though?
pycryptsetup (the bindings provided by --enable-python) however seem to be geared specifically towards some key functionality:
>>> dir(pycryptsetup.CryptSetup)
['__class__', '__delattr__', '__dir__', '__doc__', '__eq__', '__format__', '__ge__', '__getattribute__', '__gt__', '__hash__', '__init__', '__init_subclass__', '__le__', '__lt__', '__ne__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__sizeof__', '__str__', '__subclasshook__', 'activate', 'addKeyByPassphrase', 'addKeyByVolumeKey', 'askyes', 'cmdLineLogCB', 'deactivate', 'debugLevel', 'info', 'isLuks', 'iterationTime', 'killSlot', 'log', 'luksFormat', 'luksUUID', 'passwordDialogCB', 'removePassphrase', 'resume', 'status', 'suspend', 'yesDialogCB']
for instance, i'm not readily seeing any DBUS/udisks equivalent for "killSlot", "resume"/"suspend", etc.
From release notes:
> * The Python bindings are no longer supported and the code was removed
> from cryptsetup distribution. Please use the libblockdev project
> that already covers most of the libcryptsetup functionality
> including LUKS2.