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

Use build_sysext for building OEM sysext images, drop old stuff #969

Merged
merged 8 commits into from
Jul 5, 2023
Merged
Show file tree
Hide file tree
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
216 changes: 0 additions & 216 deletions build_library/oem_sysext_util.sh

This file was deleted.

37 changes: 24 additions & 13 deletions build_library/vm_image_util.sh
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ VM_IMG_TYPE=DEFAULT

# Set at runtime to the source and destination image paths
VM_SRC_IMG=
VM_SRC_PKGDB=
VM_SRC_SYSEXT_IMG=
VM_TMP_IMG=
VM_TMP_DIR=
VM_TMP_ROOT=
Expand Down Expand Up @@ -363,15 +363,15 @@ set_vm_paths() {
local src_dir="${1}"; shift
local dst_dir="${1}"; shift
local src_name="${1}"; shift
local pkgdb_name="${1}"; shift
local sysext_base_name="${1}"; shift

VM_SRC_IMG="${src_dir}/${src_name}"
if [[ ! -f "${VM_SRC_IMG}" ]]; then
die "Source image does not exist: ${VM_SRC_IMG}"
fi
VM_SRC_PKGDB="${src_dir}/${pkgdb_name}"
if [[ ! -f "${VM_SRC_PKGDB}" ]]; then
die "Source package database does not exist: ${VM_SRC_PKGDB}"
VM_SRC_SYSEXT_IMG="${src_dir}/${sysext_base_name}"
if [[ ! -f "${VM_SRC_SYSEXT_IMG}" ]]; then
die "Sysext base image does not exist: ${VM_SRC_SYSEXT_IMG}"
fi

local dst_name="$(_src_to_dst_name "${src_name}" "_image.$(_disk_ext)")"
Expand Down Expand Up @@ -548,19 +548,30 @@ 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}"
# TODO: Set 'version' to with "${FLATCAR_VERSION}" and
# 'version_id' to "${FLATCAR_VERSION_ID}" when we implement updating OEM sysexts
# TODO: Set 'version' to "${FLATCAR_VERSION}" and drop
# VERSION_FIELD_OVERRIDE when we implement updating OEM sysexts.
local version='initial'
local version_id='initial'
local build_oem_sysext_flags=(
local build_sysext_env=(
VERSION_FIELD_OVERRIDE='SYSEXT_LEVEL=1.0'
)
local metapkg="coreos-base/${oem_sysext}"
local build_sysext_flags=(
--board="${BOARD}"
--build_dir="${built_sysext_dir}"
--prod_image_path="${VM_SRC_IMG}"
--prod_pkgdb_path="${VM_SRC_PKGDB}"
--version_id="${version_id}"
--squashfs_base="${VM_SRC_SYSEXT_IMG}"
--metapkgs="${metapkg}"
)
local overlay_path mangle_fs
overlay_path=$(portageq get_repo_path / coreos)
mangle_fs="${overlay_path}/${metapkg}/files/manglefs.sh"
if [[ -x "${mangle_fs}" ]]; then
build_sysext_flags+=(
--manglefs_script="${mangle_fs}"
)
fi

"${SCRIPT_ROOT}/build_oem_sysext" "${build_oem_sysext_flags[@]}" "${oem_sysext}"
mkdir -p "${built_sysext_dir}"
sudo "${build_sysext_env[@]}" "${SCRIPT_ROOT}/build_sysext" "${build_sysext_flags[@]}" "${oem_sysext}"

local installed_sysext_oem_dir='/oem/sysext'
local installed_sysext_file_prefix="${oem_sysext}-${version}"
Expand Down
77 changes: 0 additions & 77 deletions build_oem_sysext

This file was deleted.

Loading
Loading