From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: X-Spam-Status: No, score=-4.0 required=3.0 tests=ALL_TRUSTED,BAYES_00 shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id 424031F4A5 for ; Thu, 26 Mar 2020 08:21:30 +0000 (UTC) From: Eric Wong To: meta@public-inbox.org Subject: [PATCH 2/3] wwwtext: show altid instructions in config Date: Thu, 26 Mar 2020 08:21:28 +0000 Message-Id: <20200326082129.21699-3-e@yhbt.net> In-Reply-To: <20200326082129.21699-1-e@yhbt.net> References: <20200326082129.21699-1-e@yhbt.net> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: Exposing altid dumps will help and ensure total reproducibility of existing instances. AFAIK, sqlite3(1) can't execute arbitrary code, so it's not quite as fashionable as the "curl | bash" stuff the cool people are doing, these days :P --- lib/PublicInbox/WwwText.pm | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/lib/PublicInbox/WwwText.pm b/lib/PublicInbox/WwwText.pm index cbe82b73..2008ba09 100644 --- a/lib/PublicInbox/WwwText.pm +++ b/lib/PublicInbox/WwwText.pm @@ -138,15 +138,16 @@ sub inbox_config ($$$) { my $ibx = $ctx->{-inbox}; push @$hdr, 'Content-Disposition', 'inline; filename=inbox.config'; my $name = dq_escape($ibx->{name}); + my $inboxdir = '/path/to/top-level-inbox'; $$txt .= <{$k}) or next; $$txt .= "\t$k = $_\n" for @$v; } + if (my $altid = $ibx->{altid}) { + my $base_url = $ibx->base_url($ctx->{env}); + my $altid_map = $ibx->altid_map; + $$txt .= <{$k}) or next;