git: 0cea189105ef - main - databases/lmdb: add migration notice for 0.9.x -> 1.0.0 upgrade

From: Xin LI <delphij_at_FreeBSD.org>
Date: Thu, 02 Jul 2026 17:36:12 UTC
The branch main has been updated by delphij:

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

commit 0cea189105efe01c8ba03fe3e37e117af88ce0f6
Author:     Xin LI <delphij@FreeBSD.org>
AuthorDate: 2026-07-02 17:33:32 +0000
Commit:     Xin LI <delphij@FreeBSD.org>
CommitDate: 2026-07-02 17:36:00 +0000

    databases/lmdb: add migration notice for 0.9.x -> 1.0.0 upgrade
    
    LMDB 1.0 introduced an incompatible on-disk file format; v0.9 databases
    must be exported with mdb_dump and re-imported with mdb_load before use.
    Add a pkg-message (install always, upgrade only from <1.0.0) and an
    UPDATING entry documenting the required migration procedure.
    
    Suggested by:   Kevin Bowling <kevin.bowling@kev009.com>
---
 UPDATING                   | 17 +++++++++++++++++
 databases/lmdb/pkg-message | 32 ++++++++++++++++++++++++++++++++
 2 files changed, 49 insertions(+)

diff --git a/UPDATING b/UPDATING
index d269cc60e637..abb08c1c0005 100644
--- a/UPDATING
+++ b/UPDATING
@@ -5,6 +5,23 @@ they are unavoidable.
 You should get into the habit of checking this file for changes each time
 you update your ports collection, before attempting any port upgrades.
 
+20260702:
+  AFFECTS: users of databases/lmdb
+  AUTHOR: delphij@FreeBSD.org
+
+  LMDB 1.0 introduced an incompatible on-disk file format change.
+  Versions 0.9.x and 1.0.x databases are mutually incompatible.
+
+  Before upgrading, export all existing databases using the old v0.9
+  mdb_dump utility, then import them with the new v1.0 mdb_load after
+  upgrading.  There is no support for opening v0.9 database files
+  directly with LMDB 1.0.
+
+  Example migration procedure:
+  # mdb_dump -a /path/to/db > /tmp/mydb.dump
+  # pkg upgrade databases/lmdb
+  # mdb_load -f /tmp/mydb.dump /path/to/newdb
+
 20260630:
   AFFECTS: users of audio/murmur
   AUTHOR: vvd@FreeBSD.org
diff --git a/databases/lmdb/pkg-message b/databases/lmdb/pkg-message
new file mode 100644
index 000000000000..13e1c3d9baba
--- /dev/null
+++ b/databases/lmdb/pkg-message
@@ -0,0 +1,32 @@
+[
+{ type: install
+  message: <<EOM
+LMDB 1.0 introduced an incompatible on-disk file format change.
+Databases created with LMDB 0.9.x cannot be opened with LMDB 1.0.
+
+If you are migrating from LMDB 0.9.x, you must export your existing
+databases using the old mdb_dump and re-import them with the new
+mdb_load:
+
+  # mdb_dump -a /path/to/db > /tmp/mydb.dump
+  # mdb_load -f /tmp/mydb.dump /path/to/newdb
+
+There is no support in LMDB 1.0 for operating directly on v0.9 DB files.
+EOM
+}
+{ type: upgrade
+  maximum_version: "1.0.0"
+  message: <<EOM
+LMDB 1.0 introduced an incompatible on-disk file format change.
+Databases created with LMDB 0.9.x cannot be opened with LMDB 1.0.
+
+Before using the new library, export your existing databases using the
+old mdb_dump utility and re-import them with the new mdb_load:
+
+  # mdb_dump -a /path/to/db > /tmp/mydb.dump
+  # mdb_load -f /tmp/mydb.dump /path/to/newdb
+
+There is no support in LMDB 1.0 for operating directly on v0.9 DB files.
+EOM
+}
+]