diff --git a/build_image b/build_image index d6e2cba551..16227982cc 100755 --- a/build_image +++ b/build_image @@ -24,6 +24,8 @@ DEFINE_string board "${DEFAULT_BOARD}" \ "The board to build an image for." DEFINE_boolean enable_rootfs_verification ${FLAGS_TRUE} \ "Default all bootloaders to use kernel-based root fs integrity checking." +DEFINE_string base_pkg "coreos-base/coreos" \ + "The base portage package to base the build off of (only applies to prod images)" DEFINE_string output_root "${DEFAULT_BUILD_ROOT}/images" \ "Directory in which to place image result directories (named by version)" DEFINE_string disk_layout "" \ @@ -161,7 +163,7 @@ if [[ "${CONTAINER}" -eq 1 ]]; then fi if [[ "${PROD_IMAGE}" -eq 1 ]]; then - create_prod_image ${COREOS_PRODUCTION_IMAGE_NAME} ${DISK_LAYOUT} ${FLAGS_group} + create_prod_image ${COREOS_PRODUCTION_IMAGE_NAME} ${DISK_LAYOUT} ${FLAGS_group} ${FLAGS_base_pkg} if [[ ${FLAGS_generate_update} -eq ${FLAGS_TRUE} ]]; then generate_update "${COREOS_PRODUCTION_IMAGE_NAME}" ${DISK_LAYOUT} elif [[ ${FLAGS_extract_update} -eq ${FLAGS_TRUE} ]]; then diff --git a/build_library/prod_image_util.sh b/build_library/prod_image_util.sh index e712665c8f..ce681557f2 100755 --- a/build_library/prod_image_util.sh +++ b/build_library/prod_image_util.sh @@ -29,6 +29,11 @@ create_prod_image() { local image_name="$1" local disk_layout="$2" local update_group="$3" + local base_pkg="$4" + if [ -z "${base_pkg}" ]; then + echo "did not get base package!" + exit 1 + fi info "Building production image ${image_name}" local root_fs_dir="${BUILD_DIR}/rootfs" @@ -40,7 +45,7 @@ create_prod_image() { # Install minimal GCC (libs only) and then everything else set_image_profile prod extract_prod_gcc "${root_fs_dir}" - emerge_to_image "${root_fs_dir}" coreos-base/coreos + emerge_to_image "${root_fs_dir}" "${base_pkg}" write_packages "${root_fs_dir}" "${BUILD_DIR}/${image_packages}" # Assert that if this is supposed to be an official build that the