copr icon indicating copy to clipboard operation
copr copied to clipboard

Excludearch mapping doesn't seem to respect `powerpc64le` arch

Open praiskup opened this issue 2 years ago • 8 comments

https://copr.stg.fedoraproject.org/coprs/g/copr/TEST1692016260110954285ExclusiveArch/build/2915090/

Start: rpmbuild procyon-0.6.0-0.3.20220221.git88a95fa.fc38.src.rpm
error: Architecture is not included: powerpc64le
Building target platforms: ppc64le
Building for target ppc64le

It appears like that build chroot should be skipped, too?

praiskup avatar Aug 14 '23 12:08 praiskup

The results.json from SRPM build looks like this:

{
    "name": "procyon",
    "epoch": null,
    "version": "0.6.0",
    "release": "0.3.20220221.git88a95fa",
    "exclusivearch": [
        "aarch64",
        "ppc64le",
        "s390x",
        "x86_64",
        "noarch"
    ],
    "excludearch": []
}

So I would expect the ppc64le chroot not be skipped. Unless we queried the exclusivearch incorrectly.

FrostyX avatar Aug 14 '23 14:08 FrostyX

Hmm, there is a discrepancy.

import specfile
spec = specfile.Specfile("procyon.spec")
print(spec.tags(spec.parsed_sections.package).content.exclusivearch)
aarch64 ppc64le s390x x86_64 noarch

vs

rpm -qp procyon-0.6.0-0.3.20220221.git88a95fa.src.rpm --queryformat '%{EXCLUSIVEARCH}\n' --nosignature
aarch64

FrostyX avatar Aug 14 '23 15:08 FrostyX

@nforro did some additional debugging. Thank you for that.

>>> import rpm
>>> s = rpm.spec('procyon.spec')
>>> s.sourceHeader[rpm.RPMTAG_EXCLUSIVEARCH]
['aarch64', 'ppc64le', 's390x', 'x86_64', 'noarch', 'aarch64', 'ppc64le', 's390x', 'x86_64', 'noarch', 'aarch64', 'ppc64le', 's390x', 'x86_64', 'noarch', 'aarch64', 'ppc64le', 's390x', 'x86_64', 'noarch', 'aarch64', 'ppc64le', 's390x', 'x86_64', 'noarch', 'aarch64', 'ppc64le', 's390x', 'x86_64', 'noarch']

Which is consistent with python-specfile and our results.json. I am not sure what the conclusion is but to me, it seems like this is a NOTABUG.

FrostyX avatar Aug 14 '23 21:08 FrostyX

In procyon package, there's ExclusiveArch: %{java_arches} noarch. This expands on my host like:

$ rpm --eval "%java_arches noarch"
aarch64 ppc64le s390x x86_64 noarch

So it really appears to me that we really should build it. But then, when buliding, rpmbuild fails with error: Architecture is not included: powerpc64le. There must be some bug, somewhere and I'm really curious where. Is the %java_arches macro broken? Is rpmbuild broken?

praiskup avatar Aug 15 '23 04:08 praiskup

Hm, Koji seems to handle procyon builds just fine on ppc64le: https://koji.fedoraproject.org/koji/buildinfo?buildID=2226538

praiskup avatar Aug 15 '23 04:08 praiskup

This must be a different bug then. Let's resolve this post-release.

praiskup avatar Aug 15 '23 04:08 praiskup

Note for myself: Reproducible on Power8.

praiskup avatar Aug 23 '23 15:08 praiskup

Hmm is this so old https://bugzilla.redhat.com/show_bug.cgi?id=1461288 ??

praiskup avatar Aug 23 '23 15:08 praiskup