Bug 57368

Summary: Spec file patch to build with _arch != i386 in ~/.rpmmacros
Product: [Retired] Red Hat Raw Hide Reporter: Need Real Name <svante.signell>
Component: glibc-kernheadersAssignee: Arjan van de Ven <arjanv>
Status: CLOSED RAWHIDE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 1.0   
Target Milestone: ---   
Target Release: ---   
Hardware: i686   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2001-12-10 23:52:00 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 Need Real Name 2001-12-10 23:51:55 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.5) Gecko/20011113

Description of problem:
glibc-kernheaders-2.4-6.3 fails to build with _arch defined as for example
i686. Also the %install commands had to be modified for a successful build
from source.

Version-Release number of selected component (if applicable):
see above

How reproducible:
Always

Steps to Reproduce:
1.Recompile from source
2.
3.
	

Actual Results:  Different errors, depending on if _arch is defined in
~/.rpmmacros and if --target (i386,i686)  is given when building. The last
part of the patch (%install) is necessary to get a correct package build.

Additional info:

Spec file patch: (some extra newlines are inserted by the web browser)
diff -uN  /usr/src/redhat/SPECS/glibc-kernheaders.spec
/usr/src/redhat/SPECS/glibc-kernheaders.spec.new
--- /usr/src/redhat/SPECS/glibc-kernheaders.spec        Sun Dec  9 10:18:26
2001
+++ /usr/src/redhat/SPECS/glibc-kernheaders.spec.new    Tue Dec 11 00:29:32
2001
@@ -12,7 +12,9 @@
 Prereq: fileutils initscripts >= 5.83
 
 BuildRoot: %{_tmppath}/glibc-kernheaders-root
-
+%ifarch i386 i586 i686
+%define _arch i386
+%endif
 
 Source0: glibc-kernheaders.tar.bz2
 
@@ -33,8 +35,9 @@
 %build
 
 %install
+mkdir -p $RPM_BUILD_ROOT
 tar -cf -  usr | tar -xf - -C $RPM_BUILD_ROOT
-mv $RPM_BUILD_ROOT/usr/include/asm-%{_arch} $RPM_BUILD_ROOT/usr/include/asm
+mv usr/include/asm-%{_arch} $RPM_BUILD_ROOT/usr/include/asm
 
 %clean
 rm -rf $RPM_BUILD_ROOT

Comment 1 Arjan van de Ven 2001-12-13 09:08:45 UTC
Makes sense; applied
Thanks!