This is similar to commit 2d608e252bbe ("Add kickstart URLs for RHEL 8",
2020-02-18), but we also need to add EPEL-9 (cf. commit f4c7ae6ba98f,
"make-disk: inject EPEL9 repo in RHEL9 disk image", 2023-01-20).

Cc: Alban Lecorps <alban.leco...@ubisoft.com>
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1792141
Signed-off-by: Laszlo Ersek <ler...@redhat.com>
---
 virt-p2v-make-kickstart.in | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/virt-p2v-make-kickstart.in b/virt-p2v-make-kickstart.in
index 7f215fc4ebb4..d16161f97398 100644
--- a/virt-p2v-make-kickstart.in
+++ b/virt-p2v-make-kickstart.in
@@ -190,6 +190,19 @@ repo --name=rhel7_${minor}_server_optional 
--baseurl=$baseurl/Server-optional/$a
             repos="$repos
 repo --name=rhel8_${minor}_0_baseos --baseurl=$baseurl/BaseOS/$arch/os $proxy
 repo --name=rhel8_${minor}_0_appstream --baseurl=$baseurl/AppStream/$arch/os 
$proxy
+"
+            # Avoid recommends by default.
+            packages_options="--excludeWeakdeps"
+            ;;
+        rhel-9.*)
+            minor=$( echo "$repo" | sed 's/rhel-[0-9]*\.\([0-9]*\)/\1/' )
+            baseurl=http://download.devel.redhat.com/released/RHEL-9/9.$minor.0
+            # '$basearch' cannot be used in kickstart, so:
+            arch=`uname -m`
+            repos="$repos
+repo --name=rhel9_${minor}_0_baseos --baseurl=$baseurl/BaseOS/$arch/os $proxy
+repo --name=rhel9_${minor}_0_appstream --baseurl=$baseurl/AppStream/$arch/os 
$proxy
+repo --name=epel9 
--mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=epel-9\\\\&arch=$arch
 "
             # Avoid recommends by default.
             packages_options="--excludeWeakdeps"
_______________________________________________
Libguestfs mailing list
Libguestfs@redhat.com
https://listman.redhat.com/mailman/listinfo/libguestfs

Reply via email to