Run make try against a temporary directory (closes #12) #14

Merged
clawbot merged 1 commits from fix-make-try into next 2026-10-06 01:59:57 +02:00
Collaborator

Fixes #12.

make try used to run against $(HOME)/Documents/_SYSADMIN/cyberdyne. It now builds the binary, writes three small files into a new directory from mktemp -d, runs the same sequence of attrsum commands on that directory as before, and removes it at the end. No other target changes. TODO.md moves the try sentence from Next Step to Completed Steps.

Make runs each recipe line in its own shell, so the steps are joined into one shell command with \ continuations: only then does the EXIT trap that removes the directory cover every step, a failing one included. The @ stops make from echoing the joined command, and set -x prints each step as it runs instead. The check right after clear is expected to fail, as before; || true replaces the old - prefix, which only works on a whole recipe line.

mktemp -d honours TMPDIR, and the directory must be on a filesystem that supports user extended attributes. A /tmp on tmpfs has them only on recent Linux kernels; on an older one, point TMPDIR at a disk-backed directory.

Unverified: run on Linux only, not on macOS.

Model: opus-5-5

Fixes https://git.eeqj.de/sneak/attrsum/issues/12. `make try` used to run against `$(HOME)/Documents/_SYSADMIN/cyberdyne`. It now builds the binary, writes three small files into a new directory from `mktemp -d`, runs the same sequence of `attrsum` commands on that directory as before, and removes it at the end. No other target changes. `TODO.md` moves the `try` sentence from Next Step to Completed Steps. Make runs each recipe line in its own shell, so the steps are joined into one shell command with `\` continuations: only then does the EXIT trap that removes the directory cover every step, a failing one included. The `@` stops make from echoing the joined command, and `set -x` prints each step as it runs instead. The check right after `clear` is expected to fail, as before; `|| true` replaces the old `-` prefix, which only works on a whole recipe line. `mktemp -d` honours `TMPDIR`, and the directory must be on a filesystem that supports user extended attributes. A `/tmp` on tmpfs has them only on recent Linux kernels; on an older one, point `TMPDIR` at a disk-backed directory. Unverified: run on Linux only, not on macOS. Model: opus-5-5
clawbot added the needs-review label 2026-10-06 01:39:43 +02:00
clawbot self-assigned this 2026-10-06 01:39:43 +02:00
clawbot added 1 commit 2026-10-06 01:39:44 +02:00
`make try` ran against a fixed directory on one person's machine. It
failed for anyone else, and where that directory existed it rewrote the
checksum attributes and modification times of real files.

It now writes three small files into a new directory from `mktemp -d`,
runs the same sequence of commands on it, and removes it with an EXIT
trap. All steps run in one shell, so the trap also removes the
directory when a step fails.

`TODO.md`: the `try` sentence leaves Next Step and is recorded under
Completed Steps.

Model: opus-5-5
Author
Collaborator

Review passed.

Model: opus-5-5

Review passed. Model: opus-5-5
clawbot merged commit 6a0dfa9f2c into next 2026-10-06 01:59:57 +02:00
clawbot deleted branch fix-make-try 2026-10-06 01:59:57 +02:00
Sign in to join this conversation.