Skip to content
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

WIP Snap package - closes #2147 #2318

Closed
wants to merge 1 commit into from

Conversation

@benfrancis
Copy link
Contributor

benfrancis commented Nov 25, 2019

Made a fresh start on a snap configuration.

@benfrancis

This comment has been minimized.

Copy link
Contributor Author

benfrancis commented Nov 25, 2019

I've made a start on creating a snapcraft.yaml following the tutorial at https://tutorials.ubuntu.com/tutorial/build-a-nodejs-service

I've got as far as snapcraft prime with a single part. I've specified npm as the package manager, specified Node.js 8 and set git as a build dependency in order to get around the first lot of errors, but when I run:

snapcraft prime --debug

I now see the following output:

Launching a VM.
Pulling webthings-gateway                                                       
Downloading 'node-v8.16.2-linux-x64.tar.gz'[==========================================================================================] 100%
/root/parts/webthings-gateway/npm/bin/npm install
npm WARN tar ENOENT: no such file or directory, open '/root/parts/webthings-gateway/src/node_modules/.staging/readable-stream-9c3e58a8/lib/_stream_duplex.js'
npm WARN tar ENOENT: no such file or directory, open '/root/parts/webthings-gateway/src/node_modules/.staging/readable-stream-8f156e1e/lib/_stream_duplex.js'
npm WARN tar ENOENT: no such file or directory, open '/root/parts/webthings-gateway/src/node_modules/.staging/readable-stream-9c3e58a8/lib/_stream_passthrough.js'
npm WARN tar ENOENT: no such file or directory, open '/root/parts/webthings-gateway/src/node_modules/.staging/readable-stream-8f156e1e/lib/_stream_passthrough.js'
npm WARN tar ENOENT: no such file or directory, open '/root/parts/webthings-gateway/src/node_modules/.staging/readable-stream-9c3e58a8/lib/_stream_readable.js'
npm WARN tar ENOENT: no such file or directory, open '/root/parts/webthings-gateway/src/node_modules/.staging/readable-stream-8f156e1e/lib/_stream_readable.js'
npm WARN tar ENOENT: no such file or directory, open '/root/parts/webthings-gateway/src/node_modules/.staging/shaka-player-fb6fd045/CONTRIBUTING.md'
npm WARN tar ENOENT: no such file or directory, open '/root/parts/webthings-gateway/src/node_modules/.staging/css-loader-0d04ac77/dist/runtime/api.js'
npm WARN tar ENOENT: no such file or directory, open '/root/parts/webthings-gateway/src/node_modules/.staging/json5-daccf281/dist/index.min.mjs'
npm WARN tar ENOENT: no such file or directory, open '/root/parts/webthings-gateway/src/node_modules/.staging/webpack-cli-d920f7a0/bin/config/config-yargs.js'
npm WARN tar ENOENT: no such file or directory, open '/root/parts/webthings-gateway/src/node_modules/.staging/shaka-player-fb6fd045/CONTRIBUTORS'
npm WARN tar ENOENT: no such file or directory, lstat '/root/parts/webthings-gateway/src/node_modules/.staging/css-loader-0d04ac77/dist'
npm WARN tar ENOENT: no such file or directory, open '/root/parts/webthings-gateway/src/node_modules/.staging/ajv-44a28480/dist/ajv.min.js'
npm WARN tar ENOENT: no such file or directory, open '/root/parts/webthings-gateway/src/node_modules/.staging/shaka-player-fb6fd045/index.html'
npm WARN tar ENOENT: no such file or directory, open '/root/parts/webthings-gateway/src/node_modules/.staging/webpack-cli-d920f7a0/bin/config/optionsSchema.json'
npm WARN tar ENOENT: no such file or directory, open '/root/parts/webthings-gateway/src/node_modules/.staging/shaka-player-fb6fd045/karma.conf.js'
npm WARN tar ENOENT: no such file or directory, open '/root/parts/webthings-gateway/src/node_modules/.staging/shaka-player-fb6fd045/LICENSE'
npm WARN tar ENOENT: no such file or directory, open '/root/parts/webthings-gateway/src/node_modules/.staging/csv-parse-b7c26e9d/lib/index.js'
npm WARN tar ENOENT: no such file or directory, open '/root/parts/webthings-gateway/src/node_modules/.staging/shaka-player-fb6fd045/README.md'
npm WARN tar ENOENT: no such file or directory, open '/root/parts/webthings-gateway/src/node_modules/.staging/shaka-player-fb6fd045/roadmap.md'
npm WARN tar ENOENT: no such file or directory, open '/root/parts/webthings-gateway/src/node_modules/.staging/bluebird-f8981a27/js/browser/bluebird.min.js'
npm WARN tar ENOENT: no such file or directory, open '/root/parts/webthings-gateway/src/node_modules/.staging/webdriverio-19f0a036/build/commands/browser/call.js'
npm WARN tar ENOENT: no such file or directory, open '/root/parts/webthings-gateway/src/node_modules/.staging/shaka-player-fb6fd045/shaka-player.uncompiled.js'
npm WARN tar ENOENT: no such file or directory, open '/root/parts/webthings-gateway/src/node_modules/.staging/shaka-player-fb6fd045/support.html'
npm WARN tar ENOENT: no such file or directory, open '/root/parts/webthings-gateway/src/node_modules/.staging/mobile-drag-drop-6c012d7b/scroll-behaviour.d.ts'
npm WARN tar ENOENT: no such file or directory, open '/root/parts/webthings-gateway/src/node_modules/.staging/jsdom-b399a68c/lib/jsdom/living/aborting/AbortSignal-impl.js'
npm WARN tar ENOENT: no such file or directory, open '/root/parts/webthings-gateway/src/node_modules/.staging/mobile-drag-drop-6c012d7b/scroll-behaviour.js'
npm WARN tar ENOENT: no such file or directory, open '/root/parts/webthings-gateway/src/node_modules/.staging/mobile-drag-drop-6c012d7b/scroll-behaviour.js.map'
npm WARN tar ENOENT: no such file or directory, open '/root/parts/webthings-gateway/src/node_modules/.staging/acorn-ad5ff335/dist/acorn.mjs.map'
npm WARN tar ENOENT: no such file or directory, open '/root/parts/webthings-gateway/src/node_modules/.staging/acorn-f2fed9d2/dist/acorn.mjs.map'
npm WARN tar ENOENT: no such file or directory, open '/root/parts/webthings-gateway/src/node_modules/.staging/webdriverio-19f0a036/build/commands/browser/debug.js'
npm WARN tar ENOENT: no such file or directory, open '/root/parts/webthings-gateway/src/node_modules/.staging/webdriverio-19f0a036/build/commands/browser/deleteCookies.js'
npm WARN tar ENOENT: no such file or directory, lstat '/root/parts/webthings-gateway/src/node_modules/.staging/typescript-60e12d0c/lib/de'
npm WARN tar ENOENT: no such file or directory, open '/root/parts/webthings-gateway/src/node_modules/.staging/eslint-9264d4df/LICENSE'
npm WARN tar ENOENT: no such file or directory, open '/root/parts/webthings-gateway/src/node_modules/.staging/typescript-60e12d0c/lib/diagnosticMessages.generated.json'
npm WARN tar ENOENT: no such file or directory, open '/root/parts/webthings-gateway/src/node_modules/.staging/eslint-9264d4df/README.md'
npm WARN tar ENOENT: no such file or directory, open '/root/parts/webthings-gateway/src/node_modules/.staging/webdriverio-19f0a036/build/commands/browser/execute.js'
npm WARN tar ENOENT: no such file or directory, open '/root/parts/webthings-gateway/src/node_modules/.staging/webdriverio-19f0a036/build/commands/browser/executeAsync.js'
npm WARN tar ENOENT: no such file or directory, open '/root/parts/webthings-gateway/src/node_modules/.staging/webdriverio-19f0a036/build/commands/browser/getCookies.js'
npm WARN tar ENOENT: no such file or directory, open '/root/parts/webthings-gateway/src/node_modules/.staging/jsdom-b399a68c/lib/jsdom/living/attributes/Attr-impl.js'
npm WARN tar ENOENT: no such file or directory, open '/root/parts/webthings-gateway/src/node_modules/.staging/@hapi/joi-4ea43810/lib/types/string/uri.js'
npm WARN tar ENOENT: no such file or directory, open '/root/parts/webthings-gateway/src/node_modules/.staging/webdriverio-19f0a036/build/commands/browser/getWindowSize.js'
npm WARN tar ENOENT: no such file or directory, open '/root/parts/webthings-gateway/src/node_modules/.staging/webdriverio-19f0a036/build/commands/browser/keys.js'
npm WARN tar ENOENT: no such file or directory, open '/root/parts/webthings-gateway/src/node_modules/.staging/webdriverio-19f0a036/build/commands/browser/newWindow.js'
npm WARN tar ENOENT: no such file or directory, open '/root/parts/webthings-gateway/src/node_modules/.staging/webdriverio-19f0a036/build/commands/browser/pause.js'
npm WARN tar ENOENT: no such file or directory, open '/root/parts/webthings-gateway/src/node_modules/.staging/webdriverio-19f0a036/build/commands/browser/react$.js'
npm WARN tar ENOENT: no such file or directory, open '/root/parts/webthings-gateway/src/node_modules/.staging/webdriverio-19f0a036/build/commands/browser/react$$.js'
npm WARN tar ENOENT: no such file or directory, open '/root/parts/webthings-gateway/src/node_modules/.staging/webdriverio-19f0a036/build/commands/browser/reloadSession.js'
npm WARN tar ENOENT: no such file or directory, open '/root/parts/webthings-gateway/src/node_modules/.staging/webdriverio-19f0a036/build/commands/browser/saveRecordingScreen.js'
npm WARN tar ENOENT: no such file or directory, open '/root/parts/webthings-gateway/src/node_modules/.staging/webdriverio-19f0a036/build/commands/browser/saveScreenshot.js'
npm WARN tar ENOENT: no such file or directory, open '/root/parts/webthings-gateway/src/node_modules/.staging/jsdom-b399a68c/lib/jsdom/living/generated/CDATASection.js'
npm WARN tar ENOENT: no such file or directory, open '/root/parts/webthings-gateway/src/node_modules/.staging/jsdom-b399a68c/lib/jsdom/living/generated/CharacterData.js'
npm WARN tar ENOENT: no such file or directory, open '/root/parts/webthings-gateway/src/node_modules/.staging/webdriverio-19f0a036/build/commands/browser/setCookies.js'
npm WARN tar ENOENT: no such file or directory, open '/root/parts/webthings-gateway/src/node_modules/.staging/webdriverio-19f0a036/build/commands/browser/setTimeout.js'
npm WARN tar ENOENT: no such file or directory, open '/root/parts/webthings-gateway/src/node_modules/.staging/webdriverio-19f0a036/build/commands/browser/setWindowSize.js'
npm WARN tar ENOENT: no such file or directory, open '/root/parts/webthings-gateway/src/node_modules/.staging/jsdom-b399a68c/lib/jsdom/living/generated/CloseEvent.js'
npm WARN tar ENOENT: no such file or directory, open '/root/parts/webthings-gateway/src/node_modules/.staging/jsdom-b399a68c/lib/jsdom/living/generated/CloseEventInit.js'
npm WARN tar ENOENT: no such file or directory, open '/root/parts/webthings-gateway/src/node_modules/.staging/jsdom-b399a68c/lib/jsdom/living/generated/Comment.js'
npm WARN tar ENOENT: no such file or directory, open '/root/parts/webthings-gateway/src/node_modules/.staging/webdriverio-19f0a036/build/commands/browser/switchWindow.js'
npm WARN tar ENOENT: no such file or directory, open '/root/parts/webthings-gateway/src/node_modules/.staging/jsdom-b399a68c/lib/jsdom/living/generated/CompositionEvent.js'
npm WARN tar ENOENT: no such file or directory, open '/root/parts/webthings-gateway/src/node_modules/.staging/jsdom-b399a68c/lib/jsdom/living/generated/CompositionEventInit.js'
npm WARN tar ENOENT: no such file or directory, open '/root/parts/webthings-gateway/src/node_modules/.staging/webdriverio-19f0a036/build/commands/browser/touchAction.js'
npm WARN tar ENOENT: no such file or directory, open '/root/parts/webthings-gateway/src/node_modules/.staging/webdriverio-19f0a036/build/commands/element/touchAction.js'
npm WARN tar ENOENT: no such file or directory, open '/root/parts/webthings-gateway/src/node_modules/.staging/webdriverio-19f0a036/build/commands/browser/uploadFile.js'
npm WARN tar ENOENT: no such file or directory, open '/root/parts/webthings-gateway/src/node_modules/.staging/webdriverio-19f0a036/build/commands/browser/url.js'
npm WARN tar ENOENT: no such file or directory, open '/root/parts/webthings-gateway/src/node_modules/.staging/webdriverio-19f0a036/build/commands/element/waitForDisplayed.js'
npm WARN tar ENOENT: no such file or directory, open '/root/parts/webthings-gateway/src/node_modules/.staging/webdriverio-19f0a036/build/commands/element/waitForEnabled.js'
npm WARN tar ENOENT: no such file or directory, open '/root/parts/webthings-gateway/src/node_modules/.staging/jsdom-b399a68c/lib/jsdom/living/generated/CustomEvent.js'
npm WARN tar ENOENT: no such file or directory, open '/root/parts/webthings-gateway/src/node_modules/.staging/webdriverio-19f0a036/build/commands/element/waitForExist.js'
npm WARN tar ENOENT: no such file or directory, open '/root/parts/webthings-gateway/src/node_modules/.staging/jsdom-b399a68c/lib/jsdom/living/generated/CustomEventInit.js'
npm WARN tar ENOENT: no such file or directory, open '/root/parts/webthings-gateway/src/node_modules/.staging/webdriverio-19f0a036/build/commands/browser/waitUntil.js'
npm WARN tar ENOENT: no such file or directory, open '/root/parts/webthings-gateway/src/node_modules/.staging/webdriverio-19f0a036/build/commands/element/waitUntil.js'
npm WARN tar ENOENT: no such file or directory, open '/root/parts/webthings-gateway/src/node_modules/.staging/jsdom-b399a68c/lib/jsdom/living/generated/Document.js'
npm WARN tar ENOENT: no such file or directory, lstat '/root/parts/webthings-gateway/src/node_modules/.staging/core-js-1487fe53/fn/math'
npm WARN tar ENOENT: no such file or directory, lstat '/root/parts/webthings-gateway/src/node_modules/.staging/core-js-1487fe53/library/fn/math'
npm WARN tar ENOENT: no such file or directory, lstat '/root/parts/webthings-gateway/src/node_modules/.staging/core-js-1487fe53/fn/string'
npm WARN tar ENOENT: no such file or directory, lstat '/root/parts/webthings-gateway/src/node_modules/.staging/core-js-1487fe53/fn/string'
npm WARN tar ENOENT: no such file or directory, lstat '/root/parts/webthings-gateway/src/node_modules/.staging/core-js-1487fe53/library/fn/string'
npm WARN tar ENOENT: no such file or directory, lstat '/root/parts/webthings-gateway/src/node_modules/.staging/core-js-1487fe53/library/fn/string'
npm WARN tar ENOENT: no such file or directory, lstat '/root/parts/webthings-gateway/src/node_modules/.staging/core-js-1487fe53/fn/reflect'
npm WARN tar ENOENT: no such file or directory, lstat '/root/parts/webthings-gateway/src/node_modules/.staging/core-js-1487fe53/library/fn/reflect'
npm WARN tar ENOENT: no such file or directory, lstat '/root/parts/webthings-gateway/src/node_modules/.staging/core-js-1487fe53/fn/typed'
npm WARN tar ENOENT: no such file or directory, lstat '/root/parts/webthings-gateway/src/node_modules/.staging/core-js-1487fe53/library/fn/typed'
npm WARN tar ENOENT: no such file or directory, open '/root/parts/webthings-gateway/src/node_modules/.staging/core-js-1487fe53/fn/asap.js'
npm WARN tar ENOENT: no such file or directory, open '/root/parts/webthings-gateway/src/node_modules/.staging/core-js-1487fe53/library/fn/asap.js'
npm WARN tar ENOENT: no such file or directory, lstat '/root/parts/webthings-gateway/src/node_modules/.staging/core-js-1487fe53/fn/math'
npm WARN tar ENOENT: no such file or directory, lstat '/root/parts/webthings-gateway/src/node_modules/.staging/core-js-1487fe53/library/fn/math'
npm WARN tar ENOENT: no such file or directory, lstat '/root/parts/webthings-gateway/src/node_modules/.staging/core-js-1487fe53/fn/object'
npm WARN tar ENOENT: no such file or directory, lstat '/root/parts/webthings-gateway/src/node_modules/.staging/core-js-1487fe53/library/fn/object'
npm WARN tar ENOENT: no such file or directory, lstat '/root/parts/webthings-gateway/src/node_modules/.staging/core-js-1487fe53/fn/symbol'
npm WARN tar ENOENT: no such file or directory, lstat '/root/parts/webthings-gateway/src/node_modules/.staging/core-js-1487fe53/library/fn/symbol'
npm WARN tar ENOENT: no such file or directory, lstat '/root/parts/webthings-gateway/src/node_modules/.staging/core-js-1487fe53/fn/string'
npm WARN tar ENOENT: no such file or directory, lstat '/root/parts/webthings-gateway/src/node_modules/.staging/core-js-1487fe53/fn/string'
npm WARN tar ENOENT: no such file or directory, lstat '/root/parts/webthings-gateway/src/node_modules/.staging/core-js-1487fe53/library/fn/string'
npm WARN tar ENOENT: no such file or directory, lstat '/root/parts/webthings-gateway/src/node_modules/.staging/core-js-1487fe53/library/fn/string'
npm WARN tar ENOENT: no such file or directory, lstat '/root/parts/webthings-gateway/src/node_modules/.staging/core-js-1487fe53/fn/math'
npm WARN tar ENOENT: no such file or directory, lstat '/root/parts/webthings-gateway/src/node_modules/.staging/core-js-1487fe53/library/fn/math'
npm WARN tar ENOENT: no such file or directory, lstat '/root/parts/webthings-gateway/src/node_modules/.staging/core-js-1487fe53/fn/string'
npm WARN tar ENOENT: no such file or directory, lstat '/root/parts/webthings-gateway/src/node_modules/.staging/core-js-1487fe53/fn/string'
npm WARN tar ENOENT: no such file or directory, lstat '/root/parts/webthings-gateway/src/node_modules/.staging/core-js-1487fe53/library/fn/string'
npm WARN tar ENOENT: no such file or directory, lstat '/root/parts/webthings-gateway/src/node_modules/.staging/core-js-1487fe53/library'
npm WARN tar ENOENT: no such file or directory, lstat '/root/parts/webthings-gateway/src/node_modules/.staging/core-js-1487fe53/fn/function'
npm WARN tar ENOENT: no such file or directory, lstat '/root/parts/webthings-gateway/src/node_modules/.staging/core-js-1487fe53/fn/function'
npm ERR! Error while executing:
npm ERR! /usr/bin/git ls-remote -h -t https://github.com/mozilla-iot/gateway-addon-node.git
npm ERR! 
npm ERR! fatal: failed to stat '/root/parts/webthings-gateway/src': Permission denied
npm ERR! 
npm ERR! exited with error code: 128

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2019-11-25T18_40_03_740Z-debug.log
Failed to run '/root/parts/webthings-gateway/npm/bin/npm install' for 'webthings-gateway': Exited with code 1.
Verify that the part is using the correct parameters and try again.

I've verified that inside the vm I can manually execute:

/usr/bin/git ls-remote -h -t https://github.com/mozilla-iot/gateway-addon-node.git

successfully and the permissions on /root/parts/webthings-gateway/src are:

drwxr-xr-x 14 root root 4096 Nov 25 18:38 src

2019-11-25T18_40_03_740Z-debug.log doesn't seem to provide any more useful information.

@mrstegeman mrstegeman force-pushed the benfrancis:snap branch from b7b9094 to 2c8753c Nov 25, 2019
@mrstegeman

This comment has been minimized.

Copy link
Member

mrstegeman commented Nov 25, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
WebThings
  
Done
2 participants
You can’t perform that action at this time.