Date: Tuesday, October 2, 2012 @ 09:24:03
  Author: jgc
Revision: 167543

upgpkg: tracker 0.14.2-2

Fix FS#31373, also add patch to fix crashes with PDF

Added:
  tracker/trunk/bug675660.patch
  tracker/trunk/tracker-extract-pdf-crash-fix.patch
Modified:
  tracker/trunk/PKGBUILD

-------------------------------------+
 PKGBUILD                            |   12 +++++++++---
 bug675660.patch                     |   29 +++++++++++++++++++++++++++++
 tracker-extract-pdf-crash-fix.patch |   22 ++++++++++++++++++++++
 3 files changed, 60 insertions(+), 3 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD    2012-10-02 11:41:39 UTC (rev 167542)
+++ PKGBUILD    2012-10-02 13:24:03 UTC (rev 167543)
@@ -7,7 +7,7 @@
 pkgname=(tracker libtracker-sparql)
 pkgver=0.14.2
 _tver=${pkgver%.*}
-pkgrel=1
+pkgrel=2
 pkgdesc="All-in-one indexer, search tool and metadata database"
 arch=('i686' 'x86_64')
 license=('GPL')
@@ -18,12 +18,18 @@
              'taglib' 'nautilus' 'gnome-panel' 'libvorbis' 'flac' 'vala')
 url="http://www.gnome.org";
 options=('!libtool' '!emptydirs')
-source=(http://ftp.gnome.org/pub/gnome/sources/$pkgbase/$_tver/$pkgbase-$pkgver.tar.xz)
-sha256sums=('9b59330aa2e9e09feee587ded895e9247f71fc25f46b023d616d9969314bc7f1')
+source=(http://ftp.gnome.org/pub/gnome/sources/$pkgbase/$_tver/$pkgbase-$pkgver.tar.xz
+        bug675660.patch
+        tracker-extract-pdf-crash-fix.patch)
+sha256sums=('9b59330aa2e9e09feee587ded895e9247f71fc25f46b023d616d9969314bc7f1'
+            '77c1377860f09aba42fc0bb662cb188613d5ed3744f3ffb3a710d1e60499cb8c'
+            'afa14805b9a1adb2442dc4a6032b1575a07a87aa969599ca28669a2cf975e772')
 
 build() {
   cd $pkgbase-$pkgver
 
+  patch -Np1 -i "${srcdir}/bug675660.patch"
+  patch -Np1 -i "${srcdir}/tracker-extract-pdf-crash-fix.patch"
   ./configure \
     --prefix=/usr \
     --sysconfdir=/etc \

Added: bug675660.patch
===================================================================
--- bug675660.patch                             (rev 0)
+++ bug675660.patch     2012-10-02 13:24:03 UTC (rev 167543)
@@ -0,0 +1,29 @@
+From 48713ba26af38a15a97fc7ebb0828cd287ef2447 Mon Sep 17 00:00:00 2001
+From: Alexandre Rostovtsev <tetrom...@gentoo.org>
+Date: Fri, 20 Jul 2012 14:46:33 +0000
+Subject: libtracker-fts: ICU cannot handle complex locale descriptions
+
+ubrk_open expects the name of just a single locale (e.g. "en_US.UTF-8"),
+not the full definition of your various locale variables and their
+values as returned by glibc's setlocale(LC_ALL, NULL).
+
+Instead, limit ourselves to LC_CTYPE, since after all, that's all we
+need to determine word boundaries.
+
+Fixes GB#675660.
+---
+diff --git a/src/libtracker-fts/tracker-parser-libicu.c 
b/src/libtracker-fts/tracker-parser-libicu.c
+index 7388f69..69f75ed 100644
+--- a/src/libtracker-fts/tracker-parser-libicu.c
++++ b/src/libtracker-fts/tracker-parser-libicu.c
+@@ -676,7 +676,7 @@ tracker_parser_reset (TrackerParser *parser,
+ 
+               /* Open word-break iterator */
+               parser->bi = ubrk_open(UBRK_WORD,
+-                                     setlocale (LC_ALL, NULL),
++                                     setlocale (LC_CTYPE, NULL),
+                                      parser->utxt,
+                                      parser->utxt_size,
+                                      &error);
+--
+cgit v0.9.0.2

Added: tracker-extract-pdf-crash-fix.patch
===================================================================
--- tracker-extract-pdf-crash-fix.patch                         (rev 0)
+++ tracker-extract-pdf-crash-fix.patch 2012-10-02 13:24:03 UTC (rev 167543)
@@ -0,0 +1,22 @@
+From 008677280d32b6db56483832b143760888c91ad4 Mon Sep 17 00:00:00 2001
+From: Sam Thursfield <sam.thursfi...@codethink.co.uk>
+Date: Tue, 31 Jul 2012 14:26:53 +0000
+Subject: tracker-extract-pdf: Fix crash if mmap() fails
+
+Patch from Fedora: https://bugzilla.redhat.com/show_bug.cgi?id=751922
+---
+diff --git a/src/tracker-extract/tracker-extract-pdf.c 
b/src/tracker-extract/tracker-extract-pdf.c
+index caa24c7..85066b3 100644
+--- a/src/tracker-extract/tracker-extract-pdf.c
++++ b/src/tracker-extract/tracker-extract-pdf.c
+@@ -451,7 +451,7 @@ tracker_extract_get_metadata (TrackerExtractInfo *info)
+               len = 0;
+       } else {
+               contents = (gchar *) mmap (NULL, st.st_size, PROT_READ, 
MAP_PRIVATE, fd, 0);
+-              if (contents == NULL) {
++              if (contents == NULL || contents == MAP_FAILED) {
+                       g_warning ("Could not mmap pdf file '%s': %s\n",
+                                  filename,
+                                  g_strerror (errno));
+--
+cgit v0.9.0.2

Reply via email to