Skip to content

Fix Debian normalization test on macOS - #1439

Merged
AnthonyRonning merged 1 commit into
masterfrom
codex-deb1438-maple
Nov 4, 2026
Merged

AnthonyRonning merged 1 commit into
masterfrom
codex-deb1438-maple

Conversation

@AnthonyRonning

@AnthonyRonning AnthonyRonning commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #1438.

Problem

test_deb_normalization_refreshes_checksums_and_verifier_rejects_tampering, added in #1426, fails on macOS. ar in the .#ci shell is llvm-ar, whose default BSD format pads members with bytes that survive ar x. GNU tar then treats gzip's trailing garbage warning as fatal, so a Mac commit running the repo hook component stops here unless it is excluded with MAPLE_HOOK_ONLY.

The failure is not from the nixpkgs bump in #1431: it reproduces just before it at 39117268 (LLVM 21.1.7, gzip 1.14). The ar x and tar -xzf steps long predate #1426, which is only the first thing to run them on a Mac. Debian packages are built on Linux, so shipped packages are not affected.

Change

When ar reports LLVM, this one test puts a wrapper on its temporary PATH that adds --format=gnu. A Debian package is a GNU archive, and in this format members round-trip byte-identically. It is test-only: no changes to _common.sh, the flake or the Linux path, and no new dependency. GNU binutils on PATH was avoided because a GNU ar in the shell could affect Mac native builds.

Validation

On aarch64-darwin:

  • just lane repo passes.
  • The repo pre-commit component passes in a real commit, without MAPLE_HOOK_ONLY (542 tests, 2 skipped).
  • The test file also passes with real GNU binutils ar first on PATH, where the wrapper stays off.
  • The test still catches regressions: it fails when normalize_deb_package stops refreshing md5sums, and when the verifier's md5 check is removed. These ran in a throwaway partial copy; the target test passes there unmutated.

Not run locally: Linux. The hosted repo lane covers it.

🤖 Generated with Claude Code


Autofix with [code]smith
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

The test added in #1426 runs normalize_deb_package with the shell's ar. On
Darwin that is llvm-ar, whose default BSD format pads members. The padding
survives extraction, and GNU tar treats gzip's trailing garbage warning as
fatal, so any Mac commit running the repo hook component stopped here.

Have this test write GNU archives, which is what a Debian package is, when
ar is llvm-ar. Packaging scripts and GNU ar runs are unchanged.

Fixes #1438

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@AnthonyRonning
AnthonyRonning merged commit 71ff24c into master Nov 4, 2026
21 checks passed
@AnthonyRonning
AnthonyRonning deleted the codex-deb1438-maple branch November 4, 2026 09:04
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.

Deb normalization test fails on macOS because ar pads extracted members

1 participant