From d69ad69a938a27021adfcc2435dc1fd2ad0c8e1a Mon Sep 17 00:00:00 2001 From: Bob Badour Date: Tue, 16 Feb 2021 19:02:14 -0800 Subject: [PATCH] [LSC] Add LOCAL_LICENSE_KINDS to system/core Added SPDX-license-identifier-Apache-2.0 to: bootstat/Android.bp cli-test/Android.bp code_coverage/Android.bp cpio/Android.bp debuggerd/crasher/Android.bp debuggerd/proto/Android.bp diagnose_usb/Android.bp fs_mgr/libdm/Android.bp fs_mgr/libfiemap/Android.bp fs_mgr/liblp/Android.bp fs_mgr/libsnapshot/Android.bp fs_mgr/libstorage_literals/Android.bp fs_mgr/libvbmeta/Android.bp fs_mgr/tests/Android.bp fs_mgr/tools/Android.bp gatekeeperd/Android.bp healthd/Android.bp healthd/testdata/Android.bp init/Android.bp init/Android.mk init/sysprop/Android.bp init/test_kill_services/Android.bp init/test_service/Android.bp libappfuse/Android.bp libasyncio/Android.bp libbinderwrapper/Android.bp libcrypto_utils/Android.bp libcrypto_utils/tests/Android.bp libdiskconfig/Android.bp libgrallocusage/Android.bp libkeyutils/mini_keyctl/Android.bp libmodprobe/Android.bp libnetutils/Android.bp libpackagelistparser/Android.bp libprocessgroup/Android.bp libprocessgroup/cgrouprc/Android.bp libprocessgroup/cgrouprc_format/Android.bp libprocessgroup/profiles/Android.bp libprocessgroup/setup/Android.bp libqtaguid/Android.bp libsparse/Android.bp libstats/push_compat/Android.bp libsuspend/Android.bp libsync/Android.bp libsystem/Android.bp libsysutils/Android.bp libusbhost/Android.bp libutils/Android.bp libvndksupport/Android.bp libvndksupport/tests/Android.bp llkd/Android.bp llkd/tests/Android.bp property_service/libpropertyinfoparser/Android.bp property_service/libpropertyinfoserializer/Android.bp property_service/property_info_checker/Android.bp qemu_pipe/Android.bp reboot/Android.bp rootdir/Android.bp rootdir/Android.mk rootdir/avb/Android.bp rootdir/avb/Android.mk run-as/Android.bp sdcard/Android.bp set-verity-state/Android.bp shell_and_utilities/Android.bp storaged/Android.bp toolbox/Android.bp trusty/apploader/Android.bp trusty/confirmationui/Android.bp trusty/confirmationui/fuzz/Android.bp trusty/coverage/Android.bp trusty/fuzz/Android.bp trusty/fuzz/test/Android.bp trusty/gatekeeper/Android.bp trusty/gatekeeper/fuzz/Android.bp trusty/keymaster/Android.bp trusty/keymaster/fuzz/Android.bp trusty/libtrusty/Android.bp trusty/libtrusty/tipc-test/Android.bp trusty/secure_dpu/Android.bp trusty/storage/interface/Android.bp trusty/storage/lib/Android.bp trusty/storage/proxy/Android.bp trusty/storage/tests/Android.bp trusty/utils/spiproxyd/Android.bp trusty/utils/trusty-ut-ctrl/Android.bp usbd/Android.bp watchdogd/Android.bp Added SPDX-license-identifier-Apache-2.0 SPDX-license-identifier-BSD to: debuggerd/Android.bp fastboot/Android.bp libkeyutils/Android.bp Added SPDX-license-identifier-Apache-2.0 SPDX-license-identifier-BSD SPDX-license-identifier-MIT to: libcutils/Android.bp Added SPDX-license-identifier-Apache-2.0 SPDX-license-identifier-MIT to: fs_mgr/Android.bp fs_mgr/libfs_avb/Android.bp trusty/Android.bp trusty/utils/rpmb_dev/Android.bp Added SPDX-license-identifier-BSD to: fastboot/fuzzy_fastboot/Android.bp Bug: 68860345 Bug: 151177513 Bug: 151953481 Test: m all Exempt-From-Owner-Approval: janitorial work Change-Id: Id740a7d2884556081fdb68876584b25eb95e1bef --- bootstat/Android.bp | 4 ++ cli-test/Android.bp | 4 ++ code_coverage/Android.bp | 4 ++ cpio/Android.bp | 4 ++ debuggerd/Android.bp | 28 +++++++++++++ debuggerd/crasher/Android.bp | 4 ++ debuggerd/proto/Android.bp | 4 ++ diagnose_usb/Android.bp | 4 ++ fastboot/Android.bp | 28 +++++++++++++ fastboot/fuzzy_fastboot/Android.bp | 9 ++++ fs_mgr/Android.bp | 28 +++++++++++++ fs_mgr/libdm/Android.bp | 4 ++ fs_mgr/libfiemap/Android.bp | 4 ++ fs_mgr/libfs_avb/Android.bp | 10 +++++ fs_mgr/liblp/Android.bp | 4 ++ fs_mgr/libsnapshot/Android.bp | 4 ++ fs_mgr/libstorage_literals/Android.bp | 4 ++ fs_mgr/libvbmeta/Android.bp | 4 ++ fs_mgr/tests/Android.bp | 4 ++ fs_mgr/tools/Android.bp | 4 ++ gatekeeperd/Android.bp | 4 ++ healthd/Android.bp | 4 ++ healthd/testdata/Android.bp | 4 ++ init/Android.bp | 17 ++++++++ init/Android.mk | 9 ++++ init/sysprop/Android.bp | 9 ++++ init/test_kill_services/Android.bp | 9 ++++ init/test_service/Android.bp | 9 ++++ libappfuse/Android.bp | 4 ++ libasyncio/Android.bp | 4 ++ libbinderwrapper/Android.bp | 4 ++ libcrypto_utils/Android.bp | 4 ++ libcrypto_utils/tests/Android.bp | 4 ++ libcutils/Android.bp | 31 ++++++++++++++ libdiskconfig/Android.bp | 4 ++ libgrallocusage/Android.bp | 17 ++++++++ libkeyutils/Android.bp | 28 +++++++++++++ libkeyutils/mini_keyctl/Android.bp | 4 ++ libmodprobe/Android.bp | 4 ++ libnetutils/Android.bp | 17 ++++++++ libpackagelistparser/Android.bp | 4 ++ libprocessgroup/Android.bp | 4 ++ libprocessgroup/cgrouprc/Android.bp | 4 ++ libprocessgroup/cgrouprc_format/Android.bp | 4 ++ libprocessgroup/profiles/Android.bp | 4 ++ libprocessgroup/setup/Android.bp | 4 ++ libqtaguid/Android.bp | 4 ++ libsparse/Android.bp | 4 ++ libstats/push_compat/Android.bp | 5 ++- libsuspend/Android.bp | 4 ++ libsync/Android.bp | 17 ++++++++ libsystem/Android.bp | 4 ++ libsysutils/Android.bp | 4 ++ libusbhost/Android.bp | 4 ++ libutils/Android.bp | 17 ++++++++ libvndksupport/Android.bp | 4 ++ libvndksupport/tests/Android.bp | 4 ++ llkd/Android.bp | 4 ++ llkd/tests/Android.bp | 4 ++ .../libpropertyinfoparser/Android.bp | 4 ++ .../libpropertyinfoserializer/Android.bp | 4 ++ .../property_info_checker/Android.bp | 4 ++ qemu_pipe/Android.bp | 4 ++ reboot/Android.bp | 4 ++ rootdir/Android.bp | 4 ++ rootdir/Android.mk | 12 ++++++ rootdir/avb/Android.bp | 4 ++ rootdir/avb/Android.mk | 14 +++++++ run-as/Android.bp | 17 ++++++++ sdcard/Android.bp | 4 ++ set-verity-state/Android.bp | 4 ++ shell_and_utilities/Android.bp | 4 ++ storaged/Android.bp | 4 ++ toolbox/Android.bp | 17 ++++++++ trusty/Android.bp | 42 +++++++++++++++++++ trusty/apploader/Android.bp | 4 ++ trusty/confirmationui/Android.bp | 4 ++ trusty/confirmationui/fuzz/Android.bp | 4 ++ trusty/coverage/Android.bp | 4 ++ trusty/fuzz/Android.bp | 4 ++ trusty/fuzz/test/Android.bp | 4 ++ trusty/gatekeeper/Android.bp | 4 ++ trusty/gatekeeper/fuzz/Android.bp | 4 ++ trusty/keymaster/Android.bp | 5 ++- trusty/keymaster/fuzz/Android.bp | 4 ++ trusty/libtrusty/Android.bp | 4 ++ trusty/libtrusty/tipc-test/Android.bp | 4 ++ trusty/secure_dpu/Android.bp | 4 ++ trusty/storage/interface/Android.bp | 4 ++ trusty/storage/lib/Android.bp | 4 ++ trusty/storage/proxy/Android.bp | 4 ++ trusty/storage/tests/Android.bp | 4 ++ trusty/utils/rpmb_dev/Android.bp | 10 +++++ trusty/utils/spiproxyd/Android.bp | 4 ++ trusty/utils/trusty-ut-ctrl/Android.bp | 4 ++ usbd/Android.bp | 4 ++ watchdogd/Android.bp | 4 ++ 97 files changed, 695 insertions(+), 2 deletions(-) create mode 100644 trusty/Android.bp diff --git a/bootstat/Android.bp b/bootstat/Android.bp index 5192f5e1a..545a06f20 100644 --- a/bootstat/Android.bp +++ b/bootstat/Android.bp @@ -14,6 +14,10 @@ // limitations under the License. // +package { + default_applicable_licenses: ["Android-Apache-2.0"], +} + bootstat_lib_src_files = [ "boot_event_record_store.cpp", ] diff --git a/cli-test/Android.bp b/cli-test/Android.bp index 37a1d1b37..59618b473 100644 --- a/cli-test/Android.bp +++ b/cli-test/Android.bp @@ -1,3 +1,7 @@ +package { + default_applicable_licenses: ["Android-Apache-2.0"], +} + cc_binary { name: "cli-test", host_supported: true, diff --git a/code_coverage/Android.bp b/code_coverage/Android.bp index b51c80288..2cb1617ef 100644 --- a/code_coverage/Android.bp +++ b/code_coverage/Android.bp @@ -1,4 +1,8 @@ +package { + default_applicable_licenses: ["Android-Apache-2.0"], +} + prebuilt_etc { name: "code_coverage.policy", sub_dir: "seccomp_policy", diff --git a/cpio/Android.bp b/cpio/Android.bp index baa031907..16af079b1 100644 --- a/cpio/Android.bp +++ b/cpio/Android.bp @@ -1,5 +1,9 @@ // Copyright 2005 The Android Open Source Project +package { + default_applicable_licenses: ["Android-Apache-2.0"], +} + cc_binary_host { name: "mkbootfs", srcs: ["mkbootfs.c"], diff --git a/debuggerd/Android.bp b/debuggerd/Android.bp index 53f85bf32..fb274ec03 100644 --- a/debuggerd/Android.bp +++ b/debuggerd/Android.bp @@ -1,3 +1,31 @@ +package { + default_applicable_licenses: ["system_core_debuggerd_license"], +} + +// Added automatically by a large-scale-change that took the approach of +// 'apply every license found to every target'. While this makes sure we respect +// every license restriction, it may not be entirely correct. +// +// e.g. GPL in an MIT project might only apply to the contrib/ directory. +// +// Please consider splitting the single license below into multiple licenses, +// taking care not to lose any license_kind information, and overriding the +// default license using the 'licenses: [...]' property on targets as needed. +// +// For unused files, consider creating a 'fileGroup' with "//visibility:private" +// to attach the license to, and including a comment whether the files may be +// used in the current project. +// See: http://go/android-license-faq +license { + name: "system_core_debuggerd_license", + visibility: [":__subpackages__"], + license_kinds: [ + "SPDX-license-identifier-Apache-2.0", + "SPDX-license-identifier-BSD", + ], + // large-scale-change unable to identify any license_text files +} + cc_defaults { name: "debuggerd_defaults", cflags: [ diff --git a/debuggerd/crasher/Android.bp b/debuggerd/crasher/Android.bp index 61c539580..7975a3a32 100644 --- a/debuggerd/crasher/Android.bp +++ b/debuggerd/crasher/Android.bp @@ -1,3 +1,7 @@ +package { + default_applicable_licenses: ["Android-Apache-2.0"], +} + cc_defaults { name: "crasher-defaults", diff --git a/debuggerd/proto/Android.bp b/debuggerd/proto/Android.bp index bb82f032b..b78224b9c 100644 --- a/debuggerd/proto/Android.bp +++ b/debuggerd/proto/Android.bp @@ -1,3 +1,7 @@ +package { + default_applicable_licenses: ["Android-Apache-2.0"], +} + filegroup { name: "libtombstone_proto-src", srcs: ["tombstone.proto"], diff --git a/diagnose_usb/Android.bp b/diagnose_usb/Android.bp index 93d13bd56..cb79ffe91 100644 --- a/diagnose_usb/Android.bp +++ b/diagnose_usb/Android.bp @@ -1,3 +1,7 @@ +package { + default_applicable_licenses: ["Android-Apache-2.0"], +} + cc_library_static { name: "libdiagnose_usb", cflags: ["-Wall", "-Wextra", "-Werror"], diff --git a/fastboot/Android.bp b/fastboot/Android.bp index 85a19e589..1a91d1e39 100644 --- a/fastboot/Android.bp +++ b/fastboot/Android.bp @@ -14,6 +14,34 @@ // This is required because no Android.bp can include a library defined in an // Android.mk. Eventually should kill libfastboot (defined in Android.mk) +package { + default_applicable_licenses: ["system_core_fastboot_license"], +} + +// Added automatically by a large-scale-change that took the approach of +// 'apply every license found to every target'. While this makes sure we respect +// every license restriction, it may not be entirely correct. +// +// e.g. GPL in an MIT project might only apply to the contrib/ directory. +// +// Please consider splitting the single license below into multiple licenses, +// taking care not to lose any license_kind information, and overriding the +// default license using the 'licenses: [...]' property on targets as needed. +// +// For unused files, consider creating a 'fileGroup' with "//visibility:private" +// to attach the license to, and including a comment whether the files may be +// used in the current project. +// See: http://go/android-license-faq +license { + name: "system_core_fastboot_license", + visibility: [":__subpackages__"], + license_kinds: [ + "SPDX-license-identifier-Apache-2.0", + "SPDX-license-identifier-BSD", + ], + // large-scale-change unable to identify any license_text files +} + cc_library_host_static { name: "libfastboot2", diff --git a/fastboot/fuzzy_fastboot/Android.bp b/fastboot/fuzzy_fastboot/Android.bp index aa449b2fb..159c314a9 100644 --- a/fastboot/fuzzy_fastboot/Android.bp +++ b/fastboot/fuzzy_fastboot/Android.bp @@ -1,3 +1,12 @@ +package { + // See: http://go/android-license-faq + // A large-scale-change added 'default_applicable_licenses' to import + // all of the 'license_kinds' from "system_core_fastboot_license" + // to get the below license kinds: + // SPDX-license-identifier-BSD + default_applicable_licenses: ["system_core_fastboot_license"], +} + cc_test_host { name: "fuzzy_fastboot", compile_multilib: "first", diff --git a/fs_mgr/Android.bp b/fs_mgr/Android.bp index 96cc5c8ed..5356b006d 100644 --- a/fs_mgr/Android.bp +++ b/fs_mgr/Android.bp @@ -14,6 +14,34 @@ // limitations under the License. // +package { + default_applicable_licenses: ["system_core_fs_mgr_license"], +} + +// Added automatically by a large-scale-change that took the approach of +// 'apply every license found to every target'. While this makes sure we respect +// every license restriction, it may not be entirely correct. +// +// e.g. GPL in an MIT project might only apply to the contrib/ directory. +// +// Please consider splitting the single license below into multiple licenses, +// taking care not to lose any license_kind information, and overriding the +// default license using the 'licenses: [...]' property on targets as needed. +// +// For unused files, consider creating a 'fileGroup' with "//visibility:private" +// to attach the license to, and including a comment whether the files may be +// used in the current project. +// See: http://go/android-license-faq +license { + name: "system_core_fs_mgr_license", + visibility: [":__subpackages__"], + license_kinds: [ + "SPDX-license-identifier-Apache-2.0", + "SPDX-license-identifier-MIT", + ], + // large-scale-change unable to identify any license_text files +} + cc_defaults { name: "fs_mgr_defaults", sanitize: { diff --git a/fs_mgr/libdm/Android.bp b/fs_mgr/libdm/Android.bp index 0efe384af..428a7f4ec 100644 --- a/fs_mgr/libdm/Android.bp +++ b/fs_mgr/libdm/Android.bp @@ -14,6 +14,10 @@ // limitations under the License. // +package { + default_applicable_licenses: ["Android-Apache-2.0"], +} + cc_library_static { name: "libdm", defaults: ["fs_mgr_defaults"], diff --git a/fs_mgr/libfiemap/Android.bp b/fs_mgr/libfiemap/Android.bp index a62211082..1c5872e6f 100644 --- a/fs_mgr/libfiemap/Android.bp +++ b/fs_mgr/libfiemap/Android.bp @@ -14,6 +14,10 @@ // limitations under the License. // +package { + default_applicable_licenses: ["Android-Apache-2.0"], +} + cc_library_headers { name: "libfiemap_headers", recovery_available: true, diff --git a/fs_mgr/libfs_avb/Android.bp b/fs_mgr/libfs_avb/Android.bp index 45e7a30a0..c1c181a1d 100644 --- a/fs_mgr/libfs_avb/Android.bp +++ b/fs_mgr/libfs_avb/Android.bp @@ -14,6 +14,16 @@ // limitations under the License. // +package { + // See: http://go/android-license-faq + // A large-scale-change added 'default_applicable_licenses' to import + // all of the 'license_kinds' from "system_core_fs_mgr_license" + // to get the below license kinds: + // SPDX-license-identifier-Apache-2.0 + // SPDX-license-identifier-MIT + default_applicable_licenses: ["system_core_fs_mgr_license"], +} + cc_library_static { name: "libfs_avb", defaults: ["fs_mgr_defaults"], diff --git a/fs_mgr/liblp/Android.bp b/fs_mgr/liblp/Android.bp index 9517bd3d4..7e528b164 100644 --- a/fs_mgr/liblp/Android.bp +++ b/fs_mgr/liblp/Android.bp @@ -14,6 +14,10 @@ // limitations under the License. // +package { + default_applicable_licenses: ["Android-Apache-2.0"], +} + liblp_lib_deps = [ "libbase", "liblog", diff --git a/fs_mgr/libsnapshot/Android.bp b/fs_mgr/libsnapshot/Android.bp index 678adf8a7..b80860998 100644 --- a/fs_mgr/libsnapshot/Android.bp +++ b/fs_mgr/libsnapshot/Android.bp @@ -14,6 +14,10 @@ // limitations under the License. // +package { + default_applicable_licenses: ["Android-Apache-2.0"], +} + cc_defaults { name: "libsnapshot_defaults", defaults: ["fs_mgr_defaults"], diff --git a/fs_mgr/libstorage_literals/Android.bp b/fs_mgr/libstorage_literals/Android.bp index beb18ef83..635ca498c 100644 --- a/fs_mgr/libstorage_literals/Android.bp +++ b/fs_mgr/libstorage_literals/Android.bp @@ -1,4 +1,8 @@ +package { + default_applicable_licenses: ["Android-Apache-2.0"], +} + cc_library_headers { name: "libstorage_literals_headers", host_supported: true, diff --git a/fs_mgr/libvbmeta/Android.bp b/fs_mgr/libvbmeta/Android.bp index a299b6e63..c1970978e 100644 --- a/fs_mgr/libvbmeta/Android.bp +++ b/fs_mgr/libvbmeta/Android.bp @@ -14,6 +14,10 @@ // limitations under the License. // +package { + default_applicable_licenses: ["Android-Apache-2.0"], +} + libvbmeta_lib_deps = [ "libbase", "libcrypto", diff --git a/fs_mgr/tests/Android.bp b/fs_mgr/tests/Android.bp index 9ed283a1e..335da9e61 100644 --- a/fs_mgr/tests/Android.bp +++ b/fs_mgr/tests/Android.bp @@ -12,6 +12,10 @@ // See the License for the specific language governing permissions and // limitations under the License. +package { + default_applicable_licenses: ["Android-Apache-2.0"], +} + cc_test { name: "CtsFsMgrTestCases", test_suites: [ diff --git a/fs_mgr/tools/Android.bp b/fs_mgr/tools/Android.bp index d6ccc4bae..462777d13 100644 --- a/fs_mgr/tools/Android.bp +++ b/fs_mgr/tools/Android.bp @@ -14,6 +14,10 @@ // limitations under the License. // +package { + default_applicable_licenses: ["Android-Apache-2.0"], +} + cc_binary { name: "dmctl", srcs: ["dmctl.cpp"], diff --git a/gatekeeperd/Android.bp b/gatekeeperd/Android.bp index d1046dfdf..49e8085ab 100644 --- a/gatekeeperd/Android.bp +++ b/gatekeeperd/Android.bp @@ -14,6 +14,10 @@ // limitations under the License. // +package { + default_applicable_licenses: ["Android-Apache-2.0"], +} + cc_binary { name: "gatekeeperd", cflags: [ diff --git a/healthd/Android.bp b/healthd/Android.bp index 251a45bf0..ec47f68b3 100644 --- a/healthd/Android.bp +++ b/healthd/Android.bp @@ -1,3 +1,7 @@ +package { + default_applicable_licenses: ["Android-Apache-2.0"], +} + cc_library_headers { name: "libhealthd_headers", vendor_available: true, diff --git a/healthd/testdata/Android.bp b/healthd/testdata/Android.bp index 110c79a87..f212538d6 100644 --- a/healthd/testdata/Android.bp +++ b/healthd/testdata/Android.bp @@ -14,6 +14,10 @@ // limitations under the License. // +package { + default_applicable_licenses: ["Android-Apache-2.0"], +} + filegroup { name: "libhealthd_charger_test_data", srcs: ["**/*.*"], diff --git a/init/Android.bp b/init/Android.bp index 5da8e360b..3ff17672c 100644 --- a/init/Android.bp +++ b/init/Android.bp @@ -14,6 +14,23 @@ // limitations under the License. // +package { + default_applicable_licenses: ["system_core_init_license"], +} + +// Added automatically by a large-scale-change +// See: http://go/android-license-faq +license { + name: "system_core_init_license", + visibility: [":__subpackages__"], + license_kinds: [ + "SPDX-license-identifier-Apache-2.0", + ], + license_text: [ + "NOTICE", + ], +} + init_common_sources = [ "action.cpp", "action_manager.cpp", diff --git a/init/Android.mk b/init/Android.mk index 561d641c6..65ee385de 100644 --- a/init/Android.mk +++ b/init/Android.mk @@ -64,6 +64,9 @@ LOCAL_SRC_FILES := \ util.cpp \ LOCAL_MODULE := init_first_stage +LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0 +LOCAL_LICENSE_CONDITIONS := notice +LOCAL_NOTICE_FILE := $(LOCAL_PATH)/NOTICE LOCAL_MODULE_STEM := init LOCAL_FORCE_STATIC_EXECUTABLE := true @@ -137,6 +140,9 @@ endif include $(CLEAR_VARS) LOCAL_MODULE := init_system +LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0 +LOCAL_LICENSE_CONDITIONS := notice +LOCAL_NOTICE_FILE := $(LOCAL_PATH)/NOTICE LOCAL_REQUIRED_MODULES := \ init_second_stage \ @@ -145,6 +151,9 @@ include $(BUILD_PHONY_PACKAGE) include $(CLEAR_VARS) LOCAL_MODULE := init_vendor +LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0 +LOCAL_LICENSE_CONDITIONS := notice +LOCAL_NOTICE_FILE := $(LOCAL_PATH)/NOTICE ifneq ($(BOARD_BUILD_SYSTEM_ROOT_IMAGE),true) LOCAL_REQUIRED_MODULES := \ init_first_stage \ diff --git a/init/sysprop/Android.bp b/init/sysprop/Android.bp index 7582875c5..296cdc16d 100644 --- a/init/sysprop/Android.bp +++ b/init/sysprop/Android.bp @@ -1,3 +1,12 @@ +package { + // See: http://go/android-license-faq + // A large-scale-change added 'default_applicable_licenses' to import + // all of the 'license_kinds' from "system_core_init_license" + // to get the below license kinds: + // SPDX-license-identifier-Apache-2.0 + default_applicable_licenses: ["system_core_init_license"], +} + sysprop_library { name: "com.android.sysprop.init", srcs: ["InitProperties.sysprop"], diff --git a/init/test_kill_services/Android.bp b/init/test_kill_services/Android.bp index d59e548a4..37361a813 100644 --- a/init/test_kill_services/Android.bp +++ b/init/test_kill_services/Android.bp @@ -1,3 +1,12 @@ +package { + // See: http://go/android-license-faq + // A large-scale-change added 'default_applicable_licenses' to import + // all of the 'license_kinds' from "system_core_init_license" + // to get the below license kinds: + // SPDX-license-identifier-Apache-2.0 + default_applicable_licenses: ["system_core_init_license"], +} + cc_test { name: "init_kill_services_test", srcs: ["init_kill_services_test.cpp"], diff --git a/init/test_service/Android.bp b/init/test_service/Android.bp index 8bd16a74f..37bc37116 100644 --- a/init/test_service/Android.bp +++ b/init/test_service/Android.bp @@ -14,6 +14,15 @@ // limitations under the License. // +package { + // See: http://go/android-license-faq + // A large-scale-change added 'default_applicable_licenses' to import + // all of the 'license_kinds' from "system_core_init_license" + // to get the below license kinds: + // SPDX-license-identifier-Apache-2.0 + default_applicable_licenses: ["system_core_init_license"], +} + cc_binary { name: "test_service", srcs: ["test_service.cpp"], diff --git a/libappfuse/Android.bp b/libappfuse/Android.bp index ae1481f72..a9bd94ec2 100644 --- a/libappfuse/Android.bp +++ b/libappfuse/Android.bp @@ -1,5 +1,9 @@ // Copyright 2016 The Android Open Source Project +package { + default_applicable_licenses: ["Android-Apache-2.0"], +} + cc_defaults { name: "libappfuse_defaults", local_include_dirs: ["include"], diff --git a/libasyncio/Android.bp b/libasyncio/Android.bp index 44e7933c3..692e223a1 100644 --- a/libasyncio/Android.bp +++ b/libasyncio/Android.bp @@ -14,6 +14,10 @@ // limitations under the License. // +package { + default_applicable_licenses: ["Android-Apache-2.0"], +} + cc_defaults { name: "libasyncio_defaults", cflags: [ diff --git a/libbinderwrapper/Android.bp b/libbinderwrapper/Android.bp index d2487e20e..75f43eeaa 100644 --- a/libbinderwrapper/Android.bp +++ b/libbinderwrapper/Android.bp @@ -14,6 +14,10 @@ // limitations under the License. // +package { + default_applicable_licenses: ["Android-Apache-2.0"], +} + cc_defaults { name: "libbinderwrapper_defaults", diff --git a/libcrypto_utils/Android.bp b/libcrypto_utils/Android.bp index 923b29154..b33d46d50 100644 --- a/libcrypto_utils/Android.bp +++ b/libcrypto_utils/Android.bp @@ -14,6 +14,10 @@ // limitations under the License. // +package { + default_applicable_licenses: ["Android-Apache-2.0"], +} + cc_library { name: "libcrypto_utils", vendor_available: true, diff --git a/libcrypto_utils/tests/Android.bp b/libcrypto_utils/tests/Android.bp index 5aadfe203..087e83b27 100644 --- a/libcrypto_utils/tests/Android.bp +++ b/libcrypto_utils/tests/Android.bp @@ -14,6 +14,10 @@ // limitations under the License. // +package { + default_applicable_licenses: ["Android-Apache-2.0"], +} + cc_test_host { name: "libcrypto_utils_test", srcs: ["android_pubkey_test.cpp"], diff --git a/libcutils/Android.bp b/libcutils/Android.bp index c75e538d9..1bf84b4c6 100644 --- a/libcutils/Android.bp +++ b/libcutils/Android.bp @@ -14,6 +14,37 @@ // limitations under the License. // +package { + default_applicable_licenses: ["system_core_libcutils_license"], +} + +// Added automatically by a large-scale-change that took the approach of +// 'apply every license found to every target'. While this makes sure we respect +// every license restriction, it may not be entirely correct. +// +// e.g. GPL in an MIT project might only apply to the contrib/ directory. +// +// Please consider splitting the single license below into multiple licenses, +// taking care not to lose any license_kind information, and overriding the +// default license using the 'licenses: [...]' property on targets as needed. +// +// For unused files, consider creating a 'fileGroup' with "//visibility:private" +// to attach the license to, and including a comment whether the files may be +// used in the current project. +// See: http://go/android-license-faq +license { + name: "system_core_libcutils_license", + visibility: [":__subpackages__"], + license_kinds: [ + "SPDX-license-identifier-Apache-2.0", + "SPDX-license-identifier-BSD", + "SPDX-license-identifier-MIT", + ], + license_text: [ + "NOTICE", + ], +} + filegroup { name: "android_filesystem_config_header", srcs: ["include/private/android_filesystem_config.h"], diff --git a/libdiskconfig/Android.bp b/libdiskconfig/Android.bp index b92f0863d..a3d643e2c 100644 --- a/libdiskconfig/Android.bp +++ b/libdiskconfig/Android.bp @@ -1,3 +1,7 @@ +package { + default_applicable_licenses: ["Android-Apache-2.0"], +} + cc_library { name: "libdiskconfig", vendor_available: true, diff --git a/libgrallocusage/Android.bp b/libgrallocusage/Android.bp index 33ae13db6..f31b5f1a0 100644 --- a/libgrallocusage/Android.bp +++ b/libgrallocusage/Android.bp @@ -12,6 +12,23 @@ // See the License for the specific language governing permissions and // limitations under the License. +package { + default_applicable_licenses: ["system_core_libgrallocusage_license"], +} + +// Added automatically by a large-scale-change +// See: http://go/android-license-faq +license { + name: "system_core_libgrallocusage_license", + visibility: [":__subpackages__"], + license_kinds: [ + "SPDX-license-identifier-Apache-2.0", + ], + license_text: [ + "NOTICE", + ], +} + cc_library { name: "libgrallocusage", vendor_available: true, diff --git a/libkeyutils/Android.bp b/libkeyutils/Android.bp index b388e9555..9848cd8a8 100644 --- a/libkeyutils/Android.bp +++ b/libkeyutils/Android.bp @@ -1,3 +1,31 @@ +package { + default_applicable_licenses: ["system_core_libkeyutils_license"], +} + +// Added automatically by a large-scale-change that took the approach of +// 'apply every license found to every target'. While this makes sure we respect +// every license restriction, it may not be entirely correct. +// +// e.g. GPL in an MIT project might only apply to the contrib/ directory. +// +// Please consider splitting the single license below into multiple licenses, +// taking care not to lose any license_kind information, and overriding the +// default license using the 'licenses: [...]' property on targets as needed. +// +// For unused files, consider creating a 'fileGroup' with "//visibility:private" +// to attach the license to, and including a comment whether the files may be +// used in the current project. +// See: http://go/android-license-faq +license { + name: "system_core_libkeyutils_license", + visibility: [":__subpackages__"], + license_kinds: [ + "SPDX-license-identifier-Apache-2.0", + "SPDX-license-identifier-BSD", + ], + // large-scale-change unable to identify any license_text files +} + cc_library { name: "libkeyutils", cflags: ["-Werror"], diff --git a/libkeyutils/mini_keyctl/Android.bp b/libkeyutils/mini_keyctl/Android.bp index a04a3db24..417ddac18 100644 --- a/libkeyutils/mini_keyctl/Android.bp +++ b/libkeyutils/mini_keyctl/Android.bp @@ -1,3 +1,7 @@ +package { + default_applicable_licenses: ["Android-Apache-2.0"], +} + cc_library_static { name: "libmini_keyctl_static", srcs: [ diff --git a/libmodprobe/Android.bp b/libmodprobe/Android.bp index 78da46cf1..ba11dc920 100644 --- a/libmodprobe/Android.bp +++ b/libmodprobe/Android.bp @@ -1,3 +1,7 @@ +package { + default_applicable_licenses: ["Android-Apache-2.0"], +} + cc_library_static { name: "libmodprobe", cflags: [ diff --git a/libnetutils/Android.bp b/libnetutils/Android.bp index eec24151f..2864ad050 100644 --- a/libnetutils/Android.bp +++ b/libnetutils/Android.bp @@ -1,3 +1,20 @@ +package { + default_applicable_licenses: ["system_core_libnetutils_license"], +} + +// Added automatically by a large-scale-change +// See: http://go/android-license-faq +license { + name: "system_core_libnetutils_license", + visibility: [":__subpackages__"], + license_kinds: [ + "SPDX-license-identifier-Apache-2.0", + ], + license_text: [ + "NOTICE", + ], +} + cc_library_shared { name: "libnetutils", vendor_available: true, diff --git a/libpackagelistparser/Android.bp b/libpackagelistparser/Android.bp index c3f869255..81885d75c 100644 --- a/libpackagelistparser/Android.bp +++ b/libpackagelistparser/Android.bp @@ -1,3 +1,7 @@ +package { + default_applicable_licenses: ["Android-Apache-2.0"], +} + cc_library { name: "libpackagelistparser", ramdisk_available: true, diff --git a/libprocessgroup/Android.bp b/libprocessgroup/Android.bp index f1041000e..c68552d11 100644 --- a/libprocessgroup/Android.bp +++ b/libprocessgroup/Android.bp @@ -1,3 +1,7 @@ +package { + default_applicable_licenses: ["Android-Apache-2.0"], +} + cc_library_headers { name: "libprocessgroup_headers", vendor_available: true, diff --git a/libprocessgroup/cgrouprc/Android.bp b/libprocessgroup/cgrouprc/Android.bp index def069b92..0cbe0cce3 100644 --- a/libprocessgroup/cgrouprc/Android.bp +++ b/libprocessgroup/cgrouprc/Android.bp @@ -12,6 +12,10 @@ // See the License for the specific language governing permissions and // limitations under the License. +package { + default_applicable_licenses: ["Android-Apache-2.0"], +} + cc_library { name: "libcgrouprc", host_supported: true, diff --git a/libprocessgroup/cgrouprc_format/Android.bp b/libprocessgroup/cgrouprc_format/Android.bp index 6428930a2..059092419 100644 --- a/libprocessgroup/cgrouprc_format/Android.bp +++ b/libprocessgroup/cgrouprc_format/Android.bp @@ -12,6 +12,10 @@ // See the License for the specific language governing permissions and // limitations under the License. +package { + default_applicable_licenses: ["Android-Apache-2.0"], +} + cc_library_static { name: "libcgrouprc_format", host_supported: true, diff --git a/libprocessgroup/profiles/Android.bp b/libprocessgroup/profiles/Android.bp index 2d7bb5ac3..885971a7a 100644 --- a/libprocessgroup/profiles/Android.bp +++ b/libprocessgroup/profiles/Android.bp @@ -12,6 +12,10 @@ // See the License for the specific language governing permissions and // limitations under the License. +package { + default_applicable_licenses: ["Android-Apache-2.0"], +} + prebuilt_etc { name: "cgroups.json", src: "cgroups.json", diff --git a/libprocessgroup/setup/Android.bp b/libprocessgroup/setup/Android.bp index f6fc066f2..ea6c24706 100644 --- a/libprocessgroup/setup/Android.bp +++ b/libprocessgroup/setup/Android.bp @@ -14,6 +14,10 @@ // limitations under the License. // +package { + default_applicable_licenses: ["Android-Apache-2.0"], +} + cc_library_shared { name: "libprocessgroup_setup", recovery_available: true, diff --git a/libqtaguid/Android.bp b/libqtaguid/Android.bp index de632caa2..64db09580 100644 --- a/libqtaguid/Android.bp +++ b/libqtaguid/Android.bp @@ -14,6 +14,10 @@ // limitations under the License. // +package { + default_applicable_licenses: ["Android-Apache-2.0"], +} + cc_library_headers { name: "libqtaguid_headers", vendor_available: false, diff --git a/libsparse/Android.bp b/libsparse/Android.bp index 5b6ce4198..0b4b640ad 100644 --- a/libsparse/Android.bp +++ b/libsparse/Android.bp @@ -1,5 +1,9 @@ // Copyright 2010 The Android Open Source Project +package { + default_applicable_licenses: ["Android-Apache-2.0"], +} + cc_library { name: "libsparse", host_supported: true, diff --git a/libstats/push_compat/Android.bp b/libstats/push_compat/Android.bp index 43ae69d2e..4b2f40edc 100644 --- a/libstats/push_compat/Android.bp +++ b/libstats/push_compat/Android.bp @@ -19,6 +19,10 @@ // protocols. This library should only be used by DNS resolver or other // native modules on Q that log pushed atoms to statsd. // ========================================================================= +package { + default_applicable_licenses: ["Android-Apache-2.0"], +} + cc_defaults { name: "libstatspush_compat_defaults", srcs: [ @@ -65,4 +69,3 @@ cc_test { ], static_libs: ["libgmock"], } - diff --git a/libsuspend/Android.bp b/libsuspend/Android.bp index c5f1f5e0a..671de4d98 100644 --- a/libsuspend/Android.bp +++ b/libsuspend/Android.bp @@ -1,5 +1,9 @@ // Copyright 2012 The Android Open Source Project +package { + default_applicable_licenses: ["Android-Apache-2.0"], +} + cc_library { name: "libsuspend", srcs: [ diff --git a/libsync/Android.bp b/libsync/Android.bp index 4828892b8..540a246e2 100644 --- a/libsync/Android.bp +++ b/libsync/Android.bp @@ -1,3 +1,20 @@ +package { + default_applicable_licenses: ["system_core_libsync_license"], +} + +// Added automatically by a large-scale-change +// See: http://go/android-license-faq +license { + name: "system_core_libsync_license", + visibility: [":__subpackages__"], + license_kinds: [ + "SPDX-license-identifier-Apache-2.0", + ], + license_text: [ + "NOTICE", + ], +} + ndk_headers { name: "libsync_headers", from: "include/ndk", diff --git a/libsystem/Android.bp b/libsystem/Android.bp index b37b8eccd..dacc8cad3 100644 --- a/libsystem/Android.bp +++ b/libsystem/Android.bp @@ -1,3 +1,7 @@ +package { + default_applicable_licenses: ["Android-Apache-2.0"], +} + cc_library_headers { name: "libsystem_headers", vendor_available: true, diff --git a/libsysutils/Android.bp b/libsysutils/Android.bp index 3b98babb6..5f472b2ab 100644 --- a/libsysutils/Android.bp +++ b/libsysutils/Android.bp @@ -1,3 +1,7 @@ +package { + default_applicable_licenses: ["Android-Apache-2.0"], +} + cc_library { name: "libsysutils", vendor_available: true, diff --git a/libusbhost/Android.bp b/libusbhost/Android.bp index fc6f305c0..38833179b 100644 --- a/libusbhost/Android.bp +++ b/libusbhost/Android.bp @@ -14,6 +14,10 @@ // limitations under the License. // +package { + default_applicable_licenses: ["Android-Apache-2.0"], +} + cc_library { name: "libusbhost", vendor_available: true, diff --git a/libutils/Android.bp b/libutils/Android.bp index 1e7cbdb77..c9ecfa9be 100644 --- a/libutils/Android.bp +++ b/libutils/Android.bp @@ -12,6 +12,23 @@ // See the License for the specific language governing permissions and // limitations under the License. +package { + default_applicable_licenses: ["system_core_libutils_license"], +} + +// Added automatically by a large-scale-change +// See: http://go/android-license-faq +license { + name: "system_core_libutils_license", + visibility: [":__subpackages__"], + license_kinds: [ + "SPDX-license-identifier-Apache-2.0", + ], + license_text: [ + "NOTICE", + ], +} + cc_library_headers { name: "libutils_headers", vendor_available: true, diff --git a/libvndksupport/Android.bp b/libvndksupport/Android.bp index a5cece408..11c75f7b1 100644 --- a/libvndksupport/Android.bp +++ b/libvndksupport/Android.bp @@ -1,3 +1,7 @@ +package { + default_applicable_licenses: ["Android-Apache-2.0"], +} + cc_library { name: "libvndksupport", native_bridge_supported: true, diff --git a/libvndksupport/tests/Android.bp b/libvndksupport/tests/Android.bp index 2570cce95..ba700cbb9 100644 --- a/libvndksupport/tests/Android.bp +++ b/libvndksupport/tests/Android.bp @@ -12,6 +12,10 @@ // See the License for the specific language governing permissions and // limitations under the License. +package { + default_applicable_licenses: ["Android-Apache-2.0"], +} + cc_test { name: "libvndksupport-tests", srcs: [ diff --git a/llkd/Android.bp b/llkd/Android.bp index 62a637dcd..1c0e0f0a0 100644 --- a/llkd/Android.bp +++ b/llkd/Android.bp @@ -1,3 +1,7 @@ +package { + default_applicable_licenses: ["Android-Apache-2.0"], +} + cc_library_headers { name: "llkd_headers", diff --git a/llkd/tests/Android.bp b/llkd/tests/Android.bp index 6dd5938e3..3db6e85fd 100644 --- a/llkd/tests/Android.bp +++ b/llkd/tests/Android.bp @@ -12,6 +12,10 @@ // See the License for the specific language governing permissions and // limitations under the License. +package { + default_applicable_licenses: ["Android-Apache-2.0"], +} + cc_test { name: "llkd_unit_test", diff --git a/property_service/libpropertyinfoparser/Android.bp b/property_service/libpropertyinfoparser/Android.bp index 877789632..68614566b 100644 --- a/property_service/libpropertyinfoparser/Android.bp +++ b/property_service/libpropertyinfoparser/Android.bp @@ -1,3 +1,7 @@ +package { + default_applicable_licenses: ["Android-Apache-2.0"], +} + cc_library_static { name: "libpropertyinfoparser", host_supported: true, diff --git a/property_service/libpropertyinfoserializer/Android.bp b/property_service/libpropertyinfoserializer/Android.bp index f91bc3785..f260450d9 100644 --- a/property_service/libpropertyinfoserializer/Android.bp +++ b/property_service/libpropertyinfoserializer/Android.bp @@ -1,3 +1,7 @@ +package { + default_applicable_licenses: ["Android-Apache-2.0"], +} + cc_defaults { name: "propertyinfoserializer_defaults", host_supported: true, diff --git a/property_service/property_info_checker/Android.bp b/property_service/property_info_checker/Android.bp index 66f378a80..d26e35909 100644 --- a/property_service/property_info_checker/Android.bp +++ b/property_service/property_info_checker/Android.bp @@ -1,3 +1,7 @@ +package { + default_applicable_licenses: ["Android-Apache-2.0"], +} + cc_binary { name: "property_info_checker", host_supported: true, diff --git a/qemu_pipe/Android.bp b/qemu_pipe/Android.bp index ad86a4e6d..42a69db01 100644 --- a/qemu_pipe/Android.bp +++ b/qemu_pipe/Android.bp @@ -1,5 +1,9 @@ // Copyright 2011 The Android Open Source Project +package { + default_applicable_licenses: ["Android-Apache-2.0"], +} + cc_library_static { name: "libqemu_pipe", vendor_available: true, diff --git a/reboot/Android.bp b/reboot/Android.bp index cc717234e..7b243bd56 100644 --- a/reboot/Android.bp +++ b/reboot/Android.bp @@ -1,5 +1,9 @@ // Copyright 2013 The Android Open Source Project +package { + default_applicable_licenses: ["Android-Apache-2.0"], +} + cc_binary { name: "reboot", srcs: ["reboot.c"], diff --git a/rootdir/Android.bp b/rootdir/Android.bp index d63868aa4..6a80808a4 100644 --- a/rootdir/Android.bp +++ b/rootdir/Android.bp @@ -12,6 +12,10 @@ // See the License for the specific language governing permissions and // limitations under the License. +package { + default_applicable_licenses: ["Android-Apache-2.0"], +} + prebuilt_etc { name: "init.rc", src: "init.rc", diff --git a/rootdir/Android.mk b/rootdir/Android.mk index 73d11011d..c9e68f8bf 100644 --- a/rootdir/Android.mk +++ b/rootdir/Android.mk @@ -5,6 +5,8 @@ LOCAL_PATH:= $(call my-dir) include $(CLEAR_VARS) LOCAL_MODULE := init-debug.rc +LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0 +LOCAL_LICENSE_CONDITIONS := notice LOCAL_SRC_FILES := $(LOCAL_MODULE) LOCAL_MODULE_CLASS := ETC LOCAL_MODULE_PATH := $(TARGET_OUT_ETC)/init @@ -18,6 +20,8 @@ ifneq ($(filter address,$(SANITIZE_TARGET)),) include $(CLEAR_VARS) LOCAL_MODULE := asan.options +LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0 +LOCAL_LICENSE_CONDITIONS := notice LOCAL_MODULE_CLASS := ETC LOCAL_SRC_FILES := $(LOCAL_MODULE) LOCAL_MODULE_PATH := $(TARGET_OUT) @@ -29,6 +33,8 @@ ASAN_EXTRACT_FILES := ifeq ($(SANITIZE_TARGET_SYSTEM),true) include $(CLEAR_VARS) LOCAL_MODULE:= asan_extract +LOCAL_LICENSE_KINDS:= SPDX-license-identifier-Apache-2.0 +LOCAL_LICENSE_CONDITIONS:= notice LOCAL_MODULE_TAGS := optional LOCAL_MODULE_CLASS := EXECUTABLES LOCAL_SRC_FILES := asan_extract.sh @@ -47,6 +53,8 @@ endif include $(CLEAR_VARS) LOCAL_MODULE_CLASS := ETC LOCAL_MODULE := init.environ.rc +LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0 +LOCAL_LICENSE_CONDITIONS := notice LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT) EXPORT_GLOBAL_ASAN_OPTIONS := @@ -182,6 +190,8 @@ endef # sanitizer.libraries.txt include $(CLEAR_VARS) LOCAL_MODULE := sanitizer.libraries.txt +LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0 +LOCAL_LICENSE_CONDITIONS := notice LOCAL_MODULE_CLASS := ETC LOCAL_MODULE_PATH := $(TARGET_OUT_ETC) LOCAL_MODULE_STEM := $(LOCAL_MODULE) @@ -206,6 +216,8 @@ $(LOCAL_BUILT_MODULE): # adb_debug.prop in debug ramdisk include $(CLEAR_VARS) LOCAL_MODULE := adb_debug.prop +LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0 +LOCAL_LICENSE_CONDITIONS := notice LOCAL_SRC_FILES := $(LOCAL_MODULE) LOCAL_MODULE_CLASS := ETC LOCAL_MODULE_PATH := $(TARGET_DEBUG_RAMDISK_OUT) diff --git a/rootdir/avb/Android.bp b/rootdir/avb/Android.bp index 8c7caf311..cfc59a71b 100644 --- a/rootdir/avb/Android.bp +++ b/rootdir/avb/Android.bp @@ -1,3 +1,7 @@ +package { + default_applicable_licenses: ["Android-Apache-2.0"], +} + filegroup { name: "q-gsi_avbpubkey", srcs: [ diff --git a/rootdir/avb/Android.mk b/rootdir/avb/Android.mk index f71f205cc..647cfa21b 100644 --- a/rootdir/avb/Android.mk +++ b/rootdir/avb/Android.mk @@ -19,6 +19,8 @@ endif include $(CLEAR_VARS) LOCAL_MODULE := q-gsi.avbpubkey +LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0 +LOCAL_LICENSE_CONDITIONS := notice LOCAL_MODULE_CLASS := ETC LOCAL_SRC_FILES := $(LOCAL_MODULE) LOCAL_MODULE_PATH := $(my_gsi_avb_keys_path) @@ -30,6 +32,8 @@ include $(BUILD_PREBUILT) include $(CLEAR_VARS) LOCAL_MODULE := q-developer-gsi.avbpubkey +LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0 +LOCAL_LICENSE_CONDITIONS := notice LOCAL_MODULE_CLASS := ETC LOCAL_SRC_FILES := $(LOCAL_MODULE) LOCAL_MODULE_PATH := $(my_gsi_avb_keys_path) @@ -41,6 +45,8 @@ include $(BUILD_PREBUILT) include $(CLEAR_VARS) LOCAL_MODULE := r-gsi.avbpubkey +LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0 +LOCAL_LICENSE_CONDITIONS := notice LOCAL_MODULE_CLASS := ETC LOCAL_SRC_FILES := $(LOCAL_MODULE) LOCAL_MODULE_PATH := $(my_gsi_avb_keys_path) @@ -52,6 +58,8 @@ include $(BUILD_PREBUILT) include $(CLEAR_VARS) LOCAL_MODULE := r-developer-gsi.avbpubkey +LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0 +LOCAL_LICENSE_CONDITIONS := notice LOCAL_MODULE_CLASS := ETC LOCAL_SRC_FILES := $(LOCAL_MODULE) LOCAL_MODULE_PATH := $(my_gsi_avb_keys_path) @@ -63,6 +71,8 @@ include $(BUILD_PREBUILT) include $(CLEAR_VARS) LOCAL_MODULE := s-gsi.avbpubkey +LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0 +LOCAL_LICENSE_CONDITIONS := notice LOCAL_MODULE_CLASS := ETC LOCAL_SRC_FILES := $(LOCAL_MODULE) LOCAL_MODULE_PATH := $(my_gsi_avb_keys_path) @@ -74,6 +84,8 @@ include $(BUILD_PREBUILT) include $(CLEAR_VARS) LOCAL_MODULE := s-developer-gsi.avbpubkey +LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0 +LOCAL_LICENSE_CONDITIONS := notice LOCAL_MODULE_CLASS := ETC LOCAL_SRC_FILES := $(LOCAL_MODULE) LOCAL_MODULE_PATH := $(my_gsi_avb_keys_path) @@ -85,6 +97,8 @@ include $(BUILD_PREBUILT) include $(CLEAR_VARS) LOCAL_MODULE := qcar-gsi.avbpubkey +LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0 +LOCAL_LICENSE_CONDITIONS := notice LOCAL_MODULE_CLASS := ETC LOCAL_SRC_FILES := $(LOCAL_MODULE) LOCAL_MODULE_PATH := $(my_gsi_avb_keys_path) diff --git a/run-as/Android.bp b/run-as/Android.bp index accd07d01..9baee8f11 100644 --- a/run-as/Android.bp +++ b/run-as/Android.bp @@ -14,6 +14,23 @@ // limitations under the License. // +package { + default_applicable_licenses: ["system_core_run-as_license"], +} + +// Added automatically by a large-scale-change +// See: http://go/android-license-faq +license { + name: "system_core_run-as_license", + visibility: [":__subpackages__"], + license_kinds: [ + "SPDX-license-identifier-Apache-2.0", + ], + license_text: [ + "NOTICE", + ], +} + cc_binary { name: "run-as", srcs: [ diff --git a/sdcard/Android.bp b/sdcard/Android.bp index c096587ba..10a7d16c3 100644 --- a/sdcard/Android.bp +++ b/sdcard/Android.bp @@ -1,3 +1,7 @@ +package { + default_applicable_licenses: ["Android-Apache-2.0"], +} + cc_binary { srcs: ["sdcard.cpp"], name: "sdcard", diff --git a/set-verity-state/Android.bp b/set-verity-state/Android.bp index da112c906..2f0cb102b 100644 --- a/set-verity-state/Android.bp +++ b/set-verity-state/Android.bp @@ -1,5 +1,9 @@ // Copyright 2019 The Android Open Source Project +package { + default_applicable_licenses: ["Android-Apache-2.0"], +} + cc_binary { name: "set-verity-state", srcs: ["set-verity-state.cpp"], diff --git a/shell_and_utilities/Android.bp b/shell_and_utilities/Android.bp index 5e013fe82..b7d7490dc 100644 --- a/shell_and_utilities/Android.bp +++ b/shell_and_utilities/Android.bp @@ -1,3 +1,7 @@ +package { + default_applicable_licenses: ["Android-Apache-2.0"], +} + phony { name: "shell_and_utilities", required: [ diff --git a/storaged/Android.bp b/storaged/Android.bp index cc19481bc..ec27a08cb 100644 --- a/storaged/Android.bp +++ b/storaged/Android.bp @@ -14,6 +14,10 @@ * limitations under the License. */ +package { + default_applicable_licenses: ["Android-Apache-2.0"], +} + cc_defaults { name: "storaged_defaults", diff --git a/toolbox/Android.bp b/toolbox/Android.bp index 320782419..8594ec403 100644 --- a/toolbox/Android.bp +++ b/toolbox/Android.bp @@ -1,3 +1,20 @@ +package { + default_applicable_licenses: ["system_core_toolbox_license"], +} + +// Added automatically by a large-scale-change +// See: http://go/android-license-faq +license { + name: "system_core_toolbox_license", + visibility: [":__subpackages__"], + license_kinds: [ + "SPDX-license-identifier-Apache-2.0", + ], + license_text: [ + "NOTICE", + ], +} + cc_defaults { name: "toolbox_defaults", cflags: [ diff --git a/trusty/Android.bp b/trusty/Android.bp new file mode 100644 index 000000000..38c6204db --- /dev/null +++ b/trusty/Android.bp @@ -0,0 +1,42 @@ +// +// Copyright (C) 2021 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. + +package { + default_applicable_licenses: ["system_core_trusty_license"], +} + +// Added automatically by a large-scale-change that took the approach of +// 'apply every license found to every target'. While this makes sure we respect +// every license restriction, it may not be entirely correct. +// +// e.g. GPL in an MIT project might only apply to the contrib/ directory. +// +// Please consider splitting the single license below into multiple licenses, +// taking care not to lose any license_kind information, and overriding the +// default license using the 'licenses: [...]' property on targets as needed. +// +// For unused files, consider creating a 'fileGroup' with "//visibility:private" +// to attach the license to, and including a comment whether the files may be +// used in the current project. +// See: http://go/android-license-faq +license { + name: "system_core_trusty_license", + visibility: [":__subpackages__"], + license_kinds: [ + "SPDX-license-identifier-Apache-2.0", + "SPDX-license-identifier-MIT", + ], + // large-scale-change unable to identify any license_text files +} diff --git a/trusty/apploader/Android.bp b/trusty/apploader/Android.bp index 7e97cb8f7..4411964ad 100644 --- a/trusty/apploader/Android.bp +++ b/trusty/apploader/Android.bp @@ -14,6 +14,10 @@ // limitations under the License. // +package { + default_applicable_licenses: ["Android-Apache-2.0"], +} + cc_binary { name: "trusty_apploader", vendor: true, diff --git a/trusty/confirmationui/Android.bp b/trusty/confirmationui/Android.bp index 09d48ad3f..092241528 100644 --- a/trusty/confirmationui/Android.bp +++ b/trusty/confirmationui/Android.bp @@ -19,6 +19,10 @@ // to only building on ARM if they include assembly. Individual makefiles // are responsible for having their own logic, for fine-grained control. +package { + default_applicable_licenses: ["Android-Apache-2.0"], +} + cc_binary { name: "android.hardware.confirmationui@1.0-service.trusty", relative_install_path: "hw", diff --git a/trusty/confirmationui/fuzz/Android.bp b/trusty/confirmationui/fuzz/Android.bp index 635966fef..12bb70a69 100644 --- a/trusty/confirmationui/fuzz/Android.bp +++ b/trusty/confirmationui/fuzz/Android.bp @@ -12,6 +12,10 @@ // See the License for the specific language governing permissions and // limitations under the License. +package { + default_applicable_licenses: ["Android-Apache-2.0"], +} + cc_fuzz { name: "trusty_confirmationui_fuzzer", defaults: ["trusty_fuzzer_defaults"], diff --git a/trusty/coverage/Android.bp b/trusty/coverage/Android.bp index daa6f033b..fb30604fa 100644 --- a/trusty/coverage/Android.bp +++ b/trusty/coverage/Android.bp @@ -12,6 +12,10 @@ // See the License for the specific language governing permissions and // limitations under the License. +package { + default_applicable_licenses: ["Android-Apache-2.0"], +} + cc_library { name: "libtrusty_coverage", vendor_available: true, diff --git a/trusty/fuzz/Android.bp b/trusty/fuzz/Android.bp index ad138166b..c8c9fe94e 100644 --- a/trusty/fuzz/Android.bp +++ b/trusty/fuzz/Android.bp @@ -12,6 +12,10 @@ // See the License for the specific language governing permissions and // limitations under the License. +package { + default_applicable_licenses: ["Android-Apache-2.0"], +} + cc_defaults { name: "trusty_fuzzer_defaults", shared_libs: [ diff --git a/trusty/fuzz/test/Android.bp b/trusty/fuzz/test/Android.bp index 66e103d86..932121a9d 100644 --- a/trusty/fuzz/test/Android.bp +++ b/trusty/fuzz/test/Android.bp @@ -12,6 +12,10 @@ // See the License for the specific language governing permissions and // limitations under the License. +package { + default_applicable_licenses: ["Android-Apache-2.0"], +} + cc_fuzz { name: "trusty_test_fuzzer", defaults: ["trusty_fuzzer_defaults"], diff --git a/trusty/gatekeeper/Android.bp b/trusty/gatekeeper/Android.bp index e553af1b5..81f012fdc 100644 --- a/trusty/gatekeeper/Android.bp +++ b/trusty/gatekeeper/Android.bp @@ -19,6 +19,10 @@ // to only building on ARM if they include assembly. Individual makefiles // are responsible for having their own logic, for fine-grained control. +package { + default_applicable_licenses: ["Android-Apache-2.0"], +} + cc_binary { name: "android.hardware.gatekeeper@1.0-service.trusty", defaults: ["hidl_defaults"], diff --git a/trusty/gatekeeper/fuzz/Android.bp b/trusty/gatekeeper/fuzz/Android.bp index 7ffa77674..6ff68b626 100644 --- a/trusty/gatekeeper/fuzz/Android.bp +++ b/trusty/gatekeeper/fuzz/Android.bp @@ -12,6 +12,10 @@ // See the License for the specific language governing permissions and // limitations under the License. +package { + default_applicable_licenses: ["Android-Apache-2.0"], +} + cc_fuzz { name: "trusty_gatekeeper_fuzzer", defaults: ["trusty_fuzzer_defaults"], diff --git a/trusty/keymaster/Android.bp b/trusty/keymaster/Android.bp index 27e1a3f5b..6d24e8497 100644 --- a/trusty/keymaster/Android.bp +++ b/trusty/keymaster/Android.bp @@ -14,6 +14,10 @@ // limitations under the License. // +package { + default_applicable_licenses: ["Android-Apache-2.0"], +} + cc_binary { name: "android.hardware.keymaster@3.0-service.trusty", defaults: ["hidl_defaults"], @@ -107,4 +111,3 @@ cc_binary { "-Werror", ], } - diff --git a/trusty/keymaster/fuzz/Android.bp b/trusty/keymaster/fuzz/Android.bp index da9f9ec65..93dc4eb3f 100644 --- a/trusty/keymaster/fuzz/Android.bp +++ b/trusty/keymaster/fuzz/Android.bp @@ -12,6 +12,10 @@ // See the License for the specific language governing permissions and // limitations under the License. +package { + default_applicable_licenses: ["Android-Apache-2.0"], +} + cc_fuzz { name: "trusty_keymaster_fuzzer", defaults: ["trusty_fuzzer_defaults"], diff --git a/trusty/libtrusty/Android.bp b/trusty/libtrusty/Android.bp index e0161a56b..086051d0e 100644 --- a/trusty/libtrusty/Android.bp +++ b/trusty/libtrusty/Android.bp @@ -12,6 +12,10 @@ // See the License for the specific language governing permissions and // limitations under the License. +package { + default_applicable_licenses: ["Android-Apache-2.0"], +} + cc_defaults { name: "libtrusty_defaults", srcs: ["trusty.c"], diff --git a/trusty/libtrusty/tipc-test/Android.bp b/trusty/libtrusty/tipc-test/Android.bp index 5e60d2811..c7a8ae1cf 100644 --- a/trusty/libtrusty/tipc-test/Android.bp +++ b/trusty/libtrusty/tipc-test/Android.bp @@ -12,6 +12,10 @@ // See the License for the specific language governing permissions and // limitations under the License. +package { + default_applicable_licenses: ["Android-Apache-2.0"], +} + cc_test { name: "tipc-test", vendor: true, diff --git a/trusty/secure_dpu/Android.bp b/trusty/secure_dpu/Android.bp index 0d57cea94..39dd0b969 100644 --- a/trusty/secure_dpu/Android.bp +++ b/trusty/secure_dpu/Android.bp @@ -12,6 +12,10 @@ // See the License for the specific language governing permissions and // limitations under the License. +package { + default_applicable_licenses: ["Android-Apache-2.0"], +} + cc_library_headers { name: "secure_dpu_headers", vendor: true, diff --git a/trusty/storage/interface/Android.bp b/trusty/storage/interface/Android.bp index 18b4a5f90..d031b0c1e 100644 --- a/trusty/storage/interface/Android.bp +++ b/trusty/storage/interface/Android.bp @@ -14,6 +14,10 @@ // limitations under the License. // +package { + default_applicable_licenses: ["Android-Apache-2.0"], +} + cc_library_static { name: "libtrustystorageinterface", vendor: true, diff --git a/trusty/storage/lib/Android.bp b/trusty/storage/lib/Android.bp index 2fba17edd..f28308b04 100644 --- a/trusty/storage/lib/Android.bp +++ b/trusty/storage/lib/Android.bp @@ -14,6 +14,10 @@ // limitations under the License. // +package { + default_applicable_licenses: ["Android-Apache-2.0"], +} + cc_library_static { name: "libtrustystorage", vendor: true, diff --git a/trusty/storage/proxy/Android.bp b/trusty/storage/proxy/Android.bp index b93facbbc..a47143538 100644 --- a/trusty/storage/proxy/Android.bp +++ b/trusty/storage/proxy/Android.bp @@ -14,6 +14,10 @@ // limitations under the License. // +package { + default_applicable_licenses: ["Android-Apache-2.0"], +} + cc_binary { name: "storageproxyd", vendor: true, diff --git a/trusty/storage/tests/Android.bp b/trusty/storage/tests/Android.bp index 536c3ca7a..891f543c4 100644 --- a/trusty/storage/tests/Android.bp +++ b/trusty/storage/tests/Android.bp @@ -14,6 +14,10 @@ // limitations under the License. // +package { + default_applicable_licenses: ["Android-Apache-2.0"], +} + cc_test { name: "secure-storage-unit-test", vendor: true, diff --git a/trusty/utils/rpmb_dev/Android.bp b/trusty/utils/rpmb_dev/Android.bp index e923e829c..c5853efcb 100644 --- a/trusty/utils/rpmb_dev/Android.bp +++ b/trusty/utils/rpmb_dev/Android.bp @@ -11,6 +11,16 @@ // See the License for the specific language governing permissions and // limitations under the License. +package { + // See: http://go/android-license-faq + // A large-scale-change added 'default_applicable_licenses' to import + // all of the 'license_kinds' from "system_core_trusty_license" + // to get the below license kinds: + // SPDX-license-identifier-Apache-2.0 + // SPDX-license-identifier-MIT + default_applicable_licenses: ["system_core_trusty_license"], +} + cc_binary { name: "rpmb_dev", vendor: true, diff --git a/trusty/utils/spiproxyd/Android.bp b/trusty/utils/spiproxyd/Android.bp index c1d0987a3..81f3e73e5 100644 --- a/trusty/utils/spiproxyd/Android.bp +++ b/trusty/utils/spiproxyd/Android.bp @@ -12,6 +12,10 @@ // See the License for the specific language governing permissions and // limitations under the License. +package { + default_applicable_licenses: ["Android-Apache-2.0"], +} + cc_binary { name: "spiproxyd", vendor: true, diff --git a/trusty/utils/trusty-ut-ctrl/Android.bp b/trusty/utils/trusty-ut-ctrl/Android.bp index 664696a0d..6fc2a48d7 100644 --- a/trusty/utils/trusty-ut-ctrl/Android.bp +++ b/trusty/utils/trusty-ut-ctrl/Android.bp @@ -12,6 +12,10 @@ // See the License for the specific language governing permissions and // limitations under the License. +package { + default_applicable_licenses: ["Android-Apache-2.0"], +} + cc_binary { name: "trusty-ut-ctrl", vendor: true, diff --git a/usbd/Android.bp b/usbd/Android.bp index 6a339a109..22d171de4 100644 --- a/usbd/Android.bp +++ b/usbd/Android.bp @@ -1,3 +1,7 @@ +package { + default_applicable_licenses: ["Android-Apache-2.0"], +} + cc_binary { name: "usbd", init_rc: ["usbd.rc"], diff --git a/watchdogd/Android.bp b/watchdogd/Android.bp index 0fbc33cd2..03882082f 100644 --- a/watchdogd/Android.bp +++ b/watchdogd/Android.bp @@ -1,3 +1,7 @@ +package { + default_applicable_licenses: ["Android-Apache-2.0"], +} + cc_binary { name: "watchdogd", recovery_available: true,