patches and low-level development discussion
 help / color / mirror / code / Atom feed
blob 0cb236f4a2e761b3238e4e80c1dd9eaa0a056241 1286 bytes (raw)
name: host/rootfs/image/usr/bin/run-flatpak 	 # 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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
 
#!/bin/execlineb -W
# SPDX-License-Identifier: EUPL-1.2+
# SPDX-FileCopyrightText: 2024-2025 Alyssa Ross <hi@alyssa.is>

backtick -E dir { mktemp -d /run/vm/by-id/XXXXXX }
backtick -E id { basename -- $dir }
if { useradd -P /run -Urd / -s /bin/nologin gpu-${id} }

if {
  elgetpositionals

  if { mkdir -p /run/configs/${id}/fs }

  if {
    ln -s /usr/lib/spectrum/img/appvm/blk /usr/lib/spectrum/img/appvm/vmlinux
      /run/configs/${id}
  }

  if { ln -s /run/configs/${id} ${dir}/config }

  if { create-vm-dependencies $id }

  if {
    nsenter --mount=${dir}/mount
    cd ${dir}/fs/config
    if { redirfd -w 1 type echo flatpak }
    mount-flatpak $@
  }

  piperw 4 3
  background {
    fdclose 3
    fdmove 0 4

    # Wait for the VMM to be up, then start the VM.
    if { redirfd -w 1 /dev/null head -1 }
    vm-start $id
  }
  fdclose 4

  foreground { run-vmm $id }
}

if { s6-instance-delete -- /run/service/vm-services $id }

if { umount ${dir}/mount } # mount namespace
if { umount ${dir}/mount } # private bind mount

# Atomically replace the VM directory with an empty one,
# which will keep holding the ID so it's not reused,
# but be ignored by lsvm.
if { mkdir /run/vm/by-id/.${id} }
if { exch /run/vm/by-id/.${id} $dir }
background { rm -rf /run/vm/by-id/.${id} }

debug log:

solving 0cb236f4 ...
found 0cb236f4 in https://inbox.spectrum-os.org/spectrum-devel/20251210105515.1033548-2-hi@alyssa.is/
found 6be21075 in https://inbox.spectrum-os.org/spectrum-devel/20251210105515.1033548-1-hi@alyssa.is/
found 2ef20433 in https://inbox.spectrum-os.org/spectrum-devel/20251209104429.663637-1-hi@alyssa.is/ ||
	https://inbox.spectrum-os.org/spectrum-devel/20251209121023.705026-12-hi@alyssa.is/
retrying d7914a7a as d7914a7
found d7914a7 in https://inbox.spectrum-os.org/spectrum-devel/20251201170458.4186683-11-hi@alyssa.is/ ||
	https://inbox.spectrum-os.org/spectrum-devel/20251201044534.977524-9-hi@alyssa.is/

applying [1/4] https://inbox.spectrum-os.org/spectrum-devel/20251201170458.4186683-11-hi@alyssa.is/
diff --git a/host/rootfs/image/usr/bin/run-flatpak b/host/rootfs/image/usr/bin/run-flatpak
new file mode 100755
index 0000000..d7914a7

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

skipping https://inbox.spectrum-os.org/spectrum-devel/20251201044534.977524-9-hi@alyssa.is/ for d7914a7
index at:
100755 d7914a7a49c90d15b33560239682fac6477c2e6e	host/rootfs/image/usr/bin/run-flatpak

applying [2/4] https://inbox.spectrum-os.org/spectrum-devel/20251209104429.663637-1-hi@alyssa.is/
diff --git a/host/rootfs/image/usr/bin/run-flatpak b/host/rootfs/image/usr/bin/run-flatpak
index d7914a7a..2ef20433 100755

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

skipping https://inbox.spectrum-os.org/spectrum-devel/20251209121023.705026-12-hi@alyssa.is/ for 2ef20433
index at:
100755 2ef20433481d6a653cacf19e3d94eb2fbeb16061	host/rootfs/image/usr/bin/run-flatpak

applying [3/4] https://inbox.spectrum-os.org/spectrum-devel/20251210105515.1033548-1-hi@alyssa.is/
diff --git a/host/rootfs/image/usr/bin/run-flatpak b/host/rootfs/image/usr/bin/run-flatpak
index 2ef20433..6be21075 100755


applying [4/4] https://inbox.spectrum-os.org/spectrum-devel/20251210105515.1033548-2-hi@alyssa.is/
diff --git a/host/rootfs/image/usr/bin/run-flatpak b/host/rootfs/image/usr/bin/run-flatpak
index 6be21075..0cb236f4 100755

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

index at:
100755 0cb236f4a2e761b3238e4e80c1dd9eaa0a056241	host/rootfs/image/usr/bin/run-flatpak

(*) 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/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).