diff --git a/build_library/sysext_prod_builder b/build_library/sysext_prod_builder index a077ce4cfb6..8545119e937 100755 --- a/build_library/sysext_prod_builder +++ b/build_library/sysext_prod_builder @@ -56,7 +56,10 @@ create_prod_sysext() { info "${msg}." - sudo "${SCRIPTS_DIR}/build_sysext" \ + # Pass the build ID extracted from root FS to build_sysext. This prevents common.sh + # in build_sysext to generate a (timestamp based) build ID during a DEV build of a + # release tag (which breaks its version check). + sudo "FLATCAR_BUILD_ID=$FLATCAR_BUILD_ID" "${SCRIPTS_DIR}/build_sysext" \ --board="${BOARD}" \ --image_builddir="${workdir}/sysext-build" \ --squashfs_base="${base_sysext}" \ @@ -104,6 +107,13 @@ mkdir "${sysext_workdir}" "${sysext_output_dir}" info "creating temporary base OS squashfs" sudo mksquashfs "${root_fs_dir}" "${sysext_base}" -noappend -xattrs-exclude '^btrfs.' +# Set build ID from root fs for later use by create_prod_sysext(). +# This prevents common.sh in build_sysext to generate its own build ID which might cause +# its build ID check to fail. +unset FLATCAR_BUILD_ID +FLATCAR_BUILD_ID=$(source "${root_fs_dir}/usr/lib/os-release" && echo -n "$BUILD_ID") +export FLATCAR_BUILD_ID + # Build sysexts on top of root fs and mount sysexts' squashfs + pkginfo squashfs # for combined overlay later. prev_pkginfo=""