]> git.ipfire.org Git - thirdparty/mkosi.git/commitdiff
ubuntu: Switch default release to noble
authorDaan De Meyer <daan.j.demeyer@gmail.com>
Sun, 18 Feb 2024 21:11:38 +0000 (22:11 +0100)
committerDaan De Meyer <daan.j.demeyer@gmail.com>
Mon, 19 Feb 2024 14:39:47 +0000 (15:39 +0100)
lunar is EOL. Mantic is broken because systemd-gpt-auto-generator
is missing. We can either change the default back to Jammy or move
forward to Noble. Let's go for the second option as Noble will
release in about two months.

.github/workflows/ci.yml
mkosi.conf.d/20-ubuntu/mkosi.conf
mkosi/distributions/debian.py
mkosi/distributions/ubuntu.py
tests/__init__.py
tests/test_initrd.py

index 379c491fe9ce08c4fc1f87ce3a5c0e9f5bb6233c..846c1fa8af148fc938ef2d98c093ed839ee10eae 100644 (file)
@@ -105,7 +105,8 @@ jobs:
           - debian
           - fedora
           - opensuse
-          # TODO: Add Ubuntu and CentOS once they have systemd v254 or newer.
+          - ubuntu
+          # TODO: Add CentOS once they have systemd v254 or newer.
         exclude:
           # pacman and archlinux-keyring are not packaged in OpenSUSE.
           - distro: arch
index 83933dab39a98be611ffdf497ef672af53859600..196ddce9519dfccb8fa13727f471bb6392c8ea4c 100644 (file)
@@ -4,7 +4,7 @@
 Distribution=ubuntu
 
 [Distribution]
-@Release=lunar
+@Release=noble
 Repositories=universe
 
 [Content]
index db477c615f7f813be99f4b4012b9fec4e8814961..e67d4ab5f2b812feb7f57eb2e43c42317143b84d 100644 (file)
@@ -212,6 +212,11 @@ class Installer(DistributionInstaller):
             if not vmlinuz.exists():
                 shutil.copy2(d, vmlinuz)
 
+        # systemd-gpt-auto-generator is disabled by default in Ubuntu:
+        # https://git.launchpad.net/ubuntu/+source/systemd/tree/debian/systemd.links?h=ubuntu/noble-proposed.
+        # Let's make sure it is enabled by default in our images.
+        (context.root / "etc/systemd/system-generators/systemd-gpt-auto-generator").unlink(missing_ok=True)
+
 
     @classmethod
     def remove_packages(cls, context: Context, packages: Sequence[str]) -> None:
index 58651e48aa0fe7b872e777721941f01c6fbea524..7b07f2153f5ad87a51485f04f230e88e088c505f 100644 (file)
@@ -16,7 +16,7 @@ class Installer(debian.Installer):
 
     @classmethod
     def default_release(cls) -> str:
-        return "lunar"
+        return "noble"
 
     @staticmethod
     @listify
index b2e453b354ff6ca844a4919a06bb89dd0521c6fb..ffe28d5c62a06abdb771c9cbce93afb263e96612 100644 (file)
@@ -117,10 +117,7 @@ class Image:
             check=False,
         )
 
-        if self.config.distribution == Distribution.ubuntu or self.config.distribution.is_centos_variant():
-            rc = 0
-        else:
-            rc = 123
+        rc = 0 if self.config.distribution.is_centos_variant() else 123
 
         if result.returncode != rc:
             raise subprocess.CalledProcessError(result.returncode, result.args, result.stdout, result.stderr)
index 1ba6536b562aeccb3b458a1e6ed0d98ae03fd87d..916c94a0d4476b2d3213ddcc28b6dce5e4534af1 100644 (file)
@@ -142,8 +142,8 @@ def test_initrd_luks(initrd: Image, passphrase: Path) -> None:
                 Format=vfat
                 CopyFiles=/boot:/
                 CopyFiles=/efi:/
-                SizeMinBytes=512M
-                SizeMaxBytes=512M
+                SizeMinBytes=1G
+                SizeMaxBytes=1G
                 """
             )
         )