* [PATCH 1/4] update docs + tests for xapian-delve use
2023-09-08 13:09 6% [PATCH 0/4] doc and ci scripts updates Eric Wong
@ 2023-09-08 13:09 7% ` Eric Wong
0 siblings, 0 replies; 2+ results
From: Eric Wong @ 2023-09-08 13:09 UTC (permalink / raw)
To: meta
Since -cindex uses the xapian-delve(1) command for `--prune'
functionality, we'll rename our `xapian-compact' dependency to
the Debian package name (xapian-tools) since `xapian-delve' is
in the same package.
---
Documentation/txt2pre | 2 ++
INSTALL | 5 +++--
ci/deps.perl | 12 ++++++------
t/cindex.t | 14 ++++++++++----
4 files changed, 21 insertions(+), 12 deletions(-)
diff --git a/Documentation/txt2pre b/Documentation/txt2pre
index 62175f34..c258a90e 100755
--- a/Documentation/txt2pre
+++ b/Documentation/txt2pre
@@ -147,6 +147,8 @@ $xurls{'copydatabase(1)'} =
'https://manpages.debian.org/stable/xapian-tools/copydatabase.1.en.html';
$xurls{'xapian-compact(1)'} =
'https://manpages.debian.org/stable/xapian-tools/xapian-compact.1.en.html';
+$xurls{'xapian-delve(1)'} =
+ 'https://manpages.debian.org/stable/xapian-tools/xapian-delve.1.en.html';
$xurls{'gzip(1)'} = 'https://manpages.debian.org/stable/gzip/gzip.1.en.html';
$xurls{'chmod(1)'} =
'https://manpages.debian.org/stable/coreutils/chmod.1.en.html';
diff --git a/INSTALL b/INSTALL
index 2e1c7ef7..617801cc 100644
--- a/INSTALL
+++ b/INSTALL
@@ -111,10 +111,11 @@ Numerous optional modules are likely to be useful as well:
* highlight deb: libhighlight-perl
(for syntax highlighting with coderepo)
-* xapian-compact (tool) deb: xapian-tools
+* xapian-tools deb: xapian-tools
pkg: xapian-core
rpm: xapian-core
- (only for public-inbox-compact(1))
+ (for public-inbox-compact(1) and
+ public-inbox-cindex(1))
* curl (tool) deb, pkg, rpm: curl
(for HTTP(S) externals with curl)
diff --git a/ci/deps.perl b/ci/deps.perl
index ae85986d..94266029 100755
--- a/ci/deps.perl
+++ b/ci/deps.perl
@@ -1,10 +1,10 @@
#!/usr/bin/perl -w
-# Copyright (C) 2019-2021 all contributors <meta@public-inbox.org>
+# Copyright (C) all contributors <meta@public-inbox.org>
# License: AGPL-3.0+ <https://www.gnu.org/licenses/agpl-3.0.txt>
# Helper script for installing/uninstalling packages for CI use
# Intended for use on non-production chroots or VMs since it
# changes installed packages
-use strict;
+use v5.12;
my $usage = "$0 PKG_FMT PROFILE [PROFILE_MOD]";
my $pkg_fmt = shift;
@ARGV or die $usage, "\n";
@@ -38,7 +38,7 @@ my $profiles = {
Search::Xapian
Socket6
highlight.pm
- xapian-compact
+ xapian-tools
) ],
# optional developer stuff
@@ -119,9 +119,9 @@ my $non_auto = {
rpm => [],
},
- # we call xapian-compact(1) in public-inbox-compact(1)
- 'xapian-compact' => {
- deb => 'xapian-tools',
+ # we call xapian-compact(1) in public-inbox-compact(1) and
+ # xapian-delve(1) in public-inbox-cindex(1)
+ 'xapian-tools' => {
pkg => 'xapian-core',
rpm => 'xapian-core', # ???
},
diff --git a/t/cindex.t b/t/cindex.t
index eca6cda2..9f57bd83 100644
--- a/t/cindex.t
+++ b/t/cindex.t
@@ -79,7 +79,7 @@ ok(run_script([qw(-cindex -L medium --dangerous -q -d),
SKIP: {
- have_xapian_compact;
+ have_xapian_compact 2;
ok(run_script([qw(-compact -q), "$tmp/ext"]), 'compact on full');
ok(run_script([qw(-compact -q), "$tmp/med"]), 'compact on medium');
}
@@ -159,7 +159,8 @@ EOM
is(scalar($mset->items), 1, 'same result after reindex');
}
-if ('--prune') {
+SKIP: { # --prune
+ require_cmd($ENV{XAPIAN_DELVE} || 'xapian-delve', 1);
my $csrch = PublicInbox::CodeSearch->new("$tmp/ext");
is(scalar($csrch->mset('s:hi')->items), 1, 'got hit');
@@ -188,7 +189,12 @@ ok(run_script([qw(-cindex --dangerous -q -d), "$tmp/ext", $zp]),
ok(run_script([qw(-xcpdb), "$tmp/ext"]), 'xcpdb upgrade');
ok(run_script([qw(-xcpdb -R4), "$tmp/ext"]), 'xcpdb reshard');
-ok(run_script([qw(-xcpdb -R2 --compact), "$tmp/ext"]), 'xcpdb reshard+compact');
-ok(run_script([qw(-xcpdb --compact), "$tmp/ext"]), 'xcpdb compact');
+
+SKIP: {
+ have_xapian_compact 2;
+ ok(run_script([qw(-xcpdb -R2 --compact), "$tmp/ext"]),
+ 'xcpdb reshard+compact');
+ ok(run_script([qw(-xcpdb --compact), "$tmp/ext"]), 'xcpdb compact');
+};
done_testing;
^ permalink raw reply related [relevance 7%]
* [PATCH 0/4] doc and ci scripts updates
@ 2023-09-08 13:09 6% Eric Wong
2023-09-08 13:09 7% ` [PATCH 1/4] update docs + tests for xapian-delve use Eric Wong
0 siblings, 1 reply; 2+ results
From: Eric Wong @ 2023-09-08 13:09 UTC (permalink / raw)
To: meta
Hoping these can keep minimal, full, and in-between
installations working reasonably well on all platforms.
OpenBSD pkg_add support has started (not sure what to
call it to not conflict with FreeBSD `pkg')
ci/profiles.sh will probably be rewritten in Perl,
and NetBSD (`pkgin') updates will be coming, too.
Eric Wong (4):
update docs + tests for xapian-delve use
ci/deps: add IMAP-related optional packages
ci/deps: drop unnecessary mappings and add Inline
ci: updates for OpenBSD
Documentation/txt2pre | 2 +
INSTALL | 5 +-
ci/deps.perl | 119 +++++++++++++++++++++++++++---------------
ci/profiles.sh | 23 +++++++-
t/cindex.t | 14 +++--
5 files changed, 114 insertions(+), 49 deletions(-)
^ permalink raw reply [relevance 6%]
Results 1-2 of 2 | reverse | options above
-- pct% links below jump to the message on this page, permalinks otherwise --
2023-09-08 13:09 6% [PATCH 0/4] doc and ci scripts updates Eric Wong
2023-09-08 13:09 7% ` [PATCH 1/4] update docs + tests for xapian-delve use Eric Wong
Code repositories for project(s) associated with this public inbox
https://80x24.org/public-inbox.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).