[linux] The systemd container test runs, and a ./ root entry no longer blocks a release (v0.1.1) #2
Reference in New Issue
Block a user
Delete Branch "feature/linux-it"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The Linux target's container test now runs, with real systemd (Docker Desktop on Mark's PC), and it found a real bug.
The bug:
tar -C dir -czf x.tar.gz ., the usual way to pack a release, writes the root itself as a./directory entry;check_entryrefused it as "a path outside the release", so such a release could never deploy. The root is now an allowed directory entry that names nothing; a file with an empty path is still refused. Tests first:check_entry(./,.for dirs and files) and an unpack of a./-rooted archive.The test tooling:
tests/linux/Containerfileis two-stage (the test-onlydeployexample built inrust:1-slim-trixie, then Debian trixie with systemd as PID 1), built from the repo root as context, so no host folder is mounted (Docker Desktop's Hyper-V backend would need drive sharing).run.shworks with Docker or Podman, from Git Bash too, and removes its container and image.Result with real systemd: 1.0.0 succeeds; 2.0.0 succeeds (previous 1.0.0); 3.0.0 crashes at start: rolled back to 2.0.0, healthy ("demo.service is not active"); 4.0.0 runs but fails its health URL: rolled back to 2.0.0, healthy; 2.0.0 keeps answering.
PASS.Workspace: 59 tests green on Windows; clippy clean. Version 0.1.1.
Self-review: could allowing
./let anything escape? It yields no path components, so the extractor creates the release dir itself (already there) and nothing else;.., absolute paths, links and devices are refused as before.