mirror of
https://github.com/systemd/systemd
synced 2025-12-22 17:04:45 +01:00
Compare commits
No commits in common. "738bad8f35488368cb5dc406168b7207a14a8c32" and "b295c166f94526aae830893612a1584840f2f087" have entirely different histories.
738bad8f35
...
b295c166f9
@ -504,10 +504,10 @@
|
|||||||
<term><option>--defer-partitions-empty=yes</option></term>
|
<term><option>--defer-partitions-empty=yes</option></term>
|
||||||
|
|
||||||
<listitem><para>This is very similar to <option>--defer-partitions=</option> but automatically
|
<listitem><para>This is very similar to <option>--defer-partitions=</option> but automatically
|
||||||
selects all partitions for deferral that have <option>Format=empty</option> set and do not configure
|
selects all partitions for deferral that have <option>Format=empty</option> set. It may be used in
|
||||||
a custom label, or which set <option>Label=_empty</option>. It may be used in conjunction with
|
conjunction with <option>--defer-partitions=</option> or
|
||||||
<option>--defer-partitions=</option> or <option>--defer-partitions-factory-reset=yes</option>, in
|
<option>--defer-partitions-factory-reset=yes</option>, in which case all matching partitions are
|
||||||
which case all matching partitions are deferred.</para>
|
deferred.</para>
|
||||||
|
|
||||||
<xi:include href="version-info.xml" xpointer="v259"/></listitem>
|
<xi:include href="version-info.xml" xpointer="v259"/></listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|||||||
@ -3,6 +3,7 @@
|
|||||||
[Config]
|
[Config]
|
||||||
MinimumVersion=commit:9e31235211d975bae25622d6205a8396d104335e
|
MinimumVersion=commit:9e31235211d975bae25622d6205a8396d104335e
|
||||||
Dependencies=
|
Dependencies=
|
||||||
|
exitrd
|
||||||
initrd
|
initrd
|
||||||
minimal-base
|
minimal-base
|
||||||
minimal-0
|
minimal-0
|
||||||
@ -56,7 +57,7 @@ ExtraTrees=
|
|||||||
%O/minimal-1.root-%a-verity.raw:/usr/share/minimal_1.verity
|
%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-1.root-%a-verity-sig.raw:/usr/share/minimal_1.verity.sig
|
||||||
%O/minimal-base:/usr/share/TEST-13-NSPAWN-container-template
|
%O/minimal-base:/usr/share/TEST-13-NSPAWN-container-template
|
||||||
%O/initrd:/exitrd
|
%O/exitrd:/exitrd
|
||||||
|
|
||||||
Initrds=%O/initrd
|
Initrds=%O/initrd
|
||||||
KernelInitrdModules=default
|
KernelInitrdModules=default
|
||||||
@ -93,7 +94,6 @@ Packages=
|
|||||||
bash-completion
|
bash-completion
|
||||||
binutils
|
binutils
|
||||||
coreutils
|
coreutils
|
||||||
cpio
|
|
||||||
curl
|
curl
|
||||||
diffutils
|
diffutils
|
||||||
dnsmasq
|
dnsmasq
|
||||||
|
|||||||
21
mkosi/mkosi.images/exitrd/mkosi.conf
Normal file
21
mkosi/mkosi.images/exitrd/mkosi.conf
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
# 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
|
||||||
31
mkosi/mkosi.images/exitrd/mkosi.conf.d/arch.conf
Normal file
31
mkosi/mkosi.images/exitrd/mkosi.conf.d/arch.conf
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
# 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/*
|
||||||
9
mkosi/mkosi.images/exitrd/mkosi.conf.d/build.conf
Normal file
9
mkosi/mkosi.images/exitrd/mkosi.conf.d/build.conf
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
# 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
|
||||||
10
mkosi/mkosi.images/exitrd/mkosi.conf.d/centos-fedora.conf
Normal file
10
mkosi/mkosi.images/exitrd/mkosi.conf.d/centos-fedora.conf
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
# 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
|
||||||
9
mkosi/mkosi.images/exitrd/mkosi.conf.d/debian.conf
Normal file
9
mkosi/mkosi.images/exitrd/mkosi.conf.d/debian.conf
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
# 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
|
||||||
18
mkosi/mkosi.images/exitrd/mkosi.conf.d/opensuse.conf
Normal file
18
mkosi/mkosi.images/exitrd/mkosi.conf.d/opensuse.conf
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
# 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
|
||||||
12
mkosi/mkosi.images/exitrd/mkosi.conf.d/ubuntu.conf
Normal file
12
mkosi/mkosi.images/exitrd/mkosi.conf.d/ubuntu.conf
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
# 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
|
||||||
@ -241,7 +241,7 @@ int signal_is_blocked(int sig) {
|
|||||||
int autoreaping_enabled(void) {
|
int autoreaping_enabled(void) {
|
||||||
struct sigaction sa;
|
struct sigaction sa;
|
||||||
|
|
||||||
if (sigaction(SIGCHLD, /* act= */ NULL, &sa) < 0)
|
if (sigaction(SIGCHLD, /* __act= */ NULL, &sa) < 0)
|
||||||
return -errno;
|
return -errno;
|
||||||
|
|
||||||
return sa.sa_handler == SIG_IGN || FLAGS_SET(sa.sa_flags, SA_NOCLDWAIT);
|
return sa.sa_handler == SIG_IGN || FLAGS_SET(sa.sa_flags, SA_NOCLDWAIT);
|
||||||
|
|||||||
@ -14,11 +14,9 @@ sync_in() {
|
|||||||
wait_for_signal() {
|
wait_for_signal() {
|
||||||
local notify="${1:?}"
|
local notify="${1:?}"
|
||||||
local p
|
local p
|
||||||
local c
|
|
||||||
|
|
||||||
sleep infinity &
|
sleep infinity &
|
||||||
p=$!
|
p=$!
|
||||||
c="${COUNTER:-0}"
|
|
||||||
|
|
||||||
# Notify readiness after 'sleep' is running to avoid race
|
# Notify readiness after 'sleep' is running to avoid race
|
||||||
# condition where the SIGHUP is sent before 'sleep' is ready to
|
# condition where the SIGHUP is sent before 'sleep' is ready to
|
||||||
@ -27,13 +25,7 @@ wait_for_signal() {
|
|||||||
systemd-notify --ready
|
systemd-notify --ready
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# ...but even that is not sufficient sometimes, so check if the
|
|
||||||
# callback has already ran by checking the counter
|
|
||||||
if [ "$c" -ne "$COUNTER" ]; then
|
|
||||||
kill -TERM "$p" || :
|
|
||||||
else
|
|
||||||
wait "$p" || :
|
wait "$p" || :
|
||||||
fi
|
|
||||||
}
|
}
|
||||||
|
|
||||||
sighup_handler() {
|
sighup_handler() {
|
||||||
|
|||||||
@ -22,8 +22,9 @@ test -d /run/initrd-mount-target
|
|||||||
mountpoint /run/initrd-mount-target
|
mountpoint /run/initrd-mount-target
|
||||||
[[ -e /run/initrd-mount-target/hello-world ]]
|
[[ -e /run/initrd-mount-target/hello-world ]]
|
||||||
|
|
||||||
# Copy the prepared exitrd to its intended location.
|
# Copy the prepared exitrd to its intended location. Check the respective
|
||||||
|
# test.sh file for details
|
||||||
mkdir -p /run/initramfs
|
mkdir -p /run/initramfs
|
||||||
unzstd --stdout /exitrd | cpio --extract --make-directories --directory /run/initramfs/
|
cp -r /exitrd/* /run/initramfs/
|
||||||
|
|
||||||
touch /testok
|
touch /testok
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user