From 254c7b20607350df9c2a10fb89779c6201217749 Mon Sep 17 00:00:00 2001 From: Colin Walters Date: Wed, 27 Mar 2024 21:04:58 -0400 Subject: [PATCH] Add c10s It's not too early to start this. --- .github/workflows/build-image.yml | 4 ++-- Containerfile.centos-stream10 | 21 +++++++++++++++++++++ centos-stream-10-tier1.yaml | 4 ++++ centos-stream-10.yaml | 7 +++++++ 4 files changed, 34 insertions(+), 2 deletions(-) create mode 100644 Containerfile.centos-stream10 create mode 100644 centos-stream-10-tier1.yaml create mode 100644 centos-stream-10.yaml diff --git a/.github/workflows/build-image.yml b/.github/workflows/build-image.yml index 8a72c60c..ec7dc5ac 100644 --- a/.github/workflows/build-image.yml +++ b/.github/workflows/build-image.yml @@ -13,13 +13,13 @@ jobs: build-image: runs-on: ubuntu-latest - # Yes, this is a one-element matrix, but we may add c10s in the future soon strategy: matrix: - os: [centos] include: - os: centos version: stream9 + - os: centos + version: stream10 steps: - name: Update podman diff --git a/Containerfile.centos-stream10 b/Containerfile.centos-stream10 new file mode 100644 index 00000000..e80a854d --- /dev/null +++ b/Containerfile.centos-stream10 @@ -0,0 +1,21 @@ +# See Containerfile.centos-stream9 for more information. + +FROM quay.io/centos/centos:stream10-development as repos + +FROM quay.io/centos-bootc/bootc-image-builder:latest as builder +ARG MANIFEST=centos-stream-10-tier1.yaml +RUN --mount=type=bind,rw=true,src=.,dst=/buildcontext,bind-propagation=shared rm -vf /buildcontext/*.repo +# XXX: we should just make sure our in-tree c9s repo points to the c9s paths and doesn't require vars to avoid these steps entirely +COPY --from=repos /etc/dnf/vars /etc/dnf/vars +COPY --from=repos /etc/yum.repos.d/centos.repo c10s.repo +COPY --from=repos /etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial /etc/pki/rpm-gpg +# rpm-ostree doesn't honor /etc/dnf/vars right now +RUN for n in $(ls /etc/dnf/vars); do v=$(cat /etc/dnf/vars/$n); sed -ie s,\$${n},$v, c10s.repo; done +RUN --mount=type=cache,target=/workdir --mount=type=bind,rw=true,src=.,dst=/buildcontext,bind-propagation=shared \ + cp -a /buildcontext /src && rm -vf /src/*.repo && cp -a c10s.repo /src && ls -al /src &&\ + rpm-ostree compose image --cachedir=/workdir --format=ociarchive --initialize /src/${MANIFEST} /buildcontext/out.ociarchive + +FROM oci-archive:./out.ociarchive +# Need to reference builder here to force ordering. But since we have to run +# something anyway, we might as well cleanup after ourselves. +RUN --mount=type=bind,from=builder,src=.,target=/var/tmp --mount=type=bind,rw=true,src=.,dst=/buildcontext,bind-propagation=shared rm /buildcontext/out.ociarchive diff --git a/centos-stream-10-tier1.yaml b/centos-stream-10-tier1.yaml new file mode 100644 index 00000000..f0ce3f34 --- /dev/null +++ b/centos-stream-10-tier1.yaml @@ -0,0 +1,4 @@ +include: + - centos-stream-10.yaml + - tier-1/kernel.yaml + - tier-1/manifest.yaml diff --git a/centos-stream-10.yaml b/centos-stream-10.yaml new file mode 100644 index 00000000..124acb86 --- /dev/null +++ b/centos-stream-10.yaml @@ -0,0 +1,7 @@ +releasever: stream10 +variables: + distro: "stream10" + +repos: + - baseos + - appstream