Ubuntu Snap: Difference between revisions
m (Added another useful script to show the difference between the current edge/nightly snap and HEAD) |
m ('switch' to 'refresh') |
||
(12 intermediate revisions by 2 users not shown) | |||
Line 49: | Line 49: | ||
</translate> |
</translate> |
||
{{Code|lang=bash|code= |
{{Code|lang=bash|code= |
||
sudo snap install --edge freecad |
sudo snap install --edge freecad |
||
}} |
}} |
||
<translate> |
<translate> |
||
Line 69: | Line 69: | ||
</translate> |
</translate> |
||
{{Code|lang=bash|code= |
{{Code|lang=bash|code= |
||
snap install --edge freecad |
snap install --edge freecad |
||
}} |
}} |
||
<translate> |
<translate> |
||
== Notes == <!--T:17--> |
== Notes == <!--T:17--> |
||
==== What FC version am I running ==== <!--T:33--> |
|||
<!--T:18--> |
<!--T:18--> |
||
Line 80: | Line 82: | ||
</translate> |
</translate> |
||
{{Code|lang=bash|code= |
{{Code|lang=bash|code= |
||
snap info freecad |
snap info freecad |
||
}} |
|||
<translate> |
|||
==== Changing between different Snaps ==== <!--T:34--> |
|||
<!--T:35--> |
|||
Starting from the tail end of the v0.20 release cycle, the FreeCAD snap maintainers added the ability to test experimental FreeCAD builds. Snaps allow for this by easily toggling between different snaps (terminology is '[https://snapcraft.io/docs/channels channels or tracks]'). For example: |
|||
<!--T:36--> |
|||
Testing the Topological Naming ('toponaming') branch (created at the start of the v0.21/v1.0 release cycle): |
|||
</translate> |
|||
{{code|lang=bash|code= |
|||
snap refresh freecad --channel=latest/edge/toponaming |
|||
}} |
|||
<translate> |
|||
<!--T:37--> |
|||
Using the {{incode|refresh}} command will switch and update the snap channel you're switching to: |
|||
</translate> |
|||
{{code|lang=bash|code= |
|||
snap refresh freecad --channel=latest/edge/toponaming |
|||
}} |
|||
<translate> |
|||
<!--T:38--> |
|||
Toggling back to the nightly 'edge' channel: |
|||
</translate> |
|||
{{code|lang=bash|code= |
|||
snap refresh freecad --channel=latest/edge |
|||
}} |
}} |
||
<translate> |
<translate> |
||
Line 87: | Line 121: | ||
<!--T:20--> |
<!--T:20--> |
||
The following commands are geared towards users that are familiar with git and have a locally cloned repository of the upstream FreeCAD repository. |
The following commands are geared towards users that are familiar with {{incode|git}} and have a locally cloned repository of the upstream FreeCAD repository. |
||
</translate> |
</translate> |
||
Line 101: | Line 135: | ||
</translate> |
</translate> |
||
{{Code|lang=bash|code= |
{{Code|lang=bash|code= |
||
git pull upstream master # first make sure we have the most up-to-date commits |
|||
git rev-list --count HEAD |
|||
git rev-list --count HEAD # 'HEAD' refers to the current commit you are viewing (tip of the master branch) |
|||
}} |
}} |
||
<translate> |
<translate> |
||
Line 110: | Line 145: | ||
</translate> |
</translate> |
||
{{Code|lang=bash|code= |
{{Code|lang=bash|code= |
||
snap info freecad |
snap info freecad <nowiki>|</nowiki>\ |
||
grep -e '^\s\+latest/edge' <nowiki>|</nowiki>\ |
grep -e '^\s\+latest/edge' <nowiki>|</nowiki>\ |
||
awk -F ' ' '{ print $2 }' <nowiki>|</nowiki>\ |
awk -F ' ' '{ print $2 }' <nowiki>|</nowiki>\ |
||
cut -d'~' -f2 <nowiki>|</nowiki>\ |
|||
xargs -I{} git rev-list --count {} |
xargs -I{} git rev-list --count {} |
||
}} |
}} |
||
<translate> |
<translate> |
||
<!--T:25--> |
|||
'''Note:''' the above bash script 1 liner assumes user has 'edge' (nightly) installed |
'''Note:''' the above bash script 1 liner assumes user has 'edge' (nightly) installed |
||
Line 123: | Line 158: | ||
The difference between HEAD and the snap edge revision numbers indicates the amount of revisions trailing behind upstream the snap development (edge) is. |
The difference between HEAD and the snap edge revision numbers indicates the amount of revisions trailing behind upstream the snap development (edge) is. |
||
<!--T:26--> |
|||
Taking it a step further, if you want a short summary of the commits between the current snap edge and HEAD: |
Taking it a step further, if you want a short summary of the commits between the current snap edge and HEAD: |
||
</translate> |
</translate> |
||
{{Code|lang=bash|code= |
{{Code|lang=bash|code= |
||
snap info freecad |
snap info freecad <nowiki>|</nowiki>\ |
||
grep -e '^\s\+latest/edge' <nowiki>|</nowiki>\ |
grep -e '^\s\+latest/edge' <nowiki>|</nowiki>\ |
||
awk -F ' ' '{ print $2 }' <nowiki>|</nowiki>\ |
awk -F ' ' '{ print $2 }' <nowiki>|</nowiki>\ |
||
cut -d'~' -f2 <nowiki>|</nowiki>\ |
|||
xargs -I{} git log --oneline --ancestry-path {}..HEAD |
xargs -I{} git log --oneline --ancestry-path {}..HEAD |
||
}} |
}} |
||
<translate> |
<translate> |
||
<!--T:27--> |
|||
'''Note:''' The output will indicate what commits '''are not''' in the current 'edge' (but will be on the next nightly update). |
'''Note:''' The output will indicate what commits '''are not''' in the current 'edge' (but will be on the next nightly update). |
||
Line 140: | Line 177: | ||
<!--T:12--> |
<!--T:12--> |
||
More information about the current efforts to deal with Snaps: |
More information about the current efforts to deal with Snaps: |
||
* [https://forum.freecadweb.org/viewtopic.php?f=4&t=46044 0.19 Snap Preview needs "testers"], older Snap by {{Emphasis|vejmarie}}. |
* [https://forum.freecadweb.org/viewtopic.php?f=4&t=46044 0.19 Snap Preview needs "testers"], older Snap by {{Emphasis|vejmarie}}. (deprecated) |
||
* [https://forum.freecadweb.org/viewtopic.php?f=42&t=46853 Discussion: State of the snap (Snap Packaging)], newer version of the Snap by {{Emphasis|ppd}}. |
* [https://forum.freecadweb.org/viewtopic.php?f=42&t=46853 Discussion: State of the snap (Snap Packaging)], newer version of the Snap by {{Emphasis|ppd}}. (deprecated) |
||
=== Repositories === <!--T:28--> |
|||
<!--T:29--> |
|||
* https://github.com/FreeCAD/FreeCAD-snap |
|||
* https://snapcraft.io/freecad |
|||
=== Maintainer(s) === <!--T:30--> |
|||
<!--T:31--> |
|||
* ppd ([https://forum.freecadweb.org/memberlist.php?mode=viewprofile&u=24042 forum], [https://github.com/ppd github]) |
|||
* luzpaz ([https://forum.freecadweb.org/memberlist.php?mode=viewprofile&u=12229 forum], [https://github.com/luzpaz github]) |
|||
== Related == <!--T:32--> |
|||
<!--T:24--> |
<!--T:24--> |
||
* [[AppImage|AppImage]] - another self-contained 'binary' like format to run FreeCAD |
* [[AppImage|AppImage]] - another self-contained 'binary' like format to run FreeCAD |
||
* [[Flatpak|Flatpak]] |
* [[Flatpak|Flatpak]] packages |
||
</translate> |
</translate> |
||
[[Category:Packaging{{#translation:}}]] |
|||
[[Category:Developer Documentation{{#translation:}}]] |
|||
[[Category:Testing{{#translation:}}]] |
|||
{{Userdocnavi{{#translation:}}}} |
{{Userdocnavi{{#translation:}}}} |
Latest revision as of 16:25, 3 July 2022
Introduction
An Ubuntu Snap package, or just Snap is a distribution format similar to AppImage in that it is intended to be a "universal installable package" to deploy software on Linux systems. Snaps were introduced by Ubuntu but they are intended to run on all Linux distributions as long as the Snap daemon, or snapd
, is available on the target system.
A Snap package has two main characteristics:
- Programs are sandboxed so they do not interfere with the rest of the operating system.
- Programs are updated automatically in the background in order to get the newest version of the application.
For other ways of installing the software, see Installing on Linux.
Installation
The use of Snaps is experimental. The current Snaps are generated and hosted by volunteers.
On all systems where Snaps are to be installed, the Snap daemon must be installed first. The package is normally called snapd
.
Debian/Ubuntu
For Debian/Ubuntu and similar systems which use the APT manager the daemon is installed as follows:
sudo apt install snapd
To install the stable version of the Snap use:
sudo snap install freecad
To install the development version of the Snap use:
sudo snap install --edge freecad
Manjaro
To install the stable version of the Snap use:
snap install freecad
To install the development version of the Snap use:
snap install --edge freecad
Notes
What FC version am I running
To figure out which development version is installed type the following in the Command-line interface:
snap info freecad
Changing between different Snaps
Starting from the tail end of the v0.20 release cycle, the FreeCAD snap maintainers added the ability to test experimental FreeCAD builds. Snaps allow for this by easily toggling between different snaps (terminology is 'channels or tracks'). For example:
Testing the Topological Naming ('toponaming') branch (created at the start of the v0.21/v1.0 release cycle):
snap refresh freecad --channel=latest/edge/toponaming
Using the refresh
command will switch and update the snap channel you're switching to:
snap refresh freecad --channel=latest/edge/toponaming
Toggling back to the nightly 'edge' channel:
snap refresh freecad --channel=latest/edge
Advanced
The following commands are geared towards users that are familiar with git
and have a locally cloned repository of the upstream FreeCAD repository.
git clone https://github.com/FreeCAD/FreeCAD
cd FreeCAD/
To find out the latest upstream revision number (also known as 'HEAD'):
git pull upstream master # first make sure we have the most up-to-date commits
git rev-list --count HEAD # 'HEAD' refers to the current commit you are viewing (tip of the master branch)
To translate the current snap development version in to a revision number (make sure you're within your cloned FreeCAD repository as mentioned above):
snap info freecad |\
grep -e '^\s\+latest/edge' |\
awk -F ' ' '{ print $2 }' |\
xargs -I{} git rev-list --count {}
Note: the above bash script 1 liner assumes user has 'edge' (nightly) installed
The difference between HEAD and the snap edge revision numbers indicates the amount of revisions trailing behind upstream the snap development (edge) is.
Taking it a step further, if you want a short summary of the commits between the current snap edge and HEAD:
snap info freecad |\
grep -e '^\s\+latest/edge' |\
awk -F ' ' '{ print $2 }' |\
xargs -I{} git log --oneline --ancestry-path {}..HEAD
Note: The output will indicate what commits are not in the current 'edge' (but will be on the next nightly update).
Links
More information about the current efforts to deal with Snaps:
- 0.19 Snap Preview needs "testers", older Snap by vejmarie. (deprecated)
- Discussion: State of the snap (Snap Packaging), newer version of the Snap by ppd. (deprecated)
Repositories
Maintainer(s)
Related
- Getting started
- Installation: Download, Windows, Linux, Mac, Additional components, Docker, AppImage, Ubuntu Snap
- Basics: About FreeCAD, Interface, Mouse navigation, Selection methods, Object name, Preferences, Workbenches, Document structure, Properties, Help FreeCAD, Donate
- Help: Tutorials, Video tutorials
- Workbenches: Std Base, Arch, Assembly, CAM, Draft, FEM, Inspection, Mesh, OpenSCAD, Part, PartDesign, Points, Reverse Engineering, Robot, Sketcher, Spreadsheet, Start, Surface, TechDraw, Test Framework, Web
- Hubs: User hub, Power users hub, Developer hub