From 2f865ae344a80543e7c8addb74ddc1eaf66c1e2a Mon Sep 17 00:00:00 2001 From: Dusty Mabe Date: Thu, 29 Jan 2026 11:25:32 -0500 Subject: [PATCH 1/4] common: drop remove-from-packages for backgrounds remove-from-packages doesn't work in the now build via container tools workflow so we'd need to convert any of these into a postprocess. I checked and there are no files in /usr/share/backgrounds at all any longer so let's just drop this entry in our manifests rather than convert it to a postprocess. --- common.yaml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/common.yaml b/common.yaml index f0fb2c57..9a569cf5 100644 --- a/common.yaml +++ b/common.yaml @@ -359,7 +359,3 @@ packages-aarch64: packages-s390x: # Required genprotimg for IBM Secure Execution - s390utils-base - -remove-from-packages: - - - filesystem - - "/usr/share/backgrounds" From a634621c9a425f44b5f4c602dd482cea8de44c03 Mon Sep 17 00:00:00 2001 From: Dusty Mabe Date: Wed, 28 Jan 2026 12:50:26 -0500 Subject: [PATCH 2/4] use versionary from fedora-coreos-config repo Support for RHCOS versioning was added in [1] so we cand drop this fork from our RHCOS repo now. [1] https://github.com/coreos/fedora-coreos-config/commit/43b8d41bdf360406bbea711a42f7bf624bc4476a --- versionary | 113 +---------------------------------------------------- 1 file changed, 1 insertion(+), 112 deletions(-) mode change 100755 => 120000 versionary diff --git a/versionary b/versionary deleted file mode 100755 index 9c74b6a6..00000000 --- a/versionary +++ /dev/null @@ -1,112 +0,0 @@ -#!/usr/bin/python3 -u - -''' - Implements versioning for RHEL CoreOS and CentOS Stream CoreOS. Initially based - on the Fedora CoreOS versionary script. -''' - -import argparse -import json -import os -import re -import subprocess -import sys -import time -import yaml - -from datetime import datetime - - -def main(): - args = parse_args() - if args.workdir is not None: - os.chdir(args.workdir) - assert os.path.isdir('builds'), 'Missing builds/ dir' - - manifest = get_flattened_manifest() - - # we'll want to move the source of truth for this somewhere else in the future but for now... - prefix = manifest['automatic-version-prefix'] - placeholder = '' - assert placeholder in prefix - dt = datetime.now() - xyz = prefix.replace(placeholder, dt.strftime('%Y%m%d')) - x, y, z = map(int, xyz.split('.')) - n = get_next_iteration(x, y, z, args.last_version) - dev = '.dev' if args.dev else '' - - print(f'{xyz}-{n}{dev}') - - -def parse_args(): - parser = argparse.ArgumentParser() - parser.add_argument('--workdir', help="path to cosa workdir") - parser.add_argument('--last-version', help="override last version (for testing)") - parser.add_argument('--dev', action='store_true', help="generate a developer version") - return parser.parse_args() - - -def get_next_iteration(x, y, z, last_version_override): - try: - with open('builds/builds.json') as f: - builds = json.load(f) - except FileNotFoundError: - builds = {'builds': []} - - if last_version_override is not None: - last_version = last_version_override - else: - if len(builds['builds']) == 0: - eprint("n: 0 (no previous builds)") - return 0 - - last_version = builds['builds'][0]['id'] - - last_version_tuple = parse_version(last_version) - - if not last_version_tuple: - eprint(f"n: 0 (previous version {last_version} does not match scheme)") - return 0 - - if (x, y, z) != last_version_tuple[:3]: - eprint(f"n: 0 (previous version {last_version} x.y.z does not match)") - return 0 - - n = last_version_tuple[3] + 1 - eprint(f"n: {n} (incremented from previous version {last_version})") - return n - - -def get_flattened_manifest(): - try: - with open('src/config.json') as f: - j = json.load(f) - variant = j["coreos-assembler.config-variant"] - manifest = f'src/config/manifest-{variant}.yaml' - except FileNotFoundError: - manifest = 'src/config/manifest.yaml' - return yaml.safe_load( - subprocess.check_output(['rpm-ostree', 'compose', 'tree', - '--print-only', manifest])) - - -def parse_version(version): - # since RHCOS/SCOS follows semver, we could actually instead use a library - # for this, but we do actually only expect a particular subset in our case - m = re.match(r'^([0-9]+)\.([0-9]+)\.([0-9]{8})-([0-9]+)(\.dev)?$', version) - if m is None: - return None - # sanity-check date - try: - time.strptime(m.group(3), '%Y%m%d') - except ValueError: - return None - return tuple(map(int, m.groups()[:4])) - - -def eprint(*args): - print(*args, file=sys.stderr) - - -if __name__ == "__main__": - sys.exit(main()) diff --git a/versionary b/versionary new file mode 120000 index 00000000..ac7a9568 --- /dev/null +++ b/versionary @@ -0,0 +1 @@ +fedora-coreos-config/versionary \ No newline at end of file From efc866863bf2d84e7084fead2ecb656803a02912 Mon Sep 17 00:00:00 2001 From: Dusty Mabe Date: Thu, 22 Jan 2026 11:57:42 -0500 Subject: [PATCH 3/4] build-args*: prep for building via container tools In this workflow more information is coming from the build-args. These changes take advantage of two upstream changes: - https://github.com/coreos/fedora-coreos-config/commit/5c20a9e4c3e5604935c7a0ed113435a9b996203a - https://github.com/coreos/fedora-coreos-config/commit/e38ae109f9600f8b93efe25f2019d7f6775c2804 --- build-args-c10s.conf | 9 +++++++-- build-args-c9s.conf | 9 +++++++-- build-args-rhel-10.1.conf | 9 +++++++-- build-args-rhel-9.8.conf | 9 +++++++-- 4 files changed, 28 insertions(+), 8 deletions(-) diff --git a/build-args-c10s.conf b/build-args-c10s.conf index f09457cc..39705a87 100644 --- a/build-args-c10s.conf +++ b/build-args-c10s.conf @@ -1,10 +1,15 @@ # Variant-specific build arguments. # Pass to buildah/podman using `--build-arg-file`. +ID=centos NAME=scos -VERSION="10.0" +STREAM=c10s +DESCRIPTION=CentOS Stream CoreOS 10 +VERSION=10.0 +MUTATE_OS_RELEASE=10 BUILDER_IMG=quay.io/centos-bootc/centos-bootc:stream10 MANIFEST=manifest-c10s.yaml +IMAGE_CONFIG=image-c10s.yaml +BUILD_ARGS=build-args-c10s.conf # XXX: see inject_passwd_group() in build-rootfs PASSWD_GROUP_DIR=. -STREAM=c10s diff --git a/build-args-c9s.conf b/build-args-c9s.conf index 69c11bfa..3bc703f6 100644 --- a/build-args-c9s.conf +++ b/build-args-c9s.conf @@ -1,10 +1,15 @@ # Variant-specific build arguments. # Pass to buildah/podman using `--build-arg-file`. +ID=centos NAME=scos -VERSION="9.0" +STREAM=c9s +DESCRIPTION=CentOS Stream CoreOS 9 +VERSION=9.0 +MUTATE_OS_RELEASE=9 BUILDER_IMG=quay.io/centos-bootc/centos-bootc:stream9 MANIFEST=manifest-c9s.yaml +IMAGE_CONFIG=image-c9s.yaml +BUILD_ARGS=build-args-c9s.conf # XXX: see inject_passwd_group() in build-rootfs PASSWD_GROUP_DIR=. -STREAM=c9s diff --git a/build-args-rhel-10.1.conf b/build-args-rhel-10.1.conf index 69884e8d..38463d76 100644 --- a/build-args-rhel-10.1.conf +++ b/build-args-rhel-10.1.conf @@ -1,10 +1,15 @@ # Variant-specific build arguments. # Pass to buildah/podman using `--build-arg-file`. +ID=rhel NAME=rhcos -VERSION="10.1" +STREAM=rhel-10.1 +DESCRIPTION=RHEL CoreOS 10.1 +VERSION=10.1 +MUTATE_OS_RELEASE=10.1 BUILDER_IMG=registry.redhat.io/rhel10/rhel-bootc:10.1 MANIFEST=manifest-rhel-10.1.yaml +IMAGE_CONFIG=image-rhel-10.1.yaml +BUILD_ARGS=build-args-rhel-10.1.conf # XXX: see inject_passwd_group() in build-rootfs PASSWD_GROUP_DIR=. -STREAM=rhel-10.1 diff --git a/build-args-rhel-9.8.conf b/build-args-rhel-9.8.conf index c9982523..73882b8d 100644 --- a/build-args-rhel-9.8.conf +++ b/build-args-rhel-9.8.conf @@ -1,10 +1,15 @@ # Variant-specific build arguments. # Pass to buildah/podman using `--build-arg-file`. +ID=rhel NAME=rhcos -VERSION="9.8" +STREAM=rhel-9.8 +DESCRIPTION=RHEL CoreOS 9.8 +VERSION=9.8 +MUTATE_OS_RELEASE=9.8 BUILDER_IMG=registry.stage.redhat.io/rhel9/rhel-bootc:9.8 MANIFEST=manifest-rhel-9.8.yaml +IMAGE_CONFIG=image-rhel-9.8.yaml +BUILD_ARGS=build-args-rhel-9.8.conf # XXX: see inject_passwd_group() in build-rootfs PASSWD_GROUP_DIR=. -STREAM=rhel-9.8 From edf4c1a71388e04be7923edd30a7775b76b2ff45 Mon Sep 17 00:00:00 2001 From: Dusty Mabe Date: Fri, 30 Jan 2026 16:33:30 -0500 Subject: [PATCH 4/4] manifest-c9s: switch to building via container tools This is part of https://issues.redhat.com/browse/COS-3312 and will switch the build of c9s over to the new way of building our base container images. --- manifest-c9s.yaml | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/manifest-c9s.yaml b/manifest-c9s.yaml index a9e553a3..f8524890 100644 --- a/manifest-c9s.yaml +++ b/manifest-c9s.yaml @@ -1,13 +1,8 @@ # Manifest for CentOS Stream CoreOS 9 metadata: - license: MIT - name: scos - summary: CentOS Stream CoreOS 9 - -variables: - id: "centos" - osversion: "centos-9" + # tell `cosa build` to default to buildah path + build_with_buildah: true # Include manifests common to all RHEL and CentOS Stream versions include: @@ -18,12 +13,6 @@ repos: - c9s-appstream - c9s-extras-common -automatic-version-prefix: "9.0." -# This ensures we're semver-compatible which OpenShift wants -automatic-version-suffix: "-" - -mutate-os-release: "9" - packages: - centos-stream-release - centos-release-cloud-common