Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 204E36FC5 for ; Fri, 29 Aug 2025 13:38:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1756474709; cv=none; b=jn1Jyuyv1HtTOCkIwqqwBAx6N/euEJUUhlDiscR3j4ZaAb16Kiueo2JT1YHAzCqivilPwrEQaO2BDcaqaS0hYH++jKlOUEmKHpNSpnDKPg+DEs1e4e9gykJCOq5syoWHzNcYxjzbAPfuinvRkR+tSqE6+3mg5WLC1jL2KuP4enQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1756474709; c=relaxed/simple; bh=i1d8c7wUzoZmV5i63HmZytZrPYFOdMj1ozpfWCe2+qI=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=huZBftBMbX/KTO1+grQ8Y48ow955kCuqZvngrYooSuSnMBK5C1dXamkgG9Qdi0o0RhRTkOJ59VXhZeFtYPKCKRmLbyo06MsuUl/dN9NPlmGkLj3q8yRjd20SHHKkCOkM9Z/dwTFXZqlQZWRXHn6vAn3o47fBYRS6LKiFqnboz0M= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=gzpWBwBK; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="gzpWBwBK" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4F46CC4CEF0; Fri, 29 Aug 2025 13:38:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1756474708; bh=i1d8c7wUzoZmV5i63HmZytZrPYFOdMj1ozpfWCe2+qI=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=gzpWBwBKNuleJFy97sctdtmccKqcnTqdrnsYjpXxjOAOH9h5l1rd/08cbGkW53Zc+ ThIqQylMd0m3P0uaqxbqM2JH+cDVDIO+kry8iSzH2PkktvvLxPsqYEaD6YGHUXY9P5 /zuMtkWMoGFegosHxDGjhiHhKTy2VqswghmGOmj7PRCIPyXHa8IAyiwaKn1ddwkSJb Khue6oNlo523346miug1Mkl7nVb985x5emQOJSJI3MeWVxu2ucE8EK+ysXnrMDDuHe pjOxwpB5TioHK7ByQ5vhjV9+Fj3/WzZXwYzi74HdRRqSx1xgCZ3DF133xSnZqL9cdy KZfEVeqdRu8Pg== Message-ID: <0fc9996c-d5f0-44c5-8673-31cfc707a1e1@kernel.org> Date: Fri, 29 Aug 2025 09:38:27 -0400 Precedence: bulk X-Mailing-List: kdevops@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [RFC PATCH 1/2] Set TOPDIR_PATH and generate its sha256sum at run time To: Luis Chamberlain Cc: kdevops@lists.linux.dev, Chuck Lever References: <20250828202827.3253499-1-cel@kernel.org> <20250828202827.3253499-2-cel@kernel.org> Content-Language: en-US From: Chuck Lever Organization: kernel.org In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 8/29/25 7:19 AM, Luis Chamberlain wrote: > On Thu, Aug 28, 2025 at 04:28:26PM -0400, Chuck Lever wrote: >> From: Chuck Lever >> >> 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". >> >> However, if the same user generates all her .configs (that will be >> run by other users under automation) while in the same directory >> (say, if they are different branches in the same git repository), >> the TOPDIR pathname and thus the sha256sum of that pathname will be >> exactly the same in all of those .config files, allowing the path >> names of the ephemeral ssh configs to collide. > > Both paragraphs above took me quite a bit of time to grasp, I think > it was the parenthesis, as they make me try to switch contexts. So > I think the explanation of the issue can be simplified. I *think* > that the issue your are describing is essentially that we currently > cannot support sharing .config to other users because TOPDIR_PATH > expects the same path to be used. Would that be a summary of the > issue? I struggled with writing it. I wanted to capture my use case as the rationale for the change. I'll try to integrate your suggestion. >> 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. > > This is nice. > >> Signed-off-by: Chuck Lever >> --- >> Kconfig | 15 --------------- >> Makefile | 4 ++++ >> scripts/gen-hosts.Makefile | 1 + >> scripts/ssh.Makefile | 4 ++-- >> 4 files changed, 7 insertions(+), 17 deletions(-) >> >> diff --git a/Kconfig b/Kconfig >> index 3f2bc8cf019a..948befbce4de 100644 >> --- a/Kconfig >> +++ b/Kconfig >> @@ -5,21 +5,6 @@ >> >> mainmenu "$(PROJECT) $(PROJECTRELEASE)" >> >> -config TOPDIR_PATH >> - string >> - output yaml >> - default $(shell, echo $TOPDIR_PATH) >> - >> -config TOPDIR_PATH_HAS_SHA256SUM >> - bool >> - output yaml >> - default y >> - >> -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 8755577e4d85..b6fdbe67fc07 100644 >> --- a/Makefile >> +++ b/Makefile >> @@ -19,6 +19,8 @@ export KDEVOPS_NODES := >> export PYTHONUNBUFFERED=1 >> export TOPDIR=./ >> export TOPDIR_PATH = $(shell readlink -f $(TOPDIR)) >> +export TOPDIR_PATH_HAS_SHA256SUM=y > > We added this a long time ago, to remain compatible with users who > may git pull to the latest kdevops which didn't yet have the symbol > TOPDIR_PATH_HAS_SHA256SUM. > > So I think a prep patch to just remove TOPDIR_PATH_HAS_SHA256SUM now > make sense. Ha! I had a sentence in the patch description suggesting removal of HAS_SHA256SUM, but decided to keep things simple and took it out. > Otherwise this is looking nice. > > Luis -- Chuck Lever