Ubuntu Snap: Difference between revisions

From FreeCAD Documentation
m (formatted the bash 1 liner in to a multi line command for clarity and convenience)
m (fix 1 liner, grep should regex 'latest/edge] and not the 'installed' + added note)
Line 111: Line 111:
{{Code|lang=bash|code=
{{Code|lang=bash|code=
snap info freecad-ppd <nowiki>|</nowiki>\
snap info freecad-ppd <nowiki>|</nowiki>\
grep -e '^installed:' <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>\
cut -d'~' -f2 <nowiki>|</nowiki>\
Line 117: Line 117:
}}
}}
<translate>
<translate>

'''Note:''' the above bash script 1 liner assumes user has 'edge' (nightly) installed


<!--T:23-->
<!--T:23-->

Revision as of 11:23, 12 March 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-ppd

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-ppd

Notes

To figure out which development version is installed type the following in the Command-line interface:

snap info freecad-ppd

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 rev-list --count HEAD

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-ppd |\
grep -e '^\s\+latest/edge' |\
awk -F ' ' '{ print $2 }' |\
cut -d'~' -f2 |\
xargs -I{} git rev-list --count {}

Note: the above bash script 1 liner assumes user has 'edge' (nightly) installed

The difference between the numbers will tell you how many revisions behind upstream the snap development (edge) is.

Links

More information about the current efforts to deal with Snaps:

  • AppImage - another self-contained 'binary' like format to run FreeCAD
  • Flatpak