[arch-commits] Commit in grilo-plugins/repos (8 files)

Jan de Groot jgc at archlinux.org
Fri Jul 3 11:33:55 UTC 2015


    Date: Friday, July 3, 2015 @ 13:33:54
  Author: jgc
Revision: 241751

archrelease: copy trunk to staging-i686, staging-x86_64

Added:
  grilo-plugins/repos/staging-i686/
  grilo-plugins/repos/staging-i686/0002-local-metadata-Fixes-to-video_sanitise_string-non-al.patch
    (from rev 241750, grilo-plugins/trunk/0002-local-metadata-Fixes-to-video_sanitise_string-non-al.patch)
  grilo-plugins/repos/staging-i686/PKGBUILD
    (from rev 241750, grilo-plugins/trunk/PKGBUILD)
  grilo-plugins/repos/staging-i686/local-metadata-crash.patch
    (from rev 241750, grilo-plugins/trunk/local-metadata-crash.patch)
  grilo-plugins/repos/staging-x86_64/
  grilo-plugins/repos/staging-x86_64/0002-local-metadata-Fixes-to-video_sanitise_string-non-al.patch
    (from rev 241750, grilo-plugins/trunk/0002-local-metadata-Fixes-to-video_sanitise_string-non-al.patch)
  grilo-plugins/repos/staging-x86_64/PKGBUILD
    (from rev 241750, grilo-plugins/trunk/PKGBUILD)
  grilo-plugins/repos/staging-x86_64/local-metadata-crash.patch
    (from rev 241750, grilo-plugins/trunk/local-metadata-crash.patch)

--------------------------------------------------------------------------------+
 staging-i686/0002-local-metadata-Fixes-to-video_sanitise_string-non-al.patch   |   80 ++++++++++
 staging-i686/PKGBUILD                                                          |   44 +++++
 staging-i686/local-metadata-crash.patch                                        |   31 +++
 staging-x86_64/0002-local-metadata-Fixes-to-video_sanitise_string-non-al.patch |   80 ++++++++++
 staging-x86_64/PKGBUILD                                                        |   44 +++++
 staging-x86_64/local-metadata-crash.patch                                      |   31 +++
 6 files changed, 310 insertions(+)

Copied: grilo-plugins/repos/staging-i686/0002-local-metadata-Fixes-to-video_sanitise_string-non-al.patch (from rev 241750, grilo-plugins/trunk/0002-local-metadata-Fixes-to-video_sanitise_string-non-al.patch)
===================================================================
--- staging-i686/0002-local-metadata-Fixes-to-video_sanitise_string-non-al.patch	                        (rev 0)
+++ staging-i686/0002-local-metadata-Fixes-to-video_sanitise_string-non-al.patch	2015-07-03 11:33:54 UTC (rev 241751)
@@ -0,0 +1,80 @@
+From a05b159c330a7a65479bba35bc529d0934640627 Mon Sep 17 00:00:00 2001
+From: "Jan Alexander Steffens (heftig)" <jan.steffens at gmail.com>
+Date: Tue, 19 May 2015 20:53:28 +0200
+Subject: [PATCH 2/2] local-metadata: Fixes to video_sanitise_string non-alnum
+ handling
+
+- Extract loop condition into a helper function
+- Use g_utf8_get_char to properly convert to unichar
+- Be more defensive about g_utf8_find_prev_char returning NULL
+
+https://bugzilla.gnome.org/show_bug.cgi?id=748604
+---
+ src/local-metadata/grl-local-metadata.c | 39 +++++++++++++++++++++++----------
+ 1 file changed, 28 insertions(+), 11 deletions(-)
+
+diff --git a/src/local-metadata/grl-local-metadata.c b/src/local-metadata/grl-local-metadata.c
+index 45856be..c7f731e 100644
+--- a/src/local-metadata/grl-local-metadata.c
++++ b/src/local-metadata/grl-local-metadata.c
+@@ -242,6 +242,28 @@ grl_local_metadata_source_set_property (GObject      *object,
+ 
+ /* ======================= Utilities ==================== */
+ 
++static gboolean
++is_nonalnum (const gchar *str)
++{
++  gunichar uchar;
++
++  if (str == NULL) {
++    return FALSE;
++  }
++
++  uchar = g_utf8_get_char (str);
++
++  if (g_unichar_isalnum (uchar)) {
++    return FALSE;
++  }
++
++  if (uchar == '!' || uchar == '?' || uchar == '.') {
++    return FALSE;
++  }
++
++  return TRUE;
++}
++
+ static gchar *
+ video_sanitise_string (const gchar *str)
+ {
+@@ -270,22 +292,17 @@ video_sanitise_string (const gchar *str)
+   }
+ 
+   if (*line_end != '\0') {
+-    line_end = g_utf8_find_prev_char (line, line_end);
+-
++    /* After removing substring with blacklisted word, ignore non alpha-numeric
++     * char in the end of the sanitised string */
++    do {
++      line_end = g_utf8_find_prev_char (line, line_end);
++    } while (is_nonalnum (line_end));
+ 
+     /* If everything in the string is blacklisted, just ignore
+      * the blackisting logic.
+      */
+-    if (line_end == NULL)
++    if (line_end == NULL) {
+       return g_strdup (str);
+-
+-    /* After removing substring with blacklisted word, ignore non alpha-numeric
+-     * char in the end of the sanitised string */
+-    while (g_unichar_isalnum (*line_end) == FALSE &&
+-           *line_end != '!' &&
+-           *line_end != '?' &&
+-           *line_end != '.') {
+-      line_end = g_utf8_find_prev_char (line, line_end);
+     }
+ 
+     return g_strndup (line, line_end - line);
+-- 
+2.4.0
+

Copied: grilo-plugins/repos/staging-i686/PKGBUILD (from rev 241750, grilo-plugins/trunk/PKGBUILD)
===================================================================
--- staging-i686/PKGBUILD	                        (rev 0)
+++ staging-i686/PKGBUILD	2015-07-03 11:33:54 UTC (rev 241751)
@@ -0,0 +1,44 @@
+# $Id$
+# Maintainer: Jan Alexander Steffens (heftig) <jan.steffens at gmail.com>
+
+pkgname=grilo-plugins
+pkgver=0.2.14
+pkgrel=5
+pkgdesc="Plugins for Grilo"
+url="http://www.gnome.org"
+arch=(i686 x86_64)
+license=(LGPL)
+depends=(grilo lua libmediaart libgdata libtracker-sparql gom libdmapsharing)
+makedepends=(intltool itstool yelp-tools)
+optdepends=('dleyna-server: DLNA plugin'
+            'tracker: Tracker plugin')
+options=('!emptydirs')
+groups=('gnome')
+source=(http://ftp.gnome.org/pub/gnome/sources/${pkgname}/${pkgver:0:3}/${pkgname}-${pkgver}.tar.xz
+        local-metadata-crash.patch
+        0002-local-metadata-Fixes-to-video_sanitise_string-non-al.patch)
+sha256sums=('d0f18116675058c7e8c178b1fe26d6d73998a0452f85a73b1696df740c83d3ab'
+            '221f770b064309635b52095d21d325707d45de03772da5cc579252b7795ced1b'
+            'f95343c6433d438c6d67dfe0cf81804a9a19db1744606279159c008fce289aa7')
+
+prepare() {
+  cd $pkgname-$pkgver
+  patch -Np1 -i ../local-metadata-crash.patch
+  patch -Np1 -i ../0002-local-metadata-Fixes-to-video_sanitise_string-non-al.patch
+}
+
+build() {
+  cd $pkgname-$pkgver
+  ./configure --prefix=/usr --sysconfdir=/etc --disable-static
+  make
+}
+
+check() {
+  cd $pkgname-$pkgver
+  make -k check
+}
+
+package() {
+  cd $pkgname-$pkgver
+  make DESTDIR="$pkgdir" install
+}

Copied: grilo-plugins/repos/staging-i686/local-metadata-crash.patch (from rev 241750, grilo-plugins/trunk/local-metadata-crash.patch)
===================================================================
--- staging-i686/local-metadata-crash.patch	                        (rev 0)
+++ staging-i686/local-metadata-crash.patch	2015-07-03 11:33:54 UTC (rev 241751)
@@ -0,0 +1,31 @@
+From 85fc7cbf831e914456623a2f7a9efbe81919bf4d Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Olivier=20Cr=C3=AAte?= <olivier.crete at collabora.com>
+Date: Tue, 28 Apr 2015 19:46:54 -0400
+Subject: local-metadata: Ignore sanitization if the whole filename is
+ blacklisted
+
+If the whole filename ends up blacklisted, then just take it as-is.
+
+https://bugzilla.gnome.org/show_bug.cgi?id=748604
+
+diff --git a/src/local-metadata/grl-local-metadata.c b/src/local-metadata/grl-local-metadata.c
+index adc81f0..45856be 100644
+--- a/src/local-metadata/grl-local-metadata.c
++++ b/src/local-metadata/grl-local-metadata.c
+@@ -272,6 +272,13 @@ video_sanitise_string (const gchar *str)
+   if (*line_end != '\0') {
+     line_end = g_utf8_find_prev_char (line, line_end);
+ 
++
++    /* If everything in the string is blacklisted, just ignore
++     * the blackisting logic.
++     */
++    if (line_end == NULL)
++      return g_strdup (str);
++
+     /* After removing substring with blacklisted word, ignore non alpha-numeric
+      * char in the end of the sanitised string */
+     while (g_unichar_isalnum (*line_end) == FALSE &&
+-- 
+cgit v0.10.2
+

Copied: grilo-plugins/repos/staging-x86_64/0002-local-metadata-Fixes-to-video_sanitise_string-non-al.patch (from rev 241750, grilo-plugins/trunk/0002-local-metadata-Fixes-to-video_sanitise_string-non-al.patch)
===================================================================
--- staging-x86_64/0002-local-metadata-Fixes-to-video_sanitise_string-non-al.patch	                        (rev 0)
+++ staging-x86_64/0002-local-metadata-Fixes-to-video_sanitise_string-non-al.patch	2015-07-03 11:33:54 UTC (rev 241751)
@@ -0,0 +1,80 @@
+From a05b159c330a7a65479bba35bc529d0934640627 Mon Sep 17 00:00:00 2001
+From: "Jan Alexander Steffens (heftig)" <jan.steffens at gmail.com>
+Date: Tue, 19 May 2015 20:53:28 +0200
+Subject: [PATCH 2/2] local-metadata: Fixes to video_sanitise_string non-alnum
+ handling
+
+- Extract loop condition into a helper function
+- Use g_utf8_get_char to properly convert to unichar
+- Be more defensive about g_utf8_find_prev_char returning NULL
+
+https://bugzilla.gnome.org/show_bug.cgi?id=748604
+---
+ src/local-metadata/grl-local-metadata.c | 39 +++++++++++++++++++++++----------
+ 1 file changed, 28 insertions(+), 11 deletions(-)
+
+diff --git a/src/local-metadata/grl-local-metadata.c b/src/local-metadata/grl-local-metadata.c
+index 45856be..c7f731e 100644
+--- a/src/local-metadata/grl-local-metadata.c
++++ b/src/local-metadata/grl-local-metadata.c
+@@ -242,6 +242,28 @@ grl_local_metadata_source_set_property (GObject      *object,
+ 
+ /* ======================= Utilities ==================== */
+ 
++static gboolean
++is_nonalnum (const gchar *str)
++{
++  gunichar uchar;
++
++  if (str == NULL) {
++    return FALSE;
++  }
++
++  uchar = g_utf8_get_char (str);
++
++  if (g_unichar_isalnum (uchar)) {
++    return FALSE;
++  }
++
++  if (uchar == '!' || uchar == '?' || uchar == '.') {
++    return FALSE;
++  }
++
++  return TRUE;
++}
++
+ static gchar *
+ video_sanitise_string (const gchar *str)
+ {
+@@ -270,22 +292,17 @@ video_sanitise_string (const gchar *str)
+   }
+ 
+   if (*line_end != '\0') {
+-    line_end = g_utf8_find_prev_char (line, line_end);
+-
++    /* After removing substring with blacklisted word, ignore non alpha-numeric
++     * char in the end of the sanitised string */
++    do {
++      line_end = g_utf8_find_prev_char (line, line_end);
++    } while (is_nonalnum (line_end));
+ 
+     /* If everything in the string is blacklisted, just ignore
+      * the blackisting logic.
+      */
+-    if (line_end == NULL)
++    if (line_end == NULL) {
+       return g_strdup (str);
+-
+-    /* After removing substring with blacklisted word, ignore non alpha-numeric
+-     * char in the end of the sanitised string */
+-    while (g_unichar_isalnum (*line_end) == FALSE &&
+-           *line_end != '!' &&
+-           *line_end != '?' &&
+-           *line_end != '.') {
+-      line_end = g_utf8_find_prev_char (line, line_end);
+     }
+ 
+     return g_strndup (line, line_end - line);
+-- 
+2.4.0
+

Copied: grilo-plugins/repos/staging-x86_64/PKGBUILD (from rev 241750, grilo-plugins/trunk/PKGBUILD)
===================================================================
--- staging-x86_64/PKGBUILD	                        (rev 0)
+++ staging-x86_64/PKGBUILD	2015-07-03 11:33:54 UTC (rev 241751)
@@ -0,0 +1,44 @@
+# $Id$
+# Maintainer: Jan Alexander Steffens (heftig) <jan.steffens at gmail.com>
+
+pkgname=grilo-plugins
+pkgver=0.2.14
+pkgrel=5
+pkgdesc="Plugins for Grilo"
+url="http://www.gnome.org"
+arch=(i686 x86_64)
+license=(LGPL)
+depends=(grilo lua libmediaart libgdata libtracker-sparql gom libdmapsharing)
+makedepends=(intltool itstool yelp-tools)
+optdepends=('dleyna-server: DLNA plugin'
+            'tracker: Tracker plugin')
+options=('!emptydirs')
+groups=('gnome')
+source=(http://ftp.gnome.org/pub/gnome/sources/${pkgname}/${pkgver:0:3}/${pkgname}-${pkgver}.tar.xz
+        local-metadata-crash.patch
+        0002-local-metadata-Fixes-to-video_sanitise_string-non-al.patch)
+sha256sums=('d0f18116675058c7e8c178b1fe26d6d73998a0452f85a73b1696df740c83d3ab'
+            '221f770b064309635b52095d21d325707d45de03772da5cc579252b7795ced1b'
+            'f95343c6433d438c6d67dfe0cf81804a9a19db1744606279159c008fce289aa7')
+
+prepare() {
+  cd $pkgname-$pkgver
+  patch -Np1 -i ../local-metadata-crash.patch
+  patch -Np1 -i ../0002-local-metadata-Fixes-to-video_sanitise_string-non-al.patch
+}
+
+build() {
+  cd $pkgname-$pkgver
+  ./configure --prefix=/usr --sysconfdir=/etc --disable-static
+  make
+}
+
+check() {
+  cd $pkgname-$pkgver
+  make -k check
+}
+
+package() {
+  cd $pkgname-$pkgver
+  make DESTDIR="$pkgdir" install
+}

Copied: grilo-plugins/repos/staging-x86_64/local-metadata-crash.patch (from rev 241750, grilo-plugins/trunk/local-metadata-crash.patch)
===================================================================
--- staging-x86_64/local-metadata-crash.patch	                        (rev 0)
+++ staging-x86_64/local-metadata-crash.patch	2015-07-03 11:33:54 UTC (rev 241751)
@@ -0,0 +1,31 @@
+From 85fc7cbf831e914456623a2f7a9efbe81919bf4d Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Olivier=20Cr=C3=AAte?= <olivier.crete at collabora.com>
+Date: Tue, 28 Apr 2015 19:46:54 -0400
+Subject: local-metadata: Ignore sanitization if the whole filename is
+ blacklisted
+
+If the whole filename ends up blacklisted, then just take it as-is.
+
+https://bugzilla.gnome.org/show_bug.cgi?id=748604
+
+diff --git a/src/local-metadata/grl-local-metadata.c b/src/local-metadata/grl-local-metadata.c
+index adc81f0..45856be 100644
+--- a/src/local-metadata/grl-local-metadata.c
++++ b/src/local-metadata/grl-local-metadata.c
+@@ -272,6 +272,13 @@ video_sanitise_string (const gchar *str)
+   if (*line_end != '\0') {
+     line_end = g_utf8_find_prev_char (line, line_end);
+ 
++
++    /* If everything in the string is blacklisted, just ignore
++     * the blackisting logic.
++     */
++    if (line_end == NULL)
++      return g_strdup (str);
++
+     /* After removing substring with blacklisted word, ignore non alpha-numeric
+      * char in the end of the sanitised string */
+     while (g_unichar_isalnum (*line_end) == FALSE &&
+-- 
+cgit v0.10.2
+



More information about the arch-commits mailing list