flatcar: add sysupdate sysext target#1081
Conversation
Signed-off-by: Kartik Joshi <karikjoshi21@gmail.com>
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Adds a new Flatcar build target to generate versioned sysext artifacts suitable for systemd-sysupdate, including a checksum file, and updates tests/docs accordingly.
Changes:
- Register new
flatcar/testing/sysext/sysupdatetarget using a specialized Flatcar sysext env configuration. - Extend sysext build script to support versioned image naming and optional
SHA256SUMS.<name>generation. - Add/adjust tests to validate env defaults and produced checksum output; update docs target list.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| website/docs/examples/targets.md | Documents the new Flatcar sysupdate sysext target. |
| test/target_flatcar_sysupdate_test.go | Adds integration coverage for the sysupdate sysext output and checksum file. |
| targets/linux/sysext_env_test.go | Updates env parsing expectations for new sysext build args. |
| targets/linux/flatcar/flatcar_test.go | Adds unit tests for sysupdate-specific env defaults and default revision behavior. |
| targets/linux/flatcar/flatcar.go | Introduces sysupdateConfig and registers the new build target. |
| targets/linux/build_sysext.sh | Implements versioned naming + SHA256SUMS generation in the sysext builder. |
| OS_VERSION_ID="${DALEC_SYSEXT_OS_VERSION_ID:-}" | ||
| SYSEXT_LEVEL="${DALEC_SYSEXT_SYSEXT_LEVEL:-}" | ||
| IMAGE_VERSION="${DALEC_SYSEXT_IMAGE_VERSION:-}" | ||
| SHA256SUMS_NAME="${DALEC_SYSEXT_SHA256SUMS_NAME:-}" |
| if [[ -n "${SHA256SUMS_NAME}" ]]; then | ||
| cd /output | ||
| sha256sum "${IMAGE_NAME}.raw" > "SHA256SUMS.${SHA256SUMS_NAME}" | ||
| fi |
| if [[ -n "${DALEC_SYSEXT_IMAGE_NAME:-}" ]]; then | ||
| IMAGE_NAME="${DALEC_SYSEXT_IMAGE_NAME}" | ||
| elif [[ -n "${IMAGE_VERSION}" ]]; then | ||
| IMAGE_NAME="${NAME}-${IMAGE_VERSION}-${ARCH}" | ||
| else | ||
| IMAGE_NAME="${IMAGE_BASENAME}" | ||
| fi |
|
Not familiar with tthis -- is there a reason to not do this for the normal sysext endpoint? |
@cpuguy83 Thankyou for the review, This new you can check this out https://flatcar.github.io/sysext-bakery/#extension-auto-updates |
What this PR does / why we need it:
Adds
flatcar/testing/sysext/sysupdatefor publishing Flatcar system extensions throughsystemd-sysupdate.The new target emits:
<name>-v<version>-<revision>-<arch>.rawSHA256SUMS.<name>The existing
flatcar/testing/sysexttarget remains unchanged and continues to emit<name>.rawfor direct installation under/etc/extensions.Which issue(s) this PR fixes:
Refs #969
Special notes for your reviewer:
This follows the release artifact shape used by Flatcar's sysext bakery without adding the multi-gigabyte Flatcar OS SDK as a default worker. A complete sysupdate configuration is publisher-specific because it must reference the hosting URL.
Validation:
go run ./cmd/lint ./...make testmake check-generated