Bug 2331330 (rust-rutabaga_gfx, rutabaga_gfx) - Review Request: rust-rutabaga_gfx - Handling virtio-gpu protocols
Summary: Review Request: rust-rutabaga_gfx - Handling virtio-gpu protocols
Keywords:
Status: CLOSED ERRATA
Alias: rust-rutabaga_gfx, rutabaga_gfx
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Marc-Andre Lureau
QA Contact: Fedora Extras Quality Assurance
URL: https://crates.io/crates/rutabaga_gfx
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2024-12-10 10:15 UTC by Dorinda
Modified: 2025-02-03 19:47 UTC (History)
3 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2025-02-03 19:47:02 UTC
Type: ---
Embargoed:
marcandre.lureau: fedora-review+


Attachments (Terms of Use)

Comment 1 Fedora Review Service 2024-12-10 10:28:57 UTC
Copr build:
https://copr.fedorainfracloud.org/coprs/build/8371965
(succeeded)

Review template:
https://download.copr.fedorainfracloud.org/results/@fedora-review/fedora-review-2331330-rutabaga_gfx/fedora-rawhide-x86_64/08371965-rust-rutabaga_gfx/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 Marc-Andre Lureau 2024-12-10 10:40:18 UTC
Spec URL: https://copr-dist-git.fedorainfracloud.org/cgit/dorinda/rutabaga_gfx/rust-rutabaga_gfx.git/plain/rust-rutabaga_gfx.spec
SRPM URL: https://download.copr.fedorainfracloud.org/results/dorinda/rutabaga_gfx/fedora-rawhide-x86_64/08368537-rust-rutabaga_gfx/rust-rutabaga_gfx-0.1.4-1.fc42.src.rpm
Description: rutabaga_gfx - Handling virtio-gpu protocols
Fedora Account System Username: dorinda

(fixing spec url to use plain/raw text, should help fedora-review -b)

Comment 3 Marc-Andre Lureau 2024-12-10 10:46:12 UTC
taking for review

Comment 4 Marc-Andre Lureau 2024-12-10 11:00:46 UTC
Package was generated with rust2rpm, simplifying the review.

✅ package contains only permissible content
✅ 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 file is included with %license in %files
✅ package complies with Rust Packaging Guidelines

Package APPROVED.

===

A following task is to update the existing rutabaga-gfx-ffi package, that "bundles" the rust code. Now that it is released and standalone, we can adjust its dependencies. Sadly, ffi was not released with rutabaga-gfx (https://crates.io/search?q=rutabaga). Also upstream lacks the corresponding tags (https://chromium.googlesource.com/crosvm/crosvm/). I will reach the maintainer gurchetansingh.

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 (*NOT* pre-release) 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 5 Fabio Valentini 2024-12-10 11:07:37 UTC
I see one problem wit this ticket - the package name in the spec file is rust-rutabaga_gfx, but the ticket is for rutabaga_gfx. They MUST match.

Comment 6 Fabio Valentini 2024-12-10 11:10:41 UTC
The manual patch for Cargo.toml is also not documented - it needs at least a short comment.
Especially since the patch is wrong. :)

crates should have *either* a package.license-file *or* a package.license property in Cargo.toml, but not both.
The license-file setting is only for non-standard licenses that cannot be expressed in SPDX form.
Since this is the case here (assuming that setting the license to "BSD-3-Clause" is correct?), only package.license should be set.

c.f. https://doc.rust-lang.org/cargo/reference/manifest.html#the-license-and-license-file-fields

Comment 7 Fabio Valentini 2024-12-10 11:12:01 UTC
> # current bindgen limitation
> ExclusiveArch: x86_64 aarch64 %{ix86}

What does this mean?

> %license %{crate_instdir}/LICENSE
> %exclude %{crate_instdir}/LICENSE

What is this supposed to accomplish? It's wrong.
The way it's generated by rust2rpm is correct, the warnings from RPM about duplicately listed files is harmless and can be ignored.

Comment 8 Dorinda 2024-12-10 11:23:51 UTC
Hi Fabio, Thank you for the review, the rust2rpm could not generate a spec file due to this custom license so I patched it with the BSD-3-Clause which I found for Crosvm. I will fix the spec removing that patch then. Thanks!

Comment 9 Fabio Valentini 2024-12-10 11:25:27 UTC
> Hi Fabio, Thank you for the review, the rust2rpm could not generate a spec file due to this custom license so I patched it with the BSD-3-Clause which I found for Crosvm. I will fix the spec removing that patch then. Thanks!

No, that's not what I said.

The Cargo.toml should have *only* package.license, and *not* package.license-file.

The license text seems to be standard BSD-3-Clause, so that is the correct way to represent this in crate metadata.

Comment 10 Dorinda 2024-12-10 11:33:57 UTC
> What does this mean?
> 
the virglrenderer generated bindings fail to build for the other architecture not listed, Some compilation problem with the other architecture. I can rebuild it with the other architectures to share the log.

> > %license %{crate_instdir}/LICENSE
> > %exclude %{crate_instdir}/LICENSE
> 
> What is this supposed to accomplish? It's wrong.
> The way it's generated by rust2rpm is correct, the warnings from RPM about
> duplicately listed files is harmless and can be ignored.

It was meant to fix the warning, but this makes sense. Noted.

> The Cargo.toml should have *only* package.license, and *not* package.license-file.

ack.

Comment 11 Fabio Valentini 2024-12-10 11:35:31 UTC
> the virglrenderer generated bindings fail to build for the other architecture not listed, Some compilation problem with the other architecture. I can rebuild it with the other architectures to share the log.

Thanks, that information was missing for me. a build log so I can see the failures would be appreciated! Maybe we can fix the issue.

Comment 13 Fabio Valentini 2024-12-10 12:35:12 UTC
Thanks! I was able to find the problem pretty quickly.

In the src/generated/virtl_debug_callback_binding.rs file, the `stdio` module is only defined for x86_64, x86, arm, aarch64, and riscv64, but not s390x or powerpc64.

So the fact that this package doesn't compile on ppc64le and s390x is a problem in the upstream source code, not with bindgen.

Using ExclusiveArch is fine in this case.

Comment 14 Fabio Valentini 2024-12-10 12:45:10 UTC
Note that the rust-rutabaga_gfx-devel package also has a "Requires: python3" that isn't wanted due to the *.py script in that same folder (src/generated/). They should be excluded from the package to avoid the dependency on python3.

Comment 15 Dorinda 2024-12-10 14:46:29 UTC
Thanks for review, I have updated the spec file addressing your comments.

Comment 17 Dorinda 2025-01-03 14:55:18 UTC
Hi @decathorpe I have updated the spec file and SRPM can you give your review? Thanks!

Comment 18 Fabio Valentini 2025-01-22 14:48:03 UTC
Hi - sorry for taking so long to respond.

The package is already approved by Marc-Andre, you needn't have waited for me.
That aside, the Spec URL above currently doesn't work because copr-dist-git-cgit has been shut down temporarily. :)

Comment 19 Fedora Admin user for bugzilla script actions 2025-01-28 19:22:51 UTC
The Pagure repository was created at https://src.fedoraproject.org/rpms/rust-rutabaga_gfx

Comment 20 Fedora Update System 2025-02-03 13:23:58 UTC
FEDORA-2025-c8dc7bc2bd (rust-rutabaga_gfx-0.1.4-1.fc42) has been submitted as an update to Fedora 42.
https://bodhi.fedoraproject.org/updates/FEDORA-2025-c8dc7bc2bd

Comment 21 Fedora Update System 2025-02-03 19:47:02 UTC
FEDORA-2025-c8dc7bc2bd (rust-rutabaga_gfx-0.1.4-1.fc42) has been pushed to the Fedora 42 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.