systemtap 'crosstap' fix
cover systemtap 'crosstap' fix
From: Tom Zanussi <[email protected]>
This is a patch to systemtap and fixes a problem where a passed-in builddir gets lost in the session copy constructor when connecting to remote hosts, resulting in failed script compilation.
The patch has been submitted upstream but no feedback yet.
The following changes since commit 75f470cd18d693a9a96d9849291c2c8de4dcbeb8:
qt4: Add space for _appends (2013-02-01 22:49:47 +0000)
are available in the git repository at:
git://git.yoctoproject.org/poky-contrib.git tzanussi/systemtap-constructor-fix
http://git.yoctoproject.org/cgit/cgit.cgi/poky-contrib/log/?h=tzanussi/systemtap-constructor-fix
Tom Zanussi (1):
systemtap: make session copy constructor pick up kernel builddir
.../systemtap/systemtap/copy-constructor-builddir.patch | 17 +++++++++++++++++ meta/recipes-kernel/systemtap/systemtap_git.bb | 2 +- meta/recipes-kernel/systemtap/systemtap_git.inc | 1 + 3 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 meta/recipes-kernel/systemtap/systemtap/copy-constructor-builddir.patch
Signature · 1 line
1.7.11.4
PATCH 1/1 systemtap: make session copy constructor pick up kernel builddir
From: Tom Zanussi <[email protected]>
When using the stap -r option with a full path to a kernel build tree (i.e. one starting with /) along with --remote to execute the script on a remote system, the build tree that I passed in was ignored and it used some default locally-constructed location instead:
Checking "/lib/modules/3.4.24-yocto-standard/build/.config" failed with error: No such file or directory
I traced it down to the s->clone() call in the path ssh_remote->connect()->set_child_fds(), which unconditionally invokes the following in the systemtap_session copy constructor:
kernel_build_tree = "/lib/modules/" + kernel_release + "/build";
That doesn't seem correct - it seems to me it should be preserving the value from the passed-in session object, which is what this does.
Fixes [YOCTO #3756]
--- .../systemtap/systemtap/copy-constructor-builddir.patch | 17 +++++++++++++++++ meta/recipes-kernel/systemtap/systemtap_git.bb | 2 +- meta/recipes-kernel/systemtap/systemtap_git.inc | 1 + 3 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 meta/recipes-kernel/systemtap/systemtap/copy-constructor-builddir.patch
meta/recipes-kernel/systemtap/systemtap/copy-constructor-builddir.patch new file +17 -0
@@ -0,0 +1,17 @@ +Upstream-Status: Pending + +Signed-off-by: Tom Zanussi <[email protected]> + +Index: git/session.cxx +=================================================================== +--- git.orig/session.cxx ++++ git/session.cxx +@@ -254,7 +254,7 @@ systemtap_session::systemtap_session (co + last_token (0) + { + release = kernel_release = kern; +- kernel_build_tree = "/lib/modules/" + kernel_release + "/build"; ++ kernel_build_tree = other.kernel_build_tree; + architecture = machine = normalize_machine(arch); + setup_kernel_release(kern.c_str()); + native_build = false; // assumed; XXX: could be computed as in check_options()
meta/recipes-kernel/systemtap/systemtap_git.bb +1 -1
@@ -6,7 +6,7 @@ DEPENDS = "elfutils sqlite3 systemtap-native" DEPENDS_class-native = "elfutils-native sqlite3-native gettext-native" DEPENDS_class-nativesdk = "nativesdk-elfutils nativesdk-sqlite3 nativesdk-gettext" -PR = "r0" +PR = "r1" EXTRA_OECONF += "--with-libelf=${STAGING_DIR_TARGET} --without-rpm \ --without-nss --without-avahi \
meta/recipes-kernel/systemtap/systemtap_git.inc +1 -0
@@ -6,6 +6,7 @@ PV = "1.8+git${SRCPV}" SRC_URI = "git://sourceware.org/git/systemtap.git;protocol=git \ file://docproc-build-fix.patch \ + file://copy-constructor-builddir.patch \ " FILESPATH = "${FILE_DIRNAME}/systemtap"
Signature · 1 line
1.7.11.4
Quoted 8 lines · On Fri, 2013-02-01 at 18:34 -0600, [email protected] wrote:
From: Tom Zanussi <[email protected]>
This is a patch to systemtap and fixes a problem where a passed-in builddir gets lost in the session copy constructor when connecting to remote hosts, resulting in failed script compilation.
The patch has been submitted upstream but no feedback yet.
Please hold off on this - it works but there may be a better way...
Thanks,
Tom
Quoted 18 lines
The following changes since commit
75f470cd18d693a9a96d9849291c2c8de4dcbeb8:qt4: Add space for
_appends(2013-02-01 22:49:47 +0000)are available in the git repository at:
git://git.yoctoproject.org/poky-contrib.gittzanussi/systemtap-constructor-fix
http://git.yoctoproject.org/cgit/cgit.cgi/poky-contrib/log/?h=tzanussi/systemtap-constructor-fixTom Zanussi (1):
systemtap: make session copy constructor pick up kernel builddir.../systemtap/systemtap/copy-constructor-builddir.patch | 17 +++++++++++++++++ meta/recipes-kernel/systemtap/systemtap_git.bb | 2 +- meta/recipes-kernel/systemtap/systemtap_git.inc | 1 + 3 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 meta/recipes-kernel/systemtap/systemtap/copy-constructor-builddir.patch