summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiriam Zimmerman <mutexlox@google.com>2023-04-24 11:18:55 -0400
committerChromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com>2023-04-25 00:20:57 +0000
commitf5dcda11682c6f3ad267b73673946d425bb70fd9 (patch)
treea8208cf564890a7e92943999a1ee6327ee3d0f7b
parent350498f03a000e43a2a39100c7722997ba0db074 (diff)
downloadvboot-release-R114-15437.B.tar.gz
scripts: Support compressed about_os_credits.html.stabilize-15439.Brelease-R114-15437.B
BUG=b:187790036 BRANCH=none TEST=ensure_not_tainted_license.sh /path/to/chromiumos_test_image.bin Signed-off-by: Miriam Zimmerman <mutexlox@google.com> Change-Id: Id3ad6535b1bc9635050d467208614f97e0aeca35 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/4467627 Commit-Queue: Miriam Zimmerman <mutexlox@chromium.org> Tested-by: Miriam Zimmerman <mutexlox@chromium.org> Reviewed-by: Mike Frysinger <vapier@chromium.org>
-rwxr-xr-xscripts/image_signing/ensure_not_tainted_license.sh9
1 files changed, 8 insertions, 1 deletions
diff --git a/scripts/image_signing/ensure_not_tainted_license.sh b/scripts/image_signing/ensure_not_tainted_license.sh
index f289cde6..28b71d15 100755
--- a/scripts/image_signing/ensure_not_tainted_license.sh
+++ b/scripts/image_signing/ensure_not_tainted_license.sh
@@ -33,7 +33,7 @@ main() {
mount_loop_image_partition_ro "${loopdev}" 3 "${rootfs}"
fi
- local license_dir license tainted_tag tainted_status
+ local license_dir license license_gz tainted_tag tainted_status
license_dir="${rootfs}/opt/google/chrome/"
if [[ ! -d "${license_dir}" ]]; then
echo "Directory ${license_dir} does not exist. Skipping the tainted check."
@@ -41,6 +41,13 @@ main() {
fi
license=$(find "${license_dir}" -name about_os_credits.html 2>/dev/null)
+ license_gz=$(find "${license_dir}" -name about_os_credits.html.gz 2>/dev/null)
+ if [[ -n "${license_gz}" ]]; then
+ local tmpfile
+ tmpfile=$(make_temp_file)
+ gunzip --stdout "${license_gz}" > "${tmpfile}"
+ license="${tmpfile}"
+ fi
if [[ -z "${license}" ]]; then
echo "License file about_os_credits.html not found in ${license_dir}."
echo "Skipping the check of tainted license."