Bug#401180: [Buildd-tools-devel] Bug#401180: schroot: using a symlink for /var/lib/schroot/mount causes /home and /tmp to be erased

Lucas Nussbaum lucas at lucas-nussbaum.net
Thu Dec 14 20:09:06 CET 2006


On 12/12/06 at 21:28 +0000, Roger Leigh wrote:
> tags 401180 + patch
> thanks
> 
> Lucas Nussbaum <lucas at lucas-nussbaum.net> writes:
> 
> > I am using "file" chroots. the chroot is usually untared under
> > /var/lib/schroot, however, I wanted to change this to another location
> > (my /var is quite small, and many apps don't like it being full).
> >
> > I couldn't find any way to specify another directory for this, so I just
> > symlinked /var/lib/schroot to another place. However, this caused
> > $LIBEXEC_DIR/schroot-listmounts to be unable to determine that /home,
> > /tmp, etc were still bind-mounted. So do_umount_all in that file exits
> > without error even if my filesystems are still bind-mounted, and my home
> > directory and my /tmp got removed.
> 
> I have attached a patch which I believe addresses this problem.
> Please could you build schroot with the patch applied and test under
> the same conditions (perhaps with a backup beforehand), to see if this
> fixes things.  I have tested it myself, and I do think it works, but I
> would appreciate some confirmation before uploading a fixed version.

Hi,

I confirm that the patch seems to work:
***lucas at beothuk:~$ /usr/lib/schroot/schroot-listmounts -m
/var/lib/schroot/mount/tsid-b1b50cf3-c42b-405d-8ab8-0bae1a1c3637
/home/space/schroot/mount/tsid-b1b50cf3-c42b-405d-8ab8-0bae1a1c3637/tmp
/home/space/schroot/mount/tsid-b1b50cf3-c42b-405d-8ab8-0bae1a1c3637/dev/shm
/home/space/schroot/mount/tsid-b1b50cf3-c42b-405d-8ab8-0bae1a1c3637/dev/pts
/home/space/schroot/mount/tsid-b1b50cf3-c42b-405d-8ab8-0bae1a1c3637/proc

(I've disabled bind-mounting of /home in /etc/schroot/setup.d/10mount)

After thinking about it for a while, I exited the chroot, and it didn't
empty my /tmp. :-)
-- 
| Lucas Nussbaum
| lucas at lucas-nussbaum.net   http://www.lucas-nussbaum.net/ |
| jabber: lucas at nussbaum.fr             GPG: 1024D/023B3F4F |
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://lists.alioth.debian.org/pipermail/buildd-tools-devel/attachments/20061214/9256b49d/attachment.pgp


More information about the Buildd-tools-devel mailing list