Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 316775 Details for
Bug 449129
RH 5.2 Xen - Cannot Install SLES 10 as Paravirtualized Guest
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
Latest patch for fetching newer suse kernels
virtinst-0.300.2-fetch-suse-kernels.patch (text/plain), 11.16 KB, created by
Cole Robinson
on 2008-09-15 19:40:58 UTC
(
hide
)
Description:
Latest patch for fetching newer suse kernels
Filename:
MIME Type:
Creator:
Cole Robinson
Created:
2008-09-15 19:40:58 UTC
Size:
11.16 KB
patch
obsolete
>diff -rup --exclude='*.orig' orig/virtinst/DistroManager.py new/virtinst/DistroManager.py >--- orig/virtinst/DistroManager.py 2008-09-15 14:12:35.072806000 -0400 >+++ new/virtinst/DistroManager.py 2008-09-15 14:15:20.910724000 -0400 >@@ -80,26 +80,27 @@ def _checkRHDistro(fetcher, baseuri, typ > return RHELDistro(baseuri, type, scratchdir) > return False > >-def _storeForDistro(fetcher, baseuri, type, progresscb, distro=None, scratchdir=None): >+def _storeForDistro(fetcher, baseuri, type, progresscb, distro=None, >+ scratchdir=None, arch=None): > stores = [] > if distro == "fedora" or distro is None: >- stores.append(FedoraDistro(baseuri, type, scratchdir)) >+ stores.append(FedoraDistro(baseuri, type, scratchdir, arch)) > if distro == "rhel" or distro is None: >- stores.append(RHELDistro(baseuri, type, scratchdir)) >+ stores.append(RHELDistro(baseuri, type, scratchdir, arch)) > if distro == "centos" or distro is None: >- stores.append(CentOSDistro(baseuri, type, scratchdir)) >+ stores.append(CentOSDistro(baseuri, type, scratchdir, arch)) > if distro == "sl" or distro is None: >- stores.append(SLDistro(baseuri, type, scratchdir)) >+ stores.append(SLDistro(baseuri, type, scratchdir, arch)) > if distro == "suse" or distro is None: >- stores.append(SuseDistro(baseuri, type, scratchdir)) >+ stores.append(SuseDistro(baseuri, type, scratchdir, arch)) > if distro == "debian" or distro is None: >- stores.append(DebianDistro(baseuri, type, scratchdir)) >+ stores.append(DebianDistro(baseuri, type, scratchdir, arch)) > if distro == "ubuntu" or distro is None: >- stores.append(UbuntuDistro(baseuri, type, scratchdir)) >+ stores.append(UbuntuDistro(baseuri, type, scratchdir, arch)) > if distro == "gentoo" or distro is None: >- stores.append(GentooDistro(baseuri, type, scratchdir)) >+ stores.append(GentooDistro(baseuri, type, scratchdir, arch)) > if distro == "mandriva" or distro is None: >- stores.append(MandrivaDistro(baseuri, type, scratchdir)) >+ stores.append(MandrivaDistro(baseuri, type, scratchdir, arch)) > > for store in stores: > if store.isValidStore(fetcher, progresscb): >@@ -109,7 +110,8 @@ def _storeForDistro(fetcher, baseuri, ty > > > # Method to fetch a krenel & initrd pair for a particular distro / HV type >-def acquireKernel(baseuri, progresscb, scratchdir="/var/tmp", type=None, distro=None): >+def acquireKernel(baseuri, progresscb, scratchdir="/var/tmp", type=None, >+ distro=None, arch=None): > fetcher = _fetcherForURI(baseuri, scratchdir) > > store = None >@@ -125,14 +127,17 @@ def acquireKernel(baseuri, progresscb, s > > try: > if store is None: >- store = _storeForDistro(fetcher=fetcher, baseuri=baseuri, type=type, \ >- progresscb=progresscb, distro=distro, scratchdir=scratchdir) >+ store = _storeForDistro(fetcher=fetcher, baseuri=baseuri, >+ type=type, progresscb=progresscb, >+ distro=distro, scratchdir=scratchdir, >+ arch=arch) > return store.acquireKernel(fetcher, progresscb) > finally: > fetcher.cleanupLocation() > > # Method to fetch a bootable ISO image for a particular distro / HV type >-def acquireBootDisk(baseuri, progresscb, scratchdir="/var/tmp", type=None, distro=None): >+def acquireBootDisk(baseuri, progresscb, scratchdir="/var/tmp", type=None, >+ distro=None, arch=None): > fetcher = _fetcherForURI(baseuri, scratchdir) > > store = None >@@ -148,8 +153,10 @@ def acquireBootDisk(baseuri, progresscb, > > try: > if store is None: >- store = _storeForDistro(fetcher=fetcher, baseuri=baseuri, type=type, \ >- progresscb=progresscb, distro=distro, scratchdir=scratchdir) >+ store = _storeForDistro(fetcher=fetcher, baseuri=baseuri, >+ type=type, progresscb=progresscb, >+ distro=distro, scratchdir=scratchdir, >+ arch=arch) > return store.acquireBootDisk(fetcher, progresscb) > finally: > fetcher.cleanupLocation() >@@ -185,10 +192,14 @@ class DistroInstaller(Guest.Installer): > cdrom = self.location > else: > # Xen needs a boot.iso if its a http://, ftp://, or nfs:/ url >+ arch = os.uname()[4] >+ if hasattr(guest, "arch"): >+ arch = guest.arch > cdrom = acquireBootDisk(self.location, > meter, > scratchdir = self.scratchdir, >- distro = distro) >+ distro = distro, >+ arch = arch) > self._tmpfiles.append(cdrom) > > self._install_disk = Guest.VirtualDisk(cdrom, >@@ -209,11 +220,15 @@ class DistroInstaller(Guest.Installer): > ostype = "xen" > # Need to fetch the kernel & initrd from a remote site, or > # out of a loopback mounted disk image/device >+ arch = os.uname()[4] >+ if hasattr(guest, "arch"): >+ arch = guest.arch > (kernelfn, initrdfn, args) = acquireKernel(self.location, > meter, > scratchdir = self.scratchdir, > type = ostype, >- distro = distro) >+ distro = distro, >+ arch = arch) > self.install["kernel"] = kernelfn > self.install["initrd"] = initrdfn > if not self.extraargs is None: >diff -rup --exclude='*.orig' orig/virtinst/OSDistro.py new/virtinst/OSDistro.py >--- orig/virtinst/OSDistro.py 2008-09-15 14:12:35.076802000 -0400 >+++ new/virtinst/OSDistro.py 2008-09-15 14:14:32.752372000 -0400 >@@ -32,10 +32,11 @@ from ImageFetcher import ImageFetcher > # ISO image, or a kernel+initrd pair for a particular OS distribution > class Distro: > >- def __init__(self, uri, type=None, scratchdir=None): >+ def __init__(self, uri, type=None, scratchdir=None, arch=None): > self.uri = uri > self.type = type > self.scratchdir = scratchdir >+ self.arch = arch > > def acquireBootDisk(self, fetcher, progresscb): > raise "Not implemented" >@@ -126,10 +127,45 @@ class SLDistro(RedHatDistro): > # Suse image store is harder - we fetch the kernel RPM and a helper > # RPM and then munge bits together to generate a initrd > class SuseDistro(Distro): >+ def __init__(self, uri, type=None, scratchdir=None, arch=None): >+ Distro.__init__(self, uri, type, scratchdir, arch) >+ if self.arch is None: >+ self.arch = os.uname()[4] >+ if len(self.arch) == 4 and len[0] == 'i' and len[2:] == "86": >+ self.arch = "i386" >+ > def acquireBootDisk(self, fetcher, progresscb): > return fetcher.acquireFile("boot/boot.iso", progresscb) > > def acquireKernel(self, fetcher, progresscb): >+ kernel_args = "" >+ if not fetcher.location.startswith("/"): >+ kernel_args = "method=" + fetcher.location >+ >+ # If installing a fullvirt guest >+ if self.type is None or self.type == "hvm": >+ # Tested with Opensuse 10, 11, and sles 10 >+ kernel = fetcher.acquireFile("boot/%s/loader/linux" % self.arch, >+ progresscb) >+ initrd = fetcher.acquireFile("boot/%s/loader/initrd" % self.arch, >+ progresscb) >+ return (kernel, initrd, kernel_args) >+ >+ # Else we are looking for a paravirt kernel >+ if fetcher.hasFile("boot/%s/vmlinuz-xen" % self.arch, progresscb): >+ # Should match opensuse > 10.2 and sles 10 >+ kernel = fetcher.acquireFile("boot/%s/vmlinuz-xen" % self.arch, >+ progresscb) >+ initrd = fetcher.acquireFile("boot/%s/initrd-xen" % self.arch, >+ progresscb) >+ return (kernel, initrd, kernel_args) >+ >+ # For Opensuse <= 10.2, we need to perform some heinous stuff >+ logging.debug("Trying Opensuse 10 PV rpm hacking") >+ return self._findXenRPMS(fetcher, progresscb) >+ >+ >+ def _findXenRPMS(self, fetcher, progresscb): > kernelrpm = None > installinitrdrpm = None > filelist = None >@@ -137,14 +173,14 @@ class SuseDistro(Distro): > # There is no predictable filename for kernel/install-initrd RPMs > # so we have to grok the filelist and find them > filelist = fetcher.acquireFile("ls-lR.gz", progresscb) >- (kernelrpmname, installinitrdrpmname) = self.extractRPMNames(filelist) >+ (kernelrpmname, installinitrdrpmname) = self._extractRPMNames(filelist) > > # Now fetch the two RPMs we want > kernelrpm = fetcher.acquireFile(kernelrpmname, progresscb) > installinitrdrpm = fetcher.acquireFile(installinitrdrpmname, progresscb) > > # Process the RPMs to extract the kernel & generate an initrd >- return self.buildKernelInitrd(fetcher, kernelrpm, installinitrdrpm, progresscb) >+ return self._buildKernelInitrd(fetcher, kernelrpm, installinitrdrpm, progresscb) > finally: > if filelist is not None: > os.unlink(filelist) >@@ -156,20 +192,21 @@ class SuseDistro(Distro): > # We need to parse the ls-lR.gz file, looking for the kernel & > # install-initrd RPM entries - capturing the directory they are > # in and the version'd filename. >- def extractRPMNames(self, filelist): >+ def _extractRPMNames(self, filelist): > filelistData = gzip.GzipFile(filelist, mode = "r") > try: >- arch = os.uname()[4] >- arches = [arch] >+ arches = [self.arch] > # On i686 arch, we also look under i585 and i386 dirs > # in case the RPM is built for a lesser arch. We also > # need the PAE variant (for Fedora dom0 at least) > # > # XXX shouldn't hard code that dom0 is PAE >- if arch == "i686": >+ if self.arch == "i386": > arches.append("i586") >- arches.append("i386") >+ arches.append("i686") > kernelname = "kernel-xenpae" >+ else: >+ kernelname = "kernel-xen" > > installinitrdrpm = None > kernelrpm = None >@@ -209,7 +246,7 @@ class SuseDistro(Distro): > # booting the installer. > # > # Yes, this is crazy ass stuff :-) >- def buildKernelInitrd(self, fetcher, kernelrpm, installinitrdrpm, progresscb): >+ def _buildKernelInitrd(self, fetcher, kernelrpm, installinitrdrpm, progresscb): > progresscb.start(text=_("Building initrd"), size=11) > progresscb.update(1) > cpiodir = tempfile.mkdtemp(prefix="virtinstcpio.", dir=self.scratchdir)
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 449129
:
312675
| 316775 |
326758
|
326759
|
326760