Summary: | databases/mongodb50: Potential improvements | ||||||
---|---|---|---|---|---|---|---|
Product: | Ports & Packages | Reporter: | Daniel Engberg <diizzy> | ||||
Component: | Individual Port(s) | Assignee: | Daniel Engberg <diizzy> | ||||
Status: | Closed FIXED | ||||||
Severity: | Affects Only Me | CC: | fernape, ronald-lists, ronald | ||||
Priority: | --- | Keywords: | needs-patch | ||||
Version: | Latest | Flags: | ronald-lists:
maintainer-feedback+
|
||||
Hardware: | Any | ||||||
OS: | Any | ||||||
Attachments: |
|
Description
Daniel Engberg
![]() ![]() ^Triage: reporter is committer, assign accordinly. - no patch - too generic subject - no real problem mentioned Created attachment 235682 [details] Patch for mongodb50 Hi Roland, First if of all there are some concerns attached to this topic, https://docs.freebsd.org/en/books/porters-handbook/book/#bundled-libs explains those. So far it seems like we can at least use these (compiles fine on my 13.1-RELEASE test box and in 12.3-RELEASE using Poudriere both being amd64): --use-system-boost --> devel/boost-libs (patches obtained from Gentoo [1]) --use-system-stemmer --> textproc/snowballstemmer --use-system-libunwind --> devel/libunwind --use-system-yaml --> devel/yaml-cpp --use-system-zstd --> archivers/zstd abseil doesn't work out of the box but I haven't looked into why ( /usr/ports/devel/abseil ) Using system ICU ( devel/icu ) would be very nice and save quite a bit of time but Gentoo has this note [2] Fairly old version though so I'm not sure if its still valid. I've also removed the mtune option on amd64 as it potentially overrides CPUTYPE set by ports framework References: [1] https://gitweb.gentoo.org/repo/gentoo.git/tree/dev-db/mongodb/files/mongodb-4.4.1-boost.patch https://gitweb.gentoo.org/repo/gentoo.git/tree/dev-db/mongodb/files/mongodb-5.0.2-boost-1.79.patch [2] https://gitweb.gentoo.org/repo/gentoo.git/tree/dev-db/mongodb/mongodb-5.0.5.ebuild#n110 I'm not a user of mongodb so it would be nice if you could at least verify this. Best regards, Daniel (In reply to Daniel Engberg from comment #3) Hi Daniel, I'm not that impressed by that part of the porters handbook. Although I understand the general message of it. In this case upstream is pretty responsive to security issues. And using the bundled code makes sure we use more of the guarantees of the QA of the mongodb company because we keep it closer to the binaries released by MongoDB. (What if mongodb makes an important change in a third party library? Or a change in their own code to be compatible with a specific bundled library version which is incompatible with our version of that library?) Plus Mongodb is often used on a standalone server/jail/VM so in practice sharing these libraries does not give much gain in resource sharing. Having said that. I'm ok with your patch if your really think it will benefit anybody. BTW: I compile tested the patch on aarch64/14-current also. It builds fine. A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=cdca8109d6d09b7f7b8ddcba55f9e1eb09332161 commit cdca8109d6d09b7f7b8ddcba55f9e1eb09332161 Author: Daniel Engberg <diizzy@FreeBSD.org> AuthorDate: 2022-08-15 20:23:37 +0000 Commit: Daniel Engberg <diizzy@FreeBSD.org> CommitDate: 2022-08-15 20:27:40 +0000 databases/mongodb50: Use more external libraries Make use of following libraries in tree: devel/boost-libs textproc/snowballstemmer devel/libunwind devel/yaml-cpp archivers/zstd While at it remove mtune option on amd64 as it potentially overrides CPUTYPE set by ports framework References: [1] https://gitweb.gentoo.org/repo/gentoo.git/tree/dev-db/mongodb/files/mongodb-4.4.1-boost.patch https://gitweb.gentoo.org/repo/gentoo.git/tree/dev-db/mongodb/files/mongodb-5.0.2-boost-1.79.patch PR: 265210 Reviewed by: Ronald Klop <ronald-lists@klop.ws> (maintainer) databases/mongodb50/Makefile | 24 +++++++- databases/mongodb50/files/patch-SConstruct | 9 +++ .../mongodb50/files/patch-boost-179-compat (new) | 70 ++++++++++++++++++++++ .../mongodb50/files/patch-boost-179-link-fix (new) | 21 +++++++ 4 files changed, 122 insertions(+), 2 deletions(-) (In reply to commit-hook from comment #6) thanks for your work on this In bug #269024 I'm handling an issue with the upgrade to boost 1.81.0. I don't have the time and interest to debug mongodb+boost. I expect upstream to do that work with paid developers. For now I'm going back to compiling the in-source boost version of MongoDB. Just a note here to let you know. If somebody wants to create a new patch please attach it to the other issue. |