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 2143069 - mock requires /usr/bin/qemu-x86_64-static when trying to build for armv7hl on aarch64
Summary: mock requires /usr/bin/qemu-x86_64-static when trying to build for armv7hl on...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: mock
Version: 36
Hardware: aarch64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Copr Team
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-11-16 00:10 UTC by Dominik 'Rathann' Mierzejewski
Modified: 2022-12-10 01:50 UTC (History)
7 users (show)

Fixed In Version: mock-3.5-1.el9 mock-3.5-1.fc37 mock-3.5-1.fc36 mock-3.5-1.el8
Doc Type: ---
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-12-10 00:36:59 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Dominik 'Rathann' Mierzejewski 2022-11-16 00:10:16 UTC
Description of problem:
mock expects /usr/bin/qemu-x86_64-static to be present when trying to build for armv7hl on aarch64 host due to hard-coded check in /usr/libexec/mock/mock:532-533
...
        binary = '/usr/bin/qemu-x86_64-static'
        if not os.path.exists(binary):
...

Version-Release number of selected component (if applicable):
mock-3.3-1.fc36.noarch

How reproducible:
Always

Steps to Reproduce:
1. dnf install qemu-user-static-arm
2. mock --no-bootstrap-chroot --forcearch=armv7hl -r fedora-36-armhfp any.src.rpm

Actual results:
ERROR: the --forcearch feature requires the qemu-user-static.rpm package to be installed
Traceback (most recent call last):
  File "/usr/libexec/mock/mock", line 1062, in <module>
    exitStatus = main()
  File "/usr/lib/python3.10/site-packages/mockbuild/trace_decorator.py", line 93, in trace
    result = func(*args, **kw)
  File "/usr/libexec/mock/mock", line 684, in main
    check_arch_combination(config_opts['rpmbuild_arch'], config_opts)
  File "/usr/lib/python3.10/site-packages/mockbuild/trace_decorator.py", line 93, in trace
    result = func(*args, **kw)
  File "/usr/libexec/mock/mock", line 537, in check_arch_combination
    raise RuntimeError('the --forcearch feature requires the '
RuntimeError: the --forcearch feature requires the qemu-user-static.rpm package to be installed

Expected results:
Successful build.

Comment 1 Copr Team 2022-11-16 08:31:46 UTC
Thank you for the report.  This error in particular has been fixed in Mock v3.4.

The new error is different - as you correctly specified in the update
https://bodhi.fedoraproject.org/updates/FEDORA-2022-389622bd06

ERROR: 'armv7hl'
Traceback (most recent call last):
  File "/usr/libexec/mock/mock", line 1065, in <module>
    exitStatus = main()
  File "/usr/lib/python3.10/site-packages/mockbuild/trace_decorator.py", line 93, in trace
    result = func(*args, **kw)
  File "/usr/libexec/mock/mock", line 687, in main
    check_arch_combination(config_opts['rpmbuild_arch'], config_opts)
  File "/usr/lib/python3.10/site-packages/mockbuild/trace_decorator.py", line 93, in trace
    result = func(*args, **kw)
  File "/usr/libexec/mock/mock", line 532, in check_arch_combination
    binary = f'/usr/bin/qemu-{config_opts["qemu_user_static_mapping"][config_opts["forcearch"]]}-static'
KeyError: 'armv7hl'

Fixing in https://github.com/rpm-software-management/mock/pull/1007

Feel free to set config_opts["qemu_user_static_mapping"]["armv7hl"] manually to "arm"
for the time being.

Comment 2 Fedora Update System 2022-12-01 19:32:46 UTC
FEDORA-EPEL-2022-01203e19c5 has been submitted as an update to Fedora EPEL 9. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2022-01203e19c5

Comment 3 Fedora Update System 2022-12-01 19:32:46 UTC
FEDORA-EPEL-2022-dcf47fefd6 has been submitted as an update to Fedora EPEL 8. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2022-dcf47fefd6

Comment 4 Fedora Update System 2022-12-01 19:32:47 UTC
FEDORA-2022-70f96b283e has been submitted as an update to Fedora 36. https://bodhi.fedoraproject.org/updates/FEDORA-2022-70f96b283e

Comment 5 Fedora Update System 2022-12-02 01:25:50 UTC
FEDORA-EPEL-2022-01203e19c5 has been pushed to the Fedora EPEL 9 testing repository.

You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2022-01203e19c5

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 6 Fedora Update System 2022-12-02 01:53:55 UTC
FEDORA-EPEL-2022-dcf47fefd6 has been pushed to the Fedora EPEL 8 testing repository.

You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2022-dcf47fefd6

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 7 Fedora Update System 2022-12-02 02:26:20 UTC
FEDORA-2022-70f96b283e has been pushed to the Fedora 36 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2022-70f96b283e`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2022-70f96b283e

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 8 Fedora Update System 2022-12-02 02:29:01 UTC
FEDORA-2022-949f50bc78 has been pushed to the Fedora 37 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2022-949f50bc78`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2022-949f50bc78

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 9 Fedora Update System 2022-12-10 00:36:59 UTC
FEDORA-EPEL-2022-01203e19c5 has been pushed to the Fedora EPEL 9 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 10 Fedora Update System 2022-12-10 01:24:01 UTC
FEDORA-2022-949f50bc78 has been pushed to the Fedora 37 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 11 Fedora Update System 2022-12-10 01:28:20 UTC
FEDORA-2022-70f96b283e has been pushed to the Fedora 36 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 12 Fedora Update System 2022-12-10 01:50:44 UTC
FEDORA-EPEL-2022-dcf47fefd6 has been pushed to the Fedora EPEL 8 stable repository.
If problem still persists, please make note of it in this bug report.


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