snapcraft stage->snap filter
Reto Breitenmoser
reto.breitenmoser at gmail.com
Thu Jan 7 22:00:19 UTC 2016
Hi
I found the bug in my modified content_tar.py file :-(
Now it works!
The destination attribute set the path always to the ../build/ or
../install/ directory and then it will show up also in the stage and snap
folders.
How can I contribute the modified content_tar.py to the upstream?
Reto
On 7 January 2016 at 13:44, Reto Breitenmoser <reto.breitenmoser at gmail.com>
wrote:
> 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/aac238b5/attachment.html>
More information about the snappy-app-devel
mailing list