Putting git inside a snap

Mark Shuttleworth mark at ubuntu.com
Wed Aug 17 13:35:41 UTC 2016


On 17/08/16 09:26, David Callé wrote:
> On 17/08/2016 15:20, Mark Shuttleworth wrote:
>> On 16/08/16 22:09, Sergio Schvezov wrote:
>>> Create a new `apps` entry like this
>>> apps:
>>>    sh:
>>>        command: bash
>>>        plugs: [same list of plugs used by what calls git]
>>>
>>> There's a `snap shell` (or similar) command making a come back some time
>>> and would make this more straightforward.
>> Given the nature of sandboxing during the development process ("zomg the
>> glass walls!") I think we should have a first-class command that spawns
>> a $SHELL (not the shell of the snap but your preferred shell) inside the
>> sandbox.
>
> Isn't that the purpose of the 'snap run --shell' command?
>
> $ snap run --help
> [...]
> [run command options]
>           --shell    run a shell instead of the command (useful for
> debugging)

Oh that's nice! Can I use the actual command name to get the specific
sandbox for that command?

  $ snap run --shell snap.command

Also, this still seems to require that the snap author stuck  "bin/bash"
in the snap:

  $ snap run --shell docker.docker
  cannot snap-exec: cannot exec "/snap/docker/33/bin/bash": no such file
or directory

Seems like we could drop that requirement since /bin/bash is always in
the core snap. But we might also want to let the publisher turn this
off, hence the snap.yaml suggestions.

And finally, I think that command should be "exec" not run, and the
snap-exec error suggests others feel the same way :)

Mark





More information about the Snapcraft mailing list