This is a collection of scripts for building rhel21[ae]s

Building centos-2
=================

Why would I do this?
--------------------
There are a number of reasons why might want to set up a CentOS-2 build environment.  The answer for most people is that you probably don't need or want a build environment but for the few who are care, these are some reasons:
- you care about your freedom and want the ability to roll your own version of RHEL2.1
- you want to be able to build your own security updates
- you want to help me by building security updates
- you just want to see how it all works

Build Environment
-----------------
Install centos-2 beta 2.  This will have the correct versions of the build environment.
If you can not find CentOS-2 beta 2 then you can install CentOS-2 final and install the old versions which can be found in the ??? directory.
Make sure all packages listed in buildenv are installed.  Not all are necessarly required but
if you don't want to have to work out the required list for yourself it is a good set to use.
You can install the centos2-buildenv package which depends on the complete set of rpms in the build environment.
It is recommended that you do not install the updates.  Make sure the machine is either:
- well firewalled
- running in a chroot environment inside a secure OS
- not on the network

If you do choose to build on an updated machine you may find that there are RPM's which no longer compile.  I beleive that the OS should always be self hosting but it seems that RH do not.

Note that if you use a chroot environment for you build environment that some packages require /proc to build.

You need to make some tweaks to the build environment to make everything work smoothly:
- edit /usr/lib/rpm/brp-strip and remove the -g from the strip command.
- create the missing gnome symlink ( cd /usr/include/ ; ln -s gdk-pixbuf-1.0/gdk-pixbuf )
- fix eruby header directory       ( cd /usr/lib/ruby/1.6 ; ln -s i386-linux i386-linux-gnu )

Problem package versions
------------------------
mozilla & galeon (can use update version of both, but you still have problems with nautilus)
mozilla & nautilus (bug #102872) (use mozilla version 0.9.9)
apache & mod_ssl (use update version of mod_ssl)
ethtool (use update version of ethtool)


Build tools
-----------
My build script does all the required steps.  It has grown out of a much simpler script but
you should be able to work out how it works.

The build script reads some variables out of a config file.  This allows you to use the same
script to build a number of distributions.

There are also a number of files which contains lists of packages that need special treatment,
like i686 versions etc.  I have included my versions of these files but check that they are correct
for your needs

Getting the srpm
----------------
Download all the srpm and put them into a directory (centos2).  This directory will also contain
other files (athlon.list comps blend.list config dontcopy.list i686.list)

Build the rpms
--------------
./build centos2
./build centos2 i686
./build centos2 athlon

Start with "./build centos2".  This will compile all the .rpms files.  Once compiled the srpm will
be moved into the done directory.  The binary rpm will be in redhat/RPMS/*/ (depending on the arch)

You can also build a single rpm like this
./build centos2 sample-1.0.0.src.rpm

The logs for each package are saved to logs/<package_name>
less centos2/logs/sample-1.0.0.src.rpm

Once all the packages are built, to the i686 and athlon versions.  These start by copying the files back
into the main directory and repeat the build but define the appropriate arch settings.

Building the distribution
-------------------------
./build centos2 dist

Look at the script to see what this does.  You will probably need to modify some parts.  You will also
need to su to root to complete some tasks (building rpmdb and the installer).

