gpgme python bindings release plans?

Ben McGinnes ben at adversary.org
Fri Aug 31 00:06:10 CEST 2018


On Thu, Aug 30, 2018 at 04:33:24PM +0200, Jasper Spaans wrote:
> On 30/08/2018 08:44, Ben McGinnes wrote:
> > I've fixed those conflicts with this commit:
> > 1d00fb987b903e245d484bddfe3c0a0aba670ac1
> >
> > That, however, required changing both of your updates, so you should
> > test it ASAP to see if it still works or whether Ubuntu is going to be
> > a point of pain in future.
> Indeed your fix has broken my build instead.

Really?  Interesting.  Raise a task on dev.gnupg.org with the full
traceback and other relevant errors.  I'll also need the details of
which packages are standard for the distro and which aren't (if
they're listed on the gnupg.org download page, include them here).

> (I don't know what Ubuntu has to do with this; and in case my previous
> message was not clear enough: I did not use any Ubuntu-provided versions
> of libgpg-error or gpgme.

Ah, but what of the rest of the GnuPG stack; like libassuan, libksba,
libgcrypt and GPG itself?

> I wouldn't be surprised if this will cause breakage on Debian as
> well.)

That's easy enough to check, we'll get dkg to try it out before we
release.  He can test it while I nudge things closer to his wishlist
items (Installing for more than two Python releases at the same time).

> Anyway, looking at the binary objects that were generated when building
> from git head (a9863717b1b82b3077edd0db85454ba801eac9bd , one version
> ahead of your commit):
> 
> $ nm
> /usr/local/lib/python3.5/dist-packages/gpg/_gpgme.cpython-35m-x86_64-linux-gnu.so
> | grep gpgme_data_new_from_estream
>                  U gpgme_data_new_from_estream
> 000000000004c350 t _wrap_gpgme_data_new_from_estream
> 
> The U means the symbol is undefined here and needs to be provided by
> another shared library. If that is nonsense, something on the Python
> side should stop referring to it.

Well, originally nothing on the Python side referred to it and the
new_from_stream function is just an alias to new_from_fd because
Python doesn't differentiate betwee streams (or parts thereof) and
files or file type objects.  It's all data and it's all either bytes
or strings.  There's now a new_from_estream function aliased to the
stream one.

You can see much more of this via grepping the output of running
strings on the SWIG integrated binary.

> $ nm /usr/lib/libgpgme.so | grep gpgme_data_new_from_estream
> 000000000000b3a0 t gpgme_data_new_from_estream
> 
> Where the small t indicates that it is a symbol known inside this
> library, but not exported.

Hang on a tic ... you've got libgpgme in /usr/lib, but the
corresponding Python modules in /usr/local/lib

> This is similar to the situation before my (now reverted) patch was
> applied.

It's not entirely reverted, it's just been modified.  The
modifications prevent it trying to rename the dynamically generated
submodule for "_gpgme" (i.e. gpg._gpgme) being renamed to gpg.gpgme at
certain reference points and thus causing a fatal import error for
everyone on other platforms (when large chunks of that are imported
into gpg.core and wrapped at higher level).

> Random thoughts:
> - there are some traces of Jenkins in the ticket system, but is it still
> actively being used? I just tried accessing jenkins.gnupg.org but that
> returns "service not available"? If that Jenkins is being maintained
> though, I wouldn't mind setting up some jobs to test for these kinds of
> regressions.

I don't believe it is still active, Phabricator was supposed to take
the place of all of that, but management of that has been handed over
to (one of the) Bernhards, if I recall correctly.

> - what version of swig are you using?

The latest version; 3.0.12.


Regards,
Ben
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: not available
URL: <https://lists.gnupg.org/pipermail/gnupg-devel/attachments/20180831/d2a9e380/attachment.sig>


More information about the Gnupg-devel mailing list