summaryrefslogtreecommitdiffstats
path: root/meta/recipes-kernel/systemtap/systemtap_5.3.bb
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-kernel/systemtap/systemtap_5.3.bb')
-rw-r--r--meta/recipes-kernel/systemtap/systemtap_5.3.bb106
1 files changed, 106 insertions, 0 deletions
diff --git a/meta/recipes-kernel/systemtap/systemtap_5.3.bb b/meta/recipes-kernel/systemtap/systemtap_5.3.bb
new file mode 100644
index 0000000000..588b3b8d36
--- /dev/null
+++ b/meta/recipes-kernel/systemtap/systemtap_5.3.bb
@@ -0,0 +1,106 @@
1SUMMARY = "Script-directed dynamic tracing and performance analysis tool for Linux"
2DESCRIPTION = "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."
5HOMEPAGE = "https://sourceware.org/systemtap/"
6
7require systemtap_git.inc
8
9SRC_URI += " \
10 file://0001-improve-reproducibility-for-c-compiling.patch \
11 file://0001-staprun-address-ncurses-6.3-failures.patch \
12 file://0001-python-Makefile.am-use-absolute-path-for-source-dire.patch \
13 "
14
15DEPENDS = "elfutils"
16
17EXTRA_OECONF += "--with-libelf=${STAGING_DIR_TARGET} --without-rpm \
18 --without-nss --without-avahi --without-dyninst \
19 --disable-server --disable-grapher --enable-prologues \
20 --with-python3 --without-python2-probes \
21 --with-extra-version="oe" \
22 ac_cv_prog_have_javac=no \
23 ac_cv_prog_have_jar=no "
24
25STAP_DOCS ?= "--disable-docs --disable-publican --disable-refdocs"
26
27EXTRA_OECONF += "${STAP_DOCS} "
28
29PACKAGECONFIG ??= "translator sqlite monitor python3-probes ${@bb.utils.filter('DISTRO_FEATURES', 'debuginfod', d)}"
30PACKAGECONFIG[translator] = "--enable-translator,--disable-translator,boost,bash"
31PACKAGECONFIG[libvirt] = "--enable-libvirt,--disable-libvirt,libvirt"
32PACKAGECONFIG[sqlite] = "--enable-sqlite,--disable-sqlite,sqlite3"
33PACKAGECONFIG[monitor] = "--enable-monitor,--disable-monitor,ncurses json-c"
34PACKAGECONFIG[python3-probes] = "--with-python3-probes,--without-python3-probes,python3-setuptools-native"
35PACKAGECONFIG[debuginfod] = "--with-debuginfod, --without-debuginfod"
36
37inherit autotools gettext pkgconfig systemd
38inherit_defer ${@bb.utils.contains('PACKAGECONFIG', 'python3-probes', 'setuptools3-base', '', d)}
39
40# exporter comes with python3-probes
41PACKAGES =+ "${PN}-exporter"
42FILES:${PN}-exporter = "${sysconfdir}/stap-exporter/* \
43 ${sysconfdir}/sysconfig/stap-exporter \
44 ${systemd_system_unitdir}/stap-exporter.service \
45 ${sbindir}/stap-exporter"
46RDEPENDS:${PN}-exporter = "${PN} python3-core python3-netclient"
47SYSTEMD_SERVICE:${PN}-exporter = "stap-exporter.service"
48
49PACKAGES =+ "${PN}-runtime"
50FILES:${PN}-runtime = "\
51 ${bindir}/staprun \
52 ${bindir}/stap-merge \
53 ${bindir}/stapsh \
54 ${libexecdir}/${BPN}/stapio \
55"
56RDEPENDS:${PN}:class-target += "${PN}-runtime"
57
58PACKAGES =+ "${PN}-examples"
59FILES:${PN}-examples = "${datadir}/${BPN}/examples/"
60RDEPENDS:${PN}-examples += "${PN}"
61
62# don't complain that some examples involve bash, perl, php...
63INSANE_SKIP:${PN}-examples += "file-rdeps"
64
65PACKAGES =+ "${PN}-python"
66FILES:${PN}-python += "\
67 ${bindir}/dtrace \
68 ${libdir}/python*/ \
69 ${libexecdir}/${BPN}/python/ \
70"
71# python material requires sdt headers
72RDEPENDS:${PN}-python += "${PN}-dev python3-core"
73INSANE_SKIP:${PN}-python += "dev-deps"
74
75do_configure:prepend () {
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}
80
81do_install:append () {
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
87
88 if [ -d ${D}${prefix}/lib/systemd -a ${D}${prefix}/lib != `dirname ${D}${systemd_unitdir}` ]; then
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
95
96 # Ensure correct ownership for files copied in
97 if [ -d ${D}${sysconfdir}/stap-exporter ]; then
98 chown root:root ${D}${sysconfdir}/stap-exporter/* -R
99 fi
100}
101
102BBCLASSEXTEND = "nativesdk"
103
104# Emits lot of warning which are treated as errors
105# They must be looked into before disabling
106TOOLCHAIN = "gcc"