1 /*! \page multiplebuilds Multiple build areas
3 It is possible to run several RPM builds on the same machine using
4 separate RPM databases. On my build machine I have several build
5 areas which all run builds at the same time. The builds do not
6 interfere with each other. Each build behaves as if it was running on
7 its own machine and no build area knows about the RPM database which
8 actually configures the machine.
10 First, setup a "topdir" in a prefix other then where RPM is
11 installed. You will need to make the directories. They need to be
12 writable by the account which will do the building, typically they
13 are owned by the buildmaster account and set to permissions
17 BUILD RPMS SOURCES SPECS SRPMS
20 Next, you will need to decide where the database files live. I suggest
21 putting them in a separate directory under "topdir". I call my
22 directory DB and it has the same owner and permissions as the other
25 Each separate build area needs a rpmrc and macro configuration file. This
26 will need to specify the new topdir and dbpath. If you will be building
27 the same packages in different work areas you will also need to specify a
28 tmppath into the topdir. I suggest either making tmppath be the same as
29 the BUILD directory or adding another directory called BUILDROOT for it
32 Keeping track of the correct rpmrc for each build area can be
33 difficult. To make my life easier I make a small shell script with the
34 topdir hard coded inside:
38 /bin/rpm --rcfile /topdir/rpmrc "$@"
42 I call the shell script rpm and it lives in the topdir. Each time I
43 wish to use a particular build area I just ensure that the build area
44 is first in my path so that when I run "rpm" I get the regular rpm
45 binary but I am using the local build areas rpmrc.