*: remove dev image

The dev image has been broken for some time. Some bits are left because
the dev container (not broken) still uses them. They should be renamed.
This commit is contained in:
Andrew Jeddeloh 2018-07-23 16:34:48 -07:00
parent 836a70aacc
commit 1718adb22a
7 changed files with 5 additions and 102 deletions

View File

@ -31,7 +31,7 @@ DEFINE_boolean enable_rootfs_verification ${FLAGS_TRUE} \
DEFINE_string base_pkg "coreos-base/coreos" \
"The base portage package to base the build off of (only applies to prod images)"
DEFINE_string base_dev_pkg "coreos-base/coreos-dev" \
"The base portage package to base the build off of (only applies to dev images)"
"The base portage package to base the build off of (only applies to dev containers)"
DEFINE_string torcx_manifest "${DEFAULT_BUILD_ROOT}/torcx/${DEFAULT_BOARD}/latest/torcx_manifest.json" \
"The torcx manifest describing torcx packages for this image (or blank for none)"
DEFINE_string torcx_root "${DEFAULT_BUILD_ROOT}/torcx" \
@ -57,12 +57,11 @@ This script is used to build a CoreOS image. CoreOS comes in many
different forms. This scripts can be used to build the following:
prod - Production image for CoreOS. This image is for booting.
dev - Developer image. Like base but with additional developer packages.
container - Developer image with single filesystem, bootable by nspawn.
Examples:
build_image --board=<board> [dev] [prod] [container] - builds developer and production images.
build_image --board=<board> [prod] [container] - builds developer and production images.
...
"
show_help_if_requested "$@"
@ -113,12 +112,10 @@ fi
. "${BUILD_LIBRARY_DIR}/vm_image_util.sh" || exit 1
PROD_IMAGE=0
DEV_IMAGE=0
CONTAINER=0
for arg in "$@"; do
case "${arg}" in
prod) PROD_IMAGE=1 ;;
dev) DEV_IMAGE=1 ;;
container) CONTAINER=1 ;;
*) die_notrace "Unknown image type ${arg}" ;;
esac
@ -146,8 +143,6 @@ fi
mkdir -p "${BUILD_DIR}"
DISK_LAYOUT="${FLAGS_disk_layout:-base}"
DEV_DISK_LAYOUT="${FLAGS_disk_layout:-devel}"
CONTAINER_LAYOUT="${FLAGS_disk_layout:-container}"
if [[ -n "${FLAGS_developer_data}" ]]; then
@ -169,14 +164,6 @@ fi
fix_mtab
if [[ "${DEV_IMAGE}" -eq 1 ]]; then
IMAGE_BUILD_TYPE="dev"
create_dev_image ${COREOS_DEVELOPER_IMAGE_NAME} ${DEV_DISK_LAYOUT} ${FLAGS_group} ${FLAGS_base_dev_pkg}
if [[ ${FLAGS_extract_update} -eq ${FLAGS_TRUE} ]]; then
extract_update "${COREOS_DEVELOPER_IMAGE_NAME}" "${DEV_DISK_LAYOUT}"
fi
fi
if [[ "${CONTAINER}" -eq 1 ]]; then
IMAGE_BUILD_TYPE="container"
create_dev_image "${COREOS_DEVELOPER_CONTAINER_NAME}" "${CONTAINER_LAYOUT}" "${FLAGS_group}" ${FLAGS_base_dev_pkg}
@ -236,10 +223,6 @@ if [[ "${PROD_IMAGE}" -eq 1 ]]; then
echo "CoreOS Production image created as ${COREOS_PRODUCTION_IMAGE_NAME}"
print_image_to_vm
fi
if [[ "${DEV_IMAGE}" -eq 1 ]]; then
echo "Developer image created as ${COREOS_DEVELOPER_IMAGE_NAME}"
print_image_to_vm dev
fi
command_completed

View File

@ -54,38 +54,17 @@ EOF
eselect profile set --force $(get_board_profile $BOARD)/dev
}
detect_dev_url() {
local port=":8080"
local host=$(hostname --fqdn 2>/dev/null)
if [[ -z "${host}" ]]; then
host=$(ip addr show scope global | \
awk '$1 == "inet" { sub(/[/].*/, "", $2); print $2; exit }')
fi
if [[ -n "${host}" ]]; then
echo "http://${host}${port}"
fi
}
create_dev_image() {
local image_name=$1
local disk_layout=$2
local update_group=$3
local base_pkg="$4"
local devserver=$(detect_dev_url)
local auserver=""
if [ -z "${base_pkg}" ]; then
echo "did not get base package!"
exit 1
fi
if [[ -n "${devserver}" ]]; then
info "Using ${devserver} for local dev server URL."
auserver="${devserver}/update"
else
info "Unable do detect local dev server address."
fi
info "Building developer image ${image_name}"
local root_fs_dir="${BUILD_DIR}/rootfs"
local image_contents="${image_name%.bin}_contents.txt"
@ -102,14 +81,7 @@ create_dev_image() {
write_licenses "${root_fs_dir}" "${BUILD_DIR}/${image_licenses}"
# Setup portage for emerge and gmerge
configure_dev_portage "${root_fs_dir}" "${devserver}"
sudo_append "${root_fs_dir}/etc/coreos/update.conf" <<EOF
SERVER=${auserver}
# For gmerge
DEVSERVER=${devserver}
EOF
configure_dev_portage "${root_fs_dir}"
# Mark the image as a developer image (input to chromeos_startup).
# TODO(arkaitzr): Remove this file when applications no longer rely on it

View File

@ -73,30 +73,6 @@
"mount":"/"
}
},
"devel": {
"3":{
"label":"USR-A",
"uuid":"7130c94a-213a-4e5a-8e26-6cce9662f132",
"type":"coreos-rootfs",
"blocks":"4194304",
"fs_blocks":"520188",
"fs_type":"ext2",
"mount":"/usr",
"features": ["prioritize", "verity"]
},
"4":{
"label":"USR-B",
"uuid":"e03dd35c-7c2d-4a47-b3fe-27f15780a57c",
"type":"coreos-rootfs",
"blocks":"4194304",
"fs_blocks":"520188"
},
"9":{
"label":"ROOT",
"fs_label":"ROOT",
"blocks":"12943360"
}
},
"vm":{
"9":{
"label":"ROOT",

View File

@ -389,7 +389,6 @@ fi
BUILD_DIR=
# Standard filenames
COREOS_DEVELOPER_IMAGE_NAME="coreos_developer_image.bin"
COREOS_DEVELOPER_CONTAINER_NAME="coreos_developer_container.bin"
COREOS_PRODUCTION_IMAGE_NAME="coreos_production_image.bin"

View File

@ -31,13 +31,11 @@ DEFINE_string board "${DEFAULT_BOARD}" \
DEFINE_string format "" \
"Output format, one of: ${VALID_IMG_TYPES[*]}"
DEFINE_string from "" \
"Directory containing coreos_developer_image.bin or coreos_production_image.bin."
"Directory containing coreos_production_image.bin."
DEFINE_string disk_layout "" \
"The disk layout type to use for this image."
DEFINE_integer mem "${DEFAULT_MEM}" \
"Memory size for the vm config in MBs."
DEFINE_boolean dev_image "${FLAGS_FALSE}" \
"Use the development image instead of the default production image."
DEFINE_string to "" \
"Destination folder for VM output file(s)"
DEFINE_string oem_pkg "" \
@ -107,14 +105,7 @@ if [ -f "${FLAGS_from}/version.txt" ]; then
COREOS_VERSION_STRING="${COREOS_VERSION}"
fi
if [ ${FLAGS_dev_image} -eq ${FLAGS_TRUE} ]; then
set_vm_paths "${FLAGS_from}" "${FLAGS_to}" "${COREOS_DEVELOPER_IMAGE_NAME}"
if [[ "${FLAGS_disk_layout}" == "" ]]; then
FLAGS_disk_layout=devel
fi
else
set_vm_paths "${FLAGS_from}" "${FLAGS_to}" "${COREOS_PRODUCTION_IMAGE_NAME}"
fi
set_vm_paths "${FLAGS_from}" "${FLAGS_to}" "${COREOS_PRODUCTION_IMAGE_NAME}"
# Make sure things are cleaned up on failure
trap vm_cleanup EXIT

View File

@ -9,7 +9,6 @@ DEFAULT_MEM="1024"
DEFAULT_VMDK="ide.vmdk"
DEFAULT_VMX="coreos.vmx"
DEFAULT_VBOX_DISK="os.vdi"
DEFAULT_QEMU_IMAGE="coreos_developer_qemu_image.img"
# Minimum sizes for full size vm images -- needed for update.
MIN_VDISK_SIZE_FULL=9216

View File

@ -1,17 +0,0 @@
#!/bin/bash
# Copyright (c) 2010 The Chromium OS Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# Start the Dev Server after making sure we are running under a chroot.
SCRIPT_ROOT=$(dirname $(readlink -f "$0"))
. "${SCRIPT_ROOT}/common.sh" || exit 1
# Script must be run inside the chroot if not in 'always serve' mode.
if [[ "$1" != "--archive_dir" ]]; then
assert_inside_chroot
fi
# This is the location of the script now.
exec $(dirname ${0})/../../chroot/usr/bin/start_devserver "$@"