aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpsykose <alice@ayaya.dev>2023-06-01 01:57:49 +0000
committerpsykose <alice@ayaya.dev>2023-06-01 04:02:24 +0200
commita3c1bfa8dbd8f21831dca8d0527adbad0d6c61b2 (patch)
treedb1f82e68313e784667ae75ae3d86d19d754db98
parent6511ca942fb03350b25b945fb254a76f730f59ab (diff)
community/tracker: upgrade to 3.5.3
-rw-r--r--community/tracker/APKBUILD8
-rw-r--r--community/tracker/bsd-source.patch14
-rw-r--r--community/tracker/fix-tests.patch137
3 files changed, 141 insertions, 18 deletions
diff --git a/community/tracker/APKBUILD b/community/tracker/APKBUILD
index 1de08e318fa..02bc81650ba 100644
--- a/community/tracker/APKBUILD
+++ b/community/tracker/APKBUILD
@@ -1,7 +1,7 @@
# Contributor: Rasmus Thomsen <oss@cogitri.dev>
# Maintainer: Rasmus Thomsen <oss@cogitri.dev>
pkgname=tracker
-pkgver=3.5.2
+pkgver=3.5.3
pkgrel=0
pkgdesc="Personal search tool and storage system"
url="https://wiki.gnome.org/Projects/Tracker"
@@ -35,7 +35,7 @@ subpackages="
$pkgname-bash-completion
$pkgname-testutils:_testutils"
source="https://download.gnome.org/sources/tracker/${pkgver%.*}/tracker-$pkgver.tar.xz
- bsd-source.patch
+ fix-tests.patch
"
# x86: still sigabrts
@@ -72,6 +72,6 @@ _testutils() {
}
sha512sums="
-e7162116c1089f4e1a06c6bf60e515b9dd9ce174a3ab8862d52c638004a1df7feb1d69c7b958051bdcff60202eaa58c29023e9a0012c0511d75d26e76a27cd10 tracker-3.5.2.tar.xz
-dfaac16da00496f580f864547dce6740a3294cca2f56853ec965e7682d1b9f1fce56f86c0d729e9613d601b80f71d2a562c5921d311681bdc9a0c442142773ee bsd-source.patch
+ed75f7cbb75daab6597bab58937554b531bc2c32581148c2d828cb313644b198a057024c5202d0990237bc01119d1789f0fbc87868919fc2f00bcb40e76f7b23 tracker-3.5.3.tar.xz
+c49e9c3f53622e3c569f5c7e8280ae3c0928bc466146b12a6e8b26fe24207b066d687abf150b2e3782e0a59ab48c8c7a51795ae43988a285bf1f4e6debf779ac fix-tests.patch
"
diff --git a/community/tracker/bsd-source.patch b/community/tracker/bsd-source.patch
deleted file mode 100644
index 2626e2ad031..00000000000
--- a/community/tracker/bsd-source.patch
+++ /dev/null
@@ -1,14 +0,0 @@
-needed for this test to pass on x86 it seems
---
-diff --git a/meson.build b/meson.build
-index 7b22cb1..ae1009f 100644
---- a/meson.build
-+++ b/meson.build
-@@ -202,6 +202,7 @@ endif
- # Get an appropriate 4-digit year modifier for strftime
- ##################################################################
- result = cc.run('''
-+ #define _BSD_SOURCE
- #include <stdio.h>
- #include <string.h>
- #include <time.h>
diff --git a/community/tracker/fix-tests.patch b/community/tracker/fix-tests.patch
new file mode 100644
index 00000000000..c1eb0fd86fe
--- /dev/null
+++ b/community/tracker/fix-tests.patch
@@ -0,0 +1,137 @@
+Patch-Source: https://gitlab.gnome.org/GNOME/tracker/-/merge_requests/600
+--
+From 4cbbd1773a7367492fa3b3e3804839654e18a12a Mon Sep 17 00:00:00 2001
+From: Carlos Garnacho <carlosg@gnome.org>
+Date: Sat, 20 May 2023 11:42:09 +0200
+Subject: [PATCH] tests: Adapt FTS snippet tests to run before/after SQLite
+ 3.42.0
+
+This SQLite version fixes a small bug in the FTS5 snippet function
+that affects our output checks here. Concretely, it might ignore
+the specified number of output words with repeated matched terms.
+
+It is good that we have FTS tests, but we do not need to test for
+this behavior specifically. Adapt the tests so that we keep their
+spirit but bypass the SQLite behavior change. The snippet-4 test
+coincided too much on it and had to be dropped, it's a minor loss
+though.
+
+This fixes the test suite with SQLite >= 3.42.0.
+
+Closes: https://gitlab.gnome.org/GNOME/tracker/-/issues/405
+---
+ tests/fts/functions/snippet-1.out | 2 +-
+ tests/fts/functions/snippet-2.out | 2 +-
+ tests/fts/functions/snippet-2.rq | 2 +-
+ tests/fts/functions/snippet-3.out | 2 +-
+ tests/fts/functions/snippet-4.out | 6 +++---
+ tests/fts/functions/snippet-4.rq | 2 +-
+ tests/fts/functions/snippet-5.out | 4 ----
+ tests/fts/functions/snippet-5.rq | 1 -
+ tests/fts/functions/snippet-data.rq | 2 +-
+ tests/fts/tracker-fts-test.c | 2 +-
+ 10 files changed, 10 insertions(+), 15 deletions(-)
+ delete mode 100644 tests/fts/functions/snippet-5.out
+ delete mode 100644 tests/fts/functions/snippet-5.rq
+
+diff --git a/tests/fts/functions/snippet-1.out b/tests/fts/functions/snippet-1.out
+index db1fae0c22..9cb9c0ca98 100644
+--- a/tests/fts/functions/snippet-1.out
++++ b/tests/fts/functions/snippet-1.out
+@@ -1,4 +1,4 @@
+ "http://www.example.org/test#1" "bananas lemons lemons"
+-"http://www.example.org/test#2" "bananas bananas lemons"
++"http://www.example.org/test#2" "bananas bandanas lemons"
+ "http://www.example.org/test#4" "bananas lemons"
+ "http://www.example.org/test#3" "bananas"
+diff --git a/tests/fts/functions/snippet-2.out b/tests/fts/functions/snippet-2.out
+index 8cdc6f4b8e..5174b6bf64 100644
+--- a/tests/fts/functions/snippet-2.out
++++ b/tests/fts/functions/snippet-2.out
+@@ -1,4 +1,4 @@
+ "http://www.example.org/test#1" ">>>bananas<<< lemons lemons"
+-"http://www.example.org/test#2" ">>>bananas<<< >>>bananas<<< lemons"
++"http://www.example.org/test#2" ">>>bananas<<< >>>bandanas<<< lemons"
+ "http://www.example.org/test#4" ">>>bananas<<< lemons"
+ "http://www.example.org/test#3" ">>>bananas<<<"
+diff --git a/tests/fts/functions/snippet-2.rq b/tests/fts/functions/snippet-2.rq
+index 59cd8c3064..d6ce1f05f4 100644
+--- a/tests/fts/functions/snippet-2.rq
++++ b/tests/fts/functions/snippet-2.rq
+@@ -1 +1 @@
+-SELECT ?u fts:snippet(?u, '>>>', '<<<') { ?u fts:match 'bananas' } order by desc fts:rank(?u)
++SELECT ?u fts:snippet(?u, '>>>', '<<<') { ?u fts:match 'ban' } order by desc fts:rank(?u)
+diff --git a/tests/fts/functions/snippet-3.out b/tests/fts/functions/snippet-3.out
+index 9c869b89af..03f28af074 100644
+--- a/tests/fts/functions/snippet-3.out
++++ b/tests/fts/functions/snippet-3.out
+@@ -1,4 +1,4 @@
+ "http://www.example.org/test#1" ">>>bananas<<<..."
+-"http://www.example.org/test#2" ">>>bananas<<< >>>bananas<<<..."
++"http://www.example.org/test#2" ">>>bananas<<<..."
+ "http://www.example.org/test#4" ">>>bananas<<<..."
+ "http://www.example.org/test#3" ">>>bananas<<<"
+diff --git a/tests/fts/functions/snippet-4.out b/tests/fts/functions/snippet-4.out
+index e3650f67a7..b7e42e2f17 100644
+--- a/tests/fts/functions/snippet-4.out
++++ b/tests/fts/functions/snippet-4.out
+@@ -1,4 +1,4 @@
+ "http://www.example.org/test#1"
+-"http://www.example.org/test#2" ">>>bananas<<< >>>bananas<<<..."
+-"http://www.example.org/test#4" ">>>bananas<<<..."
+-"http://www.example.org/test#3" ">>>bananas<<<..."
++"http://www.example.org/test#2"
++"http://www.example.org/test#4"
++"http://www.example.org/test#3"
+diff --git a/tests/fts/functions/snippet-4.rq b/tests/fts/functions/snippet-4.rq
+index 1b542b57c4..564f52d01e 100644
+--- a/tests/fts/functions/snippet-4.rq
++++ b/tests/fts/functions/snippet-4.rq
+@@ -1 +1 @@
+-SELECT ?u fts:snippet(?u, '>>>', '<<<', '...', 0) { ?u fts:match 'bananas' } order by desc fts:rank(?u)
++SELECT ?u fts:snippet(?u, '>>>', '<<<', '...', -1) { ?u fts:match 'bananas' } order by desc fts:rank(?u)
+diff --git a/tests/fts/functions/snippet-5.out b/tests/fts/functions/snippet-5.out
+deleted file mode 100644
+index b7e42e2f17..0000000000
+--- a/tests/fts/functions/snippet-5.out
++++ /dev/null
+@@ -1,4 +0,0 @@
+-"http://www.example.org/test#1"
+-"http://www.example.org/test#2"
+-"http://www.example.org/test#4"
+-"http://www.example.org/test#3"
+diff --git a/tests/fts/functions/snippet-5.rq b/tests/fts/functions/snippet-5.rq
+deleted file mode 100644
+index 564f52d01e..0000000000
+--- a/tests/fts/functions/snippet-5.rq
++++ /dev/null
+@@ -1 +0,0 @@
+-SELECT ?u fts:snippet(?u, '>>>', '<<<', '...', -1) { ?u fts:match 'bananas' } order by desc fts:rank(?u)
+diff --git a/tests/fts/functions/snippet-data.rq b/tests/fts/functions/snippet-data.rq
+index 2a8ffb1c08..5aa3006af9 100644
+--- a/tests/fts/functions/snippet-data.rq
++++ b/tests/fts/functions/snippet-data.rq
+@@ -1,6 +1,6 @@
+ INSERT {
+ test:1 a test:A ; test:p "bananas lemons lemons" .
+- test:2 a test:A ; test:p "bananas bananas lemons" .
++ test:2 a test:A ; test:p "bananas bandanas lemons" .
+ test:3 a test:A ; test:o "bananas" .
+ test:4 a test:A ; test:p "bananas" ; test:o "bananas lemons" .
+
+diff --git a/tests/fts/tracker-fts-test.c b/tests/fts/tracker-fts-test.c
+index fd2308c4b8..4a1d6f5566 100644
+--- a/tests/fts/tracker-fts-test.c
++++ b/tests/fts/tracker-fts-test.c
+@@ -42,7 +42,7 @@ const TestInfo tests[] = {
+ { "input/fts3input", 3 },
+ { "functions/rank", 2 },
+ { "functions/offsets", 3 },
+- { "functions/snippet", 5 },
++ { "functions/snippet", 4 },
+ { NULL }
+ };
+
+--
+GitLab
+