]> git.ipfire.org Git - thirdparty/mkosi.git/commitdiff
Beef up bundled images 1989/head
authorDaan De Meyer <daan.j.demeyer@gmail.com>
Wed, 18 Oct 2023 10:00:53 +0000 (12:00 +0200)
committerDaan De Meyer <daan.j.demeyer@gmail.com>
Wed, 18 Oct 2023 20:06:08 +0000 (22:06 +0200)
Let's beef up the bundled images with all the packages from the tools
trees where applicable so that we can run easily run mkosi from these
images if needed for testing on different distributions.

13 files changed:
.github/workflows/ci.yml
.gitignore
mkosi.conf.d/10-common.conf
mkosi.conf.d/15-bootable.conf [new file with mode: 0644]
mkosi.conf.d/20-arch.conf
mkosi.conf.d/20-centos.conf
mkosi.conf.d/20-debian.conf
mkosi.conf.d/20-fedora.conf
mkosi.conf.d/20-opensuse.conf
mkosi.conf.d/20-rhel-ubi.conf
mkosi.conf.d/20-ubuntu.conf
mkosi.extra/usr/lib/systemd/system-preset/00-mkosi.preset [new file with mode: 0644]
mkosi.extra/usr/lib/systemd/system-preset/99-mkosi.preset [new file with mode: 0644]

index f909a2a408cfcf1ba08122f676ea8a1e9b5a2b56..0c9f6257d9a572aec0e88d1b0c5e4056ad1a9409 100644 (file)
@@ -124,6 +124,16 @@ jobs:
 
         [Output]
         Format=${{ matrix.format }}
+
+        [Content]
+        KernelCommandLine=console=ttyS0
+                          systemd.unit=mkosi-check-and-shutdown.service
+                          systemd.log_target=console
+                          systemd.default_standard_output=journal+console
+
+        [Host]
+        QemuVsock=yes
+        QemuMem=4G
         EOF
 
     - name: Build ${{ matrix.distro }}/${{ matrix.format }}
index 74ccb6a092ab734224f246564e8746c4de9f3119..d460c12b7fb13563e53cb44afd5191fcfb3fb251 100644 (file)
@@ -16,6 +16,7 @@
 /mkosi.extra
 !mkosi.extra/usr/lib/systemd/mkosi-check-and-shutdown.sh
 !mkosi.extra/usr/lib/systemd/system/mkosi-check-and-shutdown.service
+!mkosi.extra/usr/lib/systemd/system-preset/*-mkosi.preset
 /mkosi.nspawn
 /mkosi.rootpw
 /mkosi.conf
index 132accf374f15261062342ee763df4bd2f627572..2dfd35f1a1fe9e37277f80edd60ade7f3fdb9688 100644 (file)
@@ -1,13 +1,26 @@
+# SPDX-License-Identifier: LGPL-2.1-or-later
+
 [Output]
-CacheDirectory=mkosi.cache
+# These images are (among other things) used for running mkosi which means we need some disk space available so
+# default to directory output where disk space isn't a problem.
+@Format=directory
+@CacheDirectory=mkosi.cache
+@OutputDirectory=mkosi.output
 
 [Content]
 Autologin=yes
 BiosBootloader=grub
-KernelCommandLine=console=ttyS0
-                  systemd.unit=mkosi-check-and-shutdown.service
-                  systemd.log_target=console
-                  systemd.default_standard_output=journal+console
 
-[Host]
-QemuVsock=yes
+Packages=
+        attr
+        autoconf
+        automake
+        ca-certificates
+        gcc
+        gettext
+        git
+        less
+        libtool
+        make
+        pkg-config
+        strace
diff --git a/mkosi.conf.d/15-bootable.conf b/mkosi.conf.d/15-bootable.conf
new file mode 100644 (file)
index 0000000..35269a7
--- /dev/null
@@ -0,0 +1,8 @@
+# SPDX-License-Identifier: LGPL-2.1-or-later
+
+[Match]
+Format=|disk
+Format=|directory
+
+[Content]
+Bootable=yes
index d14919a124c6b39f39529d7bf388b553197e0b9a..6b100db265839b22002e29ee75515151dcc57eea 100644 (file)
@@ -1,8 +1,47 @@
+# SPDX-License-Identifier: LGPL-2.1-or-later
+
 [Match]
 Distribution=arch
 
 [Content]
-Packages=linux
-         systemd
-         base
-         grub
+Packages=
+        apt
+        archlinux-keyring
+        base
+        bash
+        btrfs-progs
+        bubblewrap
+        ca-certificates
+        coreutils
+        cpio
+        curl
+        debian-archive-keyring
+        dnf
+        dosfstools
+        e2fsprogs
+        edk2-ovmf
+        erofs-utils
+        grub
+        linux
+        mtools
+        openssh
+        openssl
+        pacman
+        pesign
+        python-cryptography
+        qemu-base
+        sbsigntools
+        shadow
+        socat
+        squashfs-tools
+        strace
+        swtpm
+        systemd
+        systemd-ukify
+        tar
+        ukify
+        util-linux
+        virtiofsd
+        xfsprogs
+        xz
+        zstd
index dafbd2916cd5d026b97ed11de129d217e6a87df0..3fa622e0030e10a7bac04a24ccd1c8ba8c3f09a7 100644 (file)
@@ -1,11 +1,51 @@
+# SPDX-License-Identifier: LGPL-2.1-or-later
+
 [Match]
 Distribution=|centos
 Distribution=|alma
 Distribution=|rocky
 
+[Distribution]
+@Release=9
+Repositories=epel
+             epel-next
+
 [Content]
-Packages=kernel-core
-         systemd
-         systemd-boot
-         udev
-         grub2-pc
+Packages=
+        apt
+        bash
+        bubblewrap
+        ca-certificates
+        coreutils
+        cpio
+        curl
+        debian-keyring
+        distribution-gpg-keys
+        dnf
+        dosfstools
+        e2fsprogs
+        edk2-ovmf
+        grub2-pc
+        kernel-core
+        mtools
+        openssh-clients
+        openssl
+        pesign
+        python3-cryptography
+        qemu-kvm-core
+        shadow-utils
+        socat
+        squashfs-tools
+        strace
+        swtpm
+        systemd
+        systemd-boot
+        systemd-container
+        systemd-udev
+        tar
+        udev
+        util-linux
+        virtiofsd
+        xfsprogs
+        xz
+        zstd
index 3d7f821f0cd5660b3b74cb651627a4f7834f5df8..8514650da376fcb69405573b5b46930c1add438b 100644 (file)
@@ -1,12 +1,54 @@
+# SPDX-License-Identifier: LGPL-2.1-or-later
+
 [Match]
 Distribution=debian
 
+[Distribution]
+@Release=testing
+
 [Content]
-Packages=linux-image-cloud-amd64
-         systemd
-         systemd-boot
-         systemd-sysv
-         udev
-         dbus
-         tzdata
-         grub-pc
+Packages=
+        apt
+        bash
+        btrfs-progs
+        bubblewrap
+        ca-certificates
+        coreutils
+        cpio
+        curl
+        dbus-broker
+        debian-archive-keyring
+        dnf
+        dosfstools
+        e2fsprogs
+        erofs-utils
+        grub-pc
+        libtss2-dev
+        linux-image-cloud-amd64
+        mtools
+        openssh-client
+        openssl
+        ovmf
+        pacman-package-manager
+        pesign
+        python3-cryptography
+        python3-pefile
+        qemu-system
+        sbsigntool
+        socat
+        squashfs-tools
+        strace
+        swtpm
+        systemd
+        systemd-boot
+        systemd-container
+        systemd-sysv
+        tar
+        tzdata
+        udev
+        uidmap
+        util-linux
+        xfsprogs
+        xz-utils
+        zstd
+        zypper
index 81c63fcf57b6ef5cc74d67198a337a168731fb58..37f4b4fe22fda8043f80071de8d340e6aa568021 100644 (file)
@@ -1,10 +1,65 @@
+# SPDX-License-Identifier: LGPL-2.1-or-later
+
 [Match]
 Distribution=fedora
 
+[Distribution]
+@Release=39
+
 [Content]
-Packages=kernel-core
-         systemd
-         systemd-boot
-         udev
-         util-linux
-         grub2-pc
+Packages=
+        apt
+        archlinux-keyring
+        bash
+        btrfs-progs
+        bubblewrap
+        ca-certificates
+        coreutils
+        cpio
+        curl-minimal
+        debian-keyring
+        distribution-gpg-keys
+        dnf
+        dnf5
+        dosfstools
+        e2fsprogs
+        edk2-ovmf
+        erofs-utils
+        grub2-pc
+        kernel-core
+        mtools
+        openssh-clients
+        openssl
+        pacman
+        pesign
+        policycoreutils
+        policycoreutils-python-utils
+        python3-cryptography
+        qemu-kvm-core
+        sbsigntools
+        selinux-policy
+        selinux-policy-devel
+        selinux-policy-targeted
+        setools-console
+        shadow-utils
+        socat
+        squashfs-tools
+        strace
+        swtpm
+        systemd
+        systemd-boot
+        systemd-container
+        systemd-networkd
+        systemd-resolved
+        systemd-udev
+        systemd-ukify
+        tar
+        util-linux
+        virtiofsd
+        xfsprogs
+        xz
+        zstd
+        zypper
+
+[Host]
+KernelCommandLine=enforcing=0
index 14279b66b82cbd2b18d98f0ecb3371fc4a925cc8..b923b95ed6fec65b5ebd5ef2957b84d15f85f321 100644 (file)
@@ -1,9 +1,50 @@
+# SPDX-License-Identifier: LGPL-2.1-or-later
+
 [Match]
 Distribution=opensuse
 
+[Distribution]
+@Release=tumbleweed
+
 [Content]
-Packages=kernel-kvmsmall
-         systemd
-         systemd-boot
-         udev
-         grub2-i386-pc
+Packages=
+        bash
+        btrfs-progs
+        bubblewrap
+        ca-certificates
+        coreutils
+        cpio
+        curl
+        distribution-gpg-keys
+        # dnf-data is missing a dependency on coreutils which makes it postinstall script fail when using old zypper.
+        # dnf
+        dosfstools
+        e2fsprogs
+        erofs-utils
+        grep
+        grub2-i386-pc
+        kernel-kvmsmall
+        mtools
+        openssh-clients
+        openssl
+        ovmf
+        pesign
+        qemu-headless
+        sbsigntools
+        shadow
+        socat
+        squashfs
+        strace
+        swtpm
+        systemd
+        systemd-boot
+        systemd-container
+        systemd-experimental
+        tar
+        udev
+        util-linux
+        virtiofsd
+        xfsprogs
+        xz
+        zstd
+        zypper
index 20b1fdcbc4878acb7ef9979686eb4e874353c94b..34128ec638857562c83ca9c3acd0f245b22eb23e 100644 (file)
@@ -1,6 +1,13 @@
+# SPDX-License-Identifier: LGPL-2.1-or-later
+
 [Match]
 Distribution=rhel-ubi
 
+[Distribution]
+@Release=9
+
 [Content]
-Packages=systemd
-         systemd-udev
+Bootable=no
+Packages=
+        systemd
+        systemd-udev
index 2c8959cc28c212621fefac318a185bc236a3aae1..1e65a3163cb98fd73f64d266ab40a545219cb05b 100644 (file)
@@ -1,18 +1,21 @@
+# SPDX-License-Identifier: LGPL-2.1-or-later
+
 [Match]
 Distribution=ubuntu
 
 [Distribution]
-Release=lunar
-
-[Distribution]
-Repositories=main,universe
+@Release=lunar
+Repositories=universe
 
 [Content]
-Packages=linux-kvm
-         systemd
-         systemd-boot
-         systemd-sysv
-         udev
-         dbus
-         tzdata
-         grub-pc
+Packages=
+        apt
+        dbus-broker
+        grub-pc
+        linux-kvm
+        systemd
+        systemd-boot
+        systemd-sysv
+        tzdata
+        udev
+        zypper
diff --git a/mkosi.extra/usr/lib/systemd/system-preset/00-mkosi.preset b/mkosi.extra/usr/lib/systemd/system-preset/00-mkosi.preset
new file mode 100644 (file)
index 0000000..5a829b8
--- /dev/null
@@ -0,0 +1,33 @@
+# SPDX-License-Identifier: LGPL-2.1-or-later
+
+# mkosi adds its own ssh units via the --ssh switch so disable the default ones.
+disable ssh.service
+disable sshd.service
+
+# These might get pulled in as dependencies but we don't want them running.
+disable dnsmasq.service
+disable isc-dhcp-server.service
+disable isc-dhcp-server6.service
+
+# Pulled in via dracut-network by kexec-tools on Fedora.
+disable NetworkManager*
+
+# Make sure dbus-broker is started by default on Debian/Ubuntu.
+enable dbus-broker.service
+
+# systemd-networkd is disabled by default on Fedora so make sure it is enabled.
+enable systemd-networkd.service
+enable systemd-networkd-wait-online.service
+
+# We install dnf in some images but it's only going to be used rarely,
+# so let's not have dnf create its cache.
+disable dnf-makecache.*
+
+# The rpmdb is already in the right location, don't try to migrate it.
+disable rpmdb-migrate.service
+
+# We have journald to receive audit data so let's make sure we're not running auditd as well
+disable auditd.service
+
+# systemd-timesyncd is not enabled by default in the default systemd preset so enable it here instead.
+enable systemd-timesyncd.service
diff --git a/mkosi.extra/usr/lib/systemd/system-preset/99-mkosi.preset b/mkosi.extra/usr/lib/systemd/system-preset/99-mkosi.preset
new file mode 100644 (file)
index 0000000..710ee7c
--- /dev/null
@@ -0,0 +1,4 @@
+# SPDX-License-Identifier: LGPL-2.1-or-later
+
+# Make sure that services are disabled by default (primarily for Debian/Ubuntu).
+disable *