My node /var/cache is actually a symlink to /mnt/usb/var/cache, because my solid-state disk is too small. This breaks revdep-rebuild, as follows: root@infty ~ # revdep-rebuild -v * Configuring search environment for revdep-rebuild * Working directory expected to be /var/cache/revdep-rebuild, but it is /mnt/usb/var/cache/revdep-rebuild root@infty ~ # Reproducible: Always Steps to Reproduce: 1. su - 2. <enter> 3. revdep-rebuild 4. <enter> ;) Actual Results: See above. Expected Results: When When I execute the command as an ordinary user, with "pretend" and "verbose" options on, it seems to work just fine. Here's the proof: joe@infty $ revdep-rebuild -p -v * Configuring search environment for revdep-rebuild * Temporary cache files are located in /tmp/revdep-rebuild.HGVNAmzSg2 revdep-rebuild environment: SEARCH_DIRS="/bin /lib /opt/bin /sbin /usr/bin /usr/i686-pc-linux-gnu/gcc-bin/4.1.2 /usr/i686-pc-linux-gnu/lib /usr/lib /usr/lib/gcc/i686-pc-linux-gnu/4.1.2 /usr/lib/opengl/xorg-x11/lib /usr/libexec /usr/local/lib /usr/sbin" SEARCH_DIRS_MASK="/lib/modules" LD_LIBRARY_MASK="libjava.so libjvm.so libodbc.so libodbcinst.so" PORTAGE_ROOT="/" EMERGE_OPTIONS="" ORDER_PKGS="1" FULL_LD_PATH="1" * Checking reverse dependencies * Packages containing binaries and libraries broken by a package update * will be emerged. * Collecting system binaries and libraries * Generated new 1_files.rr * Collecting complete LD_LIBRARY_PATH * Generated new 2_ldpath.rr * Checking dynamic linking consistency [ 100% ] * Dynamic linking on your system is consistent... All done. joe@infty $ root@infty ~ # emerge --info Portage 2.1.4.5 (default/linux/x86/2008.0, gcc-4.1.2, glibc-2.6.1-r0, 2.6.25-gentoo-r8 i686) ================================================================= System uname: 2.6.25-gentoo-r8 i686 Pentium III (Coppermine) Timestamp of tree: Fri, 17 Oct 2008 22:34:01 +0000 app-shells/bash: 3.2_p33 dev-lang/python: 2.5.2-r7 sys-apps/baselayout: 1.12.11.1 sys-apps/sandbox: 1.2.18.1-r2 sys-devel/autoconf: 2.61-r2 sys-devel/automake: 1.9.6-r2, 1.10.1-r1 sys-devel/binutils: 2.18-r3 sys-devel/gcc-config: 1.4.0-r4 sys-devel/libtool: 1.5.26 virtual/os-headers: 2.6.23-r3 ACCEPT_KEYWORDS="x86" CBUILD="i686-pc-linux-gnu" CFLAGS="-O2 -march=i686 -pipe" CHOST="i686-pc-linux-gnu" CONFIG_PROTECT="/etc" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/revdep-rebuild /etc/terminfo /etc/udev/rules.d" CXXFLAGS="-O2 -march=i686 -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="distlocks metadata-transfer sandbox sfperms strict unmerge-orphans userfetch" GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo" LDFLAGS="-Wl,-O1" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="X acl alsa berkdb bzip2 cdr cli cracklib crypt cups dbus directfb dri dvd esd fbcon flac fortran gdbm gif gpm iconv imagemagick isdnlog jpeg lame lm_sensors midi mime mp3 mudflap nas ncurses nls nptl nptlonly openmp pam pcre pdf perl php pppd python qt3 qt4 readline reflection session spell spl ssl svg sysfs tcpd truetype unicode vorbis x86 xinerama xorg zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" USERLAND="GNU" VIDEO_CARDS="ati radeon r128 vesa" Unset: CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LANG, LC_ALL, LINGUAS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY
You will need to bind mount /var/cache directory. The code that checks for symlinks was put in at the request of the security team to prevent symlink attacks. *** This bug has been marked as a duplicate of bug 234271 ***
(In reply to comment #1) > You will need to bind mount /var/cache directory. Thank you. I will do this instead of symlinking. For other noobs who read this and want details, my plan is to .. delete the symbolic link whose name was /var/cache, .. create a new empty directory named /var/cache, and then .. mount --rbind /mnt/usr/var/cache /var/cache The third line by itself will probably suffice for users who haven't disturbed the default setup like I did.
Sorry, I mistyped one character: (old/wrong)> .. mount --rbind /mnt/usr/var/cache /var/cache (new/right)> .. mount --rbind /mnt/usb/var/cache /var/cache
how do you solve this on boot? what should one put in /etc/fstab in order for this to work? or should one use /etc/rc.local ? My entire /var is symlink to a directory on an ecrypted filesystem, how can I solve the same problem?