about summary refs log tree commit homepage
path: root/Makefile.PL
DateCommit message (Collapse)
2023-12-09makefile: add `check-build' target
A quick build check can detect bugs more quickly normal runtime tests.
2023-11-29xap_helper: implement mset endpoint for WWW, IMAP, etc...
The C++ version will allow us to take full advantage of Xapian's APIs for better queries, and the Perl bindings version can still be advantageous in the future since we'll be able to support timeouts effectively.
2023-10-04makefile: symlink-install: do not depend on realpath
For the Makefile, we can use $(PWD) make macro from make(1posix) as POSIX requires all environment variables be accessible as macros, and $PWD is a standard sh(1) environment variable. lei.sh must quiet the stderr of realpath before falling back to readlink(1) which is available on NetBSD.
2023-09-20makefile: avoid non-POSIX which(1)
which(1) isn't in POSIX so it's perhaps less likely to be available (although I don't think I've noticed a system without it in decades). So replace it with the POSIX `command -v', even though everyone seems to use which... Add a note about `lexgrog', too, since I'm not sure if it's packaged for various *BSDs.
2023-09-20makefile: avoid needless use of double-colon rules
This non-portable construct isn't needed for our own rules. I'm understanding them correctly, they have different semantics between *BSDs and GNU make.
2023-09-20rename t/run.perl to xt/check-run
This allows us to get rid of some duplication in our Makefile
2023-09-20drop GNU nproc(1) support in favor of getconf(1)
`getconf NPROCESSORS_ONLN' will succeed on GNU/Linux systems anyways; and the non-underscore-prefixed invocation works fine on all BSD flavors tested. Thus the `nproc' and `gnproc' attempts will never be reached. The only downside is we lose the ability to account for CPU affinity, but that's probably not an issue since CPU affinity (AFAIK) isn't a commonly-used feature.
2023-09-16Makefile: add `check-debris' target
This non-parallelized target is useful for noticing core dumps and preventing them from being clobbered as we run the test suite. It will also notice leftover temporary files and directories. This make target was used on OpenBSD 7.3 to develop at least two recent fixes: e281363ba937 (lei: ensure we run DESTROY|END at daemon exit w/ kqueue) 759885e60e59 (lei: ensure --stdin sets %ENV and $current_lei) I considered using a per-test TMPDIR for this to enable parallelization, but on-filesystem UNIX sockets won't work with excessively long path names.
2023-09-14updates around RPM packages on CentOS 7.x
Add explicit dependencies on packages that are possible to remove without removing the `perl' RPM from CentOS 7.x. However, simplify deps.perl to avoid naming essential Perl modules (e.g. `perl-Exporter') that cannot be removed without removing the `perl' RPM entirely. We can also drop `Socket6' from deps.perl since it's pulled in as-needed by other packages and we try to avoid it in favor of the (now-standard) IO::Socket::IP.
2023-09-09Makefile.PL: check `getconf NPROCESSORS_ONLN', too
NetBSD and OpenBSD getconf(1) don't accept a leading underscore, while glibc getconf(1) only accepts the leading underscore (`_NPROCESSORS_ONLN'). FreeBSD getconf(1) accepts both variants.
2023-08-30Makefile.PL: depend on autodie, at least for tests
While using autodie everywhere is not appropriate[*], many of our tests and FS access code can be easier-to-write and more readable using autodie as we've started doing in XapHelperCxx.pm and xap_helper.t [*] - EAGAIN on non-blocking I/O shouldn't die, nor should certain cases of opening maybe-missing files for reading
2023-08-30Makefile.PL: fix syntax for ASan and valgrind targets
Mixing various quoting and escaping rules between shell, make, and Perl got confusing in Makefile.PL :x This hopefully sorts out my confusion. We'll also fix and use TEST_XH_CXX_ONLY=1 to avoid needlessly running the tests on the XS||SWIG implementation when we're checking for memory errors. Fixes: 2312ca26023fcbe3 (makefile: add targets for ASan and valgrind)
2023-08-26makefile: add targets for ASan and valgrind
I would never consider working on C++ code without at least one one of these tools present.
2023-07-27Makefile.pl: *.cols: account for non-UTF-8-aware awk
When checking line length limits, the `length()' function of mawk doesn't count non-ASCII characters properly in UTF-8 locales. Force the man(1) output to use C locale and use normal `-' instead of multi-byte dash characters.
2023-07-11Makefile.PL: depend on IO::Poll in case distros split it out
IO::Poll is part of the Perl standard library, but there's always a chance distros will make it part of another package since it's not portable to non-POSIX-like OSes.
2023-02-16Makefile.PL: drop update-copyrights rule
I'm no longer updating them since it's noisy and acceptable to not have them: https://www.linuxfoundation.org/blog/copyright-notices-in-open-source-software-projects/ I'm tired of being reminded what year it is :<
2022-08-30Makefile.PL: update version for upcoming 2.x
"1.10" seems awkward and may confuse ASCII-betical sorting, so I think "2.0" is more appropriate.
2022-08-30Makefile.PL: add lei-reindex manpage
I forgot to add this when I added the new command :x
2022-08-21public-inbox 1.9.0 v1.9.0
2022-04-26Makefile.PL: various updates for new versions
We'll still stick to v5.10.1, mainly, but use v5.12 in a few places...
2022-04-23public-inbox 1.8.0 v1.8.0
2021-12-08Makefile.PL: fix useless use of push
2021-11-09build: do not repeatedly build some docs
Text versions of manpages do not need to be generated for normal installations, they're only used for generating HTML and our amazing, award-winning homepage. We'll also rely on touch(1) instead of Perl utime to benefit users w/o git-set-file-times in txt2pre. Perl numeric values cannot represent nanosecond resolution accurately even with Time::HiRes; which causes nanosecond-aware make(1) implementations to repeatedly rebuild.
2021-11-04public-inbox 1.7.0 v1.7.0
2021-11-04doc: switch to man(1) for pod => (text|html)
pod2text(1) will wrap long .onion URLs and cause resulting HTML to be linkified improperly.
2021-11-04doc: add more 3rd-party refs, use Debian manpages for xapian
curl, torsocks, and gitglossary manpages are all newly referenced, so make sure they're linkified properly in HTML. We'll be using Debian's manpages as an ad-free, Tor-accessible host for manpages as a fallback since hosting manpages for all 3rd-party projects we reference doesn't scale.
2021-10-31doc: add lei-mail-sync-overview manpage
Mostly illustrating how clunky the process is :p We'll also tweak some things in existing man pages around mail synchronization.
2021-10-19Makefile.PL: drop generated lib/PublicInbox.pm in blib/
Running "make test" on this project doesn't pass unless you've got an existing PublicInbox.pm in your @INC, presumably nobody's set this up on a fresh machine in a while. This Makefile.PL trickery seems to do it, I've validated this with this ad-hoc test of committing blib/ and Makefile to the repository: git clean -dxf; perl Makefile.PL && make -j8 all && git add -f blib Makefile.PL Makefile && git commit -m"now" Running that in interactive rebase before/after shows that only the PublicInbox.pm file was added to blib/lib/. We use $(INST_LIB) instead of a hardcoded 'blib/lib' now, but it's what ExtUtils::MakeMaker recommends, so it's probably for the better. As far as I can tell this broke with 1fae720d (build: generate PublicInbox.pm with $VERSION, 2021-04-01), but I have not tested that. See also 1fae720d (build: generate PublicInbox.pm with $VERSION, 2021-04-01) which made the PublicInbox.pm a generated file.
2021-10-16doc: lei: add manpages for remaining commands
At this point all of the current lei commands, aside from -help and -sucks, should be covered.
2021-10-16doc: lei: restore alphabetical order to some listings
Most the lei-related entries in txt2pre and Makefile.PL are in alphabetical order. Reorder the few that aren't. While at it, reflow the Makefile.PL entries in preparation for the entries that will be added in the next commit.
2021-10-02doc: lei-daemon: new manpage
In case users see "lei-daemon" in ps(1) or syslog and wonder. Helped-by: Kyle Meyer <kyle@kyleam.com>
2021-09-25doc: lei: manpages for export-kw and refresh-mail-sync
Something is better than nothing.
2021-09-17doc: add lei-security(7) manpage
It seems like a good idea to have a manpage where somebody can quickly look up and address their concerns as to what to put on encrypted device/filesystem. And I probably would've designed lei around make(1) for parallelization if I didn't have to keep credentials off the FS :P
2021-09-10INSTALL: depend on URI rather than URI::Escape
As far as I can tell, URI::Escape has always been a part of the `URI' package (aka "distribution" on CPAN) and not distributed separately (unlike URI::Escape::XS). So avoid confusing users with `URI::Escape' and just document `URI' instead. Along the same lines, we depend on the `Plack' package rather than Plack::Util or Plack::Builder, after all.
2021-09-10doc: lei-index manpage
It's a pretty incomplete command, so it's important to document its incompleteness.
2021-09-09lei-rm: add man page, support LeiInput args
-F/--in-format and --lock=TYPE(S) are easily supported by all classes using LeiInput.
2021-05-17doc lei: add manpages for new commands
[ew: MANIFEST: s/lei-cat/lei-lcat/]
2021-05-17doc lei: add manpage for convert
Link: https://public-inbox.org/meta/20210429015738.GA30172@dcvr/
2021-05-17doc lei: resort lei-tag entries
The command was renamed in 54da988cfb049ea2 (lei tag: rename from "lei mark", 2021-03-30). Relocate its entries in txt2pre and Makefile.PL to restore alphabetical sorting.
2021-05-04doc: ignore onion URLs for 80-column check
This failure was also passing under FreeBSD make + /bin/sh; so we also avoid the '&&' chain is avoided and use '>$@' as a separate line in the Makefile.
2021-04-21doc: add lei_design_notes.txt and lei-store-format(5)
lei itself is a somewhat weird design, but lei/store is a fairly normal hybrid of extindex with v2-style storage.
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-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-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-02-22tests: clean up t/home* consistently
And update t/home2/README while we're at it. Followup-to: 4ea3975dbed0a533 ("tests: setup_public_inboxes: use IMAP-friendly newsgroups")
2021-02-11doc: add lei-import(1)
2021-02-08INSTALL: depend on Text::ParseWords
It's been distributed with Perl since 1994, and we use it for both -imapd and lei. It's split out as a separate package in CentOS 7.x, so we'll depend on it to avoid surprising users of RPM-based distros.