public inbox for kdevops@lists.linux.dev
 help / color / mirror / Atom feed
From: Chuck Lever <cel@kernel.org>
To: <kdevops@lists.linux.dev>
Cc: Chuck Lever <chuck.lever@oracle.com>
Subject: [PATCH v2 35/37] Makefile: Set TOPDIR_PATH and generate its sha256sum at run time
Date: Tue,  2 Sep 2025 09:54:22 -0400	[thread overview]
Message-ID: <20250902135426.815079-36-cel@kernel.org> (raw)
In-Reply-To: <20250902135426.815079-1-cel@kernel.org>

From: Chuck Lever <chuck.lever@oracle.com>

Commit 42d27579a9d0 ("guestfs: enhance ssh config choice") added a
uniquifier to the name of the ssh config to avoid multiple kdevops
runs clobbering each other's ssh config entries. It uses the TOPDIR
pathname set in the current .config to benefit from the nice
convenience of generating an Ansible extra_var using "output yaml".

Commit 42d27579a9d0 ("guestfs: enhance ssh config choice") broke the
ability to share a .config with other users because
CONFIG_TOPDIR_PATH contains a fixed string pointing to the home
directory where the .config was created.

The TOPDIR and its checksum need to be generated not by "make
menuconfig" but rather by "make" in order that .config files (as
saved in defconfigs/) can be truly portable.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
---
 Kconfig                    | 10 ----------
 Makefile                   |  2 ++
 scripts/gen-hosts.Makefile |  1 +
 scripts/ssh.Makefile       |  2 +-
 4 files changed, 4 insertions(+), 11 deletions(-)

diff --git a/Kconfig b/Kconfig
index 54921617b8b2..948befbce4de 100644
--- a/Kconfig
+++ b/Kconfig
@@ -5,16 +5,6 @@
 
 mainmenu "$(PROJECT) $(PROJECTRELEASE)"
 
-config TOPDIR_PATH
-	string
-	output yaml
-	default $(shell, echo $TOPDIR_PATH)
-
-config TOPDIR_PATH_SHA256SUM
-	string
-	output yaml
-	default $(shell, ./scripts/compute_sha256sum.sh $(TOPDIR_PATH))
-
 config HAVE_KDEVOPS_CUSTOM_DEFAULTS
 	bool
 	default n
diff --git a/Makefile b/Makefile
index 83c67340d0ce..a9cba02c0829 100644
--- a/Makefile
+++ b/Makefile
@@ -19,6 +19,7 @@ export KDEVOPS_NODES :=
 export PYTHONUNBUFFERED=1
 export TOPDIR=./
 export TOPDIR_PATH = $(shell readlink -f $(TOPDIR))
+export TOPDIR_PATH_SHA256SUM = $(shell ./scripts/compute_sha256sum.sh $(TOPDIR_PATH))
 include scripts/refs.Makefile
 
 KDEVOPS_NODES_ROLE_TEMPLATE_DIR :=		$(KDEVOPS_PLAYBOOKS_DIR)/roles/gen_nodes/templates
@@ -82,6 +83,7 @@ INCLUDES = -I include/
 CFLAGS += $(INCLUDES)
 
 ANSIBLE_EXTRA_ARGS += kdevops_version='$(PROJECTRELEASE)'
+ANSIBLE_EXTRA_ARGS += topdir_path_sha256sum='$(TOPDIR_PATH_SHA256SUM)'
 
 export KDEVOPS_HOSTS_TEMPLATE := hosts.j2
 
diff --git a/scripts/gen-hosts.Makefile b/scripts/gen-hosts.Makefile
index 0d1e0cd77c2e..c809b1da18e5 100644
--- a/scripts/gen-hosts.Makefile
+++ b/scripts/gen-hosts.Makefile
@@ -3,6 +3,7 @@
 KDEVOPS_PLAYBOOKS_DIR_FULL_PATH=$(TOPDIR_PATH)/$(KDEVOPS_PLAYBOOKS_DIR)
 KDEVOPS_HOSTS_TEMPLATE_DIR=$(KDEVOPS_PLAYBOOKS_DIR_FULL_PATH)/roles/gen_hosts/templates
 
+GENHOSTS_EXTRA_ARGS += topdir_path='$(TOPDIR_PATH)'
 GENHOSTS_EXTRA_ARGS += kdevops_playbooks_dir='$(KDEVOPS_PLAYBOOKS_DIR)'
 
 # Relative path so that ansible can work with it
diff --git a/scripts/ssh.Makefile b/scripts/ssh.Makefile
index 68c6dcdd4dcd..82e9a8dd33b5 100644
--- a/scripts/ssh.Makefile
+++ b/scripts/ssh.Makefile
@@ -10,7 +10,7 @@ ifeq (y,$(CONFIG_KDEVOPS_SSH_CONFIG_UPDATE))
 SSH_CONFIG_FILE:=$(subst ",,$(CONFIG_KDEVOPS_SSH_CONFIG))
 ANSIBLE_EXTRA_ARGS += sshconfig=$(shell realpath $(SSH_CONFIG_FILE))
 
-ANSIBLE_EXTRA_ARGS += kdevops_ssh_config=$(shell scripts/append-makefile-vars.sh $(CONFIG_KDEVOPS_SSH_CONFIG_PREFIX) $(CONFIG_TOPDIR_PATH_SHA256SUM))
+ANSIBLE_EXTRA_ARGS += kdevops_ssh_config=$(shell scripts/append-makefile-vars.sh $(CONFIG_KDEVOPS_SSH_CONFIG_PREFIX) $(TOPDIR_PATH_SHA256SUM))
 
 endif # CONFIG_KDEVOPS_SSH_CONFIG_UPDATE
 
-- 
2.51.0


  parent reply	other threads:[~2025-09-02 13:54 UTC|newest]

Thread overview: 59+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-02 13:53 [PATCH v2 00/37] Various fixes Chuck Lever
2025-09-02 13:53 ` [PATCH v2 01/37] scripts: Update gen_ssh_key.sh Chuck Lever
2025-09-02 13:53 ` [PATCH v2 02/37] terraform/azure: Fix count of managed disks Chuck Lever
2025-09-02 13:53 ` [PATCH v2 03/37] terraform/azure: Remove tags from terraform configuration Chuck Lever
2025-09-02 13:53 ` [PATCH v2 04/37] terraform/azure: Enable network acceleration Chuck Lever
2025-09-02 13:53 ` [PATCH v2 05/37] terraform/azure: Make the resource group name a variable Chuck Lever
2025-09-02 13:53 ` [PATCH v2 06/37] terraform/azure: Remove the provider version constraint Chuck Lever
2025-09-02 13:53 ` [PATCH v2 07/37] terraform/azure: Update the RHEL publishers Chuck Lever
2025-09-02 13:53 ` [PATCH v2 08/37] terraform/oci: Work around oracle/oci provider bug Chuck Lever
2025-09-02 13:53 ` [PATCH v2 09/37] terraform/oci: Add Kconfig choices for disk performance provisioning Chuck Lever
2025-09-02 13:53 ` [PATCH v2 10/37] terraform/oci: Enable preemptible compute instances Chuck Lever
2025-09-02 13:53 ` [PATCH v2 11/37] terraform/aws: Fix zone selection for us_west1 Chuck Lever
2025-09-02 13:53 ` [PATCH v2 12/37] Revert "terraform/aws: Add Oracle Linux AMI selections" Chuck Lever
2025-09-02 13:54 ` [PATCH v2 13/37] terraform/aws: Remove unused terraform tags Chuck Lever
2025-09-02 13:54 ` [PATCH v2 14/37] terraform/GCE: Fix the default disk throughput values Chuck Lever
2025-09-02 13:54 ` [PATCH v2 15/37] terraform/gce: Remove unused tags Chuck Lever
2025-09-02 13:54 ` [PATCH v2 16/37] terraform/gce: Remove support for Fedora Chuck Lever
2025-09-02 13:54 ` [PATCH v2 17/37] terraform/gce: Update existing machine types and introduce new ones Chuck Lever
2025-09-02 13:54 ` [PATCH v2 18/37] terraform: Create the user's .ssh/config if it does not already exist Chuck Lever
2025-09-02 13:54 ` [PATCH v2 19/37] pynfs: Don't install xdrlib3 on older RHEL Chuck Lever
2025-09-02 13:54 ` [PATCH v2 20/37] guestfs: Update the guestfs playbook description Chuck Lever
2025-09-02 19:36   ` Daniel Gomez
2025-09-02 13:54 ` [PATCH v2 21/37] gen_hosts: Add 'localhost' to the [all] group Chuck Lever
2025-09-02 19:39   ` Daniel Gomez
2025-09-02 13:54 ` [PATCH v2 22/37] gen_hosts: Add [service] group to the builder host template Chuck Lever
2025-09-02 19:43   ` Daniel Gomez
2025-09-02 19:47     ` Chuck Lever
2025-09-02 20:38       ` Daniel Gomez
2025-09-02 13:54 ` [PATCH v2 23/37] guestfs: Don't run the 'destroy' tags on the controller Chuck Lever
2025-09-02 19:54   ` Daniel Gomez
2025-09-02 19:59     ` Chuck Lever
2025-09-02 20:40       ` Daniel Gomez
2025-09-02 13:54 ` [PATCH v2 24/37] base_image: Skip "locales-all" package on Fedora Chuck Lever
2025-09-02 19:57   ` Daniel Gomez
2025-09-02 13:54 ` [PATCH v2 25/37] update_etc_hosts: ipaddr Chuck Lever
2025-09-02 19:59   ` Daniel Gomez
2025-09-02 13:54 ` [PATCH v2 26/37] Add an Ansible requirements.yml file Chuck Lever
2025-09-02 20:06   ` Daniel Gomez
2025-09-02 20:13     ` Chuck Lever
2025-09-02 13:54 ` [PATCH v2 27/37] terraform/oci: Clean up white space in route table resource Chuck Lever
2025-09-02 20:10   ` Daniel Gomez
2025-09-02 13:54 ` [PATCH v2 28/37] guestfs: Correct the spelling of "drives" Chuck Lever
2025-09-02 20:14   ` Daniel Gomez
2025-09-02 13:54 ` [PATCH v2 29/37] guestfs: Configure how many extra drives to provision Chuck Lever
2025-09-02 20:19   ` Daniel Gomez
2025-09-02 20:23     ` Chuck Lever
2025-09-02 13:54 ` [PATCH v2 30/37] ltp: Replace /opt with a symlink to data partition Chuck Lever
2025-09-02 13:54 ` [PATCH v2 31/37] terraform: Squelch Ansible complaints about missing inventory file Chuck Lever
2025-09-02 13:54 ` [PATCH v2 32/37] terraform: Skip localhost when waiting for targets to reboot Chuck Lever
2025-09-02 13:54 ` [PATCH v2 33/37] devconfig: include the "service" group in the playbooks hosts list Chuck Lever
2025-09-02 20:27   ` Daniel Gomez
2025-09-02 20:30     ` Chuck Lever
2025-09-02 20:45       ` Daniel Gomez
2025-09-02 13:54 ` [PATCH v2 34/37] Makefile: Remove CONFIG_TOPDIR_PATH_HAS_SHA256SUM Chuck Lever
2025-09-02 13:54 ` Chuck Lever [this message]
2025-09-02 13:54 ` [PATCH v2 36/37] ansible.cfg: generate an ansible.cfg file in TOPDIR Chuck Lever
2025-09-02 13:54 ` [PATCH v2 37/37] inventory: generate the inventory pathname dynamically Chuck Lever
2025-09-02 15:24 ` [PATCH v2 00/37] Various fixes Luis Chamberlain
2025-09-02 20:34 ` Daniel Gomez

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250902135426.815079-36-cel@kernel.org \
    --to=cel@kernel.org \
    --cc=chuck.lever@oracle.com \
    --cc=kdevops@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox