From fea3bafb0d02cac60840fe698c9007856d356efa Mon Sep 17 00:00:00 2001 From: "William A. Kennington III" Date: Wed, 26 Jan 2022 15:09:11 -0800 Subject: meta-google: gbmc-update: Fix image fetching The logic was not usable in our current environment. This makes some tweaks to download the image correctly. Change-Id: I86741e6029c2937d0a8106ac22a1738fa0e77cad Signed-off-by: William A. Kennington III --- meta-google/recipes-phosphor/flash/gbmc-update/75-gbmc-upgrade.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'meta-google') diff --git a/meta-google/recipes-phosphor/flash/gbmc-update/75-gbmc-upgrade.sh b/meta-google/recipes-phosphor/flash/gbmc-update/75-gbmc-upgrade.sh index c94bf5bd09..fb6bb4d1af 100644 --- a/meta-google/recipes-phosphor/flash/gbmc-update/75-gbmc-upgrade.sh +++ b/meta-google/recipes-phosphor/flash/gbmc-update/75-gbmc-upgrade.sh @@ -31,8 +31,9 @@ gbmc_upgrade_hook() { gbmc_upgrade_fetch() ( echo "Fetching $bootfile_url" >&2 - # We only support tarballs at the moment - if [[ "$bootfile_url" != *.tar ]]; then + # We only support tarballs at the moment, our URLs will always denote + # this with a URI query param of `format=TAR`. + if ! [[ "$bootfile_url" =~ [\&?]format=TAR(&|$) ]]; then echo "Unknown upgrade unpack method: $bootfile_url" >&2 return 1 fi @@ -40,7 +41,7 @@ gbmc_upgrade_fetch() ( # Ensure some sane output file limit # Currently no BMC image is larger than 64M ulimit -H -f $((96 * 1024 * 1024)) || return - wget "$bootfile_url" | tar -xC "$tmpdir" || true + wget -q -O - "$bootfile_url" | tar -xC "$tmpdir" || true local sig sig="$(find "$tmpdir" -name 'image-*.sig')" || return -- cgit v1.2.3