INSTALL | 24 ++++++++++++++---------- lib/PublicInbox/WatchMaildir.pm | 2 ++ t/watch_maildir.t | 5 +++++ diff --git a/INSTALL b/INSTALL index e7d4b752224b1d7d206a0ca51e859553b182a63c..7f12fbec97f16fc5d2343bc92555574ad8cc52e2 100644 --- a/INSTALL +++ b/INSTALL @@ -19,8 +19,8 @@ make make test make install # root permissions may be needed -Requirements (server MDA) -------------------------- +Requirements +------------ * git * SpamAssassin (spamc/spamd) @@ -36,19 +36,23 @@ - Plack[1] libplack-perl - Mail::Thread (2.5+)[1] libmail-thread-perl - URI::Escape[1] liburi-perl - - Search::Xapian[3] libsearch-xapian-perl - - IO::Compress::Gzip[3] libio-compress-perl + - Search::Xapian[2][3] libsearch-xapian-perl + - IO::Compress::Gzip[3] perl-modules (or libio-compress-perl) - DBI[3] libdbi-perl - - DBD::SQLite[3] libdbd-sqlite3-perl + - DBD::SQLite[2][3] libdbd-sqlite3-perl - Danga::Socket[4] libdanga-socket-perl - - Net::Server[4] libnet-server-perl + - Net::Server[5] libnet-server-perl + - Filesys::Notify::Simple[6] libfilesys-notify-simple-perl -[1] - Only required for serving/generating Atom and HTML pages. -[3] - Optional for HTML web interface and HTTP/NNTP servers -[4] - Optional for HTTP and NNTP servers +[1] - Optional, needed for serving/generating Atom and HTML pages +[2] - Optional, only required for NNTP server +[3] - Optional, needed for gzipped mbox support over HTTP +[4] - Optional, needed for bundled HTTP and NNTP servers +[5] - Optional, needed for standalone daemonization of HTTP+NNTP servers +[6] - Optional, needed for public-inbox-watch Maildir watcher When installing Search::Xapian, make sure the underlying Xapian -is patched against the index corruption bug documented in: +installation is not affected by an index corruption bug: https://bugs.debian.org/808610 diff --git a/lib/PublicInbox/WatchMaildir.pm b/lib/PublicInbox/WatchMaildir.pm index 4468a4484fd63dfdbca81aa3bf193fd48a3f4c89..abf1df7bab32b533aa209e6f01999646a6be5767 100644 --- a/lib/PublicInbox/WatchMaildir.pm +++ b/lib/PublicInbox/WatchMaildir.pm @@ -144,6 +144,8 @@ my ($self) = @_; my $cb = sub { _try_fsn_paths($self, \@_) }; my $mdir = $self->{mdir}; + # lazy load here, we may support watching via IMAP IDLE + # in the future... require Filesys::Notify::Simple; my $watcher = Filesys::Notify::Simple->new($mdir); $watcher->wait($cb) while (1); diff --git a/t/watch_maildir.t b/t/watch_maildir.t index e8c97406eb59e976aec3056af96ef57f027c07ed..be1a31285bbefd295722b3b9457f8ebf9256db16 100644 --- a/t/watch_maildir.t +++ b/t/watch_maildir.t @@ -4,6 +4,11 @@ use Test::More; use File::Temp qw/tempdir/; use Email::MIME; use PublicInbox::Config; +my @mods = qw(Filesys::Notify::Simple); +foreach my $mod (@mods) { + eval "require $mod"; + plan skip_all => "$mod missing for watch_maildir.t" if $@; +} my $tmpdir = tempdir('watch_maildir-XXXXXX', TMPDIR => 1, CLEANUP => 1); my $git_dir = "$tmpdir/test.git";