1
0
mirror of https://github.com/systemd/systemd.git synced 2025-01-06 17:18:12 +03:00

Merge pull request #29913 from keszybz/vmspawn-ci

Build vmspawn in CI and fix one test failure
This commit is contained in:
Luca Boccassi 2023-11-07 23:35:48 +00:00 committed by GitHub
commit 9871279cde
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 79 additions and 57 deletions

View File

@ -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>

View File

@ -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>
<variablelist>
<varlistentry>
<term><option>--qemu-smp=</option><replaceable>SMP</replaceable></term>
<listitem><para>Configures the number of CPUs to start the virtual machine with.</para>
<para>Defaults to 1.</para></listitem>
</varlistentry>
<listitem><para>Configures the number of CPUs to start the virtual machine with.
Defaults to 1.</para>
<varlistentry>
<term><option>--qemu-mem=</option><replaceable>MEM</replaceable></term>
<xi:include href="version-info.xml" xpointer="v255"/>
</listitem>
</varlistentry>
<listitem><para>Configures the amount of memory to start the virtual machine with.</para>
<para>Defaults to 2G.</para></listitem>
</varlistentry>
<varlistentry>
<term><option>--qemu-mem=</option><replaceable>MEM</replaceable></term>
<varlistentry>
<term><option>--qemu-kvm=</option></term>
<listitem><para>Configures the amount of memory to start the virtual machine with.
Defaults to 2G.</para>
<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>
<xi:include href="version-info.xml" xpointer="v255"/>
</listitem>
</varlistentry>
<varlistentry>
<term><option>--qemu-gui</option></term>
<varlistentry>
<term><option>--qemu-kvm=</option></term>
<listitem><para>Start QEMU in graphical mode.</para></listitem>
</varlistentry>
<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>
<varlistentry>
<term><option>--secboot=</option></term>
<xi:include href="version-info.xml" xpointer="v255"/></listitem>
</varlistentry>
<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>
<varlistentry>
<term><option>--qemu-gui</option></term>
<listitem><para>Start QEMU in graphical mode.</para>
<xi:include href="version-info.xml" xpointer="v255"/></listitem>
</varlistentry>
<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>
<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>

View File

@ -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()

View File

@ -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')

View File

@ -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"

View File

@ -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"