-
Notifications
You must be signed in to change notification settings - Fork 5.7k
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
base: master
Are you sure you want to change the base?
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 |
❗ This change is not yet ready to be integrated. |
@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. |
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
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