Ubuntu Snap
Introduzione
Un pacchetto Ubuntu Snap, o semplicemente Snap è un formato di distribuzione simile a AppImage in quanto è inteso come un "pacchetto installabile universale" su cui distribuire software Sistemi Linux. Gli snap sono stati introdotti da Ubuntu ma sono pensati per essere eseguiti su tutte le distribuzioni Linux purché il demone Snap, o snapd
, sia disponibile sul sistema di destinazione.
Un pacchetto Snap ha due caratteristiche principali:
- I programmi sono sandbox in modo da non interferire con il resto del sistema operativo.
- I programmi vengono aggiornati automaticamente in background per ottenere la versione più recente dell'applicazione.
Per altri modi di installazione del software, vedere Installazione su Linux.
Installazione
L'uso di Snaps è sperimentale. Gli Snap attuali sono generati e ospitati da volontari.
Su tutti i sistemi in cui devono essere installati gli Snap, è necessario installare prima il demone Snap. Il pacchetto normalmente si chiama snapd
.
Debian/Ubuntu
Per Debian/Ubuntu e sistemi simili che utilizzano il gestore APT il demone viene installato come segue:
sudo apt install snapd
Per installare la versione stabile di Snap utilizzare:
sudo snap install freecad
Per installare la versione di sviluppo di Snap utilizzare:
sudo snap install --edge freecad
Manjaro
Per installare la versione stabile di Snap utilizzare:
snap install freecad
Per installare la versione di sviluppo di Snap utilizzare:
snap install --edge freecad
Note
Quale versione di FC sto utilizzando
Per capire quale versione di sviluppo è installata, digitare quanto segue nell'interfaccia della riga di comando:
snap info freecad
Cambiare tra diversi Snap
A partire dalla fine del ciclo di rilascio della versione 0.20, i manutentori dello snap di FreeCAD hanno aggiunto la possibilità di testare build sperimentali di FreeCAD. Gli snap lo consentono passando facilmente tra diversi snap (la terminologia è "channels or tracks"). Per esempio:
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