Apache OpenOffice (AOO) Bugzilla – Issue 20459
loader fails in bind mount directory tree (setup failed with "absolute programpath cannot be found")
Last modified: 2004-01-28 09:40:15 UTC
Setup fails on any system that uses bind mounts to provide access to home directories in several chroot environments, like this one: halls@bruckner:~$ mount /dev/sda2 on / type ext2 (rw,errors=remount-ro) /home on /org/bruckner.debian.org/chroot/sid/home type none (rw,bind) [...] Running setup gives this error: ./instsetoo/unxlngppc.pro/01/normal/setup -v -R:/home/halls/openoffice.org/debian/local/rsfile.txt -nogui ./instsetoo/unxlngppc.pro/01/normal/setup: absolute programpath cannot be found. The problem is in loader.c: __getFullPath() will only try to find the patchname using names if it seems to be an NFS mount, where the devices of the current directory and its parent are different: if (status.st_dev == parent.st_dev) { [...] } else { /* * if this point is a mount point we have to check * each entry, because the inode number in the directory * is for the parent directory, not for the mounted file */ [...] } However, on a bind mount, status.st_dev and parent.st_dev are the same, so the first code path is followed and fails because the inode number in the parent directory is for the mount point. I have worked around this by disabling the first code path and making the second path be used always. It doesn't seem to be a performance problem, since this code is only used during the setup loader. I'll attach the patch I used to work around the problem.
Created attachment 9843 [details] Patch generated against 1.1rc5
of -> dv: please have a look at this patch.
I'll have a look.
Hi Chris, I've replaced the function __getFullPath() with realpath() and everything works fine, but I don't know anything about bind mounts, so perhaps you can check, if my solution works for you, too? Thanks, Dirk p.s.: Use version 1.49.14.2.2.3 of loader.c
Hi Dirk, the use of realpath() looks fine to me, thanks for the fix. I will include your version of the file in the next Debian package builds to verify it works on all our systems. Thanks, Chris
Please verify.
Now we have realpath() in loader.c.
Verified in in cws SetupPP01.
Ok in current version.