More detailed profile

Gerard Beekmans gerard at linuxfromscratch.org
Thu Aug 31 07:39:15 PDT 2000


This profile was originally an entire profile to setup everything upto 
chroot. I've removed most of it, since I just want to demonstrate what a 
profile could look like.

        <logs>
        /tmp/alfs.log
        </logs>
        <enviroment>
        LFS=/mnt/lfs
        </enviroment>
        <enviroment>
        CFLAGS="-O3 -mcpu=i686 -march=i686
        </enviroment>
        <enviroment>
        CXXFLAGS="-O3 -mcpu=i686 -march=i686
        </enviroment>
        <commands>
        mke2fs /dev/hda5
        </commands>
        <commands>
        mkdir -p /mnt/lfs
        </commands>
        <commands>
        mount /dev/xxx /mnt/lfs
        </commands>
        <commands>
       root:~# cd $LFS
       root:~# mkdir bin boot dev dev/pts etc home lib mnt proc root sbin tmp 
var
       root:~# for dirname in $LFS/usr $LFS/usr/local
       do
       mkdir $dirname
       cd $dirname
       mkdir bin etc include lib sbin share src tmp var
       ln -s share/man man
       ln -s share/doc doc
       ln -s share/info info
       cd $dirname/share
       mkdir dict doc info locale man nls misc terminfo zoneinfo
       cd $dirname/share/man
       mkdir man1 man2 man3 man4 man5 man6 man7 man8
       done
       root:~# cd $LFS/var
       root:var# mkdir lock log mail run spool tmp
       </commands>

the <commands> tag is too broad. It's hard to handle programatically and deal 
with errors. So we'll have to break that up in different categories. 

        <package>
                <name>
                bash-2.04
                </name>
                <configure>
                ./configure --enable-static-link --prefix=/usr  --disable-nls
                </configure>
                <make>
                make
                </make>
                <make_install>
                make prefix=$LFS/usr install
                </make_install>
                <extras>
                mv $LFS/usr/bin/bash $LFS/usr/bin/bashbug $LFS/bin
                <extras>
                cd $LFS/bin
                </extras>
                <extras>
                ln -s bash sh
                </extras>
        </package>

 	<package>
		<name>
		bzip2-1.0.1
		</name>
		<edit>
		Makefile
			<find>
			$(CC) $(CFLAGS) -o
			</find>
			<replace_with>
			$(CC) $(CFLAGS) $(LDFLAGS) -o
			</replace_with>
		</edit>
		<make>
		make LDFLAGS=-static
		</make>
		<make_install>
		make PREFIX=$LFS/usr install
		</make_install>
		<extras>
		cd $LFS/usr/bin
		</extras>
		<extras>
		mv bzcat bunzip2 bzip2 bzip2recover $LFS/bin
		</extras>

At the moment <extras></extras> only contains one command. It's possible to 
put all three commands between one <extras></extras> instead of three 
seperate ones.

        <config_files>
                <name>
                passwd
                </name>
                <location>
                /etc
                </location>
                <data>
                root:x:0:0:root:/root:/bin/bash
                </data>
        </config_files>

        <config_files>
                <name>
                group
                </name>
                <location>
                /etc
                </location>
                <data>
                root:x:0:
                bin:x:1:
                sys:x:2:
                kmem:x:3:
                tty:x:4:
                uucp:x:5:
                daemon:x:6:
                floppy:x:7:
                disk:x:8:
                </data>
        </config_files>

-------

There are a lot of things that can, should and will be changed. Let me remind 
you guys that this is merely an example. It's not our 'end product' yet.

-- 
Gerard Beekmans
www.linuxfromscratch.org

-*- If Linux doesn't have the solution, you have the wrong problem -*-





More information about the alfs-discuss mailing list