Bryan Dumm bdumm at
Thu Jan 4 03:56:20 PST 2001


Yesterday I tried the following profile below.

And well believe it or not, it worked, really, and without any real chroot 
problems. The only problem was with the File::Copy module we use and 
the copy, move tags I believe. Oh and the Makedev, system_command
wasn't working and i think that was me... but

basic perl
within chroot
works fine....

If we loose File::Copy the code won't be as pretty, but we can 
redo the File::Copy functionality... File::Copy uses
but since perl is not installed in chroot yet, Baseline is not there.
The profile gives @INC errors, which we might be able to manipulate??,
hadn't looked at the details yet... 

so I think we can do chroot easily perhaps, and the only real 
change needed is to copy the &packages_dir; in the normal 
user's enviroment to the new &packages_dir in chroot, which
is the same thing file structure wise, just within the chroot space...

The basic code I added to test the chroot tag was

sub chroot {
	($element, $e_element) = @_;
	my $file= $e_element->att('file');
	print "chrooting to $file\n";
	chroot $file || print "Unable to chroot to $file\n";

Anyways, let me know if anyone figures out more details about
what we can/should do for chroot....

<!DOCTYPE entities [
<!ENTITY partition "/dev/hdb4">
<!ENTITY swap-partition "/dev/hda2">
<!ENTITY LFS "/mnt/lfs">
<!ENTITY packages_dir "/usr/src/lfs-sources">
<!ENTITY arch "i686">
<!ENTITY hostname "lfs">
<!ENTITY builddir "/usr/src">


<alfs version="0.0.6">
	<chroot file="&LFS;"/>
	<system_command param1="-i en_US" param2="-f ISO-8859-1 
	<package name="MAKEDEV" version="2.5">
			<unpack archive="&packages_dir;/MAKEDEV-2.5.tar.bz2">&builddir;</unpack>
			<search_replace dir="&builddir;" find="# 9" 
			<system_command dir="/dev" param1="-v" 
	<package name="ed" version="0.2">
			<unpack archive="&packages_dir;/ed-0.2.tar.bz2">&builddir;</unpack>
        		<config param1="--prefix=/usr" dir="&builddir;" />
        		<make dir="&builddir;" />
		        <make_install dir="&builddir;" />

More information about the alfs-discuss mailing list