rpm-buildroot-usage

Michael Schwendt mschwendt at gmail.com
Sat Jan 22 08:25:58 UTC 2011


On Fri, 21 Jan 2011 10:54:13 -0800, Brad wrote:

> On 11:59 AM, Michael Schwendt wrote:
> > On Wed, 19 Jan 2011 06:57:09 -0800, Brad wrote:
> >
> >> I am using the compile directive
> >>       -I%{buildroot}%{_includedir}
> >> during the test phase of a projects rpm build. This tests the installed
> >> copy of the include files instead of the copy in the distribution (and
> >> hence is a better test of the install).
> >>
> >> The problem is that rpmlint complains with the warning
> >>       W: rpm-buildroot-usage.
> >> Is there another rpm macro I should use to specify the path
> >> %{buildroot}%{_includedir} ?
> > Can you upload the spec file to some public place?
> > Without a look at it, it's hard to guess where you use %buildroot.
> >
> I have placed a copy of the current cppad.spec file in
>      https://projects.coin-or.org/CppAD/browser/trunk/cppad.spec
> 
> One thing I do not understand about
>      fedpkg mockbuild
> is why the standard include directories; like
>      /usr/include
> are not automatically in the g++ include search path.

That is _very_ unlikely to be true.

> This is the reason 
> that I need to use
>      g++ -I %{buildroot}%{_includedir}
> during my test (and have to change my makefile.in to do so).

Further above you refer to /usr/include whereas here you refer to
%{buildroot}/usr/include. Obviously, with %buildroot being a temporary
directory only, g++ does not know about it at all. %buildroot expands
to a temporary path somewhere in the rpmbuild tree.

At the time of writing this mail, Firefox did not succeed in downloading
the spec from above https URL. At most it managed to get to the "connected"
status, but no further.


More information about the devel mailing list