Page MenuHomeFreeBSD

databases/lmdb: allow to install both 0.x and 1.x together
Needs ReviewPublic

Authored by bapt on Thu, Oct 15, 12:28 PM.
Tags
None
Referenced Files
F176085255: D60741.diff
Thu, Oct 15, 11:40 PM
F176036061: D60741.id189961.diff
Thu, Oct 15, 12:39 PM
F176035875: D60741.diff
Thu, Oct 15, 12:36 PM
Subscribers
None

Details

Reviewers
delphij
Summary

LMDB 1.0 and the legacy 0.9 ABI cannot be mixed, the datanase format are
incompatibles as well.

Rename or relocate everything databases/lmdb0 installs so that it no
longer overlaps with databases/lmdb:

  • the utilities are now mdb_copy0, mdb_dump0, mdb_load0 and mdb_stat0
  • the header is include/lmdb0/lmdb.h
  • the linker name is liblmdb0.so, the shared object keeps its ABI name liblmdb.so.0 so already linked programs are unaffected
  • the pkg-config file is lmdb0.pc

A compatibility prefix holding the previous layout is also installed
under ${PREFIX}/lmdb0/ (include/, lib/ and libdata/pkgconfig/) so that
build systems which expect to find lmdb.h and -llmdb relative to a
single directory only need a path change.

Diff Detail

Repository
R11 FreeBSD ports repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 78238
Build 75121: arc lint + arc unit

Event Timeline

bapt requested review of this revision.Thu, Oct 15, 12:28 PM
bapt created this revision.

Is there a compelling reason why these ports must stay with lmdb 0.x series? We reintroduced lmdb 0.9 primarily because of the upstream developers need some time to move over to newer lmdb versions, and that's meant to be a temporary measure and not something that was intended to be kept forever.

If there is a compelling reason to do so (which is understandable) I think we probably want:

  • Introduce versioned symbols to both ports, because without it, there could be libraries that want to have lmdb 0.9 and application wanted lmdb 1.x, etc. Maybe split lmdb 0.9 into "SDK" (which is used at build time) and have lmdb 0.9 introduced in lmdb 1.x port (so the shared library is installed to support packages)
  • Perhaps re-introduce lmdb 0.9 on-disk format compatibility to lmdb 1.x (so it performs an automatic upgrade)

That's said, I'm not against this change, but I think we should make a cutover to lmdb 1.x instead and drop lmdb 0.9 support as soon as we can.