summaryrefslogtreecommitdiffstats
path: root/meta/recipes-kernel/lttng/lttng-tools_2.10.7.bb
diff options
context:
space:
mode:
authorJonathan Rajotte <jonathan.rajotte-julien@efficios.com>2019-06-20 18:42:39 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2019-06-21 15:32:35 +0100
commitff31e2860ab80ffecd3b273f40744daf96a4a184 (patch)
tree04dbc07d51cec77762347ff01a28da6ab62370af /meta/recipes-kernel/lttng/lttng-tools_2.10.7.bb
parent4a90501229bf42c2dcd193c050857e63dcec216a (diff)
downloadpoky-ff31e2860ab80ffecd3b273f40744daf96a4a184.tar.gz
lttng-tools: update to 2.10.7
Remove upstreamed patches. (From OE-Core rev: 4bd46974d5b80050a031688ecefa9e60df793163) Signed-off-by: Jonathan Rajotte <jonathan.rajotte-julien@efficios.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-kernel/lttng/lttng-tools_2.10.7.bb')
-rw-r--r--meta/recipes-kernel/lttng/lttng-tools_2.10.7.bb162
1 files changed, 162 insertions, 0 deletions
diff --git a/meta/recipes-kernel/lttng/lttng-tools_2.10.7.bb b/meta/recipes-kernel/lttng/lttng-tools_2.10.7.bb
new file mode 100644
index 0000000000..469ad111c4
--- /dev/null
+++ b/meta/recipes-kernel/lttng/lttng-tools_2.10.7.bb
@@ -0,0 +1,162 @@
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 babeltrace procps perl-module-overloading coreutils util-linux kmod lttng-modules sed"
15RDEPENDS_${PN}-ptest_append_libc-glibc = " glibc-utils"
16RDEPENDS_${PN}-ptest_append_libc-musl = " musl-utils"
17# babelstats.pl wants getopt-long
18RDEPENDS_${PN}-ptest += "perl-module-getopt-long"
19
20PYTHON_OPTION = "am_cv_python_pyexecdir='${PYTHON_SITEPACKAGES_DIR}' \
21 am_cv_python_pythondir='${PYTHON_SITEPACKAGES_DIR}' \
22 PYTHON_INCLUDE='-I${STAGING_INCDIR}/python${PYTHON_BASEVERSION}${PYTHON_ABI}' \
23"
24PACKAGECONFIG ??= "lttng-ust"
25PACKAGECONFIG[python] = "--enable-python-bindings ${PYTHON_OPTION},,python3 swig-native"
26PACKAGECONFIG[lttng-ust] = "--with-lttng-ust, --without-lttng-ust, lttng-ust"
27PACKAGECONFIG[kmod] = "--with-kmod, --without-kmod, kmod"
28PACKAGECONFIG[manpages] = "--enable-man-pages, --disable-man-pages, asciidoc-native xmlto-native libxslt-native"
29PACKAGECONFIG_remove_arc = "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 file://0001-Skip-when-testapp-is-not-present.patch \
36 file://0002-Fix-check-for-lttng-modules-presence-before-testing.patch \
37 "
38
39SRC_URI[md5sum] = "e7804d10e4cade381e241601f6047373"
40SRC_URI[sha256sum] = "ed71ebe00c5d985c74f30e97b614e909573cbd9276c85e05d9557a0b817a1312"
41
42inherit autotools ptest pkgconfig useradd python3-dir manpages systemd
43
44SYSTEMD_SERVICE_${PN} = "lttng-sessiond.service"
45SYSTEMD_AUTO_ENABLE = "disable"
46
47USERADD_PACKAGES = "${PN}"
48GROUPADD_PARAM_${PN} = "tracing"
49
50FILES_${PN} += "${libdir}/lttng/libexec/* ${datadir}/xml/lttng \
51 ${PYTHON_SITEPACKAGES_DIR}/*"
52FILES_${PN}-staticdev += "${PYTHON_SITEPACKAGES_DIR}/*.a"
53FILES_${PN}-dev += "${PYTHON_SITEPACKAGES_DIR}/*.la"
54
55# Since files are installed into ${libdir}/lttng/libexec we match
56# the libexec insane test so skip it.
57# Python module needs to keep _lttng.so
58INSANE_SKIP_${PN} = "libexec dev-so"
59INSANE_SKIP_${PN}-dbg = "libexec"
60
61do_install_append () {
62 # install systemd unit file
63 install -d ${D}${systemd_unitdir}/system
64 install -m 0644 ${WORKDIR}/lttng-sessiond.service ${D}${systemd_unitdir}/system
65}
66
67do_install_ptest () {
68 for f in Makefile tests/Makefile tests/utils/utils.sh tests/regression/tools/save-load/load-42*.lttng tests/regression/tools/save-load/configuration/load-42*.lttng ; do
69 install -D "${B}/$f" "${D}${PTEST_PATH}/$f"
70 done
71
72 for f in config/tap-driver.sh config/test-driver src/common/config/session.xsd src/common/mi-lttng-3.0.xsd; do
73 install -D "${S}/$f" "${D}${PTEST_PATH}/$f"
74 done
75
76 # Prevent 'make check' from recursing into non-test subdirectories.
77 sed -i -e 's!^SUBDIRS = .*!SUBDIRS = tests!' "${D}${PTEST_PATH}/Makefile"
78
79 # We don't need these
80 sed -i -e '/dist_noinst_SCRIPTS = /,/^$/d' "${D}${PTEST_PATH}/tests/Makefile"
81
82 # We shouldn't need to build anything in tests/utils
83 sed -i -e 's!am__append_1 = . utils!am__append_1 = . !' \
84 "${D}${PTEST_PATH}/tests/Makefile"
85
86 # Copy the tests directory tree and the executables and
87 # Makefiles found within.
88 for d in $(find "${B}/tests" -type d -not -name .libs -printf '%P ') ; do
89 install -d "${D}${PTEST_PATH}/tests/$d"
90 find "${B}/tests/$d" -maxdepth 1 -executable -type f \
91 -exec install -t "${D}${PTEST_PATH}/tests/$d" {} +
92 # Take all .py scripts for tests using the python bindings.
93 find "${B}/tests/$d" -maxdepth 1 -type f -name "*.py" \
94 -exec install -t "${D}${PTEST_PATH}/tests/$d" {} +
95 test -r "${B}/tests/$d/Makefile" && \
96 install -t "${D}${PTEST_PATH}/tests/$d" "${B}/tests/$d/Makefile"
97 done
98
99 for d in $(find "${B}/tests" -type d -name .libs -printf '%P ') ; do
100 for f in $(find "${B}/tests/$d" -maxdepth 1 -executable -type f -printf '%P ') ; do
101 cp ${B}/tests/$d/$f ${D}${PTEST_PATH}/tests/`dirname $d`/$f
102 case $f in
103 *.so)
104 install -d ${D}${PTEST_PATH}/tests/$d/
105 ln -s ../$f ${D}${PTEST_PATH}/tests/$d/$f
106 # Remove any rpath/runpath to pass QA check.
107 chrpath --delete ${D}${PTEST_PATH}/tests/$d/$f
108 ;;
109 esac
110 done
111 done
112
113 #
114 # Use the versioned libs of liblttng-ust-dl.
115 #
116 ustdl="${D}${PTEST_PATH}/tests/regression/ust/ust-dl/test_ust-dl.py"
117 if [ -e $ustdl ]; then
118 sed -i -e 's!:liblttng-ust-dl.so!:liblttng-ust-dl.so.0!' $ustdl
119 fi
120
121 install ${B}/tests/unit/ini_config/sample.ini ${D}${PTEST_PATH}/tests/unit/ini_config/
122
123 # We shouldn't need to build anything in tests/regression/tools
124 sed -i -e 's!^SUBDIRS = tools !SUBDIRS = !' \
125 "${D}${PTEST_PATH}/tests/regression/Makefile"
126
127 # Prevent attempts to update Makefiles during test runs, and
128 # silence "Making check in $SUBDIR" messages.
129 find "${D}${PTEST_PATH}" -name Makefile -type f -exec \
130 sed -i -e '/Makefile:/,/^$/d' -e '/%: %.in/,/^$/d' \
131 -e '/echo "Making $$target in $$subdir"; \\/d' \
132 -e 's/^srcdir = \(.*\)/srcdir = ./' \
133 -e 's/^builddir = \(.*\)/builddir = ./' \
134 -e 's/^all-am:.*/all-am:/' \
135 {} +
136
137 find "${D}${PTEST_PATH}" -name Makefile -type f -exec \
138 touch -r "${B}/Makefile" {} +
139
140 #
141 # Need to stop generated binaries from rebuilding by removing their source dependencies
142 #
143 sed -e 's#\(^test.*OBJECTS.=\)#disable\1#g' \
144 -e 's#\(^test.*DEPENDENCIES.=\)#disable\1#g' \
145 -e 's#\(^test.*SOURCES.=\)#disable\1#g' \
146 -e 's#\(^test.*LDADD.=\)#disable\1#g' \
147 -i ${D}${PTEST_PATH}/tests/unit/Makefile
148
149 # Substitute links to installed binaries.
150 for prog in lttng lttng-relayd lttng-sessiond lttng-consumerd lttng-crash; do
151 exedir="${D}${PTEST_PATH}/src/bin/${prog}"
152 install -d "$exedir"
153 case "$prog" in
154 lttng-consumerd)
155 ln -s "${libdir}/lttng/libexec/$prog" "$exedir"
156 ;;
157 *)
158 ln -s "${bindir}/$prog" "$exedir"
159 ;;
160 esac
161 done
162}