Bug#900912: Incident Report 9127367 : Java atk wrapper does not load any more

2018-07-20 Thread Tiago Daitx
On Thu, Jul 19, 2018 at 6:22 PM Samuel Thibault  wrote:
>
> Samuel Thibault, le jeu. 19 juil. 2018 23:13:26 +0200, a ecrit:
> > Samuel Thibault, le jeu. 19 juil. 2018 23:00:04 +0200, a ecrit:
> > > What I think is still missing is "to be loaded by
> > > java.util.ServiceLoader".  How is that supposed to happen?
> > >
> > > To make it work, Fridrich Strba says in
> > > http://mail.openjdk.java.net/pipermail/distro-pkg-dev/2017-November/038927.html
> > > that he is apparently relinking jdk itself to include
> > > java-atk-wrapper.jar as a module. Are we really supposed to be doing
> > > that in Debian?  That's mean a circular dependency between openjdk
> > > and java-atk-wrapper... But otherwise, how are we supposed to make
> > > the jvm know that for that accessibility provider it should load
> > > java-atk-wrapper.jar?
> >
> > Or put another way: how are we supposed to make the
> > module contained in java-atk-wrapper.jar ("provides
> > javax.accessibility.AccessibilityProvider with
> > org.GNOME.Accessibility.AtkProvider;") visible to the JVM?  Is there a
> > directory where it looks for them?
>
> Of course there is the -p option and alike, but the goal is that it just
> works without the user having to specify anything. Or should Debian
> define a module path were the java-atk-wrapper package should put its
> module?  I'd be surprised that openjdk doesn't already define one, just
> like it used to define the ext/ directory for the older mechanism.
>
> Samuel

Hi Samuel,

Thanks for the quick work on this! I have seen the changes in the git
repo [1] and will build the package to see if I can get it to work
with openjdk like it used to with older ext mechanism - for now all
module examples I have seem need to be directly loaded with -p as you
stated.

It is just a guess at this time, but we might need to patch openjdk to
load mods from other locations so debian packages can use that. I
report back after doing some testing.

I'm still working on the openjdk security updates, so might take a
while to get my hands down on this.

Regards,
Tiago

[1] https://salsa.debian.org/a11y-team/java-atk-wrapper/commits/master

-- 
Tiago Stürmer Daitx
Software Engineer
tiago.da...@canonical.com

PGP Key: 4096R/F5B213BE (hkp://keyserver.ubuntu.com)
Fingerprint = 45D0 FE5A 8109 1E91 866E  8CA4 1931 8D5E F5B2 13BE



Bug#900912: Incident Report 9127367 : Java atk wrapper does not load any more

2018-07-19 Thread Samuel Thibault
Samuel Thibault, le jeu. 19 juil. 2018 23:13:26 +0200, a ecrit:
> Samuel Thibault, le jeu. 19 juil. 2018 23:00:04 +0200, a ecrit:
> > What I think is still missing is "to be loaded by
> > java.util.ServiceLoader".  How is that supposed to happen?
> > 
> > To make it work, Fridrich Strba says in
> > http://mail.openjdk.java.net/pipermail/distro-pkg-dev/2017-November/038927.html
> > that he is apparently relinking jdk itself to include
> > java-atk-wrapper.jar as a module. Are we really supposed to be doing
> > that in Debian?  That's mean a circular dependency between openjdk
> > and java-atk-wrapper... But otherwise, how are we supposed to make
> > the jvm know that for that accessibility provider it should load
> > java-atk-wrapper.jar?
> 
> Or put another way: how are we supposed to make the
> module contained in java-atk-wrapper.jar ("provides
> javax.accessibility.AccessibilityProvider with
> org.GNOME.Accessibility.AtkProvider;") visible to the JVM?  Is there a
> directory where it looks for them?

Of course there is the -p option and alike, but the goal is that it just
works without the user having to specify anything. Or should Debian
define a module path were the java-atk-wrapper package should put its
module?  I'd be surprised that openjdk doesn't already define one, just
like it used to define the ext/ directory for the older mechanism.

Samuel



Bug#900912: Incident Report 9127367 : Java atk wrapper does not load any more

2018-07-19 Thread Samuel Thibault
Samuel Thibault, le jeu. 19 juil. 2018 23:00:04 +0200, a ecrit:
> What I think is still missing is "to be loaded by
> java.util.ServiceLoader".  How is that supposed to happen?
> 
> To make it work, Fridrich Strba says in
> http://mail.openjdk.java.net/pipermail/distro-pkg-dev/2017-November/038927.html
> that he is apparently relinking jdk itself to include
> java-atk-wrapper.jar as a module. Are we really supposed to be doing
> that in Debian?  That's mean a circular dependency between openjdk
> and java-atk-wrapper... But otherwise, how are we supposed to make
> the jvm know that for that accessibility provider it should load
> java-atk-wrapper.jar?

Or put another way: how are we supposed to make the
module contained in java-atk-wrapper.jar ("provides
javax.accessibility.AccessibilityProvider with
org.GNOME.Accessibility.AtkProvider;") visible to the JVM?  Is there a
directory where it looks for them?

Samuel



Bug#900912: Incident Report 9127367 : Java atk wrapper does not load any more

2018-07-19 Thread Samuel Thibault
Hello,

Tiago Daitx, le jeu. 19 juil. 2018 16:46:23 -0300, a ecrit:
> The ATK was updated to use the new interface last year by Fridrich
> Strba [1,2], but it seems that upstream never updated it to include
> those patches - the bugs he reported and attached patches remain open.
> 
> Might be worth to check if we can apply these to our packages.
> 
> [1] 
> http://mail.openjdk.java.net/pipermail/distro-pkg-dev/2017-November/038927.html
> [2] http://mail.openjdk.java.net/pipermail/awt-dev/2017-November/013344.html

Oh, thanks! They do apply fine indeed.  I have applied them to my tree.
So, from upstream's mentions:

“
This is a consequence of the JPMS. ATK will need to be reimplemented as a 
Service Provider, to be
loaded by java.util.ServiceLoader. In order to do this it must provide an SPI 
which extends
javax.accessibility.AccessibilityProvider
”

AIUI the SPI part is implemented through 
wrapper/org/GNOME/Accessibility/AtkProvider.java doing

import javax.accessibility.AccessibilityProvider;
public final class AtkProvider extends AccessibilityProvider {
private final String name = "org.GNOME.Accessibility.AtkWrapper";
...
public void activate() {
new AtkWrapper();
}

and the module-info.java part makes it define an atk.wrapper module.


What I think is still missing is "to be loaded by
java.util.ServiceLoader".  How is that supposed to happen?

To make it work, Fridrich Strba says in
http://mail.openjdk.java.net/pipermail/distro-pkg-dev/2017-November/038927.html
that he is apparently relinking jdk itself to include
java-atk-wrapper.jar as a module. Are we really supposed to be doing
that in Debian?  That's mean a circular dependency between openjdk
and java-atk-wrapper... But otherwise, how are we supposed to make
the jvm know that for that accessibility provider it should load
java-atk-wrapper.jar?

Samuel