Putting git inside a snap
Sergio Schvezov
sergio.schvezov at canonical.com
Wed Aug 17 13:55:03 UTC 2016
El 17/08/16 a las 10:36, Marco Ceppi escribió:
> On Tue, Aug 16, 2016 at 10:11 PM Sergio Schvezov
> <sergio.schvezov at canonical.com <mailto:sergio.schvezov at canonical.com>>
> wrote:
>
> Create a new `apps` entry like this
>
> apps:
> sh:
> command: bash
> plugs: [same list of plugs used by what calls git]
>
>
> I did something similar:
>
> apps:
> git:
> command: usr/bin/git
> plugs: [...]
>
> This way I could mess around with charm.git and play with environment
> variables. At the end of the day GIT_EXEC_PATH and PREFIX were needed.
>
> Even still I'm having issues with things like `git clone --recursive` so
> I've patched those calls out of the source code for now (when not
> needed). I'll keep playing around to see if I can get git-submodules to
> work but 95% of the use cases for the tool are functioning now.
>
>
> There's a `snap shell` (or similar) command making a come back some time
> and would make this more straightforward.
>
> For what it's worth I strace and gdb like this in a `snap try` session.
>
>
> I spent quite a long time with strace against charm.git, but that lead
> to more problems than help. I've not used `snap try` yet.
The reason I mention `snap try` is becuase I am lazy :-)
snap try --devmode prime
Then if needed when in the snap's environment
cp /usr/bin/strace prime
And anything else you can think of.
More information about the Snapcraft
mailing list