Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e1bbce3f authored by Wei Li's avatar Wei Li
Browse files

Prepare for switching to notice files generated by Soong and fix allowlist for NOTICE.xml.gz

Bug: 338342381
Bug: 330949782
Test: presubmits
Change-Id: Ieba71b80634bbb7383e89ded0f29d5e2171dcbdd
parent 4a5f4354
Loading
Loading
Loading
Loading
+3 −4
Original line number Original line Diff line number Diff line
@@ -1982,7 +1982,7 @@ target_system_dlkm_notice_file_xml_gz := $(TARGET_OUT_INTERMEDIATES)/NOTICE_SYST
installed_system_dlkm_notice_xml_gz := $(TARGET_OUT_SYSTEM_DLKM)/etc/NOTICE.xml.gz
installed_system_dlkm_notice_xml_gz := $(TARGET_OUT_SYSTEM_DLKM)/etc/NOTICE.xml.gz


ALL_INSTALLED_NOTICE_FILES := \
ALL_INSTALLED_NOTICE_FILES := \
  $(if $(USE_SOONG_DEFINED_SYSTEM_IMAGE),,$(installed_notice_html_or_xml_gz)) \
  $(installed_notice_html_or_xml_gz) \
  $(installed_vendor_notice_xml_gz) \
  $(installed_vendor_notice_xml_gz) \
  $(installed_product_notice_xml_gz) \
  $(installed_product_notice_xml_gz) \
  $(installed_system_ext_notice_xml_gz) \
  $(installed_system_ext_notice_xml_gz) \
@@ -1993,7 +1993,8 @@ ALL_INSTALLED_NOTICE_FILES := \


# $1 installed file path, e.g. out/target/product/vsoc_x86_64/system_ext/etc/NOTICE.xml.gz
# $1 installed file path, e.g. out/target/product/vsoc_x86_64/system_ext/etc/NOTICE.xml.gz
define is-notice-file
define is-notice-file
$(if $(findstring $1,$(ALL_INSTALLED_NOTICE_FILES)),Y)
$(if $(filter true,$(PRODUCT_USE_SOONG_NOTICE_XML)),, \
  $(if $(findstring $1,$(ALL_INSTALLED_NOTICE_FILES)),Y))
endef
endef


# Notice files are copied to TARGET_OUT_NOTICE_FILES as a side-effect of their module
# Notice files are copied to TARGET_OUT_NOTICE_FILES as a side-effect of their module
@@ -2069,9 +2070,7 @@ endif


endif # PRODUCT_NOTICE_SPLIT
endif # PRODUCT_NOTICE_SPLIT


ifneq ($(USE_SOONG_DEFINED_SYSTEM_IMAGE),true)
ALL_DEFAULT_INSTALLED_MODULES += $(installed_notice_html_or_xml_gz)
ALL_DEFAULT_INSTALLED_MODULES += $(installed_notice_html_or_xml_gz)
endif


need_vendor_notice:=false
need_vendor_notice:=false
ifeq ($(BUILDING_VENDOR_BOOT_IMAGE),true)
ifeq ($(BUILDING_VENDOR_BOOT_IMAGE),true)
+30 −2
Original line number Original line Diff line number Diff line
@@ -17,14 +17,14 @@ $(eval $(call xml-notice-rule,$(target_notice_file_xml_gz),"System image",$(syst


$(eval $(call text-notice-rule,$(target_notice_file_txt),"System image",$(system_notice_file_message),$(SYSTEM_NOTICE_DEPS),$(SYSTEM_NOTICE_DEPS)))
$(eval $(call text-notice-rule,$(target_notice_file_txt),"System image",$(system_notice_file_message),$(SYSTEM_NOTICE_DEPS),$(SYSTEM_NOTICE_DEPS)))


ifneq ($(USE_SOONG_DEFINED_SYSTEM_IMAGE),true)
ifneq ($(PRODUCT_USE_SOONG_NOTICE_XML),true)
$(installed_notice_html_or_xml_gz): $(target_notice_file_xml_gz)
$(installed_notice_html_or_xml_gz): $(target_notice_file_xml_gz)
	$(copy-file-to-target)
	$(copy-file-to-target)
endif
endif
endif
endif


$(call declare-1p-target,$(target_notice_file_xml_gz))
$(call declare-1p-target,$(target_notice_file_xml_gz))
ifneq ($(USE_SOONG_DEFINED_SYSTEM_IMAGE),true)
ifneq ($(PRODUCT_USE_SOONG_NOTICE_XML),true)
$(call declare-1p-target,$(installed_notice_html_or_xml_gz))
$(call declare-1p-target,$(installed_notice_html_or_xml_gz))
endif
endif
endif
endif
@@ -44,12 +44,16 @@ $(eval $(call xml-notice-rule,$(target_vendor_notice_file_xml_gz),"Vendor image"
         "Notices for files contained in all filesystem images except system/system_ext/product/odm/vendor_dlkm/odm_dlkm in this directory:", \
         "Notices for files contained in all filesystem images except system/system_ext/product/odm/vendor_dlkm/odm_dlkm in this directory:", \
         $(VENDOR_NOTICE_DEPS),$(VENDOR_NOTICE_DEPS)))
         $(VENDOR_NOTICE_DEPS),$(VENDOR_NOTICE_DEPS)))


ifneq ($(PRODUCT_USE_SOONG_NOTICE_XML),true)
$(installed_vendor_notice_xml_gz): $(target_vendor_notice_file_xml_gz)
$(installed_vendor_notice_xml_gz): $(target_vendor_notice_file_xml_gz)
	$(copy-file-to-target)
	$(copy-file-to-target)
endif


$(call declare-1p-target,$(target_vendor_notice_file_xml_gz))
$(call declare-1p-target,$(target_vendor_notice_file_xml_gz))
ifneq ($(PRODUCT_USE_SOONG_NOTICE_XML),true)
$(call declare-1p-target,$(installed_vendor_notice_xml_gz))
$(call declare-1p-target,$(installed_vendor_notice_xml_gz))
endif
endif
endif


.PHONY: odmlicense
.PHONY: odmlicense
odmlicense: $(call corresponding-license-metadata, $(ODM_NOTICE_DEPS)) reportmissinglicenses
odmlicense: $(call corresponding-license-metadata, $(ODM_NOTICE_DEPS)) reportmissinglicenses
@@ -63,12 +67,16 @@ $(eval $(call xml-notice-rule,$(target_odm_notice_file_xml_gz),"ODM filesystem i
         "Notices for files contained in the odm filesystem image in this directory:", \
         "Notices for files contained in the odm filesystem image in this directory:", \
         $(ODM_NOTICE_DEPS),$(ODM_NOTICE_DEPS)))
         $(ODM_NOTICE_DEPS),$(ODM_NOTICE_DEPS)))


ifneq ($(PRODUCT_USE_SOONG_NOTICE_XML),true)
$(installed_odm_notice_xml_gz): $(target_odm_notice_file_xml_gz)
$(installed_odm_notice_xml_gz): $(target_odm_notice_file_xml_gz)
	$(copy-file-to-target)
	$(copy-file-to-target)
endif


$(call declare-1p-target,$(target_odm_notice_file_xml_gz))
$(call declare-1p-target,$(target_odm_notice_file_xml_gz))
ifneq ($(PRODUCT_USE_SOONG_NOTICE_XML),true)
$(call declare-1p-target,$(installed_odm_notice_xml_gz))
$(call declare-1p-target,$(installed_odm_notice_xml_gz))
endif
endif
endif


.PHONY: oemlicense
.PHONY: oemlicense
oemlicense: $(call corresponding-license-metadata, $(OEM_NOTICE_DEPS)) reportmissinglicenses
oemlicense: $(call corresponding-license-metadata, $(OEM_NOTICE_DEPS)) reportmissinglicenses
@@ -85,12 +93,16 @@ $(eval $(call xml-notice-rule,$(target_product_notice_file_xml_gz),"Product imag
         "Notices for files contained in the product filesystem image in this directory:", \
         "Notices for files contained in the product filesystem image in this directory:", \
         $(PRODUCT_NOTICE_DEPS),$(PRODUCT_NOTICE_DEPS)))
         $(PRODUCT_NOTICE_DEPS),$(PRODUCT_NOTICE_DEPS)))


ifneq ($(PRODUCT_USE_SOONG_NOTICE_XML),true)
$(installed_product_notice_xml_gz): $(target_product_notice_file_xml_gz)
$(installed_product_notice_xml_gz): $(target_product_notice_file_xml_gz)
	$(copy-file-to-target)
	$(copy-file-to-target)
endif


$(call declare-1p-target,$(target_product_notice_file_xml_gz))
$(call declare-1p-target,$(target_product_notice_file_xml_gz))
ifneq ($(PRODUCT_USE_SOONG_NOTICE_XML),true)
$(call declare-1p-target,$(installed_product_notice_xml_gz))
$(call declare-1p-target,$(installed_product_notice_xml_gz))
endif
endif
endif


.PHONY: systemextlicense
.PHONY: systemextlicense
systemextlicense: $(call corresponding-license-metadata, $(SYSTEM_EXT_NOTICE_DEPS)) reportmissinglicenses
systemextlicense: $(call corresponding-license-metadata, $(SYSTEM_EXT_NOTICE_DEPS)) reportmissinglicenses
@@ -104,12 +116,16 @@ $(eval $(call xml-notice-rule,$(target_system_ext_notice_file_xml_gz),"System_ex
         "Notices for files contained in the system_ext filesystem image in this directory:", \
         "Notices for files contained in the system_ext filesystem image in this directory:", \
         $(SYSTEM_EXT_NOTICE_DEPS),$(SYSTEM_EXT_NOTICE_DEPS)))
         $(SYSTEM_EXT_NOTICE_DEPS),$(SYSTEM_EXT_NOTICE_DEPS)))


ifneq ($(PRODUCT_USE_SOONG_NOTICE_XML),true)
$(installed_system_ext_notice_xml_gz): $(target_system_ext_notice_file_xml_gz)
$(installed_system_ext_notice_xml_gz): $(target_system_ext_notice_file_xml_gz)
	$(copy-file-to-target)
	$(copy-file-to-target)
endif


$(call declare-1p-target,$(target_system_ext_notice_file_xml_gz))
$(call declare-1p-target,$(target_system_ext_notice_file_xml_gz))
ifneq ($(PRODUCT_USE_SOONG_NOTICE_XML),true)
$(call declare-1p-target,$(installed_system_ext_notice_xml_gz))
$(call declare-1p-target,$(installed_system_ext_notice_xml_gz))
endif
endif
endif


.PHONY: vendor_dlkmlicense
.PHONY: vendor_dlkmlicense
vendor_dlkmlicense: $(call corresponding-license-metadata, $(VENDOR_DLKM_NOTICE_DEPS)) reportmissinglicenses
vendor_dlkmlicense: $(call corresponding-license-metadata, $(VENDOR_DLKM_NOTICE_DEPS)) reportmissinglicenses
@@ -123,12 +139,16 @@ $(eval $(call xml-notice-rule,$(target_vendor_dlkm_notice_file_xml_gz),"Vendor_d
         "Notices for files contained in the vendor_dlkm filesystem image in this directory:", \
         "Notices for files contained in the vendor_dlkm filesystem image in this directory:", \
         $(VENDOR_DLKM_NOTICE_DEPS),$(VENDOR_DLKM_NOTICE_DEPS)))
         $(VENDOR_DLKM_NOTICE_DEPS),$(VENDOR_DLKM_NOTICE_DEPS)))


ifneq ($(PRODUCT_USE_SOONG_NOTICE_XML),true)
$(installed_vendor_dlkm_notice_xml_gz): $(target_vendor_dlkm_notice_file_xml_gz)
$(installed_vendor_dlkm_notice_xml_gz): $(target_vendor_dlkm_notice_file_xml_gz)
	$(copy-file-to-target)
	$(copy-file-to-target)
endif


$(call declare-1p-target,$(target_vendor_dlkm_notice_file_xml_gz))
$(call declare-1p-target,$(target_vendor_dlkm_notice_file_xml_gz))
ifneq ($(PRODUCT_USE_SOONG_NOTICE_XML),true)
$(call declare-1p-target,$(installed_vendor_dlkm_notice_xml_gz))
$(call declare-1p-target,$(installed_vendor_dlkm_notice_xml_gz))
endif
endif
endif


.PHONY: odm_dlkmlicense
.PHONY: odm_dlkmlicense
odm_dlkmlicense: $(call corresponding-license-metadata, $(ODM_DLKM_NOTICE_DEPS)) reportmissinglicenses
odm_dlkmlicense: $(call corresponding-license-metadata, $(ODM_DLKM_NOTICE_DEPS)) reportmissinglicenses
@@ -142,12 +162,16 @@ $(eval $(call xml-notice-rule,$(target_odm_dlkm_notice_file_xml_gz),"ODM_dlkm fi
         "Notices for files contained in the odm_dlkm filesystem image in this directory:", \
         "Notices for files contained in the odm_dlkm filesystem image in this directory:", \
         $(ODM_DLKM_NOTICE_DEPS),$(ODM_DLKM_NOTICE_DEPS)))
         $(ODM_DLKM_NOTICE_DEPS),$(ODM_DLKM_NOTICE_DEPS)))


ifneq ($(PRODUCT_USE_SOONG_NOTICE_XML),true)
$(installed_odm_dlkm_notice_xml_gz): $(target_odm_dlkm_notice_file_xml_gz)
$(installed_odm_dlkm_notice_xml_gz): $(target_odm_dlkm_notice_file_xml_gz)
	$(copy-file-to-target)
	$(copy-file-to-target)
endif


$(call declare-1p-target,$(target_odm_dlkm_notice_file_xml_gz))
$(call declare-1p-target,$(target_odm_dlkm_notice_file_xml_gz))
ifneq ($(PRODUCT_USE_SOONG_NOTICE_XML),true)
$(call declare-1p-target,$(installed_odm_dlkm_notice_xml_gz))
$(call declare-1p-target,$(installed_odm_dlkm_notice_xml_gz))
endif
endif
endif


.PHONY: system_dlkmlicense
.PHONY: system_dlkmlicense
system_dlkmlicense: $(call corresponding-license-metadata, $(SYSTEM_DLKM_NOTICE_DEPS)) reportmissinglicenses
system_dlkmlicense: $(call corresponding-license-metadata, $(SYSTEM_DLKM_NOTICE_DEPS)) reportmissinglicenses
@@ -161,11 +185,15 @@ $(eval $(call xml-notice-rule,$(target_system_dlkm_notice_file_xml_gz),"System_d
         "Notices for files contained in the system_dlkm filesystem image in this directory:", \
         "Notices for files contained in the system_dlkm filesystem image in this directory:", \
         $(SYSTEM_DLKM_NOTICE_DEPS),$(SYSTEM_DLKM_NOTICE_DEPS)))
         $(SYSTEM_DLKM_NOTICE_DEPS),$(SYSTEM_DLKM_NOTICE_DEPS)))


ifneq ($(PRODUCT_USE_SOONG_NOTICE_XML),true)
$(installed_system_dlkm_notice_xml_gz): $(target_system_dlkm_notice_file_xml_gz)
$(installed_system_dlkm_notice_xml_gz): $(target_system_dlkm_notice_file_xml_gz)
	$(copy-file-to-target)
	$(copy-file-to-target)
endif


$(call declare-1p-target,$(target_system_dlkm_notice_file_xml_gz))
$(call declare-1p-target,$(target_system_dlkm_notice_file_xml_gz))
ifneq ($(PRODUCT_USE_SOONG_NOTICE_XML),true)
$(call declare-1p-target,$(installed_sysetm_dlkm_notice_xml_gz))
$(call declare-1p-target,$(installed_sysetm_dlkm_notice_xml_gz))
endif
endif
endif


endif # not TARGET_BUILD_APPS
endif # not TARGET_BUILD_APPS
+0 −2
Original line number Original line Diff line number Diff line
# Known diffs that are installed in either system image with the configuration
# Known diffs that are installed in either system image with the configuration
# b/353429422
# b/353429422
init.environ.rc
init.environ.rc
# b/338342381
etc/NOTICE.xml.gz