snapcraft stage->snap filter

Reto Breitenmoser reto.breitenmoser at gmail.com
Thu Jan 7 12:44:03 UTC 2016


I will contribute it after everything works with my snap. At the moment it
will extract directly to the stage dir. But when I think about it, this is
not correct. The plugin extracts the content also to the parts/.../build
folder and from there it should be propagated to the stage folder.


Reto
Am 07.01.2016 1:16 nachm. schrieb "Sergio Schvezov" <
sergio.schvezov at canonical.com>:

> On Thu, Jan 7, 2016 at 9:09 AM, Reto Breitenmoser <
> reto.breitenmoser at gmail.com> wrote:
>
>> Hi Alexander
>>
>> My snap consist of a jre and a tomcat app server on which my java program
>> runs.Because I want to extract the jre and tomcat tar to a /opt folder, I
>> wrote a modified content_tar.py plugin.
>>
>
> Seems intersting and useful. Maybe you want to contribute this upstream?
>
>
>
>>
>> This is an extract from my snapcraft.yaml file
>>
>> parts:
>>     tomcat:
>>         plugin: tar-content
>>         source: /path/tomcat/apache-tomcat-8.0.30.tar.gz
>>         destination: opt/tomcat
>>
>
> In your plugin, what is the parent dir for destination?
>
>
>>     jdk:
>>         plugin: tar-content
>>         source: /path/java/jdk-8u65-linux-arm64-vfp-hflt.tar.gz
>>         destination: opt/java
>>     local-files:
>>         plugin: make
>>         source: .
>>
>> The files were copied all to the stage folder
>>
>> drwxrwxr-x 2 reto reto 4096 Jan  5 22:52 bin
>> drwxrwxr-x 4 reto reto 4096 Jan  5 22:52 opt
>> drwxrwxr-x 2 reto reto 4096 Jan  5 22:52 tomcat-conf
>>
>> But to the snap folder, only the bin and tomcat-conf folder is copied.
>>
>> I tried it also with filesets but also no luck.
>>
>> Reto
>>
>> On 6 January 2016 at 21:56, Alexander Sack <asac at canonical.com> wrote:
>>
>>> Hi,
>>>
>>> On Wed, Jan 6, 2016 at 12:57 PM, Reto Breitenmoser
>>> <reto.breitenmoser at gmail.com> wrote:
>>> > Hi
>>> >
>>> > When I build a snap with snapcraft, not every file from the stage is
>>> copied
>>> > to the snap folder. What are the filter criterias?
>>>
>>> filter criteria for what goes to snap/ can be tweaked using
>>> include/exclude-style rules in the snap: section of your part in
>>> snapcraft.yaml. Those can be glob style with a '-' prefix for
>>> excludes. You can also refer to filesets defined by parts by using $
>>> prefix in those rules. Some examples you can see in
>>> examples/webcam-webui/snapcraft.yaml ....
>>>
>>> Also, the default 'includes filter' seems to be set to match all (e.g.
>>> *) from what I found in code.
>>>
>>> Does this help to explain your behavior?
>>>
>>> If not, maybe share all or parts of your snapcraft.yaml and what files
>>> are missed. Maybe there is a bug :)
>>>
>>> Thanks!
>>>
>>>  - Alexander
>>>
>>> >
>>> > Reto
>>> >
>>> >
>>> >
>>> > --
>>> > snappy-app-devel mailing list
>>> > snappy-app-devel at lists.ubuntu.com
>>> > Modify settings or unsubscribe at:
>>> > https://lists.ubuntu.com/mailman/listinfo/snappy-app-devel
>>> >
>>>
>>
>>
>> --
>> snappy-app-devel mailing list
>> snappy-app-devel at lists.ubuntu.com
>> Modify settings or unsubscribe at:
>> https://lists.ubuntu.com/mailman/listinfo/snappy-app-devel
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/snappy-app-devel/attachments/20160107/1e5f32e8/attachment-0001.html>


More information about the snappy-app-devel mailing list