[Pkg-telepathy-commits] [folks] 01/01: Team upload

Simon McVittie smcv at debian.org
Wed May 14 12:05:39 UTC 2014


This is an automated email from the git hooks/post-receive script.

smcv pushed a commit to branch debian
in repository folks.

commit c584134f27e3d1134c7be99a0b4e35c0cea0e2c9
Author: Simon McVittie <smcv at debian.org>
Date:   Wed May 14 11:32:10 2014 +0100

    Team upload
    
    * Team upload
    * Add patch from Ubuntu via upstream to fix FOLKS_DISABLE_LINKING
    * Add patches from upstream to fix crashes on invalid birthday dates
      (Closes: #744078)
    * Add patch from upstream to avoid using disabled e-d-s ESources
---
 debian/changelog                                   | 10 +++
 ...-calls-to-ImDetails.normalise_im_address.patch} | 21 ++----
 .../0005-core-Fix-FOLKS_DISABLE_LINKING.patch      | 86 ++++++++++++++++++++++
 ...06-eds-Only-use-enabled-ESources-from-EDS.patch | 44 +++++++++++
 ...sh-on-handling-invalid-birthday-dates-fro.patch | 34 +++++++++
 ...ix-crash-on-handling-invalid-birthday-dat.patch | 66 +++++++++++++++++
 ...-crash-on-handling-invalid-birthday-dates.patch | 36 +++++++++
 debian/patches/series                              |  7 +-
 8 files changed, 290 insertions(+), 14 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 51814aa..1fa7b2c 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,13 @@
+folks (0.9.6-4) unstable; urgency=medium
+
+  * Team upload
+  * Add patch from Ubuntu via upstream to fix FOLKS_DISABLE_LINKING
+  * Add patches from upstream to fix crashes on invalid birthday dates
+    (Closes: #744078)
+  * Add patch from upstream to avoid using disabled e-d-s ESources
+
+ -- Simon McVittie <smcv at debian.org>  Wed, 14 May 2014 11:18:48 +0100
+
 folks (0.9.6-3) unstable; urgency=medium
 
   * d/p/0001-backends-Fix-calls-to-ImDetails.normalise_im_address.patch:
diff --git a/debian/patches/0001-backends-Fix-calls-to-ImDetails.normalise_im_address.patch b/debian/patches/0004-backends-Fix-calls-to-ImDetails.normalise_im_address.patch
similarity index 83%
rename from debian/patches/0001-backends-Fix-calls-to-ImDetails.normalise_im_address.patch
rename to debian/patches/0004-backends-Fix-calls-to-ImDetails.normalise_im_address.patch
index 285a791..33992cb 100644
--- a/debian/patches/0001-backends-Fix-calls-to-ImDetails.normalise_im_address.patch
+++ b/debian/patches/0004-backends-Fix-calls-to-ImDetails.normalise_im_address.patch
@@ -1,9 +1,8 @@
-From c9a9472927a274ab945535130a52f55fd8781388 Mon Sep 17 00:00:00 2001
 From: Philip Withnall <philip.withnall at collabora.co.uk>
 Date: Wed, 29 Jan 2014 11:12:31 +0000
-Subject: [PATCH] backends: Fix calls to ImDetails.normalise_im_address()
+Subject: backends: Fix calls to ImDetails.normalise_im_address()
 MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
+Content-Type: text/plain; charset="utf-8"
 Content-Transfer-Encoding: 8bit
 
 Newer versions of the Vala compiler have got stricter about unnecessary
@@ -13,17 +12,16 @@ versions of Vala, though this is untested.
 
 https://bugzilla.gnome.org/show_bug.cgi?id=723054
 ---
- NEWS                                       | 2 ++
  backends/eds/lib/edsf-persona.vala         | 4 ++--
  backends/libsocialweb/lib/swf-persona.vala | 5 ++---
  backends/tracker/lib/trf-persona.vala      | 5 ++---
- 4 files changed, 8 insertions(+), 8 deletions(-)
+ 3 files changed, 6 insertions(+), 8 deletions(-)
 
 diff --git a/backends/eds/lib/edsf-persona.vala b/backends/eds/lib/edsf-persona.vala
-index 58f6c6c..26cd2e0 100644
+index 0274605..25fca12 100644
 --- a/backends/eds/lib/edsf-persona.vala
 +++ b/backends/eds/lib/edsf-persona.vala
-@@ -1663,7 +1663,7 @@ public class Edsf.Persona : Folks.Persona,
+@@ -1665,7 +1665,7 @@ public class Edsf.Persona : Folks.Persona,
                      }
  
                    string normalised_addr =
@@ -32,7 +30,7 @@ index 58f6c6c..26cd2e0 100644
  
                    if (normalised_addr == "")
                      {
-@@ -1720,7 +1720,7 @@ public class Edsf.Persona : Folks.Persona,
+@@ -1722,7 +1722,7 @@ public class Edsf.Persona : Folks.Persona,
                try
                  {
                    string normalised_addr =
@@ -58,10 +56,10 @@ index aceff83..7883374 100644
                var im_fd = new ImFieldDetails (normalised_addr);
  
 diff --git a/backends/tracker/lib/trf-persona.vala b/backends/tracker/lib/trf-persona.vala
-index e54dfdd..71b4a24 100644
+index 770e044..9dccec6 100644
 --- a/backends/tracker/lib/trf-persona.vala
 +++ b/backends/tracker/lib/trf-persona.vala
-@@ -1153,9 +1153,8 @@ public class Trf.Persona : Folks.Persona,
+@@ -1158,9 +1158,8 @@ public class Trf.Persona : Folks.Persona,
      {
        try
          {
@@ -73,6 +71,3 @@ index e54dfdd..71b4a24 100644
            var im_fd = new ImFieldDetails (normalised_addr);
  
            this._im_addresses.set (im_proto, im_fd);
--- 
-1.9.0
-
diff --git a/debian/patches/0005-core-Fix-FOLKS_DISABLE_LINKING.patch b/debian/patches/0005-core-Fix-FOLKS_DISABLE_LINKING.patch
new file mode 100644
index 0000000..7a2bf1d
--- /dev/null
+++ b/debian/patches/0005-core-Fix-FOLKS_DISABLE_LINKING.patch
@@ -0,0 +1,86 @@
+From: Renato Araujo Oliveira Filho <renato.filho at canonical.com>
+Date: Mon, 31 Mar 2014 16:14:16 -0300
+Subject: core: Fix FOLKS_DISABLE_LINKING
+
+The second step of the _add_personas() function looks at candidate_inds,
+which is currently populated even if linking is disabled (in a failed
+attempt to keep all the FOLKS_DISABLE_LINKING logic to a single
+if-statement at the bottom of the function).
+
+This patch takes a different approach, and ensures that candidate_inds
+is not populated if FOLKS_DISABLE_LINKING is enabled, adding an
+assertion to try and prevent this bug being re-introduced in future.
+
+A test case will be added in a future commit (see the bug report).
+
+Bug: https://bugzilla.gnome.org/show_bug.cgi?id=727405
+Origin: vendor, Ubuntu
+Applied-upstream: 0.9.7, commit:1b770fb19a9c1b8e5f9ce0e3ab00d75fd3af5ca1
+---
+ folks/individual-aggregator.vala | 18 ++++++++++++++----
+ 1 file changed, 14 insertions(+), 4 deletions(-)
+
+diff --git a/folks/individual-aggregator.vala b/folks/individual-aggregator.vala
+index 1815145..82fe839 100644
+--- a/folks/individual-aggregator.vala
++++ b/folks/individual-aggregator.vala
+@@ -1206,7 +1206,8 @@ public class Folks.IndividualAggregator : Object
+ 
+           /* If the Persona is the user, we *always* want to link it to the
+            * existing this.user. */
+-          if (persona.is_user == true && user != null &&
++          if (this._linking_enabled == true &&
++              persona.is_user == true && user != null &&
+               ((!) user).has_anti_link_with_persona (persona) == false)
+             {
+               debug ("    Found candidate individual '%s' as user.",
+@@ -1216,7 +1217,8 @@ public class Folks.IndividualAggregator : Object
+ 
+           /* If we don't trust the PersonaStore at all, we can't link the
+            * Persona to any existing Individual */
+-          if (trust_level != PersonaStoreTrust.NONE)
++          if (this._linking_enabled == true &&
++              trust_level != PersonaStoreTrust.NONE)
+             {
+               unowned GenericArray<Individual>? candidates =
+                   this._link_map.get (persona.iid);
+@@ -1238,7 +1240,8 @@ public class Folks.IndividualAggregator : Object
+                 }
+             }
+ 
+-          if (persona.store.trust_level == PersonaStoreTrust.FULL)
++          if (this._linking_enabled == true &&
++              persona.store.trust_level == PersonaStoreTrust.FULL)
+             {
+               /* If we trust the PersonaStore the Persona came from, we can
+                * attempt to link based on its linkable properties. */
+@@ -1297,6 +1300,7 @@ public class Folks.IndividualAggregator : Object
+           /* Ensure the original persona makes it into the final individual */
+           final_personas.add (persona);
+ 
++          assert (this._linking_enabled == true || candidate_inds.size == 0);
+           if (candidate_inds.size > 0 && this._linking_enabled == true)
+             {
+               /* The Persona's IID or linkable properties match one or more
+@@ -1309,7 +1313,7 @@ public class Folks.IndividualAggregator : Object
+                   final_personas.add_all (individual.personas);
+                 }
+             }
+-          else if (candidate_inds.size > 0)
++          else if (!this._linking_enabled)
+             {
+               debug ("    Linking disabled.");
+             }
+@@ -1393,6 +1397,12 @@ public class Folks.IndividualAggregator : Object
+   private void _persona_linkable_property_changed_cb (Object obj,
+       ParamSpec pspec)
+     {
++      /* Ignore it if the link is disabled */
++      if (this._linking_enabled == false)
++        {
++          return;
++        }
++
+       /* The value of one of the linkable properties of one the personas has
+        * changed, so that persona might require re-linking. We do this in a
+        * simplistic and hacky way (which should work) by simply treating the
diff --git a/debian/patches/0006-eds-Only-use-enabled-ESources-from-EDS.patch b/debian/patches/0006-eds-Only-use-enabled-ESources-from-EDS.patch
new file mode 100644
index 0000000..2a99c52
--- /dev/null
+++ b/debian/patches/0006-eds-Only-use-enabled-ESources-from-EDS.patch
@@ -0,0 +1,44 @@
+From: Philip Withnall <philip at tecnocode.co.uk>
+Date: Sun, 16 Feb 2014 16:37:29 +0000
+Subject: eds: Only use enabled ESources from EDS
+MIME-Version: 1.0
+Content-Type: text/plain; charset="utf-8"
+Content-Transfer-Encoding: 8bit
+
+Don’t ignore the enabled/disabled state of the ESource. When EDS sources
+(such as the Google Contacts address book) are toggled in GOA, they’re
+disabled, not removed. Folks needs to respect that.
+
+Bug: https://bugzilla.gnome.org/show_bug.cgi?id=722579
+Origin: upstream, commit:1236e1c521fdf38d70dfce95c7b4055f27794522
+---
+ backends/eds/eds-backend.vala            | 2 +-
+ backends/eds/lib/edsf-persona-store.vala | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/backends/eds/eds-backend.vala b/backends/eds/eds-backend.vala
+index ba9580d..ec61e3e 100644
+--- a/backends/eds/eds-backend.vala
++++ b/backends/eds/eds-backend.vala
+@@ -288,7 +288,7 @@ public class Folks.Backends.Eds.Backend : Folks.Backend
+     {
+       string[] use_addressbooks = this._get_addressbooks_from_env ();
+       GLib.List<E.Source> books =
+-          this._ab_sources.list_sources (SOURCE_EXTENSION_ADDRESS_BOOK);
++          this._ab_sources.list_enabled (SOURCE_EXTENSION_ADDRESS_BOOK);
+ 
+       debug ("Address book source list changed.");
+ 
+diff --git a/backends/eds/lib/edsf-persona-store.vala b/backends/eds/lib/edsf-persona-store.vala
+index 90b0c1e..9a51228 100644
+--- a/backends/eds/lib/edsf-persona-store.vala
++++ b/backends/eds/lib/edsf-persona-store.vala
+@@ -2539,7 +2539,7 @@ public class Edsf.PersonaStore : Folks.PersonaStore
+       if (needle != null && needle.has_extension (SOURCE_EXTENSION_ADDRESS_BOOK))
+         {
+           /* We've found ourself. */
+-          return true;
++          return ((!) this._source_registry).check_enabled (needle);
+         }
+ 
+       return false;
diff --git a/debian/patches/0007-eds-Fix-crash-on-handling-invalid-birthday-dates-fro.patch b/debian/patches/0007-eds-Fix-crash-on-handling-invalid-birthday-dates-fro.patch
new file mode 100644
index 0000000..8df2e4e
--- /dev/null
+++ b/debian/patches/0007-eds-Fix-crash-on-handling-invalid-birthday-dates-fro.patch
@@ -0,0 +1,34 @@
+From: Philip Withnall <philip at tecnocode.co.uk>
+Date: Sun, 20 Apr 2014 21:03:16 +0100
+Subject: eds: Fix crash on handling invalid birthday dates from contacts
+
+If a GDateTime cannot be constructed due to the requested date being
+invalid or out of range, the constructor will return null. The code was
+not previously handling this.
+
+Bug: https://bugzilla.gnome.org/show_bug.cgi?id=727944
+Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=744078
+Origin: upstream, 0.9.7, commit:5e82482a31915215cb365605654dd11a92ba9664
+---
+ backends/eds/lib/edsf-persona.vala | 7 +++++--
+ 1 file changed, 5 insertions(+), 2 deletions(-)
+
+diff --git a/backends/eds/lib/edsf-persona.vala b/backends/eds/lib/edsf-persona.vala
+index 25fca12..ef7efb6 100644
+--- a/backends/eds/lib/edsf-persona.vala
++++ b/backends/eds/lib/edsf-persona.vala
+@@ -1167,9 +1167,12 @@ public class Edsf.Persona : Folks.Persona,
+            * /etc/localtime, which means lots of syscalls. */
+           var d = new DateTime (Persona._local_time_zone,
+               (int) bday.year, (int) bday.month, (int) bday.day, 0, 0, 0.0);
+-          if (this._birthday == null ||
++
++          /* d might be null if their birthday in e-d-s is something that
++           * doesn't make sense, like 31st February. If so, ignore it. */
++          if (d != null && (this._birthday == null ||
+               (this._birthday != null &&
+-                  !((!) this._birthday).equal (d.to_utc ())))
++                  !((!) this._birthday).equal (d.to_utc ()))))
+             {
+               this._birthday = d.to_utc ();
+               this.notify_property ("birthday");
diff --git a/debian/patches/0008-telepathy-Fix-crash-on-handling-invalid-birthday-dat.patch b/debian/patches/0008-telepathy-Fix-crash-on-handling-invalid-birthday-dat.patch
new file mode 100644
index 0000000..1136721
--- /dev/null
+++ b/debian/patches/0008-telepathy-Fix-crash-on-handling-invalid-birthday-dat.patch
@@ -0,0 +1,66 @@
+From: Philip Withnall <philip at tecnocode.co.uk>
+Date: Sun, 20 Apr 2014 21:08:03 +0100
+Subject: telepathy: Fix crash on handling invalid birthday dates from contacts
+
+If a GDateTime cannot be constructed due to the requested date being
+invalid or out of range, the constructor will return null. The code was
+not previously handling this.
+
+Bug: https://bugzilla.gnome.org/show_bug.cgi?id=727944
+Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=744078
+Origin: upstream, 0.9.7, commit:f3c9b4b47d0a36c6ef19ba0534523243a4c38160
+---
+ backends/telepathy/lib/tp-zeitgeist.vala            |  4 ++++
+ backends/telepathy/lib/tpf-persona-store-cache.vala |  2 ++
+ backends/telepathy/lib/tpf-persona.vala             | 10 +++++++---
+ 3 files changed, 13 insertions(+), 3 deletions(-)
+
+diff --git a/backends/telepathy/lib/tp-zeitgeist.vala b/backends/telepathy/lib/tp-zeitgeist.vala
+index 65d7509..eaa19f1 100644
+--- a/backends/telepathy/lib/tp-zeitgeist.vala
++++ b/backends/telepathy/lib/tp-zeitgeist.vala
+@@ -179,6 +179,10 @@ public class FolksTpZeitgeist.Controller : Object
+       var converted_datetime = new DateTime.from_unix_utc (timestamp);
+       var interpretation = event.interpretation;
+ 
++      /* Invalid timestamp? Ignore it. */
++      if (converted_datetime == null)
++          return;
++
+       /* Only count send/receive for IM interactions */
+       if (interaction_type == Zeitgeist.NMO.IMMESSAGE &&
+           (interpretation == Zeitgeist.ZG.SEND_EVENT ||
+diff --git a/backends/telepathy/lib/tpf-persona-store-cache.vala b/backends/telepathy/lib/tpf-persona-store-cache.vala
+index d8d0a63..26296d0 100644
+--- a/backends/telepathy/lib/tpf-persona-store-cache.vala
++++ b/backends/telepathy/lib/tpf-persona-store-cache.vala
+@@ -305,6 +305,8 @@ internal class Tpf.PersonaStoreCache : Folks.ObjectCache<Tpf.Persona>
+           var birthday_variant = variant.get_child_value (10).get_maybe ();
+           if (birthday_variant != null)
+             {
++              /* Note: This may return a null value if the stored value is
++               * invalid (e.g. out of range). */
+               birthday =
+                   new DateTime.from_unix_utc (birthday_variant.get_int64 ());
+             }
+diff --git a/backends/telepathy/lib/tpf-persona.vala b/backends/telepathy/lib/tpf-persona.vala
+index 8830158..f336877 100644
+--- a/backends/telepathy/lib/tpf-persona.vala
++++ b/backends/telepathy/lib/tpf-persona.vala
+@@ -1036,9 +1036,13 @@ public class Tpf.Persona : Folks.Persona,
+           if (timeval.from_iso8601 (new_birthday_str))
+             {
+               var d = new DateTime.from_timeval_utc (timeval);
+-              if (this._birthday == null ||
+-                  (this._birthday != null &&
+-                    !this._birthday.equal (d.to_utc ())))
++
++              /* d might be null if their birthday in Telepathy is something
++               * that doesn't make sense, like 31st February. If so, ignore
++               * it. */
++              if (d != null && (this._birthday == null ||
++                   (this._birthday != null &&
++                     !this._birthday.equal (d.to_utc ()))))
+                 {
+                   this._birthday = d.to_utc ();
+                   if (emit_notification)
diff --git a/debian/patches/0009-tracker-Fix-crash-on-handling-invalid-birthday-dates.patch b/debian/patches/0009-tracker-Fix-crash-on-handling-invalid-birthday-dates.patch
new file mode 100644
index 0000000..7733823
--- /dev/null
+++ b/debian/patches/0009-tracker-Fix-crash-on-handling-invalid-birthday-dates.patch
@@ -0,0 +1,36 @@
+From: Philip Withnall <philip at tecnocode.co.uk>
+Date: Sun, 20 Apr 2014 21:08:55 +0100
+Subject: tracker: Fix crash on handling invalid birthday dates from contacts
+
+If a GDateTime cannot be constructed due to the requested date being
+invalid or out of range, the constructor will return null. The code was
+not previously handling this.
+
+Bug: https://bugzilla.gnome.org/show_bug.cgi?id=727944
+Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=744078
+Origin: upstream, 0.9.7, commit:48f5e7094cd50eb7ebdb3dec9d8c602472f14042
+---
+ backends/tracker/lib/trf-persona.vala | 10 +++++++---
+ 1 file changed, 7 insertions(+), 3 deletions(-)
+
+diff --git a/backends/tracker/lib/trf-persona.vala b/backends/tracker/lib/trf-persona.vala
+index 9dccec6..927e029 100644
+--- a/backends/tracker/lib/trf-persona.vala
++++ b/backends/tracker/lib/trf-persona.vala
+@@ -964,9 +964,13 @@ public class Trf.Persona : Folks.Persona,
+       if (birthday != null && birthday != "")
+         {
+           TimeVal t = TimeVal ();
+-          t.from_iso8601 (birthday);
+-          this._birthday = new DateTime.from_timeval_utc (t);
+-          this.notify_property ("birthday");
++          if (t.from_iso8601 (birthday))
++            {
++              /* Note: This could return null if the timeval is invalid
++               * (e.g. out of range). That's OK. */
++              this._birthday = new DateTime.from_timeval_utc (t);
++              this.notify_property ("birthday");
++            }
+         }
+       else
+         {
diff --git a/debian/patches/series b/debian/patches/series
index 802dfc0..d1a9fab 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,4 +1,9 @@
 0001-Reduce-libebook-dependency-when-not-compiling-the-Bl.patch
 0002-Fixed-EDS-persona-store-display-name-value.patch
 0003-Replaced-use-of-EVCard.remove_attribute-to-EVCard.re.patch
-0001-backends-Fix-calls-to-ImDetails.normalise_im_address.patch
+0004-backends-Fix-calls-to-ImDetails.normalise_im_address.patch
+0005-core-Fix-FOLKS_DISABLE_LINKING.patch
+0006-eds-Only-use-enabled-ESources-from-EDS.patch
+0007-eds-Fix-crash-on-handling-invalid-birthday-dates-fro.patch
+0008-telepathy-Fix-crash-on-handling-invalid-birthday-dat.patch
+0009-tracker-Fix-crash-on-handling-invalid-birthday-dates.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-telepathy/folks.git



More information about the Pkg-telepathy-commits mailing list