Skip to content

Commit

Permalink
wip: Support OEM systemd-sysext images and Flatcar extensions
Browse files Browse the repository at this point in the history
TODO: changelog
  • Loading branch information
pothos committed Sep 4, 2023
1 parent 3a490b1 commit fd62ad5
Show file tree
Hide file tree
Showing 9 changed files with 35 additions and 4 deletions.
7 changes: 6 additions & 1 deletion ci-automation/vendor-testing/qemu_update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -87,11 +87,16 @@ query_kola_tests() {
run_kola_tests() {
local instance_type="${1}"; shift;
local instance_tapfile="${1}"; shift
local tests=("cl.update.payload")
local image
if [ "${instance_type}" = "previous" ]; then
image="tmp/flatcar_production_image_previous.bin"
elif [ "${instance_type}" = "first_dual" ]; then
image="tmp/flatcar_production_image_first_dual.bin"
# Only run this test if the Azure dev payload exists on bincache because the fallback download needs it
if curl --head -o /dev/null -fsSL --retry-delay 1 --retry 60 --retry-connrefused --retry-max-time 60 --connect-timeout 20 "https://bincache.flatcar-linux.net/images/${CIA_ARCH}/${CIA_VERNUM}/flatcar_test_update-oem-azure.gz"; then
tests+=("cl.update.oem")
fi
else
echo "Wrong instance type ${instance_type}" >&2
exit 1
Expand All @@ -107,7 +112,7 @@ run_kola_tests() {
--torcx-manifest="${CIA_TORCX_MANIFEST}" \
--update-payload="${QEMU_UPDATE_PAYLOAD}" \
${QEMU_KOLA_SKIP_MANGLE:+--qemu-skip-mangle} \
cl.update.payload
"${tests[@]}"
}

run_kola_tests_on_instances "previous" "${CIA_TAPFILE}" "${CIA_FIRST_RUN}" first_dual -- cl.update.payload -- "${@}"
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ CROS_WORKON_REPO="https://github.com"
if [[ "${PV}" == 9999 ]]; then
KEYWORDS="~amd64 ~arm ~arm64 ~x86"
else
CROS_WORKON_COMMIT="e502aab19632fda2a43938d02ff1104043173702" # flatcar-master
CROS_WORKON_COMMIT="242ad2e85b30896d580dd51f91ac6f6c6f9e4af0" # TODO: flatcar-master
KEYWORDS="amd64 arm arm64 x86"
fi

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
/etc/systemd/system/nvidia.service
/oem/bin/setup-nvidia
/oem/bin/install-nvidia
/oem/units/nvidia.service
/etc/systemd/system/oem-cloudinit.service
/etc/systemd/system/multi-user.target.wants/oem-cloudinit.service
/etc/systemd/system/waagent.service
/etc/systemd/system/multi-user.target.wants/waagent.service
/oem/waagent.conf
/oem/python/
/oem/bin/
/oem/units/
/oem/base/
Empty file.
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,14 @@ src_install() {
insinto '/etc/bash/bashrc.d'
doins "${FILESDIR}/99-flatcar-bcc"

insinto '/usr/share/flatcar'
# The "oems" folder should contain a file "$OEMID" for each expected OEM sysext and
# either be empty or contain a newline-separated list of files to delete during the
# migration (done from the initrd). The existance of the file will help old clients
# to do the fallback download of the sysext payload in the postinstall hook.
# The paths should use /oem instead of /usr/share/oem/ to avoid symlink resolution.
doins -r "${FILESDIR}"/oems

dotmpfiles "${T}/home-core-bash-symlinks.conf"
# Ideally we would be calling systemd-tmpfiles to create the
# symlinks, but at this point systemd may not have any info about
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ CROS_WORKON_REPO="https://github.com"
if [[ "${PV}" == 9999 ]]; then
KEYWORDS="~amd64 ~arm ~arm64 ~x86"
else
CROS_WORKON_COMMIT="c6f566d47d8949632f7f43871eb8d5c625af3209" # flatcar-master
CROS_WORKON_COMMIT="ea6a398574de91f8bf05d1da624ed7d3ff339645" # TODO: flatcar-master
KEYWORDS="amd64 arm64"
fi

Expand Down Expand Up @@ -102,6 +102,11 @@ src_install() {
insinto /usr/share/dbus-1/system.d
doins com.coreos.update1.conf

insinto /usr/share/update_engine
doins src/update_engine/update_metadata.proto
exeinto /usr/share/update_engine
doexe decode_payload

# Install rule to remove old UpdateEngine.conf from /etc
dotmpfiles "${FILESDIR}"/update-engine.conf
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ CROS_WORKON_REPO="https://github.com"
if [[ "${PV}" == 9999 ]]; then
KEYWORDS="~amd64 ~arm ~arm64 ~x86"
else
CROS_WORKON_COMMIT="cc0fdec0cc6c5692acac95a928984ea8a5eb8f08" # flatcar-master
CROS_WORKON_COMMIT="9392dd21a832bfecfa015165845bf2b2075c46b3" # TODO: flatcar-master
KEYWORDS="amd64 arm arm64 x86"
fi

Expand Down

0 comments on commit fd62ad5

Please sign in to comment.