Summary: | dev-util/monodevelop-6.0.0.4761 bundles a copy of libgit2 and fails multilib-strict | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Mike Auty (RETIRED) <ikelos> |
Component: | Current packages | Assignee: | dotnet project <dotnet> |
Status: | RESOLVED WONTFIX | ||
Severity: | normal | CC: | Arsen.Shnurkov, cynede, pacho |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- |
Description
Mike Auty (RETIRED)
2016-07-23 23:12:51 UTC
> monodevelop-6 bundles its own copy of libgit2 > (it's unclear if there are any custom modifications) It's packaged into LibGit2Sharp.NativeBinaries.nupkg which is downloaded from https://www.nuget.org/packages/LibGit2Sharp.NativeBinaries and declared to be build with https://github.com/libgit2/libgit2sharp.nativebinaries (In reply to Arsen Shnurkov from comment #1) > > monodevelop-6 bundles its own copy of libgit2 > > (it's unclear if there are any custom modifications) > > It's packaged into LibGit2Sharp.NativeBinaries.nupkg > which is downloaded from > https://www.nuget.org/packages/LibGit2Sharp.NativeBinaries > and declared to be build with > https://github.com/libgit2/libgit2sharp.nativebinaries So the monodevelop tarball includes a copy of libgit2, which according to monodevelop's github repo (both for the version in portage and also for master): https://github.com/mono/monodevelop/tree/monodevelop-6.0.0.4761/main/external/ links off to the following repo: https://github.com/mono/libgit2/ which is a fork of libgit2, and last had commits 11 months ago. It's unclear if this repo has had any changes from the original libgit2 repo, but it's clear it hasn't had any updates (including security updates) in nearly a year. I bumped the ebuild for LibGit2: https://github.com/gentoo/dotnet/pull/206/files There was no ebuild for LibGit2Sharp, so i decide to try to write it https://github.com/gentoo/dotnet/compare/master...ArsenShnurkov:libgit2sharp I found that LibGit2Sharp project itself depend on "NativeBinaries" package: ./LibGit2Sharp/packages.config: <package id="LibGit2Sharp.NativeBinaries" version="1.0.129" targetFramework="net4" allowedVersions="[1.0.129]" /> now i don't know - is it better to package NativeBinaries, or it is better to understood how it works and write a replacement patch which will do the same work without additional package the main purpose of file LibGit2Sharp.NativeBinaries.props see https://github.com/libgit2/libgit2sharp.nativebinaries/blob/master/nuget.package/build/LibGit2Sharp.NativeBinaries.props is to copy libgit2.so file into output dir: <None Condition="Exists('$(MSBuildThisFileDirectory)\..\libgit2\linux\x86_64\libgit2-381caf5.so')" Include="$(MSBuildThisFileDirectory)\..\libgit2\linux\x86_64\libgit2-381caf5.so"> <Link>lib\linux\x86_64\libgit2-381caf5.so</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </None> and to set correspondence in https://github.com/libgit2/libgit2sharp.nativebinaries/blob/master/nuget.package/libgit2/LibGit2Sharp.dll.config both actions are not necessary in gentoo, because library is installed globally and controlled by portage. So, I decide to remove reference to NativeBinaries from LibGit2Sharp.csproj @nulltoken already tried to package LibGit2Sharp way year ago (but it's unclear for me for which package manager): https://travis-ci.org/libgit2/libgit2sharp/jobs/63710116 CSC: error CS2001: Source file `Core/NativeDllName.cs' could not be found this file should be generated by https://github.com/libgit2/libgit2sharp/blob/master/LibGit2Sharp/NativeDllName.targets but it's line https://github.com/libgit2/libgit2sharp/blob/3615df921ded6e58b08bc438645d9291804f5db1/LibGit2Sharp/NativeDllName.targets#L17 <GenerateNativeDllNameTask InputHashFile="@(EmbeddedResource)" Condition=" '%(Filename)%(Extension)' == 'libgit2_filename.txt' " OutputFile="$(NativeDllNamePath)" /> requires file libgit2_filename.txt to be present and this file comes from https://github.com/libgit2/libgit2sharp.nativebinaries/blob/master/nuget.package/libgit2/libgit2_filename.txt and the file "libgit2_filename.txt" was added into main project as resource here https://github.com/libgit2/libgit2sharp.nativebinaries/blob/b059d8b5671bceed04f133b4c9bbd38871505f75/nuget.package/build/LibGit2Sharp.NativeBinaries.props#L4 NativeBinaries package dependency was just removed from build (see comment above) so we need something like echo "/usr/lib64/libgit2.so" >libgit2_filename.txt and modify the patch to .csproj - add line similar to <EmbeddedResource Include="libgit2_filename.txt" /> libgit2sharp ebuild PR: https://github.com/gentoo/dotnet/pull/207 so now you can use it to compile your version of monodevelop Hi Arsen, Thanks very much for the work you've done! 5:) I've tested it, and Libgit2Sharp from the dotnet repo does compile without errors (although it installs files in /usr/local/nuget) however it appears that the version of monodevelop in the dotnet repo still compiles its own copy of libgit2 and attempts to install it. Also hardcoding the path as /usr/lib64/libgit2.so comes with two issues: firstly figuring out the correct path (since prefix users don't necessarily install into /usr) and secondly making sure that the dependency matches the version of libgit2 that monodevelop was expecting. Unfortunately since libgit2 is still in development, they've done something a bit daft and symlinked libgit2.so.0.24.0 to libgit2.so.24 (rather than libgit2.so.0) at install time. However, it's probably still better to link to libgit2.so.24 than simply libgit2.so (since libgit2.so.25 might break Libgit2Sharp when it gets upgraded)... I don't really use monodevelop with git, so whether Libgit2sharp works or not isn't something that directly affects me, but monodevelop still attempting to install libgit2 libraries does. 5:\ Lemme know when you've got more tests I can run, I'm happy to help as much as I can to get this resolved! 5:) Just a note, the in-tree version is still failing multilib-strict, and still preventing installs on systems with that feature enabled. Any progress on this? We also need to kill the completely obsolete stable version (that also needs the old splitted gnome-sharp building and I wonder if it is even working with mono-4) dropped |