Bug 2293727

Summary: Extras subpackages are arched, they should not be
Product: [Fedora] Fedora Reporter: Adam Williamson <awilliam>
Component: python-daskAssignee: Ben Beasley <code>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: rawhideCC: epel-packagers-sig, jonathan, mhroncok, python-packagers-sig, quantum.analyst
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: python-dask-2024.6.2-4.fc41 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2024-06-26 22:26:28 UTC 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 Adam Williamson 2024-06-21 20:52:46 UTC
python-dask.spec has this comment:

# We have an arched package to detect arch-dependent issues in dependencies,
# but all of the installable RPMs are noarch and there is no compiled code.

however, it is a lie, because of the use of `%pyproject_extras_subpkg`:

%pyproject_extras_subpkg -n python3-%{srcname} array bag dataframe delayed

that macro does not include BuildArch: noarch when expanded:

[adamw@xps13a python-dask (rawhide %)]$ rpm --eval "%pyproject_extras_subpkg -n python3-foo bar"
%package -n python3-foo+bar
Summary: Metapackage for python3-foo: bar extras
Requires: python3-foo = %{version}-%{release}
%description -n python3-foo+bar
This is a metapackage bringing in bar extras requires for python3-foo.
It makes sure the dependencies are installed.

%files -n python3-foo+bar -f /home/adamw/rpmbuild/BUILD/%{name}-%{version}-%{release}.x86_64-pyproject-ghost-distinfo

so all these subpackages are actually archful, as you can see in a dask build:
https://koji.fedoraproject.org/koji/buildinfo?buildID=2477169

assigning to Ben Beasley, as this setup was his idea.

Comment 1 Elliott Sales de Andrade 2024-06-21 20:56:47 UTC
This is a limitation of the Python macros: https://src.fedoraproject.org/rpms/python-rpm-macros/pull-request/174

Comment 2 Ben Beasley 2024-06-21 21:29:02 UTC
There are three options:

- make the base package noarch: accept that we are more likely to be surprised by latent arch-specific test failures

- decide we don’t care that the extras metapackages are arched (after all, they are metapackages, so they are tiny), and perhaps adjust the spec-file comment to make it clear that this is a conscious decision: accept that these metapackages are unnecessarily arched

- manually define each of the extras metapackages, similar to the expansion of %pyproject_extras_subpkg…, so that we can make them noarch: accept that this means a lot more boilerplate in the spec file

Elliot, I’m happy to open a PR implementing whichever of these approaches you prefer.

Comment 3 Ben Beasley 2024-06-21 22:12:40 UTC
(In reply to Ben Beasley from comment #2)
> Elliot, I’m happy to open a PR implementing whichever of these approaches
> you prefer.

Elliott, that is – apologies for the name typo.

Comment 4 Ben Beasley 2024-06-21 22:25:07 UTC
See also: https://bugzilla.redhat.com/show_bug.cgi?id=1686307#c26

Comment 5 Miro Hrončok 2024-06-22 00:17:43 UTC
> manually define each of the extras metapackages, similar to the expansion of %pyproject_extras_subpkg…, so that we can make them noarch: accept that this means a lot more boilerplate in the spec file

I would prefer this option as a temporary solution until https://src.fedoraproject.org/rpms/python-rpm-macros/pull-request/174 is merged.

Comment 6 Ben Beasley 2024-06-22 01:15:52 UTC
(In reply to Miro Hrončok from comment #5)
> > manually define each of the extras metapackages, similar to the expansion of %pyproject_extras_subpkg…, so that we can make them noarch: accept that this means a lot more boilerplate in the spec file
> 
> I would prefer this option as a temporary solution until
> https://src.fedoraproject.org/rpms/python-rpm-macros/pull-request/174 is
> merged.

https://src.fedoraproject.org/rpms/python-dask/pull-request/11

Comment 7 Fedora Update System 2024-06-26 22:21:54 UTC
FEDORA-2024-e8187782f3 (python-dask-2024.6.2-4.fc41) has been submitted as an update to Fedora 41.
https://bodhi.fedoraproject.org/updates/FEDORA-2024-e8187782f3

Comment 8 Fedora Update System 2024-06-26 22:26:28 UTC
FEDORA-2024-e8187782f3 (python-dask-2024.6.2-4.fc41) has been pushed to the Fedora 41 stable repository.
If problem still persists, please make note of it in this bug report.