Debian Patches

Status for bazel-bootstrap/7.7.1+ds-3

Patch Description Author Forwarded Bugs Origin Last update
redirect-zlib-to-bzlmod.patch Redirect zlib to @zlib//:zlib when debian_build is active This allows the bazel_tools module to resolve the zlib dependency using
Bzlmod overrides. This avoids visibility issues with @debian_cc_deps
during the bootstrap build where ijar/zipper is compiled in the
@bazel_tools context.

===================================================================
Ying-Chun Liu (PaulLiu) <paulliu@debian.org> not-needed 2026-06-28
use-system-j2objc-annotations.patch Use system j2objc-annotations Remove dangling reference to third_party/java/j2objc-annotations which was
excluded from the source tarball, and rely on the system library instead.

===================================================================
Ying-Chun Liu (PaulLiu) <paulliu@debian.org> no 2026-06-28
fix-launcher-classpath.patch Fix launcher classpath to include Debian dependencies This patch modifies startup_options.cc to read bazel_classpath_debian_depends.txt
and append its contents to the classpath. This allows the Bazel client launcher
to find all required system Java libraries at runtime.

===================================================================
Ying-Chun Liu (PaulLiu) <paulliu@debian.org> not-needed 2026-06-29
fix-platforms-path.patch Fix platforms repository path for Bzlmod This patch updates the path for the platforms local repository in
local_config_platform.WORKSPACE to point to tools/platforms instead of
platforms under the embedded directory, matching the Debian installation layout.

===================================================================
Ying-Chun Liu (PaulLiu) <paulliu@debian.org> not-needed 2026-06-29
fix-rules-java-builtin-path.patch Fix rules_java_builtin path This patch updates the path for rules_java_builtin in
rules_java_builtin.WORKSPACE to point to rules/java instead of
rules_java under the embedded directory, matching the Debian installation layout.

===================================================================
Ying-Chun Liu (PaulLiu) <paulliu@debian.org> not-needed 2026-06-29
fix-bootstrap-dependencies.patch Add system Java dependencies to debian_java.BUILD This patch adds the system Java libraries (zstd-jni, fastutil, auto-value-gson, and
autotransient) to the centralized system dependency mapper tools/distributions/debian/debian_java.BUILD.
This allows both the Stage 1 bootstrap compiler and the Stage 2 Bazel self-build to resolve
these libraries cleanly from the host system completely offline.

===================================================================
Ying-Chun Liu (PaulLiu) <paulliu@debian.org> not-needed 2026-06-23
compile-missing-protos-in-bootstrap.patch Compile missing package_metrics.proto and stardoc_output.proto in Stage 1 Upstream Bazel 7 added two new proto files (package_metrics.proto and stardoc_output.proto)
but forgot to include their directories in the Stage 1 bootstrap script's proto compiler search paths.
This causes compilation failures during the offline bootstrap build because Bzlmod is inactive
and cannot download their generated artifacts. This patch adds their parent directories to the
find command so they are dynamically discovered and compiled.

===================================================================
Ying-Chun Liu (PaulLiu) <paulliu@debian.org> not-needed 2026-06-23
fix-blake3-guava-compatibility.patch Implement legacy Guava hashing methods for Blake3 The host system's libguava-java (v32.0.1) retains legacy, deprecated abstract methods
(hashString(CharSequence) in HashFunction, and putString(CharSequence) in Hasher)
which are not implemented by Bazel's custom Blake3 hashing classes. This causes
compilation failures during the offline Stage 1 bootstrap build. This patch implements
these methods by routing them to the modern putUnencodedChars/hashUnencodedChars methods.
To ensure cross-version compatibility (so it compiles during Stage 2 against standard Guava JRE
which might not have these methods), we implement them without the @Override annotation.

===================================================================
Ying-Chun Liu (PaulLiu) <paulliu@debian.org> not-needed 2026-06-23
fix-patchutil-diff-compatibility.patch Use standard java-diff-utils applyTo method instead of custom applyFuzzy Upstream Bazel compiles against a custom fork/PR of java-diff-utils that adds a non-standard
applyFuzzy(List<T>, int) method to support fuzzy patching. However, the official Debian
package libdiffutils-java (v4.9) is built from pristine upstream sources and does not
contain this method. This patch falls back to the standard, official applyTo(List<T>) method
to ensure compatibility with the host system's library during the offline bootstrap build.

===================================================================
Ying-Chun Liu (PaulLiu) <paulliu@debian.org> not-needed 2026-06-23
guard-missing-derived-maven.patch Guard missing derived/maven files during bootstrap To comply with the Debian Free Software Guidelines (DFSG), all prebuilt binary jar
dependencies are completely stripped from the upstream source tree, which includes
deleting the derived/maven directory. However, the upstream bootstrap scripts hardcode
file copy and metadata read commands to set up this directory. This patch:
1. Wraps the copy command in scripts/bootstrap/compile.sh in a file existence check.
2. Wraps the MAVEN_CANONICAL_REPO_NAME read in scripts/bootstrap/bootstrap.sh in a check,
gracefully omitting the --override_repository flag when the directory is missing.
This prevents build crashes while compiling offline.

===================================================================
Ying-Chun Liu (PaulLiu) <paulliu@debian.org> not-needed 2026-06-23
restore-third-party-build-tools-in-bootstrap.patch Restore third-party build tools and physical copies in bootstrap compiler To satisfy Bzlmod namespace isolation during the Stage 1 bootstrap compilation,
this patch replaces symlinking of third_party/ with a physical recursive copy in compile.sh.
It then finds and moves all clean BUILD.tools templates to override the default BUILD files.
This ensures that all Stage 1 actions resolve third-party packages cleanly from the local
bootstrap archive, completely bypassing remote dependency download crashes.
Additionally, this copies the missing java_stub_template.txt file from the core Java packages
into the bootstrap archive's tools/jdk package, unblocking offline proguard compilation.

===================================================================
Ying-Chun Liu (PaulLiu) <paulliu@debian.org> not-needed 2026-06-24
fix-abseil-linker-transitive-dependency.patch Append system Abseil shared library link flags to grpc++_unsecure The core client binary (//src/main/cpp:client) transitively includes Abseil C++
headers (such as absl/synchronization/mutex.h) through generated gRPC/proto headers.
When compiling on Debian against system libraries, the gRPC wrapper target
(@debian_cc_deps//:grpc++_unsecure) links against system gRPC shared libraries
but fails to declare its transitive dependency on the system Abseil libraries.
This breaks the dependency chain, causing the client binary link phase to crash
with undefined references and a DSO missing error. This patch appends the
required system Abseil shared libraries (-labsl_*) to the grpc++_unsecure linkopts,
restoring the transitive link chain natively.

===================================================================
Ying-Chun Liu (PaulLiu) <paulliu@debian.org> not-needed 2026-06-24
add-trust_install_base-option.patch Add --trust_install_base option This will allow Bazel client to run individually without the appended
zip archive, which is a requirement for Debian installation.

===================================================================
Yun Peng <pcloudy@google.com> not-needed upstream, https://github.com/meteorcloudy/bazel/commit/798831be403175a7a262a3fa3875c550dcc89aed 2020-08-10
change-sysmtem-rc-file-location.patch Change system rc file location Prevent config file conflicts with user Bazel installations.

===================================================================
Yun Peng <pcloudy@google.com> not-needed upstream, https://salsa.debian.org/bazel-team/bazel-bootstrap/-/commit/3f57d658ec8818e37a1519eee824f13d7ec6a4e2 2020-08-17
allow-install-base-symlinks.patch Accept symlinks in install base
===================================================================
Yun Peng <pcloudy@google.com> not-needed upstream, https://github.com/meteorcloudy/bazel/commit/3c0d47030f3c1b9c96d256e82fced642a7ce700b 2020-08-10
exclude_build_data.patch Remove internal timestamps from C++ singlejar to ensure reproducible builds
===================================================================
Olek Wojnar <olek@debian.org> not-needed 2023-02-13
add_toolchain_support_for_loongarch64.patch Add toolchain support for the loongarch64 architecture
===================================================================
Dandan Zhang <zhangdandan@loongson.cn> not-needed 2023-12-05

All known versions for source package 'bazel-bootstrap'

Links