2007/03/07

Package building environment for RHEL5

To build clean packages for RHEL5, we need to use "mock" from Fedora project.
1.Get a local mirror of RHEL5 repository, for yum to get packages from, assume we placed the RPMs on /var/ftp/pub/rhel5-local/RPMS
2. Install "createrepo" and "mock" packages from Fedora.
3. Run createrepo /var/ftp/pub/rhel5-local/RPMS/, this will create a local repository.
4. Start ftp daemon and allow anonymous login, ftp root set to /var/ftp/
5. Go to /etc/mock/, copy FC6's configuration to RHEL5, and edit it to point to the local repository, and set the default symlink to RHEL5
6. Get "buildgroups" repository from Fedora project, RHEL5 version of buildgroups packages, add to local repository too.
7. Then we can use "mock init" to test for the repository, this will create a buildroot and install the base system on it.