|
|
ffd6ed |
From 7c2489a41905d8db2000784c600f025d459a26f4 Mon Sep 17 00:00:00 2001
|
|
|
ffd6ed |
From: "Richard W.M. Jones" <rjones@redhat.com>
|
|
|
ffd6ed |
Date: Wed, 5 Aug 2015 12:39:58 +0100
|
|
|
ffd6ed |
Subject: [PATCH] p2v: Allow 'virt-p2v-make-kickstart rhel-7.1' to set up RHEL
|
|
|
ffd6ed |
repos.
|
|
|
ffd6ed |
|
|
|
ffd6ed |
(cherry picked from commit da8776040704b2afb9e044aa44f731d42281cc0f)
|
|
|
ffd6ed |
---
|
|
|
ffd6ed |
p2v/virt-p2v-make-kickstart.in | 11 +++++++++++
|
|
|
ffd6ed |
p2v/virt-p2v-make-kickstart.pod | 5 +++--
|
|
|
ffd6ed |
2 files changed, 14 insertions(+), 2 deletions(-)
|
|
|
ffd6ed |
|
|
|
ffd6ed |
diff --git a/p2v/virt-p2v-make-kickstart.in b/p2v/virt-p2v-make-kickstart.in
|
|
|
ffd6ed |
index 22a4eaa..70d7782 100644
|
|
|
ffd6ed |
--- a/p2v/virt-p2v-make-kickstart.in
|
|
|
ffd6ed |
+++ b/p2v/virt-p2v-make-kickstart.in
|
|
|
ffd6ed |
@@ -123,6 +123,17 @@ repo --name=rawhide --mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?rep
|
|
|
ffd6ed |
repo --name=koji --baseurl=http://koji.fedoraproject.org/repos/rawhide/latest/\$basearch/ $proxy
|
|
|
ffd6ed |
"
|
|
|
ffd6ed |
;;
|
|
|
ffd6ed |
+ rhel-*)
|
|
|
ffd6ed |
+ major=$( echo "$repo" | sed 's/rhel-\([0-9]*\)\.[0-9]*/\1/' )
|
|
|
ffd6ed |
+ minor=$( echo "$repo" | sed 's/rhel-[0-9]*\.\([0-9]*\)/\1/' )
|
|
|
ffd6ed |
+ baseurl=http://download.eng.rdu2.redhat.com/released/RHEL-$major/$major.$minor
|
|
|
ffd6ed |
+ # '$basearch' cannot be used in kickstart, so:
|
|
|
ffd6ed |
+ arch=`uname -m`
|
|
|
ffd6ed |
+ repos="$repos
|
|
|
ffd6ed |
+repo --name=rhel${major}_${minor}_server --baseurl=$baseurl/Server/$arch/os
|
|
|
ffd6ed |
+repo --name=rhel${major}_${minor}_server_optional --baseurl=$baseurl/Server-optional/$arch/os
|
|
|
ffd6ed |
+"
|
|
|
ffd6ed |
+ ;;
|
|
|
ffd6ed |
*)
|
|
|
ffd6ed |
# A custom repo is just a URL.
|
|
|
ffd6ed |
((i++)) ||:
|
|
|
ffd6ed |
diff --git a/p2v/virt-p2v-make-kickstart.pod b/p2v/virt-p2v-make-kickstart.pod
|
|
|
ffd6ed |
index 47ca737..821fd52 100644
|
|
|
ffd6ed |
--- a/p2v/virt-p2v-make-kickstart.pod
|
|
|
ffd6ed |
+++ b/p2v/virt-p2v-make-kickstart.pod
|
|
|
ffd6ed |
@@ -33,8 +33,9 @@ will build a kickstart file for Fedora. The kickstart file will be
|
|
|
ffd6ed |
called C<p2v.ks> and located in the current directory.
|
|
|
ffd6ed |
|
|
|
ffd6ed |
The parameters are a list of one or more repositories. Some built-in
|
|
|
ffd6ed |
-repositories are available: C<fedora>, C<rawhide> or C<koji>. You can
|
|
|
ffd6ed |
-also use a URL as a parameter to point to a repository.
|
|
|
ffd6ed |
+repositories are available: C<fedora>, C<rawhide>, C<koji> or
|
|
|
ffd6ed |
+C<rhel-VERSION> (eg. C<rhel-7.1>). You can also use a URL as a
|
|
|
ffd6ed |
+parameter to point to a repository.
|
|
|
ffd6ed |
|
|
|
ffd6ed |
To control the name of the output file, use the I<-o> parameter. To
|
|
|
ffd6ed |
tell kickstart to use a proxy server or web cache to download files,
|
|
|
ffd6ed |
--
|
|
|
ffd6ed |
1.8.3.1
|
|
|
ffd6ed |
|