Skip to content

flatcar: add sysupdate sysext target#1081

Open
kartikjoshi21 wants to merge 1 commit into
project-dalec:mainfrom
kartikjoshi21:kartikjoshi21/flatcar-sysupdate
Open

flatcar: add sysupdate sysext target#1081
kartikjoshi21 wants to merge 1 commit into
project-dalec:mainfrom
kartikjoshi21:kartikjoshi21/flatcar-sysupdate

Conversation

@kartikjoshi21

Copy link
Copy Markdown
Member

What this PR does / why we need it:

Adds flatcar/testing/sysext/sysupdate for publishing Flatcar system extensions through systemd-sysupdate.

The new target emits:

  • <name>-v<version>-<revision>-<arch>.raw
  • SHA256SUMS.<name>

The existing flatcar/testing/sysext target remains unchanged and continues to emit <name>.raw for 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 test
  • make check-generated
  • CI integration test builds the new target and verifies the checksum matches the generated image

Signed-off-by: Kartik Joshi <karikjoshi21@gmail.com>
Copilot AI review requested due to automatic review settings June 4, 2026 10:54

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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/sysupdate target 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:-}"
Comment on lines +104 to +107
if [[ -n "${SHA256SUMS_NAME}" ]]; then
cd /output
sha256sum "${IMAGE_NAME}.raw" > "SHA256SUMS.${SHA256SUMS_NAME}"
fi
Comment on lines +36 to +42
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
@cpuguy83

cpuguy83 commented Jun 4, 2026

Copy link
Copy Markdown
Collaborator

Not familiar with tthis -- is there a reason to not do this for the normal sysext endpoint?

@kartikjoshi21

Copy link
Copy Markdown
Member Author

Not familiar with tthis -- is there a reason to not do this for the normal sysext endpoint?

@cpuguy83 Thankyou for the review, This new flatcar/testing/sysext/sysupdate target is mainly for the update/distribution workflow, not for creating a basic sysext.
I will update PR description if this is confusing.

you can check this out https://flatcar.github.io/sysext-bakery/#extension-auto-updates

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants