Bug 2076019

Summary: Review Request: rust-winapi-x86_64-pc-windows-gnu - Import libraries for the x86_64-pc-windows-gnu target
Product: [Fedora] Fedora Reporter: Carmelo Sarta <carmelo.sarta.main>
Component: Package ReviewAssignee: Nobody's working on this, feel free to take it <nobody>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: medium    
Version: rawhideCC: decathorpe, package-review
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-04-20 22:34:19 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Carmelo Sarta 2022-04-17 06:15:15 UTC
Spec URL: https://raw.githubusercontent.com/Laiot/rust-winapi-rpm/master/x86_64/rust-winapi-x86_64-pc-windows-gnu.spec
SRPM URL: https://github.com/Laiot/rust-winapi-rpm/raw/master/x86_64/rust-winapi-x86_64-pc-windows-gnu-0.4.0-1.fc36.src.rpm
Description: Import libraries for the x86_64-pc-windows-gnu target. Please don't use this crate directly, depend on winapi instead.
Fedora Account System Username: laiot

Comment 1 Fabio Valentini 2022-04-20 18:54:57 UTC
Packaging this windows-only crate is almost certainly the wrong thing to do, unless you want to cross-compile software for Windows from inside a Fedora RPM package. What do you think you need this for?

Comment 2 Carmelo Sarta 2022-04-20 22:19:49 UTC
I know it looks bad but I needed it in order to have a package for https://crates.io/crates/named_pipe/0.4.1 which is a dependency for https://crates.io/crates/discord-presence/0.4.4

Comment 3 Fabio Valentini 2022-04-20 22:29:18 UTC
No, you don't need either this, nor winapi, nor named_pipe.
It's a windows-only dependency:
https://github.com/jewlexx/discord-presence/blob/trunk/crates/rpc/Cargo.toml#L24

Right now we don't have automatic support for stripping those dependencies from getting generated, so youll need to patch it out manually (rust2rpm provides the -p switch for that).

You can look at rust-os_pipe for an example of how this is handled:
https://src.fedoraproject.org/rpms/rust-os_pipe/blob/rawhide/f/os_pipe-fix-metadata.diff

Comment 4 Carmelo Sarta 2022-04-20 22:33:56 UTC
Ohw understood. Yes, today for the first time I had to use the -p option in order to skip some optional dependencies in order to avoid circular dependencies.
Thanks for your help!