Bug 2122520

Summary: dnf builddep ignores --forcearch=riscv64 while generating alt arch sysroot
Product: [Fedora] Fedora Reporter: David Abdurachmanov <david.abdurachmanov>
Component: dnf-plugins-coreAssignee: rpm-software-management
Status: NEW --- QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 39CC: amatej, daniel.mach, jmracek, mblaha, packaging-team-maint, pkratoch, praiskup, rpm-software-management, vmukhame
Target Milestone: ---Keywords: Triaged
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description David Abdurachmanov 2022-08-30 08:18:52 UTC
Description of problem:

A person asked me how to generate Fedora/RISCV sysroot to cross-compile QEMU.

The following command does the job:

sudo dnf -y --skip-broken --releasever=33 --setopt=install_weak_deps=0 --forcearch=riscv64 --nogpgcheck --installroot=$PWD/tmp_rootfs --repofrompath="fedora-riscv,http://fedora.riscv.rocks/repos-dist/rawhide/latest/riscv64/" --repo=fedora-riscv builddep qemu/qemu.spec

But it attempted to install BRs which are not typical for riscv64. It looked like that calculation was done based on the host (x86_64).

I do have --forcearch=riscv64 in the command but it had not effect.

Thus I had to modify qemu.spec to remove all necessary %ifarch x86_64 checks to get it working.

Could we teach builddep to use --forcearch=riscv64?

Trying to define %_arch to riscv64 doesn't change anything (expect, but wanted to try).

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

dnf-plugins-core-4.2.1-1.fc36.noarch

How reproducible:

git clone https://src.fedoraproject.org/rpms/qemu.git
sudo dnf -y --skip-broken --releasever=33 --setopt=install_weak_deps=0 --forcearch=riscv64 --nogpgcheck --installroot=$PWD/tmp_rootfs --repofrompath="fedora-riscv,http://fedora.riscv.rocks/repos-dist/rawhide/latest/riscv64/" --repo=fedora-riscv builddep qemu/qemu.spec

Actual results:

Fails due to:

No matching package to install: 'libpmem-devel'
No matching package to install: 'spice-server-devel'
No matching package to install: 'xen-devel'
Not all dependencies satisfied
Error: Some packages could not be found.


Expected results:

Should work as these dependencies are not enabled on riscv64. I expect %ifarch macros to not set have_<feature> to 1 thus pull in these BRs because of --forcearch=riscv64.

If that's not the case, there should have been a warning from DNF that specific options will be ignored.

Comment 1 Ben Cotton 2023-04-25 17:50:48 UTC
This message is a reminder that Fedora Linux 36 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora Linux 36 on 2023-05-16.
It is Fedora's policy to close all bug reports from releases that are no longer
maintained. At that time this bug will be closed as EOL if it remains open with a
'version' of '36'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, change the 'version' 
to a later Fedora Linux version. Note that the version field may be hidden.
Click the "Show advanced fields" button if you do not see it.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora Linux 36 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora Linux, you are encouraged to change the 'version' to a later version
prior to this bug being closed.

Comment 2 Fedora Release Engineering 2023-08-16 07:05:56 UTC
This bug appears to have been reported against 'rawhide' during the Fedora Linux 39 development cycle.
Changing version to 39.