Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 1953910
Summary: | Since rpm-4.16.90-0.git15395, python-srpm-macros in Lua are no longer found | ||||||
---|---|---|---|---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Miro Hrončok <mhroncok> | ||||
Component: | rpm | Assignee: | Packaging Maintenance Team <packaging-team-maint> | ||||
Status: | CLOSED ERRATA | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | ||||
Severity: | high | Docs Contact: | |||||
Priority: | unspecified | ||||||
Version: | rawhide | CC: | fweimer, igor.raits, lbalhar, mjw, packaging-team-maint, pmatilai, pmoravco, thrnciar, vmukhame | ||||
Target Milestone: | --- | ||||||
Target Release: | --- | ||||||
Hardware: | Unspecified | ||||||
OS: | Unspecified | ||||||
Whiteboard: | |||||||
Fixed In Version: | rpm-4.16.90-0.git15395.3.fc35 | Doc Type: | If docs needed, set a value | ||||
Doc Text: | Story Points: | --- | |||||
Clone Of: | Environment: | ||||||
Last Closed: | 2021-04-27 15:00:57 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: | |||||||
Bug Depends On: | |||||||
Bug Blocks: | 1890881, 1951105 | ||||||
Attachments: |
|
Description
Miro Hrončok
2021-04-27 07:24:13 UTC
Non-Lua macros from the same file work as before: # rpm --eval %python3 /usr/bin/python3 # rpm --eval %python3_pkgversion 3 Lua macros from different files still work: # rpm --eval '%pycached %{python3_sitelib}/foo.py' # from /usr/lib/rpm/macros.d/macros.python3 /usr/lib/python3.9/site-packages/foo.py /usr/lib/python3.9/site-packages/__pycache__/foo.cpython-39{,.opt-?}.pyc This blocks our Python 3.10 rebuild. It can also make packages build fine, but suddenly no longer build a subpackage with https://fedoraproject.org/wiki/Changes/PythonExtras -- but only for packages that only use (conditional) %python_extras_subpkg and not %pypi_source or %py3_dist. Created attachment 1775859 [details]
A diff between old and new `rpm --showrc` in an otherwise identical mock
I've attached a diff between old and new `rpm --showrc` in an otherwise identical mock.
Yup, easily reproduced. It's a regression introduced in https://github.com/rpm-software-management/rpm/commit/75275a87cff04da65d3557f2c40ea2b526528c4c and what it trips over is this comment line in that macro file: > Set to /bin/true to avoid %ifdefs and %{? in specfiles I'll revert the patch in rawhide to let builds continue and look for the proper fix afterwards. Just a sec. I've just debugged that macros above `# Set to /bin/true to avoid %ifdefs and %{? in specfiles` work fine and macros below don't. You were faster Should I escape the % in the comment? That sound s safer. It's a good question. In *spec* comments, macros are always expanded, but I don't recall offhand what should happen in macro file comments. Feel free to escape though, it's probably the best immediate fix. There is a bug in rpm nevertheless (either the %{ should be ignored in a comment or there should be an error for missing }). Building new rpm with the problematic patch reverted now: https://koji.fedoraproject.org/koji/taskinfo?taskID=66775049 Thanks for the revert. I'll also land https://src.fedoraproject.org/rpms/python-rpm-macros/pull-request/97 I wonder if it's better to just use %dnl "comments" in macro files instead of worrying about escaping rules. %dnl will *not* work in macro files because macro files are not expanded as they're read. So, as discussed in the upstream ticket, this wasn't so much a regression but unearthing an ancient bug - a bunch of macros in the same file were always being skipped due to the bug, but an otherwise unrelated change which permits macro body to include empty lines dragged the bug into the spotlight. Upstream fix was to not let comments affect parsing. I've reverted the revert, and added the upstream fix instead. Was about to close this but then it already was. FEDORA-2021-831cfbf901 has been pushed to the Fedora 35 stable repository. If problem still persists, please make note of it in this bug report. |