Bug 187470 - [Flatpak] Feature options to build-webkit and --makeargs are not passed inside the sandbox
Summary: [Flatpak] Feature options to build-webkit and --makeargs are not passed insid...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: Other
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Thibault Saunier
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2018-07-09 08:37 PDT by Adrian Perez
Modified: 2018-07-10 03:16 PDT (History)
6 users (show)

See Also:


Attachments
Patch (1.66 KB, patch)
2018-07-09 09:01 PDT, Thibault Saunier
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Adrian Perez 2018-07-09 08:37:51 PDT
Certain options which are valid for “build-webkit” are never passed down
to the instance that runs inside the Flatpak sandbox. For example, happens
with “--cmakeargs=...” (output reformatted, to ease reading):

  % build-webkit --gtk --release --makeargs='-j32'                          
  Building flatpak based environment
  Building webkit
  Running in sandbox: "flatpak" "build" "--die-with-parent" "--bind-mount=/run/shm=/dev/shm"
     "--bind-mount=/etc/perl=/home/aperez/WebKit/WebKitBuild/GTK/FlatpakTreeRelease/files/lib/perl"
     "--bind-mount=/run/host//tmp=/tmp" "--bind-mount=/app/webkit=/home/aperez/WebKit"
     "--bind-mount=/app/webkit/WebKitBuild/Release=/home/aperez/WebKit/WebKitBuild/GTK/Release"
     "--env=LANG=en_US.utf8" "--env=WEBKIT_TOP_LEVEL=/app/"
     "--env=TEST_RUNNER_INJECTED_BUNDLE_FILENAME=/app/webkit/lib/libTestRunnerInjectedBundle.so"
     "--share=ipc" "--socket=x11" "--socket=wayland" "--device=all" "--share=network" "--socket=pulseaudio"
     "--system-talk-name=org.freedesktop.GeoClue2" "--filesystem=host" "--socket=system-bus"
     "--talk-name=org.freedesktop.Flatpak" "--env=GST_PRESET_PATH=/app/share/gstreamer-1.0/presets/" 
     "/home/aperez/WebKit/WebKitBuild/GTK/FlatpakTreeRelease" "/app/webkit/Tools/Scripts/build-webkit"
     "--release" "--gtk" "--prefix=/app"

  +  cmake --build /app/webkit/WebKitBuild/Release --config Release -- 
  ...

As per Thibault's suggestion, I tried “webkit-flatpak” insted, to no avail:

  % webkit-flatpak --release --gtk --command build-webkit --gtk --release --makeargs='-j32'
  Building webkit
  Running in sandbox: "flatpak" "build" "--die-with-parent" "--bind-mount=/run/shm=/dev/shm"
     "--bind-mount=/etc/perl=/home/aperez/WebKit/WebKitBuild/GTK/FlatpakTreeRelease/files/lib/perl"
     "--bind-mount=/run/host//tmp=/tmp" "--bind-mount=/app/webkit=/home/aperez/WebKit"
     "--bind-mount=/app/webkit/WebKitBuild/Release=/home/aperez/WebKit/WebKitBuild/GTK/Release"
     "--env=LANG=en_US.utf8" "--env=WEBKIT_TOP_LEVEL=/app/"
     "--env=TEST_RUNNER_INJECTED_BUNDLE_FILENAME=/app/webkit/lib/libTestRunnerInjectedBundle.so"
     "--share=ipc" "--socket=x11" "--socket=wayland" "--device=all" "--share=network"
     "--socket=pulseaudio" "--system-talk-name=org.freedesktop.GeoClue2" "--filesystem=host"
     "--socket=system-bus" "--talk-name=org.freedesktop.Flatpak"
     "--env=GST_PRESET_PATH=/app/share/gstreamer-1.0/presets/"
     "/home/aperez/WebKit/WebKitBuild/GTK/FlatpakTreeRelease"
     "/app/webkit/Tools/Scripts/build-webkit" "--release" "--gtk" "--prefix=/app"

  +  cmake --build /app/webkit/WebKitBuild/Release --config Release -- 
  ...

The same happens with “--help” (so it's impossible to read the output from
“build-webkit --help” when Flatpak is in use), and feature flag options like
“--web-rtc” (nor the counterparts like “--no-web-rtc”), which are never
passed down to the instance that runs inside the sandbox.
Comment 1 Thibault Saunier 2018-07-09 09:01:26 PDT
Created attachment 344590 [details]
Patch
Comment 2 WebKit Commit Bot 2018-07-10 03:15:07 PDT
Comment on attachment 344590 [details]
Patch

Clearing flags on attachment: 344590

Committed r233681: <https://trac.webkit.org/changeset/233681>
Comment 3 WebKit Commit Bot 2018-07-10 03:15:08 PDT
All reviewed patches have been landed.  Closing bug.
Comment 4 Radar WebKit Bug Importer 2018-07-10 03:16:24 PDT
<rdar://problem/42016754>