[buildd-tools-devel] Bug#806507: union-mount-options: fails to handle ${CHROOT_UNION_OVERLAY_DIRECTORY}, etc.

Ivan Shmakov ivan at siamics.net
Sat Nov 28 06:52:54 UTC 2015


Package: schroot
Version: 1.6.10-1+b1

	schroot.conf(5) reads:

  union-mount-options=options

    […] Note: One can use the variables
    “${CHROOT_UNION_OVERLAY_DIRECTORY}” and
    “${CHROOT_UNION_UNDERLAY_DIRECTORY}” to refer to the writable
    overlay session directory and read-only underlying directory which
    are to form the union.

	However, it looks like these (or any other, for that matter)
	variables are never substituted within the code, and the value
	of the ‘union-mount-options’ option is instead passed to
	mount(8) “as-is”, leading to an error like:

Nov 28 06:30:49 crabs kernel: [938142.164904] aufs opt_add:714:mount[3093]: lookup failed ${CHROOT_UNION_OVERLAY_DIRECTORY} (-2)

	As an (untested) workaround, the following code could be added
	to either setup.d/10mount (do_mount_fs_union), or a file
	processed prior to one.

    CHROOT_UNION_MOUNT_OPTIONS=${CHROOT_UNION_MOUNT_OPTIONS//\${CHROOT_UNION_UNDERLAY_DIRECTORY\}/${CHROOT_UNION_UNDERLAY_DIRECTORY}}
    CHROOT_UNION_MOUNT_OPTIONS=${CHROOT_UNION_MOUNT_OPTIONS//\${CHROOT_UNION_OVERLAY_DIRECTORY\}/${CHROOT_UNION_OVERLAY_DIRECTORY}}

	(Per my reading of [1], the problem is not resolved as of the
	current ‘master’.)

[1] https://github.com/codelibre-net/schroot/blob/master/etc/setup.d/10mount

-- 
FSF associate member #7257  http://am-1.org/~ivan/      … 3013 B6A0 230E 334A



More information about the Buildd-tools-devel mailing list