Bug 1828041

Summary: Spurious provides generated in builds
Product: [Fedora] Fedora Reporter: Ankur Sinha (FranciscoD) <sanjay.ankur>
Component: python-rpm-macrosAssignee: Miro Hrončok <mhroncok>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: unspecified    
Version: rawhideCC: cstratak, j, m.cyprian, mhroncok, orion, python-sig
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-04-26 16:10:23 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 Ankur Sinha (FranciscoD) 2020-04-26 12:07:49 UTC
Description of problem:
I'm not sure if this is a bug, but rpmlint is picking up on it, so I thought I'd report it:


My new builds are now including spurious requires which rpmlint is picking up on:
python3-spyking-circus.noarch: E: useless-provides python-spyking-circus
python3-spyking-circus.noarch: E: useless-provides python38-spyking-circus

I've not added either of these in the spec

Version-Release number of selected component (if applicable):
python3-rpm-macros-3.8-2.fc33.noarch 


How reproducible:
Always

Steps to Reproduce:
1. Build a python package
2.
3.

Actual results:
Includes provides


Expected results:
Perhaps should not include them?

Additional info:
Here's the spec:
https://ankursinha.fedorapeople.org/python-spyking-circus/python-spyking-circus.spec

Comment 1 Miro Hrončok 2020-04-26 15:11:59 UTC
This is a feature.

> I've not added either of these in the spec

%python_provide adds them. rpmlint figures they are useless, because on f33+ you don't need %python_provide any more in most cases.

See the announcement in https://lists.fedoraproject.org/archives/list/packaging@lists.fedoraproject.org/thread/SSJLPWSGFGPYRSHXQZDR7JNQXSDGGX3Z/

See https://docs.fedoraproject.org/en-US/packaging-guidelines/Python/#_the_python_provide_macro (changed in https://pagure.io/packaging-committee/pull-request/967)

A followup is in https://lists.fedoraproject.org/archives/list/packaging@lists.fedoraproject.org/thread/6DGWPIRP7AYBZP5XEB67YP263P6Q6WTB/

Comment 2 Miro Hrončok 2020-04-26 15:21:00 UTC
My advice: If you target f33+ only, drop the %python_provide call.

If you also target anything older, ignore the rpmlint error.

If you cannot stand the error, you can wrap the call in %{?!__pythonname_provides:...}

Comment 3 Ankur Sinha (FranciscoD) 2020-04-26 16:10:23 UTC
Thanks Miro. I did look at the guidelines but didn't see the relevant bits. I'm happy to ignore the rpmlint error. I'll close this issue.

Comment 4 Miro Hrončok 2020-04-27 08:35:07 UTC
TBH I've only merged the change in the guidelines after getting this bugreport.