Bug 2076019 - Review Request: rust-winapi-x86_64-pc-windows-gnu - Import libraries for the x86_64-pc-windows-gnu target
Summary: Review Request: rust-winapi-x86_64-pc-windows-gnu - Import libraries for the ...
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Nobody's working on this, feel free to take it
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-04-17 06:15 UTC by Carmelo Sarta
Modified: 2022-04-20 22:34 UTC (History)
2 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2022-04-20 22:34:19 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

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!


Note You need to log in before you can comment on or make changes to this bug.