Sync from SUSE:SLFO:Main lmdb revision 5c05eb101a7b0e712effe406b64c54a7
This commit is contained in:
commit
9b842ee6ae
23
.gitattributes
vendored
Normal file
23
.gitattributes
vendored
Normal file
@ -0,0 +1,23 @@
|
||||
## Default LFS
|
||||
*.7z filter=lfs diff=lfs merge=lfs -text
|
||||
*.bsp filter=lfs diff=lfs merge=lfs -text
|
||||
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
||||
*.gem filter=lfs diff=lfs merge=lfs -text
|
||||
*.gz filter=lfs diff=lfs merge=lfs -text
|
||||
*.jar filter=lfs diff=lfs merge=lfs -text
|
||||
*.lz filter=lfs diff=lfs merge=lfs -text
|
||||
*.lzma filter=lfs diff=lfs merge=lfs -text
|
||||
*.obscpio filter=lfs diff=lfs merge=lfs -text
|
||||
*.oxt filter=lfs diff=lfs merge=lfs -text
|
||||
*.pdf filter=lfs diff=lfs merge=lfs -text
|
||||
*.png filter=lfs diff=lfs merge=lfs -text
|
||||
*.rpm filter=lfs diff=lfs merge=lfs -text
|
||||
*.tbz filter=lfs diff=lfs merge=lfs -text
|
||||
*.tbz2 filter=lfs diff=lfs merge=lfs -text
|
||||
*.tgz filter=lfs diff=lfs merge=lfs -text
|
||||
*.ttf filter=lfs diff=lfs merge=lfs -text
|
||||
*.txz filter=lfs diff=lfs merge=lfs -text
|
||||
*.whl filter=lfs diff=lfs merge=lfs -text
|
||||
*.xz filter=lfs diff=lfs merge=lfs -text
|
||||
*.zip filter=lfs diff=lfs merge=lfs -text
|
||||
*.zst filter=lfs diff=lfs merge=lfs -text
|
354
0001-Add-extra-tools-and-CFEngine-modifications-for-LMDB.patch
Normal file
354
0001-Add-extra-tools-and-CFEngine-modifications-for-LMDB.patch
Normal file
@ -0,0 +1,354 @@
|
||||
From 1701892d066c626bbd82c9340d6b442f733c33a1 Mon Sep 17 00:00:00 2001
|
||||
From: Kristian Amlie <kristian.amlie@cfengine.com>
|
||||
Date: Mon, 28 Jul 2014 11:28:38 +0200
|
||||
Subject: [PATCH 1/4] Add extra tools and CFEngine modifications for LMDB.
|
||||
|
||||
---
|
||||
libraries/liblmdb/lmdump.c | 128 +++++++++++++++++++++++++++
|
||||
libraries/liblmdb/lmmgr.c | 201 +++++++++++++++++++++++++++++++++++++++++++
|
||||
libraries/liblmdb/mdb_copy.c | 2 +-
|
||||
3 files changed, 330 insertions(+), 1 deletion(-)
|
||||
create mode 100644 libraries/liblmdb/lmdump.c
|
||||
create mode 100644 libraries/liblmdb/lmmgr.c
|
||||
|
||||
diff --git a/libraries/liblmdb/lmdump.c b/libraries/liblmdb/lmdump.c
|
||||
new file mode 100644
|
||||
index 000000000000..0e3ee4bb61c2
|
||||
--- /dev/null
|
||||
+++ b/libraries/liblmdb/lmdump.c
|
||||
@@ -0,0 +1,128 @@
|
||||
+/* lmdump.c - Lmdb database dumper
|
||||
+ Has three modes :
|
||||
+ -a : print keys in ascii form
|
||||
+ -A : print keys and values in ascii form
|
||||
+ -x : print keys and values in hexadecimal form
|
||||
+ -d : print only the size of keys and values
|
||||
+ */
|
||||
+
|
||||
+#define _XOPEN_SOURCE 500 /* srandom(), random() */
|
||||
+#include <stdio.h>
|
||||
+#include <stdlib.h>
|
||||
+#include <time.h>
|
||||
+#include <string.h>
|
||||
+#include "lmdb.h"
|
||||
+
|
||||
+static void print_hex(char *s, int len)
|
||||
+{
|
||||
+ int i = 0;
|
||||
+ for (i=0; i<len; i++)
|
||||
+ {
|
||||
+ printf("%02x", s[i]);
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+static void print_usage(void)
|
||||
+{
|
||||
+ printf("Lmdb database dumper\n");
|
||||
+ printf("Usage: dump -d|-x|-a|-A filename\n\n");
|
||||
+ printf("Has three modes :\n");
|
||||
+ printf(" -a : print keys in ascii form\n");
|
||||
+ printf(" -A : print keys and values in ascii form\n");
|
||||
+ printf(" -x : print keys and values in hexadecimal form\n");
|
||||
+ printf(" -d : print only the size of keys and values\n");
|
||||
+}
|
||||
+
|
||||
+static int report_error(int rc)
|
||||
+{
|
||||
+ printf("err(%d): %s\n", rc, mdb_strerror(rc));
|
||||
+ return rc;
|
||||
+}
|
||||
+
|
||||
+int main(int argc, char * argv[])
|
||||
+{
|
||||
+ int rc;
|
||||
+ MDB_env *env;
|
||||
+ MDB_dbi dbi;
|
||||
+ MDB_val key, data;
|
||||
+ MDB_txn *txn;
|
||||
+ MDB_cursor *cursor;
|
||||
+
|
||||
+ if (argc<3)
|
||||
+ {
|
||||
+ print_usage();
|
||||
+ return 1;
|
||||
+ }
|
||||
+ int mode = -1;
|
||||
+ if (strcmp(argv[1],"-a") == 0)
|
||||
+ {
|
||||
+ mode = 'a';
|
||||
+ }
|
||||
+ else if (strcmp(argv[1],"-A") == 0)
|
||||
+ {
|
||||
+ mode = 'A';
|
||||
+ }
|
||||
+ else if(strcmp(argv[1],"-x") == 0)
|
||||
+ {
|
||||
+ mode = 'x';
|
||||
+ }
|
||||
+ else if(strcmp(argv[1],"-d") == 0)
|
||||
+ {
|
||||
+ mode = 'd';
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ print_usage();
|
||||
+ return 1;
|
||||
+ }
|
||||
+ rc = mdb_env_create(&env);
|
||||
+ if(rc) return report_error(rc);
|
||||
+
|
||||
+ rc = mdb_env_open(env, argv[2], MDB_NOSUBDIR | MDB_NOLOCK, 0644);
|
||||
+ if(rc) return report_error(rc);
|
||||
+
|
||||
+ rc = mdb_txn_begin(env, NULL, MDB_RDONLY, &txn);
|
||||
+ if(rc) return report_error(rc);
|
||||
+
|
||||
+ rc = mdb_open(txn, NULL, 0, &dbi);
|
||||
+ if(rc) return report_error(rc);
|
||||
+
|
||||
+ rc = mdb_cursor_open(txn, dbi, &cursor);
|
||||
+ if(rc) return report_error(rc);
|
||||
+
|
||||
+ while( (rc = mdb_cursor_get(cursor, &key, &data, MDB_NEXT)) ==0)
|
||||
+ {
|
||||
+ if (mode == 'A')
|
||||
+ {
|
||||
+ printf("key: %p[%d] %.*s\n",
|
||||
+ key.mv_data, (int) key.mv_size, (int) key.mv_size, (char *) key.mv_data);
|
||||
+ }
|
||||
+ else if (mode == 'a')
|
||||
+ {
|
||||
+ printf("key: %p[%d] %.*s, data: %p[%d] %.*s\n",
|
||||
+ key.mv_data, (int) key.mv_size, (int) key.mv_size, (char *) key.mv_data,
|
||||
+ data.mv_data, (int) data.mv_size, (int) data.mv_size, (char *) data.mv_data);
|
||||
+ }
|
||||
+ else if (mode == 'd')
|
||||
+ {
|
||||
+ printf("key: %p[%d] ,data: %p[%d]\n",
|
||||
+ key.mv_data, (int) key.mv_size,
|
||||
+ data.mv_data, (int) data.mv_size);
|
||||
+ }
|
||||
+ else if (mode == 'x')
|
||||
+ {
|
||||
+ printf("key: %p[%d] ", key.mv_data, (int) key.mv_size);
|
||||
+ print_hex(key.mv_data, (int) key.mv_size);
|
||||
+ printf(" ,data: %p[%d] ", data.mv_data, (int) data.mv_size);
|
||||
+ print_hex(data.mv_data, (int) data.mv_size);
|
||||
+ printf("\n");
|
||||
+ }
|
||||
+ }
|
||||
+ mdb_cursor_close(cursor);
|
||||
+ mdb_close(env, dbi);
|
||||
+
|
||||
+ mdb_txn_abort(txn);
|
||||
+ mdb_env_close(env);
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
diff --git a/libraries/liblmdb/lmmgr.c b/libraries/liblmdb/lmmgr.c
|
||||
new file mode 100644
|
||||
index 000000000000..1137d8dc388a
|
||||
--- /dev/null
|
||||
+++ b/libraries/liblmdb/lmmgr.c
|
||||
@@ -0,0 +1,201 @@
|
||||
+/*
|
||||
+lmmgr.c : Add, remove or manage the maxreaders value of a given database file
|
||||
+*/
|
||||
+#include <stdio.h>
|
||||
+#include <string.h>
|
||||
+#include "lmdb.h"
|
||||
+
|
||||
+static int report_error(int rc)
|
||||
+{
|
||||
+ printf("err(%d): %s\n", rc, mdb_strerror(rc));
|
||||
+ return rc;
|
||||
+}
|
||||
+
|
||||
+int openconn(const char *dbfile, MDB_env **env, long int maxreaders)
|
||||
+{
|
||||
+/*init*/
|
||||
+ int rc;
|
||||
+ rc = mdb_env_create(env);
|
||||
+ if(rc) return report_error(rc);
|
||||
+
|
||||
+ rc = mdb_env_open(*env, dbfile, MDB_NOSUBDIR, 0644);
|
||||
+ if(rc) return report_error(rc);
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+int gettxn(MDB_env *env, MDB_txn **txn, MDB_dbi *dbi)
|
||||
+{
|
||||
+ int rc;
|
||||
+/*setup txn*/
|
||||
+ rc = mdb_txn_begin(env, NULL, 0, txn);
|
||||
+ if(rc) return report_error(rc);
|
||||
+ rc = mdb_open(*txn, NULL, 0, dbi);
|
||||
+ if(rc) return report_error(rc);
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+int committxn(MDB_txn *txn)
|
||||
+{
|
||||
+/*commit*/
|
||||
+ int rc;
|
||||
+ rc = mdb_txn_commit(txn);
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+int aborttxn(MDB_txn *txn)
|
||||
+{
|
||||
+/*abort*/
|
||||
+ int rc;
|
||||
+ mdb_txn_abort(txn);
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+int closeall(MDB_env *env, MDB_txn *txn, MDB_dbi dbi)
|
||||
+{
|
||||
+/*end*/
|
||||
+ mdb_close(env, dbi);
|
||||
+ mdb_env_close(env);
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+int do_put(char *dbfile, char *mykey, char *myval)
|
||||
+{
|
||||
+ MDB_env *env;
|
||||
+ openconn(dbfile, &env, 0);
|
||||
+
|
||||
+ MDB_txn *txn;
|
||||
+ MDB_dbi dbi;
|
||||
+ gettxn(env, &txn, &dbi);
|
||||
+
|
||||
+ int rc;
|
||||
+ MDB_val key, data;
|
||||
+ key.mv_data = mykey;
|
||||
+ data.mv_data = myval;
|
||||
+ key.mv_size = strlen(mykey) + 1;
|
||||
+ data.mv_size = strlen(myval) + 1;
|
||||
+
|
||||
+ rc = mdb_put(txn, dbi, &key, &data, MDB_NOOVERWRITE);
|
||||
+ if (rc == MDB_SUCCESS)
|
||||
+ {
|
||||
+ rc = mdb_txn_commit(txn);
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ mdb_txn_abort(txn);
|
||||
+ }
|
||||
+
|
||||
+ mdb_env_close(env);
|
||||
+ return rc;
|
||||
+}
|
||||
+
|
||||
+int do_del(char *dbfile, char *mykey)
|
||||
+{
|
||||
+ MDB_env *env;
|
||||
+ openconn(dbfile, &env, 0);
|
||||
+
|
||||
+ MDB_txn *txn;
|
||||
+ MDB_dbi dbi;
|
||||
+ gettxn(env, &txn, &dbi);
|
||||
+
|
||||
+ int rc;
|
||||
+ MDB_val key;
|
||||
+ key.mv_data = mykey;
|
||||
+ key.mv_size = strlen(mykey) + 1;
|
||||
+
|
||||
+ rc = mdb_del(txn, dbi, &key, NULL);
|
||||
+ if (rc == MDB_SUCCESS)
|
||||
+ {
|
||||
+ rc = mdb_txn_commit(txn);
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ mdb_txn_abort(txn);
|
||||
+ }
|
||||
+
|
||||
+ mdb_env_close(env);
|
||||
+ return rc;
|
||||
+}
|
||||
+
|
||||
+int do_init(char *dbfile, unsigned long maxr)
|
||||
+{
|
||||
+ MDB_env *env;
|
||||
+ openconn(dbfile, &env, maxr);
|
||||
+ mdb_env_close(env);
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+int do_stat(char *dbfile)
|
||||
+{
|
||||
+ int rc;
|
||||
+ MDB_env *env;
|
||||
+ openconn(dbfile, &env, 0);
|
||||
+
|
||||
+ MDB_stat stat;
|
||||
+ MDB_envinfo info;
|
||||
+
|
||||
+ rc = mdb_env_stat(env, &stat);
|
||||
+ rc = mdb_env_info(env, &info);
|
||||
+ printf("me_maxreaders=%ld\n", info.me_maxreaders);
|
||||
+ mdb_env_close(env);
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+int main(int argc, char *argv[])
|
||||
+{
|
||||
+ if (argc < 3)
|
||||
+ {
|
||||
+ goto fail;
|
||||
+ }
|
||||
+
|
||||
+ if (!strcmp(argv[1], "put"))
|
||||
+ {
|
||||
+ if (argc == 5)
|
||||
+ {
|
||||
+ int rc = do_put(argv[2], argv[3], argv[4]);
|
||||
+ return rc;
|
||||
+ }
|
||||
+ }
|
||||
+ else if (!strcmp(argv[1], "del"))
|
||||
+ {
|
||||
+ if (argc == 4)
|
||||
+ {
|
||||
+ int rc = do_del(argv[2], argv[3]);
|
||||
+ return rc;
|
||||
+ }
|
||||
+ }
|
||||
+ else if (!strcmp(argv[1], "init"))
|
||||
+ {
|
||||
+ if (argc == 3)
|
||||
+ {
|
||||
+ int rc = do_init(argv[2], 0L);
|
||||
+ return rc;
|
||||
+ }
|
||||
+ else if (argc == 5 && !strcmp(argv[3], "-m"))
|
||||
+ {
|
||||
+ int rc = do_init(argv[2], atol(argv[4]));
|
||||
+ do_stat(argv[2]);
|
||||
+ return rc;
|
||||
+ }
|
||||
+ }
|
||||
+ else if (!strcmp(argv[1], "maxr"))
|
||||
+ {
|
||||
+ if (argc == 3)
|
||||
+ {
|
||||
+ int rc = do_stat(argv[2]);
|
||||
+ return rc;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+fail:
|
||||
+ printf("Usage :\n");
|
||||
+ printf("Add a key and value to a DB file :\n");
|
||||
+ printf("\tlmmgr put dbfile key value\n");
|
||||
+ printf("Remove a key from a DB file :\n");
|
||||
+ printf("\tlmmgr del dbfile key\n");
|
||||
+ printf("Set a new maxreaders value of a DB file :\n");
|
||||
+ printf("\tlmmgr init dbfile [-m maxreaders]\n");
|
||||
+ printf("Give maxreaders value of a DB file :\n");
|
||||
+ printf("\tlmmgr maxr dbfile\n");
|
||||
+
|
||||
+ return 1;
|
||||
+}
|
124
Makefile-build-use-shared-lib.patch
Normal file
124
Makefile-build-use-shared-lib.patch
Normal file
@ -0,0 +1,124 @@
|
||||
From 3e19339d0d22c76ac0fd17f1a59ca2ae1c03f93a Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Stefan=20Br=C3=BCns?= <stefan.bruens@rwth-aachen.de>
|
||||
Date: Sun, 3 Jun 2018 23:49:29 +0200
|
||||
Subject: [PATCH 1/3] Set SONAME in shared lib
|
||||
|
||||
---
|
||||
libraries/liblmdb/Makefile | 6 +++---
|
||||
1 file changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/libraries/liblmdb/Makefile b/libraries/liblmdb/Makefile
|
||||
index f254511f1..489a08976 100644
|
||||
--- a/libraries/liblmdb/Makefile
|
||||
+++ b/libraries/liblmdb/Makefile
|
||||
@@ -38,7 +38,7 @@ mandir = $(datarootdir)/man
|
||||
########################################################################
|
||||
|
||||
IHDRS = lmdb.h
|
||||
-ILIBS = liblmdb.a liblmdb$(SOEXT)
|
||||
+ILIBS = liblmdb-$(SOVERSION)$(SOEXT)
|
||||
IPROGS = mdb_stat mdb_copy mdb_dump mdb_load
|
||||
IDOCS = mdb_stat.1 mdb_copy.1 mdb_dump.1 mdb_load.1
|
||||
PROGS = $(IPROGS) mtest mtest2 mtest3 mtest4 mtest5
|
||||
@@ -64,9 +64,9 @@ test: all
|
||||
liblmdb.a: mdb.o midl.o
|
||||
$(AR) rs $@ mdb.o midl.o
|
||||
|
||||
-liblmdb$(SOEXT): mdb.lo midl.lo
|
||||
+liblmdb-$(SOVERSION)$(SOEXT): mdb.lo midl.lo
|
||||
# $(CC) $(LDFLAGS) -pthread -shared -Wl,-Bsymbolic -o $@ mdb.o midl.o $(SOLIBS)
|
||||
- $(CC) $(LDFLAGS) -pthread -shared -o $@ mdb.lo midl.lo $(SOLIBS)
|
||||
+ $(CC) $(LDFLAGS) -pthread -shared -o $@ mdb.lo midl.lo $(SOLIBS) -Wl,-soname -Wl,liblmdb-$(SOVERSION).so
|
||||
|
||||
mdb_stat: mdb_stat.o liblmdb.a
|
||||
mdb_copy: mdb_copy.o liblmdb.a
|
||||
--
|
||||
2.17.0
|
||||
|
||||
From e4e77f24f0b45c308e4f774c67281d38dee0b060 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Stefan=20Br=C3=BCns?= <stefan.bruens@rwth-aachen.de>
|
||||
Date: Sun, 3 Jun 2018 23:52:16 +0200
|
||||
Subject: [PATCH 2/3] Use shared library
|
||||
|
||||
---
|
||||
libraries/liblmdb/Makefile | 24 ++++++++++++------------
|
||||
1 file changed, 12 insertions(+), 12 deletions(-)
|
||||
|
||||
diff --git a/libraries/liblmdb/Makefile b/libraries/liblmdb/Makefile
|
||||
index 489a08976..d926df798 100644
|
||||
--- a/libraries/liblmdb/Makefile
|
||||
+++ b/libraries/liblmdb/Makefile
|
||||
@@ -68,16 +68,16 @@ liblmdb-$(SOVERSION)$(SOEXT): mdb.lo midl.lo
|
||||
# $(CC) $(LDFLAGS) -pthread -shared -Wl,-Bsymbolic -o $@ mdb.o midl.o $(SOLIBS)
|
||||
$(CC) $(LDFLAGS) -pthread -shared -o $@ mdb.lo midl.lo $(SOLIBS) -Wl,-soname -Wl,liblmdb-$(SOVERSION).so
|
||||
|
||||
-mdb_stat: mdb_stat.o liblmdb.a
|
||||
-mdb_copy: mdb_copy.o liblmdb.a
|
||||
-mdb_dump: mdb_dump.o liblmdb.a
|
||||
-mdb_load: mdb_load.o liblmdb.a
|
||||
-mtest: mtest.o liblmdb.a
|
||||
-mtest2: mtest2.o liblmdb.a
|
||||
-mtest3: mtest3.o liblmdb.a
|
||||
-mtest4: mtest4.o liblmdb.a
|
||||
-mtest5: mtest5.o liblmdb.a
|
||||
-mtest6: mtest6.o liblmdb.a
|
||||
+mdb_stat: mdb_stat.o
|
||||
+mdb_copy: mdb_copy.o
|
||||
+mdb_dump: mdb_dump.o
|
||||
+mdb_load: mdb_load.o
|
||||
+mtest: mtest.o
|
||||
+mtest2: mtest2.o
|
||||
+mtest3: mtest3.o
|
||||
+mtest4: mtest4.o
|
||||
+mtest5: mtest5.o
|
||||
+mtest6: mtest6.o
|
||||
|
||||
mdb.o: mdb.c lmdb.h midl.h
|
||||
$(CC) $(CFLAGS) $(CPPFLAGS) -c mdb.c
|
||||
@@ -91,8 +91,8 @@ mdb.lo: mdb.c lmdb.h midl.h
|
||||
midl.lo: midl.c midl.h
|
||||
$(CC) $(CFLAGS) -fPIC $(CPPFLAGS) -c midl.c -o $@
|
||||
|
||||
-%: %.o
|
||||
- $(CC) $(CFLAGS) $(LDFLAGS) $^ $(LDLIBS) -o $@
|
||||
+%: %.o | liblmdb-$(SOVERSION)$(SOEXT)
|
||||
+ $(CC) $(CFLAGS) $(LDFLAGS) $^ $(LDLIBS) -L. -llmdb-$(SOVERSION) -o $@
|
||||
|
||||
%.o: %.c lmdb.h
|
||||
$(CC) $(CFLAGS) $(CPPFLAGS) -c $<
|
||||
--
|
||||
2.17.0
|
||||
|
||||
From 85810167f7db0091e0937e5fb464f7f7868d36a8 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Stefan=20Br=C3=BCns?= <stefan.bruens@rwth-aachen.de>
|
||||
Date: Sun, 3 Jun 2018 23:52:43 +0200
|
||||
Subject: [PATCH 3/3] Build/install CFEngine extra tools
|
||||
|
||||
---
|
||||
libraries/liblmdb/Makefile | 3 +++
|
||||
1 file changed, 3 insertions(+)
|
||||
|
||||
diff --git a/libraries/liblmdb/Makefile b/libraries/liblmdb/Makefile
|
||||
index d926df798..b2e95a642 100644
|
||||
--- a/libraries/liblmdb/Makefile
|
||||
+++ b/libraries/liblmdb/Makefile
|
||||
@@ -40,6 +40,7 @@ mandir = $(datarootdir)/man
|
||||
IHDRS = lmdb.h
|
||||
ILIBS = liblmdb-$(SOVERSION)$(SOEXT)
|
||||
IPROGS = mdb_stat mdb_copy mdb_dump mdb_load
|
||||
+IPROGS += lmdump lmmgr
|
||||
IDOCS = mdb_stat.1 mdb_copy.1 mdb_dump.1 mdb_load.1
|
||||
PROGS = $(IPROGS) mtest mtest2 mtest3 mtest4 mtest5
|
||||
all: $(ILIBS) $(PROGS)
|
||||
@@ -78,6 +79,8 @@ mtest3: mtest3.o
|
||||
mtest4: mtest4.o
|
||||
mtest5: mtest5.o
|
||||
mtest6: mtest6.o
|
||||
+lmmgr: lmmgr.o
|
||||
+lmdump: lmdump.o
|
||||
|
||||
mdb.o: mdb.c lmdb.h midl.h
|
||||
$(CC) $(CFLAGS) $(CPPFLAGS) -c mdb.c
|
||||
--
|
||||
2.17.0
|
||||
|
1
baselibs.conf
Normal file
1
baselibs.conf
Normal file
@ -0,0 +1 @@
|
||||
liblmdb-0_9_30
|
10
liblmdb-implicit-decl.patch
Normal file
10
liblmdb-implicit-decl.patch
Normal file
@ -0,0 +1,10 @@
|
||||
--- a/libraries/liblmdb.orig/lmmgr.c
|
||||
+++ b/libraries/liblmdb/lmmgr.c
|
||||
@@ -3,6 +3,7 @@ lmmgr.c : Add, remove or manage the maxr
|
||||
*/
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
+#include <stdlib.h>
|
||||
#include "lmdb.h"
|
||||
|
||||
static int report_error(int rc)
|
326
lmdb.changes
Normal file
326
lmdb.changes
Normal file
@ -0,0 +1,326 @@
|
||||
-------------------------------------------------------------------
|
||||
Sun Mar 19 09:00:43 UTC 2023 - Dirk Müller <dmueller@suse.com>
|
||||
|
||||
- update to 0.9.30:
|
||||
* LMDB page_split: key threshold depends on page
|
||||
size
|
||||
* avoid gcc optimization bug on sparc64 linux
|
||||
* - Mark infrequently used functions as cold
|
||||
* clear C_EOF on cursor with MDB_FIRST_DUP
|
||||
* Use sys/cachectl.h rather than asm/cachectl.h on
|
||||
mips
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Jan 23 08:02:00 UTC 2023 - Alexander Kuznetsov <alx.kuzza@gmail.com>
|
||||
- update to 0.9.29:
|
||||
* lmdump is not creating lock files
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Mar 19 21:04:06 UTC 2021 - Dirk Müller <dmueller@suse.com>
|
||||
|
||||
- update to 0.9.29:
|
||||
* ITS#9461 refix ITS#9376
|
||||
* ITS#9500 fix regression from ITS#8662
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Mar 03 01:34:52 UTC 2021 - Wang Jun <jgwang@suse.com>
|
||||
|
||||
- LMDB 0.9.28 Release (2021/02/04)
|
||||
* ITS#8662 add -a append option to mdb_load
|
||||
- LMDB 0.9.27 Release (2020/10/26)
|
||||
* ITS#9376 fix repeated DUPSORT cursor deletes
|
||||
- LMDB 0.9.26 Release (2020/08/11)
|
||||
* ITS#9278 fix robust mutex cleanup for FreeBSD
|
||||
- LMDB 0.9.25 Release (2020/01/30)
|
||||
* ITS#9068 fix mdb_dump/load backslashes in printable content
|
||||
* ITS#9118 add MAP_NOSYNC for FreeBSD
|
||||
* ITS#9155 free mt_spill_pgs in non-nested txn on end
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sat Mar 21 23:12:06 UTC 2020 - Marcus Rueckert <mrueckert@suse.de>
|
||||
|
||||
- copy the pkg config support from the fedora package
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sat Mar 21 23:05:48 UTC 2020 - Marcus Rueckert <mrueckert@suse.de>
|
||||
|
||||
- LMDB 0.9.24 Release (2019/07/24)
|
||||
* ITS#8969 Tweak mdb_page_split
|
||||
* ITS#8975 WIN32 fix writemap set_mapsize crash
|
||||
* ITS#9007 Fix loose pages in WRITEMAP
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Mar 25 21:10:07 UTC 2019 - Stefan Brüns <stefan.bruens@rwth-aachen.de>
|
||||
|
||||
- LMDB 0.9.23 Release (2018/12/19)
|
||||
* ITS#8756 Fix loose pages in dirty list
|
||||
* ITS#8831 Fix mdb_load flag init
|
||||
* ITS#8844 Fix mdb_env_close in forked process
|
||||
* Documentation
|
||||
+ ITS#8857 mdb_cursor_del doesn't invalidate cursor
|
||||
+ ITS#8908 GET_MULTIPLE etc don't change passed in key
|
||||
- Drop upstream 0001-ITS-8756-remove-loose-pg-from-dirty-list-in-freelist.patch
|
||||
- Cleanup:
|
||||
* Use %license, drop %defattr
|
||||
* Use https for Url tag
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sat Oct 6 14:18:37 UTC 2018 - Stefan Brüns <stefan.bruens@rwth-aachen.de>
|
||||
|
||||
- Fix occasional crash when freed pages landed on the dirty list twice
|
||||
* Add 0001-ITS-8756-remove-loose-pg-from-dirty-list-in-freelist.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sun Jun 3 19:23:50 UTC 2018 - stefan.bruens@rwth-aachen.de
|
||||
|
||||
- LMDB 0.9.22 Release (2018-03-22)
|
||||
* Fix MDB_DUPSORT alignment bug (ITS#8819)
|
||||
* Fix regression with new db from 0.9.19 (ITS#8760)
|
||||
* Fix liblmdb to build on Solaris (ITS#8612)
|
||||
* Fix delete behavior with DUPSORT DB (ITS#8622)
|
||||
* Fix mdb_cursor_get/mdb_cursor_del behavior (ITS#8722)
|
||||
- LMDB 0.9.21 Release (2017/06/01)
|
||||
* Fix xcursor after cursor_del (ITS#8622)
|
||||
- LMDB 0.9.20 (Withdrawn)
|
||||
* Fix mdb_load with escaped plaintext (ITS#8558)
|
||||
* Fix mdb_cursor_last / mdb_put interaction (ITS#8557)
|
||||
- LMDB 0.9.19 Release (2016/12/28)
|
||||
* Fix mdb_env_cwalk cursor init (ITS#8424)
|
||||
* Fix robust mutexes on Solaris 10/11 (ITS#8339)
|
||||
* Tweak Win32 error message buffer
|
||||
* Fix MDB_GET_BOTH on non-dup record (ITS#8393)
|
||||
* Optimize mdb_drop
|
||||
* Fix xcursors after mdb_cursor_del (ITS#8406)
|
||||
* Fix MDB_NEXT_DUP after mdb_cursor_del (ITS#8412)
|
||||
* Fix mdb_cursor_put resetting C_EOF (ITS#8489)
|
||||
* Fix mdb_env_copyfd2 to return EPIPE on SIGPIPE (ITS#8504)
|
||||
* Fix mdb_env_copy with empty DB (ITS#8209)
|
||||
* Fix behaviors with fork (ITS#8505)
|
||||
* Fix mdb_dbi_open with mainDB cursors (ITS#8542)
|
||||
* Fix robust mutexes on kFreeBSD (ITS#8554)
|
||||
* Fix utf8_to_utf16 error checks (ITS#7992)
|
||||
* Fix F_NOCACHE on MacOS, error is non-fatal (ITS#7682)
|
||||
* Build
|
||||
Make shared lib suffix overridable (ITS#8481)
|
||||
* Documentation
|
||||
+ Cleanup doxygen nits
|
||||
+ Note reserved vs actual mem/disk usage
|
||||
- LMDB 0.9.18 Release (2016/02/05)
|
||||
* Fix robust mutex detection on glibc 2.10-11 (ITS#8330)
|
||||
* Fix page_search_root assert on FreeDB (ITS#8336)
|
||||
* Fix MDB_APPENDDUP vs. rewrite(single item) (ITS#8334)
|
||||
* Fix mdb_copy of large files on Windows
|
||||
* Fix subcursor move after delete (ITS#8355)
|
||||
* Fix mdb_midl_shirnk off-by-one (ITS#8363)
|
||||
* Check for utf8_to_utf16 failures (ITS#7992)
|
||||
* Catch strdup failure in mdb_dbi_open
|
||||
* Build
|
||||
+ Additional makefile var tweaks (ITS#8169)
|
||||
* Documentation
|
||||
+ Add Getting Started page
|
||||
+ Update WRITEMAP description
|
||||
- Drop 0002-Autoconf-files.patch, soname-configurable.patch and
|
||||
add Makefile-build-use-shared-lib.patch instead. Instead of
|
||||
replacing the Makefile with a libtool/automake based one, just
|
||||
patch the relevant parts of the upstream Makefile.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Oct 13 13:45:42 UTC 2017 - dmueller@suse.com
|
||||
|
||||
- add soname-configurable.patch: Actually set the soname in the
|
||||
shared library rather than just renaming the files on disk post
|
||||
install (which does not actually do anything)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sun Jun 19 01:07:37 UTC 2016 - stefan.bruens@rwth-aachen.de
|
||||
|
||||
- Update 0001-Add-extra-tools-and-CFEngine-modifications-for-LMDB.patch
|
||||
* do not force enable NOSUBDIR option in mdb_copy
|
||||
- Update 0002-Autoconf-files.patch
|
||||
* build mdb_dump, mdb_load
|
||||
* distribute manpages
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Feb 1 13:01:34 UTC 2016 - kkaempf@suse.com
|
||||
|
||||
- Renamed patches
|
||||
0002-Add-extra-tools-and-CFEngine-modifications-for-LMDB.patch
|
||||
-> 0001-Add-extra-tools-and-CFEngine-modifications-for-LMDB.patch
|
||||
automake.diff
|
||||
-> 0002-Autoconf-files.patch
|
||||
|
||||
0003-Optimization-Define-correct-cacheline-size-on-HPUX.patch
|
||||
|
||||
- Dropped patch (upstream)
|
||||
0001-Patch-for-LMDB-to-use-robust-mutexes.patch
|
||||
|
||||
- Update to 0.9.17
|
||||
Fix ITS#7377 catch calloc failure
|
||||
Fix ITS#8237 regression from ITS#7589
|
||||
Fix ITS#8238 page_split for DUPFIXED pages
|
||||
Fix ITS#8221 MDB_PAGE_FULL on delete/rebalance
|
||||
Fix ITS#8258 rebalance/split assert
|
||||
Fix ITS#8263 cursor_put cursor tracking
|
||||
Fix ITS#8264 cursor_del cursor tracking
|
||||
Fix ITS#8310 cursor_del cursor tracking
|
||||
Fix ITS#8299 mdb_del cursor tracking
|
||||
Fix ITS#8300 mdb_del cursor tracking
|
||||
Fix ITS#8304 mdb_del cursor tracking
|
||||
Fix ITS#7771 fakepage cursor tracking
|
||||
Fix ITS#7789 ensure mapsize >= pages in use
|
||||
Fix ITS#7971 mdb_txn_renew0() new reader slots
|
||||
Fix ITS#7969 use __sync_synchronize on non-x86
|
||||
Fix ITS#8311 page_split from update_key
|
||||
Fix ITS#8312 loose pages in nested txn
|
||||
Fix ITS#8313 mdb_rebalance dummy cursor
|
||||
Fix ITS#8315 dirty_room in nested txn
|
||||
Fix ITS#8323 dirty_list in nested txn
|
||||
Fix ITS#8316 page_merge cursor tracking
|
||||
Fix ITS#8321 cursor tracking
|
||||
Fix ITS#8319 mdb_load error messages
|
||||
Fix ITS#8320 mdb_load plaintext input
|
||||
Added mdb_txn_id() (ITS#7994)
|
||||
Added robust mutex support
|
||||
Miscellaneous cleanup/simplification
|
||||
Build
|
||||
Create install dirs if needed (ITS#8256)
|
||||
Fix ThreadProc decl on Win32/MSVC (ITS#8270)
|
||||
Added ssize_t typedef for MSVC (ITS#8067)
|
||||
Use ANSI apis on Windows (ITS#8069)
|
||||
Use O_SYNC if O_DSYNC,MDB_DSYNC are not defined (ITS#7209)
|
||||
Allow passing AR to make (ITS#8168)
|
||||
Allow passing mandir to make install (ITS#8169)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sun Nov 15 10:04:11 UTC 2015 - jengelh@inai.de
|
||||
|
||||
- Use a source URL
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sat Oct 24 18:20:27 UTC 2015 - hrvoje.senjan@gmail.com
|
||||
|
||||
- Update to 0.9.16:
|
||||
* Fix cursor EOF bug (ITS#8190)
|
||||
* Fix handling of subDB records (ITS#8181)
|
||||
* Fix mdb_midl_shrink() usage (ITS#8200)
|
||||
- Changes since 0.9.15:
|
||||
* Fix txn init (ITS#7961,#7987)
|
||||
* Fix MDB_PREV_DUP (ITS#7955,#7671)
|
||||
* Fix compact of empty env (ITS#7956)
|
||||
* Fix mdb_copy file mode
|
||||
* Fix mdb_env_close() after failed mdb_env_open()
|
||||
* Fix mdb_rebalance collapsing root (ITS#8062)
|
||||
* Fix mdb_load with large values (ITS#8066)
|
||||
* Fix to retry writes on EINTR (ITS#8106)
|
||||
* Fix mdb_cursor_del on empty DB (ITS#8109)
|
||||
* Fix MDB_INTEGERDUP key compare (ITS#8117)
|
||||
* Fix error handling (ITS#7959,#8157,etc.)
|
||||
* Fix race conditions (ITS#7969,7970)
|
||||
* Added workaround for fdatasync bug in ext3fs
|
||||
* Build:
|
||||
* Don't use -fPIC for static lib
|
||||
* Update .gitignore (ITS#7952,#7953)
|
||||
* Cleanup for "make test" (ITS#7841), "make clean", mtest*.c
|
||||
* Misc. Android/Windows cleanup
|
||||
* Documentation
|
||||
* Fix MDB_APPEND doc
|
||||
* Fix MDB_MAXKEYSIZE doc (ITS#8156)
|
||||
* Fix mdb_cursor_put,mdb_cursor_del EACCES description
|
||||
* Fix mdb_env_sync(MDB_RDONLY env) doc (ITS#8021)
|
||||
* Clarify MDB_WRITEMAP doc (ITS#8021)
|
||||
* Clarify mdb_env_open doc
|
||||
* Clarify mdb_dbi_open doc
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Sep 18 07:45:59 UTC 2015 - dimstar@opensuse.org
|
||||
|
||||
- Add baselibs.conf: liblmdb*-32bit is required by
|
||||
libKF5Baloo5-32bit.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Mar 31 15:42:55 UTC 2015 - hrvoje.senjan@gmail.com
|
||||
|
||||
- Update to 0.9.14:
|
||||
* Fix to support 64K page size (ITS#7713)
|
||||
* Fix to persist decreased as well as increased mapsizes (ITS#7789)
|
||||
* Fix cursor bug when deleting last node of a DUPSORT key
|
||||
* Fix mdb_env_info to return FIXEDMAP address
|
||||
* Fix ambiguous error code from writing to closed DBI (ITS#7825)
|
||||
* Fix mdb_copy copying past end of file (ITS#7886)
|
||||
* Fix cursor bugs from page_merge/rebalance
|
||||
* Fix to dirty fewer pages in deletes (mdb_page_loose())
|
||||
* Fix mdb_dbi_open creating subDBs (ITS#7917)
|
||||
* Fix mdb_cursor_get(_DUP) with single value (ITS#7913)
|
||||
* Fix Windows compat issues in mtests (ITS#7879)
|
||||
* Add compacting variant of mdb_copy
|
||||
* Add BigEndian integer key compare code
|
||||
* Add mdb_dump/mdb_load utilities
|
||||
- Changes since 0.9.13:
|
||||
* Fix mdb_page_alloc unlimited overflow page search
|
||||
* Documentation:
|
||||
Re-fix MDB_CURRENT doc (ITS#7793)
|
||||
Fix MDB_GET_MULTIPLE/MDB_NEXT_MULTIPLE doc
|
||||
- Changes since 0.9.12:
|
||||
* Fix MDB_GET_BOTH regression (ITS#7875,#7681)
|
||||
* Fix MDB_MULTIPLE writing multiple keys (ITS#7834)
|
||||
* Fix mdb_rebalance (ITS#7829)
|
||||
* Fix mdb_page_split (ITS#7815)
|
||||
* Fix md_entries count (ITS#7861,#7828,#7793)
|
||||
* Fix MDB_CURRENT (ITS#7793)
|
||||
* Fix possible crash on Windows DLL detach
|
||||
* Misc code cleanup
|
||||
* Documentation:
|
||||
mdb_cursor_put: cursor moves on error (ITS#7771)
|
||||
- Rebase automake.diff and 0001-Patch-for-LMDB-to-use-robust-mutexes.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Sep 10 20:34:09 UTC 2014 - crrodriguez@opensuse.org
|
||||
|
||||
- automake.diff changes:
|
||||
* for autoconf tests to have effect, (like those in
|
||||
0001-Patch-for-LMDB-to-use-robust-mutexes.patch) config.h must be
|
||||
included as first file in all C code.
|
||||
* in 32 bit systems, ensure we support large databases.
|
||||
* Switch the compiler to the current C standard, currently -std=gnu99
|
||||
in upcoming autoconf versions it is C11 though.
|
||||
- liblmdb-implicit-decl.patch atol() requires stdlib.h
|
||||
- Enable verbose build, rpmlint depends on that to work.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Jul 28 15:55:31 UTC 2014 - kkaempf@suse.com
|
||||
|
||||
- Prevent deadlock when process holding the db lock dies
|
||||
0001-Patch-for-LMDB-to-use-robust-mutexes.patch
|
||||
|
||||
- command line tools for debugging
|
||||
0002-Add-extra-tools-and-CFEngine-modifications-for-LMDB.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri May 16 20:00:29 UTC 2014 - jengelh@inai.de
|
||||
|
||||
- Replace verbose cmake script (remove CMakeLists.txt).
|
||||
- Instead, use a simpler automake patch (add automake.diff).
|
||||
- There is a change in shared library versioning scheme to line up
|
||||
with our packaging guidelines. This is embodied within
|
||||
automake.diff.
|
||||
- Shorten the description by 2/3, focus on the important points.
|
||||
- Do not unnecessarily pull in a C++ compiler for the build.
|
||||
- Invoke ldconfig directly as %post rather than sh+ldconfig.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Feb 12 13:53:21 UTC 2014 - kkaempf@suse.com
|
||||
|
||||
- Switch to cmake, fix dynamic lib build and versioning.
|
||||
Drop liblmdb.patch
|
||||
Add VERSION.cmake and CMakeLists.txt
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Feb 6 15:27:13 CET 2014 - ro@suse.de
|
||||
|
||||
- at least set an soname, a version would be even better
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Feb 3 17:58:23 UTC 2014 - kkaempf@suse.com
|
||||
|
||||
- Initial version 0.9.11
|
||||
|
11
lmdb.pc.in
Normal file
11
lmdb.pc.in
Normal file
@ -0,0 +1,11 @@
|
||||
prefix=@PREFIX@
|
||||
exec_prefix=@EXEC_PREFIX@
|
||||
libdir=@LIBDIR@
|
||||
includedir=@INCLUDEDIR@
|
||||
|
||||
Name: liblmdb
|
||||
Description: Lightning Memory-mapped key-value database
|
||||
URL: http://symas.com/mdb/
|
||||
Version: @PACKAGE_VERSION@
|
||||
Libs: -L${libdir} -llmdb
|
||||
Cflags: -I${includedir}
|
131
lmdb.spec
Normal file
131
lmdb.spec
Normal file
@ -0,0 +1,131 @@
|
||||
#
|
||||
# spec file for package lmdb
|
||||
#
|
||||
# Copyright (c) 2023 SUSE LLC
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
# upon. The license for this file, and modifications and additions to the
|
||||
# file, is the same license as for the pristine package itself (unless the
|
||||
# license for the pristine package is not an Open Source License, in which
|
||||
# case the license is the MIT License). An "Open Source License" is a
|
||||
# license that conforms to the Open Source Definition (Version 1.9)
|
||||
# published by the Open Source Initiative.
|
||||
|
||||
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
||||
#
|
||||
|
||||
|
||||
Name: lmdb
|
||||
Summary: Lightning Memory-Mapped Database Manager
|
||||
License: OLDAP-2.8
|
||||
Group: Productivity/Databases/Tools
|
||||
%define lname liblmdb-0_9_30
|
||||
Version: 0.9.30
|
||||
Release: 0
|
||||
URL: https://symas.com/mdb/
|
||||
Source: https://git.openldap.org/openldap/openldap/-/archive/LMDB_%{version}/openldap-LMDB_%{version}.tar.gz
|
||||
Source1: lmdb.pc.in
|
||||
Source99: baselibs.conf
|
||||
|
||||
# PATCH-FIX-UPSTREAM - debugging tools (https://github.com/kacfengine/lmdb)
|
||||
Patch1: 0001-Add-extra-tools-and-CFEngine-modifications-for-LMDB.patch
|
||||
# PATCH-FIX-OPENSUSE - Implicit declaration of atol()
|
||||
Patch2: liblmdb-implicit-decl.patch
|
||||
# PATCH-FIX-OPENSUSE - Build and link to shared library
|
||||
Patch3: Makefile-build-use-shared-lib.patch
|
||||
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
%if 0%{?rhel_version} == 700
|
||||
BuildRequires: perl-Exporter
|
||||
%endif
|
||||
|
||||
%description
|
||||
LMDB is a Btree-based database management library with an API similar
|
||||
to BerkeleyDB. The library is thread-aware and supports concurrent
|
||||
read/write access from multiple processes and threads. The DB
|
||||
structure is multi-versioned, and data pages use a copy-on-write
|
||||
strategy, which also provides resistance to corruption and eliminates
|
||||
the need for any recovery procedures. The database is exposed in a
|
||||
memory map, requiring no page cache layer of its own.
|
||||
|
||||
%package -n %lname
|
||||
Summary: Shared library for Lightning Memory-Mapped Database (LMDB)
|
||||
Group: System/Libraries
|
||||
|
||||
%description -n %lname
|
||||
LMDB is a Btree-based database management library with an API similar
|
||||
to BerkeleyDB. The library is thread-aware and supports concurrent
|
||||
read/write access from multiple processes and threads. The DB
|
||||
structure is multi-versioned, and data pages use a copy-on-write
|
||||
strategy, which also provides resistance to corruption and eliminates
|
||||
the need for any recovery procedures. The database is exposed in a
|
||||
memory map, requiring no page cache layer of its own.
|
||||
|
||||
This package contains the shared library.
|
||||
|
||||
%package devel
|
||||
Summary: Development package for lmdb
|
||||
Group: Development/Libraries/C and C++
|
||||
Requires: %lname = %version
|
||||
|
||||
%description devel
|
||||
LMDB is a Btree-based database management library with an API similar
|
||||
to BerkeleyDB. The library is thread-aware and supports concurrent
|
||||
read/write access from multiple processes and threads. The DB
|
||||
structure is multi-versioned, and data pages use a copy-on-write
|
||||
strategy, which also provides resistance to corruption and eliminates
|
||||
the need for any recovery procedures. The database is exposed in a
|
||||
memory map, requiring no page cache layer of its own.
|
||||
|
||||
This package contains the files needed to compile programs that use
|
||||
the liblmdb library.
|
||||
|
||||
%prep
|
||||
%setup -qn openldap-LMDB_%version
|
||||
%patch1 -p1
|
||||
%patch2 -p1
|
||||
%patch3 -p1
|
||||
|
||||
%build
|
||||
cd libraries/liblmdb
|
||||
make %{?_smp_mflags} V=1 SOVERSION=%{version} CFLAGS="%{optflags}"
|
||||
|
||||
%install
|
||||
cd libraries/liblmdb
|
||||
make install DESTDIR="%buildroot" SOVERSION=%{version} \
|
||||
bindir=%{_bindir} \
|
||||
libdir=%{_libdir} \
|
||||
mandir=%{_mandir} \
|
||||
includedir=%{_includedir} \
|
||||
datarootdir=%{_datadir}
|
||||
ln -s %{_libdir}/liblmdb-%{version}.so %{buildroot}%{_libdir}/liblmdb.so
|
||||
|
||||
# Install pkgconfig file
|
||||
sed -e 's:@PREFIX@:%{_prefix}:g' \
|
||||
-e 's:@EXEC_PREFIX@:%{_exec_prefix}:g' \
|
||||
-e 's:@LIBDIR@:%{_libdir}:g' \
|
||||
-e 's:@INCLUDEDIR@:%{_includedir}:g' \
|
||||
-e 's:@PACKAGE_VERSION@:%{version}:g' \
|
||||
%{SOURCE1} >lmdb.pc
|
||||
install -Dpm 0644 -t %{buildroot}%{_libdir}/pkgconfig lmdb.pc
|
||||
|
||||
%post -n %lname -p /sbin/ldconfig
|
||||
%postun -n %lname -p /sbin/ldconfig
|
||||
|
||||
%files
|
||||
%doc libraries/liblmdb/CHANGES
|
||||
%doc libraries/liblmdb/COPYRIGHT
|
||||
%license libraries/liblmdb/LICENSE
|
||||
%{_bindir}/*
|
||||
%doc %{_mandir}/man1/*.1.gz
|
||||
|
||||
%files -n %lname
|
||||
%_libdir/liblmdb-%version.so
|
||||
|
||||
%files devel
|
||||
%_includedir/*
|
||||
%_libdir/liblmdb.so
|
||||
%_libdir/pkgconfig/lmdb.pc
|
||||
|
||||
%changelog
|
BIN
openldap-LMDB_0.9.30.tar.gz
(Stored with Git LFS)
Normal file
BIN
openldap-LMDB_0.9.30.tar.gz
(Stored with Git LFS)
Normal file
Binary file not shown.
Loading…
Reference in New Issue
Block a user