diff options
author | Rasmus Thomsen <oss@cogitri.dev> | 2019-10-27 10:25:16 +0100 |
---|---|---|
committer | Rasmus Thomsen <oss@cogitri.dev> | 2019-10-27 11:52:33 +0100 |
commit | a4d3597d66fb6ec37ab841a1f39b4e629a4daeb5 (patch) | |
tree | 2c1d6875f61c7c4e7939192b2c9b93cfe722723d /community/grilo-plugins | |
parent | 9351979ae5054e63a3cfdd9d2278d7dd6be54064 (diff) | |
download | aports-a4d3597d66fb6ec37ab841a1f39b4e629a4daeb5.tar.bz2 aports-a4d3597d66fb6ec37ab841a1f39b4e629a4daeb5.tar.xz |
community/grilo-plugins: add upstream patch fixing totem/gnome-music crash
Diffstat (limited to 'community/grilo-plugins')
-rw-r--r-- | community/grilo-plugins/67.patch | 78 | ||||
-rw-r--r-- | community/grilo-plugins/APKBUILD | 10 |
2 files changed, 84 insertions, 4 deletions
diff --git a/community/grilo-plugins/67.patch b/community/grilo-plugins/67.patch new file mode 100644 index 0000000000..d7d62313fe --- /dev/null +++ b/community/grilo-plugins/67.patch @@ -0,0 +1,78 @@ +From 46d7c0edfbf97ca15c08e5cd1c6d563363843e82 Mon Sep 17 00:00:00 2001 +From: Sam Thursfield <sam@afuera.me.uk> +Date: Sun, 29 Sep 2019 16:42:29 +0200 +Subject: [PATCH 1/2] tracker: Fix crash if chromaprint plugin isn't installed + +This is a regression from 7fa5126eace8d9931643f. + +See: https://gitlab.gnome.org/GNOME/grilo-plugins/issues/61 +--- + src/tracker/grl-tracker-utils.c | 12 +++++++----- + 1 file changed, 7 insertions(+), 5 deletions(-) + +diff --git a/src/tracker/grl-tracker-utils.c b/src/tracker/grl-tracker-utils.c +index 86f0f0c8..406f4efc 100644 +--- a/src/tracker/grl-tracker-utils.c ++++ b/src/tracker/grl-tracker-utils.c +@@ -325,11 +325,13 @@ grl_tracker_setup_key_mappings (void) + "(SELECT tracker:referenceIdentifier(?rg) AS ?rg_id { ?urn nmm:musicAlbum ?album . ?album tracker:hasExternalReference ?rg . ?rg tracker:referenceSource \"https://musicbrainz.org/doc/Release_Group\" })", + "audio"); + +- insert_key_mapping_with_setter (grl_metadata_key_chromaprint, +- NULL, +- "(select nfo:hashValue(?h) { ?urn nfo:hasHash ?h . ?h nfo:hashAlgorithm \"chromaprint\" })", +- "audio", +- set_string_metadata_keys); ++ if (grl_metadata_key_chromaprint != 0) { ++ insert_key_mapping_with_setter (grl_metadata_key_chromaprint, ++ NULL, ++ "(select nfo:hashValue(?h) { ?urn nfo:hasHash ?h . ?h nfo:hashAlgorithm \"chromaprint\" })", ++ "audio", ++ set_string_metadata_keys); ++ }; + + insert_key_mapping (GRL_METADATA_KEY_FRAMERATE, + "nfo:frameRate", +-- +2.22.0 + + +From 39e51d93175f8234dd3e9ab99209056f188dbc28 Mon Sep 17 00:00:00 2001 +From: Sam Thursfield <sam@afuera.me.uk> +Date: Sun, 29 Sep 2019 18:03:38 +0200 +Subject: [PATCH 2/2] tracker: Guard against invalid key mappings + +Any future mistakes like https://gitlab.gnome.org/GNOME/grilo-plugins/issues/61 +will not crash the process but will just trigger a g_warning() message. +--- + src/tracker/grl-tracker-utils.c | 14 ++++++++++---- + 1 file changed, 10 insertions(+), 4 deletions(-) + +diff --git a/src/tracker/grl-tracker-utils.c b/src/tracker/grl-tracker-utils.c +index 406f4efc..ed7fb324 100644 +--- a/src/tracker/grl-tracker-utils.c ++++ b/src/tracker/grl-tracker-utils.c +@@ -157,10 +157,16 @@ insert_key_mapping (GrlKeyID grl_key, + const gchar *sparql_key_attr_call, + const gchar *sparql_key_flavor) + { +- tracker_grl_sparql_t *assoc = g_new0 (tracker_grl_sparql_t, 1); +- GList *assoc_list = g_hash_table_lookup (grl_to_sparql_mapping, +- GRLKEYID_TO_POINTER (grl_key)); +- gchar *canon_name = g_strdup (GRL_METADATA_KEY_GET_NAME (grl_key)); ++ tracker_grl_sparql_t *assoc; ++ GList *assoc_list; ++ gchar *canon_name; ++ ++ g_return_val_if_fail (grl_key != GRL_METADATA_KEY_INVALID, NULL); ++ ++ assoc = g_new0 (tracker_grl_sparql_t, 1); ++ assoc_list = g_hash_table_lookup (grl_to_sparql_mapping, ++ GRLKEYID_TO_POINTER (grl_key)); ++ canon_name = g_strdup (GRL_METADATA_KEY_GET_NAME (grl_key)); + + assoc->grl_key = grl_key; + assoc->sparql_key_name = build_flavored_key (canon_name, +-- +2.22.0 + diff --git a/community/grilo-plugins/APKBUILD b/community/grilo-plugins/APKBUILD index cef5ff43a3..d65e2c76c5 100644 --- a/community/grilo-plugins/APKBUILD +++ b/community/grilo-plugins/APKBUILD @@ -2,7 +2,7 @@ # Maintainer: Rasmus Thomsen <oss@cogitri.dev> pkgname=grilo-plugins pkgver=0.3.10 -pkgrel=0 +pkgrel=1 pkgdesc="GNOME media discovery framework plugins" options="!check" url="https://wiki.gnome.org/Projects/Grilo" @@ -12,8 +12,9 @@ makedepends="glib-dev grilo-dev avahi-dev meson gstreamer-dev json-glib-dev libsoup-dev libxml2-dev sqlite-dev tracker-dev totem-pl-parser-dev lua5.3-dev gperf gnome-online-accounts-dev itstool gom-dev libmediaart-dev libgdata-dev" -subpackages="$pkgname-dev $pkgname-doc $pkgname-lang" -source="https://download.gnome.org/sources/grilo-plugins/${pkgver%.*}/grilo-plugins-$pkgver.tar.xz" +subpackages="$pkgname-dev $pkgname-doc $pkgname-lang $pkgname-dbg" +source="https://download.gnome.org/sources/grilo-plugins/${pkgver%.*}/grilo-plugins-$pkgver.tar.xz + 67.patch" build() { meson \ @@ -32,4 +33,5 @@ package() { DESTDIR="$pkgdir" ninja -C output install } -sha512sums="93d4fcc7d6fd1b43925e286c8856c90d240cf9244d04a8b034df85781b1a6bffcb5c635576e37717325f82a0be567a7087715ff6d680b3c5aca133c6deb43ed2 grilo-plugins-0.3.10.tar.xz" +sha512sums="93d4fcc7d6fd1b43925e286c8856c90d240cf9244d04a8b034df85781b1a6bffcb5c635576e37717325f82a0be567a7087715ff6d680b3c5aca133c6deb43ed2 grilo-plugins-0.3.10.tar.xz +c87386d21e01268209e920d7aa993018136a2ea798ff091ff7cf455a2bf4f230484c5e15e232089c3507fef40b196d78950a84cc61e86854d0dd88f412586de9 67.patch" |