=== modified file 'debian/changelog' --- debian/changelog 2013-07-03 22:47:05 +0000 +++ debian/changelog 2013-07-03 22:47:14 +0000 @@ -1,3 +1,20 @@ +geoclue (0.12.99-2ubuntu1) UNRELEASED; urgency=low + + * Sync with Debian (LP: #1195527). Remaining changes: + - debian/control: + + Don't build-depend on ofono, it's not in main (yet?) + + Don't have geoclue recommend specific providers + - debian/patches/libgps20-compat.patch: + + Fix build with gpsd >= 3.1 + - debian/patches/lp_738584.patch: + + Don't fail on resume if position / address providers are already + inited when we try to prepare interfaces + - debian/patches/master-provider-connect.patch: + + pay attention to providers that don't claim to be cacheable, + this fixes reliability issues with indicator-datetime + + -- Jeremy Bicha Thu, 27 Jun 2013 20:17:48 -0400 + geoclue (0.12.99-2) unstable; urgency=low * [3d2d3dbf] Adopt the package with Bernd blessing === modified file 'debian/control' --- debian/control 2013-07-03 22:47:05 +0000 +++ debian/control 2013-07-03 22:47:14 +0000 @@ -1,7 +1,8 @@ Source: geoclue Section: utils Priority: optional -Maintainer: Laurent Bigonville +Maintainer: Ubuntu Desktop Team +XSBC-Original-Maintainer: Laurent Bigonville Uploaders: Craig Andrews Build-Depends: debhelper (>= 9), pkg-config, @@ -13,20 +14,19 @@ libnm-glib-dev [linux-any], libnm-util-dev [linux-any], network-manager-dev [linux-any], - ofono-dev, +# ofono-dev, libsoup-gnome2.4-dev Homepage: http://www.freedesktop.org/wiki/Software/GeoClue Standards-Version: 3.9.4 -Vcs-Git: git://git.debian.org/collab-maint/geoclue.git -Vcs-Browser: http://git.debian.org/?p=collab-maint/geoclue.git +Vcs-Bzr: http://bazaar.launchpad.net/~ubuntu-desktop/geoclue/ubuntu Package: geoclue Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends} -Recommends: geoclue-hostip, - geoclue-localnet, - geoclue-nominatim, - geoclue-manual +#Recommends: geoclue-hostip, +# geoclue-localnet, +# geoclue-nominatim, +# geoclue-manual Description: Geographic information framework GeoClue provides applications access to various geographical information sources using a D-Bus API or a C library. === added file 'debian/patches/libgps20-compat.patch' --- debian/patches/libgps20-compat.patch 1970-01-01 00:00:00 +0000 +++ debian/patches/libgps20-compat.patch 2013-07-03 22:47:14 +0000 @@ -0,0 +1,75 @@ +Description: Refactoring to support new libgps API +Author: James Page +Bug: https://bugs.freedesktop.org/show_bug.cgi?id=40996 +Forwarded: no + +Index: geoclue-providers-0.12.0/providers/gpsd/geoclue-gpsd.c +=================================================================== +--- geoclue-providers-0.12.0.orig/providers/gpsd/geoclue-gpsd.c 2011-12-14 10:57:44.000000000 +0000 ++++ geoclue-providers-0.12.0/providers/gpsd/geoclue-gpsd.c 2011-12-14 11:03:11.271878045 +0000 +@@ -40,7 +40,12 @@ + #include + #include + ++#if GPSD_API_MAJOR_VERSION >= 5 ++/* gps_data conflicts with gps_data function */ ++typedef struct gps_data_t gps_data_l; ++#else + typedef struct gps_data_t gps_data; ++#endif + typedef struct gps_fix_t gps_fix; + + /* only listing used tags */ +@@ -59,7 +64,11 @@ + char *host; + char *port; + ++#if GPSD_API_MAJOR_VERSION >= 5 ++ gps_data_l *gpsdata; ++#else + gps_data *gpsdata; ++#endif + + gps_fix *last_fix; + +@@ -394,10 +403,16 @@ + static gboolean + geoclue_gpsd_start_gpsd (GeoclueGpsd *self) + { ++#if GPSD_API_MAJOR_VERSION >= 5 ++ int status = gps_open (self->host, self->port, self->gpsdata); ++ if (status == 0) { ++ gps_stream(self->gpsdata, WATCH_ENABLE | WATCH_NMEA, NULL); ++#else + self->gpsdata = gps_open (self->host, self->port); + if (self->gpsdata) { + gps_stream(self->gpsdata, WATCH_ENABLE | WATCH_NMEA | POLL_NONBLOCK, NULL); + gps_set_raw_hook (self->gpsdata, gpsd_raw_hook); ++#endif + return TRUE; + } else { + g_warning ("gps_open() failed, is gpsd running (host=%s,port=%s)?", self->host, self->port); +@@ -410,10 +425,23 @@ + { + GeoclueGpsd *self = (GeoclueGpsd*)data; + if (self->gpsdata) { ++#if GPSD_API_MAJOR_VERSION >= 5 ++ /* gps_poll and gps_set_raw_hook no longer present in this API version */ ++ if (gps_waiting(self->gpsdata, 500)) { ++ if (gps_read(self->gpsdata) == -1) { ++ geoclue_gpsd_set_status (self, GEOCLUE_STATUS_ERROR); ++ geoclue_gpsd_stop_gpsd(self); ++ return FALSE; ++ } else { ++ /* Call existing raw_hook to process the data */ ++ gpsd_raw_hook(self->gpsdata, NULL, 0); ++ } ++#else + if (gps_poll(self->gpsdata) < 0) { + geoclue_gpsd_set_status (self, GEOCLUE_STATUS_ERROR); + geoclue_gpsd_stop_gpsd(self); + return FALSE; ++#endif + } + } + return TRUE; === added file 'debian/patches/lp_738584.patch' --- debian/patches/lp_738584.patch 1970-01-01 00:00:00 +0000 +++ debian/patches/lp_738584.patch 2013-07-03 22:47:14 +0000 @@ -0,0 +1,44 @@ +From: Mathieu Trudel-Lapierre +Subject: Avoid crashes if for some reason interfaces would get initialized + again while a position or address provider is already initialized. + +This is of particular interest for the suspend/resume use cases, as +identified by the bug this attempts to fix: LP: #738584. + +Index: geoclue-0.12.0/src/master-provider.c +=================================================================== +--- geoclue-0.12.0.orig/src/master-provider.c 2011-04-06 13:25:34.736603933 -0400 ++++ geoclue-0.12.0/src/master-provider.c 2011-04-06 13:45:08.274254843 -0400 +@@ -819,20 +819,20 @@ + } + + if (priv->interfaces & GC_IFACE_POSITION) { +- g_assert (priv->position == NULL); +- +- priv->position = geoclue_position_new (priv->service, +- priv->path); +- g_signal_connect (G_OBJECT (priv->position), "position-changed", +- G_CALLBACK (position_changed), provider); ++ if (priv->position == NULL) { ++ priv->position = geoclue_position_new (priv->service, ++ priv->path); ++ g_signal_connect (G_OBJECT (priv->position), "position-changed", ++ G_CALLBACK (position_changed), provider); ++ } + } + if (priv->interfaces & GC_IFACE_ADDRESS) { +- g_assert (priv->address == NULL); +- +- priv->address = geoclue_address_new (priv->service, +- priv->path); +- g_signal_connect (G_OBJECT (priv->address), "address-changed", +- G_CALLBACK (address_changed), provider); ++ if (priv->address == NULL) { ++ priv->address = geoclue_address_new (priv->service, ++ priv->path); ++ g_signal_connect (G_OBJECT (priv->address), "address-changed", ++ G_CALLBACK (address_changed), provider); ++ } + } + + if (!gc_master_provider_initialize_geoclue (provider)) { === added file 'debian/patches/master-provider-connect.patch' --- debian/patches/master-provider-connect.patch 1970-01-01 00:00:00 +0000 +++ debian/patches/master-provider-connect.patch 2013-07-03 22:47:14 +0000 @@ -0,0 +1,18 @@ +Description: pay attention to providers that don't claim to be cacheable + this fixes reliability issues with indicator-datetime +Bug: https://bugs.launchpad.net/bugs/1050179 +=== modified file 'src/master-provider.c' +--- old/src/master-provider.c 2010-03-30 22:51:42 +0000 ++++ new/src/master-provider.c 2012-09-12 20:54:38 +0000 +@@ -986,9 +986,7 @@ + gc_master_provider_handle_status_change (provider); + } + +- if (connectivity && +- (priv->provides & GEOCLUE_PROVIDE_CACHEABLE_ON_CONNECTION)) { +- ++ if (connectivity) { + /* we have network status events: mark network provider + * with update flag, set the callback and set use_cache */ + priv->provides |= GEOCLUE_PROVIDE_UPDATES; + === modified file 'debian/patches/series' --- debian/patches/series 2013-07-03 22:47:05 +0000 +++ debian/patches/series 2013-07-03 22:47:14 +0000 @@ -1,1 +1,4 @@ documentation-comment-fix +libgps20-compat.patch +lp_738584.patch +master-provider-connect.patch