Skip to contentSkip to conversation

Align guest dependencies with their corresponding workflows

PATCH In review Daniel Gomez 3 participants 10 messages Jul 24, 2025 – Jul 25, 2025 Kbuild

lore
Share & tools
lore
#0 lore raw

cover Align guest dependencies with their corresponding workflows

Several guest services (krb5, kdc, smbd, iscsi, nfsd) are missing from various host workflow template files, creating kconfig configuration inconsistencies. This occurs when workflows either lack implementation support for these services or have no functional dependency on them. This patch series ensures kconfig options accurately reflect the services actually available in each workflow template.

---
Daniel Gomez (2):
kconfig: add workflow dependencies for SMBD and KRB5 services
kconfig: add workflow dependencies for NFSD and iSCSI services

 kconfigs/Kconfig.iscsi | 4 ++++
 kconfigs/Kconfig.krb5  | 1 +
 kconfigs/Kconfig.nfsd  | 4 ++++
 kconfigs/Kconfig.smbd  | 1 +
 4 files changed, 10 insertions(+)

---
base-commit: f9425cb01ef085cbabdf7c7cb0c5dfbc189f5a45
change-id: 20250724-fixes-6d1460cd1940

Best regards,

Signature · 1 line
Daniel Gomez <[email protected]>
#1 lore raw

PATCH 1/2 kconfig: add workflow dependencies for SMBD and KRB5 services

From: Daniel Gomez <[email protected]>

Add workflow dependencies to KDEVOPS_SETUP_SMBD and KDEVOPS_SETUP_KRB5 to restrict their availability to compatible workflows. Both services are only supported in the fstests workflow based on host template analysis.

This prevents configuration inconsistencies where services are enabled globally but not included in host generation for incompatible workflows.

Generated-by: Claude AI

---
 kconfigs/Kconfig.krb5 | 1 +
 kconfigs/Kconfig.smbd | 1 +
 2 files changed, 2 insertions(+)
kconfigs/Kconfig.krb5 +1 -0
index e590271..6fd196c 100644
@@ -1,5 +1,6 @@
 config KDEVOPS_SETUP_KRB5
 	bool "Set up KRB5"
+	depends on KDEVOPS_WORKFLOW_ENABLE_FSTESTS
 	default n
 	help
 	  Configure and bring up a MIT Kerberos V5 KDC.
kconfigs/Kconfig.smbd +1 -0
index b7c33d1..c132b13 100644
@@ -1,6 +1,7 @@
 # FIXME: need defaults for terraform hosts
 config KDEVOPS_SETUP_SMBD
 	bool "Set up the Samba SMB server"
+	depends on KDEVOPS_WORKFLOW_ENABLE_FSTESTS
 	default n
 	help
 	  Configure and bring up the Samba SMB server. This will provision
Signature · 1 line
2.50.1
#2 lore raw

PATCH 2/2 kconfig: add workflow dependencies for NFSD and iSCSI services

In reply to Daniel Gomez

From: Daniel Gomez <[email protected]>

Add workflow dependencies to KDEVOPS_SETUP_NFSD and KDEVOPS_ENABLE_ISCSI to restrict their availability to compatible workflows. Both services are supported in fstests, pynfs, nfstest, and gitr workflows based on host template analysis.

This ensures service configuration options are only available when the selected workflow can actually use them, preventing unused configurations and missing host groups.

Generated-by: Claude AI

---
 kconfigs/Kconfig.iscsi | 4 ++++
 kconfigs/Kconfig.nfsd  | 4 ++++
 2 files changed, 8 insertions(+)
kconfigs/Kconfig.iscsi +4 -0
index 2c40372..9401986 100644
@@ -1,6 +1,10 @@
 # FIXME: need defaults for terraform hosts
 menuconfig KDEVOPS_ENABLE_ISCSI
 	bool "Set up an iSCSI target host"
+	depends on KDEVOPS_WORKFLOW_ENABLE_FSTESTS || \
+			   KDEVOPS_WORKFLOW_ENABLE_PYNFS || \
+			   KDEVOPS_WORKFLOW_ENABLE_NFSTEST || \
+			   KDEVOPS_WORKFLOW_ENABLE_GITR
 	default n
 	help
 	  Provision an additional target node as an iSCSI target.
kconfigs/Kconfig.nfsd +4 -0
index 69fc9d2..8463e53 100644
@@ -1,6 +1,10 @@
 # FIXME: need defaults for terraform hosts
 config KDEVOPS_SETUP_NFSD
 	bool "Set up the kernel nfs server"
+	depends on KDEVOPS_WORKFLOW_ENABLE_FSTESTS || \
+			   KDEVOPS_WORKFLOW_ENABLE_PYNFS || \
+			   KDEVOPS_WORKFLOW_ENABLE_NFSTEST || \
+			   KDEVOPS_WORKFLOW_ENABLE_GITR
 	default n
 	help
 	  Configure and bring up the kernel NFS server. This will provision
Signature · 1 line
2.50.1
Reviewed-by on the v1 series
#3 lore raw
In reply to Daniel Gomez
Quoted 18 lines · Daniel Gomez

Several guest services (krb5, kdc, smbd, iscsi, nfsd) are missing from various host workflow template files, creating kconfig configuration inconsistencies. This occurs when workflows either lack implementation support for these services or have no functional dependency on them. This patch series ensures kconfig options accurately reflect the services actually available in each workflow template.

---
Daniel Gomez (2):
kconfig: add workflow dependencies for SMBD and KRB5 services
kconfig: add workflow dependencies for NFSD and iSCSI services

 kconfigs/Kconfig.iscsi | 4 ++++
 kconfigs/Kconfig.krb5  | 1 +
 kconfigs/Kconfig.nfsd  | 4 ++++
 kconfigs/Kconfig.smbd  | 1 +
 4 files changed, 10 insertions(+)
Quoted 8 lines

---
base-commit: f9425cb01ef085cbabdf7c7cb0c5dfbc189f5a45
change-id: 20250724-fixes-6d1460cd1940

Best regards,

Signature · 1 line
Daniel Gomez <[email protected]>
Signature · 1 line
Chuck Lever
Reviewed-by on the v1 series
#4 lore raw
In reply to Daniel Gomez
Quoted 8 lines · Daniel Gomez

Several guest services (krb5, kdc, smbd, iscsi, nfsd) are missing from various host workflow template files, creating kconfig configuration inconsistencies. This occurs when workflows either lack implementation support for these services or have no functional dependency on them. This patch series ensures kconfig options accurately reflect the services actually available in each workflow template.

Looks good, just stylistic, I think its easier to just have

Generated-by:
Signed-off-by:

Instead of:

Generated-by:

Signed-off-by:

No point in the extra new line.

Luis

#5 lore raw
Quoted 15 lines · Luis Chamberlain
Quoted 8 lines · Daniel Gomez

Several guest services (krb5, kdc, smbd, iscsi, nfsd) are missing from various host workflow template files, creating kconfig configuration inconsistencies. This occurs when workflows either lack implementation support for these services or have no functional dependency on them. This patch series ensures kconfig options accurately reflect the services actually available in each workflow template.

Looks good, just stylistic, I think its easier to just have

Generated-by:
Signed-off-by:

Quoted 7 lines

Instead of:

Generated-by:

Signed-off-by:

No point in the extra new line.

For that, I think it's better to update CLAUDE.md to be consistent. This is what it generated:

docs: update commit message format for Claude AI

Clarify the standard format for commits generated by Claude AI to ensure consistent tagging across the project. The format specifies that the Generated-by tag should precede the Signed-off-by tag with no blank lines between them.

Generated-by Claude AI
CLAUDE.md +9 -3
index 8bee7c0..4018f52 100644
@@ -206,10 +206,16 @@ any spell fixes unless asked explicitly to do that.
 We want to use the Signed-off-by tag which embodies the application of the
 Developer Certificate or Origin.
 
-## Use Generated-by: Claude AI
+## Commit Message Format
 
-Use this tag for code generated by Claude code AI. Put this before the
-Signed-off-by tag.
+For all commits generated by Claude AI, use the following format:
+
+```
+Generated-by: Claude AI
+Signed-off-by: <author>
+```
+
+The `Generated-by:` tag should always precede the `Signed-off-by:` tag with no blank lines between them.
 
 ## Prompt Examples
 
Quoted 2 lines

Thanks!

Quoted 2 lines

Luis

#6 lore raw
Quoted 22 lines · Daniel Gomez
Quoted 19 lines · Luis Chamberlain
Quoted 8 lines · Daniel Gomez

Several guest services (krb5, kdc, smbd, iscsi, nfsd) are missing from various host workflow template files, creating kconfig configuration inconsistencies. This occurs when workflows either lack implementation support for these services or have no functional dependency on them. This patch series ensures kconfig options accurately reflect the services actually available in each workflow template.

Looks good, just stylistic, I think its easier to just have

Generated-by:
Signed-off-by:

Instead of:

Generated-by:

Quoted 8 lines
Quoted 3 lines

Signed-off-by:

No point in the extra new line.

For that, I think it's better to update CLAUDE.md to be consistent. This is what it generated:

docs: update commit message format for Claude AI

My testing showed that was not enough. Also the white space noise is a pain. How about:

From 3dca57c647d12c7fe437cb2d439cb3b0440f53f8 Mon Sep 17 00:00:00 2001
From: Luis Chamberlain <[email protected]>
Date: Thu, 24 Jul 2025 20:41:15 -0700
Subject: [PATCH] Makefile: add make style for style checking

Add a 'make style' which helps humans and bots follow some sensible coding conventions.

- Add scripts/detect_whitespace_issues.py check for white space eye sores
- Add scripts/check_commit_format.py to validate Generated-by and the Signed-off-by spacing
- Add scripts/fix_whitespace_issues.py to help with stupid spacing eyesores
- Update CLAUDE.md to ensure it runs 'make style'

Generated-by Claude AI
---
 CLAUDE.md                           |  61 +++++++++++++
 Makefile                            |   5 +
 kdevops-ci                          |   1 +
 scripts/check_commit_format.py      |  85 +++++++++++++++++
 scripts/detect_whitespace_issues.py | 109 ++++++++++++++++++++++
 scripts/fix_whitespace_issues.py    | 137 ++++++++++++++++++++++++++++
 6 files changed, 398 insertions(+)
 create mode 160000 kdevops-ci
 create mode 100755 scripts/check_commit_format.py
 create mode 100755 scripts/detect_whitespace_issues.py
 create mode 100755 scripts/fix_whitespace_issues.py
CLAUDE.md +61 -0
index 8bee7c0852c2..ea7c0fffd366 100644
@@ -89,6 +89,7 @@ make help               # Show available targets
 make V=1 [target]       # Verbose build output
 make AV=1-6 [target]    # Ansible verbose output (levels 0-6)
 make dynconfig          # Generate dynamic configuration
+make style              # Check for whitespace issues - ALWAYS run before completing work
 make mrproper           # Clean everything and restart from scratch
 ```
 
@@ -211,6 +212,66 @@ Developer Certificate or Origin.
 Use this tag for code generated by Claude code AI. Put this before the
 Signed-off-by tag.
 
+**CRITICAL FORMATTING RULE**: When using "Generated-by: Claude AI", it MUST be
+immediately followed by the "Signed-off-by:" tag with NO empty lines between them.
+These two lines must be consecutive.
+
+Correct format:
+```
+Subject line
+
+Detailed description of changes...
+
+Generated-by: Claude AI
+Signed-off-by: Your Name <[email protected]>
+```
+
+**WRONG** - Do NOT add empty lines between Generated-by and Signed-off-by:
+```
+Generated-by: Claude AI
+
+Signed-off-by: Your Name <[email protected]>
+```
+
+**WRONG** - Do NOT add extra empty lines:
+```
+Generated-by: Claude AI
+
+
+Signed-off-by: Your Name <[email protected]>
+```
+
+## Code Quality Requirements
+
+**IMPORTANT**: Before completing any work, you MUST run `make style` to check for
+both whitespace issues and commit message formatting. This ensures code consistency
+and prevents formatting issues from being introduced into the codebase.
+
+The style checker will identify:
+- Trailing whitespace
+- Mixed tabs and spaces
+- Files without newlines at EOF
+- Other whitespace-related issues
+- Incorrect commit message formatting (Generated-by/Signed-off-by spacing)
+
+Fix all reported issues before submitting your work. The `make style` command
+checks both file whitespace and the most recent commit message format.
+
+### Automatic Whitespace Fixing
+
+For convenience, you can automatically fix whitespace issues using:
+```bash
+python3 scripts/fix_whitespace_issues.py              # Fix all modified files
+python3 scripts/fix_whitespace_issues.py file1 file2  # Fix specific files
+```
+
+The fixer script will:
+- Remove trailing whitespace from lines
+- Add missing newlines at end of files
+- Reduce excessive blank lines to maximum 2 consecutive
+
+Always run `make style` after using the fixer to verify all issues are resolved.
+
 ## Prompt Examples
 
 Refer to PROMPTS.md for example set of prompts used to generate code on
Makefile +5 -0
index c6a5c321f8df..bfff8f90b3f1 100644
@@ -243,6 +243,11 @@ include scripts/ci.Makefile
 include scripts/archive.Makefile
 include scripts/defconfig.Makefile
 
+PHONY += style
+style:
+	$(Q)python3 scripts/detect_whitespace_issues.py
+	$(Q)python3 scripts/check_commit_format.py
+
 PHONY += clean
 clean:
 	$(Q)$(MAKE) -f scripts/build.Makefile $@
kdevops-ci new file +1 -0
new file mode 160000
index 000000000000..812060752af0
@@ -0,0 +1 @@
+Subproject commit 812060752af00e601add5716c3180fbb21c41784
scripts/check_commit_format.py new file +85 -0

85 lines not on this page · raw message

scripts/detect_whitespace_issues.py new file +109 -0

109 lines not on this page · raw message

scripts/fix_whitespace_issues.py new file +137 -0

137 lines not on this page · raw message

Signature · 1 line
2.45.2
#7 lore raw
Quoted 25 lines · Luis Chamberlain
Quoted 24 lines · Daniel Gomez
Quoted 21 lines · Luis Chamberlain
Quoted 8 lines · Daniel Gomez

Several guest services (krb5, kdc, smbd, iscsi, nfsd) are missing from various host workflow template files, creating kconfig configuration inconsistencies. This occurs when workflows either lack implementation support for these services or have no functional dependency on them. This patch series ensures kconfig options accurately reflect the services actually available in each workflow template.

Looks good, just stylistic, I think its easier to just have

Generated-by:
Signed-off-by:

Instead of:

Generated-by:

Signed-off-by:

Quoted 8 lines
Quoted 6 lines
Quoted 1 line

No point in the extra new line.

For that, I think it's better to update CLAUDE.md to be consistent. This is what it generated:

docs: update commit message format for Claude AI

My testing showed that was not enough. Also the white space noise is a

I pushed it already. Sorry about that as the patch has the blank space.

Quoted 9 lines

pain. How about:
From 3dca57c647d12c7fe437cb2d439cb3b0440f53f8 Mon Sep 17 00:00:00 2001
From: Luis Chamberlain <[email protected]>
Date: Thu, 24 Jul 2025 20:41:15 -0700
Subject: [PATCH] Makefile: add make style for style checking

Add a 'make style' which helps humans and bots follow some sensible coding conventions.

Quoted 6 lines

- Add scripts/detect_whitespace_issues.py check for white space eye sores
- Add scripts/check_commit_format.py to validate Generated-by and the Signed-off-by spacing
- Add scripts/fix_whitespace_issues.py to help with stupid spacing eyesores
- Update CLAUDE.md to ensure it runs 'make style'

This is pretty much like kdevops version of the "scripts/checkpatch.pl" in the kernel, right? Well, a first simple version of it and integrated in Claude Code to be executed after commits.

So, I was looking into having something like checkpatch some time ago. Now, with this generative AI there's no reason to wait. So I think it's a good idea to go with that. But it's missing b4 integration. "b4 prep --check" for the kernel runs checkpatch like this [1]:

./scripts/checkpatch.pl --terse --no-summary --mailback --showfile.

We just extend the .b4-config to customize it for kdevops:

[b4]
prep-perpatch-check-cmd = make style

I know this is Claude Code vs manual patches. I think both paths need to run the same scripts.

I'd like the check step to also do more things like running Ansible lint as discussed here [2]:

In this branch [3] I was experimenting with pre-commit and spellcheck on GH CI:

6668fedb95fc github/workflows/fstests.yml: add pre-commit codespell support ccb55f87121b pre-commit: codespell: update v2.2.5 -> v2.4.1 cc27e2df77ae pre-commit: fix lint indentation warnings

I've lost the Ansible lint experiments but they were similar to codespell. Adding support for these would be great in the check path. But running that only for the changes was the "trickiest" part.

#8 lore raw
Quoted 4 lines · Daniel Gomez

So, I was looking into having something like checkpatch some time ago. Now, with this generative AI there's no reason to wait. So I think it's a good idea to go with that. But it's missing b4 integration. "b4 prep --check" for the kernel runs checkpatch like this [1]:

Sounds good. This patch was just in another series I have but if its useful I figured I'd send it out. So no worries. But if you're going to extend it with more stuff, if you can pick it up and extend it that'd be neat as then I can just remove that from my future queue of patches to post. I gather at this point this is just going to be normal for us to use these tools to grow kdevops and so the sooner we have sanity checks the better. Could you pick up this patch and amend it with the ideas you have too? Then I'll just carry it locally until you push it out and I can then ignore this patch later?

Luis

#9 lore raw
Quoted 7 lines · Luis Chamberlain
Quoted 4 lines · Daniel Gomez

So, I was looking into having something like checkpatch some time ago. Now, with this generative AI there's no reason to wait. So I think it's a good idea to go with that. But it's missing b4 integration. "b4 prep --check" for the kernel runs checkpatch like this [1]:

Quoted 9 lines

Sounds good. This patch was just in another series I have but if its useful I figured I'd send it out. So no worries. But if you're going to extend it with more stuff, if you can pick it up and extend it that'd be neat as then I can just remove that from my future queue of patches to post. I gather at this point this is just going to be normal for us to use these tools to grow kdevops and so the sooner we have sanity checks the better. Could you pick up this patch and amend it with the ideas you have too? Then I'll just carry it locally until you push it out and I can then ignore this patch later?

Pushed it to my kdevops fork:

https://github.com/dkruces/kdevops/tree/b4/checkpatch

I'll play soon with Claude Code to run local checks for patches and see how far we can go.

Quoted 2 lines

Luis