mono / linux-packaging-msbuild

MIT License
22 stars 19 forks source link

Building Debian package requires internet access #1

Open SwooshyCueb opened 6 years ago

SwooshyCueb commented 6 years ago

Even with all build-dependencies satisfied, building the msbuild debian package still requires internet access. This goes against Debian's Upstream Guide and makes building this package impossible on launchpad.

DragonSA commented 6 years ago

I have the same problem when building for FreeBSD. I believe msbuild downloads the following - during build:

  1. dotnet sdk: this can be pre-downloaded and extracted into the appropriate location (see init-tools.sh)
  2. build tools: I believe the same approach as above can be used, I took a different approach on FreeBSD.
  3. many NuGet packages: these can be pre-downloaded and extracted into $HOME/.nuget/packages. This is a bit involved as a particular structure (not in the archive) needs to be followed - and there isn't an easy was to get the full list of packages required - and most packages are not required to build.
ArsenShnurkov commented 6 years ago

The same on Gentoo. I am trying to split this into three packages:

First package is necessary, because it exposes API for writing tasks, and will be used as dependency for many other packages, second one is necessary for building Microsoft.Build.Tasks.Core.dll and resides in separate repository.

AptiviCEO commented 4 years ago

Yes. I have the same problem as the build process for my application, Kernel Simulator, requires at least MSBuild 15. There was no "msbuild" package for Debian and its derivatives. I have uploaded KS to Launchpad, and the build failed for the exact same reason (tries to get files off Internet)

I am thinking into forking this repo and modifying it so it works without Internet and use that to build MSBuild without Internet access, so that it works on Launchpad. Is that acceptable?

ArsenShnurkov commented 4 years ago

There is one more problem with the new project format. I am trying to package Microsoft.NET.Sdk, and it depend on some nuget parts, because new .csproj-files contain <PackageReference ... /> items. The functions for working with packages in Sdk should be reimplemented with pkg-config instead of NuGet.

https://stackoverflow.com/questions/46622113/the-deps-json-file-in-net-core

AptiviCEO commented 4 years ago

I have managed to get MSBuild to build (debuild -sa) using local packages, local .NET Core .tar.gz file, and some modified files so they work offline without errors. However, I have to separate large packages directories from the source code so that I don't exceed the repo size too fast. I will upload the packages .tar.gz on a separate secure place. Afterwards, I will make the instructions on how to prepare the source code for building and uploading to Debian FTP, Launchpad, etc. After they are all finished, the changes will be put to my fork.

AptiviCEO commented 4 years ago

Well, all of the packages are tarred, gzipped, and released to the Releases of my fork. Now, it's ready to use.

Repository link: https://github.com/EoflaOE/linux-remote-packaging-msbuild The instructions are ready at https://github.com/EoflaOE/linux-remote-packaging-msbuild/blob/master/documentation/building-msbuild-offline.md

This will be the first step of deployability to Launchpad or alternatives.