Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add mkosi-vm default config #3069

Merged
merged 1 commit into from
Sep 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
118 changes: 0 additions & 118 deletions docs/bootable.md

This file was deleted.

9 changes: 3 additions & 6 deletions mkosi.conf
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
# SPDX-License-Identifier: LGPL-2.1-or-later
[Include]
Include=mkosi-vm

[Build]
CacheDirectory=mkosi.cache
History=yes
Expand All @@ -17,16 +20,10 @@ BuildSources=.
BuildSourcesEphemeral=yes

Packages=
bash
binutils
gdb
less
nano
strace
sudo
systemd
tmux
udev
zsh

InitrdPackages=
Expand Down
10 changes: 0 additions & 10 deletions mkosi.conf.d/20-arch.conf
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,9 @@ Distribution=arch

[Content]
Packages=
base
bash
dbus-broker
dbus-broker-units
fish
grub
iproute
iputils
linux
openssh
perf
polkit
python
qemu-user-static
shim
strace
3 changes: 0 additions & 3 deletions mkosi.conf.d/20-azure.conf
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,4 @@ Repositories=base-preview
# test unsigned shim.
ShimBootloader=none
Packages=
kernel
kernel-tools
systemd-networkd
tpm2-tss
1 change: 0 additions & 1 deletion mkosi.conf.d/20-centos/mkosi.conf
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,5 @@ Release=9
# CentOS Stream 10 does not ship an unsigned shim
ShimBootloader=none
Packages=
kernel-core
linux-firmware
perf
8 changes: 0 additions & 8 deletions mkosi.conf.d/20-debian/mkosi.conf.d/20-x86-64.conf

This file was deleted.

8 changes: 0 additions & 8 deletions mkosi.conf.d/20-debian/mkosi.conf.d/20-x86.conf

This file was deleted.

2 changes: 0 additions & 2 deletions mkosi.conf.d/20-fedora/mkosi.conf
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ Release=rawhide
[Content]
Packages=
fish
kernel-core
perf
qemu-user-static
rpmautospec
systemd-networkd
8 changes: 0 additions & 8 deletions mkosi.conf.d/20-kali/mkosi.conf.d/20-x86-64.conf

This file was deleted.

8 changes: 0 additions & 8 deletions mkosi.conf.d/20-kali/mkosi.conf.d/20-x86.conf

This file was deleted.

12 changes: 0 additions & 12 deletions mkosi.conf.d/20-opensuse/mkosi.conf
Original file line number Diff line number Diff line change
Expand Up @@ -10,24 +10,12 @@ Release=tumbleweed
# OpenSUSE does not ship an unsigned shim
ShimBootloader=none
Packages=
bash
diffutils
fish
iproute
iputils
kernel-kvmsmall
libtss2-esys0
libtss2-mu0
libtss2-rc0
libtss2-tcti-device0
openssh-clients
openssh-server
patterns-base-minimal_base
perf
polkit
python3
qemu-linux-user
shim
strace
sudo-policy-wheel-auth-self
systemd-boot
3 changes: 1 addition & 2 deletions mkosi.conf.d/20-ubuntu/mkosi.conf
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,4 @@ Repositories=universe

[Content]
Packages=
linux-image-virtual
linux-tools-virtual
linux-tools-generic
6 changes: 0 additions & 6 deletions mkosi.conf.d/30-azure-centos-fedora/mkosi.conf
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,7 @@ Distribution=|azure

[Content]
Packages=
bash
iproute
iputils
openssh-clients
openssh-server
polkit
python3
rpm-build
strace
systemd-resolved
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,3 @@ Architecture=|arm64
Packages=
grub2-efi
shim
systemd-boot
16 changes: 0 additions & 16 deletions mkosi.conf.d/30-debian-kali-ubuntu/mkosi.conf
Original file line number Diff line number Diff line change
Expand Up @@ -7,25 +7,9 @@ Distribution=|ubuntu

[Content]
Packages=
?exact-name(systemd-boot)
?exact-name(systemd-resolved)
^libtss2-esys-[0-9.]+-0$
^libtss2-mu[0-9.-]+$
bash
dbus-broker
fish
iproute2
iputils-ping
libtss2-rc0
libtss2-tcti-device0
login
openssh-client
openssh-server
polkitd
python3
qemu-user-static
shim-signed
strace
systemd-coredump
systemd-sysv
tzdata
2 changes: 1 addition & 1 deletion mkosi/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
ConfigDefaultCallback = Callable[[argparse.Namespace], Any]


BUILTIN_CONFIGS = ("mkosi-tools", "mkosi-initrd")
BUILTIN_CONFIGS = ("mkosi-tools", "mkosi-initrd", "mkosi-vm")


class Verb(StrEnum):
Expand Down
7 changes: 4 additions & 3 deletions mkosi/resources/man/mkosi.md
Original file line number Diff line number Diff line change
Expand Up @@ -1859,9 +1859,10 @@ config file is read:
Note that each path containing extra configuration is only parsed
once, even if included more than once with `Include=`.

The builtin configs for the mkosi default initrd and default tools
tree can be included by including the literal value `mkosi-initrd` and
`mkosi-tools` respectively.
The builtin configs for the mkosi default initrd, default tools tree
and default virtual machine image can be included by including the
literal value `mkosi-initrd`, `mkosi-tools` or `mkosi-vm`
respectively.

Note: Include names starting with either of the literals `mkosi-` or
`contrib-` are reserved for use by mkosi itself.
Expand Down
18 changes: 18 additions & 0 deletions mkosi/resources/mkosi-vm/mkosi.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# SPDX-License-Identifier: LGPL-2.1-or-later

[Content]
Bootable=yes

Packages=
bash
diffutils
gawk
grep
gzip
less
nano
sed
strace
systemd
udev
which
14 changes: 14 additions & 0 deletions mkosi/resources/mkosi-vm/mkosi.conf.d/arch.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# SPDX-License-Identifier: LGPL-2.1-or-later

[Match]
Distribution=arch

[Content]
Packages=
dbus-broker
dbus-broker-units
iproute
iputils
linux
polkit
tpm2-tss
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# SPDX-License-Identifier: LGPL-2.1-or-later

[Match]
Distribution=|alma
Distribution=|rocky
Distribution=|centos
Distribution=|fedora
Distribution=|azure

[Content]
Packages=
iproute
iputils
kernel
polkit
systemd-resolved
tpm2-tss
util-linux
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
# SPDX-License-Identifier: LGPL-2.1-or-later

[Match]
Architecture=arm64
Distribution=|fedora
Distribution=|azure

[Content]
Packages=
linux-image-cloud-arm64
systemd-networkd
Loading
Loading