Bug 2181021 - Review Request: rust-crc64 - CRC64 checksum implementation
Summary: Review Request: rust-crc64 - CRC64 checksum implementation
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: https://crates.io/crates/crc64
Whiteboard:
Depends On:
Blocks: 2181030 2181039
TreeView+ depends on / blocked
 
Reported: 2023-03-22 21:27 UTC by fedora.dm0
Modified: 2023-03-31 01:33 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-03-28 12:09:04 UTC
Type: ---
Embargoed:
decathorpe: fedora-review+


Attachments (Terms of Use)

Description fedora.dm0 2023-03-22 21:27:25 UTC
Spec URL: https://github.com/dm0-/copr-firecracker/raw/fedora/rust-crc64.spec
SRPM URL: https://github.com/dm0-/copr-firecracker/raw/fedora/rust-crc64-1.0.0-1.fc37.src.rpm
Description: CRC64 checksum implementation.
Fedora Account System Username: dm0

This is a dependency of the versionize crate, specifically the older 1.0 branch.  The spec is automatically generated, except for a minor edit to the summary to add back the function name.  Note that this builds a subpackage for the crc64 executable.

Comment 1 Jakub Kadlčík 2023-03-22 21:33:56 UTC
Copr build:
https://copr.fedorainfracloud.org/coprs/build/5696220
(succeeded)

Review template:
https://download.copr.fedorainfracloud.org/results/@fedora-review/fedora-review-2181021-rust-crc64/fedora-rawhide-x86_64/05696220-rust-crc64/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 2 Fabio Valentini 2023-03-23 14:06:23 UTC
Two comments:

1. The latest version is 2.0.0, but you're packaging 1.0.0. Please confirm that this is intentional.

2. The package ships a "crc64" package that contains /usr/bin/crc64.
There doesn't appear to be any other package in Fedora that provides this binary, so it should be fine.
Since this crate has no dependencies it should also be correct from a license standpoint (i.e. you don't need to list and take into account licenses of statically linked dependencies if there are none).

But if you don't need the /usr/bin/crc64 binary (i.e. firecracker only uses the Rust library and not the "crc64" executable), you could drop it from the package, it would make builds a bit faster. For example, this patch would do it ("rust2rpm -p" is your friend):

```
--- crc64-1.0.0/Cargo.toml	2016-01-07T03:02:35+00:00
+++ crc64-1.0.0/Cargo.toml	2023-03-23T14:01:59.277230+00:00
@@ -7,12 +7,8 @@
 homepage = "https://github.com/badboy/crc64-rs"
 license = "BSD-3-Clause"
 readme = "README.md"
+autobins = false
 
 [lib]
 name = "crc64"
 path = "src/lib.rs"
-
-[[bin]]
-name = "crc64"
-path = "src/main.rs"
-doc  = false
```

Comment 3 fedora.dm0 2023-03-24 14:27:05 UTC
I updated the spec to patch out the binary, and yes, 1.0 is needed specifically: https://github.com/firecracker-microvm/versionize/blob/3385d797c5e5f547562d8d83fb49de69f917e1f2/Cargo.toml#L17

Comment 4 Fabio Valentini 2023-03-27 15:52:48 UTC
Great, looks good to me!

Just add a short comment between these two lines to explain what the patch does:

 # Manually created patch for downstream crate metadata changes
+# * prevent crc64 binary from being built and shipped
 Patch:          crc64-fix-metadata.diff

or something like that.

===

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-3-Clause) and is acceptable for Fedora
- license file is included with %license in %files
- 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 5 Fedora Admin user for bugzilla script actions 2023-03-27 16:08:22 UTC
The Pagure repository was created at https://src.fedoraproject.org/rpms/rust-crc64

Comment 6 fedora.dm0 2023-03-27 16:57:15 UTC
This seems to be failing tests on s390x.

https://kojipkgs.fedoraproject.org/work/tasks/7825/99197825/build.log

The failing test is the function to check if the algorithm works at all.  Should I skip tests based on architecture, or use ExcludeArch?  I think that would only require another ExcludeArch on rust-versionize.

Comment 7 Fabio Valentini 2023-03-27 17:04:13 UTC
Meh, the *one* crate where I think "it's a checksum calculator, what can go wrong, no need to run a scratch build" fails on big-endian arches ...

If the package does not work at all on big-endian architectures, then that's unfortunate ... adding "ExcludeArch: s390x" to this package and every crate that depends on it is OK in this case, but consider reporting the failure to the upstream project, and add a comment with the link to the upstream report above the ExcludeArch line.

Comment 8 fedora.dm0 2023-03-27 22:35:40 UTC
I tested it on a PowerPC G4 system, and it looks like updating to 2.0.0 fixes the failures.  I've proposed it upstream here: https://github.com/firecracker-microvm/versionize/pull/54

If they agree to that, I'll update the rust-crc64 package to the latest version.  The only difference in the automatically generated spec is the version number.  Here is a new SRPM URL if you want to re-review anyway: https://github.com/dm0-/copr-firecracker/raw/fedora/rust-crc64-2.0.0-1.fc37.src.rpm

Comment 9 Fedora Update System 2023-03-28 12:07:49 UTC
FEDORA-2023-b090d830e6 has been submitted as an update to Fedora 39. https://bodhi.fedoraproject.org/updates/FEDORA-2023-b090d830e6

Comment 10 Fabio Valentini 2023-03-28 12:08:01 UTC
Great, this is a good outcome all around. Thanks for pushing this upstream!

Comment 11 Fedora Update System 2023-03-28 12:09:04 UTC
FEDORA-2023-b090d830e6 has been pushed to the Fedora 39 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 12 Fedora Update System 2023-03-28 19:44:16 UTC
FEDORA-2023-02106a6c13 has been submitted as an update to Fedora 38. https://bodhi.fedoraproject.org/updates/FEDORA-2023-02106a6c13

Comment 13 Fedora Update System 2023-03-28 19:44:19 UTC
FEDORA-2023-a4085b6295 has been submitted as an update to Fedora 37. https://bodhi.fedoraproject.org/updates/FEDORA-2023-a4085b6295

Comment 14 Fedora Update System 2023-03-29 02:02:20 UTC
FEDORA-2023-02106a6c13 has been pushed to the Fedora 38 testing repository.

You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2023-02106a6c13

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

Comment 15 Fedora Update System 2023-03-29 03:55:48 UTC
FEDORA-2023-a4085b6295 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-2023-a4085b6295 \*`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2023-a4085b6295

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

Comment 16 Fedora Update System 2023-03-30 01:19:40 UTC
FEDORA-2023-a4085b6295 has been pushed to the Fedora 37 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 17 Fedora Update System 2023-03-31 01:33:49 UTC
FEDORA-2023-02106a6c13 has been pushed to the Fedora 38 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.