From 1eb48982df668c1ed6fdc0ff0eb46db3d2b2715a Mon Sep 17 00:00:00 2001 From: wheelerz Date: Tue, 4 Feb 2025 10:07:25 -0800 Subject: [PATCH] docs: Fix snapcraft build instructions and explicitly install lxd (#14941) * docs: Fix snapcraft build instructions and explicitly include LXD prerequisite The current documentation for building snapd with snapcraft doesn't work in 24.04. It also doesn't mention the LXD requirement, which leads to uncertainty about the build process when lxd asks many config questions and isn't mentioned in the build instructions. This documentation change: - Adds --classic flag to snap install for snapcraft, as it is required - Removes --channel option from snapcraft call as it no longer exists in 8.5.1 - Adds necessary and missing sudo to snap install - Makes the lxd install and lxd init step explicit --- HACKING.md | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/HACKING.md b/HACKING.md index 361b36b07e5..fb93a187d3a 100644 --- a/HACKING.md +++ b/HACKING.md @@ -79,19 +79,26 @@ Snapcraft 8.x or later is expected. Install snapcraft: ``` -sudo snap install snapcraft +sudo snap install snapcraft --classic +``` + +Install and init lxd: + +``` +sudo snap install lxd +sudo lxd init --minimal ``` Then run snapcraft: ``` -snapcraft --channel=latest/stable +snapcraft ``` Now the snapd snap that was just built can be installed with: ``` -snap install --dangerous snapd_*.snap +sudo snap install --dangerous snapd_*.snap ``` To go back to using snapd from the store instead of the custom version we