Bug 2022205 - Review Request: rust-unic-langid-macros - API for managing Unicode Language Identifiers
Summary: Review Request: rust-unic-langid-macros - API for managing Unicode Language I...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Neal Gompa
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On: 2009923 2022204 2022206
Blocks: 2022203
TreeView+ depends on / blocked
 
Reported: 2021-11-11 04:22 UTC by Link Dupont
Modified: 2021-12-11 01:30 UTC (History)
3 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2021-12-11 01:30:36 UTC
Type: ---
Embargoed:
ngompa13: fedora-review+


Attachments (Terms of Use)

Comment 1 Neal Gompa 2021-11-14 13:20:09 UTC
Package was generated through rust2rpm, simplifying the review considerably.

- Conforms to packaging guidelines (rust2rpm generated spec)
- license correct and valid
- only sources installed

PACKAGE APPROVED.

Comment 2 Gwyn Ciesla 2021-11-15 14:19:17 UTC
(fedscm-admin):  The Pagure repository was created at https://src.fedoraproject.org/rpms/rust-unic-langid-macros

Comment 3 Fedora Update System 2021-11-29 18:18:24 UTC
FEDORA-2021-01f7520709 has been submitted as an update to Fedora 35. https://bodhi.fedoraproject.org/updates/FEDORA-2021-01f7520709

Comment 4 Fedora Update System 2021-11-30 02:19:50 UTC
FEDORA-2021-01f7520709 has been pushed to the Fedora 35 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf install --enablerepo=updates-testing --advisory=FEDORA-2021-01f7520709 \*`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2021-01f7520709

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

Comment 5 Fabio Valentini 2021-12-02 10:33:25 UTC
> - only sources installed

This is not true. The package installs two binaries (even though it was "turned off" by setting a dunder-macro).

Just overriding __cargo_skip_build is the wrong thing to do here (as is overriding double-underscored-macros, in general), because that also makes the package noarch, where it shouldn't be, so tests only run on one architecture at a time, etc.

Additionally, this unconventional use of "__cargo_skip_build 1" is now broken, because that macro was under no circumstances set to 1 since Fedora 31 or so (it was only ever set to 1 in module builds, and it's been a long while since those were a thing for Rust).

Since it looks like those binaries are only used for upstream development, I suggest to drop them from the .spec file entirely to prevent future issues like this. You can look at https://src.fedoraproject.org/rpms/rust-protobuf-codegen-pure/tree/rawhide for an example how to do that relatively easily (rust2rpm will not even generate the subpackages related to binaries if you do it like this).

Another way to do this (that's not as nice) is to set the __cargo_is_bin() macro to 0 and drop the generated binary subpackage manually, like in cargo:
https://src.fedoraproject.org/rpms/rust-cargo/blob/rawhide/f/rust-cargo.spec

But the first solution (small patch to disable building the binaries) is a cleaner solution, as that also automatically adapts the generated .spec file.

Comment 6 Fabio Valentini 2021-12-02 10:35:02 UTC
Oh, sorry, I commented on the wrong bug, this should've been on the rust-unic-langid-impl review request, instead.

PS: You can see that the package now fails to build because it relies on the "__cargo_skip_build" implementation detail, which was removed with rust2rpm 20:
https://koschei.fedoraproject.org/package/rust-unic-langid-impl?collection=f36

Comment 7 Fedora Update System 2021-12-02 17:49:37 UTC
FEDORA-2021-01f7520709 has been submitted as an update to Fedora 35. https://bodhi.fedoraproject.org/updates/FEDORA-2021-01f7520709

Comment 8 Fedora Update System 2021-12-03 01:48:39 UTC
FEDORA-2021-01f7520709 has been pushed to the Fedora 35 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf install --enablerepo=updates-testing --advisory=FEDORA-2021-01f7520709 \*`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2021-01f7520709

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

Comment 9 Fedora Update System 2021-12-11 01:30:36 UTC
FEDORA-2021-01f7520709 has been pushed to the Fedora 35 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.