patches and low-level development discussion
 help / color / mirror / code / Atom feed
blob fe5e2f76d50bab0a75b897649041d46d9e95ff6b 672 bytes (raw)
name: host/rootfs/image/etc/s6-linux-init/run-image/service/vm-services/template/data/service/vhost-user-fs/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
 
#!/bin/execlineb -WS1
# SPDX-License-Identifier: EUPL-1.2+
# SPDX-FileCopyrightText: 2021-2025 Alyssa Ross <hi@alyssa.is>

cgroup-setup --leaf -- $1

importas -i VM VM

s6-ipcserver-socketbinder -a 0700 -B env/virtiofsd.sock

if { chown vmm-${VM} env/virtiofsd.sock }

if { fdmove 1 3 echo }
fdmove -c 3 0
redirfd -r 0 /dev/null

export TMPDIR /run

s6-envuidgid fs
s6-applyuidgid -Uzu 0
importas -i VM VM
nsenter --preserve-credentials -S0
  --mount=/run/vm/by-id/${VM}/ns/mnt
  --user=/run/vm/by-id/${VM}/ns/user

# Show the guest files owned by uid/gid 1000.
unshare -U --map-user 1000 --map-group 1000 --uts --ipc --cgroup

virtiofsd --fd 3 --shared-dir /run/fs/${VM}

debug log:

solving fe5e2f76d50bab0a75b897649041d46d9e95ff6b ...
found fe5e2f76d50bab0a75b897649041d46d9e95ff6b in https://inbox.spectrum-os.org/spectrum-devel/20260805-cgroups-v6-16-086c0f00f55f@gmail.com/ ||
	https://inbox.spectrum-os.org/spectrum-devel/20260731-cgroups-v5-16-b325bac9d34f@gmail.com/
found cb059aebc8dfe2c8a5b059d5bfea884de53bf922 in https://spectrum-os.org/git/spectrum
preparing index
index prepared:
100755 cb059aebc8dfe2c8a5b059d5bfea884de53bf922	host/rootfs/image/etc/s6-linux-init/run-image/service/vm-services/template/data/service/vhost-user-fs/run

applying [1/1] https://inbox.spectrum-os.org/spectrum-devel/20260805-cgroups-v6-16-086c0f00f55f@gmail.com/
diff --git a/host/rootfs/image/etc/s6-linux-init/run-image/service/vm-services/template/data/service/vhost-user-fs/run b/host/rootfs/image/etc/s6-linux-init/run-image/service/vm-services/template/data/service/vhost-user-fs/run
index cb059aebc8dfe2c8a5b059d5bfea884de53bf922..fe5e2f76d50bab0a75b897649041d46d9e95ff6b 100755

Checking patch host/rootfs/image/etc/s6-linux-init/run-image/service/vm-services/template/data/service/vhost-user-fs/run...
Applied patch host/rootfs/image/etc/s6-linux-init/run-image/service/vm-services/template/data/service/vhost-user-fs/run cleanly.

skipping https://inbox.spectrum-os.org/spectrum-devel/20260731-cgroups-v5-16-b325bac9d34f@gmail.com/ for fe5e2f76d50bab0a75b897649041d46d9e95ff6b
index at:
100755 fe5e2f76d50bab0a75b897649041d46d9e95ff6b	host/rootfs/image/etc/s6-linux-init/run-image/service/vm-services/template/data/service/vhost-user-fs/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).