From Fedora Project Wiki
It has been requested that this page be deleted.
This information is beyond ancient

III. Preparing The Build Environment

1. System Requirements

Operating System

If you wish to rebuild the version of Anaconda that shipped with Fedora Core, and/or rebuild the Fedora Core distribution, it is preferable to do so on a system with the same version of Fedora Core installed. %W% If Patrick can come up with some docs - I will put a link to it here.

Free Disk Space

To rebuild a distribution, you will need a relatively large hard drive. You will need approx. 4 GB to rebuild Fedora Core with the standard RPMs. You will need approx. 4 GB more if you wish to include the SRPMs.

You will need approx. 30-45 MB for rebuilding the anaconda source. You will need 300-400 MB in /tmp if you need to run buildinstall

Keep in mind that the filesystem starts to slow down when it is more than 80% full.%BR% You might consider using LVM (Logical Volume Management) on your drive because it allows for dynamic resizing of 'partitions'.

Build Times

- See RAU's Appendix G for an explanation of RAU %W% what is the command which takes 0.00RAU -need something to base all other values on

Here are some examples of build times on an Intel Pentium III 600 Mhz processor, 256 MB RAM.

rpmbuild -ba anaconda.spec - 2:49

genhdlist - 0:21

buildinstall - 17:39 - 0:15

build-fc - 23:27

RPM Packages

Packages required for rebuilding Fedora Core CDs %BR% (all available on original Fedora Core CDs)

  • *development-tools* package group
  • anaconda-9.2-2.i386.rpm
  • anaconda-runtime-9.2-2.i386.rpm
  • python-2.2.3-7.i386.rpm
  • mkisofs-2.01-0.a19.2.i386.rpm
  • cdrecord-2.01-0.a19.2.i386.rpm

Packages required for rebuilding the Anaconda source %BR% (available on original Fedora Core CDs)

  • atk-devel-1.4.0-1.i386.rpm
  • beecrypt-devel-3.0.1-0.20030630.1.i386.rpm
  • bogl-0.1.9-26.i386.rpm
  • bogl-bterm-0.1.9-26.i386.rpm
  • bogl-devel-0.1.9-26.i386.rpm
  • booty-0.31.1-2.i386.rpm
  • bzip2-devel-1.0.2-10.i386.rpm
  • dietlibc-0.21-8.i386.rpm
  • elfutils-devel-0.89-2.i386.rpm
  • fontconfig-devel-2.2.1-6.1.i386.rpm
  • freetype-devel-2.1.4-5.i386.rpm
  • glib2-devel-2.2.3-1.1.i386.rpm
  • gtk2-devel-2.2.4-5.1.i386.rpm
  • pango-devel-1.2.5-1.1.i386.rpm
  • pump-devel-0.8.19-2.i386.rpm
  • rpm-build-4.2.1-0.30.i386.rpm
  • XFree86-devel-4.3.0-42.i386.rpm

2. Create the Build Environment

Set environment variables

This will set up important shell environment variables that will be required by shell commands used later in this document. The *BASE* directory should be a directory that you have chosen for the build process. It is from this directory that any additional directories will be created. You need to ensure that there is enough disk space free in this directory. (see above)

export PYTHONPATH=/usr/lib/anaconda
export PATH=$PATH:/usr/lib/anaconda-runtime
export BASE=/your/base/directory

Create working directories

1. Create a directory for the original tree structure of the Fedora Core distribution.

mkdir -p $BASE/fedora-original/i386

2. Create a directory which will be suitable for doing any customizing work. (optional if you have limited space!!)

mkdir -p $BASE/fedora-custom/i386

3. Copy the Fedora Core tree stucture to the $BASE/fedora-original directory. If you are working directly with the .iso images, you can loop mount an .iso without needing to burn a cd with : mount -o loop yarrow-i386-disc1.iso /mnt/cdrom.

cd $BASE
mount /mnt/cdrom
cp -a /mnt/cdrom/* $BASE/fedora-original/i386
cp /mnt/cdrom/.discinfo $BASE/fedora-original/i386
umount /mnt/cdrom
mount /mnt/cdrom
cp -af /mnt/cdrom/* $BASE/fedora-original/i386
umount /mnt/cdrom
mount /mnt/cdrom
cp -af /mnt/cdrom/* $BASE/fedora-original/i386
umount /mnt/cdrom

4. Copy the Fedora Core SRPMS tree structure to the $BASE/fedora-original/SRPMS directory. This step is optional and is only required if you plan to provide the SRPMs with your custom Fedora Core distribution.

mkdir -p $BASE/fedora-original/SRPMS
mkdir -p $BASE/fedora-custom/SRPMS
mount /mnt/cdrom
cp -a /mnt/cdrom/SRPMS/* $BASE/fedora-original/SRPMS
umount /mnt/cdrom
mount /mnt/cdrom
cp -af /mnt/cdrom/SRPMS/* $BASE/fedora-original/SRPMS
umount /mnt/cdrom


mount /mnt/cdrom
cp -af /mnt/cdrom/SRPMS/* $BASE/fedora-original/SRPMS
umount /mnt/cdrom

5. Copy the original tree structure to the custom directory where you can work safely without destroying originals: (optional if you have limited space!!)

cp -a $BASE/fedora-original/i386/* $BASE/fedora-custom/i386
cp -a $BASE/fedora-original/SRPMS/* $BASE/fedora-custom/SRPMS
cp $BASE/fedora-original/i386/.discinfo $BASE/fedora-custom/i386

6. Create a directory that allows for rapid testing of Anaconda source changes. Any modified Anaconda source files that are placed in this directory will be used during the installation procedure. Anaconda makes an early check for the presence of this directory, and if detected, it will substitute or add any files that it finds. This is much easier than rebuilding the Anaconda RPM each time a change is made to the source. This directory is obviously not required if you are not modifying the Anaconda source code.

mkdir $BASE/fedora-custom/i386/RHupdates

7. Remove the TRANS.TBL files. This tidies up your working directories and also prevents from complaining about an "rpm.error: public key not trusted" error.

find $BASE -name <nop>TRANS.TBL -exec rm -f {} \;