about summary refs log tree commit homepage
path: root/MANIFEST
DateCommit message (Collapse)
2021-04-13lei: add "lei up" to complement "lei q --save"
The command isn't finalized, yet, but it's intended to update an existing saved search.
2021-04-13lei q: start wiring up saved search
This will have a over.sqlite3 for content-based deduplication. It may exhibit ibxish methods, so serving a read-only (or even R/W) IMAP or instance or displaying HTML isn't outside the realm of possibility.
2021-04-11www: do not obfuscate addresses in URLs
As they are likely Message-IDs. If an email address ends up in a URL, then it's likely public, so there's even less reason to obfuscate that particular address. [km: add xt/perf-obfuscate.t] [ew: modernize perf test (5.10.1), use diag instead of print] This version of the patch avoids the massive slowdown noted by Kyle in <https://public-inbox.org/meta/87wnt9or6t.fsf@kyleam.com/>. Performance remains roughly the same, if not slightly faster (which may be due to me testing this on a busy server). Results from xt/perf-obfuscate.t against 6078 messages on a local mirror of <https://public-inbox.org/meta/>: before: 6.67 usr + 0.04 sys = 6.71 CPU after: 6.64 usr + 0.04 sys = 6.68 CPU Reported-by: Kyle Meyer <kyle@kyleam.com> Helped-by: Kyle Meyer <kyle@kyleam.com> Link: https://public-inbox.org/meta/87a6q8p5qa.fsf@kyleam.com/
2021-04-03lei/store: (more) synchronous non-fatal error output
Since every command that writes to lei/store calls ->done to commit its output, we can rely on that to return a pathname for a readable file with errors in it. Errors can still get crossed up if multiple lei commands are writing to the store at once, but reduces the delay in seeing them and ensures it won't get seen when somebody is attempting to use shell completion.
2021-04-01lei sucks: sub-command to aid bug reporting
It's a bit of an Easter egg, though it's not possible to hide those in Free Software... Anyways, it doesn't cost us an entry in %CMD of LEI.pm and anybody frustrated enough with lei just might type "lei sucks" on the command-line :>
2021-04-01build: generate PublicInbox.pm with $VERSION
Thanks to git-describe, we can generate and update this file to aid users in bug reporting.
2021-03-31doc: add lei-mail-formats(5) manpage
While plenty of online documentation exists, it's good to have a locally-available summary for users to look at offline. Fix a URL in Watch.pm while we're at it, too.
2021-03-30lei tag: rename from "lei mark"
I've decided "tag" is a better verb since it seems more widely-used term for associating metadata with data. Not only is it analogous to the "notmuch tag" command, but also makes sense when compared to tooling for manipulating metadata for non-mail data (e.g. audio metadata tags). There's even a Wikipedia entry for it: https://en.wikipedia.org/wiki/Tag_(metadata) whereas "mark" is used in the description, but has no entry of its own with regards to metadata.
2021-03-29doc lei: add manpages for new commands
2021-03-28lei blob: add remote external support
Introduce a new LeiRemote wrapper to provide an internal API which SolverGit expects. This lets us use HTTP/HTTPS endpoints to reconstruct blobs off patches as we would with local endpoints, just more slowly...
2021-03-28lei init: split out into separate file
This is a rarely-needed command, so keep it separate file so it's easier-to-find and maybe saves a bit of RAM.
2021-03-27lei blob: aka "git-show-harder" for blobs
This implements blob reconstruction via SolverGit, emulating the functionality of /$INBOX/$OID/s/ endpoint in PublicInbox::WWW. It uses the current working tree as a coderepo, and accepts any number of --git-dir=$PATH args. Remote externals are not yet supported. v2: use absolute path for git repos
2021-03-26lei: add some labels support
"lei q" now displays labels in JSON output, "lei mark" can add or remove labels for any messages. "lei ls-label" is supported, too. Unfortunately, "lei q" won't hande "kw:" or "L:" for external messages, they must be imported, first.
2021-03-24lei mark: command for (un)setting keywords and labels
Only tested for keywords and labels with file inputs, so far; but it seems to do what it needs to do. There's a bit more redundant code than I'd like, and more opportunities for code sharing in the future "lei import" will be expanded to support +kw:$KEYWORD and +L:$LABEL in the future.
2021-03-23lei: share input code between convert and import
These commands accept mail the same way, and this forces us to maintain consistent input format support between commands. We'll be using this for "lei mark", too.
2021-03-21lei: All Local Externals: bare git dir for alternates
This will be used for keyword (and label) storage for externals. We'll be using this to ensure we don't redundantly auto-import messages into lei/store if they're already in a local external (they can still be imported explicitly via "lei import").
2021-03-17extindex: add some validation and config knobs for WWW
We'll try to share a bit more configuration with extindex entries for WWW PSGI usage.
2021-03-15t/html_index: remove now-worthless test
This was for quote-folding behavior we had long ago, but it ended up just being yet another import test.
2021-03-15test_common: add create_inbox helper sub
This saves over 100ms in t/lei-q-remote-import.t so far when TMPDIR is on an SSD. If we can memoize inbox creation to save a few dozen milliseconds every test, this could add up to noticeable savings across our entire test suite.
2021-03-12msg_part_text: discover text in application/octet-stream
Some poorly-configured MUAs will send application/octet-stream even for text-only attachments. We can't make expect all MUAs are configured with proper MIME types, and there is plenty of historical mail that falls into this unfortunate criteria. v2: simplify the check and ensures returned text is Perl "utf8"
2021-03-10doc: start glossary for overlapping concepts
This is intended to keep track of concepts with different terms between NNTP, IMAP, config file, lei storage, and upcoming JMAP support.
2021-03-04lei q: import flags when clobbering/augmenting Maildirs
This will eventually be supported for other mail stores, but Maildir is the easiest to test and support, here. This lets us avoid a situation where flag changes get lost between search results.
2021-03-01lei p2q: patch-to-query generator for "lei q --stdin"
Instead of teaching the to-be-implemented "lei show" to search threads/messages based commits, this orthogonal sub-command is designed to generate queries for use with "lei q --stdin". URI-escaped query parameters may be generated with --uri for HTTP(S) public-inbox instances, but otherwise the output is designed for "lei q --stdin". To find threads for a given git commit from a git worktree: lei p2q $COMMIT_OID | lei q --stdin -t ... It can also read via --stdin|- curl $INBOX_URL/$MSGID/raw | lei p2q - | lei q --stdin -t Or from the filesystem: lei p2q $(git format-patch -1) | lei q --stdin -t This defaults to only generating "dfpost:"-prefixed terms since I've found those most useful for finding messages relating to a commit. This is subject to change. --want=s@ is a comma-separated or multi-value list of prefixes that defaults to "dfpost7". Not all are implemented, yet, but s, dfn, dfpre, and dfpost all seem to mostly work. Phrase handling may need to be tweaked to work with Xapian. OR, NEAR, ADJ, AND, NOT may be used with --want (e.g. --want=dfpost,OR,dfn) Prefixing the field prefix with '+' or '-' (e.g. --want=+dfpost) generates "+dfpost:$EXTRACTED_OID" for Xapian. For non-boolean search prefixes, wildcard (*) may also be supplied: (--want=dfn*) For boolean search prefixes, suffixing the field prefix with a digit (e.g. --want=dfpost7) provides a minimum length, allowing truncated variations to be searched. This is helpful for finding older messages as git chooses longer dfpost|dfpre abbreviations as repos get larger. Automatic date range generation is not implemented, yet.
2021-02-26lei q: support mbox locking by default
While this diverges from from mairix(1) behavior, it's the safer option. We'll follow Debian policy by supporting fcntl and dotlocks by default (in that order). Users who do not want locking can use "--lock=none" This will be used in a read-only capacity for watching mailboxes for keyword updates via inotify or EVFILT_VNODE.
2021-02-26lei q: -tt marks direct hits as "flagged"
This can be used to quickly distinguish messages which were direct hits when doing thread expansion vs messages that were merely part of the same thread. This is NOT mairix-derived behavior, but I occasionally found it useful when looking at results in an MUA to know whether a message was a direct hit or not. This makes "-t" consistent with non-"-t" cases as far as keyword reading goes.
2021-02-25lei q: auto-memoize remote messages into lei/store
This lets users avoid network traffic on subsequent searches at the expense of local disk space. --no-import-remote may be specified to reverse this trade-off for users with little storage.
2021-02-24lei <import|convert>: support NNTP sources
We can read NNTP in -watch and Net::NNTP is shipped with Perl5, so lei import and convert have no excuse not to support NNTP as a client. Authentication is not tested, yet; but should be close to what IMAP is like...
2021-02-24add PublicInbox::URInntps package
We prefer the IANA-registered form of URIs to avoid confusing users, but the URI package has yet to support it. cf. https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=983419
2021-02-19net_writer: start implementing IMAP write support
Requiring TEST_IMAP_WRITE_URL to be set to a writable IMAP server URL isn't ideal, but it works for now until we have time to setup a mock dovecot/cyrus/etc... instance for testing.
2021-02-18lei: check for IMAP auth errors
We need to ensure authentication failures and error codes get propagated to the parent process(es) properly. v2: update MANIFEST v3: LeiAuth.pm ->_lei_cfg bit moved to a previous commit
2021-02-18lei import: add IMAP and (maildir|mbox*):$PATHNAME support
This makes "lei import" more similar to "lei convert" and allows importing from disparate sources simultaneously. We'll also fix some ->child_error usage errors and make the style of the code more similar to the "lei convert" code. v2: fix missing requires
2021-02-18lei convert: mail format conversion sub-command
This will make testing IMAP support for other commands easier, as it doesn't write to lei/store at all. Like the pager and MUA, "git credential" is always spawned by script/lei (and not lei-daemon) so it has a controlling terminal for password prompts. v2: fix missing requires, correct test ordering v3: ensure config exists for IMAP auth
2021-02-18tests: setup_public_inboxes: use IMAP-friendly newsgroups
-imapd won't support newsgroups ending with /\.[0-9]+\z/ since it reserves those for partitioning inboxes into 50K slices. So bump the home[0-9]+ version and switch to IMAP-friendly newsgroup names.
2021-02-11doc: add lei-import(1)
2021-02-10net_reader: new package split from -watch
We'll be using some of this for IMAP and NNTP support in lei, too. More will need to be done to improve code sharing and reusability, soon, but this is a start.
2021-02-10use MdirReader in -watch and InboxWritable
MdirReader now handles files in "$MAILDIR/new" properly and is stricter about what it accepts. eml_from_path is also made robust against FIFOs while eliminating TOCTOU races with between stat(2) and open(2) calls.
2021-02-10lei: split out MdirReader package, lazy-require earlier
We'll do more requires in the top-level lei-daemon process to save work in workers. We can also work towards aborting on user errors in lei-daemon rather than worker processes. "lei import -f mbox*" is finally tested inside t/lei_to_mail.t
2021-02-08lei import: support Maildirs
It seems to be working trivially, though I'm probably going to split out Maildir reading into a separate package rather than using LeiToMail.
2021-02-07lei help: split out into separate file
We'll reword and improve formatting with non-breaking spaces ("\xa0") which is only replaced with SP after wrapping. Some terminology is shortened (e.g. "URL_OR_PATHNAME" => "LOCATION") to improve formatting. This also enables completion for -h/--help and lets us prioritize favored switch names while attempting to satisfy users relying on muscle memory from other tools.
2021-02-07lei: add-external --mirror support
This can be useful for users who want to clone and mirror an existing public-inbox. This doesn't have update support, yet, so users will need to run "git fetch && public-inbox-index" for now.
2021-02-07tests: split out lei-daemon.t from lei.t
This makes it easier for hackers to find daemon-specific tests and forces us to always test both daemon and oneshot mode.
2021-02-07t/tests: split out setup_public_inboxes sub
We'll probably use this in many more existing places and likely change non-lei tests to use it.
2021-02-07t/lei-externals: split out into separate test
This is still overloaded with "lei q" stuff, but that's somewhat inevitable.
2021-02-07tests: add test_lei wrapper, split out t/lei-import.t
This will make it easier to maintain and test lei going forward, we need to be testing against existing read-only daemons. We'll also save ourselves some boilerplate by exporting all the Test::More methods directly in TestCommon We'll start using this by splitting out the latest "lei import" tests into its own file.
2021-02-05lei import: initial implementation
Only tested with .eml files so far, but Maildir + IMAP will be supported.
2021-02-04lei q: support reading queries from stdin
This will be useful on shared machines when a user doesn't want search queries visible to other users looking at the ps(1) output or similar.
2021-02-03lei: switch to use SEQPACKET socketpair instead of pipe
This will allow us to use larger messages and do progress reporting to accumulate in the main daemon.
2021-02-01sharedkv: use lock_for_scope_fast
This allows us to avoid repeated open() and close() syscalls and speeds up the new xt/stress-sharedkv.t maintainer test by roughly 7%.
2021-02-01ipc: switch wq to use the event loop
This will let us to maximize the capability of our asynchronous git API. This lets us avoid relying on EOF to notify lei2mail workers; thus giving us the option of running fewer lei_xsearch worker processes in parallel than local sources. I tried using a synchronous git API; and even with libgit2 in the same process to avoid the IPC cost failed to match the throughput afforded by this change. This is because libgit2 is built (at least on Debian) with the SHA-1 collision code enabled and ubc_check stuff was dominating my profiles.
2021-02-01doc: add lei-overview(7)
[ew: s/mboxrd/mboxcl2/ since that's what mutt uses]