From eb605751cd9fff43bb99801f35d1ac71ccf48a7b Mon Sep 17 00:00:00 2001 From: Michael Marineau Date: Fri, 20 Jun 2014 18:45:20 -0700 Subject: [PATCH] build_image: check that set_official wasn't forgotten in official builds --- build_library/prod_image_util.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/build_library/prod_image_util.sh b/build_library/prod_image_util.sh index 96b1b5b6da..29b03cf8a2 100755 --- a/build_library/prod_image_util.sh +++ b/build_library/prod_image_util.sh @@ -42,6 +42,14 @@ create_prod_image() { emerge_to_image "${root_fs_dir}" coreos-base/coreos write_packages "${root_fs_dir}" "${BUILD_DIR}/${image_packages}" + # Assert that if this is supposed to be an official build that the + # official update keys have been used. + if [[ ${COREOS_OFFICIAL:-0} -eq 1 ]]; then + grep -q official \ + "${root_fs_dir}"/var/db/pkg/coreos-base/coreos-au-key-*/USE \ + || die_notrace "coreos-au-key is missing the 'official' use flag" + fi + # clean-ups of things we do not need sudo rm ${root_fs_dir}/etc/csh.env sudo rm -rf ${root_fs_dir}/var/db/pkg