Bug 2276462 - Review Request: rust-state - Library for safe and effortless global and thread-local state management
Summary: Review Request: rust-state - Library for safe and effortless global and threa...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: Unspecified
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Fabio Valentini
QA Contact: Fedora Extras Quality Assurance
URL: https://crates.io/crates/state
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2024-04-22 15:19 UTC by wojnilowicz
Modified: 2024-05-27 15:23 UTC (History)
2 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2024-05-27 15:23:20 UTC
Type: ---
Embargoed:
decathorpe: fedora-review+


Attachments (Terms of Use)

Description wojnilowicz 2024-04-22 15:19:32 UTC
Spec URL: https://wojnilowicz.fedorapeople.org/rust-state.spec
SRPM URL: https://wojnilowicz.fedorapeople.org/rust-state-0.6.0-1.fc39.src.rpm

Description:  Library for safe and effortless global and thread-local state management
Fedora Account System Username: wojnilowicz

I plan on packaging https://github.com/ActivityWatch/aw-server-rust and state package is in its requirements chain. The chain is as follows: aw-server-rust->rocket->state.

Reproducible: Always

Comment 1 wojnilowicz 2024-05-09 18:45:28 UTC
[fedora-review-service-build]

Comment 2 Fedora Review Service 2024-05-09 18:54:11 UTC
Copr build:
https://copr.fedorainfracloud.org/coprs/build/7429315
(succeeded)

Review template:
https://download.copr.fedorainfracloud.org/results/@fedora-review/fedora-review-2276462-rust-state/fedora-rawhide-x86_64/07429315-rust-state/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 3 Fabio Valentini 2024-05-17 13:47:12 UTC
There's a few small issues:

- Don't override the %description. The generated one is fine.

- Don't "rm" the license files for the bundled thread_local code.

- Don't remove the "%license" file entries for the bundled thread_local code.

- Add "Provides: bundled(crate(thread_local)) = <version>" to the "-devel" subpackage.

I'm not sure why the thread_local code is bundled at all, it doesn't seem to be documented.
But it *is* bundled, and it needs to be specified in RPM metadata.

Maybe you can find out which version of the thread_local crate is bundled.

Comment 4 wojnilowicz 2024-05-17 15:19:29 UTC
(In reply to Fabio Valentini from comment #3)
> There's a few small issues:
> 
> - Don't override the %description. The generated one is fine.

Done.

> - Don't "rm" the license files for the bundled thread_local code.

Done.

> - Don't remove the "%license" file entries for the bundled thread_local code.

Done.

> - Add "Provides: bundled(crate(thread_local)) = <version>" to the "-devel"
> subpackage.

Done.

> I'm not sure why the thread_local code is bundled at all, it doesn't seem to
> be documented.
> But it *is* bundled, and it needs to be specified in RPM metadata.
> 
> Maybe you can find out which version of the thread_local crate is bundled.

Indeed. Here are my findings:
1) thread_local imported (on 2020-10-28) with this commit https://github.com/SergioBenitez/state/commit/9a3f70afb8cf5a4501622066fca1b37170c4a616
2) not synchronized with thread_local afterwards
3) thread_local 1.0.1 on crates.io is from 2020-01-11, so it's probable this was imported
4) thread_local 1.1.0 on crates.io is from 2021-01-07, so it's impossible this was imported
5) thread_id.rs and unreachable.rs from "state" matches 100% with "thread_local" 1.1.0
6) mod.rs (9,2 KB) from "state" is a heavily modified version of lib.rs (18,8 KB) from "thread_local"

It seems that "state" forked "thread_local". Are you sure that we should add "Provides: bundled(crate(thread_local)) = 1.0.1" then?

Anyway, I've updated my spec and src.rpm file in the first post.

Comment 5 Fabio Valentini 2024-05-26 17:16:27 UTC
Sorry for the delay - this indeed slipped through the cracks of my TODO list.

Thank you for addressing the issues, I will do the final review now.

Comment 6 Fabio Valentini 2024-05-26 17:25:52 UTC
Looks good to me now.

I think having the Provides for the bundled thread_local crate is OK for now.
If the code diverges further, we can treat it as an actual fork.
For now it seems to be sufficiently similar to the original for us to treat it as "bundled, but modified".
This also seems to be upstream's intention, since the original license texts are still included.

===

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 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:

- 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 7 Fedora Admin user for bugzilla script actions 2024-05-27 15:00:29 UTC
The Pagure repository was created at https://src.fedoraproject.org/rpms/rust-state

Comment 8 wojnilowicz 2024-05-27 15:11:20 UTC
I'm glad it's moving forward. Thanks.

Comment 9 Fedora Update System 2024-05-27 15:19:00 UTC
FEDORA-2024-fff3355841 (rust-state-0.6.0-1.fc41) has been submitted as an update to Fedora 41.
https://bodhi.fedoraproject.org/updates/FEDORA-2024-fff3355841

Comment 10 Fedora Update System 2024-05-27 15:23:20 UTC
FEDORA-2024-fff3355841 (rust-state-0.6.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.


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