diff options
author | Joonas Kylmälä <joonas.kylmala@iki.fi> | 2018-08-27 13:19:11 -0400 |
---|---|---|
committer | Joonas Kylmälä <joonas.kylmala@iki.fi> | 2018-08-27 13:19:11 -0400 |
commit | 07e4f403d49ea9ed5e51246e5fe60ac6f9a13082 (patch) | |
tree | d7ed39ccd3aa2da97061fc16420768e62ece161d | |
parent | 309a2cc86bbd4c2cc6a975cabb7bc725734c4016 (diff) | |
parent | 44dd6cfe9662daef608b5763bbcdfa55c68ee76b (diff) | |
download | build-07e4f403d49ea9ed5e51246e5fe60ac6f9a13082.tar.gz build-07e4f403d49ea9ed5e51246e5fe60ac6f9a13082.tar.bz2 build-07e4f403d49ea9ed5e51246e5fe60ac6f9a13082.zip |
Merge remote-tracking branch 'lineageos/cm-13.0' into replicant-6.0
-rw-r--r-- | core/Makefile | 8 | ||||
-rw-r--r-- | core/build-system.html | 1 | ||||
-rw-r--r-- | core/ccache.mk | 18 | ||||
-rw-r--r-- | core/main.mk | 4 | ||||
-rw-r--r-- | core/tasks/kernel.mk | 11 | ||||
-rw-r--r-- | core/version_defaults.mk | 2 | ||||
-rwxr-xr-x | tools/releasetools/ota_from_target_files.py | 5 | ||||
-rwxr-xr-x | tools/repopick.py | 20 |
8 files changed, 49 insertions, 20 deletions
diff --git a/core/Makefile b/core/Makefile index b4d478d43..5d62a18d3 100644 --- a/core/Makefile +++ b/core/Makefile @@ -1863,6 +1863,7 @@ else endif $(hide) echo "ota_override_device=$(OTA_SCRIPT_OVERRIDE_DEVICE)" >> $(zip_root)/META/misc_info.txt $(hide) echo "ota_override_prop=$(OTA_SCRIPT_OVERRIDE_PROP)" >> $(zip_root)/META/misc_info.txt + $(hide) echo "ota_backuptool=$(OTA_SCRIPT_BACKUPTOOL)" >> $(zip_root)/META/misc_info.txt ifneq ($(CM_BUILD),) ifneq ($(TARGET_BUILD_VARIANT),user) @@ -1918,12 +1919,12 @@ else endif ifeq ($(WITH_GMS),true) - $(INTERNAL_OTA_PACKAGE_TARGET): backuptool := false + OTA_SCRIPT_BACKUPTOOL := false else ifneq ($(CM_BUILD),) - $(INTERNAL_OTA_PACKAGE_TARGET): backuptool := true + OTA_SCRIPT_BACKUPTOOL := true else - $(INTERNAL_OTA_PACKAGE_TARGET): backuptool := false + OTA_SCRIPT_BACKUPTOOL := false endif endif @@ -1952,7 +1953,6 @@ $(INTERNAL_OTA_PACKAGE_TARGET): $(BUILT_TARGET_FILES_PACKAGE) $(DISTTOOLS) $(block_based) \ -p $(HOST_OUT) \ -k $(KEY_CERT_PAIR) \ - --backup=$(backuptool) \ $(if $(OEM_OTA_CONFIG), -o $(OEM_OTA_CONFIG)) \ $(BUILT_TARGET_FILES_PACKAGE) $@ diff --git a/core/build-system.html b/core/build-system.html index caade583b..04fdb9d5d 100644 --- a/core/build-system.html +++ b/core/build-system.html @@ -270,6 +270,7 @@ for these). <li>Installs non-APK modules that have no tags specified. <li>Installs APKs according to the product definition files; tags are ignored for APK modules. + <li><code>ro.adb.secure=1</code> <li><code>ro.secure=1</code> <li><code>ro.debuggable=0</code> <li><code>adb</code> is disabled by default. diff --git a/core/ccache.mk b/core/ccache.mk index d27f5a595..bd60ebf26 100644 --- a/core/ccache.mk +++ b/core/ccache.mk @@ -38,13 +38,19 @@ ifneq ($(USE_CCACHE),) # See http://petereisentraut.blogspot.com/2011/09/ccache-and-clang-part-2.html export CCACHE_CPP2 := true - CCACHE_HOST_TAG := $(HOST_PREBUILT_TAG) - # If we are cross-compiling Windows binaries on Linux - # then use the linux ccache binary instead. - ifeq ($(HOST_OS)-$(BUILD_OS),windows-linux) - CCACHE_HOST_TAG := linux-$(HOST_PREBUILT_ARCH) + # Detect if the system already has ccache installed to use instead of the prebuilt + ccache := $(shell which ccache) + + ifeq ($(ccache),) + CCACHE_HOST_TAG := $(HOST_PREBUILT_TAG) + # If we are cross-compiling Windows binaries on Linux + # then use the linux ccache binary instead. + ifeq ($(HOST_OS)-$(BUILD_OS),windows-linux) + CCACHE_HOST_TAG := linux-$(HOST_PREBUILT_ARCH) + endif + ccache := prebuilts/misc/$(CCACHE_HOST_TAG)/ccache/ccache endif - ccache := prebuilts/misc/$(CCACHE_HOST_TAG)/ccache/ccache + # Check that the executable is here. ccache := $(strip $(wildcard $(ccache))) ifdef ccache diff --git a/core/main.mk b/core/main.mk index bcc94bd77..fd237baf7 100644 --- a/core/main.mk +++ b/core/main.mk @@ -283,6 +283,10 @@ ifneq (,$(user_variant)) ADDITIONAL_DEFAULT_PROPERTIES += ro.secure=1 ADDITIONAL_DEFAULT_PROPERTIES += security.perf_harden=1 + ifeq ($(user_variant),user) + ADDITIONAL_DEFAULT_PROPERTIES += ro.adb.secure=1 + endif + ifeq ($(user_variant),userdebug) # Pick up some extra useful tools tags_to_install += debug diff --git a/core/tasks/kernel.mk b/core/tasks/kernel.mk index 9d1de53df..da31b8a28 100644 --- a/core/tasks/kernel.mk +++ b/core/tasks/kernel.mk @@ -242,9 +242,14 @@ endif endif ifneq ($(USE_CCACHE),) - ccache := $(ANDROID_BUILD_TOP)/prebuilts/misc/$(HOST_PREBUILT_TAG)/ccache/ccache - # Check that the executable is here. - ccache := $(strip $(wildcard $(ccache))) + # Detect if the system already has ccache installed to use instead of the prebuilt + ccache := $(shell which ccache) + + ifeq ($(ccache),) + ccache := $(ANDROID_BUILD_TOP)/prebuilts/misc/$(HOST_PREBUILT_TAG)/ccache/ccache + # Check that the executable is here. + ccache := $(strip $(wildcard $(ccache))) + endif endif KERNEL_CROSS_COMPILE := CROSS_COMPILE="$(ccache) $(KERNEL_TOOLCHAIN_PATH)" diff --git a/core/version_defaults.mk b/core/version_defaults.mk index 5081bda0d..9794a67a4 100644 --- a/core/version_defaults.mk +++ b/core/version_defaults.mk @@ -105,7 +105,7 @@ ifeq "" "$(PLATFORM_SECURITY_PATCH)" # It must match one of the Android Security Patch Level strings of the Public Security Bulletins. # # If there is no $PLATFORM_SECURITY_PATCH set, keep it empty. - PLATFORM_SECURITY_PATCH := 2017-11-01 + PLATFORM_SECURITY_PATCH := 2018-07-01 endif ifeq "" "$(PLATFORM_BASE_OS)" diff --git a/tools/releasetools/ota_from_target_files.py b/tools/releasetools/ota_from_target_files.py index 21d5ed277..dbc416648 100755 --- a/tools/releasetools/ota_from_target_files.py +++ b/tools/releasetools/ota_from_target_files.py @@ -93,9 +93,6 @@ Usage: ota_from_target_files [flags] input_target_files output_ota_package Specifies the threshold that will be used to compute the maximum allowed stash size (defaults to 0.8). - --backup <boolean> - Enable or disable the execution of backuptool.sh. - Disabled by default. """ from __future__ import print_function @@ -1679,6 +1676,8 @@ def main(argv): OPTIONS.override_device = OPTIONS.info_dict.get("ota_override_device") if "ota_override_prop" in OPTIONS.info_dict: OPTIONS.override_prop = OPTIONS.info_dict.get("ota_override_prop") == "true" + if "ota_backuptool" in OPTIONS.info_dict: + OPTIONS.backuptool = OPTIONS.info_dict.get("ota_backuptool") == "true" # If this image was originally labelled with SELinux contexts, make sure we # also apply the labels in our new image. During building, the "file_contexts" diff --git a/tools/repopick.py b/tools/repopick.py index 9bb39aadd..d841a5997 100755 --- a/tools/repopick.py +++ b/tools/repopick.py @@ -29,6 +29,7 @@ import subprocess import re import argparse import textwrap +from functools import cmp_to_key from xml.etree import ElementTree try: @@ -102,7 +103,7 @@ def fetch_query_via_ssh(remote_url, query): def fetch_query_via_http(remote_url, query): """Given a query, fetch the change numbers via http""" - url = '{0}/changes/?q={1}&o=CURRENT_REVISION&o=ALL_REVISIONS'.format(remote_url, query) + url = '{0}/changes/?q={1}&o=CURRENT_REVISION&o=ALL_REVISIONS&o=ALL_COMMITS'.format(remote_url, query) data = urllib.request.urlopen(url).read().decode('utf-8') reviews = json.loads(data[5:]) @@ -235,12 +236,25 @@ if __name__ == '__main__': # get data on requested changes reviews = [] change_numbers = [] + + def cmp_reviews(review_a, review_b): + current_a = review_a['current_revision'] + parents_a = [r['commit'] for r in review_a['revisions'][current_a]['commit']['parents']] + current_b = review_b['current_revision'] + parents_b = [r['commit'] for r in review_b['revisions'][current_b]['commit']['parents']] + if current_a in parents_b: + return -1 + elif current_b in parents_a: + return 1 + else: + return cmp(review_a['number'], review_b['number']) + if args.topic: reviews = fetch_query(args.gerrit, 'topic:{0}'.format(args.topic)) - change_numbers = sorted([str(r['number']) for r in reviews]) + change_numbers = [str(r['number']) for r in sorted(reviews, key=cmp_to_key(cmp_reviews))] if args.query: reviews = fetch_query(args.gerrit, args.query) - change_numbers = sorted([str(r['number']) for r in reviews]) + change_numbers = [str(r['number']) for r in sorted(reviews, key=cmp_to_key(cmp_reviews))] if args.change_number: for c in args.change_number: if '-' in c: |