summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLuca Boccassi <bluca@debian.org>2023-11-08 00:35:48 +0100
committerGitHub <noreply@github.com>2023-11-08 00:35:48 +0100
commit9871279cde4f3e10ce358e4e134a61404d269fd9 (patch)
treeeff75c337b0b936033b0a787a23de25e724dc5a6
parentMerge pull request #29915 from mrc0mmand/ntp-followups (diff)
parentvmspawn: add missing include (diff)
downloadsystemd-9871279cde4f3e10ce358e4e134a61404d269fd9.tar.xz
systemd-9871279cde4f3e10ce358e4e134a61404d269fd9.zip
Merge pull request #29913 from keszybz/vmspawn-ci
Build vmspawn in CI and fix one test failure
-rw-r--r--man/systemctl.xml8
-rw-r--r--man/systemd-vmspawn.xml118
-rw-r--r--meson.build5
-rw-r--r--meson_options.txt2
-rw-r--r--src/vmspawn/vmspawn-util.c1
-rw-r--r--src/vmspawn/vmspawn.c2
6 files changed, 79 insertions, 57 deletions
diff --git a/man/systemctl.xml b/man/systemctl.xml
index 2204bee917..1d791b44fd 100644
--- a/man/systemctl.xml
+++ b/man/systemctl.xml
@@ -2736,15 +2736,15 @@ Jan 12 10:46:45 example.com bluetoothd[8900]: gatt-time-server: Input/output err
<listitem><para>When used with <command>bind</command>, creates a read-only bind mount.</para>
- <xi:include href="version-info.xml" xpointer="v248"/></listitem>
+ <xi:include href="version-info.xml" xpointer="v248"/>
+ </listitem>
</varlistentry>
<varlistentry>
<term><option>--drop-in=</option><replaceable>NAME</replaceable></term>
- <listitem>
- <para>When used with <command>edit</command>, use <replaceable>NAME</replaceable> as the drop-in
- file name instead of <filename>override.conf</filename>.</para>
+ <listitem><para>When used with <command>edit</command>, use <replaceable>NAME</replaceable> as the
+ drop-in file name instead of <filename>override.conf</filename>.</para>
<xi:include href="version-info.xml" xpointer="v253"/>
</listitem>
diff --git a/man/systemd-vmspawn.xml b/man/systemd-vmspawn.xml
index bf3aaf028e..4ca6f1a74f 100644
--- a/man/systemd-vmspawn.xml
+++ b/man/systemd-vmspawn.xml
@@ -44,59 +44,73 @@
<para>The following options are understood:</para>
<refsect2>
- <title>Image Options</title>
+ <title>Image Options</title>
- <variablelist>
- <varlistentry>
- <term><option>-i</option></term>
- <term><option>--image=</option></term>
+ <variablelist>
+ <varlistentry>
+ <term><option>-i</option></term>
+ <term><option>--image=</option></term>
- <listitem><para>Root file system disk image (or device node) for the virtual machine.</para></listitem>
- </varlistentry>
- </variablelist>
+ <listitem><para>Root file system disk image (or device node) for the virtual machine.</para>
+
+ <xi:include href="version-info.xml" xpointer="v255"/>
+ </listitem>
+ </varlistentry>
+ </variablelist>
</refsect2>
<refsect2>
- <title>Host Configuration</title>
+ <title>Host Configuration</title>
+
+ <variablelist>
+ <varlistentry>
+ <term><option>--qemu-smp=</option><replaceable>SMP</replaceable></term>
+
+ <listitem><para>Configures the number of CPUs to start the virtual machine with.
+ Defaults to 1.</para>
+
+ <xi:include href="version-info.xml" xpointer="v255"/>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><option>--qemu-mem=</option><replaceable>MEM</replaceable></term>
+
+ <listitem><para>Configures the amount of memory to start the virtual machine with.
+ Defaults to 2G.</para>
- <variablelist>
- <varlistentry>
- <term><option>--qemu-smp=</option><replaceable>SMP</replaceable></term>
+ <xi:include href="version-info.xml" xpointer="v255"/>
+ </listitem>
+ </varlistentry>
- <listitem><para>Configures the number of CPUs to start the virtual machine with.</para>
- <para>Defaults to 1.</para></listitem>
- </varlistentry>
+ <varlistentry>
+ <term><option>--qemu-kvm=</option></term>
- <varlistentry>
- <term><option>--qemu-mem=</option><replaceable>MEM</replaceable></term>
+ <listitem><para>Configures whether to use KVM. If the option is not specified KVM support will be
+ detected automatically. If true, KVM is always used, and if false, KVM is never used.</para>
- <listitem><para>Configures the amount of memory to start the virtual machine with.</para>
- <para>Defaults to 2G.</para></listitem>
- </varlistentry>
+ <xi:include href="version-info.xml" xpointer="v255"/></listitem>
+ </varlistentry>
- <varlistentry>
- <term><option>--qemu-kvm=</option></term>
+ <varlistentry>
+ <term><option>--qemu-gui</option></term>
- <para>Configure whether to use KVM.</para>
- <para>If the option is not specified KVM support will be detected automatically.
- If yes is specified KVM is always used, and vice versa if no is set KVM is never used.</para>
- </varlistentry>
+ <listitem><para>Start QEMU in graphical mode.</para>
- <varlistentry>
- <term><option>--qemu-gui</option></term>
+ <xi:include href="version-info.xml" xpointer="v255"/></listitem>
+ </varlistentry>
- <listitem><para>Start QEMU in graphical mode.</para></listitem>
- </varlistentry>
+ <varlistentry>
+ <term><option>--secboot=</option></term>
- <varlistentry>
- <term><option>--secboot=</option></term>
+ <listitem><para>Configures whether to search for firmware which supports secure boot. If the option
+ is not specified, the first firmware which is detected will be used. If true, then the first
+ firmware with secure boot support will be selected. If false, then the first firmware without
+ secure boot will be selected.</para>
- <listitem><para>Configure whether to search for firmware which supports secure boot.</para></listitem>
- <para>If the option is not specified the first firmware which is detected will be used.
- If the option is set to yes then the first firmware with secure boot support will be selected.
- If no is specified then the first firmware without secure boot will be selected.</para>
- </varlistentry>
- </variablelist>
+ <xi:include href="version-info.xml" xpointer="v255"/></listitem>
+ </varlistentry>
+ </variablelist>
</refsect2>
<refsect2>
@@ -116,19 +130,21 @@
use C-style escaping (i.e. <literal>\n</literal> to embed a newline, or <literal>\x00</literal> to
embed a <constant>NUL</constant> byte). Note that the invoking shell might already apply unescaping
once, hence this might require double escaping!.</para>
- </listitem>
+
+ <xi:include href="version-info.xml" xpointer="v255"/></listitem>
</varlistentry>
</variablelist>
- </refsect2><refsect2>
- <title>Other</title>
+ </refsect2>
+ <refsect2>
+ <title>Other</title>
- <variablelist>
- <xi:include href="standard-options.xml" xpointer="no-pager" />
- <xi:include href="standard-options.xml" xpointer="help" />
- <xi:include href="standard-options.xml" xpointer="version" />
- </variablelist>
- </refsect2>
+ <variablelist>
+ <xi:include href="standard-options.xml" xpointer="no-pager" />
+ <xi:include href="standard-options.xml" xpointer="help" />
+ <xi:include href="standard-options.xml" xpointer="version" />
+ </variablelist>
+ </refsect2>
</refsect1>
<xi:include href="common-variables.xml" />
@@ -139,8 +155,10 @@
<example>
<title>Run an Arch Linux VM image generated by mkosi</title>
- <programlisting># mkosi -d arch -p systemd -p linux --autologin -o image.raw -f build
- # systemd-vmspawn --image=image.raw</programlisting>
+ <programlisting>
+$ mkosi -d arch -p systemd -p linux --autologin -o image.raw -f build
+$ systemd-vmspawn --image=image.raw
+ </programlisting>
</example>
</refsect1>
@@ -155,7 +173,7 @@
<title>See Also</title>
<para>
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
- <citerefentry><refentrytitle>mkosi</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
+ <citerefentry><refentrytitle>mkosi</refentrytitle><manvolnum>1</manvolnum></citerefentry>
</para>
</refsect1>
</refentry>
diff --git a/meson.build b/meson.build
index 3e68f43ea6..32a181e50d 100644
--- a/meson.build
+++ b/meson.build
@@ -33,6 +33,7 @@ conf.set_quoted('RELATIVE_SOURCE_PATH', relative_source_path)
conf.set10('BUILD_MODE_DEVELOPER', get_option('mode') == 'developer',
description : 'tailor build to development or release builds')
+
feature = get_option('log-message-verification')
if feature.auto()
have = conf.get('BUILD_MODE_DEVELOPER') == 1
@@ -1569,6 +1570,9 @@ endif
have = feature.allowed() and (have_deps[0] or have_deps[1])
conf.set10('ENABLE_REMOTE', have)
+feature = get_option('vmspawn').disable_auto_if(conf.get('BUILD_MODE_DEVELOPER') == 0)
+conf.set10('ENABLE_VMSPAWN', feature.allowed())
+
foreach term : ['analyze',
'backlight',
'binfmt',
@@ -1610,7 +1614,6 @@ foreach term : ['analyze',
'userdb',
'utmp',
'vconsole',
- 'vmspawn',
'xdg-autostart']
have = get_option(term)
name = 'ENABLE_' + term.underscorify().to_upper()
diff --git a/meson_options.txt b/meson_options.txt
index abefa28458..e9283dc37e 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -156,7 +156,7 @@ option('backlight', type : 'boolean',
description : 'support for restoring backlight state')
option('vconsole', type : 'boolean',
description : 'support for vconsole configuration')
-option('vmspawn', type : 'boolean', value: false,
+option('vmspawn', type : 'feature', deprecated : { 'true' : 'enabled', 'false' : 'disabled' },
description : 'install the systemd-vmspawn tool')
option('quotacheck', type : 'boolean',
description : 'support for the quotacheck tools')
diff --git a/src/vmspawn/vmspawn-util.c b/src/vmspawn/vmspawn-util.c
index 852a81d071..95c05643d8 100644
--- a/src/vmspawn/vmspawn-util.c
+++ b/src/vmspawn/vmspawn-util.c
@@ -1,6 +1,7 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
#include <stdio.h>
+#include <unistd.h>
#include "alloc-util.h"
#include "architecture.h"
diff --git a/src/vmspawn/vmspawn.c b/src/vmspawn/vmspawn.c
index ab137df0a7..00166b2f7a 100644
--- a/src/vmspawn/vmspawn.c
+++ b/src/vmspawn/vmspawn.c
@@ -68,7 +68,7 @@ static int help(void) {
" --qemu-mem=MEM Configure guest's RAM size\n"
" --qemu-kvm= Configure whether to use KVM or not\n"
" --qemu-gui Start QEMU in graphical mode\n"
- " --secure-boot= Configure whether to search for firmware which supports Secure Boot\n\n"
+ " --secure-boot= Configure searching for firmware with SB support\n\n"
"%3$sCredentials:%4$s\n"
" --set-credential=ID:VALUE\n"
" Pass a credential with literal value to container.\n"