crypto crypto-openssl: support hashing operations
[vpp.git] / extras / snap / README.md
1 General
2 -------
3
4 The external dependency package will not build in the snapcraft
5 vm. The path of least resistance is to copy it to the root of the
6 (original) workspace before running the prep script.
7
8 Snapcraft has mount issues except under /home. Run the prep script and
9 copy the entire directory (including the .tgz file) under
10 /home/yourself.
11
12 Run the prep script
13 -------------------
14
15 ```
16   $ cd <vpp-workspace>/extras/snap
17   $ ./prep
18 ```
19
20 Copy data to /home (if necessary)
21
22 ```
23   $ mkdir /home/xxx
24   $ cd <vpp-workspace>/extras/snap
25   $ cp * /home/xxx
26
27 Set snapcraft environment variables
28 -----------------------------------
29
30 Minimum requirements:
31
32 ```
33   SNAPCRAFT_BUILD_ENVIRONMENT_MEMORY=16G
34   SNAPCRAFT_BUILD_ENVIRONMENT_DISK=32G
35 ```
36
37 Optional:
38
39 ```
40   SNAPCRAFT_BUILD_ENVIRONMENT_CPU=8
41   SNAPCRAFT_ENABLE_DEVELOPER_DEBUG=yes
42 ```
43
44 Run snapcraft
45 -------------
46
47 With luck, simply running snapcraft will produce the snap
48
49 ```
50   $ <environment-variable-settings> snapcraft [--debug]
51 ```
52
53 Rerunning snapcraft phases
54 --------------------------
55
56 Here's how to (re)run individual phases, to avoid starting from
57 scratch N times in case of errors:
58
59 ```
60   snapcraft pull [<part-name>]
61   snapcraft build [<part-name>]
62   snapcraft stage [<part-name>]
63   snapcraft prime [<part-name>]
64   snapcraft snap or snapcraft
65 ```
66
67 Restart without rebuilding VM
68 -----------------------------
69
70 To restart from scratch without rebuilding the VM:
71
72 ```
73   snapcraft clean vpp
74 ```
75
76 Delete (all) snapcraft VMs
77 --------------------------
78
79 ```
80   for vm in $(multipass list | awk '{print $1}' | grep ^snapcraft-); do
81         multipass delete $vm --purge
82   done
83 ```