From aad2243c81ee07e06a600644d4ece20f4c97acdf Mon Sep 17 00:00:00 2001 From: Emmanuel Engelhart Date: Sun, 7 Mar 2021 14:41:33 +0100 Subject: [PATCH 1/4] Bump-up Xapian to version 1.4.18 --- appveyor/install_xapian.cmd | 10 +++++----- kiwixbuild/dependencies/xapian.py | 4 ++-- kiwixbuild/versions.py | 4 ++-- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/appveyor/install_xapian.cmd b/appveyor/install_xapian.cmd index 3e4d286..b91df7a 100644 --- a/appveyor/install_xapian.cmd +++ b/appveyor/install_xapian.cmd @@ -1,10 +1,10 @@ REM ======================================================== REM Install xapian -curl -fsSL -O http://mirror.download.kiwix.org/dev/xapian-core-1.4.14.zip || exit /b 1 -7z x xapian-core-1.4.14.zip || exit /b 1 -%MINGW64_RUN% "cd /c/Projects/kiwix-build/xapian-core-1.4.14 && ../appveyor/apply_patch.sh xapian_remote.patch" || exit /b 1 -cd xapian-core-1.4.14 +curl -fsSL -O http://mirror.download.kiwix.org/dev/xapian-core-1.4.18.zip || exit /b 1 +7z x xapian-core-1.4.18.zip || exit /b 1 +%MINGW64_RUN% "cd /c/Projects/kiwix-build/xapian-core-1.4.18 && ../appveyor/apply_patch.sh xapian_remote.patch" || exit /b 1 +cd xapian-core-1.4.18 mkdir build cd build -%MINGW64_RUN% "cd /c/Projects/kiwix-build/xapian-core-1.4.14/build && /c/Projects/kiwix-build/appveyor/build_xapian.sh" > build_xapian.log || exit /b 1 +%MINGW64_RUN% "cd /c/Projects/kiwix-build/xapian-core-1.4.18/build && /c/Projects/kiwix-build/appveyor/build_xapian.sh" > build_xapian.log || exit /b 1 cd ..\.. diff --git a/kiwixbuild/dependencies/xapian.py b/kiwixbuild/dependencies/xapian.py index 9037344..6e31249 100644 --- a/kiwixbuild/dependencies/xapian.py +++ b/kiwixbuild/dependencies/xapian.py @@ -12,8 +12,8 @@ class Xapian(Dependency): name = "xapian-core" class Source(ReleaseDownload): - archive = Remotefile('xapian-core-1.4.14.tar.xz', - '975a7ac018c9d34a15cc94a3ecc883204403469f748907e5c4c64d0aec2e4949') + archive = Remotefile('xapian-core-1.4.18.tar.xz', + '196ddbb4ad10450100f0991a599e4ed944cbad92e4a6fe813be6dce160244b77') patches = [ 'xapian_sys_types.patch', 'xapian_fix_include_errno.patch', diff --git a/kiwixbuild/versions.py b/kiwixbuild/versions.py index 767bb8c..038fb6e 100644 --- a/kiwixbuild/versions.py +++ b/kiwixbuild/versions.py @@ -39,7 +39,7 @@ release_versions = { # This is the "version" of the whole base_deps_versions dict. # Change this when you change base_deps_versions. -base_deps_meta_version = '70' +base_deps_meta_version = '71' base_deps_versions = { 'zlib' : '1.2.8', @@ -47,7 +47,7 @@ base_deps_versions = { 'zstd' : '1.4.4', 'docoptcpp' : '0.6.2', 'uuid' : '1.43.4', - 'xapian-core' : '1.4.14', + 'xapian-core' : '1.4.18', 'mustache' : '4.1', 'pugixml' : '1.2', 'libmicrohttpd' : '0.9.72', From 54b47fea9efb146d0c2b812597df7f7cb8aff94d Mon Sep 17 00:00:00 2001 From: Emmanuel Engelhart Date: Sun, 7 Mar 2021 14:50:56 +0100 Subject: [PATCH 2/4] Remove xapian_sys_types.patch applied upstream --- kiwixbuild/dependencies/xapian.py | 1 - kiwixbuild/patches/xapian_sys_types.patch | 12 ------------ 2 files changed, 13 deletions(-) delete mode 100644 kiwixbuild/patches/xapian_sys_types.patch diff --git a/kiwixbuild/dependencies/xapian.py b/kiwixbuild/dependencies/xapian.py index 6e31249..7f136e8 100644 --- a/kiwixbuild/dependencies/xapian.py +++ b/kiwixbuild/dependencies/xapian.py @@ -15,7 +15,6 @@ class Xapian(Dependency): archive = Remotefile('xapian-core-1.4.18.tar.xz', '196ddbb4ad10450100f0991a599e4ed944cbad92e4a6fe813be6dce160244b77') patches = [ - 'xapian_sys_types.patch', 'xapian_fix_include_errno.patch', 'xapian_remote.patch' ] diff --git a/kiwixbuild/patches/xapian_sys_types.patch b/kiwixbuild/patches/xapian_sys_types.patch deleted file mode 100644 index b1ee138..0000000 --- a/kiwixbuild/patches/xapian_sys_types.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -ur xapian-core-1.4.7/backends/glass/glass_dbcheck.h xapian-core-1.4.7.patched/backends/glass/glass_dbcheck.h ---- xapian-core-1.4.7/backends/glass/glass_dbcheck.h 2017-10-16 04:32:24.000000000 +0200 -+++ xapian-core-1.4.7.patched/backends/glass/glass_dbcheck.h 2018-06-13 14:55:58.574898188 +0200 -@@ -24,7 +24,7 @@ - - #include "xapian/types.h" - --#include // For size_t. -+#include // For size_t and off_t. - #include - #include - #include From 3e1446f2dd3c899607405217bbfee9578e9bc4a9 Mon Sep 17 00:00:00 2001 From: Emmanuel Engelhart Date: Sun, 7 Mar 2021 14:55:45 +0100 Subject: [PATCH 3/4] Upstream includes , not necessary anymore --- kiwixbuild/dependencies/xapian.py | 1 - kiwixbuild/patches/xapian_fix_include_errno.patch | 11 ----------- 2 files changed, 12 deletions(-) delete mode 100644 kiwixbuild/patches/xapian_fix_include_errno.patch diff --git a/kiwixbuild/dependencies/xapian.py b/kiwixbuild/dependencies/xapian.py index 7f136e8..5cbf0d6 100644 --- a/kiwixbuild/dependencies/xapian.py +++ b/kiwixbuild/dependencies/xapian.py @@ -15,7 +15,6 @@ class Xapian(Dependency): archive = Remotefile('xapian-core-1.4.18.tar.xz', '196ddbb4ad10450100f0991a599e4ed944cbad92e4a6fe813be6dce160244b77') patches = [ - 'xapian_fix_include_errno.patch', 'xapian_remote.patch' ] diff --git a/kiwixbuild/patches/xapian_fix_include_errno.patch b/kiwixbuild/patches/xapian_fix_include_errno.patch deleted file mode 100644 index 234c324..0000000 --- a/kiwixbuild/patches/xapian_fix_include_errno.patch +++ /dev/null @@ -1,11 +0,0 @@ -diff -ur xapian-core-1.4.10/examples/xapian-pos.cc xapian-core-1.4.10.patched/examples/xapian-pos.cc ---- xapian-core-1.4.10/examples/xapian-pos.cc 2019-02-11 22:27:21.000000000 +0100 -+++ xapian-core-1.4.10.patched/examples/xapian-pos.cc 2019-02-18 16:43:08.593354559 +0100 -@@ -29,6 +29,7 @@ - #include - #include - #include -+#include - - #include "gnu_getopt.h" - #include "stringutils.h" From 3d8578ce8ed54053a35fc12a31479b2a1d4d6fd0 Mon Sep 17 00:00:00 2001 From: Emmanuel Engelhart Date: Sun, 7 Mar 2021 15:00:58 +0100 Subject: [PATCH 4/4] Remove outdated Xapian remote patch --- kiwixbuild/dependencies/xapian.py | 3 -- kiwixbuild/patches/xapian_remote.patch | 47 -------------------------- 2 files changed, 50 deletions(-) delete mode 100644 kiwixbuild/patches/xapian_remote.patch diff --git a/kiwixbuild/dependencies/xapian.py b/kiwixbuild/dependencies/xapian.py index 5cbf0d6..149973b 100644 --- a/kiwixbuild/dependencies/xapian.py +++ b/kiwixbuild/dependencies/xapian.py @@ -14,9 +14,6 @@ class Xapian(Dependency): class Source(ReleaseDownload): archive = Remotefile('xapian-core-1.4.18.tar.xz', '196ddbb4ad10450100f0991a599e4ed944cbad92e4a6fe813be6dce160244b77') - patches = [ - 'xapian_remote.patch' - ] class Builder(MakeBuilder): configure_option = "--disable-sse --disable-backend-chert --disable-backend-remote --disable-documentation" diff --git a/kiwixbuild/patches/xapian_remote.patch b/kiwixbuild/patches/xapian_remote.patch deleted file mode 100644 index 8e494ab..0000000 --- a/kiwixbuild/patches/xapian_remote.patch +++ /dev/null @@ -1,47 +0,0 @@ -diff -ur xapian-core-1.4.14/matcher/multimatch.cc xapian-core-1.4.14.patched/matcher/multimatch.cc ---- xapian-core-1.4.14/matcher/multimatch.cc 2019-11-23 08:12:20.000000000 +0100 -+++ xapian-core-1.4.14.patched/matcher/multimatch.cc 2019-12-08 20:14:24.948683845 +0100 -@@ -441,9 +441,11 @@ - // number of matching documents which is higher than the number of - // documents it returns (because it wasn't asked for more documents). - Xapian::doccount definite_matches_not_seen = 0; -+#ifdef XAPIAN_HAS_REMOTE_BACKEND - // Track these for calculating uncollapsed_upper_bound for the local. - size_t n_remotes = 0; - Xapian::doccount remote_uncollapsed_upper_bound = 0; -+#endif - try { - for (size_t i = 0; i != leaves.size(); ++i) { - // Pick the highest total subqueries answer amongst the -@@ -453,6 +455,7 @@ - Xapian::termcount total_subqs_i = 0; - PostList* pl = leaves[i]->get_postlist(this, &total_subqs_i); - total_subqs = max(total_subqs, total_subqs_i); -+#ifdef XAPIAN_HAS_REMOTE_BACKEND - if (is_remote[i]) { - ++n_remotes; - RemoteSubMatch* rem_match = -@@ -469,6 +472,7 @@ - definite_matches_not_seen -= first + maxitems; - } - } -+#endif - postlists.push_back(pl); - } - } catch (...) { -@@ -950,6 +954,7 @@ - Xapian::doccount uncollapsed_lower_bound = matches_lower_bound; - Xapian::doccount uncollapsed_upper_bound = matches_upper_bound; - Xapian::doccount uncollapsed_estimated = matches_estimated; -+#ifdef XAPIAN_HAS_REMOTE_BACKEND - if (collapser && n_remotes) { - // We need to adjust uncollapsed_upper_bound if there are multiple - // shards and some or all are remote. The lower bound and estimate -@@ -971,6 +976,7 @@ - } - } - } -+#endif - if (items.size() < max_msize) { - // We have fewer items in the mset than we tried to get for it, so we - // must have all the matches in it.