From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id AEF95146D5A for ; Wed, 4 Sep 2024 23:30:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.137.202.133 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725492644; cv=none; b=E0OdhQwrNFW1KqJ1EFugSYVOF7Y/aatT3AAzx3BkCr+O8SHzGoTBodo2fWme/cbmECH1erxIoIo9rAZndrwqMtlbEMMdPnIxx+rppjPiiNl4yYGt1mia+lcqfhruGaMaXp/kbroW9tCVf3UUdooljY2lImZvr5iJLDfphJ+O1f4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725492644; c=relaxed/simple; bh=AISoWvoDLUsbKOkbqHOBrCGFGXZANYZYgl+AIM2MtVw=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=IdazFqiF8ig17bDo5UIs5u4nF/1G0jwj05ZeMAaQC3h9SKHXZ7ZDAoKpZtajIiIpm/FQeT246EHfk5igL3ARu4aCFeH8kOHiDcnrDgmPThO5bi8iobIFNK186xtnviNTEwbKMRekGsJhL4gnvli+QG91oHsqqIUFzUe3dOhWIOg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=kernel.org; spf=none smtp.mailfrom=infradead.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b=y4dE2ilI; arc=none smtp.client-ip=198.137.202.133 Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=kernel.org Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=infradead.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="y4dE2ilI" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Sender:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description; bh=2dhKnhnfsZ/RZmy/1W09p3EfiPey6ft6ExetwBA2DnM=; b=y4dE2ilIn0ZorVibdKDPG+d4S5 Td3QwHvda4de6e8uPz/VVH+Enx4YMtqZLxU/3nQntsZltuI3Ky/OD0XBTf2q1Zpo/8bM+3lMMPnG5 Ki0GpVnYeevw9NUpxOwURBl85qyfkarUw1/yFYalyGsGekV/mq1W2IpwXZd5CiEP7+OXFVT5JUjuH JGLgebTm7UC0kKCdyAMtzN7kwqL09GQvwRBBiphm1v/ZHrhspAiqYLHMnY1hySEIFMXHxfN1KZXmH a3rvuN648ADMGSS18OXx/NKa0JCdtGBB3BwsBbwrKIzs48bGnlvgg7jPuMgiJoW5XaTriLYbaa5mh 9IisNAbg==; Received: from mcgrof by bombadil.infradead.org with local (Exim 4.97.1 #2 (Red Hat Linux)) id 1slzSS-00000006MRr-49yV; Wed, 04 Sep 2024 23:30:40 +0000 From: Luis Chamberlain To: kdevops@lists.linux.dev, chuck.lever@oracle.com, da.gomez@samsung.com, jlayton@kernel.org Cc: mcgrof@kernel.org Subject: [PATCH 1/5] Makefile: add support for selective yamlconfig Date: Wed, 4 Sep 2024 16:30:36 -0700 Message-ID: <20240904233040.1516250-2-mcgrof@kernel.org> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240904233040.1516250-1-mcgrof@kernel.org> References: <20240904233040.1516250-1-mcgrof@kernel.org> Precedence: bulk X-Mailing-List: kdevops@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: Luis Chamberlain Leverage support for selective yaml config support, this will let us start removing the requirement to use Makefiles to append variables into extra_vars.yaml, all we need to do is use the "output yaml" on the symbols we want converted over. Signed-off-by: Luis Chamberlain --- Makefile | 3 ++- Makefile.extra_vars | 11 +++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Makefile b/Makefile index 9d4e954811ab..f9f2b04c6586 100644 --- a/Makefile +++ b/Makefile @@ -9,6 +9,7 @@ EXTRAVERSION = all: deps export KCONFIG_DIR=$(CURDIR)/scripts/kconfig +export KCONFIG_YAMLCFG=$(CURDIR)/.extra_vars_auto.yaml include $(KCONFIG_DIR)/kconfig.Makefile include Makefile.subtrees @@ -250,7 +251,7 @@ mrproper: $(Q)rm -f terraform/*/terraform.tfvars $(Q)rm -f $(KDEVOPS_NODES) $(Q)rm -f $(KDEVOPS_HOSTFILE) $(KDEVOPS_MRPROPER) - $(Q)rm -f .config .config.old extra_vars.yaml + $(Q)rm -f .config .config.old extra_vars.yaml $(KCONFIG_YAMLCFG) $(Q)rm -f playbooks/secret.yml $(KDEVOPS_EXTRA_ADDON_DEST) $(Q)rm -rf include diff --git a/Makefile.extra_vars b/Makefile.extra_vars index 1fbacb3441fe..d77ea67c20d4 100644 --- a/Makefile.extra_vars +++ b/Makefile.extra_vars @@ -45,13 +45,12 @@ endef #$(patsubst $(firstword $(subst =, ,$(1)))=%,$(firstword $(subst =, ,$(1))):%,$(1)) #$(patsubst $(firstword $(subst =, ,$(1))=)%,$(firstword $(subst =, , $(1):)%,$(1)),$(1)) -# We can transform most of .config things we need to using -# looping on ANSIBLE_EXTRA_ARGS and converting those with -# this target. If you need to do more complex fancy stuff -# extend the EXTRA_VAR_INPUTS variable in your workflow with -# your custom stuff. +# extra_vars.yaml first gets the selective yaml entries which kconfig writes +# to for us in KCONFIG_YAMLCFG, then we expand on it with more dynamic data. +# We use awk NF to just remove empty lines. most_extra_vars: - @echo --- > $(KDEVOPS_EXTRA_VARS) + @awk NF $(KCONFIG_YAMLCFG) > $(KDEVOPS_EXTRA_VARS) + @echo "# end of of yamlconfig auto output yaml variables " >> $(KDEVOPS_EXTRA_VARS) @$(foreach exp,$(ANSIBLE_EXTRA_ARGS),echo $(call YAML_ENTRY,$(subst =,: ,$(exp)) >> $(KDEVOPS_EXTRA_VARS))) # ANSIBLE_EXTRA_ARGS_SEPARATED is to be used for variables in .config -- 2.43.0