diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml index fc4485d7..09a32ece 100644 --- a/.github/workflows/unit-tests.yml +++ b/.github/workflows/unit-tests.yml @@ -6,6 +6,7 @@ on: - '.github/scripts/**' - '.github/workflows/unit-tests.yml' - 'files/**' + - 'elements/**' - 'tests/unit/**' - 'Justfile' push: @@ -14,6 +15,7 @@ on: - '.github/scripts/**' - '.github/workflows/unit-tests.yml' - 'files/**' + - 'elements/**' - 'tests/unit/**' - 'Justfile' diff --git a/elements/bluefin-server/os-stack.bst b/elements/bluefin-server/os-stack.bst index 074634d0..77a6f53b 100644 --- a/elements/bluefin-server/os-stack.bst +++ b/elements/bluefin-server/os-stack.bst @@ -34,6 +34,16 @@ depends: - flatcar/flatcar-zfs.bst - bluefin-server/linux-firmware-split.bst + # Container Runtime via Flatcar sysexts + # Upstream Flatcar publishes podman, containerd, and docker as systemd-sysext + # images (projectbluefin/server#127). This replaces the FSDK podman component + # below with these upstream sysexts, honoring hard rule 4 (no container + # runtime in the base DDI). Each element pins the .raw by sha256 and stages it + # under /usr/lib/sysexts so systemd-sysext attaches it on a booted image. + - flatcar/flatcar-podman.bst + - flatcar/containerd-flatcar.bst + - flatcar/docker-flatcar.bst + # Filesystem resizing support for growing root/var on first boot - freedesktop-sdk.bst:components/xfsprogs.bst @@ -64,9 +74,6 @@ depends: # Reboot Coordination for Kured - bluefin-server/os-kured-hook.bst - # Container Runtime support - - freedesktop-sdk.bst:components/podman.bst - # System Management Justfile - bluefin-server/os-justfile.bst diff --git a/elements/flatcar/containerd-flatcar.bst b/elements/flatcar/containerd-flatcar.bst new file mode 100644 index 00000000..2af2265f --- /dev/null +++ b/elements/flatcar/containerd-flatcar.bst @@ -0,0 +1,37 @@ +kind: manual +description: | + Import the Flatcar containerd system extension (sysext). + Provides the containerd runtime and CLI, published by Flatcar as a + rootfs-included sysext (projectbluefin/server#127). Only the raw squashfs is + staged under /usr/lib/sysexts so systemd-sysext attaches it at runtime; the + runtime is not extracted into the base DDI (hard rule 4). + +(@): + - include/arch.yml + - include/flatcar.yml + +build-depends: + - base/base-stack.bst + +variables: + # Disable the default FSDK strip-commands: this element installs a prebuilt + # squashfs blob, and freedesktop-sdk-stripper is not in this sandbox. + strip-binaries: "" + +sources: + - kind: remote + # rootfs-included-sysexts/ — podman ships flat instead. All six upstream + # permutations were checked — the other three 404. + url: flatcar:stable/%{flatcar-board}/%{flatcar-version}/rootfs-included-sysexts/containerd-flatcar.raw + ref: 78e38344ac490004b9fa4c7da38bbfcffc393146aa990379aff7b5c09589f809 + +config: + install-commands: + - | + set -euo pipefail + + # Stage the raw squashfs sysext under /usr/lib/sysexts so systemd-sysext + # attaches it at runtime on a booted image. The runtime is not extracted + # into the base DDI (hard rule 4). + mkdir -p "%{install-root}/usr/lib/sysexts" + install -D -m 0644 containerd-flatcar.raw "%{install-root}/usr/lib/sysexts/containerd.raw" diff --git a/elements/flatcar/docker-flatcar.bst b/elements/flatcar/docker-flatcar.bst new file mode 100644 index 00000000..e17b5eb9 --- /dev/null +++ b/elements/flatcar/docker-flatcar.bst @@ -0,0 +1,37 @@ +kind: manual +description: | + Import the Flatcar docker system extension (sysext). + Provides the Docker CLI and containerd-based runtime, published by Flatcar as + a rootfs-included sysext (projectbluefin/server#127). Only the raw squashfs is + staged under /usr/lib/sysexts so systemd-sysext attaches it at runtime; the + runtime is not extracted into the base DDI (hard rule 4). + +(@): + - include/arch.yml + - include/flatcar.yml + +build-depends: + - base/base-stack.bst + +variables: + # Disable the default FSDK strip-commands: this element installs a prebuilt + # squashfs blob, and freedesktop-sdk-stripper is not in this sandbox. + strip-binaries: "" + +sources: + - kind: remote + # rootfs-included-sysexts/ — podman ships flat instead. All six upstream + # permutations were checked — the other three 404. + url: flatcar:stable/%{flatcar-board}/%{flatcar-version}/rootfs-included-sysexts/docker-flatcar.raw + ref: 5105dfe9cfb1357fce76e0297c0285e169b1eeb47fa6edd83d5bafe697c72662 + +config: + install-commands: + - | + set -euo pipefail + + # Stage the raw squashfs sysext under /usr/lib/sysexts so systemd-sysext + # attaches it at runtime on a booted image. The runtime is not extracted + # into the base DDI (hard rule 4). + mkdir -p "%{install-root}/usr/lib/sysexts" + install -D -m 0644 docker-flatcar.raw "%{install-root}/usr/lib/sysexts/docker.raw" diff --git a/elements/flatcar/flatcar-podman.bst b/elements/flatcar/flatcar-podman.bst new file mode 100644 index 00000000..cd831a6b --- /dev/null +++ b/elements/flatcar/flatcar-podman.bst @@ -0,0 +1,38 @@ +kind: manual +description: | + Import the Flatcar podman system extension (sysext). + Provides the podman container CLI, replacing the FSDK podman component in the + OS payload (projectbluefin/server#127, hard rule 4: no container runtime in + the base DDI). Only the raw squashfs is staged under /usr/lib/sysexts so + systemd-sysext attaches it at runtime on a booted image; the runtime is not + extracted into the base DDI. + +(@): + - include/arch.yml + - include/flatcar.yml + +build-depends: + - base/base-stack.bst + +variables: + # Disable the default FSDK strip-commands: this element installs a prebuilt + # squashfs blob, and freedesktop-sdk-stripper is not in this sandbox. + strip-binaries: "" + +sources: + - kind: remote + # podman ships flat; containerd/docker ship under rootfs-included-sysexts/. + # All six upstream permutations were checked — the other three 404. + url: flatcar:stable/%{flatcar-board}/%{flatcar-version}/flatcar-podman.raw + ref: bc8c6777ab9dee286eb1f70a1605a880fcc5199246d87f9c92f00d880194d72b + +config: + install-commands: + - | + set -euo pipefail + + # Stage the raw squashfs sysext under /usr/lib/sysexts so systemd-sysext + # attaches it at runtime on a booted image. The runtime is not extracted + # into the base DDI (hard rule 4). + mkdir -p "%{install-root}/usr/lib/sysexts" + install -D -m 0644 flatcar-podman.raw "%{install-root}/usr/lib/sysexts/podman.raw"