This patch must be applied to fakeroot 2.8 in order to enable correct handling of relative chroots, for rpm and yum. --- fakechroot-2.8.orig/src/libfakechroot.c 2009-03-18 11:39:33.000000000 +0000 +++ fakechroot-2.8.rpm/src/libfakechroot.c 2009-03-18 12:43:51.000000000 +0000 @@ -1110,7 +1110,7 @@ int chroot (const char *path) { char *ptr, *ld_library_path, *tmp, *fakechroot_path; int status, len; - char dir[FAKECHROOT_MAXPATH], cwd[FAKECHROOT_MAXPATH], full_path[FAKECHROOT_MAXPATH]; + char dir[FAKECHROOT_MAXPATH], cwd[FAKECHROOT_MAXPATH]; #if !defined(HAVE_SETENV) char *envbuf; #endif @@ -1134,23 +1134,21 @@ int chroot (const char *path) return -1; } if (strcmp(cwd, "/") == 0) { - snprintf(full_path, FAKECHROOT_MAXPATH, "/%s", path); + snprintf(dir, FAKECHROOT_MAXPATH, "/%s", path); } else { - snprintf(full_path, FAKECHROOT_MAXPATH, "%s/%s", cwd, path); + snprintf(dir, FAKECHROOT_MAXPATH, "%s/%s", cwd, path); } } else { - snprintf(full_path, FAKECHROOT_MAXPATH, "%s", path); - } - - fakechroot_path = getenv("FAKECHROOT_BASE"); + fakechroot_path = getenv("FAKECHROOT_BASE"); - if (fakechroot_path != NULL) { - snprintf(dir, FAKECHROOT_MAXPATH, "%s%s", fakechroot_path, full_path); - } - else { - snprintf(dir, FAKECHROOT_MAXPATH, "%s", full_path); + if (fakechroot_path != NULL) { + snprintf(dir, FAKECHROOT_MAXPATH, "%s%s", fakechroot_path, path); + } + else { + snprintf(dir, FAKECHROOT_MAXPATH, "%s", path); + } } #if defined(HAVE___XSTAT) && defined(_STAT_VER)