Bug 2276949

Summary: Review Request: rust-reqwest-middleware - Wrapper around reqwest to allow for client middleware chains
Product: [Fedora] Fedora Reporter: Ben Beasley <code>
Component: Package ReviewAssignee: Fabio Valentini <decathorpe>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: medium    
Version: rawhideCC: decathorpe, package-review
Target Milestone: ---Flags: decathorpe: fedora-review+
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2024-04-25 17:39:15 UTC Type: ---
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: 2277185    
Attachments:
Description Flags
Configuration file for rust2rpm
none
Updated configuration for rust2rpm none

Description Ben Beasley 2024-04-24 18:03:08 UTC
Spec URL: https://music.fedorapeople.org/rust-reqwest-middleware.spec
SRPM URL: https://music.fedorapeople.org/rust-reqwest-middleware-0.3.0-1.fc39.src.rpm

Description:

Wrapper around reqwest to allow for client middleware chains.

Fedora Account System Username: music

This is a dependency for a future package of https://pypi.org/project/uv.

The following were hand-edited from the output of rust2rpm:

- Added a BuildRequires on tomcli, since we can only add generated BR’s in rust2rpm.toml, and we need tomcli in %prep.
- Changed the patch level for %autosetup from -p1 to -p2 so we can apply patches created against the upstream git repository.
- Replaced "# FIXME: no license files detected" with "%license LICENSE-APACHE LICENSE-MIT"

Comment 1 Ben Beasley 2024-04-24 18:15:29 UTC
Created attachment 2028918 [details]
Configuration file for rust2rpm

Comment 2 Fabio Valentini 2024-04-25 09:56:24 UTC
I'm a little confused - you disable running tests from README.md because you claim it's not included in published crates - but it is?

Unpacking reqwest-middleware-0.3.0.crate shows it's in there. The only thing that's wrong is the path - it should be ../README.md, not ../../README.md (possibly because this crate is packaged from a subdirectory).

Other than that, package looks good to me.

Comment 3 Ben Beasley 2024-04-25 14:16:45 UTC
(In reply to Fabio Valentini from comment #2)
> I'm a little confused - you disable running tests from README.md because you
> claim it's not included in published crates - but it is?
> 
> Unpacking reqwest-middleware-0.3.0.crate shows it's in there. The only thing
> that's wrong is the path - it should be ../README.md, not ../../README.md
> (possibly because this crate is packaged from a subdirectory).

Hmm, you’re correct.

Normally, the right thing to do would be to carry a downstream-only patch that adjusts include_str!("../../README.md") to include_str!("../README.md") so that we can run the README tests.

In this case, I should still patch them out, because they introduce a test dependency on rust-reqwest-retry, and that package is going to have a build dependency on *this* package, so dropping the README tests breaks the bootstrapping loop.

However, I need to have a correct comment. I’ll prepare an updated submission. I’ll make rust2rpm take care of the tomcli BR while I’m at it.

Comment 4 Ben Beasley 2024-04-25 14:25:35 UTC
Created attachment 2029172 [details]
Updated configuration for rust2rpm

The following will be hand-edited from the output of rust2rpm:

- Changed the patch level for %autosetup from -p1 to -p2 so we can apply patches created against the upstream git repository.
- Replaced "# FIXME: no license files detected" with "%license LICENSE-APACHE LICENSE-MIT"

Comment 6 Ben Beasley 2024-04-25 14:30:31 UTC
https://release-monitoring.org/project/372146/

Comment 7 Fabio Valentini 2024-04-25 14:52:36 UTC
GETing those URLs returns 404.

Comment 8 Ben Beasley 2024-04-25 15:24:22 UTC
The SRPM was OK, but somehow I didn’t upload the spec. Fixed.

Comment 9 Fabio Valentini 2024-04-25 15:44:46 UTC
Looks good to me, thanks.

Can you replace this line:

> %license LICENSE-APACHE LICENSE-MIT

With these two please?

> %license %{crate_instdir}/LICENSE-APACHE
> %license %{crate_instdir}/LICENSE-MIT

Otherwise the files will end up duplicated in the built package (once in /usr/share/licenses/ and once in /usr/share/cargo/registry/).

===

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 (some tests disabled with explanation)
- latest version of the crate is packaged
- license matches upstream specification and is acceptable for Fedora
- license files are included with %license in %files (included manually from upstream git repo)
- package complies with Rust Packaging Guidelines

Package APPROVED.

===

Recommended post-import rust-sig tasks:

- 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

- add @rust-sig with "commit" access as package co-maintainer
  (should happen automatically)

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

- track package in koschei for all built branches
  (should happen automatically once rust-sig is co-maintainer)

Comment 10 Fabio Valentini 2024-04-25 15:45:05 UTC
Note that there's a typo in the patch comment: reqwests-retry -> reqwest-retry

Comment 11 Ben Beasley 2024-04-25 17:01:34 UTC
Thanks! I’ll fix both of the things you noticed on import.

Comment 12 Fedora Admin user for bugzilla script actions 2024-04-25 17:04:10 UTC
The Pagure repository was created at https://src.fedoraproject.org/rpms/rust-reqwest-middleware

Comment 13 Fedora Update System 2024-04-25 17:34:14 UTC
FEDORA-2024-58793be98d (rust-reqwest-middleware-0.3.0-1.fc41) has been submitted as an update to Fedora 41.
https://bodhi.fedoraproject.org/updates/FEDORA-2024-58793be98d

Comment 14 Fedora Update System 2024-04-25 17:39:15 UTC
FEDORA-2024-58793be98d (rust-reqwest-middleware-0.3.0-1.fc41) has been pushed to the Fedora 41 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 15 Fedora Update System 2024-05-16 18:15:21 UTC
FEDORA-2024-c2abca435e (rust-bisection-0.1.0-2.fc40, rust-http-content-range-0.1.2-1.fc40, and 4 more) has been submitted as an update to Fedora 40.
https://bodhi.fedoraproject.org/updates/FEDORA-2024-c2abca435e

Comment 16 Fedora Update System 2024-05-16 18:15:33 UTC
FEDORA-2024-0bfd6dabc2 (rust-bisection-0.1.0-2.fc39, rust-http-content-range-0.1.2-1.fc39, and 4 more) has been submitted as an update to Fedora 39.
https://bodhi.fedoraproject.org/updates/FEDORA-2024-0bfd6dabc2

Comment 17 Fedora Update System 2024-05-17 01:36:42 UTC
FEDORA-2024-0bfd6dabc2 has been pushed to the Fedora 39 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf install --enablerepo=updates-testing --refresh --advisory=FEDORA-2024-0bfd6dabc2 \*`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2024-0bfd6dabc2

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

Comment 18 Fedora Update System 2024-05-17 02:09:49 UTC
FEDORA-2024-c2abca435e has been pushed to the Fedora 40 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf install --enablerepo=updates-testing --refresh --advisory=FEDORA-2024-c2abca435e \*`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2024-c2abca435e

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

Comment 19 Fedora Update System 2024-05-22 01:11:32 UTC
FEDORA-2024-c2abca435e has been pushed to the Fedora 40 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf install --enablerepo=updates-testing --refresh --advisory=FEDORA-2024-c2abca435e \*`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2024-c2abca435e

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

Comment 20 Fedora Update System 2024-05-22 01:48:36 UTC
FEDORA-2024-0bfd6dabc2 has been pushed to the Fedora 39 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf install --enablerepo=updates-testing --refresh --advisory=FEDORA-2024-0bfd6dabc2 \*`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2024-0bfd6dabc2

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

Comment 21 Fedora Update System 2024-05-30 01:19:37 UTC
FEDORA-2024-0bfd6dabc2 (rust-async_http_range_reader-0.8.0-1.fc39, rust-bisection-0.1.0-2.fc39, and 6 more) has been pushed to the Fedora 39 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 22 Fedora Update System 2024-05-30 01:21:04 UTC
FEDORA-2024-c2abca435e (rust-async_http_range_reader-0.8.0-1.fc40, rust-bisection-0.1.0-2.fc40, and 6 more) has been pushed to the Fedora 40 stable repository.
If problem still persists, please make note of it in this bug report.