From: Chuck Lever <cel@kernel.org>
To: Luis Chamberlain <mcgrof@kernel.org>
Cc: kdevops@lists.linux.dev, Chuck Lever <chuck.lever@oracle.com>
Subject: Re: [RFC PATCH 1/2] Set TOPDIR_PATH and generate its sha256sum at run time
Date: Fri, 29 Aug 2025 09:38:27 -0400 [thread overview]
Message-ID: <0fc9996c-d5f0-44c5-8673-31cfc707a1e1@kernel.org> (raw)
In-Reply-To: <aLGMpYxU3sDJBmLA@bombadil.infradead.org>
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 <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".
>>
>> 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 <chuck.lever@oracle.com>
>> ---
>> 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
next prev parent reply other threads:[~2025-08-29 13:38 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-28 20:28 [RFC PATCH 0/2] Set TOPDIR at run time Chuck Lever
2025-08-28 20:28 ` [RFC PATCH 1/2] Set TOPDIR_PATH and generate its sha256sum " Chuck Lever
2025-08-29 11:19 ` Luis Chamberlain
2025-08-29 13:38 ` Chuck Lever [this message]
2025-09-01 11:29 ` Daniel Gomez
2025-08-28 20:28 ` [RFC PATCH 2/2] ansible.cfg: generate an ansible.cfg file in TOPDIR Chuck Lever
2025-08-29 11:23 ` Luis Chamberlain
2025-08-29 13:39 ` Chuck Lever
2025-08-29 16:59 ` Luis Chamberlain
2025-09-01 12:00 ` Daniel Gomez
2025-09-01 15:03 ` Chuck Lever
2025-09-01 17:07 ` 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=0fc9996c-d5f0-44c5-8673-31cfc707a1e1@kernel.org \
--to=cel@kernel.org \
--cc=chuck.lever@oracle.com \
--cc=kdevops@lists.linux.dev \
--cc=mcgrof@kernel.org \
/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