Bug 262135 - databases/py-berkeleydb: Fix build when default version of berkeley db is 18
Summary: databases/py-berkeleydb: Fix build when default version of berkeley db is 18
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: Muhammad Moinur Rahman
URL:
Keywords: needs-qa
Depends on:
Blocks: 261523
  Show dependency treegraph
 
Reported: 2022-02-23 06:40 UTC by Yasuhiro Kimura
Modified: 2022-02-26 04:56 UTC (History)
0 users

See Also:
bofh: maintainer-feedback+
koobs: merge-quarterly-


Attachments
Patch file (941 bytes, patch)
2022-02-23 06:40 UTC, Yasuhiro Kimura
koobs: maintainer-approval+
Details | Diff
Updated patch file (1.06 KB, patch)
2022-02-25 06:21 UTC, Yasuhiro Kimura
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Yasuhiro Kimura freebsd_committer freebsd_triage 2022-02-23 06:40:52 UTC
Created attachment 232025 [details]
Patch file

Fix build when default version of berkeley db is 18.
Comment 1 Kubilay Kocak freebsd_committer freebsd_triage 2022-02-23 23:13:27 UTC
Side note, what a great build variable "YES_I_HAVE_THE_RIGHT_TO_USE_THIS_BERKELEY_DB_VERSION" :D
Comment 2 Kubilay Kocak freebsd_committer freebsd_triage 2022-02-23 23:13:50 UTC
Comment on attachment 232025 [details]
Patch file

Approved by: portmgr (blanket: build fix)
Comment 3 Kubilay Kocak freebsd_committer freebsd_triage 2022-02-23 23:14:22 UTC
^Triage: MFH: No (BDB default will not change in quarterly)
Comment 4 Muhammad Moinur Rahman freebsd_committer freebsd_triage 2022-02-24 02:42:10 UTC
Sorry but this should be a conditional check like:

if BDB_VERSION == 18 ; then
MAKE_ENV=
fi

As long as 5 is in the tree. Once bdb5 is moved we can remove the conditionals. If you can resubmit the patch I will have a look again other wise I will check the exact syntax and update accordingly in the coming weekend.
Comment 5 Yasuhiro Kimura freebsd_committer freebsd_triage 2022-02-25 06:21:02 UTC
Created attachment 232096 [details]
Updated patch file

Set 'YES_I_HAVE_THE_RIGHT_TO_USE_THIS_BERKELEY_DB_VERSION=yes' only when ${BDB_VER} is larger than 5.
Comment 6 Muhammad Moinur Rahman freebsd_committer freebsd_triage 2022-02-26 04:23:25 UTC
I was about to commit but I thought to give it a test. And I am not sure if I am missing something but I can't build this:
I have DEFAULT_VERSIONS+= bdb=18 in BDB18-make.conf

And why I am trying to build with:
poudriere bulk -j MAIN -z BDB18 -p default -t databases/py-berkeleydb 

I am getting 
"cannot install: no eligible BerkeleyDB version. Requested: 18, incompatible: . Try: make debug-bdb"

Even trying to build this port with USES=bdb:18 fails with the same error.

Am I missing something here or is it that Uses/bdb.mk requires fixing?
Comment 7 Yasuhiro Kimura freebsd_committer freebsd_triage 2022-02-26 04:33:52 UTC
(In reply to Muhammad Moinur Rahman from comment #6)

Currently you need to set 'WITH_BDB6_PERMITTED=yes' in make.conf to use db18 as default version of berkeley db. It's pitfall and will be removed when default version switches to 18.
Comment 8 Muhammad Moinur Rahman freebsd_committer freebsd_triage 2022-02-26 04:38:42 UTC
(In reply to Yasuhiro Kimura from comment #7)
Ah okiz. Let me check one more time. Thanks for the pointer.
Comment 9 commit-hook freebsd_committer freebsd_triage 2022-02-26 04:55:49 UTC
A commit in branch main references this bug:

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

commit 2214191eff6c1fd01ce14791f04077dcd16408da
Author:     Yasuhiro Kimura <yasu@FreeBSD.org>
AuthorDate: 2022-02-26 04:54:00 +0000
Commit:     Muhammad Moinur Rahman <bofh@FreeBSD.org>
CommitDate: 2022-02-26 04:54:00 +0000

    databases/py-berkeleydb: Fix build with db18

    PR:             262135

 databases/py-berkeleydb/Makefile | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)