aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2023-12-22 02:01:50 +0000
committerAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2023-12-22 02:01:50 +0000
commit05458917bfa89c0213632b7b2b01729fe23fa4ac (patch)
tree8b0e6969fa754ea29a654f14cb4e1039be9294c9
parent79ecc82dcc31964bbb9d7b68f1526446be2ff4a6 (diff)
parent07e726fb7d0dc50ba6d8dcbbbe8def8d5ee9c573 (diff)
downloadconfigs-common-android14-6.1-2023-05-exp-release.tar.gz
Snap for 11203489 from 07e726fb7d0dc50ba6d8dcbbbe8def8d5ee9c573 to common-android14-6.1-2023-05-exp-releasecommon-android14-6.1-2023-05-exp-release
Change-Id: I056a999ca4232bcbec33b3b200ade000332b9656 Signed-off-by: Coastguard Worker <android-build-coastguard-worker@google.com>
-rwxr-xr-xtools/bump.py67
-rwxr-xr-xtools/freeze.py99
-rw-r--r--v/android-5.15/android-base.config1
-rw-r--r--v/android-6.1/android-base.config1
4 files changed, 67 insertions, 101 deletions
diff --git a/tools/bump.py b/tools/bump.py
new file mode 100755
index 0000000..3563275
--- /dev/null
+++ b/tools/bump.py
@@ -0,0 +1,67 @@
+#!/usr/bin/env python3
+#
+# Copyright (C) 2020 The Android Open Source Project
+#
+# 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.
+#
+
+"""
+Creates new kernel configs for the next compatibility matrix.
+"""
+
+import argparse
+import datetime
+import os
+import shutil
+import subprocess
+
+def check_call(*args, **kwargs):
+ print(args[0])
+ subprocess.check_call(*args, **kwargs)
+
+def replace_configs_module_name(current_release, new_release, file_path):
+ check_call("sed -i'' -E 's/\"kernel_config_{}_([0-9.]*)\"/\"kernel_config_{}_\\1\"/g' {}"
+ .format(current_release, new_release, file_path), shell=True)
+
+class Bump(object):
+ def __init__(self, cmdline_args):
+ top = os.environ["ANDROID_BUILD_TOP"]
+ self.current_release = cmdline_args.current
+ self.new_release = cmdline_args.next
+ self.configs_dir = os.path.join(top, "kernel/configs")
+ self.current_release_dir = os.path.join(self.configs_dir, self.current_release)
+ self.new_release_dir = os.path.join(self.configs_dir, self.new_release)
+ self.versions = [e for e in os.listdir(self.current_release_dir) if e.startswith("android-")]
+
+ def run(self):
+ shutil.copytree(self.current_release_dir, self.new_release_dir)
+ for version in self.versions:
+ dst = os.path.join(self.new_release_dir, version)
+ for file_name in os.listdir(dst):
+ abs_path = os.path.join(dst, file_name)
+ if not os.path.isfile(abs_path):
+ continue
+ year = datetime.datetime.now().year
+ check_call("sed -i'' -E 's/Copyright \\(C\\) [0-9]{{4,}}/Copyright (C) {}/g' {}".format(year, abs_path), shell=True)
+ replace_configs_module_name(self.current_release, self.new_release, abs_path)
+
+def main():
+ parser = argparse.ArgumentParser(description=__doc__)
+ parser.add_argument('current', type=str, help='name of the current version (e.g. v)')
+ parser.add_argument('next', type=str, help='name of the next version (e.g. w)')
+ cmdline_args = parser.parse_args()
+
+ Bump(cmdline_args).run()
+
+if __name__ == '__main__':
+ main()
diff --git a/tools/freeze.py b/tools/freeze.py
deleted file mode 100755
index 681fdeb..0000000
--- a/tools/freeze.py
+++ /dev/null
@@ -1,99 +0,0 @@
-#!/usr/bin/env python3
-#
-# Copyright (C) 2020 The Android Open Source Project
-#
-# 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.
-#
-
-"""
-Freeze kernel configs for a compatibility matrix release.
-"""
-
-import argparse
-import datetime
-import os
-import shutil
-
-import subprocess
-
-def check_call(*args, **kwargs):
- print(args[0])
- subprocess.check_call(*args, **kwargs)
-
-def replace_configs_module_name(new_release, file_path):
- check_call("sed -i'' -E 's/\"kernel_config_current_([0-9.]*)\"/\"kernel_config_{}_\\1\"/g' {}"
- .format(new_release, file_path), shell=True)
-
-class Freeze(object):
- def __init__(self, cmdline_args):
- top = os.environ["ANDROID_BUILD_TOP"]
- self.new_release = cmdline_args.name
- self.configs_dir = os.path.join(top, "kernel/configs")
- self.new_release_dir = os.path.join(self.configs_dir, self.new_release)
- self.interfaces_dir = os.path.join(top, "hardware/interfaces")
- self.versions = [e for e in os.listdir(self.configs_dir) if e.startswith("android-")]
- self.bugline = "Bug: {}\n".format(cmdline_args.bug) if cmdline_args.bug else ""
-
- def run(self):
- self.move_configs()
- self.freeze_configs_in_matrices()
- self.create_current()
- self.print_summary()
-
- def move_configs(self):
- os.makedirs(self.new_release_dir, exist_ok=False)
- for version in self.versions:
- src = os.path.join(self.configs_dir, version)
- dst = os.path.join(self.new_release_dir, version)
- shutil.move(src, dst)
- for file_name in os.listdir(dst):
- abs_path = os.path.join(dst, file_name)
- if not os.path.isfile(abs_path):
- continue
- year = datetime.datetime.now().year
- check_call("sed -i'' -E 's/Copyright \\(C\\) [0-9]{{4,}}/Copyright (C) {}/g' {}".format(year, abs_path), shell=True)
- replace_configs_module_name(self.new_release, abs_path)
-
- check_call('git -C {} add android-* {}'.format(self.configs_dir, self.new_release), shell=True)
- check_call('git -C {} commit -m "Freeze kernel configs for {}.\n\n{}Test: builds"'.format(self.configs_dir, self.new_release, self.bugline), shell=True)
-
- def freeze_configs_in_matrices(self):
- matrices_soong = "compatibility_matrices/Android.bp"
- matrices_soong_abs_path = os.path.join(self.interfaces_dir, matrices_soong)
- replace_configs_module_name(self.new_release, matrices_soong_abs_path)
-
- check_call('git -C {} add {}'.format(self.interfaces_dir, matrices_soong), shell=True)
- check_call('git -C {} commit -m "Freeze kernel configs for {}.\n\n{}Test: builds"'.format(self.interfaces_dir, self.new_release, self.bugline), shell=True)
-
- def create_current(self):
- check_call('git -C {} checkout HEAD~ -- android-*'.format(self.configs_dir), shell=True)
- check_call('git -C {} add android-*'.format(self.configs_dir), shell=True)
- check_call('git -C {} commit -m "Create kernel configs for current.\n\n{}Test: builds"'.format(self.configs_dir, self.bugline), shell=True)
-
- def print_summary(self):
- print("*** Please submit these changes to {} branch: ***".format(self.new_release))
- check_call('git -C {} show -s --format=%B HEAD~1'.format(self.configs_dir), shell=True)
- check_call('git -C {} show -s --format=%B HEAD'.format(self.interfaces_dir), shell=True)
- print("*** Please submit these changes to master branch: ***")
- check_call('git -C {} show -s --format=%B HEAD'.format(self.configs_dir), shell=True)
-
-def main():
- parser = argparse.ArgumentParser(description=__doc__)
- parser.add_argument('name', type=str, help='name of the directory (e.g. r)')
- parser.add_argument('--bug', type=str, nargs='?', help='Bug number')
- cmdline_args = parser.parse_args()
-
- Freeze(cmdline_args).run()
-
-if __name__ == '__main__':
- main()
diff --git a/v/android-5.15/android-base.config b/v/android-5.15/android-base.config
index d7459d6..0b099b3 100644
--- a/v/android-5.15/android-base.config
+++ b/v/android-5.15/android-base.config
@@ -67,7 +67,6 @@ CONFIG_FILE_LOCKING=y
CONFIG_FS_ENCRYPTION=y
CONFIG_FS_ENCRYPTION_INLINE_CRYPT=y
CONFIG_FS_VERITY=y
-CONFIG_FS_VERITY_BUILTIN_SIGNATURES=y
CONFIG_FUSE_FS=y
CONFIG_FUTEX=y
CONFIG_HARDENED_USERCOPY=y
diff --git a/v/android-6.1/android-base.config b/v/android-6.1/android-base.config
index 2dbcfab..e9c7420 100644
--- a/v/android-6.1/android-base.config
+++ b/v/android-6.1/android-base.config
@@ -66,7 +66,6 @@ CONFIG_FILE_LOCKING=y
CONFIG_FS_ENCRYPTION=y
CONFIG_FS_ENCRYPTION_INLINE_CRYPT=y
CONFIG_FS_VERITY=y
-CONFIG_FS_VERITY_BUILTIN_SIGNATURES=y
CONFIG_FUSE_FS=y
CONFIG_FUTEX=y
CONFIG_HARDENED_USERCOPY=y