@@ -758,12 +758,19 @@ endif
touch $(TARGET_DIR)/usr
+.PHONY: check-tainted
+check-tainted:
+ifneq ($(BR2_TAINTED_BY),)
+ $(error Your buildroot configuration is tainted by: $(BR2_TAINTED_BY))
+endif
+
.PHONY: target-post-image
target-post-image: $(TARGETS_ROOTFS) target-finalize
@rm -f $(ROOTFS_COMMON_TAR)
@$(foreach s, $(call qstrip,$(BR2_ROOTFS_POST_IMAGE_SCRIPT)), \
$(call MESSAGE,"Executing post-image script $(s)"); \
$(EXTRA_ENV) $(s) $(BINARIES_DIR) $(call qstrip,$(BR2_ROOTFS_POST_SCRIPT_ARGS))$(sep))
+ $(if $(BR2_TAINTED_BY),@echo "WARNING: Your buildroot configuration is tainted by: $(BR2_TAINTED_BY).")
.PHONY: source
source: $(foreach p,$(PACKAGES),$(p)-all-source)
@@ -1070,6 +1077,7 @@ help:
@echo ' source - download all sources needed for offline-build'
@echo ' external-deps - list external packages used'
@echo ' legal-info - generate info about license compliance'
+ @echo ' check-tainted - check if any selected package harms build reproducibility'
@echo ' printvars - dump all the internal variables'
@echo
@echo ' make V=0|1 - 0 => quiet build (default), 1 => verbose build'
@@ -542,6 +542,10 @@ ifndef $(2)_REDISTRIBUTE
endif
endif
+ifdef $(2)_TAINTS
+BR2_TAINTED_BY+=$$($(2)_RAWNAME)
+endif
+
$(2)_REDISTRIBUTE ?= YES
$(2)_REDIST_SOURCES_DIR = $$(REDIST_SOURCES_DIR_$$(call UPPERCASE,$(4)))/$$($(2)_BASENAME_RAW)
@@ -900,6 +904,10 @@ else
$(Q)$$(foreach F,$$($(2)_LICENSE_FILES),$$(call legal-license-file,$$($(2)_RAWNAME),$$($(2)_BASENAME_RAW),$$($(2)_PKGDIR),$$(F),$$($(2)_DIR)/$$(F),$$(call UPPERCASE,$(4)))$$(sep))
endif # license files
+ifeq ($$(call qstrip,$$($(2)_TAINTS)),YES)
+ $(Q)$$(call legal-warning-pkg,$$($(2)_RAWNAME),unknown license for additional modules or dependencies)
+endif
+
ifeq ($$($(2)_SITE_METHOD),local)
# Packages without a tarball: don't save and warn
@$$(call legal-warning-nosource,$$($(2)_RAWNAME),local)