Skip to content

Commit

Permalink
Merge pull request #2056 from flatcar/scripts
Browse files Browse the repository at this point in the history
sysext_prod_builder: fix build id mismatch
  • Loading branch information
t-lo committed Jun 25, 2024
2 parents 3990dd0 + 6775b65 commit 4175817
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion build_library/sysext_prod_builder
Original file line number Diff line number Diff line change
Expand Up @@ -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}" \
Expand Down Expand Up @@ -111,6 +114,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=""
Expand Down

0 comments on commit 4175817

Please sign in to comment.