aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mageia.org>2012-08-27 04:05:35 +0000
committerThierry Vignaud <tv@mageia.org>2012-08-27 04:05:35 +0000
commitd3c192cd2dd36ff2329e55ed4d2599bf12cd5b07 (patch)
tree0b3bd9c485b43d361ed76ede33686ffe5db3f7bb
parent748e6c810e152e69eeaada513a4871ff64650a93 (diff)
downloadiurt-d3c192cd2dd36ff2329e55ed4d2599bf12cd5b07.tar
iurt-d3c192cd2dd36ff2329e55ed4d2599bf12cd5b07.tar.gz
iurt-d3c192cd2dd36ff2329e55ed4d2599bf12cd5b07.tar.bz2
iurt-d3c192cd2dd36ff2329e55ed4d2599bf12cd5b07.tar.xz
iurt-d3c192cd2dd36ff2329e55ed4d2599bf12cd5b07.zip
mount /dev/shm in chroots too (needed for eg: python)
-rw-r--r--NEWS1
-rw-r--r--lib/Iurt/Chroot.pm9
2 files changed, 9 insertions, 1 deletions
diff --git a/NEWS b/NEWS
index 4ea3b5d..0d2dc11 100644
--- a/NEWS
+++ b/NEWS
@@ -1,4 +1,5 @@
0.6.7 (unreleased)
+- mount /dev/shm in chroots too (needed for eg: python)
0.6.6-1.r5364
- allow emi and ulri to log to a file instead of stderr by setting
diff --git a/lib/Iurt/Chroot.pm b/lib/Iurt/Chroot.pm
index 7b75274..539fd07 100644
--- a/lib/Iurt/Chroot.pm
+++ b/lib/Iurt/Chroot.pm
@@ -71,6 +71,12 @@ sub clean_chroot {
sudo($config, "--umount", "$chroot/proc");
return;
}
+ if (system("$sudo mount none -t tmpfs $chroot/dev/shm")) {
+ plog('ERROR', "Failed to mount dev/shm");
+ sudo($config, "--umount", "$chroot/proc");
+ sudo($config, "--umount", "$chroot/dev/pts");
+ return;
+ }
if ($run->{icecream}) {
system("$sudo mkdir -p $chroot/var/cache/icecream");
if (!sudo($config, '--bindmount', "/var/cache/icecream", "$chroot/var/cache/icecream")) {
@@ -107,6 +113,7 @@ sub _clean_mounts {
my ($run, $config, $chroot) = @_;
sudo($config, "--umount", "$chroot/proc");
sudo($config, "--umount", "$chroot/dev/pts");
+ sudo($config, "--umount", "$chroot/dev/shm");
if ($run->{icecream}) {
sudo($config, "--umount", "$chroot/var/cache/icecream");
@@ -361,7 +368,7 @@ sub build_chroot {
plog('DEBUG', "building the chroot with "
. join(', ', @{$config->{basesystem_packages}}));
- sudo($config, "--mkdir", "-p", "$tmp_chroot/dev/pts",
+ sudo($config, "--mkdir", "-p", "$tmp_chroot/dev/pts", "$tmp_chroot/dev/shm",
"$tmp_chroot/etc/sysconfig", "$tmp_chroot/proc",
"$tmp_chroot/var/lib/rpm");