1 This patch must be applied to fakeroot 2.8 in order to
2 enable correct handling of relative chroots, for rpm and yum.
4 --- fakechroot-2.8.orig/src/libfakechroot.c 2009-03-18 11:39:33.000000000 +0000
5 +++ fakechroot-2.8.rpm/src/libfakechroot.c 2009-03-18 12:43:51.000000000 +0000
6 @@ -1110,7 +1110,7 @@ int chroot (const char *path)
8 char *ptr, *ld_library_path, *tmp, *fakechroot_path;
10 - char dir[FAKECHROOT_MAXPATH], cwd[FAKECHROOT_MAXPATH], full_path[FAKECHROOT_MAXPATH];
11 + char dir[FAKECHROOT_MAXPATH], cwd[FAKECHROOT_MAXPATH];
12 #if !defined(HAVE_SETENV)
15 @@ -1134,23 +1134,21 @@ int chroot (const char *path)
18 if (strcmp(cwd, "/") == 0) {
19 - snprintf(full_path, FAKECHROOT_MAXPATH, "/%s", path);
20 + snprintf(dir, FAKECHROOT_MAXPATH, "/%s", path);
23 - snprintf(full_path, FAKECHROOT_MAXPATH, "%s/%s", cwd, path);
24 + snprintf(dir, FAKECHROOT_MAXPATH, "%s/%s", cwd, path);
28 - snprintf(full_path, FAKECHROOT_MAXPATH, "%s", path);
31 - fakechroot_path = getenv("FAKECHROOT_BASE");
32 + fakechroot_path = getenv("FAKECHROOT_BASE");
34 - if (fakechroot_path != NULL) {
35 - snprintf(dir, FAKECHROOT_MAXPATH, "%s%s", fakechroot_path, full_path);
38 - snprintf(dir, FAKECHROOT_MAXPATH, "%s", full_path);
39 + if (fakechroot_path != NULL) {
40 + snprintf(dir, FAKECHROOT_MAXPATH, "%s%s", fakechroot_path, path);
43 + snprintf(dir, FAKECHROOT_MAXPATH, "%s", path);
47 #if defined(HAVE___XSTAT) && defined(_STAT_VER)