Bug 153213

Summary: %install not honoring %setup -n switch
Product: [Fedora] Fedora Reporter: Lamont Peterson <peregrine>
Component: rpmAssignee: Paul Nasrat <nobody+pnasrat>
Status: CLOSED WORKSFORME QA Contact: Mike McLean <mikem>
Severity: high Docs Contact:
Priority: medium    
Version: 3CC: n3npq
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2005-04-03 15:29:27 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Lamont Peterson 2005-04-03 06:55:55 UTC
Description of problem: 
When trying to build a package where the pristine source tarball contains a 
single top-level directory whose name does not exactly match 
%{name}-%{version}, it is necessary to use specify: 
 
%setup -n [correct directory name] 
 
Version-Release number of selected component (if applicable): 
rpmbuild 4.3.2 
 
How reproducible: 
Always. 
 
Steps to Reproduce: 
1.  Create a SPEC file to use a source tarball where the name of the directory 
inside the tarball is not %{name}-%{version}, using the -n switch to the 
%setup macro 
2.  Run "rpmbuild -ba some.spec" 
3.  When rpmbuild tries to run "make [lotsa-dir-options] install", it fails 
because it is in the %{_builddir} directory 
 
Actual results: 
Failed build 
 
Expected results: 
Packages should be built 
 
Additional info: 
I have tested this on both i386 (Athlon-XP, Pentium 4) and x86_64 (2x Opteron 
242), same problem.  I have only tested this with one SPEC file.

Comment 1 Lamont Peterson 2005-04-03 15:29:27 UTC
This morning, I found a small typo in the SPEC file responsible for this   
"bug".  That's what I get for trying to file a bug so late at night.  
  
Just in case, I also tried a simple test case SPEC file; it works fine.  So, 
please close this one out.  Thanks.