clone 608428 -1 reassign -1 schroot severity -1 serious tags -1 patch thanks On Sat, Jan 01, 2011 at 02:42:08PM +0000, Roger Leigh wrote: > reassign 608428 freebsd-utils > severity 608428 serious > thanks > > On Thu, Dec 30, 2010 at 10:18:27PM +0000, Roger Leigh wrote: > > On Thu, Dec 30, 2010 at 09:06:28PM +0100, Jakub Wilk wrote: > > > > Hi Jakub, > > > > > On kfreebsd-*, schroot is not able to unmount everything if chroot name > > > is longer than 13 characters: > > > > > > # schroot -c 123456789abcde echo Hello world > > > Hello world > > > E: 10mount: umount: unmount of /var/lib/schroot/mount/123456789abcde-e7de3ef4-e02c-430c-b9d9-0e4eb34f3bd0/dev/f failed: Invalid argument > > > > > > If the name is longer than 18 characters, it cannot even run a command: > > > > > > # schroot -c 123456789abcdefghij echo Hello world > > > E: 10mount: mount: dev : File name too long > > > E: 10mount: umount: unmount of /var/lib/schroot/mount/123456789abcdefghij-cf720545-3204-4bda-93a8-82bbd3ac46ca/ failed: Invalid argument > > > > > > Given that e.g. sbuild-createchroot creates chroot named > > > "$SUITE-kfreebsd-$CPU-sbuild" (which is >= 23 characters), this is quite > > > an unfortunate limitation. > > > > Yes, it is. Given that schroot only runs the system's standard > > "mount" and "umount" commands, is this an underlying limitation in > > either those commands or in the system calls? Or in the shell? > > I've created a kfreebsd install using kvm, and installed sbuild and > schroot in it, and I have reproduced the problem. > > The bug is not in sbuild; it's reproducible with schroot alone as you > saw. > > The bug is not in schroot; it's reproducible with the plain > mount/umount commands and long paths, shown below. Please could you try the following patch against schroot: diff --git a/debian/rules b/debian/rules index 16d93b4..2cc89bd 100755 --- a/debian/rules +++ b/debian/rules @@ -19,6 +19,12 @@ else BTRFSSNAP_OPTIONS = --enable-btrfs-snapshot endif +ifneq ($(DEB_HOST_ARCH_OS),kfreebsd) + UUID_OPTIONS = --enable-uuid +else + UUID_OPTIONS = --disable-uuid +endif + CFLAGS = -Wall -g ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) @@ -44,7 +50,7 @@ debian/build/config.status: configure --enable-dchroot --enable-dchroot-dsa \ --enable-static --disable-shared \ --with-bash-completion-dir=/etc/bash_completion.d \ - $(LVMSNAP_OPTIONS) $(BTRFSSNAP_OPTIONS) \ + $(LVMSNAP_OPTIONS) $(BTRFSSNAP_OPTIONS) $(UUID_OPTIONS) \ BTRFS=/sbin/btrfs \ BTRFSCTL=/sbin/btrfsctl \ LVCREATE=/sbin/lvcreate \ This disables the long UUIDs in the session names. It uses a shortened form of the chroot name + pid which is also typically unique. Not ideal, but should hopefully mitigate the issue by reducing the path length (we can't fix the main issue, so this is a workaround for kfreebsd in schroot). Thanks, Roger -- .''`. Roger Leigh : :' : Debian GNU/Linux http://people.debian.org/~rleigh/ `. `' Printing on GNU/Linux? http://gutenprint.sourceforge.net/ `- GPG Public Key: 0x25BFB848 Please GPG sign your mail.
Attachment:
signature.asc
Description: Digital signature