snappy source foo

Dustin Kirkland kirkland at canonical.com
Sat Oct 31 05:30:50 UTC 2015


On Sat, Oct 31, 2015 at 12:18 AM, Mark Shuttleworth <mark at ubuntu.com> wrote:
> On 31/10/15 14:00, Ted Gould wrote:
>> On Fri, 2015-10-30 at 19:58 +0900, Dustin Kirkland wrote:
>>> One thing I'm really missing in the apt-to-snappy transition is easy
>>> access to source code.
>>>
>>> ie, the equivalent of 'apt-get source foo'.
>>>
>>> I understand that not all snaps will provide source code, but today,
>>> many of them are in fact open source.
>>>
>>> Could the snappy development team please consider adding a field to
>>> the meta/package.yaml which specifies where (git, bzr, elsewhere) the
>>> upstream source code of the snap itself is hosted, and loop in a
>>> command 'snappy source foo' that does the right thing, using the
>>> right
>>> tool, to fetch the source, when possible?
>> I think that it's a good idea, but I don't think that it's that simple
>> though. The reality is that a snap could be made of from a variety of
>> sources, and just a single link doesn't describe enough to be able to
>> do many of the things that you can with apt-get source.
>> I'd propose that instead we leave the parts has a high level item in
>> the packages.yaml and basically make it so that we have one format.
>> Then you'd have the information to rebuild the snap, if you had access
>> to the repositories that held the files. Proprietary vendors could just
>> not ship the parts key to avoid giving out private repo names. This way
>> you could get all the sources that were used for that snap, not just
>> the base one.
>
> I think the point is to be able to get, where available, the
> snapcraft.yaml and tree. That would in turn lead you to the various
> parts, which specify their sources explicitly.
>
> So:
>
>   $ snappy source foo
>   No source provided by sabdfl for foo
>   $ snappy source foo.beuno
>   Source is available for foo.beuno but foo.beuno/ directory already
> exists, please specify alternate target.
>   $ snappy source foo.beuno src-foo
>   Fetching source for foo.beuno...
>   Checking out git://url/foo into src-foo/
>   $ cd src-foo
>   $ snapcraft
>   ...
>
> Or some such. The point is not to guarantee source availability, just to
> provide a starting point for someone who wants to branch the project.
>
> I'd suggest something like this in snapcraft.yaml
>
>   source: url / vcs

Exactly!

In fact, at this point, I'm more interested in seeing the source of
some of the snap packaging, than the target application.  I'm trying
to figure out snapcraft.yaml and AppArmor profiles and all the
build/packaging stuff.

I don't care so much about the source code to xkcd-webserver, but what
I really want to know is how to package something that's *really*
similar.  And for that, I really just want to clone the packaging.

If it's the right time of day for both me and the good people that I
know who work on Snappy, I can ping them on IRC.  But, alas, I'm
jetlagged and it's not the right time of day, and I just want to see
the build magic for myself!!!

Sleepless in Austin,
Dustin



More information about the snappy-devel mailing list