summaryrefslogtreecommitdiffstats
path: root/meta/recipes-kernel/lttng/lttng-tools_2.10.6.bb
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-kernel/lttng/lttng-tools_2.10.6.bb')
-rw-r--r--meta/recipes-kernel/lttng/lttng-tools_2.10.6.bb157
1 files changed, 157 insertions, 0 deletions
diff --git a/meta/recipes-kernel/lttng/lttng-tools_2.10.6.bb b/meta/recipes-kernel/lttng/lttng-tools_2.10.6.bb
new file mode 100644
index 0000000000..13bab9068e
--- /dev/null
+++ b/meta/recipes-kernel/lttng/lttng-tools_2.10.6.bb
@@ -0,0 +1,157 @@
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."
6
7LICENSE = "GPLv2 & LGPLv2.1"
8LIC_FILES_CHKSUM = "file://LICENSE;md5=01d7fc4496aacf37d90df90b90b0cac1 \
9 file://gpl-2.0.txt;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
10 file://lgpl-2.1.txt;md5=0f0d71500e6a57fd24d825f33242b9ca"
11
12DEPENDS = "liburcu popt libxml2 util-linux"
13RDEPENDS_${PN} = "libgcc"
14RDEPENDS_${PN}-ptest += "make perl bash gawk ${PN} babeltrace procps"
15# babelstats.pl wants getopt-long
16RDEPENDS_${PN}-ptest += "perl-module-getopt-long"
17
18PYTHON_OPTION = "am_cv_python_pyexecdir='${PYTHON_SITEPACKAGES_DIR}' \
19 am_cv_python_pythondir='${PYTHON_SITEPACKAGES_DIR}' \
20 PYTHON_INCLUDE='-I${STAGING_INCDIR}/python${PYTHON_BASEVERSION}${PYTHON_ABI}' \
21"
22PACKAGECONFIG ??= "lttng-ust"
23PACKAGECONFIG[python] = "--enable-python-bindings ${PYTHON_OPTION},,python3 swig-native"
24PACKAGECONFIG[lttng-ust] = "--with-lttng-ust, --without-lttng-ust, lttng-ust"
25PACKAGECONFIG[kmod] = "--with-kmod, --without-kmod, kmod"
26PACKAGECONFIG[manpages] = "--enable-man-pages, --disable-man-pages, asciidoc-native xmlto-native libxslt-native"
27PACKAGECONFIG_remove_libc-musl = "lttng-ust"
28PACKAGECONFIG_remove_arc = "lttng-ust"
29PACKAGECONFIG_remove_riscv64 = "lttng-ust"
30
31SRC_URI = "https://lttng.org/files/lttng-tools/lttng-tools-${PV}.tar.bz2 \
32 file://x32.patch \
33 file://run-ptest \
34 file://lttng-sessiond.service \
35 "
36
37SRC_URI[md5sum] = "e88c521b5da6bb48a8187af633336ecc"
38SRC_URI[sha256sum] = "f05df52bbebf8ce88d1b29e9e98cfc957d2ed738a345118018237ebdb581537c"
39
40inherit autotools ptest pkgconfig useradd python3-dir manpages systemd
41
42SYSTEMD_SERVICE_${PN} = "lttng-sessiond.service"
43SYSTEMD_AUTO_ENABLE = "disable"
44
45USERADD_PACKAGES = "${PN}"
46GROUPADD_PARAM_${PN} = "tracing"
47
48FILES_${PN} += "${libdir}/lttng/libexec/* ${datadir}/xml/lttng \
49 ${PYTHON_SITEPACKAGES_DIR}/*"
50FILES_${PN}-staticdev += "${PYTHON_SITEPACKAGES_DIR}/*.a"
51FILES_${PN}-dev += "${PYTHON_SITEPACKAGES_DIR}/*.la"
52
53# Since files are installed into ${libdir}/lttng/libexec we match
54# the libexec insane test so skip it.
55# Python module needs to keep _lttng.so
56INSANE_SKIP_${PN} = "libexec dev-so"
57INSANE_SKIP_${PN}-dbg = "libexec"
58
59do_install_append () {
60 # install systemd unit file
61 install -d ${D}${systemd_unitdir}/system
62 install -m 0644 ${WORKDIR}/lttng-sessiond.service ${D}${systemd_unitdir}/system
63}
64
65do_install_ptest () {
66 for f in Makefile tests/Makefile tests/utils/utils.sh ; do
67 install -D "${B}/$f" "${D}${PTEST_PATH}/$f"
68 done
69
70 for f in config/tap-driver.sh config/test-driver ; do
71 install -D "${S}/$f" "${D}${PTEST_PATH}/$f"
72 done
73
74 # Prevent 'make check' from recursing into non-test subdirectories.
75 sed -i -e 's!^SUBDIRS = .*!SUBDIRS = tests!' "${D}${PTEST_PATH}/Makefile"
76
77 # We don't need these
78 sed -i -e '/dist_noinst_SCRIPTS = /,/^$/d' "${D}${PTEST_PATH}/tests/Makefile"
79
80 # We shouldn't need to build anything in tests/utils
81 sed -i -e 's!am__append_1 = . utils!am__append_1 = . !' \
82 "${D}${PTEST_PATH}/tests/Makefile"
83
84 # Copy the tests directory tree and the executables and
85 # Makefiles found within.
86 for d in $(find "${B}/tests" -type d -not -name .libs -printf '%P ') ; do
87 install -d "${D}${PTEST_PATH}/tests/$d"
88 find "${B}/tests/$d" -maxdepth 1 -executable -type f \
89 -exec install -t "${D}${PTEST_PATH}/tests/$d" {} +
90 test -r "${B}/tests/$d/Makefile" && \
91 install -t "${D}${PTEST_PATH}/tests/$d" "${B}/tests/$d/Makefile"
92 done
93
94 for d in $(find "${B}/tests" -type d -name .libs -printf '%P ') ; do
95 for f in $(find "${B}/tests/$d" -maxdepth 1 -executable -type f -printf '%P ') ; do
96 cp ${B}/tests/$d/$f ${D}${PTEST_PATH}/tests/`dirname $d`/$f
97 case $f in
98 *.so)
99 install -d ${D}${PTEST_PATH}/tests/$d/
100 ln -s ../$f ${D}${PTEST_PATH}/tests/$d/$f
101 ;;
102 esac
103 done
104 done
105
106 install ${B}/tests/unit/ini_config/sample.ini ${D}${PTEST_PATH}/tests/unit/ini_config/
107
108 # We shouldn't need to build anything in tests/regression/tools
109 sed -i -e 's!^SUBDIRS = tools !SUBDIRS = !' \
110 "${D}${PTEST_PATH}/tests/regression/Makefile"
111
112 # Prevent attempts to update Makefiles during test runs, and
113 # silence "Making check in $SUBDIR" messages.
114 find "${D}${PTEST_PATH}" -name Makefile -type f -exec \
115 sed -i -e '/Makefile:/,/^$/d' -e '/%: %.in/,/^$/d' \
116 -e '/echo "Making $$target in $$subdir"; \\/d' \
117 -e 's/^srcdir = \(.*\)/srcdir = ./' \
118 -e 's/^builddir = \(.*\)/builddir = ./' \
119 -e 's/^all-am:.*/all-am:/' \
120 {} +
121
122 # These objects trigger [rpaths] QA checks; the test harness
123 # skips the associated tests if they're missing, so delete
124 # them.
125 objs=""
126 objs="$objs regression/ust/ust-dl/libbar.so"
127 objs="$objs regression/ust/ust-dl/libfoo.so"
128 for obj in $objs ; do
129 rm -f "${D}${PTEST_PATH}/tests/${obj}"
130 done
131
132 find "${D}${PTEST_PATH}" -name Makefile -type f -exec \
133 touch -r "${B}/Makefile" {} +
134
135 #
136 # Need to stop generated binaries from rebuilding by removing their source dependencies
137 #
138 sed -e 's#\(^test.*OBJECTS.=\)#disable\1#g' \
139 -e 's#\(^test.*DEPENDENCIES.=\)#disable\1#g' \
140 -e 's#\(^test.*SOURCES.=\)#disable\1#g' \
141 -e 's#\(^test.*LDADD.=\)#disable\1#g' \
142 -i ${D}${PTEST_PATH}/tests/unit/Makefile
143
144 # Substitute links to installed binaries.
145 for prog in lttng lttng-relayd lttng-sessiond lttng-consumerd ; do
146 exedir="${D}${PTEST_PATH}/src/bin/${prog}"
147 install -d "$exedir"
148 case "$prog" in
149 lttng-consumerd)
150 ln -s "${libdir}/lttng/libexec/$prog" "$exedir"
151 ;;
152 *)
153 ln -s "${bindir}/$prog" "$exedir"
154 ;;
155 esac
156 done
157}