Hello community, here is the log from the commit of package glib2 for openSUSE:Factory checked in at 2020-09-25 16:23:42 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/glib2 (Old) and /work/SRC/openSUSE:Factory/.glib2.new.4249 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "glib2" Fri Sep 25 16:23:42 2020 rev:226 rq:834307 version:2.64.5 Changes: -------- --- /work/SRC/openSUSE:Factory/glib2/glib2.changes 2020-07-13 09:05:35.296101870 +0200 +++ /work/SRC/openSUSE:Factory/.glib2.new.4249/glib2.changes 2020-09-25 16:26:26.739619975 +0200 @@ -1,0 +2,9 @@ +Tue Aug 18 17:20:55 UTC 2020 - Bjørn Lie <[email protected]> + +- Update to version 2.64.5: + + Fix deadlock in `g_subprocess_communicate_async()`. + + Bugs fixed: glgo#GNOME/GLib!1519, glgo#GNOME/GLib!1520, + glgo#GNOME/GLib!1565, glgo#GNOME/GLib!1608, + glgo#GNOME/GLib!1618, glgo#GNOME/GLib!1621. + +------------------------------------------------------------------- Old: ---- glib-2.64.4.tar.xz New: ---- glib-2.64.5.tar.xz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ glib2.spec ++++++ --- /var/tmp/diff_new_pack.pNGxfl/_old 2020-09-25 16:26:27.527620672 +0200 +++ /var/tmp/diff_new_pack.pNGxfl/_new 2020-09-25 16:26:27.531620676 +0200 @@ -18,7 +18,7 @@ %bcond_without systemtap Name: glib2 -Version: 2.64.4 +Version: 2.64.5 Release: 0 Summary: General-Purpose Utility Library License: LGPL-2.1-or-later ++++++ glib-2.64.4.tar.xz -> glib-2.64.5.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/glib-2.64.4/NEWS new/glib-2.64.5/NEWS --- old/glib-2.64.4/NEWS 2020-07-02 15:02:13.556878300 +0200 +++ new/glib-2.64.5/NEWS 2020-08-18 13:06:36.899520200 +0200 @@ -1,3 +1,19 @@ +Overview of changes in GLib 2.64.5 +================================== + +* Fix deadlock in `g_subprocess_communicate_async()` (work by Alexander Larsson) (#2182) + +* Fix cross-compilation on iOS (work by Nirbheek Chauhan) (#1868) + +* Bugs fixed: + - !1519 Backport !1468 “glib-compile-resources: Fix exporting on Visual Studio” to glib-2-64 + - !1520 Backport !1517 “GWin32RegistryKey: Move assertions” to glib-2-64 + - !1565 Backport !1563 “gdesktopappinfo: Fix unnecessarily copied and leaked URI list” to glib-2-64 + - !1608 Backport !1607 “meson: Don't use gnulib for printf on iOS” to glib-2-64 + - !1618 Backport !1617 “Ensure g_subprocess_communicate_async() never blocks” to glib-2-64 + - !1621 Backport !1620 “gvariant: Ensure GVS.depth is initialised” to glib-2-64 + + Overview of changes in GLib 2.64.4 ================================== diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/glib-2.64.4/gio/gdesktopappinfo.c new/glib-2.64.5/gio/gdesktopappinfo.c --- old/glib-2.64.4/gio/gdesktopappinfo.c 2020-07-02 15:02:13.617878700 +0200 +++ new/glib-2.64.5/gio/gdesktopappinfo.c 2020-08-18 13:06:36.929520600 +0200 @@ -2727,7 +2727,7 @@ * internally by expand_macro(), so we need to pass a copy of it instead, * and also use that copy to control the exit condition of the loop below. */ - dup_uris = g_list_copy (uris); + dup_uris = uris; do { GPid pid; @@ -2864,7 +2864,6 @@ completed = TRUE; out: - g_list_free (dup_uris); g_strfreev (argv); g_strfreev (envp); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/glib-2.64.4/gio/glib-compile-resources.c new/glib-2.64.5/gio/glib-compile-resources.c --- old/glib-2.64.4/gio/glib-compile-resources.c 2020-07-02 15:02:13.629878800 +0200 +++ new/glib-2.64.5/gio/glib-compile-resources.c 2020-08-18 13:06:36.940520800 +0200 @@ -1061,6 +1061,7 @@ guint8 *data; gsize data_size; gsize i; + const char *export = "G_MODULE_EXPORT"; if (!g_file_get_contents (binary_target, (char **)&data, &data_size, NULL)) @@ -1081,6 +1082,9 @@ return 1; } + if (internal) + export = "G_GNUC_INTERNAL"; + g_fprintf (file, "#include <gio/gio.h>\n" "\n" @@ -1140,30 +1144,36 @@ g_fprintf (file, "\n" "static GStaticResource static_resource = { %s_resource_data.data, sizeof (%s_resource_data.data)%s, NULL, NULL, NULL };\n" - "%s GResource *%s_get_resource (void);\n" + "\n" + "%s\n" + "GResource *%s_get_resource (void);\n" "GResource *%s_get_resource (void)\n" "{\n" " return g_static_resource_get_resource (&static_resource);\n" "}\n", - c_name, c_name, (external_data ? "" : " - 1 /* nul terminator */"), linkage, c_name, c_name); + c_name, c_name, (external_data ? "" : " - 1 /* nul terminator */"), + export, c_name, c_name); if (manual_register) { g_fprintf (file, "\n" - "%s void %s_unregister_resource (void);\n" + "%s\n" + "void %s_unregister_resource (void);\n" "void %s_unregister_resource (void)\n" "{\n" " g_static_resource_fini (&static_resource);\n" "}\n" "\n" - "%s void %s_register_resource (void);\n" + "%s\n" + "void %s_register_resource (void);\n" "void %s_register_resource (void)\n" "{\n" " g_static_resource_init (&static_resource);\n" "}\n", - linkage, c_name, c_name, linkage, c_name, c_name); + export, c_name, c_name, + export, c_name, c_name); } else { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/glib-2.64.4/gio/gsubprocess.c new/glib-2.64.5/gio/gsubprocess.c --- old/glib-2.64.4/gio/gsubprocess.c 2020-07-02 15:02:13.649878700 +0200 +++ new/glib-2.64.5/gio/gsubprocess.c 2020-08-18 13:06:36.956520800 +0200 @@ -1595,6 +1595,23 @@ if (subprocess->stdin_pipe) { g_assert (stdin_buf != NULL); + +#ifdef G_OS_UNIX + /* We're doing async writes to the pipe, and the async write mechanism assumes + * that streams polling as writable do SOME progress (possibly partial) and then + * stop, but never block. + * + * However, for blocking pipes, unix will return writable if there is *any* space left + * but still block until the full buffer size is available before returning from write. + * So, to avoid async blocking on the main loop we make this non-blocking here. + * + * It should be safe to change the fd because we're the only user at this point as + * per the g_subprocess_communicate() docs, and all the code called by this function + * properly handles non-blocking fds. + */ + g_unix_set_fd_nonblocking (g_unix_output_stream_get_fd (G_UNIX_OUTPUT_STREAM (subprocess->stdin_pipe)), TRUE, NULL); +#endif + state->stdin_buf = g_memory_input_stream_new_from_bytes (stdin_buf); g_output_stream_splice_async (subprocess->stdin_pipe, (GInputStream*)state->stdin_buf, G_OUTPUT_STREAM_SPLICE_CLOSE_SOURCE | G_OUTPUT_STREAM_SPLICE_CLOSE_TARGET, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/glib-2.64.4/gio/gwin32registrykey.c new/glib-2.64.5/gio/gwin32registrykey.c --- old/glib-2.64.4/gio/gwin32registrykey.c 2020-07-02 15:02:13.657878600 +0200 +++ new/glib-2.64.5/gio/gwin32registrykey.c 2020-08-18 13:06:36.963521000 +0200 @@ -2334,8 +2334,6 @@ switch (prop_id) { case PROP_PATH: - g_assert (priv->absolute_path_w == NULL); - g_assert (priv->absolute_path == NULL); path = g_value_get_string (value); if (path == NULL) @@ -2346,20 +2344,21 @@ if (path_w == NULL) break; - g_free (priv->absolute_path_w); - g_free (priv->absolute_path); + /* Construct only */ + g_assert (priv->absolute_path_w == NULL); + g_assert (priv->absolute_path == NULL); priv->absolute_path_w = path_w; priv->absolute_path = g_value_dup_string (value); break; case PROP_PATH_UTF16: - g_assert (priv->absolute_path_w == NULL); - g_assert (priv->absolute_path == NULL); path_w = (gunichar2 *) g_value_get_pointer (value); if (path_w == NULL) break; + /* Construct only */ + g_assert (priv->absolute_path_w == NULL); priv->absolute_path_w = g_wcsdup (path_w, -1); break; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/glib-2.64.4/glib/gvariant-core.c new/glib-2.64.5/glib/gvariant-core.c --- old/glib-2.64.4/glib/gvariant-core.c 2020-07-02 15:02:13.723878900 +0200 +++ new/glib-2.64.5/glib/gvariant-core.c 2020-08-18 13:06:37.016521700 +0200 @@ -666,6 +666,21 @@ return (value->state & STATE_TRUSTED) != 0; } +/* < internal > + * g_variant_get_depth: + * @value: a #GVariant + * + * Gets the nesting depth of a #GVariant. This is 0 for a #GVariant with no + * children. + * + * Returns: nesting depth of @value + */ +gsize +g_variant_get_depth (GVariant *value) +{ + return value->depth; +} + /* -- public -- */ /** diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/glib-2.64.4/glib/gvariant-core.h new/glib-2.64.5/glib/gvariant-core.h --- old/glib-2.64.4/glib/gvariant-core.h 2020-07-02 15:02:13.723878900 +0200 +++ new/glib-2.64.5/glib/gvariant-core.h 2020-08-18 13:06:37.016521700 +0200 @@ -34,4 +34,6 @@ GVariantTypeInfo * g_variant_get_type_info (GVariant *value); +gsize g_variant_get_depth (GVariant *value); + #endif /* __G_VARIANT_CORE_H__ */ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/glib-2.64.4/glib/gvariant.c new/glib-2.64.5/glib/gvariant.c --- old/glib-2.64.4/glib/gvariant.c 2020-07-02 15:02:13.724879000 +0200 +++ new/glib-2.64.5/glib/gvariant.c 2020-08-18 13:06:37.017521600 +0200 @@ -5948,6 +5948,7 @@ serialised.type_info = g_variant_get_type_info (trusted); serialised.size = g_variant_get_size (trusted); serialised.data = g_malloc (serialised.size); + serialised.depth = g_variant_get_depth (trusted); g_variant_store (trusted, serialised.data); g_variant_unref (trusted); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/glib-2.64.4/meson.build new/glib-2.64.5/meson.build --- old/glib-2.64.4/meson.build 2020-07-02 15:02:13.760879000 +0200 +++ new/glib-2.64.5/meson.build 2020-08-18 13:06:37.046522100 +0200 @@ -1,5 +1,5 @@ project('glib', 'c', 'cpp', - version : '2.64.4', + version : '2.64.5', # NOTE: We keep this pinned at 0.49 because that's what Debian 10 ships meson_version : '>= 0.49.2', default_options : [ @@ -834,6 +834,15 @@ glib_conf.set('HAVE_C99_SNPRINTF', false) glib_conf.set('HAVE_C99_VSNPRINTF', false) glib_conf.set('HAVE_UNIX98_PRINTF', false) +elif not cc_can_run and host_system in ['ios', 'darwin'] + # All these are true when compiling natively on macOS, so we should use good + # defaults when building for iOS and tvOS. + glib_conf.set('HAVE_C99_SNPRINTF', true) + glib_conf.set('HAVE_C99_VSNPRINTF', true) + glib_conf.set('HAVE_UNIX98_PRINTF', true) + have_good_vsnprintf = true + have_good_snprintf = true + have_good_printf = true else vsnprintf_c99_test_code = ''' #include <stdio.h>
