Helping Alfs.

Walter Horsten walter.horsten at pandora.be
Tue Sep 25 10:15:37 PDT 2001


Hi,

	I wouldn't mind helping out. I'm short on time though, but
i've created some bash scripts to compile an lfs myself (for now it relies 
only on packages from a basic lfs to do the installation, i'll probably add 
wget for network installations). Maybe, they or the strategy i used could be 
useful for the official (?) alfs. Anyway, the scripts work like this: 

	There is a central script which installs packages (specified on the command 
line or taken from a shell variable if no arguments
are specified), it mounts the installation medium, it looks for a 
<packagename>.info file in a specified directory (the info file contains some 
variables - like the name of the
package source file, the directory to which it unpacks, the command to unpack 
the file - and a function containing the compilation script for the package)
it then copies the file specified file (from ) to a specified directory, 
unpacks, runs the compilation function
and removes the package (or leaves it  in the if the installation function 
returns something else than 0)
then it moves on to the next package and starts over until all packages
are done. then unmounts the installation medium.

	Then there is a wrapper script that calls the install script first to do the 
preinstall, optionally drops you to a shell and chroots , from the chroot 
command it calls the install script again to start the installation in the 
chrooted environment. optionally drops you to a shell, calls postinstall
scripts (if you have any)

	You can just copy-paste the scripts in the lfs-book in the installation 
function (you could add some checks, or add some output).

	.info Files are searched for in $LFS_INSTALL_MP/$LFS_INSTALL_DIR/scripts
the package files are in $LFS_INSTALL_MP/$LFS_INSTALL_DIR/sources
(LFS_INSTALL_MP contains the mount point of the install device)
so packages could be stored on a cd, a smb/nfs filesystem. (if the
system from which you install supports this, samba and nfs utils should be
added to the preinstall). this system uses less diskspace than copying all 
packages to the LFS. there is a problem however (i haven't really had the 
time to look into it), i don't know if it is possible to unmount the original
root partition when entering the chrooted environment, so that it can be
mounted again in the new environment. i don't know if it's possible
to remount the original root read-only and mount another copy of it in
the new environment (i'll look into it when i find the time, but suggestions 
are always welcome). if this is possible i would be very happy =), then 
creating a bootable install cd wouldn't be much of a problem anymore.
(unless i would try and fit the entire install system in a ramdisk <grin>)

	As a next step i would like to implement some more network installation
possibilities (http and ftp) using wget.

	Something that i also intend to do is to archive the .info and package 
source file in one file (using tar, possibly) and maybe implement dependency 
checking. (but only if i get it to do decent checking, unlike rpm which just 
checks it's package database for a package name, i was thinking more like 
checking for the needed lib/prog itself and possibly configure some compile 
options in function of the result - this functionality could be included in 
the .info file). 

	In the end I also plan to make a frontend for the install script, so
you don't have to edit the sysinfo file for the general configuration.

	Currently the scripts succeeded in installing an lfs, X, microsoft 
webfonts   (TrueType), nvidia opengl, qt, video (divx,mpeg..)/gfx libs, gtk, 
gimp, xmms, kde2.2 (and every optional package, except cups and 
internationalization - i didn't have time to create the scripts yet) in one 
run.

	They're not available for download yet, i'd like to finish them first. I'm 
sorry that i quite suck at explaining things ; )


	Greetz
		walter
-- 
Unsubscribe: send email to listar at linuxfromscratch.org
and put 'unsubscribe alfs-discuss' in the subject header of the message



More information about the alfs-discuss mailing list