<?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>280523</bug_id>
          
          <creation_ts>2024-09-27 09:49:42 -0700</creation_ts>
          <short_desc>[Tools][GTK][WPE] generate-bundle: Improve the universal bundle with a C wrapper and support for GTK4</short_desc>
          <delta_ts>2024-10-11 07:56:56 -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>Tools / Tests</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          <see_also>https://github.com/web-platform-tests/wpt/issues/47823</see_also>
    
    <see_also>https://bugs.webkit.org/show_bug.cgi?id=280835</see_also>
    
    <see_also>https://bugs.webkit.org/show_bug.cgi?id=281305</see_also>
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Carlos Alberto Lopez Perez">clopez</reporter>
          <assigned_to name="Carlos Alberto Lopez Perez">clopez</assigned_to>
          <cc>bugs-noreply</cc>
    
    <cc>dpino</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>2063784</commentid>
    <comment_count>0</comment_count>
    <who name="Carlos Alberto Lopez Perez">clopez</who>
    <bug_when>2024-09-27 09:49:42 -0700</bug_when>
    <thetext>We want to stop providing distro-specific bundles at https://webkitgtk.org/built-products/x86_64/release/nightly because:

 - Supporting old distros becomes increasingly hard as time advances because the constant desire/need of WebKit developers to use new compiler and library versions
 - Supporting X distros with distro-specific bundles means X times the work to maintain the bundle

We have a solution that generates a bundle that is distro-agnostic because it bundles WebKit and all the libraries needed to run it, including libc itself.
So this bundle doesn&apos;t use anything from the system where it runs other than the kernel. So it is basically like a container but without using container technologies. That way anyone can run it unprivileged (just unpack and execute)

The issue so far with this bundle was that the script wrapping the binaries was written in shell, so it was requiring a shell interpreter from the host so this lead to crashes when using webdriver because of:

 1. WebDriver starts with its own custom environment (LD_LIBRAY_PATH, etc)
 2. WebDriver calls to execute the MiniBrowser wrapper
 3. The MiniBrowser wrapper is a shell script, so it calls the host shell and then it crashes because of the environment where it is executed


The solution to that that I come with is to stop using a script in shell and provide a wrapper in C that can be built statically.

And so far so good, I did extensive testing with this new wrapper, I created a battery of tests with WebDriver (that I will upload on another bug) and I ran this battery of tests on 15 very different distributions (from Alpine to Ubuntu 20 to Fedora-last or gentoo, arch, etc) and on all of them worked without issues.

Another thing that I&apos;m changing here is supporting GTK4 for the WebKitGTK bundle. GTK3 support is removed because we will always want to provide bundles with the last nightly and seems that is going to be GTK4 from now on.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2063786</commentid>
    <comment_count>1</comment_count>
    <who name="Carlos Alberto Lopez Perez">clopez</who>
    <bug_when>2024-09-27 09:52:31 -0700</bug_when>
    <thetext>BTW; I forgot to mention that another issue of providing distro-specific bundles is that we are always disabling features for old distros that require new libraries to keep WebKit building. So in the end you are not getting the real-bleeding-edge WebKit when you use a distro-specific bundle.

This happened on the WPT CI where they still use Ubuntu-20.04 for the tests, see: https://github.com/web-platform-tests/wpt/issues/47823

The idea from now on is to provide them (and anyone else) with a generic bundle with all the features enabled.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2063794</commentid>
    <comment_count>2</comment_count>
    <who name="Carlos Alberto Lopez Perez">clopez</who>
    <bug_when>2024-09-27 10:22:36 -0700</bug_when>
    <thetext>Pull request: https://github.com/WebKit/WebKit/pull/34366</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2064322</commentid>
    <comment_count>3</comment_count>
    <who name="Carlos Alberto Lopez Perez">clopez</who>
    <bug_when>2024-09-30 13:47:50 -0700</bug_when>
    <thetext>After giving this a second thought I think &quot;universal bundle&quot; is a better description than &quot;generic bundle&quot;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2067175</commentid>
    <comment_count>4</comment_count>
    <who name="EWS">ews-feeder</who>
    <bug_when>2024-10-11 04:02:43 -0700</bug_when>
    <thetext>Committed 285012@main (dd6e6dfb40ef): &lt;https://commits.webkit.org/285012@main&gt;

Reviewed commits have been landed. Closing PR #34366 and removing active labels.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2067176</commentid>
    <comment_count>5</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2024-10-11 04:03:18 -0700</bug_when>
    <thetext>&lt;rdar://problem/137743534&gt;</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>