Skip to content

rsync: fix pkgsStatic itemize test failure - #537498

Merged
r-burns merged 1 commit into
NixOS:masterfrom
lucasew:fix/pkgsStatic-rsync-itemize
Jul 3, 2026
Merged

r-burns merged 1 commit into
NixOS:masterfrom
lucasew:fix/pkgsStatic-rsync-itemize

Conversation

@lucasew

@lucasew lucasew commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Resolves #537437

pkgsStatic.rsync failed in testsuite/itemize.test because configure
defaults rsync_cv_can_hardlink_symlink to no when cross-compiling
(cannot run the probe). On Linux, hardlinking symlinks works, and with
matching attrs --copy-dest / --link-dest still itemize identical
symlinks as cL with blank attribute flags. The test only expects that
output when hardlink_symlinks is true (otherwise it expects cLc.t......).

Set the configure cache variable for Linux cross builds so capability
detection matches the host kernel and the itemize expectations agree.

Assisted-by: Grok (xAI) — investigation, patch, and PR text; human reviews
and submits.

Things done

@lucasew
lucasew force-pushed the fix/pkgsStatic-rsync-itemize branch from 22d2d8d to b6f68f1 Compare July 1, 2026 17:10
nixpkgs-branch-check[bot]

This comment was marked as outdated.

@nixpkgs-ci nixpkgs-ci Bot added 10.rebuild-linux: 501+ This PR causes many rebuilds on Linux and should normally target the staging branches. 10.rebuild-darwin: 501+ This PR causes many rebuilds on Darwin and should normally target the staging branches. 10.rebuild-darwin: 501-1000 This PR causes many rebuilds on Darwin and should normally target the staging branches. 10.rebuild-linux: 2501-5000 This PR causes many rebuilds on Linux and should target the staging branches. 10.rebuild-nixos-tests This PR causes rebuilds for all NixOS tests and should normally target the staging branches. labels Jul 1, 2026
@lucasew
lucasew force-pushed the fix/pkgsStatic-rsync-itemize branch from b6f68f1 to 69f1f4a Compare July 1, 2026 17:27
@lucasew
lucasew changed the base branch from master to staging July 1, 2026 17:27
@nixpkgs-ci nixpkgs-ci Bot closed this Jul 1, 2026
@nixpkgs-ci nixpkgs-ci Bot reopened this Jul 1, 2026
@lucasew
lucasew marked this pull request as ready for review July 1, 2026 17:34
@nixpkgs-branch-check
nixpkgs-branch-check Bot dismissed their stale review July 1, 2026 17:34

Review dismissed automatically

@nixpkgs-ci
nixpkgs-ci Bot requested review from a team and pyrox0 and removed request for a team July 1, 2026 17:35
@lucasew

lucasew commented Jul 1, 2026 •

Copy link
Copy Markdown
Contributor Author

nixpkgs-review

Workflow run (x86_64-linux via lucasew/nixcfg): https://github.com/lucasew/nixcfg/actions/runs/28536382271

Status: failure (infra, not package)

No nixpkgs-review result was produced. The job failed because Magic Nix Cache / GHA cache was rate-limited (HTTP 418 / ResourceExhausted), then substituter http://127.0.0.1:37515 was disabled.

Locally on this change: pkgsStatic.rsync builds and passes itemize (44 tests).

@nixpkgs-ci
nixpkgs-ci Bot requested a review from a team July 1, 2026 17:47
@pyrox0 pyrox0 moved this from Needs Review to Reviewed in Nixpkgs security review Jul 1, 2026

@r-burns r-burns left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great, confirmed this fixes static builds, and doesn't break other cross targets, e.g. pkgsCross.aarch64-multiplatform.

Comment thread pkgs/by-name/rs/rsync/package.nix Outdated
preConfigure =
lib.optionalString (stdenv.hostPlatform.isLinux && stdenv.hostPlatform != stdenv.buildPlatform)
''
export rsync_cv_can_hardlink_symlink=yes

@r-burns r-burns Jul 3, 2026 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you instead provide this as a conditional configureFlag? That'll avoid rebuilds for unaffected platforms. For example:

lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [
# For cross builds, provide answers to the configure time tests.
# These answers are valid on x86_64-linux and aarch64-linux.
# TODO: provide all valid answers for BSD.
"ac_cv_file__dev_zero=yes"

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did that. I think I can go back to master now. Good catch!

@lucasew
lucasew force-pushed the fix/pkgsStatic-rsync-itemize branch from 69f1f4a to 6b0f86f Compare July 3, 2026 17:40
@nixpkgs-ci nixpkgs-ci Bot added 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux. and removed 10.rebuild-linux: 501+ This PR causes many rebuilds on Linux and should normally target the staging branches. 10.rebuild-darwin: 501+ This PR causes many rebuilds on Darwin and should normally target the staging branches. 10.rebuild-darwin: 501-1000 This PR causes many rebuilds on Darwin and should normally target the staging branches. 10.rebuild-linux: 2501-5000 This PR causes many rebuilds on Linux and should target the staging branches. 10.rebuild-nixos-tests This PR causes rebuilds for all NixOS tests and should normally target the staging branches. labels Jul 3, 2026
When cross-compiling (e.g. pkgsStatic), configure cannot run the
link()-hardlinks-symlinks probe and defaults to no. On Linux that
leaves hardlink_symlinks false while --copy-dest/--link-dest still
itemize identical symlinks with blank attribute flags, so
testsuite/itemize.test fails.

Set rsync_cv_can_hardlink_symlink=yes for Linux cross builds.

Resolves: NixOS#537437

Assisted-by: Grok (xAI)
@lucasew
lucasew force-pushed the fix/pkgsStatic-rsync-itemize branch from 6b0f86f to c1f215a Compare July 3, 2026 17:47
@lucasew
lucasew changed the base branch from staging to master July 3, 2026 17:47
@nixpkgs-ci nixpkgs-ci Bot closed this Jul 3, 2026
@nixpkgs-ci nixpkgs-ci Bot reopened this Jul 3, 2026
@lucasew

lucasew commented Jul 3, 2026 •

Copy link
Copy Markdown
Contributor Author

nixpkgs-review

Workflow run (x86_64-linux via lucasew/nixcfg): https://github.com/lucasew/nixcfg/actions/runs/28676777025

Args: -p pkgsStatic.rsync
Base: master @ c1f215aff8fd (rebased off staging after switching to a conditional configureFlags entry so native rsync is unchanged)

Status: failure (workflow / eval — not a demonstrated package regress)

Re-dispatched after removing Magic Nix Cache (prior run: https://github.com/lucasew/nixcfg/actions/runs/28675918254). Same symptom without the cache action.

What the runner did

  • Eval + review-shell finished in seconds; no static toolchain build ran.
  • Report: pkgsStatic.rsync failed; artifact log is 0 bytes.
  • Follow-up error from nixpkgs-review:
    error: build log of '/nix/store/bja6zybyzjln2glllxy59gm3sll71ll0-rsync-static-x86_64-unknown-linux-musl-3.4.4.drv^*' is not available
  • That drv path is the same one that builds cleanly locally, so the attr eval'd to the right derivation; the runner never produced a build log (typical when nix-eval-jobs marks the attr failed/broken under --max-memory-size 4096 / --no-allow-import-from-derivation before nix build).
  • Runner used nixpkgs-review 3.8.0 (nix build); local success used 3.9.0 (nom build).

Uploaded Actions report:

## `nixpkgs-review` result
Command: `nixpkgs-review pr 537498 --package pkgsStatic.rsync`
Commit: `c1f215aff8fd0051618054f2324d3de844514a61`

### `x86_64-linux`
:x: 1 package failed to build:
- pkgsStatic.rsync

Local (x86_64-linux)

nixpkgs-review result

Generated using nixpkgs-review.

Command: nixpkgs-review pr 537498 --package pkgsStatic.rsync
Commit: c1f215aff8fd0051618054f2324d3de844514a61


x86_64-linux

✅ 1 package built:
  • pkgsStatic.rsync

@lucasew

lucasew commented Jul 3, 2026

Copy link
Copy Markdown
Contributor Author

@ofborg build pkgsStatic.rsync

@r-burns r-burns left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

@r-burns
r-burns added this pull request to the merge queue Jul 3, 2026
Merged via the queue into NixOS:master with commit a263060 Jul 3, 2026
45 of 51 checks passed
@lucasew
lucasew deleted the fix/pkgsStatic-rsync-itemize branch July 3, 2026 22:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux.

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

Build failure: pkgsStatic.rsync

2 participants