From e18cec09b30a3946a1b1c590d4bf1fe5080d7087 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Sun, 21 Jan 2024 12:25:50 -0800 Subject: bcc: Upgrade to 0.29.1 Signed-off-by: Khem Raj --- ...MakeLists.txt-override-the-PY_CMD_ESCAPED.patch | 8 +-- ...eLists.txt-Remove-check-for-host-etc-debi.patch | 35 ---------- .../0001-tools-trace.py-Fix-failing-to-exit.patch | 41 ------------ .../meta-python/recipes-devtools/bcc/bcc_0.28.0.bb | 77 ---------------------- .../meta-python/recipes-devtools/bcc/bcc_0.29.1.bb | 74 +++++++++++++++++++++ 5 files changed, 78 insertions(+), 157 deletions(-) delete mode 100644 dynamic-layers/meta-python/recipes-devtools/bcc/bcc/0001-python-CMakeLists.txt-Remove-check-for-host-etc-debi.patch delete mode 100644 dynamic-layers/meta-python/recipes-devtools/bcc/bcc/0001-tools-trace.py-Fix-failing-to-exit.patch delete mode 100644 dynamic-layers/meta-python/recipes-devtools/bcc/bcc_0.28.0.bb create mode 100644 dynamic-layers/meta-python/recipes-devtools/bcc/bcc_0.29.1.bb (limited to 'dynamic-layers') diff --git a/dynamic-layers/meta-python/recipes-devtools/bcc/bcc/0001-CMakeLists.txt-override-the-PY_CMD_ESCAPED.patch b/dynamic-layers/meta-python/recipes-devtools/bcc/bcc/0001-CMakeLists.txt-override-the-PY_CMD_ESCAPED.patch index 3e0a6aa..1f9c41d 100644 --- a/dynamic-layers/meta-python/recipes-devtools/bcc/bcc/0001-CMakeLists.txt-override-the-PY_CMD_ESCAPED.patch +++ b/dynamic-layers/meta-python/recipes-devtools/bcc/bcc/0001-CMakeLists.txt-override-the-PY_CMD_ESCAPED.patch @@ -21,7 +21,7 @@ Signed-off-by: Mingli Yu --- a/src/python/CMakeLists.txt +++ b/src/python/CMakeLists.txt -@@ -12,7 +12,7 @@ file(GLOB_RECURSE PYTHON_INCLUDES RELATI +@@ -16,7 +16,7 @@ file(GLOB_RECURSE PYTHON_INCLUDES RELATI foreach(PY_CMD ${PYTHON_CMD}) string(REPLACE "/" "-" PY_CMD_ESCAPED ${PY_CMD}) @@ -30,12 +30,12 @@ Signed-off-by: Mingli Yu foreach(PY_SRC ${PYTHON_SOURCES}) configure_file(${PY_SRC} ${PY_DIRECTORY}/${PY_SRC} COPYONLY) -@@ -31,7 +31,7 @@ foreach(PY_CMD ${PYTHON_CMD}) +@@ -35,7 +35,7 @@ foreach(PY_CMD ${PYTHON_CMD}) DEPENDS ${PYTHON_SOURCES} ${PYTHON_INCLUDES} COMMENT "Building sdist for ${PY_CMD}" ) - add_custom_target(bcc_py_${PY_CMD_ESCAPED} ALL DEPENDS ${PIP_INSTALLABLE}) + add_custom_target(bcc_py_python3 ALL DEPENDS ${PIP_INSTALLABLE}) - install( - CODE " + if(NOT PYTHON_PREFIX) + set(PYTHON_PREFIX ${CMAKE_INSTALL_PREFIX}) diff --git a/dynamic-layers/meta-python/recipes-devtools/bcc/bcc/0001-python-CMakeLists.txt-Remove-check-for-host-etc-debi.patch b/dynamic-layers/meta-python/recipes-devtools/bcc/bcc/0001-python-CMakeLists.txt-Remove-check-for-host-etc-debi.patch deleted file mode 100644 index 3ca7fdd..0000000 --- a/dynamic-layers/meta-python/recipes-devtools/bcc/bcc/0001-python-CMakeLists.txt-Remove-check-for-host-etc-debi.patch +++ /dev/null @@ -1,35 +0,0 @@ -From cb3f032b55b32c50201862b26c76ea18ad37cb39 Mon Sep 17 00:00:00 2001 -From: Ovidiu Panait -Date: Thu, 30 Jan 2020 14:19:33 +0200 -Subject: [PATCH] python/CMakeLists.txt: Remove check for host - /etc/debian_version - -Fix the following error that occurs during do_install when using the native -version of python3: -usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...] - or: setup.py --help [cmd1 cmd2 ...] - or: setup.py --help-commands - or: setup.py cmd --help - -error: option --install-layout not recognized - -Upstream-Status: Inappropriate [oe-specific] - -Signed-off-by: Ovidiu Panait ---- - src/python/CMakeLists.txt | 4 ---- - 1 file changed, 4 deletions(-) - ---- a/src/python/CMakeLists.txt -+++ b/src/python/CMakeLists.txt -@@ -5,10 +5,6 @@ if(NOT PYTHON_CMD) - set(PYTHON_CMD "python3") - endif() - --if(EXISTS "/etc/debian_version") -- set(PYTHON_FLAGS "${PYTHON_FLAGS} --install-layout deb") --endif() -- - file(GLOB_RECURSE PYTHON_SOURCES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} - ${CMAKE_CURRENT_SOURCE_DIR}/*.py) - file(GLOB_RECURSE PYTHON_INCLUDES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} diff --git a/dynamic-layers/meta-python/recipes-devtools/bcc/bcc/0001-tools-trace.py-Fix-failing-to-exit.patch b/dynamic-layers/meta-python/recipes-devtools/bcc/bcc/0001-tools-trace.py-Fix-failing-to-exit.patch deleted file mode 100644 index 6ac7219..0000000 --- a/dynamic-layers/meta-python/recipes-devtools/bcc/bcc/0001-tools-trace.py-Fix-failing-to-exit.patch +++ /dev/null @@ -1,41 +0,0 @@ -From a9f59fc8605de1bcca0b6c2d8132585f40c3b9bc Mon Sep 17 00:00:00 2001 -From: He Zhe -Date: Thu, 13 Aug 2020 11:25:58 +0800 -Subject: [PATCH] tools/trace.py: Fix failing to exit - -Class Probe::print_event is used as a callback of a ctypes wrapper. With -Yocto latest python v3.8.5, the exception raised by exit() is ignored and -thus trace cannot exit. Use os._exit(0) instead. - -$ /usr/share/bcc/tools/trace do_sys_open -M 1 -PID TID COMM FUNC -3740 3740 irqbalance do_sys_open -Exception ignored on calling ctypes callback function: -.raw_cb at 0x7f7c9efea280> -Traceback (most recent call last): -File "/usr/lib64/python3.8/site-packages/bcc/table.py", line 685, in raw_cb_ -callback(cpu, data, size) -File "/usr/share/bcc/tools/trace", line 630, in print_event -exit() -File "/usr/lib64/python3.8/sitebuiltins.py", line 26, in __call_ -raise SystemExit(code) -SystemExit: None - -Upstream-Status: Pending - -Signed-off-by: He Zhe ---- - tools/trace.py | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - ---- a/tools/trace.py -+++ b/tools/trace.py -@@ -671,7 +671,7 @@ BPF_PERF_OUTPUT(%s); - if self.aggregate: - self.print_aggregate_events() - sys.stdout.flush() -- exit() -+ os._exit(0) - - def attach(self, bpf, verbose): - if len(self.library) == 0: diff --git a/dynamic-layers/meta-python/recipes-devtools/bcc/bcc_0.28.0.bb b/dynamic-layers/meta-python/recipes-devtools/bcc/bcc_0.28.0.bb deleted file mode 100644 index 5625e47..0000000 --- a/dynamic-layers/meta-python/recipes-devtools/bcc/bcc_0.28.0.bb +++ /dev/null @@ -1,77 +0,0 @@ -SUMMARY = "BPF Compiler Collection (BCC)" -HOMEPAGE = "https://github.com/iovisor/bcc" -LICENSE = "Apache-2.0" -LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=e3fc50a88d0a364313df4b21ef20c29e" - -inherit cmake python3native manpages ptest - -DEPENDS += "bison-native \ - flex-native \ - zip-native \ - flex \ - elfutils \ - ${LUAJIT} \ - clang \ - libbpf \ - python3-setuptools-native \ - " - -LUAJIT ?= "luajit" -LUAJIT:powerpc64le = "" -LUAJIT:powerpc64 = "" -LUAJIT:riscv64 = "" - -RDEPENDS:${PN} += "bash python3 python3-core python3-setuptools xz" -RDEPENDS:${PN}-ptest = "cmake python3 python3-netaddr python3-pyroute2" - -SRC_URI = "gitsm://github.com/iovisor/bcc;branch=master;protocol=https \ - file://0001-python-CMakeLists.txt-Remove-check-for-host-etc-debi.patch \ - file://0001-tools-trace.py-Fix-failing-to-exit.patch \ - file://0001-CMakeLists.txt-override-the-PY_CMD_ESCAPED.patch \ - file://0001-Vendor-just-enough-extra-headers-to-allow-libbpf-to-.patch \ - file://0001-tests-cc-Use-c-14-standard.patch \ - file://0001-CMakeLists.txt-don-t-modify-.gitconfig-on-build-host.patch \ - file://run-ptest \ - file://ptest_wrapper.sh \ - " - -SRCREV = "8422cd449ad2e60414a4508aa4a150a9db39c4a3" - -PV .= "+git${SRCPV}" - -S = "${WORKDIR}/git" - -PACKAGECONFIG ??= "examples" -PACKAGECONFIG:remove:libc-musl = "examples" - -PACKAGECONFIG[manpages] = "-DENABLE_MAN=ON,-DENABLE_MAN=OFF," -PACKAGECONFIG[examples] = "-DENABLE_EXAMPLES=ON,-DENABLE_EXAMPLES=OFF," - -EXTRA_OECMAKE = " \ - -DCMAKE_USE_LIBBPF_PACKAGE=ON \ - -DENABLE_LLVM_SHARED=ON \ - -DENABLE_CLANG_JIT=ON \ - -DLLVM_PACKAGE_VERSION=${LLVMVERSION} \ - -DPYTHON_CMD=${PYTHON} \ - -DPYTHON_FLAGS=--install-lib=${PYTHON_SITEPACKAGES_DIR} \ -" - -do_install:append() { - sed -e 's@#!/usr/bin/env python@#!/usr/bin/env python3@g' \ - -i $(find ${D}${datadir}/${PN} -type f) - sed -e 's@#!/usr/bin/python.*@#!/usr/bin/env python3@g' \ - -i $(find ${D}${datadir}/${PN} -type f) -} - -do_install_ptest() { - install -d ${D}${PTEST_PATH}/tests/cc - install ${B}/tests/cc/test_libbcc_no_libbpf ${B}/tests/cc/libusdt_test_lib.so ${D}${PTEST_PATH}/tests/cc - cp -rf ${S}/tests/python ${D}${PTEST_PATH}/tests/python - install ${WORKDIR}/ptest_wrapper.sh ${D}${PTEST_PATH}/tests - install ${S}/examples/networking/simulation.py ${D}${PTEST_PATH}/tests/python -} - -FILES:${PN} += "${PYTHON_SITEPACKAGES_DIR}" -FILES:${PN}-doc += "${datadir}/${PN}/man" - -COMPATIBLE_HOST = "(x86_64.*|aarch64.*|powerpc64.*|riscv64.*)-linux" diff --git a/dynamic-layers/meta-python/recipes-devtools/bcc/bcc_0.29.1.bb b/dynamic-layers/meta-python/recipes-devtools/bcc/bcc_0.29.1.bb new file mode 100644 index 0000000..6690d82 --- /dev/null +++ b/dynamic-layers/meta-python/recipes-devtools/bcc/bcc_0.29.1.bb @@ -0,0 +1,74 @@ +SUMMARY = "BPF Compiler Collection (BCC)" +HOMEPAGE = "https://github.com/iovisor/bcc" +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=e3fc50a88d0a364313df4b21ef20c29e" + +inherit cmake python3native manpages ptest + +DEPENDS += "bison-native \ + flex-native \ + zip-native \ + flex \ + elfutils \ + ${LUAJIT} \ + clang \ + libbpf \ + python3-setuptools-native \ + " + +LUAJIT ?= "luajit" +LUAJIT:powerpc64le = "" +LUAJIT:powerpc64 = "" +LUAJIT:riscv64 = "" + +RDEPENDS:${PN} += "bash python3 python3-core python3-setuptools xz" +RDEPENDS:${PN}-ptest = "cmake python3 python3-netaddr python3-pyroute2" + +SRC_URI = "gitsm://github.com/iovisor/bcc;branch=master;protocol=https \ + file://0001-CMakeLists.txt-override-the-PY_CMD_ESCAPED.patch \ + file://0001-Vendor-just-enough-extra-headers-to-allow-libbpf-to-.patch \ + file://0001-tests-cc-Use-c-14-standard.patch \ + file://0001-CMakeLists.txt-don-t-modify-.gitconfig-on-build-host.patch \ + file://run-ptest \ + file://ptest_wrapper.sh \ + " + +SRCREV = "eb8ede2d70b17350757f2570ef76ea4c2e1dbff8" + +S = "${WORKDIR}/git" + +PACKAGECONFIG ??= "examples" +PACKAGECONFIG:remove:libc-musl = "examples" + +PACKAGECONFIG[manpages] = "-DENABLE_MAN=ON,-DENABLE_MAN=OFF," +PACKAGECONFIG[examples] = "-DENABLE_EXAMPLES=ON,-DENABLE_EXAMPLES=OFF," + +EXTRA_OECMAKE = " \ + -DCMAKE_USE_LIBBPF_PACKAGE=ON \ + -DENABLE_LLVM_SHARED=ON \ + -DENABLE_CLANG_JIT=ON \ + -DPY_SKIP_DEB_LAYOUT=ON \ + -DLLVM_PACKAGE_VERSION=${LLVMVERSION} \ + -DPYTHON_CMD=${PYTHON} \ + -DPYTHON_FLAGS=--install-lib=${PYTHON_SITEPACKAGES_DIR} \ +" + +do_install:append() { + sed -e 's@#!/usr/bin/env python@#!/usr/bin/env python3@g' \ + -i $(find ${D}${datadir}/${PN} -type f) + sed -e 's@#!/usr/bin/python.*@#!/usr/bin/env python3@g' \ + -i $(find ${D}${datadir}/${PN} -type f) +} + +do_install_ptest() { + install -d ${D}${PTEST_PATH}/tests/cc + install ${B}/tests/cc/test_libbcc_no_libbpf ${B}/tests/cc/libusdt_test_lib.so ${D}${PTEST_PATH}/tests/cc + cp -rf ${S}/tests/python ${D}${PTEST_PATH}/tests/python + install ${WORKDIR}/ptest_wrapper.sh ${D}${PTEST_PATH}/tests + install ${S}/examples/networking/simulation.py ${D}${PTEST_PATH}/tests/python +} + +FILES:${PN} += "${PYTHON_SITEPACKAGES_DIR}" +FILES:${PN}-doc += "${datadir}/${PN}/man" + +COMPATIBLE_HOST = "(x86_64.*|aarch64.*|powerpc64.*|riscv64.*)-linux" -- cgit v1.2.3-54-g00ecf