license.txt and snap/ directory

2017-02-06 Thread Joseph Rushton Wakeling

On 06/02/17 00:00, Sergio Schvezov wrote:

We removed all traces of license.txt from our
documentation months ago as snapd made no use of it. That said you are free to
drop license file inside the snap wherever you want.


Just to follow up a little here: I'm honestly not sure I like this change.  It 
may not be used by snapd but it makes sense that there should be an expectation 
that each snap package will contain a license file in a standardized location, 
and there should be a standardized way of providing it.


Related to the 2.26 changes: I notice that as of 2.26 any generated package now 
includes a `snap/` directory, even though the `gui` and `snap.yaml` files 
included with the generated package still wind up in the `meta/` directory.


Is this a transitional change (with `snap/` being the intended long-term 
location for metadata) or just a bug?


--
Snapcraft mailing list
Snapcraft@lists.snapcraft.io
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/snapcraft


Re: license.txt and snap/ directory

2017-02-06 Thread Sergio Schvezov
On Mon, 6 Feb 2017 23:09:04 +0100, Joseph Rushton Wakeling wrote:
> On 06/02/17 00:00, Sergio Schvezov wrote:
>> We removed all traces of license.txt from our
> >
>  
>> drop license file inside the snap wherever you want.
>
> Just to follow up a little here: I'm honestly not sure I like 
> this change.  It 
> may not be used by snapd but it makes sense that there should 
> be an expectation 
> that each snap package will contain a license file in a 
> standardized location, 
> and there should be a standardized way of providing it.

If it is not defined anywhere though, this is just a de-facto standard as it 
really is upto each person creating there snap about where to put it.

> Related to the 2.26 changes: I notice that as of 2.26 any 
> generated package now 
> includes a `snap/` directory, even though the `gui` and `snap.yaml` files 
> included with the generated package still wind up in the `meta/` directory.
>
> Is this a transitional change (with `snap/` being the intended long-term 
> location for metadata) or just a bug?

Files owned by snapcraft will go in snap, files owned by snapd will go in 
snapd. All the command wrappers that snapcraft creates will also go in here.

-- 
Sent using Dekko from my Ubuntu device

-- 
Snapcraft mailing list
Snapcraft@lists.snapcraft.io
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/snapcraft


Re: license.txt and snap/ directory

2017-02-06 Thread Joseph Rushton Wakeling

On 06/02/17 23:40, Sergio Schvezov wrote:

If it is not defined anywhere though, this is just a de-facto standard as it 
really is upto each person creating there snap about where to put it.


Well, that's what I'm saying -- IMO it should be defined (as I believe it used 
to be).



Files owned by snapcraft will go in snap, files owned by snapd will go in 
snapd. All the command wrappers that snapcraft creates will also go in here.


Just to make sure I understand what you're saying, are you talking here about 
the directory layout of the snap package definition, or the generated snap package?


I'm talking about the directory layout in the generated snap package.  Currently 
an empty `snap/` directory gets created in there and I don't see the point of it 
if it does not contain anything.


--
Snapcraft mailing list
Snapcraft@lists.snapcraft.io
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/snapcraft


Re: license.txt and snap/ directory

2017-02-06 Thread Kyle Fazzari


On 02/06/2017 03:03 PM, Joseph Rushton Wakeling wrote:
> On 06/02/17 23:40, Sergio Schvezov wrote:
>> If it is not defined anywhere though, this is just a de-facto standard
>> as it really is upto each person creating there snap about where to
>> put it.
> 
> Well, that's what I'm saying -- IMO it should be defined (as I believe
> it used to be).
> 
>> Files owned by snapcraft will go in snap, files owned by snapd will go
>> in snapd. All the command wrappers that snapcraft creates will also go
>> in here.
> 
> Just to make sure I understand what you're saying, are you talking here
> about the directory layout of the snap package definition, or the
> generated snap package?
> 
> I'm talking about the directory layout in the generated snap package. 
> Currently an empty `snap/` directory gets created in there and I don't
> see the point of it if it does not contain anything.

The fact that an empty directory is created here is a bug[1]. It should
only create that directory if there's something to put in there. What
Sergio is saying is this:

Snapcraft-specific things, like hooks from snapcraft parts, command
wrappers (eventually, not yet) will end up in the snap/ directory of the
built snap. This has no bearing on the snap format, it's something
internal to snapcraft (it could just as easily have chosen to place
those things in the foo/ directory).

The things in meta/ are specific to snapd. This directory is literally
what defines "this random squashfs image" to be a snap.

[1]: https://bugs.launchpad.net/snapcraft/+bug/1660890

-- 
Kyle Fazzari (kyrofa)
Software Engineer
Canonical Ltd.
k...@canonical.com



signature.asc
Description: OpenPGP digital signature
-- 
Snapcraft mailing list
Snapcraft@lists.snapcraft.io
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/snapcraft


Re: license.txt and snap/ directory

2017-02-06 Thread Joseph Rushton Wakeling

On 07/02/17 00:24, Kyle Fazzari wrote:

The fact that an empty directory is created here is a bug[1]. It should
only create that directory if there's something to put in there. What
Sergio is saying is this:

Snapcraft-specific things, like hooks from snapcraft parts, command
wrappers (eventually, not yet) will end up in the snap/ directory of the
built snap. This has no bearing on the snap format, it's something
internal to snapcraft (it could just as easily have chosen to place
those things in the foo/ directory).

The things in meta/ are specific to snapd. This directory is literally
what defines "this random squashfs image" to be a snap.


OK, makes sense.  BTW, I hope I didn't come over as overly negative in my reply 
to Sergio: if so it wasn't intended.


Can I however raise a plea that `meta/` should contain licensing information as 
a requirement?  Even if it's not actively used by snapd right now, it makes 
sense as a location and it would also make sense (in future) to be able to do 
things like


snap license whatever

to check the available licensing information.

More generally, it seems like a good idea to me that (i) snap packages must 
contain licensing information, (ii) it will be available in a standardized 
location both in the snap package definition and the generated snap package, and 
(iii) this will be enforced/guaranteed by snapcraft.


--
Snapcraft mailing list
Snapcraft@lists.snapcraft.io
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/snapcraft


Re: license.txt and snap/ directory

2017-02-06 Thread Joseph Rushton Wakeling

On 07/02/17 00:24, Kyle Fazzari wrote:

The fact that an empty directory is created here is a bug[1].

[1]: https://bugs.launchpad.net/snapcraft/+bug/1660890


BTW, talking of empty directories, it's not the only example I've come across: 
in my ldc2 snap, I wind up with an empty dir:


usr/lib/gcc/x86_64-linux-gnu/6/

... whose origin is a bit opaque, but which I presume comes out of something to 
do with linking against libc?



--
Snapcraft mailing list
Snapcraft@lists.snapcraft.io
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/snapcraft


Re: license.txt and snap/ directory

2017-02-07 Thread Sergio Schvezov
On Tue, 7 Feb 2017 01:46:04 +0100, Joseph Rushton Wakeling wrote:
> On 07/02/17 00:24, Kyle Fazzari wrote:
>> The fact that an empty directory is created here is a bug[1]. It should
>> only create that directory if there's something to put in there. What
>> Sergio is saying is this:
>>
>> Snapcraft-specific things, like hooks from snapcraft parts, command
>> wrappers (eventually, not yet) will end up in the snap/ directory of the
>> built snap. This has no bearing on the snap format, it's something
>> internal to snapcraft (it could just as easily have chosen to place
>> those things in the foo/ directory).
>>
>> The things in meta/ are specific to snapd. This directory is literally
>> what defines "this random squashfs image" to be a snap.
>
> OK, makes sense.  BTW, I hope I didn't come over as overly 
> negative in my reply 
> to Sergio: if so it wasn't intended.
>
> Can I however raise a plea that `meta/` should contain 
> licensing information as 
> a requirement?  Even if it's not actively used by snapd right now, it makes 
> sense as a location and it would also make sense (in future) to 
> be able to do 
> things like
>
>  snap license whatever
>
> to check the available licensing information.
>
> More generally, it seems like a good idea to me that (i) snap packages must 
> contain licensing information, (ii) it will be available in a standardized 
> location both in the snap package definition and the generated 
> snap package, and 
> (iii) this will be enforced/guaranteed by snapcraft.

Can you log a bug against snapd? https://bugs.launchpad.net/snapd/+filebug

-- 
Sent using Dekko from my Ubuntu device

-- 
Snapcraft mailing list
Snapcraft@lists.snapcraft.io
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/snapcraft


Re: license.txt and snap/ directory

2017-02-08 Thread Joseph Rushton Wakeling

On 07/02/17 11:26, Sergio Schvezov wrote:

Can you log a bug against snapd? https://bugs.launchpad.net/snapd/+filebug


Done :-) https://bugs.launchpad.net/snapd/+bug/1662951


--
Snapcraft mailing list
Snapcraft@lists.snapcraft.io
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/snapcraft


Re: license.txt and snap/ directory

2017-02-08 Thread Gustavo Niemeyer
Hi Joseph,

The discussion above felt like painting an incorrect picture of what we're
aiming at. We *definitely* want to track license information inside the
snap format in a proper location. We want to support both basic cases such
as just listing a well known name, custom licenses, and all the way up to
requiring an explicit agreement with the provided text.

We're not there yet, but this is in our short to medium term roadmap for
sure.


On Mon, Feb 6, 2017 at 10:46 PM, Joseph Rushton Wakeling <
joseph.wakel...@webdrake.net> wrote:

> On 07/02/17 00:24, Kyle Fazzari wrote:
>
>> The fact that an empty directory is created here is a bug[1]. It should
>> only create that directory if there's something to put in there. What
>> Sergio is saying is this:
>>
>> Snapcraft-specific things, like hooks from snapcraft parts, command
>> wrappers (eventually, not yet) will end up in the snap/ directory of the
>> built snap. This has no bearing on the snap format, it's something
>> internal to snapcraft (it could just as easily have chosen to place
>> those things in the foo/ directory).
>>
>> The things in meta/ are specific to snapd. This directory is literally
>> what defines "this random squashfs image" to be a snap.
>>
>
> OK, makes sense.  BTW, I hope I didn't come over as overly negative in my
> reply to Sergio: if so it wasn't intended.
>
> Can I however raise a plea that `meta/` should contain licensing
> information as a requirement?  Even if it's not actively used by snapd
> right now, it makes sense as a location and it would also make sense (in
> future) to be able to do things like
>
> snap license whatever
>
> to check the available licensing information.
>
> More generally, it seems like a good idea to me that (i) snap packages
> must contain licensing information, (ii) it will be available in a
> standardized location both in the snap package definition and the generated
> snap package, and (iii) this will be enforced/guaranteed by snapcraft.
>
>
> --
> Snapcraft mailing list
> Snapcraft@lists.snapcraft.io
> Modify settings or unsubscribe at: https://lists.ubuntu.com/mailm
> an/listinfo/snapcraft
>



-- 

gustavo @ http://niemeyer.net
-- 
Snapcraft mailing list
Snapcraft@lists.snapcraft.io
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/snapcraft


Re: license.txt and snap/ directory

2017-02-08 Thread Joseph Rushton Wakeling

On 08/02/17 17:52, Gustavo Niemeyer wrote:

The discussion above felt like painting an incorrect picture of what we're
aiming at. We *definitely* want to track license information inside the snap
format in a proper location. We want to support both basic cases such as just
listing a well known name, custom licenses, and all the way up to requiring an
explicit agreement with the provided text.

We're not there yet, but this is in our short to medium term roadmap for sure.


Sounds good!  Thanks for the clarification :-)


--
Snapcraft mailing list
Snapcraft@lists.snapcraft.io
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/snapcraft