I have installed an SSD, and to avoid unnecessary wear I did the following: - Mounted /dev/sda3 to /mnt/sd3 - Put my var/ and tmp/ folders on that partition - Made symlinks in / for /var and /tmp that point to /mnt/sda3/var and /mnt/sda3/tmp respectively Now if I try to run revdep-rebuild, it is smart enough to know that I pulled the rug out from under it's feet and fails with the following: * Configuring search environment for revdep-rebuild * Working directory expected to be /var/cache/revdep-rebuild, but it is /mnt/sda3/var/cache/revdep-rebuild So really, am I doing something unsupported, or should the tool be less strict? Reproducible: Always
Sorry about the late response. I'm not sure how I missed this when you filed the bug. This is done on purpose to prevent symlink attacks on revdep-rebuild when run as root. The security bug for the design decision is Bug 203414. Please note the discussion at the end of the bug for removing the check only applied when revdep-rebuild was run as a user. The solution to fix the problem is to not use a symlink, but to bind mount the desired directories. So assuming that you have the following: /mnt/sd3/var is your desired location for /var instead of making /var as symlink to /mnt/sd3/var you want to do the following: mount --bind /mnt/sd3/var /var The /etc/fstab entry to do this automatically should look like: /mnt/sd3/var /var none bind Also be sure to set the permissions and ownership of /var/cache/revdep-rebuild chown root:root /var/cache/revdep-rebuild chmod 700 /var/cache/revdep-rebuild *** This bug has been marked as a duplicate of bug 263661 ***
Cheers, and sorry for the late response-reponse :) I like that solution much better than symlinks anyway, just never thought of it