Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
5b2b5e3
feat: python standalone images from python-build-standalone
reneleonhardt Aug 19, 2026
3f9286d
feat: python-build-standalone updater + tests (knife update-python-ar…
reneleonhardt Aug 19, 2026
c6074ce
feat: updater generates PBS SBOM (python/pbs-sbom.spdx.json)
reneleonhardt Aug 19, 2026
177e904
feat: PBS SBOM gets purls, pip trivy-scannable
reneleonhardt Aug 19, 2026
0c85061
feat: verify PBS embedded native libs against the manifest (drift => …
reneleonhardt Aug 19, 2026
31a3b83
feat: NVD CPE check for pinned native libs (RED on HIGH/CRITICAL)
reneleonhardt Aug 19, 2026
35777bb
fix: buildifier-sort python/BUILD data lists
reneleonhardt Aug 19, 2026
7111da8
fix: stale and unclear comments and README pip claim in PBS tooling
reneleonhardt Aug 19, 2026
f70b82c
fix: portable in-place sed in update_python_archives (GNU vs BSD -i "")
reneleonhardt Aug 19, 2026
faabd9a
fix: align PBS SBOM generation
reneleonhardt Sep 1, 2026
6772250
fix: update PBS archives to 20260901
reneleonhardt Sep 2, 2026
32dbb30
docs: proofread Python image text
reneleonhardt Sep 2, 2026
f2f3edb
feat: support opt-in PBS prereleases
reneleonhardt Sep 2, 2026
5a0d912
fix: enforce PBS update and metadata contracts
reneleonhardt Sep 19, 2026
9758d01
fix: simplify PBS runtime and update tooling
reneleonhardt Nov 13, 2026
54f0433
fix: update PBS archives to 20261110
reneleonhardt Nov 13, 2026
e48fcdf
feat: add PBS Python 3.11 and 3.12 images
reneleonhardt Nov 18, 2026
f83a2f3
fix: make PBS archive updates safe to rerun
reneleonhardt Nov 18, 2026
2c21282
fix: limit PBS images to Python 3.14 and 3.15
reneleonhardt Nov 19, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .bazelignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
.local
.gocache
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,8 @@
/output/
# ignore user bazelrc
.bazelrc.user
*.log
*.log
.gocache/
/.gotmp

/python/Dockerfile
39 changes: 39 additions & 0 deletions BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,17 @@ load("//java:config.bzl", "JAVA_ARCHITECTURES", "JAVA_DISTROS", "JAVA_MAJOR_VERS
load("//nodejs:config.bzl", "NODEJS_ARCHITECTURES", "NODEJS_DISTROS", "NODEJS_MAJOR_VERSIONS")
load("//private/oci:defs.bzl", "sign_and_push_all")
load("//private/tools/lifecycle:defs.bzl", "attach_lifecycle_tags")
load("//python:config.bzl", PBS_PYTHON_ARCHITECTURES = "PYTHON_ARCHITECTURES", PBS_PYTHON_DISTROS = "PYTHON_DISTROS", PBS_PYTHON_MAJOR_VERSIONS = "PYTHON_MAJOR_VERSIONS")
load("//python3:config.bzl", "PYTHON_ARCHITECTURES", "PYTHON_DISTROS")
load("//static:config.bzl", "STATIC_ARCHITECTURES", "STATIC_DISTROS")

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

exports_files([
"MODULE.bazel",
"knife",
])

DEFAULT_DISTRO = "debian13"

VARIANTS = [
Expand Down Expand Up @@ -196,6 +202,37 @@ NODEJS |= {
for (tag_base, debug_mode, user) in VARIANTS
}

###############
# PYTHON (PBS) #
###############
PYTHON = {
"{REGISTRY}/{PROJECT_ID}/python" + version + "-" + distro + ":" + tag_base + "-" + arch: "//python:python" + version.replace(".", "") + debug_mode + "_" + user + "_" + arch + "_" + distro
for version in PBS_PYTHON_MAJOR_VERSIONS
for distro in PBS_PYTHON_DISTROS
for arch in PBS_PYTHON_ARCHITECTURES[distro][version]
for (tag_base, debug_mode, user) in VARIANTS
}

PYTHON |= {
"{REGISTRY}/{PROJECT_ID}/python" + version + "-" + distro + ":" + tag_base: "//python:python" + version.replace(".", "") + debug_mode + "_" + user + "_" + distro
for version in PBS_PYTHON_MAJOR_VERSIONS
for distro in PBS_PYTHON_DISTROS
for (tag_base, debug_mode, user) in VARIANTS
}

PYTHON |= {
"{REGISTRY}/{PROJECT_ID}/python" + version + ":" + tag_base + "-" + arch: "//python:python" + version.replace(".", "") + debug_mode + "_" + user + "_" + arch + "_" + DEFAULT_DISTRO
for version in PBS_PYTHON_MAJOR_VERSIONS
for arch in PBS_PYTHON_ARCHITECTURES[DEFAULT_DISTRO][version]
for (tag_base, debug_mode, user) in VARIANTS
}

PYTHON |= {
"{REGISTRY}/{PROJECT_ID}/python" + version + ":" + tag_base: "//python:python" + version.replace(".", "") + debug_mode + "_" + user + "_" + DEFAULT_DISTRO
for version in PBS_PYTHON_MAJOR_VERSIONS
for (tag_base, debug_mode, user) in VARIANTS
}

###############
# JAVA_BASE #
###############
Expand Down Expand Up @@ -270,6 +307,8 @@ ALL |= PYTHON3

ALL |= NODEJS

ALL |= PYTHON

ALL |= JAVA_BASE

ALL |= JAVA
Expand Down
5 changes: 5 additions & 0 deletions MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -55,5 +55,10 @@ node = use_extension("//private/extensions:node.bzl", "node")
node.archive()
use_repo(node, "node_versions", "nodejs22_amd64", "nodejs22_arm", "nodejs22_arm64", "nodejs22_ppc64le", "nodejs22_s390x", "nodejs24_amd64", "nodejs24_arm64", "nodejs24_ppc64le", "nodejs24_s390x", "nodejs26_amd64", "nodejs26_arm64", "nodejs26_ppc64le", "nodejs26_s390x")

### PYTHON ###
py = use_extension("//private/extensions:python.bzl", "python")
py.archive()
use_repo(py, "python314_amd64", "python314_arm64", "python314_riscv64", "python314_s390x", "python315_amd64", "python315_arm64", "python315_riscv64", "python315_s390x", "python_versions")

### DEBIAN ###
include("//private/repos/deb:deb.MODULE.bazel")
147 changes: 147 additions & 0 deletions MODULE.bazel.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

64 changes: 63 additions & 1 deletion knife
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,65 @@ function cmd_lint () {
buildifier -mode=$mode $(find . -type f \( -name 'BUILD*' -o -name 'WORKSPACE*' -o -name '*.bzl' \))
}

function cmd_update_python_archives () {
if ! which jq > /dev/null; then
echo "🧱 No jq executable was found"
exit 1
fi
if ! which curl > /dev/null; then
echo "🧱 No curl executable was found"
exit 1
fi

VERBOSE=0
DRY_RUN=0
for arg in "$@"; do
case "$arg" in
--verbose)
VERBOSE=1
;;
--dry-run)
DRY_RUN=1
;;
*)
echo "unknown option: $arg"
exit 1
;;
esac
done
export VERBOSE DRY_RUN

source knife.d/update_python_archives.sh
# A separate shell keeps errexit active inside the updater despite this condition.
if ! out=$(bash -c 'source knife.d/update_python_archives.sh; generate_python_archives'); then
case "$out" in
*MUTATED_PARTIAL*)
echo "update failed mid-mutation; files may be partially updated." >&2
echo "Restore the affected files from version control before retrying." >&2
;;
*)
echo "update failed; no files were mutated (pre-flight validation)." >&2
;;
esac
return 1
fi
if [ "$DRY_RUN" = 0 ] && ! bash -c 'source knife.d/update_python_archives.sh; update_test_versions_python'; then
echo "Python version testdata update failed. Fix the error and rerun the updater." >&2
return 1
fi
if [ "$out" = "NO_CHANGE" ]; then
echo "python archives are up to date"
return 0
fi
if [ "$DRY_RUN" = 1 ]; then
echo "dry-run: no files written"
return 0
fi
echo "updated python archives to release $out"
# The extension changed; refresh the lockfile before building.
echo "Refresh the lockfile before building." >&2
}

function cmd_update_node_archives () {
if ! which jq > /dev/null; then
echo "🧱 No jq executable was found"
Expand Down Expand Up @@ -305,8 +364,11 @@ update-node-archives)
update-node-keys)
cmd_update_node_keys
;;
update-python-archives)
cmd_update_python_archives "${@:2}"
;;
~~nocmd) # no command provided
echo "provide a command: lock, update-snapshots, github-update-snapshots, update-non-snapshots, test, deb-versions, update-node-archives, update-node-keys"
echo "provide a command: lock, update-snapshots, github-update-snapshots, update-non-snapshots, test, deb-versions, update-node-archives, update-node-keys, update-python-archives"
exit 1
;;
*) # unknown command
Expand Down
4 changes: 4 additions & 0 deletions knife.d/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
exports_files([
"update_java_versions.sh",
"update_python_archives.sh",
])
Loading