This is an internal-only genrule, that was previously included in
a denylist in vendor/google/build. However, not all partners have
that file, so some products ended up setting
BUILD_BROKEN_GENRULE_SANDBOXING when that file didn't exist. Moving
it to the aosp allowlist lets us remove those build broken flags.
I checked with krzysio@ and yromanenko@ and they're ok with putting
this name in aosp.
Bug: 307824623
Test: Presubmits
Change-Id: Ia3f24a5c8c8efc62bdc84435343cafd1dac9afed
go/android-busy-beavers-sandboxing
It still has a diff in the generule_sandbox_test, but it's just the
addition of "./" in front of all the paths, which is fine.
Bug: 307824623
Test: ./build/soong/tests/genrule_sandbox_test.py CtsApkVerityTestDebugFiles
Change-Id: I8b352305cfb339bc5a09a2305e10a187723d754d
It was fixed with aosp/2866315.
Bug: 307824623
Test: ./build/soong/tests/genrule_sandbox_test.py camera-its
Change-Id: Iaf3871682e99ceb7161c159acb757ce2949f5b3d
Sandboxing produces this diff:
1c1
< "v2023.2", "SPIRV-Tools v2023.2 android-u-beta-1-gpl-587-g9d167f845"
---
> "v2023.2", "SPIRV-Tools v2023.2 unknown hash, 2023-11-30T17:54:23"
But the git repository is already not garunteed to exist on CI, and
the genrule is consequently commented with a FIXME about that.
Bug: 307824623
Test: ./build/soong/tests/genrule_sandbox_test.py swiftshader_spvtools_update_build_version
Change-Id: I98e65781bd49137662ed020927940b0f3e4d645b
go/roboleaf-busy-beavers-sandboxing
deqp_spvtools_update_build_version gets this diff:
< "v2022.4-dev", "SPIRV-Tools v2022.4-dev android-u-beta-1-gpl-177-g1ef94532"
---
> "v2022.4-dev", "SPIRV-Tools v2022.4-dev unknown hash, 2023-11-28T19:30:48"
But it already has a comment on it to revisit its usage of git,
which doesn't work on CI.
Bug: 307824623
Test: ./build/soong/tests/genrule_sandbox_test.py chre_atoms_log.h deqp_spvtools_update_build_version
Change-Id: I759970a5687c4f75116a40f5c127ae762da4ee95
go/roboleaf-busy-beavers-sandboxing
This genrule is non-deterministic, (the jar files have timestamps)
so genrule_sandbox_test.py fails, but should otherwise work with
sandboxing.
Bug: 307824623
Test: m vm-tests-tf-lib
Change-Id: Ia8c60e7a0f134e839939622fd2747ff73ea3ce3c
This already works with sandboxing, I'm not sure why it was added.
Bug: 307824623
Test: ./build/soong/tests/genrule_sandbox_test.py ue_unittest_erofs_imgs
Change-Id: I8d2c151e3bc6ed87e1d147e0ae316397ad56c4c8
This already works with sandboxing, I'm not sure why it was added.
Bug: 307824623
Test: ./build/soong/tests/genrule_sandbox_test.py pvmfw_fdt_template_rs
Change-Id: I43390274740144122aae2a225807a6e1100c85c1
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
go/roboleaf-busy-beavers-sandboxing
gensrcs should require output_extension to be set, when it's not,
you get some weird filename like `lib.`. Switch to genrules for
simplicity.
Bug: 307824623
Test: ./build/soong/tests/genrule_sandbox_test.py libbssl_sys_src_nostd
Change-Id: I4ec2686c560439c3150b74b14e313ed6b688720c
These both work with sandboxing already, I'm not sure why they
were added to this list.
Bug: 307824623
Test: ./build/soong/tests/genrule_sandbox_test.py android-cts-verifier MultiDexLegacyTestApp_genrule
Change-Id: Ie5a194fbe202b84a30eb3738d07ffb4ec9061bca
Sandboxing it generates this diff:
38,39c38,39
< #ifndef YY_YY_OUT_SOONG_TEMP_SBOX_794A09CEE4E110D9FF38139A8943928FFD7288A5_OUT_AWKGRAM_TAB_H_INCLUDED
< # define YY_YY_OUT_SOONG_TEMP_SBOX_794A09CEE4E110D9FF38139A8943928FFD7288A5_OUT_AWKGRAM_TAB_H_INCLUDED
---
> #ifndef YY_YY_OUT_AWKGRAM_TAB_H_INCLUDED
> # define YY_YY_OUT_AWKGRAM_TAB_H_INCLUDED
280c280
< #endif /* !YY_YY_OUT_SOONG_TEMP_SBOX_794A09CEE4E110D9FF38139A8943928FFD7288A5_OUT_AWKGRAM_TAB_H_INCLUDED */
---
> #endif /* !YY_YY_OUT_AWKGRAM_TAB_H_INCLUDED */
Which is acceptable, the ifdef is based on the path to the file and
just there to prevent duplicate imports.
Bug: 307824623
Test: ./build/soong/tests/genrule_sandbox_test.py awkgram.tab.h
Change-Id: I85c5e0f65e97d18f1aa8b36fa6b19402d2da6c8c
Sandboxing it generates this diff:
1c1
< #define ANGLE_COMMIT_HASH "1f7a2ce0bf57"
---
> #define ANGLE_COMMIT_HASH "unknown hash"
3,4c3,4
< #define ANGLE_COMMIT_DATE "2023-11-17 17:33:59 +0000"
< #define ANGLE_COMMIT_POSITION 26027
---
> #define ANGLE_COMMIT_DATE "unknown date"
> #define ANGLE_COMMIT_POSITION 0
These constants appear to be unused, and we don't really want the build
to inspect the git history, so just let them be unkown.
Bug: 307824623
Test: ./build/soong/tests/genrule_sandbox_test.py angle_commit_id
Change-Id: I3e35af14d13142927ded9477e975576d7324c6b7
These genrules already work with sandboxing, but bison emits #line
directives that reference filepaths. These paths differ between
sandboxed and non-sandboxed builds, which caused
genrule_sandboxing_test.py to think that they didn't work with
sandboxing.
Bug: 307824623
Test: ./build/soong/tests/genrule_sandbox_test.py emp_ematch.yacc.c emp_ematch.yacc.h
Change-Id: I85ed0f80dee7997af6b08a37b12e9c0ad0bd8386
These genrules already work with sandboxing, I'm not sure why they
were added to the list.
Bug: 307824623
Test: ./build/soong/tests/genrule_sandbox_test.py c2hal_test_genc++_headers c2hal_test_genc++
Change-Id: I697c9cff1db0bf71b3608684fde73535a72f71b2