Title: [249883] trunk
- Revision
- 249883
- Author
- [email protected]
- Date
- 2019-09-15 06:30:01 -0700 (Sun, 15 Sep 2019)
Log Message
[GTK][WPE] Do not run the Bubblewrap executable when configuring for cross-compilation
https://bugs.webkit.org/show_bug.cgi?id=201340
Reviewed by Konstantin Tokarev.
* Source/cmake/BubblewrapSandboxChecks.cmake: Do not run the
Bubblewrap executable when cross-compiling to guess its version.
Emit a warning instead and trust that valid run-time paths will
be set using the BWRAP_EXECUTABLE and DBUS_PROXY_EXECUTABLE
variables. While at it, fix the regular _expression_ used to match
the version string in the Bubblewrap output when not cross-compiling.
Modified Paths
Diff
Modified: trunk/ChangeLog (249882 => 249883)
--- trunk/ChangeLog 2019-09-14 22:45:30 UTC (rev 249882)
+++ trunk/ChangeLog 2019-09-15 13:30:01 UTC (rev 249883)
@@ -1,3 +1,17 @@
+2019-09-15 Adrian Perez de Castro <[email protected]>
+
+ [GTK][WPE] Do not run the Bubblewrap executable when configuring for cross-compilation
+ https://bugs.webkit.org/show_bug.cgi?id=201340
+
+ Reviewed by Konstantin Tokarev.
+
+ * Source/cmake/BubblewrapSandboxChecks.cmake: Do not run the
+ Bubblewrap executable when cross-compiling to guess its version.
+ Emit a warning instead and trust that valid run-time paths will
+ be set using the BWRAP_EXECUTABLE and DBUS_PROXY_EXECUTABLE
+ variables. While at it, fix the regular _expression_ used to match
+ the version string in the Bubblewrap output when not cross-compiling.
+
2019-09-09 Carlos Garcia Campos <[email protected]>
Unreviewed. Bump GTK version numbers
Modified: trunk/Source/cmake/BubblewrapSandboxChecks.cmake (249882 => 249883)
--- trunk/Source/cmake/BubblewrapSandboxChecks.cmake 2019-09-14 22:45:30 UTC (rev 249882)
+++ trunk/Source/cmake/BubblewrapSandboxChecks.cmake 2019-09-15 13:30:01 UTC (rev 249883)
@@ -3,21 +3,7 @@
if (NOT BWRAP_EXECUTABLE)
message(FATAL_ERROR "bwrap executable is needed for ENABLE_BUBBLEWRAP_SANDBOX")
endif ()
- add_definitions(-DBWRAP_EXECUTABLE="${BWRAP_EXECUTABLE}")
- execute_process(
- COMMAND "${BWRAP_EXECUTABLE}" --version
- RESULT_VARIABLE BWRAP_RET
- OUTPUT_VARIABLE BWRAP_OUTPUT
- )
- if (BWRAP_RET)
- message(FATAL_ERROR "Failed to run ${BWRAP_EXECUTABLE}")
- endif ()
- string(REGEX MATCH "([0-9]+.[0-9]+.[0-9]+)" BWRAP_VERSION "${BWRAP_OUTPUT}")
- if (NOT "${BWRAP_VERSION}" VERSION_GREATER_EQUAL "0.3.1")
- message(FATAL_ERROR "bwrap must be >= 0.3.1 but ${BWRAP_VERSION} found")
- endif ()
-
find_package(Libseccomp)
if (NOT LIBSECCOMP_FOUND)
message(FATAL_ERROR "libseccomp is needed for ENABLE_BUBBLEWRAP_SANDBOX")
@@ -27,5 +13,32 @@
if (NOT DBUS_PROXY_EXECUTABLE)
message(FATAL_ERROR "xdg-dbus-proxy not found and is needed for ENABLE_BUBBLEWRAP_SANDBOX")
endif ()
+
+ if (NOT CMAKE_CROSSCOMPILING)
+ execute_process(
+ COMMAND "${BWRAP_EXECUTABLE}" --version
+ RESULT_VARIABLE BWRAP_RET
+ OUTPUT_VARIABLE BWRAP_OUTPUT
+ )
+ if (BWRAP_RET)
+ message(FATAL_ERROR "Failed to run ${BWRAP_EXECUTABLE}")
+ endif ()
+ string(REGEX MATCH "[0-9]+\\.[0-9]+\\.[0-9]+" BWRAP_VERSION "${BWRAP_OUTPUT}")
+ if (NOT "${BWRAP_VERSION}" VERSION_GREATER_EQUAL "0.3.1")
+ message(FATAL_ERROR "bwrap must be >= 0.3.1 but ${BWRAP_VERSION} found")
+ endif ()
+ elseif (NOT SILENCE_CROSS_COMPILATION_NOTICES)
+ message(NOTICE
+ "***--------------------------------------------------------***\n"
+ "*** Cannot check Bubblewrap version when cross-compiling. ***\n"
+ "*** The target system MUST have version 0.3.1 or newer. ***\n"
+ "*** Use the BWRAP_EXECUTABLE and DBUS_PROXY_EXECUTABLE ***\n"
+ "*** variables to set the run-time paths for the 'bwrap' ***\n"
+ "*** and 'xdg-dbus-proxy' programs. ***\n"
+ "***--------------------------------------------------------***"
+ )
+ endif ()
+
+ add_definitions(-DBWRAP_EXECUTABLE="${BWRAP_EXECUTABLE}")
add_definitions(-DDBUS_PROXY_EXECUTABLE="${DBUS_PROXY_EXECUTABLE}")
endif ()
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes