Bug 2379003 - Review Request: rust-visibility - Attribute to override the visibility of items
Summary: Review Request: rust-visibility - Attribute to override the visibility of items
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/visibility
Whiteboard:
Depends On:
Blocks: 2374209
TreeView+ depends on / blocked
 
Reported: 2025-07-09 12:52 UTC by Marc-Andre Lureau
Modified: 2025-07-31 07:49 UTC (History)
2 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2025-07-31 07:49:16 UTC
Type: ---
Embargoed:
decathorpe: fedora-review+


Attachments (Terms of Use)

Description Marc-Andre Lureau 2025-07-09 12:52:04 UTC
Spec URL: https://raw.githubusercontent.com/elmarco/ironrdp-fedora/refs/heads/master/rust-visibility/rust-visibility.spec
SRPM URL: https://download.copr.fedorainfracloud.org/results/elmarco/qemu-rdp/srpm-builds/09256944/rust-visibility-0.1.1-1.src.rpm
Description: Attribute to override the visibility of items
Fedora Account System Username: elmarco

Comment 1 Fedora Review Service 2025-07-09 12:58:55 UTC
Copr build:
https://copr.fedorainfracloud.org/coprs/build/9257058
(succeeded)

Review template:
https://download.copr.fedorainfracloud.org/results/@fedora-review/fedora-review-2379003-rust-visibility/fedora-rawhide-x86_64/09257058-rust-visibility/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 2025-07-30 13:56:08 UTC
> # cargo package doesn't include "downstream_crate":
> # https://github.com/danielhenrymantilla/visibility.rs/issues/13
> %bcond check 0

This is expected - "downstream_crate" is a workspace member (i.e. a separate *crate*) that's not published.
In this case I would just say "test input data is not included in published crates".

It might also be good to drop the "LICENSE" file that says "No license.", as was done upstream here:
https://github.com/danielhenrymantilla/visibility.rs/commit/35326d6

(Removing the `%license LICENSE` line and adding a link to this commit should be enough, I think.)

Comment 3 Marc-Andre Lureau 2025-07-30 14:05:40 UTC
Hmm, something new when building this with fedpkg local:

/usr/bin/cargo2rpm --path Cargo.toml buildrequires

Traceback (most recent call last):
  File "/usr/bin/cargo2rpm", line 8, in <module>
    sys.exit(main())
             ~~~~^^
  File "/usr/lib/python3.13/site-packages/cargo2rpm/__main__.py", line 115, in main
    action_buildrequires(args)
    ~~~~~~~~~~~~~~~~~~~~^^^^^^
  File "/usr/lib/python3.13/site-packages/cargo2rpm/__main__.py", line 52, in action_buildrequires
    brs = buildrequires(metadata.packages[0], flags, args.with_check)
  File "/usr/lib/python3.13/site-packages/cargo2rpm/rpm.py", line 136, in buildrequires
    if msrv := package.rust_version:
               ^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.13/site-packages/cargo2rpm/metadata.py", line 200, in rust_version
    return self._data["rust_version"]
           ~~~~~~~~~~^^^^^^^^^^^^^^^^
KeyError: 'rust_version'

Comment 4 Fabio Valentini 2025-07-30 14:09:08 UTC
Don't use `fedpkg local`.

It looks like you have rustup-installed "cargo" in your $PATH, which causes download and usage of the Rust 1.56 toolchain due to the presence of the "rust-toolchain" file, and that apparently didn't (yet) contain the "rust_version" field in the JSON output for "cargo metadata".

Comment 5 Marc-Andre Lureau 2025-07-30 14:18:10 UTC
Don't use `fedpkg local`. -> what instead?

right, I have rustup-installed version on my host, and it's still used when I go in a toolbox... it might be worth to add some extra checks in cargo2rpm.

Comment 6 Fabio Valentini 2025-07-30 14:20:37 UTC
> Don't use `fedpkg local`. -> what instead?

... mock? (or `fedpkg mockbuild`?)

Building Rust stuff outside of mock isn't something officially supported by the toolchain for building Rust packages.

> it might be worth to add some extra checks in cargo2rpm.

What kind of checks?

cargo2rpm intentionally uses `cargo` from $PATH because that's in almost all cases the correct thing to do.

Comment 7 Marc-Andre Lureau 2025-07-30 17:50:40 UTC
Spec URL: https://raw.githubusercontent.com/elmarco/ironrdp-fedora/refs/heads/master/rust-visibility/rust-visibility.spec
SRPM URL: https://download.copr.fedorainfracloud.org/results/elmarco/qemu-rdp/srpm-builds/09356647/rust-visibility-0.1.1-1.src.rpm
Description: Attribute to override the visibility of items
Fedora Account System Username: elmarco

Comment 8 Fabio Valentini 2025-07-30 20:12:23 UTC
Thanks, looks good to me now.

Hopefully there will be a new upstream release soon so the downstream workarounds can be dropped.

===

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 (test input data - un-published workspace members - are not available)
✅ 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 (*NOT* pre-release filter): alpha;beta;rc;pre
  distro: Fedora
  Package: rust-$crate

- set bugzilla assignee overrides to @rust-sig (optional)

Comment 9 Fedora Admin user for bugzilla script actions 2025-07-31 07:34:01 UTC
The Pagure repository was created at https://src.fedoraproject.org/rpms/rust-visibility

Comment 10 Fedora Update System 2025-07-31 07:45:53 UTC
FEDORA-2025-2a842af470 (rust-visibility-0.1.1-1.fc43) has been submitted as an update to Fedora 43.
https://bodhi.fedoraproject.org/updates/FEDORA-2025-2a842af470

Comment 11 Fedora Update System 2025-07-31 07:49:16 UTC
FEDORA-2025-2a842af470 (rust-visibility-0.1.1-1.fc43) has been pushed to the Fedora 43 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.