-
Notifications
You must be signed in to change notification settings - Fork 132
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
Add --target-rid / -targetRid as a build script argument #4413
Comments
I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label. |
From that:
I don't think we should make it required as it forces anyone that calls
nit: I prefer Most package maintainers are expected to build for the build host architecture. It would be nice if they don't need to include the architecture in the argument value. Then the same package script works across architectures without the maintainer having to write some code to map the system architecture to the rid arch. |
Sounds good.
It is not for everyone, only someone doing a (very targeted) non-portable build which is usually a distro maintainer running it via their CI/CD automation using a manifest file. They can also use this helper if providing rid for non-portable build is a pain point: #!/bin/sh
_distroId="$(grep -oP '^ID=\K.*' /etc/os-release | tr '[:upper:]' '[:lower:]')"
_version="$(grep -oP '^VERSION_ID="\K[0-9]+' /etc/os-release | tr -d '.')"
_arch="$(uname -m | { read -r arch; case $arch in x86_64) echo x64 ;; aarch64) echo arm64 ;; armv7*) echo arm ;; armv6*) echo arm ;; i*86) echo x86 ;; *) echo "$arch" ;; esac; })"
_outputRid="$_distroId.$_version${_version:+-}$_arch" This will put the responsibility on a small subset of non-portable builders, yes, but it is trivial compared to dotnet infra maintaining the whole list of distros and their preferred style (no version, 1-part version, 2 or 3 parts). This will free them to change the format, and us free from maintenance. |
I'm not sure what you mean exactly. My preference is that a non-portable build uses a non-portable rid, and if a user wants he can control it using the argument. If the argument is not provided, the |
You sounded like as if everyone will have to issue
The problem with this is not all distros use the same scheme which I explained, so we will need to maintain the never-ending mappings. Is this little inconvenience really worth it? I don't think it is and we should just make To me, the benefits of making the argument mandatory outweigh this convenience. |
I don't think we should force everyone that does a non-portable build to have to understand and pick a rid when the build script can pick a very sensible value for it. |
OK. If your suggestion is to use I think it would be reasonable to make lack of |
Yes, what we have left in |
It would have been nicer if we had added the argument before removing the special distro handling from Now we require maintainers to figure out on their own how to get back to the rid they were building previously. |
dotnet/runtime#100580 removed the distro specific handling of rids in favor of distro packagers provide their rid when building .NET.
We should facilitate distro packagers in providing this value by making it a setting on the top-level build script.
cc @am11 @omajid @elinor-fung @ViktorHofer @mthalman
The text was updated successfully, but these errors were encountered: