summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoger Leigh <rleigh@debian.org>2006-02-24 20:26:07 +0000
committerRoger Leigh <rleigh@debian.org>2006-02-24 20:26:07 +0000
commit8ed945159a20d66e9aa8ee55918a16fe35664cbf (patch)
treed93b62f737c37762db16044bacd9c5662e7561fd
parent4595bf4794897fe7003db8600efddd34159a9d66 (diff)
downloadschroot-8ed945159a20d66e9aa8ee55918a16fe35664cbf.tar.gz
* schroot/schroot.conf.5.in: Document "location" for block-device
chroots. * schroot/schroot-setup.5.in: Document CHROOT_LOCATION and CHROOT_PATH. * Update tests to check CHROOT_LOCATION and CHROOT_PATH. * schroot/setup/50chrootname: Replace CHROOT_MOUNT_LOCATION with CHROOT_PATH. * schroot/setup/30passwd: Replace CHROOT_MOUNT_LOCATION with CHROOT_PATH. * schroot/setup/20network: Replace CHROOT_MOUNT_LOCATION with CHROOT_PATH. * schroot/setup/10mount: Replace CHROOT_MOUNT_LOCATION with CHROOT_PATH. * schroot/setup/00check: Add CHROOT_LOCATION and CHROOT_PATH. Replace CHROOT_MOUNT_LOCATION with CHROOT_PATH. * schroot/run/50sbuild: Replace CHROOT_MOUNT_LOCATION with CHROOT_PATH. * schroot/run/00check: Add CHROOT_LOCATION and CHROOT_PATH. * schroot/sbuild-chroot-config.cc (print_chroot_location): Use get_path() instead of get_mount_location(). * schroot/sbuild-session.cc (run_child): Use get_path() instead of get_mount_location(). * schroot/sbuild-chroot-plain.cc (get_location): Chain up to base class implementation. (set_location): Chain up to base class implementation. (print_details): Remove printing of location detail. * schroot/sbuild-chroot-plain.h (get_location): Make virtual. (set_location): Make virtual. (get_mount_location): Remove virtual function. (location): Remove member. * schroot/sbuild-chroot-block-device.cc (get_location): New method. Get the location of a chroot on the device filesystem. (set_location): New method. Set the location of a chroot on the device filesystem. (get_keyfile): Set location in keyfile. (set_keyfile): Get optional location from keyfile. * schroot/sbuild-chroot.cc (get_location): New virtual method. (set_location): New virtual method. (get_path): New virtual method. The default implementation concatenates and returns the mount_location and the location. (setup_env): Add CHROOT_LOCATION and CHROOT_PATH to the environment. (print_details): print Location and Path. * schroot/sbuild-chroot.h: (location): New member.
-rw-r--r--ChangeLog68
-rw-r--r--debian/changelog3
-rw-r--r--po/en_GB.po117
-rw-r--r--po/sv.po114
-rw-r--r--po/vi.po114
-rwxr-xr-xschroot/run/00check4
-rwxr-xr-xschroot/run/50sbuild14
-rw-r--r--schroot/sbuild-chroot-block-device.cc20
-rw-r--r--schroot/sbuild-chroot-block-device.h18
-rw-r--r--schroot/sbuild-chroot-config.cc2
-rw-r--r--schroot/sbuild-chroot-plain.cc15
-rw-r--r--schroot/sbuild-chroot-plain.h11
-rw-r--r--schroot/sbuild-chroot.cc27
-rw-r--r--schroot/sbuild-chroot.h35
-rw-r--r--schroot/sbuild-session.cc10
-rw-r--r--schroot/schroot-setup.5.in13
-rw-r--r--schroot/schroot.conf.5.in7
-rwxr-xr-xschroot/setup/00check12
-rwxr-xr-xschroot/setup/10mount20
-rwxr-xr-xschroot/setup/20network2
-rwxr-xr-xschroot/setup/30passwd6
-rwxr-xr-xschroot/setup/50chrootname2
-rw-r--r--test/sbuild-chroot-block-device.cc1
-rw-r--r--test/sbuild-chroot-file.cc1
-rw-r--r--test/sbuild-chroot-lvm-snapshot.cc1
-rw-r--r--test/sbuild-chroot-plain.cc8
-rw-r--r--test/sbuild-chroot.cc1
27 files changed, 420 insertions, 226 deletions
diff --git a/ChangeLog b/ChangeLog
index 92cf5661..d6f22d1c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,73 @@
2006-02-24 Roger Leigh <rleigh@debian.org>
+ * schroot/schroot.conf.5.in: Document "location" for block-device
+ chroots.
+
+ * schroot/schroot-setup.5.in: Document CHROOT_LOCATION and
+ CHROOT_PATH.
+
+ * Update tests to check CHROOT_LOCATION and CHROOT_PATH.
+
+ * schroot/setup/50chrootname: Replace CHROOT_MOUNT_LOCATION with
+ CHROOT_PATH.
+
+ * schroot/setup/30passwd: Replace CHROOT_MOUNT_LOCATION with
+ CHROOT_PATH.
+
+ * schroot/setup/20network: Replace CHROOT_MOUNT_LOCATION with
+ CHROOT_PATH.
+
+ * schroot/setup/10mount: Replace CHROOT_MOUNT_LOCATION with
+ CHROOT_PATH.
+
+ * schroot/setup/00check: Add CHROOT_LOCATION and CHROOT_PATH.
+ Replace CHROOT_MOUNT_LOCATION with CHROOT_PATH.
+
+ * schroot/run/50sbuild: Replace CHROOT_MOUNT_LOCATION with
+ CHROOT_PATH.
+
+ * schroot/run/00check: Add CHROOT_LOCATION and CHROOT_PATH.
+
+ * schroot/sbuild-chroot-config.cc
+ (print_chroot_location): Use get_path() instead of
+ get_mount_location().
+
+ * schroot/sbuild-session.cc
+ (run_child): Use get_path() instead of get_mount_location().
+
+ * schroot/sbuild-chroot-plain.cc
+ (get_location): Chain up to base class implementation.
+ (set_location): Chain up to base class implementation.
+ (print_details): Remove printing of location detail.
+
+ * schroot/sbuild-chroot-plain.h
+ (get_location): Make virtual.
+ (set_location): Make virtual.
+ (get_mount_location): Remove virtual function.
+ (location): Remove member.
+
+ * schroot/sbuild-chroot-block-device.cc
+ (get_location): New method. Get the location of a chroot on the
+ device filesystem.
+ (set_location): New method. Set the location of a chroot on the
+ device filesystem.
+ (get_keyfile): Set location in keyfile.
+ (set_keyfile): Get optional location from keyfile.
+
+ * schroot/sbuild-chroot.cc
+ (get_location): New virtual method.
+ (set_location): New virtual method.
+ (get_path): New virtual method. The default implementation
+ concatenates and returns the mount_location and the location.
+ (setup_env): Add CHROOT_LOCATION and CHROOT_PATH to the
+ environment.
+ (print_details): print Location and Path.
+
+ * schroot/sbuild-chroot.h:
+ (location): New member.
+
+2006-02-24 Roger Leigh <rleigh@debian.org>
+
* po/en_GB.po: Add missing space.
2006-02-24 Roger Leigh <rleigh@debian.org>
diff --git a/debian/changelog b/debian/changelog
index 9d76ecb9..61d0e846 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,6 +1,9 @@
schroot (0.2.4-1) UNRELEASED; urgency=low
* New upstream release.
+ * Allow multiple chroots on a single filesystem for "block-device" and
+ "lvm-snapshot" chroots. Thanks to Adeodato Simó and Steve Langasek
+ for this idea (Closes: #354237).
--
diff --git a/po/en_GB.po b/po/en_GB.po
index 7783c36e..9e5bd98b 100644
--- a/po/en_GB.po
+++ b/po/en_GB.po
@@ -6,8 +6,8 @@ msgid ""
msgstr ""
"Project-Id-Version: schroot 0.1.2\n"
"Report-Msgid-Bugs-To: Roger Leigh <rleigh@debian.org>\n"
-"POT-Creation-Date: 2006-02-21 10:15+0000\n"
-"PO-Revision-Date: 2006-02-24 12:47+0000\n"
+"POT-Creation-Date: 2006-02-24 14:54+0000\n"
+"PO-Revision-Date: 2006-02-24 14:56+0000\n"
"Last-Translator: Roger Leigh <rleigh@debian.org>\n"
"Language-Team: English <rleigh@debian.org>\n"
"MIME-Version: 1.0\n"
@@ -54,7 +54,7 @@ msgstr "PAM error: PAM is already initialised"
#: schroot/sbuild-auth.cc:530 schroot/sbuild-auth.cc:555
#: schroot/sbuild-auth.cc:574 schroot/sbuild-auth.cc:593
#: schroot/sbuild-auth.cc:612 schroot/sbuild-auth.cc:631
-#: schroot/sbuild-session.cc:601
+#: schroot/sbuild-session.cc:603
#, boost-format
msgid "PAM error: %1%"
msgstr "PAM error: %1%"
@@ -102,34 +102,34 @@ msgstr "This failure will be reported."
msgid "access not authorised"
msgstr "access not authorised"
-#: schroot/sbuild-chroot-block-device.cc:117
+#: schroot/sbuild-chroot-block-device.cc:129
#: schroot/sbuild-chroot-lvm-snapshot.cc:129
#, boost-format
msgid "%1% chroot: failed to stat device %2%: %3%"
msgstr "%1% chroot: failed to stat device %2%: %3%"
-#: schroot/sbuild-chroot-block-device.cc:123
+#: schroot/sbuild-chroot-block-device.cc:135
#, boost-format
msgid "%1% chroot: %2% is not a block device"
msgstr "%1% chroot: %2% is not a block device"
-#: schroot/sbuild-chroot-block-device.cc:138
+#: schroot/sbuild-chroot-block-device.cc:150
#: schroot/sbuild-chroot-lvm-snapshot.cc:155
#, boost-format
msgid "%1%: failed to lock device: %2%"
msgstr "%1%: failed to lock device: %2%"
-#: schroot/sbuild-chroot-block-device.cc:151
+#: schroot/sbuild-chroot-block-device.cc:163
#: schroot/sbuild-chroot-lvm-snapshot.cc:168
#, boost-format
msgid "%1%: failed to unlock device: %2%"
msgstr "%1%: failed to unlock device: %2%"
-#: schroot/sbuild-chroot-block-device.cc:171
+#: schroot/sbuild-chroot-block-device.cc:183
msgid "Device"
msgstr "Device"
-#: schroot/sbuild-chroot-block-device.cc:173
+#: schroot/sbuild-chroot-block-device.cc:185
msgid "Mount Options"
msgstr "Mount Options"
@@ -241,101 +241,104 @@ msgstr "LVM Snapshot Device"
msgid "LVM Snapshot Options"
msgstr "LVM Snapshot Options"
-#: schroot/sbuild-chroot-plain.cc:101
-msgid "Location"
-msgstr "Location"
-
-#: schroot/sbuild-chroot.cc:66
+#: schroot/sbuild-chroot.cc:67
#, boost-format
msgid "unknown chroot type \"%1%\""
msgstr "unknown chroot type “%1%”"
-#: schroot/sbuild-chroot.cc:72
+#: schroot/sbuild-chroot.cc:73
msgid "chroot creation failed"
msgstr "chroot creation failed"
-#: schroot/sbuild-chroot.cc:230
+#: schroot/sbuild-chroot.cc:251
#, boost-format
msgid "%1%: failed to create session file: %2%\n"
msgstr "%1%: failed to create session file: %2%\n"
-#: schroot/sbuild-chroot.cc:248
+#: schroot/sbuild-chroot.cc:269
#, boost-format
msgid "%1%: lock acquisition failure: %2%\n"
msgstr "%1%: lock acquisition failure: %2%\n"
-#: schroot/sbuild-chroot.cc:263
+#: schroot/sbuild-chroot.cc:284
#, boost-format
msgid "%1%: lock discard failure: %2%\n"
msgstr "%1%: lock discard failure: %2%\n"
-#: schroot/sbuild-chroot.cc:272
+#: schroot/sbuild-chroot.cc:293
#, boost-format
msgid "%1%: failed to unlink session file: %2%\n"
msgstr "%1%: failed to unlink session file: %2%\n"
-#: schroot/sbuild-chroot.cc:283
+#: schroot/sbuild-chroot.cc:304
msgid " --- Session ---\n"
msgstr " ——— Session ———\n"
-#: schroot/sbuild-chroot.cc:285
+#: schroot/sbuild-chroot.cc:306
msgid " --- Chroot ---\n"
msgstr " ——— Chroot ———\n"
-#: schroot/sbuild-chroot.cc:286
+#: schroot/sbuild-chroot.cc:307
msgid "Name"
msgstr "Name"
-#: schroot/sbuild-chroot.cc:287
+#: schroot/sbuild-chroot.cc:308
msgid "Description"
msgstr "Description"
-#: schroot/sbuild-chroot.cc:288
+#: schroot/sbuild-chroot.cc:309
msgid "Type"
msgstr "Type"
-#: schroot/sbuild-chroot.cc:289
+#: schroot/sbuild-chroot.cc:310
msgid "Priority"
msgstr "Priority"
-#: schroot/sbuild-chroot.cc:290
+#: schroot/sbuild-chroot.cc:311
msgid "Groups"
msgstr "Groups"
-#: schroot/sbuild-chroot.cc:291
+#: schroot/sbuild-chroot.cc:312
msgid "Root Groups"
msgstr "Root Groups"
-#: schroot/sbuild-chroot.cc:292
+#: schroot/sbuild-chroot.cc:313
msgid "Aliases"
msgstr "Aliases"
-#: schroot/sbuild-chroot.cc:293
+#: schroot/sbuild-chroot.cc:314
msgid "Run Setup Scripts"
msgstr "Run Setup Scripts"
-#: schroot/sbuild-chroot.cc:294
+#: schroot/sbuild-chroot.cc:315
msgid "Run Session Scripts"
msgstr "Run Session Scripts"
-#: schroot/sbuild-chroot.cc:296
-#, fuzzy
+#: schroot/sbuild-chroot.cc:317
msgid "Session Managed"
msgstr "Session Managed"
-#: schroot/sbuild-chroot.cc:302
+#: schroot/sbuild-chroot.cc:323
+msgid "Location"
+msgstr "Location"
+
+#: schroot/sbuild-chroot.cc:326
msgid "Mount Location"
msgstr "Mount Location"
-#: schroot/sbuild-chroot.cc:305
+#: schroot/sbuild-chroot.cc:329
+msgid "Path"
+msgstr "Path"
+
+#: schroot/sbuild-chroot.cc:332
msgid "Mount Device"
msgstr "Mount Device"
-#: schroot/sbuild-chroot.h:428
+#: schroot/sbuild-chroot.h:461
msgid "true"
msgstr "true"
-#: schroot/sbuild-chroot.h:430
+#: schroot/sbuild-chroot.h:463
msgid "false"
msgstr "false"
@@ -469,103 +472,103 @@ msgstr "No chroot found matching alias ‘%1%’"
msgid "%1%: Failed to find chroot"
msgstr "%1%: Failed to find chroot"
-#: schroot/sbuild-session.cc:448
+#: schroot/sbuild-session.cc:450
#, boost-format
msgid "Chroot setup failed to lock chroot: %1%"
msgstr "Chroot setup failed to lock chroot: %1%"
-#: schroot/sbuild-session.cc:504
+#: schroot/sbuild-session.cc:506
#, boost-format
msgid "Invalid verbosity level: %1%, falling back to \"normal\""
msgstr "Invalid verbosity level: %1%, falling back to “normal”"
-#: schroot/sbuild-session.cc:523 schroot/sbuild-session.cc:816
+#: schroot/sbuild-session.cc:525 schroot/sbuild-session.cc:818
#, boost-format
msgid "Failed to fork child: %1%"
msgstr "Failed to fork child: %1%"
-#: schroot/sbuild-session.cc:541 schroot/sbuild-session.cc:752
+#: schroot/sbuild-session.cc:543 schroot/sbuild-session.cc:754
#, boost-format
msgid "Could not exec \"%1%\": %2%"
msgstr "Could not exec “%1%”: %2%"
-#: schroot/sbuild-session.cc:559
+#: schroot/sbuild-session.cc:561
#, boost-format
msgid "Chroot setup failed to unlock chroot: %1%"
msgstr "Chroot setup failed to unlock chroot: %1%"
-#: schroot/sbuild-session.cc:566
+#: schroot/sbuild-session.cc:568
#, boost-format
msgid "Chroot setup failed during chroot \"%1%\" stage"
msgstr "Chroot setup failed during chroot “%1%” stage"
-#: schroot/sbuild-session.cc:609
+#: schroot/sbuild-session.cc:611
#, boost-format
msgid "Could not set gid to '%1%'"
msgstr "Could not set gid to ‘%1%’"
-#: schroot/sbuild-session.cc:615
+#: schroot/sbuild-session.cc:617
msgid "Could not set supplementary group IDs"
msgstr "Could not set supplementary group IDs"
-#: schroot/sbuild-session.cc:622 schroot/sbuild-session.cc:652
+#: schroot/sbuild-session.cc:624 schroot/sbuild-session.cc:654
#, boost-format
msgid "Could not chdir to '%1%': %2%"
msgstr "Could not chdir to ‘%1%’: %2%"
-#: schroot/sbuild-session.cc:629
+#: schroot/sbuild-session.cc:631
#, boost-format
msgid "Could not chroot to '%1%': %2%"
msgstr "Could not chroot to ‘%1%’: %2%"
-#: schroot/sbuild-session.cc:638
+#: schroot/sbuild-session.cc:640
#, boost-format
msgid "Could not set uid to '%1%'"
msgstr "Could not set uid to ‘%1%’"
-#: schroot/sbuild-session.cc:644
+#: schroot/sbuild-session.cc:646
msgid "Failed to drop root permissions."
msgstr "Failed to drop root permissions."
-#: schroot/sbuild-session.cc:705
+#: schroot/sbuild-session.cc:707
#, boost-format
msgid "[%1% chroot] Running login shell: \"%2%\""
msgstr "[%1% chroot] Running login shell: “%2%”"
-#: schroot/sbuild-session.cc:712
+#: schroot/sbuild-session.cc:714
#, boost-format
msgid "[%1% chroot] (%2%->%3%) Running login shell: \"%4%\""
msgstr "[%1% chroot] (%2%→%3%) Running login shell: “%4%”"
-#: schroot/sbuild-session.cc:734
+#: schroot/sbuild-session.cc:736
#, boost-format
msgid "[%1% chroot] Running command: \"%2%\""
msgstr "[%1% chroot] Running command: “%2%”"
-#: schroot/sbuild-session.cc:738
+#: schroot/sbuild-session.cc:740
#, boost-format
msgid "[%1% chroot] (%2%->%3%) Running command: \"%4%\""
msgstr "[%1% chroot] (%2%→%3%) Running command: “%4%”"
-#: schroot/sbuild-session.cc:770
+#: schroot/sbuild-session.cc:772
#, boost-format
msgid "wait for child failed: %1%"
msgstr "wait for child failed: %1%"
-#: schroot/sbuild-session.cc:788
+#: schroot/sbuild-session.cc:790
#, boost-format
msgid "Child terminated by signal %1%"
msgstr "Child terminated by signal ‘%1%’"
-#: schroot/sbuild-session.cc:793
+#: schroot/sbuild-session.cc:795
msgid "Child dumped core"
msgstr "Child dumped core"
-#: schroot/sbuild-session.cc:795
+#: schroot/sbuild-session.cc:797
msgid "Child exited abnormally (reason unknown; not a signal or core dump)"
msgstr "Child exited abnormally (reason unknown; not a signal or core dump)"
-#: schroot/sbuild-session.cc:802
+#: schroot/sbuild-session.cc:804
#, boost-format
msgid "Child exited abnormally with status '%1%'"
msgstr "Child exited abnormally with status ‘%1%’"
diff --git a/po/sv.po b/po/sv.po
index 43b3a182..38cb8764 100644
--- a/po/sv.po
+++ b/po/sv.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: schroot 0.2.0\n"
"Report-Msgid-Bugs-To: Roger Leigh <rleigh@debian.org>\n"
-"POT-Creation-Date: 2006-02-21 10:15+0000\n"
+"POT-Creation-Date: 2006-02-24 14:54+0000\n"
"PO-Revision-Date: 2006-02-18 11:52+0100\n"
"Last-Translator: Daniel Nylander <po@danielnylander.se>\n"
"Language-Team: Swedish <tp-sv@listor.tp-sv.se>\n"
@@ -55,7 +55,7 @@ msgstr "PAM-fel: PAM är redan initierad"
#: schroot/sbuild-auth.cc:530 schroot/sbuild-auth.cc:555
#: schroot/sbuild-auth.cc:574 schroot/sbuild-auth.cc:593
#: schroot/sbuild-auth.cc:612 schroot/sbuild-auth.cc:631
-#: schroot/sbuild-session.cc:601
+#: schroot/sbuild-session.cc:603
#, boost-format
msgid "PAM error: %1%"
msgstr "PAM-fel: %1%"
@@ -104,34 +104,34 @@ msgstr "Det här felet kommer att rapporteras."
msgid "access not authorised"
msgstr "tillgång inte auktoriserad"
-#: schroot/sbuild-chroot-block-device.cc:117
+#: schroot/sbuild-chroot-block-device.cc:129
#: schroot/sbuild-chroot-lvm-snapshot.cc:129
#, boost-format
msgid "%1% chroot: failed to stat device %2%: %3%"
msgstr "%1% chroot: misslyckades att läsa status på enhet %2%: %3%"
-#: schroot/sbuild-chroot-block-device.cc:123
+#: schroot/sbuild-chroot-block-device.cc:135
#, boost-format
msgid "%1% chroot: %2% is not a block device"
msgstr "%1% chroot: %2% är inte en blockenhet"
-#: schroot/sbuild-chroot-block-device.cc:138
+#: schroot/sbuild-chroot-block-device.cc:150
#: schroot/sbuild-chroot-lvm-snapshot.cc:155
#, boost-format
msgid "%1%: failed to lock device: %2%"
msgstr "%1%: misslyckades att låsa enhet: %2%"
-#: schroot/sbuild-chroot-block-device.cc:151
+#: schroot/sbuild-chroot-block-device.cc:163
#: schroot/sbuild-chroot-lvm-snapshot.cc:168
#, boost-format
msgid "%1%: failed to unlock device: %2%"
msgstr "%1%: misslyckades att låsa upp enhet: %2%"
-#: schroot/sbuild-chroot-block-device.cc:171
+#: schroot/sbuild-chroot-block-device.cc:183
msgid "Device"
msgstr "Enhet"
-#: schroot/sbuild-chroot-block-device.cc:173
+#: schroot/sbuild-chroot-block-device.cc:185
msgid "Mount Options"
msgstr "Monteringsflaggor"
@@ -246,101 +246,105 @@ msgstr "Enhet för LVM-snapshot"
msgid "LVM Snapshot Options"
msgstr "Flaggor för LVM-snapshot"
-#: schroot/sbuild-chroot-plain.cc:101
-msgid "Location"
-msgstr "Plats"
-
-#: schroot/sbuild-chroot.cc:66
+#: schroot/sbuild-chroot.cc:67
#, boost-format
msgid "unknown chroot type \"%1%\""
msgstr "okänd chroot-typ \"%1%\""
-#: schroot/sbuild-chroot.cc:72
+#: schroot/sbuild-chroot.cc:73
msgid "chroot creation failed"
msgstr "skapandet av chroot misslyckades"
-#: schroot/sbuild-chroot.cc:230
+#: schroot/sbuild-chroot.cc:251
#, boost-format
msgid "%1%: failed to create session file: %2%\n"
msgstr "%1%: misslyckades att skapa sessionsfil: %2%\n"
-#: schroot/sbuild-chroot.cc:248
+#: schroot/sbuild-chroot.cc:269
#, boost-format
msgid "%1%: lock acquisition failure: %2%\n"
msgstr "%1%: fel vid övertagande av lås: %2%\n"
-#: schroot/sbuild-chroot.cc:263
+#: schroot/sbuild-chroot.cc:284
#, boost-format
msgid "%1%: lock discard failure: %2%\n"
msgstr "%1%: fel vid kassering av lås: %2%\n"
-#: schroot/sbuild-chroot.cc:272
+#: schroot/sbuild-chroot.cc:293
#, boost-format
msgid "%1%: failed to unlink session file: %2%\n"
msgstr "%1%: misslyckades att avlänka sessionsfil: %2%\n"
-#: schroot/sbuild-chroot.cc:283
+#: schroot/sbuild-chroot.cc:304
msgid " --- Session ---\n"
msgstr " --- Session ---\n"
-#: schroot/sbuild-chroot.cc:285
+#: schroot/sbuild-chroot.cc:306
msgid " --- Chroot ---\n"
msgstr " --- Chroot ---\n"
-#: schroot/sbuild-chroot.cc:286
+#: schroot/sbuild-chroot.cc:307
msgid "Name"
msgstr "Namn"
-#: schroot/sbuild-chroot.cc:287
+#: schroot/sbuild-chroot.cc:308
msgid "Description"
msgstr "Beskrivning"
-#: schroot/sbuild-chroot.cc:288
+#: schroot/sbuild-chroot.cc:309
msgid "Type"
msgstr "Typ"
-#: schroot/sbuild-chroot.cc:289
+#: schroot/sbuild-chroot.cc:310
msgid "Priority"
msgstr "Prioritet"
-#: schroot/sbuild-chroot.cc:290
+#: schroot/sbuild-chroot.cc:311
msgid "Groups"
msgstr "Grupper"
-#: schroot/sbuild-chroot.cc:291
+#: schroot/sbuild-chroot.cc:312
msgid "Root Groups"
msgstr "Rotgrupper"
-#: schroot/sbuild-chroot.cc:292
+#: schroot/sbuild-chroot.cc:313
msgid "Aliases"
msgstr "Alias"
-#: schroot/sbuild-chroot.cc:293
+#: schroot/sbuild-chroot.cc:314
msgid "Run Setup Scripts"
msgstr "Kör konfigurationsskript"
-#: schroot/sbuild-chroot.cc:294
+#: schroot/sbuild-chroot.cc:315
msgid "Run Session Scripts"
msgstr "Kör sessionsskript"
-#: schroot/sbuild-chroot.cc:296
+#: schroot/sbuild-chroot.cc:317
#, fuzzy
msgid "Session Managed"
msgstr "Sessionshantering"
-#: schroot/sbuild-chroot.cc:302
+#: schroot/sbuild-chroot.cc:323
+msgid "Location"
+msgstr "Plats"
+
+#: schroot/sbuild-chroot.cc:326
msgid "Mount Location"
msgstr "Montera plats"
-#: schroot/sbuild-chroot.cc:305
+#: schroot/sbuild-chroot.cc:329
+msgid "Path"
+msgstr ""
+
+#: schroot/sbuild-chroot.cc:332
msgid "Mount Device"
msgstr "Montera enhet"
-#: schroot/sbuild-chroot.h:428
+#: schroot/sbuild-chroot.h:461
msgid "true"
msgstr "sant"
-#: schroot/sbuild-chroot.h:430
+#: schroot/sbuild-chroot.h:463
msgid "false"
msgstr "falskt"
@@ -480,106 +484,106 @@ msgstr "Inget chroot hittades som matchar alias \"%1%\""
msgid "%1%: Failed to find chroot"
msgstr "%1%: Misslyckades att hitta chroot"
-#: schroot/sbuild-session.cc:448
+#: schroot/sbuild-session.cc:450
#, boost-format
msgid "Chroot setup failed to lock chroot: %1%"
msgstr "Inställning av chroot misslyckades att låsa chroot: %1%"
-#: schroot/sbuild-session.cc:504
+#: schroot/sbuild-session.cc:506
#, boost-format
msgid "Invalid verbosity level: %1%, falling back to \"normal\""
msgstr "Ogiltig informationsnivå: %1%, faller tillbaka till \"normal\""
-#: schroot/sbuild-session.cc:523 schroot/sbuild-session.cc:816
+#: schroot/sbuild-session.cc:525 schroot/sbuild-session.cc:818
#, boost-format
msgid "Failed to fork child: %1%"
msgstr "Misslyckades att grena process: %1%"
-#: schroot/sbuild-session.cc:541 schroot/sbuild-session.cc:752
+#: schroot/sbuild-session.cc:543 schroot/sbuild-session.cc:754
#, boost-format
msgid "Could not exec \"%1%\": %2%"
msgstr "Kunde inte starta \"%1%\": %2%"
-#: schroot/sbuild-session.cc:559
+#: schroot/sbuild-session.cc:561
#, boost-format
msgid "Chroot setup failed to unlock chroot: %1%"
msgstr "Inställning av chroot misslyckades att låsa upp chroot: %1%"
-#: schroot/sbuild-session.cc:566
+#: schroot/sbuild-session.cc:568
#, boost-format
msgid "Chroot setup failed during chroot \"%1%\" stage"
msgstr "Inställning av chroot misslyckades under steget \"%1%\""
-#: schroot/sbuild-session.cc:609
+#: schroot/sbuild-session.cc:611
#, boost-format
msgid "Could not set gid to '%1%'"
msgstr "Kunde inte sätta gid till \"%1%\""
-#: schroot/sbuild-session.cc:615
+#: schroot/sbuild-session.cc:617
msgid "Could not set supplementary group IDs"
msgstr "Kunde inte sätta id för tilläggsgrupper"
-#: schroot/sbuild-session.cc:622 schroot/sbuild-session.cc:652
+#: schroot/sbuild-session.cc:624 schroot/sbuild-session.cc:654
#, boost-format
msgid "Could not chdir to '%1%': %2%"
msgstr "Kunde inte byta katalog till \"%1%\": %2%"
-#: schroot/sbuild-session.cc:629
+#: schroot/sbuild-session.cc:631
#, boost-format
msgid "Could not chroot to '%1%': %2%"
msgstr "Kunde inte chroot till \"%1%\": %2%"
-#: schroot/sbuild-session.cc:638
+#: schroot/sbuild-session.cc:640
#, boost-format
msgid "Could not set uid to '%1%'"
msgstr "Kunde inte sätta uid till \"%1%"
-#: schroot/sbuild-session.cc:644
+#: schroot/sbuild-session.cc:646
msgid "Failed to drop root permissions."
msgstr "Misslyckades att släppa root-rättigheter."
-#: schroot/sbuild-session.cc:705
+#: schroot/sbuild-session.cc:707
#, boost-format
msgid "[%1% chroot] Running login shell: \"%2%\""
msgstr "[%1% chroot] Kör inloggningsskal: \"%2%\""
-#: schroot/sbuild-session.cc:712
+#: schroot/sbuild-session.cc:714
#, boost-format
msgid "[%1% chroot] (%2%->%3%) Running login shell: \"%4%\""
msgstr "[%1% chroot] (%2%->%3%) Kör inloggningsskal: \"%4%\""
-#: schroot/sbuild-session.cc:734
+#: schroot/sbuild-session.cc:736
#, boost-format
msgid "[%1% chroot] Running command: \"%2%\""
msgstr "[%1% chroot] Kör kommando: \"%2%\""
-#: schroot/sbuild-session.cc:738
+#: schroot/sbuild-session.cc:740
#, boost-format
msgid "[%1% chroot] (%2%->%3%) Running command: \"%4%\""
msgstr "[%1% chroot] (%2%->%3%) Kör kommando: \"%4%\""
-#: schroot/sbuild-session.cc:770
+#: schroot/sbuild-session.cc:772
#, boost-format
msgid "wait for child failed: %1%"
msgstr "väntan på barnprocess misslyckades: %1%"
-#: schroot/sbuild-session.cc:788
+#: schroot/sbuild-session.cc:790
#, boost-format
msgid "Child terminated by signal %1%"
msgstr "Barnprocess terminerades av signal \"%1%\""
-#: schroot/sbuild-session.cc:793
+#: schroot/sbuild-session.cc:795
msgid "Child dumped core"
msgstr "Barnprocess dumpade core"
# coredump? Bättre ord?
-#: schroot/sbuild-session.cc:795
+#: schroot/sbuild-session.cc:797
msgid "Child exited abnormally (reason unknown; not a signal or core dump)"
msgstr ""
"Barnprocess avslutades onormalt (anledning är okänd; inte en signal eller "
"coredump)"
-#: schroot/sbuild-session.cc:802
+#: schroot/sbuild-session.cc:804
#, boost-format
msgid "Child exited abnormally with status '%1%'"
msgstr "Barnprocess avslutades onormalt med status \"%1%\""
diff --git a/po/vi.po b/po/vi.po
index e93226a2..062fa2bc 100644
--- a/po/vi.po
+++ b/po/vi.po
@@ -6,7 +6,7 @@ msgid ""
msgstr ""
"Project-Id-Version: schroot-0.2.0\n"
"Report-Msgid-Bugs-To: Roger Leigh <rleigh@debian.org>\n"
-"POT-Creation-Date: 2006-02-21 10:15+0000\n"
+"POT-Creation-Date: 2006-02-24 14:54+0000\n"
"PO-Revision-Date: 2006-02-07 22:26+1030\n"
"Last-Translator: Clytie Siddall <clytie@riverland.net.au>\n"
"Language-Team: Vietnamese <gnomevi-list@lists.sourceforge.net>\n"
@@ -56,7 +56,7 @@ msgstr "Lỗi PAM: PAM đã được sở khởi"
#: schroot/sbuild-auth.cc:530 schroot/sbuild-auth.cc:555
#: schroot/sbuild-auth.cc:574 schroot/sbuild-auth.cc:593
#: schroot/sbuild-auth.cc:612 schroot/sbuild-auth.cc:631
-#: schroot/sbuild-session.cc:601
+#: schroot/sbuild-session.cc:603
#, boost-format
msgid "PAM error: %1%"
msgstr "Lỗi PAM: %1%"
@@ -104,34 +104,34 @@ msgstr "Sự thất bại này sẽ được thông báo."
msgid "access not authorised"
msgstr "không xác thực truy cập"
-#: schroot/sbuild-chroot-block-device.cc:117
+#: schroot/sbuild-chroot-block-device.cc:129
#: schroot/sbuild-chroot-lvm-snapshot.cc:129
#, boost-format
msgid "%1% chroot: failed to stat device %2%: %3%"
msgstr "%1% chroot: việc lấy các thông tin về thiết bị %2% bị lỗi: %3%"
-#: schroot/sbuild-chroot-block-device.cc:123
+#: schroot/sbuild-chroot-block-device.cc:135
#, boost-format
msgid "%1% chroot: %2% is not a block device"
msgstr "%1% chroot: %2% không phải là thiết bị khối"
-#: schroot/sbuild-chroot-block-device.cc:138
+#: schroot/sbuild-chroot-block-device.cc:150
#: schroot/sbuild-chroot-lvm-snapshot.cc:155
#, boost-format
msgid "%1%: failed to lock device: %2%"
msgstr "%1%: không khoá thiết bị được: %2% "
-#: schroot/sbuild-chroot-block-device.cc:151
+#: schroot/sbuild-chroot-block-device.cc:163
#: schroot/sbuild-chroot-lvm-snapshot.cc:168
#, boost-format
msgid "%1%: failed to unlock device: %2%"
msgstr "%1%: không mở khoá thiết bị được: %2%"
-#: schroot/sbuild-chroot-block-device.cc:171
+#: schroot/sbuild-chroot-block-device.cc:183
msgid "Device"
msgstr "Thiết bị"
-#: schroot/sbuild-chroot-block-device.cc:173
+#: schroot/sbuild-chroot-block-device.cc:185
msgid "Mount Options"
msgstr "Tùy chọn lắp"
@@ -245,101 +245,105 @@ msgstr "Thiết bị hiện trạng Bộ Quản lý Khối tin Hợp lý"
msgid "LVM Snapshot Options"
msgstr "Tùy chọn hiện trạng Bộ Quản lý Khối tin Hợp lý"
-#: schroot/sbuild-chroot-plain.cc:101
-msgid "Location"
-msgstr "Địa điểm"
-
-#: schroot/sbuild-chroot.cc:66
+#: schroot/sbuild-chroot.cc:67
#, boost-format
msgid "unknown chroot type \"%1%\""
msgstr "không biết kiểu chroot « %1% »"
-#: schroot/sbuild-chroot.cc:72
+#: schroot/sbuild-chroot.cc:73
msgid "chroot creation failed"
msgstr "việc tạo chroot bị lỗi"
-#: schroot/sbuild-chroot.cc:230
+#: schroot/sbuild-chroot.cc:251
#, boost-format
msgid "%1%: failed to create session file: %2%\n"
msgstr "%1%: việc tạo tập tin phiên chạy bị lỗi: %2%\n"
-#: schroot/sbuild-chroot.cc:248
+#: schroot/sbuild-chroot.cc:269
#, boost-format
msgid "%1%: lock acquisition failure: %2%\n"
msgstr "%1%: việc lấy khoá bị lỗi: %2%\n"
-#: schroot/sbuild-chroot.cc:263
+#: schroot/sbuild-chroot.cc:284
#, boost-format
msgid "%1%: lock discard failure: %2%\n"
msgstr "%1%: việc vứt bỏ khoá bị lỗi: %2%\n"
-#: schroot/sbuild-chroot.cc:272
+#: schroot/sbuild-chroot.cc:293
#, boost-format
msgid "%1%: failed to unlink session file: %2%\n"
msgstr "%1%: việc bỏ liên kết tập tin phiên chạy bị lỗi: %2%\n"
-#: schroot/sbuild-chroot.cc:283
+#: schroot/sbuild-chroot.cc:304
msgid " --- Session ---\n"
msgstr " ━━━Phiên chạy ━━━\n"
-#: schroot/sbuild-chroot.cc:285
+#: schroot/sbuild-chroot.cc:306
msgid " --- Chroot ---\n"
msgstr " ━━━ Chroot ━━━\n"
-#: schroot/sbuild-chroot.cc:286
+#: schroot/sbuild-chroot.cc:307
msgid "Name"
msgstr "Tên"
-#: schroot/sbuild-chroot.cc:287
+#: schroot/sbuild-chroot.cc:308
msgid "Description"
msgstr "Mô tả"
-#: schroot/sbuild-chroot.cc:288
+#: schroot/sbuild-chroot.cc:309
msgid "Type"
msgstr "Kiểu"
-#: schroot/sbuild-chroot.cc:289
+#: schroot/sbuild-chroot.cc:310
msgid "Priority"
msgstr "Ưu tiên"
-#: schroot/sbuild-chroot.cc:290
+#: schroot/sbuild-chroot.cc:311
msgid "Groups"
msgstr "Nhóm"
-#: schroot/sbuild-chroot.cc:291
+#: schroot/sbuild-chroot.cc:312
msgid "Root Groups"
msgstr "Nhóm chủ"
-#: schroot/sbuild-chroot.cc:292
+#: schroot/sbuild-chroot.cc:313
msgid "Aliases"
msgstr "Biệt hiệu"
-#: schroot/sbuild-chroot.cc:293
+#: schroot/sbuild-chroot.cc:314
msgid "Run Setup Scripts"
msgstr "Chạy các tập lệnh thiết lập"
-#: schroot/sbuild-chroot.cc:294
+#: schroot/sbuild-chroot.cc:315
msgid "Run Session Scripts"
msgstr "Chạy các tập lệnh phiên chạy"
-#: schroot/sbuild-chroot.cc:296
+#: schroot/sbuild-chroot.cc:317
#, fuzzy
msgid "Session Managed"
msgstr "Quản lý phiên chạy"
-#: schroot/sbuild-chroot.cc:302
+#: schroot/sbuild-chroot.cc:323
+msgid "Location"
+msgstr "Địa điểm"
+
+#: schroot/sbuild-chroot.cc:326
msgid "Mount Location"
msgstr "Địa điểm lắp"
-#: schroot/sbuild-chroot.cc:305
+#: schroot/sbuild-chroot.cc:329
+msgid "Path"
+msgstr ""
+
+#: schroot/sbuild-chroot.cc:332
msgid "Mount Device"
msgstr "Thiết bị lắp"
-#: schroot/sbuild-chroot.h:428
+#: schroot/sbuild-chroot.h:461
msgid "true"
msgstr "đúng"
-#: schroot/sbuild-chroot.h:430
+#: schroot/sbuild-chroot.h:463
msgid "false"
msgstr "sai"
@@ -477,105 +481,105 @@ msgstr "Không tìm thấy chroot khớp với biệt hiệu « %1% »"
msgid "%1%: Failed to find chroot"
msgstr "%1%: việc tìm chroot bị lỗi"
-#: schroot/sbuild-session.cc:448
+#: schroot/sbuild-session.cc:450
#, boost-format
msgid "Chroot setup failed to lock chroot: %1%"
msgstr "Thiết lập chroot không khoá chroot được: %1%"
-#: schroot/sbuild-session.cc:504
+#: schroot/sbuild-session.cc:506
#, boost-format
msgid "Invalid verbosity level: %1%, falling back to \"normal\""
msgstr "Cấp chi tiết không hợp lệ: %1%, nên dùng « normal » (chuẩn)"
-#: schroot/sbuild-session.cc:523 schroot/sbuild-session.cc:816
+#: schroot/sbuild-session.cc:525 schroot/sbuild-session.cc:818
#, boost-format
msgid "Failed to fork child: %1%"
msgstr "Việc tạo tiến trình con của điều con bị lỗi: %1%"
-#: schroot/sbuild-session.cc:541 schroot/sbuild-session.cc:752
+#: schroot/sbuild-session.cc:543 schroot/sbuild-session.cc:754
#, boost-format
msgid "Could not exec \"%1%\": %2%"
msgstr "Không thể thực hiện « %1% »: %2%"
-#: schroot/sbuild-session.cc:559
+#: schroot/sbuild-session.cc:561
#, boost-format
msgid "Chroot setup failed to unlock chroot: %1%"
msgstr "Thiết lập chroot không bỏ khoá chroot được: %1%"
-#: schroot/sbuild-session.cc:566
+#: schroot/sbuild-session.cc:568
#, boost-format
msgid "Chroot setup failed during chroot \"%1%\" stage"
msgstr "Thiết lập chroot bị lỗi trong giai đoạn chroot « %1% »"
-#: schroot/sbuild-session.cc:609
+#: schroot/sbuild-session.cc:611
#, boost-format
msgid "Could not set gid to '%1%'"
msgstr "Không thể lập GID thành « %1% »"
-#: schroot/sbuild-session.cc:615
+#: schroot/sbuild-session.cc:617
msgid "Could not set supplementary group IDs"
msgstr "Không thể lập các ID nhóm phụ"
-#: schroot/sbuild-session.cc:622 schroot/sbuild-session.cc:652
+#: schroot/sbuild-session.cc:624 schroot/sbuild-session.cc:654
#, boost-format
msgid "Could not chdir to '%1%': %2%"
msgstr "Không thể chdir (chuyển đổi thư mục) sang « %1% »: %2%"
-#: schroot/sbuild-session.cc:629
+#: schroot/sbuild-session.cc:631
#, boost-format
msgid "Could not chroot to '%1%': %2%"
msgstr "Không thể chroot tới « %1% »: %2%"
-#: schroot/sbuild-session.cc:638
+#: schroot/sbuild-session.cc:640
#, boost-format
msgid "Could not set uid to '%1%'"
msgstr "Không thể lập UID thành « %1% »"
-#: schroot/sbuild-session.cc:644
+#: schroot/sbuild-session.cc:646
msgid "Failed to drop root permissions."
msgstr "Việc bỏ quyền chủ bị lỗi."
-#: schroot/sbuild-session.cc:705
+#: schroot/sbuild-session.cc:707
#, boost-format
msgid "[%1% chroot] Running login shell: \"%2%\""
msgstr "[%1% chroot] Đang chạy hệ vỏ đăng nhập: « %2% »"
-#: schroot/sbuild-session.cc:712
+#: schroot/sbuild-session.cc:714
#, boost-format
msgid "[%1% chroot] (%2%->%3%) Running login shell: \"%4%\""
msgstr "[%1% chroot] (%2%->%3%) Đang chạy hệ vỏ đăng nhập: « %4% »"
-#: schroot/sbuild-session.cc:734
+#: schroot/sbuild-session.cc:736
#, boost-format
msgid "[%1% chroot] Running command: \"%2%\""
msgstr "[%1% chroot] Đang chạy lệnh: « %2% »"
-#: schroot/sbuild-session.cc:738
+#: schroot/sbuild-session.cc:740
#, boost-format
msgid "[%1% chroot] (%2%->%3%) Running command: \"%4%\""
msgstr "[%1% chroot] (%2%->%3%) Đang chạy lệnh: « %4% »"
-#: schroot/sbuild-session.cc:770
+#: schroot/sbuild-session.cc:772
#, boost-format
msgid "wait for child failed: %1%"
msgstr "việc đợi tiến trình con bị lỗi: %1%"
-#: schroot/sbuild-session.cc:788
+#: schroot/sbuild-session.cc:790
#, boost-format
msgid "Child terminated by signal %1%"
msgstr "Tiến trình con bị chấm dứt do tín hiệu « %1% »"
-#: schroot/sbuild-session.cc:793
+#: schroot/sbuild-session.cc:795
msgid "Child dumped core"
msgstr "Tiến trình con đã đổ lõi"
-#: schroot/sbuild-session.cc:795
+#: schroot/sbuild-session.cc:797
msgid "Child exited abnormally (reason unknown; not a signal or core dump)"
msgstr ""
"Tiến trình con đã thoát bất thường (chưa biết sao ; không phải là việc đổ "
"tín hiệu hay lõi)"
-#: schroot/sbuild-session.cc:802
+#: schroot/sbuild-session.cc:804
#, boost-format
msgid "Child exited abnormally with status '%1%'"
msgstr "Tiến trình con đã thoát bất thường với trạng thái « %1% »"
diff --git a/schroot/run/00check b/schroot/run/00check
index dfa86298..0d1ec250 100755
--- a/schroot/run/00check
+++ b/schroot/run/00check
@@ -13,9 +13,11 @@ if [ $1 = "run-start" ]; then
echo "CHROOT_NAME=$CHROOT_NAME"
echo "CHROOT_DESCRIPTION=$CHROOT_DESCRIPTION"
echo "CHROOT_MOUNT_LOCATION=$CHROOT_MOUNT_LOCATION"
+ echo "CHROOT_LOCATION=$CHROOT_LOCATION"
+ echo "CHROOT_PATH=$CHROOT_PATH"
echo "CHROOT_MOUNT_DEVICE=$CHROOT_MOUNT_DEVICE"
if [ "$CHROOT_TYPE" = "plain" ]; then
- echo "CHROOT_LOCATION=$CHROOT_LOCATION"
+ :
elif [ "$CHROOT_TYPE" = "file" ]; then
echo "CHROOT_FILE=$CHROOT_FILE"
elif [ "$CHROOT_TYPE" = "block-device" -o "$CHROOT_TYPE" = "lvm-snapshot" ]; then
diff --git a/schroot/run/50sbuild b/schroot/run/50sbuild
index b786cbe7..895b8120 100755
--- a/schroot/run/50sbuild
+++ b/schroot/run/50sbuild
@@ -10,22 +10,22 @@ if [ $1 = "run-start" ]; then
sed -e 's/^\([^:]*\):.*$/\1/' | \
grep -q '^sbuild$'; then
- if [ ! -d "${CHROOT_MOUNT_LOCATION}/build/${AUTH_USER}" ]; then
+ if [ ! -d "${CHROOT_PATH}/build/${AUTH_USER}" ]; then
if [ "$AUTH_VERBOSITY" = "verbose" ]; then
- echo "Creating sbuild build directory: ${CHROOT_MOUNT_LOCATION}/build/${AUTH_USER}"
+ echo "Creating sbuild build directory: ${CHROOT_PATH}/build/${AUTH_USER}"
fi
- mkdir -p "${CHROOT_MOUNT_LOCATION}/build/${AUTH_USER}"
+ mkdir -p "${CHROOT_PATH}/build/${AUTH_USER}"
fi
if [ "$AUTH_VERBOSITY" = "verbose" ]; then
- echo "Setting ownership of ${CHROOT_MOUNT_LOCATION}/build/${AUTH_USER} to ${AUTH_USER}:sbuild"
+ echo "Setting ownership of ${CHROOT_PATH}/build/${AUTH_USER} to ${AUTH_USER}:sbuild"
fi
- chown "${AUTH_USER}:sbuild" "${CHROOT_MOUNT_LOCATION}/build/${AUTH_USER}"
+ chown "${AUTH_USER}:sbuild" "${CHROOT_PATH}/build/${AUTH_USER}"
if [ "$AUTH_VERBOSITY" = "verbose" ]; then
- echo "Setting permissions of ${CHROOT_MOUNT_LOCATION}/build/${AUTH_USER} to 770"
+ echo "Setting permissions of ${CHROOT_PATH}/build/${AUTH_USER} to 770"
fi
- chmod 770 "${CHROOT_MOUNT_LOCATION}/build/${AUTH_USER}"
+ chmod 770 "${CHROOT_PATH}/build/${AUTH_USER}"
else
diff --git a/schroot/sbuild-chroot-block-device.cc b/schroot/sbuild-chroot-block-device.cc
index a8fcc524..301fbbec 100644
--- a/schroot/sbuild-chroot-block-device.cc
+++ b/schroot/sbuild-chroot-block-device.cc
@@ -81,6 +81,18 @@ chroot_block_device::set_mount_options (std::string const& mount_options)
}
std::string const&
+chroot_block_device::get_location () const
+{
+ return chroot::get_location();
+}
+
+void
+chroot_block_device::set_location (std::string const& location)
+{
+ chroot::set_location(location);
+}
+
+std::string const&
chroot_block_device::get_chroot_type () const
{
static const std::string type("block-device");
@@ -184,6 +196,9 @@ chroot_block_device::get_keyfile (keyfile& keyfile) const
keyfile.set_value(get_name(), "mount-options",
get_mount_options());
+
+ keyfile.set_value(get_name(), "location",
+ get_location());
}
void
@@ -200,6 +215,11 @@ chroot_block_device::set_keyfile (keyfile const& keyfile)
if (keyfile.get_value(get_name(), "mount-options",
keyfile::PRIORITY_OPTIONAL, mount_options))
set_mount_options(mount_options);
+
+ std::string location;
+ if (keyfile.get_value(get_name(), "location",
+ keyfile::PRIORITY_OPTIONAL, location))
+ set_location(location);
}
/*
diff --git a/schroot/sbuild-chroot-block-device.h b/schroot/sbuild-chroot-block-device.h
index 608bdf15..5faf39be 100644
--- a/schroot/sbuild-chroot-block-device.h
+++ b/schroot/sbuild-chroot-block-device.h
@@ -82,6 +82,24 @@ namespace sbuild
void
set_mount_options (std::string const& mount_options);
+ /**
+ * Get the location. This is a path to the chroot directory
+ * inside the LV (absolute path from the LV root).
+ *
+ * @returns the location.
+ */
+ virtual std::string const&
+ get_location () const;
+
+ /**
+ * Set the location. This is a path to the chroot directory
+ * inside the LV (absolute path from the LV root).
+ *
+ * @param location the location.
+ */
+ virtual void
+ set_location (std::string const& location);
+
virtual std::string const&
get_chroot_type () const;
diff --git a/schroot/sbuild-chroot-config.cc b/schroot/sbuild-chroot-config.cc
index 9fe07872..a9ff606f 100644
--- a/schroot/sbuild-chroot-config.cc
+++ b/schroot/sbuild-chroot-config.cc
@@ -313,7 +313,7 @@ chroot_config::print_chroot_location (string_list const& chroots,
const chroot::ptr chroot = find_alias(*pos);
if (chroot)
{
- stream << chroot->get_mount_location() << '\n';
+ stream << chroot->get_path() << '\n';
}
else
log_error() << format(_("%1%: No such chroot")) % *pos
diff --git a/schroot/sbuild-chroot-plain.cc b/schroot/sbuild-chroot-plain.cc
index aa1af618..835bd505 100644
--- a/schroot/sbuild-chroot-plain.cc
+++ b/schroot/sbuild-chroot-plain.cc
@@ -30,8 +30,7 @@
using namespace sbuild;
chroot_plain::chroot_plain ():
- chroot(),
- location()
+ chroot()
{
}
@@ -48,19 +47,13 @@ chroot_plain::clone () const
std::string const&
chroot_plain::get_location () const
{
- return this->location;
+ return chroot::get_location();
}
void
chroot_plain::set_location (std::string const& location)
{
- this->location = location;
-}
-
-std::string const&
-chroot_plain::get_mount_location () const
-{
- return this->location;
+ chroot::set_location(location);
}
std::string const&
@@ -97,8 +90,6 @@ chroot_plain::print_details (std::ostream& stream) const
{
this->chroot::print_details(stream);
- if (!this->location.empty())
- stream << format_details(_("Location"), get_location());
stream << std::flush;
}
diff --git a/schroot/sbuild-chroot-plain.h b/schroot/sbuild-chroot-plain.h
index e63571dc..255cdb7b 100644
--- a/schroot/sbuild-chroot-plain.h
+++ b/schroot/sbuild-chroot-plain.h
@@ -48,7 +48,7 @@ namespace sbuild
*
* @returns the location.
*/
- std::string const&
+ virtual std::string const&
get_location () const;
/**
@@ -56,13 +56,10 @@ namespace sbuild
*
* @param location the location.
*/
- void
+ virtual void
set_location (std::string const& location);
virtual std::string const&
- get_mount_location () const;
-
- virtual std::string const&
get_chroot_type () const;
virtual void
@@ -84,10 +81,6 @@ namespace sbuild
virtual void
set_keyfile (keyfile const& keyfile);
-
- private:
- /// The directory location of the chroot.
- std::string location;
};
}
diff --git a/schroot/sbuild-chroot.cc b/schroot/sbuild-chroot.cc
index 29dc7df5..1c8e108d 100644
--- a/schroot/sbuild-chroot.cc
+++ b/schroot/sbuild-chroot.cc
@@ -37,6 +37,7 @@ sbuild::chroot::chroot ():
root_groups(),
aliases(),
mount_location(),
+ location(),
mount_device(),
active(false),
run_setup_scripts(false),
@@ -111,6 +112,24 @@ sbuild::chroot::set_mount_location (std::string const& location)
}
std::string const&
+sbuild::chroot::get_location () const
+{
+ return this->location;
+}
+
+void
+sbuild::chroot::set_location (std::string const& location)
+{
+ this->location = location;
+}
+
+std::string
+sbuild::chroot::get_path () const
+{
+ return get_mount_location() + get_location();
+}
+
+std::string const&
sbuild::chroot::get_mount_device () const
{
return this->mount_device;
@@ -212,7 +231,9 @@ sbuild::chroot::setup_env (environment& env)
env.add("CHROOT_TYPE", get_chroot_type());
env.add("CHROOT_NAME", get_name());
env.add("CHROOT_DESCRIPTION", get_description());
+ env.add("CHROOT_LOCATION", get_location());
env.add("CHROOT_MOUNT_LOCATION", get_mount_location());
+ env.add("CHROOT_PATH", get_path());
env.add("CHROOT_MOUNT_DEVICE", get_mount_device());
}
@@ -298,9 +319,15 @@ sbuild::chroot::print_details (std::ostream& stream) const
chroot::SESSION_CREATE));
/* Non user-settable properties are listed last. */
+ if (!get_location().empty())
+ stream << format_details(_("Location"),
+ get_location());
if (!get_mount_location().empty())
stream << format_details(_("Mount Location"),
get_mount_location());
+ if (!get_mount_location().empty())
+ stream << format_details(_("Path"),
+ get_path());
if (!get_mount_device().empty())
stream << format_details(_("Mount Device"), get_mount_device());
}
diff --git a/schroot/sbuild-chroot.h b/schroot/sbuild-chroot.h
index b948477e..6fd00790 100644
--- a/schroot/sbuild-chroot.h
+++ b/schroot/sbuild-chroot.h
@@ -140,6 +140,39 @@ namespace sbuild
set_mount_location (std::string const& location);
/**
+ * Get the location of the chroot. This is the path to the root
+ * of the chroot, and is typically the same as the mount location,
+ * but is overridden by the chroot type if required.
+ *
+ * @returns the mount location.
+ */
+ virtual std::string const&
+ get_location () const;
+
+ protected:
+ /**
+ * Set the location of the chroot. This is the path to the root
+ * of the chroot, and is typically the same as the mount location,
+ * but is overridden by the chroot type if required.
+ *
+ * @returns the mount location.
+ */
+ virtual void
+ set_location (std::string const& location);
+
+ public:
+ /**
+ * Get the path to the chroot. This is the absolute path to the
+ * root of the chroot, and is typically the same as the mount
+ * location and location concatenated together, but is overridden
+ * by the chroot type if required.
+ *
+ * @returns the path.
+ */
+ virtual std::string
+ get_path () const;
+
+ /**
* Get the mount device of the chroot.
*
* @returns the device.
@@ -516,6 +549,8 @@ namespace sbuild
string_list aliases;
/// Location to mount chroot in the filesystem (if any).
std::string mount_location;
+ /// Location inside the mount location root.
+ std::string location;
/// Block device to mount (if any).
std::string mount_device;
/// Chroot activity status.
diff --git a/schroot/sbuild-session.cc b/schroot/sbuild-session.cc
index d32bd9cf..2bc30959 100644
--- a/schroot/sbuild-session.cc
+++ b/schroot/sbuild-session.cc
@@ -320,9 +320,11 @@ try
/* Activate chroot. */
chroot->set_active(true);
- /* If a chroot mount location has not yet been set, set one
- with the session id. */
- if (chroot->get_mount_location().empty())
+ /* If a chroot mount location has not yet been set, and the
+ chroot is not a plain chroot, set a mount location with the
+ session id. */
+ if (chroot->get_mount_location().empty() &&
+ dynamic_cast<chroot_plain *>(chroot.get()) == 0)
{
std::string location(std::string(SCHROOT_MOUNT_DIR) + "/" +
this->session_id);
@@ -578,7 +580,7 @@ session::run_child (sbuild::chroot::ptr& session_chroot)
assert(!get_shell().empty());
assert(auth::pam != NULL); // PAM must be initialised
- std::string const& location = session_chroot->get_mount_location();
+ std::string location(session_chroot->get_path());
std::string cwd;
{
char *raw_cwd = getcwd (NULL, 0);
diff --git a/schroot/schroot-setup.5.in b/schroot/schroot-setup.5.in
index 505464f5..37a30b93 100644
--- a/schroot/schroot-setup.5.in
+++ b/schroot/schroot-setup.5.in
@@ -74,8 +74,17 @@ CHROOT_DESCRIPTION
The description of the chroot.
.TP
CHROOT_MOUNT_LOCATION
-The location to mount the chroot (or, in the case of plain chroots, where it
-already exists).
+The location to mount the chroot. It is used for mount point creation and
+mounting.
+.TP
+CHROOT_LOCATION
+The location of the chroot inside the mount point. This is to allow multiple
+chroots on a single filesystem.
+.TP
+CHROOT_PATH
+The absolute path to the chroot. This is typically CHROOT_MOUNT_LOCATION and
+CHROOT_LOCATION concatenated together. This is the path which should be used
+to access the chroots.
.TP
CHROOT_MOUNT_DEVICE
The device containing the chroot root filesystem. This is only set for chroots
diff --git a/schroot/schroot.conf.5.in b/schroot/schroot.conf.5.in
index 9acb6f73..5aeba3e3 100644
--- a/schroot/schroot.conf.5.in
+++ b/schroot/schroot.conf.5.in
@@ -122,6 +122,13 @@ example, \[lq]/dev/sda5\[rq].
.B mount-options=\fImount_options\fP
Mount options for the block device. These are additional options to pass to
mount(8). For example, \[lq]\-o atime,sync,user_xattr\[rq].
+.TP
+.B location=\fIpath\fP
+This is the path to the chroot \fIinside\fP the filesystem on the device. For
+example, if the filesystem contains a chroot in \fI/chroot/sid\fP, you would
+specify \fB/chroot/sid\fP here. If the chroot is the only thing on the
+filesystem, i.e. \fI/\fP is the root filesystem for the chroot, this option
+should be left blank, or omitted entirely.
.SS
LVM snapshot chroots
.PP
diff --git a/schroot/setup/00check b/schroot/setup/00check
index 963e53e5..9c1a3615 100755
--- a/schroot/setup/00check
+++ b/schroot/setup/00check
@@ -13,9 +13,11 @@ if [ $1 = "setup-start" -o $1 = "setup-recover" ]; then
echo "CHROOT_NAME=$CHROOT_NAME"
echo "CHROOT_DESCRIPTION=$CHROOT_DESCRIPTION"
echo "CHROOT_MOUNT_LOCATION=$CHROOT_MOUNT_LOCATION"
+ echo "CHROOT_LOCATION=$CHROOT_LOCATION"
+ echo "CHROOT_PATH=$CHROOT_PATH"
echo "CHROOT_MOUNT_DEVICE=$CHROOT_MOUNT_DEVICE"
if [ "$CHROOT_TYPE" = "plain" ]; then
- echo "CHROOT_LOCATION=$CHROOT_LOCATION"
+ :
elif [ "$CHROOT_TYPE" = "file" ]; then
echo "CHROOT_FILE=$CHROOT_FILE"
elif [ "$CHROOT_TYPE" = "block-device" -o "$CHROOT_TYPE" = "lvm-snapshot" ]; then
@@ -31,8 +33,8 @@ if [ $1 = "setup-start" -o $1 = "setup-recover" ]; then
case "$CHROOT_TYPE" in
plain)
- if [ ! -d "$CHROOT_LOCATION" ]; then
- echo "$CHROOT_LOCATION does not exist"
+ if [ ! -d "$CHROOT_PATH" ]; then
+ echo "$CHROOT_PATH does not exist"
exit 1
fi
;;
@@ -56,8 +58,8 @@ if [ $1 = "setup-start" -o $1 = "setup-recover" ]; then
# A basic safety check, so that the root filesystem doesn't get
# toasted by accident.
- if [ -z "$CHROOT_MOUNT_LOCATION" -o "$CHROOT_MOUNT_LOCATION" = "/" ]; then
- echo "Invalid chroot mount location: '$CHROOT_MOUNT_LOCATION'"
+ if [ -z "$CHROOT_PATH" -o "$CHROOT_PATH" = "/" ]; then
+ echo "Invalid chroot mount location: '$CHROOT_PATH'"
exit 1
fi
diff --git a/schroot/setup/10mount b/schroot/setup/10mount
index d0c9bd24..6eecc2d3 100755
--- a/schroot/setup/10mount
+++ b/schroot/setup/10mount
@@ -70,19 +70,19 @@ if [ "$CHROOT_TYPE" = "file" -o "$CHROOT_TYPE" = "block-device" -o "$CHROOT_TYPE
do_mount "$CHROOT_MOUNT_OPTIONS" "$CHROOT_MOUNT_DEVICE" "$CHROOT_MOUNT_LOCATION"
fi
- do_mount "-t proc" "proc" "${CHROOT_MOUNT_LOCATION}/proc"
- do_mount "-o rw,bind" "/dev/pts" "${CHROOT_MOUNT_LOCATION}/dev/pts"
- do_mount "-t tmpfs" "tmpfs" "${CHROOT_MOUNT_LOCATION}/dev/shm"
- do_mount "-o rw,bind" "/home" "${CHROOT_MOUNT_LOCATION}/home"
- do_mount "-o rw,bind" "/tmp" "${CHROOT_MOUNT_LOCATION}/tmp"
+ do_mount "-t proc" "proc" "${CHROOT_PATH}/proc"
+ do_mount "-o rw,bind" "/dev/pts" "${CHROOT_PATH}/dev/pts"
+ 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"
elif [ $1 = "setup-stop" ]; then
- do_umount "${CHROOT_MOUNT_LOCATION}/tmp"
- do_umount "${CHROOT_MOUNT_LOCATION}/home"
- do_umount "${CHROOT_MOUNT_LOCATION}/dev/shm"
- do_umount "${CHROOT_MOUNT_LOCATION}/dev/pts"
- do_umount "${CHROOT_MOUNT_LOCATION}/proc"
+ do_umount "${CHROOT_PATH}/tmp"
+ do_umount "${CHROOT_PATH}/home"
+ do_umount "${CHROOT_PATH}/dev/shm"
+ do_umount "${CHROOT_PATH}/dev/pts"
+ do_umount "${CHROOT_PATH}/proc"
if [ "$CHROOT_TYPE" != "file" ]; then
do_umount "$CHROOT_MOUNT_LOCATION"
diff --git a/schroot/setup/20network b/schroot/setup/20network
index 11dbfe52..335ec266 100755
--- a/schroot/setup/20network
+++ b/schroot/setup/20network
@@ -5,6 +5,6 @@ if [ "$AUTH_VERBOSITY" = "verbose" ]; then
fi
if [ $1 = "setup-start" -o $1 = "setup-recover" ]; then
- cp $VERBOSE /etc/resolv.conf "${CHROOT_MOUNT_LOCATION}/etc/resolv.conf"
+ cp $VERBOSE /etc/resolv.conf "${CHROOT_PATH}/etc/resolv.conf"
fi
diff --git a/schroot/setup/30passwd b/schroot/setup/30passwd
index 4636f800..358328bb 100755
--- a/schroot/setup/30passwd
+++ b/schroot/setup/30passwd
@@ -5,8 +5,8 @@ if [ "$AUTH_VERBOSITY" = "verbose" ]; then
fi
if [ $1 = "setup-start" -o $1 = "setup-recover" ]; then
- cp $VERBOSE /etc/passwd "${CHROOT_MOUNT_LOCATION}/etc/passwd"
- cp $VERBOSE /etc/shadow "${CHROOT_MOUNT_LOCATION}/etc/shadow"
- cp $VERBOSE /etc/group "${CHROOT_MOUNT_LOCATION}/etc/group"
+ cp $VERBOSE /etc/passwd "${CHROOT_PATH}/etc/passwd"
+ cp $VERBOSE /etc/shadow "${CHROOT_PATH}/etc/shadow"
+ cp $VERBOSE /etc/group "${CHROOT_PATH}/etc/group"
fi
diff --git a/schroot/setup/50chrootname b/schroot/setup/50chrootname
index b6f6ea85..1da91603 100755
--- a/schroot/setup/50chrootname
+++ b/schroot/setup/50chrootname
@@ -4,6 +4,6 @@ if [ $1 = "setup-start" -o $1 = "setup-recover" ]; then
if [ "$AUTH_VERBOSITY" = "verbose" ]; then
echo "Setting chroot name to ${CHROOT_NAME}"
fi
- echo "${CHROOT_NAME}" > "${CHROOT_MOUNT_LOCATION}/etc/debian_chroot"
+ echo "${CHROOT_NAME}" > "${CHROOT_PATH}/etc/debian_chroot"
fi
diff --git a/test/sbuild-chroot-block-device.cc b/test/sbuild-chroot-block-device.cc
index fc9d53c0..4cdc30e8 100644
--- a/test/sbuild-chroot-block-device.cc
+++ b/test/sbuild-chroot-block-device.cc
@@ -96,6 +96,7 @@ public:
expected.add("CHROOT_NAME", "test-name");
expected.add("CHROOT_DESCRIPTION", "test-description");
expected.add("CHROOT_MOUNT_LOCATION", "/mnt/mount-location");
+ expected.add("CHROOT_PATH", "/mnt/mount-location");
expected.add("CHROOT_MOUNT_DEVICE", "/dev/testdev");
expected.add("CHROOT_DEVICE", "/dev/testdev");
expected.add("CHROOT_MOUNT_OPTIONS", "-t jfs -o quota,rw");
diff --git a/test/sbuild-chroot-file.cc b/test/sbuild-chroot-file.cc
index 7709fcd3..7b420955 100644
--- a/test/sbuild-chroot-file.cc
+++ b/test/sbuild-chroot-file.cc
@@ -84,6 +84,7 @@ public:
expected.add("CHROOT_DESCRIPTION", "test-description");
expected.add("CHROOT_FILE", "/srv/chroot/example.tar.bz2");
expected.add("CHROOT_MOUNT_LOCATION", "/mnt/mount-location");
+ expected.add("CHROOT_PATH", "/mnt/mount-location");
expected.add("CHROOT_MOUNT_DEVICE", "/dev/device-to-mount");
test_chroot_base<chroot_file>::test_setup_env(expected);
diff --git a/test/sbuild-chroot-lvm-snapshot.cc b/test/sbuild-chroot-lvm-snapshot.cc
index 89015cdd..35f4af95 100644
--- a/test/sbuild-chroot-lvm-snapshot.cc
+++ b/test/sbuild-chroot-lvm-snapshot.cc
@@ -102,6 +102,7 @@ public:
expected.add("CHROOT_NAME", "test-name");
expected.add("CHROOT_DESCRIPTION", "test-description");
expected.add("CHROOT_MOUNT_LOCATION", "/mnt/mount-location");
+ expected.add("CHROOT_PATH", "/mnt/mount-location");
expected.add("CHROOT_MOUNT_DEVICE", "/dev/snaptestdev");
expected.add("CHROOT_DEVICE", "/dev/testdev");
expected.add("CHROOT_MOUNT_OPTIONS", "-t jfs -o quota,rw");
diff --git a/test/sbuild-chroot-plain.cc b/test/sbuild-chroot-plain.cc
index 9e8ed690..54f0e30b 100644
--- a/test/sbuild-chroot-plain.cc
+++ b/test/sbuild-chroot-plain.cc
@@ -59,6 +59,7 @@ public:
{
test_chroot_base<chroot_plain>::setUp();
sbuild::chroot_plain *c = dynamic_cast<sbuild::chroot_plain *>(chroot.get());
+ c->set_mount_location("");
c->set_location("/srv/chroot/example-chroot");
}
@@ -69,8 +70,9 @@ public:
CPPUNIT_ASSERT(c);
c->set_location("/mnt/mount-location/example");
CPPUNIT_ASSERT(c->get_location() == "/mnt/mount-location/example");
- CPPUNIT_ASSERT(chroot->get_mount_location() ==
- "/mnt/mount-location/example");
+ CPPUNIT_ASSERT(chroot->get_location() == "/mnt/mount-location/example");
+ CPPUNIT_ASSERT(chroot->get_path() == "/mnt/mount-location/example");
+ CPPUNIT_ASSERT(chroot->get_mount_location() == "");
}
void test_chroot_type()
@@ -85,7 +87,7 @@ public:
expected.add("CHROOT_NAME", "test-name");
expected.add("CHROOT_DESCRIPTION", "test-description");
expected.add("CHROOT_LOCATION", "/srv/chroot/example-chroot");
- expected.add("CHROOT_MOUNT_LOCATION", "/srv/chroot/example-chroot");
+ expected.add("CHROOT_PATH", "/srv/chroot/example-chroot");
expected.add("CHROOT_MOUNT_DEVICE", "/dev/device-to-mount");
test_chroot_base<chroot_plain>::test_setup_env(expected);
diff --git a/test/sbuild-chroot.cc b/test/sbuild-chroot.cc
index d434c81b..3561ce07 100644
--- a/test/sbuild-chroot.cc
+++ b/test/sbuild-chroot.cc
@@ -202,6 +202,7 @@ public:
expected.add("CHROOT_NAME", "test-name");
expected.add("CHROOT_DESCRIPTION", "test-description");
expected.add("CHROOT_MOUNT_LOCATION", "/mnt/mount-location");
+ expected.add("CHROOT_PATH", "/mnt/mount-location");
expected.add("CHROOT_MOUNT_DEVICE", "/dev/device-to-mount");
test_chroot_base<basic_chroot>::test_setup_env(expected);