[PATCH 1/8] guestfs: Fix Debian 13 (Trixie) APT sources file path

Luis Chamberlain <[email protected]> Fri, 17 Oct 2025 19:31:46 -0700
Newsgroups dev.linux.lists.kdevops
Message-ID <[email protected]>
Debian 13 (Trixie) changed from using a single /etc/apt/sources.list
file to the new DEB822 format in /etc/apt/sources.list.d/debian.sources.

This was causing virt-customize to fail during base image creation with:
  virt-customize: error: libguestfs error: source '/etc/apt/sources.list'
  does not exist (or cannot be read)

Add a conditional default for GUESTFS_DISTRO_SOURCE_AND_DEST_FILE that
uses the new path for Debian Trixie while preserving the old path for
other Debian versions.

Generated-by: Claude AI
Signed-off-by: Luis Chamberlain <[email protected]>
---
 kconfigs/Kconfig.guestfs | 1 +
 1 file changed, 1 insertion(+)

diff --git a/kconfigs/Kconfig.guestfs b/kconfigs/Kconfig.guestfs
index 52506a3b..01f68eec 100644
--- a/kconfigs/Kconfig.guestfs
+++ b/kconfigs/Kconfig.guestfs
@@ -64,6 +64,7 @@ config GUESTFS_DISTRO_SOURCE_AND_DEST_FILE
 	string
 	depends on GUESTFS_COPY_SOURCES_FROM_HOST_TO_GUEST
 	output yaml
+	default "/etc/apt/sources.list.d/debian.sources" if GUESTFS_DEBIAN_TRIXIE
 	default "/etc/apt/sources.list" if GUESTFS_DEBIAN
 
 endif
-- 
2.51.0