--- id: "bug-1617" status: "fixed" status_updated: "2026-09-24" status_note: "" component: "build" severity: "unknown" timestamp: "2026-08-21T00:00:00Z" last_seen: "2026-09-19T09:00:00Z" occurrences: 1 files: ["src/tools/test-dirty-fingerprint-nix-production-path.sh"] tags: ["mktemp", "busybox", "coreutils", "portability", "dirty-content-fingerprint", "task-6.3", "src/tools"] related: [] legacy: true --- # bug-1617: mktemp: Invalid argument ## Description mktemp: Invalid argument ## Environment _Not recorded (migrated from buglog.json)._ ## Reproduction _Not recorded (migrated from buglog.json)._ ## Root cause Used a GNU-coreutils-only mktemp template shape (`.../name.XXXXXX.log`, trailing literal suffix after the X run) assuming GNU mktemp's rule that XXXXXX only needs to be present, with a literal suffix like `--suffix` allowed after it in some historical GNU versions. This sandbox's `mktemp` is BusyBox's implementation, which requires the template to literally END with XXXXXX (no trailing suffix at all, and no `--suffix` flag support either) -- confirmed via `mktemp --help` showing BusyBox v1.36.1's usage text. ## Fix Dropped the `.log` suffix from the template entirely (`.../xce-dirty-fp-nix-build-A.XXXXXX` with nothing after the X run) rather than reaching for `--suffix` (also BusyBox-unsupported). The isolated worktree's own top-level mktemp template (no suffix) already worked correctly and was the right pattern to copy for the two new build-log mktemp calls. ## Verification _Not recorded (migrated from buglog.json)._ ## References _Not recorded (migrated from buglog.json)._