<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>230969</bug_id>
          
          <creation_ts>2021-09-29 10:43:46 -0700</creation_ts>
          <short_desc>[GTK][WPE] Enable bwrap launcher build on bots</short_desc>
          <delta_ts>2021-10-03 08:06:39 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>WebKitGTK</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Philippe Normand">pnormand</reporter>
          <assigned_to name="Philippe Normand">pnormand</assigned_to>
          <cc>annulen</cc>
    
    <cc>bugs-noreply</cc>
    
    <cc>clopez</cc>
    
    <cc>ews-watchlist</cc>
    
    <cc>gyuyoung.kim</cc>
    
    <cc>mcatanzaro</cc>
    
    <cc>ryuan.choi</cc>
    
    <cc>sergio</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1798444</commentid>
    <comment_count>0</comment_count>
    <who name="Philippe Normand">pnormand</who>
    <bug_when>2021-09-29 10:43:46 -0700</bug_when>
    <thetext>So that it&apos;s code does not bitrot.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1798445</commentid>
    <comment_count>1</comment_count>
      <attachid>439626</attachid>
    <who name="Philippe Normand">pnormand</who>
    <bug_when>2021-09-29 10:44:56 -0700</bug_when>
    <thetext>Created attachment 439626
Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1798510</commentid>
    <comment_count>2</comment_count>
      <attachid>439626</attachid>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2021-09-29 13:06:22 -0700</bug_when>
    <thetext>Comment on attachment 439626
Patch

Ehh, I can&apos;t decide if this is a good change or not. It seems reasonable, so r=me if you decide to proceed. Here&apos;s what I&apos;m thinking: building bubblewrap sandbox enabled on buildbots and EWS is definitely good to do. We surely want all tests to run with the sandbox enabled, because they are not meaningfully testing the code that users actually run otherwise (or, in cases where the sandbox is not yet enabled, the code that we want users to actually run). So we surely want to do that. 

The downside is that now we need to modify each downstream flatpak runtime and each flatpak app that bundles WebKitGTK to build with -DENABLE_BUBBLEWRAP_SANDBOX=OFF (because bubblewrap will not be available in these environments, since it is useless under flatpak). That is hardly a big deal. For the GNOME runtime, it would be a one-line change. It might confuse some app developers, but hopefully most app developers inherit WebKitGTK from a runtime instead of building it themselves. So... I think that&apos;s OK.

The alternative way to accomplish this would be to enable -DENABLE_BUBBLEWRAP_SANDBOX at the buildbot config or build-webkit level rather than here in CMake. Modifying the config of every bot would be annoying, but perhaps this could be something that build-webkit just knows to pass, because build-webkit is the one special time that we want to build with bubblewrap sandbox enabled inside a flatpak environment?

Whatever. Your call.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1798513</commentid>
    <comment_count>3</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2021-09-29 13:10:21 -0700</bug_when>
    <thetext>(In reply to Michael Catanzaro from comment #2)
&gt; We surely
&gt; want all tests to run with the sandbox enabled, because they are not
&gt; meaningfully testing the code that users actually run otherwise (or, in
&gt; cases where the sandbox is not yet enabled, the code that we want users to
&gt; actually run). So we surely want to do that. 

Also I know we want to avoid mistakes like: spend months developing feature using build-webkit, then discover it doesn&apos;t work with the sandbox enabled and is really hard to redesign. I understand you&apos;ve been there, done that with a web process feature that was going to depend on host network access. That sounds horribly disheartening. Much better to notice the problems immediately instead.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1798515</commentid>
    <comment_count>4</comment_count>
    <who name="Philippe Normand">pnormand</who>
    <bug_when>2021-09-29 13:13:38 -0700</bug_when>
    <thetext>In g-b-m you already build-depend on bwrap:

https://gitlab.gnome.org/GNOME/gnome-build-meta/-/blob/master/elements/sdk/webkitgtk.bst#L12

Was that an oversight?

IIUC the bwrap process launcher won&apos;t be used at runtime anyway if the UIProcess is running in a flatpak runtime.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1798523</commentid>
    <comment_count>5</comment_count>
    <who name="Philippe Normand">pnormand</who>
    <bug_when>2021-09-29 13:21:03 -0700</bug_when>
    <thetext>(In reply to Philippe Normand from comment #4)
&gt; In g-b-m you already build-depend on bwrap:
&gt; 
&gt; https://gitlab.gnome.org/GNOME/gnome-build-meta/-/blob/master/elements/sdk/
&gt; webkitgtk.bst#L12
&gt; 
&gt; Was that an oversight?
&gt; 
&gt; IIUC the bwrap process launcher won&apos;t be used at runtime anyway if the
&gt; UIProcess is running in a flatpak runtime.

Or maybe I am misunderstanding this:

https://github.com/WebKit/WebKit/blob/main/Source/WebKit/UIProcess/Launcher/glib/ProcessLauncherGLib.cpp#L174..L184</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1798855</commentid>
    <comment_count>6</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2021-09-30 07:11:01 -0700</bug_when>
    <thetext>(In reply to Philippe Normand from comment #4)
&gt; In g-b-m you already build-depend on bwrap:
&gt; 
&gt; https://gitlab.gnome.org/GNOME/gnome-build-meta/-/blob/master/elements/sdk/
&gt; webkitgtk.bst#L12
&gt; 
&gt; Was that an oversight?

An oversight in my previous comment, yes! But not in gnome-build-meta. That&apos;s there for GNOME OS.

&gt; IIUC the bwrap process launcher won&apos;t be used at runtime anyway if the
&gt; UIProcess is running in a flatpak runtime.

Right, and gnome-build-meta proves that it works. I&apos;m typing this comment in Tech Preview with bubblewrap sandbox enabled at build time but disabled at runtime. Just didn&apos;t realize it was enabled before you noticed.

That said, it&apos;s still not available in the flatpak runtime (you&apos;ll notice we have it in sdk-deps to ensure it doesn&apos;t appear in the SDK) so every app bundling WebKit will have to pass -DENABLE_BUBBLEWRAP_SANDBOX=OFF. But apps should really probably not bundle WebKit.

So I think it&apos;s fine. Still your call.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1799719</commentid>
    <comment_count>7</comment_count>
    <who name="EWS">ews-feeder</who>
    <bug_when>2021-10-02 02:04:22 -0700</bug_when>
    <thetext>Committed r283436 (242423@main): &lt;https://commits.webkit.org/242423@main&gt;

All reviewed patches have been landed. Closing bug and clearing flags on attachment 439626.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1799722</commentid>
    <comment_count>8</comment_count>
    <who name="Carlos Alberto Lopez Perez">clopez</who>
    <bug_when>2021-10-02 03:03:27 -0700</bug_when>
    <thetext>(In reply to Philippe Normand from comment #4)
&gt; IIUC the bwrap process launcher won&apos;t be used at runtime anyway if the
&gt; UIProcess is running in a flatpak runtime.

How this works? It may be interesting to do the same when running inside docker. 
Do you know which part of the code does this check?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1799723</commentid>
    <comment_count>9</comment_count>
    <who name="Philippe Normand">pnormand</who>
    <bug_when>2021-10-02 03:15:55 -0700</bug_when>
    <thetext>https://github.com/WebKit/WebKit/blob/main/Source/WebKit/UIProcess/Launcher/glib/ProcessLauncherGLib.cpp#L174..L184 :)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1799850</commentid>
    <comment_count>10</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2021-10-03 08:06:39 -0700</bug_when>
    <thetext>As you can see, the check is there for docker already, but I&apos;m not sure if it actually works for podman, it might be limited to moby only.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>439626</attachid>
            <date>2021-09-29 10:44:56 -0700</date>
            <delta_ts>2021-10-02 02:04:24 -0700</delta_ts>
            <desc>Patch</desc>
            <filename>bug-230969-20210929104455.patch</filename>
            <type>text/plain</type>
            <size>3581</size>
            <attacher name="Philippe Normand">pnormand</attacher>
            
              <data encoding="base64">U3VidmVyc2lvbiBSZXZpc2lvbjogMjgzMjMzCmRpZmYgLS1naXQgYS9Tb3VyY2UvY21ha2UvT3B0
aW9uc0dUSy5jbWFrZSBiL1NvdXJjZS9jbWFrZS9PcHRpb25zR1RLLmNtYWtlCmluZGV4IGY5ZWRj
OTE4ZTQ2OWZmZmE4NzMzMDkzMWU0N2ZmOWU2Mzc5MjYwNTYuLmMyOTA5ZGI4ZGFiNDk5ZGNjODVj
MzY4OWRlMTYyNWIxOGQ1ZmZlNDQgMTAwNjQ0Ci0tLSBhL1NvdXJjZS9jbWFrZS9PcHRpb25zR1RL
LmNtYWtlCisrKyBiL1NvdXJjZS9jbWFrZS9PcHRpb25zR1RLLmNtYWtlCkBAIC05OCwxOSArOTgs
MTUgQEAgZWxzZSAoKQogZW5kaWYgKCkKIAogaWYgKENNQUtFX1NZU1RFTV9OQU1FIE1BVENIRVMg
IkxpbnV4IikKKyAgICBXRUJLSVRfT1BUSU9OX0RFRkFVTFRfUE9SVF9WQUxVRShFTkFCTEVfQlVC
QkxFV1JBUF9TQU5EQk9YIFBVQkxJQyBPTikKICAgICBXRUJLSVRfT1BUSU9OX0RFRkFVTFRfUE9S
VF9WQUxVRShFTkFCTEVfTUVNT1JZX1NBTVBMRVIgUFJJVkFURSBPTikKICAgICBXRUJLSVRfT1BU
SU9OX0RFRkFVTFRfUE9SVF9WQUxVRShFTkFCTEVfUkVTT1VSQ0VfVVNBR0UgUFJJVkFURSBPTikK
IGVsc2UgKCkKKyAgICBXRUJLSVRfT1BUSU9OX0RFRkFVTFRfUE9SVF9WQUxVRShFTkFCTEVfQlVC
QkxFV1JBUF9TQU5EQk9YIFBV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