Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 1 | SUMMARY = "Script-directed dynamic tracing and performance analysis tool for Linux" |
Andrew Geissler | 90fd73c | 2021-03-05 15:25:55 -0600 | [diff] [blame] | 2 | DESCRIPTION = "It provides free software infrastructure to simplify the \ |
| 3 | gathering of information about the running Linux system. This assists \ |
| 4 | diagnosis of a performance or functional problem." |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 5 | HOMEPAGE = "https://sourceware.org/systemtap/" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 6 | |
| 7 | require systemtap_git.inc |
| 8 | |
Andrew Geissler | d583833 | 2022-05-27 11:33:10 -0500 | [diff] [blame] | 9 | SRC_URI += " \ |
| 10 | file://0001-improve-reproducibility-for-c-compiling.patch \ |
| 11 | file://0001-staprun-address-ncurses-6.3-failures.patch \ |
Andrew Geissler | eff2747 | 2021-10-29 15:35:00 -0500 | [diff] [blame] | 12 | " |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 13 | |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 14 | DEPENDS = "elfutils" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 15 | |
| 16 | EXTRA_OECONF += "--with-libelf=${STAGING_DIR_TARGET} --without-rpm \ |
| 17 | --without-nss --without-avahi --without-dyninst \ |
| 18 | --disable-server --disable-grapher --enable-prologues \ |
Brad Bishop | 37a0e4d | 2017-12-04 01:01:44 -0500 | [diff] [blame] | 19 | --with-python3 --without-python2-probes \ |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 20 | ac_cv_prog_have_javac=no \ |
| 21 | ac_cv_prog_have_jar=no " |
| 22 | |
| 23 | STAP_DOCS ?= "--disable-docs --disable-publican --disable-refdocs" |
| 24 | |
| 25 | EXTRA_OECONF += "${STAP_DOCS} " |
| 26 | |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 27 | PACKAGECONFIG ??= "translator sqlite monitor python3-probes" |
Andrew Geissler | 6ce62a2 | 2020-11-30 19:58:47 -0600 | [diff] [blame] | 28 | PACKAGECONFIG[translator] = "--enable-translator,--disable-translator,boost,bash" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 29 | PACKAGECONFIG[libvirt] = "--enable-libvirt,--disable-libvirt,libvirt" |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 30 | PACKAGECONFIG[sqlite] = "--enable-sqlite,--disable-sqlite,sqlite3" |
| 31 | PACKAGECONFIG[monitor] = "--enable-monitor,--disable-monitor,ncurses json-c" |
Brad Bishop | 37a0e4d | 2017-12-04 01:01:44 -0500 | [diff] [blame] | 32 | PACKAGECONFIG[python3-probes] = "--with-python3-probes,--without-python3-probes,python3-setuptools-native" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 33 | |
Andrew Geissler | 6ce62a2 | 2020-11-30 19:58:47 -0600 | [diff] [blame] | 34 | inherit autotools gettext pkgconfig systemd |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 35 | inherit ${@bb.utils.contains('PACKAGECONFIG', 'python3-probes', 'setuptools3-base', '', d)} |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 36 | |
Andrew Geissler | fc113ea | 2023-03-31 09:59:46 -0500 | [diff] [blame] | 37 | # | ../git/elaborate.cxx:2601:21: error: storing the address of local variable 'sym' in '*s.systemtap_session::symbol_resolver' [-Werror=dangling-pointer=] |
| 38 | CXXFLAGS += "-Wno-dangling-pointer" |
| 39 | |
Andrew Geissler | 6ce62a2 | 2020-11-30 19:58:47 -0600 | [diff] [blame] | 40 | # exporter comes with python3-probes |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 41 | PACKAGES =+ "${PN}-exporter" |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 42 | FILES:${PN}-exporter = "${sysconfdir}/stap-exporter/* \ |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 43 | ${sysconfdir}/sysconfig/stap-exporter \ |
Andrew Geissler | 5199d83 | 2021-09-24 16:47:35 -0500 | [diff] [blame] | 44 | ${systemd_system_unitdir}/stap-exporter.service \ |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 45 | ${sbindir}/stap-exporter" |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 46 | RDEPENDS:${PN}-exporter = "${PN} python3-core python3-netclient" |
| 47 | SYSTEMD_SERVICE:${PN}-exporter = "stap-exporter.service" |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 48 | |
Andrew Geissler | 6ce62a2 | 2020-11-30 19:58:47 -0600 | [diff] [blame] | 49 | PACKAGES =+ "${PN}-runtime" |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 50 | FILES:${PN}-runtime = "\ |
Andrew Geissler | 6ce62a2 | 2020-11-30 19:58:47 -0600 | [diff] [blame] | 51 | ${bindir}/staprun \ |
| 52 | ${bindir}/stap-merge \ |
| 53 | ${bindir}/stapsh \ |
| 54 | ${libexecdir}/${BPN}/stapio \ |
| 55 | " |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 56 | RDEPENDS:${PN}:class-target += "${PN}-runtime" |
Andrew Geissler | 6ce62a2 | 2020-11-30 19:58:47 -0600 | [diff] [blame] | 57 | |
| 58 | PACKAGES =+ "${PN}-examples" |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 59 | FILES:${PN}-examples = "${datadir}/${BPN}/examples/" |
| 60 | RDEPENDS:${PN}-examples += "${PN}" |
Andrew Geissler | 6ce62a2 | 2020-11-30 19:58:47 -0600 | [diff] [blame] | 61 | |
| 62 | # don't complain that some examples involve bash, perl, php... |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 63 | INSANE_SKIP:${PN}-examples += "file-rdeps" |
Andrew Geissler | 6ce62a2 | 2020-11-30 19:58:47 -0600 | [diff] [blame] | 64 | |
| 65 | PACKAGES =+ "${PN}-python" |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 66 | FILES:${PN}-python += "\ |
Andrew Geissler | 6ce62a2 | 2020-11-30 19:58:47 -0600 | [diff] [blame] | 67 | ${bindir}/dtrace \ |
| 68 | ${libdir}/python*/ \ |
| 69 | ${libexecdir}/${BPN}/python/ \ |
| 70 | " |
| 71 | # python material requires sdt headers |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 72 | RDEPENDS:${PN}-python += "${PN}-dev python3-core" |
| 73 | INSANE_SKIP:${PN}-python += "dev-deps" |
Andrew Geissler | 6ce62a2 | 2020-11-30 19:58:47 -0600 | [diff] [blame] | 74 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 75 | do_configure:prepend () { |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 76 | # Improve reproducibility for c++ object files |
| 77 | reltivepath="${@os.path.relpath(d.getVar('STAGING_INCDIR'), d.getVar('S'))}" |
| 78 | sed -i "s:@RELATIVE_STAGING_INCDIR@:$reltivepath:g" ${S}/stringtable.h |
| 79 | } |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 80 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 81 | do_install:append () { |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 82 | if [ ! -f ${D}${bindir}/stap ]; then |
| 83 | # translator disabled case, need to leave only minimal runtime |
| 84 | rm -rf ${D}${datadir}/${PN} |
| 85 | rm ${D}${libexecdir}/${PN}/stap-env |
| 86 | fi |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 87 | |
Andrew Geissler | 6ce62a2 | 2020-11-30 19:58:47 -0600 | [diff] [blame] | 88 | if [ -d ${D}${prefix}/lib/systemd -a ${D}${prefix}/lib != `dirname ${D}${systemd_unitdir}` ]; then |
Brad Bishop | 64c979e | 2019-11-04 13:55:29 -0500 | [diff] [blame] | 89 | # Fix makefile hardcoded path assumptions for systemd (assumes $prefix) |
| 90 | # without usrmerge distro feature enabled |
| 91 | install -d `dirname ${D}${systemd_unitdir}` |
| 92 | mv ${D}${prefix}/lib/systemd `dirname ${D}${systemd_unitdir}` |
| 93 | rmdir ${D}${prefix}/lib --ignore-fail-on-non-empty |
| 94 | fi |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 95 | |
| 96 | # Ensure correct ownership for files copied in |
Andrew Geissler | 6ce62a2 | 2020-11-30 19:58:47 -0600 | [diff] [blame] | 97 | if [ -d ${D}${sysconfdir}/stap-exporter ]; then |
| 98 | chown root:root ${D}${sysconfdir}/stap-exporter/* -R |
| 99 | fi |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 100 | } |
| 101 | |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 102 | BBCLASSEXTEND = "nativesdk" |