Option --exclude-path from mkfs.erofs requires a path relative to the
source of the image. Otherwise the path won't be excluded resulting in a
slightly larger (~1M) initrd.
Fixes: ebc9e84d ("feat(squash): add module 95squash-erofs")
Signed-off-by: Philipp Rudo <prudo@redhat.com>
local _img="$squashdir/erofs-root.img"
local -a _erofs_args
- _erofs_args+=("--exclude-path=$squashdir")
+ # --exclude-path requires a relative path
+ _erofs_args+=("--exclude-path=${squashdir#"$initdir"/}")
_erofs_args+=("-E" "fragments")
if [[ -n $squash_compress ]]; then