Bug 263211 - mail/mutt: new hcache options change default to lmdb
Summary: mail/mutt: new hcache options change default to lmdb
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Dmitri Goutnik
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-04-11 02:07 UTC by Derek Schrock
Modified: 2022-05-16 19:52 UTC (History)
3 users (show)

See Also:


Attachments
new hcache options change default to lmdb (3.98 KB, patch)
2022-04-11 02:07 UTC, Derek Schrock
no flags Details | Diff
new hcache options change default to lmdb v2 for 2.2.3 (3.95 KB, patch)
2022-04-23 22:00 UTC, Derek Schrock
dereks: maintainer-approval+
Details | Diff
new hcache options change default to lmdb v3 rebase for 2.2.4 (4.13 KB, patch)
2022-05-01 21:38 UTC, Derek Schrock
dereks: maintainer-approval+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Derek Schrock 2022-04-11 02:07:35 UTC
Created attachment 233139 [details]
new hcache options change default to lmdb

- Add three new(ish) hcache options HCACHE_{LMDB,GDBM,QDBM}
- Update HCACHE_BDB to use database/db18
- Due to bdb5's EOL change the default hcache to HCACHE_LMDB.
  Favoring lmbd since it's performance is on par with BDB and that db18's
  AGPL3 licensing seems to be a point of contention.

portlint: ok. 1 expected warning.  muttlib.c patched multiple times
testport: ok. 13amd64.  Defaults options (new HCACHE_LLDB default LLDB), HCACHE_QDBM, HCACHE_GDBM.
Comment 1 Derek Schrock 2022-04-12 22:20:28 UTC
Comment on attachment 233139 [details]
new hcache options change default to lmdb

Putting a hold on this patch until 2.2.3
Comment 2 Derek Schrock 2022-04-23 22:00:22 UTC
Created attachment 233426 [details]
new hcache options change default to lmdb v2 for 2.2.3

Updated for mutt 2.2.3.

testport ok. 13amd64 all new options.
Comment 3 Dmitri Goutnik freebsd_committer freebsd_triage 2022-05-01 12:28:48 UTC
Is this still relevant? Could you please rebase to the latest?
Comment 4 Derek Schrock 2022-05-01 21:38:23 UTC
Created attachment 233641 [details]
new hcache options change default to lmdb v3 rebase for 2.2.4

Update PORTREVISION Rebased for 2.2.4
Comment 5 Dmitri Goutnik freebsd_committer freebsd_triage 2022-05-02 12:57:47 UTC
With this patch, mutt port either doesn't build (with HCACHE_BDB selected) or doesn't install (with HCACHE_LMDB) for me:

===>  mutt-2.2.4_1 cannot install: no eligible BerkeleyDB version. Requested:
18, incompatible: . Try: make debug-bdb.
Comment 6 Dmitri Goutnik freebsd_committer freebsd_triage 2022-05-02 13:05:47 UTC
Sorry, local misconfiguration, please disregard.
Comment 7 commit-hook freebsd_committer freebsd_triage 2022-05-02 13:21:40 UTC
A commit in branch main references this bug:

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

commit e49c427ac102757b65a46992157d1e948b55a8c8
Author:     Derek Schrock <dereks@lifeofadishwasher.com>
AuthorDate: 2022-05-02 13:06:54 +0000
Commit:     Dmitri Goutnik <dmgk@FreeBSD.org>
CommitDate: 2022-05-02 13:10:58 +0000

    mail/mutt: New hcache options change default to lmdb

    - Add three new(ish) hcache options HCACHE_{LMDB,GDBM,QDBM}
    - Update HCACHE_BDB to use database/db18
    - Due to bdb5's EOL change the default hcache to HCACHE_LMDB.
      Favoring lmbd since it's performance is on par with BDB and that db18's
      AGPL3 licensing seems to be a point of contention.

    PR:             263211

 UPDATING           |  8 ++++++++
 mail/mutt/Makefile | 18 ++++++++++++++----
 2 files changed, 22 insertions(+), 4 deletions(-)
Comment 8 Dmitri Goutnik freebsd_committer freebsd_triage 2022-05-02 13:23:03 UTC
Committed, thanks!
Comment 9 John Hein 2022-05-03 15:46:14 UTC
This breaks HCACHE_BDB...


===>  mutt-2.2.4_1 cannot install: no eligible BerkeleyDB version. Requested:
18, incompatible: . Try: make debug-bdb.
*** Error code 1
Comment 10 Derek Schrock 2022-05-03 15:51:29 UTC
Do you have WITH_BDB6_PERMITTED set?

That's required to enable the :18 arg for dbd.
Comment 11 John Hein 2022-05-03 16:41:33 UTC
(In reply to Derek Schrock from comment #10)
No.  Shouldn't that be the job of mail/mutt/Makefile to set the appropriate knobs to allow the use of the bdb version that it is requiring?
Comment 12 John Hein 2022-05-03 16:47:18 UTC
(In reply to John Hein from comment #11)
Maybe this? ...


@@ -133,7 +133,8 @@ GSSAPI_NONE_CONFIGURE_ON=   --without-gss
 HCACHE_BDB_USES=                       bdb:18
 HCACHE_BDB_CONFIGURE_WITH=             bdb=${LOCALBASE}
 HCACHE_BDB_VARS=                       CFLAGS+=-I${BDB_INCLUDE_DIR} \
-                                       LDFLAGS+=-L${BDB_LIB_DIR}
+                                       LDFLAGS+=-L${BDB_LIB_DIR} \
+                                       WITH_BDB6_PERMITTED=1
 HCACHE_GDBM_LIB_DEPENDS=               libgdbm.so:databases/gdbm
 HCACHE_GDBM_CONFIGURE_WITH=            gdbm=${LOCALBASE}
 HCACHE_KYOTOCABINET_LIB_DEPENDS=       libkyotocabinet.so:databases/kyotocabinet
Comment 13 Matthew Horan 2022-05-03 16:52:07 UTC
(In reply to John Hein from comment #12)
The WITH flag is a global flag as only one bdb version can be installed / used in ports. This is generally set in /etc/make.conf. bdb:5 is deprecated and will be removed soon. This is why the change was made to use bdb:18 but also why the default was changed to lmdb.

The port can't decide that you as the user would like to use bdb:18 for all your ports, as that would break the rest of your system.
Comment 14 Derek Schrock 2022-05-03 16:57:07 UTC
I've thought about that however I think the purpose of it is to have the user be fully opt-in to the AGPL3.  I don't see any other ports setting it which makes me think it's a user config.

It's possible using bdb:5+ (or the old :42+) could have been set here but it's EOL in ~1 month so setting it 18 now.
Comment 15 John Hein 2022-05-03 17:11:47 UTC
(In reply to John Hein from comment #12)
Maybe add a to HCACHE_BDB_DESC to indicate the use of "db18 (AGPL3)".  Then users are fully informed when they select the option.  It seems to me that it is not friendly to make users dig into the depths of Mk/Uses/bdb.mk when they just wanted to turn on the BDB option.
Comment 16 John Hein 2022-05-16 18:32:29 UTC
(In reply to John Hein from comment #15)
ports/a396e4f131341b58bf897f73d1ce1f8a6f6e5256 means you don't have to explicitly set WITH_BDB6_PERMITTED now if bdb:18 is specified.

It is a question in my mind at least whether linking with the AvGPL3 bdb lib "infects" mutt such that there should be some change for licensing reasons (e.g., add AvGPL3 to LICENSES if linking with bdb?).
Comment 17 John Hein 2022-05-16 19:52:32 UTC
(In reply to John Hein from comment #16)
See bug 264024 - fixes mutt license if linked with bdb18