Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 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 ${PN} babeltrace procps" |
| 15 | # babelstats.pl wants getopt-long |
| 16 | RDEPENDS_${PN}-ptest += "perl-module-getopt-long" |
| 17 | |
| 18 | PYTHON_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 | " |
| 22 | PACKAGECONFIG ??= "lttng-ust" |
| 23 | PACKAGECONFIG[python] = "--enable-python-bindings ${PYTHON_OPTION},,python3 swig-native" |
| 24 | PACKAGECONFIG[lttng-ust] = "--with-lttng-ust, --without-lttng-ust, lttng-ust" |
| 25 | PACKAGECONFIG[kmod] = "--enable-kmod, --disable-kmod, kmod" |
| 26 | PACKAGECONFIG[manpages] = "--enable-man-pages, --disable-man-pages, asciidoc-native xmlto-native libxslt-native" |
| 27 | PACKAGECONFIG_remove_libc-musl = "lttng-ust" |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 28 | PACKAGECONFIG_remove_riscv64 = "lttng-ust" |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 29 | |
| 30 | SRC_URI = "https://lttng.org/files/lttng-tools/lttng-tools-${PV}.tar.bz2 \ |
| 31 | file://x32.patch \ |
| 32 | file://run-ptest \ |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 33 | file://0001-Allow-multiple-attempts-to-connect-to-relayd.patch \ |
| 34 | file://lttng-sessiond.service \ |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 35 | " |
| 36 | |
Brad Bishop | f8caae3 | 2019-03-25 13:13:56 -0400 | [diff] [blame] | 37 | SRC_URI[md5sum] = "f9c2b35810790f5bd802483eb14cb301" |
| 38 | SRC_URI[sha256sum] = "2c45144acf8dc6fcd655be7370a022e9c03c8b7419af489c9c2e786a335006db" |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 39 | |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 40 | inherit autotools ptest pkgconfig useradd python3-dir manpages systemd |
| 41 | |
| 42 | SYSTEMD_SERVICE_${PN} = "lttng-sessiond.service" |
| 43 | SYSTEMD_AUTO_ENABLE = "disable" |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 44 | |
| 45 | USERADD_PACKAGES = "${PN}" |
| 46 | GROUPADD_PARAM_${PN} = "tracing" |
| 47 | |
| 48 | FILES_${PN} += "${libdir}/lttng/libexec/* ${datadir}/xml/lttng \ |
| 49 | ${PYTHON_SITEPACKAGES_DIR}/*" |
| 50 | FILES_${PN}-staticdev += "${PYTHON_SITEPACKAGES_DIR}/*.a" |
| 51 | FILES_${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 |
| 56 | INSANE_SKIP_${PN} = "libexec dev-so" |
| 57 | INSANE_SKIP_${PN}-dbg = "libexec" |
| 58 | |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 59 | do_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 | |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 65 | do_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 | # We shouldn't need to build anything in tests/regression/tools |
| 95 | sed -i -e 's!^SUBDIRS = tools !SUBDIRS = !' \ |
| 96 | "${D}${PTEST_PATH}/tests/regression/Makefile" |
| 97 | |
| 98 | # Prevent attempts to update Makefiles during test runs, and |
| 99 | # silence "Making check in $SUBDIR" messages. |
| 100 | find "${D}${PTEST_PATH}" -name Makefile -type f -exec \ |
| 101 | sed -i -e '/Makefile:/,/^$/d' -e '/%: %.in/,/^$/d' \ |
| 102 | -e '/echo "Making $$target in $$subdir"; \\/d' \ |
| 103 | -e 's/^srcdir = \(.*\)/srcdir = ./' \ |
| 104 | -e 's/^builddir = \(.*\)/builddir = ./' \ |
| 105 | -e 's/^all-am:.*/all-am:/' \ |
| 106 | {} + |
| 107 | |
| 108 | # These objects trigger [rpaths] QA checks; the test harness |
| 109 | # skips the associated tests if they're missing, so delete |
| 110 | # them. |
| 111 | objs="" |
| 112 | objs="$objs regression/ust/ust-dl/libbar.so" |
| 113 | objs="$objs regression/ust/ust-dl/libfoo.so" |
| 114 | for obj in $objs ; do |
| 115 | rm -f "${D}${PTEST_PATH}/tests/${obj}" |
| 116 | done |
| 117 | |
| 118 | find "${D}${PTEST_PATH}" -name Makefile -type f -exec \ |
| 119 | touch -r "${B}/Makefile" {} + |
| 120 | |
| 121 | # Substitute links to installed binaries. |
| 122 | for prog in lttng lttng-relayd lttng-sessiond lttng-consumerd ; do |
| 123 | exedir="${D}${PTEST_PATH}/src/bin/${prog}" |
| 124 | install -d "$exedir" |
| 125 | case "$prog" in |
| 126 | lttng-consumerd) |
| 127 | ln -s "${libdir}/lttng/libexec/$prog" "$exedir" |
| 128 | ;; |
| 129 | *) |
| 130 | ln -s "${bindir}/$prog" "$exedir" |
| 131 | ;; |
| 132 | esac |
| 133 | done |
| 134 | } |