Disable zipbomb detection inside the build

Some versions of Fedora include patches to unzip to enable zipbomb
detection that incorrectly handle zip64 and data descriptors and fail
on large zip files produced by soong_zip.  Disable zipbomb detection
inside the build.

Reported upstream in https://bugzilla.redhat.com/show_bug.cgi?id=2227130.

Bug: 286885495
Test: builds
Change-Id: I8e4438720bbb17a073ff3b5535f01c2827485838
This commit is contained in:
Colin Cross
2023-07-28 09:27:23 -07:00
parent ad18b1467f
commit fe5ed4d6e2

View File

@@ -525,6 +525,11 @@ func NewConfig(ctx Context, args ...string) Config {
ret.environ.Set("ANDROID_JAVA11_HOME", java11Home)
ret.environ.Set("PATH", strings.Join(newPath, string(filepath.ListSeparator)))
// b/286885495, https://bugzilla.redhat.com/show_bug.cgi?id=2227130: some versions of Fedora include patches
// to unzip to enable zipbomb detection that incorrectly handle zip64 and data descriptors and fail on large
// zip files produced by soong_zip. Disable zipbomb detection.
ret.environ.Set("UNZIP_DISABLE_ZIPBOMB_DETECTION", "TRUE")
if ret.MultitreeBuild() {
ret.environ.Set("MULTITREE_BUILD", "true")
}