Skip to content

Commit

Permalink
build_library: create_prod_sysexts: Move artifacts to BUILD_DIR
Browse files Browse the repository at this point in the history
Putting things in a sysexts subdir results in the same layout on
bincache and does not follow the expected url schema for fetching the
sysext.

Signed-off-by: Jeremi Piotrowski <jpiotrowski@microsoft.com>
  • Loading branch information
jepio committed Mar 11, 2024
1 parent 42ed2d9 commit 420de9d
Showing 1 changed file with 11 additions and 10 deletions.
21 changes: 11 additions & 10 deletions build_library/prod_image_util.sh
Original file line number Diff line number Diff line change
Expand Up @@ -251,8 +251,6 @@ create_prod_tar() {
create_prod_sysexts() {
local image_name="$1"
local image_sysext_base="${image_name%.bin}_sysext.squashfs"
sudo rm -rf "${BUILD_DIR}/sysexts/*"
mkdir -p "${BUILD_DIR}/sysexts"
local to_upload=()
for sysext in "${EXTRA_SYSEXTS[@]}"; do
local name="flatcar-${sysext%:*}"
Expand All @@ -261,24 +259,27 @@ create_prod_sysexts() {
if [[ ! -x "${mangle_script}" ]]; then
mangle_script=
fi
sudo rm -f "${BUILD_DIR}/${name}.raw" \
"${BUILD_DIR}/flatcar-test-update-${name}.gz" \
"${BUILD_DIR}/${name}_*"
sudo "${SCRIPT_ROOT}/build_sysext" --board="${BOARD}" \
--squashfs_base="${BUILD_DIR}/${image_sysext_base}" \
--image_builddir="${BUILD_DIR}/sysexts" \
--image_builddir="${BUILD_DIR}" \
${mangle_script:+--manglefs_script=${mangle_script}} \
"${name}" "${pkg}"
delta_generator \
-private_key "/usr/share/update_engine/update-payload-key.key.pem" \
-new_image "${BUILD_DIR}/sysexts/${name}.raw" \
-out_file "${BUILD_DIR}/sysexts/flatcar_test_update-${name}.gz"
to_upload+=(
"${BUILD_DIR}/sysexts/${name}.raw"
"${BUILD_DIR}/sysexts/${name}_contents.txt"
"${BUILD_DIR}/sysexts/${name}_contents_wtd.txt"
"${BUILD_DIR}/sysexts/${name}_disk_usage.txt"
"${BUILD_DIR}/sysexts/${name}_packages.txt"
"${BUILD_DIR}/sysexts/flatcar_test_update-${name}.gz"
"${BUILD_DIR}/${name}.raw"
"${BUILD_DIR}/${name}_contents.txt"
"${BUILD_DIR}/${name}_contents_wtd.txt"
"${BUILD_DIR}/${name}_disk_usage.txt"
"${BUILD_DIR}/${name}_packages.txt"
"${BUILD_DIR}/flatcar_test_update-${name}.gz"
)
done
upload_image -d ${BUILD_DIR}/sysexts/sysext.DIGESTS "${to_upload[@]}"
upload_image -d ${BUILD_DIR}/sysexts.DIGESTS "${to_upload[@]}"
}

0 comments on commit 420de9d

Please sign in to comment.