patches and low-level development discussion
 help / color / mirror / code / Atom feed
blob 3de58c27facc78c48176d8f9a6dd1827ac926f1a 927 bytes (raw)

 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
35
36
37
38
39
40
41
42
43
44
45
46
 
#!/bin/execlineb -WP
# SPDX-License-Identifier: EUPL-1.2+
# SPDX-FileCopyrightText: 2025 Yureka Lilian <yureka@cyberchaos.dev>
# SPDX-FileCopyrightText: 2025 Alyssa Ross <hi@alyssa.is>

importas -i VM VM

s6-ipcserver-socketbinder -a 0770 /run/vm/by-id/${VM}/router-driver.sock
fdmove -c 3 0

s6-ipcserver-socketbinder -a 0770 /run/router/${VM}
fdmove -c 4 0

redirfd -r 0 /dev/null

if { chown -- vmm-${VM} /run/vm/by-id/${VM}/router-driver.sock }
if { chgrp -- vmm /run/router/${VM} }

# Notify readiness.
if {
  fdmove -c 5 1
  echo
}

s6-setuidgid router

bwrap
  --unshare-all
  --unshare-user
  --dev-bind / /
  --setenv RUST_LOG spectrum-router=debug,info
  --setenv LISTEN_FDS 2
  --tmpfs /tmp
  --dev /dev
  --tmpfs /dev/shm
  --ro-bind /nix /nix
  --ro-bind /etc /etc
  --tmpfs /run
  --ro-bind /usr /usr
  --ro-bind /lib /lib
  --bind /run/vm/by-id/${VM} /run/vm/by-id/${VM}
  --

getpid LISTEN_PID

spectrum-router

debug log:

solving 3de58c27facc78c48176d8f9a6dd1827ac926f1a ...
found 3de58c27facc78c48176d8f9a6dd1827ac926f1a in https://spectrum-os.org/git/spectrum

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