blob: 04f7e03ab5093d1ea37084b9c115d3aa5cb1c712 [file] [log] [blame]
Patrick Williamsc124f4f2015-09-15 14:41:29 -05001SUMMARY = "Script-directed dynamic tracing and performance analysis tool for Linux"
Andrew Geissler90fd73c2021-03-05 15:25:55 -06002DESCRIPTION = "It provides free software infrastructure to simplify the \
3gathering of information about the running Linux system. This assists \
4diagnosis of a performance or functional problem."
Brad Bishopd7bf8c12018-02-25 22:55:05 -05005HOMEPAGE = "https://sourceware.org/systemtap/"
Patrick Williamsc124f4f2015-09-15 14:41:29 -05006
7require systemtap_git.inc
8
Andrew Geisslereff27472021-10-29 15:35:00 -05009SRC_URI += "file://0001-improve-reproducibility-for-c-compiling.patch \
10 file://0001-staprun-address-ncurses-6.3-failures.patch \
11 "
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080012
Brad Bishop316dfdd2018-06-25 12:45:53 -040013DEPENDS = "elfutils"
Patrick Williamsc124f4f2015-09-15 14:41:29 -050014
15EXTRA_OECONF += "--with-libelf=${STAGING_DIR_TARGET} --without-rpm \
16 --without-nss --without-avahi --without-dyninst \
17 --disable-server --disable-grapher --enable-prologues \
Brad Bishop37a0e4d2017-12-04 01:01:44 -050018 --with-python3 --without-python2-probes \
Patrick Williamsc124f4f2015-09-15 14:41:29 -050019 ac_cv_prog_have_javac=no \
20 ac_cv_prog_have_jar=no "
21
22STAP_DOCS ?= "--disable-docs --disable-publican --disable-refdocs"
23
24EXTRA_OECONF += "${STAP_DOCS} "
25
Brad Bishop316dfdd2018-06-25 12:45:53 -040026PACKAGECONFIG ??= "translator sqlite monitor python3-probes"
Andrew Geissler6ce62a22020-11-30 19:58:47 -060027PACKAGECONFIG[translator] = "--enable-translator,--disable-translator,boost,bash"
Patrick Williamsc124f4f2015-09-15 14:41:29 -050028PACKAGECONFIG[libvirt] = "--enable-libvirt,--disable-libvirt,libvirt"
Patrick Williamsc0f7c042017-02-23 20:41:17 -060029PACKAGECONFIG[sqlite] = "--enable-sqlite,--disable-sqlite,sqlite3"
30PACKAGECONFIG[monitor] = "--enable-monitor,--disable-monitor,ncurses json-c"
Brad Bishop37a0e4d2017-12-04 01:01:44 -050031PACKAGECONFIG[python3-probes] = "--with-python3-probes,--without-python3-probes,python3-setuptools-native"
Patrick Williamsc124f4f2015-09-15 14:41:29 -050032
Andrew Geissler6ce62a22020-11-30 19:58:47 -060033inherit autotools gettext pkgconfig systemd
Andrew Geissler595f6302022-01-24 19:11:47 +000034inherit ${@bb.utils.contains('PACKAGECONFIG', 'python3-probes', 'setuptools3-base', '', d)}
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080035
Andrew Geissler6ce62a22020-11-30 19:58:47 -060036# exporter comes with python3-probes
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080037PACKAGES =+ "${PN}-exporter"
Patrick Williams213cb262021-08-07 19:21:33 -050038FILES:${PN}-exporter = "${sysconfdir}/stap-exporter/* \
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080039 ${sysconfdir}/sysconfig/stap-exporter \
Andrew Geissler5199d832021-09-24 16:47:35 -050040 ${systemd_system_unitdir}/stap-exporter.service \
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080041 ${sbindir}/stap-exporter"
Patrick Williams213cb262021-08-07 19:21:33 -050042RDEPENDS:${PN}-exporter = "${PN} python3-core python3-netclient"
43SYSTEMD_SERVICE:${PN}-exporter = "stap-exporter.service"
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080044
Andrew Geissler6ce62a22020-11-30 19:58:47 -060045PACKAGES =+ "${PN}-runtime"
Patrick Williams213cb262021-08-07 19:21:33 -050046FILES:${PN}-runtime = "\
Andrew Geissler6ce62a22020-11-30 19:58:47 -060047 ${bindir}/staprun \
48 ${bindir}/stap-merge \
49 ${bindir}/stapsh \
50 ${libexecdir}/${BPN}/stapio \
51"
Patrick Williams213cb262021-08-07 19:21:33 -050052RDEPENDS:${PN}:class-target += "${PN}-runtime"
Andrew Geissler6ce62a22020-11-30 19:58:47 -060053
54PACKAGES =+ "${PN}-examples"
Patrick Williams213cb262021-08-07 19:21:33 -050055FILES:${PN}-examples = "${datadir}/${BPN}/examples/"
56RDEPENDS:${PN}-examples += "${PN}"
Andrew Geissler6ce62a22020-11-30 19:58:47 -060057
58# don't complain that some examples involve bash, perl, php...
Patrick Williams213cb262021-08-07 19:21:33 -050059INSANE_SKIP:${PN}-examples += "file-rdeps"
Andrew Geissler6ce62a22020-11-30 19:58:47 -060060
61PACKAGES =+ "${PN}-python"
Patrick Williams213cb262021-08-07 19:21:33 -050062FILES:${PN}-python += "\
Andrew Geissler6ce62a22020-11-30 19:58:47 -060063 ${bindir}/dtrace \
64 ${libdir}/python*/ \
65 ${libexecdir}/${BPN}/python/ \
66"
67# python material requires sdt headers
Patrick Williams213cb262021-08-07 19:21:33 -050068RDEPENDS:${PN}-python += "${PN}-dev python3-core"
69INSANE_SKIP:${PN}-python += "dev-deps"
Andrew Geissler6ce62a22020-11-30 19:58:47 -060070
Patrick Williams213cb262021-08-07 19:21:33 -050071do_configure:prepend () {
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080072 # Improve reproducibility for c++ object files
73 reltivepath="${@os.path.relpath(d.getVar('STAGING_INCDIR'), d.getVar('S'))}"
74 sed -i "s:@RELATIVE_STAGING_INCDIR@:$reltivepath:g" ${S}/stringtable.h
75}
Patrick Williamsc124f4f2015-09-15 14:41:29 -050076
Patrick Williams213cb262021-08-07 19:21:33 -050077do_install:append () {
Brad Bishop316dfdd2018-06-25 12:45:53 -040078 if [ ! -f ${D}${bindir}/stap ]; then
79 # translator disabled case, need to leave only minimal runtime
80 rm -rf ${D}${datadir}/${PN}
81 rm ${D}${libexecdir}/${PN}/stap-env
82 fi
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080083
Andrew Geissler6ce62a22020-11-30 19:58:47 -060084 if [ -d ${D}${prefix}/lib/systemd -a ${D}${prefix}/lib != `dirname ${D}${systemd_unitdir}` ]; then
Brad Bishop64c979e2019-11-04 13:55:29 -050085 # Fix makefile hardcoded path assumptions for systemd (assumes $prefix)
86 # without usrmerge distro feature enabled
87 install -d `dirname ${D}${systemd_unitdir}`
88 mv ${D}${prefix}/lib/systemd `dirname ${D}${systemd_unitdir}`
89 rmdir ${D}${prefix}/lib --ignore-fail-on-non-empty
90 fi
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080091
92 # Ensure correct ownership for files copied in
Andrew Geissler6ce62a22020-11-30 19:58:47 -060093 if [ -d ${D}${sysconfdir}/stap-exporter ]; then
94 chown root:root ${D}${sysconfdir}/stap-exporter/* -R
95 fi
Brad Bishop316dfdd2018-06-25 12:45:53 -040096}
97
Brad Bishop6e60e8b2018-02-01 10:27:11 -050098BBCLASSEXTEND = "nativesdk"