You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@netbeans.apache.org by Patrik Karlström <pa...@trixon.se> on 2019/07/07 08:31:47 UTC

[platform][snap] How do I publish a platform app as a snap?

My platform app Mapton <https://mapton.org/> is besides from being
downloadable as a zip available through the AUR
<https://aur.archlinux.org/packages/mapton>.

Since I have noticed that NetBeans itself is available as a snap package, I
thought it would be nice if Mapton was so too.

The problem is that I have not got a clue on where do start...

Are there any documented (netbeans) steps somewhere that I can follow?

Re: [platform][snap] How do I publish a platform app as a snap?

Posted by Patrik Karlström <pa...@trixon.se>.
Today it went live for the first time, https://snapcraft.io/mapton
If someone is in the need of a snapcraft.yaml for a NetBeans Platform
application (besides the IDE),
you'll find mine at
https://github.com/trixon/mapton/tree/develop/packaging/snap/snap

Thanks Laszlo et al.

Den tors 25 juli 2019 kl 21:19 skrev Laszlo Kishalmi <
laszlo.kishalmi@gmail.com>:

>
> On 7/25/19 9:08 AM, Patrik Karlström wrote:
>
> It took me a while but the missing dependencies are now published to
> bintray and the just released version 1.1.2 of Mapton is using that.
>
> Regarding #4. Mapton is able to open and save files, will that require
> 'Classic confinement' and will someone
>
> It is not needed to have a classic confinement to read and write files.
> Usually it is just enough to read and write files in the home folder. That
> is just a permission requirement you need to add.
>
>
> evaluate the needs for that?
>
> Will continue to read the snap guides and make a hello world snap...
>
> Den sön 7 juli 2019 kl 21:34 skrev Laszlo Kishalmi <
> laszlo.kishalmi@gmail.com>:
>
>> Well that won't be as easy as NetBeans.
>>
>> Probably you would like to bundle the JRE and all the required Runtime as
>> well.
>>
>> I've done some inspection on the code and tried to build some kind of
>> snap out of it, so:
>>
>>    1. You need to streamline your build. Right now there is two
>>    pre-build step documented, and it still requires the never officially
>>    released darcula LaF. I'd suggest to put up a repository on JCenter and put
>>    your dependencies there (you need to alter your pom to check that repo as
>>    well, but that would remove half the hastle)
>>    2. Make sure that you have the after: [desktop-glib-only] in your
>>    snapcraft.yml in order to have the GTK dependencies required for the Java
>>    UI.
>>    3. Set the confinement to devmode and then ad the requested snap
>>    plugs to create proper security boundaries.
>>    4. NB is working with Classic confinement, that means it runs without
>>    sandboxing and having access to all system functions. That is an easy
>>    workaround to a lot of issues, but  you need to have a compelling reason to
>>    ask for a classic confinement for your Snap. (Being an IDE is one of them).
>>    5. The good thing is that you can actually bundle the JRE with your
>>    application, so it would be really out of the box.
>>    6. You can also ask Snapcraft to build the Snaps for you adding a
>>    Github hook.
>>
>> So for start try to build a working Snap locally, then get a snapcraft
>> account, ask Snapcraft to build the Snap for you, then publish the Snap!
>> On 7/7/19 2:38 AM, Neil C Smith wrote:
>>
>> On Sun, 7 Jul 2019 at 09:32, Patrik Karlström <pa...@trixon.se> <pa...@trixon.se> wrote:
>>
>> Are there any documented (netbeans) steps somewhere that I can follow?
>>
>> I'm not sure if the build task is documented anywhere yet?  But
>> definitely look athttps://github.com/apache/netbeans/tree/release111/nbbuild/packaging/snap
>> if you haven't already.
>>
>> You might also want to consider AppImage?  Had a useful chat at LGM
>> recently with one of the main people working on that, which led tohttps://github.com/praxis-live/support/issues/110 - I'm currently also
>> considering whether to make Snap, AppImage or both for my platform
>> application.  Mine is slightly awkward in that there are two platform
>> binaries shipped in one package.
>>
>> Best wishes,
>>
>> Neil
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@netbeans.apache.org
>> For additional commands, e-mail: users-help@netbeans.apache.org
>>
>> For further information about the NetBeans mailing lists, visit:https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
>>
>>

Re: [platform][snap] How do I publish a platform app as a snap?

Posted by Laszlo Kishalmi <la...@gmail.com>.
On 7/25/19 9:08 AM, Patrik Karlström wrote:
> It took me a while but the missing dependencies are now published to 
> bintray and the just released version 1.1.2 of Mapton is using that.
>
> Regarding #4. Mapton is able to open and save files, will that require 
> 'Classic confinement' and will someone

It is not needed to have a classic confinement to read and write files. 
Usually it is just enough to read and write files in the home folder. 
That is just a permission requirement you need to add.


> evaluate the needs for that?
>
> Will continue to read the snap guides and make a hello world snap...
>
> Den sön 7 juli 2019 kl 21:34 skrev Laszlo Kishalmi 
> <laszlo.kishalmi@gmail.com <ma...@gmail.com>>:
>
>     Well that won't be as easy as NetBeans.
>
>     Probably you would like to bundle the JRE and all the required
>     Runtime as well.
>
>     I've done some inspection on the code and tried to build some kind
>     of snap out of it, so:
>
>      1. You need to streamline your build. Right now there is two
>         pre-build step documented, and it still requires the never
>         officially released darcula LaF. I'd suggest to put up a
>         repository on JCenter and put your dependencies there (you
>         need to alter your pom to check that repo as well, but that
>         would remove half the hastle)
>      2. Make sure that you have the after: [desktop-glib-only] in your
>         snapcraft.yml in order to have the GTK dependencies required
>         for the Java UI.
>      3. Set the confinement to devmode and then ad the requested snap
>         plugs to create proper security boundaries.
>      4. NB is working with Classic confinement, that means it runs
>         without sandboxing and having access to all system functions.
>         That is an easy workaround to a lot of issues, but  you need
>         to have a compelling reason to ask for a classic confinement
>         for your Snap. (Being an IDE is one of them).
>      5. The good thing is that you can actually bundle the JRE with
>         your application, so it would be really out of the box.
>      6. You can also ask Snapcraft to build the Snaps for you adding a
>         Github hook.
>
>     So for start try to build a working Snap locally, then get a
>     snapcraft account, ask Snapcraft to build the Snap for you, then
>     publish the Snap!
>
>     On 7/7/19 2:38 AM, Neil C Smith wrote:
>>     On Sun, 7 Jul 2019 at 09:32, Patrik Karlström<pa...@trixon.se>  <ma...@trixon.se>  wrote:
>>>     Are there any documented (netbeans) steps somewhere that I can follow?
>>     I'm not sure if the build task is documented anywhere yet?  But
>>     definitely look at
>>     https://github.com/apache/netbeans/tree/release111/nbbuild/packaging/snap
>>     if you haven't already.
>>
>>     You might also want to consider AppImage?  Had a useful chat at LGM
>>     recently with one of the main people working on that, which led to
>>     https://github.com/praxis-live/support/issues/110  - I'm currently also
>>     considering whether to make Snap, AppImage or both for my platform
>>     application.  Mine is slightly awkward in that there are two platform
>>     binaries shipped in one package.
>>
>>     Best wishes,
>>
>>     Neil
>>
>>     ---------------------------------------------------------------------
>>     To unsubscribe, e-mail:users-unsubscribe@netbeans.apache.org  <ma...@netbeans.apache.org>
>>     For additional commands, e-mail:users-help@netbeans.apache.org  <ma...@netbeans.apache.org>
>>
>>     For further information about the NetBeans mailing lists, visit:
>>     https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
>>

Re: [platform][snap] How do I publish a platform app as a snap?

Posted by Patrik Karlström <pa...@trixon.se>.
It took me a while but the missing dependencies are now published to
bintray and the just released version 1.1.2 of Mapton is using that.

Regarding #4. Mapton is able to open and save files, will that require
'Classic confinement' and will someone evaluate the needs for that?

Will continue to read the snap guides and make a hello world snap...

Den sön 7 juli 2019 kl 21:34 skrev Laszlo Kishalmi <
laszlo.kishalmi@gmail.com>:

> Well that won't be as easy as NetBeans.
>
> Probably you would like to bundle the JRE and all the required Runtime as
> well.
>
> I've done some inspection on the code and tried to build some kind of snap
> out of it, so:
>
>    1. You need to streamline your build. Right now there is two pre-build
>    step documented, and it still requires the never officially released
>    darcula LaF. I'd suggest to put up a repository on JCenter and put your
>    dependencies there (you need to alter your pom to check that repo as well,
>    but that would remove half the hastle)
>    2. Make sure that you have the after: [desktop-glib-only] in your
>    snapcraft.yml in order to have the GTK dependencies required for the Java
>    UI.
>    3. Set the confinement to devmode and then ad the requested snap plugs
>    to create proper security boundaries.
>    4. NB is working with Classic confinement, that means it runs without
>    sandboxing and having access to all system functions. That is an easy
>    workaround to a lot of issues, but  you need to have a compelling reason to
>    ask for a classic confinement for your Snap. (Being an IDE is one of them).
>    5. The good thing is that you can actually bundle the JRE with your
>    application, so it would be really out of the box.
>    6. You can also ask Snapcraft to build the Snaps for you adding a
>    Github hook.
>
> So for start try to build a working Snap locally, then get a snapcraft
> account, ask Snapcraft to build the Snap for you, then publish the Snap!
> On 7/7/19 2:38 AM, Neil C Smith wrote:
>
> On Sun, 7 Jul 2019 at 09:32, Patrik Karlström <pa...@trixon.se> <pa...@trixon.se> wrote:
>
> Are there any documented (netbeans) steps somewhere that I can follow?
>
> I'm not sure if the build task is documented anywhere yet?  But
> definitely look athttps://github.com/apache/netbeans/tree/release111/nbbuild/packaging/snap
> if you haven't already.
>
> You might also want to consider AppImage?  Had a useful chat at LGM
> recently with one of the main people working on that, which led tohttps://github.com/praxis-live/support/issues/110 - I'm currently also
> considering whether to make Snap, AppImage or both for my platform
> application.  Mine is slightly awkward in that there are two platform
> binaries shipped in one package.
>
> Best wishes,
>
> Neil
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@netbeans.apache.org
> For additional commands, e-mail: users-help@netbeans.apache.org
>
> For further information about the NetBeans mailing lists, visit:https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
>
>

Re: [platform][snap] How do I publish a platform app as a snap?

Posted by Patrik Karlström <pa...@trixon.se>.
That's a fantastic list, thank you!

Den sön 7 juli 2019 kl 21:34 skrev Laszlo Kishalmi <
laszlo.kishalmi@gmail.com>:

> Well that won't be as easy as NetBeans.
>
> Probably you would like to bundle the JRE and all the required Runtime as
> well.
>
> I've done some inspection on the code and tried to build some kind of snap
> out of it, so:
>
>    1. You need to streamline your build. Right now there is two pre-build
>    step documented, and it still requires the never officially released
>    darcula LaF. I'd suggest to put up a repository on JCenter and put your
>    dependencies there (you need to alter your pom to check that repo as well,
>    but that would remove half the hastle)
>    2. Make sure that you have the after: [desktop-glib-only] in your
>    snapcraft.yml in order to have the GTK dependencies required for the Java
>    UI.
>    3. Set the confinement to devmode and then ad the requested snap plugs
>    to create proper security boundaries.
>    4. NB is working with Classic confinement, that means it runs without
>    sandboxing and having access to all system functions. That is an easy
>    workaround to a lot of issues, but  you need to have a compelling reason to
>    ask for a classic confinement for your Snap. (Being an IDE is one of them).
>    5. The good thing is that you can actually bundle the JRE with your
>    application, so it would be really out of the box.
>    6. You can also ask Snapcraft to build the Snaps for you adding a
>    Github hook.
>
> So for start try to build a working Snap locally, then get a snapcraft
> account, ask Snapcraft to build the Snap for you, then publish the Snap!
> On 7/7/19 2:38 AM, Neil C Smith wrote:
>
> On Sun, 7 Jul 2019 at 09:32, Patrik Karlström <pa...@trixon.se> <pa...@trixon.se> wrote:
>
> Are there any documented (netbeans) steps somewhere that I can follow?
>
> I'm not sure if the build task is documented anywhere yet?  But
> definitely look athttps://github.com/apache/netbeans/tree/release111/nbbuild/packaging/snap
> if you haven't already.
>
> You might also want to consider AppImage?  Had a useful chat at LGM
> recently with one of the main people working on that, which led tohttps://github.com/praxis-live/support/issues/110 - I'm currently also
> considering whether to make Snap, AppImage or both for my platform
> application.  Mine is slightly awkward in that there are two platform
> binaries shipped in one package.
>
> Best wishes,
>
> Neil
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@netbeans.apache.org
> For additional commands, e-mail: users-help@netbeans.apache.org
>
> For further information about the NetBeans mailing lists, visit:https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
>
>

Re: [platform][snap] How do I publish a platform app as a snap?

Posted by Laszlo Kishalmi <la...@gmail.com>.
Well that won't be as easy as NetBeans.

Probably you would like to bundle the JRE and all the required Runtime 
as well.

I've done some inspection on the code and tried to build some kind of 
snap out of it, so:

 1. You need to streamline your build. Right now there is two pre-build
    step documented, and it still requires the never officially released
    darcula LaF. I'd suggest to put up a repository on JCenter and put
    your dependencies there (you need to alter your pom to check that
    repo as well, but that would remove half the hastle)
 2. Make sure that you have the after: [desktop-glib-only] in your
    snapcraft.yml in order to have the GTK dependencies required for the
    Java UI.
 3. Set the confinement to devmode and then ad the requested snap plugs
    to create proper security boundaries.
 4. NB is working with Classic confinement, that means it runs without
    sandboxing and having access to all system functions. That is an
    easy workaround to a lot of issues, but  you need to have a
    compelling reason to ask for a classic confinement for your Snap.
    (Being an IDE is one of them).
 5. The good thing is that you can actually bundle the JRE with your
    application, so it would be really out of the box.
 6. You can also ask Snapcraft to build the Snaps for you adding a
    Github hook.

So for start try to build a working Snap locally, then get a snapcraft 
account, ask Snapcraft to build the Snap for you, then publish the Snap!

On 7/7/19 2:38 AM, Neil C Smith wrote:
> On Sun, 7 Jul 2019 at 09:32, Patrik Karlström <pa...@trixon.se> wrote:
>> Are there any documented (netbeans) steps somewhere that I can follow?
> I'm not sure if the build task is documented anywhere yet?  But
> definitely look at
> https://github.com/apache/netbeans/tree/release111/nbbuild/packaging/snap
> if you haven't already.
>
> You might also want to consider AppImage?  Had a useful chat at LGM
> recently with one of the main people working on that, which led to
> https://github.com/praxis-live/support/issues/110 - I'm currently also
> considering whether to make Snap, AppImage or both for my platform
> application.  Mine is slightly awkward in that there are two platform
> binaries shipped in one package.
>
> Best wishes,
>
> Neil
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@netbeans.apache.org
> For additional commands, e-mail: users-help@netbeans.apache.org
>
> For further information about the NetBeans mailing lists, visit:
> https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
>

Re: [platform][snap] How do I publish a platform app as a snap?

Posted by Patrik Karlström <pa...@trixon.se>.
Den sön 7 juli 2019 kl 11:38 skrev Neil C Smith <ne...@apache.org>:

> On Sun, 7 Jul 2019 at 09:32, Patrik Karlström <pa...@trixon.se> wrote:
> > Are there any documented (netbeans) steps somewhere that I can follow?
>
> I'm not sure if the build task is documented anywhere yet?  But
> definitely look at
> https://github.com/apache/netbeans/tree/release111/nbbuild/packaging/snap
> if you haven't already.
>

Thanks, I was looking for that one!


>
> You might also want to consider AppImage?  Had a useful chat at LGM
> recently with one of the main people working on that, which led to
> https://github.com/praxis-live/support/issues/110 - I'm currently also
> considering whether to make Snap, AppImage or both for my platform
> application.  Mine is slightly awkward in that there are two platform
> binaries shipped in one package.
>
>
Oh, the choices... :)

Interesting link that one too, but for now I will start with snap.

Following the snapcraft tutorial I was notified I was doing a non native
build so now Im setting up an ubuntu system to have something to work with.

Re: [platform][snap] How do I publish a platform app as a snap?

Posted by Neil C Smith <ne...@apache.org>.
On Sun, 7 Jul 2019 at 09:32, Patrik Karlström <pa...@trixon.se> wrote:
> Are there any documented (netbeans) steps somewhere that I can follow?

I'm not sure if the build task is documented anywhere yet?  But
definitely look at
https://github.com/apache/netbeans/tree/release111/nbbuild/packaging/snap
if you haven't already.

You might also want to consider AppImage?  Had a useful chat at LGM
recently with one of the main people working on that, which led to
https://github.com/praxis-live/support/issues/110 - I'm currently also
considering whether to make Snap, AppImage or both for my platform
application.  Mine is slightly awkward in that there are two platform
binaries shipped in one package.

Best wishes,

Neil

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@netbeans.apache.org
For additional commands, e-mail: users-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists