summaryrefslogtreecommitdiff
path: root/tests/opencode/test-plugin-loading.sh
diff options
context:
space:
mode:
authorJesse Vincent <jesse@fsck.com>2026-07-16 03:32:25 +0000
committerDrew Ritter <drew@ritter.dev>2026-07-19 12:04:46 -0700
commit3fe3cb0530794f0b0b613a4f015e094efd61431d (patch)
treea5f3ab549f2823b7fdf4772ff32865981c5e9b13 /tests/opencode/test-plugin-loading.sh
parentfe0b24390e80a9bbdf0298074fab4a8d79c2553a (diff)
fix(codex): make package script and its test portable beyond macOS/bsdtar
The packaging pipeline only worked on a Mac with default umask, for three stacked reasons: - The deterministic-metadata tar flags (--uid/--gid/--uname/--gname) are bsdtar spellings; GNU tar rejects them, so the tar.gz archive step died on Linux. Detect the tar flavor and use --owner=:0 --group=:0 --numeric-owner on GNU tar, which writes byte-identical ustar headers (uid/gid 0, empty uname/gname). - Staged file modes depended on two umasks canceling out: git archive masks entry modes with tar.umask (git default 0002 -> 775), and the unflagged tar extraction re-masked with the process umask (022 on macOS -> 755, but 002 elsewhere -> 775). Pin tar.umask=0022 on the archive call and extract with -p so staged modes are canonical 755/644 on every machine. - The test's timestamp assertion parsed bsdtar's -tv column layout and expected epoch 0 rendered in a US timezone ("Dec 31 1969"); GNU tar uses different columns and UTC hosts render "1970-01-01". Assert mtime == 0 via python3 tarfile instead, matching how the test already checks zip timestamps. tests/codex/test-package-codex-plugin.sh now passes on Linux/GNU tar; the bsdtar branch preserves the exact flags that passed on macOS.
Diffstat (limited to 'tests/opencode/test-plugin-loading.sh')
0 files changed, 0 insertions, 0 deletions