From: Malte Poll <1780588+malt3@users.noreply.github.com> Date: Mon, 11 Dec 2023 10:40:18 +0000 (+0100) Subject: make_cpio: sort files used as cpio input X-Git-Tag: v20~76 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5629e6b88ef4bfc8d372682350bfcdf0963f75d3;p=thirdparty%2Fmkosi.git make_cpio: sort files used as cpio input Pathlib's glob functions return files in the order used by the filesystem. This may differ between implementations and configuration (file system, locale). For better reproducibility, the file list should be sorted. --- diff --git a/mkosi/archive.py b/mkosi/archive.py index a08e9092d..d6f3772ec 100644 --- a/mkosi/archive.py +++ b/mkosi/archive.py @@ -89,6 +89,7 @@ def extract_tar(src: Path, dst: Path, log: bool = True) -> None: def make_cpio(src: Path, dst: Path, files: Optional[Iterable[Path]] = None) -> None: if not files: files = src.rglob("*") + files = sorted(files) log_step(f"Creating cpio archive {dst}…") bwrap(