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 | 6ce62a2 | 2020-11-30 19:58:47 -0600 | [diff] [blame] | 37 | # exporter comes with python3-probes |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 38 | PACKAGES =+ "${PN}-exporter" |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 39 | FILES:${PN}-exporter = "${sysconfdir}/stap-exporter/* \ |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 40 | ${sysconfdir}/sysconfig/stap-exporter \ |
Andrew Geissler | 5199d83 | 2021-09-24 16:47:35 -0500 | [diff] [blame] | 41 | ${systemd_system_unitdir}/stap-exporter.service \ |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 42 | ${sbindir}/stap-exporter" |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 43 | RDEPENDS:${PN}-exporter = "${PN} python3-core python3-netclient" |
| 44 | SYSTEMD_SERVICE:${PN}-exporter = "stap-exporter.service" |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 45 | |
Andrew Geissler | 6ce62a2 | 2020-11-30 19:58:47 -0600 | [diff] [blame] | 46 | PACKAGES =+ "${PN}-runtime" |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 47 | FILES:${PN}-runtime = "\ |
Andrew Geissler | 6ce62a2 | 2020-11-30 19:58:47 -0600 | [diff] [blame] | 48 | ${bindir}/staprun \ |
| 49 | ${bindir}/stap-merge \ |
| 50 | ${bindir}/stapsh \ |
| 51 | ${libexecdir}/${BPN}/stapio \ |
| 52 | " |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 53 | RDEPENDS:${PN}:class-target += "${PN}-runtime" |
Andrew Geissler | 6ce62a2 | 2020-11-30 19:58:47 -0600 | [diff] [blame] | 54 | |
| 55 | PACKAGES =+ "${PN}-examples" |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 56 | FILES:${PN}-examples = "${datadir}/${BPN}/examples/" |
| 57 | RDEPENDS:${PN}-examples += "${PN}" |
Andrew Geissler | 6ce62a2 | 2020-11-30 19:58:47 -0600 | [diff] [blame] | 58 | |
| 59 | # don't complain that some examples involve bash, perl, php... |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 60 | INSANE_SKIP:${PN}-examples += "file-rdeps" |
Andrew Geissler | 6ce62a2 | 2020-11-30 19:58:47 -0600 | [diff] [blame] | 61 | |
| 62 | PACKAGES =+ "${PN}-python" |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 63 | FILES:${PN}-python += "\ |
Andrew Geissler | 6ce62a2 | 2020-11-30 19:58:47 -0600 | [diff] [blame] | 64 | ${bindir}/dtrace \ |
| 65 | ${libdir}/python*/ \ |
| 66 | ${libexecdir}/${BPN}/python/ \ |
| 67 | " |
| 68 | # python material requires sdt headers |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 69 | RDEPENDS:${PN}-python += "${PN}-dev python3-core" |
| 70 | INSANE_SKIP:${PN}-python += "dev-deps" |
Andrew Geissler | 6ce62a2 | 2020-11-30 19:58:47 -0600 | [diff] [blame] | 71 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 72 | do_configure:prepend () { |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 73 | # Improve reproducibility for c++ object files |
| 74 | reltivepath="${@os.path.relpath(d.getVar('STAGING_INCDIR'), d.getVar('S'))}" |
| 75 | sed -i "s:@RELATIVE_STAGING_INCDIR@:$reltivepath:g" ${S}/stringtable.h |
| 76 | } |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 77 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 78 | do_install:append () { |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 79 | if [ ! -f ${D}${bindir}/stap ]; then |
| 80 | # translator disabled case, need to leave only minimal runtime |
| 81 | rm -rf ${D}${datadir}/${PN} |
| 82 | rm ${D}${libexecdir}/${PN}/stap-env |
| 83 | fi |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 84 | |
Andrew Geissler | 6ce62a2 | 2020-11-30 19:58:47 -0600 | [diff] [blame] | 85 | 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] | 86 | # Fix makefile hardcoded path assumptions for systemd (assumes $prefix) |
| 87 | # without usrmerge distro feature enabled |
| 88 | install -d `dirname ${D}${systemd_unitdir}` |
| 89 | mv ${D}${prefix}/lib/systemd `dirname ${D}${systemd_unitdir}` |
| 90 | rmdir ${D}${prefix}/lib --ignore-fail-on-non-empty |
| 91 | fi |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 92 | |
| 93 | # Ensure correct ownership for files copied in |
Andrew Geissler | 6ce62a2 | 2020-11-30 19:58:47 -0600 | [diff] [blame] | 94 | if [ -d ${D}${sysconfdir}/stap-exporter ]; then |
| 95 | chown root:root ${D}${sysconfdir}/stap-exporter/* -R |
| 96 | fi |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 97 | } |
| 98 | |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 99 | BBCLASSEXTEND = "nativesdk" |