[OE-core] [RFC PATCH 0/5] systemtap adding sysroot, cross compiling of user land related scripts

Victor Kamensky kamensky at cisco.com
Fri Mar 9 20:55:54 UTC 2018


Hi Alex,

On Tue, 6 Mar 2018, Alexander Kanavin wrote:

> On 03/06/2018 07:50 PM, Victor Kamensky wrote:
>> I am a fan of SystemTap and big fan of OE. Systemtap and OE use case I have
>> on my mind is the following:
>
> Hello Victor,
>
> even though I'm listed as the maintainer of systemtap, I do not actually use 
> it or know anything about it - my responsibility ends with keeping it up to 
> date and fixing build errors.

Fair enough. It is understood.

> So I can't comment on the essence of these 
> patches. I do suggest however that you first get as many patches as possible 
> into the upstream, as carrying them in oe-core adds a significant maintenance 
> burden.

Yes, it is understood. I am actively working, as we speak,
with SystemTap folks on putting sysroot related patches into SystemTap.

> Also, if it's possible to merge systemtap-utils into the main systemtap 
> recipe (as a binary package),

I've set to write response why systemtap-utils is really
needed and ended up doing below :). Does it look acceptable
direction to you?

>From 808fbe3c4b64c734258da08e92fb367a8a20939b Mon Sep 17 00:00:00 2001
From: Victor Kamensky <kamensky at cisco.com>
Date: Wed, 7 Mar 2018 18:33:33 -0800
Subject: [PATCH 08/11] systemtap: create translator packageconfig

For cases when systemap module compilation happens on host in
cross-compilation mode, and it is desirable to minimize systemtap
presense on target we need to have just smallest possible set of
utilties that are required to run compiled modules.

Introduce new "translator" PACKAGECONFIG, if it is not set
it would mean that just minimal set of run-time utilities will
be included in the package.

For run-time only systemtap build variant use
PACKAGECONFIG_pn-systemtap = "" or
PACKAGECONFIG_pn-systemtap = "monitor"

Suggested-by: Taras Kondratiuk <takondra at cisco.com>
Signed-off-by: Victor Kamensky <kamensky at cisco.com>
---
  meta/recipes-kernel/systemtap/systemtap_git.bb | 15 +++++++++++----
  1 file changed, 11 insertions(+), 4 deletions(-)

diff --git a/meta/recipes-kernel/systemtap/systemtap_git.bb b/meta/recipes-kernel/systemtap/systemtap_git.bb
index 475b207..b280f58 100644
--- a/meta/recipes-kernel/systemtap/systemtap_git.bb
+++ b/meta/recipes-kernel/systemtap/systemtap_git.bb
@@ -3,9 +3,7 @@ HOMEPAGE = "https://sourceware.org/systemtap/"

  require systemtap_git.inc

-DEPENDS = "boost elfutils"
-
-RDEPENDS_${PN} += "python3-core bash perl"
+DEPENDS = "elfutils"

  EXTRA_OECONF += "--with-libelf=${STAGING_DIR_TARGET} --without-rpm \
              --without-nss --without-avahi --without-dyninst \
@@ -18,7 +16,8 @@ STAP_DOCS ?= "--disable-docs --disable-publican --disable-refdocs"

  EXTRA_OECONF += "${STAP_DOCS} "

-PACKAGECONFIG ??= "sqlite monitor python3-probes"
+PACKAGECONFIG ??= "translator sqlite monitor python3-probes"
+PACKAGECONFIG[translator] = "--enable-translator,--disable-translator,boost,python3-core bash perl"
  PACKAGECONFIG[libvirt] = "--enable-libvirt,--disable-libvirt,libvirt"
  PACKAGECONFIG[sqlite] = "--enable-sqlite,--disable-sqlite,sqlite3"
  PACKAGECONFIG[monitor] = "--enable-monitor,--disable-monitor,ncurses json-c"
@@ -26,4 +25,12 @@ PACKAGECONFIG[python3-probes] = "--with-python3-probes,--without-python3-probes,

  inherit autotools gettext pkgconfig distutils3-base

+do_install_append () {
+   if [ ! -f ${D}${bindir}/stap ]; then
+      # translator disabled case, need to leave only minimal runtime
+      rm -rf ${D}${datadir}/${PN}
+      rm ${D}${libexecdir}/${PN}/stap-env
+   fi
+}
+
  BBCLASSEXTEND = "nativesdk"
-- 
2.7.4

> and merge together crosstap and crosstap2,  please do that.

I added code into crosstap2 to provide backward compatible
crosstap legecy invocation interface. I plan to post new crosstap2 code
as total backward compatible replacement of crosstap with superseding 
functionality.

The only controvercial item left from my original ask is
IMAGE_GEN_COMBINED_DEBUGFS build option that is supposed to
build rootfs-dbg containing combined target and debug symbols.

Thanks,
Victor

> Alex
>



More information about the Openembedded-core mailing list