Snapping speedtest-cli - Unofficial snapcrafters community live stream
Channel: 林博仁Buo-ren, Lin
Date: 2021-07-23

Source recipe used in this video: https://github.com/Lin-Buo-Ren/speedtest-cli-snap
The resulting snap: https://snapcraft.io/speedtest-cli

I would like to thank Matt Martz(@sivel) for creating this handy utility in the first place, and Alper Kanat for actively participating in the live stream.

Learn more about this series at https://forum.snapcraft.io/t/video-live-broadcast-of-snapcrafting-sessions/25521

Snapcraft Forum: https://forum.snapcraft.io/
Snap documentation: https://snapcraft.io/docs
Snap tutorials: https://snapcraft.io/tutorials

Timestamps:

0:00 Introduction
0:52 Motivation
2:48 Initializing a snap project
7:28 Defining a snap part
12:05 Running the `pull` step
13:43 The introduction of the unofficial Snapcraft Template Plus snap project template
15:19 Known issue of unable to switch local APT mirror during the build
19:23 Inspect the snap build environment
21:38 Exposing snapped application to the host system
24:22 Implementing a snap maintenance launcher
32:54 Running the `stage` step to consolidate all files from each part to the same location
34:28 Running the `prime` step to consolidate all files that should be landing the final snap
34:58 Stripping unnecessary files from the snap
45:40 Running the `snap` step to finally package the files in the prime directory to a snap
46:21 Installing an unsigned snap
47:40 Installing a snap in devmode confinement
48:38 Rectify the locale misconfiguration problem
49:15 Introducing the locales-launch launcher
51:08 Break time!
1:03:32 Flipping the snap to strict confinement
1:03:58 Asserting interface plugs required by the snapped application
1:11:07 Flipping the snap to stable grade
1:11:46 Incorporating the selective-checkout scriptlet to ease future snap maintenance
1:30:28 Workaround the Ubuntu archive selection issue in the build environment
1:37:22 Enable automatic snap building and publishing on the Snap Store
1:38:17 Introducing the Launchpad build farm that builds the snaps
1:42:27 Introducing the `snapcraft remote-build` command
1:43:16 Introducing the releases page in the Snap Store's backstage (part 1)
1:46:31 Introducing the Snapcraft Forum, the best place to seek help
1:47:28 Introducing the original Snapcrafters Template
1:49:10 Register a snap name and some concerns
1:52:19 Yay!  A 504 gateway time-out error!
1:53:13 Introducing the releases page in the Snap Store's backstage (part 2)
1:56:30 Introducing the metrics page in the Snap Store's backstage
1:58:33 Introducing the publicize page in the Snap Store's backstage
1:59:35 Introducing the settings page in the Snap Store's backstage
2:00:21 Yay!  Another 504 gateway time-out error!
2:00:38 Install the snap from a different channel
2:01:39 Ensure you're running the command provided by the snap
2:02:55 Conclusion

Errata:

* In 24:05 I set the locale to en_US.UTF-8 despite saying that the snap runtime only provides C.UTF-8, this is later rectified in the video at 43:38
* The `speedtest-cli` part's `version` property shouldn't be hardcoded to `v2.1.3` after incorporating the selective-checkout scriptlet (the scriptlet should automagically select the proper Git revision to checkout, based on the release tags and the versions promoted to each snap release channels).  This is rectified after the stream at https://github.com/Lin-Buo-Ren/speedtest-cli-snap/commit/3a7f838
* In 29:29 I named the launcher shipping part as `launcher`, which should really be named in plural form as snap may require stacking multiple launchers to work properly, this is being rectified after the stream at https://github.com/Lin-Buo-Ren/speedtest-cli-snap/commit/4ff4780