Bug 2151236 - Review Request: rust-pep440 - Parse and compare Python PEP440 style version numbers
Summary: Review Request: rust-pep440 - Parse and compare Python PEP440 style version n...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Fabio Valentini
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-12-06 12:59 UTC by Lumír Balhar
Modified: 2022-12-24 01:18 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-12-13 20:22:36 UTC
Type: ---
Embargoed:
decathorpe: fedora-review+


Attachments (Terms of Use)

Description Lumír Balhar 2022-12-06 12:59:19 UTC
Spec URL: https://lbalhar.fedorapeople.org/rust-pep440.spec
SRPM URL: https://lbalhar.fedorapeople.org/rust-pep440-0.2.0-1.fc37.src.rpm
Description: Parse and compare Python PEP440 style version numbers.
Fedora Account System Username: lbalhar

Comment 1 Fabio Valentini 2022-12-06 15:42:37 UTC
> # Do not ship tests
> rm -r %{buildroot}/%{crate_instdir}/tests

Where did you get this from? In general, this is not necessary, and in some cases, doing this might even break builds of this crate as dependency of other packages. Since tests are usually just a few 100s to 1000s of bytes, we don't bother dealing with the potential for breaking things by removing the files.

Comment 2 Lumír Balhar 2022-12-06 21:03:05 UTC
Interesting, I did not know that this might break anything. I did it because one of the brp scripts failed because one of the Python scripts in tests contain a wrong shebang. I thought that there is no reason to ship tests with the package so instead of fixing or removing the shebang I've removed all the test files. Do I understand correctly that fixing the shebang is a better idea?

Comment 3 Fabio Valentini 2022-12-06 21:34:23 UTC
Yes. In this case, I think removing the tests/ directory would be fine, since the files are not referenced explicitly in Cargo.toml (i.e. the tests there are only found by cargo autodiscovery in the usual "tests" directory). But in general, just removing broken shebangs or stray executable bits should be safer, and not break builds of the crate.

Or, in this case, you could just remove the "gen_test_cases.py" script (assuming it's the file with the unwanted shebang), since it's neither executed during tests, nor needed for building the crate - i.e. add `rm tests/gen_test_cases.py` between %autosetup and %cargo_prep. Doing it in %prep also ensures that if removing the file has any negative effects, they also happen during the package's build, and not only in subsequent builds of this crate as dependency of another package.

Other than that, the package looks good to me, and I'll approve it once that's sorted out.

Comment 4 Lumír Balhar 2022-12-07 06:46:16 UTC
All right, thanks! Now, I'm removing the Python script in %prep before %cargo_prep.

Comment 5 Fabio Valentini 2022-12-09 23:07:41 UTC
Thanks, looks good to me now!

===

Package was generated with rust2rpm, simplifying the review.

- package builds and installs without errors on rawhide
- test suite is run and all unit tests pass
- latest version of the crate is packaged
- license matches upstream specification (BSD-2-Clause OR Apache-2.0) and is acceptable for Fedora
- license files are included with %license in %files
- package complies with Rust Packaging Guidelines

Package APPROVED.

===

Recommended post-import rust-sig tasks:

- add the rust-sig group with "commit" access as package co-maintainer

- set bugzilla assignee overrides to @rust-sig (optional)

- set up package on release-monitoring.org:
  project: $crate
  homepage: https://crates.io/crates/$crate
  backend: crates.io
  version scheme: semantic
  version filter: alpha;beta;rc;pre
  distro: Fedora
  Package: rust-$crate

- track package in koschei for all built branches

===

Please also request f37 and f36 branches of this package.
While it might take some time to get maturin packaged, I'd like to do as much of the work to get built for all branches of Fedora up-front.

Comment 6 Fedora Update System 2022-12-13 20:15:09 UTC
FEDORA-2022-8ec824f5c1 has been submitted as an update to Fedora 38. https://bodhi.fedoraproject.org/updates/FEDORA-2022-8ec824f5c1

Comment 7 Fedora Update System 2022-12-13 20:22:36 UTC
FEDORA-2022-8ec824f5c1 has been pushed to the Fedora 38 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 8 Fedora Update System 2022-12-14 06:17:46 UTC
FEDORA-2022-24a861ffeb has been submitted as an update to Fedora 37. https://bodhi.fedoraproject.org/updates/FEDORA-2022-24a861ffeb

Comment 9 Fedora Update System 2022-12-15 01:20:39 UTC
FEDORA-2022-24a861ffeb has been pushed to the Fedora 37 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf install --enablerepo=updates-testing --refresh --advisory=FEDORA-2022-24a861ffeb \*`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2022-24a861ffeb

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

Comment 10 Fedora Update System 2022-12-15 09:33:29 UTC
FEDORA-2022-405404e193 has been submitted as an update to Fedora 36. https://bodhi.fedoraproject.org/updates/FEDORA-2022-405404e193

Comment 11 Fedora Update System 2022-12-16 02:37:59 UTC
FEDORA-2022-405404e193 has been pushed to the Fedora 36 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf install --enablerepo=updates-testing --refresh --advisory=FEDORA-2022-405404e193 \*`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2022-405404e193

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

Comment 12 Fedora Update System 2022-12-23 01:19:10 UTC
FEDORA-2022-24a861ffeb has been pushed to the Fedora 37 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 13 Fedora Update System 2022-12-24 01:18:38 UTC
FEDORA-2022-405404e193 has been pushed to the Fedora 36 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.