Comment 5 for bug 54867

Revision history for this message
Roger Leigh (rleigh) wrote :

I would be interested to know if this still affects the current stable 1.2.3 release, and additionally the new stable 1.4.0 release.

I'm using resolvconf (and hence a symlinked /etc/resolv.conf) on my *host* system, and resolv.conf is successfully copied into the chroot.

If /etc/resolv.conf is a symlink *inside* the chroot, then cp will copy to the file pointed to by the symlink. This is the default behaviour of cp, and I see nothing in the manpage to tell it to not dereference the destination (you can for the source). Hence if the symlink is invalid, the copy will fail. It's not clear this is a bug in schroot, or rather a broken symlink in the chroot causing problems.

If there's a way to make cp snap links for the destination, this is something we can add. However, if the admin deliberately symlinked /etc/resolv.conf to somewhere else for their own reasons, this behaviour would be equally wrong. It's not clear that the current behaviour is actually wrong /per se/ except for the special case that the symlink is invalid (points to nowhere).

Regards,
Roger