From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: X-Spam-Status: No, score=-3.5 required=3.0 tests=AWL,BAYES_00, RCVD_IN_DNSWL_MED,SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE shortcircuit=no autolearn=ham autolearn_force=no version=3.4.6 Received: from smtp.gentoo.org (dev.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id 74A321F406 for ; Sun, 19 Nov 2023 23:13:15 +0000 (UTC) Received: from grubbs.orbis-terrarum.net (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id A7A9E335CEE for ; Sun, 19 Nov 2023 23:13:12 +0000 (UTC) Received: from grubbs.orbis-terrarum.net (localhost [127.0.0.1]) by grubbs.orbis-terrarum.net (Postfix) with ESMTP id 2EEBD26019C for ; Sun, 19 Nov 2023 23:13:12 +0000 (UTC) Received: (qmail 20002 invoked by uid 10000); 19 Nov 2023 23:13:12 -0000 Date: Sun, 19 Nov 2023 23:13:12 +0000 From: "Robin H. Johnson" To: meta@public-inbox.org Subject: publicinbox watch path globbing Message-ID: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="U9F0YGI+SNUWAwCU" Content-Disposition: inline List-Id: --U9F0YGI+SNUWAwCU Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi! Writing to see about work in converting Gentoo's (now-broken) other archives web interface over into using public-inbox instead. This is the first of a few questions/bumps along the way. For historical reasons on the scaling side, the archive maildirs are stored by date: watch =3D maildir:$REDACTED/$LISTNAME/.200001/ watch =3D maildir:$REDACTED/$LISTNAME/.200102/ watch =3D maildir:$REDACTED/$LISTNAME/.YYYYMM/ watch =3D maildir:$REDACTED/$LISTNAME/.202311/ etc. (over time, directories are moved to stable read-only storage) If a given list is low traffic does NOT get traffic in a given month, the directory does not exist (it's created when the first mail arrives during a calendar month). Multiply this by ~120 lists, and it gets on the large side for a config file: 7500+ lines just for the "watch" entries. While I could generate the config file, I'm wondering about better solution, to allow globbing the path. I tried to locate a single place in the codebase where this would be applied, but it's not clear enough to me if there's a single place that it can easily modified. If there's a consistent place, I think the cleanest syntax that doesn't break existing consumers would be something like this: [publicinbox "$LISTNAME"] watch =3D maildirglob:$REDACTED/$LISTNAME/.19????/ watch =3D maildirglob:$REDACTED/$LISTNAME/.20????/ --=20 Robin Hugh Johnson Gentoo Linux: Dev, Infra Lead, Foundation President & Treasurer E-Mail : robbat2@gentoo.org GnuPG FP : 11ACBA4F 4778E3F6 E4EDF38E B27B944E 34884E85 GnuPG FP : 7D0B3CEB E9B85B1F 825BCECF EE05E6F6 A48F6136 --U9F0YGI+SNUWAwCU Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 Comment: Robbat2 @ Orbis-Terrarum Networks - The text below is a digital signature. If it doesn't make any sense to you, ignore it. iQKTBAABCgB9FiEEveu2pS8Vb98xaNkRGTlfI8WIJsQFAmValoZfFIAAAAAALgAo aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldEJE RUJCNkE1MkYxNTZGREYzMTY4RDkxMTE5Mzk1RjIzQzU4ODI2QzQACgkQGTlfI8WI JsRmXw/9HW7adWwzpzt5FnOWfuRuIz9jBL0s84T4g1YcgGO1typnEjuLgLaG0Lxs 1gGTIx1XANwFpT3xVx9o0ADGyOQRWAKRjgfwZFBtWk8/2wdGK4PD6HN1sIkR47qF 9yestW+NO/tELEvXW7XOt6dicmd/iG5sCxSWMIwqONxL5TGpSi1EECr1PxRcCwQw BQQUXyzdLV8ZuXGmjo/qdhWxzw3B+yyIoXUNVl0xbjybq0caHn+N/akBYiQuMgYj pZ+gfZZEJdQASI7fxSHBmmUy8KKtQQ27Bxbnd3yGjSAZxij5okudFl4Jb7O8AkWs yU4XwDFvbo5vrNEPAReoMgrnUKnj44C7yvMbwSjbhTPDJTmDIieSq1PoGgw35SEm uhq41nNMVt8OvFNohGP8lFrcz4IyfJxSY1vmkwgtbz7jdVC/84PAXy+5XTkm7NSX ydERUwH70pYO0lH5oX/armrD5gvvXG6EWQ95GxMw1404Sbtpl2V9V9c4Jd4AiCUd vYdse+BsXZ8RNj/7afzJMKcB1yZgImRWIx8Pfec1wVAExMVMvjmDLwwUPe9JOglp 89SuqjSlPLV3N1/L/0YcrlHVDbjsMKRZCvyzPbtZZ3m4gHUvxcWb2GR3Uc0fgEmH +qxNt/X0WyrElpu5sK4rNcZq686ERoCYWyUX+X0FeEYChfP21i4= =FyFR -----END PGP SIGNATURE----- --U9F0YGI+SNUWAwCU--