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 guetzli snap #18

Closed
wants to merge 5 commits into from

Conversation

come-maiz
Copy link
Contributor

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.

This PR requires #15.

@googlebot
Copy link

We found a Contributor License Agreement for you (the sender of this pull request), but were unable to find agreements for the commit author(s). If you authored these, maybe you used a different email address in the git commits than was used to sign the CLA (login here to double check)? If these were authored by someone else, then they will need to sign a CLA as well, and confirm that they're okay with these being contributed to Google.

@come-maiz
Copy link
Contributor Author

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
$ git clone https://github.com/elopio/guetzli
$ cd guetzli
$ git checkout snapcraft
$ snapcraft
$ sudo snap install *.snap --dangerous

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

apps:
guetzli:
command: bin/Release/guetzli
plugs: [home]
Copy link
Contributor

Choose a reason for hiding this comment

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

Just curious: is there no way to say "this application has to access user-chosen files" and:
a) for commandline apps, consider paths mentioned on the commandline to be user-chosen
b) for GUI apps, require the app to use an external filepicker and consider files chosen in the filepicker as user-chosen?

It seems to kinda defeat the whole point of sandboxing if an app can modify ~/.bashrc

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The home interface excludes dot files, so the user can't read or write to .bashrc.

This is a transitional interface, which offers a little more access than what we would like, to ease the transition to snaps. In the ubuntu phone we have that filepicker, it's called media hub and some of my teammates are working on snap support there. For CLI applications, we are first collecting feedback from the use of the home and removable-media interfaces, and the classic-confinement, before settling in a final design for file access out of the safe snap space.

So any feedback you can give us here will be highly appreciated.

@robryk
Copy link
Contributor

robryk commented Jan 17, 2017

Thanks. I've merged this manually.

I don't have Ubuntu 16 on hand (only Ubuntu 14), so I'd appreciate if you checked that this actually works.

@robryk robryk closed this Jan 17, 2017
@robryk
Copy link
Contributor

robryk commented Jan 17, 2017

@ElOpio How does this work with 32bit and 64bit systems? When you compile Guetzli with make, it will build for whatever architecture $CXX will by default build for. I am under the impression that precompiled snaps do get distributed.

@come-maiz come-maiz deleted the snapcraft branch January 23, 2017 14:50
@come-maiz
Copy link
Contributor Author

Hello @robryk. Thanks for merging, and sorry for the late reply. I was on holidays, but now I'm back, and happy to help you publishing the snap if you need a hand :)

The snap will include the precompiled binaries. Our preferred solution for building snaps for multiple architectures is the build farm in launchpad. You give it a git repo with a snapcraft.yaml and it will build and publish one snap for each supported architecture. http://snapcraft.io/docs/build-snaps/ci-integration#using-launchpad

In our opinion, that simplifies the problem a lot because you don't have to take care of multiple toolchains in travis or jenkins. However, we are talking about supporting builds for other architectures for cases like go, that make it really simple and clean. And you can always build the snap as part of your custom multi-arch build, like https://github.com/syncthing/syncthing/blob/master/build.go#L566

Again, we would appreciate your comments about different architectures to help us assign priorities in our backlog.

¡pura vida!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants