Originally Posted by the_gripmaster
I am having to use two separate workstations for building 32 bit and 64 bit RPMs: 32 bit RPMs on a workstation running 32 bit RHEL and 64 bit RPMs on a workstation running 64 bit RHEL.
Is it possible to build both 32 bit and 64 bit RPMs on the workstation running 64 bit RHEL? If so, how?
I build both using Fedora 12 x86_64.
The way to do it is to use mock. You need to have both rpmbuild and mock installed.
If I have an srpm (say, fred.src.rpm), I would build an i386 version using...
mock -f fedora-12-i386 rebuild ~/rpmbuild/SRPMS/fred.src.rpm
This assumes that the rpmbuild dir is /home/YOU/rpmbuild.
I could change the 12 to 11, or 10 to build for a different Fedora release, or also build for RHEL.
Have a read up on rpmbuild and mock.
Quite simple to use. The first time you do this it will take a long time while it downloads and assembles a 'virtual' machine, but subsequent builds will be much quicker.
Note also that building with mock is a bit more robust that a normal build, and the resulting rpm can be guaranteed to install OK.
Hope this helps.