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