public inbox for kdevops@lists.linux.dev
 help / color / mirror / Atom feed
From: Luis Chamberlain <mcgrof@kernel.org>
To: kdevops@lists.linux.dev
Cc: Luis Chamberlain <mcgrof@kernel.org>
Subject: [PATCH 3/3] guestfs: add debian guest support
Date: Mon,  4 Mar 2024 16:56:44 -0800	[thread overview]
Message-ID: <20240305005645.2697081-4-mcgrof@kernel.org> (raw)
In-Reply-To: <20240305005645.2697081-1-mcgrof@kernel.org>

guestfs has only debian-12, no debian testing yet.
While at it, also set default fedora options for fstests
when the user tests a specific filesystem.

Signed-off-by: Luis Chamberlain <mcgrof@kernel.org>
---
 kconfigs/Kconfig.bringup | 42 +++++++++++++++++++++++++++++++++++++++-
 kconfigs/Kconfig.kdevops |  1 +
 2 files changed, 42 insertions(+), 1 deletion(-)

diff --git a/kconfigs/Kconfig.bringup b/kconfigs/Kconfig.bringup
index 95991cc599f4..ba7b5430bcf9 100644
--- a/kconfigs/Kconfig.bringup
+++ b/kconfigs/Kconfig.bringup
@@ -58,14 +58,54 @@ config SKIP_BRINGUP
 endchoice
 
 if GUESTFS
+
+choice
+	prompt "Guestfs Linux distribution to use"
+	default GUESTFS_FEDORA
+
+config GUESTFS_FEDORA
+	bool "Fedora (or derived distro)"
+	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
+	select HAVE_DISTRO_PREFERS_FSTESTS_WATCHDOG if KDEVOPS_WORKFLOW_ENABLE_FSTESTS
+	select HAVE_DISTRO_PREFERS_FSTESTS_WATCHDOG_KILL if KDEVOPS_WORKFLOW_ENABLE_FSTESTS
+	help
+	  This option will set the target guest to be a distro in the Fedora family.
+	  For example, Fedora, RHEL, etc.
+
+config GUESTFS_DEBIAN
+	bool "Debian"
+	select HAVE_CUSTOM_DISTRO_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
+	select HAVE_DISTRO_PREFERS_CUSTOM_HOST_PREFIX
+	select HAVE_DISTRO_PREFERS_FSTESTS_WATCHDOG if KDEVOPS_WORKFLOW_ENABLE_FSTESTS
+	select HAVE_DISTRO_PREFERS_FSTESTS_WATCHDOG_KILL if KDEVOPS_WORKFLOW_ENABLE_FSTESTS
+	help
+	  This option will set the target guest to Debian.
+
+endchoice
+
 config VIRT_BUILDER_OS_VERSION
        string "virt-builder os-version"
-       default "fedora-39"
+       default "fedora-39" if GUESTFS_FEDORA
+       default "debian-12" if GUESTFS_DEBIAN
        help
          Have virt-builder use this os-version string to
          build a root image for the guest. Run "virt-builder -l"
          to get a list of operating systems and versions supported
          by guestfs.
+
+if GUESTFS_DEBIAN
+
+config GUESTFS_DEBIAN_BOX_SHORT
+        string
+        default "debian12" if GUESTFS_DEBIAN
+
+endif
+
 endif # GUESTFS
 
 config LIBVIRT
diff --git a/kconfigs/Kconfig.kdevops b/kconfigs/Kconfig.kdevops
index 53782f413a44..423619cf1443 100644
--- a/kconfigs/Kconfig.kdevops
+++ b/kconfigs/Kconfig.kdevops
@@ -28,6 +28,7 @@ config CUSTOM_DISTRO_HOST_PREFIX
 	default VAGRANT_DEBIAN_BOX_SHORT if VAGRANT_DEBIAN
 	default VAGRANT_OPENSUSE_BOX_SHORT if VAGRANT_OPENSUSE
 	default VAGRANT_REDHAT_GENERIC_BOX_SHORT if VAGRANT_REDHAT_GENERIC
+	default GUESTFS_DEBIAN_BOX_SHORT if GUESTFS_DEBIAN
 
 config CUSTOM_SSH_KEXALGORITHMS
 	string
-- 
2.43.0


  parent reply	other threads:[~2024-03-05  0:56 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-05  0:56 [PATCH 0/3] kdevops: add debian support Luis Chamberlain
2024-03-05  0:56 ` [PATCH 1/3] scripts/bringup_guestfs.sh: start networking for system session Luis Chamberlain
2024-03-05  0:56 ` [PATCH 2/3] scripts/bringup_guestfs.sh: allow libvirt user to modify extra disks Luis Chamberlain
2024-03-05  0:56 ` Luis Chamberlain [this message]
2024-03-06  0:12 ` [PATCH 0/3] kdevops: add debian support Luis Chamberlain

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=20240305005645.2697081-4-mcgrof@kernel.org \
    --to=mcgrof@kernel.org \
    --cc=kdevops@lists.linux.dev \
    /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