Let's reduce duplication by using mkosi dependencies to install
all required dependencies to build the default image. To make this
work we add support for tools trees on jammy/bookworm. We also drop
support for a focal default image as it's too much of a burden to
maintain.
We also remove the EPEL only packages from the CentOS tools tree so
that mkosi dependencies works on a CentOS Stream system without EPEL
enabled.
Finally, curl-minimal is replaced by curl because trying to install
curl-minimal on a system with curl leads to a dnf failure so we opt
for the larger curl in order to make mkosi dependencies useful in
more situations.
25 files changed:
BuildSourcesEphemeral=yes
Packages=
- attr
- ca-certificates
gdb
- jq
less
nano
strace
+ systemd
+ udev
tmux
InitrdPackages=
[Content]
Packages=
- apt
- archlinux-keyring
base
bash
- btrfs-progs
- bubblewrap
- ca-certificates
- coreutils
- cpio
- curl
dbus-broker
dbus-broker-units
- debian-archive-keyring
- dnf
- dosfstools
- e2fsprogs
- edk2-ovmf
- erofs-utils
- git
grub
iproute
iputils
linux
- mtools
openssh
- openssl
- pacman
perf
- pesign
- python-cryptography
- qemu-base
+ python
qemu-user-static
- sbsigntools
- shadow
shim
- socat
- squashfs-tools
strace
- swtpm
- systemd
- systemd-ukify
- tar
- ukify
- util-linux
- virtiofsd
- xfsprogs
- xz
- zstd
@ShimBootloader=none
Packages=
linux-firmware
- dnf
- dnf-plugins-core
[Content]
Packages=
- apt
- archlinux-keyring
- btrfs-progs
- debian-keyring
- distribution-gpg-keys
- dnf5
- dnf5-plugins
- erofs-utils
- pacman
qemu-user-static
systemd-networkd
- zypper
+++ /dev/null
-# SPDX-License-Identifier: LGPL-2.1-or-later
-
-[Match]
-Architecture=|x86-64
-Architecture=|arm64
-
-[Content]
-Packages=
- sbsigntools
- systemd-ukify
@ShimBootloader=none
Packages=
bash
- btrfs-progs
- bubblewrap
- ca-certificates
- coreutils
- cpio
- curl
- distribution-gpg-keys
- dnf
- dosfstools
- e2fsprogs
- erofs-utils
- git-core
- grep
+ diffutils
grub2-efi
grub2-i386-pc
grub2-x86_64-efi
libtss2-mu0
libtss2-rc0
libtss2-tcti-device0
- mtools
openssh-clients
openssh-server
- openssl
- ovmf
patterns-base-minimal_base
perf
- pesign
- python3-pefile
- qemu-headless
+ python3
qemu-linux-user
- sbsigntools
- shadow
shim
- socat
- squashfs
strace
- swtpm
- systemd
systemd-boot
- systemd-container
systemd-coredump
- systemd-experimental
- tar
ucode-amd
ucode-intel
- udev
- util-linux
- virtiofsd
- xfsprogs
- xz
- zstd
- zypper
[Content]
Bootable=no
-Packages=
- systemd
- systemd-udev
[Content]
Packages=
bash
- bubblewrap
- ca-certificates
- coreutils
- cpio
- curl-minimal
- dosfstools
- e2fsprogs
- git-core
iproute
iputils
kernel-core
- mtools
openssh-clients
openssh-server
- openssl
perf
- python3-cryptography
- qemu-kvm-core
- shadow-utils
- socat
- squashfs-tools
+ python3
strace
- swtpm
- systemd
- systemd-container
systemd-resolved
- systemd-udev
- tar
- util-linux
- virtiofsd
- xfsprogs
- xz
- zstd
[Content]
Packages=
- edk2-ovmf
grub2-efi
- pesign
shim
systemd-boot
[Content]
Packages=
- ?exact-name(systemd-ukify)
^libtss2-esys-[0-9.]+-0$
^libtss2-mu[0-9.-]+$
- apt
bash
- btrfs-progs
- bubblewrap
- ca-certificates
- coreutils
- cpio
- curl
- debian-archive-keyring
- dosfstools
- e2fsprogs
- erofs-utils
- git-core
+ dbus-broker
iproute2
iputils-ping
libtss2-rc0
libtss2-tcti-device0
- mtools
openssh-client
openssh-server
- openssl
- ovmf
- pesign
- python3-cryptography
- python3-pefile
- qemu-system
+ python3
qemu-user-static
- sbsigntool
shim-signed
- socat
- squashfs-tools
strace
- systemd
- systemd-container
systemd-coredump
systemd-sysv
- tar
+ systemd-boot
+ systemd-resolved
tzdata
- udev
- uidmap
- util-linux
- xfsprogs
- xz-utils
- zstd
- zypper
[Match]
Distribution=ubuntu
-Release=|focal
-Release=|jammy
+Release=jammy
[Content]
-# "orphan_file" is enabled by default in recent versions of mkfs.ext4 but not supported by the Jammy/Focal kernels
-# so we explicitly disable it.
+# "orphan_file" is enabled by default in recent versions of mkfs.ext4 but not supported by the Jammy kernel so we
+# explicitly disable it.
Environment=SYSTEMD_REPART_MKFS_OPTIONS_EXT4="-O ^orphan_file"
+++ /dev/null
-# SPDX-License-Identifier: LGPL-2.1-or-later
-
-[Match]
-Distribution=|!ubuntu
-Release=|!focal
-
-[Content]
-Packages=
- archlinux-keyring
- dbus-broker
- dnf
- makepkg
- pacman-package-manager
- swtpm
[Match]
Release=!jammy
-Release=!focal
[Content]
Packages=
--- /dev/null
+#!/bin/bash
+# SPDX-License-Identifier: LGPL-2.1-or-later
+set -e
+
+if [ "$1" = "build" ]; then
+ exit 0
+fi
+
+mkosi-chroot "$SRCDIR"/bin/mkosi dependencies | xargs -d '\n' mkosi-install
#!/bin/sh
# SPDX-License-Identifier: LGPL-2.1-or-later
+set -e
if [ "$1" = "final" ] && command -v pacman-key; then
pacman-key --init
ca-certificates
coreutils
cpio
+ curl
diffutils
dnf
dosfstools
systemd
tar
util-linux
- virtiofsd
xfsprogs
zstd
SELinuxRelabel=no
archlinux-keyring
base
btrfs-progs
- curl
dbus-broker
dbus-broker-units
debian-archive-keyring
systemd-ukify
ubuntu-keyring
virt-firmware
+ virtiofsd
xz
[Content]
Packages=
- apt
createrepo_c
- curl-minimal
- debian-keyring
- distribution-gpg-keys
dnf-plugins-core
git-core
openssh-clients
systemd-container
systemd-journal-remote
systemd-udev
- ubu-keyring
virt-firmware
+ virtiofsd
xz
+++ /dev/null
-# SPDX-License-Identifier: LGPL-2.1-or-later
-
-[Match]
-Distribution=|centos
-Distribution=|alma
-Distribution=|rocky
-Distribution=|rhel
-
-[Distribution]
-Repositories=
- epel
- epel-next
archlinux-keyring
btrfs-progs
createrepo-c
- curl
debian-archive-keyring
erofs-utils
git-core
sbsigntool
squashfs-tools
swtpm-tools
- systemd-boot
systemd-container
systemd-coredump
systemd-journal-remote
- ubuntu-keyring
uidmap
- virtiofsd
xz-utils
zypper
# SPDX-License-Identifier: LGPL-2.1-or-later
[Match]
-Distribution=ubuntu
-Release=focal
+Distribution=|!ubuntu
+Release=|!jammy
[Content]
Packages=
- dbus
+ systemd-boot
--- /dev/null
+# SPDX-License-Identifier: LGPL-2.1-or-later
+
+[Match]
+Distribution=|!debian
+Release=|!bookworm
+
+[Content]
+Packages=
+ ubuntu-keyring
--- /dev/null
+# SPDX-License-Identifier: LGPL-2.1-or-later
+
+# Install virtiofsd except on Ubuntu Jammy and Debian Bookworm.
+
+[Match]
+Distribution=|!ubuntu
+Release=|!jammy
+
+[Match]
+Distribution=|!debian
+Release=|!bookworm
+
+[Content]
+Packages=
+ virtiofsd
[Content]
Packages=
+ apt
archlinux-keyring
btrfs-progs
+ debian-keyring
+ distribution-gpg-keys
dnf5
dnf5-plugins
erofs-utils
qemu-system-s390x-core
reprepro
systemd-ukify
+ ubu-keyring
zypper
btrfs-progs
ca-certificates-mozilla
createrepo_c
- curl
distribution-gpg-keys
dnf-plugins-core
dnf5
systemd-coredump
systemd-experimental
systemd-journal-remote
+ virtiofsd
xz
zypper