Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 234271 - gentoolkit-0.2.4_rc5 : revdep-rebuild fails with symlink /tmp
Summary: gentoolkit-0.2.4_rc5 : revdep-rebuild fails with symlink /tmp
Status: RESOLVED WONTFIX
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Tools (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Portage Tools Team
URL:
Whiteboard:
Keywords:
: 239405 242534 (view as bug list)
Depends on:
Blocks:
 
Reported: 2008-08-08 19:55 UTC by happyfool
Modified: 2010-07-19 11:15 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description happyfool 2008-08-08 19:55:26 UTC
# nice revdep-rebuild -i -p
 * Configuring search environment for revdep-rebuild
 * Working directory expected to be /tmp/revdep-rebuild-root, but it is /crypt/tmp/revdep-rebuild-root
# ls -la /tmp 
lrwxrwxrwx 1 root root 9 Nov 17  2005 /tmp -> crypt/tmp
# head -n 470 /usr/bin/revdep-rebuild | tail -n 12
# Dies when it can't change directories
cd() {
        if builtin cd -P "$@"; then
                if [[ $1 != $PWD ]]; then
                        # Some symlink malfeasance is going on
                        die 1 "Working directory expected to be $1, but it is $PWD"
                fi
        else
                die 1 "Unable to change working directory to '$@'"
        fi
}
##

I have some directories symlinked to dirs in /crypt (/tmp /var /home /etc/racoon and others). I found this forum thread about this problem but I couldn't find a filed bug:
http://forums.gentoo.org/viewtopic-t-700189-start-0-postdays-0-postorder-asc-highlight-directory+expected.html

The fix suggested in that thread (bind mounts) is not practical due to the large number of dirs I've symlinked. No other program I've used has ever complained about this use of symlinks, and I'm not sure what problem is being solved here.
Comment 1 Paul Varner (RETIRED) gentoo-dev 2008-08-27 19:36:47 UTC
Unfortunately, I don't have an answer to you other than to bind mount /var/cache once you have installed gentoolkit-0.2.4_rc6 or higher.  The changes were mandated by the security team in the resolving of bug #203414
Comment 2 Paul Varner (RETIRED) gentoo-dev 2008-10-10 15:44:00 UTC
*** Bug 239405 has been marked as a duplicate of this bug. ***
Comment 3 Paul Varner (RETIRED) gentoo-dev 2008-10-18 13:45:37 UTC
*** Bug 242534 has been marked as a duplicate of this bug. ***
Comment 4 Thomas Capricelli 2010-07-19 11:10:07 UTC
Hit by the problem on stable amd64. /tmp is already a 'mount bind' to the actual tmp dir, but the problem is still there.
Comment 5 Thomas Capricelli 2010-07-19 11:15:35 UTC
/var/cache is hardcoded in /usr/bin/revdep-rebuild (not even a var name at the beginning of the file). Fortunately though, it only appears in two lines. Changing those to my actual path seems to fix the problem.

You might want to try this if you are hit by this ugly bug too.