Commit 851b4413 authored by Michael Shigorin's avatar Michael Shigorin

profile.mk: defer RC expansion

Just spotted that .disk/profile.tgz would hold distcfg.mk with pre-expanded $(HOME) from build host which is both info leak (user account that was used to build the particular image) and just wrong given that the in-image profile archive was conceived as a means to pass that part of build environment over instead of tying it to vendor. Morale: premature optimization is premature.
parent d804203b
......@@ -27,7 +27,7 @@ NO_CACHE ?= 1
export BUILDDIR NO_CACHE
CONFIG := $(BUILDDIR)/distcfg.mk
RC := $(HOME)/.mkimage/profiles.mk
RC = $(HOME)/.mkimage/profiles.mk
# step 1: initialize the off-tree mkimage profile (BUILDDIR)
# NB: our output MUST go into stderr to escape POSTPROC
......@@ -95,7 +95,7 @@ endif
# put the derived SUBPROFILE_DIRS here to get it logged in clear text by the way
profile/finalize:
@$(call put,SUBPROFILE_DIRS = $$(notdir $$(subst @,/,$$(SUBPROFILES))))
@if [ -s $(RC) ]; then $(call put,-include $(RC)); fi
@if [ -s $(RC) ]; then $(call put,-include $(value RC)); fi
@$(call put,endif)
@mp-commit "$(BUILDDIR)" "image configuration finalized"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment