fix(prod_image_util): Do not install update test key anymore.

Leave this to the ebuild, no reason for it to be done here.
This commit is contained in:
Michael Marineau 2014-04-30 17:06:32 -07:00
parent 54aac646d0
commit 7a7494e999
2 changed files with 1 additions and 16 deletions

View File

@ -158,10 +158,7 @@ fi
if should_build_image ${COREOS_PRODUCTION_IMAGE_NAME}; then
copy_image ${CHROMEOS_BASE_IMAGE_NAME} ${COREOS_PRODUCTION_IMAGE_NAME}
setup_prod_image ${COREOS_PRODUCTION_IMAGE_NAME} ${DISK_LAYOUT} \
${SRC_ROOT}/third_party/coreos-overlay/coreos-base/coreos-au-key/files/update-payload-key.pub.pem
setup_prod_image ${COREOS_PRODUCTION_IMAGE_NAME} ${DISK_LAYOUT}
upload_image "${BUILD_DIR}/${COREOS_PRODUCTION_IMAGE_NAME}"
fi

View File

@ -6,26 +6,14 @@
setup_prod_image() {
local image_name="$1"
local disk_layout="$2"
local au_key="$3"
info "Configuring production image ${image_name}"
local root_fs_dir="${BUILD_DIR}/rootfs"
local enable_rootfs_verification_flag=--noenable_rootfs_verification
if [[ ${FLAGS_enable_rootfs_verification} -eq ${FLAGS_TRUE} ]]; then
enable_rootfs_verification_flag=--enable_rootfs_verification
fi
"${BUILD_LIBRARY_DIR}/disk_util" --disk_layout="${disk_layout}" \
mount "${BUILD_DIR}/${image_name}" "${root_fs_dir}"
trap "cleanup_mounts '${root_fs_dir}' && delete_prompt" EXIT
# Install an auto update key on the root before sealing it off
local key_location=${root_fs_dir}"/usr/share/update_engine/"
sudo mkdir -p "${key_location}"
sudo cp "${au_key}" "$key_location/update-payload-key.pub.pem"
sudo chown root:root "$key_location/update-payload-key.pub.pem"
sudo chmod 644 "$key_location/update-payload-key.pub.pem"
# 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