Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consider supporting custom architectures #64

Closed
2moe opened this issue Jan 13, 2023 · 4 comments
Closed

Consider supporting custom architectures #64

2moe opened this issue Jan 13, 2023 · 4 comments

Comments

@2moe
Copy link

2moe commented Jan 13, 2023

cargo-deb/src/manifest.rs

Lines 1179 to 1197 in 0a05980

("aarch64", _) => "arm64",
("mips64", "gnuabin32") => "mipsn32",
("mips64el", "gnuabin32") => "mipsn32el",
("mipsisa32r6", _) => "mipsr6",
("mipsisa32r6el", _) => "mipsr6el",
("mipsisa64r6", "gnuabi64") => "mips64r6",
("mipsisa64r6", "gnuabin32") => "mipsn32r6",
("mipsisa64r6el", "gnuabi64") => "mips64r6el",
("mipsisa64r6el", "gnuabin32") => "mipsn32r6el",
("powerpc", "gnuspe") => "powerpcspe",
("powerpc64", _) => "ppc64",
("powerpc64le", _) => "ppc64el",
("riscv64gc", _) => "riscv64",
("i586", _) | ("i686", _) | ("x86", _) => "i386",
("x86_64", "gnux32") => "x32",
("x86_64", _) => "amd64",
(arm, gnueabi) if arm.starts_with("arm") && gnueabi.ends_with("hf") => "armhf",
(arm, _) if arm.starts_with("arm") => "armel",
(other_arch, _) => other_arch,

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
Copy link
Owner

kornelski commented Jan 13, 2023

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
Copy link
Contributor

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

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

@2moe
Copy link
Author

2moe commented Aug 21, 2023

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.

  • In loongnix, it is loongarch64.
    loongarch64
  • In debian(ports), it is loong64.
    loong64

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
Copy link
Owner

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants