From 2332245a0d88b6324e8de3f4a92534d774d2d648 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Wed, 29 Apr 2026 12:09:07 +0200 Subject: [PATCH] git: fix flaky t7703 on ZFS by ignoring ls -l 'total' line t7703-repack-geometric tests 11 and 12, added in upstream 6ce9d558ce (first shipped in 2.53.0), assert that a no-op repack leaves the pack directory untouched by comparing full `ls -l` output. The leading `total N` block-count header is not stable on copy-on-write or compressing filesystems such as ZFS, where delayed allocation can change the reported value between two back-to-back invocations even though the files are byte-identical. This makes gitMinimal's installCheck fail nondeterministically on ZFS-backed builders. Apply the upstream-submitted patch that strips that header before comparing. Verified with 20 consecutive runs on ZFS. Fixes #498789. Link: https://lore.kernel.org/git/20260504101429.340123-1-joerg@thalheim.io/ --- pkgs/by-name/gi/git/package.nix | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pkgs/by-name/gi/git/package.nix b/pkgs/by-name/gi/git/package.nix index 847675aa27e6..acca3248cb60 100644 --- a/pkgs/by-name/gi/git/package.nix +++ b/pkgs/by-name/gi/git/package.nix @@ -123,6 +123,14 @@ stdenv.mkDerivation (finalAttrs: { ./git-sh-i18n.patch # Do not search for sendmail in /usr, only in $PATH ./git-send-email-honor-PATH.patch + # The 'total N' header from ls -l is unstable on ZFS and similar + # filesystems, causing spurious failures. + # https://github.com/NixOS/nixpkgs/issues/498789 + (fetchurl { + name = "t7703-ignore-ls-total.patch"; + url = "https://lore.kernel.org/git/20260504101429.340123-1-joerg@thalheim.io/raw"; + hash = "sha256-44EPfEJ39LjPWjqjFb52EKNaJGzYxZzJaJOis8QnazU="; + }) # Address test failure (new in 2.52.0) caused by `git-gui--askyesno` being # installed by `make install`. (fetchurl {