Commit 745e6ae
committed
msys2-runtime: avoid stripping to allow code-signing again
Third parties commonly code-sign the MSYS2 runtime when ingesting
MinGit, as a way to attest the integrity (_not_ to testify that they
have vetted all the supply chain!).
This is currently broken, failing with:
SignTool Error: SignedCode::Sign returned error: 0x800700C1
%1 is not a valid Win32 application.
SignTool Error: An error occurred while attempting to sign: msys-2.0.dll
The reason is that the MSYS toolchain's version of `strip.exe` somehow
changes the structure of the output files that are incompatible with
`signtool.exe`, as had been identified in ffd1140 (bash: avoid
stripping after code-signing, 2022-05-02).
Therefore, as of 667799c (msys2-runtime: strip it, 2022-12-19), the
`msys-2.0.dll` file (and all of the Cygwin utilities like
`cygwin-console-helper.exe`) can no longer be signed.
So let's revert that change.
However, we _must_ be _very_ careful not to regress on the cause for
that commit: It was triggered by Cygwin's build process all of a sudden
including all the debug information in the `msys-2.0.dll` file, which
makes it roughly 10x larger (and it already weighs ~3MB to begin with).
The saving grace is that we can put `-g0` into the `CFLAGS`/`CXXFLAGS`
variables that are hard-coded in the `PKGBUILD` file. This prevents
debug information from being generated in th first place, hence avoiding
the need to strip the executables.
Signed-off-by: Johannes Schindelin <[email protected]>1 parent 6906441 commit 745e6ae
1 file changed
+6
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
| 7 | + | |
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| |||
237 | 237 | | |
238 | 238 | | |
239 | 239 | | |
240 | | - | |
241 | | - | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
242 | 244 | | |
243 | 245 | | |
244 | 246 | | |
| |||
265 | 267 | | |
266 | 268 | | |
267 | 269 | | |
| 270 | + | |
268 | 271 | | |
269 | 272 | | |
270 | 273 | | |
| |||
0 commit comments