File tree Expand file tree Collapse file tree 4 files changed +14
-5
lines changed
Expand file tree Collapse file tree 4 files changed +14
-5
lines changed Original file line number Diff line number Diff line change @@ -177,7 +177,8 @@ if [[ "${PROD_IMAGE}" -eq 1 ]]; then
177177 if [[ ${FLAGS_extract_update} -eq ${FLAGS_TRUE} ]]; then
178178 extract_update " ${FLATCAR_PRODUCTION_IMAGE_NAME} " " ${DISK_LAYOUT} "
179179 fi
180- if [[ ${FLAGS_generate_update} -eq ${FLAGS_TRUE} ]]; then
180+ # TODO: Un-nobble this later when we have passed the shim review.
181+ if [[ ${FLAGS_generate_update} -eq ${FLAGS_TRUE} ]]; then # && ${COREOS_OFFICIAL:-0} -ne 1 ]]; then
181182 generate_update " ${FLATCAR_PRODUCTION_IMAGE_NAME} " " ${DISK_LAYOUT} "
182183 fi
183184 if [[ " ${PROD_TAR} " -eq 1 ]]; then
Original file line number Diff line number Diff line change @@ -79,7 +79,9 @@ generate_update() {
7979 local devkey=" /usr/share/update_engine/update-payload-key.key.pem"
8080
8181 # Extract the partition if it isn't extracted already.
82- [[ -s ${update} ]] || extract_update " ${image_name} " " ${disk_layout} "
82+ [[ -s ${update} ]] ||
83+ " ${BUILD_LIBRARY_DIR} /disk_util" --disk_layout=" ${disk_layout} " \
84+ extract " ${BUILD_DIR} /${image_name} " " USR-A" " ${update} "
8385
8486 echo " Generating update payload, signed with a dev key"
8587 delta_generator \
Original file line number Diff line number Diff line change @@ -82,14 +82,17 @@ function _sbsign_image_impl() {
8282 local sdk_image=" $( docker_image_fullname " ${sdk_name} " " ${docker_sdk_vernum} " ) "
8383 echo " docker image rm -f '${sdk_image} '" >> ./ci-cleanup.sh
8484
85- ./run_sdk_container -x ./ci-cleanup.sh -v " ${FLATCAR_VERSION} " -U -C " ${sdk_image} " \
85+ local docker_vernum=" $( vernum_to_docker_image_version " ${FLATCAR_VERSION} " ) "
86+ local sbsign_container=" flatcar-sbsign-image-${arch} -${docker_vernum} "
87+ ./run_sdk_container -x ./ci-cleanup.sh -n " ${sbsign_container} " -v " ${FLATCAR_VERSION} " -U -C " ${sdk_image} " \
8688 ./sbsign_image --board=" ${arch} -usr" \
8789 --group=" ${channel} " --version=" ${FLATCAR_VERSION} " \
8890 --output_root=" ${CONTAINER_IMAGE_ROOT} " \
8991 --only_store_compressed
9092
9193 # Delete uncompressed generic image before signing and upload
92- rm " ${images_local} /flatcar_production_image.bin"
94+ # Also delete update image because it will be unchanged
95+ rm " ${images_local} " /flatcar_production_{image,update}.bin
9396 create_digests " ${SIGNER} " " ${images_local} " /*
9497 sign_artifacts " ${SIGNER} " " ${images_local} " /*
9598 copy_to_buildcache " ${images_remote} " / " ${images_local} " /*
Original file line number Diff line number Diff line change @@ -61,8 +61,11 @@ switch_to_strict_mode
6161# Create the output directory and temporary mount points.
6262mkdir -p " ${BUILD_DIR} "
6363
64+ DISK_LAYOUT=" ${FLAGS_disk_layout:- base} "
65+
6466fix_mtab
65- sbsign_prod_image " ${FLATCAR_PRODUCTION_IMAGE_NAME} " " ${FLAGS_disk_layout:- base} "
67+ sbsign_prod_image " ${FLATCAR_PRODUCTION_IMAGE_NAME} " " ${DISK_LAYOUT} "
68+ generate_update " ${FLATCAR_PRODUCTION_IMAGE_NAME} " " ${DISK_LAYOUT} "
6669
6770echo " Done. ${FLATCAR_PRODUCTION_IMAGE_NAME} and associated files are now signed for Secure Boot in ${BUILD_DIR} ."
6871command_completed
You can’t perform that action at this time.
0 commit comments