From 8bc09a160b0561ae26a211d8c7d66bf9bec03a6d Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Fri, 12 Jul 2019 17:55:16 +0200 Subject: [PATCH] Run "snap debug validate-seed" to do basic validation of the geerated seed.yaml --- debian/control | 2 +- live-build/auto/build | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/debian/control b/debian/control index 1b8b558c..73519d8b 100644 --- a/debian/control +++ b/debian/control @@ -34,7 +34,7 @@ Depends: ${misc:Depends}, python3-yaml, qemu-utils, rsync, - snapd, + snapd (>= 2.39), squashfs-tools (>= 1:3.3-1), sudo, u-boot-tools [armhf arm64], diff --git a/live-build/auto/build b/live-build/auto/build index 74630174..72d95202 100755 --- a/live-build/auto/build +++ b/live-build/auto/build @@ -529,6 +529,11 @@ if [ -z "$PASSES" ] && [ -e "$PREFIX.manifest" ]; then ./config/snap-seed-parse "chroot/" "$PREFIX.manifest" fi +# Do basic validation of generated snapd seed.yaml. +if [ -e chroot/var/lib/snapd/seed/seed.yaml ]; then + snap debug validate-seed chroot/var/lib/snapd/seed/seed.yaml +fi + # ubuntu-core splits kernel stuff into a "device" tarball so # at this point we reset it to "none" as all the work to extract it was done already # in a binary hook