From 29cc867b49dd3cc9ec365580ae9b127e837460b6 Mon Sep 17 00:00:00 2001
From: "Bryn M. Reeves" <bmr@redhat.com>
Date: Mon, 26 Jan 2015 00:02:35 +0000
Subject: [PATCH 67/93] [dmraid] don't chroot if tmp is not inside sysroot
To dump metadata dmraid needs to chdir to the temporary archive
directory. Don't attempt to chroot into sysroot if the temporary
directory is not a subdirectory of it.
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
---
sos/plugins/dmraid.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/sos/plugins/dmraid.py b/sos/plugins/dmraid.py
index b7e2d0d..73cd7a1 100644
--- a/sos/plugins/dmraid.py
+++ b/sos/plugins/dmraid.py
@@ -39,6 +39,7 @@ class Dmraid(Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin):
self.add_cmd_output("dmraid -%s" % (opt,))
if self.get_option("metadata"):
metadata_path = self.get_cmd_output_path("metadata")
- self.add_cmd_output("dmraid -rD", runat=metadata_path)
+ self.add_cmd_output("dmraid -rD", runat=metadata_path,
+ chroot=self.tmp_in_sysroot())
# vim: et ts=4 sw=4
--
1.9.3