Repository navigation
Re-sign Mach-O files after relocation fails - #24183
Conversation
- Re-sign saved files even when a later relocation raises. - Cover install and bottle relocation while preserving the error. Fixes #24182
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📒 Files selected for processing (2)
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 8 remain after this review. 📜 Recent review details⏰ Context from checks skipped due to timeout. (18)
🔇 Additional comments (2)
📝 WalkthroughWalkthroughRelocation and fix-up now re-sign patched files in ChangesMach-O signing after patch failures
Priority: ➖ Normal Estimated code review effort: 2 (Simple) | ~10 minutes Change: Bug fix · Severity of issue fixed: Medium Suggested reviewers: Merge Risk: ⚪ Minimal · up to This change re-signs Mach-O files that were already patched even when a later file fails relocation, which prevents invalid signatures and SIGKILL on Apple Silicon. The error still propagates. No actionable merge-blocking risk was found. Security Architecture ReviewSecurity architecture risk: 🔵 Low · up to This is a narrowly scoped recovery improvement with unchanged file ownership controls and signing authority. Remaining uncertainty concerns failure handling: re-signing remains best-effort rather than an atomic repair or rollback. Retained concerns Security review detailsSecurity Blast Radius
Trust Boundaries and Controls
Resilience and Maintainability Implications
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Copilot review overview
🔵 Needs a closer look
Cleanup signing failures must not replace the original relocation exception.
Review effort: Lite
Findings: None
What changed in this PR
Updates macOS Mach-O relocation to re-sign previously saved files when a later relocation fails.
Changes:
- Re-signs patched files during relocation cleanup.
- Adds install and bottle relocation regression tests.
| File | Summary |
|---|---|
Library/Homebrew/extend/os/mac/keg_relocate.rb |
Re-signs modified Mach-O files after relocation failures. Cleanup errors may still mask the original relocation exception. |
Library/Homebrew/test/os/mac/keg_spec.rb |
Adds regression coverage for install and bottle relocation failures. |
💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.
Fixes #24182
brew benchmarkresults.brewcommands to reproduce the bug?brew lgtm(style, typechecking and tests) locally?Codex with GPT 6 Astra at Extra High effort, with local review and testing.
Summary by CodeRabbit