Let's introduce some profiles and remove unused packages to reduce
the size of the default image.
Both building the rpm and running mkosi inside the default image are
only rarely useful and shouldn't slow down image builds by default,
so we move both of these operations into their own profiles.
We drop the fish,zsh shells from the default image and also drop
qemu-user-static.
We also clean up a little inside mkosi-vm, getting rid of duplicated
packages across the main and per distro configs.
21 files changed:
Packages=
binutils
gdb
- sudo
- tmux
wireless-regdb
- zsh
InitrdProfiles=lvm
-InitrdPackages=
- less
RemoveFiles=
# The grub install plugin doesn't play nice with booting from virtiofs.
grub
openssh
python
- qemu-user-static
shim
Packages=
openssh-clients
openssh-server
- python3
- rpm-build
[Content]
# CentOS Stream 10 does not ship an unsigned shim
ShimBootloader=none
-Packages=
- linux-firmware
- rpmautospec
[Content]
Packages=
- fish
openssh-client
openssh-server
python3
- qemu-user-static
[Distribution]
Release=rawhide
-
-[Content]
-Packages=
- fish
- qemu-user-static
- rpmautospec
[Content]
Packages=
amd-ucode-firmware
- kernel-uki-virt
shim-unsigned-x64
# openSUSE does not ship an unsigned shim
ShimBootloader=none
Packages=
- diffutils
- fish
openssh-clients
openssh-server
- python3
- qemu-linux-user
shim
- sudo-policy-wheel-auth-self
-
- # Various packages added as dependencies. If they are not explicitly installed, the zypper inner
- # logic picks the busybox-package variant, which adds also busybox in the image.
- grep
- gzip
- xz
# SPDX-License-Identifier: LGPL-2.1-or-later
set -e
-if [[ "$DISTRIBUTION" =~ ubuntu|kali|debian ]]; then
- SUDO_GROUP=sudo
-else
- SUDO_GROUP=wheel
-fi
-
mkosi-chroot \
useradd \
--user-group \
--create-home \
--password "$(openssl passwd -1 mkosi)" \
- --groups "$SUDO_GROUP",systemd-journal \
+ --groups systemd-journal \
--shell /bin/bash \
--uid 4711 \
mkosi
--- /dev/null
+# SPDX-License-Identifier: LGPL-2.1-or-later
+
+[Content]
+Packages=python3
# SPDX-License-Identifier: LGPL-2.1-or-later
[Match]
-BuildSources=rpm
Distribution=fedora
+[Build]
+BuildSources=rpm
+
[Content]
+Packages=
+ rpm-build
+ rpmautospec
+
VolatilePackages=
mkosi
mkosi-initrd
# logic picks the busybox-package variant, which adds also busybox in the initrd.
diffutils
grep
- gzip
xz
# Various libraries that are dlopen'ed by systemd
kbd
libseccomp
util-linux
- systemd-udevd
Packages=
bash
+ dbus-broker
diffutils
gawk
grep
[Content]
Packages=
- dbus-broker
dbus-broker-units
iproute
iputils
[Content]
Packages=
- bash
- dbus-broker
iproute2
iputils-ping
login
systemd-boot
systemd-network
tpm2.0-tools
+
+ # Various packages added as dependencies. If they are not explicitly installed, the zypper inner
+ # logic picks the busybox-package variant, which adds also busybox in the image.
+ xz
[Content]
Packages=
agetty # required for *getty@ services
- dbus-broker
iproute2
iputils
kmod # mkosi is incompatible with busybox depmod