Bug 265440

Summary: [WPE][CMake] Cannot complete distcheck with ENABLE_WPE_1_1_API=OFF
Product: WebKit Reporter: Adrian Perez <aperez>
Component: Tools / TestsAssignee: Adrian Perez <aperez>
Status: RESOLVED FIXED    
Severity: Normal CC: cgarcia, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   

Description Adrian Perez 2023-11-28 01:06:41 PST
When using ENABLE_WPE_1_1_API=OFF (the default), the “distcheck” target
fails with the following error:

----- 8< ----- snip ----- 8< ------

WebKit % MAKEFLAGS=-j47 MFLAGS=-j47 NUMBER_OF_PROCESSORS=47 ./Tools/Scripts/build-webkit --wpe --no-unified-builds --makeargs=distcheck
Building flatpak based environment
+  cmake --build /app/webkit/WebKitBuild/WPE/Release --config Release -- distcheck -j47
[1/1/2|0.0/s|  0%] Re-checking globbed directories...
[1/7740/7740|26.6/s| 99%] Checking release tarball: wpewebkit-2.43.1.tar
Traceback (most recent call last):
  File "/app/webkit/Tools/Scripts/make-dist", line 341, in <module>
    manifest = Manifest(arguments.manifest_filename, arguments.source_dir, arguments.build_dir, tarball_root)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/webkit/Tools/Scripts/make-dist", line 150, in __init__
    self.process_line(line)
  File "/app/webkit/Tools/Scripts/make-dist", line 188, in process_line
    self.add_directory(Directory(*self.get_source_and_tarball_paths_from_parts(parts)))
                                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/webkit/Tools/Scripts/make-dist", line 173, in get_source_and_tarball_paths_from_parts
    full_source_path = self.get_full_source_path(parts[1])
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/webkit/Tools/Scripts/make-dist", line 166, in get_full_source_path
    raise Exception('Could not find directory %s' % source_path)
Exception: Could not find directory /app/webkit/WebKitBuild/WPE/Release/Documentation/wpe-web-extension-2.0
FAILED: Source/CMakeFiles/distcheck /app/webkit/WebKitBuild/WPE/Release/Source/CMakeFiles/distcheck 
cd /app/webkit/WebKitBuild/WPE/Release/Source && /app/webkit/Tools/Scripts/make-dist --check --port=WPE --tarball-name=wpewebkit --source-dir=/app/webkit --build-dir=/app/webkit/WebKitBuild/WPE/Release --version=2.43.1 /app/webkit/WebKitBuild/WPE/Release/manifest.txt && /usr/bin/xz -evfQ /app/webkit/WebKitBuild/WPE/Release/wpewebkit-2.43.1.tar
ninja: build stopped: subcommand failed.
WebKit %

----- 8< ----- snip ----- 8< ------

I had to make the last few releases manually enabling ENABLE_WPE_1_1_API
in order to be able to produce tarballs, but that should not be needed.
Comment 1 Carlos Garcia Campos 2023-11-28 01:20:25 PST
I think this is because of the rename of web-extensions -> web-process-extensions. Just use the expected name in the wpe manifest file.
Comment 2 Adrian Perez 2023-12-04 02:19:31 PST
(In reply to Carlos Garcia Campos from comment #1)
> I think this is because of the rename of web-extensions ->
> web-process-extensions. Just use the expected name in the wpe manifest file.

That was also my suspicion, I'll look into fixing this issue soon.
Comment 3 Adrian Perez 2024-03-21 11:29:48 PDT
It took me a while to get back to this, but I'm now testing a patch :)
Comment 4 Adrian Perez 2024-03-21 14:21:30 PDT
Pull request: https://github.com/WebKit/WebKit/pull/26265
Comment 5 EWS 2024-03-21 14:39:06 PDT
Committed 276496@main (fc03e5ddcfb7): <https://commits.webkit.org/276496@main>

Reviewed commits have been landed. Closing PR #26265 and removing active labels.
Comment 6 Radar WebKit Bug Importer 2024-03-21 14:40:15 PDT
<rdar://problem/125193326>