[WBEL-devel] A problem about HTSL and comps-3as-0.20031007.src.rpm

David Jao djao@dominia.org
Tue, 02 Dec 2003 18:29:24 -0800


> BTW, a problem about rebuilding comps-3as-0.20031007.src.rpm. When I
> rpmbuild -ba comps-redhat.spec on a redhat9 machine, it says "This
> specfile needs access to %{basedir}", and exit 1. What is %{basedir}"
> and Is it OK to rebuild RHEL on redhat9?

This question is more appropriate for the RHEL rebuild mailing list
(http://www2.uibk.ac.at/zid/software/unix/linux/rhel-rebuild-l.html) but
I'll try answering it here.

When rebuilding the RHEL source rpms, the comps rpm must be the second
to last rpm that you rebuild. (The last rpm must be the rpmdb-redhat
rpm.) To build the comps rpm, you have to create a %basedir macro in the
~/.rpmmacros file as described in the WBEL howto at
http://www.whiteboxlinux.org/howto.html. You then have to place the
comps.xml file you are using (which can either be the original RHEL file
or your own customized file), as well as the hdlist and hdlist2 files
that you created with genhdlist, into the %basedir directory.
Instructions for creating the hdlist files are at
http://www.tldp.org/HOWTO/RedHat-CD-HOWTO/include-updates.html#INSTALLER-REBUILD

(By the way, John: you might want to change the 
http://www.faqs.org/docs/Linux-HOWTO/RedHat-CD-HOWTO.html link on 
http://www.whiteboxlinux.org/howto.html to point to
http://www.tldp.org/HOWTO/RedHat-CD-HOWTO/ instead, since the TLDP copy
is about six months newer than the faqs.org copy.)

After you have done all that, the comps rpm should build. There is no
problem building RHEL3 starting from a RH9 base except that you have to
be willing to upgrade certain components of your RH9 installation with
the corresponding RHEL3 components as you build them. For example, a
very large number of the RHEL3 rpms require the RHEL3 gcc in order to
build, so for these packages you first have to build gcc, then install
it, and then use the new gcc to build the RHEL packages.

While I'm at it, I might as well mention that the last package you
build, the rpmdb-redhat package, must be built as root. This was
mentioned on the rhel-rebuild-list already but I missed it and spent
several days rediscovering the solution.

-David