wpe-simple-launcher: Add recipe - #603
Conversation
There was a problem hiding this comment.
Pull request overview
Adds a new Yocto recipe and helper scripts to build and ship wpe-simple-launcher plus a control helper (wpe-ctl) and an environment/setup wrapper (wpe-exported-wayland) for launching WPEWebKit on-device.
Changes:
- Introduces
wpe-simple-launcher_git.bbto fetch/build/installwpe-simple-launcherand helper scripts. - Adds
wpe-exported-waylandwrapper to set WPE/GStreamer environment and forward Wayland/XDG runtime vars. - Adds
wpe-ctlhelper to write commands into the launcher control channel.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 6 comments.
| File | Description |
|---|---|
| recipes-browser/wpe-simple-launcher/wpe-simple-launcher/wpe-exported-wayland | Adds a launch wrapper that configures environment and runs wpe-simple-launcher (optionally via su). |
| recipes-browser/wpe-simple-launcher/wpe-simple-launcher/wpe-ctl | Adds a control helper script to write commands to the control channel path. |
| recipes-browser/wpe-simple-launcher/wpe-simple-launcher_git.bb | Adds the Yocto recipe that fetches/builds and installs the launcher and scripts. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
d2e07db to
8bcf1b3
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 3 out of 3 changed files in this pull request and generated no new comments.
Suppressed comments (1)
recipes-browser/wpe-simple-launcher/wpe-simple-launcher/wpe-exported-wayland:41
- The Wayland/XDG env propagation is brittle:
pidof weston-keyboardcan return multiple PIDs or nothing, which makes the/proc/$(pidof ...)/environpath invalid and causesexport "${WAYLAND_DISPLAY?}"/export "${XDG_RUNTIME_DIR?}"to abort the script. Also usingstringson/proc/.../environadds an avoidable runtime dependency and may not parse NUL-separated env reliably.
Consider resolving a single PID once, using tr '\0' '\n' to parse the environ, anchoring the matches, and falling back to already-set env vars before failing with a clearer message.
# Ensure Wayland and XDG runtime environment variables are propagated
WAYLAND_DISPLAY=$(strings < "/proc/$(pidof weston-keyboard)/environ" | grep WAYLAND_DISPLAY)
XDG_RUNTIME_DIR=$(strings < "/proc/$(pidof weston-keyboard)/environ" | grep XDG_RUNTIME_DIR)
export "${WAYLAND_DISPLAY?}"
export "${XDG_RUNTIME_DIR?}"
Add the wpe-simple-launcher recipe: an on-device WPEWebKit launcher that opens a URL and exposes a FIFO control channel through the wpe-ctl helper. It builds the launcher from the upstream main branch and installs the wpe-ctl and wpe-exported-wayland helper scripts. Change-Type: patch Co-authored-by: Copilot Autofix <175728472+Copilot@users.noreply.github.com>
7c1d2f5 to
ead2b5c
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 4 out of 4 changed files in this pull request and generated 5 comments.
Suppressed comments (1)
recipes-browser/wpe-simple-launcher/wpe-simple-launcher/wpe-exported-wayland:47
- Exporting
"${WAYLAND_DISPLAY?}"/"${XDG_RUNTIME_DIR?}"relies on those variables containingNAME=VALUEstrings. If either grep misses, the script exits with a generic shell 'parameter not set' message instead of the script's own error. Parsing out the values and emitting an explicit error makes failures easier to diagnose.
WAYLAND_DISPLAY="$(tr '\0' '\n' < "/proc/$WESTON_PID/environ" | grep -m1 '^WAYLAND_DISPLAY=')"
XDG_RUNTIME_DIR="$(tr '\0' '\n' < "/proc/$WESTON_PID/environ" | grep -m1 '^XDG_RUNTIME_DIR=')"
export "${WAYLAND_DISPLAY?}"
export "${XDG_RUNTIME_DIR?}"
| install -m 0755 ${S}/wpe-ctl ${D}${bindir}/wpe-ctl | ||
| install -m 0755 ${S}/wpe-exported-wayland ${D}${bindir}/wpe-exported-wayland |
python-is-python3 only ships the python -> python3 symlink, so it needs just the interpreter binary provided by python3-core rather than the full python3 metapackage. Narrow the runtime dependency so images that only want the symlink do not pull in the entire python3 module set. Change-Type: patch
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
3cbfad9 to
49c2b61
Compare
| do_install:append() { | ||
| install -d ${D}${bindir} | ||
| install -m 0755 ${B}/wpe-simple-launcher ${D}${bindir}/wpe-simple-launcher | ||
| install -m 0755 ${UNPACKDIR}/wpe-ctl ${D}${bindir}/wpe-ctl | ||
| install -m 0755 ${UNPACKDIR}/wpe-exported-wayland ${D}${bindir}/wpe-exported-wayland |
| # Check if the script is run as root and switch to the 'weston' user if needed | ||
| if [ "$(id -u)" -eq 0 ]; then | ||
| su -s /bin/sh weston -c 'ctl="$1"; shift; exec /usr/bin/wpe-simple-launcher --ctrl "$ctl" "$@"' sh "$CTL_FILE" "$@" | ||
| else | ||
| exec /usr/bin/wpe-simple-launcher --ctrl "$CTL_FILE" "$@" | ||
| fi |
Add the wpe-simple-launcher recipe: an on-device WPEWebKit launcher that opens a URL and exposes a FIFO control channel through the wpe-ctl helper. It builds the launcher from the upstream main branch and installs the wpe-ctl and wpe-exported-wayland helper scripts.
Also added:
python-is-python3: Depend on python3-core instead of python3as a fix for the oe-linter.