can't load package when building a go project
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Snapcraft |
Fix Released
|
High
|
Sergio Schvezov | ||
snapcraft (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
Xenial |
Fix Released
|
Undecided
|
Unassigned | ||
Yakkety |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
I'm trying to make a snap for hashicorp's vault.
This is the error I'm getting:
env GOPATH=
can't load package: package vault.git: code in directory /home/elopio/
Command '['/bin/sh', '/tmp/tmpwyqwm_y3', 'env',
'GOPATH=
'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:/
[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.
Changed in snapcraft: | |
importance: | Undecided → High |
milestone: | none → 2.10 |
Changed in snapcraft: | |
status: | New → Incomplete |
status: | Incomplete → Triaged |
Changed in snapcraft: | |
status: | In Progress → Fix Committed |
description: | updated |
Changed in snapcraft (Ubuntu Xenial): | |
milestone: | none → xenial-updates |
Changed in snapcraft: | |
status: | Fix Committed → Fix Released |
I can build the snap by changing the parts like this:
parts: com/hashicorp/ vault
vault:
plugin: go
go-packages:
- github.
Which is suboptimal because then I can only make the snap from the master branch. I would like to make the snap from the latest tag instead.