Accepting request 97451 from home:vuntz:branches:GNOME:Factory

cleanup

OBS-URL: https://build.opensuse.org/request/show/97451
OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/gnome-bluetooth?expand=0&rev=85
This commit is contained in:
Vincent Untz 2011-12-21 05:06:03 +00:00 committed by Git OBS Bridge
parent 33fb342422
commit efd23b93cc
4 changed files with 98 additions and 139 deletions

View File

@ -1,113 +0,0 @@
From 00e1b334b3014ce9ed72b5d3391313467d6fe181 Mon Sep 17 00:00:00 2001
From: Vincent Untz <vuntz@gnome.org>
Date: Fri, 7 Oct 2011 15:46:51 +0200
Subject: [PATCH 1/2] lib: Disconnect signals from adapters and devices on
finalize
This avoids some crashes.
https://bugzilla.gnome.org/show_bug.cgi?id=661118
https://bugzilla.gnome.org/show_bug.cgi?id=654172
---
lib/bluetooth-client.c | 33 +++++++++++++++++++++++++++++++++
1 files changed, 33 insertions(+), 0 deletions(-)
Index: gnome-bluetooth-3.3.2/lib/bluetooth-client.c
===================================================================
--- gnome-bluetooth-3.3.2.orig/lib/bluetooth-client.c
+++ gnome-bluetooth-3.3.2/lib/bluetooth-client.c
@@ -80,6 +80,7 @@ struct _BluetoothClientPrivate {
Manager *manager;
GtkTreeStore *store;
GtkTreeRowReference *default_adapter;
+ GSList *horrible_workaround_for_leaked_ifaces;
};
enum {
@@ -323,6 +324,7 @@ get_properties_for_iface (GDBusProxy *pr
static GHashTable *
device_list_nodes (Device *device, BluetoothClient *client)
{
+ BluetoothClientPrivate *priv = BLUETOOTH_CLIENT_GET_PRIVATE(client);
GHashTable *table;
guint i;
@@ -348,6 +350,8 @@ device_list_nodes (Device *device, Bluet
g_hash_table_lookup (table, BLUEZ_AUDIOSINK_INTERFACE) == NULL) {
continue;
}
+
+ priv->horrible_workaround_for_leaked_ifaces = g_slist_append (priv->horrible_workaround_for_leaked_ifaces, iface);
}
/* And skip interface if it's already in the hash table */
@@ -1001,6 +1005,7 @@ bluez_vanished_cb (GDBusConnection *conn
static void bluetooth_client_init(BluetoothClient *client)
{
BluetoothClientPrivate *priv = BLUETOOTH_CLIENT_GET_PRIVATE(client);
+ GSList *l;
priv->store = gtk_tree_store_new(_BLUETOOTH_NUM_COLUMNS, G_TYPE_OBJECT,
G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING,
@@ -1260,6 +1265,37 @@ bluetooth_client_set_property (GObject
}
}
+static gboolean
+disconnect_from_proxy_helper (GtkTreeModel *model,
+ GtkTreePath *path,
+ GtkTreeIter *iter,
+ gpointer data)
+{
+ BluetoothClient *client = data;
+ DBusGProxy *proxy;
+
+ gtk_tree_model_get(model, iter,
+ BLUETOOTH_COLUMN_PROXY, &proxy, -1);
+
+ /* adapters */
+ g_signal_handlers_disconnect_by_func(proxy,
+ adapter_changed, client);
+ g_signal_handlers_disconnect_by_func(proxy,
+ device_created, client);
+ g_signal_handlers_disconnect_by_func(proxy,
+ device_removed, client);
+ g_signal_handlers_disconnect_by_func(proxy,
+ device_found, client);
+
+ /* devices */
+ g_signal_handlers_disconnect_by_func(proxy,
+ device_changed, client);
+
+ g_object_unref(proxy);
+
+ return FALSE;
+}
+
static void bluetooth_client_finalize(GObject *client)
{
BluetoothClientPrivate *priv = BLUETOOTH_CLIENT_GET_PRIVATE(client);
@@ -1270,11 +1306,22 @@ static void bluetooth_client_finalize(GO
g_object_unref(priv->manager);
+ gtk_tree_model_foreach (GTK_TREE_MODEL(priv->store), disconnect_from_proxy_helper, client);
+
g_object_unref(priv->store);
if (priv->default_adapter)
gtk_tree_row_reference_free (priv->default_adapter);
+ for (l = priv->horrible_workaround_for_leaked_ifaces; l != NULL; l = l->next) {
+ DBusGProxy *iface = l->data;
+
+ g_signal_handlers_disconnect_by_func(iface,
+ device_services_changed, client);
+ g_object_unref (iface);
+ }
+ g_slist_free (priv->horrible_workaround_for_leaked_ifaces);
+
G_OBJECT_CLASS(bluetooth_client_parent_class)->finalize(client);
}

View File

@ -0,0 +1,60 @@
Index: gnome-bluetooth-3.3.2/lib/Makefile.am
===================================================================
--- gnome-bluetooth-3.3.2.orig/lib/Makefile.am
+++ gnome-bluetooth-3.3.2/lib/Makefile.am
@@ -76,8 +76,8 @@ introspection_files = \
$(libgnome_bluetooth_c_sources)
GnomeBluetooth-1.0.gir: libgnome-bluetooth.la
-GnomeBluetooth_1_0_gir_INCLUDES = GObject-2.0 Gtk-3.0 DBusGLib-1.0 GModule-2.0
-GnomeBluetooth_1_0_gir_PACKAGES = gobject-2.0 gtk+-3.0 dbus-glib-1 gmodule-2.0 glib-2.0
+GnomeBluetooth_1_0_gir_INCLUDES = GObject-2.0 Gtk-3.0 GModule-2.0
+GnomeBluetooth_1_0_gir_PACKAGES = gobject-2.0 gtk+-3.0 gmodule-2.0 glib-2.0
GnomeBluetooth_1_0_gir_CFLAGS = -I$(srcdir)
GnomeBluetooth_1_0_gir_LIBS = libgnome-bluetooth.la
GnomeBluetooth_1_0_gir_SCANNERFLAGS = --symbol-prefix=bluetooth_ --identifier-prefix=Bluetooth --pkg-export=gnome-bluetooth-1.0
Index: gnome-bluetooth-3.3.2/lib/Makefile.in
===================================================================
--- gnome-bluetooth-3.3.2.orig/lib/Makefile.in
+++ gnome-bluetooth-3.3.2/lib/Makefile.in
@@ -453,8 +453,8 @@ INTROSPECTION_COMPILER_ARGS = --included
@HAVE_INTROSPECTION_TRUE@ $(libgnome_bluetooth_introspect_headers) \
@HAVE_INTROSPECTION_TRUE@ $(libgnome_bluetooth_c_sources)
-@HAVE_INTROSPECTION_TRUE@GnomeBluetooth_1_0_gir_INCLUDES = GObject-2.0 Gtk-3.0 DBusGLib-1.0 GModule-2.0
-@HAVE_INTROSPECTION_TRUE@GnomeBluetooth_1_0_gir_PACKAGES = gobject-2.0 gtk+-3.0 dbus-glib-1 gmodule-2.0 glib-2.0
+@HAVE_INTROSPECTION_TRUE@GnomeBluetooth_1_0_gir_INCLUDES = GObject-2.0 Gtk-3.0 GModule-2.0
+@HAVE_INTROSPECTION_TRUE@GnomeBluetooth_1_0_gir_PACKAGES = gobject-2.0 gtk+-3.0 gmodule-2.0 glib-2.0
@HAVE_INTROSPECTION_TRUE@GnomeBluetooth_1_0_gir_CFLAGS = -I$(srcdir)
@HAVE_INTROSPECTION_TRUE@GnomeBluetooth_1_0_gir_LIBS = libgnome-bluetooth.la
@HAVE_INTROSPECTION_TRUE@GnomeBluetooth_1_0_gir_SCANNERFLAGS = --symbol-prefix=bluetooth_ --identifier-prefix=Bluetooth --pkg-export=gnome-bluetooth-1.0
Index: gnome-bluetooth-3.3.2/applet/Makefile-lib.am
===================================================================
--- gnome-bluetooth-3.3.2.orig/applet/Makefile-lib.am
+++ gnome-bluetooth-3.3.2/applet/Makefile-lib.am
@@ -21,8 +21,8 @@ INTROSPECTION_COMPILER_ARGS = --included
if HAVE_INTROSPECTION
GnomeBluetoothApplet-1.0.gir: libgnome-bluetooth-applet.la
GnomeBluetoothApplet_1_0_gir_SCANNERFLAGS = --warn-all --symbol-prefix=bluetooth_ --identifier-prefix=Bluetooth --include-uninstalled=$(top_builddir)/lib/GnomeBluetooth-1.0.gir
-GnomeBluetoothApplet_1_0_gir_INCLUDES = GObject-2.0 Gtk-3.0 DBusGLib-1.0 GModule-2.0
-GnomeBluetoothApplet_1_0_gir_PACKAGES = gobject-2.0 gtk+-3.0 dbus-glib-1 gmodule-2.0 glib-2.0
+GnomeBluetoothApplet_1_0_gir_INCLUDES = GObject-2.0 Gtk-3.0 GModule-2.0
+GnomeBluetoothApplet_1_0_gir_PACKAGES = gobject-2.0 gtk+-3.0 gmodule-2.0 glib-2.0
GnomeBluetoothApplet_1_0_gir_CFLAGS = -I$(srcdir) -I$(top_srcdir) -I$(top_srcdir)/lib
GnomeBluetoothApplet_1_0_gir_LIBS = libgnome-bluetooth-applet.la
GnomeBluetoothApplet_1_0_gir_FILES = $(libgnome_bluetooth_applet_la_SOURCES) ../lib/bluetooth-enums.h
Index: gnome-bluetooth-3.3.2/applet/Makefile.in
===================================================================
--- gnome-bluetooth-3.3.2.orig/applet/Makefile.in
+++ gnome-bluetooth-3.3.2/applet/Makefile.in
@@ -356,8 +356,8 @@ INTROSPECTION_GIRS = $(am__append_1)
INTROSPECTION_SCANNER_ARGS = --add-include-path=$(srcdir)
INTROSPECTION_COMPILER_ARGS = --includedir=$(srcdir) --includedir=$(top_builddir)/lib
@HAVE_INTROSPECTION_TRUE@GnomeBluetoothApplet_1_0_gir_SCANNERFLAGS = --warn-all --symbol-prefix=bluetooth_ --identifier-prefix=Bluetooth --include-uninstalled=$(top_builddir)/lib/GnomeBluetooth-1.0.gir
-@HAVE_INTROSPECTION_TRUE@GnomeBluetoothApplet_1_0_gir_INCLUDES = GObject-2.0 Gtk-3.0 DBusGLib-1.0 GModule-2.0
-@HAVE_INTROSPECTION_TRUE@GnomeBluetoothApplet_1_0_gir_PACKAGES = gobject-2.0 gtk+-3.0 dbus-glib-1 gmodule-2.0 glib-2.0
+@HAVE_INTROSPECTION_TRUE@GnomeBluetoothApplet_1_0_gir_INCLUDES = GObject-2.0 Gtk-3.0 GModule-2.0
+@HAVE_INTROSPECTION_TRUE@GnomeBluetoothApplet_1_0_gir_PACKAGES = gobject-2.0 gtk+-3.0 gmodule-2.0 glib-2.0
@HAVE_INTROSPECTION_TRUE@GnomeBluetoothApplet_1_0_gir_CFLAGS = -I$(srcdir) -I$(top_srcdir) -I$(top_srcdir)/lib
@HAVE_INTROSPECTION_TRUE@GnomeBluetoothApplet_1_0_gir_LIBS = libgnome-bluetooth-applet.la
@HAVE_INTROSPECTION_TRUE@GnomeBluetoothApplet_1_0_gir_FILES = $(libgnome_bluetooth_applet_la_SOURCES) ../lib/bluetooth-enums.h

View File

@ -1,14 +1,30 @@
-------------------------------------------------------------------
Wed Dec 21 01:17:36 UTC 2011 - vuntz@opensuse.org
- Remove gtk2-devel Requires from devel subpackage: it will
automatically be added the pkgconfig() way.
- Rewrite summary and description of devel subpackage.
- Change group of libgnome-bluetooth9 and
typelib-1_0-GnomeBluetooth-1_0 from System/GUI/GNOME to
System/Libraries.
- Add gnome-bluetooth-no-dbus-glib.patch: finish removing dbus-glib
usage in the build system.
- Remove pkgconfig(dbus-glib-1) BuildRequires: it is gone since
version 3.3.2.
------------------------------------------------------------------- -------------------------------------------------------------------
Thu Dec 8 20:03:29 UTC 2011 - dimstar@opensuse.org Thu Dec 8 20:03:29 UTC 2011 - dimstar@opensuse.org
- Split typelib file in typelib-1_0-GnomeBluetooth-1_0. - Split typelib file into typelib-1_0-GnomeBluetooth-1_0
subpackage.
- Add typelib-1_0-GnomeBluetooth-1_0 Requires to devel subpackage.
------------------------------------------------------------------- -------------------------------------------------------------------
Sat Nov 26 15:16:06 UTC 2011 - dimstar@opensuse.org Sat Nov 26 15:16:06 UTC 2011 - dimstar@opensuse.org
- Remove all .la files. gnome-bluetooth-applet.la on its own has - Remove all .la files: gnome-bluetooth-applet.la on its own has
reference to the other la files. Keeping some of them breaks more reference to the other la files, so keeping some of them breaks
than it serves. more than it serves.
------------------------------------------------------------------- -------------------------------------------------------------------
Mon Nov 21 17:03:09 UTC 2011 - dimstar@opensuse.org Mon Nov 21 17:03:09 UTC 2011 - dimstar@opensuse.org
@ -24,6 +40,9 @@ Mon Nov 21 17:03:09 UTC 2011 - dimstar@opensuse.org
- Remove special-case Wiimote handling (now in Bluez) - Remove special-case Wiimote handling (now in Bluez)
- Remove multi-adapter support - Remove multi-adapter support
+ Updated translations. + Updated translations.
- Drop gnome-bluetooth-fix-crash.patch: fixed upstream another way.
- Rename libgnome-bluetooth8 to libgnome-bluetooth9, following
soversion bump.
------------------------------------------------------------------- -------------------------------------------------------------------
Mon Oct 17 17:49:47 CEST 2011 - dimstar@opensuse.org Mon Oct 17 17:49:47 CEST 2011 - dimstar@opensuse.org

View File

@ -16,18 +16,19 @@
# #
Name: gnome-bluetooth Name: gnome-bluetooth
Version: 3.3.2 Version: 3.3.2
Release: 1 Release: 0
License: GPLv2+
Summary: GNOME Bluetooth graphical utilities Summary: GNOME Bluetooth graphical utilities
Url: http://live.gnome.org/GnomeBluetooth License: GPL-2.0+
Group: System/GUI/GNOME Group: System/GUI/GNOME
Url: http://live.gnome.org/GnomeBluetooth
Source: http://download.gnome.org/sources/gnome-bluetooth/3.3/%{name}-%{version}.tar.bz2 Source: http://download.gnome.org/sources/gnome-bluetooth/3.3/%{name}-%{version}.tar.bz2
Source1: 61-gnome-bluetooth-rfkill.rules Source1: 61-gnome-bluetooth-rfkill.rules
# PATCH-MISSING-TAG -- See http://en.opensuse.org/Packaging/Patches # PATCH-MISSING-TAG -- See http://en.opensuse.org/Packaging/Patches
Patch0: lxde-support.patch Patch0: lxde-support.patch
# PATCH-FIX-UPSTREAM gnome-bluetooth-no-dbus-glib.patch bgo#666630 vuntz@opensuse.org -- Finish removing dbus-glib usage in the build system
Patch1: gnome-bluetooth-no-dbus-glib.patch
BuildRequires: fdupes BuildRequires: fdupes
BuildRequires: gnome-doc-utils-devel BuildRequires: gnome-doc-utils-devel
BuildRequires: gobject-introspection-devel BuildRequires: gobject-introspection-devel
@ -35,7 +36,6 @@ BuildRequires: intltool
BuildRequires: libnotify-devel BuildRequires: libnotify-devel
BuildRequires: translation-update-upstream BuildRequires: translation-update-upstream
BuildRequires: update-desktop-files BuildRequires: update-desktop-files
BuildRequires: pkgconfig(dbus-glib-1)
BuildRequires: pkgconfig(gtk+-3.0) >= 2.90.7 BuildRequires: pkgconfig(gtk+-3.0) >= 2.90.7
BuildRequires: pkgconfig(nautilus-sendto) BuildRequires: pkgconfig(nautilus-sendto)
%if 0%{?BUILD_FROM_VCS} %if 0%{?BUILD_FROM_VCS}
@ -57,29 +57,20 @@ The gnome-bluetooth package contains graphical utilities to setup,
monitor and use Bluetooth devices. monitor and use Bluetooth devices.
%package devel %package devel
License: GPLv2+ Summary: GNOME Bluetooth graphical utilities -- Development Files
Summary: GNOME Bluetooth Support
Group: Development/Libraries/GNOME Group: Development/Libraries/GNOME
Requires: %{name} = %{version} Requires: %{name} = %{version}
Requires: typelib-1_0-GnomeBluetooth-1_0 = %{version} Requires: typelib-1_0-GnomeBluetooth-1_0 = %{version}
Requires: gtk2-devel
Obsoletes: libgnomebt-devel < 0.12 Obsoletes: libgnomebt-devel < 0.12
Provides: libgnomebt-devel = 0.12 Provides: libgnomebt-devel = 0.12
%description devel %description devel
This package contains a controller class, GnomebtController, to control The gnome-bluetooth package contains graphical utilities to setup,
Bluetooth devices and a simple GUI to explore which devices are monitor and use Bluetooth devices.
available (gnome-bluetooth-manager). An OBEX server is available,
gnome-obex-server. This receives files sent via Bluetooth to your PC
and saves them in your home directory. The program gnome-obex-send
enables you to send files. It is used by the Nautilus component --
select the files you want to send and choose "Send via Bluetooth..."
from the context menu.
%package -n libgnome-bluetooth9 %package -n libgnome-bluetooth9
License: GPLv2+
Summary: GNOME Bluetooth graphical utilities Summary: GNOME Bluetooth graphical utilities
Group: System/GUI/GNOME Group: System/Libraries
Obsoletes: libgnomebt1 <= 0.12 Obsoletes: libgnomebt1 <= 0.12
%description -n libgnome-bluetooth9 %description -n libgnome-bluetooth9
@ -87,15 +78,17 @@ The gnome-bluetooth package contains graphical utilities to setup,
monitor and use Bluetooth devices. monitor and use Bluetooth devices.
%package -n typelib-1_0-GnomeBluetooth-1_0 %package -n typelib-1_0-GnomeBluetooth-1_0
Summary: GNOME Bluetooth graphical utilities Summary: GNOME Bluetooth graphical utilities -- Introspection bindings
Group: System/GUI/GNOME Group: System/Libraries
%description -n typelib-1_0-GnomeBluetooth-1_0 %description -n typelib-1_0-GnomeBluetooth-1_0
The gnome-bluetooth package contains graphical utilities to setup, The gnome-bluetooth package contains graphical utilities to setup,
monitor and use Bluetooth devices. monitor and use Bluetooth devices.
This package provides the GObject Introspection bindings for the
gnome-bluetooth library.
%package plugins-geoclue %package plugins-geoclue
License: GPLv2+
Summary: GNOME Bluetooth Support Summary: GNOME Bluetooth Support
Group: System/GUI/GNOME Group: System/GUI/GNOME
Requires: %{name} = %{version} Requires: %{name} = %{version}
@ -106,7 +99,6 @@ The gnome-bluetooth package contains graphical utilities to setup,
monitor and use Bluetooth devices. monitor and use Bluetooth devices.
%package -n nautilus-sendto-plugin-bluetooth %package -n nautilus-sendto-plugin-bluetooth
License: GPLv2+
Summary: Bluetooth plugin for nautilus-sendto Summary: Bluetooth plugin for nautilus-sendto
Group: Productivity/File utilities Group: Productivity/File utilities
Requires: %{name} = %{version} Requires: %{name} = %{version}
@ -121,6 +113,7 @@ send files over bluetooth.
%setup -q %setup -q
translation-update-upstream translation-update-upstream
%patch0 -p1 %patch0 -p1
%patch1 -p1
%if 0%{?BUILD_FROM_VCS} %if 0%{?BUILD_FROM_VCS}
[ -x ./autogen.sh ] && NOCONFIGURE=1 ./autogen.sh [ -x ./autogen.sh ] && NOCONFIGURE=1 ./autogen.sh