Skip to content

release.yml: re-seal nested bundles before signing outer .app - #7

Merged
dayglojesus merged 1 commit into
mainfrom
sign-nested-bundles
May 24, 2026
Merged

release.yml: re-seal nested bundles before signing outer .app#7
dayglojesus merged 1 commit into
mainfrom
sign-nested-bundles

Conversation

@dayglojesus

Copy link
Copy Markdown
Collaborator

Summary

Fixes the codesign verify failure in run 26369885190:

TextMate.app: a sealed resource is missing or invalid
file modified: …/PlugIns/Dialog.tmplugin/Contents/Resources/tm_dialog
In subcomponent: …/PlugIns/Dialog.tmplugin

The "Re-sign every embedded Mach-O" step finds tm_dialog via the */PlugIns/* glob and codesigns it. That invalidates Dialog.tmplugin's CodeResources seal — .tmplugin is itself a signed bundle. The next step re-signs the outer .app but never re-seals the intermediate .tmplugin, so verify catches the broken seal.

Codesigning needs inside-out ordering: leaf Mach-O → nested bundles → outer .app. Adds a new step between the Mach-O re-sign and the outer-.app re-sign that codesigns every .tmplugin, .framework, .qlgenerator, and .appex directory under Contents/. Currently three: Dialog.tmplugin, Dialog2.tmplugin, TextMateQL.qlgenerator.

Test plan

  • build-test passes on this PR
  • After merge, re-trigger the release via workflow_dispatch on release.yml (since CHANGELOG.md is already on main and won't push-trigger again)
  • Verify codesign step passes
  • Notarization completes, gh release create publishes the asset

Run 26369885190 failed at the Verify codesign + hardened runtime step:

  TextMate.app: a sealed resource is missing or invalid
  file modified: …/PlugIns/Dialog.tmplugin/Contents/Resources/tm_dialog
  In subcomponent: …/PlugIns/Dialog.tmplugin

The Re-sign every embedded Mach-O step finds tm_dialog (and other
nested binaries) via the */PlugIns/* path glob and codesigns each one.
That invalidates the CodeResources seal of the enclosing .tmplugin —
.tmplugin is itself a signed bundle, not just a directory. The next
step re-signs the outer .app but never re-seals the intermediate
bundles, so verify catches the broken seal.

Codesigning requires inside-out ordering: leaf Mach-O → nested
bundles → outer .app. Adding a new step between Mach-O re-sign and
the outer-.app re-sign that re-codesigns every .tmplugin, .framework,
.qlgenerator, and .appex bundle in the tree (currently three:
Dialog.tmplugin, Dialog2.tmplugin, TextMateQL.qlgenerator).
@dayglojesus
dayglojesus merged commit ee1d41b into main May 24, 2026
1 check passed
@dayglojesus
dayglojesus deleted the sign-nested-bundles branch May 24, 2026 19:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant