<?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>242191</bug_id>
          
          <creation_ts>2022-06-30 07:48:03 -0700</creation_ts>
          <short_desc>[GLib] Modernize Tools/glib/apply-build-revision-to-files.py</short_desc>
          <delta_ts>2022-09-26 13:08:42 -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 Local Build</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          <see_also>https://bugs.webkit.org/show_bug.cgi?id=244682</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>
          <dependson>242176</dependson>
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Adrian Perez">aperez</reporter>
          <assigned_to name="Philippe Normand">philn</assigned_to>
          <cc>james.hilliard1</cc>
    
    <cc>philn</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1879363</commentid>
    <comment_count>0</comment_count>
    <who name="Adrian Perez">aperez</who>
    <bug_when>2022-06-30 07:48:03 -0700</bug_when>
    <thetext>In the review for bug #242176 we talked about cleaning up further the script
by removing Subversion-specific code, now that we do not use Subversion anymore.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1879364</commentid>
    <comment_count>1</comment_count>
    <who name="Adrian Perez">aperez</who>
    <bug_when>2022-06-30 07:55:11 -0700</bug_when>
    <thetext>Pull request: https://github.com/WebKit/WebKit/pull/1947</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1879518</commentid>
    <comment_count>2</comment_count>
    <who name="EWS">ews-feeder</who>
    <bug_when>2022-06-30 14:15:12 -0700</bug_when>
    <thetext>Committed 252012@main (d22439347db4): &lt;https://commits.webkit.org/252012@main&gt;

Reviewed commits have been landed. Closing PR #1947 and removing active labels.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1879519</commentid>
    <comment_count>3</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2022-06-30 14:16:13 -0700</bug_when>
    <thetext>&lt;rdar://problem/96245384&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1879687</commentid>
    <comment_count>4</comment_count>
    <who name="James Hilliard">james.hilliard1</who>
    <bug_when>2022-07-01 01:21:39 -0700</bug_when>
    <thetext>This commit causes wpewebkit builds to fail in buildroot on main:
&lt;urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:997)&gt;
Failed to download setuptools, retrying
Traceback (most recent call last):
  File &quot;/home/buildroot/buildroot/output/build/wpewebkit-custom/Tools/glib/apply-build-revision-to-files.py&quot;, line 25, in &lt;module&gt;
    import webkitpy  # noqa
  File &quot;/home/buildroot/buildroot/output/build/wpewebkit-custom/Tools/Scripts/webkitpy/__init__.py&quot;, line 91, in &lt;module&gt;
    import webkitscmpy
  File &quot;/home/buildroot/buildroot/output/build/wpewebkit-custom/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py&quot;, line 62, in &lt;module&gt;
    from webkitscmpy.commit import Commit
  File &quot;/home/buildroot/buildroot/output/build/wpewebkit-custom/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/commit.py&quot;, line 24, in &lt;module&gt;
    import six
  File &quot;&lt;frozen importlib._bootstrap&gt;&quot;, line 1027, in _find_and_load
  File &quot;&lt;frozen importlib._bootstrap&gt;&quot;, line 1002, in _find_and_load_unlocked
  File &quot;&lt;frozen importlib._bootstrap&gt;&quot;, line 945, in _find_spec
  File &quot;/home/buildroot/buildroot/output/build/wpewebkit-custom/Tools/Scripts/libraries/webkitcorepy/webkitcorepy/autoinstall.py&quot;, line 617, in find_spec
    loader = cls.find_module(fullname, path=path)
  File &quot;/home/buildroot/buildroot/output/build/wpewebkit-custom/Tools/Scripts/libraries/webkitcorepy/webkitcorepy/autoinstall.py&quot;, line 631, in find_module
    cls.install(name)
  File &quot;/home/buildroot/buildroot/output/build/wpewebkit-custom/Tools/Scripts/libraries/webkitcorepy/webkitcorepy/autoinstall.py&quot;, line 606, in install
    return all([to_install.install() for to_install in packages])
  File &quot;/home/buildroot/buildroot/output/build/wpewebkit-custom/Tools/Scripts/libraries/webkitcorepy/webkitcorepy/autoinstall.py&quot;, line 606, in &lt;listcomp&gt;
    return all([to_install.install() for to_install in packages])
  File &quot;/home/buildroot/buildroot/output/build/wpewebkit-custom/Tools/Scripts/libraries/webkitcorepy/webkitcorepy/autoinstall.py&quot;, line 273, in install
    AutoInstall.install(&apos;setuptools&apos;)
  File &quot;/home/buildroot/buildroot/output/build/wpewebkit-custom/Tools/Scripts/libraries/webkitcorepy/webkitcorepy/autoinstall.py&quot;, line 606, in install
    return all([to_install.install() for to_install in packages])
  File &quot;/home/buildroot/buildroot/output/build/wpewebkit-custom/Tools/Scripts/libraries/webkitcorepy/webkitcorepy/autoinstall.py&quot;, line 606, in &lt;listcomp&gt;
    return all([to_install.install() for to_install in packages])
  File &quot;/home/buildroot/buildroot/output/build/wpewebkit-custom/Tools/Scripts/libraries/webkitcorepy/webkitcorepy/autoinstall.py&quot;, line 285, in install
    raise ValueError(&apos;No archives for {}-{} found&apos;.format(self.pypi_name, self.version))
ValueError: No archives for setuptools-56 found
make[6]: *** [Source/WebKit/CMakeFiles/WebKit-build-revision.dir/build.make:70: Source/WebKit/CMakeFiles/WebKit-build-revision] Error 1
make[5]: *** [CMakeFiles/Makefile2:1314: Source/WebKit/CMakeFiles/WebKit-build-revision.dir/all] Error 2
make[5]: *** Waiting for unfinished jobs....

Reverting this seems to fix the build:
https://github.com/WebKit/WebKit/commit/d22439347db4083c729de2a07ebbd6b17797fc29</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1879706</commentid>
    <comment_count>5</comment_count>
    <who name="Adrian Perez">aperez</who>
    <bug_when>2022-07-01 04:03:59 -0700</bug_when>
    <thetext>(In reply to James Hilliard from comment #4)
&gt; This commit causes wpewebkit builds to fail in buildroot on main:
&gt; &lt;urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed:
&gt; unable to get local issuer certificate (_ssl.c:997)&gt;
&gt; Failed to download setuptools, retrying
&gt; Traceback (most recent call last):
&gt;   File
&gt; &quot;/home/buildroot/buildroot/output/build/wpewebkit-custom/Tools/glib/apply-
&gt; build-revision-to-files.py&quot;, line 25, in &lt;module&gt;
&gt;     import webkitpy  # noqa
&gt;   File
&gt; &quot;/home/buildroot/buildroot/output/build/wpewebkit-custom/Tools/Scripts/
&gt; webkitpy/__init__.py&quot;, line 91, in &lt;module&gt;
&gt;     import webkitscmpy
&gt;   File
&gt; &quot;/home/buildroot/buildroot/output/build/wpewebkit-custom/Tools/Scripts/
&gt; libraries/webkitscmpy/webkitscmpy/__init__.py&quot;, line 62, in &lt;module&gt;
&gt;     from webkitscmpy.commit import Commit
&gt;   File
&gt; &quot;/home/buildroot/buildroot/output/build/wpewebkit-custom/Tools/Scripts/
&gt; libraries/webkitscmpy/webkitscmpy/commit.py&quot;, line 24, in &lt;module&gt;
&gt;     import six
&gt;   File &quot;&lt;frozen importlib._bootstrap&gt;&quot;, line 1027, in _find_and_load
&gt;   File &quot;&lt;frozen importlib._bootstrap&gt;&quot;, line 1002, in _find_and_load_unlocked
&gt;   File &quot;&lt;frozen importlib._bootstrap&gt;&quot;, line 945, in _find_spec
&gt;   File
&gt; &quot;/home/buildroot/buildroot/output/build/wpewebkit-custom/Tools/Scripts/
&gt; libraries/webkitcorepy/webkitcorepy/autoinstall.py&quot;, line 617, in find_spec
&gt;     loader = cls.find_module(fullname, path=path)
&gt;   File
&gt; &quot;/home/buildroot/buildroot/output/build/wpewebkit-custom/Tools/Scripts/
&gt; libraries/webkitcorepy/webkitcorepy/autoinstall.py&quot;, line 631, in find_module
&gt;     cls.install(name)
&gt;   File
&gt; &quot;/home/buildroot/buildroot/output/build/wpewebkit-custom/Tools/Scripts/
&gt; libraries/webkitcorepy/webkitcorepy/autoinstall.py&quot;, line 606, in install
&gt;     return all([to_install.install() for to_install in packages])
&gt;   File
&gt; &quot;/home/buildroot/buildroot/output/build/wpewebkit-custom/Tools/Scripts/
&gt; libraries/webkitcorepy/webkitcorepy/autoinstall.py&quot;, line 606, in &lt;listcomp&gt;
&gt;     return all([to_install.install() for to_install in packages])
&gt;   File
&gt; &quot;/home/buildroot/buildroot/output/build/wpewebkit-custom/Tools/Scripts/
&gt; libraries/webkitcorepy/webkitcorepy/autoinstall.py&quot;, line 273, in install
&gt;     AutoInstall.install(&apos;setuptools&apos;)
&gt;   File
&gt; &quot;/home/buildroot/buildroot/output/build/wpewebkit-custom/Tools/Scripts/
&gt; libraries/webkitcorepy/webkitcorepy/autoinstall.py&quot;, line 606, in install
&gt;     return all([to_install.install() for to_install in packages])
&gt;   File
&gt; &quot;/home/buildroot/buildroot/output/build/wpewebkit-custom/Tools/Scripts/
&gt; libraries/webkitcorepy/webkitcorepy/autoinstall.py&quot;, line 606, in &lt;listcomp&gt;
&gt;     return all([to_install.install() for to_install in packages])
&gt;   File
&gt; &quot;/home/buildroot/buildroot/output/build/wpewebkit-custom/Tools/Scripts/
&gt; libraries/webkitcorepy/webkitcorepy/autoinstall.py&quot;, line 285, in install
&gt;     raise ValueError(&apos;No archives for {}-{} found&apos;.format(self.pypi_name,
&gt; self.version))
&gt; ValueError: No archives for setuptools-56 found
&gt; make[6]: ***
&gt; [Source/WebKit/CMakeFiles/WebKit-build-revision.dir/build.make:70:
&gt; Source/WebKit/CMakeFiles/WebKit-build-revision] Error 1
&gt; make[5]: *** [CMakeFiles/Makefile2:1314:
&gt; Source/WebKit/CMakeFiles/WebKit-build-revision.dir/all] Error 2
&gt; make[5]: *** Waiting for unfinished jobs....
&gt; 
&gt; Reverting this seems to fix the build:
&gt; https://github.com/WebKit/WebKit/commit/
&gt; d22439347db4083c729de2a07ebbd6b17797fc29

What&apos;s failing is fetching the auto-installed Python modules that the
script uses; which probably has to do with Buildroot&apos;s host-python
package missing SSL support. It is possible to disable this behaviour
by setting “DISABLE_WEBKITCOREPY_AUTOINSTALLER=0” in the environment.

Probably it would be a good idea to disable autoinstall for non-developer
builds and have a fallback that spawns Git it webkitscmpy fails to import.

Phil, WDYT about that idea above? ^^</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1901030</commentid>
    <comment_count>6</comment_count>
    <who name="Philippe Normand">philn</who>
    <bug_when>2022-09-25 10:21:12 -0700</bug_when>
    <thetext>I&apos;m not sure what other unintended side-effects setting DISABLE_WEBKITCOREPY_AUTOINSTALLER=0 will have...

I&apos;d rather revert to git log parsing, TBH.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1901031</commentid>
    <comment_count>7</comment_count>
    <who name="Philippe Normand">pnormand</who>
    <bug_when>2022-09-25 10:32:31 -0700</bug_when>
    <thetext>Pull request: https://github.com/WebKit/WebKit/pull/4686</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1901131</commentid>
    <comment_count>8</comment_count>
    <who name="EWS">ews-feeder</who>
    <bug_when>2022-09-26 01:55:27 -0700</bug_when>
    <thetext>Committed 254851@main (792d6325aedb): &lt;https://commits.webkit.org/254851@main&gt;

Reviewed commits have been landed. Closing PR #4686 and removing active labels.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>