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 EBD8711CF1; Wed, 24 Sep 2025 10:34:16 +0000 (UTC) Received: by atuin.qyliss.net (Postfix, from userid 993) id 8CDCE11CD5; Wed, 24 Sep 2025 10:34:12 +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.1 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DMARC_PASS,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE autolearn=unavailable autolearn_force=no version=4.0.1 Received: from mail-yw1-x1134.google.com (mail-yw1-x1134.google.com [IPv6:2607:f8b0:4864:20::1134]) by atuin.qyliss.net (Postfix) with ESMTPS id A9AA411D17 for ; Wed, 24 Sep 2025 10:34:07 +0000 (UTC) Received: by mail-yw1-x1134.google.com with SMTP id 00721157ae682-71d60504788so48186717b3.2 for ; Wed, 24 Sep 2025 03:34:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1758710046; x=1759314846; darn=spectrum-os.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=IKCn11kv5HOmOZDbxRqHz3re3nQgnB/MPZc/Twace94=; b=Eh79asp26L6Zgn6WTplXNDZLeLVIKv/mlmocx9QOWpg73au5cXlInaYKWSPw5lFQXe DsPTbH7yV9BSHnIb3f0dJsSnB23g328eHrkgOGlk0OrSxl0pYN4wqy7ytsAykTNti+kq JGgGxc1C+OTDieNPcyO3SXVfeSIT7iXvDICQ5KKKjlt1SiaPDWap/JFhpY/agFTq/7Jz xNSM3+e4NyWfEaC6DGM4qWRjY4ski2yEBOfPE7oLq3iQXkwG1gK2Va9YtzVYIZAWumbD rjO42XRPEn7Qr/HMFPKlyXFd5xb1gNg8Ov5+QOelTNatDlOYTnatB9+pMN/S0bufpNR5 B2UQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1758710046; x=1759314846; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=IKCn11kv5HOmOZDbxRqHz3re3nQgnB/MPZc/Twace94=; b=tydbhhMwSJStWwiP/nIxT/HFelDSjHFH1W88RAAd/in3kW9PZAUXLYtzlB+3GcS/xe 03/VbLf1VOm1Q0nD9Vl+AaEiFezHBqAd3nSXFqnugiIwLuzZBwng8ujPvxXeep9O95zz ySkdTvf9DnLPWxlft1GFQk5R5+qMXbZXWE4uT8ohQS557e1U972oP+2AmB8URS1rzRsm esgGMlvdc71326oSH+BdnXKXHLCwtiI4nr+OJyipgocYfTsoXyfxnVTsUU0S5cy3W6LL zZL8Jn3qsg7LZHudPH2JnPpSy5oyh59c8UO6TNXtun2/tVLeljIyFyqe5fuj9f6Cr12W K7Cw== X-Gm-Message-State: AOJu0YzBmU90108tmRo5oRhw2ZUiYIW1vdEo0DogFEIpi27X4xnXCk7Q RxU3ha83AUaaoWc8bQFGKZ37Xqxt+oCL1ZKP2HDdyrrDQPMdDwKmo78uiTvdSQ== X-Gm-Gg: ASbGncvGWIphO69GLOkciKsJthvy6wj3csjjMvt+VgXM0XUr7kk4ocD5jGPqeuO1qpC pS6W0wOZvL6ETenDalFeFQ5nvbI5yVRObsQ3+Tt7mlceo3PGBOHfwCzDQuQ/Urbjk1pfkPseulZ qK9Q8ipWCHTFHucZkUgfG7L/l1m7TyA0+pGiJ5WuL8HvxyP1P1f98zZMLw8iFMdG3j+Kv6qa+3g IJKnIUFl+7RaUzpKBaZRa/J0V/8Fo/qMD2rxKHAuzDniYeqTMwRiQE23i1M1oNMPC0kzunGj+F2 4Lfov/CdXqBM+lKCZCJndxdMb5d53xGc8VhmdERAyK5y4Y/1wooEzrX7R0ElH/SKv1iqDqmh878 CPE7DqSMj+yLNa2GOjBWad2zMbWGeGlOedYuxFFlN/iA4cShAzWZjWG/Stgc7RT4Rr+HBgs3VlP w3uGg/yvzwGamS29Z1jVfG1PDVbgmK5cA2Jt+N2UM8pBq0dpyC5MzRuA== X-Google-Smtp-Source: AGHT+IGT0rbd1yxBf/PGb+yEzvaF/ErisxVZisUeWSaj9gCbTtzLUEl+xQX1Gecc6I6/gX9ylpeh7w== X-Received: by 2002:a05:690c:6813:b0:721:69f6:d403 with SMTP id 00721157ae682-75893af3ef2mr50524617b3.11.1758710046499; Wed, 24 Sep 2025 03:34:06 -0700 (PDT) Received: from localhost.localdomain (h96-60-249-169.cncrtn.broadband.dynamic.tds.net. [96.60.249.169]) by smtp.gmail.com with UTF8SMTPSA id 00721157ae682-7397171dbdcsm47406017b3.32.2025.09.24.03.34.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Sep 2025 03:34:06 -0700 (PDT) From: Demi Marie Obenour Date: Wed, 24 Sep 2025 06:32:40 -0400 Subject: [PATCH v2 3/3] host/rootfs: Simplify s6-rc dependencies MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20250924-udev-v2-3-6089de521b3b@gmail.com> References: <20250924-udev-v2-0-6089de521b3b@gmail.com> In-Reply-To: <20250924-udev-v2-0-6089de521b3b@gmail.com> To: Spectrum OS Development X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1758709958; l=8055; i=demiobenour@gmail.com; s=20250729; h=from:subject:message-id; bh=3AFELXYZfqSmPqs0/69nBPy2il8my2pcY0sJ0n54mDI=; b=o0gvnXshtNwDoIr0/s0eMGdhwBrb6+8qpe7V8I0xte+rdbeTtAgoIil7n0WXBXlPtHlLTuJa1 6ktktJ5Zs2sDlwN1LgpIlvbME232tHo/Tjr4+wO+mjEqGCfHMGscKPA X-Developer-Key: i=demiobenour@gmail.com; a=ed25519; pk=X57Q4/YQDj9t4SBeKaDwvXYKB6quZJVx/DE2Ly2out0= Message-ID-Hash: RQXFT7I57O7SEBXNJ562W3RWMTZGM4JU X-Message-ID-Hash: RQXFT7I57O7SEBXNJ562W3RWMTZGM4JU X-MailFrom: demiobenour@gmail.com 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: Demi Marie Obenour , Alyssa Ross 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: 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 => basic}/type | 0 .../image/etc/s6-rc/{vmm-env => basic}/type.license | 0 host/rootfs/image/etc/s6-rc/ok-all/contents | 19 ++++++++++++++++--- .../s6-rc/sys-vmms/dependencies.d/{vmm-env => 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 => basic} | 0 10 files changed, 54 insertions(+), 22 deletions(-) diff --git a/host/rootfs/Makefile b/host/rootfs/Makefile index db142f290a1efd3884d8c5a114b26fa0f42ef5f1..9a9e533ad2433bce137dd73e7e9d519c5afab303 100644 --- a/host/rootfs/Makefile +++ b/host/rootfs/Makefile @@ -127,6 +127,8 @@ build/empty: mkdir -p $@ S6_RC_FILES = \ + image/etc/s6-rc/basic/contents \ + image/etc/s6-rc/basic/type \ image/etc/s6-rc/core/type \ image/etc/s6-rc/core/up \ image/etc/s6-rc/kvm/timeout-up \ @@ -136,7 +138,7 @@ S6_RC_FILES = \ image/etc/s6-rc/ok-all/type \ image/etc/s6-rc/static-nodes/type \ image/etc/s6-rc/static-nodes/up \ - image/etc/s6-rc/sys-vmms/dependencies.d/vmm-env \ + image/etc/s6-rc/sys-vmms/dependencies.d/vm-env \ image/etc/s6-rc/sys-vmms/type \ image/etc/s6-rc/sys-vmms/up \ image/etc/s6-rc/systemd-udevd-coldplug/dependencies.d/systemd-udevd \ @@ -148,9 +150,7 @@ S6_RC_FILES = \ image/etc/s6-rc/systemd-udevd/type \ image/etc/s6-rc/vm-env/contents \ image/etc/s6-rc/vm-env/type \ - image/etc/s6-rc/vmm-env/contents \ - image/etc/s6-rc/vmm-env/type \ - image/etc/s6-rc/weston/dependencies.d/systemd-udevd-coldplug \ + image/etc/s6-rc/weston/dependencies.d/basic \ image/etc/s6-rc/weston/notification-fd \ image/etc/s6-rc/weston/run \ image/etc/s6-rc/weston/type diff --git a/host/rootfs/image/etc/s6-rc/basic/contents b/host/rootfs/image/etc/s6-rc/basic/contents new file mode 100644 index 0000000000000000000000000000000000000000..54f58577ba9f125e7fc08dcdd69394e8a88ab622 --- /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 diff --git a/host/rootfs/image/etc/s6-rc/vmm-env/type b/host/rootfs/image/etc/s6-rc/basic/type similarity index 100% rename from host/rootfs/image/etc/s6-rc/vmm-env/type rename to host/rootfs/image/etc/s6-rc/basic/type diff --git a/host/rootfs/image/etc/s6-rc/vmm-env/type.license b/host/rootfs/image/etc/s6-rc/basic/type.license similarity index 100% rename from host/rootfs/image/etc/s6-rc/vmm-env/type.license rename to host/rootfs/image/etc/s6-rc/basic/type.license diff --git a/host/rootfs/image/etc/s6-rc/ok-all/contents b/host/rootfs/image/etc/s6-rc/ok-all/contents index c76a5af336c7f1c3f4b81bf1f6244a53e0399fe8..edef03d2b6eae4fb0b92ac828436cd4572ca7acc 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 + +# The Wayland compositor. +weston diff --git a/host/rootfs/image/etc/s6-rc/sys-vmms/dependencies.d/vmm-env b/host/rootfs/image/etc/s6-rc/sys-vmms/dependencies.d/vm-env similarity index 100% rename from host/rootfs/image/etc/s6-rc/sys-vmms/dependencies.d/vmm-env rename to host/rootfs/image/etc/s6-rc/sys-vmms/dependencies.d/vm-env diff --git a/host/rootfs/image/etc/s6-rc/systemd-udevd/run b/host/rootfs/image/etc/s6-rc/systemd-udevd/run index 2501680b69eb0060b651146dffb6b3a99640c6fb..f05804a6b3903a767f8e1400cf0153045dd3781f 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/systemd-udevd + s6-ipcserver-socketbinder -b0 -m -a 0600 /run/sd-notify-wrapper/systemd-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 diff --git a/host/rootfs/image/etc/s6-rc/vm-env/contents b/host/rootfs/image/etc/s6-rc/vm-env/contents index ed8b5c410adfc17f5bbc33932ac79d97bd7b3115..81bfd422d22bde582fe198e0778c1c93d0d0f329 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/image/etc/s6-rc/vmm-env/contents deleted file mode 100644 index 9a1aea63abd1b5c374e3ac9a9671e4c9341f8d16..0000000000000000000000000000000000000000 --- 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 diff --git a/host/rootfs/image/etc/s6-rc/weston/dependencies.d/systemd-udevd-coldplug b/host/rootfs/image/etc/s6-rc/weston/dependencies.d/basic similarity index 100% rename from host/rootfs/image/etc/s6-rc/weston/dependencies.d/systemd-udevd-coldplug rename to host/rootfs/image/etc/s6-rc/weston/dependencies.d/basic -- 2.51.0