Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 282e85933b5fe8c3189dd9c8acc68d042de86c9f
      
https://github.com/WebKit/WebKit/commit/282e85933b5fe8c3189dd9c8acc68d042de86c9f
  Author: Nikolas Zimmermann <[email protected]>
  Date:   2026-05-13 (Wed, 13 May 2026)

  Changed paths:
    A .wkdev-sdk-version
    M Tools/Scripts/browserperfdash-benchmark
    M Tools/Scripts/build-webkit
    A Tools/Scripts/container-sdk-autoenter
    M Tools/Scripts/generate-bundle
    M Tools/Scripts/install-built-product
    M Tools/Scripts/run-api-tests
    M Tools/Scripts/run-bindings-tests
    M Tools/Scripts/run-builtins-generator-tests
    M Tools/Scripts/run-css-property-code-generation-tests
    M Tools/Scripts/run-gtk-tests
    M Tools/Scripts/run-javascriptcore-tests
    M Tools/Scripts/run-minibrowser
    M Tools/Scripts/run-perf-tests
    M Tools/Scripts/run-qt-wpe-minibrowser
    M Tools/Scripts/run-webdriver
    M Tools/Scripts/run-webdriver-tests
    M Tools/Scripts/run-webkit-httpd
    M Tools/Scripts/run-webkit-tests
    M Tools/Scripts/run-wpe-tests
    M Tools/Scripts/test-bundle
    M Tools/Scripts/test-webkitperl
    M Tools/Scripts/test-webkitpy
    M Tools/Scripts/test262-runner
    M Tools/Scripts/update-webkitgtk-libs
    M Tools/Scripts/update-webkitwpe-libs
    M Tools/Scripts/webkitdirs.pm
    M Tools/Scripts/webkitpy/port/linux_container_sdk_utils.py
    M Tools/Scripts/webkitpy/style/checker.py
    M Tools/Scripts/webkitpy/style/checkers/common.py
    M Tools/glib/run-webkit-app.py

  Log Message:
  -----------
  [GTK][WPE][Tools] Auto-enter WebKit Container SDK from host wrappers
https://bugs.webkit.org/show_bug.cgi?id=314546

Reviewed by Carlos Alberto Lopez Perez.

Add .wkdev-sdk-version at the repo root pinning the wkdev-sdk image
version, and teach the WebKit wrapper scripts (build-webkit,
run-webkit-tests, run-api-tests, run-minibrowser, run-{gtk,wpe}-tests
plus the rest of the bot-relevant wrappers listed below, including
update-webkit{gtk,wpe}-libs) to relaunch themselves inside a
'wkdev-build' container when invoked on the host. The container is
auto-created with `podman create` on first use, pulling
ghcr.io/igalia/wkdev-sdk:<pinned> from the registry. Host CWD under
$HOME is translated to /host/home/$USER and passed as --workdir so
relative paths keep working.

Auto-enter is opt-in: set WEBKIT_CONTAINER_SDK_ENABLE_AUTOENTER=1 to
turn it on (e.g. on the bots, or in a developer shell). Without that
flag the wrappers run on the host exactly as before.

Container layout:
  * image:      ghcr.io/igalia/wkdev-sdk:<pinned-version>
  * command:    sleep infinity (image has no ENTRYPOINT)
  * home dir:   $HOME/wkdev-build (host) -> /home/$USER (container)
  * host home:  $HOME (host) -> /host/home/$USER (container)
  * userns:     keep-id; per-exec --user $UID:$GID
  * namespaces: --pid host --ipc host --network host
  * mounts:     /etc/{hosts,localtime,resolv.conf,machine-id}, /dev, /run/udev,
                /dev/dri, NVIDIA CDI (when present), /tmp/.X11-unix, audio
                (PULSE_SERVER or $XDG_RUNTIME_DIR/pulse), session and system
                DBus buses, accessibility (at-spi), dconf, $XDG_RUNTIME_DIR
                exposed as /host/run (for Wayland/PipeWire socket symlinks)

Deliberately NOT mounted: nested podman.sock, SSH keyring, systemd journal,
coredumps, themes/icons/fonts. No --cap-add flags (needed for
profiling/gdb/etc.).

First-run init runs once after `podman create` as root inside the
container: creates /run/user/$UID with the right perms, chowns
/jhbuild /opt/rust /sdk to the host UID, and marks /run/.wkdev-init-done.

The set of host env vars forwarded into the container mirrors what the
Flatpak SDK has been forwarding (see Tools/flatpak/flatpakutils.py's
env_var_{prefixes,suffixes}_to_keep / env_vars_to_keep) and adds the
GST_* prefix. WEBKIT_CONTAINER_SDK* internal flags are never forwarded.

When invoked on the host and the existing 'wkdev-build' container's
image does not match the pinned version, the container is stopped,
removed and recreated. The container home directory survives; ad-hoc
filesystem changes inside the container do not.

If 'podman' is not on $PATH the helpers print a prominent warning
pointing at https://github.com/Igalia/webkit-container-sdk and continue
on the host (auto-launch disabled).

When already inside a wkdev-sdk container the running SDK version (from
/etc/wkdev-sdk-version baked into the image) is compared against the
pinned one; on mismatch a prominent warning suggests re-running any
wrapper from the host to recreate the container, but execution continues.

The plan is to use that new mode on the bots to guarantee a certain SDK
image is used -- it also allows us to switch the used SDK image in a PR
that runs through EWS.

* .wkdev-sdk-version: Added.
* Tools/Scripts/browserperfdash-benchmark:
* Tools/Scripts/build-webkit:
* Tools/Scripts/container-sdk-autoenter: Copied from 
Tools/Scripts/browserperfdash-benchmark.
* Tools/Scripts/generate-bundle:
* Tools/Scripts/install-built-product:
* Tools/Scripts/run-api-tests:
* Tools/Scripts/run-bindings-tests:
* Tools/Scripts/run-builtins-generator-tests:
* Tools/Scripts/run-css-property-code-generation-tests:
* Tools/Scripts/run-gtk-tests:
* Tools/Scripts/run-javascriptcore-tests:
* Tools/Scripts/run-minibrowser:
* Tools/Scripts/run-perf-tests:
* Tools/Scripts/run-qt-wpe-minibrowser:
* Tools/Scripts/run-webdriver:
* Tools/Scripts/run-webdriver-tests:
* Tools/Scripts/run-webkit-httpd:
* Tools/Scripts/run-webkit-tests:
* Tools/Scripts/run-wpe-tests:
* Tools/Scripts/test-bundle:
* Tools/Scripts/test-webkitperl:
* Tools/Scripts/test-webkitpy:
* Tools/Scripts/test262-runner:
* Tools/Scripts/update-webkitgtk-libs:
* Tools/Scripts/update-webkitwpe-libs:
* Tools/Scripts/webkitdirs.pm:
(maybeEnterWebKitContainerSDK):
* Tools/Scripts/webkitpy/port/linux_container_sdk_utils.py:
(_env_var_should_be_forwarded):
(_print_prominent_warning):
(_read_first_line_of):
(_read_running_sdk_version):
(_source_dir):
(_read_pinned_sdk_version):
(_strip_unix_path_prefix):
(_translate_host_path_to_container):
(_podman_container_info):
(_xdg_runtime_dir):
(_xdg_config_home):
(_container_home_path):
(_bind_mount):
(_build_podman_create_args):
(_init_and_sync_container_runtime):
(_stop_and_remove_container):
(_create_container):
(_ensure_container_ready):
(maybe_enter_webkit_container_sdk):
(maybe_use_container_sdk_root_dir):
* Tools/Scripts/webkitpy/style/checker.py:
* Tools/Scripts/webkitpy/style/checkers/common.py:
* Tools/glib/run-webkit-app.py:

Canonical link: https://commits.webkit.org/313201@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to