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 295215 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]
0001-ChrootCreator-class-and-chroot-creator-tool-instal.patch
0001-ChrootCreator-class-and-chroot-creator-tool-instal.patch (text/plain), 2.93 KB, created by
Warren Togami
on 2008-02-18 22:23:28 UTC
(
hide
)
Description:
0001-ChrootCreator-class-and-chroot-creator-tool-instal.patch
Filename:
MIME Type:
Creator:
Warren Togami
Created:
2008-02-18 22:23:28 UTC
Size:
2.93 KB
patch
obsolete
>From 009043317fd841a6b0043935ec2ac83e190d9b6b Mon Sep 17 00:00:00 2001 >From: Warren Togami <wtogami@redhat.com> >Date: Mon, 18 Feb 2008 16:39:27 -0500 >Subject: [PATCH] ChrootCreator class and chroot-creator tool - install to a target chroot directory > >--- > tools/chroot-creator | 81 ++++++++++++++++++++++++++++++++++++++++++++++++++ > 1 files changed, 81 insertions(+), 0 deletions(-) > create mode 100755 tools/chroot-creator > >diff --git a/tools/chroot-creator b/tools/chroot-creator >new file mode 100755 >index 0000000..4f7b5a4 >--- /dev/null >+++ b/tools/chroot-creator >@@ -0,0 +1,81 @@ >+#!/usr/bin/python -tt >+# >+# chroot-creator: Install system defined by kickstart file into target chroot >+# >+# Copyright 2008, Red Hat Inc. >+# >+# This program is free software; you can redistribute it and/or modify >+# it under the terms of the GNU General Public License as published by >+# the Free Software Foundation; version 2 of the License. >+# >+# This program is distributed in the hope that it will be useful, >+# but WITHOUT ANY WARRANTY; without even the implied warranty of >+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the >+# GNU Library General Public License for more details. >+# >+# You should have received a copy of the GNU General Public License >+# along with this program; if not, write to the Free Software >+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. >+ >+import os >+import sys >+import shutil >+import optparse >+ >+import imgcreate >+ >+def parse_options(args): >+ parser = optparse.OptionParser(usage = "%prog [--name=<name>] --target=<target> <kickstart>") >+ >+ parser.add_option("-n", "--name", type="string", dest="name", >+ help="Image name and filesystem label") >+ parser.add_option("-t", "--target", type="string", dest="target", >+ help="Target directory for chroot") >+ >+ (options, args) = parser.parse_args() >+ >+ if len(args) != 1: >+ parser.print_usage() >+ sys.exit(1) >+ >+ return (args[0], options) >+ >+def main(): >+ (kscfg, options) = parse_options(sys.argv[1:]) >+ >+ if os.geteuid () != 0: >+ print >> sys.stderr, "You must run chroot-creator as root" >+ return 1 >+ >+ try: >+ ks = imgcreate.read_kickstart(kscfg) >+ except imgcreate.CreatorError, e: >+ print >> sys.stderr, "Error loading kickstart file '%s' : %s" % (kscfg, e) >+ return 1 >+ >+ if options.name: >+ name = options.name >+ else: >+ name = imgcreate.build_name(kscfg) >+ >+ if options.target: >+ target = options.target >+ >+ creator = imgcreate.ChrootCreator(ks, name, target) >+ >+ try: >+ creator.mount() >+ creator.install() >+ creator.configure() >+ creator.unmount() >+ >+ except imgcreate.CreatorError, e: >+ print >> sys.stderr, "Error creating image : %s" % e >+ return 1 >+ finally: >+ creator.cleanup() >+ >+ return 0 >+ >+if __name__ == "__main__": >+ sys.exit(main()) >-- >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