Bug 14737

Summary: %ifarch sparc doesn't work...
Product: [Retired] Red Hat Linux Reporter: Scott Bambrough <scottb>
Component: rpmAssignee: Jeff Johnson <jbj>
Status: CLOSED NOTABUG QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 6.2   
Target Milestone: ---   
Target Release: ---   
Hardware: sparc64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2000-07-27 17:32:15 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 Scott Bambrough 2000-07-27 17:32:13 UTC
$ cat /etc redhat-release
Red Hat Linux release 6.2 (Zoot)

$ uname -a
Linux sparc-os 2.2.14-5.0 #1 Mon Jul 17 14:02:06 EDT 2000 sparc64 unknown

$ rpm --version
RPM version 3.0.4

RPM is from package rpm-3.0.4-0.48.

I'm trying to build the gcc-2.96 RPM from Rawhide.  I have copied the spec file and source files to the appropriate places.  If I run rpm -bp 
gcc.spec, patches in an ifarch sparc clause are not applied.

To investigate, I added the following to the spec file in the patches section:

echo $RPM_ARCH
%ifarch sparc
echo "Its a sparc"
%endif
%ifnarch sparc
echo "Its not a sparc"
%endif

Running rpm -bp on the spec file gives the following output fragment.

sparc
Its not a sparc

This doesn't seem right.

Comment 1 Jeff Johnson 2000-07-27 17:44:42 UTC
Both sparc and sparc64 are distinguished (and therfore exclusive) architectures
for rpm
purposes.

What you need to do is prefix your build command thusly
	sparc32 rpm -ba ...
if you wish to produce sparc packages on a sparc64.