Skip to contentSkip to conversation

libtraceevent: Move plugins into package of its own

PATCH New Khem Raj 1 participant 4 messages Jan 7, 2023

lore
Share & tools
lore

Khem Raj

author
#0 lore raw

PATCH 1/4 libtraceevent: Move plugins into package of its own

From Peter Bergin <[email protected]>
see https://github.com/openembedded/meta-openembedded/pull/632/commits/cf672ba52f8c4d983ad9a74b67f226ac753a50f8

---
 meta-oe/recipes-kernel/libtraceevent/libtraceevent_1.7.0.bb | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
meta-oe/recipes-kernel/libtraceevent/libtraceevent_1.7.0.bb +3 -1
index bae84c7242..cff86722e4 100644
@@ -20,4 +20,6 @@ do_install() {
     oe_runmake install DESTDIR=${D} pkgconfig_dir=${libdir}/pkgconfig
 }
 
-FILES:${PN} += "${libdir}/traceevent"
+PACKAGES += "${PN}-plugins"
+
+FILES:${PN}-plugins += "${libdir}/traceevent/plugins"
Signature · 1 line
2.39.0
author
#1 lore raw

PATCH 2/4 trace-cmd: Upgrade to 3.1.5

= Drop uneeded 0001-trace-cmd-make-it-build-with-musl.patch
- Update LFS64 patch with the upstream submitted one
- Add a patch to remove useless rpaths

---
 .../0001-Do-not-emit-useless-rpath.patch      |   34 +
 ...LFS64-interfaces-off64_t-and-lseek64.patch | 1136 +++++++++++++++++
 ...01-trace-cmd-make-it-build-with-musl.patch |  132 --
 .../0002-replace-off64_t-and-lseek64.patch    |  426 -------
 .../trace-cmd/trace-cmd_2.9.1.bb              |   32 -
 .../trace-cmd/trace-cmd_3.1.5.bb              |   31 +
 6 files changed, 1201 insertions(+), 590 deletions(-)
 create mode 100644 meta-oe/recipes-kernel/trace-cmd/files/0001-Do-not-emit-useless-rpath.patch
 create mode 100644 meta-oe/recipes-kernel/trace-cmd/files/0001-Replace-LFS64-interfaces-off64_t-and-lseek64.patch
 delete mode 100644 meta-oe/recipes-kernel/trace-cmd/files/0001-trace-cmd-make-it-build-with-musl.patch
 delete mode 100644 meta-oe/recipes-kernel/trace-cmd/files/0002-replace-off64_t-and-lseek64.patch
 delete mode 100644 meta-oe/recipes-kernel/trace-cmd/trace-cmd_2.9.1.bb
 create mode 100644 meta-oe/recipes-kernel/trace-cmd/trace-cmd_3.1.5.bb
meta-oe/recipes-kernel/trace-cmd/files/0001-Do-not-emit-useless-rpath.patch new file +34 -0
new file mode 100644
index 0000000000..13a86e65d1
@@ -0,0 +1,34 @@
+From 90fbc3423b5ccdbd54b5851c32b9f92c6658d634 Mon Sep 17 00:00:00 2001
+From: Khem Raj <[email protected]>
+Date: Fri, 6 Jan 2023 17:30:24 -0800
+Subject: [PATCH] Do not emit useless rpath
+
+rpath is pointing to standard libdir which is un-used and yocto build QA
+flag it, there is no need to set rpaths when building in this
+environment
+
+Fixes
+do_package_qa: QA Issue: trace-cmd: /usr/bin/trace-cmd contains probably-redundant RPATH /usr/lib [useless-rpaths]
+
+Upstream-Status: Inappropriate [OE-Specific]
+Signed-off-by: Khem Raj <[email protected]>
+---
+ scripts/utils.mk | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/scripts/utils.mk b/scripts/utils.mk
+index 3fc2d74f..309a8599 100644
+--- a/scripts/utils.mk
++++ b/scripts/utils.mk
+@@ -64,7 +64,7 @@ do_compile =							\
+ 
+ do_app_build =						\
+ 	($(print_app_build)				\
+-	$(CC) $^ -rdynamic -Wl,-rpath=$(libdir) -o $@ $(LDFLAGS) $(CONFIG_LIBS) $(LIBS))
++	$(CC) $^ -rdynamic -o $@ $(LDFLAGS) $(CONFIG_LIBS) $(LIBS))
+ 
+ do_build_static_lib =				\
+ 	($(print_static_lib_build)		\
+-- 
+2.39.0
+
meta-oe/recipes-kernel/trace-cmd/files/0001-Replace-LFS64-interfaces-off64_t-and-lseek64.patch new file +1136 -0

1,136 lines not on this page · raw message

meta-oe/recipes-kernel/trace-cmd/files/0001-trace-cmd-make-it-build-with-musl.patch deleted +0 -132

132 lines not on this page · raw message

meta-oe/recipes-kernel/trace-cmd/files/0002-replace-off64_t-and-lseek64.patch deleted +0 -426

426 lines not on this page · raw message

meta-oe/recipes-kernel/trace-cmd/trace-cmd_2.9.1.bb deleted +0 -32
deleted file mode 100644
index 51e46533de..0000000000
@@ -1,32 +0,0 @@
-SUMMARY = "User-space front-end command-line tool for ftrace"
-
-LICENSE = "GPL-2.0-only & LGPL-2.1-only"
-LIC_FILES_CHKSUM = "file://COPYING;md5=873f48a813bded3de6ebc54e6880c4ac"
-
-SRC_URI = "git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/trace-cmd.git;branch=master \
-           file://0001-trace-cmd-make-it-build-with-musl.patch \
-           file://0002-replace-off64_t-and-lseek64.patch \
-           "
-
-SRCREV = "530b1a0caef39466e16bbd49de5afef89656f03f"
-
-S = "${WORKDIR}/git"
-
-DEPENDS += "libtraceevent libtracefs zstd xmlto-native asciidoc-native"
-
-inherit pkgconfig
-
-TARGET_CC_ARCH += "${LDFLAGS}"
-
-do_compile() {
-        oe_runmake libdir_relative=${BASELIB} libs
-        oe_runmake libdir_relative=${BASELIB} all
-}
-
-do_install() {
-       oe_runmake libdir_relative=${BASELIB} etcdir=${sysconfdir} DESTDIR=${D} install install_libs
-       mkdir -p ${D}${libdir}/traceevent/plugins/${BPN}
-       mv ${D}/${libdir}/traceevent/plugins/*.so ${D}${libdir}/traceevent/plugins/${BPN}/
-}
-
-FILES:${PN} += "${libdir}/traceevent ${libdir}/traceevent/plugins ${libdir}/tracefs"
meta-oe/recipes-kernel/trace-cmd/trace-cmd_3.1.5.bb new file +31 -0
new file mode 100644
index 0000000000..50d73df03a
@@ -0,0 +1,31 @@
+SUMMARY = "User-space front-end command-line tool for ftrace"
+
+LICENSE = "GPL-2.0-only & LGPL-2.1-only"
+LIC_FILES_CHKSUM = " \
+    file://LICENSES/GPL-2.0;md5=e6a75371ba4d16749254a51215d13f97 \
+    file://LICENSES/LGPL-2.1;md5=b370887980db5dd40659b50909238dbd \
+    "
+
+SRC_URI = "git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/trace-cmd.git;branch=master \
+           file://0001-Replace-LFS64-interfaces-off64_t-and-lseek64.patch \
+           file://0001-Do-not-emit-useless-rpath.patch"
+SRCREV = "18233e4c32857cb7ddd4960beeec8360ed834fc5"
+
+S = "${WORKDIR}/git"
+
+DEPENDS += "libtraceevent libtracefs zstd xmlto-native asciidoc-native swig-native bison-native flex-native"
+
+inherit pkgconfig bash-completion
+
+TARGET_CC_ARCH += "${LDFLAGS}"
+
+do_compile() {
+        oe_runmake libdir_relative=${BASELIB} libs
+        oe_runmake libdir_relative=${BASELIB} all
+}
+
+do_install() {
+       oe_runmake libdir_relative=${BASELIB} etcdir=${sysconfdir} pkgconfig_dir=${libdir}/pkgconfig DESTDIR=${D} install install_libs
+       # Because makefile uses cp instead of install we need to change owner of files
+       chown -R root:root ${D}${libdir}
+}
Signature · 1 line
2.39.0
author
#2 lore raw

PATCH 3/4 concurrencykit: Update to 0.7.0

In reply to Khem Raj

Enable riscv as it is supported now

---
 ...mpoiler-detection-logic-for-cross-co.patch | 89 +++++++++++++++++++
 .../concurrencykit/concurrencykit/cross.patch | 62 -------------
 .../concurrencykit/concurrencykit_git.bb      | 10 +--
 3 files changed, 93 insertions(+), 68 deletions(-)
 create mode 100644 meta-oe/recipes-devtools/concurrencykit/concurrencykit/0001-configure-Fix-compoiler-detection-logic-for-cross-co.patch
 delete mode 100644 meta-oe/recipes-devtools/concurrencykit/concurrencykit/cross.patch
meta-oe/recipes-devtools/concurrencykit/concurrencykit/0001-configure-Fix-compoiler-detection-logic-for-cross-co.patch new file +89 -0
new file mode 100644
index 0000000000..57a587b39e
@@ -0,0 +1,89 @@
+From e1dcd27e816520bdabc69511d90c4a2ebc242831 Mon Sep 17 00:00:00 2001
+From: Khem Raj <[email protected]>
+Date: Fri, 6 Jan 2023 18:51:34 -0800
+Subject: [PATCH] configure: Fix compoiler detection logic for
+ cross-compilation
+
+We can not run binaries during cross compile, so poke at compiler to
+figure out if it is clang or gcc, for OE we do not have other compilers
+in opensource world if there are we can extend this logic
+
+Upstream-Status: Inappropriate [OE-Specific]
+
+Signed-off-by: Khem Raj <[email protected]>
+---
+ configure | 56 ++++++++++++++++---------------------------------------
+ 1 file changed, 16 insertions(+), 40 deletions(-)
+
+diff --git a/configure b/configure
+index 9066abb..e382e61 100755
+--- a/configure
++++ b/configure
+@@ -661,48 +661,24 @@ if test "$PROFILE"; then
+ fi
+ 
+ printf "Finding suitable compiler........"
+-if test ! -x "${CC}"; then
+-	CC=`pathsearch "${CC:-cc}"`
+-	if test -z "$CC" -o ! -x "$CC"; then
+-		CC=`pathsearch "${CC:-gcc}"`
+-	fi
++if test -z "$CC"; then
++  if test ! -x "${CC}"; then
++	  CC=`pathsearch "${CC:-cc}"`
++	  if test -z "$CC" -o ! -x "$CC"; then
++		  CC=`pathsearch "${CC:-gcc}"`
++	  fi
++  fi
++  assert "$CC" "not found"
++fi
++if `$CC --version | grep gcc >& /dev/null`; then
++  COMPILER=gcc
++elif `$CC --version | grep clang >& /dev/null`; then
++  COMPILER=clang
++else
++  COMPILER="not found"
+ fi
+-assert "$CC" "not found"
+-
+-cat << EOF > .1.c
+-#include <stdio.h>
+-int main(void) {
+-#if defined(_WIN32)
+-#if defined(__MINGW64__)
+-	puts("mingw64");
+-	return (0);
+-#elif defined(__MINGW32__) && (__MINGW32_MAJOR_VERSION >= 3)
+-	puts("mingw32");
+-	return (0);
+-#else
+-	return (1);
+-#endif /* __MINGW32__ && __MINGW32_MAJOR_VERSION >= 3 */
+-#elif defined(__clang__) && (__clang_major__ >= 3)
+-	puts("clang");
+-	return (0);
+-#elif defined(__SUNPRO_C) && (__SUNPRO_C >= 0x5110)
+-	puts("suncc");
+-	return (0);
+-#elif defined(__GNUC__) && (__GNUC__ >= 4)
+-	puts("gcc");
+-	return (0);
+-#else
+-	return (1);
+-#endif
+-}
+-EOF
+-
+-$CC -o .1 .1.c
+-COMPILER=`./.1 2> /dev/null`
+-r=$?
+-rm -f .1.c .1
+ 
+-if test "$r" -ne 0; then
++if $COMPILER = "not found"; then
+ 	assert "" "update compiler"
+ else
+ 	echo "success [$CC]"
+-- 
+2.39.0
+
meta-oe/recipes-devtools/concurrencykit/concurrencykit/cross.patch deleted +0 -62

62 lines not on this page · raw message

meta-oe/recipes-devtools/concurrencykit/concurrencykit_git.bb +4 -6
index 0018064119..cb65250e9a 100644
@@ -7,16 +7,15 @@ LICENSE = "BSD-2-Clause & Apache-2.0"
 HOMEPAGE = "http://concurrencykit.org"
 SECTION = "base"
 
-PV = "0.5.1+git${SRCPV}"
-SRCREV = "f97d3da5c375ac2fc5a9173cdd36cb828915a2e1"
+PV = "0.7.0+git${SRCPV}"
+SRCREV = "6e8e5bec2e2f8cef2072a68579cbb07ababf3331"
 LIC_FILES_CHKSUM = "file://LICENSE;md5=a0b24c1a8f9ad516a297d055b0294231"
 SRC_URI = "git://github.com/concurrencykit/ck.git;branch=master;protocol=https \
-           file://cross.patch \
-"
+           file://0001-configure-Fix-compoiler-detection-logic-for-cross-co.patch"
 
 S = "${WORKDIR}/git"
 
-COMPATIBLE_HOST = "(arm|aarch64|i.86|x86_64|powerpc|powerpc64).*-linux*"
+COMPATIBLE_HOST = "(arm|aarch64|i.86|x86_64|powerpc|powerpc64|riscv32|riscv64).*-linux*"
 
 inherit autotools-brokensep
 
@@ -26,7 +25,6 @@ PLAT ?= "${HOST_ARCH}"
 
 do_configure () {
     export PLATFORM=${PLAT}
-    export COMPILER='gcc'
     ${S}/configure \
     --prefix=${prefix} \
     --includedir=${includedir} \
Signature · 1 line
2.39.0
author
#3 lore raw

PATCH 4/4 sysbench: Upgrade 0.4.12 -> 1.0.20

In reply to Khem Raj

From: Peter Bergin <[email protected]>

Use system cuncurrencykit and enable riscv

---
 ...modifier-to-tmp-variable-in-memory-t.patch | 40 -------------------
 ...{sysbench_0.4.12.bb => sysbench_1.0.20.bb} | 18 +++++----
 2 files changed, 10 insertions(+), 48 deletions(-)
 delete mode 100644 meta-oe/recipes-benchmark/sysbench/sysbench/0001-Adding-volatile-modifier-to-tmp-variable-in-memory-t.patch
 rename meta-oe/recipes-benchmark/sysbench/{sysbench_0.4.12.bb => sysbench_1.0.20.bb} (57%)
meta-oe/recipes-benchmark/sysbench/sysbench/0001-Adding-volatile-modifier-to-tmp-variable-in-memory-t.patch deleted +0 -40
deleted file mode 100644
index d628e81b56..0000000000
@@ -1,40 +0,0 @@
-From c1ebf893e32a0a77e820484d48a903523fef7c1b Mon Sep 17 00:00:00 2001
-From: Vasily Tarasov <[email protected]>
-Date: Fri, 10 Jun 2016 14:33:48 -0400
-Subject: [PATCH] Adding volatile modifier to tmp variable in memory test
-
-Issue explanation:
-
-./sysbench/sysbench --test=memory --num-threads=16 \
-		    --memory-block-size=268435456 \
-		    --memory-total-size=137438953472 \
-		    --memory-oper=read \
-		    --memory-access-mode=seq \
-		    --memory-scope=local run
-
-Without this commit the time to run the above command is 0.0004 seconds.
-With this commit the time is greater than 3 seconds.  Essentially,
-without the volatile modifier, the compiler optimizes read access so
-that no real access happens.
-
-Upstream-Status: Backport [part of v1.0.0 https://github.com/akopytov/sysbench/commit/8753cb93be4c0b81a20b704ced91e7a422da52b1]
-
-(cherry picked from commit 8753cb93be4c0b81a20b704ced91e7a422da52b1)
-Signed-off-by: massimo toscanelli <[email protected]>
----
- sysbench/tests/memory/sb_memory.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/sysbench/tests/memory/sb_memory.c b/sysbench/tests/memory/sb_memory.c
-index 2e8998f..7d22bb9 100644
---- a/sysbench/tests/memory/sb_memory.c
-+++ b/sysbench/tests/memory/sb_memory.c
-@@ -244,7 +244,7 @@ sb_request_t memory_get_request(int tid)
- int memory_execute_request(sb_request_t *sb_req, int thread_id)
- {
-   sb_mem_request_t    *mem_req = &sb_req->u.mem_request;
--  int                 tmp = 0;
-+  volatile int        tmp = 0;
-   int                 idx; 
-   int                 *buf, *end;
-   log_msg_t           msg;
meta-oe/recipes-benchmark/sysbench/sysbench_1.0.20.bb renamed from meta-oe/recipes-benchmark/sysbench/sysbench_0.4.12.bb +10 -8
similarity index 57%
rename from meta-oe/recipes-benchmark/sysbench/sysbench_0.4.12.bb
rename to meta-oe/recipes-benchmark/sysbench/sysbench_1.0.20.bb
index 4ac78fb8fd..098954af37 100644
@@ -2,20 +2,22 @@ SUMMARY = "System performance benchmark"
 HOMEPAGE = "http://github.com/akopytov/sysbench"
 SECTION = "console/tests"
 LICENSE = "GPL-2.0-only"
-LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f"
+LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
 
-inherit autotools
+DEPENDS = "libtool libaio luajit concurrencykit"
+
+inherit autotools-brokensep pkgconfig
 
 # The project has moved from Sourceforge to Launchpad, to Github. Use the source tarball from
 # Launchpad until the next release is available from Github.
-SRC_URI = "https://launchpad.net/ubuntu/+archive/primary/+files/${BPN}_${PV}.orig.tar.gz \
-           file://0001-Adding-volatile-modifier-to-tmp-variable-in-memory-t.patch \
-           "
+SRC_URI = "git://github.com/akopytov/sysbench.git;protocol=https;branch=master"
+SRCREV = "ebf1c90da05dea94648165e4f149abc20c979557"
+
+S = "${WORKDIR}/git"
 
-SRC_URI[md5sum] = "3a6d54fdd3fe002328e4458206392b9d"
-SRC_URI[sha256sum] = "83fa7464193e012c91254e595a89894d8e35b4a38324b52a5974777e3823ea9e"
+COMPATIBLE_HOST = "(arm|aarch64|i.86|x86_64|powerpc|powerpc64|riscv32|riscv64).*-linux*"
 
-EXTRA_OECONF += "--enable-largefile"
+EXTRA_OECONF += "--enable-largefile --with-system-luajit --with-system-ck --without-gcc-arch"
 PACKAGECONFIG ??= ""
 PACKAGECONFIG[aio] = "--enable-aio,--disable-aio,libaio,"
 PACKAGECONFIG[mysql] = "--with-mysql \
Signature · 1 line
2.39.0