Bug 2387563 - Review Request: python-norpm - RPM Macro Expansion in Python
Summary: Review Request: python-norpm - RPM Macro Expansion in Python
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Miro Hrončok
QA Contact: Fedora Extras Quality Assurance
URL: https://pypi.org/project/norpm/
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2025-08-11 09:01 UTC by Pavel Raiskup
Modified: 2025-08-21 01:12 UTC (History)
2 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2025-08-21 00:36:18 UTC
Type: ---
Embargoed:
mhroncok: fedora-review+


Attachments (Terms of Use)
The .spec file difference from Copr build 9396756 to 9397175 (1.29 KB, patch)
2025-08-11 10:42 UTC, Fedora Review Service
no flags Details | Diff
The .spec file difference from Copr build 9397175 to 9399806 (1.00 KB, patch)
2025-08-11 21:07 UTC, Fedora Review Service
no flags Details | Diff

Description Pavel Raiskup 2025-08-11 09:01:12 UTC
Spec URL: https://raw.githubusercontent.com/praiskup/norpm/refs/heads/main/python-norpm.spec
SRPM URL: https://copr-be.cloud.fedoraproject.org/results/praiskup/norpm-review/fedora-rawhide-x86_64/09396745-python-norpm/python-norpm-1.1-1.fc43.src.rpm

Description:
Parse RPM macro and spec files, expanding macros safely—without any potential
Turing-complete side effects.

This is a standalone library and set of tools that depend only on the standard
Python library and PLY (used for expression parsing).

Fedora Account System Username: praiskup

Comment 1 Fedora Review Service 2025-08-11 09:01:41 UTC
Cannot find any valid SRPM URL for this ticket. Common causes are:

- You didn't specify `SRPM URL: ...` in the ticket description
  or any of your comments
- The URL schema isn't HTTP or HTTPS
- The SRPM package linked in your URL doesn't match the package name specified
  in the ticket summary


---
This comment was created by the fedora-review-service
https://github.com/FrostyX/fedora-review-service

If you want to trigger a new Copr build, add a comment containing new
Spec and SRPM URLs or [fedora-review-service-build] string.

Comment 2 Pavel Raiskup 2025-08-11 09:03:37 UTC
[fedora-review-service-build]

Comment 3 Fedora Review Service 2025-08-11 09:07:39 UTC
Copr build:
https://copr.fedorainfracloud.org/coprs/build/9396756
(succeeded)

Review template:
https://download.copr.fedorainfracloud.org/results/@fedora-review/fedora-review-2387563-python-norpm/fedora-rawhide-x86_64/09396756-python-norpm/fedora-review/review.txt

Please take a look if any issues were found.


---
This comment was created by the fedora-review-service
https://github.com/FrostyX/fedora-review-service

If you want to trigger a new Copr build, add a comment containing new
Spec and SRPM URLs or [fedora-review-service-build] string.

Comment 4 Miro Hrončok 2025-08-11 09:27:37 UTC
Spec sanity:


> Release:        1%{?dist}

Consider %autorelease, it is the preferred way for Fedora packages.


> URL:            https://pypi.org/project/norpm/

Consider using https://github.com/praiskup/norpm instead, which is more useful to the users and more accurate as "the project URL". 


> %check
> %pyproject_check_import

Please do run tests from https://github.com/praiskup/norpm/tree/main/tests or document the reasons for not doing so.


> %_bindir/norpm-expand-specfile

I was surprised by %_bindir. Most of our packages use %{_bindir}:

  $ rg -lF '%_bindir' | wc -l
  84
  $ rg -lF '%{_bindir}' | wc -l
  8747

Obviously, this is opinionated, but readability counts.

Comment 5 Miro Hrončok 2025-08-11 09:28:40 UTC
rpmlint reports:

  python3-norpm.noarch: E: non-executable-script /usr/lib/python3.14/site-packages/norpm/cli/expand_specfile.py 644 /bin/python3
  python3-norpm.noarch: E: non-executable-script /usr/lib/python3.14/site-packages/norpm/expression.py 644 /usr/bin/python3

Why do the files have shebangs at all?

Comment 6 Pavel Raiskup 2025-08-11 10:38:44 UTC
Spec URL: https://raw.githubusercontent.com/praiskup/norpm/refs/heads/main/python-norpm.spec
SRPM URL: https://download.copr.fedorainfracloud.org/results/praiskup/norpm-review/srpm-builds/09397166/python-norpm-1.2-1.src.rpm

> Consider %autorelease, it is the preferred way for Fedora packages.

TL;DR, I'd prefer staying with manual Release/%changelog.
Long story... well you are not asking, so trying to not distract you.

> Consider using https://github.com/praiskup/norpm instead, which is more useful to the users and more accurate as "the project URL".

Fixed.

> Please do run tests from https://github.com/praiskup/norpm/tree/main/tests or document the reasons for not doing so.

Fixed.

> I was surprised by %_bindir. Most of our packages use %{_bindir}:

Yeah, I prefer to make the syntax simpler, and use curly brackets
only if necessary (like with shell's `$foobar` vs `${foo}bar`.

> Obviously, this is opinionated, but readability counts.

+1 for readability.  The pyp2spec generated few of {} for me, so
I just made the current spec file consistent.

> Why do the files have shebangs at all?

Fixed.

Comment 7 Fedora Review Service 2025-08-11 10:42:35 UTC
Created attachment 2103256 [details]
The .spec file difference from Copr build 9396756 to 9397175

Comment 8 Fedora Review Service 2025-08-11 10:42:37 UTC
Copr build:
https://copr.fedorainfracloud.org/coprs/build/9397175
(succeeded)

Review template:
https://download.copr.fedorainfracloud.org/results/@fedora-review/fedora-review-2387563-python-norpm/fedora-rawhide-x86_64/09397175-python-norpm/fedora-review/review.txt

Please take a look if any issues were found.


---
This comment was created by the fedora-review-service
https://github.com/FrostyX/fedora-review-service

If you want to trigger a new Copr build, add a comment containing new
Spec and SRPM URLs or [fedora-review-service-build] string.

Comment 9 Miro Hrončok 2025-08-11 17:43:58 UTC
Typo double h in hhttps in URL: hhttps://github.com/praiskup/norpm

> # Test dependencies:
> BuildRequires:  python3dist(pytest)

Consider specifying this upstream via dependency groups. That way, you don't need to repeat the in the spec (and your upstream CI config)

https://packaging.python.org/en/latest/specifications/dependency-groups/


> %license COPYING

This is redundant with %pyproject_save_files -l.

Comment 10 Pavel Raiskup 2025-08-11 21:03:26 UTC
Spec URL: https://raw.githubusercontent.com/praiskup/norpm/refs/heads/main/python-norpm.spec
SRPM URL: https://download.copr.fedorainfracloud.org/results/praiskup/norpm-review/fedora-rawhide-x86_64/09399800-python-norpm/python-norpm-1.3-1.fc43.src.rpm

> Typo double h in hhttps in URL: hhttps://github.com/praiskup/norpm

Fixed.

> Consider specifying this upstream via dependency groups. That way, you don't need to repeat the in the spec (and your upstream CI config)

Done.

> This is redundant with %pyproject_save_files -l.

Fixed.

Thanks.

Comment 11 Fedora Review Service 2025-08-11 21:07:40 UTC
Created attachment 2103298 [details]
The .spec file difference from Copr build 9397175 to 9399806

Comment 12 Fedora Review Service 2025-08-11 21:07:43 UTC
Copr build:
https://copr.fedorainfracloud.org/coprs/build/9399806
(succeeded)

Review template:
https://download.copr.fedorainfracloud.org/results/@fedora-review/fedora-review-2387563-python-norpm/fedora-rawhide-x86_64/09399806-python-norpm/fedora-review/review.txt

Please take a look if any issues were found.


---
This comment was created by the fedora-review-service
https://github.com/FrostyX/fedora-review-service

If you want to trigger a new Copr build, add a comment containing new
Spec and SRPM URLs or [fedora-review-service-build] string.

Comment 13 Miro Hrončok 2025-08-12 06:58:07 UTC
Based on https://download.copr.fedorainfracloud.org/results/@fedora-review/fedora-review-2387563-python-norpm/fedora-rawhide-x86_64/09399806-python-norpm/fedora-review/review.txt and build log and:

$ rpm -qRp python-norpm-1.3-1.fc43.src.rpm 
(python3dist(tomli) if python3-devel < 3.11)
pyproject-rpm-macros
python3-devel
python3-devel
python3dist(packaging)
python3dist(pip) >= 19
python3dist(ply)
python3dist(pytest)
python3dist(setuptools)
rpmlib(CompressedFileNames) <= 3.0.4-1
rpmlib(DynamicBuildRequires) <= 4.15.0-1
rpmlib(FileDigests) <= 4.6.0-1
rpmlib(RichDependencies) <= 4.12.0-1

$ rpm -qRp python3-norpm-1.3-1.fc43.noarch.rpm 
/usr/bin/python3
python(abi) = 3.14
python3.14dist(ply)
rpmlib(CompressedFileNames) <= 3.0.4-1
rpmlib(FileDigests) <= 4.6.0-1
rpmlib(PartialHardlinkSets) <= 4.0.4-1
rpmlib(PayloadFilesHavePrefix) <= 4.0-1
rpmlib(PayloadIsZstd) <= 5.4.18-1

$ rpm -qPp python3-norpm-1.3-1.fc43.noarch.rpm 
python-norpm = 1.3-1.fc43
python3-norpm = 1.3-1.fc43
python3.14-norpm = 1.3-1.fc43
python3.14dist(norpm) = 1.3
python3dist(norpm) = 1.3


Package APPROVED.

Comment 14 Fedora Admin user for bugzilla script actions 2025-08-12 09:26:22 UTC
The Pagure repository was created at https://src.fedoraproject.org/rpms/python-norpm

Comment 15 Fedora Update System 2025-08-12 09:45:51 UTC
FEDORA-2025-47b6c72763 (python-norpm-1.3-1.fc41) has been submitted as an update to Fedora 41.
https://bodhi.fedoraproject.org/updates/FEDORA-2025-47b6c72763

Comment 16 Fedora Update System 2025-08-12 09:45:52 UTC
FEDORA-EPEL-2025-588709763f (python-norpm-1.3-1.el10_0) has been submitted as an update to Fedora EPEL 10.0.
https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2025-588709763f

Comment 17 Fedora Update System 2025-08-13 00:59:08 UTC
FEDORA-2025-26fc8e2198 has been pushed to the Fedora 42 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf install --enablerepo=updates-testing --refresh --advisory=FEDORA-2025-26fc8e2198 \*`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2025-26fc8e2198

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

Comment 18 Fedora Update System 2025-08-13 01:35:24 UTC
FEDORA-EPEL-2025-c6b2076628 has been pushed to the Fedora EPEL 10.1 testing repository.

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

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

Comment 19 Fedora Update System 2025-08-13 01:40:12 UTC
FEDORA-EPEL-2025-588709763f has been pushed to the Fedora EPEL 10.0 testing repository.

You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2025-588709763f

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

Comment 20 Fedora Update System 2025-08-13 02:04:47 UTC
FEDORA-2025-47b6c72763 has been pushed to the Fedora 41 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf install --enablerepo=updates-testing --refresh --advisory=FEDORA-2025-47b6c72763 \*`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2025-47b6c72763

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

Comment 21 Fedora Update System 2025-08-21 00:36:18 UTC
FEDORA-EPEL-2025-c6b2076628 (python-norpm-1.3-1.el10_1) has been pushed to the Fedora EPEL 10.1 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 22 Fedora Update System 2025-08-21 00:44:07 UTC
FEDORA-EPEL-2025-588709763f (python-norpm-1.3-1.el10_0) has been pushed to the Fedora EPEL 10.0 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 23 Fedora Update System 2025-08-21 00:54:22 UTC
FEDORA-2025-26fc8e2198 (python-norpm-1.3-1.fc42) has been pushed to the Fedora 42 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 24 Fedora Update System 2025-08-21 01:12:17 UTC
FEDORA-2025-47b6c72763 (python-norpm-1.3-1.fc41) has been pushed to the Fedora 41 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.