Skip to contentSkip to conversation

libbacktrace: Add recipe

PATCH New Khem Raj 2 participants 5 messages Mar 7, 2021 – Mar 8, 2021

lore
Share & tools
lore

Khem Raj

author
#0 lore raw

PATCH v2 1/3 libbacktrace: Add recipe

---
v2: Compile with -fPIC and exclude for riscv since it needs libunwind

 .../libbacktrace/libbacktrace_git.bb          | 30 +++++++++++++++++++
 1 file changed, 30 insertions(+)
 create mode 100644 meta-oe/recipes-extended/libbacktrace/libbacktrace_git.bb
meta-oe/recipes-extended/libbacktrace/libbacktrace_git.bb new file +30 -0
new file mode 100644
index 0000000000..1f3cb97c13
@@ -0,0 +1,30 @@
+# Copyright (C) 2021 Khem Raj <[email protected]>
+# Released under the MIT license (see COPYING.MIT for the terms)
+
+SUMMARY = "A C library that may be linked into a C/C++ program to produce symbolic backtraces"
+HOMEPAGE = "https://github.com/ianlancetaylor/libbacktrace"
+LICENSE = "BSD-3-Clause"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=24b5b3feec63c4be0975e1fea5100440"
+
+DEPENDS += "libunwind"
+
+SRC_URI = "git://github.com/ianlancetaylor/libbacktrace;protocol=https"
+
+PV = "1.0+git${SRCPV}"
+SRCREV = "4f57c999716847e45505b3df170150876b545088"
+
+S = "${WORKDIR}/git"
+
+inherit autotools
+
+EXTR_OECONF += "--with-system-libunwind"
+
+CFLAGS += "-fPIC"
+
+do_configure() {
+    oe_runconf
+}
+
+# libunwind does not support RISCV yet
+COMPATIBLE_HOST_riscv64 = "null"
+COMPATIBLE_HOST_riscv32 = "null"
Signature · 1 line
2.30.1
author
#1 lore raw

PATCH 1/1 python3-gpsd-py3: Added recipe

From: Colin McAllister <[email protected]>

Create Python3 recipe for gpsd-py3.

---
 .../packagegroups/packagegroup-meta-python.bb    |  1 +
 .../python/python3-gpsd-py3_0.3.0.bb             | 16 ++++++++++++++++
 2 files changed, 17 insertions(+)
 create mode 100644 meta-python/recipes-devtools/python/python3-gpsd-py3_0.3.0.bb
meta-python/recipes-core/packagegroups/packagegroup-meta-python.bb +1 -0
index c1271d09dc..4512f839f4 100644
@@ -144,6 +144,7 @@ RDEPENDS_packagegroup-meta-python3 = "\
     python3-gmqtt \
     python3-gnupg \
     python3-google-api-python-client \
+    python3-gpsd-py3 \
     python3-graphviz \
     python3-greenlet \
     python3-greenstalk \
meta-python/recipes-devtools/python/python3-gpsd-py3_0.3.0.bb new file +16 -0
new file mode 100644
index 0000000000..35485ba7c4
@@ -0,0 +1,16 @@
+DESCRIPTION = "This is a library for polling gpsd in Python3"
+HOMEPAGE = "https://github.com/MartijnBraam/gpsd-py3"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://setup.py;beginline=10;endline=10;md5=c2d9994c57f0444e39f1dab19af50254"
+SRC_URI[md5sum] = "041ce56e8879e2104b4d54c8119cd529"
+SRC_URI[sha256sum] = "2908d3bd78dfb6720ecfe22f97e139b5a4a198f38df3a77215cf644a33513192"
+
+PYPI_PACKAGE = "gpsd-py3"
+
+inherit pypi setuptools3
+
+CLEANBROKEN = "1"
+
+RDEPENDS_${PN} += " \
+    python3 \
+"
Signature · 1 line
2.30.1
Acked-by on v1 1/1
#2 lore raw

Re: [oe] [meta-python][PATCH] python3-gpsd-py3: Added recipe

Quoted 8 lines · Khem Raj

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

From: Colin McAllister <[email protected]>

Create Python3 recipe for gpsd-py3.

Quoted 46 lines
---
  .../packagegroups/packagegroup-meta-python.bb    |  1 +
  .../python/python3-gpsd-py3_0.3.0.bb             | 16 ++++++++++++++++
  2 files changed, 17 insertions(+)

create mode 100644 meta-python/recipes-devtools/python/python3-gpsd-py3_0.3.0.bb

meta-python/recipes-core/packagegroups/packagegroup-meta-python.bb +1 -0
index c1271d09dc..4512f839f4 100644
@@ -144,6 +144,7 @@ RDEPENDS_packagegroup-meta-python3 = "\
      python3-gmqtt \
      python3-gnupg \
      python3-google-api-python-client \
+    python3-gpsd-py3 \
      python3-graphviz \
      python3-greenlet \
      python3-greenstalk \
meta-python/recipes-devtools/python/python3-gpsd-py3_0.3.0.bb new file +16 -1
new file mode 100644
index 0000000000..35485ba7c4
@@ -0,0 +1,16 @@
+DESCRIPTION = "This is a library for polling gpsd in Python3"
+HOMEPAGE = "https://github.com/MartijnBraam/gpsd-py3"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://setup.py;beginline=10;endline=10;md5=c2d9994c57f0444e39f1dab19af50254"
+SRC_URI[md5sum] = "041ce56e8879e2104b4d54c8119cd529"
+SRC_URI[sha256sum] = "2908d3bd78dfb6720ecfe22f97e139b5a4a198f38df3a77215cf644a33513192"
+
+PYPI_PACKAGE = "gpsd-py3"
+
+inherit pypi setuptools3
+
+CLEANBROKEN = "1"
+
+RDEPENDS_${PN} += " \
+    python3 \
+"
--

2.30.1

author
#3 lore raw

PATCH v2 2/3 libleak: Add recipe

In reply to Khem Raj

---
v2: Exclude on riscv

 .../0001-respect-environment-variables.patch  | 25 ++++++++++++
 .../recipes-extended/libleak/libleak_git.bb   | 38 +++++++++++++++++++
 2 files changed, 63 insertions(+)
 create mode 100644 meta-oe/recipes-extended/libleak/libleak/0001-respect-environment-variables.patch
 create mode 100644 meta-oe/recipes-extended/libleak/libleak_git.bb
meta-oe/recipes-extended/libleak/libleak/0001-respect-environment-variables.patch new file +25 -0
new file mode 100644
index 0000000000..bbdfa3c960
@@ -0,0 +1,25 @@
+From ea3f11a7846ad27926c6eacc0534914f4873504f Mon Sep 17 00:00:00 2001
+From: Khem Raj <[email protected]>
+Date: Fri, 5 Mar 2021 19:30:09 -0800
+Subject: [PATCH] respect environment variables
+
+Signed-off-by: Khem Raj <[email protected]>
+---
+ Makefile | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index 1d70f17..c7e726e 100644
+--- a/Makefile
++++ b/Makefile
+@@ -1,5 +1,5 @@
+-CFLAGS = -g -O2 -Wall -fPIC -Ilibwuya
+-LDFLAGS = -Llibwuya
++CFLAGS += -g -O2 -Wall -fPIC -Ilibwuya
++LDFLAGS += -Llibwuya
+ 
+ libleak.so: libleak.o
+ 	CFLAGS='-fPIC' make -C libwuya
+-- 
+2.30.1
+
meta-oe/recipes-extended/libleak/libleak_git.bb new file +38 -0
new file mode 100644
index 0000000000..309553c909
@@ -0,0 +1,38 @@
+# Copyright (C) 2021 Khem Raj <[email protected]>
+# Released under the MIT license (see COPYING.MIT for the terms)
+
+SUMMARY = "libleak detects memory leak by hooking memory functions (e.g. malloc) by LD_PRELOAD"
+HOMEPAGE = "https://github.com/WuBingzheng/libleak"
+LICENSE = "GPL-2.0"
+LIC_FILES_CHKSUM = "file://README.md;beginline=18;endline=21;md5=de4f705f12cdedbe452b2c3524572b03"
+
+DEPENDS += "libbacktrace"
+
+SRC_URI = "gitsm://github.com/WuBingzheng/libleak;protocol=https \
+           file://0001-respect-environment-variables.patch \
+          "
+
+PV = "1.0+git${SRCPV}"
+SRCREV = "ea2bb608ae25701692269a37d39d77e966b887ac"
+
+S = "${WORKDIR}/git"
+
+do_configure () {
+	:
+}
+
+do_compile () {
+	oe_runmake
+}
+
+do_install () {
+	install -Dm 0755 ${B}/libleak.so ${D}${libdir}/libleak.so
+}
+
+FILES_SOLIBSDEV = ""
+
+FILES_${PN} += "${libdir}/libleak.so"
+
+# libunwind does not support RISCV yet
+COMPATIBLE_HOST_riscv64 = "null"
+COMPATIBLE_HOST_riscv32 = "null"
Signature · 1 line
2.30.1
author
#4 lore raw

PATCH v2 3/3 packagegroup-meta-oe: Add libleak to packagegroup-meta-oe-extended

In reply to Khem Raj

---
v2: Exclude riscv

 meta-oe/recipes-core/packagegroups/packagegroup-meta-oe.bb | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
meta-oe/recipes-core/packagegroups/packagegroup-meta-oe.bb +3 -2
index 94830e2970..03c509a2f9 100644
@@ -338,6 +338,7 @@ RDEPENDS_packagegroup-meta-oe-extended ="\
      hiredis \
      hplip \
      hwloc \
+     libleak \
      libuio \
      ${@bb.utils.contains("DISTRO_FEATURES", "x11", "libwmf", "", d)} \
      lprng \
@@ -422,8 +423,8 @@ RDEPENDS_packagegroup-meta-oe-extended_remove_mips = "sysdig"
 RDEPENDS_packagegroup-meta-oe-extended_remove_powerpc = "upm mraa minifi-cpp"
 RDEPENDS_packagegroup-meta-oe-extended_remove_powerpc64 = "upm mraa minifi-cpp"
 RDEPENDS_packagegroup-meta-oe-extended_remove_powerpc64le = "upm mraa"
-RDEPENDS_packagegroup-meta-oe-extended_remove_riscv64 = "upm mraa sysdig tiptop"
-RDEPENDS_packagegroup-meta-oe-extended_remove_riscv32 = "upm mraa sysdig tiptop"
+RDEPENDS_packagegroup-meta-oe-extended_remove_riscv64 = "upm libleak mraa sysdig tiptop"
+RDEPENDS_packagegroup-meta-oe-extended_remove_riscv32 = "upm libleak mraa sysdig tiptop"
 
 RDEPENDS_packagegroup-meta-oe-gnome ="\
     atkmm \
Signature · 1 line
2.30.1