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 B61E817C4D; Fri, 28 Nov 2025 18:03:29 +0000 (UTC) Received: by atuin.qyliss.net (Postfix, from userid 993) id B52C717C2D; Fri, 28 Nov 2025 18:03:26 +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_PASS,RCVD_IN_DNSWL_LOW,SPF_HELO_PASS autolearn=unavailable autolearn_force=no version=4.0.1 Received: from mout-p-202.mailbox.org (mout-p-202.mailbox.org [80.241.56.172]) by atuin.qyliss.net (Postfix) with ESMTPS id 9126417C29 for ; Fri, 28 Nov 2025 18:03:25 +0000 (UTC) Received: from smtp202.mailbox.org (smtp202.mailbox.org [10.196.197.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-202.mailbox.org (Postfix) with ESMTPS id 4dJ1PQ0br5z9t0F for ; Fri, 28 Nov 2025 19:03:22 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailbox.org; s=mail20150812; t=1764353002; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jEo3ms0JXjqqg08YCCF2Ug2I3XnLdih0uU2/5xOlvzI=; b=OmxRT9iL0Qftdy5l8P0R6uMV5/96e2UPY12CekCAFxTqJp5K9vAO0tgDHxSAj2mlikg1sk LXkHnuuH82zm0Zm7brp2oHzkH7YzZntOZLJda+iLFdPzWR8shuUg1WP28GEymtwrBt0vPa 8uujZ7vsc677wZJJLpQenH7r4x+VkuQl2Y/UZyKBYbaFdTZdtj8W/K+7FSbYbXN/YeJJ3o Va1ZXMJitaYtPenRSc/OWdgh6fYwP5ZgvlFrX/HLJJbbDjSW+uR8apgi1a/M6GoyqHKPGQ BIHLBlAc9ErLM8sES2GFWm+kn025IzHlhVQpr6Q2l9+MUNU37eu4UVAbclVS4Q== From: =?UTF-8?q?Johannes=20S=C3=BCllner?= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailbox.org; s=mail20150812; t=1764353001; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jEo3ms0JXjqqg08YCCF2Ug2I3XnLdih0uU2/5xOlvzI=; b=kkzCI7cFllwcT/+vjDgS0Fl9wbsmYZABbT+DE67IWD/0uuN4xGJaujl+Zsm0e5xNDAmm2W IGml9Q9cB8FDq0bsbwcIV0IZj8u+oKE9uUQcFPdtlx24nkFjZF3ZmyAP5EfC+0+I3mRvPR LAN6wxd9DZ7MwSXpNRXvWvFZ0Huymjl52/uAFfEjTe7B3zId6IE44DR2ZJJ93sBCcumLNW eS7MxRrJEBhhtARzeQtz1WeS9f5wMgu5CWt0SFbBrxJHhqpgQFzr4wQwzJkOYKEJIaFxKn 9LxaRNy15TRQUgP0mCQHTDT/C0munlGpboULKdiDMxuUFIqCCamIio88BanHKg== To: devel@spectrum-os.org Subject: [PATCH] host: Configure s6-linux-init-shutdownd Date: Fri, 28 Nov 2025 19:01:56 +0100 Message-ID: <20251128180238.42470-1-johannes.suellner@mailbox.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-MBO-RS-ID: f127d85e6f1991965de X-MBO-RS-META: essd4msihqr6ppq5xzmf41jzky43cdt9 Message-ID-Hash: UTZVUSRTIKFFB5MIYWYM6ZACCUIVFEQ6 X-Message-ID-Hash: UTZVUSRTIKFFB5MIYWYM6ZACCUIVFEQ6 X-MailFrom: johannes.suellner@mailbox.org 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: =?UTF-8?q?Johannes=20S=C3=BCllner?= 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: Makes shutdown and reboot of the Spectrum host using `s6-linux-init-hpr` possible. Before, it would fail with "fatal: unable to talk to shutdownd: Operation not permitted". Pretty much just copied from commit 18b19f4dfdb1376d90f70f526052011502b97c40, where this was added to application VMs, but not to the host. Signed-off-by: Johannes Süllner --- host/rootfs/Makefile | 4 +++- host/rootfs/file-list.mk | 4 ++++ .../service/s6-linux-init-shutdownd/notification-fd | 1 + .../service/s6-linux-init-shutdownd/notification-fd.license | 2 ++ .../run-image/service/s6-linux-init-shutdownd/run | 5 +++++ host/rootfs/image/etc/s6-linux-init/scripts/rc.shutdown | 5 +++++ .../rootfs/image/etc/s6-linux-init/scripts/rc.shutdown.final | 3 +++ 7 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 host/rootfs/image/etc/s6-linux-init/run-image/service/s6-linux-init-shutdownd/notification-fd create mode 100644 host/rootfs/image/etc/s6-linux-init/run-image/service/s6-linux-init-shutdownd/notification-fd.license create mode 100755 host/rootfs/image/etc/s6-linux-init/run-image/service/s6-linux-init-shutdownd/run create mode 100755 host/rootfs/image/etc/s6-linux-init/scripts/rc.shutdown create mode 100755 host/rootfs/image/etc/s6-linux-init/scripts/rc.shutdown.final diff --git a/host/rootfs/Makefile b/host/rootfs/Makefile index d528b12..5e90255 100644 --- a/host/rootfs/Makefile +++ b/host/rootfs/Makefile @@ -37,7 +37,9 @@ DIRS = \ run \ sys -FIFOS = etc/s6-linux-init/run-image/service/s6-svscan-log/fifo +FIFOS = \ + etc/s6-linux-init/run-image/service/s6-svscan-log/fifo \ + etc/s6-linux-init/run-image/service/s6-linux-init-shutdownd/fifo BUILD_FILES = build/etc/s6-rc diff --git a/host/rootfs/file-list.mk b/host/rootfs/file-list.mk index 7625c54..613a9e7 100644 --- a/host/rootfs/file-list.mk +++ b/host/rootfs/file-list.mk @@ -15,6 +15,8 @@ FILES = \ image/etc/s6-linux-init/run-image/service/getty-tty2/run \ image/etc/s6-linux-init/run-image/service/getty-tty3/run \ image/etc/s6-linux-init/run-image/service/getty-tty4/run \ + image/etc/s6-linux-init/run-image/service/s6-linux-init-shutdownd/notification-fd \ + image/etc/s6-linux-init/run-image/service/s6-linux-init-shutdownd/run \ image/etc/s6-linux-init/run-image/service/s6-svscan-log/notification-fd \ image/etc/s6-linux-init/run-image/service/s6-svscan-log/run \ image/etc/s6-linux-init/run-image/service/serial-getty-generator/run \ @@ -37,6 +39,8 @@ FILES = \ image/etc/s6-linux-init/run-image/service/vmm/run \ image/etc/s6-linux-init/run-image/service/vmm/template/notification-fd \ image/etc/s6-linux-init/scripts/rc.init \ + image/etc/s6-linux-init/scripts/rc.shutdown \ + image/etc/s6-linux-init/scripts/rc.shutdown.final \ image/etc/udev/rules.d/99-spectrum.rules \ image/etc/xdg/weston/autolaunch \ image/etc/xdg/weston/weston.ini \ diff --git a/host/rootfs/image/etc/s6-linux-init/run-image/service/s6-linux-init-shutdownd/notification-fd b/host/rootfs/image/etc/s6-linux-init/run-image/service/s6-linux-init-shutdownd/notification-fd new file mode 100644 index 0000000..00750ed --- /dev/null +++ b/host/rootfs/image/etc/s6-linux-init/run-image/service/s6-linux-init-shutdownd/notification-fd @@ -0,0 +1 @@ +3 diff --git a/host/rootfs/image/etc/s6-linux-init/run-image/service/s6-linux-init-shutdownd/notification-fd.license b/host/rootfs/image/etc/s6-linux-init/run-image/service/s6-linux-init-shutdownd/notification-fd.license new file mode 100644 index 0000000..a941ca4 --- /dev/null +++ b/host/rootfs/image/etc/s6-linux-init/run-image/service/s6-linux-init-shutdownd/notification-fd.license @@ -0,0 +1,2 @@ +SPDX-License-Identifier: CC0-1.0 +SPDX-FileCopyrightText: 2023 Alyssa Ross diff --git a/host/rootfs/image/etc/s6-linux-init/run-image/service/s6-linux-init-shutdownd/run b/host/rootfs/image/etc/s6-linux-init/run-image/service/s6-linux-init-shutdownd/run new file mode 100755 index 0000000..228fc6a --- /dev/null +++ b/host/rootfs/image/etc/s6-linux-init/run-image/service/s6-linux-init-shutdownd/run @@ -0,0 +1,5 @@ +#!/bin/execlineb -P +# SPDX-License-Identifier: EUPL-1.2+ +# SPDX-FileCopyrightText: 2023 Alyssa Ross + +s6-linux-init-shutdownd -Bc /etc/s6-linux-init diff --git a/host/rootfs/image/etc/s6-linux-init/scripts/rc.shutdown b/host/rootfs/image/etc/s6-linux-init/scripts/rc.shutdown new file mode 100755 index 0000000..3b09c02 --- /dev/null +++ b/host/rootfs/image/etc/s6-linux-init/scripts/rc.shutdown @@ -0,0 +1,5 @@ +#!/bin/execlineb -P +# SPDX-License-Identifier: EUPL-1.2+ +# SPDX-FileCopyrightText: 2023 Alyssa Ross + +s6-rc -Dbav2 change diff --git a/host/rootfs/image/etc/s6-linux-init/scripts/rc.shutdown.final b/host/rootfs/image/etc/s6-linux-init/scripts/rc.shutdown.final new file mode 100755 index 0000000..7f48a65 --- /dev/null +++ b/host/rootfs/image/etc/s6-linux-init/scripts/rc.shutdown.final @@ -0,0 +1,3 @@ +#!/bin/execlineb -P +# SPDX-License-Identifier: EUPL-1.2+ +# SPDX-FileCopyrightText: 2023 Alyssa Ross -- 2.50.1