[WPE][GTK] Update GLib
authormcatanzaro@igalia.com <mcatanzaro@igalia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 4 Dec 2018 19:42:59 +0000 (19:42 +0000)
committermcatanzaro@igalia.com <mcatanzaro@igalia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 4 Dec 2018 19:42:59 +0000 (19:42 +0000)
https://bugs.webkit.org/show_bug.cgi?id=191222

Reviewed by Žan Doberšek.

When I try running API tests locally, they crash with:

GLib-GIO-WARNING **: unknown schema extension 'd'

We need to update our old glib to support the 'd' value type, otherwise schemas that may
exist on the host using this type will cause instant crashes.

Also, switch the GLib build to use meson. This requires updating meson as well.

* gtk/jhbuild.modules:
* gtk/patches/glib-cast-function-type.patch: Removed.
* gtk/patches/glib-gtester-do-not-consider-skipped-tests-as-failures.patch: Removed.
* wpe/jhbuild.modules:
* wpe/patches/glib-cast-function-type.patch: Removed.
* wpe/patches/glib-revert-wakeup-changes.patch: Removed.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@238866 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Tools/ChangeLog
Tools/gtk/jhbuild.modules
Tools/gtk/patches/glib-cast-function-type.patch [deleted file]
Tools/gtk/patches/glib-gtester-do-not-consider-skipped-tests-as-failures.patch [deleted file]
Tools/wpe/jhbuild.modules
Tools/wpe/patches/glib-cast-function-type.patch [deleted file]
Tools/wpe/patches/glib-revert-wakeup-changes.patch [deleted file]

index 94b9bb1..2d004be 100644 (file)
@@ -1,3 +1,26 @@
+2018-12-04  Michael Catanzaro  <mcatanzaro@igalia.com>
+
+        [WPE][GTK] Update GLib
+        https://bugs.webkit.org/show_bug.cgi?id=191222
+
+        Reviewed by Žan Doberšek.
+
+        When I try running API tests locally, they crash with:
+
+        GLib-GIO-WARNING **: unknown schema extension 'd'
+
+        We need to update our old glib to support the 'd' value type, otherwise schemas that may
+        exist on the host using this type will cause instant crashes.
+
+        Also, switch the GLib build to use meson. This requires updating meson as well.
+
+        * gtk/jhbuild.modules:
+        * gtk/patches/glib-cast-function-type.patch: Removed.
+        * gtk/patches/glib-gtester-do-not-consider-skipped-tests-as-failures.patch: Removed.
+        * wpe/jhbuild.modules:
+        * wpe/patches/glib-cast-function-type.patch: Removed.
+        * wpe/patches/glib-revert-wakeup-changes.patch: Removed.
+
 2018-12-04  Aakash Jain  <aakash_jain@apple.com>
 
         [ews-app] Run BugzillaPatchFetcher periodically
index 84ecc95..05746c2 100644 (file)
             hash="sha256:db440670cb6f3c098b076df3735fbc4e69359bd605385e87c90ee48344a804ca"/>
   </autotools>
 
-  <autotools id="glib"
-             autogen-sh="configure"
-             autogenargs="--disable-dtrace --disable-libmount">
+  <meson id="glib"
+         mesonargs="-Dlibmount=false -Dselinux=false">
     <dependencies>
       <dep package="libffi"/>
     </dependencies>
-    <branch module="/pub/GNOME/sources/glib/2.54/glib-2.54.2.tar.xz" version="2.54.2"
+    <branch module="/pub/GNOME/sources/glib/2.58/glib-${version}.tar.xz" version="2.58.1"
             repo="ftp.gnome.org"
-            hash="sha256:bb89e5c5aad33169a8c7f28b45671c7899c12f74caf707737f784d7102758e6c">
-      <!-- This patch landed in glib-2-54 branch and will be available in 2.54.3. -->
-      <patch file="glib-gtester-do-not-consider-skipped-tests-as-failures.patch" strip="1"/>
-      <patch file="glib-cast-function-type.patch" strip="1"/>
+            hash="sha256:97d6a9d926b6aa3dfaadad3077cfb43eec74432ab455dff14250c769d526d7d6">
     </branch>
-  </autotools>
+  </meson>
 
   <autotools id="glib-networking"
              autogen-sh="configure">
 
   <distutils id="meson" python3="1">
     <branch repo="github-tarball"
-            version="0.42.0"
+            version="0.48.1"
             module="mesonbuild/meson/releases/download/${version}/meson-${version}.tar.gz"
             checkoutdir="meson-${version}"
-            hash="sha256:a74c7387a3dd8171e931bcd948355f7f9529368eae72c3c22a9beef6c2e73498"/>
+            hash="sha256:425d12edbb81498314926afa93a3eb2fca4ca6929cbe0f8abeb6ab45d1d9fa8f"/>
     <dependencies>
       <dep package="ninja"/>
     </dependencies>
diff --git a/Tools/gtk/patches/glib-cast-function-type.patch b/Tools/gtk/patches/glib-cast-function-type.patch
deleted file mode 100644 (file)
index 732877d..0000000
+++ /dev/null
@@ -1,54 +0,0 @@
-From c1f5e52844c3bf503aca8881b6af68f78f028b4d Mon Sep 17 00:00:00 2001
-From: Lubomir Rintel <lkundrak@v3.sk>
-Date: Wed, 7 Feb 2018 17:27:54 +0000
-Subject: [PATCH] gtype: cast *_init functions to void(*)(void) first
-
-The *_init() functions have prototypes incompatible with *InitFunc types they
-are being cast to. This upsets GCC 8's -Wcast-function-type that's enabled by
-default with -Wextra.
-
-Let's not have the public header files emit a warning and neutralize it by
-doing a void(*)(void) cast first.
-
-https://bugzilla.gnome.org/show_bug.cgi?id=793272
----
- gobject/gtype.h | 8 ++++----
- 1 file changed, 4 insertions(+), 4 deletions(-)
-
-diff --git a/gobject/gtype.h b/gobject/gtype.h
-index f771c07..608efb2 100644
---- a/gobject/gtype.h
-+++ b/gobject/gtype.h
-@@ -1790,7 +1790,7 @@ guint     g_type_get_type_registration_serial (void);
-  */
- #define G_IMPLEMENT_INTERFACE(TYPE_IFACE, iface_init)       { \
-   const GInterfaceInfo g_implement_interface_info = { \
--    (GInterfaceInitFunc) iface_init, NULL, NULL \
-+    (GInterfaceInitFunc)(void (*)(void)) iface_init, NULL, NULL \
-   }; \
-   g_type_add_interface_static (g_define_type_id, TYPE_IFACE, &g_implement_interface_info); \
- }
-@@ -1974,9 +1974,9 @@ type_name##_get_type (void) \
-         g_type_register_static_simple (TYPE_PARENT, \
-                                        g_intern_static_string (#TypeName), \
-                                        sizeof (TypeName##Class), \
--                                       (GClassInitFunc) type_name##_class_intern_init, \
-+                                       (GClassInitFunc)(void (*)(void)) type_name##_class_intern_init, \
-                                        sizeof (TypeName), \
--                                       (GInstanceInitFunc) type_name##_init, \
-+                                       (GInstanceInitFunc)(void (*)(void)) type_name##_init, \
-                                        (GTypeFlags) flags); \
-       { /* custom code follows */
- #define _G_DEFINE_TYPE_EXTENDED_END() \
-@@ -2008,7 +2008,7 @@ type_name##_get_type (void) \
-         g_type_register_static_simple (G_TYPE_INTERFACE, \
-                                        g_intern_static_string (#TypeName), \
-                                        sizeof (TypeName##Interface), \
--                                       (GClassInitFunc)type_name##_default_init, \
-+                                       (GClassInitFunc)(GVoidFunc)type_name##_default_init, \
-                                        0, \
-                                        (GInstanceInitFunc)NULL, \
-                                        (GTypeFlags) 0); \
---
-libgit2 0.27.0
-
diff --git a/Tools/gtk/patches/glib-gtester-do-not-consider-skipped-tests-as-failures.patch b/Tools/gtk/patches/glib-gtester-do-not-consider-skipped-tests-as-failures.patch
deleted file mode 100644 (file)
index f38e7ee..0000000
+++ /dev/null
@@ -1,102 +0,0 @@
-From 8a8e0a373d3b16cd9b5c72dc82abbdfe794a39b7 Mon Sep 17 00:00:00 2001
-From: Carlos Garcia Campos <cgarcia@igalia.com>
-Date: Tue, 28 Nov 2017 12:31:19 +0100
-Subject: [PATCH] gtester: do not consider skipped tests as failures
-
-This is happening since f591366eee341f2c40516821e8a5a0bc7a9bd288, that
-changed the way tests were skipped to use g_test_skip() instead of just
-ignoring them. They are now reported to the log with G_TEST_RUN_SKIPPED
-as result.
-
-https://bugzilla.gnome.org/show_bug.cgi?id=790934
----
- glib/gtester.c    | 26 +++++++++++++++++++++-----
- glib/gtestutils.c |  6 ------
- glib/gtestutils.h |  7 +++++++
- 3 files changed, 28 insertions(+), 11 deletions(-)
-
-diff --git a/glib/gtester.c b/glib/gtester.c
-index 38a7f9610..9451aea56 100644
---- a/glib/gtester.c
-+++ b/glib/gtester.c
-@@ -102,21 +102,37 @@ testcase_close (long double duration,
-                 gint        exit_status,
-                 guint       n_forks)
- {
-+  gboolean success;
-+
-   g_return_if_fail (testcase_open > 0);
-   test_log_printfe ("%s<duration>%.6Lf</duration>\n", sindent (log_indent), duration);
-+  success = exit_status == G_TEST_RUN_SUCCESS || exit_status == G_TEST_RUN_SKIPPED;
-   test_log_printfe ("%s<status exit-status=\"%d\" n-forks=\"%d\" result=\"%s\"/>\n",
-                     sindent (log_indent), exit_status, n_forks,
--                    exit_status ? "failed" : "success");
-+                    success ? "failed" : "success");
-   log_indent -= 2;
-   test_log_printfe ("%s</testcase>\n", sindent (log_indent));
-   testcase_open--;
-   if (gtester_verbose)
--    g_print ("%s\n", exit_status ? "FAIL" : "OK");
--  if (exit_status && subtest_last_seed)
-+    {
-+      switch (exit_status)
-+        {
-+        case G_TEST_RUN_SUCCESS:
-+          g_print ("OK\n");
-+          break;
-+        case G_TEST_RUN_SKIPPED:
-+          g_print ("SKIP\n");
-+          break;
-+        default:
-+          g_print ("FAIL\n");
-+          break;
-+        }
-+    }
-+  if (!success && subtest_last_seed)
-     g_print ("GTester: last random seed: %s\n", subtest_last_seed);
--  if (exit_status)
-+  if (!success)
-     testcase_fail_count += 1;
--  if (subtest_mode_fatal && exit_status)
-+  if (subtest_mode_fatal && !success)
-     terminate();
- }
-diff --git a/glib/gtestutils.c b/glib/gtestutils.c
-index dd8513a5b..4e598e44a 100644
---- a/glib/gtestutils.c
-+++ b/glib/gtestutils.c
-@@ -731,12 +731,6 @@ static void     gtest_default_log_handler       (const gchar    *log_domain,
-                                                  gpointer        unused_data);
--typedef enum {
--  G_TEST_RUN_SUCCESS,
--  G_TEST_RUN_SKIPPED,
--  G_TEST_RUN_FAILURE,
--  G_TEST_RUN_INCOMPLETE
--} GTestResult;
- static const char * const g_test_result_names[] = {
-   "OK",
-   "SKIP",
-diff --git a/glib/gtestutils.h b/glib/gtestutils.h
-index e120562c0..226a2e80b 100644
---- a/glib/gtestutils.h
-+++ b/glib/gtestutils.h
-@@ -354,6 +354,13 @@ typedef struct {
- GLIB_VAR const GTestConfig * const g_test_config_vars;
- /* internal logging API */
-+typedef enum {
-+  G_TEST_RUN_SUCCESS,
-+  G_TEST_RUN_SKIPPED,
-+  G_TEST_RUN_FAILURE,
-+  G_TEST_RUN_INCOMPLETE
-+} GTestResult;
-+
- typedef enum {
-   G_TEST_LOG_NONE,
-   G_TEST_LOG_ERROR,             /* s:msg */
--- 
-2.15.0
-
index a3691a7..edc26cd 100644 (file)
              hash="sha256:f01eb9027e9eb56aeaeef636649877756d475d714ef8b47f627f65bc5f3b492f"/>
   </autotools>
 
-  <autotools id="glib"
-             autogen-sh="configure"
-             autogenargs="--disable-dtrace">
+  <meson id="glib"
+         mesonargs="-Dlibmount=false -Dselinux=false">
     <dependencies>
       <dep package="libffi"/>
     </dependencies>
-    <branch module="/pub/GNOME/sources/glib/2.54/glib-2.54.3.tar.xz" version="2.54.3"
+    <branch module="/pub/GNOME/sources/glib/2.58/glib-${version}.tar.xz" version="2.58.1"
             repo="ftp.gnome.org"
-            hash="sha256:963fdc6685dc3da8e5381dfb9f15ca4b5709b28be84d9d05a9bb8e446abac0a8">
-      <patch file="gdate-suppress-string-format-literal-warning.patch" strip="1"/>
-      <patch file="glib-revert-wakeup-changes.patch" strip="1"/>
-      <patch file="glib-cast-function-type.patch" strip="1"/>
+            hash="sha256:97d6a9d926b6aa3dfaadad3077cfb43eec74432ab455dff14250c769d526d7d6">
     </branch>
-  </autotools>
+  </meson>
 
   <autotools id="glib-networking"
              autogen-sh="configure">
 
   <distutils id="meson" python3="1">
     <branch repo="github-tarball"
-            version="0.42.0"
+            version="0.48.1"
             module="mesonbuild/meson/releases/download/${version}/meson-${version}.tar.gz"
             checkoutdir="meson-${version}"
-            hash="sha256:a74c7387a3dd8171e931bcd948355f7f9529368eae72c3c22a9beef6c2e73498"/>
+            hash="sha256:425d12edbb81498314926afa93a3eb2fca4ca6929cbe0f8abeb6ab45d1d9fa8f"/>
     <dependencies>
       <dep package="ninja"/>
     </dependencies>
diff --git a/Tools/wpe/patches/glib-cast-function-type.patch b/Tools/wpe/patches/glib-cast-function-type.patch
deleted file mode 100644 (file)
index 732877d..0000000
+++ /dev/null
@@ -1,54 +0,0 @@
-From c1f5e52844c3bf503aca8881b6af68f78f028b4d Mon Sep 17 00:00:00 2001
-From: Lubomir Rintel <lkundrak@v3.sk>
-Date: Wed, 7 Feb 2018 17:27:54 +0000
-Subject: [PATCH] gtype: cast *_init functions to void(*)(void) first
-
-The *_init() functions have prototypes incompatible with *InitFunc types they
-are being cast to. This upsets GCC 8's -Wcast-function-type that's enabled by
-default with -Wextra.
-
-Let's not have the public header files emit a warning and neutralize it by
-doing a void(*)(void) cast first.
-
-https://bugzilla.gnome.org/show_bug.cgi?id=793272
----
- gobject/gtype.h | 8 ++++----
- 1 file changed, 4 insertions(+), 4 deletions(-)
-
-diff --git a/gobject/gtype.h b/gobject/gtype.h
-index f771c07..608efb2 100644
---- a/gobject/gtype.h
-+++ b/gobject/gtype.h
-@@ -1790,7 +1790,7 @@ guint     g_type_get_type_registration_serial (void);
-  */
- #define G_IMPLEMENT_INTERFACE(TYPE_IFACE, iface_init)       { \
-   const GInterfaceInfo g_implement_interface_info = { \
--    (GInterfaceInitFunc) iface_init, NULL, NULL \
-+    (GInterfaceInitFunc)(void (*)(void)) iface_init, NULL, NULL \
-   }; \
-   g_type_add_interface_static (g_define_type_id, TYPE_IFACE, &g_implement_interface_info); \
- }
-@@ -1974,9 +1974,9 @@ type_name##_get_type (void) \
-         g_type_register_static_simple (TYPE_PARENT, \
-                                        g_intern_static_string (#TypeName), \
-                                        sizeof (TypeName##Class), \
--                                       (GClassInitFunc) type_name##_class_intern_init, \
-+                                       (GClassInitFunc)(void (*)(void)) type_name##_class_intern_init, \
-                                        sizeof (TypeName), \
--                                       (GInstanceInitFunc) type_name##_init, \
-+                                       (GInstanceInitFunc)(void (*)(void)) type_name##_init, \
-                                        (GTypeFlags) flags); \
-       { /* custom code follows */
- #define _G_DEFINE_TYPE_EXTENDED_END() \
-@@ -2008,7 +2008,7 @@ type_name##_get_type (void) \
-         g_type_register_static_simple (G_TYPE_INTERFACE, \
-                                        g_intern_static_string (#TypeName), \
-                                        sizeof (TypeName##Interface), \
--                                       (GClassInitFunc)type_name##_default_init, \
-+                                       (GClassInitFunc)(GVoidFunc)type_name##_default_init, \
-                                        0, \
-                                        (GInstanceInitFunc)NULL, \
-                                        (GTypeFlags) 0); \
---
-libgit2 0.27.0
-
diff --git a/Tools/wpe/patches/glib-revert-wakeup-changes.patch b/Tools/wpe/patches/glib-revert-wakeup-changes.patch
deleted file mode 100644 (file)
index 41fc94b..0000000
+++ /dev/null
@@ -1,106 +0,0 @@
-From 94b38beff1347ec4a733199f7a7abdacaa958678 Mon Sep 17 00:00:00 2001
-From: Philip Withnall <withnall@endlessm.com>
-Date: Wed, 17 Jan 2018 11:38:50 +0000
-Subject: gmain: Partial revert of recent wakeup changes to gmain.c
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-This reverts the following commits (but keeps the other recent changes
-to gmain.c):
- • e4ee3079c Do not wake up main loop if change is from same thread
- • 208702404 main: Create a helper function for "owner wakeup" optimization
- • 0c0469b56 gmain: Signal wakeups if context has never been acquired as well
- • 9ba95e25b gmain: only signal GWakeup right before or during a blocking poll
-
-Some combination of them is causing problems with LibreOffice and/or
-WebKit, and the safest thing to do at the moment is revert them all
-until we work out what’s going on. The previous revert (4976e8109) was
-not sufficient (it fixed WebKit, but re-broken LibreOffice).
-
-By reverting, we gain some spurious wakeups, but avoid dropping
-necessary wakeups, which is presumably what’s causing problems in the
-other modules.
-
-Signed-off-by: Philip Withnall <withnall@endlessm.com>
-
-https://bugzilla.gnome.org/show_bug.cgi?id=761102
----
- glib/gmain.c | 33 +++++----------------------------
- 1 file changed, 5 insertions(+), 28 deletions(-)
-
-diff --git a/glib/gmain.c b/glib/gmain.c
-index 8ca54de..67102cd 100644
---- a/glib/gmain.c
-+++ b/glib/gmain.c
-@@ -1118,29 +1118,6 @@ source_remove_from_context (GSource      *source,
-     }
- }
--/* See https://bugzilla.gnome.org/show_bug.cgi?id=761102 for
-- * the introduction of this.
-- *
-- * The main optimization is to avoid waking up the main
-- * context if a change is made by the current owner.
-- */
--static void
--conditional_wakeup (GMainContext *context)
--{
--  /* We want to signal wakeups in two cases:
--   *  1 When the context is owned by another thread
--   *  2 When the context owner is NULL (two subcases)
--   *   2a Possible if the context has never been acquired
--   *   2b Or if the context has no current owner
--   *
--   * At least case 2a) is necessary to ensure backwards compatibility with
--   * qemu's use of GMainContext.
--   * https://bugzilla.gnome.org/show_bug.cgi?id=761102#c14
--   */
--  if (context->owner != G_THREAD_SELF)
--    g_wakeup_signal (context->wakeup);
--}
--
- static guint
- g_source_attach_unlocked (GSource      *source,
-                           GMainContext *context,
-@@ -1187,8 +1164,8 @@ g_source_attach_unlocked (GSource      *source,
-   /* If another thread has acquired the context, wake it up since it
-    * might be in poll() right now.
-    */
--  if (do_wakeup)
--    conditional_wakeup (context);
-+  if (do_wakeup && context->owner && context->owner != G_THREAD_SELF)
-+    g_wakeup_signal (context->wakeup);
-   return source->source_id;
- }
-@@ -1878,7 +1855,7 @@ g_source_set_ready_time (GSource *source,
-     {
-       /* Quite likely that we need to change the timeout on the poll */
-       if (!SOURCE_BLOCKED (source))
--        conditional_wakeup (context);
-+        g_wakeup_signal (context->wakeup);
-       UNLOCK_CONTEXT (context);
-     }
- }
-@@ -4318,7 +4295,7 @@ g_main_context_add_poll_unlocked (GMainContext *context,
-   context->poll_changed = TRUE;
-   /* Now wake up the main loop if it is waiting in the poll() */
--  conditional_wakeup (context);
-+  g_wakeup_signal (context->wakeup);
- }
- /**
-@@ -4378,7 +4355,7 @@ g_main_context_remove_poll_unlocked (GMainContext *context,
-   context->poll_changed = TRUE;
-   /* Now wake up the main loop if it is waiting in the poll() */
--  conditional_wakeup (context);
-+  g_wakeup_signal (context->wakeup);
- }
- /**
--- 
-cgit v0.12
-