diff options
Diffstat (limited to 'import-layers/yocto-poky/meta/recipes-kernel/lttng')
12 files changed, 393 insertions, 0 deletions
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/lttng/babeltrace/0001-Fix-invalid-pointer-free-with-trace-collection.patch b/import-layers/yocto-poky/meta/recipes-kernel/lttng/babeltrace/0001-Fix-invalid-pointer-free-with-trace-collection.patch new file mode 100644 index 000000000..3e2c4e1e6 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-kernel/lttng/babeltrace/0001-Fix-invalid-pointer-free-with-trace-collection.patch @@ -0,0 +1,44 @@ +From e4cad900994cf286d971796a947fea782dfc6651 Mon Sep 17 00:00:00 2001 +From: Francis Giraldeau <francis.giraldeau@gmail.com> +Date: Mon, 15 Jun 2015 11:43:02 -0400 +Subject: [PATCH] Fix invalid pointer free with trace collection + +Upstream-Status: Submitted + +Patch proposed by Li RongQing related to bug# 790 + +Signed-off-by: Mikael Beckius <mikael.beckius@windriver.com> +Signed-off-by: Francis Giraldeau <francis.giraldeau@gmail.com> +--- + lib/context.c | 8 +++----- + 1 file changed, 3 insertions(+), 5 deletions(-) + +diff --git a/lib/context.c b/lib/context.c +index 45aab34..8d3770f 100644 +--- a/lib/context.c ++++ b/lib/context.c +@@ -79,7 +79,7 @@ int bt_context_add_trace(struct bt_context *ctx, const char *path, + struct bt_trace_descriptor *td; + struct bt_format *fmt; + struct bt_trace_handle *handle; +- int ret, closeret; ++ int ret; + + if (!ctx || !format_name || (!path && !stream_list)) + return -EINVAL; +@@ -159,10 +159,8 @@ int bt_context_add_trace(struct bt_context *ctx, const char *path, + return handle->id; + + error: +- closeret = fmt->close_trace(td); +- if (closeret) { +- fprintf(stderr, "Error in close_trace callback\n"); +- } ++ if (handle) ++ bt_context_remove_trace(ctx, handle->id); + end: + return ret; + } +-- +1.9.1 + diff --git a/import-layers/yocto-poky/meta/recipes-kernel/lttng/babeltrace/0001-lttng-live-Include-sys-param.h-for-MAXNAMLEN-definti.patch b/import-layers/yocto-poky/meta/recipes-kernel/lttng/babeltrace/0001-lttng-live-Include-sys-param.h-for-MAXNAMLEN-definti.patch new file mode 100644 index 000000000..eb16cd1d2 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-kernel/lttng/babeltrace/0001-lttng-live-Include-sys-param.h-for-MAXNAMLEN-definti.patch @@ -0,0 +1,29 @@ +From 8331b87845cafdda40e59a682f2ca8120ed0c472 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Thu, 31 Dec 2015 08:17:40 +0000 +Subject: [PATCH] lttng-live: Include sys/param.h for MAXNAMLEN defintion + +exposed on musl based systems + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- +Upstream-Status: pending + + formats/lttng-live/lttng-live.h | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/formats/lttng-live/lttng-live.h b/formats/lttng-live/lttng-live.h +index 4ab641d..808ed2b 100644 +--- a/formats/lttng-live/lttng-live.h ++++ b/formats/lttng-live/lttng-live.h +@@ -25,6 +25,7 @@ + */ + + #include <stdint.h> ++#include <sys/param.h> + #include "lttng-viewer-abi.h" + + #define LTTNG_DEFAULT_NETWORK_VIEWER_PORT 5344 +-- +2.6.4 + diff --git a/import-layers/yocto-poky/meta/recipes-kernel/lttng/babeltrace_1.3.1.bb b/import-layers/yocto-poky/meta/recipes-kernel/lttng/babeltrace_1.3.1.bb new file mode 100644 index 000000000..176602632 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-kernel/lttng/babeltrace_1.3.1.bb @@ -0,0 +1,24 @@ +SUMMARY = "Babeltrace - Trace Format Babel Tower" +DESCRIPTION = "Babeltrace provides trace read and write libraries in host side, as well as a trace converter, which used to convert LTTng 2.0 traces into human-readable log." +HOMEPAGE = "http://www.efficios.com/babeltrace/" +BUGTRACKER = "https://bugs.lttng.org/projects/babeltrace" + +LICENSE = "MIT & GPLv2" +LIC_FILES_CHKSUM = "file://LICENSE;md5=76ba15dd76a248e1dd526bca0e2125fa" + +DEPENDS = "glib-2.0 util-linux popt bison-native flex-native" + +inherit autotools pkgconfig + +SRCREV = "6e2b9096c77138593097335b9b27202d98918089" + +SRC_URI = "git://git.efficios.com/babeltrace.git;branch=stable-1.3 \ + file://0001-Fix-invalid-pointer-free-with-trace-collection.patch \ + file://0001-lttng-live-Include-sys-param.h-for-MAXNAMLEN-definti.patch \ +" + +S = "${WORKDIR}/git" + +do_configure_prepend () { + ( cd ${S}; ${S}/bootstrap ) +} diff --git a/import-layers/yocto-poky/meta/recipes-kernel/lttng/lttng-modules_git.bb b/import-layers/yocto-poky/meta/recipes-kernel/lttng/lttng-modules_git.bb new file mode 100644 index 000000000..2eb1a51bc --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-kernel/lttng/lttng-modules_git.bb @@ -0,0 +1,33 @@ +SECTION = "devel" +SUMMARY = "Linux Trace Toolkit KERNEL MODULE" +DESCRIPTION = "The lttng-modules 2.0 package contains the kernel tracer modules" +LICENSE = "LGPLv2.1 & GPLv2 & MIT" +LIC_FILES_CHKSUM = "file://LICENSE;md5=362844633a08753bd96ab322a6c7f9f6 \ + file://gpl-2.0.txt;md5=751419260aa954499f7abaabaa882bbe \ + file://lgpl-2.1.txt;md5=243b725d71bb5df4a1e5920b344b86ad" + +inherit module + +SRCREV = "45e0ebd91f995cc73c2b0d5c60cf9d12e8c838bf" +PV = "2.7.1+git${SRCPV}" + +COMPATIBLE_HOST = '(x86_64|i.86|powerpc|aarch64|mips|nios2|arm).*-linux' + +SRC_URI = "git://git.lttng.org/lttng-modules.git;branch=stable-2.7" + +export INSTALL_MOD_DIR="kernel/lttng-modules" + +EXTRA_OEMAKE += "KERNELDIR='${STAGING_KERNEL_DIR}'" + +S = "${WORKDIR}/git" + +do_install_append() { + # Delete empty directories to avoid QA failures if no modules were built + find ${D}/lib -depth -type d -empty -exec rmdir {} \; +} + +python do_package_prepend() { + if not os.path.exists(os.path.join(d.getVar('D', True), 'lib/modules')): + bb.warn("%s: no modules were created; this may be due to CONFIG_TRACEPOINTS not being enabled in your kernel." % d.getVar('PN', True)) +} + diff --git a/import-layers/yocto-poky/meta/recipes-kernel/lttng/lttng-tools/Revert-Build-look-for-python-3.0-when-building-pytho.patch b/import-layers/yocto-poky/meta/recipes-kernel/lttng/lttng-tools/Revert-Build-look-for-python-3.0-when-building-pytho.patch new file mode 100644 index 000000000..d05c04c66 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-kernel/lttng/lttng-tools/Revert-Build-look-for-python-3.0-when-building-pytho.patch @@ -0,0 +1,30 @@ +From: Otavio Salvador <otavio@ossystems.com.br> +Date: Fri, 4 Dec 2015 16:11:41 +0000 +Subject: [PATCH] Revert "Build: look for python >= 3.0 when building python bindings" +Organization: O.S. Systems Software LTDA. + +This reverts commit 227703a2ceada3c104edd56756d48455ca4c271a. + +Upstream-Status: Pending + +Signed-off-by: Otavio Salvador <otavio@ossystems.com.br> +--- + configure.ac | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/configure.ac b/configure.ac +index 4dee4b4..6608bcd 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -339,7 +339,7 @@ AM_CONDITIONAL([PYTHON_BINDING], [test "x${enable_python_binding:-yes}" = xyes]) + + if test "x${enable_python_binding:-yes}" = xyes; then + AX_PKG_SWIG($swig_version, [], [ AC_MSG_ERROR([SWIG $swig_version or newer is needed]) ]) +- AM_PATH_PYTHON([3.0]) ++ AM_PATH_PYTHON + + AC_ARG_VAR([PYTHON_INCLUDE], [Include flags for python, bypassing python-config]) + AC_ARG_VAR([PYTHON_CONFIG], [Path to python-config]) +-- +2.1.4 + diff --git a/import-layers/yocto-poky/meta/recipes-kernel/lttng/lttng-tools/run-ptest b/import-layers/yocto-poky/meta/recipes-kernel/lttng/lttng-tools/run-ptest new file mode 100755 index 000000000..e758815c7 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-kernel/lttng/lttng-tools/run-ptest @@ -0,0 +1,4 @@ +#!/bin/sh + +make -C tests installcheck + diff --git a/import-layers/yocto-poky/meta/recipes-kernel/lttng/lttng-tools/runtest-2.4.0.patch b/import-layers/yocto-poky/meta/recipes-kernel/lttng/lttng-tools/runtest-2.4.0.patch new file mode 100644 index 000000000..958bce48e --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-kernel/lttng/lttng-tools/runtest-2.4.0.patch @@ -0,0 +1,27 @@ +diff --git a/Makefile.am b/Makefile.am +index 584f59b..c2bcabd 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -12,3 +12,9 @@ dist_doc_DATA = LICENSE \ + dist_noinst_DATA = CodingStyle + + EXTRA_DIST = extras/lttng-bash_completion gpl-2.0.txt lgpl-2.1.txt ++ ++install-ptest: ++ cp -r $(srcdir)/tests $(DESTDIR) ++ for m in $$(find $(DESTDIR)/tests -name Makefile); do \ ++ sed -i -e 's|^Makefile:|_Makefile:|' $$m; \ ++ done +diff --git a/tests/run.sh b/tests/run.sh +index c6c50fd..6455359 100755 +--- a/tests/run.sh ++++ b/tests/run.sh +@@ -19,4 +19,7 @@ + + [ -z "$1" ] && echo "Error: No testlist. Please specify a testlist to run." && exit 1 + +-prove --merge --exec '' - < $1 ++prove --merge -v --exec '' - < $1 | sed \ ++ -e 's|^ok \(.*\)|PASS: \1|' \ ++ -e 's|^not ok \(.*\)|FAIL: \1|' \ ++ | egrep -h 'PASS|FAIL' diff --git a/import-layers/yocto-poky/meta/recipes-kernel/lttng/lttng-tools/stop-using-SIGUNUSED.patch b/import-layers/yocto-poky/meta/recipes-kernel/lttng/lttng-tools/stop-using-SIGUNUSED.patch new file mode 100644 index 000000000..bd4f7d1d1 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-kernel/lttng/lttng-tools/stop-using-SIGUNUSED.patch @@ -0,0 +1,51 @@ +From 1f54181c2df1fb92c3323a6dbf8273fb66b883b6 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?J=C3=A9r=C3=A9mie=20Galarneau?= + <jeremie.galarneau@efficios.com> +Date: Sat, 17 Oct 2015 19:41:47 -0400 +Subject: [PATCH] Port: Don't use SIGUNUSED which is not defined on Solaris +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +Organization: O.S. Systems Software LTDA. + +Upstream-Status: Backport [2.8.0] + +Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com> +--- + src/common/runas.c | 18 +++++------------- + 1 file changed, 5 insertions(+), 13 deletions(-) + +diff --git a/src/common/runas.c b/src/common/runas.c +index 57f7382..0825470 100644 +--- a/src/common/runas.c ++++ b/src/common/runas.c +@@ -530,21 +530,13 @@ int run_as_rmdir_recursive(const char *path, uid_t uid, gid_t gid) + static + int reset_sighandler(void) + { +- int sig, ret = 0; ++ int sig; + +- for (sig = SIGHUP; sig <= SIGUNUSED; sig++) { +- /* Skip unblockable signals. */ +- if (sig == SIGKILL || sig == SIGSTOP) { +- continue; +- } +- if (signal(sig, SIG_DFL) == SIG_ERR) { +- PERROR("reset signal %d", sig); +- ret = -1; +- goto end; +- } ++ DBG("Resetting run_as worker signal handlers to default"); ++ for (sig = 1; sig <= 31; sig++) { ++ (void) signal(sig, SIG_DFL); + } +-end: +- return ret; ++ return 0; + } + + static +-- +2.6.2 + diff --git a/import-layers/yocto-poky/meta/recipes-kernel/lttng/lttng-tools_git.bb b/import-layers/yocto-poky/meta/recipes-kernel/lttng/lttng-tools_git.bb new file mode 100644 index 000000000..8bd09892c --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-kernel/lttng/lttng-tools_git.bb @@ -0,0 +1,82 @@ +SECTION = "devel" +SUMMARY = "Linux Trace Toolkit Control" +DESCRIPTION = "The Linux trace toolkit is a suite of tools designed \ +to extract program execution details from the Linux operating system \ +and interpret them." + +LICENSE = "GPLv2 & LGPLv2.1" +LIC_FILES_CHKSUM = "file://LICENSE;md5=01d7fc4496aacf37d90df90b90b0cac1 \ + file://gpl-2.0.txt;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ + file://lgpl-2.1.txt;md5=0f0d71500e6a57fd24d825f33242b9ca" + +DEPENDS = "liburcu popt libxml2" +RDEPENDS_${PN} = "libgcc" +RDEPENDS_${PN}-ptest += "make perl bash" + +SRCREV = "a90f2c1e10b759782653a81815625e9d1bbb75ca" +PV = "2.7.1+git${SRCPV}" + +PYTHON_OPTION = "am_cv_python_pyexecdir='${libdir}/python${PYTHON_BASEVERSION}/site-packages' \ + am_cv_python_pythondir='${libdir}/python${PYTHON_BASEVERSION}/site-packages' \ + PYTHON_INCLUDE='-I${STAGING_INCDIR}/python${PYTHON_BASEVERSION}' \ +" +PACKAGECONFIG ??= "lttng-ust" +PACKAGECONFIG[python] = "--enable-python-bindings ${PYTHON_OPTION},,python swig-native" +PACKAGECONFIG[lttng-ust] = "--enable-lttng-ust, --disable-lttng-ust, lttng-ust" +PACKAGECONFIG[kmod] = "--enable-kmod, --disable-kmod, kmod" +PACKAGECONFIG_remove_libc-musl = "lttng-ust" + +SRC_URI = "git://git.lttng.org/lttng-tools.git;branch=stable-2.7 \ + file://Revert-Build-look-for-python-3.0-when-building-pytho.patch \ + file://stop-using-SIGUNUSED.patch \ + file://runtest-2.4.0.patch \ + file://run-ptest" + +S = "${WORKDIR}/git" + +inherit autotools-brokensep ptest pkgconfig useradd + +USERADD_PACKAGES = "${PN}" +GROUPADD_PARAM_${PN} = "tracing" + +FILES_${PN} += "${libdir}/lttng/libexec/* ${datadir}/xml/lttng \ + ${libdir}/python${PYTHON_BASEVERSION}/site-packages/*" +FILES_${PN}-staticdev += "${libdir}/python${PYTHON_BASEVERSION}/site-packages/*.a" +FILES_${PN}-dev += "${libdir}/python${PYTHON_BASEVERSION}/site-packages/*.la" + +# Since files are installed into ${libdir}/lttng/libexec we match +# the libexec insane test so skip it. +# Python module needs to keep _lttng.so +INSANE_SKIP_${PN} = "libexec dev-so" +INSANE_SKIP_${PN}-dbg = "libexec" + +do_configure_prepend () { + # Delete a shipped m4 file that overrides our patched one + rm -f ${S}/config/libxml.m4 +} + +do_install_ptest () { + chmod +x ${D}${PTEST_PATH}/tests/utils/utils.sh + for i in `find ${D}${PTEST_PATH} -perm /u+x -type f`; do + sed -e "s:\$TESTDIR.*/src/bin/lttng/\$LTTNG_BIN:\$LTTNG_BIN:g" \ + -e "s:\$TESTDIR/../src/bin/lttng-sessiond/\$SESSIOND_BIN:\$SESSIOND_BIN:g" \ + -e "s:\$DIR/../src/bin/lttng-sessiond/\$SESSIOND_BIN:\$SESSIOND_BIN:g" \ + -e "s:\$TESTDIR/../src/bin/lttng-consumerd/:${libdir}/lttng/libexec/:g" \ + -e "s:\$DIR/../src/bin/lttng-consumerd/:${libdir}/lttng/libexec/:g" \ + -e "s:\$TESTDIR/../src/bin/lttng-relayd/\$RELAYD_BIN:\$RELAYD_BIN:g" \ + -e "s:\$DIR/../src/bin/lttng-sessiond/lttng-sessiond:\$SESSIOND_BIN:g" \ + -e "s:\$DIR/../src/bin/lttng-relayd/\$RELAYD_BIN:\$RELAYD_BIN:g" \ + -e "s:\$DIR/../bin/lttng-relayd/\$RELAYD_BIN:\$RELAYD_BIN:g" \ + -i $i + done + + # Update libdir references in copied .la files + for i in `find ${D}${PTEST_PATH} -type f -name *.la`; do + sed -i -e 's#${S}/tests/#${STAGING_DIR}${PTEST_PATH}#g' $i + done + + sed -e "s:src/bin:bin:g" -e "s:lt-::g" \ + -i ${D}${PTEST_PATH}/tests/utils/utils.sh + sed -e "s:ini_config:\.libs\/ini_config:" \ + -i ${D}${PTEST_PATH}/tests/unit/ini_config/test_ini_config +} diff --git a/import-layers/yocto-poky/meta/recipes-kernel/lttng/lttng-ust/lttng-ust-add-support-for-aarch64_be.patch b/import-layers/yocto-poky/meta/recipes-kernel/lttng/lttng-ust/lttng-ust-add-support-for-aarch64_be.patch new file mode 100644 index 000000000..9b37a4a33 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-kernel/lttng/lttng-ust/lttng-ust-add-support-for-aarch64_be.patch @@ -0,0 +1,17 @@ +lttng-ust: add support for aarch64_be + +Upstream-Status: Pending + +Signed-off-by: Tudor Florea <tudor.florea@enea.com> + +diff --ruN a/configure.ac b/configure.ac +--- a/configure.ac 2016-02-18 14:54:54.651713647 +0100 ++++ b/configure.ac 2016-02-18 14:56:11.057865297 +0100 +@@ -240,6 +240,7 @@ + s390x) NO_UNALIGNED_ACCESS=1 ;; + arm*) NO_UNALIGNED_ACCESS=1 ;; + aarch64) NO_UNALIGNED_ACCESS=1 ;; ++ aarch64_be) NO_UNALIGNED_ACCESS=1 ;; + mips*) NO_UNALIGNED_ACCESS=1 ;; + tile*) NO_UNALIGNED_ACCESS=1 ;; + *) diff --git a/import-layers/yocto-poky/meta/recipes-kernel/lttng/lttng-ust/lttng-ust-doc-examples-disable.patch b/import-layers/yocto-poky/meta/recipes-kernel/lttng/lttng-ust/lttng-ust-doc-examples-disable.patch new file mode 100644 index 000000000..b68a9899c --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-kernel/lttng/lttng-ust/lttng-ust-doc-examples-disable.patch @@ -0,0 +1,18 @@ +Upstream-Status: Inappropriate [embedded specific] + +Don't build the doc examples - we don't need them and in fact they +never successfully built in previous iterations of the lttng-ust +recipe anyway. + +Signed-off-by: Tom Zanussi <tom.zanussi@intel.com> + +Index: doc/Makefile.am +=================================================================== +--- a/doc/Makefile.am ++++ b/doc/Makefile.am +@@ -1,4 +1,4 @@ +-SUBDIRS = . examples ++SUBDIRS = . + + dist_man_MANS = man/lttng-gen-tp.1 \ + man/lttng-ust.3 \ diff --git a/import-layers/yocto-poky/meta/recipes-kernel/lttng/lttng-ust_git.bb b/import-layers/yocto-poky/meta/recipes-kernel/lttng/lttng-ust_git.bb new file mode 100644 index 000000000..15d925d29 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-kernel/lttng/lttng-ust_git.bb @@ -0,0 +1,34 @@ +SUMMARY = "Linux Trace Toolkit Userspace Tracer 2.x" +DESCRIPTION = "The LTTng UST 2.x package contains the userspace tracer library to trace userspace codes." +HOMEPAGE = "http://lttng.org/ust" +BUGTRACKER = "https://bugs.lttng.org/projects/lttng-ust" + +LICENSE = "LGPLv2.1+ & MIT & GPLv2" +LIC_FILES_CHKSUM = "file://COPYING;md5=c963eb366b781252b0bf0fdf1624d9e9 \ + file://snprintf/snprintf.c;endline=32;md5=d3d544959d8a3782b2e07451be0a903c \ + file://snprintf/various.h;endline=31;md5=89f2509b6b4682c4fc95255eec4abe44" + +inherit autotools lib_package + +DEPENDS = "liburcu util-linux" +RDEPENDS_${PN}-bin = "python-core" + +# For backwards compatibility after rename +RPROVIDES_${PN} = "lttng2-ust" +RREPLACES_${PN} = "lttng2-ust" +RCONFLICTS_${PN} = "lttng2-ust" + +SRCREV = "f89c1a3cf2b06a4970b9154c00ff6409870aefb5" +PE = "2" +PV = "2.7.1+git${SRCPV}" + +SRC_URI = "git://git.lttng.org/lttng-ust.git;branch=stable-2.7 \ + file://lttng-ust-doc-examples-disable.patch \ + file://lttng-ust-add-support-for-aarch64_be.patch \ + " + +S = "${WORKDIR}/git" + +do_configure_prepend () { + ( cd ${S}; ${S}/bootstrap ) +} |