Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sysext_prod_builder: fix build id mismatch #2056

Merged
merged 1 commit into from
Jun 25, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@ -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=""
Expand Down
Loading