I find that
make snap (which just runs snapcraft) fails. This is due to snapcraft not exposing the environment variable
$SNAPCRAFT_PART_INSTALL to the prime stage with core20. This variable is exposed for core18.
Here’s the problematic part of snap/snapcraft.yaml:
maas: <snip /> override-prime: | set -e cwd=$(pwd) cd $SNAPCRAFT_PART_SRC snapcraftctl set-version $($SNAPCRAFT_PART_SRC/utilities/package-version) cd $cwd snapcraftctl prime $SNAPCRAFT_PART_INSTALL/usr/bin/python3 -m compileall -q .
The above fails with:
/bin/bash: line 41: SNAPCRAFT_PART_INSTALL: unbound variable
The problem would probably have been non-existent before the following commit which updated from core18 to core20. (And indeed I’ve tested the commit before and the issue isn’t present.)
commit a914db2a36964290b0a658e13327ba7d260e61fa Author: Alberto Donato <email@example.com> Date: Wed Aug 5 14:39:15 2020 +0000 support maas (exclusively) on Ubuntu 20.04 (core20 for the snap)
I’ve raised that as a potential issue over at the snapcraft forum, but even if that was amended it’s kind of moot as
/root/parts/maas/install/usr/bin/python3 (which is what
$SNAPCRAFT_PART_INSTALL/usr/bin/python3 would resolve to) doesn’t exist. I think that the line in snap/snapcraft.yaml should simply be changed to:
python3 -m compileall -q .
What’s the best way to raise this as an issue? Is it to open a case in launchpad and submit a patch?