[buildd-tools-devel] Bug#677811: schroot: setup.d/15binfmt ironically breaks binfmt support
Vagrant Cascadian
vagrant at debian.org
Tue Jul 10 19:33:40 UTC 2012
tags 677811 patch
thanks
On Sun, Jun 17, 2012 at 12:29:02AM +0200, Julian Andres Klode wrote:
> On Sat, Jun 16, 2012 at 11:13:03PM +0100, Roger Leigh wrote:
> > On Sat, Jun 16, 2012 at 02:57:26PM -0700, Vagrant Cascadian wrote:
> > > When trying to use it, I get the following error:
> > >
> > > schroot -c sid-armhf
> > > E: 15binfmt: mount: /var/lib/schroot/mount/sid-armhf-f6f6edaa-20c2-480a-aafe-961325b205e6/sid-armhf/usr/bin/qemu-arm-static is busy
> > > E: 15binfmt: mount: /var/lib/schroot/mount/sid-armhf-f6f6edaa-20c2-480a-aafe-961325b205e6/sid-armhf/usr/bin/qemu-arm-static is busy
> > > E: sid-armhf-f6f6edaa-20c2-480a-aafe-961325b205e6: Chroot setup failed: stage=setup-start
> >
> > That's odd, any idea why the remount would be failing here?
> >
> > Julian, do you have any thoughts?
>
> It turns out that mount has changed behavior recently (but man-pages document
> the one that worked until now). Replacing
> mount -o remount,ro "$dst"
> by
> mount -o remount,ro,bind "$dst"
the following patch implements this:
commit 1aacf679c3168d01615949ac04a8f2442701c078
Author: Vagrant Cascadian <vagrant at debian.org>
Date: Tue Jul 10 12:50:09 2012 -0600
Change binfmt setup script to specify bind in the mount options on remount.
Idea from Julian Andres Klode.
diff --git a/etc/setup.d/15binfmt b/etc/setup.d/15binfmt
index fe88b73..ad71d1e 100644
--- a/etc/setup.d/15binfmt
+++ b/etc/setup.d/15binfmt
@@ -42,6 +42,6 @@ for emulator in $(update-binfmts --find "$shell"); do
else
[ -e "$dst" ] || touch "$dst"
mount --bind "$emulator" "$dst"
- mount -o remount,ro "$dst"
+ mount -o remount,ro,bind "$dst"
fi
done
live well,
vagrant
More information about the Buildd-tools-devel
mailing list