Files
build_soong/genrule/allowlists.go
Cole Faust eb9028d240 Sandbox libc_musl_sysroot_bits
Sandboxing it produces this diff:

  $ diff <(zipinfo -l out_not_sandboxed/soong/.intermediates/external/musl/libc_musl_sysroot_bits/linux_glibc_x86_64/gen/  libc_musl_sysroot_bits.zip) <(zipinfo -l out/soong/.intermediates/external/musl/libc_musl_sysroot_bits/linux_glibc_x86_64/gen/  libc_musl_sysroot_bits.zip)
  1,3c1,2
  < Archive:  out_not_sandboxed/soong/.intermediates/external/musl/libc_musl_sysroot_bits/linux_glibc_x86_64/gen/  libc_musl_sysroot_bits.zip
  < Zip file size: 8535 bytes, number of entries: 16
  < -rw-r--r--  2.0 unx      421 bl      225 defN 08-Jan-01 00:00 include/bits/alltypes.h.in
  ---
  > Archive:  out/soong/.intermediates/external/musl/libc_musl_sysroot_bits/linux_glibc_x86_64/gen/libc_musl_sysroot_bits.zip
  > Zip file size: 5358 bytes, number of entries: 14
  17d15
  < -rw-r--r--  2.0 unx    10384 bl     2666 defN 08-Jan-01 00:00 include/bits/syscall.h.in
  19c17
  < 16 files, 21039 bytes uncompressed, 6439 bytes compressed:  69.4%
  ---

So the alltypes.h.in and syscall.h.in are removed from the zip after
sandboxing. This seems good, because those two files are handled
separately already in that Android.bp file, and are not regular header
files like the rest of the zip file.

Bug: 307824623
Test: ./build/soong/tests/genrule_sandbox_test.py libc_musl_sysroot_bits
Change-Id: I46b6340046ad7df85ea4fc9c54b46ade305661e6
2023-11-27 12:18:52 -08:00

56 lines
1.7 KiB
Go

// Copyright 2023 Google Inc. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package genrule
var (
DepfileAllowList = []string{
// go/keep-sorted start
"depfile_allowed_for_test",
// go/keep-sorted end
}
SandboxingDenyModuleList = []string{
// go/keep-sorted start
"CtsApkVerityTestDebugFiles",
"ScriptGroupTest-rscript",
"aidl-golden-test-build-hook-gen",
"aidl_camera_build_version",
"camera-its",
"checkIn-service-stub-lite",
"chre_atoms_log.h",
"cronet_aml_base_android_runtime_jni_headers",
"cronet_aml_base_android_runtime_jni_headers__testing",
"cronet_aml_base_android_runtime_unchecked_jni_headers",
"cronet_aml_base_android_runtime_unchecked_jni_headers__testing",
"deqp_spvtools_update_build_version",
"gen_corrupt_rebootless_apex",
"gen_key_mismatch_capex",
"libcore-non-cts-tests-txt",
"pvmfw_fdt_template_rs",
"seller-frontend-service-stub-lite",
"swiftshader_spvtools_update_build_version",
"ue_unittest_erofs_imgs",
"vm-tests-tf-lib",
// go/keep-sorted end
}
SandboxingDenyPathList = []string{
// go/keep-sorted start
"art/test",
"external/cronet",
// go/keep-sorted end
}
)