[External] : Re: RFR: 8350594: Misleading warning about install dir for DMG packaging

Alexey Semenyuk alexey.semenyuk at oracle.com
Tue Mar 4 15:45:36 UTC 2025



On 3/3/2025 9:58 PM, Michael Hall wrote:
>
>
>> On Mar 3, 2025, at 1:51 PM, Michael Hall <mik3hall at gmail.com> wrote:
>>
>>
>>
>>> On Mar 3, 2025, at 1:37 PM, Alexey Semenyuk 
>>> <alexey.semenyuk at oracle.com> wrote:
>>>
>>> Hi Michael,
>>>
>>> Thank you for the detailed report! I filed [1] ticket that, I hope, 
>>> captures all findings from your report. Let me know if anything was 
>>> missed or misunderstood.
>>>
>>> [1] https://bugs.openjdk.org/browse/JDK-8351073
>>>
>>> - Alexey
>>>
>>
>> Hello Alexey,
>>
>>>  jpackage should copy them as-is.
>>
>> It would be nice if this was the case but I think you need to be sure 
>> changes are made to the Info.plist to ensure the correct version is 
>> indicated in a few places.
>>
>> Apple offers something like plist buddy that could maybe be used.
>>
>
> Fwiw,
>
> (base) mjh at MacBook-Pro-2 ~ % grep -C 1 CFBundleGetInfoString Info.plist
> <string>libjli.dylib</string>
> <key>CFBundleGetInfoString</key>
> <string>Java SE 23.0.1+11-39</string>
> (base) mjh at MacBook-Pro-2 ~ % /usr/libexec/PlistBuddy -c 
> 'set:CFBundleGetInfoString Java SE 25' Info.plist
> (base) mjh at MacBook-Pro-2 ~ % /usr/libexec/PlistBuddy -c 'save' Info.plist
> Saving...
> (base) mjh at MacBook-Pro-2 ~ % grep -C 1 CFBundleGetInfoString Info.plist
> <string>libjli.dylib</string>
> <key>CFBundleGetInfoString</key>
> <string>Java SE 25</string>
Good point about `CFBundleGetInfoString`. Maybe jpackage should set this 
field with the value of `--description` option. Another finding!

As for editing "Info.plist" from the runtime source, if the directory 
referenced from `--runtime-image` option is a valid bundle, i.e. has 
"Contents/MacOS/libjli.dylib", "Contents/Info.plist" files, and 
"Contents/_CodeSignature" elements, and there are no other options, like 
`--app-version`, jpackage should use the supplied directory as-is 
without editing the existing "Info.plist" file. Otherwise, jpackage 
should create "Info.plist" and make sure the values are consistent, of 
course.

- Alexey
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/core-libs-dev/attachments/20250304/5d428bd2/attachment.htm>


More information about the core-libs-dev mailing list