Compare commits

...

12 Commits
master ... f19

Author SHA1 Message Date
Richard Hughes de2d1886be Update to 2.36.4 2014-01-20 16:19:27 +00:00
Richard W.M. Jones d48f19b462 Fix for https://bugzilla.redhat.com/show_bug.cgi?id=984913
gvfs-gphoto2 fails when copying files from the camera using caja or nautilus
2013-11-17 10:00:22 +00:00
David Woodhouse 1fd186364d Fix GNetworkMonitorNetlink online detection failure (#983426) 2013-08-01 17:06:52 +01:00
Colin Walters e157e09c33 Bump release 2013-06-20 17:02:33 -04:00
Colin Walters e79cec334c Backport patch from upstream to fix dconf corruption, among
other failures. (#975521)
2013-06-20 17:01:30 -04:00
Matthias Clasen 262869cae7 fix build 2013-06-09 20:37:44 -04:00
Matthias Clasen 21d1030af4 2.36.3 2013-06-09 20:20:06 -04:00
Richard Hughes 4fa4146ab7 Update to 2.36.2 2013-05-13 15:53:26 +01:00
Thorsten Leemhuis 6a6573ba10 Fix pidgin freezes by applying patch from master (#956872) 2013-04-29 18:27:29 +02:00
Kalev Lember b96bb7d6c7 Update to 2.36.1 2013-04-16 00:12:58 +02:00
Kalev Lember ebd0905948 Update to 2.36.0 2013-03-25 22:55:32 +01:00
Matthias Clasen 91a282fb75 2.35.9 2013-03-19 20:14:58 -04:00
4 changed files with 83 additions and 140 deletions

View File

@ -0,0 +1,54 @@
From be2656f13952dd22d348ff5e3f43240700cdef5a Mon Sep 17 00:00:00 2001
From: Colin Walters <walters@verbum.org>
Date: Wed, 16 Oct 2013 14:10:22 +0000
Subject: g_file_copy: Fall back to pathname queryinfo to help gvfs backends
It's not difficult to do; not all backends implement it, and for some
it may be difficult to implement query_info_on_read(), so let's just
do both.
https://bugzilla.gnome.org/show_bug.cgi?id=706254
---
diff --git a/gio/gfile.c b/gio/gfile.c
index afaee21..bf936ec 100644
--- a/gio/gfile.c
+++ b/gio/gfile.c
@@ -3112,6 +3112,8 @@ file_copy_fallback (GFile *source,
if (attrs_to_read != NULL)
{
+ GError *tmp_error = NULL;
+
/* Ok, ditch the previous lightweight info (on Unix we just
* called lstat()); at this point we gather all the information
* we need about the source from the opened file descriptor.
@@ -3119,7 +3121,26 @@ file_copy_fallback (GFile *source,
g_object_unref (info);
info = g_file_input_stream_query_info (file_in, attrs_to_read,
- cancellable, error);
+ cancellable, &tmp_error);
+ if (!info)
+ {
+ /* Not all gvfs backends implement query_info_on_read(), we
+ * can just fall back to the pathname again.
+ * https://bugzilla.gnome.org/706254
+ */
+ if (g_error_matches (tmp_error, G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED))
+ {
+ g_clear_error (&tmp_error);
+ info = g_file_query_info (source, attrs_to_read, G_FILE_QUERY_INFO_NOFOLLOW_SYMLINKS,
+ cancellable, error);
+ }
+ else
+ {
+ g_free (attrs_to_read);
+ g_propagate_error (error, tmp_error);
+ goto out;
+ }
+ }
g_free (attrs_to_read);
if (!info)
goto out;
--
cgit v0.9.2

View File

@ -1,133 +0,0 @@
From f3b1054b0ebb4912f700e08da0c3d35c30113e79 Mon Sep 17 00:00:00 2001
From: Ryan Lortie <desrt@desrt.ca>
Date: Tue, 23 Apr 2013 17:26:48 +0000
Subject: Partially revert "Merge waitpid() from g_spawn_sync into gmain()"
This partially reverts commit ce0022933c255313e010b27f977f4ae02aad1e7e.
It used to be safe to use g_spawn_sync() from processes that had their
own SIGCHLD handler because it simply called wait(). When it was
changed to depend on the GLib child watching infrastructure this meant
that GLib had to own the SIGCHLD handler.
This caused hangs in at least Pidgin.
The patch contained two other improvements to the child watch code which
we want to keep, so only revert the changes to gspawn itself.
https://bugzilla.gnome.org/show_bug.cgi?id=698081
---
diff --git a/glib/gspawn.c b/glib/gspawn.c
index 381ed5c..01cedf6 100644
--- a/glib/gspawn.c
+++ b/glib/gspawn.c
@@ -47,7 +47,6 @@
#include "genviron.h"
#include "gmem.h"
-#include "gmain.h"
#include "gshell.h"
#include "gstring.h"
#include "gstrfuncs.h"
@@ -207,21 +206,6 @@ read_data (GString *str,
}
}
-typedef struct {
- GMainLoop *loop;
- gint *status_p;
-} SyncWaitpidData;
-
-static void
-on_sync_waitpid (GPid pid,
- gint status,
- gpointer user_data)
-{
- SyncWaitpidData *data = user_data;
- *(data->status_p) = status;
- g_main_loop_quit (data->loop);
-}
-
/**
* g_spawn_sync:
* @working_directory: (allow-none): child's current working directory, or %NULL to inherit parent's
@@ -277,7 +261,6 @@ g_spawn_sync (const gchar *working_directory,
GString *errstr = NULL;
gboolean failed;
gint status;
- SyncWaitpidData waitpid_data;
g_return_val_if_fail (argv != NULL, FALSE);
g_return_val_if_fail (!(flags & G_SPAWN_DO_NOT_REAP_CHILD), FALSE);
@@ -410,32 +393,45 @@ g_spawn_sync (const gchar *working_directory,
close_and_invalidate (&outpipe);
if (errpipe >= 0)
close_and_invalidate (&errpipe);
-
- /* Now create a temporary main context and loop, with just one
- * waitpid source. We used to invoke waitpid() directly here, but
- * this way we unify with the worker thread in gmain.c.
+
+ /* Wait for child to exit, even if we have
+ * an error pending.
*/
- {
- GMainContext *context;
- GMainLoop *loop;
- GSource *source;
-
- context = g_main_context_new ();
- loop = g_main_loop_new (context, TRUE);
+ again:
+
+ ret = waitpid (pid, &status, 0);
- waitpid_data.loop = loop;
- waitpid_data.status_p = &status;
-
- source = g_child_watch_source_new (pid);
- g_source_set_callback (source, (GSourceFunc)on_sync_waitpid, &waitpid_data, NULL);
- g_source_attach (source, context);
- g_source_unref (source);
-
- g_main_loop_run (loop);
+ if (ret < 0)
+ {
+ if (errno == EINTR)
+ goto again;
+ else if (errno == ECHILD)
+ {
+ if (exit_status)
+ {
+ g_warning ("In call to g_spawn_sync(), exit status of a child process was requested but ECHILD was received by waitpid(). Most likely the process is ignoring SIGCHLD, or some other thread is invoking waitpid() with a nonpositive first argument; either behavior can break applications that use g_spawn_sync either directly or indirectly.");
+ }
+ else
+ {
+ /* We don't need the exit status. */
+ }
+ }
+ else
+ {
+ if (!failed) /* avoid error pileups */
+ {
+ int errsv = errno;
- g_main_context_unref (context);
- g_main_loop_unref (loop);
- }
+ failed = TRUE;
+
+ g_set_error (error,
+ G_SPAWN_ERROR,
+ G_SPAWN_ERROR_READ,
+ _("Unexpected error in waitpid() (%s)"),
+ g_strerror (errsv));
+ }
+ }
+ }
if (failed)
{
--
cgit v0.9.1

View File

@ -1,15 +1,15 @@
Summary: A library of handy utility functions
Name: glib2
Version: 2.36.1
Release: 2%{?dist}
Version: 2.36.4
Release: 1%{?dist}
License: LGPLv2+
Group: System Environment/Libraries
URL: http://www.gtk.org
#VCS: git:git://git.gnome.org/glib
Source: http://download.gnome.org/sources/glib/2.36/glib-%{version}.tar.xz
# patch0 was is commit eb860fd on master and f3b1054b in 2.36
# backgrounds: https://bugzilla.gnome.org/show_bug.cgi?id=698081
Patch0: %{name}-partially_revert_merge_waitpid_from_g_spawn_sync_into_gmain.patch
# Fix for https://bugzilla.redhat.com/show_bug.cgi?id=984913
# gvfs-gphoto2 fails when copying files from the camera using caja or nautilus
Patch2: glib-g-file-copy-rhbz984913.patch
BuildRequires: pkgconfig
BuildRequires: gettext
@ -67,7 +67,9 @@ The glib2-fam package contains the FAM (File Alteration Monitor) module for GIO.
%prep
%setup -q -n glib-%{version}
%patch0 -p1 -b .patch0
%patch2 -p1
autoreconf -i -f
%build
# Support builds of both git snapshots and tarballs packed with autogoo
@ -188,6 +190,26 @@ gio-querymodules-%{__isa_bits} %{_libdir}/gio/modules
%{_libdir}/gio/modules/libgiofam.so
%changelog
* Mon Jan 20 2014 Richard Hughes <rhughes@redhat.com> - 2.36.4-1
- Update to 2.36.4
* Sun Nov 17 2013 Richard W.M. Jones <rjones@redhat.com> - 2.36.3-4
- Fix for https://bugzilla.redhat.com/show_bug.cgi?id=984913
gvfs-gphoto2 fails when copying files from the camera using caja or nautilus
* Thu Aug 1 2013 David Woodhouse <David.Woodhouse@intel.com> - 2.36.3-3
- Backport patch from upstream for online detection failure (#983426)
* Thu Jun 20 2013 Colin Walters <walters@redhat.com> - 2.36.3-2
- Backport patch from upstream to fix dconf corruption, among
other failures. (#975521)
* Sun Jun 9 2013 Matthias Clasen <mclasen@redhat.com> - 2.36.3-1
- Update to 2.36.3
* Mon May 13 2013 Richard Hughes <rhughes@redhat.com> - 2.36.2-1
- Update to 2.36.2
* Sat Apr 27 2013 Thorsten Leemhuis <fedora@leemhuis.info> - 2.36.1-2
- Fix pidgin freezes by applying patch from master (#956872)

View File

@ -1 +1 @@
a3bbee44a13facb5a3cab18be5ece14c glib-2.36.1.tar.xz
2f4b15f7ef43d8702d067ab987bf7aba glib-2.36.4.tar.xz