Commit graph

84662 commits

Author SHA1 Message Date
Treehugger Robot
e1623bb140 Merge "Allow source build to be an extracted target_files" am: fce28c1b97
Original change: https://android-review.googlesource.com/c/platform/build/+/2589846

Change-Id: I0a4ebf623140c02b39c7d3cb2e9bd060b7ea4090
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-16 23:14:19 +00:00
Treehugger Robot
fce28c1b97 Merge "Allow source build to be an extracted target_files" 2023-05-16 22:56:29 +00:00
Treehugger Robot
4e5532a5a1 Merge "Note ability to annotate dependencies." am: 787629c95d
Original change: https://android-review.googlesource.com/c/platform/build/+/2592248

Change-Id: I751f21b8c1ebe478ec18a053c2fb131c24f693c1
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-16 22:55:26 +00:00
Treehugger Robot
787629c95d Merge "Note ability to annotate dependencies." 2023-05-16 22:34:02 +00:00
Treehugger Robot
f739318a1a Merge "Strip values of soong_config_set calls" am: e5e5642ba5
Original change: https://android-review.googlesource.com/c/platform/build/+/2592246

Change-Id: I72bafd788fbffee43c6a09637ef8f73e20c63a42
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-16 22:32:51 +00:00
Treehugger Robot
a2ebcf5e03 Merge "Support custom payload signer in merge_ota" am: bb404f2b27
Original change: https://android-review.googlesource.com/c/platform/build/+/2587127

Change-Id: Idd3456e86e1785b5611810f71a42042b66d5610c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-16 22:31:54 +00:00
Treehugger Robot
e5e5642ba5 Merge "Strip values of soong_config_set calls" 2023-05-16 21:59:40 +00:00
Treehugger Robot
bb404f2b27 Merge "Support custom payload signer in merge_ota" 2023-05-16 21:39:58 +00:00
Cole Faust
76c2fcb90e Strip values of soong_config_set calls
It's a common mistake in make to have leading/trailing whitespace
on values, so strip it out before assigning to variables.

Bug: 282824346
Test: Presubmits
Change-Id: If4d3b86795c05ba32006af3af8031ca083a4c54b
2023-05-16 10:53:05 -07:00
Bob Badour
2191b9db82 Note ability to annotate dependencies.
Test: m droid dist
Change-Id: If3a0d032caf7801196117d7c4d4d21cb67c826bf
2023-05-16 10:52:12 -07:00
Treehugger Robot
1be8ad0258 Merge changes from topic "aconfig-cleanup-1" am: d4a32797c9
Original change: https://android-review.googlesource.com/c/platform/build/+/2591069

Change-Id: Ic657d8f404dc001ba645ef443e8ae6fd94f575ac
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-16 17:20:00 +00:00
Treehugger Robot
d4a32797c9 Merge changes from topic "aconfig-cleanup-1"
* changes:
  aconfig: cache: reject empty namespace and name fields
  aconfig: remove calls to unwrap (outside tests)
  aconfig: rename enum Format -> enum DumpFormat
2023-05-16 16:33:10 +00:00
Mårten Kongstad
e17ba5f423 aconfig: cache: reject empty namespace and name fields
Add invariant to struct Cache: all flag namespace and name fields added
to the cache are required to be non-empty strings.

Bug: 279485059
Test: atest aconfig.test
Change-Id: I5ff34ec8feccc19e52241d4221fc87699518f3ff
2023-05-16 12:52:43 +02:00
Mårten Kongstad
6b9e382eed aconfig: remove calls to unwrap (outside tests)
Do not call unwrap outside tests: replace existing uses with Result
return values or infallible alternatives.

Bug: 279485059
Test: atest aconfig.test
Change-Id: Ie5919b704b23a0f96bbef84ffbe9270d667cecd8
2023-05-16 11:19:58 +02:00
Mårten Kongstad
ba94e6a6b2 aconfig: rename enum Format -> enum DumpFormat
Rename enum Format to enum DumpFormat to make it more apparent what it
refers to.

Bug: 279485059
Test: atest aconfig.test
Change-Id: I869be020b69618b036fa05247f155d9e35ff85e2
2023-05-16 11:00:16 +02:00
Satoshi Futenma
1f93ce20c5 Support custom payload signer in merge_ota
Add options to handle custom payload signer as it is required in
merge_ota.py as well if the original OTA packages are signed by
the signer.

If input is only one OTA, clone apex_info.pb to the target.

Use common.ZipWriteStr instead of zipfile.writestr, this ensures
that the same permission for the entries as done by
ota_from_target_files.

Bug: 282189563
Test: manual. pass single OTA to merge_ota, with same signing
    parameters as originally used. Confirm that output zip is
    binary identical to input.
Change-Id: I3b926b8cd69bc74dff6ccf8b5ccc72bedffcac6f
2023-05-16 10:21:05 +02:00
Joe Onorato
2c3f4f5507 Merge "Add aconfig rules" am: 7f1171e493
Original change: https://android-review.googlesource.com/c/platform/build/+/2583250

Change-Id: Ic258d2dd4320d5cfe809e1debfc991c38643d4be
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-16 03:32:45 +00:00
Joe Onorato
7f1171e493 Merge "Add aconfig rules" 2023-05-16 02:49:45 +00:00
Treehugger Robot
899fc1b715 Merge "Add merge_ota to otatools" am: 1da7ff838b
Original change: https://android-review.googlesource.com/c/platform/build/+/2587126

Change-Id: I1348aed1dbae5002122612f6bb03c97fbcad9275
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-15 22:53:45 +00:00
Treehugger Robot
58c919b54a Merge "Add support for packaging modules.load.charger into vendor_[kernel_]boot" am: d28f557324
Original change: https://android-review.googlesource.com/c/platform/build/+/2559650

Change-Id: I7e6ed966518efe741d869ca30ae79237729306bc
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-15 22:53:16 +00:00
Treehugger Robot
1da7ff838b Merge "Add merge_ota to otatools" 2023-05-15 22:52:50 +00:00
Joe Onorato
0d1a98106a Add aconfig rules
Test: treehugger
Change-Id: I456f87894926287a91d42e738016ca8052cd5039
2023-05-15 15:38:49 -07:00
Treehugger Robot
d28f557324 Merge "Add support for packaging modules.load.charger into vendor_[kernel_]boot" 2023-05-15 22:24:11 +00:00
Treehugger Robot
0d73e67d39 Merge "Remove gpl_source.tgz" am: 48a8afe677
Original change: https://android-review.googlesource.com/c/platform/build/+/2584219

Change-Id: I9db9146283f4775281a1c049c1f15a17f74d818d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-15 22:10:55 +00:00
Treehugger Robot
48a8afe677 Merge "Remove gpl_source.tgz" 2023-05-15 21:36:32 +00:00
Kelvin Zhang
b97416e09e Allow source build to be an extracted target_files
common.LoadInfoDict() already supports loading from extracted
directories, just use it.

Test: generate an incremental OTA where both inputs are directories
Bug: 227848550
Bug: 277028723
Change-Id: Iedba831bb4d65d971df6b2ac95279e3234a02e2f
2023-05-15 11:13:26 -07:00
Mårten Kongstad
bdd924b335 Merge "aconfig: use bail! and ensure! where applicable" am: 7890fa3e84
Original change: https://android-review.googlesource.com/c/platform/build/+/2588765

Change-Id: Iaec315775f38b17825d4c98f077773a6023a1259
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-15 14:48:02 +00:00
Mårten Kongstad
7890fa3e84 Merge "aconfig: use bail! and ensure! where applicable" 2023-05-15 13:54:07 +00:00
Mårten Kongstad
e66b89f635 aconfig: use bail! and ensure! where applicable
The Android Rust style guide recommends anyhow's bail! and ensure!
macros where possible. Update the code accordingly.

Bug: 279485059
Test: atest aconfig.test
Change-Id: I7db7cc2d8ec15e1d3450657ad000e879adb19e08
2023-05-15 11:10:12 +02:00
Satoshi Futenma
6d56d45f96 Add merge_ota to otatools
Bug: 282189563
Test: manual, m otatools-package, confirm that merga_ota is
    present in otatools.zip
Change-Id: I40c3866bfb016aa1dec1c6dc2d95c66deb1e61ea
2023-05-15 09:06:02 +02:00
Treehugger Robot
b028b11a61 Merge "Use non-next NetworkStack" am: b87fd73330
Original change: https://android-review.googlesource.com/c/platform/build/+/2585789

Change-Id: I2106a10a68ada3241d81b3ae9f8897efa05f7464
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-12 23:41:06 +00:00
Treehugger Robot
b87fd73330 Merge "Use non-next NetworkStack" 2023-05-12 23:02:19 +00:00
Mårten Kongstad
011f6d42b2 Merge changes from topic "aconfig-part-5" am: 71f9dabe47
Original change: https://android-review.googlesource.com/c/platform/build/+/2584221

Change-Id: I0520bb7fce7cf788cd45bec7b1897b902dd86bc9
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-12 13:03:15 +00:00
Mårten Kongstad
71f9dabe47 Merge changes from topic "aconfig-part-5"
* changes:
  aconfig: follow Java conventions for Java file paths
  aconfig: separate flag declarations and flag values
2023-05-12 12:21:02 +00:00
Treehugger Robot
531125c397 Merge "parallelize add_partition_calls only if output_zip is None" am: 8d5d2257d9
Original change: https://android-review.googlesource.com/c/platform/build/+/2584696

Change-Id: Ida95b894dc799345b02aa64b58f4d6392db92d7f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-12 11:39:56 +00:00
Treehugger Robot
8d5d2257d9 Merge "parallelize add_partition_calls only if output_zip is None" 2023-05-12 10:56:23 +00:00
Mårten Kongstad
d42eeeba3d aconfig: follow Java conventions for Java file paths
Update codegen_java to write the generated Java file(s) to
"java/package/File.java" instead of just "File.java".

Also generalize codegen_java::GeneratedFile to commands::OutputFile in
preparation for the upcoming C++ and Rust codegen.

Also change Java package name to 'com.android.internal.aconfig'.

Bug: 279485059
Test: atest aconfig.test
Change-Id: I13978697e35010fe6be8637aa495d4b852dbed7e
2023-05-12 10:01:00 +02:00
Mårten Kongstad
fa23d2993b aconfig: separate flag declarations and flag values
Simplify how aconfig configurations work: remove the ability to set flag
values based on build-id.

The aconfig files now some in two flavours:

  - flag declaration files: introduce new flags; aconfig will assign the
    flags a hard-coded default value (disabled, read-write)

  - flag value files: assign flags new values

`aconfig create-cache` expects flags to be declared exactly once, and
for their values to be reassigned zero or more times.

The flag value files are identical what used to be called override
files.

Also, remove the now obsolete build-id parameter: this was used to
calculate default values before applying overrides, and is no longer
needed.

Also rename a few more structs and functions to be closer to the .proto
names. This will make it easier to use the generated proto structs
directly, and get rid of the hand-crafter wrappers.

Bug: 279485059
Test: atest aconfig.test
Change-Id: I7bf881338b0567f932099ce419cac457abbe8df8
2023-05-12 08:50:49 +02:00
Treehugger Robot
e72f71968a Merge "Only search for test suite jdk files once" am: 6961b14269
Original change: https://android-review.googlesource.com/c/platform/build/+/2585683

Change-Id: I8102ee297fbba527a6e997bc939681ec407e0b0d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-12 06:23:53 +00:00
Jeongik Cha
fa9090946e parallelize add_partition_calls only if output_zip is None
if output_zip isn't None, writing into zip file in parallel is not
thread-safe.

Bug: 281960217
Test: m dist
Change-Id: I10d68a4bb779cee244f40410ec95d38ca6040306
2023-05-12 15:14:58 +09:00
Treehugger Robot
6961b14269 Merge "Only search for test suite jdk files once" 2023-05-12 05:53:11 +00:00
Treehugger Robot
d5dc0c17fe Merge "parallelize add_partition_calls" am: 96b51b54b6
Original change: https://android-review.googlesource.com/c/platform/build/+/2585397

Change-Id: I58e1b516a5109eaed483af1c8b9979f838e0b96f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-12 05:19:41 +00:00
Daniel Zheng
6b558b3fe4 Merge "Add fastboot-info to updatepackage" am: 717591dd4e
Original change: https://android-review.googlesource.com/c/platform/build/+/2583539

Change-Id: I92a70b845d04e2f251eed2b96fbcfe58d57ffeea
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-12 05:19:25 +00:00
Treehugger Robot
96b51b54b6 Merge "parallelize add_partition_calls" 2023-05-12 04:54:11 +00:00
Daniel Zheng
717591dd4e Merge "Add fastboot-info to updatepackage" 2023-05-12 04:31:55 +00:00
Joe Onorato
6a3278d350 Merge "Add release flag logic based on TARGET_RELEASE." am: 48fbf97b3e
Original change: https://android-review.googlesource.com/c/platform/build/+/2581130

Change-Id: I15290ed9a3ceb59a4acba9a7075d457f95536e1e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-12 02:30:44 +00:00
Joe Onorato
48fbf97b3e Merge "Add release flag logic based on TARGET_RELEASE." 2023-05-12 01:44:46 +00:00
Cole Faust
a5f31a5820 Only search for test suite jdk files once
compatibility.mk is included 33 times on aosp, and 47 times on
internal master. Each of these would run this shell command, and
there would be an entry in the kati stamp file for each time it was
run, causing this command to be run the 33/47 times every single build.
This took ~0.2 seconds, which can be saved by only running it once.
(However these ~0.2 seconds are parallelized with other parts of the
stamp checking)

Bug: 282079550
Test: m nothing
Change-Id: I364836d1cb0cc26ca9116eda6d954170e1cb7761
2023-05-11 18:22:03 -07:00
Cole Faust
ab4f856bbc Remove gpl_source.tgz
This file was an archive of all the gpl files that could be found
in the source tree. Because it looks for gpl files using $(wildcard),
kati had to rerun the wildcards every single build to see if they had
changed. These GPL wildcards made up 30294 of 63996 wildcards present
on aosp-master. Removing these wildcards saves (aosp/internal) ~0.2/~0.1
seconds from every build, and ~0.4/~0.6 seconds from the wildcard
checking portion of kati. (The whole build sees <0.4s/0.6s of
improvement because it's parallelized with the shell checking, but
improvements here mean that we can now improve the shell commands as
well and get more fruitful results)

We don't actually use gpl_source.tgz anywhere, so we can just remove it.

Bug: 282079550
Test: m nothing
Change-Id: I77141dbb39b2d8ebd96bc258fe7dbdff5a372977
2023-05-11 18:00:38 -07:00
Treehugger Robot
f08f1ad8f9 Merge "Remove wildcards of absolute paths" am: dc5ec0bfd8
Original change: https://android-review.googlesource.com/c/platform/build/+/2584263

Change-Id: I3f0c9757d28dae10826ebd6ca8757dde0cd1bdbc
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-11 23:56:35 +00:00