patches and low-level development discussion
 help / color / mirror / code / Atom feed
blob c788574cf95ec7fd0d93b656557f85fa80b31690 1212 bytes (raw)
name: host/rootfs/image/usr/bin/vm-service-run 	 # note: path name is non-authoritative(*)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
 
#!/usr/bin/execlineb -WS1
# SPDX-License-Identifier: EUPL-1.2+
# SPDX-FileCopyrightText: 2026 Demi Marie Obenour <demiobenour@gmail.com>

# Substitute all of the needed environment variables
# into both this script and its arguments
# (the subsequent command to run).  This substitutes
# the *caller*'s arguments.
multisubstitute {
  importas -iS VM
  importas -iS "#"
  importas -iS "1"
  importas -iS WAYLAND_DISPLAY
}

# Check that the VM name and service are reasonable.
# Then run the cgroup-setup program and the provided
# command line.  Avoid premature substitution by
# escaping ${#} and ${1} with backslashes.  Otherwise,
# they would be values for this script, not for the caller.
case -- "\\${#}@${VM}@\\${1}" {
  # s6-supervise might start passing extra arguments in the future, but
  # 0 arguments is not okay.
  "[1-9][0-9]*@[A-Za-z0-9_][A-Za-z0-9_.-]*@[A-Za-z_][A-Za-z0-9_-]*" {
    # The caller has been migrated from using -WS1 to using -Wp.
    # Pop the environment to preserve the original behavior.
    emptyenv -P cgroup-setup --leaf -- "\\${1}" $@
  }
}
fdmove -c 1 2
if { printf "Wrong VM name %s, \
parent argument count %s, or parent argument %s\n"
     $VM "\\$#" "\\${1}" }
exit 100

debug log:

solving c788574cf95ec7fd0d93b656557f85fa80b31690 ...
found c788574cf95ec7fd0d93b656557f85fa80b31690 in https://inbox.spectrum-os.org/spectrum-devel/20260721-cgroups-v4-5-46b2e5fff7b6@gmail.com/ ||
	https://inbox.spectrum-os.org/spectrum-devel/20260711-cgroups-v3-6-5cba61a20cba@gmail.com/

applying [1/1] https://inbox.spectrum-os.org/spectrum-devel/20260721-cgroups-v4-5-46b2e5fff7b6@gmail.com/
diff --git a/host/rootfs/image/usr/bin/vm-service-run b/host/rootfs/image/usr/bin/vm-service-run
new file mode 100755
index 0000000000000000000000000000000000000000..c788574cf95ec7fd0d93b656557f85fa80b31690

Checking patch host/rootfs/image/usr/bin/vm-service-run...
Applied patch host/rootfs/image/usr/bin/vm-service-run cleanly.

skipping https://inbox.spectrum-os.org/spectrum-devel/20260711-cgroups-v3-6-5cba61a20cba@gmail.com/ for c788574cf95ec7fd0d93b656557f85fa80b31690
index at:
100755 c788574cf95ec7fd0d93b656557f85fa80b31690	host/rootfs/image/usr/bin/vm-service-run

(*) Git path names are given by the tree(s) the blob belongs to.
    Blobs themselves have no identifier aside from the hash of its contents.^

Code repositories for project(s) associated with this public inbox

	https://spectrum-os.org/git/doc
	https://spectrum-os.org/git/mktuntap
	https://spectrum-os.org/git/spectrum
	https://spectrum-os.org/git/ucspi-vsock

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).