On Thu, 5 Aug 2004, Agarwal Deepesh-A19519 wrote: > RPM Version = 4.2 > > Problem in changing the BUILD ROOT > ---------------------------------- > > I followed the steps mentioned in http://www.rpm.org/max-rpm/ch-rpm-anywhere.html > for changing the buildroot, because I need to build it in my clearcase VOB and > NOT in /usr/src/redhat/BUILD. > > My .spec file looks like > ----------------------------------------------------------------- > BuildRoot: /vobs/nightingale/server/product/code/process/ml_temp > Ha, another user of clearcase (-: > %prep > RPM_BUILD_DIR=/vobs/nightingale/server/product/code/process/ml_temp > RPM_SOURCE_DIR=/usr/src/redhat/SOURCES > rm -rf $RPM_BUILD_DIR/ML > tar zxvf $RPM_SOURCE_DIR/ML.tgz > > %build > make > > %install > make ROOT="$RPM_BUILD_ROOT" install > ----------------------------------------------------------------------- > > Despite this the build happens in the default dir (/usr/src/redhat/BUILD) > and fails :( > Its evil but there are two terms your getting mixed up that kill me when I am trying to explain package building to newbies at work. There is the build root and there is the build dir. The build dir (a.k.a. /usr/src/redhat/BUILD) is where tarballs are unarchived, patches applied and software compile/built (thus it is the build dir). The build root is where you install the software you just built. Typically its a good idea to change this from the default, /, so that you don't munge your system, and so it is possible for non-root user to build packages. Now the build root is controled by the BuildRoot: directive in the preamble, but the build dir is controlled by by the macro %_builddir which is set to "%_topdir/BUILD". So to change your build dir and other things like where spec files go you will typically add the following to ~/.rpmmacros: %_topdir /path/to/where/you/want/to/build/things Or if you want to make a global change you might put this in the /etc/rpm/macros, but that typically is not desired. Cheers...james _______________________________________________ Rpm-list mailing list Rpm-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/rpm-list