gpgme "Locate engine names only at runtime and prefer GnuPG-2" commit break Android

Hans-Christoph Steiner hans at guardianproject.info
Thu Feb 20 16:30:47 CET 2014



On 02/20/2014 07:44 AM, Werner Koch wrote:
> On Thu, 20 Feb 2014 02:57, hans at guardianproject.info said:
> 
>> Using env vars is not a feasible solution on Android.  The hard-coded option
>> that existed worked well.
> 
> The envvar is just PATH if it is missing the standard directories are
> searched:
> 
>   orig_path = getenv ("PATH");
>   if (!orig_path)
>     orig_path = "/bin:/usr/bin:.";
> 
> Do we need to add other directories as default for Android?

In this situation, PATH won't do anything useful by default on Android.
Android is not UNIX, apps do not install things into the PATH.  Also, apps are
not supposed to change env vars, that's inherited from Java, which only has
getenv(), no setenv().

A hard-coded path to each thing that gpgme calls is the best approach that I
can think of for Android.  While technically possible to change the PATH, we
have wasted sooooo many hours with kludges like that.  Its not the right
approach for Android.

I've been thinking about all of the massive difficulties we have had porting
GnuPG to Android.  I think really the best approach on Android/Java would be
to either implement gpgme in Java, or even better, implement a library that
talks directly to gpg-agent via assuan like the gpg command line do.  There
are far too many layers in the current approach.  It not only makes the
Java/Android API stilted and weird, but makes things very difficult to debug.

.hc

-- 
PGP fingerprint: 5E61 C878 0F86 295C E17D  8677 9F0F E587 374B BE81



More information about the Gnupg-devel mailing list