Ubuntu snap: A quick try
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Be nice to others! Respect the FreeCAD code of conduct!
- vejmarie
- Posts: 713
- Joined: Mon Jan 04, 2016 4:52 pm
- Location: Somewhere between France, USA and Taiwan
- Contact:
Ubuntu snap: A quick try
Hi Guys (and girls),
There is a major benefit to be stuck by flooding, this is forcing you to work . So I have finally finished to pack FreeCAD within a snap under ubuntu Xenial (16.04). There is probably still a lot of works, but this snap includes the state of the art (I mean the latest version of each libraries etc) version of FreeCAD (but this is coming from my branch, it does include ickby VTK post, and Netgen, I am trying to add Calculix into the bundle). It needs testesr (do expect bugs), patience etc ....
https://myapps.developer.ubuntu.com/dev ... a6b3ac0c4/
Just keep me posted if you see room for improvement. I am really interested to know on which graphical environment you have been able to make it work. Ubuntu snap is a new packaging technology, and I might have missed some dependencies.
Jm
There is a major benefit to be stuck by flooding, this is forcing you to work . So I have finally finished to pack FreeCAD within a snap under ubuntu Xenial (16.04). There is probably still a lot of works, but this snap includes the state of the art (I mean the latest version of each libraries etc) version of FreeCAD (but this is coming from my branch, it does include ickby VTK post, and Netgen, I am trying to add Calculix into the bundle). It needs testesr (do expect bugs), patience etc ....
https://myapps.developer.ubuntu.com/dev ... a6b3ac0c4/
Just keep me posted if you see room for improvement. I am really interested to know on which graphical environment you have been able to make it work. Ubuntu snap is a new packaging technology, and I might have missed some dependencies.
Jm
Re: Ubuntu snap: A quick try
Hi vejmarie,vejmarie wrote:Hi Guys (and girls),
There is a major benefit to be stuck by flooding, this is forcing you to work . So I have finally finished to pack FreeCAD within a snap under ubuntu Xenial (16.04). There is probably still a lot of works, but this snap includes the state of the art (I mean the latest version of each libraries etc) version of FreeCAD (but this is coming from my branch, it does include ickby VTK post, and Netgen, I am trying to add Calculix into the bundle). It needs testesr (do expect bugs), patience etc ....
https://myapps.developer.ubuntu.com/dev ... a6b3ac0c4/
Just keep me posted if you see room for improvement. I am really interested to know on which graphical environment you have been able to make it work. Ubuntu snap is a new packaging technology, and I might have missed some dependencies.
Jm
I tried searching it just now again. But I can't find it there on the "Software" center.
And the above website says: "Package status is Pending review". I think we have to wait. Right?
Re: Ubuntu snap: A quick try
Excellent work JM! We should consider adding snap packages to the Travis jobs and deploy them to the GitHub Releases section in the same fashion that we do for OS X and Windows so users have instantaneous access to new features as soon as they are committed and built.vejmarie wrote:So I have finally finished to pack FreeCAD within a snap under ubuntu Xenial (16.04). There is probably still a lot of works, but this snap includes the state of the art (I mean the latest version of each libraries etc) version of FreeCAD (but this is coming from my branch, it does include ickby VTK post, and Netgen, I am trying to add Calculix into the bundle).
Other than having to work, I hope that you are not adversely affected by the floods.
Re: Ubuntu snap: A quick try
Automated review for version 0.17: failed
2 fails:
reserved interface 'locale-control' for vetted applications only security-snap-v2_app_plug_safe (FreeCAD, locale-control)
reserved interface 'home' for vetted applications only security-snap-v2_app_plug_safe (FreeCAD, home)
0 Warnings
40 Passes
https://myapps.developer.ubuntu.com/dev ... 104/rev/1/
2 fails:
reserved interface 'locale-control' for vetted applications only security-snap-v2_app_plug_safe (FreeCAD, locale-control)
reserved interface 'home' for vetted applications only security-snap-v2_app_plug_safe (FreeCAD, home)
0 Warnings
40 Passes
https://myapps.developer.ubuntu.com/dev ... 104/rev/1/
- vejmarie
- Posts: 713
- Joined: Mon Jan 04, 2016 4:52 pm
- Location: Somewhere between France, USA and Taiwan
- Contact:
Re: Ubuntu snap: A quick try
Hi Mandeep,
The two auto test which fails are related to home directory use access needs and network stack access needs which requires configuration at snapcraft level. So they are implying a need of manual review from ubuntu but they shall be fine and will be there for ever.
By the way I will need to patch FreeCAD as there is a "hardcoded" value detection which create the .FreeCAD directory for parameter storage into the home directory from the user, which I believe is mostly the proper way but doesn't fit the snap approach from ubuntu which is protecting a lot the user data. We shall either detect if SNAP_USER_DATA environment variable is set or define a FREECAD_USER_DATA environment variable which can be set by snap launch wrapper to SNAP_USER_DATA into a snap environment.
What do you think about that ?
vejmarie
The two auto test which fails are related to home directory use access needs and network stack access needs which requires configuration at snapcraft level. So they are implying a need of manual review from ubuntu but they shall be fine and will be there for ever.
By the way I will need to patch FreeCAD as there is a "hardcoded" value detection which create the .FreeCAD directory for parameter storage into the home directory from the user, which I believe is mostly the proper way but doesn't fit the snap approach from ubuntu which is protecting a lot the user data. We shall either detect if SNAP_USER_DATA environment variable is set or define a FREECAD_USER_DATA environment variable which can be set by snap launch wrapper to SNAP_USER_DATA into a snap environment.
What do you think about that ?
vejmarie
- vejmarie
- Posts: 713
- Joined: Mon Jan 04, 2016 4:52 pm
- Location: Somewhere between France, USA and Taiwan
- Contact:
Re: Ubuntu snap: A quick try
Hi blacey,blacey wrote:Excellent work JM! We should consider adding snap packages to the Travis jobs and deploy them to the GitHub Releases section in the same fashion that we do for OS X and Windows so users have instantaneous access to new features as soon as they are committed and built.vejmarie wrote:So I have finally finished to pack FreeCAD within a snap under ubuntu Xenial (16.04). There is probably still a lot of works, but this snap includes the state of the art (I mean the latest version of each libraries etc) version of FreeCAD (but this is coming from my branch, it does include ickby VTK post, and Netgen, I am trying to add Calculix into the bundle).
Other than having to work, I hope that you are not adversely affected by the floods.
I am travelling really often in Texas, but this time has been an experience we got flooded with 4 feet of water into the house we rented and ended up to start our travel back home using a canoe, which was the first time for me, at least to go to an airport. Hopefully we were safe, which was much better than others who have been really hits by the flooding.
I am working on getting this stuff integrated into the source tree. There is something which worries me with Travis CI is that they are using Trusty and I am not sure that ubuntu backported snapcraft for this version, this is why I am using vagrant as CI currently. I will publish the whole "CI" within a Vagrant directory and see if a PR could be accepted. I currently have the full build including the snap creation made in a single command which is vagrant up
vejmarie
Re: Ubuntu snap: A quick try
Ubuntu 16.04 is needed to install snap packages. As for testing the package i clicked on the link but i guess i would need to register first to download it?
Anyway what is your plan? To produce FreeCAD snap package and after users can install it on Ubuntu 16.04 through regular software channels?
P.S. Good to hear you managed to escape flooding. It is interesting how much flooding is going on ATM.
Anyway what is your plan? To produce FreeCAD snap package and after users can install it on Ubuntu 16.04 through regular software channels?
P.S. Good to hear you managed to escape flooding. It is interesting how much flooding is going on ATM.
- vejmarie
- Posts: 713
- Joined: Mon Jan 04, 2016 4:52 pm
- Location: Somewhere between France, USA and Taiwan
- Contact:
Re: Ubuntu snap: A quick try
Hi Triplus,triplus wrote:Ubuntu 16.04 is needed to install snap packages. As for testing the package i clicked on the link but i guess i would need to register first to download it?
Anyway what is your plan? To produce FreeCAD snap package and after users can install it on Ubuntu 16.04 through regular software channels?
P.S. Good to hear you managed to escape flooding. It is interesting how much flooding is going on ATM.
If people agree, I might try to maintain a "snap" FreeCAD build. It won't work on Travis as it needs Xenial (16.04) as you mentionned this is why I used vagrant as CI. I need to check how can sync up with a build and push the snap on FreeCAD website if core developer wish. It will be currently pushed into the beta part of the ubuntu store.
I have fixed the remaining bugs (--devmode install, which needs a patch into FreeCAD Application.cpp source code, GTK Warning at startup and locale issues, so I am good to go). The key thing is that it is currently compiling my own branch (occt7 PR), and I will wait a little to promote the build or make an independant PR to integrate the needed script into the source tree plus the patch.
Snappy in the end is really relevant to distribute FreeCAD as we have everything in a box. The image is 200MB not that big.
It still need a lot of testing, I am trying to get some testers from Open Compute Project and from Ubuntu, but believe it might be working.
vejmarie
Re: Ubuntu snap: A quick try
I guess having a snap package would be nice. I didn't investigate much but are there any issues with config files (location) and macro/module installation location?
- vejmarie
- Posts: 713
- Joined: Mon Jan 04, 2016 4:52 pm
- Location: Somewhere between France, USA and Taiwan
- Contact:
Re: Ubuntu snap: A quick try
My build process is not really conventional, as I didn't build the application with snapcraft, but within a vagrant VM, and then I use the copy module from snapcraft to build up the snap. THis is the easiest way to make it happen and integrate what you want into it.triplus wrote:I guess having a snap package would be nice. I didn't investigate much but are there any issues with config files (location) and macro/module installation location?
By the way my snap went through Ubunutu/Canonical validation process and you can now install freecad 0.17 through snap install freecad as root, and issue 2 additionnal command which are:
snap connect freecad:home ubuntu-core:home
snap connect freecad:locale-control ubuntu-core:locale-control
The just kick /snap/bin/freecad.FreeCAD and you are good to go.
I still have a few issues to fix but I hope to have a full working bundle pretty soon
vejmarie