[rfc][icedtea-web] headless dialogues -tech preview

Jiri Vanek jvanek at redhat.com
Wed Jun 17 14:59:27 UTC 2015


On 06/17/2015 04:55 PM, Andrew Azores wrote:
> On 17/06/15 10:47 AM, Jiri Vanek wrote:
>> On 06/17/2015 04:39 PM, Andrew Azores wrote:
>>> On 17/06/15 09:57 AM, Jiri Vanek wrote:
>>>> On 06/17/2015 03:44 PM, Andrew Azores wrote:
>>>>> On 17/06/15 08:47 AM, Jiri Vanek wrote:
>>>>>> On 06/15/2015 06:01 PM, Andrew Azores wrote:
>>>>>>> On 15/06/15 11:53 AM, Jiri Vanek wrote:
>>>>>>>> On 06/15/2015 05:50 PM, Andrew Azores wrote:
>>>>>>>>> On 15/06/15 11:48 AM, Jiri Vanek wrote:
>>>>>>>>>> On 06/15/2015 05:36 PM, Andrew Azores wrote:
>>>>>>>>>>> On 15/06/15 11:21 AM, Jiri Vanek wrote:
>>>>>>>>>>>> On 06/15/2015 04:59 PM, Andrew Azores wrote:
>>>>>>>>>>>>> Hi,
>>>>>>>>>>>>>
>>>>>>>>>>>>> On 14/06/15 02:04 PM, Jiri Vanek wrote:
>>>>>>>>>>>>>> Hi!
>>>>>>>>>> ...
>>>>>>>>>>>> and - most important - headless ITW will not be run by average user :)
>>>>>>>>>>>
>>>>>>>>>>> I really think it's worthwhile to take the "better message" approach rather than directly
>>>>>>>>>>> presenting
>>>>>>>>>>> the user with a stacktrace. If you wish then you can proceed how you are now and I will
>>>>>>>>>>> work on
>>>>>>>>>>> improving this later.
>>>>>>>>>>
>>>>>>>>>> I do not promise I will improve it in some close future.But I currently don't have simple
>>>>>>>>>> solution
>>>>>>>>>> for (definitely best) "help+suggested values, pass/better message"
>>>>>>>>>>
>>>>>>>>>> If you came up with anything, please  do! If I wil comep with anything. I will definitively
>>>>>>>>>> fix!
>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>> Type 'exit' to terminate ITW one f below values:
>>>>>>>>>>> ...
>>>>>>>>>>>>> blocker for this patch.
>>>>>>>>>>>>
>>>>>>>>>>>> This is not bug, its an feature!-)
>>>>>>>>>>>>
>>>>>>>>>>>> You can see how this text is composed? Also do you realize target audience of this patch?
>>>>>>>>>>>> Also
>>>>>>>>>>>> have you seen big comment " //this is default SecurityDialog "toString". All extending
>>>>>>>>>>>> panels are
>>>>>>>>>>>> recommanded to override " ?
>>>>>>>>>>>>
>>>>>>>>>>>> So this method is providing some *good* default text. (in v2 the removal of html tags was
>>>>>>>>>>>> much
>>>>>>>>>>>> improved.
>>>>>>>>>>>
>>>>>>>>>>> Yes, the HTML tag removal does look much better now, although I'd still personally like to
>>>>>>>>>>> see it
>>>>>>>>>>> cleaned up further. Still, this is better now. But I do think that duplicating everything
>>>>>>>>>>> is not
>>>>>>>>>>> very nice. Sure the target audience is not the average end user but "YesYes\nNoNo" is
>>>>>>>>>>> going to
>>>>>>>>>>> give
>>>>>>>>>>> the more advanced user target audience the impression that this feature wasn't really
>>>>>>>>>>> polished
>>>>>>>>>>> before release, no?
>>>>>>>>>>
>>>>>>>>>> Does it need to be? The headless dialogues have to be making working again, or -headless
>>>>>>>>>> have to
>>>>>>>>>> be dropped. As I'm wring below. Feel free to override my stub method below with proper
>>>>>>>>>> texts. I'm
>>>>>>>>>> not going to do so. The changeset is well prepared for making it nicer.
>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> The providing of texts for exactly those messages will be work for another changesets.
>>>>>>>>>>>> MAybe
>>>>>>>>>>>> for
>>>>>>>>>>>> another person...
>>>>>>>>>>>>
>>>>>>>>>>>> Well - the headless dialogues are now completly broken, so *anything* is better then
>>>>>>>>>>>> current
>>>>>>>>>>>> state.
>>>>>>>>>>>
>>>>>>>>>>> True, but if something's worth doing then it's worth doing correctly, right?
>>>>>>>>>>
>>>>>>>>>> Form point of this patch (which adds logic) it is really small nitpick to provide better
>>>>>>>>>> texts.
>>>>>>>>>> Feel free to add them on your own as another changeset...
>>>>>>>>>>
>>>>>>>>>> Or wait if somebody will help with it.
>>>>>>>>>>
>>>>>>>>>> Some of ITW's less used partsare in terrible shape. I need to make tehm work, so they canbe
>>>>>>>>>> maintained without confusions. Once those are done. I will be finally free to quit.
>>>>>>>>>>
>>>>>>>>>> So I do not wont to provide cool headless dialogues. I wont to remove duplicate code, and
>>>>>>>>>> make ti
>>>>>>>>>> work.
>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>> Also, here's another bug for you:
>>>>>>>>>>>>>
>>>>>>>>>>>>>> Type 'exit' to terminate ITW one f below values:
>>>>>>>>>>>>>> [YES, NO]
>>>>>>>>>>>>>> netx: Initialization Error: Could not initialize applet. (Your Extended applets security
>>>>>>>>>>>>>> is at
>>>>>>>>>>>>
>>>>>>>>>>>> yes I'm aware of it. I fixed it in v2. Bad typo on last second before posting :(
>>>>>>>>>>>
>>>>>>>>>>> "Type exit to terminate ITW one of below values" still doesn't quite make sense.
>>>>>>>>>>>
>>>>>>>>>>> "Type exit to terminate ITW, or type one of the below values" would be a fixed-up version
>>>>>>>>>>> of the
>>>>>>>>>>> same message you have now.
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> Type "exit" to terminate ITW, or type one of the below values
>>>>>>>>>>
>>>>>>>>>> Sure! Thanx!
>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>>> 'high' and this application is missing the 'permissions' attribute in manifest. And you
>>>>>>>>>>>>>> have
>>>>>>>>>>>>>> refused to run it.)
>>>>>>>>>>>>>> netx: Initialization Error: Could not initialize applet. (Your Extended applets security
>>>>>>>>>>>>>> is at
>>>>>>>>>>>>>> 'high' and this application is missing the 'permissions' attribute in manifest. And you
>>>>>>>>>>>>>> have
>>>>>>>>>>>>>> refused to run it.)
>>>>>>>>>>>>>> net.sourceforge.jnlp.LaunchException: Fatal: Initialization Error: Could not initialize
>>>>>>>>>>>>>> applet.
>>>>>>>>>>>>>> For more information click "more information button".
>>>>>>>>>>>>>>     at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:764)
>>>>>>>>>>>>>>     at net.sourceforge.jnlp.Launcher.launchApplet(Launcher.java:653)
>>>>>>>>>>>>>>     at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:939)
>>>>>>>>>>>>>> Caused by: net.sourceforge.jnlp.LaunchException: Your Extended applets security is at
>>>>>>>>>>>>>> 'high'
>>>>>>>>>>>>>> and
>>>>>>>>>>>>>> this application is missing the 'permissions' attribute in manifest. And you have
>>>>>>>>>>>>>> refused to
>>>>>>>>>>>>>> run
>>>>>>>>>>>>>> it.
>>>>>>>>>>>>>>     at
>>>>>>>>>>>>>> net.sourceforge.jnlp.runtime.ManifestAttributesChecker.checkPermissionsAttribute(ManifestAttributesChecker.java:279)
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>     at
>>>>>>>>>>>>>> net.sourceforge.jnlp.runtime.ManifestAttributesChecker.checkAll(ManifestAttributesChecker.java:114)
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>     at
>>>>>>>>>>>>>> net.sourceforge.jnlp.runtime.JNLPClassLoader.initializeResources(JNLPClassLoader.java:777)
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>     at net.sourceforge.jnlp.runtime.JNLPClassLoader.<init>(JNLPClassLoader.java:285)
>>>>>>>>>>>>>>     at
>>>>>>>>>>>>>> net.sourceforge.jnlp.runtime.JNLPClassLoader.createInstance(JNLPClassLoader.java:357)
>>>>>>>>>>>>>>     at net.sourceforge.jnlp.runtime.JNLPClassLoader.getInstance(JNLPClassLoader.java:429)
>>>>>>>>>>>>>>     at net.sourceforge.jnlp.runtime.JNLPClassLoader.getInstance(JNLPClassLoader.java:403)
>>>>>>>>>>>>>>     at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:729)
>>>>>>>>>>>>>>     ... 2 more
>>>>>>>>>>>>>
>>>>>>>>>>>>> I typed "Control-D"/EOF character for this. At this point it seems ITW is hanging.
>>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> Atatched v2 again.
>>>>>>>>>>>
>>>>>>>>>>> EOF char for input still hangs it.
>>>>>>>>>>
>>>>>>>>>> When? What? how? How may I reproduce it?
>>>>>>>>>
>>>>>>>>> Wait for the "type one of the below values" prompt and then press Control-D.
>>>>>>>>
>>>>>>>> Oh Yah!
>>>>>>>>
>>>>>>>> Nice catch:) The "if s == null" is missing.
>>>>>>>>
>>>>>>>> Do you agree on  return defaultNEgativeAnswer and unlock?
>>>>>>>
>>>>>>> Sounds about right. To me, Ctrl-D in a "shell" sort of program is synonymous with an exit
>>>>>>> command,
>>>>>>> but using negative answer here sounds fine, too.
>>>>>>>
>>>>>>
>>>>>> So there is version III. It still tech preview, because:
>>>>>>  - it contains  trustAll/none hunkk from JNLPClaslaoder [1]
>>>>>> and
>>>>>>  - contains fix to that ctrl+d you spotted above [0]
>>>>>>
>>>>>> But it should have fixed all the issues (even the "help+suggested values, pass/better message"
>>>>>> and
>>>>>> better default generated message!) you brought up.
>>>>>> I'm really happy that the patch is so small only 200 lines. Rest are small refatroings.
>>>>>> And in addition to v2 it have support for remebering. Both "jsut for record" and "pernament". And
>>>>>> it supports headless keystore password too...
>>>>>>
>>>>>>
>>>>>> [0]  All "Launcher" related hunks
>>>>>> It appeared, that the EFO was handeld properly since beginning,however, for some reason, JnlpBoot
>>>>>> have been calling
>>>>>> -            Launcher launcher = new Launcher(false);
>>>>>> instead of
>>>>>> +            Launcher launcher = new Launcher(true);
>>>>>>
>>>>>> According tojavadochere:
>>>>>>    * @param exitOnFailure Exit if there is an error (usually default, but false when being used
>>>>>> from the plugin)
>>>>>>
>>>>>> After digging in code I have not found an reason why false should be passed to constructor
>>>>>> here...
>>>>>> I changed it, tested and it seems ok.
>>>>>> Also, it also fixed issue, when typying NO was not terminating correctly, but it did not cleared
>>>>>> out, why *clicking* on NO *did* terminatd correctly...
>>>>>>
>>>>>> Strange....
>>>>>>
>>>>>>
>>>>>> [1]
>>>>>> diff -r 8430c4b53e40 netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java
>>>>>> --- a/netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java Tue Jun 16 17:29:17 2015 +0200
>>>>>> +++ b/netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java Wed Jun 17 14:27:31 2015 +0200
>>>>>> @@ -1059,16 +1059,6 @@
>>>>>>       * @throws LaunchException if the user does not approve every dialog prompt.
>>>>>>       */
>>>>>>      private void checkTrustWithUser() throws LaunchException {
>>>>>> -        if (JNLPRuntime.isTrustNone()) {
>>>>>> -            if (!securityDelegate.getRunInSandbox()) {
>>>>>> -                setRunInSandbox();
>>>>>> -            }
>>>>>> -            return;
>>>>>> -        }
>>>>>> -        if (JNLPRuntime.isTrustAll() || securityDelegate.getRunInSandbox()) {
>>>>>> -            return;
>>>>>> -        }
>>>>>> -
>>>>>>          if (getSigningState() == SigningState.FULL && jcv.isFullySigned() &&
>>>>>> !jcv.getAlreadyTrustPublisher()) {
>>>>>>              jcv.checkTrustWithUser(securityDelegate, file);
>>>>>>          }
>>>>>>
>>>>>> Will go in as part of "[rfc][icedtea-web] mov repeated trusAll/none/shouldPromt/isHeadless to one
>>>>>> palce"
>>>>>
>>>>> Was V3 supposed to be attached with this mail?
>>>>>
>>>> crap. yes. done
>>>
>>> Well the patch certainly looks nice, but I can't get it to apply cleanly to HEAD and so I haven't
>>> tested it. Mainly I just want to see what the headless "dialog" prompt looks like and how
>>> interacting with it looks/feels.
>>>
>> You need to applu it on top of the Re: "[rfc][icedtea-web] mov repeated
>> trusAll/none/shouldPromt/isHeadless to one palce "'s movingXtrustsAndSimilarToSharedCode.patch
>
> Thanks -- just tested it and this is *awesome*! My only minor nit left is I would sort of like for
> the YES/NO prompt to be case-insensitive, but that's just a suggestion and I do not insist. +1
> either way.

I was thinking about it. And reason no, is that the DialogResult is not forcing any schema. So some 
future type may have different values for HI and hi... Even now - it accepts full 
AccessWarningDialogReturrnCompelxResult type semantic. Already it can not be case-isnensitive.

So Iwill keep it as it is.

Tahnxx for supprt on this patch.

jsut note - the movingXtrusAl... final version of the misisng hunk is:
      private void checkTrustWithUser() throws LaunchException {
-        if (JNLPRuntime.isTrustNone()) {
-            if (!securityDelegate.getRunInSandbox()) {
-                setRunInSandbox();
-            }
-            return;
-        }
-        if (JNLPRuntime.isTrustAll() || securityDelegate.getRunInSandbox()) {
-            return;
-        }
+        if (securityDelegate.getRunInSandbox()) {
+            return;
+        }
-
          if (getSigningState() == SigningState.FULL && jcv.isFullySigned() && 
!jcv.getAlreadyTrustPublisher()) {
              jcv.checkTrustWithUser(securityDelegate, file);
          }

I will push it asap.

Tehen I wil lpost separetely Luncher(true/fasle) patch as I'm afraid  of it, and then I will push 
this one.

Again, thanx for support. and for looking to tech preview.It was big patch on the begining!


J.

I will push the Laoders
>



More information about the distro-pkg-dev mailing list