-
Notifications
You must be signed in to change notification settings - Fork 6.1k
8326447: jpackage creates Windows installers that cannot be signed #23732
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
8326447: jpackage creates Windows installers that cannot be signed #23732
Conversation
👋 Welcome back asemenyuk! A progress list of the required criteria for merging this PR into |
@alexeysemenyukoracle This change now passes all automated pre-integration checks. ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details. After integration, the commit message for the final commit will be:
You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed. At the time when this comment was updated there had been 15 new commits pushed to the
As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details. ➡️ To integrate this PR with the above commit message to the |
@alexeysemenyukoracle The following label will be automatically applied to this pull request:
When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing list. If you would like to change these labels, use the /label pull request command. |
Webrevs
|
…oesn't rely on GetLastError() to deliver error information to the caller. GetLastError() is not reliable in managed code.
@sashamatveev PTAL |
How user should figure out what |
Can we add test which will use |
Yes
Do you have a better idea? |
What would be the action if the test fails? Why SignTool? Other tools are: Should we test that the installer exe is signable by specific versions of all these tools? |
Can we sign |
The code has been the same since the first release of jpackage.
Quote from the bug description:
Maybe something is off with the toolchain used to assemble Temurin JDK 21. I used pestudio to inspect the value of the linker's version in PE headers of Open JDK binaries from Oracle. A few releases I inspected have something like "Microsoft Linker 14.36".
Maybe the submitter meant the linker version changed from 14.27 to 14.37? Anyway, they didn't complain about the Oracle variant of OpenJDK. If this is linker version-specific issue SignTool test may pass with Oracle OpenJDK and fail with other variants built with different toolchains. |
Thanks for explanation. It makes sense now and fix is just to provide workaround for such cases. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good.
/integrate |
Going to push as commit 267d69b.
Your commit was automatically rebased without conflicts. |
@alexeysemenyukoracle Pushed as commit 267d69b. 💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored. |
I am seeing this also, after switching from Azul to Temurin (JDK23). It's not just the installer, the application .exe itself cannot be signed either. Something is definitely not correct with Temurin's release. |
@credmond see: adoptium/adoptium-support#1244 |
Agreed, I am just reinforcing that. I also tested with OpenJDK and had no issues. |
Support the use of a custom msi wrapper executable when building an exe installer.
Put
installer.exe
file in the resource directory and jpackage will use it instead of the defaultmsiwrapper.exe
resource for exe installer.To test this feature created a test that builds exe installer with a custom icon. The result installer exe is used as a custom msi wrapper executable in the second jpackage command that builds exe installer with the default icon. The installer exe produced by the second jackage command should have the same icon as the exe installer created in the first jpackage run.
Moved code verifying icons in executables from
LauncherIconVerifier.WinIconVerifier
class intoWinExecutableIconVerifier
class to make it available for tests. Replaced inline powershell script extracting icons from executables with standaloneread-executable-icon.ps1
powershell script. The script usesExtractIcon
instead ofExtractAssociatedIcon
. It extracts icon from the executable's resources and will not fall back to anything if there is no icon resource.Progress
Warning
8326447: jpackage creates Windows installers that cannot be signed
Issue
Reviewers
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/23732/head:pull/23732
$ git checkout pull/23732
Update a local copy of the PR:
$ git checkout pull/23732
$ git pull https://git.openjdk.org/jdk.git pull/23732/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 23732
View PR using the GUI difftool:
$ git pr show -t 23732
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/23732.diff
Using Webrev
Link to Webrev Comment