Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

builddep: Conditional build-dependcies ignores --forcearch #1961

Open
ppisar opened this issue Dec 17, 2024 · 0 comments
Open

builddep: Conditional build-dependcies ignores --forcearch #1961

ppisar opened this issue Dec 17, 2024 · 0 comments
Labels
bug Originally reported in Jira or Bugzilla Priority: MEDIUM Triaged Someone on the DNF 5 team has read the issue and determined the next steps to take

Comments

@ppisar
Copy link
Contributor

ppisar commented Dec 17, 2024

Running:

dnf5 --repo=rawhide --use-host-config --installroot=/tmp/i builddep --forcearch=aarch64 ~test/rpmbuild/SPECS/test.spec

on x86_64 host where the spec file has a conditional dependency:

BuildRequires:  glibc
%ifarch aarch64
BuildRequires:  dontpanic
%endif

Does not install "dontpanic":

Package                          Arch       Version                          Repository            Size
Installing:
 glibc                           aarch64    2.40.9000-23.fc42                rawhide            6.2 MiB
Installing dependencies:
 basesystem                      noarch     11-21.fc41                       rawhide            0.0   B
 bash                            aarch64    5.2.37-1.fc42                    rawhide            8.2 MiB
 fedora-gpg-keys                 noarch     42-0.3                           rawhide          126.4 KiB
 fedora-release                  noarch     42-0.11                          rawhide            0.0   B
 fedora-release-common           noarch     42-0.11                          rawhide           19.8 KiB
 fedora-release-identity-basic   noarch     42-0.11                          rawhide          719.0   B
 fedora-repos                    noarch     42-0.3                           rawhide            4.9 KiB
 fedora-repos-rawhide            noarch     42-0.3                           rawhide            2.2 KiB
 filesystem                      aarch64    3.18-29.fc42                     rawhide          106.0   B
 glibc-common                    aarch64    2.40.9000-23.fc42                rawhide            1.3 MiB
 glibc-minimal-langpack          aarch64    2.40.9000-23.fc42                rawhide            0.0   B
 libgcc                          aarch64    14.2.1-6.fc42                    rawhide          222.2 KiB
 ncurses-base                    noarch     6.5-2.20240629.fc41              rawhide          326.3 KiB
 ncurses-libs                    aarch64    6.5-2.20240629.fc41              rawhide            2.2 MiB
 setup                           noarch     2.15.0-5.fc41                    rawhide          720.7 KiB

It seems that the spec file is not expanded with the overridden architecture.
Maybe it opens a worm of cans because the expansion uses host librpm with host macro definitions.

Downstream bug report https://bugzilla.redhat.com/show_bug.cgi?id=2122520.

dnf5-5.2.8.1-2.fc42.x86_64 is affected.

@ppisar ppisar added Priority: MEDIUM bug Originally reported in Jira or Bugzilla Triaged Someone on the DNF 5 team has read the issue and determined the next steps to take labels Dec 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Originally reported in Jira or Bugzilla Priority: MEDIUM Triaged Someone on the DNF 5 team has read the issue and determined the next steps to take
Projects
None yet
Development

No branches or pull requests

1 participant