Skip to content

Conversation

@dkruces
Copy link
Contributor

@dkruces dkruces commented Oct 29, 2025

No description provided.

The virt-customize phase was failing with "update-locale: Error: invalid
locale settings" because commit 6bb3bfb removed the locales-all
package installation but left the locale configuration commands that
depend on it.

The update-locale command validates all settings in /etc/default/locale,
and without locales-all providing the necessary locale infrastructure, it
rejects the LANGUAGE=en_US:en setting as invalid during image build.

Restore the locales-all installation within the Debian Trixie conditional
block, placing it immediately before the locale configuration sequence so
the image has proper locale support from the start. This prevents SSH
locale warnings on first boot while keeping the package Debian-specific.

Generated-by: Claude AI
Reviewed-by: Chuck Lever <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Daniel Gomez <[email protected]>
Fix help text indentation in Kconfig.guestfs to use tabs consistently
instead of mixed tabs and spaces. Kconfig style requires tabs for
indentation with tab+2spaces acceptable for help text continuation.

Reviewed-by: Chuck Lever <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Daniel Gomez <[email protected]>
Remove GUESTFS_BRINGUP_DEBUG_* configuration options as they reference
scripts/guestfs_bringup.sh which no longer exists after the migration to
Ansible-based bringup in the guestfs role.

Reviewed-by: Chuck Lever <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Daniel Gomez <[email protected]>
Fix multiple minor spelling errors in Kconfig help text.

Capitalize "Debian" when referring to the distribution name per proper
noun conventions, while keeping lowercase in technical contexts like
"debian-testing" repository names.

Reviewed-by: Chuck Lever <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Daniel Gomez <[email protected]>
When building Fedora guest images on Debian hosts, SELinux contexts
cannot be properly set because Debian lacks SELinux kernel support.
Libguestfs cannot persist security.selinux extended attributes to
filesystems when mounting from non-SELinux hosts, causing all files to
have unlabeled_t context.

This creates a boot failure where SELinux blocks all binary execution
(195 AVC denials, 211 exit 127 errors), including the autorelabel
service itself.

Configure Fedora images to use SELinux permissive mode instead of
enforcing when built on Debian/Ubuntu hosts. This allows guests to boot
successfully while still loading SELinux policy for development and
testing.

Add --no-selinux-relabel to virt-sysprep to prevent it from creating
.autorelabel files that would trigger failed relabeling attempts on
first boot.

Generated-by: Claude AI
Reviewed-by: Chuck Lever <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Daniel Gomez <[email protected]>
Fix Kconfig help text indentation to consistently use tabs. Several help
entries were using spaces instead of tabs for indentation, and one had
incorrect placement of the "help" keyword.

Reviewed-by: Chuck Lever <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Daniel Gomez <[email protected]>
Ansible fails with "'kdevops_devconfig_custom_repos' is undefined" when
KDEVOPS_DEVCONFIG_ENABLE_CUSTOM_REPOS is disabled (the default).

Kconfig has a limitation where "output yaml" will not export variables that
have unmet "depends on" conditions, leaving them completely undefined in
extra_vars.yaml. This causes Ansible to fail when checking these variables
even though they have default values in Kconfig.

The fix migrates both variables to proper output yaml in Kconfig while removing
the redundant legacy Makefile ANSIBLE_EXTRA_ARGS exports. To ensure the
variables always exist regardless of kconfig conditions, the devconfig role's
defaults/main.yml now provides empty string fallbacks. This follows standard
Ansible patterns and makes the playbook portable for standalone use outside
kdevops.

Generated-by: Claude AI
Reviewed-by: Chuck Lever <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Daniel Gomez <[email protected]>
Newer Ansible versions reject string variables in conditionals without
explicit boolean expressions, producing "Conditional result was derived
from type 'str'" errors.

Remove the redundant string variable check. The length test already
evaluates to boolean (length > 1), properly handling empty strings by
skipping the task.

Generated-by: Claude AI
Reviewed-by: Chuck Lever <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Daniel Gomez <[email protected]>
Dependency installation for 9P builds was checking ansible_os_family,
which references the target guest's OS instead of the control host where
packages are actually installed. This caused incorrect packages to be
installed when building Fedora guests on Debian hosts.

Replace ansible_os_family checks with Kconfig distro variables
(distro_debian_based, distro_fedora, etc.) which correctly detect
the control host's distribution. Add fallback defaults to ensure the
variables are always defined for standalone role usage.

Generated-by: Claude AI
Suggested-by: Chuck Lever <[email protected]>
Reviewed-by: Chuck Lever <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Daniel Gomez <[email protected]>
The selftests role calls install-deps twice: once on the target guest and
once on localhost for 9P builds. When delegated to localhost, ansible_facts
still references the target guest's OS rather than the control host's OS,
causing the wrong package manager to be invoked (e.g., dnf on Debian hosts
when building Fedora guests).

Split install-deps into two separate files: main.yml uses ansible_facts
for detecting the guest OS in normal execution, while main-localhost.yml
uses Kconfig distro variables for detecting the control host OS when
delegated to localhost.

Add distro variable fallbacks to defaults/main.yml to ensure the Kconfig
variables are always defined when the role runs.

This prevents "Could not detect which major revision of dnf is in use"
errors when building Fedora guests on Debian control hosts with 9P.

Generated-by: Claude AI
Reviewed-by: Chuck Lever <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Daniel Gomez <[email protected]>
Add GUESTFS_FEDORA_BOX_SHORT configuration to generate version-specific
short prefixes (fedora41, fedora40, fedora39) for Fedora guests,
matching the existing Debian implementation.

Enable HAVE_CUSTOM_DISTRO_HOST_PREFIX and
HAVE_DISTRO_PREFERS_CUSTOM_HOST_PREFIX for Fedora to allow automatic
hostname prefix generation based on the selected Fedora version,
helping distinguish different distribution releases in multi-VM test
environments.

Generated-by: Claude AI
Reviewed-by: Chuck Lever <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Daniel Gomez <[email protected]>
Add configuration fragment for selecting Fedora 41 as the guest OS. This
allows overriding defconfig guest OS choices via merge_config.sh and
enables CI workflows to test Fedora-specific configurations.

Reviewed-by: Chuck Lever <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Daniel Gomez <[email protected]>
Add configuration fragment for selecting Debian 13 (Trixie) as the
guest OS. This allows overriding defconfig guest OS choices via
merge_config.sh and enables CI workflows to test Debian-specific
configurations.

Reviewed-by: Chuck Lever <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Daniel Gomez <[email protected]>
Add manual guest OS selection to GitHub Actions workflows, allowing
testing of distribution-specific fixes across Debian and Fedora
guests. The workflow_dispatch trigger accepts 'default', 'debian-13',
or 'fedora-41', merging the corresponding guestfs config fragment to
override the defconfig's guest OS choice.

This enables validation of cross-distribution compatibility for fixes
like the locale and SELinux changes in this series.

Link: https://lore.kernel.org/kdevops/[email protected]/
Generated-by: Claude AI
Reviewed-by: Chuck Lever <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Daniel Gomez <[email protected]>
Fedora guests running on Debian hosts timeout after 60 seconds while
waiting for network configuration during first boot. The 60-second
timeout is insufficient due to slower boot times caused by SELinux
permissive mode initialization on non-SELinux hosts.

Increase the default timeout from 60 to 180 seconds to
accommodate Fedora boot times. Make the timeout configurable via
KDEVOPS_SSH_CONFIG_TIMEOUT environment variable for flexibility in
different environments.

Improve the error message to include the configured timeout value and
suggest using 'virsh console' for boot diagnostics.

Generated-by: Claude AI
Reviewed-by: Chuck Lever <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Daniel Gomez <[email protected]>
@dkruces dkruces force-pushed the b4/fedora-on-debian branch from 6c63e63 to df8beea Compare October 29, 2025 14:12
@dkruces dkruces merged commit 2651ab3 into main Oct 29, 2025
22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants