From 34efc03f352ae999e42cf8cbac10256791722597 Mon Sep 17 00:00:00 2001 From: Michael Marineau Date: Wed, 25 Jun 2014 12:23:29 -0700 Subject: [PATCH 1/2] set_group: don't copy update.gz, but do copy the dev container update.gz and .meta will not be generated any more by default. And previously the dev container was only being uploaded to the default 'beta' release directory so it wasn't available in a useful location. Copying it to all the release directories should help with that. --- image_set_group | 27 ++++++++++++++++++--------- 1 file changed, 18 insertions(+), 9 deletions(-) diff --git a/image_set_group b/image_set_group index d523fee87b..777f496d22 100755 --- a/image_set_group +++ b/image_set_group @@ -95,11 +95,20 @@ mkdir -p "${ROOT_FS_DIR}" info "Copying from ${FLAGS_from}" cp "${SRC_IMAGE}" "${DST_IMAGE}" -cp "${FLAGS_from}/version.txt" "${BUILD_DIR}/version.txt" + +# Copy all extra useful things, these do not need to be modified. UPDATE_PREFIX="${COREOS_PRODUCTION_IMAGE_NAME%_image.bin}_update" -if [[ -e "${FLAGS_from}/${UPDATE_PREFIX}.bin" ]]; then - cp "${FLAGS_from}/${UPDATE_PREFIX}".{bin,gz,meta,zip} "${BUILD_DIR}/" -fi +EXTRA_FILES=( + "version.txt" + "${UPDATE_PREFIX}.bin" + "${UPDATE_PREFIX}.zip" + "${COREOS_DEVELOPER_CONTAINER_NAME}" + ) +for filename in "${EXTRA_FILES[@]}"; do + if [[ -e "${FLAGS_from}/${filename}" ]]; then + cp "${FLAGS_from}/${filename}" "${BUILD_DIR}/${filename}" + fi +done "${BUILD_LIBRARY_DIR}/disk_util" --disk_layout="${FLAGS_disk_layout}" \ mount "${DST_IMAGE}" "${ROOT_FS_DIR}" @@ -115,11 +124,11 @@ cleanup_mounts "${ROOT_FS_DIR}" trap - EXIT upload_image "${DST_IMAGE}" -upload_image "${BUILD_DIR}/version.txt" -if [[ -e "${BUILD_DIR}/${UPDATE_PREFIX}.bin" ]]; then - upload_image -d "${BUILD_DIR}/${UPDATE_PREFIX}.DIGESTS" \ - "${BUILD_DIR}/${UPDATE_PREFIX}".{bin,gz,meta,zip} -fi +for filename in "${EXTRA_FILES[@]}"; do + if [[ -e "${BUILD_DIR}/${filename}" ]]; then + upload_image "${BUILD_DIR}/${filename}" + fi +done set_build_symlinks "${FLAGS_group}-latest" From 048ee51e6f4afd5caf3a858c3e2ba3cc7362cf8d Mon Sep 17 00:00:00 2001 From: Michael Marineau Date: Wed, 25 Jun 2014 12:37:34 -0700 Subject: [PATCH 2/2] build_image: when generating update payload don't generate metadata This feature was removed from delta_generator. --- build_library/build_image_util.sh | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/build_library/build_image_util.sh b/build_library/build_image_util.sh index 2157f00d1a..6f9fe65474 100755 --- a/build_library/build_image_util.sh +++ b/build_library/build_image_util.sh @@ -89,10 +89,8 @@ generate_update() { extract "${BUILD_DIR}/${image_name}" "USR-A" "${update}.bin" delta_generator -private_key "${devkey}" \ -new_image "${update}.bin" -out_file "${update}.gz" - delta_generator -private_key "${devkey}" \ - -in_file "${update}.gz" -out_metadata "${update}.meta" - upload_image -d "${update}.DIGESTS" "${update}".{bin,gz,meta,zip} + upload_image -d "${update}.DIGESTS" "${update}".{bin,gz,zip} } # Basic command to emerge binary packages into the target image.