mkosi: Use initrd as exitrd
Let's speed up image builds by avoiding building an exitrd and instead reusing the initrd image for the same purpose.
This commit is contained in:
+2
-2
@@ -3,7 +3,6 @@
|
||||
[Config]
|
||||
MinimumVersion=commit:9e31235211d975bae25622d6205a8396d104335e
|
||||
Dependencies=
|
||||
exitrd
|
||||
initrd
|
||||
minimal-base
|
||||
minimal-0
|
||||
@@ -57,7 +56,7 @@ ExtraTrees=
|
||||
%O/minimal-1.root-%a-verity.raw:/usr/share/minimal_1.verity
|
||||
%O/minimal-1.root-%a-verity-sig.raw:/usr/share/minimal_1.verity.sig
|
||||
%O/minimal-base:/usr/share/TEST-13-NSPAWN-container-template
|
||||
%O/exitrd:/exitrd
|
||||
%O/initrd:/exitrd
|
||||
|
||||
Initrds=%O/initrd
|
||||
KernelInitrdModules=default
|
||||
@@ -94,6 +93,7 @@ Packages=
|
||||
bash-completion
|
||||
binutils
|
||||
coreutils
|
||||
cpio
|
||||
curl
|
||||
diffutils
|
||||
dnsmasq
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
|
||||
[Output]
|
||||
Format=directory
|
||||
|
||||
[Build]
|
||||
Environment=SYSTEMD_REQUIRED_DEPS_ONLY=1
|
||||
|
||||
[Content]
|
||||
Bootable=no
|
||||
Locale=C.UTF-8
|
||||
WithDocs=no
|
||||
CleanPackageMetadata=yes
|
||||
MakeInitrd=yes
|
||||
|
||||
Packages=
|
||||
coreutils
|
||||
bash
|
||||
|
||||
[Include]
|
||||
Include=%D/mkosi/mkosi.sanitizers
|
||||
@@ -1,31 +0,0 @@
|
||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
|
||||
[Match]
|
||||
Distribution=arch
|
||||
|
||||
[Content]
|
||||
PrepareScripts=%D/mkosi/mkosi.conf.d/arch/systemd.prepare
|
||||
VolatilePackages=
|
||||
systemd
|
||||
systemd-libs
|
||||
|
||||
RemoveFiles=
|
||||
# Arch Linux doesn't split their gcc-libs package so we manually remove
|
||||
# unneeded stuff here to make sure it doesn't end up in the image.
|
||||
/usr/lib/libgfortran.so*
|
||||
/usr/lib/libgo.so*
|
||||
/usr/lib/libgomp.so*
|
||||
/usr/lib/libgphobos.so*
|
||||
/usr/lib/libobjc.so*
|
||||
/usr/lib/libgdruntime.so*
|
||||
|
||||
# Remove all files that are only required for development.
|
||||
/usr/lib/*.a
|
||||
/usr/include/*
|
||||
|
||||
/usr/share/i18n/*
|
||||
/usr/share/hwdata/*
|
||||
/usr/share/iana-etc/*
|
||||
/usr/share/locale/*
|
||||
/usr/share/terminfo/*
|
||||
/usr/share/zoneinfo/*
|
||||
@@ -1,9 +0,0 @@
|
||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
|
||||
# Add a dependency on the build image unless NO_BUILD=1.
|
||||
|
||||
[Match]
|
||||
Environment=!NO_BUILD=1
|
||||
|
||||
[Config]
|
||||
Dependencies=build
|
||||
@@ -1,10 +0,0 @@
|
||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
|
||||
[Match]
|
||||
Distribution=|centos
|
||||
Distribution=|fedora
|
||||
|
||||
[Content]
|
||||
PrepareScripts=%D/mkosi/mkosi.conf.d/centos-fedora/systemd.prepare
|
||||
VolatilePackages=
|
||||
systemd-standalone-shutdown
|
||||
@@ -1,9 +0,0 @@
|
||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
|
||||
[Match]
|
||||
Distribution=debian
|
||||
|
||||
[Content]
|
||||
PrepareScripts=%D/mkosi/mkosi.conf.d/debian-ubuntu/systemd.prepare
|
||||
VolatilePackages=
|
||||
systemd-standalone-shutdown
|
||||
@@ -1,18 +0,0 @@
|
||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
|
||||
[Match]
|
||||
Distribution=opensuse
|
||||
|
||||
[Content]
|
||||
PrepareScripts=%D/mkosi/mkosi.conf.d/opensuse/systemd.prepare
|
||||
Packages=
|
||||
diffutils
|
||||
grep
|
||||
patterns-base-minimal_base
|
||||
sed
|
||||
xz
|
||||
|
||||
VolatilePackages=
|
||||
libsystemd0
|
||||
libudev1
|
||||
systemd
|
||||
@@ -1,12 +0,0 @@
|
||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
|
||||
[Match]
|
||||
Distribution=ubuntu
|
||||
|
||||
[Content]
|
||||
PrepareScripts=%D/mkosi/mkosi.conf.d/debian-ubuntu/systemd.prepare
|
||||
VolatilePackages=
|
||||
libsystemd-shared
|
||||
libsystemd0
|
||||
libudev1
|
||||
systemd
|
||||
@@ -22,9 +22,8 @@ test -d /run/initrd-mount-target
|
||||
mountpoint /run/initrd-mount-target
|
||||
[[ -e /run/initrd-mount-target/hello-world ]]
|
||||
|
||||
# Copy the prepared exitrd to its intended location. Check the respective
|
||||
# test.sh file for details
|
||||
# Copy the prepared exitrd to its intended location.
|
||||
mkdir -p /run/initramfs
|
||||
cp -r /exitrd/* /run/initramfs/
|
||||
unzstd --stdout /exitrd | cpio --extract --make-directories --directory /run/initramfs/
|
||||
|
||||
touch /testok
|
||||
|
||||
Reference in New Issue
Block a user