From: Daan De Meyer Date: Sun, 15 Jan 2023 19:23:48 +0000 (+0100) Subject: Merge pull request #1302 from DaanDeMeyer/repart-format X-Git-Tag: v15~364 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ab2aff830096e681da1950a7d29f277caa89516c;p=thirdparty%2Fmkosi.git Merge pull request #1302 from DaanDeMeyer/repart-format Default to the distro preferred filesystem instead of ext4 --- ab2aff830096e681da1950a7d29f277caa89516c diff --cc .github/workflows/ci.yml index 6870b048c,a853fab72..7f12ff639 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@@ -111,9 -111,10 +111,10 @@@ jobs - debian - ubuntu - fedora - - rocky_epel - - alma_epel + - rocky + - alma - gentoo + - opensuse format: - directory - tar diff --cc mkosi/distributions/__init__.py index aa87b7185,6bf41d99b..3d2e5db36 --- a/mkosi/distributions/__init__.py +++ b/mkosi/distributions/__init__.py @@@ -23,5 -23,9 +23,9 @@@ class DistributionInstaller raise NotImplementedError @classmethod - def remove_packages(cls, state: "MkosiState", remove: List[str]) -> None: + def remove_packages(cls, state: "MkosiState", remove: list[str]) -> None: raise NotImplementedError + + @classmethod + def filesystem(cls) -> str: + raise NotImplementedError diff --cc mkosi/distributions/arch.py index 15e520564,1da7a1a88..866f9d2f5 --- a/mkosi/distributions/arch.py +++ b/mkosi/distributions/arch.py @@@ -18,9 -19,13 +18,13 @@@ from mkosi.mounts import mount_api_vf class ArchInstaller(DistributionInstaller): @classmethod - def cache_path(cls) -> List[str]: + def cache_path(cls) -> list[str]: return ["var/cache/pacman/pkg"] + @classmethod + def filesystem(cls) -> str: + return "ext4" + @classmethod def install(cls, state: "MkosiState") -> None: return install_arch(state) diff --cc mkosi/distributions/centos.py index bb1924811,217ff4782..59031912c --- a/mkosi/distributions/centos.py +++ b/mkosi/distributions/centos.py @@@ -33,9 -19,13 +33,13 @@@ def move_rpm_db(root: Path) -> None class CentosInstaller(DistributionInstaller): @classmethod - def cache_path(cls) -> List[str]: + def cache_path(cls) -> list[str]: return ["var/cache/yum", "var/cache/dnf"] + @classmethod + def filesystem(cls) -> str: + return "xfs" + @classmethod @complete_step("Installing CentOS…") def install(cls, state: "MkosiState") -> None: diff --cc mkosi/distributions/debian.py index 03489523e,fb6cca80a..bcea213b5 --- a/mkosi/distributions/debian.py +++ b/mkosi/distributions/debian.py @@@ -48,9 -49,13 +48,13 @@@ class DebianInstaller(DistributionInsta run(["systemctl", "--root", state.root, "enable", "systemd-resolved"]) @classmethod - def cache_path(cls) -> List[str]: + def cache_path(cls) -> list[str]: return ["var/cache/apt/archives"] + @classmethod + def filesystem(cls) -> str: + return "ext4" + @staticmethod def kernel_image(name: str, architecture: str) -> Path: return Path(f"boot/vmlinuz-{name}") diff --cc mkosi/distributions/fedora.py index f6ac14b09,fca0b0107..32049d14e --- a/mkosi/distributions/fedora.py +++ b/mkosi/distributions/fedora.py @@@ -33,9 -61,13 +33,13 @@@ FEDORA_KEYS_MAP = class FedoraInstaller(DistributionInstaller): @classmethod - def cache_path(cls) -> List[str]: + def cache_path(cls) -> list[str]: return ["var/cache/dnf"] + @classmethod + def filesystem(cls) -> str: + return "btrfs" + @classmethod def install(cls, state: "MkosiState") -> None: return install_fedora(state) diff --cc mkosi/distributions/gentoo.py index b2be5648c,b5c53dd6e..55911c69d --- a/mkosi/distributions/gentoo.py +++ b/mkosi/distributions/gentoo.py @@@ -393,9 -394,13 +393,13 @@@ class Gentoo class GentooInstaller(DistributionInstaller): @classmethod - def cache_path(cls) -> List[str]: + def cache_path(cls) -> list[str]: return ["var/cache/binpkgs", "var/cache/distfiles"] + @classmethod + def filesystem(cls) -> str: + return "ext4" + @staticmethod def kernel_image(name: str, architecture: str) -> Path: _, kimg_path = ARCHITECTURES[architecture] diff --cc mkosi/distributions/mageia.py index 0a3dd383e,019f9ba1b..0449e067e --- a/mkosi/distributions/mageia.py +++ b/mkosi/distributions/mageia.py @@@ -9,9 -10,13 +9,13 @@@ from mkosi.distributions.fedora import class MageiaInstaller(DistributionInstaller): @classmethod - def cache_path(cls) -> List[str]: + def cache_path(cls) -> list[str]: return ["var/cache/dnf"] + @classmethod + def filesystem(cls) -> str: + return "ext4" + @classmethod def install(cls, state: "MkosiState") -> None: return install_mageia(state) diff --cc mkosi/distributions/openmandriva.py index 8e0dfe0c4,b900622be..cfb84370c --- a/mkosi/distributions/openmandriva.py +++ b/mkosi/distributions/openmandriva.py @@@ -9,9 -10,13 +9,13 @@@ from mkosi.distributions.fedora import class OpenmandrivaInstaller(DistributionInstaller): @classmethod - def cache_path(cls) -> List[str]: + def cache_path(cls) -> list[str]: return ["var/cache/dnf"] + @classmethod + def filesystem(cls) -> str: + return "ext4" + @classmethod def install(cls, state: "MkosiState") -> None: return install_openmandriva(state) diff --cc mkosi/distributions/opensuse.py index 3642550a7,2353a1966..65f3620aa --- a/mkosi/distributions/opensuse.py +++ b/mkosi/distributions/opensuse.py @@@ -17,9 -18,13 +17,13 @@@ from mkosi.mounts import mount_api_vf class OpensuseInstaller(DistributionInstaller): @classmethod - def cache_path(cls) -> List[str]: + def cache_path(cls) -> list[str]: return ["var/cache/zypp/packages"] + @classmethod + def filesystem(cls) -> str: + return "btrfs" + @classmethod def install(cls, state: "MkosiState") -> None: return install_opensuse(state)