Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 239405 - Regression: app-portage/gentoolkit-0.2.4.2 fails to work with /var as a symlink
Summary: Regression: app-portage/gentoolkit-0.2.4.2 fails to work with /var as a symlink
Status: RESOLVED DUPLICATE of bug 234271
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Tools (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Portage Tools Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-10-03 08:46 UTC by José Otávio Rizzatti Ferreira
Modified: 2008-10-10 15:44 UTC (History)
1 user (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 José Otávio Rizzatti Ferreira 2008-10-03 08:46:47 UTC
I have /var in a second partition, with the following schema:

apollyon / # ls -l /var
lrwxrwxrwx 1 root root 18 2008-09-20 06:01 /var -> /mnt/variable/var/
apollyon / # mount | grep variable
/dev/sda5 on /mnt/variable type ext3 (rw,noatime)

When I run revdep-rebuild now, I get this:

apollyon ~ # revdep-rebuild   
 * Configuring search environment for revdep-rebuild
 * Working directory expected to be /var/cache/revdep-rebuild, but it is /mnt/variable/var/cache/revdep-rebuild


Reproducible: Always

Steps to Reproduce:
1. have /var be a symlink
2. revdep-rebuild


Actual Results:  
Error:
* Working directory expected to be /var/cache/revdep-rebuild, but it is /mnt/variable/var/cache/revdep-rebuild


Expected Results:  
Successful completion of the program.

I had no trouble with app-portage/gentoolkit-0.2.3-r1
Comment 1 Lars 2008-10-10 09:51:12 UTC
(In reply to comment #0)

Same problem here with
Portage 2.2_rc12 (default-linux/amd64/2007.0, gcc-4.1.2, glibc-2.6.1-r0, 2.6.26-gentoo-r1 x86_64)
Comment 2 Lars 2008-10-10 13:07:28 UTC
(In reply to comment #1)
This seems to be a duplicate of bug 234271
And I found a solution in this thread:
http://forums.gentoo.org/viewtopic-p-5150944.html?sid=038520a2ab671f4f628884c723ae9863#5150944

The solution is to bind-mount it:
mount -o bind /home/var /var

Or in fstab:
/home/var  /var  none  bind  0 0
Comment 3 Paul Varner (RETIRED) gentoo-dev 2008-10-10 15:44:00 UTC
You need to bind mount /var so that it is not a symbolic link.  The changes were mandated as part of a security fix to ensure that you could not use a symlink attack on revdep-rebuild.

*** This bug has been marked as a duplicate of bug 234271 ***