-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
fix: Sign the vendor directory instead of using Squirrel.Windows' signing method. #8855
Conversation
🦋 Changeset detectedLatest commit: d2e39c9 The changes in this PR will be included in the next version bump. This PR includes changesets to release 8 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
vendor
directory instead of using Squirrel.Windows' signing method.
vendor
directory instead of using Squirrel.Windows' signing method.
Signing these could incur fees given signatures using CloudHSMs cost money per signature, we should not be required to sign anything using the paid signing method unless it is being shipped to an end-users device. 7z.dll etc as found in the target vendor directory do not end up in the distributable Electron application so should not require to be signed. Pre e-b 26 we only saw 3 signatures related to Squirrel + 1 for the unpacked executable + 1 for the msi package we also ship: https://github.com/element-hq/element-desktop/actions/runs/12769577601/job/35592616472 After this patch, this goes up to 25 total, increasing cost per build by 5x https://github.com/element-hq/element-desktop/actions/runs/13290932109/job/37111358677?pr=2132 |
Preliminary tests with latest commits look good: https://github.com/element-hq/element-desktop/actions/runs/13304132452/job/37151217411?pr=2132
|
@mmaietta @t3chguy It will probably take a long time for the upstream(electron/windows-installer#548) to support |
@beyondkmp that sounds sane, I will give the latest commits a test tomorrow when I'm back on the clock. Thanks for your work here. |
@t3chguy Please help test on both the x64 and arm64 platforms. |
Sure, I will also test ia32 given that was broken with a 7z exe copy which I expect to be fixed with your arch fixes in the area. |
packages/electron-builder-squirrel-windows/src/SquirrelWindowsTarget.ts
Outdated
Show resolved
Hide resolved
packages/electron-builder-squirrel-windows/src/SquirrelWindowsTarget.ts
Outdated
Show resolved
Hide resolved
packages/electron-builder-squirrel-windows/src/SquirrelWindowsTarget.ts
Outdated
Show resolved
Hide resolved
ARM64 build failed with
https://github.com/element-hq/element-desktop/actions/runs/13367208845/job/37327553832?pr=2132 IA32 fails with an error we've seen before:
https://github.com/element-hq/element-desktop/actions/runs/13367489308/job/37328442704?pr=2132 Looks like the issue is https://github.com/electron/windows-installer/tree/main/vendor lacks ia32 executables - electron/windows-installer#386 x64 still appears to work |
@t3chguy Thank you for helping with the testing. I have fixed the issues with |
@beyondkmp can confirm Good job |
@t3chguy Great. The build seems to have succeeded, but I don't have machines with |
I have a local arm64 Windows VM I could test with but that would need to wait a day or two unfortunately. No access to ia32 at this time. |
For However, for |
@beyondkmp sorry I misunderstood, thought you wanted the CI running on arm64-native. I can run Element arm64 from the CI build job just fine: Screen.Recording.2025-02-17.at.16.07.17.mov |
Thanks for confirming @t3chguy ! PR approved. |
fix #8854
Root cause
From electron/windows-installer#548 and electron/windows-sign#12 (comment) the windows-installer does not support the
hookFunction
for signing, which can lead to signing failures.How to fix
We can first sign
Squirrel.exe
andStubExecutable.exe
in thevendor
directory. Then, when Squirrel.Windows uses these files, they are already signed, so there's no need for Squirrel.Windows to sign them again. This approach is the same as the earlier method that didn't use thewindows-installer
library.