Bug#542915: pbuilder removes data from bind-mounted directories

Matthew Palmer mpalmer at debian.org
Wed Dec 15 03:21:05 UTC 2010


tag 542915 +patch
usertags 542915 -in-progress +patch-in-git
thanks

Attached is my minimal patch solving the problem of data loss in
bind-mounted directories.  It provides a safety net that, in the event that
*anything* is still mounted inside the chroot, no attempt to delete anything
will be made.  Whilst this may, in some corner cases, result in failure to
cleanup a chroot when previously (most) things would have been deleted, it
should never effect most users.

I've exercised this patch in every way I can think of (bind-mounting things
left and right, regular mounts, symlinks to mounts, etc) and I haven't been
able to get it to actually delete anything any more.

Jakub, I'd appreciate it if you would be able to apply the patch to your
local pbuilder installation (it should go onto pbuilder-modulers in-situ,
without a need for a rebuild) and see if you can find any ways to break it.

- Matt


More information about the Pbuilder-maint mailing list