summaryrefslogtreecommitdiffstats
path: root/meta/recipes-kernel/lttng/lttng-tools_2.14.0.bb
diff options
context:
space:
mode:
authorMingli Yu <mingli.yu@windriver.com>2025-07-24 17:28:13 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2025-08-19 11:48:50 +0100
commit4fd63f7ec3d54ba93cb16050edc6ace55926bad1 (patch)
tree5cfdbfbf2fc79cec1d8490a43336d6a313fb1b38 /meta/recipes-kernel/lttng/lttng-tools_2.14.0.bb
parent975fd7de311f70758fa9970a0452ae35341d23c7 (diff)
downloadpoky-4fd63f7ec3d54ba93cb16050edc6ace55926bad1.tar.gz
lttng-tools: Upgrade 2.13.15 -> 2.14.0
* Remove 3 backported patch. 0001-Fix-rotation-destroy-flush-fix-session-daemon-abort-.patch 0001-compat-Define-off64_t-as-off_t-on-linux.patch 0001-tests-add-check_skip_kernel_test-to-check-root-user-.patch * Remove 0001-fix-lttng-tools-fails-to-compile-with-libxml2-2.14.0.patch as the issue has been fixed in another way as [1]. * Rebase 0001-tests-do-not-strip-a-helper-library.patch and disable-tests.patch to fuzz issue. * Add babeltrace2 to DEPENDS to fix below configure error. | configure: error: libbabeltrace2 is required to build tests * src/common/config/session.xsd is restructured to src/common/session.xsd [2]. * Add 0001-gen-ust-events-constructor-change-rpath-to-libdir-li.patch to fix the below buildpath QA issue. ERROR: lttng-tools-2.14.0-r0 do_package_qa: QA Issue: File /usr/lib/lttng-tools/ptest/tests/utils/testapp/gen-ust-events-constructor/gen-ust-events-c-constructor-so in package lttng-tools-ptest contains reference to TMPDIR [buildpaths] ERROR: lttng-tools-2.14.0-r0 do_package_qa: QA Issue: lttng-tools-ptest: /usr/lib/lttng-tools/ptest/tests/utils/testapp/gen-ust-events-constructor/gen-ust-events-c-constructor-so contains bad RPATH /buildarea3/myu2/yocto/builds/ptest-2025-07-09/tmp/work/core2-64-poky-linux/lttng-tools/2.14.0/build/tests/utils/testapp/gen-ust-events-constructor [rpaths] ERROR: lttng-tools-2.14.0-r0 do_package_qa: QA Issue: File /usr/lib/lttng-tools/ptest/tests/utils/testapp/gen-ust-events-constructor/gen-ust-events-constructor-so in package lttng-tools-ptest contains reference to TMPDIR [buildpaths] ERROR: lttng-tools-2.14.0-r0 do_package_qa: QA Issue: lttng-tools-ptest: /usr/lib/lttng-tools/ptest/tests/utils/testapp/gen-ust-events-constructor/gen-ust-events-constructor-so contains bad RPATH /buildarea3/myu2/yocto/builds/ptest-2025-07-09/tmp/work/core2-64-poky-linux/lttng-tools/2.14.0/build/tests/utils/testapp/gen-ust-events-constructor [rpaths] * Add the redpends for lttng-tools-ptest to fix the test failure. ERROR: tools/live/test_early_inactive_app.py ============================================ Traceback (most recent call last): File "/usr/lib/lttng-tools/ptest/tests/regression/./tools/live/test_early_inactive_app.py", line 21, in <module> import lttngtest File "/usr/lib/lttng-tools/ptest/tests/utils/lttngtest/__init__.py", line 9, in <module> from .environment import * File "/usr/lib/lttng-tools/ptest/tests/utils/lttngtest/environment.py", line 13, in <module> import random ModuleNotFoundError: No module named 'random' ERROR: tools/live/test_early_inactive_app.py - missing test plan ModuleNotFoundError: No module named 'random' ModuleNotFoundError: No module named 'xml' ModuleNotFoundError: No module named 'tempfile' ModuleNotFoundError: No module named 'json' ModuleNotFoundError: No module named 'bt2' [1] https://github.com/lttng/lttng-tools/commit/2d2e77ddc9e3e63c3c658e824fb754f5a534a6ab [2] https://github.com/lttng/lttng-tools/commit/4ae042345b4094e98611744d9ba6c92265058fdb RP: Added install of missing expect scripts Add new dependency on lttng-ust-dev due to test requirement (and remove QA check warning) Add missing dependency on python3-asyncio for concurency module (From OE-Core rev: a09c0fa79cba48c76ed9b582e42becff91f32435) Signed-off-by: Mingli Yu <mingli.yu@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-kernel/lttng/lttng-tools_2.14.0.bb')
-rw-r--r--meta/recipes-kernel/lttng/lttng-tools_2.14.0.bb213
1 files changed, 213 insertions, 0 deletions
diff --git a/meta/recipes-kernel/lttng/lttng-tools_2.14.0.bb b/meta/recipes-kernel/lttng/lttng-tools_2.14.0.bb
new file mode 100644
index 0000000000..66fec08ff3
--- /dev/null
+++ b/meta/recipes-kernel/lttng/lttng-tools_2.14.0.bb
@@ -0,0 +1,213 @@
1SECTION = "devel"
2SUMMARY = "Linux Trace Toolkit Control"
3DESCRIPTION = "The Linux trace toolkit is a suite of tools designed \
4to extract program execution details from the Linux operating system \
5and interpret them."
6HOMEPAGE = "https://github.com/lttng/lttng-tools"
7
8LICENSE = "GPL-2.0-only & LGPL-2.1-only"
9LIC_FILES_CHKSUM = "file://LICENSE;md5=40ef17463fbd6f377db3c47b1cbaded8 \
10 file://LICENSES/GPL-2.0;md5=e68f69a54b44ba526ad7cb963e18fbce \
11 file://LICENSES/LGPL-2.1;md5=9920968d0f2ff585ce61fae30344dd95"
12
13include lttng-platforms.inc
14
15DEPENDS = "liburcu popt libxml2 util-linux bison-native babeltrace2"
16RDEPENDS:${PN} = "libgcc"
17RRECOMMENDS:${PN} += "${LTTNGMODULES}"
18RDEPENDS:${PN}-ptest += "make perl bash gawk babeltrace procps perl-module-overloading coreutils util-linux kmod ${LTTNGMODULES} sed python3-core grep binutils"
19RDEPENDS:${PN}-ptest:append:libc-glibc = " glibc-utils"
20RDEPENDS:${PN}-ptest:append:libc-musl = " musl-utils"
21# babelstats.pl wants getopt-long
22RDEPENDS:${PN}-ptest += "perl-module-getopt-long \
23 babeltrace2 \
24 lttng-ust-dev \
25 python3-asyncio \
26 python3-logging \
27 python3-math \
28 python3-numbers \
29 python3-json \
30 python3-io \
31 python3-shell \
32 python3-xml \
33"
34
35INSANE_SKIP:${PN}-ptest += "dev-deps"
36
37PYTHON_OPTION = "am_cv_python_pyexecdir='${PYTHON_SITEPACKAGES_DIR}' \
38 am_cv_python_pythondir='${PYTHON_SITEPACKAGES_DIR}' \
39 PYTHON_INCLUDE='-I${STAGING_INCDIR}/python${PYTHON_BASEVERSION}${PYTHON_ABI}' \
40"
41PACKAGECONFIG ??= "${LTTNGUST} kmod"
42PACKAGECONFIG[python] = "--enable-python-bindings ${PYTHON_OPTION},,python3 swig-native"
43PACKAGECONFIG[lttng-ust] = "--with-lttng-ust, --without-lttng-ust, lttng-ust"
44PACKAGECONFIG[kmod] = "--with-kmod, --without-kmod, kmod"
45PACKAGECONFIG[manpages] = "--enable-man-pages, --disable-man-pages, asciidoc-native xmlto-native libxslt-native"
46
47SRC_URI = "https://lttng.org/files/lttng-tools/lttng-tools-${PV}.tar.bz2 \
48 file://0001-tests-do-not-strip-a-helper-library.patch \
49 file://run-ptest \
50 file://lttng-sessiond.service \
51 file://disable-tests.patch \
52 file://0001-gen-ust-events-constructor-change-rpath-to-libdir-li.patch \
53 "
54
55SRC_URI[sha256sum] = "d8c39c26cec13b7bd82551cd52a22efc358b888e36ebcf9c1b60ef1c3a3c2fd3"
56
57inherit autotools ptest pkgconfig useradd python3-dir manpages systemd
58
59CACHED_CONFIGUREVARS = "PGREP=/usr/bin/pgrep"
60
61EXTRA_OECONF += "--disable-libtool-linkdep-fixup"
62
63SYSTEMD_SERVICE:${PN} = "lttng-sessiond.service"
64SYSTEMD_AUTO_ENABLE = "disable"
65
66USERADD_PACKAGES = "${PN}"
67GROUPADD_PARAM:${PN} = "tracing"
68
69FILES:${PN} += "${libdir}/lttng/libexec/* ${datadir}/xml/lttng \
70 ${PYTHON_SITEPACKAGES_DIR}/*"
71FILES:${PN}-staticdev += "${PYTHON_SITEPACKAGES_DIR}/*.a"
72FILES:${PN}-dev += "${PYTHON_SITEPACKAGES_DIR}/*.la"
73
74# Since files are installed into ${libdir}/lttng/libexec we match
75# the libexec insane test so skip it.
76# Python module needs to keep _lttng.so
77INSANE_SKIP:${PN} = "libexec dev-so"
78INSANE_SKIP:${PN}-dbg = "libexec"
79
80PRIVATE_LIBS:${PN}-ptest = "libfoo.so"
81
82do_install:append () {
83 # install systemd unit file
84 install -d ${D}${systemd_system_unitdir}
85 install -m 0644 ${UNPACKDIR}/lttng-sessiond.service ${D}${systemd_system_unitdir}
86}
87
88do_install_ptest () {
89 for f in Makefile tests/Makefile tests/utils/utils.sh tests/regression/tools/save-load/*.lttng \
90 tests/regression/tools/save-load/configuration/load-42*.lttng tests/regression/tools/health/test_health.sh \
91 tests/regression/tools/metadata/utils.sh tests/regression/tools/rotation/rotate_utils.sh \
92 tests/regression/tools/notification/util_event_generator.sh \
93 tests/regression/tools/trace-format/ust-local-trace-pretty.expect \
94 tests/regression/tools/trace-format/kernel-local-trace-pretty.expect \
95 tests/regression/tools/base-path/*.lttng; do
96 install -D "${B}/$f" "${D}${PTEST_PATH}/$f"
97 done
98
99 for f in tests/utils/tap-driver.sh config/test-driver src/common/session.xsd src/common/mi-lttng-4.1.xsd \
100 tests/regression/tests.serial; do
101 install -D "${S}/$f" "${D}${PTEST_PATH}/$f"
102 done
103
104 # Patch in the correct path for the custom libraries a helper executable needs
105 sed -i -e 's!FIXMEPTESTPATH!${PTEST_PATH}!g' "${D}${PTEST_PATH}/run-ptest"
106
107 # Prevent 'make check' from recursing into non-test subdirectories.
108 sed -i -e 's!^SUBDIRS = .*!SUBDIRS = tests!' "${D}${PTEST_PATH}/Makefile"
109
110 # We don't need these
111 sed -i -e '/dist_noinst_SCRIPTS = /,/^$/d' "${D}${PTEST_PATH}/tests/Makefile"
112
113 # We shouldn't need to build anything in tests/utils
114 sed -i -e 's!am__append_1 = . utils!am__append_1 = . !' \
115 "${D}${PTEST_PATH}/tests/Makefile"
116
117 # Copy the tests directory tree and the executables and
118 # Makefiles found within.
119 for d in $(find "${B}/tests" -type d -not -name .libs -printf '%P ') ; do
120 install -d "${D}${PTEST_PATH}/tests/$d"
121 find "${B}/tests/$d" -maxdepth 1 -executable -type f \
122 -exec install -t "${D}${PTEST_PATH}/tests/$d" {} +
123 # Take all .py scripts for tests using the python bindings.
124 find "${B}/tests/$d" -maxdepth 1 -type f -name "*.py" \
125 -exec install -t "${D}${PTEST_PATH}/tests/$d" {} +
126 test -r "${B}/tests/$d/Makefile" && \
127 install -t "${D}${PTEST_PATH}/tests/$d" "${B}/tests/$d/Makefile"
128 done
129
130 for d in $(find "${B}/tests" -type d -name .libs -printf '%P ') ; do
131 for f in $(find "${B}/tests/$d" -maxdepth 1 -executable -type f -printf '%P ') ; do
132 cp ${B}/tests/$d/$f ${D}${PTEST_PATH}/tests/`dirname $d`/$f
133 case $f in
134 *.so|userspace-probe-elf-*)
135 install -d ${D}${PTEST_PATH}/tests/$d/
136 ln -s ../$f ${D}${PTEST_PATH}/tests/$d/$f
137 # Remove any rpath/runpath to pass QA check.
138 chrpath --delete ${D}${PTEST_PATH}/tests/$d/$f
139 ;;
140 esac
141 done
142 done
143
144 chrpath --delete ${D}${PTEST_PATH}/tests/utils/testapp/userspace-probe-elf-binary/userspace-probe-elf-binary
145 chrpath --delete ${D}${PTEST_PATH}/tests/utils/testapp/userspace-probe-elf-cxx-binary/userspace-probe-elf-cxx-binary
146 chrpath --delete ${D}${PTEST_PATH}/tests/regression/ust/ust-dl/libbar.so
147 chrpath --delete ${D}${PTEST_PATH}/tests/regression/ust/ust-dl/libfoo.so
148
149 #
150 # Use the versioned libs of liblttng-ust-dl.
151 #
152 ustdl="${D}${PTEST_PATH}/tests/regression/ust/ust-dl/test_ust-dl.py"
153 if [ -e $ustdl ]; then
154 sed -i -e 's!:liblttng-ust-dl.so!:liblttng-ust-dl.so.0!' $ustdl
155 fi
156
157 install ${B}/tests/unit/ini_config/sample.ini ${D}${PTEST_PATH}/tests/unit/ini_config/
158
159 # We shouldn't need to build anything in tests/regression/tools
160 sed -i -e 's!^SUBDIRS = tools !SUBDIRS = !' \
161 "${D}${PTEST_PATH}/tests/regression/Makefile"
162
163 # Prevent attempts to update Makefiles during test runs, and
164 # silence "Making check in $SUBDIR" messages.
165 find "${D}${PTEST_PATH}" -name Makefile -type f -exec \
166 sed -i -e '/Makefile:/,/^$/d' -e '/%: %.in/,/^$/d' \
167 -e '/echo "Making $$target in $$subdir"; \\/d' \
168 -e 's/^srcdir = \(.*\)/srcdir = ./' \
169 -e 's/^builddir = \(.*\)/builddir = ./' \
170 -e 's/^all-am:.*/all-am:/' \
171 {} +
172
173 find "${D}${PTEST_PATH}" -name Makefile -type f -exec \
174 touch -r "${B}/Makefile" {} +
175
176 #
177 # Need to stop generated binaries from rebuilding by removing their source dependencies
178 #
179 sed -e 's#\(^test.*OBJECTS.=\)#disable\1#g' \
180 -e 's#\(^test.*DEPENDENCIES.=\)#disable\1#g' \
181 -e 's#\(^test.*SOURCES.=\)#disable\1#g' \
182 -e 's#\(^test.*LDADD.=\)#disable\1#g' \
183 -i ${D}${PTEST_PATH}/tests/unit/Makefile
184
185 # Fix hardcoded build path
186 sed -e 's#TESTAPP_PATH=.*/tests/regression/#TESTAPP_PATH="${PTEST_PATH}/tests/regression/#' \
187 -i ${D}${PTEST_PATH}/tests/regression/ust/python-logging/test_python_logging
188
189 # Substitute links to installed binaries.
190 for prog in lttng lttng-relayd lttng-sessiond lttng-consumerd lttng-crash; do
191 exedir="${D}${PTEST_PATH}/src/bin/${prog}"
192 install -d "$exedir"
193 case "$prog" in
194 lttng-consumerd)
195 ln -s "${libdir}/lttng/libexec/$prog" "$exedir"
196 ;;
197 *)
198 ln -s "${bindir}/$prog" "$exedir"
199 ;;
200 esac
201 done
202}
203
204INHIBIT_PACKAGE_STRIP_FILES = "\
205 ${PKGD}${PTEST_PATH}/tests/utils/testapp/userspace-probe-elf-binary/userspace-probe-elf-binary \
206 ${PKGD}${PTEST_PATH}/tests/utils/testapp/userspace-probe-elf-binary/.libs/userspace-probe-elf-binary \
207 ${PKGD}${PTEST_PATH}/tests/utils/testapp/userspace-probe-elf-cxx-binary/userspace-probe-elf-cxx-binary \
208 ${PKGD}${PTEST_PATH}/tests/utils/testapp/userspace-probe-elf-cxx-binary/.libs/userspace-probe-elf-cxx-binary \
209 ${PKGD}${PTEST_PATH}/tests/utils/testapp/gen-syscall-events/gen-syscall-events \
210 ${PKGD}${PTEST_PATH}/tests/utils/testapp/gen-syscall-events/.libs/gen-syscall-events \
211 ${PKGD}${PTEST_PATH}/tests/utils/testapp/gen-syscall-events-callstack/gen-syscall-events-callstack \
212 ${PKGD}${PTEST_PATH}/tests/utils/testapp/gen-syscall-events-callstack/.libs/gen-syscall-events-callstack \
213 "