Accepting request 158330 from GNOME:Next

Push GNOME:Next

OBS-URL: https://build.opensuse.org/request/show/158330
OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/glib2?expand=0&rev=219
This commit is contained in:
Dominique Leuenberger 2013-03-13 22:57:57 +00:00 committed by Git OBS Bridge
parent 1b9eb77236
commit 5b1e1943a3
5 changed files with 153 additions and 295 deletions

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:855fcbf87cb93065b488358e351774d8a39177281023bae58c286f41612658a7
size 6334872

3
glib-2.35.8.tar.xz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:ab4ca7c1851859fb2807298394ef4d1d4e96ecf9d52287653aee3cf7749ff078
size 6484640

View File

@ -1,284 +0,0 @@
diff --git a/gio/glocaldirectorymonitor.c b/gio/glocaldirectorymonitor.c
index 6aea9a0..49b2084 100644
--- a/gio/glocaldirectorymonitor.c
+++ b/gio/glocaldirectorymonitor.c
@@ -266,26 +266,78 @@ get_default_local_directory_monitor (gpointer data)
return (gpointer)G_TYPE_INVALID;
}
+static gpointer
+get_default_remote_directory_monitor (gpointer data)
+{
+ GLocalDirectoryMonitorClass *chosen_class = NULL;
+ GLocalDirectoryMonitorClass **ret = data;
+ GIOExtensionPoint *ep;
+ GIOExtension *extension;
+ GLocalDirectoryMonitorClass *klass;
+
+ _g_io_modules_ensure_loaded ();
+
+ ep = g_io_extension_point_lookup (G_LOCAL_DIRECTORY_MONITOR_EXTENSION_POINT_NAME);
+
+ extension = g_io_extension_point_get_extension_by_name (ep, "fam");
+ if (!extension)
+ return (gpointer)G_TYPE_INVALID;
+
+ klass = G_LOCAL_DIRECTORY_MONITOR_CLASS (g_io_extension_ref_class (extension));
+
+ if (klass->is_supported ())
+ chosen_class = klass;
+ else
+ g_type_class_unref (klass);
+
+ if (chosen_class)
+ {
+ *ret = chosen_class;
+ return (gpointer)G_TYPE_FROM_CLASS (chosen_class);
+ }
+ else
+ return (gpointer)G_TYPE_INVALID;
+}
+
GFileMonitor*
_g_local_directory_monitor_new (const char *dirname,
GFileMonitorFlags flags,
+ gboolean is_remote_fs,
GError **error)
{
- static GOnce once_init = G_ONCE_INIT;
GTypeClass *type_class;
GFileMonitor *monitor;
GType type;
type_class = NULL;
- g_once (&once_init, get_default_local_directory_monitor, &type_class);
- type = (GType)once_init.retval;
-
monitor = NULL;
+
+ if (is_remote_fs)
+ {
+ static GOnce once_init = G_ONCE_INIT;
+
+ g_once (&once_init, get_default_remote_directory_monitor, &type_class);
+ type = (GType)once_init.retval;
+ }
+ else
+ {
+ static GOnce once_init = G_ONCE_INIT;
+
+ g_once (&once_init, get_default_local_directory_monitor, &type_class);
+ type = (GType)once_init.retval;
+ }
+
if (type != G_TYPE_INVALID)
monitor = G_FILE_MONITOR (g_object_new (type, "dirname", dirname, "flags", flags, NULL));
- else
- g_set_error_literal (error, G_IO_ERROR, G_IO_ERROR_FAILED,
- _("Unable to find default local directory monitor type"));
+
+ if (!monitor)
+ {
+ if (is_remote_fs)
+ monitor = _g_local_directory_monitor_new (dirname, flags, FALSE, error);
+ else
+ g_set_error_literal (error, G_IO_ERROR, G_IO_ERROR_FAILED,
+ _("Unable to find default local directory monitor type"));
+ }
/* This is non-null on first pass here. Unref the class now.
* This is to avoid unloading the module and then loading it
diff --git a/gio/glocaldirectorymonitor.h b/gio/glocaldirectorymonitor.h
index 418634e..b0a0d5a 100644
--- a/gio/glocaldirectorymonitor.h
+++ b/gio/glocaldirectorymonitor.h
@@ -64,6 +64,7 @@ GType g_local_directory_monitor_get_type (void) G_GNUC_CONST;
GFileMonitor * _g_local_directory_monitor_new (const char *dirname,
GFileMonitorFlags flags,
+ gboolean is_remote_fs,
GError **error);
G_END_DECLS
diff --git a/gio/glocalfile.c b/gio/glocalfile.c
index ec290e7..d8661ba 100644
--- a/gio/glocalfile.c
+++ b/gio/glocalfile.c
@@ -2344,6 +2344,57 @@ g_local_file_move (GFile *source,
return TRUE;
}
+static gboolean
+is_remote_fs (GLocalFile *local)
+{
+ const char *fsname;
+
+ fsname = NULL;
+
+#ifdef USE_STATFS
+ struct statfs statfs_buffer;
+ int statfs_result = 0;
+
+#if STATFS_ARGS == 2
+ statfs_result = statfs (local->filename, &statfs_buffer);
+#elif STATFS_ARGS == 4
+ statfs_result = statfs (local->filename, &statfs_buffer,
+ sizeof (statfs_buffer), 0);
+#endif
+
+#elif defined(USE_STATVFS)
+ struct statvfs statfs_buffer;
+
+ statfs_result = statvfs (local->filename, &statfs_buffer);
+#else
+ return FALSE;
+#endif
+
+ if (statfs_result == -1)
+ return FALSE;
+
+#ifdef USE_STATFS
+#if defined(HAVE_STRUCT_STATFS_F_FSTYPENAME)
+ fsname = statfs_buffer.f_fstypename;
+#else
+ fsname = get_fs_type (statfs_buffer.f_type);
+#endif
+
+#elif defined(USE_STATVFS) && defined(HAVE_STRUCT_STATVFS_F_BASETYPE)
+ fsname = statfs_buffer.f_basetype;
+#endif
+
+ if (fsname != NULL)
+ {
+ if (strcmp (fsname, "nfs") == 0)
+ return TRUE;
+ if (strcmp (fsname, "nfs4") == 0)
+ return TRUE;
+ }
+
+ return FALSE;
+}
+
static GFileMonitor*
g_local_file_monitor_dir (GFile *file,
GFileMonitorFlags flags,
@@ -2351,7 +2402,7 @@ g_local_file_monitor_dir (GFile *file,
GError **error)
{
GLocalFile* local_file = G_LOCAL_FILE(file);
- return _g_local_directory_monitor_new (local_file->filename, flags, error);
+ return _g_local_directory_monitor_new (local_file->filename, flags, is_remote_fs (local_file), error);
}
static GFileMonitor*
@@ -2361,7 +2412,7 @@ g_local_file_monitor_file (GFile *file,
GError **error)
{
GLocalFile* local_file = G_LOCAL_FILE(file);
- return _g_local_file_monitor_new (local_file->filename, flags, error);
+ return _g_local_file_monitor_new (local_file->filename, flags, is_remote_fs (local_file), error);
}
static void
diff --git a/gio/glocalfilemonitor.c b/gio/glocalfilemonitor.c
index 8405d3a..5fc2163 100644
--- a/gio/glocalfilemonitor.c
+++ b/gio/glocalfilemonitor.c
@@ -191,26 +191,78 @@ get_default_local_file_monitor (gpointer data)
return (gpointer)G_TYPE_INVALID;
}
+static gpointer
+get_default_remote_file_monitor (gpointer data)
+{
+ GLocalFileMonitorClass *chosen_class = NULL;
+ GLocalFileMonitorClass **ret = data;
+ GIOExtensionPoint *ep;
+ GIOExtension *extension;
+ GLocalFileMonitorClass *klass;
+
+ _g_io_modules_ensure_loaded ();
+
+ ep = g_io_extension_point_lookup (G_LOCAL_FILE_MONITOR_EXTENSION_POINT_NAME);
+
+ extension = g_io_extension_point_get_extension_by_name (ep, "fam");
+ if (!extension)
+ return (gpointer)G_TYPE_INVALID;
+
+ klass = G_LOCAL_FILE_MONITOR_CLASS (g_io_extension_ref_class (extension));
+
+ if (klass->is_supported ())
+ chosen_class = klass;
+ else
+ g_type_class_unref (klass);
+
+ if (chosen_class)
+ {
+ *ret = chosen_class;
+ return (gpointer)G_TYPE_FROM_CLASS (chosen_class);
+ }
+ else
+ return (gpointer)G_TYPE_INVALID;
+}
+
GFileMonitor*
_g_local_file_monitor_new (const char *pathname,
GFileMonitorFlags flags,
+ gboolean is_remote_fs,
GError **error)
{
- static GOnce once_init = G_ONCE_INIT;
GTypeClass *type_class;
GFileMonitor *monitor;
GType type;
type_class = NULL;
- g_once (&once_init, get_default_local_file_monitor, &type_class);
- type = (GType)once_init.retval;
-
monitor = NULL;
+
+ if (is_remote_fs)
+ {
+ static GOnce once_init = G_ONCE_INIT;
+
+ g_once (&once_init, get_default_remote_file_monitor, &type_class);
+ type = (GType)once_init.retval;
+ }
+ else
+ {
+ static GOnce once_init = G_ONCE_INIT;
+
+ g_once (&once_init, get_default_local_file_monitor, &type_class);
+ type = (GType)once_init.retval;
+ }
+
if (type != G_TYPE_INVALID)
monitor = G_FILE_MONITOR (g_object_new (type, "filename", pathname, "flags", flags, NULL));
- else
- g_set_error_literal (error, G_IO_ERROR, G_IO_ERROR_FAILED,
- _("Unable to find default local file monitor type"));
+
+ if (!monitor)
+ {
+ if (is_remote_fs)
+ monitor = _g_local_file_monitor_new (pathname, flags, FALSE, error);
+ else
+ g_set_error_literal (error, G_IO_ERROR, G_IO_ERROR_FAILED,
+ _("Unable to find default local file monitor type"));
+ }
/* This is non-null on first pass here. Unref the class now.
* This is to avoid unloading the module and then loading it
diff --git a/gio/glocalfilemonitor.h b/gio/glocalfilemonitor.h
index 6643866..dff3d81 100644
--- a/gio/glocalfilemonitor.h
+++ b/gio/glocalfilemonitor.h
@@ -57,6 +57,7 @@ GType g_local_file_monitor_get_type (void) G_GNUC_CONST;
GFileMonitor * _g_local_file_monitor_new (const char *pathname,
GFileMonitorFlags flags,
+ gboolean is_remote_fs,
GError **error);
G_END_DECLS

View File

@ -1,3 +1,149 @@
-------------------------------------------------------------------
Tue Feb 19 10:30:25 UTC 2013 - dimstar@opensuse.org
- Update to version 2.35.8:
+ A couple of build fixes for Solaris
+ Fix signal emission for GDBusObjectManagerClient
+ Annotations fixes
+ new API: g_dbus_address_escape_value()
+ GSocketClient: add proxy-resolver property
+ GSimpleProxyResolver: new simple GProxyResolver class
+ Documentation fixes
+ gnetworkaddress: preserve IPv6 scope ID in IP literals
+ Bugs fixed: bgo#691105, bgo#692827, bgo#692829, bgo#693285,
bgo#693502, bgo#693673, bgo#693694.
+ Updated translations.
-------------------------------------------------------------------
Wed Feb 6 08:41:48 UTC 2013 - dimstar@opensuse.org
- Update to version 2.35.7:
+ Fix the build on systems with strict linkers by adding -pthread
back to the LDFLAGS for a testcase.
+ Re-enable native atomic operations on some buggy versions of
clang that ship as part of the MacOS X SDK.
+ Make G_IO_FLAG_IS_WRITEABLE an enum again (the #define broke
bindings).
+ Small documentation fix.
+ Bugs fixed: bgo#636683, bgo#657045, bgo#682818, bgo#693105.
+ Updated translations.
- Changes from version 2.35.6:
+ GUnixFdSource is a new way to add file descriptors to the
mainloop.
+ g_source_set_ready_time lets you mark a source to become ready
at a specified monotonic time.
+ The internal visibility handling of GLib has been reworked.
+ GFileMonitor will now automatically use fam instead of inotify
if $HOME is on NFS.
+ The file monitor implementation can now be overridden with the
GIO_USE_FILE_MONITOR environment variable.
+ Bugs fixed: bgo#570572, bgo#592211, bgo#625552, bgo#657729,
bgo#658020, bgo#678223, bgo#682560, bgo#682819, bgo#684404,
bgo#686853, bgo#688169, bgo#688681, bgo#690118, bgo#691624,
bgo#691812, bgo#691866, bgo#692029, bgo#692034, bgo#692058,
bgo#692079, bgo#692201, bgo#692202, bgo#692229, bgo#692332,
bgo#692360, bgo#692404, bgo#692408, bgo#692544, bgo#692583,
bgo#692618, bgo#692815, bgo#692865, bgo#692928.
+ Updated translations.
- Drop glib2-force-fam-for-remote-fs.patch: fixed upstream.
-------------------------------------------------------------------
Wed Jan 16 20:01:25 UTC 2013 - dimstar@opensuse.org
- Rebase glib2-force-fam-for-remote-fs.patch (bnc#791096).
-------------------------------------------------------------------
Tue Jan 15 07:30:00 UTC 2013 - dimstar@opensuse.org
- Update to version 2.35.4:
+ New APIs:
- g_get_num_processors, g_application_command_line_get_stdin
+ New GFileMonitor flag: G_FILE_MONITOR_WATCH_HARD_LINKS
+ Parse more timezone offset formats
+ Better timezone support on Windows
+ Make GParamSpec constructors introspectable
+ Disallow adding interfaces after class_init
+ Bugs fixed: bgo#532815, bgo#614930, bgo#626497, bgo#633117,
bgo#661767, bgo#668210, bgo#675856, bgo#684103, bgo#684723,
bgo#686058, bgo#686128, bgo#687223, bgo#687659, bgo#687920,
bgo#688681, bgo#688829, bgo#689324, bgo#689810, bgo#690043,
bgo#690084, bgo#690388, bgo#690538, bgo#690543, bgo#690670,
bgo#690902, bgo#690970, bgo#691001, bgo#691011, bgo#691077,
bgo#691110, bgo#691489, bgo#691558, bgo#691608.
+ Updated translations.
- Drop glib2-asneeded.patch: fixed upstream.
-------------------------------------------------------------------
Fri Jan 11 08:26:29 UTC 2013 - dimstar@opensuse.org
- Add glib2-asneeded.patch: Ensure gio-querymodules is linked to
ensure gio-querymodules is linked to libgobject.
-------------------------------------------------------------------
Wed Dec 26 18:01:49 UTC 2012 - zaitor@opensuse.org
- Update to version 2.35.3:
+ This release contains an incompatible change to
the g_get_home_dir() function. Previously, this function would
effectively ignore the HOME environment variable and always
return the value from /etc/password. As of this version, the
HOME variable is used if it is set and the value from
/etc/passwd is only used as a fallback.
+ We now install a public "gnetworking.h" header that can be used
to include the relevant OS-dependent networking headers. This
does not really abstract away unix-vs-windows however; error
codes, in particular, are incompatible.
+ Bugs fixed: bgo#686895, bgo#688704, bgo#602715, bgo#688377,
bgo#688180, bgo#688497, bgo#688319, bgo#688886,bgo#681685,
bgo#689037, bgo#688931, bgo#688681, bgo#652650, bgo#664627,
bgo#688419, bgo#684145, bgo#675516, bgo#689538, bgo#679683,
bgo#689377, bgo#142568, bgo#587806, bgo#689800, bgo#689847,
bgo#629301, bgo#689982, bgo#690069, bgo#623187, bgo#690083,
bgo#690163, bgo#690346, bgo#687092, bgo#690348.
-------------------------------------------------------------------
Tue Nov 27 09:49:31 UTC 2012 - dimstar@opensuse.org
- Changes from version 2.35.2:
+ GIO now has kqueue support for GFileMonitor (BSDs, Mac OS)
+ New g_variant_new_from_bytes() API
+ UNIX signal sources now allow watching SIGUSR1 and SIGUSR2
+ Many pedantic cleanups to adhere to a higher level of -W use
+ GTask changes to avoid a deadlock
+ many cleanups/fixes for Windows
+ Boxing for GPollFD, GIOChannel, GBytes, GByteArray
+ Fix URL-encoding of trashed files
+ Many other docs and annotations fixes
+ Bugs fixed: bgo#649302, bgo#668842, bgo#672924, bgo#673229,
bgo#677062, bgo#686185, bgo#686191, bgo#686797, bgo#686810,
bgo#686822, bgo#686839, bgo#686895, bgo#686898, bgo#686920,
bgo#686921, bgo#687075, bgo#687089, bgo#687098, bgo#687385,
bgo#687441, bgo#687516, bgo#687540, bgo#687541, bgo#687600,
bgo#687698, bgo#687700, bgo#687742, bgo#687801, bgo#688109,
bgo#688255, bgo#688338, bgo#688370, bgo#688378, bgo#688518.
- Changes from version 2.35.1:
+ Signal handlers connected with g_signal_connect_object() are
now automatically disconnected on target object destruction
+ The ->constructed vfunc is now called after all properties are
set
+ g_type_init() is no longer necessary and has been deprecated
+ GTask (the new GAsyncResult implementation) has landed
+ GLib version macros updated
+ Update to Unicode 6.2
+ Thread safety fixes for GFileMonitor in non-default main
contexts
+ GTimeZone support for old-format zoneinfo database (as on Mac
OS)
+ g_settings_bind() now works with non-canonical property names
+ Fix crashes related to NULL connection passed to
GBusNameVanishedCallback and document this situation
+ Bugs fixed: bgo#118536, bgo#661767, bgo#682950, bgo#683642,
bgo#684882, bgo#684909, bgo#684912, bgo#685037, bgo#685608,
bgo#685697, bgo#685733, bgo#685787, bgo#685995, bgo#686091,
bgo#686119, bgo#686161, bgo#686231, bgo#686458.
+ Updated translations.
- Disable glib2-force-fam-for-remote-fs.patch: Needs fixing.
------------------------------------------------------------------- -------------------------------------------------------------------
Tue Nov 27 08:49:31 UTC 2012 - dimstar@opensuse.org Tue Nov 27 08:49:31 UTC 2012 - dimstar@opensuse.org

View File

@ -1,7 +1,7 @@
# #
# spec file for package glib2 # spec file for package glib2
# #
# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany. # Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
# #
# All modifications and additions to the file contributed by third parties # All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed # remain the property of their copyright owners, unless otherwise agreed
@ -20,14 +20,14 @@
Name: glib2 Name: glib2
%define _name glib %define _name glib
Version: 2.34.3 Version: 2.35.8
Release: 0 Release: 0
# FIXME: find out if tapsets should really be in devel package or in main package # FIXME: find out if tapsets should really be in devel package or in main package
Summary: General-Purpose Utility Library Summary: General-Purpose Utility Library
License: LGPL-2.1+ License: LGPL-2.1+
Group: System/Libraries Group: System/Libraries
Url: http://www.gtk.org/ Url: http://www.gtk.org/
Source: http://download.gnome.org/sources/glib/2.34/%{_name}-%{version}.tar.xz Source: http://download.gnome.org/sources/glib/2.35/%{_name}-%{version}.tar.xz
Source1: glib2.sh Source1: glib2.sh
Source2: glib2.csh Source2: glib2.csh
# Not upstream file. Only proposes upstream packages: # Not upstream file. Only proposes upstream packages:
@ -43,8 +43,6 @@ Source99: baselibs.conf
Patch10: glib2-bgo569829-gettext-gkeyfile.patch Patch10: glib2-bgo569829-gettext-gkeyfile.patch
# PATCH-FEATURE-OPENSUSE glib2-fate300461-gettext-gkeyfile-suse.patch fate300461 vuntz@novell.com -- Look for translation of desktop entry strings via gettext, part that deals with the openSUSE specific infrastructure (with desktop_translations) # PATCH-FEATURE-OPENSUSE glib2-fate300461-gettext-gkeyfile-suse.patch fate300461 vuntz@novell.com -- Look for translation of desktop entry strings via gettext, part that deals with the openSUSE specific infrastructure (with desktop_translations)
Patch11: glib2-fate300461-gettext-gkeyfile-suse.patch Patch11: glib2-fate300461-gettext-gkeyfile-suse.patch
# PATCH-FIX-UPSTREAM glib2-force-fam-for-remote-fs.patch bgo#592211 hpj@novell.com -- Try monitoring files on NFS mounts via FAM before falling back to inotify.
Patch12: glib2-force-fam-for-remote-fs.patch
# PATCH-FIX-OPENSUSE glib2-suppress-schema-deprecated-path-warning.patch rh#814053 badshah400@gmail.com -- Suppress the deprecated path warning since it fills up screen unnecessarily during package installations/upgrade. # PATCH-FIX-OPENSUSE glib2-suppress-schema-deprecated-path-warning.patch rh#814053 badshah400@gmail.com -- Suppress the deprecated path warning since it fills up screen unnecessarily during package installations/upgrade.
Patch13: glib2-suppress-schema-deprecated-path-warning.patch Patch13: glib2-suppress-schema-deprecated-path-warning.patch
BuildRequires: automake BuildRequires: automake
@ -258,7 +256,6 @@ The GObject library provides an object-oriented framework for C.
translation-update-upstream translation-update-upstream
%patch10 -p1 %patch10 -p1
%patch11 -p1 %patch11 -p1
%patch12 -p1
%patch13 -p1 %patch13 -p1
cp -a %{S:1} %{S:2} %{S:5} . cp -a %{S:1} %{S:2} %{S:5} .
cp -a %{S:4} gnome_defaults.conf cp -a %{S:4} gnome_defaults.conf
@ -468,13 +465,12 @@ fi
%dir %{_datadir}/glib-2.0/ %dir %{_datadir}/glib-2.0/
%{_datadir}/glib-2.0/gdb/ %{_datadir}/glib-2.0/gdb/
%{_datadir}/glib-2.0/gettext/ %{_datadir}/glib-2.0/gettext/
%{_datadir}/glib-2.0/codegen/
%{_datadir}/glib-2.0/schemas/gschema.dtd %{_datadir}/glib-2.0/schemas/gschema.dtd
%{_includedir}/glib-2.0 %{_includedir}/glib-2.0
%{_includedir}/gio-unix-2.0 %{_includedir}/gio-unix-2.0
%{_libdir}/lib*.so %{_libdir}/lib*.so
%dir %{_libdir}/glib-2.0/ %dir %{_libdir}/glib-2.0/
%dir %{_libdir}/gdbus-2.0/
%{_libdir}/gdbus-2.0/codegen/
%{_libdir}/glib-2.0/include/ %{_libdir}/glib-2.0/include/
%{_libdir}/pkgconfig/*.pc %{_libdir}/pkgconfig/*.pc
%{_datadir}/gtk-doc/html/gio %{_datadir}/gtk-doc/html/gio