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

Add the packaging metadata to build the gopass snap #16

Closed
wants to merge 4 commits into from

Conversation

come-maiz
Copy link

This is a package for the secure installation of apps that works in most Linux distributions.
Landing it upstream will enable builds that then can be distributed to many users through the Ubuntu store.

@come-maiz
Copy link
Author

come-maiz commented Feb 3, 2017

You can find more information about snapcraft here: http://snapcraft.io/

To test it in an Ubuntu 16.04 machine:

$ sudo apt install git snapcraft
$ cd /tmp
$ git clone --recursive https://github.com/elopio/gopass
$ cd gopass
$ git checkout snapcraft
$ cd dist/snap
$ snapcraft
$ sudo snap install *.snap --dangerous --classic

(dangerous because the snap you build yourself doesn't come signed from the trusted store. classic to not use the confinement for now. Once you push it to the store, your users will just have to do $ sudo snap install gopass)

This is an interesting use case for us. Moving from classic to strict confinement would require the users to trust you with their gpg keys. Which is something that should be possible, our philosophy is that we should make it easier from the users to trust in the upstream developers that are providing the software. But the users should still be in control, and it should be clear to what they are agreeing. It would be great to have your opinions in this discussion.

If you have any questions or comments, please let me know.

@metalmatze metalmatze added this to the 1.1.0 milestone Feb 3, 2017
Copy link
Member

@dominikschulz dominikschulz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unfortunately I'm not familiar with the snap package format. Is it necessary to include the snap metadata in the upstream package?

@come-maiz
Copy link
Author

Hey @dominikschulz ! thanks for checking it out.

It's not necessary to have the metadata in master. However, the workflow and tools are optimized to get a continuous delivery from upstream developers directly to users. With the yaml in this branch it would be really simple to configure something like travis to push to the edge channel in the store every time you make a change in master. Then your users in edge will get an automatic update and will be able to give you early feedback before you make a stable release. You get that and many other things just with a simple yaml file.

Copy link
Member

@dominikschulz dominikschulz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we place the snapcraft.yml in dist/snap/snapcraft.yml?

I'd prefer not to clutter to repo root too much.

source: .
plugin: go
go-importpath: github.com/justwatchcom/gopass
stage-packages: [gnupg]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we need git in here as well.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

@dominikschulz dominikschulz self-assigned this Feb 4, 2017
@dominikschulz dominikschulz removed the request for review from metalmatze February 4, 2017 13:50
@dominikschulz dominikschulz added the feature Enhancements and new features label Feb 4, 2017
@come-maiz
Copy link
Author

I've moved the yaml to dist/snap. Just take into account that now snapcraft has to be called from dist/snap.

Thanks a lot for the review. Please share your thoughts about snaps :D

@dominikschulz
Copy link
Member

Thank you. We will test the snap package and merge this if all works well.

@dominikschulz
Copy link
Member

@ElOpio Was just testing your PR. Unfortunately I can't seem to build the snap on Ubuntu 16.04. It fails with an error like this:

Pulling gopass 
go get -t -d ./github.com/justwatchcom/gopass/...
package github.com/justwatchcom/gopass/action: /home/user/go/src/github.com/justwatchcom/gopass/dist/parts/gopass/go/src/github.com/justwatchcom/gopass exists but /home/user/go/src/github.com/justwatchcom/gopass/dist/parts/gopass/go/src/github.com/justwatchcom/gopass/.git does not - stale checkout?
package github.com/justwatchcom/gopass/fsutil: cannot find package "github.com/justwatchcom/gopass/fsutil" in any of:
        /usr/lib/go-1.6/src/github.com/justwatchcom/gopass/fsutil (from $GOROOT)
        /home/user/go/src/github.com/justwatchcom/gopass/dist/parts/gopass/go/src/github.com/justwatchcom/gopass/fsutil (from $GOPATH
[...]
Command '['/bin/sh', '/tmp/tmp3ni27wzn', 'go', 'get', '-t', '-d', './github.com/justwatchcom/gopass/...']' returned non-zero exit status 1

@come-maiz come-maiz force-pushed the snapcraft branch 2 times, most recently from 9c0d647 to cee9e22 Compare February 20, 2017 20:48
@come-maiz
Copy link
Author

@dominikschulz it seems that you are running snapcraft from a weird git directory.

I've updated the steps to build in my comment above to make sure that your repo is clean, and to take into account the new location of the yaml in dist. I've also rebased with the recent master changes. If that doesn't work for you, please give me the steps you are following so I can try to reproduce in my 16.04.

pura vida.

@dominikschulz
Copy link
Member

Sorry, still no luck building it and we're not sure we want this add complexity in. Not merging for the time being.

@come-maiz
Copy link
Author

That's sad, but thanks for trying it.

It would be very useful for us to understand what went wrong in your environment, to support it too. So if in the future you want to get gopass in the Ubuntu store, please let me know. We are also close to get https://build.snapcraft.io/ out of the beta, so in the future building and publishing in a clean and reproducible environment will just require a couple of clicks.

@Beanow Beanow mentioned this pull request May 29, 2018
@AnomalRoil AnomalRoil added this to In progress in Packaging via automation Dec 21, 2021
@AnomalRoil AnomalRoil moved this from In progress to Done in Packaging Dec 21, 2021
@AnomalRoil AnomalRoil moved this from Done to Canceled in Packaging Dec 21, 2021
samuelnilsson pushed a commit to samuelnilsson/gopass that referenced this pull request Sep 7, 2023
Fixes gopasspw#16

RELEASE_NOTES=n/a

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Enhancements and new features
Projects
Packaging
Canceled
Development

Successfully merging this pull request may close these issues.

None yet

3 participants