patches and low-level development discussion
 help / color / mirror / code / Atom feed
blob a306d9903da6da920efa55eccdfb4f3d14698a79 2069 bytes (raw)
name: host/rootfs/image/etc/s6-rc/weston/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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
 
#!/bin/execlineb -Wp
# SPDX-License-Identifier: EUPL-1.2+
# SPDX-FileCopyrightText: 2021, 2025 Alyssa Ross <hi@alyssa.is>

multisubstitute {
  importas -Siu WAYLAND_DISPLAY
  importas -Si 1
}

cgroup-setup --leaf --no-wait -- $1

piperw 4 3
background {
  fdclose 3

  if {
    fdmove -c 0 4
    redirfd -w 1 /dev/null
    head -c 1
  }
  fdclose 4

  if { chmod -- 0770 $WAYLAND_DISPLAY }
  if { chgrp -- wayland $WAYLAND_DISPLAY }

  fdmove -c 1 5
  echo
}
fdclose 4
fdclose 5

# Workaround for
# https://gitlab.freedesktop.org/wayland/weston/-/merge_requests/1911
if { mkdir -p -m 0700 /run/user/0 }

backtick USER { id -un }
backtick HOME {
  importas -i user USER
  homeof $user
}

if { install -do wayland -g wayland -m 0770 /run/wayland }
if { chown wayland /dev/tty0 /dev/tty1 }
redirfd -r 0 /dev/tty1

importas -i home HOME
cd $home
if { udevadm settle }
s6-setuidgid wayland
bwrap
  # no --unshare-net, breaks udev hotplug
  --unshare-ipc
  --unshare-uts
  --unshare-cgroup
  --cap-add CAP_SYS_TTY_CONFIG
  --dev-bind /dev /dev
  --bind /run /run
  --ro-bind /etc /etc
  --ro-bind /nix /nix
  --ro-bind /usr /usr
  --ro-bind /lib /lib
  --ro-bind /bin /bin
  --ro-bind /sbin /sbin
  # For /run/seatd.sock
  --tmpfs /run
  # For OpenGL/Vulkan/etc
  --ro-bind /run/opengl-driver /run/opengl-driver
  # For udev
  --ro-bind /run/udev /run/udev
  --bind /run/root-terminal /run/root-terminal
  --tmpfs /tmp
  --tmpfs /dev/shm
  # Filtered /proc (without nasty stuff)
  --proc /proc
  --ro-bind /proc/sys /proc/sys
  --tmpfs /proc/fs
  --remount-ro /proc/fs
  --tmpfs /proc/irq
  --remount-ro /proc/irq
  --ro-bind /dev/null /proc/kallsyms
  --ro-bind /sys /sys
  --dev /dev
  # GPUs
  --dev-bind /dev/dri /dev/dri
  # Input devices
  --dev-bind /dev/input /dev/input
  # Virtual consoles
  --dev-bind /dev/tty1 /dev/tty1
  --dev-bind /dev/tty0 /dev/tty0
  # Kernel console
  --dev-bind /dev/console /dev/console
  # So that Weston can create its listening socket
  --bind /run/user/0 /run/user/0
  --bind /run/wayland /run/wayland
  --
weston -S $WAYLAND_DISPLAY

debug log:

solving a306d9903da6da920efa55eccdfb4f3d14698a79 ...
found a306d9903da6da920efa55eccdfb4f3d14698a79 in https://inbox.spectrum-os.org/spectrum-devel/20260711-cgroups-v3-20-5cba61a20cba@gmail.com/ ||
	https://inbox.spectrum-os.org/spectrum-devel/20260721-cgroups-v4-19-46b2e5fff7b6@gmail.com/
found 8b065ee9a535d0a08e9255900c73b88a0c376d4b in https://spectrum-os.org/git/spectrum
preparing index
index prepared:
100755 8b065ee9a535d0a08e9255900c73b88a0c376d4b	host/rootfs/image/etc/s6-rc/weston/run

applying [1/1] https://inbox.spectrum-os.org/spectrum-devel/20260711-cgroups-v3-20-5cba61a20cba@gmail.com/
diff --git a/host/rootfs/image/etc/s6-rc/weston/run b/host/rootfs/image/etc/s6-rc/weston/run
old mode 100644
new mode 100755
index 8b065ee9a535d0a08e9255900c73b88a0c376d4b..a306d9903da6da920efa55eccdfb4f3d14698a79

Checking patch host/rootfs/image/etc/s6-rc/weston/run...
warning: host/rootfs/image/etc/s6-rc/weston/run has type 100755, expected 100644
Applied patch host/rootfs/image/etc/s6-rc/weston/run cleanly.

skipping https://inbox.spectrum-os.org/spectrum-devel/20260721-cgroups-v4-19-46b2e5fff7b6@gmail.com/ for a306d9903da6da920efa55eccdfb4f3d14698a79
index at:
100755 a306d9903da6da920efa55eccdfb4f3d14698a79	host/rootfs/image/etc/s6-rc/weston/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).