Skip to contentSkip to conversation

lmdb: add recipe

PATCH Superseded Sakib Sajal 2 participants 5 messages Jun 16, 2021 – Jul 6, 2021

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 lmdb: add recipe

lmdb provides a high-performance embedded transactional database in the form of a key-value store.

Recipe is ported from meta-qt5-extra layer.

---
 .../files/0001-Patch-the-main-Makefile.patch  | 90 +++++++++++++++++++
 meta-oe/recipes-dbs/lmdb/lmdb_git.bb          | 22 +++++
 2 files changed, 112 insertions(+)
 create mode 100644 meta-oe/recipes-dbs/lmdb/files/0001-Patch-the-main-Makefile.patch
 create mode 100644 meta-oe/recipes-dbs/lmdb/lmdb_git.bb
meta-oe/recipes-dbs/lmdb/files/0001-Patch-the-main-Makefile.patch new file +90 -0
new file mode 100644
index 000000000..9ba626101
@@ -0,0 +1,90 @@
+From: =?UTF-8?q?Andreas=20M=C3=BCller?= <[email protected]>
+Date: Tue, 1 Sep 2015 22:54:31 +0200
+Subject: [PATCH] Patch the main Makefile to allow for a build that complies to packaging guidelines.
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Taken from [1]
+
+[1] https://src.fedoraproject.org/rpms/lmdb/raw/master/f/lmdb-make.patch
+
+Upstream-Status: Pending
+
+
+diff --git a/Makefile b/Makefile
+--- a/Makefile
++++ b/Makefile
+@@ -26,6 +26,7 @@ OPT = -O2 -g
+ CFLAGS	= $(THREADS) $(OPT) $(W) $(XCFLAGS)
+ LDLIBS	=
+ SOLIBS	=
++SOVERSION	= 0.0.0
+ SOEXT	= .so
+ prefix	= /usr/local
+ exec_prefix = $(prefix)
+@@ -38,7 +39,7 @@ mandir = $(datarootdir)/man
+ ########################################################################
+ 
+ IHDRS	= lmdb.h
+-ILIBS	= liblmdb.a liblmdb$(SOEXT)
++ILIBS	= liblmdb$(SOEXT) liblmdb$(SOEXT).$(SOVERSION)
+ 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
+@@ -49,13 +50,13 @@ install: $(ILIBS) $(IPROGS) $(IHDRS)
+ 	mkdir -p $(DESTDIR)$(libdir)
+ 	mkdir -p $(DESTDIR)$(includedir)
+ 	mkdir -p $(DESTDIR)$(mandir)/man1
+-	for f in $(IPROGS); do cp $$f $(DESTDIR)$(bindir); done
+-	for f in $(ILIBS); do cp $$f $(DESTDIR)$(libdir); done
+-	for f in $(IHDRS); do cp $$f $(DESTDIR)$(includedir); done
+-	for f in $(IDOCS); do cp $$f $(DESTDIR)$(mandir)/man1; done
++	for f in $(IPROGS); do cp -a $$f $(DESTDIR)$(bindir); done
++	for f in $(ILIBS); do cp -a $$f $(DESTDIR)$(libdir); done
++	for f in $(IHDRS); do cp -a $$f $(DESTDIR)$(includedir); done
++	for f in $(IDOCS); do cp -a $$f $(DESTDIR)$(mandir)/man1; done
+ 
+ clean:
+-	rm -rf $(PROGS) *.[ao] *.[ls]o *~ testdb
++	rm -rf $(PROGS) *.[ao] *.[ls]o* *~ testdb
+ 
+ test:	all
+ 	rm -rf testdb && mkdir testdb
+@@ -64,20 +65,24 @@ test:	all
+ liblmdb.a:	mdb.o midl.o
+ 	$(AR) rs $@ mdb.o midl.o
+ 
+-liblmdb$(SOEXT):	mdb.lo midl.lo
++liblmdb$(SOEXT):	liblmdb$(SOEXT).$(SOVERSION)
++	rm -f $@
++	ln -s $< $@
++
++liblmdb$(SOEXT).$(SOVERSION):	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 -Wl,-soname,$@ -o $@ mdb.lo midl.lo $(SOLIBS)
+ 
+-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 liblmdb.so
++mdb_copy: mdb_copy.o liblmdb.so
++mdb_dump: mdb_dump.o liblmdb.so
++mdb_load: mdb_load.o liblmdb.so
++mtest:    mtest.o    liblmdb.so
++mtest2:	mtest2.o liblmdb.so
++mtest3:	mtest3.o liblmdb.so
++mtest4:	mtest4.o liblmdb.so
++mtest5:	mtest5.o liblmdb.so
++mtest6:	mtest6.o liblmdb.so
+ 
+ mdb.o: mdb.c lmdb.h midl.h
+ 	$(CC) $(CFLAGS) $(CPPFLAGS) -c mdb.c
meta-oe/recipes-dbs/lmdb/lmdb_git.bb new file +22 -0
new file mode 100644
index 000000000..22db6d44b
@@ -0,0 +1,22 @@
+SUMMARY = "Symas Lightning Memory-Mapped Database (LMDB)"
+HOMEPAGE = "http://symas.com/mdb/"
+LICENSE = "OLDAP-2.8"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=153d07ef052c4a37a8fac23bc6031972"
+
+SRC_URI = " \
+    git://github.com/LMDB/lmdb.git;nobranch=1 \
+    file://0001-Patch-the-main-Makefile.patch \
+"
+SRCREV = "8ad7be2510414b9506ec9f9e24f24d04d9b04a1a"
+S = "${WORKDIR}/git/libraries/liblmdb"
+PV = "0.9.29"
+
+do_compile() {
+    oe_runmake "CC=${CC}"
+}
+
+do_install() {
+    oe_runmake DESTDIR=${D} prefix=${prefix} libdir=${libdir} mandir=${mandir} install
+    chown -R root:root ${D}${bindir}
+    chown -R root:root ${D}${libdir}
+}
Signature · 1 line
2.25.1
#1 lore raw
Quoted 115 lines · Sakib Sajal

lmdb provides a high-performance embedded transactional database in the form of a key-value store.

Recipe is ported from meta-qt5-extra layer.

---
  .../files/0001-Patch-the-main-Makefile.patch  | 90 +++++++++++++++++++
  meta-oe/recipes-dbs/lmdb/lmdb_git.bb          | 22 +++++
  2 files changed, 112 insertions(+)

create mode 100644 meta-oe/recipes-dbs/lmdb/files/0001-Patch-the-main-Makefile.patch create mode 100644 meta-oe/recipes-dbs/lmdb/lmdb_git.bb

meta-oe/recipes-dbs/lmdb/files/0001-Patch-the-main-Makefile.patch new file +90 -0
new file mode 100644
index 000000000..9ba626101
@@ -0,0 +1,90 @@
+From: =?UTF-8?q?Andreas=20M=C3=BCller?= <[email protected]>
+Date: Tue, 1 Sep 2015 22:54:31 +0200
+Subject: [PATCH] Patch the main Makefile to allow for a build that complies to packaging guidelines.
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Taken from [1]
+
+[1] https://src.fedoraproject.org/rpms/lmdb/raw/master/f/lmdb-make.patch
+
+Upstream-Status: Pending
+
+
+diff --git a/Makefile b/Makefile
+--- a/Makefile
++++ b/Makefile
+@@ -26,6 +26,7 @@ OPT = -O2 -g
+ CFLAGS	= $(THREADS) $(OPT) $(W) $(XCFLAGS)
+ LDLIBS	=
+ SOLIBS	=
++SOVERSION	= 0.0.0
+ SOEXT	= .so
+ prefix	= /usr/local
+ exec_prefix = $(prefix)
+@@ -38,7 +39,7 @@ mandir = $(datarootdir)/man
+ ########################################################################
+
+ IHDRS	= lmdb.h
+-ILIBS	= liblmdb.a liblmdb$(SOEXT)
++ILIBS	= liblmdb$(SOEXT) liblmdb$(SOEXT).$(SOVERSION)
+ 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
+@@ -49,13 +50,13 @@ install: $(ILIBS) $(IPROGS) $(IHDRS)
+ 	mkdir -p $(DESTDIR)$(libdir)
+ 	mkdir -p $(DESTDIR)$(includedir)
+ 	mkdir -p $(DESTDIR)$(mandir)/man1
+-	for f in $(IPROGS); do cp $$f $(DESTDIR)$(bindir); done
+-	for f in $(ILIBS); do cp $$f $(DESTDIR)$(libdir); done
+-	for f in $(IHDRS); do cp $$f $(DESTDIR)$(includedir); done
+-	for f in $(IDOCS); do cp $$f $(DESTDIR)$(mandir)/man1; done
++	for f in $(IPROGS); do cp -a $$f $(DESTDIR)$(bindir); done
++	for f in $(ILIBS); do cp -a $$f $(DESTDIR)$(libdir); done
++	for f in $(IHDRS); do cp -a $$f $(DESTDIR)$(includedir); done
++	for f in $(IDOCS); do cp -a $$f $(DESTDIR)$(mandir)/man1; done
+
+ clean:
+-	rm -rf $(PROGS) *.[ao] *.[ls]o *~ testdb
++	rm -rf $(PROGS) *.[ao] *.[ls]o* *~ testdb
+
+ test:	all
+ 	rm -rf testdb && mkdir testdb
+@@ -64,20 +65,24 @@ test:	all
+ liblmdb.a:	mdb.o midl.o
+ 	$(AR) rs $@ mdb.o midl.o
+
+-liblmdb$(SOEXT):	mdb.lo midl.lo
++liblmdb$(SOEXT):	liblmdb$(SOEXT).$(SOVERSION)
++	rm -f $@
++	ln -s $< $@
++
++liblmdb$(SOEXT).$(SOVERSION):	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 -Wl,-soname,$@ -o $@ mdb.lo midl.lo $(SOLIBS)
+
+-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 liblmdb.so
++mdb_copy: mdb_copy.o liblmdb.so
++mdb_dump: mdb_dump.o liblmdb.so
++mdb_load: mdb_load.o liblmdb.so
++mtest:    mtest.o    liblmdb.so
++mtest2:	mtest2.o liblmdb.so
++mtest3:	mtest3.o liblmdb.so
++mtest4:	mtest4.o liblmdb.so
++mtest5:	mtest5.o liblmdb.so
++mtest6:	mtest6.o liblmdb.so
+
+ mdb.o: mdb.c lmdb.h midl.h
+ 	$(CC) $(CFLAGS) $(CPPFLAGS) -c mdb.c
meta-oe/recipes-dbs/lmdb/lmdb_git.bb new file +0 -0
new file mode 100644
index 000000000..22db6d44b

meta-oe/recipes-dbs/lmdb/lmdb_git.bb line 3

Quoted 3 lines
meta-oe/recipes-dbs/lmdb/lmdb_git.bb new file +3 -0
@@ -0,0 +1,22 @@
+SUMMARY = "Symas Lightning Memory-Mapped Database (LMDB)"
+HOMEPAGE = "http://symas.com/mdb/"
+LICENSE = "OLDAP-2.8"

We might need a copy of this license in meta-oe/licenses too.

meta-oe/recipes-dbs/lmdb/lmdb_git.bb line 12

Quoted 9 lines
meta-oe/recipes-dbs/lmdb/lmdb_git.bb new file +9 -0
+LIC_FILES_CHKSUM = "file://LICENSE;md5=153d07ef052c4a37a8fac23bc6031972"
+
+SRC_URI = " \
+    git://github.com/LMDB/lmdb.git;nobranch=1 \
+    file://0001-Patch-the-main-Makefile.patch \
+"
+SRCREV = "8ad7be2510414b9506ec9f9e24f24d04d9b04a1a"
+S = "${WORKDIR}/git/libraries/liblmdb"
+PV = "0.9.29"

remove PV here and rename recipe to lmdb_0.0.29.bb

meta-oe/recipes-dbs/lmdb/lmdb_git.bb line 21

Quoted 9 lines
meta-oe/recipes-dbs/lmdb/lmdb_git.bb new file +9 -0
+
+do_compile() {
+    oe_runmake "CC=${CC}"
+}
+
+do_install() {
+    oe_runmake DESTDIR=${D} prefix=${prefix} libdir=${libdir} mandir=${mandir} install
+    chown -R root:root ${D}${bindir}
+    chown -R root:root ${D}${libdir}

why do we need this extra chown op? Is pseudo not able to handle it?

please add it to relevant test packagegroup in packagegroups-meta-oe.bb as well.

Quoted 6 lines
meta-oe/recipes-dbs/lmdb/lmdb_git.bb new file +1 -0
+}
#2 lore raw
Quoted 142 lines · Khem Raj

[Please note: This e-mail is from an EXTERNAL e-mail address]

Quoted 120 lines · Sakib Sajal

lmdb provides a high-performance embedded transactional database in the form of a key-value store.

Recipe is ported from meta-qt5-extra layer.

---
  .../files/0001-Patch-the-main-Makefile.patch  | 90 +++++++++++++++++++ meta-oe/recipes-dbs/lmdb/lmdb_git.bb          | 22 +++++

  2 files changed, 112 insertions(+)

  create mode 100644 meta-oe/recipes-dbs/lmdb/files/0001-Patch-the-main-Makefile.patch create mode 100644 meta-oe/recipes-dbs/lmdb/lmdb_git.bb

meta-oe/recipes-dbs/lmdb/files/0001-Patch-the-main-Makefile.patch new file +3 -0
new file mode 100644
index 000000000..9ba626101
@@ -0,0 +1,90 @@
+From: =?UTF-8?q?Andreas=20M=C3=BCller?= <[email protected]>
+Date: Tue, 1 Sep 2015 22:54:31 +0200
+Subject: [PATCH] Patch the main Makefile to allow for a build that 

complies to packaging guidelines.

meta-oe/recipes-dbs/lmdb/files/0001-Patch-the-main-Makefile.patch new file +7 -0
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Taken from [1]
+
+[1] 

https://src.fedoraproject.org/rpms/lmdb/raw/master/f/lmdb-make.patch

meta-oe/recipes-dbs/lmdb/files/0001-Patch-the-main-Makefile.patch new file +17 -0
+
+Upstream-Status: Pending
+
+
+diff --git a/Makefile b/Makefile
+--- a/Makefile
++++ b/Makefile
+@@ -26,6 +26,7 @@ OPT = -O2 -g
+ CFLAGS      = $(THREADS) $(OPT) $(W) $(XCFLAGS)
+ LDLIBS      =
+ SOLIBS      =
++SOVERSION   = 0.0.0
+ SOEXT       = .so
+ prefix      = /usr/local
+ exec_prefix = $(prefix)
+@@ -38,7 +39,7 @@ mandir = $(datarootdir)/man
+ 

########################################################################

meta-oe/recipes-dbs/lmdb/files/0001-Patch-the-main-Makefile.patch new file +37 -0
+
+ IHDRS       = lmdb.h
+-ILIBS       = liblmdb.a liblmdb$(SOEXT)
++ILIBS       = liblmdb$(SOEXT) liblmdb$(SOEXT).$(SOVERSION)
+ 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
+@@ -49,13 +50,13 @@ install: $(ILIBS) $(IPROGS) $(IHDRS)
+     mkdir -p $(DESTDIR)$(libdir)
+     mkdir -p $(DESTDIR)$(includedir)
+     mkdir -p $(DESTDIR)$(mandir)/man1
+-    for f in $(IPROGS); do cp $$f $(DESTDIR)$(bindir); done
+-    for f in $(ILIBS); do cp $$f $(DESTDIR)$(libdir); done
+-    for f in $(IHDRS); do cp $$f $(DESTDIR)$(includedir); done
+-    for f in $(IDOCS); do cp $$f $(DESTDIR)$(mandir)/man1; done
++    for f in $(IPROGS); do cp -a $$f $(DESTDIR)$(bindir); done
++    for f in $(ILIBS); do cp -a $$f $(DESTDIR)$(libdir); done
++    for f in $(IHDRS); do cp -a $$f $(DESTDIR)$(includedir); done
++    for f in $(IDOCS); do cp -a $$f $(DESTDIR)$(mandir)/man1; done
+
+ clean:
+-    rm -rf $(PROGS) *.[ao] *.[ls]o *~ testdb
++    rm -rf $(PROGS) *.[ao] *.[ls]o* *~ testdb
+
+ test:       all
+     rm -rf testdb && mkdir testdb
+@@ -64,20 +65,24 @@ test:    all
+ liblmdb.a:  mdb.o midl.o
+     $(AR) rs $@ mdb.o midl.o
+
+-liblmdb$(SOEXT):    mdb.lo midl.lo
++liblmdb$(SOEXT):    liblmdb$(SOEXT).$(SOVERSION)
++    rm -f $@
++    ln -s $< $@
++
++liblmdb$(SOEXT).$(SOVERSION):       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 -Wl,-soname,$@ -o $@ mdb.lo midl.lo $(SOLIBS)

meta-oe/recipes-dbs/lmdb/files/0001-Patch-the-main-Makefile.patch new file +24 -0
+
+-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 liblmdb.so
++mdb_copy: mdb_copy.o liblmdb.so
++mdb_dump: mdb_dump.o liblmdb.so
++mdb_load: mdb_load.o liblmdb.so
++mtest:    mtest.o    liblmdb.so
++mtest2:     mtest2.o liblmdb.so
++mtest3:     mtest3.o liblmdb.so
++mtest4:     mtest4.o liblmdb.so
++mtest5:     mtest5.o liblmdb.so
++mtest6:     mtest6.o liblmdb.so
+
+ mdb.o: mdb.c lmdb.h midl.h
+     $(CC) $(CFLAGS) $(CPPFLAGS) -c mdb.c
meta-oe/recipes-dbs/lmdb/lmdb_git.bb new file +0 -0
new file mode 100644
index 000000000..22db6d44b

meta-oe/recipes-dbs/lmdb/lmdb_git.bb line 3

Quoted 3 lines
meta-oe/recipes-dbs/lmdb/lmdb_git.bb new file +3 -0
@@ -0,0 +1,22 @@
+SUMMARY = "Symas Lightning Memory-Mapped Database (LMDB)"
+HOMEPAGE = "http://symas.com/mdb/"
+LICENSE = "OLDAP-2.8"

We might need a copy of this license in meta-oe/licenses too.

meta-oe/recipes-dbs/lmdb/lmdb_git.bb line 12

Quoted 10 lines
meta-oe/recipes-dbs/lmdb/lmdb_git.bb new file +1 -0
+LIC_FILES_CHKSUM = 

"file://LICENSE;md5=153d07ef052c4a37a8fac23bc6031972"

meta-oe/recipes-dbs/lmdb/lmdb_git.bb new file +8 -0
+
+SRC_URI = " \
+    git://github.com/LMDB/lmdb.git;nobranch=1 \
+    file://0001-Patch-the-main-Makefile.patch \
+"
+SRCREV = "8ad7be2510414b9506ec9f9e24f24d04d9b04a1a"
+S = "${WORKDIR}/git/libraries/liblmdb"
+PV = "0.9.29"

remove PV here and rename recipe to lmdb_0.0.29.bb

Quoted 12 lines
Quoted 10 lines
meta-oe/recipes-dbs/lmdb/lmdb_git.bb new file +7 -0
+
+do_compile() {
+    oe_runmake "CC=${CC}"
+}
+
+do_install() {
+    oe_runmake DESTDIR=${D} prefix=${prefix} libdir=${libdir} 

mandir=${mandir} install
+    chown -R root:root ${D}${bindir}
+    chown -R root:root ${D}${libdir}

why do we need this extra chown op? Is pseudo not able to handle it?

without the "chown" ops, following warning is encountered. The package works fine nonetheless. Any ideas on how to resolve it?

WARNING: lmdb-0.9.29-r0 do_package_qa: QA Issue: lmdb: /usr/lib64/liblmdb.so is owned by uid 20885, which is the same as the user running bitbake. This may be due to host contamination [host-user-contaminated]
WARNING: lmdb-0.9.29-r0 do_package_qa: QA Issue: lmdb: /usr/lib64/liblmdb.so.0.0.0 is owned by uid 20885, which is the same as the user running bitbake. This may be due to host contamination
lmdb: /usr/bin/mdb_dump is owned by uid 20885, which is the same as the user running bitbake. This may be due to host contamination
lmdb: /usr/bin/mdb_copy is owned by uid 20885, which is the same as the user running bitbake. This may be due to host contamination
lmdb: /usr/bin/mdb_stat is owned by uid 20885, which is the same as the user running bitbake. This may be due to host contamination

lmdb: /usr/bin/mdb_load is owned by uid 20885, which is the same as the user running bitbake. This may be due to host contamination [host-user-contaminated]

Sakib

Quoted 10 lines

please add it to relevant test packagegroup in packagegroups-meta-oe.bb as well.

Quoted 6 lines

+}

#3 lore raw
Quoted 179 lines · Sakib Sajal
Quoted 146 lines · Khem Raj

[Please note: This e-mail is from an EXTERNAL e-mail address]

Quoted 124 lines · Sakib Sajal

lmdb provides a high-performance embedded transactional database in the form of a key-value store.

Recipe is ported from meta-qt5-extra layer.

---
  .../files/0001-Patch-the-main-Makefile.patch  | 90 +++++++++++++++++++
  meta-oe/recipes-dbs/lmdb/lmdb_git.bb          | 22 +++++
  2 files changed, 112 insertions(+)

create mode 100644
meta-oe/recipes-dbs/lmdb/files/0001-Patch-the-main-Makefile.patch
create mode 100644 meta-oe/recipes-dbs/lmdb/lmdb_git.bb

diff --git a/meta-oe/recipes-dbs/lmdb/files/0001-Patch-the-main-Makefile.patch b/meta-oe/recipes-dbs/lmdb/files/0001-Patch-the-main-Makefile.patch new file mode 100644
index 000000000..9ba626101

meta-oe/recipes-dbs/lmdb/files/0001-Patch-the-main-Makefile.patch new file +3 -0
@@ -0,0 +1,90 @@
+From: =?UTF-8?q?Andreas=20M=C3=BCller?= <[email protected]>
+Date: Tue, 1 Sep 2015 22:54:31 +0200
+Subject: [PATCH] Patch the main Makefile to allow for a build that

complies to packaging guidelines.

meta-oe/recipes-dbs/lmdb/files/0001-Patch-the-main-Makefile.patch new file +7 -0
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Taken from [1]
+
+[1]

https://src.fedoraproject.org/rpms/lmdb/raw/master/f/lmdb-make.patch

meta-oe/recipes-dbs/lmdb/files/0001-Patch-the-main-Makefile.patch new file +17 -0
+
+Upstream-Status: Pending
+
+
+diff --git a/Makefile b/Makefile
+--- a/Makefile
++++ b/Makefile
+@@ -26,6 +26,7 @@ OPT = -O2 -g
+ CFLAGS      = $(THREADS) $(OPT) $(W) $(XCFLAGS)
+ LDLIBS      =
+ SOLIBS      =
++SOVERSION   = 0.0.0
+ SOEXT       = .so
+ prefix      = /usr/local
+ exec_prefix = $(prefix)
+@@ -38,7 +39,7 @@ mandir = $(datarootdir)/man
+

########################################################################

meta-oe/recipes-dbs/lmdb/files/0001-Patch-the-main-Makefile.patch new file +37 -0
+
+ IHDRS       = lmdb.h
+-ILIBS       = liblmdb.a liblmdb$(SOEXT)
++ILIBS       = liblmdb$(SOEXT) liblmdb$(SOEXT).$(SOVERSION)
+ 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
+@@ -49,13 +50,13 @@ install: $(ILIBS) $(IPROGS) $(IHDRS)
+     mkdir -p $(DESTDIR)$(libdir)
+     mkdir -p $(DESTDIR)$(includedir)
+     mkdir -p $(DESTDIR)$(mandir)/man1
+-    for f in $(IPROGS); do cp $$f $(DESTDIR)$(bindir); done
+-    for f in $(ILIBS); do cp $$f $(DESTDIR)$(libdir); done
+-    for f in $(IHDRS); do cp $$f $(DESTDIR)$(includedir); done
+-    for f in $(IDOCS); do cp $$f $(DESTDIR)$(mandir)/man1; done
++    for f in $(IPROGS); do cp -a $$f $(DESTDIR)$(bindir); done
++    for f in $(ILIBS); do cp -a $$f $(DESTDIR)$(libdir); done
++    for f in $(IHDRS); do cp -a $$f $(DESTDIR)$(includedir); done
++    for f in $(IDOCS); do cp -a $$f $(DESTDIR)$(mandir)/man1; done
+
+ clean:
+-    rm -rf $(PROGS) *.[ao] *.[ls]o *~ testdb
++    rm -rf $(PROGS) *.[ao] *.[ls]o* *~ testdb
+
+ test:       all
+     rm -rf testdb && mkdir testdb
+@@ -64,20 +65,24 @@ test:    all
+ liblmdb.a:  mdb.o midl.o
+     $(AR) rs $@ mdb.o midl.o
+
+-liblmdb$(SOEXT):    mdb.lo midl.lo
++liblmdb$(SOEXT):    liblmdb$(SOEXT).$(SOVERSION)
++    rm -f $@
++    ln -s $< $@
++
++liblmdb$(SOEXT).$(SOVERSION):       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 -Wl,-soname,$@ -o $@ mdb.lo

midl.lo $(SOLIBS)

meta-oe/recipes-dbs/lmdb/files/0001-Patch-the-main-Makefile.patch new file +24 -0
+
+-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 liblmdb.so
++mdb_copy: mdb_copy.o liblmdb.so
++mdb_dump: mdb_dump.o liblmdb.so
++mdb_load: mdb_load.o liblmdb.so
++mtest:    mtest.o    liblmdb.so
++mtest2:     mtest2.o liblmdb.so
++mtest3:     mtest3.o liblmdb.so
++mtest4:     mtest4.o liblmdb.so
++mtest5:     mtest5.o liblmdb.so
++mtest6:     mtest6.o liblmdb.so
+
+ mdb.o: mdb.c lmdb.h midl.h
+     $(CC) $(CFLAGS) $(CPPFLAGS) -c mdb.c
meta-oe/recipes-dbs/lmdb/lmdb_git.bb new file +0 -0
new file mode 100644
index 000000000..22db6d44b

meta-oe/recipes-dbs/lmdb/lmdb_git.bb line 3

Quoted 3 lines
meta-oe/recipes-dbs/lmdb/lmdb_git.bb new file +3 -0
@@ -0,0 +1,22 @@
+SUMMARY = "Symas Lightning Memory-Mapped Database (LMDB)"
+HOMEPAGE = "http://symas.com/mdb/"
+LICENSE = "OLDAP-2.8"

We might need a copy of this license in meta-oe/licenses too.

meta-oe/recipes-dbs/lmdb/lmdb_git.bb line 12

Quoted 10 lines
meta-oe/recipes-dbs/lmdb/lmdb_git.bb new file +1 -0
+LIC_FILES_CHKSUM =

"file://LICENSE;md5=153d07ef052c4a37a8fac23bc6031972"

meta-oe/recipes-dbs/lmdb/lmdb_git.bb new file +8 -0
+
+SRC_URI = " \
+    git://github.com/LMDB/lmdb.git;nobranch=1 \
+    file://0001-Patch-the-main-Makefile.patch \
+"
+SRCREV = "8ad7be2510414b9506ec9f9e24f24d04d9b04a1a"
+S = "${WORKDIR}/git/libraries/liblmdb"
+PV = "0.9.29"

remove PV here and rename recipe to lmdb_0.0.29.bb

Quoted 12 lines

meta-oe/recipes-dbs/lmdb/lmdb_git.bb line 21

Quoted 10 lines
meta-oe/recipes-dbs/lmdb/lmdb_git.bb new file +7 -0
+
+do_compile() {
+    oe_runmake "CC=${CC}"
+}
+
+do_install() {
+    oe_runmake DESTDIR=${D} prefix=${prefix} libdir=${libdir}

mandir=${mandir} install

meta-oe/recipes-dbs/lmdb/lmdb_git.bb new file +2 -0
+    chown -R root:root ${D}${bindir}
+    chown -R root:root ${D}${libdir}

why do we need this extra chown op? Is pseudo not able to handle it?

without the "chown" ops, following warning is encountered. The package works fine nonetheless. Any ideas on how to resolve it?

WARNING: lmdb-0.9.29-r0 do_package_qa: QA Issue: lmdb:
/usr/lib64/liblmdb.so is owned by uid 20885, which is the same as the user running bitbake. This may be due to host contamination [host-user-contaminated]
WARNING: lmdb-0.9.29-r0 do_package_qa: QA Issue: lmdb:
/usr/lib64/liblmdb.so.0.0.0 is owned by uid 20885, which is the same as the user running bitbake. This may be due to host contamination
lmdb: /usr/bin/mdb_dump is owned by uid 20885, which is the same as the user running bitbake. This may be due to host contamination
lmdb: /usr/bin/mdb_copy is owned by uid 20885, which is the same as the user running bitbake. This may be due to host contamination
lmdb: /usr/bin/mdb_stat is owned by uid 20885, which is the same as the user running bitbake. This may be due to host contamination

Quoted 3 lines

lmdb: /usr/bin/mdb_load is owned by uid 20885, which is the same as the user running bitbake. This may be due to host contamination [host-user-contaminated]

this seems that install in Makefile is not done right. perhaps it should be patched to use install utility ?

Quoted 14 lines

Sakib

Quoted 10 lines

please add it to relevant test packagegroup in packagegroups-meta-oe.bb as well.

Quoted 6 lines

+}

#4 lore raw
In reply to Khem Raj
Quoted 120 lines · Khem Raj

[Please note: This e-mail is from an EXTERNAL e-mail address]

Quoted 117 lines · Sakib Sajal

lmdb provides a high-performance embedded transactional database in the form of a key-value store.

Recipe is ported from meta-qt5-extra layer.

---
  .../files/0001-Patch-the-main-Makefile.patch  | 90 +++++++++++++++++++ meta-oe/recipes-dbs/lmdb/lmdb_git.bb          | 22 +++++

  2 files changed, 112 insertions(+)

  create mode 100644 meta-oe/recipes-dbs/lmdb/files/0001-Patch-the-main-Makefile.patch create mode 100644 meta-oe/recipes-dbs/lmdb/lmdb_git.bb

meta-oe/recipes-dbs/lmdb/files/0001-Patch-the-main-Makefile.patch new file +3 -0
new file mode 100644
index 000000000..9ba626101
@@ -0,0 +1,90 @@
+From: =?UTF-8?q?Andreas=20M=C3=BCller?= <[email protected]>
+Date: Tue, 1 Sep 2015 22:54:31 +0200
+Subject: [PATCH] Patch the main Makefile to allow for a build that 

complies to packaging guidelines.

meta-oe/recipes-dbs/lmdb/files/0001-Patch-the-main-Makefile.patch new file +7 -0
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Taken from [1]
+
+[1] 

https://src.fedoraproject.org/rpms/lmdb/raw/master/f/lmdb-make.patch

meta-oe/recipes-dbs/lmdb/files/0001-Patch-the-main-Makefile.patch new file +17 -0
+
+Upstream-Status: Pending
+
+
+diff --git a/Makefile b/Makefile
+--- a/Makefile
++++ b/Makefile
+@@ -26,6 +26,7 @@ OPT = -O2 -g
+ CFLAGS      = $(THREADS) $(OPT) $(W) $(XCFLAGS)
+ LDLIBS      =
+ SOLIBS      =
++SOVERSION   = 0.0.0
+ SOEXT       = .so
+ prefix      = /usr/local
+ exec_prefix = $(prefix)
+@@ -38,7 +39,7 @@ mandir = $(datarootdir)/man
+ 

########################################################################

meta-oe/recipes-dbs/lmdb/files/0001-Patch-the-main-Makefile.patch new file +37 -0
+
+ IHDRS       = lmdb.h
+-ILIBS       = liblmdb.a liblmdb$(SOEXT)
++ILIBS       = liblmdb$(SOEXT) liblmdb$(SOEXT).$(SOVERSION)
+ 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
+@@ -49,13 +50,13 @@ install: $(ILIBS) $(IPROGS) $(IHDRS)
+     mkdir -p $(DESTDIR)$(libdir)
+     mkdir -p $(DESTDIR)$(includedir)
+     mkdir -p $(DESTDIR)$(mandir)/man1
+-    for f in $(IPROGS); do cp $$f $(DESTDIR)$(bindir); done
+-    for f in $(ILIBS); do cp $$f $(DESTDIR)$(libdir); done
+-    for f in $(IHDRS); do cp $$f $(DESTDIR)$(includedir); done
+-    for f in $(IDOCS); do cp $$f $(DESTDIR)$(mandir)/man1; done
++    for f in $(IPROGS); do cp -a $$f $(DESTDIR)$(bindir); done
++    for f in $(ILIBS); do cp -a $$f $(DESTDIR)$(libdir); done
++    for f in $(IHDRS); do cp -a $$f $(DESTDIR)$(includedir); done
++    for f in $(IDOCS); do cp -a $$f $(DESTDIR)$(mandir)/man1; done
+
+ clean:
+-    rm -rf $(PROGS) *.[ao] *.[ls]o *~ testdb
++    rm -rf $(PROGS) *.[ao] *.[ls]o* *~ testdb
+
+ test:       all
+     rm -rf testdb && mkdir testdb
+@@ -64,20 +65,24 @@ test:    all
+ liblmdb.a:  mdb.o midl.o
+     $(AR) rs $@ mdb.o midl.o
+
+-liblmdb$(SOEXT):    mdb.lo midl.lo
++liblmdb$(SOEXT):    liblmdb$(SOEXT).$(SOVERSION)
++    rm -f $@
++    ln -s $< $@
++
++liblmdb$(SOEXT).$(SOVERSION):       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 -Wl,-soname,$@ -o $@ mdb.lo midl.lo $(SOLIBS)

meta-oe/recipes-dbs/lmdb/files/0001-Patch-the-main-Makefile.patch new file +24 -0
+
+-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 liblmdb.so
++mdb_copy: mdb_copy.o liblmdb.so
++mdb_dump: mdb_dump.o liblmdb.so
++mdb_load: mdb_load.o liblmdb.so
++mtest:    mtest.o    liblmdb.so
++mtest2:     mtest2.o liblmdb.so
++mtest3:     mtest3.o liblmdb.so
++mtest4:     mtest4.o liblmdb.so
++mtest5:     mtest5.o liblmdb.so
++mtest6:     mtest6.o liblmdb.so
+
+ mdb.o: mdb.c lmdb.h midl.h
+     $(CC) $(CFLAGS) $(CPPFLAGS) -c mdb.c
meta-oe/recipes-dbs/lmdb/lmdb_git.bb new file +0 -0
new file mode 100644
index 000000000..22db6d44b
Quoted 8 lines

meta-oe/recipes-dbs/lmdb/lmdb_git.bb line 3

Quoted 6 lines
meta-oe/recipes-dbs/lmdb/lmdb_git.bb new file +3 -0
@@ -0,0 +1,22 @@
+SUMMARY = "Symas Lightning Memory-Mapped Database (LMDB)"
+HOMEPAGE = "http://symas.com/mdb/"
+LICENSE = "OLDAP-2.8"

We might need a copy of this license in meta-oe/licenses too.

License is already present, its meta-oe/licenses/OpenLDAP

Quoted 36 lines

meta-oe/recipes-dbs/lmdb/lmdb_git.bb line 12

Quoted 11 lines
meta-oe/recipes-dbs/lmdb/lmdb_git.bb new file +1 -0
+LIC_FILES_CHKSUM = 

"file://LICENSE;md5=153d07ef052c4a37a8fac23bc6031972"

meta-oe/recipes-dbs/lmdb/lmdb_git.bb new file +8 -0
+
+SRC_URI = " \
+    git://github.com/LMDB/lmdb.git;nobranch=1 \
+    file://0001-Patch-the-main-Makefile.patch \
+"
+SRCREV = "8ad7be2510414b9506ec9f9e24f24d04d9b04a1a"
+S = "${WORKDIR}/git/libraries/liblmdb"
+PV = "0.9.29"

remove PV here and rename recipe to lmdb_0.0.29.bb

Quoted 10 lines
meta-oe/recipes-dbs/lmdb/lmdb_git.bb new file +7 -0
+
+do_compile() {
+    oe_runmake "CC=${CC}"
+}
+
+do_install() {
+    oe_runmake DESTDIR=${D} prefix=${prefix} libdir=${libdir} 

mandir=${mandir} install
+    chown -R root:root ${D}${bindir}
+    chown -R root:root ${D}${libdir}

why do we need this extra chown op? Is pseudo not able to handle it?

please add it to relevant test packagegroup in packagegroups-meta-oe.bb as well.

Quoted 6 lines

+}