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 295228 Details for
Bug 433379
[PATCH] ChrootCreator class and chroot-creator tool - install to a target chroot directory
[?]
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.
[patch]
Add-subclass-ChrootCreator.patch
0002-Add-subclass-ChrootCreator.patch (text/plain), 2.78 KB, created by
Warren Togami
on 2008-02-19 01:41:13 UTC
(
hide
)
Description:
Add-subclass-ChrootCreator.patch
Filename:
MIME Type:
Creator:
Warren Togami
Created:
2008-02-19 01:41:13 UTC
Size:
2.78 KB
patch
obsolete
>From e2e87130b52ac55888850406159b7d1b45a1ba1c Mon Sep 17 00:00:00 2001 >From: Warren Togami <wtogami@redhat.com> >Date: Mon, 18 Feb 2008 20:39:06 -0500 >Subject: [PATCH] Add subclass ChrootCreator > >--- > imgcreate/__init__.py | 4 +++- > imgcreate/creator.py | 38 ++++++++++++++++++++++++++++++++++++++ > 2 files changed, 41 insertions(+), 1 deletions(-) > >diff --git a/imgcreate/__init__.py b/imgcreate/__init__.py >index e535014..3731912 100644 >--- a/imgcreate/__init__.py >+++ b/imgcreate/__init__.py >@@ -25,7 +25,8 @@ from imgcreate.fs import * > """A set of classes for building Fedora system images. > > The following image creators are available: >- - ImageCreator - installs to a directory >+ - ImageCreator - installs to a temporary directory >+ - ChrootCreator - installs to a targeted chroot directory > - LoopImageCreator - installs to an ext3 image > - LiveImageCreator - installs to a bootable ISO > >@@ -58,6 +59,7 @@ future. > __all__ = ( > 'CreatorError', > 'ImageCreator', >+ 'ChrootCreator', > 'LiveImageCreator', > 'LoopImageCreator', > 'FSLABEL_MAXLEN', >diff --git a/imgcreate/creator.py b/imgcreate/creator.py >index c2ed770..f686ce7 100644 >--- a/imgcreate/creator.py >+++ b/imgcreate/creator.py >@@ -672,6 +672,44 @@ class ImageCreator(object): > self.unmount() > self.package() > >+class ChrootCreator(ImageCreator): >+ """Installs a system to a target chroot directory. >+ """ >+ >+ def __init__(self, ks, name, target = None, cachedir = None): >+ """Initialize a ChrootCreator instance. >+ This method takes the same arguments as ImageCreator.__init__() with >+ the addition of: >+ >+ target -- The directory where the chroot is to be installed. >+ cachedir -- (Optional) location of yum cache directory >+ """ >+ ImageCreator.__init__(self, ks, name) >+ >+ # Target path must be defined >+ if target is None: >+ raise CreatorError("--target chroot path must be defined.") >+ >+ self.cachedir = cachedir >+ self.target = target >+ self.__bindroot = None >+ self._fstype = "auto" >+ >+ # --bind mount target chroot upon temp directory >+ def _mount_instroot(self, base_on = None): >+ self.__imgdir = self._mkdtemp() >+ >+ makedirs(self.target) >+ # Cannot add to self.__bindmounts because this must be mounted >+ # before everything is created in _instroot >+ self.__bindroot = BindChrootMount(self.target, self._instroot, "/") >+ print("Mounting %s for chroot installation" % self.__bindroot.src) >+ self.__bindroot.mount() >+ >+ def _unmount_instroot(self): >+ if not self.__bindroot is None: >+ self.__bindroot.unmount() >+ > class LoopImageCreator(ImageCreator): > """Installs a system into a loopback-mountable filesystem image. > >-- >1.5.3.8 >
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 Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 433379
:
295215
| 295228