Skip to content

fix(forgejo-runner): provide GNU tar with hiPrio over busybox - #895

Closed
natsukium wants to merge 2 commits into
mainfrom
fix/forgejo-runner-gnutar-hiPrio
Closed

fix(forgejo-runner): provide GNU tar with hiPrio over busybox#895
natsukium wants to merge 2 commits into
mainfrom
fix/forgejo-runner-gnutar-hiPrio

Conversation

@natsukium

Copy link
Copy Markdown
Owner

BusyBox tar lacks --posix which Swatinem/rust-cache / actions/cache require to save the cargo cache. The nix runner's hostPackages exposed only busybox's tar, so every cache save failed with:

tar: unrecognized option '--posix'
Failed to save: tar exit code 1

Seen in natsukium/felis#57 logs. The per-runner internal cache (cache.enabled=true on kilimanjaro) never stored anything, so cargo build/clippy/nextest stayed cold.

Add gnutar with hiPrio so GNU tar shadows busybox's tar on PATH. Both provide bin/tar, so priority matters.

  • modules/configuration.org (source) + tangle modules/features/forgejo-runner/default.nix
  • Follow-up in felis will re-enable Swatinem/rust-cache with cmd-format: "nix develop -c {0}" once this hosts fix lands (currently using a GITHUB_PATH workaround with nixpkgs#gnutar).

Test: after deploy to kilimanjaro, tar --version on a nix:host job should report GNU tar 1.35 and Swatinem/rust-cache post should show Cache saved instead of Failed to save.

BusyBox tar lacks `--posix` which `Swatinem/rust-cache` and
`actions/cache` require to save the cargo cache. The nix runner's
hostPackages exposed only busybox's tar, so every cache save failed with
`tar: unrecognized option '--posix'` (seen in felis PR #57 logs,
`Failed to save: tar exit code 1`).

Add `gnutar` with `hiPrio` so GNU tar shadows busybox's tar on PATH.
The internal per-runner cache (forgejo-runner cache.enabled=true) can
then actually store the cargo registry/target and speed up
`cargo build`/`clippy`/`nextest`.

Why hiPrio: both busybox and gnutar provide `bin/tar`; without priority
busybox wins due to list order and the cache action would still see
BusyBox tar.

Assisted-by: Pi Coding Agent:Muse Spark 1.2
@github-actions

This comment has been minimized.

…d order

Previous fix used `hiPrio` from pkgs (deprecated, warning
`hiPrio has been removed from pkgs, use lib.hiPrio`) and placed gnutar
after busybox, so PATH remained `.../busybox/bin:.../gnutar/bin` and
`actions/cache` still saw BusyBox tar (`tar --posix` fails, seen in
felis#57 logs for 3bd9211a where save failed with busybox tar).

HostPackages PATH is built via `lib.makeBinPath` which respects list
order, not just priority. Put `(lib.hiPrio gnutar)` before busybox so
GNU tar is found first. The internal per-runner cache can then actually
save the cargo cache (actions/cache@v4, key over Cargo.lock+flake.lock).

Assisted-by: Pi Coding Agent:Muse Spark 1.2
@natsukium natsukium closed this Sep 3, 2026
@natsukium
natsukium deleted the fix/forgejo-runner-gnutar-hiPrio branch September 3, 2026 16:22
@github-actions

github-actions Bot commented Sep 3, 2026

Copy link
Copy Markdown

Nix Diff

Compare changes

kilimanjaro

Attribute: nixosConfigurations.kilimanjaro.config.system.build.toplevel

Diff Output
<<< /nix/store/37r5mcdm8rys093l55m07db1zjk8bqqq-nixos-system-kilimanjaro-26.11.20260902.090e478.drv
>>> /nix/store/ijqnyjagm6bfbn3nc5y206dnzzzp1lq9-nixos-system-kilimanjaro-26.11.20260902.090e478.drv

PATHS: 19702 -> 19702 (+9, -9)
SIZE: 391 MiB -> 391 MiB
DIFF: +192 bytes

manyara

Attribute: nixosConfigurations.manyara.config.system.build.toplevel

Diff Output
<<< /nix/store/361xfk5zx34n178f7wjnzxbij64m5gx0-nixos-system-manyara-26.11.20260902.090e478.drv
>>> /nix/store/361xfk5zx34n178f7wjnzxbij64m5gx0-nixos-system-manyara-26.11.20260902.090e478.drv

PATHS: 11657 -> 11657 (+0, -0)
SIZE: 329 MiB -> 329 MiB
DIFF: 0 bytes

tarangire

Attribute: nixosConfigurations.tarangire.config.system.build.toplevel

Diff Output
<<< /nix/store/s5ql5zxfp8qqz1mk43pbndp4ad7d94x2-nixos-system-tarangire-26.11.20260902.090e478.drv
>>> /nix/store/s5ql5zxfp8qqz1mk43pbndp4ad7d94x2-nixos-system-tarangire-26.11.20260902.090e478.drv

PATHS: 7073 -> 7073 (+0, -0)
SIZE: 246 MiB -> 246 MiB
DIFF: 0 bytes

serengeti

Attribute: nixosConfigurations.serengeti.config.system.build.toplevel

Diff Output
<<< /nix/store/15xk5ik6g668l3n51s4sv85x504pxidn-nixos-system-serengeti-26.11.20260902.090e478.drv
>>> /nix/store/15xk5ik6g668l3n51s4sv85x504pxidn-nixos-system-serengeti-26.11.20260902.090e478.drv

PATHS: 6659 -> 6659 (+0, -0)
SIZE: 245 MiB -> 245 MiB
DIFF: 0 bytes

arusha

Attribute: nixosConfigurations.arusha.config.system.build.toplevel

Diff Output
<<< /nix/store/iwqgapr18my704gskw5gnsfi0iww59fd-nixos-system-nixos-26.11.20260902.090e478.drv
>>> /nix/store/a8k7nxcv8k7ma19h76p4cma6j3axkf9h-nixos-system-nixos-26.11.20260902.090e478.drv

PATHS: 11635 -> 11635 (+8, -8)
SIZE: 278 MiB -> 278 MiB
DIFF: 0 bytes

katavi

Attribute: darwinConfigurations.katavi.system

Diff Output
<<< /nix/store/g7i4qakjm7zy3c2mmy6x2ywibg7234hi-darwin-system-26.11.4cff07d.drv
>>> /nix/store/zmnqgzmwq70s36smq27rbzp7a3aj4ys5-darwin-system-26.11.4cff07d.drv

PATHS: 10545 -> 10545 (+5, -5)
SIZE: 320 MiB -> 320 MiB
DIFF: 0 bytes

mikumi

Attribute: darwinConfigurations.mikumi.system

Diff Output
<<< /nix/store/4zc7kkvvzwcsqmyv6m58x7ky257xjlqk-darwin-system-26.11.4cff07d.drv
>>> /nix/store/4zc7kkvvzwcsqmyv6m58x7ky257xjlqk-darwin-system-26.11.4cff07d.drv

PATHS: 5643 -> 5643 (+0, -0)
SIZE: 244 MiB -> 244 MiB
DIFF: 0 bytes

work

Attribute: darwinConfigurations.work.system

Diff Output
<<< /nix/store/4i8qaa0bxqvxmql5cd77isr9z2cs7b1x-darwin-system-26.11.4cff07d.drv
>>> /nix/store/zay77v6vsi5ga75k41lqbzxpcv7pbfc6-darwin-system-26.11.4cff07d.drv

PATHS: 15285 -> 15285 (+5, -5)
SIZE: 340 MiB -> 340 MiB
DIFF: 0 bytes

📄 View diff as HTML in the Artifacts section


Generated by nix-diff-action using dix

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.

1 participant