From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from atuin.qyliss.net (localhost [IPv6:::1]) by atuin.qyliss.net (Postfix) with ESMTP id 4EFC7182F8; Thu, 25 Sep 2025 11:08:05 +0000 (UTC) Received: by atuin.qyliss.net (Postfix, from userid 993) id ADB731831F; Thu, 25 Sep 2025 11:08:02 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on atuin.qyliss.net X-Spam-Level: X-Spam-Status: No, score=-0.8 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DMARC_MISSING,RCVD_IN_DNSWL_LOW,SPF_HELO_PASS autolearn=unavailable autolearn_force=no version=4.0.1 Received: from fout-b8-smtp.messagingengine.com (fout-b8-smtp.messagingengine.com [202.12.124.151]) by atuin.qyliss.net (Postfix) with ESMTPS id 761831831B for ; Thu, 25 Sep 2025 11:08:01 +0000 (UTC) Received: from phl-compute-10.internal (phl-compute-10.internal [10.202.2.50]) by mailfout.stl.internal (Postfix) with ESMTP id 4BEC91D0009D; Thu, 25 Sep 2025 07:08:00 -0400 (EDT) Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-10.internal (MEProxy); Thu, 25 Sep 2025 07:08:00 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alyssa.is; h=cc :cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:subject :subject:to:to; s=fm3; t=1758798480; x=1758884880; bh=rGKu96sL/+ Fp6oPSBB0xV54XWOoL1qk4qZpQ8GEu3Sc=; b=npQfsN3zVNZXcqDXeP02V0D1Xg 9Y50xZPQVGjoqmbLRLsYrLtP1eKw4nj2KEQngNhXYdBbQ5z15k0oQLxT2J+9AJY3 LRxhKgKhosomHIxq9azpVPEDN6keva//8PeAw8R8URehNBHj8Rb0bMuCAiUTvlMm n9sz7Cytq18j2MbaZNQppwSVSfpM6zshG3hE7AB5dp+dn/Hl4zPudpGSbdwiY7vR m25G2asETxP56ky5SMygnskPUr8Wgs7jEzW0TnlCUNgnnTlSqclerDmOLcyWTQJp 5Gj5jx1iy+mIx3ORGgL0vag1sw0lfc7bZbUIk1p4L3I2Gv04DOFFvuayVC0A== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t= 1758798480; x=1758884880; bh=rGKu96sL/+Fp6oPSBB0xV54XWOoL1qk4qZp Q8GEu3Sc=; b=fiO4I4x18nXffxO1oKnfKy0mDDr/NKfkalYXOUfBF/JciJ78f8y cGu7DVXT9BbUYY29OG54TcM8r/Whdu00ThfdY46txkqCkjAR9LgILnC2gypta+2O s6hR5CUgT8V2hR9HBnp4OYVZRQmbQRVPWHkgsBDJje6Yo9Qd09Ymngxb8vzse1jK 4cdCQMvH6Gr8hP7S9Fwuqw8RebWssY2tHJTKIhWtrHcAcna8B5hW8/EAdTNDAuV5 fmJ0KCw3syTysxSD6UFopY5zPPf9rANuzHlzdvlfHBxxI0NMUsgBlZKXkErGeRQf 95W7BiLCuPJbsNFFm/0uUpYH73g+tjUltfQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeffedrtdeggdeiieefvdcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpuffrtefokffrpgfnqfghnecuuegr ihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjug hrpefhvfevufgjfhffkfggtgesghdtreertddtjeenucfhrhhomheptehlhihsshgrucft ohhsshcuoehhihesrghlhihsshgrrdhisheqnecuggftrfgrthhtvghrnhepteehvedugf ejgfehhfeijeduleekleejgedvkeeuuefhhfegvdevfeetveegteeinecuvehluhhsthgv rhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhephhhisegrlhihshhsrgdrih hspdhnsggprhgtphhtthhopedvpdhmohguvgepshhmthhpohhuthdprhgtphhtthhopegu vghmihhosggvnhhouhhrsehgmhgrihhlrdgtohhmpdhrtghpthhtohepuggvvhgvlhessh hpvggtthhruhhmqdhoshdrohhrgh X-ME-Proxy: Feedback-ID: i12284293:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 25 Sep 2025 07:07:59 -0400 (EDT) Received: by mbp.qyliss.net (Postfix, from userid 1000) id 73F5224D34AF; Thu, 25 Sep 2025 13:07:53 +0200 (CEST) From: Alyssa Ross To: Demi Marie Obenour Subject: Re: [PATCH v2 3/3] host/rootfs: Simplify s6-rc dependencies In-Reply-To: <20250924-udev-v2-3-6089de521b3b@gmail.com> References: <20250924-udev-v2-0-6089de521b3b@gmail.com> <20250924-udev-v2-3-6089de521b3b@gmail.com> Date: Thu, 25 Sep 2025 13:07:52 +0200 Message-ID: <87wm5mbxiv.fsf@alyssa.is> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" Message-ID-Hash: ZUJ2CSSNK2LMBO44MCLXM6NKIKDO43HV X-Message-ID-Hash: ZUJ2CSSNK2LMBO44MCLXM6NKIKDO43HV X-MailFrom: hi@alyssa.is X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-devel.spectrum-os.org-0; header-match-devel.spectrum-os.org-1; header-match-devel.spectrum-os.org-2; header-match-devel.spectrum-os.org-3; header-match-devel.spectrum-os.org-4; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Spectrum OS Development X-Mailman-Version: 3.3.9 Precedence: list List-Id: Patches and low-level development discussion Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Demi Marie Obenour writes: > This moves almost all of the s6-rc dependencies into named, commented > bundles. This makes the system much easier to understand. > > Most of the explanation is in the bundle files themselves. > > Signed-off-by: Demi Marie Obenour > --- > host/rootfs/Makefile | 8 ++++---- > host/rootfs/image/etc/s6-rc/basic/contents | 18 +++++++++++++= +++++ > host/rootfs/image/etc/s6-rc/{vmm-env =3D> basic}/type | 0 > .../image/etc/s6-rc/{vmm-env =3D> basic}/type.license | 0 > host/rootfs/image/etc/s6-rc/ok-all/contents | 19 +++++++++++++= +++--- > .../s6-rc/sys-vmms/dependencies.d/{vmm-env =3D> vm-env} | 0 > host/rootfs/image/etc/s6-rc/systemd-udevd/run | 9 ++++++--- > host/rootfs/image/etc/s6-rc/vm-env/contents | 13 ++++++++++--- > host/rootfs/image/etc/s6-rc/vmm-env/contents | 9 --------- > .../dependencies.d/{systemd-udevd-coldplug =3D> basic} | 0 > 10 files changed, 54 insertions(+), 22 deletions(-) Hmm, we just moved away from using dependencies files to dependencies.d directories, but now we're going the other way with contents? That's not to say we couldn't have a README file in each contents.d or something serving much the same purpose, though. > diff --git a/host/rootfs/image/etc/s6-rc/basic/contents b/host/rootfs/ima= ge/etc/s6-rc/basic/contents > new file mode 100644 > index 0000000000000000000000000000000000000000..54f58577ba9f125e7fc08dcdd= 69394e8a88ab622 > --- /dev/null > +++ b/host/rootfs/image/etc/s6-rc/basic/contents > @@ -0,0 +1,18 @@ > +# SPDX-License-Identifier: CC0-1.0 > +# SPDX-FileCopyrightText: 2021 Alyssa Ross > +# SPDX-FileCopyrightText: 2025 Demi Marie Obenour > + > +# This file contains all atomics and bundles needed for basic system > +# initialization. Everything that is not meant to run in early boot > +# should depend on this. > + > +# This ensures that core files are written to the right place. > +core > + > +# This ensures that static nodes are created. > +static-nodes > + > +# systemd runs systemd-udev-trigger.service before sysinit.target. > +# Therefore, anything using libudev that isn't an early boot service > +# might expect udev coldplug to have finished. > +systemd-udevd-coldplug I'm not convinced by the "basic" bundle. I worry that it's likely to end up accumulating stuff that isn't actually needed by everything that depends on it, and that things will end up being slow because they're waiting for things they don't actually need. I'm not sure where core should go, really, because anything /could/ crash at any time. static-nodes is presumably going away anyway with udev, so this is really just the coldplug bundle. > diff --git a/host/rootfs/image/etc/s6-rc/ok-all/contents b/host/rootfs/im= age/etc/s6-rc/ok-all/contents > index c76a5af336c7f1c3f4b81bf1f6244a53e0399fe8..edef03d2b6eae4fb0b92ac828= 436cd4572ca7acc 100644 > --- a/host/rootfs/image/etc/s6-rc/ok-all/contents > +++ b/host/rootfs/image/etc/s6-rc/ok-all/contents > @@ -1,6 +1,19 @@ > # SPDX-License-Identifier: CC0-1.0 > # SPDX-FileCopyrightText: 2021 Alyssa Ross > -# > -systemd-udevd-coldplug > +# SPDX-FileCopyrightText: 2025 Demi Marie Obenour > + > +# This file contains the services that need to be started even > +# if nothing else depends on them. It should not include services > +# that are only needed by other services. For instance, it would > +# not be appropriate for this file to reference systemd-udevd. > +# However, services should be included in this file whenever they > +# are directly needed by the user, even if they depend on another > +# service in this files. For instance, sys-vmms depends on weston, > +# but it is still included. > + > +# VMMs that should be started at boot. In the future > +# it might make sense to start them only as needed. > sys-vmms > -vm-env See below =E2=80=94 I think the name of "vm-env" hasn't captured what it do= es very well. > diff --git a/host/rootfs/image/etc/s6-rc/systemd-udevd/run b/host/rootfs/= image/etc/s6-rc/systemd-udevd/run > index 2501680b69eb0060b651146dffb6b3a99640c6fb..f05804a6b3903a767f8e1400c= f0153045dd3781f 100644 > --- a/host/rootfs/image/etc/s6-rc/systemd-udevd/run > +++ b/host/rootfs/image/etc/s6-rc/systemd-udevd/run > @@ -1,11 +1,14 @@ > #!/bin/execlineb -P > # SPDX-License-Identifier: EUPL-1.2+ > # SPDX-FileCopyrightText: 2025 Demi Marie Obenour > -if { rm -f /run/sd-notify-wrapper/systemd-udevd } > +if { mkdir -p /run/sd-notify-wrapper } > +s6-setlock -d 4 /run/sd-notify-wrapper/systemd-udevd.lock > +if { rm -f /run/sd-notify-wrapper/systemd-udevd.sock } > background { > - s6-ipcserver-socketbinder -b0 -m -a 0600 /run/sd-notify-wrapper/syste= md-udevd > + s6-ipcserver-socketbinder -b0 -m -a 0600 /run/sd-notify-wrapper/syste= md-udevd.sock > fdmove 1 3 > sd-notify-adapter > } > -export NOTIFY_SOCKET /run/sd-notify-wrapper/systemd-udevd > +fdclose 3 > +export NOTIFY_SOCKET /run/sd-notify-wrapper/systemd-udevd.sock > exec -a systemd-udevd udevadm Are these changes supposed to be here? > diff --git a/host/rootfs/image/etc/s6-rc/vm-env/contents b/host/rootfs/im= age/etc/s6-rc/vm-env/contents > index ed8b5c410adfc17f5bbc33932ac79d97bd7b3115..81bfd422d22bde582fe198e07= 78c1c93d0d0f329 100644 > --- a/host/rootfs/image/etc/s6-rc/vm-env/contents > +++ b/host/rootfs/image/etc/s6-rc/vm-env/contents > @@ -1,6 +1,13 @@ > # SPDX-License-Identifier: CC0-1.0 > # SPDX-FileCopyrightText: 2021 Alyssa Ross > -# > -static-nodes > -systemd-udevd-coldplug > +# SPDX-FileCopyrightText: 2025 Demi Marie Obenour > + > +# This file contains s6 atomics and bundles that > +# need to be started before starting any VMs. > + > +# Basic initialization > +basic > +# KVM being available > +kvm > +# Wayland compositor ready > weston > diff --git a/host/rootfs/image/etc/s6-rc/vmm-env/contents b/host/rootfs/i= mage/etc/s6-rc/vmm-env/contents > deleted file mode 100644 > index 9a1aea63abd1b5c374e3ac9a9671e4c9341f8d16..0000000000000000000000000= 000000000000000 > --- a/host/rootfs/image/etc/s6-rc/vmm-env/contents > +++ /dev/null > @@ -1,9 +0,0 @@ > -# SPDX-License-Identifier: CC0-1.0 > -# SPDX-FileCopyrightText: 2021 Alyssa Ross > -# > -core > -kvm > -# systemd runs systemd-udev-trigger.service before sysinit.target. > -# Therefore, anything using libudev that isn't an early boot service > -# might expect udev coldplug to have finished. > -systemd-udevd-coldplug I think it probably makes sense to keep a distinction between "user can now start VMs" (vm-env) and "it is now possible to start a VMM, possibly automatically" (vmm-env). We can of course try to find better names, though. --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEARYKAB0WIQRV/neXydHjZma5XLJbRZGEIw/wogUCaNUiiAAKCRBbRZGEIw/w olX+AQC2zFdIbUQ7iHtEFWZO8qEj+F9XSXbWl70sJlBX9YWZfQD+L+rzl57kKWb5 SeGiMl2sETSBktWCMutiPxOqzNeTlwc= =6wQO -----END PGP SIGNATURE----- --=-=-=--