Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 2257076 - Review Request: rust-libcramjam - Compression library combining a plethora of algorithms
Summary: Review Request: rust-libcramjam - Compression library combining a plethora of...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: All
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Fabio Valentini
QA Contact: Fedora Extras Quality Assurance
URL: https://crates.io/crates/libcramjam
Whiteboard:
Depends On: 2256960 2256974 2256975
Blocks: fedora-neuro, NeuroFedora 2246802 2257285
TreeView+ depends on / blocked
 
Reported: 2024-01-06 17:18 UTC by Ben Beasley
Modified: 2024-02-13 02:56 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2024-01-31 23:37:26 UTC
Type: Bug
Embargoed:
decathorpe: fedora-review+


Attachments (Terms of Use)

Description Ben Beasley 2024-01-06 17:18:26 UTC
Spec URL: https://music.fedorapeople.org/rust-libcramjam.spec
SRPM URL: https://music.fedorapeople.org/rust-libcramjam-0.1.5-1.fc40.src.rpm

Description:

Compression library combining a plethora of algorithms in a similar as
possible API.

Fedora Account System Username: music

This requires rust-lz4 (new package, bug 2256960), rust-libdeflate-sys (unretirement, bug 2256974), and rust-libdeflater (unretirement, bug 2256975). A COPR build is available at: https://copr.fedorainfracloud.org/coprs/music/python-cramjam/packages/

This is a dependency for python-cramjam, which is needed for current releases of python-fastavro. It will be a neuro-sig package (in addition to a rust-sig one).

Comment 1 Fedora Review Service 2024-01-06 17:22:35 UTC
Copr build:
https://copr.fedorainfracloud.org/coprs/build/6868476
(failed)

Build log:
https://download.copr.fedorainfracloud.org/results/@fedora-review/fedora-review-2257076-rust-libcramjam/fedora-rawhide-x86_64/06868476-rust-libcramjam/builder-live.log.gz

Please make sure the package builds successfully at least for Fedora Rawhide.

- If the build failed for unrelated reasons (e.g. temporary network
  unavailability), please ignore it.
- If the build failed because of missing BuildRequires, please make sure they
  are listed in the "Depends On" field


---
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 Ben Beasley 2024-01-12 18:05:38 UTC
[fedora-review-service-build]

Comment 3 Fedora Review Service 2024-01-12 18:08:15 UTC
Copr build:
https://copr.fedorainfracloud.org/coprs/build/6888594
(failed)

Build log:
https://download.copr.fedorainfracloud.org/results/@fedora-review/fedora-review-2257076-rust-libcramjam/fedora-rawhide-x86_64/06888594-rust-libcramjam/builder-live.log.gz

Please make sure the package builds successfully at least for Fedora Rawhide.

- If the build failed for unrelated reasons (e.g. temporary network
  unavailability), please ignore it.
- If the build failed because of missing BuildRequires, please make sure they
  are listed in the "Depends On" field


---
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 4 Ben Beasley 2024-01-12 18:11:12 UTC
This needs --enablerepo=local until the freshly-unretired rust-libdeflater appears in a Rawhide compose.

Comment 5 Fabio Valentini 2024-01-25 23:25:32 UTC
The neuro-fedora tracker was in the "Depends on" field instead of the "Blocks" field, so this ticket did not show up as "reviewable".

Comment 6 Fabio Valentini 2024-01-26 14:31:05 UTC
Ok, first look at the package:

1. The LICENSE file is some weird JSON blob for, and it also doesn't match what's downloaded from the URL:

Source checksums
----------------
https://github.com/milesgranger/cramjam/blob/8510678864af328a8b711f04ef2ddd8a4fa1d0cc/LICENSE :
  CHECKSUM(SHA256) this package     : c382e6b2ecda2c387f070b758ebf97fd934310f1b3808e5aeb43c905779efdc4
  CHECKSUM(SHA256) upstream package : a73b9239f0434299d723ac6454b3f66f9c4fb8c7889ee8309f98f7cd1131d4f4
https://crates.io/api/v1/crates/libcramjam/0.1.5/download#/libcramjam-0.1.5.crate :
  CHECKSUM(SHA256) this package     : e1e4c9711efb07b28423df4f7e87235f2e5b927f379e515062f7f1b37ef55b12
  CHECKSUM(SHA256) upstream package : e1e4c9711efb07b28423df4f7e87235f2e5b927f379e515062f7f1b37ef55b12
diff -r also reports differences

Please fix - use the "raw" file link to get the actual file contents, not the "blob" link that gives you garbage:

instead of https://github.com/milesgranger/cramjam/blob/8510678/LICENSE
use        https://github.com/milesgranger/cramjam/raw/8510678/LICENSE

2. It looks like the dependencies on zstd / zstd-safe are actually mismatched in upstream.
They should be zstd v0.13 to match with zstd-safe v7, *or* zstd v0.12 to match with zstd-safe v6 - but not a weird mix older / newer versions of these two crates.

3. If you build the C library, you will get better generated spec file from rust2rpm if the crate actually *defines* a cdylib target. Not sure why upstream doesn't do this.

Using "rust2rpm -p" to add this table to Cargo.toml should give you a better template to start from:

```
[lib]
crate-type = ["lib", "cdylib"]
```

Comment 7 Ben Beasley 2024-01-26 15:33:00 UTC
(In reply to Fabio Valentini from comment #6)
> Ok, first look at the package:
> 
> 1. The LICENSE file is some weird JSON blob for, and it also doesn't match
> what's downloaded from the URL:

Oops! Yes, that’s definitely a URL typo. I’ll correct it.
 
> 2. It looks like the dependencies on zstd / zstd-safe are actually
> mismatched in upstream.
> They should be zstd v0.13 to match with zstd-safe v7, *or* zstd v0.12 to
> match with zstd-safe v6 - but not a weird mix older / newer versions of
> these two crates.

Thanks. I suggested this upstream, https://github.com/milesgranger/cramjam/pull/128.

> 3. If you build the C library, you will get better generated spec file from
> rust2rpm if the crate actually *defines* a cdylib target. Not sure why
> upstream doesn't do this.
> 
> Using "rust2rpm -p" to add this table to Cargo.toml should give you a better
> template to start from:
> 
> ```
> [lib]
> crate-type = ["lib", "cdylib"]
> ```

I tried that, and the template was indeed a *little* better – there was a %{crate} package for the C library – but I still had to add the cargo-c invocation, the %{crate}-devel package, and most of the other boilerplate.

I could send a PR upstream, but I think I would need to be able to offer a better explanation of why they should care, i.e., how the change would do something useful in practice for them or their other users.

It also occurred to me that none of the dependencies contribute to the binary RPM %{crate}-devel – nothing is bundled in the header file, the unversioned .so symlink, or the .pc file – so I don’t need to include the dependency licenses in the License field for that subpackage, only for %{crate}. I’ll change that as well.

I’ll upload a new spec and SRPM after I double-check for major errors I might have made while changing things.

Comment 9 Fedora Review Service 2024-01-26 16:22:22 UTC
Copr build:
https://copr.fedorainfracloud.org/coprs/build/6964560
(failed)

Build log:
https://download.copr.fedorainfracloud.org/results/@fedora-review/fedora-review-2257076-rust-libcramjam/srpm-builds/06964560/builder-live.log.gz

Please make sure the package builds successfully at least for Fedora Rawhide.

- If the build failed for unrelated reasons (e.g. temporary network
  unavailability), please ignore it.
- If the build failed because of missing BuildRequires, please make sure they
  are listed in the "Depends On" field


---
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 11 Fedora Review Service 2024-01-26 16:36:35 UTC
Copr build:
https://copr.fedorainfracloud.org/coprs/build/6964563
(succeeded)

Review template:
https://download.copr.fedorainfracloud.org/results/@fedora-review/fedora-review-2257076-rust-libcramjam/fedora-rawhide-x86_64/06964563-rust-libcramjam/fedora-review/review.txt

Found issues:

- No gcc, gcc-c++ or clang found in BuildRequires
  Read more: https://docs.fedoraproject.org/en-US/packaging-guidelines/C_and_C++/

Please know that there can be false-positives.

---
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 12 Fabio Valentini 2024-01-31 22:26:50 UTC
Thank you for the update! Looks good to me now.

Having both "BuildRequires: cargo-c" and `echo 'cargo-c'` in %generate_buildrequires is redundant though. You can remove one of those :)

===

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
- licenses of statically linked dependencies are correctly taken into account
- license file is included with %license in %files (included manually from upstream, PR submitted)
- 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 13 Ben Beasley 2024-01-31 23:14:53 UTC
Thank you for the review! I’ll follow the post-import tasks.

Normally I would favor a straightforward BuildRequires over an echo in %generate_buildrequires, but I would prefer for the cargo-c part to look like rust-rav1e, so I will drop "BuildRequires: cargo-c", and keep `echo 'cargo-c'` in %generate_buildrequires.

Comment 14 Ben Beasley 2024-01-31 23:16:42 UTC
https://release-monitoring.org/project/371209/

Comment 15 Fedora Admin user for bugzilla script actions 2024-01-31 23:17:17 UTC
The Pagure repository was created at https://src.fedoraproject.org/rpms/rust-libcramjam

Comment 16 Fedora Update System 2024-01-31 23:34:46 UTC
FEDORA-2024-c842415fd0 has been submitted as an update to Fedora 40. https://bodhi.fedoraproject.org/updates/FEDORA-2024-c842415fd0

Comment 17 Fedora Update System 2024-01-31 23:37:26 UTC
FEDORA-2024-c842415fd0 has been pushed to the Fedora 40 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 18 Fedora Update System 2024-02-01 13:04:35 UTC
FEDORA-2024-e7e6faead6 has been submitted as an update to Fedora 39. https://bodhi.fedoraproject.org/updates/FEDORA-2024-e7e6faead6

Comment 19 Fedora Update System 2024-02-01 13:40:41 UTC
FEDORA-2024-0dd07e330c has been submitted as an update to Fedora 38. https://bodhi.fedoraproject.org/updates/FEDORA-2024-0dd07e330c

Comment 20 Fedora Update System 2024-02-02 02:11:44 UTC
FEDORA-2024-0dd07e330c has been pushed to the Fedora 38 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-0dd07e330c \*`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2024-0dd07e330c

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

Comment 21 Fedora Update System 2024-02-02 02:17:08 UTC
FEDORA-2024-e7e6faead6 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-e7e6faead6 \*`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2024-e7e6faead6

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

Comment 22 Fedora Update System 2024-02-05 01:12:00 UTC
FEDORA-2024-a427c216cf 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-a427c216cf \*`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2024-a427c216cf

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

Comment 23 Fedora Update System 2024-02-05 02:41:14 UTC
FEDORA-2024-99c1a94909 has been pushed to the Fedora 38 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-99c1a94909 \*`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2024-99c1a94909

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

Comment 24 Fedora Update System 2024-02-13 01:27:35 UTC
FEDORA-2024-99c1a94909 (rust-libcramjam-0.2.0-1.fc38) has been pushed to the Fedora 38 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 25 Fedora Update System 2024-02-13 02:56:56 UTC
FEDORA-2024-a427c216cf (rust-libcramjam-0.2.0-1.fc39) has been pushed to the Fedora 39 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.