diff options
Diffstat (limited to 'meta/recipes-kernel/systemtap/systemtap_5.3.bb')
-rw-r--r-- | meta/recipes-kernel/systemtap/systemtap_5.3.bb | 106 |
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 @@ | |||
1 | SUMMARY = "Script-directed dynamic tracing and performance analysis tool for Linux" | ||
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." | ||
5 | HOMEPAGE = "https://sourceware.org/systemtap/" | ||
6 | |||
7 | require systemtap_git.inc | ||
8 | |||
9 | SRC_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 | |||
15 | DEPENDS = "elfutils" | ||
16 | |||
17 | EXTRA_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 | |||
25 | STAP_DOCS ?= "--disable-docs --disable-publican --disable-refdocs" | ||
26 | |||
27 | EXTRA_OECONF += "${STAP_DOCS} " | ||
28 | |||
29 | PACKAGECONFIG ??= "translator sqlite monitor python3-probes ${@bb.utils.filter('DISTRO_FEATURES', 'debuginfod', d)}" | ||
30 | PACKAGECONFIG[translator] = "--enable-translator,--disable-translator,boost,bash" | ||
31 | PACKAGECONFIG[libvirt] = "--enable-libvirt,--disable-libvirt,libvirt" | ||
32 | PACKAGECONFIG[sqlite] = "--enable-sqlite,--disable-sqlite,sqlite3" | ||
33 | PACKAGECONFIG[monitor] = "--enable-monitor,--disable-monitor,ncurses json-c" | ||
34 | PACKAGECONFIG[python3-probes] = "--with-python3-probes,--without-python3-probes,python3-setuptools-native" | ||
35 | PACKAGECONFIG[debuginfod] = "--with-debuginfod, --without-debuginfod" | ||
36 | |||
37 | inherit autotools gettext pkgconfig systemd | ||
38 | inherit_defer ${@bb.utils.contains('PACKAGECONFIG', 'python3-probes', 'setuptools3-base', '', d)} | ||
39 | |||
40 | # exporter comes with python3-probes | ||
41 | PACKAGES =+ "${PN}-exporter" | ||
42 | FILES:${PN}-exporter = "${sysconfdir}/stap-exporter/* \ | ||
43 | ${sysconfdir}/sysconfig/stap-exporter \ | ||
44 | ${systemd_system_unitdir}/stap-exporter.service \ | ||
45 | ${sbindir}/stap-exporter" | ||
46 | RDEPENDS:${PN}-exporter = "${PN} python3-core python3-netclient" | ||
47 | SYSTEMD_SERVICE:${PN}-exporter = "stap-exporter.service" | ||
48 | |||
49 | PACKAGES =+ "${PN}-runtime" | ||
50 | FILES:${PN}-runtime = "\ | ||
51 | ${bindir}/staprun \ | ||
52 | ${bindir}/stap-merge \ | ||
53 | ${bindir}/stapsh \ | ||
54 | ${libexecdir}/${BPN}/stapio \ | ||
55 | " | ||
56 | RDEPENDS:${PN}:class-target += "${PN}-runtime" | ||
57 | |||
58 | PACKAGES =+ "${PN}-examples" | ||
59 | FILES:${PN}-examples = "${datadir}/${BPN}/examples/" | ||
60 | RDEPENDS:${PN}-examples += "${PN}" | ||
61 | |||
62 | # don't complain that some examples involve bash, perl, php... | ||
63 | INSANE_SKIP:${PN}-examples += "file-rdeps" | ||
64 | |||
65 | PACKAGES =+ "${PN}-python" | ||
66 | FILES:${PN}-python += "\ | ||
67 | ${bindir}/dtrace \ | ||
68 | ${libdir}/python*/ \ | ||
69 | ${libexecdir}/${BPN}/python/ \ | ||
70 | " | ||
71 | # python material requires sdt headers | ||
72 | RDEPENDS:${PN}-python += "${PN}-dev python3-core" | ||
73 | INSANE_SKIP:${PN}-python += "dev-deps" | ||
74 | |||
75 | do_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 | |||
81 | do_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 | |||
102 | BBCLASSEXTEND = "nativesdk" | ||
103 | |||
104 | # Emits lot of warning which are treated as errors | ||
105 | # They must be looked into before disabling | ||
106 | TOOLCHAIN = "gcc" | ||