Skip to content

Commit 1dad511

Browse files
Flatcar Buildbotiaguis
Flatcar Buildbot
authored andcommitted
2317.0.1
1 parent 913140d commit 1dad511

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+282
-276
lines changed

bootstrap_sdk

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
SCRIPT_ROOT=$(dirname $(readlink -f "$0"))
3434
. "${SCRIPT_ROOT}/common.sh" || exit 1
3535

36-
TYPE="coreos-sdk"
36+
TYPE="flatcar-sdk"
3737

3838
. "${BUILD_LIBRARY_DIR}/catalyst.sh" || exit 1
3939

@@ -63,7 +63,7 @@ catalyst_init "$@"
6363
check_gsutil_opts
6464

6565
if [[ "$STAGES" =~ stage4 ]]; then
66-
info "Setting release to ${COREOS_VERSION}"
66+
info "Setting release to ${FLATCAR_VERSION}"
6767
rm -rf "${TEMPDIR}/stage4_overlay"
6868
# need to setup the lib->lib64 symlink correctly
6969
libdir=$(get_sdk_libdir)

build_docker_aci

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ case "${version}" in
9494
"/usr/bin/docker-containerd-shim"
9595
"/usr/bin/docker-proxy"
9696
"/usr/bin/docker-runc"
97-
"/usr/lib/coreos/dockerd"
97+
"/usr/lib/flatcar/dockerd"
9898
)
9999
ebuild_aci_create "users.developer.core-os.net/skim/docker" \
100100
"coreos_docker-${BOARD}-${version}_coreos.${aci_version}" \

build_image

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -166,16 +166,16 @@ fix_mtab
166166

167167
if [[ "${CONTAINER}" -eq 1 ]]; then
168168
IMAGE_BUILD_TYPE="container"
169-
create_dev_container "${COREOS_DEVELOPER_CONTAINER_NAME}" "${CONTAINER_LAYOUT}" "${FLAGS_group}" ${FLAGS_base_dev_pkg}
169+
create_dev_container "${FLATCAR_DEVELOPER_CONTAINER_NAME}" "${CONTAINER_LAYOUT}" "${FLAGS_group}" ${FLAGS_base_dev_pkg}
170170
fi
171171

172172
if [[ "${PROD_IMAGE}" -eq 1 ]]; then
173173
IMAGE_BUILD_TYPE="prod"
174-
create_prod_image ${COREOS_PRODUCTION_IMAGE_NAME} ${DISK_LAYOUT} ${FLAGS_group} ${FLAGS_base_pkg}
174+
create_prod_image ${FLATCAR_PRODUCTION_IMAGE_NAME} ${DISK_LAYOUT} ${FLAGS_group} ${FLAGS_base_pkg}
175175
if [[ ${FLAGS_generate_update} -eq ${FLAGS_TRUE} ]]; then
176-
generate_update "${COREOS_PRODUCTION_IMAGE_NAME}" ${DISK_LAYOUT}
176+
generate_update "${FLATCAR_PRODUCTION_IMAGE_NAME}" ${DISK_LAYOUT}
177177
elif [[ ${FLAGS_extract_update} -eq ${FLAGS_TRUE} ]]; then
178-
extract_update "${COREOS_PRODUCTION_IMAGE_NAME}" "${DISK_LAYOUT}"
178+
extract_update "${FLATCAR_PRODUCTION_IMAGE_NAME}" "${DISK_LAYOUT}"
179179
fi
180180
fi
181181

@@ -186,15 +186,15 @@ then
186186
fi
187187

188188
# Write out a version.txt file, this will be used by image_to_vm.sh
189-
split_ver "${COREOS_VERSION_ID}" SPLIT
189+
split_ver "${FLATCAR_VERSION_ID}" SPLIT
190190
tee "${BUILD_DIR}/version.txt" <<EOF
191-
COREOS_BUILD=${SPLIT[0]}
192-
COREOS_BRANCH=${SPLIT[1]}
193-
COREOS_PATCH=${SPLIT[2]}
194-
COREOS_VERSION=${COREOS_VERSION}
195-
COREOS_VERSION_ID=${COREOS_VERSION_ID}
196-
COREOS_BUILD_ID="${COREOS_BUILD_ID}"
197-
COREOS_SDK_VERSION=${COREOS_SDK_VERSION}
191+
FLATCAR_BUILD=${SPLIT[0]}
192+
FLATCAR_BRANCH=${SPLIT[1]}
193+
FLATCAR_PATCH=${SPLIT[2]}
194+
FLATCAR_VERSION=${FLATCAR_VERSION}
195+
FLATCAR_VERSION_ID=${FLATCAR_VERSION_ID}
196+
FLATCAR_BUILD_ID="${FLATCAR_BUILD_ID}"
197+
FLATCAR_SDK_VERSION=${FLATCAR_SDK_VERSION}
198198
EOF
199199

200200
upload_image "${BUILD_DIR}/version.txt"
@@ -220,7 +220,7 @@ EOF
220220

221221
# Print out the images we generated.
222222
if [[ "${PROD_IMAGE}" -eq 1 ]]; then
223-
echo "CoreOS Production image created as ${COREOS_PRODUCTION_IMAGE_NAME}"
223+
echo "Flatcar Production image created as ${FLATCAR_PRODUCTION_IMAGE_NAME}"
224224
print_image_to_vm
225225
fi
226226

build_library/build_image_util.sh

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
# Use canonical path since some tools (e.g. mount) do not like symlinks.
1313
# Append build attempt to output directory.
1414
if [ -z "${FLAGS_version}" ]; then
15-
IMAGE_SUBDIR="${FLAGS_group}-${COREOS_VERSION}-a${FLAGS_build_attempt}"
15+
IMAGE_SUBDIR="${FLAGS_group}-${FLATCAR_VERSION}-a${FLAGS_build_attempt}"
1616
else
1717
IMAGE_SUBDIR="${FLAGS_group}-${FLAGS_version}"
1818
fi
@@ -66,7 +66,7 @@ extract_update() {
6666

6767
zip_update_tools() {
6868
# There isn't a 'dev' variant of this zip, so always call it production.
69-
local update_zip="coreos_production_update.zip"
69+
local update_zip="flatcar_production_update.zip"
7070

7171
info "Generating update tools zip"
7272
# Make sure some vars this script needs are exported
@@ -460,9 +460,9 @@ finish_image() {
460460
esac
461461

462462
# Copy kernel to support dm-verity boots
463-
sudo mkdir -p "${root_fs_dir}/boot/coreos"
463+
sudo mkdir -p "${root_fs_dir}/boot/flatcar"
464464
sudo cp "${root_fs_dir}/usr/boot/vmlinuz" \
465-
"${root_fs_dir}/boot/coreos/vmlinuz-a"
465+
"${root_fs_dir}/boot/flatcar/vmlinuz-a"
466466

467467
# Record directories installed to the state partition.
468468
# Explicitly ignore entries covered by existing configs.
@@ -483,14 +483,14 @@ finish_image() {
483483

484484
# Create first-boot flag for grub and Ignition
485485
info "Writing first-boot flag"
486-
sudo_clobber "${root_fs_dir}/boot/coreos/first_boot" <<EOF
486+
sudo_clobber "${root_fs_dir}/boot/flatcar/first_boot" <<EOF
487487
If this file exists, Ignition will run and then delete the file.
488488
EOF
489489
fi
490490

491491
if [[ -n "${FLAGS_developer_data}" ]]; then
492-
local data_path="/usr/share/coreos/developer_data"
493-
local unit_path="usr-share-coreos-developer_data"
492+
local data_path="/usr/share/flatcar/developer_data"
493+
local unit_path="usr-share-flatcar-developer_data"
494494
sudo cp "${FLAGS_developer_data}" "${root_fs_dir}/${data_path}"
495495
systemd_enable "${root_fs_dir}" system-config.target \
496496
"[email protected]" "system-cloudinit@${unit_path}.service"
@@ -529,30 +529,30 @@ EOF
529529
# For amd64 the rdev error message is used.
530530
# Our modified GRUB extracts the hash and adds it to the cmdline.
531531
printf %s "$(cat ${BUILD_DIR}/${image_name%.bin}_verity.txt)" | \
532-
sudo dd of="${root_fs_dir}/boot/coreos/vmlinuz-a" conv=notrunc \
532+
sudo dd of="${root_fs_dir}/boot/flatcar/vmlinuz-a" conv=notrunc \
533533
seek=${verity_offset} count=64 bs=1 status=none
534534
fi
535535

536536
# Sign the kernel after /usr is in a consistent state and verity is calculated
537537
if [[ ${COREOS_OFFICIAL:-0} -ne 1 ]]; then
538538
sudo sbsign --key /usr/share/sb_keys/DB.key \
539539
--cert /usr/share/sb_keys/DB.crt \
540-
"${root_fs_dir}/boot/coreos/vmlinuz-a"
541-
sudo mv "${root_fs_dir}/boot/coreos/vmlinuz-a.signed" \
542-
"${root_fs_dir}/boot/coreos/vmlinuz-a"
540+
"${root_fs_dir}/boot/flatcar/vmlinuz-a"
541+
sudo mv "${root_fs_dir}/boot/flatcar/vmlinuz-a.signed" \
542+
"${root_fs_dir}/boot/flatcar/vmlinuz-a"
543543
fi
544544

545545
if [[ -n "${image_kernel}" ]]; then
546546
# copying kernel from vfat so ignore the permissions
547547
cp --no-preserve=mode \
548-
"${root_fs_dir}/boot/coreos/vmlinuz-a" \
548+
"${root_fs_dir}/boot/flatcar/vmlinuz-a" \
549549
"${BUILD_DIR}/${image_kernel}"
550550
fi
551551

552552
if [[ -n "${pcr_policy}" ]]; then
553553
mkdir -p "${BUILD_DIR}/pcrs"
554554
${BUILD_LIBRARY_DIR}/generate_kernel_hash.sh \
555-
"${root_fs_dir}/boot/coreos/vmlinuz-a" ${COREOS_VERSION} \
555+
"${root_fs_dir}/boot/flatcar/vmlinuz-a" ${FLATCAR_VERSION} \
556556
>"${BUILD_DIR}/pcrs/kernel.config"
557557
fi
558558

@@ -587,7 +587,7 @@ EOF
587587

588588
if [[ -n "${pcr_policy}" ]]; then
589589
${BUILD_LIBRARY_DIR}/generate_grub_hashes.py \
590-
"${disk_img}" /usr/lib/grub/ "${BUILD_DIR}/pcrs" ${COREOS_VERSION}
590+
"${disk_img}" /usr/lib/grub/ "${BUILD_DIR}/pcrs" ${FLATCAR_VERSION}
591591

592592
info "Generating $pcr_policy"
593593
pushd "${BUILD_DIR}" >/dev/null

build_library/catalyst.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
: ${TYPE:="coreos-sdk"}
1313
: ${ARCH:=$(get_sdk_arch)}
1414
: ${DEFAULT_CATALYST_ROOT:="${DEFAULT_BUILD_ROOT}/catalyst"}
15-
: ${DEFAULT_SEED:=${COREOS_SDK_TARBALL_PATH}}
15+
: ${DEFAULT_SEED:=${FLATCAR_SDK_TARBALL_PATH}}
1616
: ${DEFAULT_PROFILE:=$(get_sdk_profile)}
1717
# Set to something like "stage4" to restrict what to build
1818
# FORCE_STAGES=
@@ -34,7 +34,7 @@ DEFINE_string coreos_overlay "${SRC_ROOT}/third_party/coreos-overlay" \
3434
"Path to the coreos-overlay git checkout."
3535
DEFINE_string seed_tarball "${DEFAULT_SEED}" \
3636
"Path to an existing stage tarball to start from."
37-
DEFINE_string version "${COREOS_VERSION}" \
37+
DEFINE_string version "${FLATCAR_VERSION}" \
3838
"Version to use for portage snapshot and stage tarballs."
3939
DEFINE_string profile "${DEFAULT_PROFILE}" \
4040
"Portage profile, may be prefixed with repo:"
@@ -196,7 +196,7 @@ catalyst_init() {
196196
DISTDIR="$CATALYST_ROOT/distfiles"
197197

198198
# automatically download the current SDK if it is the seed tarball.
199-
if [[ "$FLAGS_seed_tarball" == "${COREOS_SDK_TARBALL_PATH}" ]]; then
199+
if [[ "$FLAGS_seed_tarball" == "${FLATCAR_SDK_TARBALL_PATH}" ]]; then
200200
sdk_download_tarball
201201
fi
202202

build_library/check_root

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,9 @@ IGNORE_SYMLINK = (
8888
b"/etc/motd",
8989

9090
# Other
91-
b"/etc/lsb-release" # set later in the build process
91+
b"/etc/lsb-release", # set later in the build process
92+
b"/usr/share/coreos", # set later in the build process
93+
b"/etc/coreos" # set later in the build process
9294
)
9395

9496

build_library/configure_bootloaders.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,11 @@ configure_pvgrub() {
4545
sudo_clobber "${GRUB_DIR}/menu.lst.A" <<EOF
4646
timeout 0
4747
48-
title CoreOS A Root
48+
title Flatcar A Root
4949
root (hd0,0)
5050
kernel /syslinux/vmlinuz.A ${grub_args} ${slot_a_args}
5151
52-
title CoreOS B Root
52+
title Flatcar B Root
5353
root (hd0,0)
5454
kernel /syslinux/vmlinuz.B ${grub_args} ${slot_b_args}
5555
EOF

build_library/dev_container_util.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ configure_dev_portage() {
1515

1616
sudo mkdir -p "$1/etc/portage/repos.conf"
1717
sudo_clobber "$1/etc/portage/make.conf" <<EOF
18-
# make.conf for CoreOS dev images
18+
# make.conf for Flatcar dev images
1919
ARCH=$(get_board_arch $BOARD)
2020
CHOST=$(get_board_chost $BOARD)
2121
@@ -25,8 +25,8 @@ PKGDIR="/var/lib/portage/pkgs"
2525
PORT_LOGDIR="/var/log/portage"
2626
PORTDIR="/var/lib/portage/portage-stable"
2727
PORTDIR_OVERLAY="/var/lib/portage/coreos-overlay"
28-
PORTAGE_BINHOST="http://builds.developer.core-os.net/boards/${BOARD}/${COREOS_VERSION_ID}/pkgs/
29-
http://builds.developer.core-os.net/boards/${BOARD}/${COREOS_VERSION_ID}/toolchain/"
28+
PORTAGE_BINHOST="http://builds.developer.core-os.net/boards/${BOARD}/${FLATCAR_VERSION_ID}/pkgs/
29+
http://builds.developer.core-os.net/boards/${BOARD}/${FLATCAR_VERSION_ID}/toolchain/"
3030
EOF
3131

3232
sudo_clobber "$1/etc/portage/repos.conf/coreos.conf" <<EOF

build_library/disk_layout.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@
131131
"label":"ROOT",
132132
"fs_label":"ROOT",
133133
"type":"4f68bce3-e8cd-4db1-96e7-fbcaf984b709",
134-
"blocks":"8388608"
134+
"blocks":"12582912"
135135
}
136136
},
137137
"interoute":{

build_library/ebuild_aci_util.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# Use of this source code is governed by a BSD-style license that can be
33
# found in the LICENSE file.
44

5-
# Expects BOARD, BUILD_DIR, BUILD_LIBRARY_DIR, and COREOS_VERSION in env.
5+
# Expects BOARD, BUILD_DIR, BUILD_LIBRARY_DIR, and FLATCAR_VERSION in env.
66

77
# Copied from create_prod_image()
88
create_ebuild_aci_image() {
@@ -59,7 +59,7 @@ ebuild_aci_create() {
5959
local extra_version="${1?No extra version number given}"; shift
6060
local pkg_files=( "${@}" )
6161

62-
local staging_image="coreos_pkg_staging_aci_stage.bin"
62+
local staging_image="flatcar_pkg_staging_aci_stage.bin"
6363

6464
local ebuild_atom="=${pkg}-${version}"
6565

@@ -78,7 +78,7 @@ ebuild_aci_create() {
7878
ebuild_aci_write_manifest \
7979
"${aciroot}/manifest" \
8080
"${aci_name}" \
81-
"${version}_coreos.${extra_version}"
81+
"${version}_flatcar.${extra_version}"
8282

8383
local pkg_files_in_rootfs=( "${pkg_files[@]/#/rootfs}" )
8484

build_library/generate_grub_hashes.py

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@
1919
corelen = bytearray(diskboot)[508] | bytearray(diskboot)[509] << 8
2020
f.seek(bootoffset+512)
2121
core = f.read(corelen * 512)
22-
hashes = {"4": {"binaryvalues": [{"values": [{"value": hashlib.sha1(boot).hexdigest(), "description": "CoreOS Grub boot.img %s" % version}]}]},
23-
"8": {"binaryvalues" : [{"values": [{"value": hashlib.sha1(diskboot).hexdigest(), "description": "CoreOS Grub diskboot.img %s" % version}]}]},
24-
"9": {"binaryvalues": [{"values": [{"value": hashlib.sha1(core).hexdigest(), "description": "CoreOS Grub core.img %s" % version}]}]}}
22+
hashes = {"4": {"binaryvalues": [{"values": [{"value": hashlib.sha1(boot).hexdigest(), "description": "Flatcar Grub boot.img %s" % version}]}]},
23+
"8": {"binaryvalues" : [{"values": [{"value": hashlib.sha1(diskboot).hexdigest(), "description": "Flatcar Grub diskboot.img %s" % version}]}]},
24+
"9": {"binaryvalues": [{"values": [{"value": hashlib.sha1(core).hexdigest(), "description": "Flatcar Grub core.img %s" % version}]}]}}
2525
with open(os.path.join(outputdir, "grub_loader.config"), "w") as f:
2626
f.write(json.dumps(hashes, sort_keys=True))
2727

@@ -33,25 +33,25 @@
3333
with open(os.path.join(folder, filename), "rb") as f:
3434
mod = f.read()
3535
value = hashlib.sha1(mod).hexdigest()
36-
description = "CoreOS Grub %s %s" % (filename, version)
36+
description = "Flatcar Grub %s %s" % (filename, version)
3737
hashvalues.append({"value": value, "description": description})
3838

3939
with open(os.path.join(outputdir, "grub_modules.config"), "w") as f:
4040
f.write(json.dumps({"9": {"binaryvalues": [{"prefix": "grub_module", "values": hashvalues}]}}))
4141

4242
with open(os.path.join(outputdir, "kernel_cmdline.config"), "w") as f:
43-
f.write(json.dumps({"8": {"asciivalues": [{"prefix": "grub_kernel_cmdline", "values": [{"value": "rootflags=rw mount.usrflags=ro BOOT_IMAGE=/coreos/vmlinuz-[ab] mount.usr=PARTUUID=\S{36} rootflags=rw mount.usrflags=ro consoleblank=0 root=LABEL=ROOT (console=\S+)? (coreos.autologin=\S+)? verity.usrhash=\\S{64}", "description": "CoreOS kernel command line %s" % version}]}]}}))
44-
45-
commands = [{"value": '\[.*\]', "description": "CoreOS Grub configuration %s" % version},
46-
{"value": 'gptprio.next -d usr -u usr_uuid', "description": "CoreOS Grub configuration %s" % version},
47-
{"value": 'insmod all_video', "description": "CoreOS Grub configuration %s" % version},
48-
{"value": 'linux /coreos/vmlinuz-[ab] rootflags=rw mount.usrflags=ro consoleblank=0 root=LABEL=ROOT (console=\S+)? (coreos.autologin=\S+)?', "description": "CoreOS Grub configuration %s" % version},
49-
{"value": 'menuentry CoreOS \S+ --id=coreos\S* {', "description": "CoreOS Grub configuration %s" % version},
50-
{"value": 'search --no-floppy --set randomize_disk_guid --disk-uuid 00000000-0000-0000-0000-000000000001', "description": "CoreOS Grub configuration %s" % version},
51-
{"value": 'search --no-floppy --set oem --part-label OEM --hint hd0,gpt1', "description": "CoreOS Grub configuration %s" % version},
52-
{"value": 'set .+', "description": "CoreOS Grub configuration %s" % version},
53-
{"value": 'setparams CoreOS default', "description": "CoreOS Grub configuration %s" % version},
54-
{"value": 'source (hd0,gpt6)/grub.cfg', "description": "CoreOS Grub configuration %s" % version}]
43+
f.write(json.dumps({"8": {"asciivalues": [{"prefix": "grub_kernel_cmdline", "values": [{"value": "rootflags=rw mount.usrflags=ro BOOT_IMAGE=/flatcar/vmlinuz-[ab] mount.usr=PARTUUID=\S{36} rootflags=rw mount.usrflags=ro consoleblank=0 root=LABEL=ROOT (console=\S+)? (flatcar.autologin=\S+)? verity.usrhash=\\S{64}", "description": "Flatcar kernel command line %s" % version}]}]}}))
44+
45+
commands = [{"value": '\[.*\]', "description": "Flatcar Grub configuration %s" % version},
46+
{"value": 'gptprio.next -d usr -u usr_uuid', "description": "Flatcar Grub configuration %s" % version},
47+
{"value": 'insmod all_video', "description": "Flatcar Grub configuration %s" % version},
48+
{"value": 'linux /flatcar/vmlinuz-[ab] rootflags=rw mount.usrflags=ro consoleblank=0 root=LABEL=ROOT (console=\S+)? (flatcar.autologin=\S+)?', "description": "Flatcar Grub configuration %s" % version},
49+
{"value": 'menuentry Flatcar \S+ --id=flatcar\S* {', "description": "Flatcar Grub configuration %s" % version},
50+
{"value": 'search --no-floppy --set randomize_disk_guid --disk-uuid 00000000-0000-0000-0000-000000000001', "description": "Flatcar Grub configuration %s" % version},
51+
{"value": 'search --no-floppy --set oem --part-label OEM --hint hd0,gpt1', "description": "Flatcar Grub configuration %s" % version},
52+
{"value": 'set .+', "description": "Flatcar Grub configuration %s" % version},
53+
{"value": 'setparams Flatcar default', "description": "Flatcar Grub configuration %s" % version},
54+
{"value": 'source (hd0,gpt6)/grub.cfg', "description": "Flatcar Grub configuration %s" % version}]
5555

5656
with open(os.path.join(outputdir, "grub_commands.config"), "w") as f:
5757
f.write(json.dumps({"8": {"asciivalues": [{"prefix": "grub_cmd", "values": commands}]}}))

build_library/generate_kernel_hash.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@ version=sys.argv[2]
1010

1111
with open(path, "rb") as f:
1212
kernel = f.read()
13-
print json.dumps({"9": {"binaryvalues": [{"prefix": "grub_linux", "values": [{"value": hashlib.sha1(kernel).hexdigest(), "description": "coreos-%s" % version}]}]}})
13+
print json.dumps({"9": {"binaryvalues": [{"prefix": "grub_linux", "values": [{"value": hashlib.sha1(kernel).hexdigest(), "description": "flatcar-%s" % version}]}]}})

0 commit comments

Comments
 (0)