Bug 1952704

Summary: epel-rpm-macros: %pycached broken on el7
Product: [Fedora] Fedora EPEL Reporter: Carl George šŸ¤  <carl>
Component: epel-rpm-macrosAssignee: Miro Hrončok <mhroncok>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: epel7CC: j, kevin, mhroncok, TicoTimo, tomspur
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: epel-rpm-macros-7-30 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-05-01 17:20: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 Carl George šŸ¤  2021-04-22 22:07:57 UTC
Description of problem:
The %pycached macro doesn't work correctly on el7 because it is using {} expansion in %files.  That is a feature that was added in rpm 4.13.0 [0], but el7 is still using rpm 4.11.3.


Version-Release number of selected component (if applicable):
epel-rpm-macros-7-29


How reproducible:
always


Steps to Reproduce:
1. %pycached %{python3_sitelib}/%{srcname}.py


Actual results:
    File not found by glob: /builddir/build/BUILDROOT/python-appdirs-1.4.4-1.el7.x86_64/usr/lib/python3.6/site-packages/__pycache__/appdirs.cpython-36{,.opt-?}.pyc


Expected results:
working spec file


Additional info:
[0] https://rpm.org/wiki/Releases/4.13.0

Comment 1 Miro Hrončok 2021-04-23 08:08:24 UTC
Oh my. I was under the impression that this is a shell glob, not a thing RPM needs to support.

Comment 2 Miro Hrončok 2021-04-23 08:11:41 UTC
%pycached %{python3_sitelib}/%{srcname}.py


Now evals to:

/usr/lib/python3.6/site-packages/%{srcname}.py
/usr/lib/python3.6/site-packages/__pycache__/%{srcname}.cpython-36{,.opt-?}.pyc


Needs to eval to:

/usr/lib/python3.6/site-packages/%{srcname}.py
/usr/lib/python3.6/site-packages/__pycache__/%{srcname}.cpython-36.pyc
/usr/lib/python3.6/site-packages/__pycache__/%{srcname}.cpython-36.opt-?.pyc


Correct?


Note to self: EL 8 has RPM 4.14.3.

Comment 3 Miro Hrončok 2021-04-23 08:33:51 UTC
Please confirm the fix, it is prepared in https://src.fedoraproject.org/rpms/epel-rpm-macros/pull-request/29

Comment 4 Carl George šŸ¤  2021-04-29 18:14:22 UTC
Thanks for the quick response, that PR looks great to me.  Once it's merged and in testing I'll be happy to confirm one last time and give karma.

Comment 5 Fedora Update System 2021-04-29 21:49:51 UTC
FEDORA-EPEL-2021-fc576ef8ba has been submitted as an update to Fedora EPEL 7. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2021-fc576ef8ba

Comment 6 Fedora Update System 2021-04-30 01:37:53 UTC
FEDORA-EPEL-2021-fc576ef8ba has been pushed to the Fedora EPEL 7 testing repository.

You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2021-fc576ef8ba

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 7 Fedora Update System 2021-05-01 17:20:28 UTC
FEDORA-EPEL-2021-fc576ef8ba has been pushed to the Fedora EPEL 7 stable repository.
If problem still persists, please make note of it in this bug report.