1 VPP Snap Build {#snap_doc}
7 The external dependency package will not build in the snapcraft
8 vm. The path of least resistance is to copy it to the root of the
9 (original) workspace before running the prep script.
11 Snapcraft has mount issues except under /home. Run the prep script and
12 copy the entire directory (including the .tgz file) under
19 $ cd <vpp-workspace>/extras/snap
23 Copy data to /home (if necessary)
27 $ cd <vpp-workspace>/extras/snap
30 Set snapcraft environment variables
31 -----------------------------------
36 SNAPCRAFT_BUILD_ENVIRONMENT_MEMORY=16G
37 SNAPCRAFT_BUILD_ENVIRONMENT_DISK=32G
43 SNAPCRAFT_BUILD_ENVIRONMENT_CPU=8
44 SNAPCRAFT_ENABLE_DEVELOPER_DEBUG=yes
50 With luck, simply running snapcraft will produce the snap
53 $ <environment-variable-settings> snapcraft [--debug]
56 Rerunning snapcraft phases
57 --------------------------
59 Here's how to (re)run individual phases, to avoid starting from
60 scratch N times in case of errors:
63 snapcraft pull [<part-name>]
64 snapcraft build [<part-name>]
65 snapcraft stage [<part-name>]
66 snapcraft prime [<part-name>]
67 snapcraft snap or snapcraft
70 Restart without rebuilding VM
71 -----------------------------
73 To restart from scratch without rebuilding the VM:
79 Delete (all) snapcraft VMs
80 --------------------------
83 for vm in $(multipass list | awk '{print $1}' | grep ^snapcraft-); do
84 multipass delete $vm --purge