Skip to content

Commit 0390580

Browse files
committed
[LSC] Add LOCAL_LICENSE_KINDS to build/make
Added SPDX-license-identifier-Apache-2.0 to: target/product/sysconfig/Android.bp tools/apicheck/Android.bp tools/product_config/Android.bp tools/releasetools/Android.bp tools/signapk/Android.bp tools/signtos/Android.bp tools/zipalign/Android.bp tools/ziptime/Android.bp Added SPDX-license-identifier-Apache-2.0 SPDX-license-identifier-BSD SPDX-license-identifier-CC-BY SPDX-license-identifier-GPL SPDX-license-identifier-GPL-2.0 SPDX-license-identifier-LGPL SPDX-license-identifier-MIT legacy_not_a_contribution legacy_restricted to: Android.bp Added SPDX-license-identifier-Apache-2.0 SPDX-license-identifier-BSD SPDX-license-identifier-CC-BY SPDX-license-identifier-GPL SPDX-license-identifier-MIT to: tools/Android.bp tools/droiddoc/Android.bp Added SPDX-license-identifier-Apache-2.0 SPDX-license-identifier-BSD SPDX-license-identifier-GPL SPDX-license-identifier-GPL-2.0 SPDX-license-identifier-LGPL SPDX-license-identifier-MIT to: core/base_rules.mk core/dex_preopt_libart.mk core/package_internal.mk Added SPDX-license-identifier-Apache-2.0 legacy_not_a_contribution to: target/board/Android.mk Added legacy_restricted to: core/tasks/tools/package-modules.mk target/product/gsi/Android.bp target/product/gsi/Android.mk target/product/security/Android.bp target/product/security/Android.mk tools/acp/Android.bp tools/atree/Android.bp tools/fs_config/Android.bp tools/fs_config/Android.mk tools/fs_get_stats/Android.bp tools/libhost/Android.bp Bug: 68860345 Bug: 151177513 Bug: 151953481 Test: m all Exempt-From-Owner-Approval: janitorial work Change-Id: Id67a4eb1312940f999643b2ae57f45f34f120724
1 parent 25d0acf commit 0390580

File tree

26 files changed

+257
-2
lines changed

26 files changed

+257
-2
lines changed

Diff for: Android.bp

+49
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
//
2+
// Copyright (C) 2021 The Android Open Source Project
3+
//
4+
// Licensed under the Apache License, Version 2.0 (the "License");
5+
// you may not use this file except in compliance with the License.
6+
// You may obtain a copy of the License at
7+
//
8+
// http://www.apache.org/licenses/LICENSE-2.0
9+
//
10+
// Unless required by applicable law or agreed to in writing, software
11+
// distributed under the License is distributed on an "AS IS" BASIS,
12+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
// See the License for the specific language governing permissions and
14+
// limitations under the License.
15+
16+
package {
17+
default_applicable_licenses: ["build_make_license"],
18+
}
19+
20+
// Added automatically by a large-scale-change that took the approach of
21+
// 'apply every license found to every target'. While this makes sure we respect
22+
// every license restriction, it may not be entirely correct.
23+
//
24+
// e.g. GPL in an MIT project might only apply to the contrib/ directory.
25+
//
26+
// Please consider splitting the single license below into multiple licenses,
27+
// taking care not to lose any license_kind information, and overriding the
28+
// default license using the 'licenses: [...]' property on targets as needed.
29+
//
30+
// For unused files, consider creating a 'fileGroup' with "//visibility:private"
31+
// to attach the license to, and including a comment whether the files may be
32+
// used in the current project.
33+
// See: http://go/android-license-faq
34+
license {
35+
name: "build_make_license",
36+
visibility: [":__subpackages__"],
37+
license_kinds: [
38+
"SPDX-license-identifier-Apache-2.0",
39+
"SPDX-license-identifier-BSD",
40+
"SPDX-license-identifier-CC-BY",
41+
"SPDX-license-identifier-GPL",
42+
"SPDX-license-identifier-GPL-2.0",
43+
"SPDX-license-identifier-LGPL",
44+
"SPDX-license-identifier-MIT",
45+
"legacy_not_a_contribution",
46+
"legacy_restricted",
47+
],
48+
// large-scale-change unable to identify any license_text files
49+
}

Diff for: core/base_rules.mk

+2
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ endif
2828
###########################################################
2929

3030
LOCAL_MODULE := $(strip $(LOCAL_MODULE))
31+
LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0 SPDX-license-identifier-BSD SPDX-license-identifier-GPL SPDX-license-identifier-GPL-2.0 SPDX-license-identifier-LGPL SPDX-license-identifier-MIT
32+
LOCAL_LICENSE_CONDITIONS := notice restricted
3133
ifeq ($(LOCAL_MODULE),)
3234
$(error $(LOCAL_PATH): LOCAL_MODULE is not defined)
3335
endif

Diff for: core/dex_preopt_libart.mk

+2
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,8 @@ ifneq (,$(my_copy_pairs))
6060

6161
include $(CLEAR_VARS)
6262
LOCAL_MODULE := dexpreopt_bootjar.$(my_suffix)
63+
LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0 SPDX-license-identifier-BSD SPDX-license-identifier-GPL SPDX-license-identifier-GPL-2.0 SPDX-license-identifier-LGPL SPDX-license-identifier-MIT
64+
LOCAL_LICENSE_CONDITIONS := notice restricted
6365
LOCAL_PREBUILT_MODULE_FILE := $(my_first_src)
6466
LOCAL_MODULE_PATH := $(dir $(my_first_dest))
6567
LOCAL_MODULE_STEM := $(notdir $(my_first_dest))

Diff for: core/package_internal.mk

+2
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@ ifneq ($(strip $(LOCAL_MODULE)),)
3939
$(error $(LOCAL_PATH): Package modules may not define LOCAL_MODULE)
4040
endif
4141
LOCAL_MODULE := $(LOCAL_PACKAGE_NAME)
42+
LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0 SPDX-license-identifier-BSD SPDX-license-identifier-GPL SPDX-license-identifier-GPL-2.0 SPDX-license-identifier-LGPL SPDX-license-identifier-MIT
43+
LOCAL_LICENSE_CONDITIONS := notice restricted
4244

4345
ifneq ($(strip $(LOCAL_MODULE_CLASS)),)
4446
$(error $(LOCAL_PATH): Package modules may not set LOCAL_MODULE_CLASS)

Diff for: core/tasks/tools/package-modules.mk

+2
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ my_makefile := $(lastword $(filter-out $(lastword $(MAKEFILE_LIST)),$(MAKEFILE_L
1919

2020
include $(CLEAR_VARS)
2121
LOCAL_MODULE := $(my_package_name)
22+
LOCAL_LICENSE_KINDS := legacy_restricted
23+
LOCAL_LICENSE_CONDITIONS := restricted
2224
LOCAL_MODULE_CLASS := PACKAGING
2325
LOCAL_MODULE_STEM := $(my_package_name).zip
2426
LOCAL_UNINSTALLABLE_MODULE := true

Diff for: target/board/Android.mk

+8
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@ ifdef DEVICE_MANIFEST_FILE
3535
# $(DEVICE_MANIFEST_FILE) can be a list of files
3636
include $(CLEAR_VARS)
3737
LOCAL_MODULE := vendor_manifest.xml
38+
LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0 legacy_not_a_contribution
39+
LOCAL_LICENSE_CONDITIONS := by_exception_only not_allowed notice
3840
LOCAL_MODULE_STEM := manifest.xml
3941
LOCAL_MODULE_CLASS := ETC
4042
LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR)/etc/vintf
@@ -65,6 +67,8 @@ endif
6567
my_fragment_files := $$($$(my_fragment_files_var))
6668
include $$(CLEAR_VARS)
6769
LOCAL_MODULE := vendor_manifest_$(1).xml
70+
LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0 legacy_not_a_contribution
71+
LOCAL_LICENSE_CONDITIONS := by_exception_only not_allowed notice
6872
LOCAL_MODULE_STEM := manifest_$(1).xml
6973
LOCAL_MODULE_CLASS := ETC
7074
LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR)/etc/vintf
@@ -94,6 +98,8 @@ ifdef ODM_MANIFEST_FILES
9498
# ODM_MANIFEST_FILES is a list of files that is combined and installed as the default ODM manifest.
9599
include $(CLEAR_VARS)
96100
LOCAL_MODULE := odm_manifest.xml
101+
LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0 legacy_not_a_contribution
102+
LOCAL_LICENSE_CONDITIONS := by_exception_only not_allowed notice
97103
LOCAL_MODULE_STEM := manifest.xml
98104
LOCAL_MODULE_CLASS := ETC
99105
LOCAL_MODULE_RELATIVE_PATH := vintf
@@ -124,6 +130,8 @@ endif
124130
my_fragment_files := $$($$(my_fragment_files_var))
125131
include $$(CLEAR_VARS)
126132
LOCAL_MODULE := odm_manifest_$(1).xml
133+
LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0 legacy_not_a_contribution
134+
LOCAL_LICENSE_CONDITIONS := by_exception_only not_allowed notice
127135
LOCAL_MODULE_STEM := manifest_$(1).xml
128136
LOCAL_MODULE_CLASS := ETC
129137
LOCAL_MODULE_RELATIVE_PATH := vintf

Diff for: target/product/gsi/Android.bp

+9
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,15 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15+
package {
16+
// See: http://go/android-license-faq
17+
// A large-scale-change added 'default_applicable_licenses' to import
18+
// all of the 'license_kinds' from "build_make_license"
19+
// to get the below license kinds:
20+
// legacy_restricted
21+
default_applicable_licenses: ["build_make_license"],
22+
}
23+
1524
filegroup {
1625
name: "vndk_lib_lists",
1726
srcs: [

Diff for: target/product/gsi/Android.mk

+12
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,8 @@ $(check-vndk-list-timestamp): $(INTERNAL_VNDK_LIB_LIST) $(LATEST_VNDK_LIB_LIST)
6363
# Script to update the latest VNDK lib list
6464
include $(CLEAR_VARS)
6565
LOCAL_MODULE := update-vndk-list.sh
66+
LOCAL_LICENSE_KINDS := legacy_restricted
67+
LOCAL_LICENSE_CONDITIONS := restricted
6668
LOCAL_MODULE_CLASS := EXECUTABLES
6769
LOCAL_MODULE_STEM := $(LOCAL_MODULE)
6870
LOCAL_IS_HOST_MODULE := true
@@ -146,6 +148,8 @@ ifneq ($(BOARD_VNDK_VERSION),)
146148
147149
include $(CLEAR_VARS)
148150
LOCAL_MODULE := vndk_package
151+
LOCAL_LICENSE_KINDS := legacy_restricted
152+
LOCAL_LICENSE_CONDITIONS := restricted
149153
# Filter LLNDK libs moved to APEX to avoid pulling them into /system/LIB
150154
LOCAL_REQUIRED_MODULES := \
151155
$(filter-out $(LLNDK_MOVED_TO_APEX_LIBRARIES),$(LLNDK_LIBRARIES))
@@ -169,6 +173,8 @@ ifneq ($(BOARD_VNDK_VERSION),current)
169173
_vndk_versions += $(BOARD_VNDK_VERSION)
170174
endif
171175
LOCAL_MODULE := vndk_apex_snapshot_package
176+
LOCAL_LICENSE_KINDS := legacy_restricted
177+
LOCAL_LICENSE_CONDITIONS := restricted
172178
LOCAL_REQUIRED_MODULES := $(foreach vndk_ver,$(_vndk_versions),com.android.vndk.v$(vndk_ver))
173179
include $(BUILD_PHONY_PACKAGE)
174180
@@ -181,6 +187,8 @@ endif # BOARD_VNDK_VERSION is set
181187
182188
include $(CLEAR_VARS)
183189
LOCAL_MODULE := gsi_skip_mount.cfg
190+
LOCAL_LICENSE_KINDS := legacy_restricted
191+
LOCAL_LICENSE_CONDITIONS := restricted
184192
LOCAL_MODULE_STEM := skip_mount.cfg
185193
LOCAL_SRC_FILES := $(LOCAL_MODULE)
186194
LOCAL_MODULE_CLASS := ETC
@@ -204,6 +212,8 @@ include $(BUILD_PREBUILT)
204212
205213
include $(CLEAR_VARS)
206214
LOCAL_MODULE := init.gsi.rc
215+
LOCAL_LICENSE_KINDS := legacy_restricted
216+
LOCAL_LICENSE_CONDITIONS := restricted
207217
LOCAL_SRC_FILES := $(LOCAL_MODULE)
208218
LOCAL_MODULE_CLASS := ETC
209219
LOCAL_SYSTEM_EXT_MODULE := true
@@ -214,6 +224,8 @@ include $(BUILD_PREBUILT)
214224
215225
include $(CLEAR_VARS)
216226
LOCAL_MODULE := init.vndk-nodef.rc
227+
LOCAL_LICENSE_KINDS := legacy_restricted
228+
LOCAL_LICENSE_CONDITIONS := restricted
217229
LOCAL_SRC_FILES := $(LOCAL_MODULE)
218230
LOCAL_MODULE_CLASS := ETC
219231
LOCAL_SYSTEM_EXT_MODULE := true

Diff for: target/product/security/Android.bp

+9
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,13 @@
11
// AOSP test certificate
2+
package {
3+
// See: http://go/android-license-faq
4+
// A large-scale-change added 'default_applicable_licenses' to import
5+
// all of the 'license_kinds' from "build_make_license"
6+
// to get the below license kinds:
7+
// legacy_restricted
8+
default_applicable_licenses: ["build_make_license"],
9+
}
10+
211
android_app_certificate {
312
name: "aosp-testkey",
413
certificate: "testkey",

Diff for: target/product/security/Android.mk

+10
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ LOCAL_PATH:= $(call my-dir)
55
include $(CLEAR_VARS)
66

77
LOCAL_MODULE := verity_key
8+
LOCAL_LICENSE_KINDS := legacy_restricted
9+
LOCAL_LICENSE_CONDITIONS := restricted
810
LOCAL_SRC_FILES := $(LOCAL_MODULE)
911
LOCAL_MODULE_CLASS := ETC
1012
LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT)
@@ -24,6 +26,8 @@ include $(BUILD_PREBUILT)
2426
ifneq ($(BOARD_BUILD_SYSTEM_ROOT_IMAGE),true)
2527
include $(CLEAR_VARS)
2628
LOCAL_MODULE := verity_key_ramdisk
29+
LOCAL_LICENSE_KINDS := legacy_restricted
30+
LOCAL_LICENSE_CONDITIONS := restricted
2731
LOCAL_MODULE_CLASS := ETC
2832
LOCAL_SRC_FILES := verity_key
2933
LOCAL_MODULE_STEM := verity_key
@@ -37,6 +41,8 @@ ifdef PRODUCT_ADB_KEYS
3741
ifneq ($(filter eng userdebug,$(TARGET_BUILD_VARIANT)),)
3842
include $(CLEAR_VARS)
3943
LOCAL_MODULE := adb_keys
44+
LOCAL_LICENSE_KINDS := legacy_restricted
45+
LOCAL_LICENSE_CONDITIONS := restricted
4046
LOCAL_MODULE_CLASS := ETC
4147
LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT)
4248
LOCAL_PREBUILT_MODULE_FILE := $(PRODUCT_ADB_KEYS)
@@ -51,6 +57,8 @@ endif
5157
include $(CLEAR_VARS)
5258

5359
LOCAL_MODULE := otacerts
60+
LOCAL_LICENSE_KINDS := legacy_restricted
61+
LOCAL_LICENSE_CONDITIONS := restricted
5462
LOCAL_MODULE_CLASS := ETC
5563
LOCAL_MODULE_STEM := otacerts.zip
5664
LOCAL_MODULE_PATH := $(TARGET_OUT_ETC)/security
@@ -65,6 +73,8 @@ $(LOCAL_BUILT_MODULE): $(SOONG_ZIP) $(DEFAULT_SYSTEM_DEV_CERTIFICATE).x509.pem
6573
include $(CLEAR_VARS)
6674

6775
LOCAL_MODULE := otacerts.recovery
76+
LOCAL_LICENSE_KINDS := legacy_restricted
77+
LOCAL_LICENSE_CONDITIONS := restricted
6878
LOCAL_MODULE_CLASS := ETC
6979
LOCAL_MODULE_STEM := otacerts.zip
7080
LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/system/etc/security

Diff for: target/product/sysconfig/Android.bp

+5-1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15+
package {
16+
default_applicable_licenses: ["Android-Apache-2.0"],
17+
}
18+
1519
prebuilt_etc {
1620
name: "preinstalled-packages-platform-aosp-product.xml",
1721
product_specific: true,
@@ -30,4 +34,4 @@ prebuilt_etc {
3034
product_specific: true,
3135
sub_dir: "sysconfig",
3236
src: "preinstalled-packages-platform-handheld-product.xml",
33-
}
37+
}

Diff for: tools/Android.bp

+13
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,19 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15+
package {
16+
// See: http://go/android-license-faq
17+
// A large-scale-change added 'default_applicable_licenses' to import
18+
// all of the 'license_kinds' from "build_make_license"
19+
// to get the below license kinds:
20+
// SPDX-license-identifier-Apache-2.0
21+
// SPDX-license-identifier-BSD
22+
// SPDX-license-identifier-CC-BY
23+
// SPDX-license-identifier-GPL
24+
// SPDX-license-identifier-MIT
25+
default_applicable_licenses: ["build_make_license"],
26+
}
27+
1528
python_binary_host {
1629
name: "generate-self-extracting-archive",
1730
srcs: ["generate-self-extracting-archive.py"],

Diff for: tools/acp/Android.bp

+9
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,15 @@
22
//
33
// Custom version of cp.
44

5+
package {
6+
// See: http://go/android-license-faq
7+
// A large-scale-change added 'default_applicable_licenses' to import
8+
// all of the 'license_kinds' from "build_make_license"
9+
// to get the below license kinds:
10+
// legacy_restricted
11+
default_applicable_licenses: ["build_make_license"],
12+
}
13+
514
cc_binary_host {
615

716
srcs: ["acp.c"],

Diff for: tools/apicheck/Android.bp

+4
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15+
package {
16+
default_applicable_licenses: ["Android-Apache-2.0"],
17+
}
18+
1519
java_binary_host {
1620
name: "apicheck",
1721
wrapper: "etc/apicheck",

Diff for: tools/atree/Android.bp

+9
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,15 @@
22
//
33
// Copies files into the directory structure described by a manifest
44

5+
package {
6+
// See: http://go/android-license-faq
7+
// A large-scale-change added 'default_applicable_licenses' to import
8+
// all of the 'license_kinds' from "build_make_license"
9+
// to get the below license kinds:
10+
// legacy_restricted
11+
default_applicable_licenses: ["build_make_license"],
12+
}
13+
514
cc_binary_host {
615
name: "atree",
716
srcs: [

Diff for: tools/droiddoc/Android.bp

+13
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,19 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15+
package {
16+
// See: http://go/android-license-faq
17+
// A large-scale-change added 'default_applicable_licenses' to import
18+
// all of the 'license_kinds' from "build_make_license"
19+
// to get the below license kinds:
20+
// SPDX-license-identifier-Apache-2.0
21+
// SPDX-license-identifier-BSD
22+
// SPDX-license-identifier-CC-BY
23+
// SPDX-license-identifier-GPL
24+
// SPDX-license-identifier-MIT
25+
default_applicable_licenses: ["build_make_license"],
26+
}
27+
1528
droiddoc_exported_dir {
1629
name: "droiddoc-templates-pdk",
1730
path: "templates-pdk",

Diff for: tools/fs_config/Android.bp

+9
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,15 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15+
package {
16+
// See: http://go/android-license-faq
17+
// A large-scale-change added 'default_applicable_licenses' to import
18+
// all of the 'license_kinds' from "build_make_license"
19+
// to get the below license kinds:
20+
// legacy_restricted
21+
default_applicable_licenses: ["build_make_license"],
22+
}
23+
1524
bootstrap_go_package {
1625
name: "soong-fs_config",
1726
pkgPath: "android/soong/fs_config",

0 commit comments

Comments
 (0)