Add Debian 13 (trixie) images#1841
Conversation
|
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. |
There was a problem hiding this comment.
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.jsonandtrixie.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
libsslLibrary Handling: A conditional logic has been introduced inbase/base.bzlto handle thelibssl3t64library for Debian 13, differentiating it from thelibssl3used 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, andprivate/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
-
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. ↩
There was a problem hiding this comment.
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.
|
Thanks for your interest in this.
I think we can still get most of this PR in if
|
@loosebazooka Thanks for the review. I addressed those two comments |
|
I think buildifier errors to be fixed with: https://github.com/GoogleContainerTools/distroless/blob/main/.github/workflows/buildifier.yaml#L31 |
There was a problem hiding this comment.
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"]
|
@loosebazooka Thanks! Formatted the buildifier and set debian13 as |
|
I think we need to apply the following diff
btw 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
] |
|
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. |
Attempt to fix #1826
This PR brings trixie-based images to
static,base, andcc. Support for remaining ones are not yet added.