Discussion: State of the snap (Snap Packaging)

This subforum is specifically to discuss packaging issues on different platforms (windows, mac, linux), and using different packaging systems (conda, etc...)
triplus
Veteran
Posts: 9471
Joined: Mon Dec 12, 2011 4:45 pm

Re: Discussion: State of the snap (Snap Packaging)

Post by triplus »

ppd wrote: Thu May 28, 2020 10:17 am An alternative, based on the PPA and without compiling all those external dependencies: https://github.com/ppd/FreeCAD/tree/snap-ppa/snap
To me it looks good for now, hence if you will go ahead an make a PR, adding snapcraft.yaml, that likely shouldn't represent any big problems. The decisions, regarding enabling the stable/per-commit builds on Snapcraft, from the FreeCAD GitHub repo, that can be made after. If it really comes down to pressing on a few buttons, like mentioned in the above blog post, i don't see any special reason, on why not giving it a try.
User avatar
ppd
Posts: 108
Joined: Tue Feb 26, 2019 12:01 pm
Location: Munich, Germany

Re: Discussion: State of the snap (Snap Packaging)

Post by ppd »

Reusing all that great Debian/Ubuntu packaging from the PPA + more recent Qt from KDE Neon seems the way to go. Let's KISS and only build the bare minimum.

I will go over all remaining optional dependencies and make sure nothing's missing. I will temporarily publish the snap as "freecad-ppd" in the Snap Store for anyone who wants to try it out.

Of course, I'm still eager to hear from vejmarie. After all, he's the maintainer :)
triplus wrote: Thu May 28, 2020 1:35 pm If it really comes down to pressing on a few buttons, like mentioned in the above blog post, i don't see any special reason, on why not giving it a try.
Building on build.snapcraft.io is dead simple. We did it for QElectrotech (https://snapcraft.io/qelectrotech): it builds on every commit to master. Another option is via Travis or some other CI tool.
Try FreeCAD from the Snap Store: Stable releases (in latest/stable) & daily builds (in latest/edge). Supports installing additional python packages via pip!
Image
User avatar
ppd
Posts: 108
Joined: Tue Feb 26, 2019 12:01 pm
Location: Munich, Germany

Re: Discussion: State of the snap (Snap Packaging)

Post by ppd »

For testing purposes, the PPA-based build: https://snapcraft.io/freecad-ppd
Install from the store or from the terminal:

Code: Select all

snap install --edge freecad-ppd
Try FreeCAD from the Snap Store: Stable releases (in latest/stable) & daily builds (in latest/edge). Supports installing additional python packages via pip!
Image
vocx
Veteran
Posts: 5197
Joined: Thu Oct 18, 2018 9:18 pm

Re: Discussion: State of the snap (Snap Packaging)

Post by vocx »

ppd wrote: Sun May 31, 2020 7:34 pm For testing purposes, the PPA-based build: https://snapcraft.io/freecad-ppd
It seems to work.

Code: Select all

OS: Ubuntu Core 18 (ubuntu:GNOME/ubuntu)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.21194 +118 (Git)
Build type: Release
Branch: snap-ppa
Hash: 1f618c5cf8e0c0e8fffc073a678dd14207f6e908
Python version: 3.6.9
Qt version: 5.12.3
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/United States (en_US)
The textual elements seem a bit small, like the resolution is very high.

Also, why does it say 21194 +118, instead of 21312? That's a bit odd. Currently the master branch is in commit 21349.

The reported hash of the snap doesn't seem to exist in the Git repository.

Code: Select all

git log 1f618c5cf8
Comparison with daily build.

Code: Select all

OS: Ubuntu 18.04.4 LTS (ubuntu:GNOME/ubuntu)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.
Build type: Release
Branch: unknown
Hash: 2330eef823b32ac412d839031cc174353a76b013
Python version: 3.6.9
Qt version: 5.9.5
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/UnitedStates (en_US)

Code: Select all

git log 2330eef82 --oneline

Code: Select all

git rev-list 2330eef823 --count
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.
User avatar
ppd
Posts: 108
Joined: Tue Feb 26, 2019 12:01 pm
Location: Munich, Germany

Re: Discussion: State of the snap (Snap Packaging)

Post by ppd »

vocx wrote: Sun May 31, 2020 9:09 pm The textual elements seem a bit small, like the resolution is very high.
We can add some auto scaling via QT_SCALE_FACTOR (scales fixed size fonts) or QT_AUTO_SCREEN_SCALE_FACTOR (does not).
You can play around with setting QT_AUTO_SCREEN_SCALE_FACTOR=1 and running freecad-ppd.freecad and report whether you like it better. Or try QT_SCALE_FACTOR=2 freecad-pdd.freecad or similar.
vocx wrote: Sun May 31, 2020 9:09 pm Also, why does it say 21194 +118, instead of 21312? That's a bit odd. Currently the master branch is in commit 21349.
The reported hash of the snap doesn't seem to exist in the Git repository.
The snap is based on code in the snap-ppa branch. Naturally, this means that those commits are not in the master branch and thus the hash differs.
Try FreeCAD from the Snap Store: Stable releases (in latest/stable) & daily builds (in latest/edge). Supports installing additional python packages via pip!
Image
vocx
Veteran
Posts: 5197
Joined: Thu Oct 18, 2018 9:18 pm

Re: Discussion: State of the snap (Snap Packaging)

Post by vocx »

ppd wrote: Mon Jun 01, 2020 7:18 am You can play around with setting QT_AUTO_SCREEN_SCALE_FACTOR=1 and running freecad-ppd.freecad and report whether you like it better. Or try QT_SCALE_FACTOR=2 freecad-pdd.freecad or similar.
QT_AUTO_SCREEN_SCALE_FACTOR doesn't seem to work with me.

This gives me about the same size as I have with the native version that I normally use.

Code: Select all

QT_SCALE_FACTOR=1.2 freecad-pdd.freecad
Maybe it's also a difference in Qt. The Snap has 5.12 while my system has 5.9, on top of Gnome desktop.
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.
User avatar
ppd
Posts: 108
Joined: Tue Feb 26, 2019 12:01 pm
Location: Munich, Germany

Re: Discussion: State of the snap (Snap Packaging)

Post by ppd »

vocx wrote: Mon Jun 01, 2020 7:43 am Maybe it's also a difference in Qt. The Snap has 5.12 while my system has 5.9, on top of Gnome desktop.
One key-difference is the platformtheme in use. The snap has access to:

Code: Select all

/snap/kde-frameworks-5-core18/32/usr/lib/x86_64-linux-gnu/qt5/plugins/platformthemes$ ls
KDEPlasmaPlatformTheme.so  libqxdgdesktopportal.so
You're probably using something else. We need a little fine-tuning for Qt. Both appearance-wise and regarding the file dialogs. They should use the xdg desktop portal.
Try FreeCAD from the Snap Store: Stable releases (in latest/stable) & daily builds (in latest/edge). Supports installing additional python packages via pip!
Image
User avatar
ppd
Posts: 108
Joined: Tue Feb 26, 2019 12:01 pm
Location: Munich, Germany

Re: Discussion: State of the snap (Snap Packaging)

Post by ppd »

The snap has been updated with the following features:
  • Use of xdg-desktop-portal file dialogs
  • Private font cache to prevent incompatibilities between host & snap fontconfig
Next up: Make sure that external dependencies find their expected paths because of the different snap fs layout.
Try FreeCAD from the Snap Store: Stable releases (in latest/stable) & daily builds (in latest/edge). Supports installing additional python packages via pip!
Image
User avatar
ppd
Posts: 108
Joined: Tue Feb 26, 2019 12:01 pm
Location: Munich, Germany

Re: Discussion: State of the snap (Snap Packaging)

Post by ppd »

gmsh is now meshing inside the snap and thus the FEM workbench is one step closer to working correctly.
Try FreeCAD from the Snap Store: Stable releases (in latest/stable) & daily builds (in latest/edge). Supports installing additional python packages via pip!
Image
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: Discussion: State of the snap (Snap Packaging)

Post by Kunda1 »

ppd wrote: Thu Jun 04, 2020 4:17 pm gmsh is now meshing inside the snap and thus the FEM workbench is one step closer to working correctly.
Great work, sir :D
Thank you for your efforts
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
Post Reply