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.
This commit is contained in:
Julian Stecklina 2023-10-17 17:15:46 +02:00 committed by Yureka
parent 041cc67d14
commit 54adff2f84

View file

@ -1,4 +1,4 @@
{ 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 ];