Is the network available for builds?

Asked by Michal Migurski on 2016-04-27

This is a followup to https://answers.launchpad.net/launchpad/+question/292133. I’m still new to this process, and my questions are beginner questions.

My recent build is failing: https://launchpad.net/~migurski/+archive/ubuntu/hello/+build/9654823, due to a network issue:

    make[1]: Entering directory `/«PKGBUILDDIR»'
    npm install
    npm WARN package.json @ No description
    npm WARN package.json @ No repository field.
    npm WARN package.json @ No README data
    npm http GET https://registry.npmjs.org/left-pad
    npm http GET https://registry.npmjs.org/left-pad
    npm http GET https://registry.npmjs.org/left-pad
    npm ERR! network getaddrinfo ENOTFOUND
    npm ERR! network This is most likely not a problem with npm itself
    npm ERR! network and is related to network connectivity.
    npm ERR! network In most cases you are behind a proxy or have bad network settings.
    npm ERR! network
    npm ERR! network If you are behind a proxy, please make sure that the
    npm ERR! network 'proxy' config is set properly. See: 'npm help config'

Should I expect to see this work during the build step?

Question information

Language:
English Edit question
Status:
Solved
For:
Launchpad itself Edit question
Assignee:
No assignee Edit question
Solved by:
Michal Migurski
Solved:
2016-04-28
Last query:
2016-04-28
Last reply:
2016-04-27
Colin Watson (cjwatson) said : #1

No, you aren't permitted to use the network during package builds. You need to put the code you need in your source package or in one of its build-dependencies; among other things this makes your builds more reproducible and reliable, and it's important for us for security (e.g. ensuring that our build farm isn't turned into a botnet farm by some enterprising individuals). We probably cannot help you with the exact mechanics of how to do this with npm in particular.

Michal Migurski (migurski) said : #2

Thank you, makes sense!

Michal Migurski (migurski) said : #3

I’ve posted a write-up of this and previous questions, and I appreciate your help over the past few weeks: http://mike.teczno.com/notes/debian-packaging-for-ubuntu.html