From 74c69d40d245199435f3263e56cbd73f4d82cc08 Mon Sep 17 00:00:00 2001 From: Florent Villard Date: Fri, 6 Jan 2006 15:50:07 +0000 Subject: Use the right chroot in unionfs mode --- iurt2 | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'iurt2') diff --git a/iurt2 b/iurt2 index ad78503..dc0f389 100755 --- a/iurt2 +++ b/iurt2 @@ -262,7 +262,8 @@ if (!$nocheckchroot) { die => 1); if ($unionfs) { - clean_chroot($chroot) or die "FATAL iurt: Could no prepare initial chroot" + clean_chroot($chroot) or die "FATAL iurt: Could no prepare initial chroot"; + $chroot = "$config->{local_home}/unionfs$debug_tag" } } @@ -301,9 +302,9 @@ foreach (my $i ; $i < @todo; $i++) { mkdir "$d"; } system(qq{sudo mount -t tmpfs none $home/tmpfs}) and die "FATAL iurt: could not mount $home/tmpfs ($!)"; - system(qq{sudo mount -o dirs=$home/tmpfs=rw:$home/chroot/=ro -t unionfs unionfs $home/unionfs}) and die "FATAL iurt: could not mount $home/tmpfs and $home/chroot with unionfs ($!)"; + system(qq{sudo mount -o dirs=$home/tmpfs=rw:$home/chroot=ro -t unionfs unionfs $home/unionfs}) and die "FATAL iurt: could not mount $home/tmpfs and $home/chroot with unionfs ($!)"; } else { - print "iurt: installing a new chroot for $srpm in $chroot\n"; + print STDERR "iurt: installing a new chroot for $srpm in $chroot\n"; clean_chroot($chroot) } my ($srpm_name) = $srpm =~ /(.*)-[^-]+-[^-]+\.src\.rpm$/ or next; @@ -433,6 +434,9 @@ sub usage { --debug: Compile one package in debug mode (do not send mail, create chroot_debug directory). This mode can be used on a system where a iurt is already running. + --unionfs: Use a tmpfs mounted with the chroot via unionfs as build chroot. + This is much faster but you need some memory. + --nocheckchroot: start building without the inital check of the chroot. "; exit } -- cgit v1.2.1