349 lines
8.2 KiB
TOML
349 lines
8.2 KiB
TOML
# Wayland validation-only configuration
|
|
|
|
# This is the bounded compositor validation slice.
|
|
|
|
include = ["desktop.toml", "redbear-legacy-base.toml", "redbear-legacy-desktop.toml", "redbear-device-services.toml", "redbear-netctl.toml"]
|
|
|
|
[general]
|
|
filesystem_size = 2048
|
|
|
|
[users.messagebus]
|
|
uid = 100
|
|
gid = 100
|
|
name = "messagebus"
|
|
home = "/nonexistent"
|
|
shell = "/usr/bin/false"
|
|
|
|
[groups.messagebus]
|
|
gid = 100
|
|
members = ["messagebus"]
|
|
|
|
[packages]
|
|
redbear-release = {}
|
|
redbear-hwutils = {}
|
|
redbear-info = {}
|
|
redbear-netctl = {}
|
|
dbus = {}
|
|
redbear-sessiond = {}
|
|
redbear-dbus-services = {}
|
|
firmware-loader = {}
|
|
evdevd = {}
|
|
udev-shim = {}
|
|
seatd = {}
|
|
mesa = {}
|
|
"pop-icon-theme.cursors" = {}
|
|
kwin = {}
|
|
xkeyboard-config = {}
|
|
|
|
[[files]]
|
|
path = "/usr/lib/init.d/12_dbus.service"
|
|
data = """
|
|
[unit]
|
|
description = "D-Bus system bus"
|
|
requires_weak = [
|
|
"00_base.target",
|
|
]
|
|
|
|
[service]
|
|
cmd = "dbus-daemon"
|
|
args = ["--system"]
|
|
type = "oneshot_async"
|
|
"""
|
|
|
|
[[files]]
|
|
path = "/var/lib/dbus"
|
|
data = ""
|
|
directory = true
|
|
mode = 0o755
|
|
|
|
[[files]]
|
|
path = "/run/dbus"
|
|
data = ""
|
|
directory = true
|
|
mode = 0o755
|
|
|
|
[[files]]
|
|
path = "/usr/lib/init.d/13_seatd.service"
|
|
data = """
|
|
[unit]
|
|
description = "seatd seat management daemon"
|
|
requires_weak = [
|
|
"12_dbus.service",
|
|
"13_redbear-sessiond.service",
|
|
]
|
|
|
|
[service]
|
|
cmd = "seatd"
|
|
args = ["-l", "info"]
|
|
type = "oneshot_async"
|
|
"""
|
|
|
|
[[files]]
|
|
path = "/usr/lib/init.d/13_redbear-sessiond.service"
|
|
data = """
|
|
[unit]
|
|
description = "Red Bear session broker (org.freedesktop.login1)"
|
|
requires_weak = [
|
|
"12_dbus.service",
|
|
]
|
|
|
|
[service]
|
|
cmd = "redbear-sessiond"
|
|
type = "oneshot_async"
|
|
"""
|
|
|
|
[[files]]
|
|
path = "/usr/lib/init.d/20_display.service"
|
|
data = """
|
|
[unit]
|
|
description = "Display session service (Wayland validation)"
|
|
requires_weak = [
|
|
"12_dbus.service",
|
|
"13_redbear-sessiond.service",
|
|
"13_seatd.service",
|
|
]
|
|
|
|
[service]
|
|
cmd = "/usr/bin/redbear-validation-session"
|
|
envs = { BROWSER = "/bin/netsurf-fb", VT = "3" }
|
|
type = "oneshot_async"
|
|
"""
|
|
|
|
[[files]]
|
|
path = "/usr/lib/init.d/30_console.service"
|
|
data = """
|
|
[unit]
|
|
description = "Console terminals"
|
|
requires_weak = [
|
|
"29_activate_console.service",
|
|
]
|
|
|
|
[service]
|
|
cmd = "getty"
|
|
args = ["2"]
|
|
type = "oneshot_async"
|
|
respawn = true
|
|
"""
|
|
|
|
[[files]]
|
|
path = "/usr/lib/init.d/29_activate_console.service"
|
|
data = """
|
|
[unit]
|
|
description = "Activate display VT"
|
|
requires_weak = [
|
|
"20_display.service",
|
|
]
|
|
|
|
[service]
|
|
cmd = "inputd"
|
|
args = ["-A", "3"]
|
|
type = "oneshot_async"
|
|
"""
|
|
|
|
[[files]]
|
|
path = "/usr/lib/init.d/31_debug_console.service"
|
|
data = """
|
|
[unit]
|
|
description = "Debug console"
|
|
requires_weak = [
|
|
"29_activate_console.service",
|
|
]
|
|
|
|
[service]
|
|
cmd = "getty"
|
|
args = ["/scheme/debug/no-preserve", "-J"]
|
|
type = "oneshot_async"
|
|
respawn = true
|
|
"""
|
|
|
|
[[files]]
|
|
path = "/usr/bin/redbear-validation-session"
|
|
mode = 0o755
|
|
data = """
|
|
#!/usr/bin/env sh
|
|
|
|
export DISPLAY=""
|
|
export WAYLAND_DISPLAY="${WAYLAND_DISPLAY:-wayland-0}"
|
|
export XDG_SESSION_TYPE=wayland
|
|
export LIBSEAT_BACKEND=seatd
|
|
export SEATD_SOCK=/run/seatd.sock
|
|
export QT_PLUGIN_PATH=/usr/plugins
|
|
export QT_QPA_PLATFORM_PLUGIN_PATH=/usr/plugins/platforms
|
|
export QML2_IMPORT_PATH=/usr/qml
|
|
export RUST_BACKTRACE=full
|
|
export RUST_LOG=debug
|
|
export XCURSOR_THEME=Pop
|
|
export XKB_CONFIG_ROOT=/usr/share/X11/xkb
|
|
|
|
if [ -z "${XDG_RUNTIME_DIR:-}" ]; then
|
|
export XDG_RUNTIME_DIR="/tmp/run/user/$(id -u)"
|
|
fi
|
|
|
|
mkdir -p "$XDG_RUNTIME_DIR"
|
|
chmod 700 "$XDG_RUNTIME_DIR" 2>/dev/null || true
|
|
|
|
wait_for_path() {
|
|
target="$1"
|
|
attempts=0
|
|
while [ "$attempts" -lt 30 ]; do
|
|
if [ -e "$target" ]; then
|
|
return 0
|
|
fi
|
|
attempts=$((attempts + 1))
|
|
sleep 1
|
|
done
|
|
return 1
|
|
}
|
|
|
|
if ! wait_for_path /run/dbus/system_bus_socket; then
|
|
echo "system D-Bus socket did not appear" >&2
|
|
exit 1
|
|
fi
|
|
|
|
sleep 2
|
|
|
|
wait_for_wayland_socket() {
|
|
socket_path="$XDG_RUNTIME_DIR/$WAYLAND_DISPLAY"
|
|
attempts=0
|
|
while [ "$attempts" -lt 30 ]; do
|
|
if [ -e "$socket_path" ]; then
|
|
return 0
|
|
fi
|
|
if ! kill -0 "$kwin_pid" 2>/scheme/null; then
|
|
return 1
|
|
fi
|
|
attempts=$((attempts + 1))
|
|
sleep 1
|
|
done
|
|
return 1
|
|
}
|
|
|
|
if [ -z "${DBUS_SESSION_BUS_ADDRESS:-}" ]; then
|
|
eval "$(dbus-launch --sh-syntax)"
|
|
fi
|
|
|
|
dbus-update-activation-environment \
|
|
DBUS_SESSION_BUS_ADDRESS \
|
|
DBUS_SESSION_BUS_PID \
|
|
WAYLAND_DISPLAY \
|
|
XDG_SESSION_TYPE \
|
|
XDG_RUNTIME_DIR \
|
|
DISPLAY \
|
|
HOME \
|
|
USER
|
|
|
|
if [ -d /usr/share/glib-2.0/schemas ]; then
|
|
glib-compile-schemas /usr/share/glib-2.0/schemas/
|
|
fi
|
|
|
|
export XCURSOR_THEME="${XCURSOR_THEME:-Pop}"
|
|
export XKB_CONFIG_ROOT="${XKB_CONFIG_ROOT:-/usr/share/X11/xkb}"
|
|
|
|
if [ -z "${KWIN_DRM_DEVICES:-}" ] && [ -e /scheme/drm/card0 ]; then
|
|
export KWIN_DRM_DEVICES=/scheme/drm/card0
|
|
fi
|
|
|
|
kwin_wayland_wrapper --drm &
|
|
kwin_pid=$!
|
|
|
|
if ! wait_for_wayland_socket; then
|
|
echo "kwin_wayland failed to expose $XDG_RUNTIME_DIR/$WAYLAND_DISPLAY" >&2
|
|
exit 1
|
|
fi
|
|
|
|
exec /usr/bin/wayland-session
|
|
"""
|
|
|
|
[[files]]
|
|
path = "/usr/bin/wayland-session"
|
|
mode = 0o755
|
|
data = """
|
|
#!/usr/bin/env ion
|
|
|
|
export HOME=/home/root
|
|
export USER=root
|
|
export LOGNAME=root
|
|
|
|
let session_started = "$HOME/.wayland-session.started"
|
|
rm -f $session_started
|
|
echo "started" > $session_started
|
|
export QT_PLUGIN_PATH=/usr/plugins
|
|
export QT_QPA_PLATFORM_PLUGIN_PATH=/usr/plugins/platforms
|
|
export QML2_IMPORT_PATH=/usr/qml
|
|
let smoke_ok = "$HOME/.qt6-wayland-smoke.ok"
|
|
let smoke_err = "$HOME/.qt6-wayland-smoke.err"
|
|
let smoke_log = "$HOME/.qt6-wayland-smoke.log"
|
|
let bootstrap_ok = "$HOME/.qt6-bootstrap-minimal.ok"
|
|
let bootstrap_log = "$HOME/.qt6-bootstrap-minimal.log"
|
|
let plugin_ok = "$HOME/.qt6-plugin-minimal.ok"
|
|
let plugin_err = "$HOME/.qt6-plugin-minimal.err"
|
|
let plugin_log = "$HOME/.qt6-plugin-minimal.log"
|
|
let smoke_minimal_ok = "$HOME/.qt6-wayland-smoke-minimal.ok"
|
|
let smoke_offscreen_ok = "$HOME/.qt6-wayland-smoke-offscreen.ok"
|
|
let smoke_wayland_ok = "$HOME/.qt6-wayland-smoke-wayland.ok"
|
|
let smoke_minimal_log = "$HOME/.qt6-wayland-smoke-minimal.log"
|
|
let smoke_offscreen_log = "$HOME/.qt6-wayland-smoke-offscreen.log"
|
|
let smoke_wayland_log = "$HOME/.qt6-wayland-smoke-wayland.log"
|
|
rm -f $smoke_ok $smoke_err
|
|
rm -f $smoke_log
|
|
rm -f $bootstrap_ok $bootstrap_log
|
|
rm -f $plugin_ok $plugin_err $plugin_log
|
|
rm -f $smoke_minimal_ok $smoke_offscreen_ok $smoke_wayland_ok
|
|
rm -f $smoke_minimal_log $smoke_offscreen_log $smoke_wayland_log
|
|
if which qt6-wayland-smoke >/scheme/null
|
|
if test -f /usr/plugins/platforms/libqminimal.so
|
|
echo "=== qminimal ELF header (guest) ==="
|
|
stat /usr/plugins/platforms/libqminimal.so
|
|
dd if=/usr/plugins/platforms/libqminimal.so bs=64 count=1 | od -An -tx1
|
|
else
|
|
echo "=== qminimal ELF header (guest) missing ==="
|
|
end
|
|
if env LD_DEBUG=all QT_DEBUG_PLUGINS=1 QT_QPA_PLATFORM=minimal qt6-bootstrap-check > $bootstrap_log ^> $bootstrap_log
|
|
touch $bootstrap_ok
|
|
else
|
|
if test -f $bootstrap_log
|
|
cat $bootstrap_log
|
|
end
|
|
echo "qt6-bootstrap-check minimal failed; see $bootstrap_log" > $smoke_err
|
|
end
|
|
|
|
if env LD_DEBUG=all QT_DEBUG_PLUGINS=1 QT_PLUGIN_PATH=/usr/plugins QT_QPA_PLATFORM_PLUGIN_PATH=/usr/plugins/platforms qt6-plugin-check /usr/plugins/platforms/libqminimal.so > $plugin_log ^> $plugin_log
|
|
touch $plugin_ok
|
|
else
|
|
if test -f $plugin_log
|
|
cat $plugin_log
|
|
end
|
|
echo "qt6-plugin-check failed; see $plugin_log" > $plugin_err
|
|
echo "qt6-plugin-check failed; see $plugin_log" > $smoke_err
|
|
end
|
|
|
|
if env QT_DEBUG_PLUGINS=1 QT_QPA_PLATFORM=minimal qt6-wayland-smoke > $smoke_minimal_log ^> $smoke_minimal_log
|
|
touch $smoke_minimal_ok
|
|
else
|
|
echo "qt6-wayland-smoke minimal failed; see $smoke_minimal_log" > $smoke_err
|
|
end
|
|
|
|
if env QT_DEBUG_PLUGINS=1 QT_QPA_PLATFORM=offscreen qt6-wayland-smoke > $smoke_offscreen_log ^> $smoke_offscreen_log
|
|
touch $smoke_offscreen_ok
|
|
else
|
|
echo "qt6-wayland-smoke offscreen failed; see $smoke_offscreen_log" > $smoke_err
|
|
end
|
|
|
|
if env QT_DEBUG_PLUGINS=1 QT_QPA_PLATFORM=wayland qt6-wayland-smoke > $smoke_wayland_log ^> $smoke_wayland_log
|
|
touch $smoke_wayland_ok
|
|
touch $smoke_ok
|
|
else
|
|
echo "qt6-wayland-smoke wayland failed; see $smoke_wayland_log" > $smoke_err
|
|
end
|
|
end
|
|
"""
|
|
|
|
|
|
[[files]]
|
|
path = "/etc/gtk-3.0/settings.ini"
|
|
data = """
|
|
[Settings]
|
|
gtk-cursor-theme-name = "Pop"
|
|
gtk-icon-theme-name = "Cosmic"
|
|
"""
|