user/dev discussion of public-inbox itself
 help / color / mirror / code / Atom feed
Search results ordered by [date|relevance]  view[summary|nested|Atom feed]
thread overview below | download mbox.gz: |
* [PATCH] treewide: favor Xapian (SWIG binding) over Search::Xapian
@ 2023-09-11  7:26  7% Eric Wong
  0 siblings, 0 replies; 1+ results
From: Eric Wong @ 2023-09-11  7:26 UTC (permalink / raw)
  To: meta

The Xapian SWIG bindings are favored by Xapian upstream for
ease-of-maintenance compared to the XS version.  While Debian
lags on this front, the SWIG bindings are widely available
on all *BSDs.
---
 Documentation/design_www.txt                |  2 +-
 Documentation/public-inbox-config.pod       |  4 ++--
 Documentation/public-inbox-extindex.pod     |  2 +-
 Documentation/public-inbox-index.pod        |  4 ++--
 Documentation/public-inbox-overview.pod     |  2 +-
 Documentation/technical/data_structures.txt |  2 +-
 INSTALL                                     |  4 ++--
 ci/deps.perl                                |  5 +++--
 ci/profiles.perl                            |  6 +++---
 lib/PublicInbox/Admin.pm                    |  8 ++++----
 lib/PublicInbox/AdminEdit.pm                |  4 ++--
 lib/PublicInbox/Feed.pm                     |  2 +-
 lib/PublicInbox/Search.pm                   | 11 ++++-------
 lib/PublicInbox/TestCommon.pm               |  4 ++--
 script/public-inbox-cindex                  |  2 +-
 script/public-inbox-index                   |  3 +--
 t/altid.t                                   |  2 +-
 t/altid_v2.t                                |  2 +-
 t/cindex.t                                  |  2 +-
 t/convert-compact.t                         |  2 +-
 t/extindex-psgi.t                           |  2 +-
 t/extsearch.t                               |  2 +-
 t/imapd.t                                   |  2 +-
 t/index-git-times.t                         |  2 +-
 t/indexlevels-mirror.t                      |  2 +-
 t/init.t                                    |  2 +-
 t/lei-externals.t                           |  2 +-
 t/lei-import-nntp.t                         |  2 +-
 t/lei-p2q.t                                 |  2 +-
 t/lei-q-thread.t                            |  2 +-
 t/lei-tag.t                                 |  2 +-
 t/lei_overview.t                            |  2 +-
 t/lei_store.t                               |  2 +-
 t/lei_xsearch.t                             |  2 +-
 t/mda_filter_rubylang.t                     |  2 +-
 t/miscsearch.t                              |  2 +-
 t/net_reader-imap.t                         |  2 +-
 t/nntpd.t                                   | 12 +++++++-----
 t/psgi_mount.t                              |  2 +-
 t/psgi_multipart_not.t                      |  2 +-
 t/psgi_search.t                             |  2 +-
 t/psgi_v2.t                                 |  2 +-
 t/replace.t                                 |  2 +-
 t/search-thr-index.t                        |  2 +-
 t/search.t                                  |  2 +-
 t/solver_git.t                              |  2 +-
 t/v1-add-remove-add.t                       |  2 +-
 t/v1reindex.t                               |  2 +-
 t/v2-add-remove-add.t                       |  2 +-
 t/v2mda.t                                   |  2 +-
 t/v2mirror.t                                |  2 +-
 t/v2reindex.t                               |  2 +-
 t/v2writable.t                              |  2 +-
 t/watch_filter_rubylang.t                   |  2 +-
 t/watch_maildir_v2.t                        |  2 +-
 t/watch_multiple_headers.t                  |  2 +-
 t/xap_helper.t                              |  2 +-
 t/xcpdb-reshard.t                           |  2 +-
 xt/create-many-inboxes.t                    |  2 +-
 xt/solver.t                                 |  2 +-
 60 files changed, 81 insertions(+), 82 deletions(-)

diff --git a/Documentation/design_www.txt b/Documentation/design_www.txt
index 68488b1f..a0003f99 100644
--- a/Documentation/design_www.txt
+++ b/Documentation/design_www.txt
@@ -7,7 +7,7 @@ URL and anchor naming
 /$INBOX/?r=$GIT_COMMIT                 -> HTML only
 /$INBOX/new.atom                       -> Atom feed
 
-#### Optional, relies on Search::Xapian (or Xapian SWIG binding)
+#### Optional, relies on Xapian
 /$INBOX/$MESSAGE_ID/t/                 -> HTML content of thread (nested)
 /$INBOX/$MESSAGE_ID/T/                 -> HTML content of thread (flat)
 	anchors:
diff --git a/Documentation/public-inbox-config.pod b/Documentation/public-inbox-config.pod
index d2389abc..871ac6c5 100644
--- a/Documentation/public-inbox-config.pod
+++ b/Documentation/public-inbox-config.pod
@@ -125,8 +125,8 @@ C<basic> only requires L<DBD::SQLite(3pm)> and provides all
 NNTP functionality along with thread-awareness in the WWW
 interface.
 
-C<medium> requires L<Search::Xapian(3pm)> to provide full-text
-term search functionality in the WWW UI.
+C<medium> requires L<Xapian(3pm)> or L<Search::Xapian(3pm)> to provide
+full-text term search functionality in the WWW UI.
 
 C<full> also includes positional information used by Xapian to
 allow for searching for phrases using quoted text.
diff --git a/Documentation/public-inbox-extindex.pod b/Documentation/public-inbox-extindex.pod
index a5f699c5..fbb12fe9 100644
--- a/Documentation/public-inbox-extindex.pod
+++ b/Documentation/public-inbox-extindex.pod
@@ -13,7 +13,7 @@ public-inbox-extindex [OPTIONS] [EXTINDEX_DIR] --all
 public-inbox-extindex creates and updates an external search and
 overview database used by the read-only public-inbox PSGI (HTTP),
 NNTP, and IMAP interfaces.  This requires either the
-L<Search::Xapian> XS bindings OR the L<Xapian> SWIG bindings,
+L<Xapian> SWIG bindings OR or L<Search::Xapian> XS bindings
 along with L<DBD::SQLite> and L<DBI> Perl modules.
 
 =head1 OPTIONS
diff --git a/Documentation/public-inbox-index.pod b/Documentation/public-inbox-index.pod
index 11108f78..14f157a5 100644
--- a/Documentation/public-inbox-index.pod
+++ b/Documentation/public-inbox-index.pod
@@ -13,8 +13,8 @@ public-inbox-index [OPTIONS] --all
 public-inbox-index creates and updates the search, overview and
 NNTP article number database used by the read-only public-inbox
 HTTP and NNTP interfaces.  Currently, this requires
-L<DBD::SQLite> and L<DBI> Perl modules.  L<Search::Xapian>
-is optional, only to support the PSGI search interface.
+L<DBD::SQLite> and L<DBI> Perl modules.  L<Xapian> (or L<Search::Xapian>)
+are optional, only to support the PSGI search interface.
 
 Once the initial indices are created by public-inbox-index,
 L<public-inbox-mda(1)> and L<public-inbox-watch(1)> will
diff --git a/Documentation/public-inbox-overview.pod b/Documentation/public-inbox-overview.pod
index d4318576..35917ccc 100644
--- a/Documentation/public-inbox-overview.pod
+++ b/Documentation/public-inbox-overview.pod
@@ -48,7 +48,7 @@ that inbox.  The instructions are roughly:
 
   # Optional but strongly recommended for hosting HTTP
   # (and required for NNTP)
-  # enable overview (requires DBD::SQLite) and, if Search::Xapian is
+  # enable overview (requires DBD::SQLite) and, if Xapian is
   # available, search:
   public-inbox-index INBOX_DIR
 
diff --git a/Documentation/technical/data_structures.txt b/Documentation/technical/data_structures.txt
index 5ed21882..11f78041 100644
--- a/Documentation/technical/data_structures.txt
+++ b/Documentation/technical/data_structures.txt
@@ -117,7 +117,7 @@ Per-inbox classes
 
 * PublicInbox::Search - Xapian read-only interface
   Common abbreviation: $srch, $ibx->search
-  Used everywhere if Search::Xapian (or Xapian.pm) is available.
+  Used everywhere if Xapian is available.
 
   Each indexed inbox has one of these, see
   public-inbox-v1-format(5) and public-inbox-v2-format(5)
diff --git a/INSTALL b/INSTALL
index 617801cc..13a1bdc6 100644
--- a/INSTALL
+++ b/INSTALL
@@ -67,8 +67,8 @@ Numerous optional modules are likely to be useful as well:
                                    rpm: perl-DBD-SQLite
                                    (for v2, IMAP, NNTP, or gzipped mboxes)
 
-- Search::Xapian or Xapian(.pm)    deb: libsearch-xapian-perl
-                                   pkg: p5-Search-Xapian OR p5-Xapian (FreeBSD)
+- Xapian(.pm) (or Search::Xapian)  deb: libsearch-xapian-perl
+                                   pkg: p5-Xapian (FreeBSD, NetBSD)
                                         xapian-bindings-perl (OpenBSD)
                                    rpm: perl-Search-Xapian
                                    (HTTP and IMAP search)
diff --git a/ci/deps.perl b/ci/deps.perl
index 6bc38735..3fa8f642 100755
--- a/ci/deps.perl
+++ b/ci/deps.perl
@@ -39,7 +39,7 @@ my $profiles = {
 		Plack
 		Plack::Test
 		Plack::Middleware::ReverseProxy
-		Search::Xapian
+		Xapian
 		Socket6
 		highlight.pm
 		xapian-tools
@@ -85,7 +85,8 @@ my $non_auto = {
 		deb => 'libplack-perl',
 		pkg => 'p5-Plack',
 	},
-	'Search::Xapian' => {
+	'Xapian' => {
+		deb => 'libsearch-xapian-perl',
 		pkg => [qw(xapian-core p5-Xapian)],
 		pkg_add => [qw(xapian-core xapian-bindings-perl)],
 		pkgin => [qw(xapian p5-Xapian)],
diff --git a/ci/profiles.perl b/ci/profiles.perl
index 720cd24e..e18f01fa 100755
--- a/ci/profiles.perl
+++ b/ci/profiles.perl
@@ -70,7 +70,7 @@ my $PKG_FMT = do {
 # these package group names and '-' syntax are passed to ci/deps.perl
 my $TASKS = do {
 	if ($ID =~ /\A(?:free|net|open)bsd\z/) { <<EOM
-all devtest Search::Xapian-
+all devtest Xapian-
 all devtest IO::KQueue-
 all devtest IO::KQueue
 all devtest Inline::C-
@@ -78,7 +78,7 @@ all devtest Inline::C
 EOM
 	} elsif ($ID eq 'debian') { <<EOM
 all devtest
-all devtest Search::Xapian-
+all devtest Xapian-
 all devtest-
 v2essential
 essential
@@ -87,7 +87,7 @@ EOM
 	} elsif ($ID eq 'centos') { <<EOM
 v2essential devtest
 essential devtest
-all Search::Xapian-
+all Xapian-
 EOM
 	} else { die "TODO: support ID=$ID VERSION_ID=$VERSION_ID" }
 };
diff --git a/lib/PublicInbox/Admin.pm b/lib/PublicInbox/Admin.pm
index 72ac9420..3140afad 100644
--- a/lib/PublicInbox/Admin.pm
+++ b/lib/PublicInbox/Admin.pm
@@ -185,13 +185,13 @@ my @over_mod = qw(DBD::SQLite DBI);
 my %mod_groups = (
 	-index => [ @base_mod, @over_mod ],
 	-base => \@base_mod,
-	-search => [ @base_mod, @over_mod, 'Search::Xapian' ],
+	-search => [ @base_mod, @over_mod, 'Xapian' ],
 );
 
 sub scan_ibx_modules ($$) {
 	my ($mods, $ibx) = @_;
 	if (!$ibx->{indexlevel} || $ibx->{indexlevel} ne 'basic') {
-		$mods->{'Search::Xapian'} = 1;
+		$mods->{'Xapian'} = 1;
 	} else {
 		$mods->{$_} = 1 foreach @over_mod;
 	}
@@ -203,10 +203,10 @@ sub check_require {
 	while (my $mod = shift @mods) {
 		if (my $groups = $mod_groups{$mod}) {
 			push @mods, @$groups;
-		} elsif ($mod eq 'Search::Xapian') {
+		} elsif ($mod eq 'Xapian') {
 			require PublicInbox::Search;
 			PublicInbox::Search::load_xapian() or
-				$err->{'Search::Xapian || Xapian'} = $@;
+				$err->{'Xapian || Search::Xapian'} = $@;
 		} else {
 			eval "require $mod";
 			$err->{$mod} = $@ if $@;
diff --git a/lib/PublicInbox/AdminEdit.pm b/lib/PublicInbox/AdminEdit.pm
index c8c3d3e8..654141a7 100644
--- a/lib/PublicInbox/AdminEdit.pm
+++ b/lib/PublicInbox/AdminEdit.pm
@@ -19,11 +19,11 @@ sub check_editable ($) {
 		}
 
 		# Undefined indexlevel, so `full'...
-		# Search::Xapian exists and the DB can be read, at least, fine
+		# Xapian exists and the DB can be read, at least, fine
 		$ibx->search and next;
 
 		# it's possible for a Xapian directory to exist,
-		# but Search::Xapian to go missing/broken.
+		# but Xapian to go missing/broken.
 		# Make sure it's purged in that case:
 		$ibx->over or die "no over.sqlite3 in $ibx->{inboxdir}\n";
 
diff --git a/lib/PublicInbox/Feed.pm b/lib/PublicInbox/Feed.pm
index 69a92f8b..225565f4 100644
--- a/lib/PublicInbox/Feed.pm
+++ b/lib/PublicInbox/Feed.pm
@@ -7,7 +7,7 @@ use strict;
 use v5.10.1;
 use PublicInbox::View;
 use PublicInbox::WwwAtomStream;
-use PublicInbox::Smsg; # this loads w/o Search::Xapian
+use PublicInbox::Smsg; # this loads w/o Xapian
 
 sub generate_i {
 	my ($ctx) = @_;
diff --git a/lib/PublicInbox/Search.pm b/lib/PublicInbox/Search.pm
index 2e784646..d7a6f9d7 100644
--- a/lib/PublicInbox/Search.pm
+++ b/lib/PublicInbox/Search.pm
@@ -59,7 +59,7 @@ use PublicInbox::Smsg;
 use PublicInbox::Over;
 our $QP_FLAGS;
 our %X = map { $_ => 0 } qw(BoolWeight Database Enquire QueryParser Stem Query);
-our $Xap; # 'Search::Xapian' or 'Xapian'
+our $Xap; # 'Xapian' or 'Search::Xapian'
 our $NVRP; # '$Xap::'.('NumberValueRangeProcessor' or 'NumberRangeProcessor')
 
 # ENQ_DESCENDING and ENQ_ASCENDING weren't in SWIG Xapian.pm prior to 1.4.16,
@@ -78,10 +78,8 @@ our @MAIL_NRP;
 
 sub load_xapian () {
 	return 1 if defined $Xap;
-	# n.b. PI_XAPIAN is intended for development use only.  We still
-	# favor Search::Xapian since that's what's available in current
-	# Debian stable (10.x) and derived distros.
-	for my $x (($ENV{PI_XAPIAN} // 'Search::Xapian'), 'Xapian') {
+	# n.b. PI_XAPIAN is intended for development use only
+	for my $x (($ENV{PI_XAPIAN} // 'Xapian'), 'Search::Xapian') {
 		eval "require $x";
 		next if $@;
 
@@ -94,8 +92,7 @@ sub load_xapian () {
 
 		# NumberRangeProcessor was added in Xapian 1.3.6,
 		# NumberValueRangeProcessor was removed for 1.5.0+,
-		# favor the older /Value/ variant since that's what our
-		# (currently) preferred Search::Xapian supports
+		# continue with the older /Value/ variant for now...
 		$NVRP = $x.'::'.($x eq 'Xapian' && $xver ge v1.5 ?
 			'NumberRangeProcessor' : 'NumberValueRangeProcessor');
 		$X{$_} = $Xap.'::'.$_ for (keys %X);
diff --git a/lib/PublicInbox/TestCommon.pm b/lib/PublicInbox/TestCommon.pm
index b2774f58..ec300b3f 100644
--- a/lib/PublicInbox/TestCommon.pm
+++ b/lib/PublicInbox/TestCommon.pm
@@ -134,7 +134,7 @@ sub require_mods {
 	while (my $mod = shift(@mods)) {
 		if ($mod eq 'lei') {
 			require_git(2.6, $maybe ? $maybe : ());
-			push @mods, qw(DBD::SQLite Search::Xapian +SCM_RIGHTS);
+			push @mods, qw(DBD::SQLite Xapian +SCM_RIGHTS);
 			$mod = 'json'; # fall-through
 		}
 		if ($mod eq 'json') {
@@ -150,7 +150,7 @@ sub require_mods {
 			push @mods, qw(DBD::SQLite);
 			next;
 		}
-		if ($mod eq 'Search::Xapian') {
+		if ($mod eq 'Xapian') {
 			if (eval { require PublicInbox::Search } &&
 				PublicInbox::Search::load_xapian()) {
 				next;
diff --git a/script/public-inbox-cindex b/script/public-inbox-cindex
index 0526434c..b5fe9cf8 100755
--- a/script/public-inbox-cindex
+++ b/script/public-inbox-cindex
@@ -46,7 +46,7 @@ require PublicInbox::Admin;
 PublicInbox::Admin::do_chdir(delete $opt->{C});
 my $cfg = PublicInbox::Config->new;
 my $cidx_dir = $opt->{d};
-PublicInbox::Admin::require_or_die('Search::Xapian');
+PublicInbox::Admin::require_or_die('Xapian');
 PublicInbox::Admin::progress_prepare($opt);
 my $env = PublicInbox::Admin::index_prepare($opt, $cfg);
 %ENV = (%ENV, %$env) if $env;
diff --git a/script/public-inbox-index b/script/public-inbox-index
index f29e7c3c..74232ebf 100755
--- a/script/public-inbox-index
+++ b/script/public-inbox-index
@@ -113,8 +113,7 @@ The following inboxes are unconfigured and will not be updated in
 @$update_extindex:\n@eidx_unconfigured
 EOF
 
-# "Search::Xapian" includes SWIG "Xapian", too:
-$opt->{compact} = 0 if !$mods->{'Search::Xapian'};
+$opt->{compact} = 0 if !$mods->{'Xapian'}; # (or old Search::Xapian)
 
 PublicInbox::Admin::require_or_die(keys %$mods);
 my $env = PublicInbox::Admin::index_prepare($opt, $cfg);
diff --git a/t/altid.t b/t/altid.t
index 3ce08a6a..2692029e 100644
--- a/t/altid.t
+++ b/t/altid.t
@@ -5,7 +5,7 @@ use strict;
 use v5.10.1;
 use PublicInbox::TestCommon;
 use PublicInbox::Eml;
-require_mods(qw(DBD::SQLite Search::Xapian));
+require_mods(qw(DBD::SQLite Xapian));
 use_ok 'PublicInbox::Msgmap';
 use_ok 'PublicInbox::SearchIdx';
 my ($tmpdir, $for_destroy) = tmpdir();
diff --git a/t/altid_v2.t b/t/altid_v2.t
index c62252c1..6bc90453 100644
--- a/t/altid_v2.t
+++ b/t/altid_v2.t
@@ -6,7 +6,7 @@ use v5.10.1;
 use PublicInbox::TestCommon;
 use PublicInbox::Eml;
 require_git(2.6);
-require_mods(qw(DBD::SQLite Search::Xapian));
+require_mods(qw(DBD::SQLite Xapian));
 require PublicInbox::Msgmap;
 my $another = 'another-nntp.sqlite3';
 my $altid = [ "serial:gmane:file=$another" ];
diff --git a/t/cindex.t b/t/cindex.t
index 9f57bd83..dbbccbb0 100644
--- a/t/cindex.t
+++ b/t/cindex.t
@@ -5,7 +5,7 @@ use v5.12;
 use PublicInbox::TestCommon;
 use Cwd qw(getcwd abs_path);
 use List::Util qw(sum);
-require_mods(qw(json Search::Xapian));
+require_mods(qw(json Xapian));
 use_ok 'PublicInbox::CodeSearchIdx';
 require PublicInbox::Import;
 my ($tmp, $for_destroy) = tmpdir();
diff --git a/t/convert-compact.t b/t/convert-compact.t
index bad6560e..1ac3517d 100644
--- a/t/convert-compact.t
+++ b/t/convert-compact.t
@@ -7,7 +7,7 @@ use PublicInbox::Eml;
 use PublicInbox::TestCommon;
 use PublicInbox::Import;
 require_git(2.6);
-require_mods(qw(DBD::SQLite Search::Xapian));
+require_mods(qw(DBD::SQLite Xapian));
 have_xapian_compact;
 my ($tmpdir, $for_destroy) = tmpdir();
 my $ibx = create_inbox 'v1', indexlevel => 'medium', tmpdir => "$tmpdir/v1",
diff --git a/t/extindex-psgi.t b/t/extindex-psgi.t
index f10ffbb6..f71210a5 100644
--- a/t/extindex-psgi.t
+++ b/t/extindex-psgi.t
@@ -8,7 +8,7 @@ use PublicInbox::Config;
 use File::Copy qw(cp);
 use IO::Handle ();
 require_git(2.6);
-require_mods(qw(json DBD::SQLite Search::Xapian
+require_mods(qw(json DBD::SQLite Xapian
 		HTTP::Request::Common Plack::Test URI::Escape Plack::Builder));
 use_ok($_) for (qw(HTTP::Request::Common Plack::Test));
 use IO::Uncompress::Gunzip qw(gunzip);
diff --git a/t/extsearch.t b/t/extsearch.t
index 8cbd26f0..545330aa 100644
--- a/t/extsearch.t
+++ b/t/extsearch.t
@@ -7,7 +7,7 @@ use PublicInbox::Config;
 use PublicInbox::InboxWritable;
 use Fcntl qw(:seek);
 require_git(2.6);
-require_mods(qw(json DBD::SQLite Search::Xapian));
+require_mods(qw(json DBD::SQLite Xapian));
 require PublicInbox::Search;
 use_ok 'PublicInbox::ExtSearch';
 use_ok 'PublicInbox::ExtSearchIdx';
diff --git a/t/imapd.t b/t/imapd.t
index 98de40d4..9606291e 100644
--- a/t/imapd.t
+++ b/t/imapd.t
@@ -21,7 +21,7 @@ my $first_range = '0';
 
 my $level = 'basic';
 SKIP: {
-	require_mods('Search::Xapian', 1);
+	require_mods('Xapian', 1);
 	$level = 'medium';
 };
 
diff --git a/t/index-git-times.t b/t/index-git-times.t
index 96886c5e..eac2d650 100644
--- a/t/index-git-times.t
+++ b/t/index-git-times.t
@@ -10,7 +10,7 @@ use PublicInbox::Import;
 use File::Path qw(remove_tree);
 require PublicInbox::InboxWritable;
 
-require_mods(qw(DBD::SQLite Search::Xapian));
+require_mods(qw(DBD::SQLite Xapian));
 use_ok 'PublicInbox::Over';
 
 my ($tmpdir, $for_destroy) = tmpdir();
diff --git a/t/indexlevels-mirror.t b/t/indexlevels-mirror.t
index 62411671..c852f72c 100644
--- a/t/indexlevels-mirror.t
+++ b/t/indexlevels-mirror.t
@@ -168,7 +168,7 @@ my $import_index_incremental = sub {
 $import_index_incremental->($PI_TEST_VERSION, 'basic', $mime);
 
 SKIP: {
-	require_mods(qw(Search::Xapian), 2);
+	require_mods(qw(Xapian), 2);
 	foreach my $l (qw(medium full)) {
 		$import_index_incremental->($PI_TEST_VERSION, $l, $mime);
 	}
diff --git a/t/init.t b/t/init.t
index 82a2a443..abe3a372 100644
--- a/t/init.t
+++ b/t/init.t
@@ -121,7 +121,7 @@ sub quiet_fail {
 }
 
 SKIP: {
-	require_mods(qw(DBD::SQLite Search::Xapian), 2);
+	require_mods(qw(DBD::SQLite Xapian), 2);
 	require_git(2.6, 2);
 	use_ok 'PublicInbox::Msgmap';
 	local $ENV{PI_DIR} = "$tmpdir/.public-inbox/";
diff --git a/t/lei-externals.t b/t/lei-externals.t
index 284be1b9..aeaf8ee4 100644
--- a/t/lei-externals.t
+++ b/t/lei-externals.t
@@ -4,7 +4,7 @@
 use strict; use v5.10.1; use PublicInbox::TestCommon;
 use Fcntl qw(SEEK_SET);
 require_git 2.6;
-require_mods(qw(json DBD::SQLite Search::Xapian));
+require_mods(qw(json DBD::SQLite Xapian));
 use POSIX qw(WTERMSIG WIFSIGNALED SIGPIPE);
 
 my @onions = map { "http://$_.onion/meta/" } qw(
diff --git a/t/lei-import-nntp.t b/t/lei-import-nntp.t
index c3ee06a2..14c644e0 100644
--- a/t/lei-import-nntp.t
+++ b/t/lei-import-nntp.t
@@ -3,7 +3,7 @@
 # License: AGPL-3.0+ <https://www.gnu.org/licenses/agpl-3.0.txt>
 use strict; use v5.10.1; use PublicInbox::TestCommon;
 require_git 2.6;
-require_mods(qw(lei json DBD::SQLite Search::Xapian Net::NNTP));
+require_mods(qw(lei json DBD::SQLite Xapian Net::NNTP));
 my ($ro_home, $cfg_path) = setup_public_inboxes;
 my ($tmpdir, $for_destroy) = tmpdir;
 my $sock = tcp_server;
diff --git a/t/lei-p2q.t b/t/lei-p2q.t
index bf40a43b..44f37d19 100644
--- a/t/lei-p2q.t
+++ b/t/lei-p2q.t
@@ -3,7 +3,7 @@
 # License: AGPL-3.0+ <https://www.gnu.org/licenses/agpl-3.0.txt>
 use strict; use v5.10.1; use PublicInbox::TestCommon;
 require_git 2.6;
-require_mods(qw(json DBD::SQLite Search::Xapian));
+require_mods(qw(json DBD::SQLite Xapian));
 
 test_lei(sub {
 	ok(!lei(qw(p2q this-better-cause-format-patch-to-fail)),
diff --git a/t/lei-q-thread.t b/t/lei-q-thread.t
index 26d06eec..72d3a565 100644
--- a/t/lei-q-thread.t
+++ b/t/lei-q-thread.t
@@ -3,7 +3,7 @@
 # License: AGPL-3.0+ <https://www.gnu.org/licenses/agpl-3.0.txt>
 use strict; use v5.10.1; use PublicInbox::TestCommon;
 require_git 2.6;
-require_mods(qw(json DBD::SQLite Search::Xapian));
+require_mods(qw(json DBD::SQLite Xapian));
 use PublicInbox::LeiToMail;
 my ($ro_home, $cfg_path) = setup_public_inboxes;
 test_lei(sub {
diff --git a/t/lei-tag.t b/t/lei-tag.t
index 5941cd0f..822677a7 100644
--- a/t/lei-tag.t
+++ b/t/lei-tag.t
@@ -3,7 +3,7 @@
 # License: AGPL-3.0+ <https://www.gnu.org/licenses/agpl-3.0.txt>
 use strict; use v5.10.1; use PublicInbox::TestCommon;
 require_git 2.6;
-require_mods(qw(json DBD::SQLite Search::Xapian));
+require_mods(qw(json DBD::SQLite Xapian));
 my ($ro_home, $cfg_path) = setup_public_inboxes;
 my $check_kw = sub {
 	my ($exp, %opt) = @_;
diff --git a/t/lei_overview.t b/t/lei_overview.t
index dd9e2cad..b4181ffd 100644
--- a/t/lei_overview.t
+++ b/t/lei_overview.t
@@ -6,7 +6,7 @@ use v5.10.1;
 use Test::More;
 use PublicInbox::TestCommon;
 use POSIX qw(_exit);
-require_mods(qw(Search::Xapian DBD::SQLite));
+require_mods(qw(Xapian DBD::SQLite));
 require_ok 'PublicInbox::LeiOverview';
 
 my $ovv = bless {}, 'PublicInbox::LeiOverview';
diff --git a/t/lei_store.t b/t/lei_store.t
index 5a5e5de0..17ee0729 100644
--- a/t/lei_store.t
+++ b/t/lei_store.t
@@ -5,7 +5,7 @@ use strict;
 use v5.10.1;
 use Test::More;
 use PublicInbox::TestCommon;
-require_mods(qw(DBD::SQLite Search::Xapian));
+require_mods(qw(DBD::SQLite Xapian));
 require_git 2.6;
 require_ok 'PublicInbox::LeiStore';
 require_ok 'PublicInbox::ExtSearch';
diff --git a/t/lei_xsearch.t b/t/lei_xsearch.t
index fabceb41..977fb1e9 100644
--- a/t/lei_xsearch.t
+++ b/t/lei_xsearch.t
@@ -6,7 +6,7 @@ use v5.10.1;
 use List::Util qw(shuffle);
 use PublicInbox::TestCommon;
 use PublicInbox::Eml;
-require_mods(qw(DBD::SQLite Search::Xapian));
+require_mods(qw(DBD::SQLite Xapian));
 require PublicInbox::ExtSearchIdx;
 require_git 2.6;
 require_ok 'PublicInbox::LeiXSearch';
diff --git a/t/mda_filter_rubylang.t b/t/mda_filter_rubylang.t
index d05eec25..42fa6101 100644
--- a/t/mda_filter_rubylang.t
+++ b/t/mda_filter_rubylang.t
@@ -7,7 +7,7 @@ use PublicInbox::Eml;
 use PublicInbox::Config;
 use PublicInbox::TestCommon;
 require_git(2.6);
-require_mods(qw(DBD::SQLite Search::Xapian));
+require_mods(qw(DBD::SQLite Xapian));
 use_ok 'PublicInbox::V2Writable';
 my ($tmpdir, $for_destroy) = tmpdir();
 my $pi_config = "$tmpdir/pi_config";
diff --git a/t/miscsearch.t b/t/miscsearch.t
index 307812a4..ec837153 100644
--- a/t/miscsearch.t
+++ b/t/miscsearch.t
@@ -5,7 +5,7 @@ use strict;
 use v5.10.1;
 use Test::More;
 use PublicInbox::TestCommon;
-require_mods(qw(Search::Xapian DBD::SQLite));
+require_mods(qw(Xapian DBD::SQLite));
 use_ok 'PublicInbox::MiscSearch';
 use_ok 'PublicInbox::MiscIdx';
 
diff --git a/t/net_reader-imap.t b/t/net_reader-imap.t
index 5de8f92b..7b7f5cbe 100644
--- a/t/net_reader-imap.t
+++ b/t/net_reader-imap.t
@@ -3,7 +3,7 @@
 # License: AGPL-3.0+ <https://www.gnu.org/licenses/agpl-3.0.txt>
 use strict; use v5.10.1; use PublicInbox::TestCommon;
 require_git 2.6;
-require_mods(qw(-imapd Search::Xapian Mail::IMAPClient));
+require_mods(qw(-imapd Xapian Mail::IMAPClient));
 use PublicInbox::Config;
 my ($tmpdir, $for_destroy) = tmpdir;
 my ($ro_home, $cfg_path) = setup_public_inboxes;
diff --git a/t/nntpd.t b/t/nntpd.t
index 80df4dc5..f98d638e 100644
--- a/t/nntpd.t
+++ b/t/nntpd.t
@@ -328,18 +328,20 @@ Date: Fri, 02 Oct 1993 00:00:00 +0000
 	}
 	my $noerr = { 2 => \(my $null) };
 	SKIP: {
-		if ($INC{'Search/Xapian.pm'} && ($ENV{TEST_RUN_MODE}//2)) {
-			skip 'Search/Xapian.pm pre-loaded (by t/run.perl?)', 1;
+		if ($INC{'Search/Xapian.pm'} || $INC{'Xapian.pm'} &&
+				($ENV{TEST_RUN_MODE} // 2)) {
+			skip 'Xapian.pm pre-loaded (by t/run.perl?)', 1;
 		}
 		$lsof or skip 'lsof missing', 1;
 		my @of = xqx([$lsof, '-p', $td->{pid}], undef, $noerr);
 		skip('lsof broken', 1) if (!scalar(@of) || $?);
-		my @xap = grep m!Search/Xapian!, @of;
-		is_deeply(\@xap, [], 'Xapian not loaded in nntpd');
+		my @xap = grep m!\bXapian\b!, @of;
+		is_deeply(\@xap, [], 'Xapian not loaded in nntpd') or
+			diag explain(\@of);
 	}
 	# -compact requires Xapian
 	SKIP: {
-		require_mods('Search::Xapian', 2);
+		require_mods('Xapian', 2);
 		have_xapian_compact or skip 'xapian-compact missing', 2;
 		is(xsys(qw(git config), "--file=$home/.public-inbox/config",
 				"publicinbox.$group.indexlevel", 'medium'),
diff --git a/t/psgi_mount.t b/t/psgi_mount.t
index 7c5487f3..28689f11 100644
--- a/t/psgi_mount.t
+++ b/t/psgi_mount.t
@@ -69,7 +69,7 @@ test_psgi($app, sub {
 });
 
 SKIP: {
-	require_mods(qw(DBD::SQLite Search::Xapian IO::Uncompress::Gunzip), 3);
+	require_mods(qw(DBD::SQLite Xapian IO::Uncompress::Gunzip), 3);
 	require_ok 'PublicInbox::SearchIdx';
 	PublicInbox::SearchIdx->new($ibx, 1)->index_sync;
 	test_psgi($app, sub {
diff --git a/t/psgi_multipart_not.t b/t/psgi_multipart_not.t
index 5f4c06b7..96be1716 100644
--- a/t/psgi_multipart_not.t
+++ b/t/psgi_multipart_not.t
@@ -7,7 +7,7 @@ use PublicInbox::TestCommon;
 use PublicInbox::Eml;
 use PublicInbox::Config;
 require_git 2.6;
-my @mods = qw(DBD::SQLite Search::Xapian HTTP::Request::Common
+my @mods = qw(DBD::SQLite Xapian HTTP::Request::Common
               Plack::Test URI::Escape Plack::Builder Plack::Test);
 require_mods(@mods);
 use_ok($_) for (qw(HTTP::Request::Common Plack::Test));
diff --git a/t/psgi_search.t b/t/psgi_search.t
index 27946391..d7c9f183 100644
--- a/t/psgi_search.t
+++ b/t/psgi_search.t
@@ -8,7 +8,7 @@ use IO::Uncompress::Gunzip qw(gunzip);
 use PublicInbox::Eml;
 use PublicInbox::Config;
 use PublicInbox::Inbox;
-my @mods = qw(DBD::SQLite Search::Xapian HTTP::Request::Common Plack::Test
+my @mods = qw(DBD::SQLite Xapian HTTP::Request::Common Plack::Test
 		URI::Escape Plack::Builder);
 require_mods(@mods);
 use_ok($_) for (qw(HTTP::Request::Common Plack::Test));
diff --git a/t/psgi_v2.t b/t/psgi_v2.t
index 0a77adfb..5ccaab19 100644
--- a/t/psgi_v2.t
+++ b/t/psgi_v2.t
@@ -9,7 +9,7 @@ require_git(2.6);
 use PublicInbox::Eml;
 use PublicInbox::Config;
 use PublicInbox::MID qw(mids);
-require_mods(qw(DBD::SQLite Search::Xapian HTTP::Request::Common Plack::Test
+require_mods(qw(DBD::SQLite Xapian HTTP::Request::Common Plack::Test
 		URI::Escape Plack::Builder HTTP::Date));
 use_ok($_) for (qw(HTTP::Request::Common Plack::Test));
 use_ok 'PublicInbox::WWW';
diff --git a/t/replace.t b/t/replace.t
index 0e121399..a61c3ca0 100644
--- a/t/replace.t
+++ b/t/replace.t
@@ -187,7 +187,7 @@ test_replace(2, 'basic', $opt = { %$opt, post => \&pad_msgs });
 test_replace(2, 'basic', $opt = { %$opt, rotate_bytes => 1 });
 
 SKIP: {
-	require_mods(qw(Search::Xapian), 8);
+	require_mods(qw(Xapian), 8);
 	for my $l (qw(medium)) {
 		test_replace(2, $l, {});
 		$opt = { pre => \&pad_msgs };
diff --git a/t/search-thr-index.t b/t/search-thr-index.t
index 62745dbc..aecd064f 100644
--- a/t/search-thr-index.t
+++ b/t/search-thr-index.t
@@ -7,7 +7,7 @@ use Test::More;
 use PublicInbox::TestCommon;
 use PublicInbox::MID qw(mids);
 use PublicInbox::Eml;
-require_mods(qw(DBD::SQLite Search::Xapian));
+require_mods(qw(DBD::SQLite Xapian));
 require PublicInbox::SearchIdx;
 require PublicInbox::Smsg;
 require PublicInbox::Inbox;
diff --git a/t/search.t b/t/search.t
index 8084c41b..636dc5cf 100644
--- a/t/search.t
+++ b/t/search.t
@@ -4,7 +4,7 @@
 use strict;
 use v5.10;
 use PublicInbox::TestCommon;
-require_mods(qw(DBD::SQLite Search::Xapian));
+require_mods(qw(DBD::SQLite Xapian));
 require PublicInbox::SearchIdx;
 require PublicInbox::Inbox;
 require PublicInbox::InboxWritable;
diff --git a/t/solver_git.t b/t/solver_git.t
index c210c1ee..f8cafa5e 100644
--- a/t/solver_git.t
+++ b/t/solver_git.t
@@ -7,7 +7,7 @@ use Cwd qw(abs_path);
 require_git v2.6;
 use PublicInbox::ContentHash qw(git_sha);
 use PublicInbox::Spawn qw(popen_rd);
-require_mods(qw(DBD::SQLite Search::Xapian URI::Escape));
+require_mods(qw(DBD::SQLite Xapian URI::Escape));
 require PublicInbox::SolverGit;
 my $rdr = { 2 => \(my $null) };
 my $git_dir = xqx([qw(git rev-parse --git-common-dir)], undef, $rdr);
diff --git a/t/v1-add-remove-add.t b/t/v1-add-remove-add.t
index ae045dfa..50ff8143 100644
--- a/t/v1-add-remove-add.t
+++ b/t/v1-add-remove-add.t
@@ -6,7 +6,7 @@ use Test::More;
 use PublicInbox::Import;
 use PublicInbox::TestCommon;
 use PublicInbox::Eml;
-require_mods(qw(DBD::SQLite Search::Xapian));
+require_mods(qw(DBD::SQLite Xapian));
 require PublicInbox::SearchIdx;
 my ($inboxdir, $for_destroy) = tmpdir();
 my $ibx = {
diff --git a/t/v1reindex.t b/t/v1reindex.t
index f593b323..2d12e3f5 100644
--- a/t/v1reindex.t
+++ b/t/v1reindex.t
@@ -8,7 +8,7 @@ use File::Path qw(remove_tree);
 use PublicInbox::TestCommon;
 use PublicInbox::Eml;
 require_git(2.6);
-require_mods(qw(DBD::SQLite Search::Xapian));
+require_mods(qw(DBD::SQLite Xapian));
 use_ok 'PublicInbox::SearchIdx';
 use_ok 'PublicInbox::Import';
 use_ok 'PublicInbox::OverIdx';
diff --git a/t/v2-add-remove-add.t b/t/v2-add-remove-add.t
index 6affc830..ddf8d248 100644
--- a/t/v2-add-remove-add.t
+++ b/t/v2-add-remove-add.t
@@ -6,7 +6,7 @@ use Test::More;
 use PublicInbox::Eml;
 use PublicInbox::TestCommon;
 require_git(2.6);
-require_mods(qw(DBD::SQLite Search::Xapian));
+require_mods(qw(DBD::SQLite Xapian));
 use_ok 'PublicInbox::V2Writable';
 my ($inboxdir, $for_destroy) = tmpdir();
 my $ibx = {
diff --git a/t/v2mda.t b/t/v2mda.t
index 8f2f335d..a49eeb6d 100644
--- a/t/v2mda.t
+++ b/t/v2mda.t
@@ -11,7 +11,7 @@ use PublicInbox::Eml;
 require_git(2.6);
 
 my $V = 2;
-require_mods(qw(DBD::SQLite Search::Xapian));
+require_mods(qw(DBD::SQLite Xapian));
 use_ok 'PublicInbox::V2Writable';
 my ($tmpdir, $for_destroy) = tmpdir();
 my $ibx = {
diff --git a/t/v2mirror.t b/t/v2mirror.t
index c1c66d45..88b67bc1 100644
--- a/t/v2mirror.t
+++ b/t/v2mirror.t
@@ -14,7 +14,7 @@ use IO::Uncompress::Gunzip qw(gunzip $GunzipError);
 
 # Integration tests for HTTP cloning + mirroring
 require_mods(qw(Plack::Util Plack::Builder
-		HTTP::Date HTTP::Status Search::Xapian DBD::SQLite));
+		HTTP::Date HTTP::Status Xapian DBD::SQLite));
 use_ok 'PublicInbox::V2Writable';
 use PublicInbox::InboxWritable;
 use PublicInbox::Eml;
diff --git a/t/v2reindex.t b/t/v2reindex.t
index cafe8648..406c0517 100644
--- a/t/v2reindex.t
+++ b/t/v2reindex.t
@@ -5,7 +5,7 @@ use PublicInbox::Eml;
 use PublicInbox::ContentHash qw(content_digest);
 use File::Path qw(remove_tree);
 require_git(2.6);
-require_mods(qw(DBD::SQLite Search::Xapian));
+require_mods(qw(DBD::SQLite Xapian));
 use_ok 'PublicInbox::V2Writable';
 use_ok 'PublicInbox::OverIdx';
 my ($inboxdir, $for_destroy) = tmpdir();
diff --git a/t/v2writable.t b/t/v2writable.t
index 0d102204..1b7e9e7d 100644
--- a/t/v2writable.t
+++ b/t/v2writable.t
@@ -8,7 +8,7 @@ use PublicInbox::ContentHash qw(content_digest content_hash);
 use PublicInbox::TestCommon;
 use Cwd qw(abs_path);
 require_git(2.6);
-require_mods(qw(DBD::SQLite Search::Xapian));
+require_mods(qw(DBD::SQLite Xapian));
 local $ENV{HOME} = abs_path('t');
 use_ok 'PublicInbox::V2Writable';
 umask 007;
diff --git a/t/watch_filter_rubylang.t b/t/watch_filter_rubylang.t
index 643dbb8a..a6153e46 100644
--- a/t/watch_filter_rubylang.t
+++ b/t/watch_filter_rubylang.t
@@ -6,7 +6,7 @@ use PublicInbox::TestCommon;
 use Test::More;
 use PublicInbox::Eml;
 use PublicInbox::Config;
-require_mods(qw(DBD::SQLite Search::Xapian));
+require_mods(qw(DBD::SQLite Xapian));
 use_ok 'PublicInbox::Watch';
 use_ok 'PublicInbox::Emergency';
 my ($tmpdir, $for_destroy) = tmpdir();
diff --git a/t/watch_maildir_v2.t b/t/watch_maildir_v2.t
index 7b46232b..38679836 100644
--- a/t/watch_maildir_v2.t
+++ b/t/watch_maildir_v2.t
@@ -8,7 +8,7 @@ use PublicInbox::Config;
 use PublicInbox::TestCommon;
 use PublicInbox::Import;
 require_git(2.6);
-require_mods(qw(Search::Xapian DBD::SQLite));
+require_mods(qw(Xapian DBD::SQLite));
 require PublicInbox::V2Writable;
 my ($tmpdir, $for_destroy) = tmpdir();
 my $inboxdir = "$tmpdir/v2";
diff --git a/t/watch_multiple_headers.t b/t/watch_multiple_headers.t
index 33ed0770..13dd3452 100644
--- a/t/watch_multiple_headers.t
+++ b/t/watch_multiple_headers.t
@@ -5,7 +5,7 @@ use Test::More;
 use PublicInbox::Config;
 use PublicInbox::TestCommon;
 require_git(2.6);
-require_mods(qw(Search::Xapian DBD::SQLite));
+require_mods(qw(Xapian DBD::SQLite));
 my ($tmpdir, $for_destroy) = tmpdir();
 my $inboxdir = "$tmpdir/v2";
 my $maildir = "$tmpdir/md";
diff --git a/t/xap_helper.t b/t/xap_helper.t
index 0a211329..fe5d2d14 100644
--- a/t/xap_helper.t
+++ b/t/xap_helper.t
@@ -3,7 +3,7 @@
 # License: AGPL-3.0+ <https://www.gnu.org/licenses/agpl-3.0.txt>
 use v5.12;
 use PublicInbox::TestCommon;
-require_mods(qw(DBD::SQLite Search::Xapian +SCM_RIGHTS)); # TODO: FIFO support?
+require_mods(qw(DBD::SQLite Xapian +SCM_RIGHTS)); # TODO: FIFO support?
 use PublicInbox::Spawn qw(spawn);
 use Socket qw(AF_UNIX SOCK_SEQPACKET SOCK_STREAM);
 require PublicInbox::AutoReap;
diff --git a/t/xcpdb-reshard.t b/t/xcpdb-reshard.t
index 8516b907..cde9f151 100644
--- a/t/xcpdb-reshard.t
+++ b/t/xcpdb-reshard.t
@@ -4,7 +4,7 @@
 use strict;
 use v5.10.1;
 use PublicInbox::TestCommon;
-require_mods(qw(DBD::SQLite Search::Xapian));
+require_mods(qw(DBD::SQLite Xapian));
 require_git('2.6');
 use PublicInbox::Eml;
 require PublicInbox::Search;
diff --git a/xt/create-many-inboxes.t b/xt/create-many-inboxes.t
index d22803e3..3d8932b7 100644
--- a/xt/create-many-inboxes.t
+++ b/xt/create-many-inboxes.t
@@ -19,7 +19,7 @@ mkpath($many_root);
 $many_root = abs_path($many_root);
 $many_root =~ m!\A\Q$cwd\E/! and BAIL_OUT "$many_root must not be in $cwd";
 require_git 2.6;
-require_mods(qw(DBD::SQLite Search::Xapian));
+require_mods(qw(DBD::SQLite Xapian));
 use_ok 'PublicInbox::V2Writable';
 my $nr_inbox = $ENV{NR_INBOX} // 10;
 my $nproc = $ENV{NPROC} || PublicInbox::IPC::detect_nproc() || 2;
diff --git a/xt/solver.t b/xt/solver.t
index 1f004bf5..06f5a493 100644
--- a/xt/solver.t
+++ b/xt/solver.t
@@ -5,7 +5,7 @@ use v5.12;
 use PublicInbox::TestCommon;
 use PublicInbox::Config; # this relies on PI_CONFIG // ~/.public-inbox/config
 my @psgi = qw(HTTP::Request::Common Plack::Test URI::Escape Plack::Builder);
-require_mods(qw(DBD::SQLite Search::Xapian), @psgi);
+require_mods(qw(DBD::SQLite Xapian), @psgi);
 use_ok($_) for @psgi;
 use_ok 'PublicInbox::WWW';
 my $cfg = PublicInbox::Config->new;

^ permalink raw reply related	[relevance 7%]

Results 1-1 of 1 | reverse | options above
-- pct% links below jump to the message on this page, permalinks otherwise --
2023-09-11  7:26  7% [PATCH] treewide: favor Xapian (SWIG binding) over Search::Xapian 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).