perf: fix packaging of scripting modules
PATCH 1/2 perf: fix packaging of scripting modules
Make sure that python and perl scripts are packaged in the correct rpm.
--- meta/recipes-kernel/perf/perf.bb | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-)
meta/recipes-kernel/perf/perf.bb +5 -4
@@ -223,13 +223,14 @@ RDEPENDS_${PN}-tests =+ "python" RSUGGESTS_SCRIPTING = "${@bb.utils.contains('PACKAGECONFIG', 'scripting', '${PN}-perl ${PN}-python', '',d)}" RSUGGESTS_${PN} += "${PN}-archive ${PN}-tests ${RSUGGESTS_SCRIPTING}" -#FILES_${PN} += "${libexecdir}/perf-core ${exec_prefix}/libexec/perf-core /usr/lib64/traceevent ${libdir}/traceevent" FILES_${PN} += "${libexecdir}/perf-core ${exec_prefix}/libexec/perf-core ${libdir}/traceevent" FILES_${PN}-archive = "${libdir}/perf/perf-core/perf-archive" FILES_${PN}-tests = "${libdir}/perf/perf-core/tests ${libexecdir}/perf-core/tests" -FILES_${PN}-python = "${libdir}/perf/perf-core/scripts/python ${PYTHON_SITEPACKAGES_DIR}" -FILES_${PN}-python += "${libexecdir}/perf-core/scripts/python/*" -FILES_${PN}-perl = "${libdir}/perf/perf-core/scripts/perl" +FILES_${PN}-python = " \ + ${PYTHON_SITEPACKAGES_DIR} \ + ${libexecdir}/perf-core/scripts/python \ + " +FILES_${PN}-perl = "${libexecdir}/perf-core/scripts/perl" INHIBIT_PACKAGE_DEBUG_SPLIT="1"
Signature · 1 line
2.7.4
PATCH 2/2 perf: enable support for libaudit
perf needs audit-python to be able to show syscall names and for 'perf trace' to work.
Enable dependency on audit-python if present in PACKAGECONFIG. It's disabled by default since audit as of now is in meta-selinux.
Fixes [YOCTO #3343]
Fixes [YOCTO #3358]
--- meta/recipes-kernel/perf/perf.bb | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-)
meta/recipes-kernel/perf/perf.bb +8 -4
@@ -12,7 +12,7 @@ LICENSE = "GPLv2" PR = "r9" PACKAGECONFIG ??= "scripting tui libunwind" -PACKAGECONFIG[scripting] = ",NO_LIBPERL=1 NO_LIBPYTHON=1,perl python" +PACKAGECONFIG[scripting] = ",NO_LIBPERL=1,perl python" # gui support was added with kernel 3.6.35 # since 3.10 libnewt was replaced by slang # to cover a wide range of kernel we add both dependencies
@@ -22,6 +22,10 @@ PACKAGECONFIG[libnuma] = ",NO_LIBNUMA=1" PACKAGECONFIG[systemtap] = ",NO_SDT=1,systemtap" PACKAGECONFIG[jvmti] = ",NO_JVMTI=1" +# libaudit support needs python to be present +PACKAGECONFIG[audit] = ",NO_LIBAUDIT=1,audit python" +PACKAGECONFIG_CONFARGS += "${@bb.utils.contains_any('PACKAGECONFIG', 'scripting audit', '', 'NO_LIBPYTHON=1', d)}" + DEPENDS = " \ virtual/${MLPREFIX}libc \ ${MLPREFIX}elfutils \
@@ -38,7 +42,7 @@ PROVIDES = "virtual/perf" inherit linux-kernel-base kernel-arch # needed for building the tools/perf Python bindings -inherit ${@bb.utils.contains('PACKAGECONFIG', 'scripting', 'pythonnative', '', d)} +inherit ${@bb.utils.contains_any('PACKAGECONFIG', 'scripting audit', 'pythonnative', '', d)} inherit python-dir export PYTHON_SITEPACKAGES_DIR
@@ -111,7 +115,7 @@ do_install() { unset CFLAGS oe_runmake install # we are checking for this make target to be compatible with older perf versions - if ${@bb.utils.contains('PACKAGECONFIG', 'scripting', 'true', 'false', d)} && grep -q install-python_ext ${S}/tools/perf/Makefile*; then + if ${@bb.utils.contains_any('PACKAGECONFIG', 'scripting audit', 'true', 'false', d)} && grep -q install-python_ext ${S}/tools/perf/Makefile*; then oe_runmake DESTDIR=${D} install-python_ext fi }
@@ -216,7 +220,7 @@ PACKAGES =+ "${PN}-archive ${PN}-tests ${PN}-perl ${PN}-python" RDEPENDS_${PN} += "elfutils bash" RDEPENDS_${PN}-doc += "man" RDEPENDS_${PN}-archive =+ "bash" -RDEPENDS_${PN}-python =+ "bash python python-modules" +RDEPENDS_${PN}-python =+ "bash python python-modules ${@bb.utils.contains('PACKAGECONFIG', 'audit', 'audit-python', '', d)}" RDEPENDS_${PN}-perl =+ "bash perl perl-modules" RDEPENDS_${PN}-tests =+ "python"
Signature · 1 line
2.7.4
Re: [PATCH 2/2] perf: enable support for libaudit
meta/recipes-kernel/perf/perf.bb PACKAGECONFIG[libnuma] = ",NO_LIBNUMA=1" · line 27
Quoted 10 lines · Anuj Mittal
# gui support was added with kernel 3.6.35 # since 3.10 libnewt was replaced by slang # to cover a wide range of kernel we add both dependenciesmeta/recipes-kernel/perf/perf.bb +2
-0@@ -22,6 +22,10 @@ PACKAGECONFIG[libnuma] = ",NO_LIBNUMA=1" PACKAGECONFIG[systemtap] = ",NO_SDT=1,systemtap" PACKAGECONFIG[jvmti] = ",NO_JVMTI=1" +# libaudit support needs python to be present +PACKAGECONFIG[audit] = ",NO_LIBAUDIT=1,audit python"
All you need in this patch is:
+# audit needs scripting to be enabled.
+PACKAGECONFIG[audit] = ",NO_LIBAUDIT=1,audit"
The convoluted logic will only get more complicated over time, when a comment saying "if you want audit to work, turn on scripting" is sufficient.
+PACKAGECONFIG_CONFARGS += "${@bb.utils.contains_any('PACKAGECONFIG',
Review PACKAGECONFIG[libnuma] = ",NO_LIBNUMA=1" · line 28
Quoted 1 line
(quoted diff) +0
-0'scripting audit', '', 'NO_LIBPYTHON=1', d)}
PACKAGECONFG_CONFAGS isn't for assigning in a recipe.
Ross
PATCH v2 1/1 perf: enable support for libaudit
In reply to Anuj Mittalperf needs audit-python to be able to show syscall names and for 'perf trace' to work.
Enable dependency on audit-python if present in PACKAGECONFIG. It's disabled by default since audit as of now is in meta-selinux.
Fixes [YOCTO #3343]
Fixes [YOCTO #3358]
--- meta/recipes-kernel/perf/perf.bb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
meta/recipes-kernel/perf/perf.bb +4 -1
@@ -22,6 +22,9 @@ PACKAGECONFIG[libnuma] = ",NO_LIBNUMA=1" PACKAGECONFIG[systemtap] = ",NO_SDT=1,systemtap" PACKAGECONFIG[jvmti] = ",NO_JVMTI=1" +# libaudit support would need scripting to be enabled +PACKAGECONFIG[audit] = ",NO_LIBAUDIT=1,audit" + DEPENDS = " \ virtual/${MLPREFIX}libc \ ${MLPREFIX}elfutils \
@@ -216,7 +219,7 @@ PACKAGES =+ "${PN}-archive ${PN}-tests ${PN}-perl ${PN}-python" RDEPENDS_${PN} += "elfutils bash" RDEPENDS_${PN}-doc += "man" RDEPENDS_${PN}-archive =+ "bash" -RDEPENDS_${PN}-python =+ "bash python python-modules" +RDEPENDS_${PN}-python =+ "bash python python-modules ${@bb.utils.contains('PACKAGECONFIG', 'audit', 'audit-python', '', d)}" RDEPENDS_${PN}-perl =+ "bash perl perl-modules" RDEPENDS_${PN}-tests =+ "python"
Signature · 1 line
2.7.4
✗ patchtest: failure for "perf: fix packaging of scripti..." and 1 more (rev2)
In reply to Anuj Mittal== Series Details ==
Series: "perf: fix packaging of scripti..." and 1 more (rev2)
Revision: 2
URL : https://patchwork.openembedded.org/series/11183/
State : failure
== Summary ==
Thank you for submitting this patch series to OpenEmbedded Core. This is an automated response. Several tests have been executed on the proposed series by patchtest resulting in the following failures:
* Issue Series does not apply on top of target branch [test_series_merge_on_head]
Suggested fix Rebase your series on top of targeted branch
Targeted branch master (currently at 073d8d0010)
If you believe any of these test results are incorrect, please reply to the mailing list ([email protected]) raising your concerns. Otherwise we would appreciate you correcting the issues and submitting a new version of the patchset if applicable. Please ensure you add/increment the version number when sending the new version (i.e. [PATCH] -> [PATCH v2] -> [PATCH v3] -> ...).
---
Guidelines: https://www.openembedded.org/wiki/Commit_Patch_Message_Guidelines Test framework: http://git.yoctoproject.org/cgit/cgit.cgi/patchtest Test suite: http://git.yoctoproject.org/cgit/cgit.cgi/patchtest-oe