* [PATCH] host/rootfs: Always fail if there is a globbing problem
@ 2025-12-05 16:26 Demi Marie Obenour
2025-12-28 21:56 ` Alyssa Ross
0 siblings, 1 reply; 4+ messages in thread
From: Demi Marie Obenour @ 2025-12-05 16:26 UTC (permalink / raw)
To: Spectrum OS Development; +Cc: Alyssa Ross, Demi Marie Obenour
Better to fail than to continue after an unknown problem has happened.
Signed-off-by: Demi Marie Obenour <demiobenour@gmail.com>
---
host/rootfs/image/etc/s6-rc/static-nodes/up | 2 +-
host/rootfs/image/usr/bin/assign-devices | 2 +-
host/rootfs/image/usr/bin/run-vmm | 2 +-
host/rootfs/image/usr/bin/vm-import | 2 +-
host/rootfs/image/usr/bin/vm-start | 2 +-
5 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/host/rootfs/image/etc/s6-rc/static-nodes/up b/host/rootfs/image/etc/s6-rc/static-nodes/up
index e1bdd4061441b39d7b46575a05754331970b951e..66f4fa7954beffc201f0985b3be10bd6a98f1d3a 100644
--- a/host/rootfs/image/etc/s6-rc/static-nodes/up
+++ b/host/rootfs/image/etc/s6-rc/static-nodes/up
@@ -2,7 +2,7 @@
# SPDX-FileCopyrightText: 2021 Alyssa Ross <hi@alyssa.is>
pipeline {
- elglob -0 modules_devname /lib/modules/*/modules.devname
+ elglob -w0 modules_devname /lib/modules/*/modules.devname
/etc/parse-devname $modules_devname
}
diff --git a/host/rootfs/image/usr/bin/assign-devices b/host/rootfs/image/usr/bin/assign-devices
index 58dd3cc0dfc3ceec4c82988755ed1ddbd224abfd..99988d64dbf2802cdbfd69c299f899ccbc1cf390 100755
--- a/host/rootfs/image/usr/bin/assign-devices
+++ b/host/rootfs/image/usr/bin/assign-devices
@@ -2,7 +2,7 @@
# SPDX-License-Identifier: EUPL-1.2+
# SPDX-FileCopyrightText: 2025 Alyssa Ross <hi@alyssa.is>
-elglob -0 devices /sys/bus/pci/drivers/vfio-pci/????:??:??.?
+elglob -w0 devices /sys/bus/pci/drivers/vfio-pci/????:??:??.?
forx -pE device { $devices }
# This script is designed to be re-entrant and called multiple times.
diff --git a/host/rootfs/image/usr/bin/run-vmm b/host/rootfs/image/usr/bin/run-vmm
index ba8b59c2677408acdd01c2eda3cf2dd60992d881..1a09c93bd1ac121c72f8132393979bf03663f1c2 100755
--- a/host/rootfs/image/usr/bin/run-vmm
+++ b/host/rootfs/image/usr/bin/run-vmm
@@ -22,7 +22,7 @@ background -d {
# Find any net-provider relationships this VM is involved in
cd /run/vm/by-id
- elglob -0 providers */config/providers/net/*
+ elglob -w0 providers */config/providers/net/*
forx -pE path { $providers }
backtick -E client_id {
awk -v path=${path} -F / "BEGIN { split(path, p); print p[1] }"
diff --git a/host/rootfs/image/usr/bin/vm-import b/host/rootfs/image/usr/bin/vm-import
index c1d1bbc106b8034c82c8e09c1bff81a06c233fe4..06f90d83509c318bc364d9c0e111878235ae50d3 100755
--- a/host/rootfs/image/usr/bin/vm-import
+++ b/host/rootfs/image/usr/bin/vm-import
@@ -3,7 +3,7 @@
# SPDX-FileCopyrightText: 2023-2024 Alyssa Ross <hi@alyssa.is>
cd $2
-elglob -0 names *
+elglob -w0 names *
forx -po0 -E name { $names }
diff --git a/host/rootfs/image/usr/bin/vm-start b/host/rootfs/image/usr/bin/vm-start
index 67480e5215d8a8260ce3f03c67f71ba8f210c291..94d08437b75f59a728be0e8a1efbc5af3b44f6c5 100755
--- a/host/rootfs/image/usr/bin/vm-start
+++ b/host/rootfs/image/usr/bin/vm-start
@@ -7,7 +7,7 @@ foreground { s6-rc -bu change vm-env }
foreground {
redirfd -w 2 /dev/null
cd /run/vm/by-id/${1}/config/providers/net
- elglob -0 providers *
+ elglob -w0 providers *
forx -pE provider { $providers }
backtick -E provider_id {
backtick -E id_path { readlink /run/vm/by-name/${provider} }
---
base-commit: 92e219e7c08c479d216a46d2736ea9d229ff034d
change-id: 20251203-globfail-41a5db0de497
--
Sincerely,
Demi Marie Obenour (she/her/hers)
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [PATCH] host/rootfs: Always fail if there is a globbing problem
2025-12-05 16:26 [PATCH] host/rootfs: Always fail if there is a globbing problem Demi Marie Obenour
@ 2025-12-28 21:56 ` Alyssa Ross
2025-12-29 2:23 ` Demi Marie Obenour
0 siblings, 1 reply; 4+ messages in thread
From: Alyssa Ross @ 2025-12-28 21:56 UTC (permalink / raw)
To: Demi Marie Obenour; +Cc: Spectrum OS Development
[-- Attachment #1: Type: text/plain, Size: 757 bytes --]
Demi Marie Obenour <demiobenour@gmail.com> writes:
> Better to fail than to continue after an unknown problem has happened.
>
> Signed-off-by: Demi Marie Obenour <demiobenour@gmail.com>
> ---
> host/rootfs/image/etc/s6-rc/static-nodes/up | 2 +-
> host/rootfs/image/usr/bin/assign-devices | 2 +-
> host/rootfs/image/usr/bin/run-vmm | 2 +-
> host/rootfs/image/usr/bin/vm-import | 2 +-
> host/rootfs/image/usr/bin/vm-start | 2 +-
> 5 files changed, 5 insertions(+), 5 deletions(-)
Networking test fails with this applied:
+ vm-import user /run/mnt/vms /run/mnt/storage
elglob: fatal: unable to complete exlsn function: No such file or directory
elglob: fatal: unable to complete exlsn function: No such file or directory
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 227 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] host/rootfs: Always fail if there is a globbing problem
2025-12-28 21:56 ` Alyssa Ross
@ 2025-12-29 2:23 ` Demi Marie Obenour
2026-02-02 15:24 ` Alyssa Ross
0 siblings, 1 reply; 4+ messages in thread
From: Demi Marie Obenour @ 2025-12-29 2:23 UTC (permalink / raw)
To: Alyssa Ross; +Cc: Spectrum OS Development
[-- Attachment #1.1.1: Type: text/plain, Size: 942 bytes --]
On 12/28/25 16:56, Alyssa Ross wrote:
> Demi Marie Obenour <demiobenour@gmail.com> writes:
>
>> Better to fail than to continue after an unknown problem has happened.
>>
>> Signed-off-by: Demi Marie Obenour <demiobenour@gmail.com>
>> ---
>> host/rootfs/image/etc/s6-rc/static-nodes/up | 2 +-
>> host/rootfs/image/usr/bin/assign-devices | 2 +-
>> host/rootfs/image/usr/bin/run-vmm | 2 +-
>> host/rootfs/image/usr/bin/vm-import | 2 +-
>> host/rootfs/image/usr/bin/vm-start | 2 +-
>> 5 files changed, 5 insertions(+), 5 deletions(-)
>
> Networking test fails with this applied:
>
> + vm-import user /run/mnt/vms /run/mnt/storage
> elglob: fatal: unable to complete exlsn function: No such file or directory
> elglob: fatal: unable to complete exlsn function: No such file or directory
That is strange. Which directory doesn't exist?
--
Sincerely,
Demi Marie Obenour (she/her/hers)
[-- Attachment #1.1.2: OpenPGP public key --]
[-- Type: application/pgp-keys, Size: 7253 bytes --]
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] host/rootfs: Always fail if there is a globbing problem
2025-12-29 2:23 ` Demi Marie Obenour
@ 2026-02-02 15:24 ` Alyssa Ross
0 siblings, 0 replies; 4+ messages in thread
From: Alyssa Ross @ 2026-02-02 15:24 UTC (permalink / raw)
To: Demi Marie Obenour; +Cc: Spectrum OS Development
[-- Attachment #1: Type: text/plain, Size: 1383 bytes --]
Demi Marie Obenour <demiobenour@gmail.com> writes:
> On 12/28/25 16:56, Alyssa Ross wrote:
>> Demi Marie Obenour <demiobenour@gmail.com> writes:
>>
>>> Better to fail than to continue after an unknown problem has happened.
>>>
>>> Signed-off-by: Demi Marie Obenour <demiobenour@gmail.com>
>>> ---
>>> host/rootfs/image/etc/s6-rc/static-nodes/up | 2 +-
>>> host/rootfs/image/usr/bin/assign-devices | 2 +-
>>> host/rootfs/image/usr/bin/run-vmm | 2 +-
>>> host/rootfs/image/usr/bin/vm-import | 2 +-
>>> host/rootfs/image/usr/bin/vm-start | 2 +-
>>> 5 files changed, 5 insertions(+), 5 deletions(-)
>>
>> Networking test fails with this applied:
>>
>> + vm-import user /run/mnt/vms /run/mnt/storage
>> elglob: fatal: unable to complete exlsn function: No such file or directory
>> elglob: fatal: unable to complete exlsn function: No such file or directory
>
> That is strange. Which directory doesn't exist?
That issue seems to have gone away now, but there was another issue,
which turned out to be the elglob in run-vmm. The relevant glob here is
*/config/providers/net/*. If the first * matches something, but
config/providers/net does not exist below it, globbing fails. This is
not what we want. So we can only make this change in situations where
we'll never have a non-existent prefix of the glob path.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 227 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2026-02-02 15:24 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-12-05 16:26 [PATCH] host/rootfs: Always fail if there is a globbing problem Demi Marie Obenour
2025-12-28 21:56 ` Alyssa Ross
2025-12-29 2:23 ` Demi Marie Obenour
2026-02-02 15:24 ` Alyssa Ross
Code repositories for project(s) associated with this public inbox
https://spectrum-os.org/git/crosvm
https://spectrum-os.org/git/doc
https://spectrum-os.org/git/mktuntap
https://spectrum-os.org/git/nixpkgs
https://spectrum-os.org/git/spectrum
https://spectrum-os.org/git/ucspi-vsock
https://spectrum-os.org/git/www
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).