[rfc][icedtea-web]detecting jre in rust lunchers

Jiri Vanek jvanek at redhat.com
Fri Apr 13 15:04:21 UTC 2018


Here is the patch adapted to our cargo. It bloated a lot, as I used cargo to fully test it
(according to 
https://users.rust-lang.org/t/tutorial-how-to-collect-test-coverages-for-rust-project/650 we have 
99% now :)  Will add coverage report as separate target in future)

Patch contains one hunk of unrelated formating chnages. I will push it as separate chnageset.

Otherwise the patch is nearly same as before. Jsut more modular and tested. Andhopefuly aligned to 
all agreed conventions.

Again, sory for its size. The real program code is not smallest, but is the smallest I managed to do 
as complete.
I hope other features for luncher will be a bit smaller.

On 02/13/2018 11:03 AM, Jiri Vanek wrote:
> Reformatted by rustfmt.
> j.
> On 02/12/2018 02:20 PM, Jiri Vanek wrote:
>> As agreed somewhen around October, this patch is enhancing new rust binaries to detect jre:
>> Fallbacking as follow:
>>   - from properties (user; legacy user; global; legacy global)
>>   - from java home
>>   - from registry(win only)
>>   - hardcoded (linux/cygwinonly)
>> I abandoned original regexes, as to use dependencies without cargo (as agreed with Alex)  is 
>> "human-impossible". If we eve rturn to deps, Cargo will take it nice place here. Tat will evolve 
>> from windows part of implementation. If we move to cargo, Iwill change the proeprty split from 
>> swtch to regex.
>> The linux x windows specific backends are not distinguished here - although many can be currently 
>> reused - Also that will evolve.
>> 2018-02-12  Jiri Vanek <jvanek at redhat.com>
>>      * Makefile.am: building jvm_from_properties and os_access. Using them to build launchers.
>>      * rust-launcher/jvm_from_properties.rs: new file. library to find various ITW properties 
>> files and check, parse proeprties form it, and find jre one if possible
>>      * rust-launcher/os_access.rs:  new file. trait for current os-depndent parts.  Contains 
>> current linux implementation
>>      * rust-launcher/launchers.rs: now tries to locate the find jre as originally done in sh/bat 
>> lunchers - from properties (user; legacy user; global; legacy global), from JAVA_HOME, from 
>> registry(win/cygwin only), hardcoded (linux/cygwinonly)

Jiri Vanek
Senior QE engineer, OpenJDK QE lead, Mgr.
Red Hat Czech
jvanek at redhat.com    M: +420775390109
-------------- next part --------------
A non-text attachment was scrubbed...
Name: coverage.tar.xz
Type: application/x-xz
Size: 99860 bytes
Desc: not available
URL: <http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20180413/f34bf411/coverage.tar-0001.xz>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cargizedJdkFRecognition1.patch
Type: text/x-patch
Size: 32291 bytes
Desc: not available
URL: <http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20180413/f34bf411/cargizedJdkFRecognition1-0001.patch>

More information about the distro-pkg-dev mailing list