user/dev discussion of public-inbox itself
 help / color / mirror / code / Atom feed
d364a856d2415a59a47cb62ab5e8efe523a2fb8f blob 2417 bytes (raw)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
 
# Copyright (C) 2021 all contributors <meta@public-inbox.org>
# License: AGPL-3.0+ <https://www.gnu.org/licenses/agpl-3.0.txt>

# Undocumented hidden command somebody might discover if they're
# frustrated and need to report a bug.  There's no manpage and
# it won't show up in tab completions or help.
package PublicInbox::LeiSucks;
use strict;
use v5.10.1;
use Digest::SHA ();
use Config;
use POSIX ();
use PublicInbox::Config;
use PublicInbox::Search;

sub lei_sucks {
	my ($lei, @argv) = @_;
	$lei->start_pager if -t $lei->{1};
	my ($os, undef, $rel, undef, $mac)= POSIX::uname();
	if ($mac eq 'x86_64' && $Config{ptrsize} == 4) {
		$mac = $Config{cppsymbols} =~ /\b__ILP32__=1\b/ ? 'x32' : 'i386'
	}
	eval { require PublicInbox };
	my $pi_ver = eval('$PublicInbox::VERSION') // '(???)';
	my $daemon = $lei->{oneshot} ? 'oneshot' : 'daemon';
	my @out = ("lei $pi_ver mode=$daemon\n",
		"perl $Config{version} / $os $rel / $mac ".
		"ptrsize=$Config{ptrsize}\n");
	chomp(my $gv = `git --version` || "git missing");
	$gv =~ s/ version / /;
	my $json = ref(PublicInbox::Config->json);
	$json .= ' ' . eval('$'.$json.'::VERSION') if $json;
	$json ||= '(no JSON)';
	push @out, "$gv / $json\n";
	if (eval { require PublicInbox::Over }) {
		push @out, 'SQLite '.
			(eval('$DBD::SQLite::sqlite_version') // '(undef)') .
			', DBI '.(eval('$DBI::VERSION') // '(undef)') .
			', DBD::SQLite '.
			(eval('$DBD::SQLite::VERSION') // '(undef)')."\n";
	} else {
		push @out, "Unable to load DBI / DBD::SQLite: $@\n";
	}
	if (PublicInbox::Search::load_xapian()) {
		push @out, 'Xapian '.
			join('.', map {
				$PublicInbox::Search::Xap->can($_)->();
			} qw(major_version minor_version revision)) .
			", bindings: $PublicInbox::Search::Xap";
		my $xs_ver = eval '$'."$PublicInbox::Search::Xap".'::VERSION';
		push @out, $xs_ver ? " $xs_ver\n" : " SWIG\n";
	} else {
		push @out, "Xapian not available: $@\n";
	}
	my $dig = Digest::SHA->new(1);
	push @out, "public-inbox blob OIDs of loaded features:\n";
	for my $m (grep(m{^PublicInbox/}, sort keys %INC)) {
		my $f = $INC{$m};
		$dig->add('blob '.(-s $f)."\0");
		$dig->addfile($f);
		push @out, '  '.$dig->hexdigest.' '.$m."\n";
	}
	push @out, <<'EOM';
Let us know how it sucks!  Please include the above and any other
relevant information when sending plain-text mail to us at:
meta@public-inbox.org -- archives: https://public-inbox.org/meta/
EOM
	$lei->out(@out);
}

1;
debug log:

solving d364a856 ...
found d364a856 in public-inbox.git

user/dev discussion of public-inbox itself

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://public-inbox.org/meta
	git clone --mirror http://czquwvybam4bgbro.onion/meta
	git clone --mirror http://hjrcffqmbrq6wope.onion/meta
	git clone --mirror http://ou63pmih66umazou.onion/meta

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V1 meta meta/ https://public-inbox.org/meta \
		meta@public-inbox.org
	public-inbox-index meta

Example config snippet for mirrors.
Newsgroups are available over NNTP:
	nntp://news.public-inbox.org/inbox.comp.mail.public-inbox.meta
	nntp://7fh6tueqddpjyxjmgtdiueylzoqt6pt7hec3pukyptlmohoowvhde4yd.onion/inbox.comp.mail.public-inbox.meta
	nntp://ie5yzdi7fg72h7s4sdcztq5evakq23rdt33mfyfcddc5u3ndnw24ogqd.onion/inbox.comp.mail.public-inbox.meta
	nntp://4uok3hntl7oi7b4uf4rtfwefqeexfzil2w6kgk2jn5z2f764irre7byd.onion/inbox.comp.mail.public-inbox.meta
	nntp://news.gmane.io/gmane.mail.public-inbox.general
 note: .onion URLs require Tor: https://www.torproject.org/

code repositories for project(s) associated with this inbox:

	https://80x24.org/public-inbox.git

AGPL code for this site: git clone https://public-inbox.org/public-inbox.git