From: Daan De Meyer Date: Fri, 21 Jul 2023 12:37:50 +0000 (+0200) Subject: Drop filesystem_options() and make xfs default for centos again X-Git-Tag: v15~66^2~6 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cc7127ffd8b02bef431acb1dc16b695df97b6a50;p=thirdparty%2Fmkosi.git Drop filesystem_options() and make xfs default for centos again Requires https://github.com/systemd/systemd/pull/26541 but after that building XFS root filesystems will work reliably again and we can use xfs as the default filesystem for centos which removes the need for filesystem_options(). --- diff --git a/mkosi/__init__.py b/mkosi/__init__.py index 3a6da8f2d..1c76257aa 100644 --- a/mkosi/__init__.py +++ b/mkosi/__init__.py @@ -1719,9 +1719,6 @@ def make_image(state: MkosiState, skip: Sequence[str] = [], split: bool = False) cmdline += ["--definitions", definitions] env = dict(TMPDIR=str(state.workspace)) - for fs, options in state.installer.filesystem_options(state).items(): - env[f"SYSTEMD_REPART_MKFS_OPTIONS_{fs.upper()}"] = " ".join(options) - for option, value in state.config.environment.items(): if option.startswith("SYSTEMD_REPART_MKFS_OPTIONS_"): env[option] = value diff --git a/mkosi/distributions/__init__.py b/mkosi/distributions/__init__.py index d1f7081cb..0348c9b81 100644 --- a/mkosi/distributions/__init__.py +++ b/mkosi/distributions/__init__.py @@ -26,10 +26,6 @@ class DistributionInstaller: def filesystem(cls) -> str: raise NotImplementedError() - @classmethod - def filesystem_options(cls, state: "MkosiState") -> dict[str, list[str]]: - return {} - @staticmethod def architecture(arch: Architecture) -> str: raise NotImplementedError() diff --git a/mkosi/distributions/centos.py b/mkosi/distributions/centos.py index 67063fbd8..a7ecc91da 100644 --- a/mkosi/distributions/centos.py +++ b/mkosi/distributions/centos.py @@ -31,38 +31,7 @@ class CentosInstaller(DistributionInstaller): @classmethod def filesystem(cls) -> str: - # This should really be "xfs" but unprivileged population of XFS filesystems with files containing - # spaces in their path is broken and needs fixing in xfsprogs, see - # https://marc.info/?l=linux-xfs&m=167450838316386&w=2. - return "ext4" - - @classmethod - def filesystem_options(cls, state: MkosiState) -> dict[str, list[str]]: - # Hard code the features from /etc/mke2fs.conf from CentOS 8 Stream to ensure that filesystems - # created on distros with newer versions of e2fsprogs are compatible with e2fsprogs from CentOS - # Stream 8. - - return { - "8": { - "ext4": ["-O", ",".join([ - "none", - "sparse_super", - "large_file", - "filetype", - "resize_inode", - "dir_index", - "ext_attr", - "has_journal", - "extent", - "huge_file", - "flex_bg", - "metadata_csum", - "64bit", - "dir_nlink", - "extra_isize" - ])], - }, - }.get(state.config.release, {}) + return "xfs" @classmethod def install(cls, state: MkosiState) -> None: