From: Daan De Meyer Date: Fri, 21 Jul 2023 10:22:21 +0000 (+0200) Subject: Get rid of kernel_command_line() in DistributionInstaller X-Git-Tag: v15~66^2~8 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=66852a3bbedcf6123513762865e722e4c24685b2;p=thirdparty%2Fmkosi.git Get rid of kernel_command_line() in DistributionInstaller Let's just let anyone using CentOS 8 Stream set rw themselves. --- diff --git a/mkosi/__init__.py b/mkosi/__init__.py index 520edd15b..92f6a87a2 100644 --- a/mkosi/__init__.py +++ b/mkosi/__init__.py @@ -917,8 +917,6 @@ def install_unified_kernel(state: MkosiState, roothash: Optional[str]) -> None: else: cmdline = [] - cmdline += state.installer.kernel_command_line(state) - if roothash: cmdline += [roothash] diff --git a/mkosi/distributions/__init__.py b/mkosi/distributions/__init__.py index 51f51b356..a5326e80e 100644 --- a/mkosi/distributions/__init__.py +++ b/mkosi/distributions/__init__.py @@ -35,10 +35,6 @@ class DistributionInstaller: def filesystem_options(cls, state: "MkosiState") -> dict[str, list[str]]: return {} - @staticmethod - def kernel_command_line(state: "MkosiState") -> list[str]: - return [] - @staticmethod def architecture(arch: Architecture) -> str: raise NotImplementedError() diff --git a/mkosi/distributions/centos.py b/mkosi/distributions/centos.py index 0c6533e3d..67063fbd8 100644 --- a/mkosi/distributions/centos.py +++ b/mkosi/distributions/centos.py @@ -64,18 +64,6 @@ class CentosInstaller(DistributionInstaller): }, }.get(state.config.release, {}) - @staticmethod - def kernel_command_line(state: MkosiState) -> list[str]: - kcl = [] - - # systemd-gpt-auto-generator only started applying the GPT partition read-only flag to gpt-auto - # mounts from v240 onwards, while CentOS Stream 8 ships systemd v239, so we have to nudge gpt-auto to - # mount the root partition rw by default. - if int(state.config.release) <= 8: - kcl += ["rw"] - - return kcl + DistributionInstaller.kernel_command_line(state) - @classmethod def install(cls, state: MkosiState) -> None: # Make sure glibc-minimal-langpack is installed instead of glibc-all-langpacks.