Bug 261766 - [new port] mail/dovecot-fts-flatcurve
Summary: [new port] mail/dovecot-fts-flatcurve
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Muhammad Moinur Rahman
URL: https://github.com/slusarz/dovecot-ft...
Keywords: patch
Depends on:
Blocks:
 
Reported: 2022-02-07 08:42 UTC by Martin Waschbüsch
Modified: 2022-02-08 18:48 UTC (History)
2 users (show)

See Also:


Attachments
initial port (3.20 KB, text/plain)
2022-02-07 08:42 UTC, Martin Waschbüsch
no flags Details
initial port (3.44 KB, text/plain)
2022-02-07 12:58 UTC, Martin Waschbüsch
no flags Details
initial port (3.38 KB, text/plain)
2022-02-07 13:36 UTC, Martin Waschbüsch
no flags Details
initial port (3.44 KB, text/plain)
2022-02-07 13:44 UTC, Martin Waschbüsch
martin: maintainer-approval+
Details
initial port (3.55 KB, text/plain)
2022-02-07 14:21 UTC, Martin Waschbüsch
martin: maintainer-approval+
Details
initial port (3.81 KB, patch)
2022-02-07 16:32 UTC, Martin Waschbüsch
no flags Details | Diff
initial port (4.18 KB, patch)
2022-02-07 16:53 UTC, Martin Waschbüsch
martin: maintainer-approval+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Waschbüsch 2022-02-07 08:42:08 UTC
Created attachment 231598 [details]
initial port

fts-lucene plugin for dovecot is deprecated and apart from fts-xapian, there is another xapian based fts plugin out there, fts-flatcurve, by Michael M Slusarz.

Based on the fts-xapian port, I have created this one. It builds and works for me.
Hope it is useful for others.
Comment 1 Martin Waschbüsch 2022-02-07 08:51:06 UTC
still needs qa and the Makefile needs cleaning up - I get portlint warnings.
Comment 2 Martin Waschbüsch 2022-02-07 12:58:12 UTC
Created attachment 231605 [details]
initial port

fixed Makefile to include doveadm plugin files
Comment 3 Martin Waschbüsch 2022-02-07 13:36:59 UTC
Created attachment 231607 [details]
initial port

fixed ordering.
Aside: I tried to follow
https://docs.freebsd.org/en/books/porters-handbook/order/

But portlint still says:

WARN: Makefile: "LIB_DEPENDS" has to appear earlier.
WARN: Makefile: "RUN_DEPENDS" has to appear earlier.
WARN: Makefile: "USES" has to appear earlier.

If anyone can let me know how I need to place things so that portlint is happy? :-)
Comment 4 Martin Waschbüsch 2022-02-07 13:44:46 UTC
Created attachment 231609 [details]
initial port

Added fts-flatcurve-config.h to PLIST_FILES
Now poudriere testport worked without complaining.
Except for the portlint warnings, everything seems fine.
Comment 5 Martin Waschbüsch 2022-02-07 13:47:50 UTC
From my point of view this is good to go.

QA:

- portlint: OK (3 warnings about *_DEPENDS ordering in Makefile)
- testport: (poudriere: 13-0-RELEASE, amd64, defaults)
Comment 6 Martin Waschbüsch 2022-02-07 14:21:30 UTC
Created attachment 231610 [details]
initial port

I had taken dovecot-fts-xapian as a skeleton to create this port, but I forgot to change pkg-descr. Now fixed.
Comment 7 Muhammad Moinur Rahman freebsd_committer freebsd_triage 2022-02-07 16:05:15 UTC
(In reply to Martin Waschbüsch from comment #6)
Can you try to use portclippy and portfmt and see how things changes for the errors?
Comment 8 Muhammad Moinur Rahman freebsd_committer freebsd_triage 2022-02-07 16:09:11 UTC
One more thing is remove the blanks in between *_DEPENDS.
Comment 9 Martin Waschbüsch 2022-02-07 16:12:26 UTC
(In reply to Muhammad Moinur Rahman from comment #8)


That was it! Thank you. Am I right in assuming that the blank lines constitute the section boundaries?
Comment 10 Muhammad Moinur Rahman freebsd_committer freebsd_triage 2022-02-07 16:20:50 UTC
(In reply to Martin Waschbüsch from comment #9)
Yes. Some sort of. If you run portclippy for the lints you can get a better idea out of it.

One more thing is it's better to share git diffs rather than shar files. As you are adding a new port we also have to add a line in the CATEGORY Makefile which cannot be done with shar files. We used to use shar files a lot in previous but with git diffs it's much more easier for a committer to work on.
Comment 11 Martin Waschbüsch 2022-02-07 16:32:18 UTC
Created attachment 231612 [details]
initial port

Replaced shar with git diff
Comment 12 Martin Waschbüsch 2022-02-07 16:33:51 UTC
Build log for poudriere testport can be found here:
https://dev.waschbuesch.it/data/13-0-default/2022-02-07_16h29m53s/logs/dovecot-fts-flatcurve-0.2.0.log
Comment 13 Muhammad Moinur Rahman freebsd_committer freebsd_triage 2022-02-07 16:36:49 UTC
(In reply to Martin Waschbüsch from comment #12)
When you are adding a new port that needs to be added in the <CATEGORY>/Makefile.

Look at mail/Makefile in your portstree. You will get to know what to add. Update the patch accordingly.
Comment 14 Muhammad Moinur Rahman freebsd_committer freebsd_triage 2022-02-07 16:38:18 UTC
(In reply to Martin Waschbüsch from comment #12)
I am getting Forbidden 403 here. Let me know if you need anything with nginx config for the poudriere. Most probably your webserver is misconfigured.
Comment 15 Martin Waschbüsch 2022-02-07 16:43:30 UTC
(In reply to Muhammad Moinur Rahman from comment #14)

No, worked as intended.
I limited the access to the boxes that download pkgs from it.
I just did not remember I did that and of course it would not happen to me being whitelisted, duh!
 
No reason to block the website and logs, though, so I opened those up. Please try again! :-)
Comment 16 Muhammad Moinur Rahman freebsd_committer freebsd_triage 2022-02-07 16:49:45 UTC
(In reply to Martin Waschbüsch from comment #15)
LGTM. Update the patch as mentioned in comment #13. I will have a look at it tomorrow.
Comment 17 Martin Waschbüsch 2022-02-07 16:53:24 UTC
Created attachment 231613 [details]
initial port

fixed patch and included mail/Makefile change to accommodate new port.
Comment 18 Martin Waschbüsch 2022-02-07 16:53:43 UTC
(In reply to Muhammad Moinur Rahman from comment #16)
Done. Thanks a lot!! :-)
Comment 19 commit-hook freebsd_committer freebsd_triage 2022-02-08 18:36:10 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=f0507682f64e01c9ef4c43de11b56c41f0475cf5

commit f0507682f64e01c9ef4c43de11b56c41f0475cf5
Author:     Muhammad Moinur Rahman <bofh@FreeBSD.org>
AuthorDate: 2022-02-08 18:34:40 +0000
Commit:     Muhammad Moinur Rahman <bofh@FreeBSD.org>
CommitDate: 2022-02-08 18:35:31 +0000

    mail/dovecot-fts-flatcurve: NEW Port

    This is a Dovecot FTS plugin to enable message indexing using the Xapian
    Open Source Search Engine Library.

    The plugin relies on Dovecot to do the necessary stemming.
    It is intended to act as a simple interface to the Xapian
    storage/search query functionality.

    This driver supports match scoring and substring matches (on by
    default), which means it is RFC 3501 (IMAP4rev1) compliant.
    This driver does not support fuzzy searches.

    WWW: https://github.com/slusarz/dovecot-fts-flatcurve

    PR:             261766

 mail/Makefile                                      |  1 +
 mail/dovecot-fts-flatcurve/Makefile (new)          | 35 ++++++++++++++++++++++
 mail/dovecot-fts-flatcurve/distinfo (new)          |  3 ++
 .../files/patch-src_Makefile.am (new)              | 16 ++++++++++
 mail/dovecot-fts-flatcurve/pkg-descr (new)         | 12 ++++++++
 5 files changed, 67 insertions(+)
Comment 20 Muhammad Moinur Rahman freebsd_committer freebsd_triage 2022-02-08 18:48:57 UTC
Committed with changes.