Bug 1298668 - Allow noarch builds with ExclusiveArch not containing noarch
Summary: Allow noarch builds with ExclusiveArch not containing noarch
Alias: None
Product: Fedora
Classification: Fedora
Component: rpm
Version: 24
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
Assignee: Packaging Maintenance Team
QA Contact: Fedora Extras Quality Assurance
URL: http://rpm.org/ticket/901
Depends On:
TreeView+ depends on / blocked
Reported: 2016-01-14 17:21 UTC by Orion Poplawski
Modified: 2019-11-21 09:50 UTC (History)
11 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2016-04-06 14:31:14 UTC
Type: Bug

Attachments (Terms of Use)

System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1394853 0 unspecified CLOSED [RFE] support ExclusiveArch tag in binary (sub)packages, too 2021-02-22 00:41:40 UTC

Internal Links: 1394853

Description Orion Poplawski 2016-01-14 17:21:30 UTC
Description of problem:

If you have:

BuildArch?: noarch
ExclusiveArch?: x86_64

You get:

$ rpmbuild -ba *spec
error: Architecture is not included: noarch

Since there are no "noarch" machines, it seems useful to special case noarch builds. This would save a lot of grief with the koji builders and trying to limit noarch builds to certain architectures.

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

Comment 1 Orion Poplawski 2016-01-14 17:23:43 UTC
See https://fedoraproject.org/wiki/Packaging:Guidelines#Noarch_with_unported_dependencies for some backgound.

Comment 2 Jan Kurik 2016-02-24 14:17:21 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 24 development cycle.
Changing version to '24'.

More information and reason for this action is here:

Comment 3 Florian Festi 2016-02-26 08:12:22 UTC
While we could make an exception for noarch in the code I am wondering if this really is the right thing to do. Why would you only add ExclusiveArch?: x86_64 to a noarch package? Why not just add noarch to that line?

May be I am not really getting the use case...

Comment 4 Michael Mráka 2016-02-26 08:40:52 UTC
The use case is:
The built package is noarch but it has a BuildRequires which is arched (e.g  for documentation build process).
And that BuildRequires is available only on x86_64 so builds on s390x builders constantly fail.
On the other hand the final package runs on s390x just fine.

Comment 5 Florian Festi 2016-02-26 10:33:36 UTC
Ok I have a fix upstream as https://github.com/rpm-software-management/rpm/commit/d53499d1565dd7ba6d93939e552cc604b26dccd7 which is also in rpm-4.13.0-0.rc1.26.fc25 .

I am still not 100% sure this doesn't create any additional problems. But I really have no clue what releng in all of the different distros actually does - especially with ExcludeArch/ExclusiveArch. Please test thoroughly! I really would avoid things like breaking the build sys for all noarch packages.

Also note that this change won't make it into F24 until  someone assures me that it won't break the build system.

Comment 6 Florian Festi 2016-03-30 10:28:57 UTC
Does that patch fix your issue? And not break anything else?

Comment 7 Orion Poplawski 2016-03-30 17:29:37 UTC
It seems fine.  koji will still need to get changed to really allow it to be exercised, but I think it's a step in the right direction and hasn't caused any problems that I'm aware of.  Thanks.

Comment 8 Florian Festi 2016-04-06 07:43:35 UTC
Do you need this to be back ported to F24 or even F23? Or can we just close it as fixed?

Comment 9 Orion Poplawski 2016-04-06 14:31:14 UTC
At the moment lets just close it as fixed.  There are koji changes that would need to be made as well to get it into production.

Comment 10 Ralph Bean 2016-09-30 18:10:02 UTC
Tracking koji changes here:  https://pagure.io/koji/issue/19

Comment 11 Pavel Raiskup 2016-11-14 14:58:11 UTC
(In reply to Florian Festi from comment #8)
> Do you need this to be back ported to F24 or even F23? Or can we just close
> it as fixed?

I would actually vote to have it fixed F23+.  Otherwise the
'ExclusiveArch: ...' + 'BuildArch: noarch' hack doesn't work at all
in pungi: https://pagure.io/pungi-fedora/issue/87

Long story short -> when you put 'noarch' into ExclusiveArch tag, every
_binary_ RPM ((sub)package) instantiated from the spec file "inherits"
this 'noarch' bit from _source_ RPM and then is "compatible" (from the
pungi POV) with every Fedora compatible architecture.

Comment 12 Florian Festi 2019-11-21 09:50:17 UTC
clear needinfo

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