@@ -131,7 +131,7 @@ create_prod_image() {
131131 sudo rsync -a --delete " ${BUILD_DIR} /configroot/etc/portage" " ${BUILD_DIR} /root_fs_dir2/etc"
132132 sudo mksquashfs " ${BUILD_DIR} /root_fs_dir2" " ${BUILD_DIR} /${image_sysext_base} " -noappend -xattrs-exclude ' ^btrfs.'
133133 sudo rm -rf " ${BUILD_DIR} /root_fs_dir2"
134-
134+
135135 # clean-ups of things we do not need
136136 sudo rm ${root_fs_dir} /etc/csh.env
137137 sudo rm -rf ${root_fs_dir} /etc/env.d
180180 " ${image_initrd_contents_wtd} " \
181181 " ${image_disk_usage} "
182182
183- # Upload
184- local to_upload=(
185- " ${BUILD_DIR} /${image_contents} "
186- " ${BUILD_DIR} /${image_contents_wtd} "
187- " ${BUILD_DIR} /${image_packages} "
188- " ${BUILD_DIR} /${image_sbom} "
189- " ${BUILD_DIR} /${image_licenses} "
190- " ${BUILD_DIR} /${image_kernel} "
191- " ${BUILD_DIR} /${image_pcr_policy} "
192- " ${BUILD_DIR} /${image_grub} "
193- " ${BUILD_DIR} /${image_kconfig} "
194- " ${BUILD_DIR} /${image_initrd_contents} "
195- " ${BUILD_DIR} /${image_initrd_contents_wtd} "
196- " ${BUILD_DIR} /${image_disk_usage} "
197- " ${BUILD_DIR} /${image_sysext_base} "
198- )
199-
200- # append sysext inventories to uploads
201- if [[ -n " ${base_sysexts} " ]] ; then
202- local inventory_file=" " image_basename=" ${image_name% .bin} "
203-
204- for inventory_file in " ${image_contents} " " ${image_contents_wtd} " " ${image_disk_usage} " " ${image_packages} " ; do
205- local suffix=" ${inventory_file/ ${image_basename} / } " sysext=" "
206-
207- for sysext in ${base_sysexts// ,/ } ; do
208- local name=" ${sysext%:* } "
209- local sysext_inventory=" ${root_fs_sysexts_output_dir} /${name}${suffix} "
210- if [[ ! -f " ${sysext_inventory} " ]] ; then
211- die " Sysext inventory file '${name}${suffix} ' for '${inventory_file} ' not found in '${root_fs_sysexts_output_dir} '"
212- fi
213- to_upload+=( " ${sysext_inventory} " )
214- done
215- done
216- fi
217-
218183 local files_to_evaluate=( " ${BUILD_DIR} /${image_name} " )
219- declare -a compressed_images
220- declare -a extra_files
221- compress_disk_images files_to_evaluate compressed_images extra_files
222- to_upload+=( " ${compressed_images[@]} " )
223- to_upload+=( " ${extra_files[@]} " )
224-
225- # FIXME(bgilbert): no shim on arm64
226- if [[ -f " ${BUILD_DIR} /${image_shim} " ]]; then
227- to_upload+=(" ${BUILD_DIR} /${image_shim} " )
228- fi
229- upload_image -d " ${BUILD_DIR} /${image_name} .DIGESTS" " ${to_upload[@]} "
230-
231- # Upload legacy digests
232- upload_legacy_digests " ${BUILD_DIR} /${image_name} .DIGESTS" compressed_images
184+ compress_disk_images files_to_evaluate
233185}
234186
235187create_prod_tar () {
@@ -246,13 +198,11 @@ create_prod_tar() {
246198 sudo umount " /mnt/${lodevbase} p9"
247199 sudo rmdir " /mnt/${lodevbase} p9"
248200 sudo losetup --detach " ${lodev} "
249- upload_image " ${container} "
250201}
251202
252203create_prod_sysexts () {
253204 local image_name=" $1 "
254205 local image_sysext_base=" ${image_name% .bin} _sysext.squashfs"
255- local to_upload=()
256206 for sysext in " ${EXTRA_SYSEXTS[@]} " ; do
257207 local name=" flatcar-${sysext%:* } "
258208 local pkgs=" ${sysext#*: } "
@@ -273,15 +223,5 @@ create_prod_sysexts() {
273223 -private_key " /usr/share/update_engine/update-payload-key.key.pem" \
274224 -new_image " ${BUILD_DIR} /${name} .raw" \
275225 -out_file " ${BUILD_DIR} /flatcar_test_update-${name} .gz"
276- to_upload+=(
277- " ${BUILD_DIR} /${name} .raw"
278- " ${BUILD_DIR} /${name} _contents.txt"
279- " ${BUILD_DIR} /${name} _contents_wtd.txt"
280- " ${BUILD_DIR} /${name} _disk_usage.txt"
281- " ${BUILD_DIR} /${name} _packages.txt"
282- " ${BUILD_DIR} /flatcar_test_update-${name} .gz"
283- )
284226 done
285- upload_image -d ${BUILD_DIR} /sysexts.DIGESTS " ${to_upload[@]} "
286227}
287-
0 commit comments