Bug 2150509

Summary: Review Request: rust-mutate_once - Interior mutability, write-once and borrowable as plain &T
Product: [Fedora] Fedora Reporter: Kalev Lember <klember>
Component: Package ReviewAssignee: Fabio Valentini <decathorpe>
Status: CLOSED RAWHIDE 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   
URL: https://crates.io/crates/mutate_once
Whiteboard:
Fixed In Version: rust-mutate_once-0.1.1-2.fc39 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-03-23 21:41:01 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: 2150511    

Description Kalev Lember 2022-12-03 15:16:23 UTC
Spec URL: https://kalev.fedorapeople.org/rust-mutate_once.spec
SRPM URL: https://kalev.fedorapeople.org/rust-mutate_once-0.1.1-1.fc38.src.rpm
Description:
Interior mutability, write-once and borrowable as plain &T.

Fedora Account System Username: kalev

Koji scratch build: https://koji.fedoraproject.org/koji/taskinfo?taskID=94882531

Comment 1 Fabio Valentini 2022-12-12 12:09:26 UTC
I think you'll need to include a license file. It's literally clause 1 of the BSD-2-Clause license:

> 1. Redistributions of source code must retain the above copyright notice, this
>    list of conditions and the following disclaimer.

Comment 2 Fabio Valentini 2022-12-12 12:14:30 UTC
As an alternative, it might be possible to migrate the code that uses this crate to use the once_cell crate, instead?
https://crates.io/crates/once_cell

It's pretty much the standard solution for the "set once, read many" problem nowadays, it's actively maintained, and its functionality is probably going to be merged into the Rust standard library at some point: https://github.com/rust-lang/rfcs/pull/2788

Comment 3 Kalev Lember 2023-03-23 20:51:44 UTC
Sorry for the slow reply!

I filed https://github.com/kamadak/mutate_once-rs/issues/1 together with the package review request and upstream just added a LICENSE file in the repository. Let me add that to the downstream packaging now.

Comment 4 Fabio Valentini 2023-03-23 21:01:09 UTC
Yes, you can include the upstream license text as a separate source and include it in the package manually until upstream publishes a new release, i.e. something like

Source1: https://github.com/kamadak/mutate_once-rs/raw/0dc8ba7/LICENSE

%prep
(...)
cp -pav %{SOURCE1} .

%files
%license %{crate_instdir}/LICENSE
(...)

Comment 5 Kalev Lember 2023-03-23 21:09:47 UTC
* Thu Mar 23 2023 Kalev Lember <klember> - 0.1.1-2
- Add missing LICENSE file from upstream

Spec URL: https://kalev.fedorapeople.org/rust-mutate_once.spec
SRPM URL: https://kalev.fedorapeople.org/rust-mutate_once-0.1.1-2.fc39.src.rpm

Koji scratch build: https://koji.fedoraproject.org/koji/taskinfo?taskID=99062739

Comment 6 Jakub Kadlčík 2023-03-23 21:17:14 UTC
Copr build:
https://copr.fedorainfracloud.org/coprs/build/5701570
(succeeded)

Review template:
https://download.copr.fedorainfracloud.org/results/@fedora-review/fedora-review-2150509-rust-mutate_once/fedora-rawhide-x86_64/05701570-rust-mutate_once/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 7 Fabio Valentini 2023-03-23 21:19:49 UTC
Thanks for the update! 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) and is acceptable for Fedora
- license file is included with %license in %files (manually included until next release)
- package complies with Rust Packaging Guidelines

Package APPROVED.

===

Recommended post-import rust-sig tasks:

- add @rust-sig 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

Comment 8 Fedora Admin user for bugzilla script actions 2023-03-23 21:28:27 UTC
The Pagure repository was created at https://src.fedoraproject.org/rpms/rust-mutate_once

Comment 9 Kalev Lember 2023-03-23 21:41:01 UTC
Thank you! Package imported and build is under way.