kornelski / cargo-deb

Make Debian packages directly from Rust/Cargo projects
https://lib.rs/cargo-deb
MIT License
431 stars 52 forks source link

Consider supporting custom architectures #64

Closed 2moe closed 1 year ago

2moe commented 1 year ago

https://github.com/kornelski/cargo-deb/blob/0a0598027d36a56c5357d5bb00e22f5c62c339d9/src/manifest.rs#L1179-L1197

In debian, there are mipsel and mips64el, but not mipsr6el and mips64r6el as above.

By the way, on some distributions, if you use dpkg to install deb packages, it will require the musl-amd64 architecture instead of amd64.

I don't think relying on automated detection architecture will necessarily make everyone happy.

It will be even better, if we can configure architectures in [package.metadata.deb].

kornelski commented 1 year ago

Please make pull requests adding/correcting the tuples and architectures.

My philosophy with cargo deb is to work by default with just running cargo deb, so I'd prefer to fix or expand this list as necessary instead of adding manual configuration steps. There's a limited slow-changing list of architectures that both Rust and Debian support, so it shouldn't be too hard to keep up.

stappersg commented 1 year ago

Those who can close this issue, please do close this issue.

(An update why it should remain open would also be great.)

2moe commented 1 year ago

In rust 1.71.0, the target triple loongarch64-unknown-linux-gnu has been promoted to tiger2.

However, different deb distributions correspond to different deb architectures for this target.

They are the same target, but they correspond to different deb architectures.

You might say, I don't have a loongarch CPU, why should I be concerned about this issue? All right. In fact, I don't have one either. I'm just curious about how to solve this issue.

kornelski commented 1 year ago

What a mess with the naming. It looks like loong64 will eventually win, so I've picked that.