From 6e9833302d5486cdce4400a4e70cb06505429f7f Mon Sep 17 00:00:00 2001 From: Scott Schafer Date: Sat, 8 Aug 2026 10:57:20 -0600 Subject: [PATCH 1/8] refactor: Simplify nightly platform list generation --- x.py | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/x.py b/x.py index ea2feff..d039513 100755 --- a/x.py +++ b/x.py @@ -262,10 +262,7 @@ def update_nightly_ci(): versions = "" for release in debian_releases: - platforms = [] - for arch in release.arches: - platforms.append(f"{arch.qemu}") - platforms = ",".join(platforms) + platforms = ",".join(arch.qemu for arch in release.arches) tags = [f"nightly-{release.name}"] if release.name == latest_debian_release: @@ -286,10 +283,7 @@ def update_nightly_ci(): versions += f" {tag}-slim\n" for version in alpine_versions: - platforms = [] - for arch in alpine_arches: - platforms.append(f"{arch.qemu}") - platforms = ",".join(platforms) + platforms = ",".join(arch.qemu for arch in alpine_arches) tags = [f"nightly-alpine{version}"] if version == latest_alpine_version: From 27852a54c1fc1af5f651055e0c612bd4d800bd8a Mon Sep 17 00:00:00 2001 From: Scott Schafer Date: Sat, 8 Aug 2026 11:01:27 -0600 Subject: [PATCH 2/8] refactor: Simplify architecture list generation --- x.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/x.py b/x.py index d039513..9dccc67 100755 --- a/x.py +++ b/x.py @@ -346,11 +346,11 @@ def generate_stackbrew_library(): tags.append(version_tag) tags.append("latest") - arches = release.arches[:] + bashbrews = [a.bashbrew for a in release.arches] library += single_library( tags, - map(lambda a: a.bashbrew, arches), + bashbrews, os.path.join(stable.name, release.name)) tags = [] @@ -364,7 +364,7 @@ def generate_stackbrew_library(): library += single_library( tags, - map(lambda a: a.bashbrew, arches), + bashbrews, os.path.join(stable.name, release.name, "slim")) for version in alpine_versions: @@ -379,7 +379,7 @@ def generate_stackbrew_library(): library += single_library( tags, - map(lambda a: a.bashbrew, alpine_arches), + [a.bashbrew for a in alpine_arches], os.path.join(stable.name, f"alpine{version}")) print(library) From 5e595bc430388b58ad1587446a804873b0935eea Mon Sep 17 00:00:00 2001 From: Scott Schafer Date: Sat, 8 Aug 2026 10:57:20 -0600 Subject: [PATCH 3/8] refactor: Make DebianRelease a class --- x.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/x.py b/x.py index 9dccc67..fac33df 100755 --- a/x.py +++ b/x.py @@ -2,6 +2,7 @@ import argparse from collections import namedtuple +from typing import NamedTuple from urllib import request import os import subprocess @@ -48,7 +49,9 @@ def write_versions(rust_version, rustup_version): latest_debian_release = "trixie" -DebianRelease = namedtuple("DebianRelease", ["name", "arches"]) +class DebianRelease(NamedTuple): + name: str + arches: list[DebianArch] debian_releases = [ DebianRelease("bullseye", debian_lts_arches), From 936fb0c1d065e1053ca5c42306910c961ae0f53a Mon Sep 17 00:00:00 2001 From: Scott Schafer Date: Sat, 8 Aug 2026 11:10:04 -0600 Subject: [PATCH 4/8] chore: Add is_latest to DebianRelease --- x.py | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/x.py b/x.py index fac33df..2a3e8b7 100755 --- a/x.py +++ b/x.py @@ -47,16 +47,15 @@ def write_versions(rust_version, rustup_version): DebianArch("riscv64", "riscv64", "linux/riscv64", "riscv64gc-unknown-linux-gnu"), ] -latest_debian_release = "trixie" - class DebianRelease(NamedTuple): name: str arches: list[DebianArch] + is_latest: bool = False debian_releases = [ DebianRelease("bullseye", debian_lts_arches), DebianRelease("bookworm", debian_lts_arches + debian_non_lts_arches), - DebianRelease(latest_debian_release, debian_lts_arches + debian_non_lts_arches + debian_trixie_arches), + DebianRelease("trixie", debian_lts_arches + debian_non_lts_arches + debian_trixie_arches, is_latest=True), ] AlpineArch = namedtuple("AlpineArch", ["bashbrew", "apk", "qemu", "rust"]) @@ -228,7 +227,7 @@ def update_mirror_stable_ci(): for version_tag in version_tags(): tags.append(f"{version_tag}-{release.name}") tags.append(release.name) - if release.name == latest_debian_release: + if release.is_latest: for version_tag in version_tags(): tags.append(version_tag) tags.append("latest") @@ -242,7 +241,7 @@ def update_mirror_stable_ci(): for version_tag in version_tags(): tags.append(f"{version_tag}-slim-{release.name}") tags.append(f"slim-{release.name}") - if release.name == latest_debian_release: + if release.is_latest: for version_tag in version_tags(): tags.append(f"{version_tag}-slim") tags.append("slim") @@ -268,7 +267,7 @@ def update_nightly_ci(): platforms = ",".join(arch.qemu for arch in release.arches) tags = [f"nightly-{release.name}"] - if release.name == latest_debian_release: + if release.is_latest: tags.append("nightly") versions += f" - name: {release.name}\n" @@ -344,7 +343,7 @@ def generate_stackbrew_library(): for version_tag in version_tags(): tags.append(f"{version_tag}-{release.name}") tags.append(release.name) - if release.name == latest_debian_release: + if release.is_latest: for version_tag in version_tags(): tags.append(version_tag) tags.append("latest") @@ -360,7 +359,7 @@ def generate_stackbrew_library(): for version_tag in version_tags(): tags.append(f"{version_tag}-slim-{release.name}") tags.append(f"slim-{release.name}") - if release.name == latest_debian_release: + if release.is_latest: for version_tag in version_tags(): tags.append(f"{version_tag}-slim") tags.append("slim") From 2a46d3c4d03ec56a09632f79918c6efbda341142 Mon Sep 17 00:00:00 2001 From: Scott Schafer Date: Sat, 8 Aug 2026 10:11:18 -0600 Subject: [PATCH 5/8] refactor: Use a dict for Debian arches --- x.py | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/x.py b/x.py index 2a3e8b7..100a7a5 100755 --- a/x.py +++ b/x.py @@ -31,20 +31,30 @@ def write_versions(rust_version, rustup_version): DebianArch = namedtuple("DebianArch", ["bashbrew", "dpkg", "qemu", "rust"]) +debian_arches = { + "amd64": DebianArch("amd64", "amd64", "linux/amd64", "x86_64-unknown-linux-gnu"), + "arm32v7": DebianArch("arm32v7", "armhf", "linux/arm/v7", "armv7-unknown-linux-gnueabihf"), + "arm64v8": DebianArch("arm64v8", "arm64", "linux/arm64", "aarch64-unknown-linux-gnu"), + "i386": DebianArch("i386", "i386", "linux/386", "i686-unknown-linux-gnu"), + "ppc64le": DebianArch("ppc64le", "ppc64el", "linux/ppc64le", "powerpc64le-unknown-linux-gnu"), + "riscv64": DebianArch("riscv64", "riscv64", "linux/riscv64", "riscv64gc-unknown-linux-gnu"), + "s390x": DebianArch("s390x", "s390x", "linux/s390x", "s390x-unknown-linux-gnu"), +} + debian_lts_arches = [ - DebianArch("amd64", "amd64", "linux/amd64", "x86_64-unknown-linux-gnu"), - DebianArch("arm32v7", "armhf", "linux/arm/v7", "armv7-unknown-linux-gnueabihf"), - DebianArch("arm64v8", "arm64", "linux/arm64", "aarch64-unknown-linux-gnu"), - DebianArch("i386", "i386", "linux/386", "i686-unknown-linux-gnu"), + debian_arches["amd64"], + debian_arches["arm32v7"], + debian_arches["arm64v8"], + debian_arches["i386"], ] debian_non_lts_arches = [ - DebianArch("ppc64le", "ppc64el", "linux/ppc64le", "powerpc64le-unknown-linux-gnu"), - DebianArch("s390x", "s390x", "linux/s390x", "s390x-unknown-linux-gnu"), + debian_arches["ppc64le"], + debian_arches["s390x"], ] debian_trixie_arches = [ - DebianArch("riscv64", "riscv64", "linux/riscv64", "riscv64gc-unknown-linux-gnu"), + debian_arches["riscv64"], ] class DebianRelease(NamedTuple): From 24032bc3e28133d2c43e4a774454fd81426ced53 Mon Sep 17 00:00:00 2001 From: Scott Schafer Date: Sat, 8 Aug 2026 10:29:33 -0600 Subject: [PATCH 6/8] refactor: Make DebianRelease have a list of arch_names --- x.py | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/x.py b/x.py index 100a7a5..e7f4932 100755 --- a/x.py +++ b/x.py @@ -42,26 +42,30 @@ def write_versions(rust_version, rustup_version): } debian_lts_arches = [ - debian_arches["amd64"], - debian_arches["arm32v7"], - debian_arches["arm64v8"], - debian_arches["i386"], + "amd64", + "arm32v7", + "arm64v8", + "i386", ] debian_non_lts_arches = [ - debian_arches["ppc64le"], - debian_arches["s390x"], + "ppc64le", + "s390x", ] debian_trixie_arches = [ - debian_arches["riscv64"], + "riscv64", ] class DebianRelease(NamedTuple): name: str - arches: list[DebianArch] + arch_names: list[str] is_latest: bool = False - + + @property + def arches(self) -> list[DebianArch]: + return [debian_arches[name] for name in self.arch_names] + debian_releases = [ DebianRelease("bullseye", debian_lts_arches), DebianRelease("bookworm", debian_lts_arches + debian_non_lts_arches), From 50c3ddea4dc35aa1e4cf415f250b8fccdc689c65 Mon Sep 17 00:00:00 2001 From: Scott Schafer Date: Sat, 8 Aug 2026 11:16:19 -0600 Subject: [PATCH 7/8] refactor: Get rid of "lts" vs "non-lts" Debian arches --- x.py | 22 +++------------------- 1 file changed, 3 insertions(+), 19 deletions(-) diff --git a/x.py b/x.py index e7f4932..f256c57 100755 --- a/x.py +++ b/x.py @@ -41,22 +41,6 @@ def write_versions(rust_version, rustup_version): "s390x": DebianArch("s390x", "s390x", "linux/s390x", "s390x-unknown-linux-gnu"), } -debian_lts_arches = [ - "amd64", - "arm32v7", - "arm64v8", - "i386", -] - -debian_non_lts_arches = [ - "ppc64le", - "s390x", -] - -debian_trixie_arches = [ - "riscv64", -] - class DebianRelease(NamedTuple): name: str arch_names: list[str] @@ -67,9 +51,9 @@ def arches(self) -> list[DebianArch]: return [debian_arches[name] for name in self.arch_names] debian_releases = [ - DebianRelease("bullseye", debian_lts_arches), - DebianRelease("bookworm", debian_lts_arches + debian_non_lts_arches), - DebianRelease("trixie", debian_lts_arches + debian_non_lts_arches + debian_trixie_arches, is_latest=True), + DebianRelease("bullseye", ["amd64", "arm32v7", "arm64v8", "i386"]), + DebianRelease("bookworm", ["amd64", "arm32v7", "arm64v8", "i386", "ppc64le", "s390x"]), + DebianRelease("trixie", ["amd64", "arm32v7", "arm64v8", "i386", "ppc64le", "s390x", "riscv64"], is_latest=True), ] AlpineArch = namedtuple("AlpineArch", ["bashbrew", "apk", "qemu", "rust"]) From 5ba8fc7544e1880d0fc5f56e9f11081082057dc2 Mon Sep 17 00:00:00 2001 From: Scott Schafer Date: Sat, 8 Aug 2026 11:21:49 -0600 Subject: [PATCH 8/8] fix: Remove s390x from Debian Bookworm --- .github/workflows/nightly.yml | 4 ++-- nightly/bookworm/Dockerfile | 4 ---- nightly/bookworm/slim/Dockerfile | 4 ---- stable/bookworm/Dockerfile | 4 ---- stable/bookworm/slim/Dockerfile | 4 ---- x.py | 2 +- 6 files changed, 3 insertions(+), 19 deletions(-) diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index 84a3051..6016f7d 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -34,12 +34,12 @@ jobs: nightly-bullseye-slim - name: bookworm context: nightly/bookworm - platforms: linux/amd64,linux/arm/v7,linux/arm64,linux/386,linux/ppc64le,linux/s390x + platforms: linux/amd64,linux/arm/v7,linux/arm64,linux/386,linux/ppc64le tags: | nightly-bookworm - name: slim-bookworm context: nightly/bookworm/slim - platforms: linux/amd64,linux/arm/v7,linux/arm64,linux/386,linux/ppc64le,linux/s390x + platforms: linux/amd64,linux/arm/v7,linux/arm64,linux/386,linux/ppc64le tags: | nightly-bookworm-slim - name: trixie diff --git a/nightly/bookworm/Dockerfile b/nightly/bookworm/Dockerfile index 9b052a4..ce7540f 100644 --- a/nightly/bookworm/Dockerfile +++ b/nightly/bookworm/Dockerfile @@ -32,10 +32,6 @@ RUN set -eux; \ rustArch='powerpc64le-unknown-linux-gnu'; \ rustupSha256='4bfff85bd3967d988e14567aa9cc6ab0ea386f0ffeff0f9f14d23f0103bf1f97'; \ ;; \ - 's390x') \ - rustArch='s390x-unknown-linux-gnu'; \ - rustupSha256='66c2c132428b6b77803facb02cbdf33b89d20c00bd20da142be8cb651f2e7cd8'; \ - ;; \ *) \ echo >&2 "unsupported architecture: $arch"; \ exit 1; \ diff --git a/nightly/bookworm/slim/Dockerfile b/nightly/bookworm/slim/Dockerfile index fc08dc9..0269a67 100644 --- a/nightly/bookworm/slim/Dockerfile +++ b/nightly/bookworm/slim/Dockerfile @@ -40,10 +40,6 @@ RUN set -eux; \ rustArch='powerpc64le-unknown-linux-gnu'; \ rustupSha256='4bfff85bd3967d988e14567aa9cc6ab0ea386f0ffeff0f9f14d23f0103bf1f97'; \ ;; \ - 's390x') \ - rustArch='s390x-unknown-linux-gnu'; \ - rustupSha256='66c2c132428b6b77803facb02cbdf33b89d20c00bd20da142be8cb651f2e7cd8'; \ - ;; \ *) \ echo >&2 "unsupported architecture: $arch"; \ exit 1; \ diff --git a/stable/bookworm/Dockerfile b/stable/bookworm/Dockerfile index 7636493..3c806c3 100644 --- a/stable/bookworm/Dockerfile +++ b/stable/bookworm/Dockerfile @@ -31,10 +31,6 @@ RUN set -eux; \ rustArch='powerpc64le-unknown-linux-gnu'; \ rustupSha256='4bfff85bd3967d988e14567aa9cc6ab0ea386f0ffeff0f9f14d23f0103bf1f97'; \ ;; \ - 's390x') \ - rustArch='s390x-unknown-linux-gnu'; \ - rustupSha256='66c2c132428b6b77803facb02cbdf33b89d20c00bd20da142be8cb651f2e7cd8'; \ - ;; \ *) \ echo >&2 "unsupported architecture: $arch"; \ exit 1; \ diff --git a/stable/bookworm/slim/Dockerfile b/stable/bookworm/slim/Dockerfile index f962f7e..5e8111c 100644 --- a/stable/bookworm/slim/Dockerfile +++ b/stable/bookworm/slim/Dockerfile @@ -39,10 +39,6 @@ RUN set -eux; \ rustArch='powerpc64le-unknown-linux-gnu'; \ rustupSha256='4bfff85bd3967d988e14567aa9cc6ab0ea386f0ffeff0f9f14d23f0103bf1f97'; \ ;; \ - 's390x') \ - rustArch='s390x-unknown-linux-gnu'; \ - rustupSha256='66c2c132428b6b77803facb02cbdf33b89d20c00bd20da142be8cb651f2e7cd8'; \ - ;; \ *) \ echo >&2 "unsupported architecture: $arch"; \ exit 1; \ diff --git a/x.py b/x.py index f256c57..4202882 100755 --- a/x.py +++ b/x.py @@ -52,7 +52,7 @@ def arches(self) -> list[DebianArch]: debian_releases = [ DebianRelease("bullseye", ["amd64", "arm32v7", "arm64v8", "i386"]), - DebianRelease("bookworm", ["amd64", "arm32v7", "arm64v8", "i386", "ppc64le", "s390x"]), + DebianRelease("bookworm", ["amd64", "arm32v7", "arm64v8", "i386", "ppc64le"]), DebianRelease("trixie", ["amd64", "arm32v7", "arm64v8", "i386", "ppc64le", "s390x", "riscv64"], is_latest=True), ]