Your message dated Mon, 21 Jan 2008 02:02:05 +0000
with message-id <[EMAIL PROTECTED]>
and subject line Bug#427047: fixed in schroot 1.1.6-1
has caused the attached Bug report to be marked as done.
This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.
(NB: If you are a system administrator and have no idea what I am
talking about this indicates a serious mail system misconfiguration
somewhere. Please contact me immediately.)
Debian bug tracking system administrator
(administrator, Debian Bugs database)
--- Begin Message ---
Package: schroot
Version: 1.0.2-1
Severity: wishlist
Tags: patch
When using schroot, I have a need to bind additional mount points into
the chroot (for example, I use /scratch for builds, since my /home mount
is on NFS). Hopefully my solution for this is appropriate.
The attached patch adds the schroot.conf key "mount-extra", which the
setup/10mount script uses as a colon-separates list of additional bind
mounts.
--
Kees Cook @outflux.net
--- schroot-1.0.2.orig/test/sbuild-chroot.cc
+++ schroot-1.0.2/test/sbuild-chroot.cc
@@ -73,6 +73,7 @@
CPPUNIT_TEST(test_name);
CPPUNIT_TEST(test_description);
CPPUNIT_TEST(test_mount_device);
+ CPPUNIT_TEST(test_mount_extra);
CPPUNIT_TEST(test_mount_location);
CPPUNIT_TEST(test_priority);
CPPUNIT_TEST(test_groups);
@@ -119,6 +120,13 @@
"/dev/device-to-mount/example");
}
+ void test_mount_extra()
+ {
+ chroot->set_mount_extra("/scratch:/testing:/var/lib/example");
+ CPPUNIT_ASSERT(chroot->get_mount_extra() ==
+ "/scratch:/testing:/var/lib/example");
+ }
+
void test_priority()
{
chroot->set_priority(6);
--- schroot-1.0.2.orig/sbuild/sbuild-chroot.cc
+++ schroot-1.0.2/sbuild/sbuild-chroot.cc
@@ -97,6 +97,7 @@
mount_location(),
location(),
mount_device(),
+ mount_extra(),
active(false),
original(true),
run_setup_scripts(false),
@@ -213,6 +214,18 @@
this->mount_device = device;
}
+std::string const&
+sbuild::chroot::get_mount_extra () const
+{
+ return this->mount_extra;
+}
+
+void
+sbuild::chroot::set_mount_extra (std::string const& mounts)
+{
+ this->mount_extra = mounts;
+}
+
unsigned int
sbuild::chroot::get_priority () const
{
@@ -367,6 +380,7 @@
env.add("CHROOT_MOUNT_LOCATION", get_mount_location());
env.add("CHROOT_PATH", get_path());
env.add("CHROOT_MOUNT_DEVICE", get_mount_device());
+ env.add("CHROOT_MOUNT_EXTRA", get_mount_extra());
}
void
@@ -469,6 +483,9 @@
if (!get_mount_device().empty())
// TRANSLATORS: The system device node to mount containing the chroot
detail.add(_("Mount Device"), get_mount_device());
+ if (!get_mount_extra().empty())
+ // TRANSLATORS: The extra system mount points to duplicate inside the
chroot
+ detail.add(_("Extra Mounts"), get_mount_extra());
}
void
@@ -528,6 +545,9 @@
keyfile::set_object_value(*this, &chroot::get_mount_device,
keyfile, get_name(), "mount-device");
+ keyfile::set_object_value(*this, &chroot::get_mount_extra,
+ keyfile, get_name(), "mount-extra");
+
keyfile::set_object_list_value(*this, &chroot::get_command_prefix,
keyfile, get_name(), "command-prefix");
@@ -595,6 +615,10 @@
keyfile::PRIORITY_OPTIONAL :
keyfile::PRIORITY_DISALLOWED);
+ keyfile::get_object_value(*this, &chroot::set_mount_extra,
+ keyfile, get_name(), "mount-extra",
+ keyfile::PRIORITY_OPTIONAL);
+
keyfile::get_object_list_value(*this, &chroot::set_command_prefix,
keyfile, get_name(), "command-prefix",
keyfile::PRIORITY_OPTIONAL);
--- schroot-1.0.2.orig/sbuild/sbuild-chroot.h
+++ schroot-1.0.2/sbuild/sbuild-chroot.h
@@ -211,6 +211,22 @@
set_mount_device (std::string const& device);
/**
+ * Get the desired extra mount locations within the chroot.
+ *
+ * @returns the mount list, colon separated.
+ */
+ virtual std::string const&
+ get_mount_extra () const;
+
+ /**
+ * Set the desired extra mount locations within the chroot.
+ *
+ * @param mounts the mount list, colon separated.
+ */
+ void
+ set_mount_extra (std::string const& mounts);
+
+ /**
* Get the priority of the chroot. This is a number indicating
* whether than a ditribution is older than another.
*
@@ -611,6 +627,8 @@
std::string location;
/// Block device to mount (if any).
std::string mount_device;
+ /// Extra mounts within the chroot (if any).
+ std::string mount_extra;
/// Chroot activity status.
bool active;
/// Was the chroot automatically generated?
--- schroot-1.0.2.orig/schroot/setup/10mount
+++ schroot-1.0.2/schroot/setup/10mount
@@ -81,6 +108,14 @@
do_mount "-t tmpfs" "tmpfs" "${CHROOT_PATH}/dev/shm"
do_mount "-o rw,bind" "/home" "${CHROOT_PATH}/home"
do_mount "-o rw,bind" "/tmp" "${CHROOT_PATH}/tmp"
+
+ # Mount user-supplied mount points
+ if [ -n "$CHROOT_MOUNT_EXTRA" ]; then
+ echo "$CHROOT_MOUNT_EXTRA" | sed -e 's/:/\n/g' |
+ while read mnt; do
+ do_mount "-o rw,bind" "$mnt" "${CHROOT_PATH}$mnt"
+ done
+ fi
fi
elif [ $1 = "setup-stop" ]; then
--- schroot-1.0.2.orig/schroot/schroot.conf.5.in
+++ schroot-1.0.2/schroot/schroot.conf.5.in
@@ -121,6 +121,10 @@
\[oq]linux32\[cq] is the option required. The only valid option for non-Linux
systems is \[oq]undefined\[cq]. The default value for non-Linux systems is
\[oq]undefined\[cq].
+.TP
+\f[CBI]mount\-extra=\fP\f[CI]mount1:mount2:...\fP
+A colon-separated list of additional mount points to bind between the host
+and the chroot, in additional to the default /proc, /home, /tmp, etc.
.SS
Plain and directory chroots
.PP
--- End Message ---
--- Begin Message ---
Source: schroot
Source-Version: 1.1.6-1
We believe that the bug you reported is fixed in the latest version of
schroot, which is due to be installed in the Debian FTP archive:
dchroot-dsa_1.1.6-1_powerpc.deb
to pool/main/s/schroot/dchroot-dsa_1.1.6-1_powerpc.deb
dchroot_1.1.6-1_powerpc.deb
to pool/main/s/schroot/dchroot_1.1.6-1_powerpc.deb
libsbuild-dev_1.1.6-1_powerpc.deb
to pool/main/s/schroot/libsbuild-dev_1.1.6-1_powerpc.deb
libsbuild-doc_1.1.6-1_all.deb
to pool/main/s/schroot/libsbuild-doc_1.1.6-1_all.deb
schroot-common_1.1.6-1_all.deb
to pool/main/s/schroot/schroot-common_1.1.6-1_all.deb
schroot_1.1.6-1.diff.gz
to pool/main/s/schroot/schroot_1.1.6-1.diff.gz
schroot_1.1.6-1.dsc
to pool/main/s/schroot/schroot_1.1.6-1.dsc
schroot_1.1.6-1_powerpc.deb
to pool/main/s/schroot/schroot_1.1.6-1_powerpc.deb
schroot_1.1.6.orig.tar.gz
to pool/main/s/schroot/schroot_1.1.6.orig.tar.gz
A summary of the changes between this version and the previous one is
attached.
Thank you for reporting the bug, which will now be closed. If you
have further comments please address them to [EMAIL PROTECTED],
and the maintainer will reopen the bug report if appropriate.
Debian distribution maintenance software
pp.
Roger Leigh <[EMAIL PROTECTED]> (supplier of updated schroot package)
(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [EMAIL PROTECTED])
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Format: 1.7
Date: Sun, 20 Jan 2008 22:51:04 +0000
Source: schroot
Binary: schroot-common libsbuild-dev dchroot-dsa dchroot libsbuild-doc schroot
Architecture: source all powerpc
Version: 1.1.6-1
Distribution: unstable
Urgency: low
Maintainer: Debian buildd-tools Developers <[EMAIL PROTECTED]>
Changed-By: Roger Leigh <[EMAIL PROTECTED]>
Description:
dchroot - Execute commands in a chroot environment
dchroot-dsa - Execute commands in a chroot environment
libsbuild-dev - development files for the Debian source builder
libsbuild-doc - development documentation for the Debian source builder
schroot - Execute commands in a chroot environment
schroot-common - common files for schroot
Closes: 395062 427047 428808 439215 452263 459658 461531
Changes:
schroot (1.1.6-1) unstable; urgency=low
.
* New upstream development release.
* Acknowledge NMU. Thanks to Lucas Nussbaum for fixing the Boost
library names following another incompatible change in Boost
(Closes: #439215).
* debian/control: Suggest lvm2 instead of lvm-common (Closes: #452263).
* debian/copyright:
- Update with new GIT source code repository location.
- Update licence to GPLv3.
* debian/schroot.init: Update licence to GPLv3.
* bin/schroot/setup/20network, bin/schroot/setup/30passwd: For files to
copy, compare file device, inode and contents to avoid copying
identical files (Closes: #428808).
* If unknown keys are present in the configuration file, print a warning
message to alert the user (Closes: #459658).
* The filesystems to mount in the chroot may be customised by the system
administrator through the use of an fstab file on a per-chroot basis,
and a new helper utility, schroot-mount (Closes: #395062, #427047).
Thanks for your patience while we took the time to implement this the
right way.
* Update Vietnamese translation (Closes: #461531). Thanks to Clytie
Siddall.
* debian/schroot.preinst: Add rm_conffile function to remove
/etc/schroot/setup.d/20network and /etc/schroot/setup.d/30passwd for
versions prior to this. These are replaced by
/etc/schroot/setup.d/20copyfiles.
* debian/schroot.NEWS: Document conffile changes.
Files:
1e3c5e97bd9c8f711619b4805a4d6db3 1060 admin optional schroot_1.1.6-1.dsc
8cccdc70578551e4834a085fedd3f668 6751813 admin optional
schroot_1.1.6.orig.tar.gz
69ffffebd33a8c8e9178dc40cefad48b 20 admin optional schroot_1.1.6-1.diff.gz
5a539adcdc35042f8b06e070286b06d3 97504 admin optional
schroot-common_1.1.6-1_all.deb
38226c3b10d518390cb81c94009dab7f 3076468 doc optional
libsbuild-doc_1.1.6-1_all.deb
aefdb98e3b9c5a2e0a64e6fcffe34ed3 1233614 devel optional
libsbuild-dev_1.1.6-1_powerpc.deb
e4ee84549e00899e9b8ecaa1d3c24b36 685048 admin optional
schroot_1.1.6-1_powerpc.deb
495394c0991c216408893f076279b92d 312046 admin optional
dchroot_1.1.6-1_powerpc.deb
f2caeefb210cbd6c5d0c21a86454f853 311402 admin optional
dchroot-dsa_1.1.6-1_powerpc.deb
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
iD8DBQFHk/pZVcFcaSW/uEgRAmn7AJ4gUQnhhAnh3jLRs6A1HDiIQEFnrgCfS2CV
yptvKC+tgtumI1htQ3AYo58=
=VlpL
-----END PGP SIGNATURE-----
--- End Message ---