[PATCH v2 11/15] guestfs: generate fedora distribution-specific hostname prefixes
Daniel Gomez <[email protected]> Wed, 29 Oct 2025 13:40:53 +0100
| Newsgroups | dev.linux.lists.kdevops |
|---|---|
| Message-ID | <[email protected]> |
From: 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 Signed-off-by: Daniel Gomez <[email protected]> --- kconfigs/Kconfig.guestfs | 9 +++++++++ kconfigs/Kconfig.kdevops | 1 + 2 files changed, 10 insertions(+) diff --git a/kconfigs/Kconfig.guestfs b/kconfigs/Kconfig.guestfs index f7601bc9..3bc4b060 100644 --- a/kconfigs/Kconfig.guestfs +++ b/kconfigs/Kconfig.guestfs @@ -78,6 +78,8 @@ choice config GUESTFS_FEDORA bool "Fedora (or derived distro)" output yaml + select HAVE_CUSTOM_DISTRO_HOST_PREFIX + select HAVE_DISTRO_PREFERS_CUSTOM_HOST_PREFIX select HAVE_DISTRO_XFS_PREFERS_MANUAL if FSTESTS_XFS select HAVE_DISTRO_BTRFS_PREFERS_MANUAL if FSTESTS_BTRFS select HAVE_DISTRO_EXT4_PREFERS_MANUAL if FSTESTS_EXT4 @@ -222,6 +224,13 @@ config GUESTFS_DEBIAN_COPY_HOST_SOURCES endif # GUESTFS_DEBIAN +config GUESTFS_FEDORA_BOX_SHORT + string + default "fedora41" if VIRT_BUILDER_OS_VERSION = "fedora-41" + default "fedora40" if VIRT_BUILDER_OS_VERSION = "fedora-40" + default "fedora39" if VIRT_BUILDER_OS_VERSION = "fedora-39" + default "fedora" + config VIRT_BUILDER_OS_VERSION string "virt-builder os-version" default "fedora-39" if GUESTFS_FEDORA diff --git a/kconfigs/Kconfig.kdevops b/kconfigs/Kconfig.kdevops index 1b40db5b..68e91193 100644 --- a/kconfigs/Kconfig.kdevops +++ b/kconfigs/Kconfig.kdevops @@ -25,6 +25,7 @@ config HAVE_DISTRO_REQUIRES_CUSTOM_SSH_KEXALGORITHMS config CUSTOM_DISTRO_HOST_PREFIX string depends on HAVE_CUSTOM_DISTRO_HOST_PREFIX + default GUESTFS_FEDORA_BOX_SHORT if GUESTFS_FEDORA default GUESTFS_DEBIAN_BOX_SHORT if GUESTFS_DEBIAN config CUSTOM_SSH_KEXALGORITHMS -- 2.51.0