Discussion: State of the snap (Snap Packaging)
Re: Discussion: State of the snap (Snap Packaging)
@vejmarie Thanks for your work. I was occupied in the last weeks, but I will catch up on your updates and comment on your suggestions.
Re: Discussion: State of the snap (Snap Packaging)
I think you just create an account with the name FreeCAD or similar. Then you request a transfer of ownership from your personal account to this new account on the snapcraft forum (https://forum.snapcraft.io/). Finally, you add your current account as a collaborator here: https://dashboard.snapcraft.io/snaps/fr ... aboration/
Good to see. But I think the separate implementation in the traditional sense (snap/snapcraft.yaml) makes the most sense. Especially if we want to use upstream's build tooling.
I use GNOME. I believe it's an incompatibility of the font cache produced by different versions of fontconfig & freetype on host vs. snap.
Snaps are distributed as binary diffs after the first download. So it's not really that huge of a data transfer.
I see. That's rather unfortunate. The vast majority of users does not have this requirement and would benefit greatly from a more modern (gnome extension) base.vejmarie wrote: I do have a use case which prohibits me to switch the snap to core18, as I am running it into a docker environment in server mode for the CADCloud project. core18 is not able to run in docker properly (or I never had been able to make it work properly).
There is the possibility to use snaps in ephemeral LXD containers, which might be a possible alternative to docker/podman.
- vejmarie
- Posts: 713
- Joined: Mon Jan 04, 2016 4:52 pm
- Location: Somewhere between France, USA and Taiwan
- Contact:
Re: Discussion: State of the snap (Snap Packaging)
Hi,
I just updated the snap with PPD guidance. You can find the build script here
https://github.com/CADCloud/CADCloud/tr ... er/freecad
It doesn't include everything that was recommended, but it is getting closer. 0.18.4 and 0.19 beta shall both works from Xenial to latest ubuntu. The font bug was related to a newer version of fontconfig which was not compatible with the one used to build the snap originally. I fixed that bug within the launch script (one environment variable was missing).
The build works like this:
- I recompile, VTK, OCCT, Netgen, FreeCAD , pivy from scrath. It is now supporting python 3 and QT5 with both version. After the compilation, a deb package of the result is created.
- The snap process works only with Deb packages and is not involved into the compilation process.
Everything is built into a VM which is based on vagrant and virtualbox as a backend.
The majority of the snap users are still using Xenial (about 60%), which explain why I am still building from it.
vejmarie
I just updated the snap with PPD guidance. You can find the build script here
https://github.com/CADCloud/CADCloud/tr ... er/freecad
It doesn't include everything that was recommended, but it is getting closer. 0.18.4 and 0.19 beta shall both works from Xenial to latest ubuntu. The font bug was related to a newer version of fontconfig which was not compatible with the one used to build the snap originally. I fixed that bug within the launch script (one environment variable was missing).
The build works like this:
- I recompile, VTK, OCCT, Netgen, FreeCAD , pivy from scrath. It is now supporting python 3 and QT5 with both version. After the compilation, a deb package of the result is created.
- The snap process works only with Deb packages and is not involved into the compilation process.
Everything is built into a VM which is based on vagrant and virtualbox as a backend.
The majority of the snap users are still using Xenial (about 60%), which explain why I am still building from it.
vejmarie
- vejmarie
- Posts: 713
- Joined: Mon Jan 04, 2016 4:52 pm
- Location: Somewhere between France, USA and Taiwan
- Contact:
Re: Discussion: State of the snap (Snap Packaging)
My snap account is dedicated to FreeCAD, and I added kkrimitzi as a collaborator. I can add you without any issues !ppd wrote: ↑Wed Jul 01, 2020 3:17 pmI think you just create an account with the name FreeCAD or similar. Then you request a transfer of ownership from your personal account to this new account on the snapcraft forum (https://forum.snapcraft.io/). Finally, you add your current account as a collaborator here: https://dashboard.snapcraft.io/snaps/fr ... aboration/
Re: Discussion: State of the snap (Snap Packaging)
Well, there's no need if you have it under control. My main point regarding this was recognizability for the user and the proper branding. If it represents FreeCAD in a (semi-)official way, it should be published under "FreeCAD".
The snap is supposed to decouple (as far as possible in reality) the host OS and the application environment. So I'm curious what benefits relying on a very old base provides in this case. I'm also amazed about your user distribution. In my other desktop snaps, 18.04, 20.04 and 19.10 maintain a very commanding lead over 16.04 regarding user distribution. Very interesting.
Anyway, I tested your latest update and found my font issue resolved. It also shows an icon/proper desktop entry, so that's good too.
- vejmarie
- Posts: 713
- Joined: Mon Jan 04, 2016 4:52 pm
- Location: Somewhere between France, USA and Taiwan
- Contact:
Re: Discussion: State of the snap (Snap Packaging)
Thanks for your feedback ! If you want to give it a try, I liked to find a way to integrate the documentation. I have seen your remark on how to do it, but I am not sure to have fully understood how to associate a snap with another one.
I avoided to pack the documentation, mostly because I found it outdated in many places (at least the one generated at build time).
There is also something frustrating with snap, bug report is not that easy for end users. I am receiving emails, which is ok, but might be better if they could setup an end user "forum" approach.
I avoided to pack the documentation, mostly because I found it outdated in many places (at least the one generated at build time).
There is also something frustrating with snap, bug report is not that easy for end users. I am receiving emails, which is ok, but might be better if they could setup an end user "forum" approach.
Re: Discussion: State of the snap (Snap Packaging)
A rather simple way to do it: https://forum.snapcraft.io/t/the-content-interface/1074vejmarie wrote: ↑Thu Jul 02, 2020 12:22 pm If you want to give it a try, I liked to find a way to integrate the documentation. I have seen your remark on how to do it, but I am not sure to have fully understood how to associate a snap with another one.
I avoided to pack the documentation, mostly because I found it outdated in many places (at least the one generated at build time).
You'd need one snap "freecad-doc" that provides a slot like so:
Code: Select all
slots:
freecad-doc:
interface: content
content: freecad-doc
read: [$SNAP/doc]
Then you consume it in freecad:
Code: Select all
plugs:
freecad-doc:
interface: content
target: $SNAP/the/path/where/freecad/expects/its/doc
It's also a good idea to version such dependencies, so you don't end up with 0.19 docs attached to 0.18 snaps etc.
E.g. "freecad-doc-0-19" as snap name and slot name. Maybe even add the build env if necessary (e.g. because of changing bases later on or including executables): "freecad-doc-0-19-core".
- Ivo Cavalcante
- Posts: 3
- Joined: Wed Jun 24, 2020 12:46 am
-
- Posts: 61
- Joined: Sun May 29, 2016 2:19 pm
- Contact:
Addon manager not working in v0.19 beta snap
I have installed the beta of v0.19 as I wanted to play with Assembly 4. I am on Kubuntu 20.04 so I can't the freecad-daily PPA. So I have installed with snap.
When I open the add-on manager I can see all the packages, but if I click to "Install selected" the program hangs at "Cloning module". There is no output in the terminal.
A clue as to what it might be is if I go to the macro tab in the addon manager it tells me:
"Something went wrong with the Git Macro Retrieval, possibly the Git executable is not in the path"
Git is definitely on the PATH, I use it every day from the terminal. Perhaps this is a snap sandboxing issue? I don't really understand snap, I have tried to avoid the things in the past, but it is becoming more difficult.
OS: Ubuntu Core 16 (KDE/plasma)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.21777 (Git)
Build type: Unknown
Branch: master
Hash: 478823b90967a9b76796c64f74b8e3a5440150fa
Python version: 3.5.2
Qt version: 5.5.1
Coin version: 4.0.0a
OCC version: 7.4.0
Locale: English/UnitedStates (en_US)
Mod Edit: merged this thread from another.
When I open the add-on manager I can see all the packages, but if I click to "Install selected" the program hangs at "Cloning module". There is no output in the terminal.
A clue as to what it might be is if I go to the macro tab in the addon manager it tells me:
"Something went wrong with the Git Macro Retrieval, possibly the Git executable is not in the path"
Git is definitely on the PATH, I use it every day from the terminal. Perhaps this is a snap sandboxing issue? I don't really understand snap, I have tried to avoid the things in the past, but it is becoming more difficult.
OS: Ubuntu Core 16 (KDE/plasma)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.21777 (Git)
Build type: Unknown
Branch: master
Hash: 478823b90967a9b76796c64f74b8e3a5440150fa
Python version: 3.5.2
Qt version: 5.5.1
Coin version: 4.0.0a
OCC version: 7.4.0
Locale: English/UnitedStates (en_US)
Mod Edit: merged this thread from another.
Re: Discussion: State of the snap (Snap Packaging)
I checked the Snapcraft store and it seems that FreeCAD is listed as LGPL3. It should be LGPL2. The difference is important.
https://snapcraft.io/freecad
Always add the important information to your posts if you need help. Also see Tutorials and Video tutorials.
To support the documentation effort, and code development, your donation is appreciated: liberapay.com/FreeCAD.
To support the documentation effort, and code development, your donation is appreciated: liberapay.com/FreeCAD.