Demi Marie Obenour writes: > The app, D-Bus, and wayland-proxy-virtwl all rely on /run/user and > /run/user/0 to exist. The app and wayland-proxy-virtwl also relies on > /tmp/.X11-unix existing. Move the directory creation to a oneshot > service that other services rely on. > > Signed-off-by: Demi Marie Obenour > --- > img/app/Makefile | 5 +++++ > img/app/etc/s6-rc/app/dependencies.d/directories | 0 > img/app/etc/s6-rc/dbus/dependencies.d/directories | 0 > img/app/etc/s6-rc/directories/type | 1 + > img/app/etc/s6-rc/directories/type.license | 2 ++ > img/app/etc/s6-rc/directories/up | 10 ++++++++++ > .../wayland-proxy-virtwl/dependencies.d/directories | 0 > img/app/etc/s6-rc/wayland-proxy-virtwl/run | 11 ----------- > 8 files changed, 18 insertions(+), 11 deletions(-) > create mode 100644 img/app/etc/s6-rc/app/dependencies.d/directories > create mode 100644 img/app/etc/s6-rc/dbus/dependencies.d/directories > create mode 100644 img/app/etc/s6-rc/directories/type > create mode 100644 img/app/etc/s6-rc/directories/type.license > create mode 100644 img/app/etc/s6-rc/directories/up > create mode 100644 img/app/etc/s6-rc/wayland-proxy-virtwl/dependencies.d/directories > > diff --git a/img/app/Makefile b/img/app/Makefile > index 80ef37ddf0c44636813725bd499e4ea5fad03c06..e11be09a3c6ca801d9211e49b58e3d05d57e344e 100644 > --- a/img/app/Makefile > +++ b/img/app/Makefile > @@ -82,12 +82,16 @@ build/rootfs.erofs: ../../scripts/make-erofs.sh $(PACKAGES_FILE) $(VM_FILES) $(V > > VM_S6_RC_FILES = \ > etc/s6-rc/app/dependencies.d/dbus \ > + etc/s6-rc/app/dependencies.d/directories \ > etc/s6-rc/app/dependencies.d/wayland-proxy-virtwl \ > etc/s6-rc/app/run \ > etc/s6-rc/app/type \ > + etc/s6-rc/dbus/dependencies.d/directories \ > etc/s6-rc/dbus/notification-fd \ > etc/s6-rc/dbus/run \ > etc/s6-rc/dbus/type \ > + etc/s6-rc/directories/type \ > + etc/s6-rc/directories/up \ > etc/s6-rc/mdevd-coldplug/dependencies \ > etc/s6-rc/mdevd-coldplug/type \ > etc/s6-rc/mdevd-coldplug/up \ > @@ -96,6 +100,7 @@ VM_S6_RC_FILES = \ > etc/s6-rc/mdevd/type \ > etc/s6-rc/ok-all/contents \ > etc/s6-rc/ok-all/type \ > + etc/s6-rc/wayland-proxy-virtwl/dependencies.d/directories \ > etc/s6-rc/wayland-proxy-virtwl/notification-fd \ > etc/s6-rc/wayland-proxy-virtwl/run \ > etc/s6-rc/wayland-proxy-virtwl/type > diff --git a/img/app/etc/s6-rc/app/dependencies.d/directories b/img/app/etc/s6-rc/app/dependencies.d/directories > new file mode 100644 > index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 > diff --git a/img/app/etc/s6-rc/dbus/dependencies.d/directories b/img/app/etc/s6-rc/dbus/dependencies.d/directories > new file mode 100644 > index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 > diff --git a/img/app/etc/s6-rc/directories/type b/img/app/etc/s6-rc/directories/type > new file mode 100644 > index 0000000000000000000000000000000000000000..bdd22a1850ae6c03a414eeb8084998679a2cdf92 > --- /dev/null > +++ b/img/app/etc/s6-rc/directories/type > @@ -0,0 +1 @@ > +oneshot > diff --git a/img/app/etc/s6-rc/directories/type.license b/img/app/etc/s6-rc/directories/type.license > new file mode 100644 > index 0000000000000000000000000000000000000000..c4a0586a407fe14c3e0855749a7524ac3871dda4 > --- /dev/null > +++ b/img/app/etc/s6-rc/directories/type.license > @@ -0,0 +1,2 @@ > +SPDX-License-Identifier: CC0-1.0 > +SPDX-FileCopyrightText: 2025 Demi Marie Obenour > diff --git a/img/app/etc/s6-rc/directories/up b/img/app/etc/s6-rc/directories/up > new file mode 100644 > index 0000000000000000000000000000000000000000..0ce4a06a37077cef8881d45382a81950e164560f > --- /dev/null > +++ b/img/app/etc/s6-rc/directories/up > @@ -0,0 +1,10 @@ > +#!/bin/execlineb -P > +# SPDX-License-Identifier: EUPL-1.2+ > +# SPDX-FileCopyrightText: 2023-2024 Alyssa Ross > +# > +# Directory creation (if it's copyrightable): > +# SPDX-License-Identifier: MIT > +# SPDX-FileCopyrightText: 2022 Unikie > + > +if { mkdir /run/user /tmp/.X11-unix } > +if { mkdir -m 0700 /run/user/0 } Since you've basically rewritten this, let's reset the copyright here. We could also create /run/user in VM_DIRS in the Makefile, like we already do for /run/service — probably good to keep that consistent when we don't have reasons not to like a special mode. > diff --git a/img/app/etc/s6-rc/wayland-proxy-virtwl/dependencies.d/directories b/img/app/etc/s6-rc/wayland-proxy-virtwl/dependencies.d/directories > new file mode 100644 > index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 > diff --git a/img/app/etc/s6-rc/wayland-proxy-virtwl/run b/img/app/etc/s6-rc/wayland-proxy-virtwl/run > index 7b8034368f547cfaf83a81a3b5d73ab864edafff..c1e0e088c789ab8c5fde7e50c9f4b856fff0e477 100755 > --- a/img/app/etc/s6-rc/wayland-proxy-virtwl/run > +++ b/img/app/etc/s6-rc/wayland-proxy-virtwl/run > @@ -1,17 +1,6 @@ > #!/bin/execlineb -P > # SPDX-License-Identifier: EUPL-1.2+ > # SPDX-FileCopyrightText: 2023-2024 Alyssa Ross > -# > -# Directory creation (if it's copyrightable): > -# SPDX-License-Identifier: MIT > -# SPDX-FileCopyrightText: 2022 Unikie > - > -foreground { mkdir /tmp/.X11-unix } > -foreground { mkdir /run/user } > -foreground { > - umask 077 > - mkdir /run/user/0 > -} > > s6-ipcserver-socketbinder -B /run/user/0/wayland-0 > fdmove -c 3 0 > -- > Sincerely, > Demi Marie Obenour (she/her/hers)