diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2020-02-18 14:09:00 -0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2020-02-21 09:39:00 +0000 |
commit | fe4f4ac4da98822fe3e9f319d913455495ae71aa (patch) | |
tree | c4bb6a1b6499d58286a232ed1feeb2337c1666b1 /meta/recipes-kernel/lttng/lttng-tools_2.11.2.bb | |
parent | 0f54a2fd69c9513cb857a3a0436bd8b75332f4e9 (diff) | |
download | poky-fe4f4ac4da98822fe3e9f319d913455495ae71aa.tar.gz |
lttng-tools: upgrade 2.11.0 -> 2.11.2
(From OE-Core rev: 712a634c61ebc7ebda2669daf21460394f6ac2cd)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-kernel/lttng/lttng-tools_2.11.2.bb')
-rw-r--r-- | meta/recipes-kernel/lttng/lttng-tools_2.11.2.bb | 166 |
1 files changed, 166 insertions, 0 deletions
diff --git a/meta/recipes-kernel/lttng/lttng-tools_2.11.2.bb b/meta/recipes-kernel/lttng/lttng-tools_2.11.2.bb new file mode 100644 index 0000000000..36a19ec18d --- /dev/null +++ b/meta/recipes-kernel/lttng/lttng-tools_2.11.2.bb | |||
@@ -0,0 +1,166 @@ | |||
1 | SECTION = "devel" | ||
2 | SUMMARY = "Linux Trace Toolkit Control" | ||
3 | DESCRIPTION = "The Linux trace toolkit is a suite of tools designed \ | ||
4 | to extract program execution details from the Linux operating system \ | ||
5 | and interpret them." | ||
6 | |||
7 | LICENSE = "GPLv2 & LGPLv2.1" | ||
8 | LIC_FILES_CHKSUM = "file://LICENSE;md5=01d7fc4496aacf37d90df90b90b0cac1 \ | ||
9 | file://gpl-2.0.txt;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ | ||
10 | file://lgpl-2.1.txt;md5=0f0d71500e6a57fd24d825f33242b9ca" | ||
11 | |||
12 | DEPENDS = "liburcu popt libxml2 util-linux" | ||
13 | RDEPENDS_${PN} = "libgcc" | ||
14 | RDEPENDS_${PN}-ptest += "make perl bash gawk babeltrace procps perl-module-overloading coreutils util-linux kmod lttng-modules sed python3-core" | ||
15 | RDEPENDS_${PN}-ptest_append_libc-glibc = " glibc-utils" | ||
16 | RDEPENDS_${PN}-ptest_append_libc-musl = " musl-utils" | ||
17 | # babelstats.pl wants getopt-long | ||
18 | RDEPENDS_${PN}-ptest += "perl-module-getopt-long" | ||
19 | |||
20 | PYTHON_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 | " | ||
24 | PACKAGECONFIG ??= "lttng-ust" | ||
25 | PACKAGECONFIG[python] = "--enable-python-bindings ${PYTHON_OPTION},,python3 swig-native" | ||
26 | PACKAGECONFIG[lttng-ust] = "--with-lttng-ust, --without-lttng-ust, lttng-ust" | ||
27 | PACKAGECONFIG[kmod] = "--with-kmod, --without-kmod, kmod" | ||
28 | PACKAGECONFIG[manpages] = "--enable-man-pages, --disable-man-pages, asciidoc-native xmlto-native libxslt-native" | ||
29 | PACKAGECONFIG_remove_arc = "lttng-ust" | ||
30 | |||
31 | SRC_URI = "https://lttng.org/files/lttng-tools/lttng-tools-${PV}.tar.bz2 \ | ||
32 | file://x32.patch \ | ||
33 | file://0001-tests-do-not-strip-a-helper-library.patch \ | ||
34 | file://run-ptest \ | ||
35 | file://lttng-sessiond.service \ | ||
36 | file://0001-tests-regression-disable-the-tools-live-tests.patch \ | ||
37 | " | ||
38 | |||
39 | SRC_URI[md5sum] = "68ed78f7fa4235477ea577e48b3cd245" | ||
40 | SRC_URI[sha256sum] = "936477305b25f65c5dd22db9161287d30a309ce868b6180857b1fd1fb5e6a56b" | ||
41 | |||
42 | inherit autotools ptest pkgconfig useradd python3-dir manpages systemd | ||
43 | |||
44 | SYSTEMD_SERVICE_${PN} = "lttng-sessiond.service" | ||
45 | SYSTEMD_AUTO_ENABLE = "disable" | ||
46 | |||
47 | USERADD_PACKAGES = "${PN}" | ||
48 | GROUPADD_PARAM_${PN} = "tracing" | ||
49 | |||
50 | FILES_${PN} += "${libdir}/lttng/libexec/* ${datadir}/xml/lttng \ | ||
51 | ${PYTHON_SITEPACKAGES_DIR}/*" | ||
52 | FILES_${PN}-staticdev += "${PYTHON_SITEPACKAGES_DIR}/*.a" | ||
53 | FILES_${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 | ||
58 | INSANE_SKIP_${PN} = "libexec dev-so" | ||
59 | INSANE_SKIP_${PN}-dbg = "libexec" | ||
60 | |||
61 | PRIVATE_LIBS_${PN}-ptest = "libfoo.so" | ||
62 | |||
63 | do_install_append () { | ||
64 | # install systemd unit file | ||
65 | install -d ${D}${systemd_unitdir}/system | ||
66 | install -m 0644 ${WORKDIR}/lttng-sessiond.service ${D}${systemd_unitdir}/system | ||
67 | } | ||
68 | |||
69 | do_install_ptest () { | ||
70 | 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 tests/regression/tools/health/test_health.sh tests/regression/tools/metadata/utils.sh tests/regression/tools/rotation/rotate_utils.sh; do | ||
71 | install -D "${B}/$f" "${D}${PTEST_PATH}/$f" | ||
72 | done | ||
73 | |||
74 | for f in config/tap-driver.sh config/test-driver src/common/config/session.xsd src/common/mi-lttng-3.0.xsd; do | ||
75 | install -D "${S}/$f" "${D}${PTEST_PATH}/$f" | ||
76 | done | ||
77 | |||
78 | # Prevent 'make check' from recursing into non-test subdirectories. | ||
79 | sed -i -e 's!^SUBDIRS = .*!SUBDIRS = tests!' "${D}${PTEST_PATH}/Makefile" | ||
80 | |||
81 | # We don't need these | ||
82 | sed -i -e '/dist_noinst_SCRIPTS = /,/^$/d' "${D}${PTEST_PATH}/tests/Makefile" | ||
83 | |||
84 | # We shouldn't need to build anything in tests/utils | ||
85 | sed -i -e 's!am__append_1 = . utils!am__append_1 = . !' \ | ||
86 | "${D}${PTEST_PATH}/tests/Makefile" | ||
87 | |||
88 | # Copy the tests directory tree and the executables and | ||
89 | # Makefiles found within. | ||
90 | for d in $(find "${B}/tests" -type d -not -name .libs -printf '%P ') ; do | ||
91 | install -d "${D}${PTEST_PATH}/tests/$d" | ||
92 | find "${B}/tests/$d" -maxdepth 1 -executable -type f \ | ||
93 | -exec install -t "${D}${PTEST_PATH}/tests/$d" {} + | ||
94 | # Take all .py scripts for tests using the python bindings. | ||
95 | find "${B}/tests/$d" -maxdepth 1 -type f -name "*.py" \ | ||
96 | -exec install -t "${D}${PTEST_PATH}/tests/$d" {} + | ||
97 | test -r "${B}/tests/$d/Makefile" && \ | ||
98 | install -t "${D}${PTEST_PATH}/tests/$d" "${B}/tests/$d/Makefile" | ||
99 | done | ||
100 | |||
101 | for d in $(find "${B}/tests" -type d -name .libs -printf '%P ') ; do | ||
102 | for f in $(find "${B}/tests/$d" -maxdepth 1 -executable -type f -printf '%P ') ; do | ||
103 | cp ${B}/tests/$d/$f ${D}${PTEST_PATH}/tests/`dirname $d`/$f | ||
104 | case $f in | ||
105 | *.so) | ||
106 | install -d ${D}${PTEST_PATH}/tests/$d/ | ||
107 | ln -s ../$f ${D}${PTEST_PATH}/tests/$d/$f | ||
108 | # Remove any rpath/runpath to pass QA check. | ||
109 | chrpath --delete ${D}${PTEST_PATH}/tests/$d/$f | ||
110 | ;; | ||
111 | esac | ||
112 | done | ||
113 | done | ||
114 | |||
115 | chrpath --delete ${D}${PTEST_PATH}/tests/utils/testapp/userspace-probe-elf-binary/userspace-probe-elf-binary | ||
116 | |||
117 | # | ||
118 | # Use the versioned libs of liblttng-ust-dl. | ||
119 | # | ||
120 | ustdl="${D}${PTEST_PATH}/tests/regression/ust/ust-dl/test_ust-dl.py" | ||
121 | if [ -e $ustdl ]; then | ||
122 | sed -i -e 's!:liblttng-ust-dl.so!:liblttng-ust-dl.so.0!' $ustdl | ||
123 | fi | ||
124 | |||
125 | install ${B}/tests/unit/ini_config/sample.ini ${D}${PTEST_PATH}/tests/unit/ini_config/ | ||
126 | |||
127 | # We shouldn't need to build anything in tests/regression/tools | ||
128 | sed -i -e 's!^SUBDIRS = tools !SUBDIRS = !' \ | ||
129 | "${D}${PTEST_PATH}/tests/regression/Makefile" | ||
130 | |||
131 | # Prevent attempts to update Makefiles during test runs, and | ||
132 | # silence "Making check in $SUBDIR" messages. | ||
133 | find "${D}${PTEST_PATH}" -name Makefile -type f -exec \ | ||
134 | sed -i -e '/Makefile:/,/^$/d' -e '/%: %.in/,/^$/d' \ | ||
135 | -e '/echo "Making $$target in $$subdir"; \\/d' \ | ||
136 | -e 's/^srcdir = \(.*\)/srcdir = ./' \ | ||
137 | -e 's/^builddir = \(.*\)/builddir = ./' \ | ||
138 | -e 's/^all-am:.*/all-am:/' \ | ||
139 | {} + | ||
140 | |||
141 | find "${D}${PTEST_PATH}" -name Makefile -type f -exec \ | ||
142 | touch -r "${B}/Makefile" {} + | ||
143 | |||
144 | # | ||
145 | # Need to stop generated binaries from rebuilding by removing their source dependencies | ||
146 | # | ||
147 | sed -e 's#\(^test.*OBJECTS.=\)#disable\1#g' \ | ||
148 | -e 's#\(^test.*DEPENDENCIES.=\)#disable\1#g' \ | ||
149 | -e 's#\(^test.*SOURCES.=\)#disable\1#g' \ | ||
150 | -e 's#\(^test.*LDADD.=\)#disable\1#g' \ | ||
151 | -i ${D}${PTEST_PATH}/tests/unit/Makefile | ||
152 | |||
153 | # Substitute links to installed binaries. | ||
154 | for prog in lttng lttng-relayd lttng-sessiond lttng-consumerd lttng-crash; do | ||
155 | exedir="${D}${PTEST_PATH}/src/bin/${prog}" | ||
156 | install -d "$exedir" | ||
157 | case "$prog" in | ||
158 | lttng-consumerd) | ||
159 | ln -s "${libdir}/lttng/libexec/$prog" "$exedir" | ||
160 | ;; | ||
161 | *) | ||
162 | ln -s "${bindir}/$prog" "$exedir" | ||
163 | ;; | ||
164 | esac | ||
165 | done | ||
166 | } | ||