-
Notifications
You must be signed in to change notification settings - Fork 64
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
Use docker to build for multiple distros #51
Conversation
@JakeGinnivan I wanted to bring this to your attention, since you gave me the idea for this in libgit2/libgit2sharp#1391. Once libgit2/libgit2sharp#1318 is merged, which should be happening soon, we'll be able to provide better support for different distributions when running on .NET Core. Mono can also benefit, but the LibGit2Sharp.dll.config file will have to be manually updated to point to the correct distro folder. There's no good way to automatically select the correct one like there is in .NET Core. |
Awesome, I actually have started using docker to fix the issue for myself. See https://hub.docker.com/r/gittools/gitversion But having it more portable with .net core is a better option. |
I've updated this PR to fix the merge conflicts. I've also been doing research and creating a lot of VMs to test the linux distros listed here to figure out what exactly we'd need to ship to support all of them, and I've run into some problems. I've raised https://github.com/dotnet/corefx/issues/23699, so let's see what the response to that is. |
To update anyone watching this, dotnet/corefx#26439 was merged, and it was backported to 2.0.x in dotnet/corefx#26577, so at this point I'm just waiting for a 2.0.x patch release that includes those changes to arrive so I can finish this up and include enough native binaries to let every distro .NET Core 2.0 supports to work out of the box. |
And with https://github.com/dotnet/core/blob/master/release-notes/2.0/2.0.7.md, it looks like the additional RIDs are available now! 🎉 Now to finish this up and get an updated package out. |
@ethomson This should be ready to go now. Based on my research/testing, with these changes, we be able to run on every platform list here: https://github.com/dotnet/core/blob/master/release-notes/2.0/2.0-supported-os.md. Once we get a version of LibGit2Sharp that uses these changes, I'll verify that things are working as expected. |
What about Alpine linux? I'm surprised that's not in the supported OS list from .net core - isn't that what their containers are based on? Do we work there? It's not called out explicitly. |
I tried Alpine 3.7 a couple weeks ago, |
AFAIK Alpine hasn't been a supported distro for .NET Core until the almost-released 2.1. I believe their containers have been debian-based so far. Given that 2.1 is adding Alpine, that would a good candidate to add as a followup to this PR. |
I'm also thinking it might be a good idea to move building even the ubuntu/ |
I agree with that. |
So overall this seems pretty sane to me. Couple of questions:
|
Unfortunately, if you look at the RID graph that Microsoft has made, there is no relationship between RHEL and Fedora, so there's no way to share binaries between them, other than at the top level And no, there's no way to use symbolic links that I'm aware of.
If you look at the RID graph, I came up with the current RID scenario by examing the RID graph and actually installing all of the relevant distros to verify things like the version/soname of the openssl lib installed. Using So, for the set of OSes supported by .NET Core 2.0, this is the minimal set of binaries I could get given the constraints of the RID graph. Once this is merged (and we can get a preview of LibGit2Sharp that uses it on nuget.org), I want to do a round of testing to verify that my research was correct and that this results in a usable package for each of the supported distros. Based on that, another round of tweaking might be required. Also, .NET Core 2.1 is out now, so we do have some additional distros to consider from that as well. |
Thanks for the details; I assumed that was the state of #1. Thanks for all the hard work and I'm sorry that it took so long to get around to reviewing it. |
@ethomson I just noticed that this PR still had references to the 6311e88 version of the library, and not the new b0d9952. We'll need to run the script to update the checked in files. |
Use docker to build for multiple distros
No description provided.