Bug 4968

Summary: Buildroot doesn't work
Product: [Retired] Red Hat Linux Reporter: osman
Component: rpmAssignee: Jeff Johnson <jbj>
Status: CLOSED WORKSFORME QA Contact:
Severity: high Docs Contact:
Priority: high    
Version: 6.0   
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 1999-09-10 14:26:32 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description osman 1999-09-08 01:36:57 UTC
In rpm-3.0.2-6.0.i386.rpm
The buildroot doesn't work.
If you specify a "BuildRoot: dir" in the specs file the
package is unable to be build because the files are not
found. This is verry strange because the files ARE there.
I currently am building a package for firewall setup and it
seems like it is using the REAL files on my system and not
the ones I want to distribute.
So it seems to me that it is incorrectly or even NOT parsing
the buildroot.
I use the following:
BuildRoot: %{builddir}/%{name}-%{version}
Wich was a legitimate use till now.
If I output the env.variables while building it shows that
it hasn't parsed the %{builddir}, if I use an absolute path
it gives an error while checking for the entries in %files
and says that the files are not found. But they are there!

Comment 1 Jeff Johnson 1999-09-10 14:26:59 UTC
Dunno where you defined builddir, rpm doesn't. Macro expansion
passes undefined %{foo} constructs exactly as is. I suspect you
want %{_builddir} but you should use something like
	BuildDir: /var/tmp/%{name}-%{version}
so that %{_builddir} will be defined correctly.

FWIW, almost every package in the RH distribution uses BuildRoot:
successfully.