Bug 1952704 - epel-rpm-macros: %pycached broken on el7
Summary: epel-rpm-macros: %pycached broken on el7
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora EPEL
Classification: Fedora
Component: epel-rpm-macros
Version: epel7
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Miro Hrončok
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-04-22 22:07 UTC by Carl George 🤠
Modified: 2021-05-01 17:20 UTC (History)
5 users (show)

Fixed In Version: epel-rpm-macros-7-30
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-05-01 17:20:28 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

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.


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