Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 1141513 - issues with if statement when parsing spec on ARM platform
Summary: issues with if statement when parsing spec on ARM platform
Keywords:
Status: CLOSED EOL
Alias: None
Product: Fedora
Classification: Fedora
Component: koji
Version: 22
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Mike McLean
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: ARMTracker
TreeView+ depends on / blocked
 
Reported: 2014-09-14 09:27 UTC by Peter Robinson
Modified: 2016-07-19 12:07 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-07-19 12:07:43 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Peter Robinson 2014-09-14 09:27:33 UTC
When executing buildSRPMFromSCM on an ARM builder where you have the following if statement:

%if %{__isa_bits} == 64

You get the following error:


Mock Version: 1.1.41
ENTER do(['bash', '--login', '-c', 'rpmbuild -bs --target arm --nodeps builddir/build/SPECS/389-ds-base.spec'], False, '/var/lib/mock/f22-build-2373798-418711/root/', None, 86400, True, False, 1000, 425, None, False, {'LANG': 'en_US.UTF-8', 'TERM': 'vt100', 'SHELL': '/bin/bash', 'HOSTNAME': 'mock', 'PROMPT_COMMAND': 'echo -n "<mock-chroot>"', 'HOME': '/builddir', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin'}, logger=<mockbuild.trace_decorator.getLog object at 0xe4ce50>)
Executing command: ['bash', '--login', '-c', 'rpmbuild -bs --target arm --nodeps builddir/build/SPECS/389-ds-base.spec'] with env {'LANG': 'en_US.UTF-8', 'TERM': 'vt100', 'SHELL': '/bin/bash', 'HOSTNAME': 'mock', 'PROMPT_COMMAND': 'echo -n "<mock-chroot>"', 'HOME': '/builddir', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin'}
error: parse error in expression
error: /builddir/build/SPECS/389-ds-base.spec:182: bad %if condition
Building target platforms: arm
Building for target arm
Child return code was: 1
EXCEPTION: Command failed. See logs for output.
 # ['bash', '--login', '-c', 'rpmbuild -bs --target arm --nodeps builddir/build/SPECS/389-ds-base.spec']
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/mockbuild/trace_decorator.py", line 70, in trace
    result = func(*args, **kw)
  File "/usr/lib/python2.7/site-packages/mockbuild/util.py", line 378, in do
    raise mockbuild.exception.Error, ("Command failed. See logs for output.\n # %s" % (command,), child.returncode)
Error: Command failed. See logs for output.
 # ['bash', '--login', '-c', 'rpmbuild -bs --target arm --nodeps builddir/build/SPECS/389-ds-base.spec']
LEAVE do --> EXCEPTION RAISED

Sample build:
http://koji.fedoraproject.org/koji/taskinfo?taskID=7575688

Sample build on x86 that works:
http://koji.fedoraproject.org/koji/taskinfo?taskID=7575701

Comment 1 Panu Matilainen 2014-09-15 06:03:42 UTC
The problem is "--target arm" arg to rpmbuild: there is no such architecture as "arm", so %{__isa_bits} is not defined for that arch and at that point the %if is unparseable. 

Passing an invalid arch is a koji-issue, reassigning.

Comment 2 Jaroslav Reznik 2015-03-03 16:17:30 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 22 development cycle.
Changing version to '22'.

More information and reason for this action is here:
https://fedoraproject.org/wiki/Fedora_Program_Management/HouseKeeping/Fedora22

Comment 3 Fedora Admin XMLRPC Client 2016-03-10 14:45:21 UTC
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.

Comment 4 Fedora End Of Life 2016-07-19 12:07:43 UTC
Fedora 22 changed to end-of-life (EOL) status on 2016-07-19. Fedora 22 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.


Note You need to log in before you can comment on or make changes to this bug.