Re: Buildroot problem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> 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
>
> %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 :(
>
yeah .it wont .b'coz, as also written in the link u specified ,the
following things are to be done:

1)Writing the package's spec file to support a build root.
2)Directing RPM to build software in a user-specified build area.

what u did was the first point.
in order to direct the rpm to perform build in ur specified area u have to
change topdir entry in ur rpmrc file. the directory path u specify here
should support rpmbuild area structure i.e. SOURCES,RPMS etc all the 5
directories should be present over there(u have to create them manually).

place ur source tar.gz file in SOURCES and spec file in SPECS.
note that the path u specify as buildroot must be present in advance.
then follow the normal procedure. u need not even be logged as a root user
then!!

ur spec file should look like this:

 BuildRoot: /vobs/nightingale/server/product/code/process/ml_temp

 %prep
 %setup -q

 %build
 make

 %install
 make ROOT="$RPM_BUILD_ROOT" install


this will definitely work. mail me back what happpened!! i m curious to
know the results of my solution.


_______________________________________________
Rpm-list mailing list
Rpm-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/rpm-list

[Index of Archives]     [RPM Ecosystem]     [Linux Kernel]     [Red Hat Install]     [PAM]     [Red Hat Watch]     [Red Hat Development]     [Red Hat]     [Gimp]     [Yosemite News]     [IETF Discussion]

  Powered by Linux