RFR 8020802: Need an ability to create jar files that are invariant to the pack200 packing/unpacking

Xueming Shen xueming.shen at oracle.com
Tue Oct 22 01:33:59 UTC 2013


On 10/21/13 3:25 PM, Mike Duigou wrote:
> On Oct 19 2013, at 19:04 , Kumar Srinivasan <kumar.x.srinivasan at oracle.com> wrote:
>
>> Hi Martin,
>>
>>> I'm not convinced this feature pulls its weight.
>>> I'd like to see more motivation/documentation for this change.
>>> It seems like this just adds a post-processing phase which packs and
>>> unpacks the jar file (why?)
>> Pack200 tends to change the internal structure and ordering within
>> a class file, which adds a complication, if someone wants to sign these.
>> So a jar file needs to pack and unpacked before signing a jar.
>>
>>> Users who need to do that could just do that in a shell script without
>>> confusing the 99.99% of current jar users.
>> The motivating reason is performance, for those who want to  simply
>> jar up a file and perform the normalization in the same VM and in one
>> step,  I realize this can be achieved with ant or a custom tool, however
>> not all customers are willing to write their own tool or wish to use ant.
> Or maven. (for the added frustration it was a mix of maven and ant).
>
> I've previously fought with the issues involved with this scenario.
>
> We should really be examining the default behaviour of jar and pack200 with the assumption that creation of a signed pack200 jar is a likely end goal.
>
> Having an automated build produced by CI system of signed and PACK200 jars remains an exercise in frustration (and/or manual hacks).
>
>> The average jar users need not use this option,
> Why would they not need it? I think we would be better off assuming that devs might want to sign/pack200 their jars. The standard experience of users doing the naive things with jar and then wondering why it explodes when they add in signing and pack200 is not optimal. Either pack200 or jarsigner might do normalization on the fly if including it in jar by default isn't optimal.

Maybe an alternative is to have a super "jar" command that can 
jar+sign+pack" with one step/click...

-Sherman


>
>> the option is optional
>> and thus  will not affect 99.99% of the users.
>>
>> Kumar
>>>
>>> On Mon, Oct 14, 2013 at 11:44 AM, Alexander Zuev
>>> <alexander.zuev at oracle.com>wrote:
>>>
>>>> Hi,
>>>>
>>>>    please review my fix for
>>>> 8020802: Need an ability to create jar files that are invariant to the
>>>> pack200 packing/unpacking
>>>> The fix adds new option to the jar command which makes created jars
>>>> normalized without the need to invoke the
>>>> external program.
>>>>
>>>> Bug description: https://bugs.openjdk.java.net/**browse/JDK-8020802<https://bugs.openjdk.java.net/browse/JDK-8020802>
>>>> Webrev with proposed fix: http://cr.openjdk.java.net/~**
>>>> kizune/8020802/webrev.01<http://cr.openjdk.java.net/~kizune/8020802/webrev.01>
>>>>
>>>> With best regards,
>>>> /Alex
>>>>




More information about the core-libs-dev mailing list