Skip to content

Commit

Permalink
build_library: Force initial version of OEM sysexts for now
Browse files Browse the repository at this point in the history
We don't have an update process of the OEM sysexts implemented yet, so
use a fake "initial" version for them and make them independent from
OS version.
  • Loading branch information
krnowak committed Jun 2, 2023
1 parent 0dba3d4 commit 7649562
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 9 deletions.
9 changes: 7 additions & 2 deletions build_library/oem_sysext_util.sh
Original file line number Diff line number Diff line change
Expand Up @@ -157,12 +157,17 @@ oem_sysext_create() {
rm -rf "${entry}"
done

local metadata metadata_file
local metadata metadata_file metadata_version_entry
info "Adding sysext metadata"
mkdir -p "${sysext_rootfs}/usr/lib/extension-release.d"
if [[ "${version_id}" = 'initial' ]]; then
metadata_version_entry="SYSEXT_LEVEL=1.0"
else
metadata_version_entry="VERSION_ID=${version_id}"
fi
metadata=(
'ID=flatcar'
"VERSION_ID=${version_id}"
"${metadata_version_entry}"
"ARCHITECTURE=$(_get_sysext_arch "${board}")"
)
metadata_file="${sysext_rootfs}/usr/lib/extension-release.d/extension-release.${oem}"
Expand Down
17 changes: 10 additions & 7 deletions build_library/vm_image_util.sh
Original file line number Diff line number Diff line change
Expand Up @@ -548,13 +548,16 @@ install_oem_sysext() {
local built_sysext_dir="${FLAGS_to}/${oem_sysext}-sysext"
local built_sysext_filename="${oem_sysext}.raw"
local built_sysext_path="${built_sysext_dir}/${built_sysext_filename}"

"${SCRIPT_ROOT}/build_oem_sysext" \
--board="${BOARD}" \
--build_dir="${built_sysext_dir}" \
--prod_image_path="${VM_SRC_IMG}" \
--prod_pkgdb_path="${VM_SRC_PKGDB}" \
"${oem_sysext}"
local build_oem_sysext_flags=(
--board="${BOARD}"
--build_dir="${built_sysext_dir}"
--prod_image_path="${VM_SRC_IMG}"
--prod_pkgdb_path="${VM_SRC_PKGDB}"
# TODO: Drop this when we implement updating OEM sysexts.
--version_id=initial
)

"${SCRIPT_ROOT}/build_oem_sysext" "${build_oem_sysext_flags[@]}" "${oem_sysext}"

local installed_sysext_oem_dir='/oem/sysext'
local installed_sysext_file_prefix="${oem_sysext}-${FLATCAR_VERSION}"
Expand Down

0 comments on commit 7649562

Please sign in to comment.