Commit 54adff2f authored by Julian Stecklina's avatar Julian Stecklina Committed by Yureka
Browse files

erofs-utils: fix filesystem corruption issues

When packaging a Nix store, erofs hits a bug in version 1.7:

 [36640.475349] erofs: (device loop0): erofs_read_inode: bogus i_mode (0) @ nid 0
 cannot access '.../-tzdata-2023c/share/zoneinfo/Brazil/Acre': Structure needs cleaning

Backport the fix from erofs master.
parent 041cc67d
Loading
Loading
Loading
Loading
+9 −1
Original line number Diff line number Diff line
{ lib, stdenv, fetchurl, autoreconfHook, pkg-config, fuse, util-linux, lz4, zlib
{ lib, stdenv, fetchurl, fetchpatch, autoreconfHook, pkg-config, fuse, util-linux, lz4, zlib
, fuseSupport ? stdenv.isLinux
}:

@@ -13,6 +13,14 @@ stdenv.mkDerivation rec {
    hash = "sha256-tutSm7Qj6y3XecnanCYyhVSItLkeI1U6Mc4j8Rycziw=";
  };

  patches = [
    # Fixes #261394. Can be dropped with the next erofs version.
    (fetchpatch {
      url = "https://github.com/erofs/erofs-utils/commit/8cbc205185a18b9510f4c1fbd54957354f696321.patch";
      hash = "sha256-CQ5hxav5+HGnBVJW66St9FaVgkuqhkv89rjC/4cmXLs=";
    })
  ];

  nativeBuildInputs = [ autoreconfHook pkg-config ];
  buildInputs = [ util-linux lz4 zlib ]
    ++ lib.optionals fuseSupport [ fuse ];