Build fails on Launchpad but succeeds on development machine

Asked by EoflaOE on 2020-05-22

I have a PPA that provides the two packages for a Mono software, and it's called MSBuild (https://launchpad.net/~eofla/+archive/ubuntu/mono-msbuild). It has core-setup, and msbuild. I have downloaded the sources from this site: https://github.com/mono/linux-packaging-msbuild and https://github.com/mono/linux-packaging-core-setup

Next, I have started my development machine (virtual machine) and set everything as needed. I have also fixed the circular dependency because this is the first time packaging for PPA. I have built core-setup and msbuild successfully on my virtual machine. I have made sure that they are signed. I have uploaded the necessary files to Launchpad using dput.

core-setup has successfully built on Launchpad, but when it comes to msbuild, it fails after 1 minute and 40 seconds. This is the build overview: https://launchpad.net/~eofla/+archive/ubuntu/mono-msbuild/+build/19340288

When I looked at the build log, it seems that it progressed until it tries to build the package. It has failed after downloading msbuild artifact from its GitHub repository. This is the error from the log:

unzip: cannot find or open /<<BUILDDIR>>/msbuild-16.5+xamarinxplat.2020.02.20.11.54.1/eng/../artifacts/msbuild.zip, /<<BUILDDIR>>/msbuild-16.5+xamarinxplat.2020.02.20.11.54.1/eng/../artifacts/msbuild.zip.zip or /<<BUILDDIR>>/msbuild-16.5+xamarinxplat.2020.02.20.11.54.1/eng/../artifacts/msbuild.zip.ZIP.

Furthermore, when I looked at the rules, it executes the build artifact shell script in the source code, and tries to download msbuild. After it does it, it fails when unzipping. This is on cibuild_bootstrapped_msbuild.sh on line 61: unzip -q "$msbuild_zip" -d "$artifacts_dir"

How can I fix the problem? This PPA, https://launchpad.net/~eofla/+archive/ubuntu/kernel-sim, is waiting for msbuild (build-dependency) to arrive because it isn't available in the official Ubuntu repository.

Question information

Language:
English Edit question
Status:
Solved
For:
Launchpad itself Edit question
Assignee:
No assignee Edit question
Solved by:
Manfred Hampl
Solved:
2020-05-23
Last query:
2020-05-23
Last reply:
2020-05-22
Best Manfred Hampl (m-hampl) said : #1

The builders do not have access to the public internet for downloading
see also comment #1 in https://answers.launchpad.net/launchpad/+question/292654

EoflaOE (eofla) said : #2

Thanks for the answer, Manfred! I will modify the installation script so that it does not use the network, and uses the local files. However here comes the bigger problem. It calls the msbuild after preparing everything, and it is restoring packages from the Internet. Where can I place the local files without modifying the upstream source code so the script can move the appropriate files to their appropriate directories and use them?

EoflaOE (eofla) said : #3

Well, I guess I have to figure it out myself. I will create a fork of the msbuild repo and modify so it builds without Internet. Apparently, the person behind the repo has assumed that there is Internet. I will try to supply local NuGet packages and required files and modify scripts to get MSBuild to build without Internet so it works on Launchpad.

EoflaOE (eofla) said : #4

Thanks Manfred Hampl, that solved my question.