2016-06-02 07:40:18 |
Leo Arias |
description |
I'm trying to make a snap for hashicorp's vault.
This is the error I'm getting:
env GOPATH=/home/elopio/workspace/canonical/snaps/vault/parts/vault/go go get -t -d ./vault.git/...
can't load package: package vault.git: code in directory /home/elopio/workspace/canonical/snaps/vault/parts/vault/go/src/vault.git expects import "github.com/hashicorp/vault"
Command '['/bin/sh', '/tmp/tmpwyqwm_y3', 'env',
'GOPATH=/home/elopio/workspace/canonical/snaps/vault/parts/vault/go',
'go', 'get', '-t', '-d', './vault.git/...']' returned non-zero exit
status 1
This is the snapcraft.yaml I'm using:
name: vault-elopio
version: snap0.1
summary: Vault is a tool for securely accessing secrets.
description: bla
apps:
vault:
command: bin/vault
plugs: [network, network-bind]
parts:
vault:
plugin: go
source: https://github.com/hashicorp/vault.git |
I'm trying to make a snap for hashicorp's vault.
This is the error I'm getting:
env GOPATH=/home/elopio/workspace/canonical/snaps/vault/parts/vault/go go get -t -d ./vault.git/...
can't load package: package vault.git: code in directory /home/elopio/workspace/canonical/snaps/vault/parts/vault/go/src/vault.git expects import "github.com/hashicorp/vault"
Command '['/bin/sh', '/tmp/tmpwyqwm_y3', 'env',
'GOPATH=/home/elopio/workspace/canonical/snaps/vault/parts/vault/go',
'go', 'get', '-t', '-d', './vault.git/...']' returned non-zero exit
status 1
This is the snapcraft.yaml I'm using:
name: vault-elopio
version: snap0.1
summary: Vault is a tool for securely accessing secrets.
description: bla
apps:
vault:
command: bin/vault
plugs: [network, network-bind]
parts:
vault:
plugin: go
source: https://github.com/hashicorp/vault.git
[Impact]
* Some go projects can't be easily build.
* The workaround is hard to find, it should be clearer what to do for these projects.
[Test Case]
* Create a snapcraft with the vault yaml from this bug.
* Add the new go-importpath field.
* Run snapcraft.
* Verify that you get a usable snap.
[Regression Potential]
* This could affect other go projects. |
|