Merge pull request #11282 from alfonsosanchezbeato/grub-multiarch
Currently, the grub binary name is always grubx64.efi. However, for
arm64 the usual name is Ubuntu us grubaa64.efi. Make it dependent on
architecture, so one or the other is expected in each case. This will
allow using grub on arm64 systems.
Make the choosing of boot assets dependent dynamically on arch instead
of having static names. This will facilitate overriding by environment
variables if needed in the future.
Use different grub binaries in different architectures, by checking
the grub_cfg variable in the grub recovery script. Also, increase the
config edition for grub-recovery.cfg.
Provide the different names for the assets in snapd by using constants
in files tagged for different architectures.
Minor changes ensuring unset SNAPD_DEBG to avoid test failures when run with SNAPD_DEBUG=1.
Added support in test.yaml for unit tests with SNAPD_DEBUG=1 to be re-run to avoid regressions.
This will be necessary for more complicated test cases in the gadget package,
so time to rip this band-aid and get rid of the old methods.
Signed-off-by: Ian Johnson <ian.johnson@canonical.com>
Some packaging frameworks (dh-golang in partcular) invokes go generate. Our code
calls `go run ..` to generate some output files. In particular, when building
with Go modules support, we must pass -mod=vendor occasionally. Allow the build
code to set an environment variables with flags that shall be passed to go run.
Signed-off-by: Maciej Borzecki <maciej.zenon.borzecki@canonical.com>
Update the recovery grub boot config to allow all system labels that are
considered valid by snapd, which are typically just numbers based on date, eg.
20210706 but follow the same rules as model names so hyphen separated
numbers/letters are allowed.
Signed-off-by: Maciej Borzecki <maciej.zenon.borzecki@canonical.com>
had to make the comment in wrappers/services_test.go a one-liner
otherwise half of it is lost
last set of files needing changing (as per current master)