Bug 1111147 - Cannot build i686 RPM on x86_64 host with "BuildArch: i686" and --scm-enable
Summary: Cannot build i686 RPM on x86_64 host with "BuildArch: i686" and --scm-enable
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: mock
Version: 19
Hardware: x86_64
OS: Linux
unspecified
unspecified
Target Milestone: ---
Assignee: Miroslav Suchý
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On: 1115483
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-06-19 11:17 UTC by Slawomir Czarko
Modified: 2014-10-12 21:18 UTC (History)
4 users (show)

Fixed In Version: mock-1.2.0
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-10-12 21:18:11 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Slawomir Czarko 2014-06-19 11:17:46 UTC
Description of problem:

I have subversion repository with spec file and sources. spec file contains this line:
BuildArch:      i686

If I use mock with --scm-enable option to build directly from repository then I get this error:

DEBUG: Fetched sources from SCM
DEBUG: Preparing SCM sources
error: No compatible architectures found for build
ERROR: can't parse specfile
Traceback (most recent call last):
  File "/usr/sbin/mock", line 306, in <module>
    def do_buildsrpm(config_opts, chroot, options, args):
  File "/usr/sbin/mock", line 507, in main
    (options.sources, options.spec) = scmWorker.prepare_sources()
  File "<peak.util.decorators.rewrap wrapping mockbuild.scm.prepare_sources at 0x0277E9B0>", line 3, in prepare_sources
    def prepare_sources(self): return __decorated(self)
  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/scm.py", line 136, in prepare_sources
    rpm_spec = ts.parseSpec(self.spec)
  File "/usr/lib64/python2.7/site-packages/rpm/transaction.py", line 41, in parseSpec
    return _rpmb.spec(specfile)
ValueError: can't parse specfile


It works fine if I first use mock to build src.rpm (--buildsrpm) or if I run "setarch i686 mock ..."

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

mock-1.1.38-1.fc19.noarch

How reproducible:
100%

Steps to Reproduce:
1. Setup subversion repository with spec file containing "BuildArch: i686" 
2. Install mock on x86_64 host
3. mock --verbose --root fedora-19-i386 --scm-enable --scm-option <scm options>

Actual results:
mock fails

Expected results:
mock builds RPM

Additional info:

I can build other RPMs which don't specify BuildArch the same way without any problems. This only happens if spec file contains "BuildArch: i686"

The same happens with mock 1.1.39-1

Comment 1 Miroslav Suchý 2014-09-04 09:35:49 UTC
Commited as 0ffe9f8 in msuchy-work branch.

Comment 2 Miroslav Suchý 2014-09-04 09:38:55 UTC
Note that the fix is just workaround of bug 1115483.

Comment 3 Miroslav Suchý 2014-10-12 21:18:11 UTC
Fixed in mock-1.2.0, which just landed in rawhide.


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