Skip to content

Add Debian 13 (trixie) images#1841

Merged
loosebazooka merged 15 commits intoGoogleContainerTools:mainfrom
harryzcy:trixie
Aug 21, 2025
Merged

Add Debian 13 (trixie) images#1841
loosebazooka merged 15 commits intoGoogleContainerTools:mainfrom
harryzcy:trixie

Conversation

@harryzcy
Copy link
Contributor

@harryzcy harryzcy commented Aug 14, 2025

Attempt to fix #1826

This PR brings trixie-based images to static, base, and cc. Support for remaining ones are not yet added.

@google-cla
Copy link

google-cla bot commented Aug 14, 2025

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Summary of Changes

Hello @harryzcy, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request integrates Debian 13 (Trixie) into the project's build system, expanding the range of supported base images. It involves updating core distribution definitions, adding specific package lock and manifest files for Trixie, and adjusting build logic to accommodate new library naming conventions, ensuring that images can be built reliably for the latest Debian release.

Highlights

  • Debian 13 (Trixie) Support: This pull request introduces full support for Debian 13, codenamed 'Trixie', across the build system. This includes updating configuration files to recognize the new distribution and adding specific package definitions.
  • New Debian 13 Package Definitions: New lock and YAML files (trixie.lock.json and trixie.yaml) have been added. These files specify the exact versions, checksums, and download locations for core Debian 13 packages across multiple architectures (amd64, arm64, armhf, s390x, ppc64el), ensuring build reproducibility and consistency.
  • Conditional libssl Library Handling: A conditional logic has been introduced in base/base.bzl to handle the libssl3t64 library for Debian 13, differentiating it from the libssl3 used in Debian 12. This ensures compatibility with the updated library naming conventions in Trixie.
  • Build System Integration: Various build system scripts and definitions, including base/distro.bzl, checksums.bzl, knife, and private/repos/deb/deb.MODULE.bazel, have been updated to correctly reference and integrate Debian 13 into the existing build and package management workflows.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in issue comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request adds support for Debian 13 (trixie) images. The changes are mostly straightforward, involving updates to configuration files and adding new package definitions for trixie. My review includes suggestions to improve the maintainability of the Bazel build files by refactoring duplicated code. I've also identified a potential ordering issue in deb.MODULE.bazel that could affect the build, and pointed out an opportunity to make the logic for handling SSL packages in base/base.bzl more robust for future updates.

@loosebazooka
Copy link
Member

Thanks for your interest in this.
There are few things I'd like to do before we publish any debian13 images.

  • Get merged-usr fs from the start, so it's not confusing when we do switch over
  • Look at separating the debian13 and debian12 builds. They're already pretty big and can take a few hours because we build everything at once

I think we can still get most of this PR in if

  • we don't affect the root BUILD. Just replace the DISTROS import with a local variable for now?
  • we don't update docs

@harryzcy
Copy link
Contributor Author

  • we don't affect the root BUILD. Just replace the DISTROS import with a local variable for now?
  • we don't update docs

@loosebazooka Thanks for the review. I addressed those two comments

@loosebazooka
Copy link
Member

Copy link
Member

@loosebazooka loosebazooka left a comment

Choose a reason for hiding this comment

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

I think this looks good otherwise, and we can move on top of this.

I think you're going to have to disable trixie in the language build defs. (imported via DISTROS), or add something to base/distro.bzl maybe?

DISTROS = ["debian12"]
PREVIEW_DISTROS= ["debian13"]

@harryzcy
Copy link
Contributor Author

@loosebazooka Thanks! Formatted the buildifier and set debian13 as PREVIEW_DISTROS

@loosebazooka
Copy link
Member

I think we need to apply the following diff

  • undo changes in ./BUILD

  • add PREVIEW_DISTROLESS to ./base/BUILD and update testdata

  • common/BUILD.bazel needs the right targets for debian13

  • there may be more coming, i'm fixing an weird issue on my machine with: use rules_cc #1845 , but I'll see what else needs to be done.

btw ./knife test seems to be acting funny on my machine because uname resolves to x86_64 instead of amd64 so it isn't picking up tests.

diff --git a/BUILD b/BUILD
index b6d586e..c8a61dd 100644
--- a/BUILD
+++ b/BUILD
@@ -1,12 +1,9 @@
 load("//:checksums.bzl", "ARCHITECTURES", "BASE_ARCHITECTURES")

-# load("//base:distro.bzl", "DISTROS")
+load("//base:distro.bzl", "DISTROS")
 load("//private/oci:defs.bzl", "sign_and_push_all")
 load("//nodejs:node_arch.bzl", "node_arch")

-# Temporary override before fully supporting debian13
-DISTROS = ["debian12"]
-
 package(default_visibility = ["//visibility:public"])

 DEFAULT_DISTRO = "debian12"
diff --git a/base/BUILD b/base/BUILD
index 76c0aaa..e587d48 100644
--- a/base/BUILD
+++ b/base/BUILD
@@ -1,9 +1,9 @@
 load(":base.bzl", "base_images")
-load(":distro.bzl", "DISTROS")
+load(":distro.bzl", "DISTROS", "PREVIEW_DISTROS")

 package(default_visibility = ["//visibility:public"])

 [
     base_images(distro = distro)
-    for distro in DISTROS
+    for distro in DISTROS + PREVIEW_DISTROS
 ]
diff --git a/base/testdata/debian13.yaml b/base/testdata/debian13.yaml
new file mode 100644
index 0000000..861a164
--- /dev/null
+++ b/base/testdata/debian13.yaml
@@ -0,0 +1,5 @@
+schemaVersion: "1.0.0"
+fileContentTests:
+- name: 'os-release contents'
+  path: '/etc/os-release'
+  expectedContents: ['.*\nVERSION="Debian GNU/Linux 13 \(trixie\)"\n']
diff --git a/common/BUILD.bazel b/common/BUILD.bazel
index 7d7926d..5a285d2 100644
--- a/common/BUILD.bazel
+++ b/common/BUILD.bazel
@@ -1,7 +1,7 @@
 load("@aspect_bazel_lib//lib:tar.bzl", "tar")
 load("@rules_distroless//distroless:defs.bzl", "cacerts", "group", "home", "locale", "os_release", "passwd")
 load("//:checksums.bzl", "ARCHITECTURES", "VERSIONS")
-load("//base:distro.bzl", "DISTROS")
+load("//base:distro.bzl", "DISTROS", "PREVIEW_DISTROS")
 load("//private/util:deb.bzl", "deb")
 load(":variables.bzl", "MTIME", "NOBODY", "NONROOT", "OS_RELEASE", "ROOT", "quote")

@@ -53,7 +53,7 @@ tar(
         time = MTIME,
     )
     for arch in ARCHITECTURES
-    for distro in DISTROS
+    for distro in DISTROS + PREVIEW_DISTROS
 ]

 [
@@ -63,7 +63,7 @@ tar(
         time = MTIME,
     )
     for arch in ARCHITECTURES
-    for distro in DISTROS
+    for distro in DISTROS + PREVIEW_DISTROS
 ]

@loosebazooka
Copy link
Member

Thanks @harryzcy ! I'll merge this now and figure out how to expose these images in preview. It looks like rules_distroless has done a release, so we'll want to see how the merged usr stuff works out.

@loosebazooka loosebazooka merged commit eec5929 into GoogleContainerTools:main Aug 21, 2025
7 checks passed
@harryzcy harryzcy deleted the trixie branch August 21, 2025 23:25
@filipopo filipopo mentioned this pull request Oct 7, 2025
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.

Support for Debian13

2 participants