]> git.ipfire.org Git - thirdparty/mkosi.git/commitdiff
Drop filesystem_options() and make xfs default for centos again
authorDaan De Meyer <daan.j.demeyer@gmail.com>
Fri, 21 Jul 2023 12:37:50 +0000 (14:37 +0200)
committerDaan De Meyer <daan.j.demeyer@gmail.com>
Sat, 22 Jul 2023 10:31:18 +0000 (12:31 +0200)
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().

mkosi/__init__.py
mkosi/distributions/__init__.py
mkosi/distributions/centos.py

index 3a6da8f2d3ad68a2bfcdbd17e3448bb1727eab3a..1c76257aa5b4cf85c76f231004c28a9d75ea1840 100644 (file)
@@ -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
index d1f7081cb6964ee0322e0e2a4c4186b0c1cc595a..0348c9b812cebd4188831e7dc82a0a388aa9d9dd 100644 (file)
@@ -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()
index 67063fbd875c8718d05dc3916acf17cf92943de9..a7ecc91dad1fc0e378c86ea0bbf65db529ac5b14 100644 (file)
@@ -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: